f0rextasy

JSON Formatter

Component

About

A small textarea-based JSON pretty-printer that formats pasted JSON on demand and shows a parse error message when the input is invalid.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds JSON Formatter to your project and fits it to your theme.

Code

How JSON Formatter is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { JsonFormatter } from "@/components/ui/json-formatter";

export default function JsonFormatterDemo() {
  return (
    <div className="flex min-h-[320px] w-full items-center justify-center bg-background p-6">
      <div className="w-full max-w-sm">
        <JsonFormatter />
      </div>
    </div>
  );
}

More by f0rextasy

View all
  • Newsletter Signup Card

    Newsletter Signup Card

    5
  • Board Checklist

    Board Checklist

    3
  • Time Input

    Time Input

    3
  • Running Order Timeline

    Running Order Timeline

    2
  • Network Graph

    Network Graph

    2
  • Empty State Card

    Empty State Card

    1
  • Invite Modal

    Invite Modal

    1
  • Striped Progress Bar

    Striped Progress Bar

    1