Scrubtly
100% Local • Zero Uploads

JSON to C# Classes — Generated Locally, Never Uploaded.

Paste a JSON response and get clean C# models with PascalCase properties and System.Text.Json attributes — or switch to TypeScript interfaces. Your payload never leaves the browser.

Zero-Server Guarantee: Your data is processed in this tab and never uploaded. Load the page, go offline, and it still works.

Raw Input

.json · .csv · .log · .txt

Drop file to load locally

Read in your browser — never uploaded

Clean Output

Nothing masked yet. Paste data or load a sample to see what gets caught.

Advertisement

Clean C# Models From Real Payloads

Writing DTOs by hand for a third-party API is slow, and it's easy to miss a field. Paste a real response and Scrubtly infers a complete model graph: one public class per nested object, List<T> for arrays, and property types chosen from the actual values rather than guessed.

Example: an Order Payload

JSON input

{
  "order_id": 98231,
  "created_at": "2026-12-05T18:30:00Z",
  "total": 1450.00,
  "customer": { "email": "a***@example.com", "vip": false },
  "items": [
    { "sku": "KB-01", "qty": 2, "price": 49.90 },
    { "sku": "MS-07", "qty": 1, "price": 25.00,
      "gift_note": "Happy birthday!" }
  ]
}

Generated C#

using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;

public class Root
{
    [JsonPropertyName("order_id")]
    public int OrderId { get; set; }

    [JsonPropertyName("created_at")]
    public DateTime CreatedAt { get; set; }

    [JsonPropertyName("total")]
    public decimal Total { get; set; }

    [JsonPropertyName("customer")]
    public Customer Customer { get; set; }

    [JsonPropertyName("items")]
    public List<Item> Items { get; set; }
}

public class Customer
{
    [JsonPropertyName("email")]
    public string Email { get; set; }

    [JsonPropertyName("vip")]
    public bool Vip { get; set; }
}

public class Item
{
    [JsonPropertyName("sku")]
    public string Sku { get; set; }

    [JsonPropertyName("qty")]
    public int Qty { get; set; }

    [JsonPropertyName("price")]
    public decimal Price { get; set; }

    [JsonPropertyName("gift_note")]
    public string GiftNote { get; set; }
}

Why Generate Models in the Browser?

The payloads you most need models for — production API responses, webhook bodies, customer records — are exactly the ones you shouldn't paste into an online converter that posts them to a server. Scrubtly generates code with JavaScript running in this tab, and the output contains only structure: property names and types, never your values.

If you also need to share the payload itself, switch to Anonymize first to mask emails, tokens, and keys, then generate your classes from the scrubbed version. Prefer TypeScript? Pick TS Interface in the toolbar for export interface definitions with optional (?) and | null fields.

Frequently Asked Questions

Which serializer are the attributes for?

The generated [JsonPropertyName] attributes target System.Text.Json, the built-in serializer in .NET Core 3.0 and later. For Newtonsoft.Json, replace them with [JsonProperty].

What happens if the root of my JSON is an array?

Scrubtly generates the model for the array's items and adds a comment reminding you to deserialize into List<Root>.

My JSON has a syntax error — what now?

The output panel shows the exact line and column of the problem with a pointer to the offending character, so you can fix it in the input pane.