Skip to content

feat: add Number Base Converter tool - #126

Merged
shabeeltt merged 1 commit into
shabeeltt:mainfrom
Jagadeesh729:feature/number-base-converter
Jun 25, 2026
Merged

shabeeltt merged 1 commit into
shabeeltt:mainfrom
Jagadeesh729:feature/number-base-converter

Conversation

@Jagadeesh729

Copy link
Copy Markdown
Contributor

Summary

Adds a browser-only, real-time Number Base Converter tool. It allows developers to instantly convert numbers between Decimal (base 10), Binary (base 2), Hexadecimal (base 16), and Octal (base 8) in real time with arbitrary precision using BigInt.

Closes #123

Requirements Implemented

  • Input Fields: Decimal, Binary, Hexadecimal, and Octal inputs. Typing in any field instantly updates the other three.
  • Validation: Shows a clear error state for invalid input (e.g. 9 in binary, G in hex) and handles incorrect characters safely without crashing.
  • Arbitrary Precision: Uses native BigInt to support extremely large integers (e.g. 256-bit or 512-bit keys) without loss of precision.
  • Digit Grouping: Includes a checkbox toggle to "Group digits for readability" (thousands separators for decimal, 4-bit spaces for binary, 2-character spaces for hex, 3-character spaces for octal).
  • Prefix Support: Gracefully accepts base prefixes (like 0x, 0b, 0o) and handles negative numbers.
  • UX & Aesthetics: Premium design matching both light and dark modes, complete with direct "Copy" buttons next to each field and sample data buttons.

Changes

  • NumberBaseConverter.tsx: Logic for base conversions, state tracking, and layout design.
  • number-base-converter.astro: Route path integration at /tools/number-base-converter.
  • tools.ts: Tool registration in the sidebar/navigation metadata.

Verification

  • Local dev server compiles and runs.
  • npm run build succeeds without warnings/errors.
  • Fully verified in-browser for the following test cases: decimal conversion, binary conversion, invalid input handling, digit grouping toggle, sample loaders, and clear button.

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

@Jagadeesh729 is attempting to deploy a commit to the Shabeel TT's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

👋 Hello, @Jagadeesh729!

Thank you for your contribution to DevToolsHub.

The maintainer has been notified and will review your pull request shortly. If any changes are needed, we will let you know in the comments below.

@shabeeltt
shabeeltt merged commit ff94a4a into shabeeltt:main Jun 25, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Number Base Converter Tool

2 participants