Is my C# code uploaded?
No. The code is parsed in your browser and is not sent to a ByteKiln server. If you press Share, the link itself carries a readable copy of your input, so don't share links that contain secrets.
Convert C# classes, records and enums into TypeScript interfaces or types that match what System.Text.Json actually sends.
Loading C# → TypeScript…
Loading C# → TypeScript…
When an ASP.NET Core API and a TypeScript front end share data, the TypeScript types should describe what actually arrives over the wire — not what the C# class looks like. Those differ in small, painful ways: property names are camelCased by System.Text.Json, enums are numbers unless a converter says otherwise, DateTime is a string, a long can exceed JavaScript's safe integer range, and [JsonIgnore] properties never appear at all. This converter reads C# classes, records (including positional records) and enums with the same parser ByteKiln's C# → JSON tool uses, and maps each property to the TypeScript type of its JSON form. It follows [JsonPropertyName] and [JsonIgnore], keeps generics (Result<T> stays Result<T>), turns base classes into extends clauses, maps collections to arrays and dictionaries to Record<K, V>, and handles nullable value and reference types with either T | null or optional properties. Anything it can't map — types that aren't in your paste, interfaces, methods — is listed rather than silently dropped.
camelCase follows System.Text.Json's JsonNamingPolicy.CamelCase: the leading run of capitals is lower-cased, keeping the last one when a lower-case letter follows (URLValue becomes urlValue). [JsonPropertyName] and [JsonProperty] override it.
Numeric types map to number, bool to boolean, string, Guid, char, TimeSpan and DateOnly/TimeOnly to string, List<T>, IEnumerable<T>, HashSet<T> and T[] to T[], Dictionary<string, T> to Record<string, T>, and object, dynamic and JsonElement to unknown. Nullable<T> and T? become T | null or an optional property.
Explicit values are kept and implicit ones count up from the previous value, as in C#. The default output depends on whether the enum has [JsonConverter(typeof(JsonStringEnumConverter))], because that decides whether JSON carries names or numbers.
Fields, constructors and methods are listed as skipped. Interfaces in a base list are ignored because they don't add serialized members. Types referenced but not pasted are kept by name with a warning, so the output still compiles once you add them.
Short answers for the things developers usually ask before trusting a tool.
No. The code is parsed in your browser and is not sent to a ByteKiln server. If you press Share, the link itself carries a readable copy of your input, so don't share links that contain secrets.
ASP.NET Core's default JSON settings (JsonSerializerDefaults.Web) use camelCase, so a C# property OrderNumber arrives in JavaScript as orderNumber. The converter follows System.Text.Json's rules, including leading acronyms (IOPort becomes ioPort). [JsonPropertyName("x")] always wins, and you can turn camelCase off if your API keeps PascalCase.
By default, enums with [JsonConverter(typeof(JsonStringEnumConverter))] become string unions ("Pending" | "Paid"), and other enums become numeric unions, because that's what System.Text.Json sends. If you register JsonStringEnumConverter globally, pick String union; you can also emit TypeScript enums.
They become number, and JavaScript numbers are exact only up to 2^53. A 64-bit ID or a high-precision decimal can silently lose digits in JSON.parse. Serialize those as strings if they can exceed that range.
They are skipped, because only properties are serialized by default, and the tool lists what it skipped. Nested classes become separate top-level interfaces, and base classes found in the input become extends clauses.
As string by default, because JSON carries them as ISO 8601 and GUID strings. You can map DateTime to Date if your client code converts it, but a plain JSON.parse will not.
Useful follow-ups when one conversion usually turns into three more.
Generate sample JSON from C# classes, including nested classes, dictionaries, and lists.
Convert JSON payloads into C# classes with nested types, arrays, DateTime, and Guid detection.
Paste a curl command — including Chrome's "Copy as cURL" for bash or Windows cmd — and get C# HttpClient code, or JavaScript fetch, axios, Python requests, PHP or Go.