جمّل CSS بإزاحة نظيفة، أو صغّره لتقليل حجم الملف. يتعامل مع استعلامات الوسائط وcalc() وتعليقات الترخيص.
كيفية استخدام منسّق CSS
الصق CSS في صندوق الإدخال.
اختر تجميل لتنسيقه أو تصغير لضغطه.
اختر حجم الإزاحة، ثم انسخ النتيجة.
This is a CSS formatter that beautifies stylesheets with clean, consistent indentation, or minifies them to shrink file size. You choose the indent size for beautifying, and switch to minify when you want the smallest output.
Readable CSS is easier to scan, review and debug: when each rule and declaration is indented consistently, you can see selectors, nesting and the shape of your media queries at a glance.
Minifying is for production. It removes the whitespace and comments that browsers do not need, so the file downloads faster. On a large stylesheet the saving adds up, especially before gzip compression on the server.
The minifier is careful where it matters. It keeps the spaces around plus and minus inside calc(), so calc(100% - 30px) stays valid, and it only strips spaces around structural characters such as braces, colons and semicolons. It also handles nested media queries correctly.
License comments written in the /*! ... */ form are preserved, which is the standard convention for keeping copyright and license notices in minified output even when ordinary comments are removed.
Both beautify and minify run entirely in your browser, so your stylesheets never leave your device. The tool formats for readability and size; it does not validate that your CSS is correct.
الأسئلة الشائعة
لا. يُبقي المصغّر المسافات حول علامتي الجمع والطرح داخل القيم، فيبقى calc(100% - 30px) صحيحًا. ولا يزيل إلا المسافات حول الأحرف البنيوية مثل الأقواس والنقطتين والفواصل المنقوطة.
تُزال التعليقات العادية لتوفير المساحة، لكن تعليقات الترخيص المكتوبة بصيغة /*! ... */ تُحفظ، وهو العُرف القياسي للحفاظ على إشعارات حقوق النشر.
لا. يعمل كل من التجميل والتصغير بالكامل داخل متصفحك، فلا تغادر أوراق أنماطك جهازك.
ضمّن هذه الأداة
أضف هذه الأداة إلى موقعك الخاص. انسخ المقتطف أدناه، ويبقى محدّثاً تلقائياً.
<iframe src="https://monu.tools/embed/ar/css-formatter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>أدوات ذات صلة
نسق كود HTML بإزاحة تراعي العناصر الكتلية، أو اضغطه. يتم الحفاظ على محتويات pre وtextarea وscript وstyle.
نسق وجمّل كود JavaScript بإزاحة ومباعدة متسقة. يعمل بالكامل داخل متصفحك.
حوّل CSV إلى ملف Excel بصيغة .xlsx وExcel مرة أخرى إلى CSV، بالكامل داخل متصفحك. يعمل في كلا الاتجاهين.
ولّد واجهات TypeScript من عينة JSON، مع الأنواع المتداخلة والمصفوفات والحقول الاختيارية. يعمل داخل متصفحك.