How do I encode or decode Base64 online?
Paste any text and click Encode to convert it to a Base64 string, or paste a Base64 string and click Decode to get the original text back. This tool supports full Unicode (including emoji and non-Latin characters) and runs entirely in your browser with no server round-trip.
Hello, World!
SGVsbG8sIFdvcmxkIQ==
Tips & Best Practices
Base64 is encoding, not encryption
Base64 makes binary data text-safe — it provides zero security. Anyone can decode a Base64 string instantly. Never use Base64 to "hide" passwords, API keys, or tokens. Kubernetes Secrets store values as Base64, which misleads many developers into thinking they are encrypted.
Standard Base64 breaks URLs
The + and / characters in standard Base64 have special meaning in URLs and filenames. Use Base64url encoding (replaces + with - and / with _) for JWT tokens, URL parameters, and file names. Most languages have a dedicated base64url variant.
Base64 increases size by ~33%
Every 3 bytes of input become 4 Base64 characters. A 1 MB image embedded as a Base64 data URI becomes ~1.37 MB in your HTML/CSS. For images over 10 KB, a separate file with proper caching is almost always better for performance than inline Base64.
Data URIs skip an HTTP request but block rendering
Small icons (under 2-4 KB) as Base64 data URIs reduce HTTP requests and can improve initial paint. But Base64 strings in CSS cannot be cached independently and increase stylesheet parse time. The sweet spot: inline SVG for icons, external files for photos.
Frequently Asked Questions
How do I encode text to Base64?
How do I decode a Base64 string?
What is Base64 encoding used for in web development?
Is Base64 encoding the same as encryption?
Related Convert Tools
OpenAPI to TypeScript
Convert OpenAPI 3.x and Swagger 2.0 specs to TypeScript interfaces and types with $ref resolution, allOf/oneOf/anyOf, enums, and API operation types
JSON to Zod Converter
Convert JSON or JSON Schema to Zod validation schemas with $ref resolution, allOf/oneOf/anyOf, enum, format constraints, and required/optional fields
GraphQL to TypeScript
Convert GraphQL SDL schemas to TypeScript interfaces, types, enums, unions, and operations
TypeScript to JavaScript
Convert TypeScript to JavaScript — strip types, interfaces, enums, generics, and access modifiers to get clean JS output