JSON to Java
Generate Java DTOs and review validation-oriented API models.
API Key
Tune prefixes, block separators, and body length to evaluate API key formats before committing a policy. Great for comparing legibility and length tradeoffs.
The strength of an API key comes from its random body, not its prefix. With a character set of size C and body length L, entropy is L × log₂(C) bits. A 32-character body over uppercase + lowercase + digits (62 characters) yields about 190 bits — practically immune to brute force.
A common baseline is 128 bits or more. Over a 62-character set that means a body of at least 22 characters; if you exclude look-alike characters and shrink the set, adding 2–3 characters of length restores the same strength.
Prefixes that identify the service and environment — Stripe's sk_live_ / sk_test_, GitHub's ghp_ — are more than a readability aid. A distinctive prefix lets tools like GitHub secret scanning detect keys committed by accident and revoke them automatically.
Always separate production and test keys by prefix. When a fragment of a key ends up in a log or error message, the prefix tells you immediately which environment was exposed.
Q. Are generated keys sent to a server? No. Every key is generated locally with the browser's Web Crypto API (crypto.getRandomValues); nothing leaves your machine.
Q. How long should an API key be? At least 22 random characters (about 128 bits of entropy). For keys that are exposed externally, 32 characters (about 190 bits) gives comfortable margin.
Q. Can I use a UUID as an API key? UUID v4 carries 122 bits of entropy, which clears the baseline, but it cannot carry a prefix and its format is widely known, making secret-scanning detection harder. A dedicated random key format is preferable.
Q. Can keys from this tool be used in production? Generation itself uses a cryptographically secure random source, so yes. That said, production keys are best issued by a server-side system that records issuance and revocation; this tool is ideal for format design, staging, and testing.
Jump to other JSON2Class utilities that naturally follow this one.
Generate Java DTOs and review validation-oriented API models.
Review nullability and Kotlin data class structure quickly.
Turn API payloads into TypeScript interfaces for frontend work.
Format sample payloads before sending them back into the converter.