대소문자·공백 정리
대소문자 변환과 불필요한 공백을 정리
대소문자·공백 정리란?
붙여넣은 텍스트의 영문 대소문자를 한 번에 바꾸거나, 중복 공백·줄 앞뒤 공백·빈 줄을 정리하는 도구입니다. 문서 정리, 코드·데이터 다듬기, 게시글 서식 통일에 유용합니다.
사용 방법
입력창에 텍스트를 붙여넣고 원하는 버튼을 누르면 입력 내용이 즉시 변환됩니다. 변환은 여러 번 이어서 적용할 수 있고, 결과 복사 버튼으로 클립보드에 담을 수 있습니다. 모든 처리는 브라우저 안에서만 이루어집니다.
각 버튼 설명
- 대문자 / 소문자: 영문을 모두 대문자 또는 소문자로.
- 첫 글자 대문자: 모든 단어의 첫 글자를 대문자로(Title Case).
- 문장 첫 글자: 각 문장의 첫 글자만 대문자로(Sentence case).
- 공백 1칸: 연속된 공백·탭을 한 칸으로.
- 줄 앞뒤 공백: 각 줄의 시작·끝 공백 제거.
- 모든 공백 제거: 띄어쓰기·줄바꿈을 전부 제거.
- 빈 줄 제거: 내용 없는 줄 삭제.
프로그래밍 케이스 5종, 언제 무엇을 쓰나요?
프로그래밍에서 변수·함수·상수 이름을 짓는 표기법은 크게 다섯 가지로 나뉘며, 언어·문맥에 따라 관례적으로 정해진 쓰임이 있습니다.
| 표기법 | 형태 | 주요 용도 |
|---|---|---|
| camelCase | 첫 단어 소문자, 이후 단어 대문자 시작, 붙여쓰기 | 변수·함수 이름(JavaScript·Java 등) |
| PascalCase | 모든 단어 대문자 시작, 붙여쓰기 | 클래스·컴포넌트·타입 이름 |
| snake_case | 소문자, 단어 사이 밑줄(_) | 변수·함수 이름(Python), DB 컬럼명 |
| kebab-case | 소문자, 단어 사이 하이픈(-) | URL 슬러그, CSS 클래스명, HTML 속성 |
| CONSTANT_CASE | 대문자, 단어 사이 밑줄(_) | 바뀌지 않는 상수(예: MAX_RETRY_COUNT) |
이 도구는 영문 대소문자 변환·공백 정리를 제공하는 범용 텍스트 도구로, 위 다섯 표기법 사이의 자동 변환 전용 기능은 포함하지 않습니다. 대문자·소문자·첫 글자 대문자 변환 버튼을 조합해 부분적으로 표기를 다듬는 용도로 참고하시기 바랍니다.
언어별 관례 — 왜 프로젝트마다 표기법이 다른가
같은 목적의 코드라도 언어 커뮤니티의 관례에 따라 선호하는 표기법이 다릅니다. JavaScript·Java·C# 진영은 변수·함수에 camelCase, 클래스에 PascalCase를 쓰는 것이 표준 스타일 가이드로 자리 잡았고, Python·Ruby 커뮤니티는 PEP 8 등 공식 스타일 가이드에서 변수·함수에 snake_case를 권장합니다. 웹 프런트엔드에서는 URL·CSS 클래스명에 kebab-case가 흔히 쓰이는데, 이는 하이픈이 URL·CSS 선택자에서 특수 문자 취급을 받지 않고 가독성이 좋기 때문입니다. 여러 언어가 뒤섞인 프로젝트(예: 백엔드는 Python, 프런트엔드는 JavaScript)에서는 각 언어의 관례를 따르되, API로 데이터를 주고받는 경계에서 표기법이 자동 변환되도록 규칙을 정해 두는 경우가 많습니다.
일괄 변환 시 주의할 점 — 약어 처리
표기법을 일괄 변환할 때 특히 주의할 부분은 약어(이니셜) 처리입니다. 예를 들어 'URL'이라는 약어가 포함된 이름을 camelCase로 바꿀 때 userURL로 할지 userUrl로 할지는 스타일 가이드마다 다릅니다. 구글 자바스크립트 스타일 가이드는 약어도 일반 단어처럼 첫 글자만 대문자로 쓰는 userUrl 방식을 권장하는 반면, 일부 코드베이스는 약어 전체를 대문자로 유지하는 userURL 방식을 씁니다. 자동 변환 도구를 쓸 때 이 규칙이 프로젝트 컨벤션과 다르면 'ID'가 'Id'로, 'HTML'이 'Html'로 바뀌는 등 의도치 않은 변형이 생길 수 있으므로, 일괄 변환 후에는 약어가 포함된 이름만 따로 검토하는 것이 안전합니다.
What is this tool?
Change the case of English letters or clean up extra spaces, line-edge spaces and blank lines in one click — handy for tidying documents, code and posts.
How to use it
Paste your text and press a button to transform it in place. Chain multiple transforms, then use Copy. Everything runs in your browser.
What each button does
- UPPER / lower: all English letters to upper or lower case.
- Title Case: capitalize the first letter of every word.
- Sentence: capitalize the first letter of each sentence.
- Squeeze / Trim / Strip / Drop blank lines: whitespace clean-up options.
Five programming case styles — when to use which
Naming conventions for variables, functions, and constants in code generally fall into five styles, each with its own conventional use.
| Style | Form | Typical use |
|---|---|---|
| camelCase | first word lowercase, later words capitalized, no separator | Variable/function names (JavaScript, Java, etc.) |
| PascalCase | every word capitalized, no separator | Class/component/type names |
| snake_case | lowercase, words joined with underscore | Variable/function names (Python), database columns |
| kebab-case | lowercase, words joined with hyphen | URL slugs, CSS class names, HTML attributes |
| CONSTANT_CASE | uppercase, words joined with underscore | Constants that never change (e.g. MAX_RETRY_COUNT) |
This tool provides general English case conversion and whitespace clean-up — it doesn't include dedicated automatic conversion between these five naming styles. Use the UPPER/lower/Title Case buttons in combination as a partial aid for cleaning up naming.
Language conventions — why projects differ
Even for the same kind of code, different language communities prefer different naming styles. JavaScript, Java, and C# ecosystems have settled on camelCase for variables/functions and PascalCase for classes as their standard style guides, while Python and Ruby communities' official guides (like PEP 8) recommend snake_case for variables and functions. Web front-ends commonly use kebab-case for URLs and CSS class names, since hyphens aren't treated as special characters in URLs or CSS selectors and read cleanly. In projects mixing multiple languages (e.g. a Python backend with a JavaScript frontend), each side typically follows its own convention, with a defined rule for auto-converting naming style at the API boundary where data crosses over.
Careful with batch conversion — handling acronyms
One thing to watch closely when batch-converting naming styles is how acronyms are handled. For a name containing "URL," converting to camelCase could produce either userURL or userUrl depending on the style guide. Google's JavaScript style guide recommends treating acronyms like ordinary words with only the first letter capitalized (userUrl), while some codebases keep acronyms fully capitalized (userURL). If an automated tool's rule doesn't match your project's convention, you can end up with unintended changes like "ID" becoming "Id" or "HTML" becoming "Html" — so it's safer to separately review any names containing acronyms after a batch conversion.