I have Safari set to open a blank page when I open a new tab. I like it better than what it is normally set to, but unfortunately I work late a lot and the giant white area on the screen bothers my eyes a considerable deal. Does anybody know a way to make the blank page darker so that it's easier on the eyes?

Just for reference, here's the blank page I'm talking about: http://cl.ly/image/1l1P47351D1o

  • After a rough day I'll often make a stop at the pub to finish the day's tasks, take notes, etc - even turning my rMBP 15" down to the lowest brightness can still be distracting to myself as well as those around me. I like to use Tranquility on 10.9 to set 'battle stations' and reduce the glare. – da4 Feb 9 '15 at 16:32

There may be other ways to do this, but a simple way would be to create your own homepage, which could look anyway you like. Then, just set the Homepage in Safari to point at that file.

Make a file called "home.html" with these contents:

<!DOCTYPE html>
<html style="background:#333;">
    <title>New Tab</title>

Open that file with Safari, and use the preferences dialog to set the homepage to the current page. Also set new tabs and windows to start on your homepage.

  • 1
    While this is really nice on the eyes, it unfortunately does not blank out the top address bar for instant typing as one would expect. This focus on the address bar for immediate data entry would seem pretty important. – ylluminate Feb 9 '15 at 15:46
  • Hmmm, I wonder if that's possible with some javascript on page load... – jerwood Feb 9 '15 at 21:34
  • Doesn't appear to be possible to do this via javascript. Also tried setting the background in a user style sheet, but it doesn't affect a new tab or page. – jerwood Feb 9 '15 at 22:03

Extending on the answer provided earlier, you can make a simple html file, and save it in your home directory or somewhere, and then set up your General Safari preferences like this:

Then when Safari starts up, or you open a new tab it'll be the nice darker empty page:


The previous solutions for the blank dark page do not auto-focus on the address bar, one solution is to set a custom safari stylesheet and change body color to dark.

Create darkblanksafari.css as below:

@media screen,projection,tv { 
       body {
       background-color: #1c1c1c;

Now set Style Sheet to the file through Advanced tab in Safari Preferences: enter image description here

It leads to less eye strain and less glaring white pages in your late nights while keeping your internet experience intact, because most websites replace body background color with their own.

  • ...and it STILL blinks white, just like all other answers. Damn Safari... – Sergei Feb 22 '18 at 11:03

The previously noted solutions of the dark page is great, but they lack the ability to have the address bar auto-focused, which to me is a non-starter. I'm used to being able to immediately start typing a URL or a search item right off the bat when I open a new page / tab. This is such a good feature that I went ahead and submitted a request for Apple to add this feature, but I think in the meantime there may be a clunky workaround.

While I did not find any blank page html or css floating around the Safari.app bundle unfortunately, I realized that we could use a macro app like SimpleKeys, Keyboard Maestro, or another such app to create a double whammy where we could set the default blank page as noted previously, ie:

Edit ~/Library/Safari/DarkBlank.html (and set your blank page to this):

<!DOCTYPE html>
<html style="background:#333;">
    <title>New Tab</title>

And then set a macro to initiate a (command-t,command-l) or (command-n,command-l) in order to create a new tab or window with the address bar in focus. You'd have to get used to a new shortcut to do this, but you'd get the expected behavior.

At any rate, I hope that there is ultimately a better solution put in place by Apple themselves, but if you want address bar focus, this is probably the best we can hope for at the moment unless someone is aware of another way to hack the page (perhaps via NinjaKit or EasySIMBL).


This is not a direct solution to creating a dark page open for a new tab. However, I have similar issues with working late and straining my eyes to read glaring white pages. I personally use Flux and it solves the issue for me system-wide.


The default settings are a bit extreme for me, but you can edit them to your preferences and set a schedule for when you'd like it turned on. Took almost 2-3 weeks for me to get used to it but now I'm hooked. Hope it helps.

  • Yeah, thanks. I use Flux too. It's great for working late and in the dark :) – GDP2 Feb 11 '15 at 5:46

Update: this is not a good answer, it has significant downsides.


It's possible, but solution is not perfect.

Create new service for Safari using Automator using following AppleScript (last line is optional - it's the Del key)

tell application "Safari" to tell window 1 to set current tab to (make new tab with properties {URL:"data:text/html;base64,PGJvZHkgYmdjb2xvcj1ibGFjaz4K"})
delay 0.3
tell application "System Events" to tell process "Safari" to keystroke "l" using command down
tell application "System Events" to tell process "Safari" to keystroke (ASCII character 8)
return input

Name it, assign ⌘T in preferences. The big downside is that it is rather slow (~1 second before I can start typing). I blame Automator. Maybe binary service doing the same thing will perform better. Second problem - it blinks white for a short moment. Setting homepage to static black page blinks white too.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .