Jupyter Notebook

Jupyter Notebook Keyboard Shortcuts

Complete Jupyter Notebook keyboard shortcuts. Cell execution, mode switching, and kernel management shortcuts.

15
Shortcuts
3
Categories
Free
100% Free

Jupyter Notebook has two modes, and every shortcut on this page depends on knowing which one you are in: Edit mode types into a cell, Command mode acts on cells with single letters. The table follows the classic notebook and JupyterLab, which share these keys. The habit that makes Jupyter fast is pressing Esc, doing cell work with letters, and pressing Enter to type again.

Notebook (51)

ShortcutActionWhat it does
TabInvoke notebookCommand: completer:invoke-notebook.
YChange cell to codeCommand: notebook:change-cell-to-code.
1Change cell to heading 1Command: notebook:change-cell-to-heading-1.
2Change cell to heading 2Command: notebook:change-cell-to-heading-2.
3Change cell to heading 3Command: notebook:change-cell-to-heading-3.
4Change cell to heading 4Command: notebook:change-cell-to-heading-4.
5Change cell to heading 5Command: notebook:change-cell-to-heading-5.
6Change cell to heading 6Command: notebook:change-cell-to-heading-6.
MChange cell to markdownCommand: notebook:change-cell-to-markdown.
RChange cell to rawCommand: notebook:change-cell-to-raw.
CCopy cellCommand: notebook:copy-cell.
XCut cellCommand: notebook:cut-cell.
D, DDelete cellCommand: notebook:delete-cell.
EscEnter command mode (edit mode)Command: notebook:enter-command-mode.
Ctrl + MEnter command mode (edit mode)Command: notebook:enter-command-mode.
Alt + UpAccess previous history entry (edit mode)Command: notebook:access-previous-history-entry.
Alt + DownAccess next history entry (edit mode)Command: notebook:access-next-history-entry.
EnterEnter edit modeCommand: notebook:enter-edit-mode.
Shift + UpExtend marked cells aboveCommand: notebook:extend-marked-cells-above.
Shift + KExtend marked cells aboveCommand: notebook:extend-marked-cells-above.
Shift + HomeExtend marked cells topCommand: notebook:extend-marked-cells-top.
Shift + DownExtend marked cells belowCommand: notebook:extend-marked-cells-below.
Shift + EndExtend marked cells bottomCommand: notebook:extend-marked-cells-bottom.
Shift + JExtend marked cells belowCommand: notebook:extend-marked-cells-below.
AInsert cell aboveCommand: notebook:insert-cell-above.
BInsert cell belowCommand: notebook:insert-cell-below.
Shift + MMerge cellsCommand: notebook:merge-cells.
Ctrl + BackspaceMerge cell aboveCommand: notebook:merge-cell-above.
Ctrl + Shift + MMerge cell belowCommand: notebook:merge-cell-below.
DownMove cursor downCommand: notebook:move-cursor-down.
JMove cursor downCommand: notebook:move-cursor-down.
UpMove cursor upCommand: notebook:move-cursor-up.
KMove cursor upCommand: notebook:move-cursor-up.
LeftMove cursor heading above or collapseCommand: notebook:move-cursor-heading-above-or-collapse.
RightMove cursor heading below or expandCommand: notebook:move-cursor-heading-below-or-expand.
Shift + AInsert heading aboveCommand: notebook:insert-heading-above.
Shift + BInsert heading belowCommand: notebook:insert-heading-below.
Ctrl + Shift + LeftCollapse all headingsCommand: notebook:collapse-all-headings.
Ctrl + Shift + RightExpand all headingsCommand: notebook:expand-all-headings.
VPaste cell belowCommand: notebook:paste-cell-below.
Shift + ZRedo cell actionCommand: notebook:redo-cell-action.
Ctrl + EnterRun cellCommand: notebook:run-cell.
Alt + EnterRun cell and insert belowCommand: notebook:run-cell-and-insert-below.
Shift + EnterRun cell and select next (edit mode)Command: notebook:run-cell-and-select-next.
Shift + LLine numberingCommand: viewmenu:line-numbering.
Ctrl + ASelect allCommand: notebook:select-all.
Ctrl + Shift + -Split cell at cursor (edit mode)Command: notebook:split-cell-at-cursor.
ZUndo cell actionCommand: notebook:undo-cell-action.
Shift + RToggle render side by side currentCommand: notebook:toggle-render-side-by-side-current.
Ctrl + Shift + UpMove cell upCommand: notebook:move-cell-up.
Ctrl + Shift + DownMove cell downCommand: notebook:move-cell-down.

Application & layout (30)

ShortcutActionWhat it does
Ctrl + Shift + ]Activate next tabCommand: application:activate-next-tab.
Ctrl + Shift + [Activate previous tabCommand: application:activate-previous-tab.
Ctrl + Shift + .Activate next tab barCommand: application:activate-next-tab-bar.
Ctrl + Shift + ,Activate previous tab barCommand: application:activate-previous-tab-bar.
Alt + WCloseCommand: application:close.
Ctrl + Shift + DToggle modeCommand: application:toggle-mode.
Ctrl + BToggle left areaCommand: application:toggle-left-area.
Ctrl + JToggle right areaCommand: application:toggle-right-area.
F11Toggle fullscreen modeCommand: application:toggle-fullscreen-mode.
Alt + 1Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + 2Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + 3Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + 4Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + 5Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + 6Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + 7Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + 8Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + 9Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + 0Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 1Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 2Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 3Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 4Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 5Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 6Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 7Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 8Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 9Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Alt + Shift + 0Toggle sidebar widgetCommand: application:toggle-sidebar-widget.
Ctrl + Shift + UShow panelCommand: property-inspector:show-panel.

File browser (9)

ShortcutActionWhat it does
BackspaceGo upCommand: filebrowser:go-up.
DeleteDeleteCommand: filebrowser:delete.
Ctrl + XCutCommand: filebrowser:cut.
Ctrl + CCopyCommand: filebrowser:copy.
Ctrl + VPasteCommand: filebrowser:paste.
F2RenameCommand: filebrowser:rename.
Ctrl + DDuplicateCommand: filebrowser:duplicate.
Ctrl + ASelect allCommand: filebrowser:select-all.
Ctrl + Shift + FShow panelCommand: filebrowser:show-panel.

Image viewer (8)

ShortcutActionWhat it does
HFlip horizontalCommand: imageviewer:flip-horizontal.
VFlip verticalCommand: imageviewer:flip-vertical.
IInvert colorsCommand: imageviewer:invert-colors.
0Reset imageCommand: imageviewer:reset-image.
]Rotate clockwiseCommand: imageviewer:rotate-clockwise.
[Rotate counterclockwiseCommand: imageviewer:rotate-counterclockwise.
=Zoom inCommand: imageviewer:zoom-in.
-Zoom outCommand: imageviewer:zoom-out.

Mainmenu (8)

ShortcutActionWhat it does
Ctrl + Shift + ZRedoCommand: editmenu:redo.
Ctrl + ZUndoCommand: editmenu:undo.
Ctrl + Shift + QClose and cleanupCommand: filemenu:close-and-cleanup.
I, IInterruptCommand: kernelmenu:interrupt.
0, 0RestartCommand: kernelmenu:restart.
Shift + EnterRunCommand: runmenu:run.
Ctrl + Shift + 'Activate previously used tabCommand: tabsmenu:activate-previously-used-tab.
Ctrl + Shift + TReopen lastCommand: recentmenu:reopen-last.

Code editor (6)

ShortcutActionWhat it does
Ctrl + DDelete lineCommand: codemirror:delete-line.
Ctrl + Shift + KDelete lineCommand: codemirror:delete-line.
Alt + AToggle block commentCommand: codemirror:toggle-block-comment.
Ctrl + /Toggle commentCommand: codemirror:toggle-comment.
Ctrl + Shift + DSelect next occurrenceCommand: codemirror:select-next-occurrence.
Ctrl + BMarkdown toggle boldCommand: codemirror:markdown-toggle-bold.

Debugger (6)

ShortcutActionWhat it does
Ctrl + Shift + EShow panelCommand: debugger:show-panel.
F9ContinueCommand: debugger:continue.
Shift + F9TerminateCommand: debugger:terminate.
F10NextCommand: debugger:next.
F11StepInCommand: debugger:stepIn.
Shift + F11StepOutCommand: debugger:stepOut.

Search (6)

ShortcutActionWhat it does
Ctrl + FStartCommand: documentsearch:start.
Ctrl + HStartWithReplaceCommand: documentsearch:startWithReplace.
Ctrl + GHighlightNextCommand: documentsearch:highlightNext.
Ctrl + Shift + GHighlightPreviousCommand: documentsearch:highlightPrevious.
Alt + LToggleSearchInSelectionCommand: documentsearch:toggleSearchInSelection.
EscEndCommand: documentsearch:end.

Completer (5)

ShortcutActionWhat it does
Alt + ]NextCommand: inline-completer:next.
Alt + [PreviousCommand: inline-completer:previous.
TabAcceptCommand: inline-completer:accept.
Alt + EndAcceptCommand: inline-completer:accept.
Alt + \InvokeCommand: inline-completer:invoke.

Console (4)

ShortcutActionWhat it does
TabInvoke consoleCommand: completer:invoke-console.
Shift + EnterRun forcedCommand: console:run-forced.
Ctrl + EnterLinebreakCommand: console:linebreak.
EnterRun unforcedCommand: console:run-unforced.

Tooltip (4)

ShortcutActionWhat it does
EscDismissCommand: tooltip:dismiss.
Shift + TabLaunch consoleCommand: tooltip:launch-console.
Shift + TabLaunch fileCommand: tooltip:launch-file.
Shift + TabLaunch notebookCommand: tooltip:launch-notebook.

Command palette & settings (3)

ShortcutActionWhat it does
Ctrl + Shift + CActivate command paletteCommand: apputils:activate-command-palette.
Ctrl + PPrintCommand: apputils:print.
Ctrl + Shift + HDisplay shortcutsCommand: apputils:display-shortcuts.

Other panels (11)

ShortcutActionWhat it does
Ctrl + SSaveCommand: docmanager:save.
Ctrl + Shift + SSave asCommand: docmanager:save-as.
Ctrl + Shift + BShow panelCommand: running:show-panel.
Ctrl + Alt + AShow modalCommand: running:show-modal.
Ctrl + ,OpenCommand: settingeditor:open.
Ctrl + SSaveCommand: settingeditor:save.
Ctrl + Shift + XShow panelCommand: extensionmanager:show-panel.
TabInvoke fileCommand: completer:invoke-file.
Ctrl + IToggleCommand: inspector:toggle.
Ctrl + Shift + LCreateCommand: launcher:create.
Ctrl + Shift + KShow panelCommand: toc:show-panel.
📜 Source: JupyterLab source — default keyboard shortcuts in packages/*/schema/*.json (jupyter.lab.shortcuts). JupyterLab (and Notebook 7, which runs on the same core) ships its default bindings as JSON schema in the application source; every enabled binding is listed here with its command id, grouped by extension. Accel is written Ctrl (Cmd on Mac); two-key sequences such as D, D are pressed one after the other in command mode. Checked 2026-09-08. How we verify ›
📄 View Printable Cheat Sheet — Download as PDF or print

→ Related guide: Keyboard shortcuts every data scientist should know

Command mode

Press Esc to leave the cell editor; the cell border turns blue. Then A and B insert a cell above or below, DD (D twice) deletes the selected cell, M turns it into Markdown and Y back into code. C, X and V copy, cut and paste whole cells, and Shift with the arrow keys selects several so they can be moved or deleted together. Enter returns to Edit mode in the selected cell.

Running

Shift + Enter runs the cell and selects the next one — pressing it repeatedly walks down a notebook — while Ctrl + Enter runs and stays, which is what you want when re-running one cell while tuning a parameter. Alt + Enter runs and inserts an empty cell below. All three work in both modes. Interrupting a running cell is I, I in Command mode, and 0, 0 restarts the kernel.

Inside a cell

In Edit mode, Tab completes names from the running kernel and Shift + Tab shows a function's signature and docstring in a tooltip (press it again for more). Ctrl + / toggles a comment on the selected lines. Because the editor captures most keys in Edit mode, cell operations do not work there — if A inserts a letter instead of a cell, press Esc first.

No shortcuts found

Frequently Asked Questions

Can I combine Jupyter Notebook shortcuts with other tools?

Yes — use My Stack to combine Jupyter Notebook shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.

Do Jupyter Notebook shortcuts differ between Windows and Mac?

Most do not — the underlying key is the same, but Jupyter Notebook (like most software) maps Ctrl on Windows/Linux to Cmd on Mac for standard operations. Where a shortcut is platform-specific, this page notes the Mac variant next to the Windows one.

Copied!
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

🤖 Ask AI about Jupyter Notebook shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok