Pikkola JSON, tool No. 8

The JSON you paste stays in this tab. The types come out of it.

A formatter, a tree viewer and a type generator for API responses you would rather not hand to a stranger's server. Format it, walk it, copy a path, then take TypeScript, Zod, Pydantic or a JSON Schema away with you. No upload, no account, no request leaving the page.

Paste JSON
  • 0 bytes uploaded
  • 4 code targets
  • EN KO JA interface
  • 0 cookies

Workbench

One document, two panes

Ctrl+Enter formats the document

input.json 0 B
Waiting for JSON
Your document is not stored. Closing the tab clears it. idle

Why this one

Pasting a response into a website is a small act of trust

Most online JSON tools ask you to send the document to their server and hand it back formatted. Nobody reads the terms. This page skips that step entirely, and the rest of the workbench is built around the same idea: the document is the only thing on screen, and it is yours.

01

Nothing goes out, and you can verify it

There is no fetch, no XHR, no beacon and no third-party font. The page's own security policy forbids connections to other origins. Open the Network tab while you paste a token, and watch the list stay empty.

02

A tree you can actually search

Nested JSON collapses into a stack of braces in a text editor. Here each object and array is a row: expand what you need, search a key across the whole document, and copy the value or the JSON path of the row you are looking at.

03

Errors that point at the comma

A strict parse, then the line and column of the character that broke it, with the surrounding lines printed and a caret under the spot. No hunting for a missing quote in four hundred lines.

04

Types from the data you have

Objects become interfaces, schemas and models. Keys that appear in some array elements but not all are marked optional instead of being guessed as required, which is the mistake a quick guess usually makes.

Output

Four ways to leave with the same document

The conversion is inference, not magic: it reads the shape in front of it. A field that is null in this response becomes nullable, a number that is whole becomes int in Python, and an array of objects is merged into one type with the keys that only some elements carry marked optional.

TS

TypeScript

export interface Order {
  id: string;
  total: number;
  note: string | null;
  items: OrderItem[];
}

Interfaces, nested and named after the key that holds them. Optional properties use a question mark.

ZOD

Zod

export const OrderSchema = z.object({
  id: z.string(),
  total: z.number(),
  note: z.string().nullable(),
  items: z.array(OrderItemSchema),
});

A schema per object, referenced by the parent, plus the inferred type at the end.

PY

Pydantic, TypedDict

class Order(BaseModel):
    id: str
    total: int
    note: Optional[str]
    items: List[OrderItem]

Pydantic models or typing.TypedDict, switched in the panel. Aliases are kept for keys that are not valid identifiers.

{ }

JSON Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": ["id", "total"]
}

Draft 2020-12 with definitions for nested objects and a required list that reflects the data.

None of the output is sent anywhere either. Copy it, save it next to the code that will consume the response, or edit it: the generators are a starting point, and a type is easier to correct than to write.

How it works

Three steps, no sign-up screen

  1. 1

    Paste, drop or open

    Paste from the clipboard, drop a .json file on the editor, or press Open file. The file is read with the browser's FileReader and never leaves the tab.

  2. 2

    Format and inspect

    Two spaces, four spaces or tabs. Sort keys if you want a stable order. The tree on the right keeps up as you type and shows the byte count, the key count and how deep the document goes.

  3. 3

    Take the shape with you

    Choose TypeScript, Zod, Python or JSON Schema, name the root type, and copy or save the result. The name follows the key you use, so a field called customer becomes Customer.

Questions

The things people ask before pasting

Is my JSON uploaded anywhere?

No. There is no API call, no analytics script, and no font or image loaded from another host; the page's security policy blocks connections to other origins. Open your browser's Network tab while you work and watch it stay empty.

Can I paste a production API response here?

That is what it is for. Token counts, customer records, webhook bodies and database rows stay in the memory of the tab. There is no server that sees them, because the site is static files: formatting and conversion are code running on your own machine.

How large a document can it handle?

A few megabytes is comfortable on a laptop. The tree lays out a page of children at a time and offers a button for the rest, so one long array does not freeze the page. Past about twenty megabytes the browser's own memory is the limit, and a desktop editor is the better tool.

What happens with invalid JSON?

The tool says what the parser objected to, gives the line and column of the character, and prints the lines around it with a caret under the exact spot. The tree and the generated code wait until the document parses.

How do you handle objects whose keys differ?

An array of objects is merged into one type. A key that only some elements carry becomes optional: a question mark in TypeScript, NotRequired in a TypedDict, a default of None in Pydantic, and left out of required in JSON Schema. Arrays that mix types become a union, and a null in the data makes the type nullable.

Do you accept comments or trailing commas?

No, on purpose. The parser is the browser's strict JSON parser, so what passes here is what an API will accept. A file with comments is JSONC, a different format; strip them first or use a tool built for it.

Is the document saved if I close the tab?

No. The document lives in the tab and disappears when the tab closes, which is the safer default for a pasted customer record. Only your settings are remembered: indentation, sort, theme, language and the selected output.

Who runs this?

Pikkola, a small studio in Seoul that builds single-purpose browser tools. The same shelf holds a time zone planner, a text diff, a Korean blog checker, a link card generator, an invoice printer, a journal and a directory of remote work tools.