Skip to content
DIY Arduino Wi-Fi Keylogger (Proof of Concept)
Branch: master
Clone or download
Latest commit 8622abd Jun 14, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
esp8266_saveSerial Initial commit Apr 10, 2017
images New Patreon Logo Jun 14, 2017
keylogger Initial commit Apr 10, 2017
.gitignore Initial commit Apr 10, 2017
LICENSE Initial commit Apr 10, 2017 updated patreon link Jun 14, 2017

Wi-Fi Keylogger

(Proof of Concept) Arduino Keylogger with Wi-Fi!

arduino leonardo with usb host shield and a nodemcu

Support me and my projects on Patreon!
Support me on Patreon



Using an Arduino with an ATmega32u4 (which can emulate a keyboard) and a USB host shield, this combination can be used as a keylogger. The addition of an ESP8266 allows you to store and retrieve the keystrokes in a log file.

This is just a proof of concept
Please don't expect this to work with every keyboard layout!
I saw a few forum threads about making a USB keylogger with Arduino using a USB Host shield, but I couldn't find any published project about this.
So I hope this is a good basis for someone who wants to make a proper keylogger, though I won't develop this any further.


Use it only for testing purposes on your own devices!
I don't take any responsibility for what you do with this project.


Short version:

Upload the keylogger sketch to your Arduino (ATmega32u4) and upload the esp8266_saveSerial sketch to your ESP8266.
Connect your Arduino with the USB host shield and connect the serial pins (RX and TX (Arduino) to TX and RX (ESP8266)) and GND.


What you will need:

I used an Arduino Leonardo with the big host shield.

arduino leonardo with USB host shield and a nodemcu

You could probably build a very small version using the mini host shield and a pro micro.


Open the esp8266_saveSerial sketch with Arduino.
You need to install the following Librarys:

Then compile and upload it to your ESP8266 (check if your settings are right).

Arduino ATmega32u4

You will need the USB Host Shield 2.0 Library.
Open the keylogger sketch in Arduino and upload it to your Arduino.

Wire everything up

Ok so now you need to connect the ESP8266 with the Arduino.
Connect these pins:

Arduino ESP82666
VCC (3.3V) VCC (3.3V)

Note: you'll need a 3.3V regulator if your Arduino only provides 5V.
Don't connect the ESP8266 to 5V!

If you use a plain ESP-12, you also have to set the enable pin and to HIGH and GPIO15 to LOW:

PIN Mode
CH_PD (EN) HIGH (3.3V)

How to use it

Plug the leonardo in the computer and the keyboard into the USB host shield. The ESP8266 will create a new access point definitely not a keylogger. Connect to it using the password !keylogger.
Open your browser and go to, you will see every keytroke.

screenshot of the webinterface

To clear the logfile go to


This project is licensed under the MIT License - see the license file file for details

Sources and additional Links

USB Host shield:

You can’t perform that action at this time.