Back
Asciify Logo
Asciify

Dollar Sign

$ (Dollar Sign) is ASCII code point 36 (0x24), Unicode U+0024, and a printable punctuation character. It denotes currency — specifically the US dollar — by convention placed immediately before the amount, as in $5.00. Programming adopted $ with enthusiasm but no consistency. In Bash and Perl, it prefixes variable names ($HOME, $_), making it the sigil that says "give me the value of this." PHP took the same convention and made it mandatory for every variable. JavaScript and many regex flavors use $ to mean "end of string," the mirror image of ^ for the start. In jQuery, $ is the entire library's alias — arguably the most overloaded single character in front-end history. Template literals across languages use ${...} for interpolation. The trap lives at the intersection of these worlds: writing a Bash script that generates regex or SQL and forgetting that $ will be expanded by the shell before it ever reaches the target language, silently substituting an empty string for what you thought was a literal anchor. The glyph likely evolved from a handwritten abbreviation of "pesos," with the P and S overlapping, the curves of the P eventually falling away to leave an S struck through by a vertical stroke. UTF-8 encodes it as a single byte 0x24. Unicode classifies it as Sc (Symbol, Currency) with the name DOLLAR SIGN — one of the few ASCII punctuation characters that lands in a Symbol category rather than Punctuation.

Symbol

Technical Details

Code Example

</>
const char *price = "$19.99"; // escape $ inside a C string
const char *html = "Price: &#36;19.99"; // safe for HTML output
int ok = (price[0] == '$'); // quick prefix check

Frequently Asked Questions

  • It started with BASIC in the 1960s (A$ for string variables). Shell scripting adopted it ($PATH, $HOME), then PHP ($var), Perl ($scalar), and jQuery ($(selector)). The $ makes variables visually distinct from keywords and function names.

  • $ anchors the match to the end of a string (or line in multiline mode). For example, /\.com$/ matches strings ending in '.com'. Combined with ^, you can match exact patterns: /^hello$/ matches only the word 'hello' with nothing before or after.

  • In JavaScript, ${expression} inside backtick strings interpolates the expression's value. In Bash, $var or ${var} expands variables. In Kotlin and Swift, it's $var or \(var). This pattern lets you embed dynamic values directly in strings without concatenation.

  • In Bash, $ triggers variable expansion. Inside double quotes, $USER becomes the username. To include a literal $, use \$ or single quotes. In regex, $ is a metacharacter, so matching a price like '$10' requires \$10. Same issue in Makefiles, where $$ produces a literal $.

@workani&@alexluthor
Privacy & legal

Privacy

No accounts, no ads, no tracking cookies, and no cross-site tracking. The only analytics we keep are faceless — anonymous, aggregated counts of pages and searches, never tied to you. We store no IP addresses, set no tracking cookies, and build no profiles. Cloudflare hosts the site and handles requests for delivery and security.

Full privacy policy·Extension privacy·legal@asciify.dev

Attributions & licenses

Twemoji
© Twitter, Inc and other contributors · CC-BY 4.0
Noto Color Emoji
© Google · Apache 2.0
Fluent UI Emoji
© Microsoft · MIT
OpenMoji
© HfG Schwäbisch Gmünd · CC-BY-SA 4.0
Toss Face
© Viva Republica (Toss) · SIL OFL 1.1
JoyPixels
© JoyPixels Inc. · Free Limited Use License
SerenityOS Emoji
© The SerenityOS Developers · BSD-2-Clause
EmojiTwo
© EmojiTwo contributors · CC-BY 4.0
Apple Color Emoji
© Apple, Inc.
Facebook Emoji
© Meta Platforms, Inc.

Apple and Facebook emoji styles are proprietary and shown here solely for reference and comparison — a common-sense application of nominative-use / fair-use principles. asciify is not affiliated with, endorsed by, or sponsored by Apple, Inc., Meta Platforms, Inc., or any other rights holder listed above. If a rights holder requests removal of their emoji style from this site, it will be removed.

All other vendor emoji are reproduced for reference and comparison under their respective open licenses listed above.

Character names and code points from the Unicode® Standard. Unicode® and the Unicode Logo are registered trademarks of Unicode, Inc.

Privacy
© asciify.dev 2025-2026