[{"data":1,"prerenderedAt":1111},["ShallowReactive",2],{"guide-text-length-limits":3},{"id":4,"title":5,"body":6,"date":1099,"description":1100,"extension":1101,"meta":1102,"navigation":643,"path":1106,"readingTime":1107,"seo":1108,"stem":1109,"__hash__":1110},"guides\u002Fguides\u002Ftext-length-limits.md","Text Length Limits: Platform Character Restrictions Explained",{"type":7,"value":8,"toc":1076},"minimark",[9,14,18,21,25,28,273,278,307,311,314,395,399,402,405,416,419,423,426,429,433,436,440,528,531,535,597,600,604,607,611,666,670,687,691,694,827,831,834,884,993,1000,1004,1028,1032,1059,1063,1066,1072],[10,11,13],"h2",{"id":12},"why-text-limits-exist","Why Text Limits Exist",[15,16,17],"p",{},"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.",[15,19,20],{},"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.",[10,22,24],{"id":23},"social-media-character-limits","Social Media Character Limits",[15,26,27],{},"Social platforms define limits per field, not per account. Here is the complete breakdown:",[29,30,31,47],"table",{},[32,33,34],"thead",{},[35,36,37,41,44],"tr",{},[38,39,40],"th",{},"Platform",[38,42,43],{},"Field",[38,45,46],{},"Character Limit",[48,49,50,62,72,82,93,102,112,123,133,143,153,163,173,183,192,201,212,222,233,242,253,263],"tbody",{},[35,51,52,56,59],{},[53,54,55],"td",{},"X (Twitter)",[53,57,58],{},"Tweet",[53,60,61],{},"280",[35,63,64,66,69],{},[53,65,55],{},[53,67,68],{},"Display name",[53,70,71],{},"50",[35,73,74,76,79],{},[53,75,55],{},[53,77,78],{},"Bio",[53,80,81],{},"160",[35,83,84,87,90],{},[53,85,86],{},"Instagram",[53,88,89],{},"Caption",[53,91,92],{},"2,200",[35,94,95,97,99],{},[53,96,86],{},[53,98,78],{},[53,100,101],{},"150",[35,103,104,106,109],{},[53,105,86],{},[53,107,108],{},"Hashtag",[53,110,111],{},"30 tags max",[35,113,114,117,120],{},[53,115,116],{},"LinkedIn",[53,118,119],{},"Post",[53,121,122],{},"3,000",[35,124,125,127,130],{},[53,126,116],{},[53,128,129],{},"Article",[53,131,132],{},"120,000",[35,134,135,137,140],{},[53,136,116],{},[53,138,139],{},"Headline",[53,141,142],{},"220",[35,144,145,147,150],{},[53,146,116],{},[53,148,149],{},"About section",[53,151,152],{},"2,600",[35,154,155,158,160],{},[53,156,157],{},"Facebook",[53,159,119],{},[53,161,162],{},"63,206",[35,164,165,167,170],{},[53,166,157],{},[53,168,169],{},"Ad primary text",[53,171,172],{},"125",[35,174,175,177,180],{},[53,176,157],{},[53,178,179],{},"Ad headline",[53,181,182],{},"40",[35,184,185,188,190],{},[53,186,187],{},"TikTok",[53,189,89],{},[53,191,92],{},[35,193,194,196,198],{},[53,195,187],{},[53,197,78],{},[53,199,200],{},"80",[35,202,203,206,209],{},[53,204,205],{},"YouTube",[53,207,208],{},"Title",[53,210,211],{},"100",[35,213,214,216,219],{},[53,215,205],{},[53,217,218],{},"Description",[53,220,221],{},"5,000",[35,223,224,227,230],{},[53,225,226],{},"Pinterest",[53,228,229],{},"Pin description",[53,231,232],{},"500",[35,234,235,237,240],{},[53,236,226],{},[53,238,239],{},"Board name",[53,241,211],{},[35,243,244,247,250],{},[53,245,246],{},"Reddit",[53,248,249],{},"Post title",[53,251,252],{},"300",[35,254,255,257,260],{},[53,256,246],{},[53,258,259],{},"Post body",[53,261,262],{},"40,000",[35,264,265,268,270],{},[53,266,267],{},"Snapchat",[53,269,89],{},[53,271,272],{},"250",[274,275,277],"h3",{"id":276},"practical-tips-for-social-limits","Practical Tips for Social Limits",[279,280,281,289,295,301],"ul",{},[282,283,284,288],"li",{},[285,286,287],"strong",{},"Always write under the limit."," If a tweet allows 280 characters, aim for 240. Truncation markers (\"...\") signal rushed writing.",[282,290,291,294],{},[285,292,293],{},"Account for links."," X (Twitter) reserves 23 characters for any URL, regardless of its actual length. Always test with the final shortened URL.",[282,296,297,300],{},[285,298,299],{},"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.",[282,302,303,306],{},[285,304,305],{},"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.",[10,308,310],{"id":309},"seo-character-limits","SEO Character Limits",[15,312,313],{},"Search engines do not publish hard limits, but they truncate display at predictable points:",[29,315,316,328],{},[32,317,318],{},[35,319,320,322,325],{},[38,321,43],{},[38,323,324],{},"Recommended Limit",[38,326,327],{},"What Happens If You Exceed It",[48,329,330,341,351,362,373,384],{},[35,331,332,335,338],{},[53,333,334],{},"Title tag",[53,336,337],{},"60 characters",[53,339,340],{},"Google truncates with \"...\"",[35,342,343,346,349],{},[53,344,345],{},"Meta description",[53,347,348],{},"155 characters",[53,350,340],{},[35,352,353,356,359],{},[53,354,355],{},"URL slug",[53,357,358],{},"75 characters",[53,360,361],{},"Browsers handle longer URLs, but search results may crop the display",[35,363,364,367,370],{},[53,365,366],{},"URL total",[53,368,369],{},"2,048 characters",[53,371,372],{},"Internet Explorer refuses to load longer URLs; other browsers vary",[35,374,375,378,381],{},[53,376,377],{},"H1 heading",[53,379,380],{},"70 characters",[53,382,383],{},"No truncation penalty, but overly long headings dilute keyword focus",[35,385,386,389,392],{},[53,387,388],{},"Alt text",[53,390,391],{},"125 characters",[53,393,394],{},"Screen readers process longer alt text, but conciseness improves accessibility",[274,396,398],{"id":397},"title-tag-strategy","Title Tag Strategy",[15,400,401],{},"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.",[15,403,404],{},"A practical formula for title tags:",[406,407,413],"pre",{"className":408,"code":410,"language":411,"meta":412},[409],"language-text","[Primary Keyword] - [Differentiator] | [Brand]\n","text","",[414,415,410],"code",{"__ignoreMap":412},[15,417,418],{},"Example: \"Character Counter - Free Online Tool | ToolBoxes\"",[274,420,422],{"id":421},"meta-description-strategy","Meta Description Strategy",[15,424,425],{},"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.",[15,427,428],{},"Write descriptions as ad copy, not summaries. Include a benefit and a verb.",[10,430,432],{"id":431},"database-and-api-character-limits","Database and API Character Limits",[15,434,435],{},"Backend systems enforce limits that front-end validation must match. Mismatches cause silent truncation or server errors.",[274,437,439],{"id":438},"common-database-limits","Common Database Limits",[29,441,442,454],{},[32,443,444],{},[35,445,446,449,452],{},[38,447,448],{},"Database",[38,450,451],{},"Type",[38,453,46],{},[48,455,456,467,477,487,498,507,517],{},[35,457,458,461,464],{},[53,459,460],{},"MySQL",[53,462,463],{},"VARCHAR",[53,465,466],{},"Up to 65,535 bytes (shared row limit)",[35,468,469,471,474],{},[53,470,460],{},[53,472,473],{},"TEXT",[53,475,476],{},"65,535 bytes",[35,478,479,481,484],{},[53,480,460],{},[53,482,483],{},"MEDIUMTEXT",[53,485,486],{},"16,777,215 bytes",[35,488,489,492,495],{},[53,490,491],{},"PostgreSQL",[53,493,494],{},"VARCHAR(n)",[53,496,497],{},"User-defined (up to ~1 GB)",[35,499,500,502,504],{},[53,501,491],{},[53,503,473],{},[53,505,506],{},"Unlimited (up to ~1 GB)",[35,508,509,512,514],{},[53,510,511],{},"SQLite",[53,513,473],{},[53,515,516],{},"1 billion bytes",[35,518,519,522,525],{},[53,520,521],{},"MongoDB",[53,523,524],{},"String",[53,526,527],{},"16 MB per document",[15,529,530],{},"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.",[274,532,534],{"id":533},"api-payload-limits","API Payload Limits",[29,536,537,547],{},[32,538,539],{},[35,540,541,544],{},[38,542,543],{},"API",[38,545,546],{},"Limit",[48,548,549,557,565,573,581,589],{},[35,550,551,554],{},[53,552,553],{},"REST API (typical)",[53,555,556],{},"1–10 MB request body",[35,558,559,562],{},[53,560,561],{},"GraphQL",[53,563,564],{},"Varies by implementation",[35,566,567,570],{},[53,568,569],{},"AWS API Gateway",[53,571,572],{},"10 MB",[35,574,575,578],{},[53,576,577],{},"Cloudflare Workers",[53,579,580],{},"100 MB",[35,582,583,586],{},[53,584,585],{},"Stripe API",[53,587,588],{},"500 KB per request",[35,590,591,594],{},[53,592,593],{},"Twitter API v2",[53,595,596],{},"280 characters per tweet field",[15,598,599],{},"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.",[10,601,603],{"id":602},"handling-character-limits-in-code","Handling Character Limits in Code",[15,605,606],{},"Here are practical patterns for enforcing limits correctly across languages.",[274,608,610],{"id":609},"javascript-count-unicode-characters-correctly","JavaScript: Count Unicode Characters Correctly",[406,612,616],{"className":613,"code":614,"language":615,"meta":412,"style":412},"language-javascript shiki shiki-themes github-light github-dark","\u002F\u002F Wrong: counts UTF-16 code units\ntext.length\n\n\u002F\u002F Right: counts Unicode characters\n[...text].length\n","javascript",[414,617,618,627,638,645,651],{"__ignoreMap":412},[619,620,623],"span",{"class":621,"line":622},"line",1,[619,624,626],{"class":625},"sJ8bj","\u002F\u002F Wrong: counts UTF-16 code units\n",[619,628,630,634],{"class":621,"line":629},2,[619,631,633],{"class":632},"sVt8B","text.",[619,635,637],{"class":636},"sj4cs","length\n",[619,639,641],{"class":621,"line":640},3,[619,642,644],{"emptyLinePlaceholder":643},true,"\n",[619,646,648],{"class":621,"line":647},4,[619,649,650],{"class":625},"\u002F\u002F Right: counts Unicode characters\n",[619,652,654,657,661,664],{"class":621,"line":653},5,[619,655,656],{"class":632},"[",[619,658,660],{"class":659},"szBVR","...",[619,662,663],{"class":632},"text].",[619,665,637],{"class":636},[274,667,669],{"id":668},"python-count-characters-vs-bytes","Python: Count Characters vs Bytes",[406,671,675],{"className":672,"code":673,"language":674,"meta":412,"style":412},"language-python shiki shiki-themes github-light github-dark","len(\"😀\")  # 1 — Python counts characters correctly\nlen(\"😀\".encode(\"utf-8\"))  # 4 — byte count for storage\n","python",[414,676,677,682],{"__ignoreMap":412},[619,678,679],{"class":621,"line":622},[619,680,681],{},"len(\"😀\")  # 1 — Python counts characters correctly\n",[619,683,684],{"class":621,"line":629},[619,685,686],{},"len(\"😀\".encode(\"utf-8\"))  # 4 — byte count for storage\n",[274,688,690],{"id":689},"trim-text-without-breaking-words","Trim Text Without Breaking Words",[15,692,693],{},"Truncating at an exact character limit often cuts mid-word. A better approach truncates at the last space before the limit.",[406,695,697],{"className":613,"code":696,"language":615,"meta":412,"style":412},"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",[414,698,699,723,750,775,799,821],{"__ignoreMap":412},[619,700,701,704,708,711,714,717,720],{"class":621,"line":622},[619,702,703],{"class":659},"function",[619,705,707],{"class":706},"sScJk"," truncate",[619,709,710],{"class":632},"(",[619,712,411],{"class":713},"s4XuR",[619,715,716],{"class":632},", ",[619,718,719],{"class":713},"maxChars",[619,721,722],{"class":632},") {\n",[619,724,725,728,731,733,735,738,741,744,747],{"class":621,"line":629},[619,726,727],{"class":659},"  if",[619,729,730],{"class":632}," ([",[619,732,660],{"class":659},[619,734,663],{"class":632},[619,736,737],{"class":636},"length",[619,739,740],{"class":659}," \u003C=",[619,742,743],{"class":632}," maxChars) ",[619,745,746],{"class":659},"return",[619,748,749],{"class":632}," text\n",[619,751,752,755,758,761,764,767,769,772],{"class":621,"line":640},[619,753,754],{"class":659},"  const",[619,756,757],{"class":636}," truncated",[619,759,760],{"class":659}," =",[619,762,763],{"class":632}," text.",[619,765,766],{"class":706},"slice",[619,768,710],{"class":632},[619,770,771],{"class":636},"0",[619,773,774],{"class":632},", maxChars)\n",[619,776,777,779,782,784,787,790,792,796],{"class":621,"line":647},[619,778,754],{"class":659},[619,780,781],{"class":636}," lastSpace",[619,783,760],{"class":659},[619,785,786],{"class":632}," truncated.",[619,788,789],{"class":706},"lastIndexOf",[619,791,710],{"class":632},[619,793,795],{"class":794},"sZZnC","' '",[619,797,798],{"class":632},")\n",[619,800,801,804,806,808,810,812,815,818],{"class":621,"line":653},[619,802,803],{"class":659},"  return",[619,805,786],{"class":632},[619,807,766],{"class":706},[619,809,710],{"class":632},[619,811,771],{"class":636},[619,813,814],{"class":632},", lastSpace) ",[619,816,817],{"class":659},"+",[619,819,820],{"class":794}," '...'\n",[619,822,824],{"class":621,"line":823},6,[619,825,826],{"class":632},"}\n",[274,828,830],{"id":829},"validate-input-length-on-form-submission","Validate Input Length on Form Submission",[15,832,833],{},"Always enforce limits before sending data to the server:",[406,835,839],{"className":836,"code":837,"language":838,"meta":412,"style":412},"language-html shiki shiki-themes github-light github-dark","\u003Cinput maxlength=\"280\" \u002F>\n\u003Cp id=\"counter\">0 \u002F 280\u003C\u002Fp>\n","html",[414,840,841,862],{"__ignoreMap":412},[619,842,843,846,850,853,856,859],{"class":621,"line":622},[619,844,845],{"class":632},"\u003C",[619,847,849],{"class":848},"s9eBZ","input",[619,851,852],{"class":706}," maxlength",[619,854,855],{"class":632},"=",[619,857,858],{"class":794},"\"280\"",[619,860,861],{"class":632}," \u002F>\n",[619,863,864,866,868,871,873,876,879,881],{"class":621,"line":629},[619,865,845],{"class":632},[619,867,15],{"class":848},[619,869,870],{"class":706}," id",[619,872,855],{"class":632},[619,874,875],{"class":794},"\"counter\"",[619,877,878],{"class":632},">0 \u002F 280\u003C\u002F",[619,880,15],{"class":848},[619,882,883],{"class":632},">\n",[406,885,887],{"className":613,"code":886,"language":615,"meta":412,"style":412},"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",[414,888,889,912,932,953,972,988],{"__ignoreMap":412},[619,890,891,894,897,899,902,905,907,910],{"class":621,"line":622},[619,892,893],{"class":659},"const",[619,895,896],{"class":636}," input",[619,898,760],{"class":659},[619,900,901],{"class":632}," document.",[619,903,904],{"class":706},"querySelector",[619,906,710],{"class":632},[619,908,909],{"class":794},"'input'",[619,911,798],{"class":632},[619,913,914,916,919,921,923,925,927,930],{"class":621,"line":629},[619,915,893],{"class":659},[619,917,918],{"class":636}," counter",[619,920,760],{"class":659},[619,922,901],{"class":632},[619,924,904],{"class":706},[619,926,710],{"class":632},[619,928,929],{"class":794},"'#counter'",[619,931,798],{"class":632},[619,933,934,937,940,942,944,947,950],{"class":621,"line":640},[619,935,936],{"class":632},"input.",[619,938,939],{"class":706},"addEventListener",[619,941,710],{"class":632},[619,943,909],{"class":794},[619,945,946],{"class":632},", () ",[619,948,949],{"class":659},"=>",[619,951,952],{"class":632}," {\n",[619,954,955,957,960,962,965,967,970],{"class":621,"line":647},[619,956,754],{"class":659},[619,958,959],{"class":636}," count",[619,961,760],{"class":659},[619,963,964],{"class":632}," [",[619,966,660],{"class":659},[619,968,969],{"class":632},"input.value].",[619,971,637],{"class":636},[619,973,974,977,979,982,985],{"class":621,"line":653},[619,975,976],{"class":632},"  counter.textContent ",[619,978,855],{"class":659},[619,980,981],{"class":794}," `${",[619,983,984],{"class":632},"count",[619,986,987],{"class":794},"} \u002F 280`\n",[619,989,990],{"class":621,"line":823},[619,991,992],{"class":632},"})\n",[15,994,995,996,999],{},"Pair ",[414,997,998],{},"maxlength"," with a live counter so users see their remaining allowance before they hit the wall.",[10,1001,1003],{"id":1002},"key-takeaways","Key Takeaways",[279,1005,1006,1009,1012,1015,1022,1025],{},[282,1007,1008],{},"Social media platforms enforce strict character limits per field — always write under the limit to avoid truncation markers.",[282,1010,1011],{},"SEO title tags should stay under 60 characters and meta descriptions under 155 characters to prevent Google from cropping your display.",[282,1013,1014],{},"MySQL VARCHAR counts bytes, not characters — multi-byte characters eat into your limit faster than you might expect.",[282,1016,1017,1018,1021],{},"JavaScript ",[414,1019,1020],{},".length"," counts UTF-16 code units, not Unicode characters — use the spread operator for accurate counts.",[282,1023,1024],{},"Validate character limits on both client and server. Client-side gives instant feedback; server-side prevents database corruption.",[282,1026,1027],{},"Trim text at word boundaries rather than at exact character positions for cleaner results.",[10,1029,1031],{"id":1030},"related-guides","Related Guides",[279,1033,1034,1041,1047,1053],{},[282,1035,1036],{},[1037,1038,1040],"a",{"href":1039},"\u002Fguides\u002Fcharacter-counting-guide","Character Counting Guide",[282,1042,1043],{},[1037,1044,1046],{"href":1045},"\u002Fguides\u002Fword-count-best-practices","Word Count Best Practices",[282,1048,1049],{},[1037,1050,1052],{"href":1051},"\u002Fguides\u002Furl-structure-explained","URL Structure Explained",[282,1054,1055],{},[1037,1056,1058],{"href":1057},"\u002Fguides\u002Fseo-friendly-urls","SEO Friendly URLs",[10,1060,1062],{"id":1061},"try-it-yourself","Try It Yourself",[15,1064,1065],{},"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.",[15,1067,1068],{},[1037,1069,1071],{"href":1070},"\u002Ftools\u002Fcharacter-counter","Free Character Counter Tool",[1073,1074,1075],"style",{},"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":412,"searchDepth":629,"depth":629,"links":1077},[1078,1079,1082,1086,1090,1096,1097,1098],{"id":12,"depth":629,"text":13},{"id":23,"depth":629,"text":24,"children":1080},[1081],{"id":276,"depth":640,"text":277},{"id":309,"depth":629,"text":310,"children":1083},[1084,1085],{"id":397,"depth":640,"text":398},{"id":421,"depth":640,"text":422},{"id":431,"depth":629,"text":432,"children":1087},[1088,1089],{"id":438,"depth":640,"text":439},{"id":533,"depth":640,"text":534},{"id":602,"depth":629,"text":603,"children":1091},[1092,1093,1094,1095],{"id":609,"depth":640,"text":610},{"id":668,"depth":640,"text":669},{"id":689,"depth":640,"text":690},{"id":829,"depth":640,"text":830},{"id":1002,"depth":629,"text":1003},{"id":1030,"depth":629,"text":1031},{"id":1061,"depth":629,"text":1062},"2026-05-28","Complete reference of character limits across social media, SEO, and development platforms. Never get truncated again.","md",{"keywords":1103},[1104,1105],"character-counter","text-length-limits","\u002Fguides\u002Ftext-length-limits",null,{"title":5,"description":1100},"guides\u002Ftext-length-limits","bfFKvMAAOpJ4vdKudJjgN7bdKqCqUaa8iDTsotLRt5M",1780401327950]