A simple, privacy-friendly web tool to encode or decode Base64 strings and files, right in your browser. Built with React, it offers a clean two-textarea interface β paste content to convert instantly, or upload files for encoding. The interface is available in 26 languages, with light/dark themes, live counts, and one-click copy. Your data never leaves your device.
This tool also supports decoding of .b64 files into their original binary form.
- Base64 Encode/Decode: Convert plain text to Base64 and vice versa.
- File Upload: Upload files to encode or
.b64files to decode. - Download Results: Download the converted content as
.b64,.bin, or.txt. - Copy to Clipboard: Copy the input or output with a single click.
- Live Counts: See character and UTF-8 byte counts as you type.
- 26 Languages: Switch the interface language on the fly (with right-to-left support).
- Dark Mode: Toggle between light and dark themes.
- Tab Support: Proper indentation when using the "Tab" key in text areas.
- Simple and Intuitive UI: Clean interface that's beginner-friendly.
- Easy Deployment: Use
npm run buildandnpm run deployfor production.
Try it out on GitHub Pages: Base64 Converter
Please note: this is the open source version of this online tool: Base64 Encoder/Decoder (Javascript) for Text/Binary Files
To run the tool locally:
- Clone the repository:
git clone https://github.com/doctorlai/base64-converter.git
cd base64-converter- Install dependencies:
npm install- Start the development server:
npm run dev- Run tests:
## or: npm test
npm run test- Test coverage (enforces the 80% thresholds):
npm run coverage- Lint and format:
## check formatting (Prettier) and lint (ESLint)
npm run format
npm run lint
## auto-fix formatting and lint issues
npm run format:fix
npm run lint:fix- Run everything at once (format, lint, coverage, build):
npm run check- Open http://localhost:5173/base64-converter/ in your browser.
| Script | Description |
|---|---|
npm run dev |
Start the Vite development server. |
npm run build |
Build the production bundle. |
npm run preview |
Preview the production build locally. |
npm run test |
Run the test suite once. |
npm run coverage |
Run tests and enforce the 80% coverage thresholds. |
npm run lint |
Lint the source with ESLint. |
npm run lint:fix |
Lint and auto-fix where possible. |
npm run format |
Check formatting with Prettier. |
npm run format:fix |
Auto-format the source with Prettier. |
npm run check |
Run format + lint + coverage + build (everything). |
npm run deploy |
Build and deploy to GitHub Pages. |
- Enter plain text in the input box.
- Click β Encode to encode the string to Base64.
- Enter a Base64-encoded string in the input box.
- Click β Decode to decode.
-
To encode a file:
- Select a file using the "Load File" button.
- If the file is binary, it will be encoded automatically.
- Click Save File to save the result as
.b64.
-
To decode a file:
- Select a
.b64file using the "Load File" button. - On success, the output will show the decoded binary (which seems random output).
- Click Save File to save the decoded content (in binary).
- Select a
Use the π/π toggle on top to switch between Light and Dark mode.
We welcome contributions! Please read the Contributing Guide and our Code of Conduct before you start.
- Fork the repo.
- Create your feature branch:
git checkout -b feature-name- Commit your changes:
git commit -am 'Add cool feature'- Push to GitHub:
git push origin feature-name- Open a pull request π
This project is licensed under the MIT License β see the LICENSE file.
- AI-generated wiki (DeepWiki)
- Contributing Guide
- Code of Conduct
- Security Policy
- Support
- Privacy Policy
- Changelog
- Made with β€οΈ by @justyy
- Initial Boilerplate code contributed by ChatGPT-4o and o4-mini.
- Like this project? Consider buying me a coffee β
