A simple web-based tool to encode or decode Base64 strings or files. This app is built using React and runs directly in your browser. It provides an easy-to-use interface with two text areas—just paste your content and convert instantly, or upload files for encoding.
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
.b64
files to decode. - Download Results: Download the converted content as
.b64
or.bin
. - 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 build
andnpm run deploy
for 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:
npm run test
- Coding format check:
Use
prettier
to either check or format the source code:
npm run format
## fix the code style automatically
npm run format:fix
- Open http://localhost:5173/base64-converter/ in your browser.
- Enter plain text in the input box.
- Click ENcode → to encode the string to Base64.
- Enter 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
.b64
file 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!
- 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.
Here is the AI generated wiki
- Made with ❤️ by @justyy
- Initial Boilerplate code contributed by ChatGPT-4o and o4-mini.
- Like this project? Consider buying me a coffee ☕