How do you Autofit Column Width in Google Sheets? (3 ways)

Dave | November 17, 2022 |

The default width of a column in Google Sheets is 120 pixels. You can be sure that whatever you end up putting in your sheet, 120 pixels won’t always be wide enough. Your data will get cropped and hidden, and sometimes that’s annoying. Don’t spend your valuable time tweaking the widths of columns. There is a quick and easy way to make sure they fit. You might know it as Autofit if you’re an Excel person. But in Google Sheets it’s called Fit to data.

What does Fit to data (Autofit) do?

If you have a spreadsheet with a column of data and you use Autofit or Fit to data on that column, then Google Sheets will make sure that the column is wide enough to display all the contents of every cell. This means looking for the largest piece of data in the column and sizing the column to fit that piece of data. Here’s an example:

Autofit quickly, select columns and double click the sizing arrow

Fit to data works on column widths, but you can also use it on rows to fit row heights around data quickly.

How to fit columns to data using the double click shortcut

First, select one or more columns that you want to Fit to data. To select a column, click on the column header or click into the column and use the keyboard shortcut Ctrl+Space.

You can select multiple columns by dragging to select in the header if you wish. Once you have selected columns, you need to move your mouse over the dividing line in the header between 2 columns. When you do this, the dividing line will turn blue and your cursor will turn into a horizontal sizing cursor. See the image below.

The horizontal column sizing icon

Once you see that cursor, all you need to do is double click it! Sheets will then fit the width of columns you have selected around the data inside them. Just like this…

Example of fitting 3 columns to data using the double click method
How to fit columns to data using the double click shortcut

How to use the context menu to size columns manually or fit them to data

There are 2 ways to resize columns within Google Sheets. Fit to data and manual sizing by entering a pixel size. In order to access both these options, you need to open the column context menu.

To open the context menu for a column, you need to right-click anywhere in the column or use one of the context menu shortcuts.

Context menu keyboard shortcuts:

  • Ctrl+Shift+x or
  • Ctrl+Shift+\ or
  • Shift+F10
  • (replace Ctrl with for Mac)
The column context menu
Column right-click (context) menu

The column menu will have options to Resize the selected columns. When you click this option, your choices will be to fix the column width by entering an amount of pixels, or Fit to data.

Resize column options in Google Sheets
Resize column options in Google Sheets

How to resize columns by pasting column widths

Another handy feature of Google Sheets is one you might not be aware of. When you copy a cell, you are copying everything about that cell: cell value, font, formatting (bold, italics etc), highlighting, borders, validation, conditional formatting, and importantly the column size.

When you open the Paste special menu using a right-click or from the Edit toolbar, you will see the option to paste Column width only.

The paste special menu, column width only highlighted
You can copy and paste just a column width

You can use this feature to size columns to match other columns very quickly!

What is the shortcut key for autofit column width in Google Sheets?

There is no keyboard shortcut for autofit column widths or Fit to data in Google Sheets. The quickest way to access the Resize menu from a keyboard is to select a row using the row select shortcut, and then use the context menu shortcut to open the row context menu, and then either switch to mouse or hit the down arrow 9 times to select the row Resize options for the row.

Here’s the keyboard sequence:

  1. Select a column: Ctrl+Space
  2. Open the context menu (replace Ctrl with for Mac):
    Ctrl+Shift+x or
    Ctrl+Shift+\ or
    Shift+F10
  3. Select Resize using the down arrow nine times x 9
  4. Use Tab and the up and down arrows to select the option you want: Fit to contents or specify a size
  5. Hit Enter () to confirm your choice

Until they add a shortcut to this feature, I think double clicking the column sizing cursor or right clicking and accessing the context menu will out over the keyboard every time!

How do I get column width to all cells in Google Sheets?

The quickest way to change the width of all columns in Google Sheets is to first copy a cell from a column that has the width you want. Then select all columns (Ctrl+a (Win, ChromeOS), +a (Mac)) and use the Paste special menu to Paste width only.

Clicking the row and column intersection to select all columns
Click here to select all columns quickly

This will replicate your selected column with to ALL the columns in the sheet.

If you want to set the size of all columns on a sheet to a defined width, you need to select them all using the mouse or the keyboard (see below) and then access the Resize option in the context (right-click) menu.

For shortcut junkies! To do this quickly using the keyboard, here is the sequence:

  1. Navigate to the first column Ctrl++
  2. Select that column Ctrl+Space
  3. Add all the other columns to your selection Ctrl+Shift++
  4. Open the context menu (replace Ctrl with for Mac):
    Ctrl+Shift+x or
    Ctrl+Shift+\ or
    Shift+F10
  5. Select the Resize option

How do I lock cell width in Google Sheets?

Locking only the cell width in Google Sheets it not possible.

It is possible in to protect an entire sheet, or a range of cells. This allows you to set permissions that only allow certain users to edit those cells or throw up a warning before they make cell edits. Adjusting a cell width counts as editing a cell and you can stop it or warn about it using this method.

To protect a sheet, or range of sheets, use the option in the Data menu.

Protect sheets and ranges in the data menu
Protect sheets and ranges in the data menu

This is a useful feature, however it stops or warns you about ANY type of edit to a cell, even entering data, not just changing the column width.

Dave

I'm a Google Product Expert and mainly post on the subject of Google Sheets.

I've been a software engineer for over 20 years. The constant through all that time? Spreadheets.... Even though I can write programs I use them.... a lot. Sometimes there's just no better alternative!

Find out more about me here.

Leave a Comment