Base64 Encode & Decode Online — Unicode & URL-safe
Convert text between UTF-8 and Base64 without leaving your browser. Toggle URL-safe alphabet when you embed tokens in URLs or JWT segments. Copy results in one click — nothing is uploaded.
How this Base64 tool works
Choose Encode to transform readable text into a compact ASCII-safe representation that only uses letters, digits, +, / and optional padding. Choose Decode to reverse the process: paste Base64 (with or without URL-safe characters) and instantly recover the original Unicode string. Everything executes locally — ideal when you need to prepare snippets for APIs, compare payloads with backend logs, or quickly sanity-check configuration secrets.
URL-safe Base64 option
RFC 4648 defines an alternate alphabet where + becomes - and / becomes _. Padding characters (=) are typically trimmed so values fit cleanly inside URLs or HTTP headers. Remember that Base64 is encoding, not encryption: anyone can decode it. Treat it as a transport representation, not a security boundary.
Practical examples
Unicode caption → Base64
Sample input
Expected output
JWT-style fragment (URL-safe)
Sample input
Expected output
Combine with other FastMinify utilities
Need percent-encoding instead of radix-64? Jump to the URL encoder. Sanitizing markup snippets works great alongside the HTML entities tool, while shipping scripts stays fastest through our JavaScript minifier.
Base64 FAQ
Answers teams ask before piping strings through Base64 pipelines
Does Base64 change my Unicode characters?
No meaningful loss occurs: UTF-8 preserves emoji and accented glyphs before the Base64 stage. Decoding reconstructs the exact original text.
When should I enable URL-safe mode?
Turn it on whenever + or / would collide with URL delimiters or when your downstream parser expects JWT/Base64URL semantics.
Why does decoding fail with InvalidCharacterError?
Common culprits include stray whitespace, missing padding (standard mode only), or mixing URL-safe characters without enabling the toggle.
Is data uploaded?
Never — conversions stay inside your browser tab.
How does this relate to Data URIs?
You can Base64-encode binaries or SVG/text payloads for data: URIs, but validate CSP rules before deploying inline assets.
Can I embed secrets?
Base64 does not protect confidentiality. Use proper secret managers instead of assuming encoded strings are hidden.
Is Base64 the same as encryption?
No. Base64 only represents bytes as ASCII text; anyone can decode it. It is not a substitute for encryption or signing.
Does padding matter when decoding?
In standard mode, missing = padding can cause decode errors. URL-safe mode often omits padding—enable the matching option so input and settings stay aligned.
Encoding
Encode or decode Base64, URL components and HTML entities — client-side only.
Explore other tool categories
Minify
Shrink code and assets for production — minify JavaScript, CSS, HTML, JSON and XML before gzip or CDN deploy.
Beautify
Make code readable with consistent indentation — beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.
Unminify
Expand minified or compressed code — unminify JavaScript, CSS, TypeScript, SCSS, LESS, SQL, YAML and other formats when debugging or reviewing.
Conversion
Transform data between JSON, YAML, XML and CSV locally — no server uploads.
CSS preprocessors
Compile SCSS or LESS to standard CSS in the browser — pair with beautify or minify for a full stylesheet workflow.
JSON Tools
Validate, format, diff and explore JSON payloads — complementary to minifiers and converters.
SVG Tools
Preview, optimize with SVGO, export Data URI, resize, beautify, convert to JSX and validate SVG — all in your browser.
DevOps & Infra
Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.
CI/CD
GitHub Actions and GitLab CI — format YAML and check workflow/job structure in your browser.
Logs & observability
Line-oriented JSON/NDJSON and Nginx/Apache access logs — format, filter, validate, and CSV/TSV.
Kubernetes
Multi-doc manifests, structural validate, Ingress/Deployment starters, and Helm values formatting.
Networking / IP
CIDR, subnets, and IPv4/IPv6 helpers — in your browser.
Security & tokens
JWKS, X.509 certificates, and secrets scan — browser-local.
API & schemas
OpenAPI tools to format, validate, and lint your specs.
Developer utilities
Timestamps, UUID, ULID, Nanoid, cron, passwords, regex, slugify, number bases, case, text diff, and chmod — all client-side.
Text & Markdown
Count words, build Markdown TOCs, and clean line lists — all in your browser.
AI & LLM
Token counting, pricing estimates, and context-window fit — 100% browser-local.
Serialization
Serialize and deserialize PHP data structures beside JSON workflows.