Guitar tuner

Click start, allow microphone access, and pluck one string at a time. This chromatic tuner listens through your microphone, detects the pitch in real time, and shows the note, frequency and how many cents sharp or flat you are — no plug-in cable, no app to install.

How the pitch detection works

Two things happen on every animation frame, entirely on your device.

getUserMedia() opens the microphone

Clicking Start calls navigator.mediaDevices.getUserMedia({ audio: true }). The browser shows its own permission prompt — this page cannot skip it or pre-approve it — and only if you allow it does the call resolve with a live MediaStream, part of the Media Capture and Streams specification every major browser implements.

Autocorrelation finds the fundamental frequency

The stream feeds a Web Audio AnalyserNode, which exposes a short window of raw time-domain samples — the waveform's shape, moment to moment. A plucked string's vibration is roughly periodic, repeating its shape once per cycle, so this tool slides that window against a delayed copy of itself at increasing offsets and measures how closely they match at each one. The offset with the strongest match is the string's period; a small correction (parabolic interpolation between the three closest measurements) refines that estimate between whole samples, and the sample rate divided by the period gives the frequency in Hz.

That frequency is converted to the nearest equal-tempered note (A4 = 440Hz is the reference every note is measured against) and expressed as cents — hundredths of a semitone — sharp or flat, which is what drives the needle.

What never happens: no MediaRecorder, no file, no fetch/XHR/WebSocket call. What you play is analysed and discarded, frame by frame, on your own device.

How to get a clean reading

  1. 1.Find a quiet room. Fans, music and conversation in the background compete with the string's pitch and are the single biggest cause of a jumpy or wrong reading.
  2. 2.Position your device's microphone a hand's width or so from the guitar body, not across the room.
  3. 3.Pluck one string cleanly and let the others stay silent — a ringing open string next to it confuses the pitch detector.
  4. 4.Give the low strings a moment longer than the high ones; a slower vibration takes longer for the detector to see a full cycle of.
  5. 5.Pick the tuning preset you actually want before you start — Standard, Drop D, Half-step down, Open G or DADGAD — so the string highlight matches what you're tuning to.

Tunings covered

All five presets use standard equal-tempered pitches (A4 = 440Hz) — only which note goes on which string changes.

TuningStrings (low → high)Notable for
StandardE2 A2 D3 G3 B3 E4The default for most guitar music
Drop DD2 A2 D3 G3 B3 E4One-finger power chords on the bottom three strings
Half-step downEb2 Ab2 Db3 Gb3 Bb3 Eb4Slightly looser string tension; some vocalists' range
Open GD2 G2 D3 G3 B3 D4A G major chord ringing on the open strings; slide guitar
DADGADD2 A2 D3 G3 A3 D4Modal/droning chords popular in Celtic and folk playing

Use cases & limitations

Where this is genuinely useful

  • Practising at a desk. Open the page, tune up, no clip-on tuner or cable required.
  • Checking an unfamiliar tuning. Drop D, Open G and DADGAD presets show exactly which note belongs on which string without needing to remember or look it up.
  • A quick sanity check on whether a string has slipped noticeably out of tune between songs.

What this tool honestly cannot do

  • Match a calibrated hardware tuner in a noisy room. A clip-on or pedal tuner reads the instrument's own vibration and is largely unaffected by background sound; a microphone cannot be. Accuracy here depends heavily on your microphone, ambient noise and how cleanly the string is struck.
  • Guarantee a clean low-string reading instantly. Bass strings vibrate slowly and need a longer, quieter window to lock onto — expect the low E, D or G string to take noticeably longer to settle than the high strings.
  • Substitute for lab equipment. This is a handy browser tuner, not a calibrated frequency counter — treat a borderline reading as "close, check by ear" rather than an exact measurement.
  • Detect more than one string at once reliably. Chords and ringing open strings will confuse the fundamental-frequency estimate; tune one string at a time.

Frequently asked questions

How does this guitar tuner detect pitch?

It reads a short window of audio from your microphone through a Web Audio AnalyserNode, then runs a difference-based autocorrelation over that window to find the waveform's fundamental period — the time it takes the vibration to repeat. The inverse of that period is the frequency, which is then matched to the nearest equal-tempered note and expressed as cents (hundredths of a semitone) sharp or flat. Everything happens locally in your browser, frame by frame.

Does this work for acoustic and electric guitar, or do I need to plug in?

The microphone works for any guitar that makes an audible sound — acoustic, or an electric played unplugged or through an amp loud enough for the mic to pick up clearly. There is no line-in or instrument-cable input on this page; if you play electric through headphones only, either turn on an amp/speaker the microphone can hear or use a clip-on tuner that reads the instrument's own vibration instead.

Why is the low E string harder to tune than the others?

Lower strings vibrate more slowly, so the pitch detector needs a longer window of audio to see even one full cycle, and that window is more easily disturbed by room noise, string buzz or the guitar body's own resonance. In practice this means the low E (or low D in Drop D and Open G) takes a fraction of a second longer to settle and is the string most worth tuning in a quiet room with the microphone close.

Does this tuner work for bass guitar or ukulele?

The pitch detector itself covers a wide enough range to see most bass and ukulele notes, but the tuning presets on this page are built for six-string guitar only — there is no bass or ukulele preset. You can still read the frequency and nearest note name for any pitched instrument and compare it by ear or against a reference chart, just without a dedicated string preset to tune against.

Why does the needle jump around instead of settling?

The most common cause is more than one string ringing at once — pluck a single string cleanly and let others stop vibrating. Background noise, a loose fret buzz, or holding the microphone too far away all lower the confidence of each reading too. The readout applies light smoothing to reduce small frame-to-frame jitter, but it cannot fix an unclean or ambiguous input signal.

Is background noise a problem?

Yes — a fan, other music, conversation or a TV in the background competes with the string's fundamental frequency and can pull the detected pitch off, especially on quieter or lower strings. A quiet room and a microphone positioned a hand's width or so from the guitar body give the most reliable reading.

Does this tool record or upload what I play?

No. The audio is read locally by a Web Audio AnalyserNode purely to estimate pitch; it is never written to a file, never buffered for later playback, and never sent to a server — there is no server call this page could send it to. Closing the tab or clicking Stop releases the microphone immediately.

How accurate is this compared to a clip-on or pedal tuner?

A dedicated clip-on or pedal tuner reads the instrument's physical vibration directly and is largely immune to room noise, which generally makes it more consistent — especially on a stage or in a noisy room. This tool is a genuinely useful microphone-based tuner for practising at a desk or in a quiet room, not a replacement for a calibrated hardware tuner in a demanding or noisy setting.

What is the difference between Drop D and Standard tuning?

Drop D is Standard tuning (E A D G B E) with only the lowest string tuned down one whole step, from E2 to D2 — every other string stays the same. It is popular because it lets a single finger lay flat across the bottom three strings to fret a power chord, common in rock and metal. See the dedicated Drop D tuner for a version that starts in this tuning.