Improvement

August 7, 20251 Minute Read

Default tab size changed from eight to four

What’s new

We’re updating the default tab size when viewing code and code snippets on GitHub from eight spaces to four spaces. This change affects all logged-out users and new accounts, making the default code display more consistent with common development practices.

Problem statement

The previous default tab size of eight spaces often resulted in code appearing more indented than many developers expected. Since many users are unaware that tab size can be adjusted in their settings, we’re changing the default to better match typical development environments. By setting four spaces as the default, we aim to provide a code viewing experience that aligns with what most developers encounter in their daily work. Once logged in, users will still have the ability adjust their tab size according to their preferences by going to Settings > Appearance. This will not affect existing users who may still have the previous default setting of eight.

How to Provide Feedback

We want to hear from you! If you have thoughts or run into issues with the new default tab size, feel free to leave a comment in our Community Discussion. Thank you for helping us improve the code viewing experience for everyone!

Subscribe to our developer newsletter

Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.

By submitting, I agree to let GitHub and its affiliates use my information for personalized communications, targeted advertising, and campaign effectiveness. See the GitHub Privacy Statement for more details.

Default tab size changed from eight to four - GitHub Changelog