Dev tools

JSON ↔ Rison

Convert JSON to Rison (the compact URI-safe notation Kibana/Elasticsearch use for query params) and back. This tool's own encoder/decoder for the documented core grammar (no reference implementation in this codebase to check against). Exotic edge cases like embedded control characters or surrogate-pair characters are not guaranteed byte-identical to the reference grammar. Runs on your device.

Runs on your device. The file is never uploaded.

JSON to Rison rewrites a document in the compact notation Kibana packs into query parameters. Objects are written (key:value), arrays as !(item), and !t, !f and !n stand for true, false and null. Strings that look like identifiers stay bare. No percent-encoding happens here, so the result can still need URL encode.

Input

Options

Questions

What is Rison?

A compact notation for the same data JSON holds, designed to survive in a URL without heavy escaping. Kibana and Elasticsearch use it for the state they pack into query parameters. It is much shorter than URL-encoded JSON because it avoids quotes and braces wherever it can.

What does the syntax look like?

An object is written (key:value,key:value) and an array is !(item,item). True, false and null are !t, !f and !n. A string that looks like an identifier is written bare, and anything else is wrapped in single quotes with an exclamation mark as the escape character, so !! is a literal exclamation mark and !' is a literal quote.

Which direction does it run?

Encode by default, taking JSON in and writing Rison out. Switch mode to decode to read Rison and get pretty-printed JSON back. A decode failure names the offset, for example when a quoted string is never closed or a comma or closing parenthesis is missing.

Is this the reference implementation?

No. This codebase ships no Rison library, so the encoder and decoder here were written from the documented core grammar. Ordinary objects, arrays, strings, numbers and literals round-trip, but exotic cases such as embedded control characters or surrogate-pair characters are not guaranteed to match the reference byte for byte.

Do I still have to URL-encode the result?

Possibly. The tool does no percent-encoding at all, and your own strings can contain characters that a particular server or proxy dislikes. Rison keeps the common structural characters out of the way, but check the result against your target, and run it through URL encode if it needs it.

Does my query state leave the browser?

No. Both directions run in a Web Worker in this tab, so a dashboard URL with real filter values, index names or customer identifiers in it stays on your device. There is no upload, no logging and no stored history, and the page works offline once it has loaded.

Related Dev tools

n→nJSON ↔ CBOREncode JSON to CBOR bytes (shown as hex) or decode CBOR bytes back to JSON. Covers uint/negint/text/array/map/float/bool/null; no byte strings, tags, or indefinite-length items.Runs on each file you dropn→nJSON ↔ MessagePackEncode JSON to MessagePack bytes (shown as hex) or decode MessagePack bytes back to JSON. Covers nil/bool/int/float64/str/array/map: no bin, ext, or timestamp extension types.Runs on each file you dropn→nPHP serialize / unserializeConvert JSON to PHP's serialize() format and back. Covers null/bool/int/float/string/array. PHP objects (O:) are not implemented since they need a class registry this tool doesn't have.Runs on each file you dropn→nPLIST viewerView an XML property list (.plist) as JSON. Binary plist (bplist00) is not supported. It needs a separate binary-format parser this tool does not implement.Runs on each file you dropn→nGeoJSON ↔ CSVConvert GeoJSON Point features to CSV rows and back. LineString/Polygon geometries export as a flattened coordinate list (one-way; CSV->GeoJSON always builds Points). CSV parsing is fully quote-aware (src/csv.ts), so a quoted field holding a comma or a newline no longer shifts the coordinate columns.Runs on each file you dropn→nKML/GPX to GeoJSONConvert a GPX (waypoints/tracks/routes) or KML (Placemarks: Point/LineString/Polygon) file to GeoJSON. A hand-rolled tag scan, not a general XML parser: no styles, nested Folder hierarchy, MultiGeometry, or extended data.Runs on each file you drop