MIDI to JSON
Paste a MIDI file as base64 or hex and get structured JSON — paired notes with pitch names and timings, a loss-less event stream, or a compact summary. Runs in your browser; nothing is uploaded.
About this tool
MIDI to JSON turns a Standard MIDI File into readable structured data without uploading the file anywhere. Paste the .mid/.midi bytes as base64 or hex, choose the output view, and the tool parses the SMF header, tracks, timing division, tempo map, notes, controller messages, program changes, pitch bends, and common meta events.
Use Notes when you want a musical view for visualizers, sequencers, games, or data analysis: note-on/note-off pairs are combined into notes with a pitch name such as C4, MIDI note number, channel, start time, duration in ticks, duration in seconds, and velocity. Use Events when you need the ordered raw event stream for debugging or conversion work. Use Summary for a quick overview of track count, duration, BPM, time signature, channels, note count, and track names.
Worked examples
- Paste the hex example from Summary — compact overview to get a small JSON object showing one track named
Piano, a 120 BPM tempo, 4/4 time, and one note. - Switch the same example to Notes to see that note paired as
C4, starting at tick0with a480tick /0.5second duration. - Choose Events to inspect the underlying MIDI messages: track name, tempo, time signature, note-on, note-off, and end-of-track.
Limits and edge cases
- The input must be a Standard MIDI File that starts with the
MThdchunk. RIFF-wrapped RMID, karaoke variants, and sequencer project files are not decoded unless their bytes begin with a normal SMF header. - Timing in seconds is calculated from tempo events across the file. SMPTE timecode division is also reported, but musical PPQ files are the common case.
- Output is JSON text, not a playable audio render. This tool does not synthesize MIDI to sound and does not convert JSON back into a MIDI file.
- Program numbers are emitted as numbers; General MIDI instrument names are intentionally not guessed.
FAQ
Can I upload a .mid file directly?
This page accepts the MIDI bytes as base64 or hex text. If you have a .mid file locally, base64-encode it first, paste the text into the input field, and leave encoding on Auto or set it to Base64. The CLI can also receive the same base64 or hex string.
What is the difference between Notes, Events, and Summary?
Notes pairs note-on and note-off messages into musical notes with names, start times, durations, channels, and velocities. Events preserves the ordered MIDI event stream for each track, including raw note messages, controller changes, program changes, pitch bends, SysEx, and meta events. Summary returns counts and headline timing fields for a quick inspection.
Does this render MIDI audio or identify instruments by name?
No. MIDI is symbolic performance data, not audio. This tool parses the data into JSON and reports program-change numbers, but it does not synthesize audio and does not bundle a General MIDI instrument-name table.
Why did my file fail with a missing MThd header?
The parser expects a Standard MIDI File whose first chunk is MThd. Some containers wrap MIDI data in another format, and some music apps save project/session files that are not SMF files. Export the sequence as .mid or .midi, then encode those bytes as base64 or hex.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool midi-to-json "TVRoZAAAAAYAAAABAGBNVHJr… (or 4d546864000000…)"New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/midi-to-json/?input=TVRoZAAAAAYAAAABAGBNVHJr%E2%80%A6%20%20%28or%204d546864000000%E2%80%A6%29&encoding=auto&format=notesMachine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
