Parsons code converter
Convert a melody's shape to Parsons code (U/D/R) and back again.
Parsons code converter
Parsons code — also called melodic contour notation — reduces a tune to the one thing that makes it recognizable even when you forget the key or the exact notes: whether each note goes up, down, or repeats. This tool converts a melody into that code, and converts a Parsons code string back into a contour, entirely in your browser.
To encode, paste a sequence of notes separated by spaces or commas — either scientific pitch names like C4, D#4 or Eb5, or plain numbers if you already have pitch values from somewhere else. The result starts with * for the reference note, then one U, D or R per following note. To decode, paste a Parsons string such as *UUDRD and get back the relative contour as a sequence of numbers starting at 0 — the honest reconstruction of the shape, since Parsons code was never meant to store the original key or intervals.
The Direction option switches between the two and is a true swap: flipping it also moves the current output back into the input, so you can round-trip a melody. Batch mode treats every line of the input as its own melody or code string, which is useful for checking a whole list of themes (the notation librarians and tune-identification indexes such as a "musical dictionary" use) in one pass. Strict validation rejects a line that doesn't match the expected format instead of silently skipping the bad token, and the notation legend option prints the U/D/R/* key under the result as a reminder.
Everything runs locally — no melody, note list or Parsons string you paste is ever uploaded. Copy the output, download it as a .txt file, or send it straight back into the input to convert the other direction.