व्हाइटस्पेस रिमूवर और पाठ क्लीनर
अतिरिक्त रिक्त स्थान, टैब और खाली पंक्तियों को हटाकर गंदा टेक्स्ट साफ़ करें।
कैसे उपयोग करें
- इनपुट क्षेत्र में अपना टेक्स्ट पेस्ट करें।
- वांछित सफ़ाई विकल्प चुनें (डिफ़ॉल्ट रूप से सभी चेक किए गए)।
- प्रसंस्करण के लिए टेक्स्ट साफ़ करें पर क्लिक करें।
- साफ़ किए गए परिणाम को कॉपी या डाउनलोड करें।
अक्सर पूछे जाने वाले प्रश्न
क्या व्हाइटस्पेस माना जाता है?
स्पेस, टैब, अविच्छेद्य स्पेस और अन्य Unicode स्पेसिंग वर्ण। लाइन ब्रेक अलग से संभाले जाते हैं।
क्या यह टूल मेरी सामग्री संशोधित करता है?
नहीं। यह केवल स्पेसिंग वर्णों को हटाता या सिकोड़ता है। आपके शब्द, विराम चिह्न और अन्य सामग्री बरक़रार रहती है।
क्या मैं इसे कोड के लिए उपयोग कर सकता हूँ?
आप कर सकते हैं, परंतु सावधानी से · आरंभ स्पेस हटाना कोड इंडेंटेशन को नष्ट कर देगा। अलग चेकबॉक्स का उपयोग करें।
«Whitespace» का वास्तविक अर्थ
Whitespace character वह है जो text render होने पर visible glyph की बजाय blank space produce करता है, words separate करने, lines indent करने और paragraphs break करने के लिए use होता है। Unicode Character Database formal White_Space property exactly 25 code points को assign करता है। Familiar suspects (space, tab, line feed, carriage return) उनमें से अधिकांश को cover करते हैं जो आप paste करेंगे, लेकिन full list में no-break space (U+00A0), narrow no-break space (U+202F), U+2000-U+200A range में 11 typographic spaces, line और paragraph separators (U+2028, U+2029), medium mathematical space (U+205F), और CJK punctuation के बाद use होने वाला full-width ideographic space (U+3000) भी शामिल हैं।
एक separate group दिखने में invisible है लेकिन Unicode द्वारा whitespace के रूप में classified नहीं है: byte-order mark (U+FEFF), zero-width space (U+200B), zero-width joiner और non-joiner (U+200D, U+200C), word joiner (U+2060), और soft hyphen (U+00AD)। ये formatting controls हैं, spaces नहीं, अधिकांश «I cleaned my text but something's still wrong» reports इनमें से किसी एक पर trace back होती हैं।
यह Tool क्या करता है, Option-by-Option
- Trim leading/trailing spaces per line: हर individual line के start और end पर whitespace strip करता है। Email से indented quotes clean करने, या copy-paste के दौरान accidentally added right-padding के लिए useful।
- Collapse multiple spaces to one: दो या अधिक spaces के runs single space बन जाते हैं। Period के बाद double-spacing की typewriter habit को handle करता है (जिसे अधिकांश modern style guides (Chicago, AP) discourage करते हैं)।
- Remove blank lines: कोई भी line जो empty हो या केवल whitespace contain करती हो, drop करता है। PDFs से text paste करने के बाद common need।
- Convert tabs to spaces: हर
\tको spaces से replace करता है। Code में cautious रहें: Python और YAML whitespace-sensitive हैं, और Makefiles को recipe lines में tab indentation की ज़रूरत होती है। - Trim entire text start/end: पूरी string से एक बार में leading और trailing whitespace strip करता है (JavaScript के
trim()के equivalent)। - Collapse multiple newlines to one: consecutive newline characters के runs single newline बन जाते हैं। Useful तब है जब «Remove blank lines» बहुत aggressive हो और आप paragraph breaks के लिए single empty line रखना चाहते हों।
सभी छह options independent toggles हैं (जो skip करना हो un-check करें) और हर एक केवल उस text पर run होता है जो आप paste करते हैं। कुछ upload नहीं होता; cleaning आपके browser में JavaScript regex passes के via होती है।
इसे कब Use करें
- PDFs और Word documents। PDFs हर line के visual end पर hard line breaks insert करते हैं और कभी-कभी hyphenation preserve करते हैं; pasted Word text में अक्सर numbers और units (10 km) के बीच, French punctuation के around, या Mr. Smith जैसे honorifics के बाद no-break spaces होते हैं।
- User input normalise करना। «Name» या email field में trailing spaces
"Smith"और"Smith "को unequal compare कराते हैं। Entry पर (या lookup से पहले) उन्हें strip करने से «user not found» bugs का पूरा class eliminate होता है। - CSV और TSV preparation। Leading या trailing spaces वाले field values downstream parsers को बर्बाद कर देते हैं जो exact-match keys expect करते हैं। Excel का UTF-8 CSV export silently byte-order mark prepend करता है, जिसे BOM strip न करने वाला downstream parser first column header के part के रूप में देखेगा, जिससे strange-looking
colnameproduce होगा। - Markdown और blog drafts। Multiple consecutive blank lines Markdown में single block के रूप में render होती हैं लेकिन source files bloat करती हैं और diffs noisy बनाती हैं।
- Email signatures, chat transcripts, और identifiers: उन्हें किसी अन्य document में paste करने से पहले, या whitespace के बारे में strict API को promo code या licence key submit करने से पहले quick clean-up।
Common Gotchas
- Leading whitespace remove करने से code break होता है। Python और YAML indentation को syntax के रूप में use करते हैं। Strip करें और file देखने में identical लगती है लेकिन parse नहीं होगी।
- Tab conversion Makefiles break करती है। GNU make run करने से इनकार करता है यदि recipe lines tabs की बजाय spaces से indented हों। Same caution Go के gofmt output पर apply होती है।
- NBSP एक space के identical दिखता है। User अक्सर दो words के बीच single «space» देखता है और assume करता है कि कोई भी cleaner उसे catch कर लेगा। Modern browsers में JavaScript का
\sregex no-break space match करता है, लेकिन यदि आप किसी अन्य language में (या बहुत पुराने environment में) अपना regex लिख रहे हैं तो आपको NBSP explicitly list करना पड़ सकता है। - Markdown में trailing whitespace meaningful है। Markdown line के end पर दो trailing spaces
<br>line break create करते हैं। Per-line trailing whitespace trim करने से वे line breaks remove हो जाते हैं; यदि आप उन पर depend करते हैं, option off रखें। - Windows line endings। Windows source से copy की गई files CRLF (
\r\n) use करती हैं। «Remove blank lines» और «collapse newlines» passes को CR recognize करना होगा; otherwise stray\rहर line के end पर survive कर सकता है। - Zero-width characters whitespace remove के बाद survive करते हैं। ZWSP (U+200B), ZWJ (U+200D), ZWNJ (U+200C), word joiner (U+2060), और soft hyphen (U+00AD) Unicode whitespace नहीं हैं, इसलिए generic whitespace cleaner उन्हें touch नहीं करेगा। यदि cleaning के बाद आपका text off लगे, उसे hex viewer या separate «invisible character» inspector में paste करें।
- Input और output के बीच aspect ratio। इस page के अंदर cleaning copy या close करने के बाद irreversible है, कोई undo history नहीं है। Original को कहीं रखें यदि आपको इसकी ज़रूरत पड़ सकती है।
संक्षिप्त Technical Context
यह tool आपके browser में JavaScript के built-in regex engine use करके completely run होता है। Modern engines में String.prototype.trim() (2015 के आसपास से हर evergreen browser) no-break space और byte-order mark दोनों strip करता है, क्योंकि ECMAScript spec अपना trim set WhiteSpace और LineTerminator productions के union के रूप में define करता है, एक list जो tabs, plain space, NBSP, BOM, typographic spaces, और CR / LF / LS / PS line breaks cover करती है। यह केवल एक Unicode whitespace character, U+0085 (NEL), exclude करता है, जो EBCDIC से inherited एक curiosity है और modern text में लगभग कभी appear नहीं होता।
बहुत large inputs के लिए, slow part rarely regex pass होता है, बल्कि result को textarea में वापस write करना और DOM re-render करना होता है। कुछ megabytes तक के inputs modern laptop पर typically fine हैं; उससे अधिक के लिए, command-line tools (tr, sed, awk, या short Python script) usually faster होते हैं।
अधिक प्रश्न
Regular space और no-break space में क्या difference है?
वे same width पर render होते हैं लेकिन no-break space (NBSP, U+00A0) renderer को उस point पर line break न करने के लिए कहता है। Word, Google Docs, और कई CMSes इसे honorifics और surnames (Mr. Smith) के बीच, numbers और units (10 km) के बीच, या currency symbols ($ 5) के around insert करते हैं। यह pasted text में find होने वाला सबसे common «weird» character है, और यही कारण है कि दो words के बीच same-looking gap कभी-कभी plain spaces के लिए लिखे regex को resist करता है।
क्या यह zero-width characters या byte-order mark remove करेगा?
JavaScript का whitespace handling generally byte-order mark (U+FEFF) catch करता है। यह zero-width space (U+200B), zero-width joiner (U+200D), zero-width non-joiner (U+200C), word joiner (U+2060), या soft hyphen (U+00AD) नहीं catch करता, Unicode इन्हें whitespace के रूप में class नहीं करता, इसलिए ये design के अनुसार whitespace pass survive करते हैं। यदि आपको लगे कि उनमें से कोई आपके text में है, आपको इसके बजाय invisible-character inspector की ज़रूरत होगी।
Blank lines और consecutive newlines दो separate options क्यों हैं?
«Remove blank lines» हर empty line delete करता है, result बिना किसी paragraph break के text का एक continuous block होता है। «Collapse multiple newlines to one» paragraphs के बीच single newline रखता है और केवल extras remove करता है। यदि आप output में readable paragraphs चाहते हैं, पहला option off रखें और दूसरा use करें।
क्या कोई Length Limit है?
कोई hard limit नहीं है, tool modern laptop पर tens of thousands से कुछ million characters की range में text comfortably handle कर सकता है। Limit आपके browser की textarea performance है: बहुत large pastes typing या copying के दौरान lag करने लगते हैं, cleaning step के दौरान नहीं।
क्या कुछ Server को Send होता है?
नहीं। Text आपके browser को कभी नहीं छोड़ता। Cleaning JavaScript में locally run होती है, result उसी page पर textarea में वापस write होता है, और आप page एक बार load होने के बाद offline use कर सकते हैं। यही Absolutool पर हर tool पर apply होता है।