Clojure Map Formatter Beautify or minify EDN

Input

Output

Layout options

How the formatter reads and writes

Reads
All of EDN: maps, vectors, lists, sets, keywords and namespaced keywords, symbols, strings, characters, numbers with N/M suffixes, ratios, ##Inf, tagged literals like #inst and #uuid, metadata, #:ns{} maps, #_ discards and ; comments. Commas count as whitespace, the way the reader treats them.
Beautify
A collection stays on one line while it fits the width. Once it breaks, map keys line up in a column with their values aligned. A value that cannot fit beside its key moves under it, indented. Comments, #_ forms, and blank lines between groups stay where you put them.
Indent
Clojure lines a map's entries up under its opening bracket, so nesting reads by alignment. Set Nested to Below and a nested collection that has to break moves to the next line, indented by 1, 2 or 4 spaces. Indent also sets the body indent of code-like lists such as (defn …).
Validates
Unbalanced or mismatched brackets, unterminated strings, maps with a key and no value, duplicate map keys, duplicate set elements, and malformed numbers, keywords and characters. Each error names the line and column and offers a jump to it.
JSON
Paste JSON and the output shows it as EDN: object keys become keywords where they can be written as one, null becomes nil, and big numbers keep their digits. Choose Use as input to replace the JSON with the EDN.
Files
Open a file or drop one onto Input: .edn, .clj, .cljs, .json or plain text. Download saves the output as .edn, or .min.edn when minified.
Minify
Removes comments and #_ forms, and drops whitespace only beside brackets, so {:a [1 2]} becomes {:a[1 2]}. Atoms keep one space between them, so any EDN reader reads the result back as the same data.
Find your way
Move the caret in Input, or point at anything in Output. The sign above the output shows its get-in path, what it is, and which way to scroll to reach it. Click a path segment to step out to that level.
Stays local
Parsing and formatting happen in this page. A share link carries your input compressed inside the URL itself, and nothing is stored on a server.
Keys
Alt B BeautifyAlt M MinifyAlt C Copy outputTab indents in Input, Esc then Tab moves on