# Beste UI

> Beautiful, accessible blocks, pieces and components for shadcn/ui and Tailwind CSS, built for React and Next.js. Install one with the shadcn CLI and the code is yours to edit: no runtime dependency, nothing to upgrade.

Markdown rendition of https://ui.beste.co/tools/base64. Every page on the site has one: add `.md` to any address, or send `Accept: text/markdown`.

Whole catalog for LLMs: https://ui.beste.co/llms.txt. Registry index: https://ui.beste.co/r/registry.json

---
[tools](/tools)/[encoding](/tools/category/encoding)

# Base64 encoder and decoder

Encode text to base64 or decode it back, with UTF-8 handled correctly and a URL-safe variant for tokens and query strings.

Direction

EncodeDecode

URL-safe alphabet

Plain text0

Load sampleClear

Base64base64

The result appears here

Copy outputDownload

## Questions

Why does btoa break on emoji and accented characters?+

btoa only accepts characters in the Latin-1 range. This tool encodes the text to UTF-8 bytes first and base64s those bytes, so emoji, accented characters and any other Unicode round trip correctly.

What is the URL-safe variant?+

Standard base64 uses + and /, which have meaning inside URLs. The URL-safe alphabet replaces them with - and \_ and drops the = padding. It is what JWTs and most token formats use.

Can I decode a JWT with this?+

You can decode each segment by hand, since a JWT is three URL-safe base64 strings separated by dots. A dedicated JWT decoder that splits and pretty prints the payload is on the way.

Is base64 encryption?+

No, and treating it as such is how secrets end up in public. Base64 is a way to carry bytes through a text channel; anyone can decode it with no key. It hides nothing, it only survives transport.

Why is the output longer than the input?+

Because three bytes become four characters, so anything encoded grows by about a third, plus padding. That is the cost of putting a data URI inline, and the reason a base64 image in your CSS is bigger than the file it came from.

## Related tools

[JWT decoderPaste a JSON Web Token and read its header, payload and expiry. Decoding only, in your browser, with no secret asked for and nothing sent anywhere.](/tools/jwt-decoder)[JSON formatter and validatorFormat, validate, sort or minify JSON. Unquoted keys, trailing commas and comments are accepted, so a pasted console log works as well as a strict file.](/tools/json-formatter)[Hash generatorHash any text with MD5, SHA-1, SHA-256, SHA-384 and SHA-512 at once, in hex or base64, computed in your browser.](/tools/hash-generator)

Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · Ship it · 

## The tools are free. So is most of the library.

1935 blocks and 989 pieces for shadcn/ui and Tailwind, built on the same tokens these tools write. Install one with a command and the code is yours.

[Browse the blocksBrowse the blocks](/blocks)

No signup for the tools. MIT for free blocks, commercial licence for Pro.

## Ship the interface, keep the code.

New blocks, pieces and components every week. Install one with a command and it is yours to edit. No runtime dependency, no upgrade path to fight.

[Browse the libraryBrowse the library](/blocks)[See pricingSee pricing](/pricing)

### Library

* [Blocks](/blocks)
* [Pages](/pages)
* [Pieces](/pieces)
* [Components](/components)
* [Search](/search)

### Learn

* [Docs](/docs)
* [AI & MCP](/docs/mcp)
* [Blog](/blog)
* [Free tools](/tools)
* [What's new?](/changelog)
* [Website Builder](https://beste.co)

### More

* [Pricing](/pricing)
* [Referrals](/referrals)
* [License](/license)
* [GitHub](https://github.com/beste-co/beste-ui)

### Shadcn Blocks

* [Shadcn Hero Blocks](/blocks/hero)
* [Shadcn Feature Blocks](/blocks/feature)
* [Shadcn Pricing Blocks](/blocks/pricing)
* [Shadcn CTA Blocks](/blocks/cta)
* [Shadcn FAQ Blocks](/blocks/faq)
* [Shadcn About Blocks](/blocks/about)
* [Shadcn Stats Blocks](/blocks/stats)
* [Shadcn Footer Blocks](/blocks/footer)
* [Shadcn Navigation Blocks](/blocks/navigation)
* [Shadcn Auth Blocks](/blocks/auth)
* [Shadcn Ecommerce Blocks](/blocks/ecommerce)
* [Shadcn Portfolio Blocks](/blocks/portfolio)
* [Shadcn Showcase Blocks](/blocks/showcase)
* [Shadcn Careers Blocks](/blocks/careers)
* [Shadcn Onboarding Blocks](/blocks/onboarding)
* [Shadcn Coming Soon Blocks](/blocks/coming-soon)
* [Shadcn Post Blocks](/blocks/post)
* [Shadcn Legal Blocks](/blocks/legal)
* [Shadcn Workflow Blocks](/blocks/workflow)
* [Shadcn News Blocks](/blocks/news)

© 2026, [Beste](https://beste.co). All rights reserved.