How to Change Row Height in Google Sheets

Learn how to change row height in Google Sheets by dragging a row border, entering a pixel height, or fitting rows to their contents.

Nov 16, 2026
•
11 min read

Contents

Don't Miss the Good Stuff

Get tech news that matters delivered to your inbox.

To change row height in Google Sheets on a computer, drag the bottom edge of a row-number header, or right-click the row number and select Resize row to enter an exact height. You can also fit the height to the row’s contents or resize several selected rows together.

The Google Sheets mobile apps let you resize rows by dragging their edges. Android also offers a numeric Resize row command, while the iPhone and iPad steps use dragging.

The short version

  • Quick adjustment: Drag the bottom edge of a row-number header up or down.
  • Exact height: On a computer, right-click the row number, select Resize row, enter a height in pixels, and click OK.
  • Fit the contents: Double-click the bottom row boundary on a computer, or choose Fit to data in the resize dialog.
  • Several rows: Select the row headers before applying a shared height or fitting them to their data.
  • Long text: Enable wrapping, then fit or enlarge the row if any text remains hidden.

MethodWhere it worksUse it to
Drag a row boundaryComputerAdjust height visually
Enter a pixel heightComputerSet a precise size
Select Fit to dataComputerFit selected rows to their contents
Double-click a row boundaryComputerQuickly fit one row
Use the keyboard context menuComputerResize without a mouse
Select multiple rows or the whole sheetComputerApply sizing across a selection
Enter a numeric heightAndroid appChoose a specific height
Drag a selected row edgeAndroid appAdjust height by touch
Drag the row-number header edgeiPhone and iPad appAdjust height by touch
Toggle Show condensed viewTables on a computerSwitch table spacing
Adjust height through Table formattingTables on a computerUse the formatting sidebar
Enable wrappingComputerDisplay long text on multiple lines
Enable wrappingAndroid appAllow content-driven row growth
Enable wrappingiPhone and iPad appAllow content-driven row growth
Set heights with Apps ScriptSpreadsheet scriptSize one or several rows
Force heights with Apps ScriptSpreadsheet scriptKeep heights fixed despite taller content
Fit rows with Apps ScriptSpreadsheet scriptFit a range or every existing row
Import a sizing macroComputerRepeat sizing from a menu or shortcut
Create an installable triggerApps ScriptRepeat sizing after edits or on a schedule
Set pixel heights through the APIAuthorized integrationApply an exact height programmatically
Restore automatic sizing through the APIAuthorized integrationClear explicit row heights
Enable Apps ScriptGoogle Admin consoleAllow script and macro methods

Change a row height on your computer

Open your spreadsheet and find the row number along the left edge. Move the pointer to the bottom boundary of that row-number header, then drag downward to make the row taller or upward to make it shorter.

For an exact height, click the row number to select the row, then right-click that selected header. Choose Resize row, enter the desired height in pixels, and click OK. For example, enter 40 to set a height of 40 pixels.

Resize several rows or fit their contents

Select the row-number headers you want to change before opening the resize dialog. For separate rows, hold Ctrl on Windows or Command on Mac while clicking their row numbers.

To select an exact range, focus the Name box with Ctrl + j on Windows or ChromeOS, or Command + j on Mac. Enter 2:10 and press Enter to select rows 2 through 10.

Right-click a selected row header and choose Resize row, whose label can be plural when multiple rows are selected. Enter the shared height and click OK; the same approach works after you insert multiple rows in Google Sheets.

To apply a height across the sheet, use Ctrl + a on Windows or ChromeOS, or Command + a on Mac. Make sure the whole sheet is selected before opening the row resize command, entering the height, and clicking OK.

To fit one row to its contents, double-click the bottom boundary of its row-number header. For the menu method, select one or more row headers, right-click the selection, and choose Resize row. Select Fit to data, then click OK; with several rows selected, use the plural resize command.

Choose a numeric height when every selected row should have the same size. Choose Fit to data when each row should have room for its own contents.

Resize rows with the keyboard

Select the target row, then press Shift + F10 to open its context menu. Press Down arrow until you reach Resize row, then press Enter.

The custom-height field is initially focused, so enter your desired height there. To choose automatic fitting instead, press Shift + Tab to reach the custom-size radio button, then press Down arrow to select Fit to data. Press Tab until OK is focused, then press Enter to apply the change.

Change row height on Android or iPhone

On Android, open the spreadsheet in the Google Sheets app and touch and hold the row-number header. Tap Resize row, enter the height you want, and tap Save.

For a visual adjustment on Android, tap the row-number header to select it. Drag its edge upward or downward until the row has the height you want.

On iPhone or iPad, open the spreadsheet in the Google Sheets app and select the row you want to resize. Tap and drag the edge of the header cell containing its row number to adjust the height.

Fix text that does not fit in a row

On a computer, select the cells containing long text and click Format > Wrapping > Wrap. You can wrap text in Google Sheets to display it on multiple lines within the cell.

A previously fixed row height can still leave wrapped text hidden. Select the affected row headers, right-click, choose Resize row, select Fit to data, and click OK.

In either mobile app, select a cell or range, tap Format, open Cell, and turn on Wrap text. Tap the sheet to save the formatting. If text remains hidden on Android, use Resize row or drag the boundary taller; on iPhone or iPad, drag the boundary or apply Fit to data on a computer.

Adjust spacing in a Sheets table

After you make a table in Google Sheets, click Table menu beside the table name and open Table formatting. Select Show condensed view to use tighter spacing, or deselect it to restore the roomier presentation. These controls apply to structured tables.

For the table’s row-height adjustment, select the table and open Format > Table formatting. Adjust the row-height setting in the sidebar. You can also reach the advanced controls through Table menu > Table formatting > View advanced options.

Automate row height with Apps Script

For repeatable sizing, open Extensions > Apps Script. Place the sizing operation you need inside a function that takes no arguments and returns no value, then save and run that function. You need spreadsheet edit access and an account permitted to execute scripts.

To set row 2 to 40 pixels, use the following operation. Google says this method allows the row to grow if its contents need more space.

SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().setRowHeight(2, 40);

To size rows 2 through 6 together, use the following version. The arguments specify the starting row, the number of rows, and the height in pixels; these rows can also grow to accommodate their contents.

SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().setRowHeights(2, 5, 40);

To keep those rows at 40 pixels even when their contents are taller, use the forced-height method. Choose it only when keeping the fixed height matters more than displaying all the content.

SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().setRowHeightsForced(2, 5, 40);

To fit rows 2 through 6 to their contents, use the following operation in your function. This sizes the specified rows without choosing a shared pixel height.

const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); sheet.autoResizeRows(2, 5);

To fit every existing row, keep the same sheet assignment and replace the resizing call with the one below. This uses the sheet’s existing row count.

sheet.autoResizeRows(1, sheet.getMaxRows());

To reuse your saved function as a macro, return to Sheets and open Extensions > Macros > Import, then click Add function beside it. Google also calls the import command Import macro. Open Extensions > Macros > Manage macros, assign an optional shortcut, and click Update. Run the function from Extensions > Macros or use its assigned shortcut.

To repeat sizing after edits or on a schedule, save your row-sizing function, then open Triggers > Add Trigger in the Apps Script editor. Select the function, configure an edit event or a time-driven schedule, and click Save. For unattended operation, make the function identify the intended spreadsheet and sheet explicitly instead of relying on the active sheet used in these examples.

Set row heights through the Sheets API

If you already use an authorized Sheets API client, call spreadsheets.batchUpdate with an updateDimensionProperties request. Set range.sheetId to the target sheet, range.dimension to ROWS, range.startIndex to 1, and range.endIndex to 6. Set properties.pixelSize to 40 and fields to pixelSize. This sets rows 2 through 6 to 40 pixels using zero-based indexes.

To restore automatic sizing, call spreadsheets.batchUpdate with an autoResizeDimensions request. Set dimensions.sheetId to the target sheet, dimensions.dimension to ROWS, dimensions.startIndex to 1, and dimensions.endIndex to 6. Google says this clears explicit heights for rows 2 through 6 so they grow dynamically with their contents. Both API methods require spreadsheet write authorization.

Fix blocked row height changes

If you cannot resize a row, check that you have appropriate editing access and that sheet protection permits the change. The owner can manage access through Share and protection through Data > Protect sheets and ranges. These controls determine editing permissions rather than row height.

If your organization has disabled Apps Script, an administrator with the Drive & Docs administrator privilege can enable it. In the Google Admin console, open Menu > Apps > Google Workspace > Drive and Docs > Google Apps Script. Click On for everyone, then click Save. This enables the script and macro methods, but you still need to create or run a row-sizing function.

Frequently Asked Questions

Does changing zoom change the row height?

Zoom changes how large the spreadsheet appears, rather than the stored row height. Use a row-sizing control when you want to change the actual height.

Is there a dedicated keyboard shortcut for row height?

The Google Sheets keyboard shortcut list does not include a dedicated row-height shortcut. You can resize through the keyboard context menu or assign a custom shortcut to a sizing macro.

Will a script or API edit fire my row-sizing edit trigger?

No, script and API changes do not themselves fire installable edit triggers. If your sizing needs to run periodically regardless of those changes, use a time-driven schedule.

Whose account runs an installable row-sizing trigger?

An installable trigger runs under the account of the person who created it. It does not switch to the account of whichever person edits the spreadsheet.

Share