Skip to content

[PROPOSAL] - Base64 Encoder / Decoder #18

@github-actions

Description

@github-actions

Existing Coverage Check

Reviewed before proposing:

This is net-new. Base64 encoding/decoding is explicitly listed as a research focus in AGENTS.md ("Base64 encoders") and has no existing spec, issue, or live tool in this repo.


Specify Draft Summary

Proposed spec path: specs/003-base64-encoder-decoder/spec.md

Problem: Developers constantly encode and decode Base64 strings — for JWT inspection, HTTP Basic Auth headers, data URIs, email attachments, binary debugging, and API work. The top results for "base64 encode online" (base64decode.org, base64encode.org, base64encode.net, freeformatter.com) are covered in ads, split across separate encode/decode pages, and in several cases send data to a server. There is no clean, zero-ads, guaranteed-local tool that handles both directions in one place.

Users: Developers, security engineers, API integrators — anyone debugging HTTP, MIME, or JWT-adjacent workflows.

Scope (3 prioritised stories):

Priority Story Description
P1 Text Encode / Decode Paste text or Base64 string, toggle mode, get instant output — copy or download
P2 File to Base64 Drag-and-drop or select a binary file, get a Base64 data URI string — copy or download
P3 Base64url variant Toggle between standard (RFC 4648) and URL-safe base64url alphabet for JWT/OAuth work

Key requirements: bidirectional toggle, copy-to-clipboard with confirmation, download as .txt, clear/reset, live conversion (no "submit" button needed), Base64url variant, clear error for invalid Base64 input, 100% browser-local.

Acceptance criteria:

  • SC-001: Zero bytes of input data transmitted to any external server
  • SC-002: 1 MB text encodes/decodes in under 500 ms
  • SC-003: Full workflow (paste → encode → copy) completable in under 10 seconds
  • SC-004: Output is byte-identical to btoa() / atob() reference for ASCII inputs
  • SC-005: Tool functions correctly in latest two major versions of Chrome, Firefox, and Safari

The Gap

base64decode.org and base64encode.org are the top two organic results for "base64 encode online" and "base64 decode online" — they are separate sites, both covered in display ads, and they split a workflow that belongs on one page. freeformatter.com limits file upload to 2 MB. samltool.com frames it as a SAML niche tool. None offer a clean, ad-free, bidirectional, privacy-guaranteed experience. The conversion is pure browser JS in under 20 lines.

Competitor Evidence

Tool Problem
base64decode.org / base64encode.org Split across two sites, heavy ads, unclear whether server-side
freeformatter.com 2 MB file limit, ads, no live conversion
base64encode.net Ad-heavy, separate encode and decode modes
samltool.com Positioned as SAML-only, sends requests to server

Search phrases users type: base64 encode online, base64 decode online free, base64 encoder decoder, base64 to text online, encode file to base64


The Tech

API / Capability Role
btoa() / atob() Standard ASCII Base64 encode/decode
TextEncoder / TextDecoder Handle Unicode input correctly before encoding
FileReader API Load binary files for Base64 encoding
Clipboard API Copy output to clipboard
Blob + URL.createObjectURL Trigger local .txt download

No third-party libraries needed. Ships as tools/base64-encoder-decoder.html + tools/base64-encoder-decoder/main.js + tools/base64-encoder-decoder/style.css.

Usability Controls

  • Mode toggle: Encode ↔ Decode (single page, instant switch)
  • Alphabet toggle: Standard (RFC 4648) vs URL-safe base64url
  • Live conversion: Output updates as user types — no submit button
  • Copy to clipboard with visual confirmation flash
  • Download output as .txt
  • Clear / Reset button
  • Error display: "Invalid Base64 input" with affected character highlighted; no crash
  • Safe defaults: Encode mode on load; UTF-8 handling transparent to user

Complexity: 1 / 10

Pure JS with built-in browser APIs. The main implementation challenge is Unicode-safe encoding (requires TextEncoder + byte array loop rather than raw btoa()). No dependencies, no worker threads, no binary processing pipeline.

Generated by Market Research Discovery ·

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions